|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="handleAdd">编 辑</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddDistrilbution" |
|
|
|
|
>添加提货数据</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="handleAdd">提货完成</el-button> |
|
|
|
@ -66,6 +66,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
@ -79,29 +80,22 @@
|
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<!-- <el-button size="small" @click="editsolt(slotProps.scope)">修改</el-button>--> |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">查看</el-text> |
|
|
|
|
<el-text |
|
|
|
|
size="small" |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
text |
|
|
|
|
@click="handleSign(slotProps.scope, 1)" |
|
|
|
|
v-if="slotProps.scope.row.conditions < 30" |
|
|
|
|
>签收</el-text |
|
|
|
|
> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleEdits(slotProps.scope)" |
|
|
|
|
v-if="slotProps.scope.row.conditions < 20" |
|
|
|
|
>编辑提货信息</el-text |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">查 看</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-edit" @click="handleEdits(slotProps.scope)" |
|
|
|
|
>明 细</el-text |
|
|
|
|
> |
|
|
|
|
<!-- <el-button size="small" type="danger" icon="el-icon-edit" text @click="handleDeleteOwn(slotProps.scope)">删除</el-button>--> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 统计 --> |
|
|
|
|
<el-row> |
|
|
|
|
<div>选择数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div> |
|
|
|
|
<div>总计: 总数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-row class="el-fy"> |
|
|
|
|
<div class="avue-crud__pagination flex-c-sb" style="width: 100%"> |
|
|
|
|
<div style="font-size: 14px">勾选数量: {{ selectionList.length }}</div> |
|
|
|
@ -120,6 +114,7 @@
|
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 表单模块 --> |
|
|
|
|
<el-dialog |
|
|
|
|
:title="title" |
|
|
|
@ -167,6 +162,79 @@
|
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
:title="title" |
|
|
|
|
v-model="popUpShow.addDistrilbutionVisited" |
|
|
|
|
width="50%" |
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
append-to-body |
|
|
|
|
> |
|
|
|
|
<el-form :disabled="view" ref="form" :model="form" label-width="80px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
<el-form-item label="运单号" prop="clientId"> |
|
|
|
|
<!-- <el-input v-model="form.customerName" placeholder="请输入客户名称"/>--> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.clientId" |
|
|
|
|
filterable |
|
|
|
|
remote |
|
|
|
|
reserve-keyword |
|
|
|
|
remote-show-suffix |
|
|
|
|
:remote-method="remoteMethod" |
|
|
|
|
:loading="loading" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入运单号" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in options" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="开单日期" prop="consignee"> |
|
|
|
|
<el-input v-model="form.consignee" placeholder="请输入提货人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="货物名称" prop="pickUpPlate"> |
|
|
|
|
<el-input v-model="form.pickUpPlate" placeholder="请输入货物名称" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="提货件数" prop="deliveryDocument"> |
|
|
|
|
<el-input-number v-model="form.deliveryDocument" :min="1" :max="10" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="到站" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" placeholder="请输入提货证件" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="发货人" prop="pickUpTime"> |
|
|
|
|
<el-input v-model="form.pickUpTime" placeholder="请输入发货人" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="发货手机" prop="consignee"> |
|
|
|
|
<el-input v-model="form.consignee" placeholder="请输入发货手机" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="收货电话" prop="pickUpPlate"> |
|
|
|
|
<el-input v-model="form.pickUpPlate" placeholder="请输入收货电话" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支付方式" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" placeholder="请输入支付方式" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="备注" prop="deliveryDocument"> |
|
|
|
|
<el-input v-model="form.deliveryDocument" type="textarea" placeholder="请输入备注" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 表单按钮 --> |
|
|
|
|
<template #footer> |
|
|
|
|
<span v-if="!view" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit" |
|
|
|
|
>提 交</el-button |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
icon="el-icon-circle-close" |
|
|
|
|
@click="popUpShow.addDistrilbutionVisited = false" |
|
|
|
|
>取 消</el-button |
|
|
|
|
> |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</basic-container> |
|
|
|
|
<edittablehead |
|
|
|
@ -204,6 +272,11 @@ export default {
|
|
|
|
|
title: '', |
|
|
|
|
// 是否展示弹框 |
|
|
|
|
box: false, |
|
|
|
|
/** 弹出层显示 */ |
|
|
|
|
popUpShow: { |
|
|
|
|
/** 添加提货数据 */ |
|
|
|
|
addDistrilbutionVisited: false, |
|
|
|
|
}, |
|
|
|
|
// 是否显示查询 |
|
|
|
|
search: true, |
|
|
|
|
// 加载中 |
|
|
|
@ -233,7 +306,7 @@ export default {
|
|
|
|
|
distributionType: [], |
|
|
|
|
costListName: [], |
|
|
|
|
certificateType: [], |
|
|
|
|
|
|
|
|
|
options: [], |
|
|
|
|
shortcuts: [ |
|
|
|
|
{ |
|
|
|
|
text: '最近一周', |
|
|
|
@ -306,9 +379,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
/** |
|
|
|
|
* 导出 |
|
|
|
|
* */ |
|
|
|
|
/** 导出 */ |
|
|
|
|
handleExportInfo() { |
|
|
|
|
let row = {}; |
|
|
|
|
console.log(this.stockupDate); |
|
|
|
@ -352,14 +423,6 @@ export default {
|
|
|
|
|
selectionsc(value) { |
|
|
|
|
console.log(value); |
|
|
|
|
}, |
|
|
|
|
delectsolt(scope) { |
|
|
|
|
const { row } = scope; |
|
|
|
|
console.log(row); |
|
|
|
|
}, |
|
|
|
|
editsolt(scope) { |
|
|
|
|
const { row } = scope; |
|
|
|
|
console.log(row); |
|
|
|
|
}, |
|
|
|
|
btnsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
}, |
|
|
|
@ -390,29 +453,27 @@ export default {
|
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
handleRemove(file, fileList) { |
|
|
|
|
console.log(file, fileList); |
|
|
|
|
}, |
|
|
|
|
handlePreview(file) { |
|
|
|
|
console.log(file); |
|
|
|
|
}, |
|
|
|
|
textbox(e, index) { |
|
|
|
|
console.log('e,index', e, index); |
|
|
|
|
this.costList[index + 1] = e; |
|
|
|
|
}, |
|
|
|
|
handleCheckedCitiesChange(value) { |
|
|
|
|
console.log('>>>>>>>', value); |
|
|
|
|
if (value.length < 1) { |
|
|
|
|
this.costList = []; |
|
|
|
|
this.costListName = []; |
|
|
|
|
/** 客户查询 */ |
|
|
|
|
async remoteMethod(query) { |
|
|
|
|
if (query) { |
|
|
|
|
// this.loading = true; |
|
|
|
|
this.options = []; |
|
|
|
|
this.form.customerCode = null; |
|
|
|
|
let cl = await getListClient(this.page.currentPage, this.page.pageSize, { |
|
|
|
|
clientName: query, |
|
|
|
|
}); |
|
|
|
|
console.log('客户信息1234>>>>', cl.data.data.records); |
|
|
|
|
cl.data.data.records.forEach(i => { |
|
|
|
|
let st = { |
|
|
|
|
label: i.clientName, |
|
|
|
|
value: i.id, |
|
|
|
|
code: i.clientCode, |
|
|
|
|
}; |
|
|
|
|
this.options.push(st); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.options = []; |
|
|
|
|
} |
|
|
|
|
this.clientType.forEach(i => { |
|
|
|
|
if (value.includes(i.dictKey)) { |
|
|
|
|
console.log(i); |
|
|
|
|
i.pitch = true; |
|
|
|
|
this.costListName = value; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
init() { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 160); |
|
|
|
@ -434,89 +495,40 @@ export default {
|
|
|
|
|
checkcColumnList(prop, columnList) { |
|
|
|
|
return columnList.find(item => item.prop === prop); |
|
|
|
|
}, |
|
|
|
|
/** 是否显示搜索控件 */ |
|
|
|
|
searchHide() { |
|
|
|
|
this.search = !this.search; |
|
|
|
|
}, |
|
|
|
|
/** 搜索 */ |
|
|
|
|
searchChange() { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
/** 重置搜索数据 */ |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.stockupDate = []; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
bianLier(costListName, clientType, costList, fei) { |
|
|
|
|
console.log('>>>>>>>>>', costListName, clientType, costList, fei); |
|
|
|
|
this.pan = false; |
|
|
|
|
for (let i = 0; i < costListName.length; i++) { |
|
|
|
|
if (!costList) { |
|
|
|
|
this.pan = true; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
for (let a = 0; a < clientType.length; a++) { |
|
|
|
|
// console.log("进来了",clientType[a].dictKey , costListName[i]); |
|
|
|
|
if (clientType[a].dictKey == costListName[i]) { |
|
|
|
|
// console.log("进来了",clientType[a].dictKey , costListName[i]); |
|
|
|
|
let zhi = costList[costListName[i]]; |
|
|
|
|
if (!zhi) { |
|
|
|
|
this.pan = true; |
|
|
|
|
continue; |
|
|
|
|
} else { |
|
|
|
|
//2.添加 |
|
|
|
|
fei.set(clientType[a].dictKey, zhi); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
async handleSubmit() { |
|
|
|
|
if (!this.form.id) { |
|
|
|
|
let fei = new Map(); |
|
|
|
|
await this.bianLier(this.costListName, this.clientType, this.costList, fei); |
|
|
|
|
this.form.fei = Object.fromEntries(fei); |
|
|
|
|
this.form.stockArticleId = this.$route.query.ids; |
|
|
|
|
console.log('this.form', this.form); |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.contextmenuFlag = false; |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$router.push(this.tagWel); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
/** 表单提交 */ |
|
|
|
|
async handleSubmit() {}, |
|
|
|
|
/** 新增 */ |
|
|
|
|
handleAdd() { |
|
|
|
|
this.title = '新增'; |
|
|
|
|
this.form = {}; |
|
|
|
|
this.box = true; |
|
|
|
|
}, |
|
|
|
|
handleBillAdd() { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/distribution/inventory/distrilbutionBillLading', |
|
|
|
|
query: { |
|
|
|
|
type: '3', |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
/** 开启添加提货数据弹窗 */ |
|
|
|
|
handleAddDistrilbution() { |
|
|
|
|
if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); |
|
|
|
|
this.title = '添加提货数据'; |
|
|
|
|
this.popUpShow.addDistrilbutionVisited = true; |
|
|
|
|
}, |
|
|
|
|
//删除 |
|
|
|
|
/** 删除 */ |
|
|
|
|
handleDeleteOwn(row) { |
|
|
|
|
console.log('删除!!', row); |
|
|
|
|
}, |
|
|
|
|
//查询详细 |
|
|
|
|
/** 查询详细 */ |
|
|
|
|
handleLike(row) { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/distribution/inventory/distrilbutionBillLadingView', |
|
|
|
@ -525,6 +537,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 查看 */ |
|
|
|
|
handleEdits(row) { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/distribution/inventory/distrilbutionBillLading', |
|
|
|
@ -535,6 +548,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 批量删除 */ |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
@ -557,43 +571,32 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowDel(row) { |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 弹出层开启前清除数据 */ |
|
|
|
|
beforeClose(done) { |
|
|
|
|
done(); |
|
|
|
|
this.form = {}; |
|
|
|
|
this.view = false; |
|
|
|
|
}, |
|
|
|
|
/** 表格复选框改变执行的回调 */ |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
/** 清空复选框 */ |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
// this.$refs.table.clearSelection(); |
|
|
|
|
}, |
|
|
|
|
/** 页码改变执行回调 */ |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
/** 页数改变执行回调 */ |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
/** 获取时间 */ |
|
|
|
|
getTime(dat) { |
|
|
|
|
let date = new Date(dat); |
|
|
|
|
let formatter = new Intl.DateTimeFormat('en', { |
|
|
|
@ -607,6 +610,7 @@ export default {
|
|
|
|
|
let formattedDate = formatter.format(date); |
|
|
|
|
return formattedDate.replace(/\//g, '-'); |
|
|
|
|
}, |
|
|
|
|
/** 请求页面数据 */ |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
if (this.stockupDate.length > 0) { |
|
|
|
@ -667,7 +671,7 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style> |
|
|
|
|
<style scope lang="scss"> |
|
|
|
|
.foot { |
|
|
|
|
position: fixed; |
|
|
|
|
right: 0; |
|
|
|
|