|
|
|
@ -204,8 +204,9 @@
|
|
|
|
|
:data="dataList" |
|
|
|
|
style="width: 100%" |
|
|
|
|
:border="option.border"> |
|
|
|
|
<el-table-column v-if="option.index" label="序号" type="index" width="60" align="center"></el-table-column> |
|
|
|
|
<template v-for="(item,index) in option.columnOrder"> |
|
|
|
|
|
|
|
|
|
<template v-for="(item,index) in option.columnList"> |
|
|
|
|
<!-- table字段 --> |
|
|
|
|
<el-table-column v-if="item.hide!==true" |
|
|
|
|
:prop="item.prop" |
|
|
|
@ -215,11 +216,11 @@
|
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<!-- 操作栏模块 --> |
|
|
|
|
<el-table-column prop="menu" label="操作" :width="220" align="center"> |
|
|
|
|
<el-table-column prop="menu" fixed="right" label="操作" :width="220" align="center"> |
|
|
|
|
<template #="{row}"> |
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-view" @click="handleView(row)">查看</el-button>--> |
|
|
|
|
<!-- <el-button type="primary" text icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>--> |
|
|
|
|
<el-button type="primary" text icon="el-icon-delete" @click="rowDel(row)">移除</el-button> |
|
|
|
|
<el-button type="primary" text icon="el-icon-delete" @click="rowOrder(row)">移除</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -265,7 +266,7 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="提货证件" prop="totalCost" label-width ='120px'> |
|
|
|
|
<el-form-item label="提货证件" label-width ='120px'> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="fileListSell" |
|
|
|
|
class="upload-demo" |
|
|
|
@ -287,7 +288,7 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="文员确定图片" prop="totalCost" label-width ='120px'> |
|
|
|
|
<el-form-item label="文员确定图片" label-width ='120px'> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="fileListClerk" |
|
|
|
|
class="upload-demo" |
|
|
|
@ -309,7 +310,7 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="8"> |
|
|
|
|
<el-form-item label="库管签收图片" prop="totalCost" label-width ='120px'> |
|
|
|
|
<el-form-item label="库管签收图片" label-width ='120px'> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="fileListLibrary" |
|
|
|
|
class="upload-demo" |
|
|
|
@ -394,6 +395,7 @@
|
|
|
|
|
<el-dialog v-model="dialogFormOrderVisible" title="添加订单" style="width: 80% "> |
|
|
|
|
|
|
|
|
|
<tablecmt |
|
|
|
|
ref="multipleTable" |
|
|
|
|
:columnList="columnList" |
|
|
|
|
:tableData="dataOrder" |
|
|
|
|
:loading="loading" |
|
|
|
@ -458,7 +460,7 @@ export default {
|
|
|
|
|
// 是否显示查询 |
|
|
|
|
search: true, |
|
|
|
|
// 加载中 |
|
|
|
|
loading: true, |
|
|
|
|
loading: false, |
|
|
|
|
// 是否为查看模式 |
|
|
|
|
view: false, |
|
|
|
|
// 查询信息 |
|
|
|
@ -534,6 +536,9 @@ export default {
|
|
|
|
|
totalCost: [ |
|
|
|
|
{ required: true, message: '请输入费用合计', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
deliveryDocuments: [ |
|
|
|
|
{ required: true, message: '请上传提货证件', trigger: 'change' } |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
columnList: [ |
|
|
|
|
{ |
|
|
|
@ -1060,7 +1065,7 @@ export default {
|
|
|
|
|
this.getDetailOen(); |
|
|
|
|
}else{ |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.onLoadOwn(this.page); |
|
|
|
|
// this.onLoadOwn(this.page); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
deep: true, |
|
|
|
@ -1240,9 +1245,55 @@ export default {
|
|
|
|
|
this.data.splice(id1, 1) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//移除数据 |
|
|
|
|
rowOrder (row) { |
|
|
|
|
console.log(">>?>?><?",row); |
|
|
|
|
this.dataList.forEach( i =>{ |
|
|
|
|
if(i.id === row.id){ |
|
|
|
|
this.dataList |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
let id1 = this.dataList.findIndex(item => { |
|
|
|
|
if (item.id == row.id) { |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.dataList.splice(id1, 1) |
|
|
|
|
}, |
|
|
|
|
//订单选择确定 |
|
|
|
|
callFordeliveryOrder(){ |
|
|
|
|
console.log("123123", this.selectionList.length); |
|
|
|
|
let st = false; |
|
|
|
|
let sts = false; |
|
|
|
|
let consigneePerson = ''; |
|
|
|
|
let consigneeMobile = ''; |
|
|
|
|
this.selectionList.some( i =>{ |
|
|
|
|
if(i.reservationStatusName === "已预约"){ st = true; this.$message.warning(i.orderCode+"已预约,请勿重复预约!!!"); } |
|
|
|
|
if(!consigneePerson && !consigneeMobile){ |
|
|
|
|
consigneeMobile = i.consigneeMobile; |
|
|
|
|
consigneePerson = i.consigneePerson; |
|
|
|
|
}else{ |
|
|
|
|
if(consigneeMobile != i.consigneeMobile && consigneePerson != i.consigneePerson ){ sts = true; } |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(st){ |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
if(sts){ |
|
|
|
|
this.$message.warning("收货人不相同,请选择相同的收货人!!!"); |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let isa= false; |
|
|
|
|
this.selectionList.some( i =>{ |
|
|
|
|
let a = this.dataList.filter((ele) => ele.id == i.id ).length >= 1 |
|
|
|
|
// console.log("asdgfasdv",a); |
|
|
|
|
if(!a){ |
|
|
|
|
this.dataList.push(i); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(!isa){ |
|
|
|
|
this.dialogFormOrderVisible = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//确定 |
|
|
|
@ -1331,6 +1382,58 @@ export default {
|
|
|
|
|
getDictionaryBiz('certificate_type').then(res => { |
|
|
|
|
this.certificateType = res.data.data; |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('distribution_type').then(res => { |
|
|
|
|
this.distributionType = res.data.data; |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('logpm_unit').then(res => { //单位 |
|
|
|
|
this.logpmUnit = res.data.data; |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('order_status').then(res => { |
|
|
|
|
this.deliveryOrderStatus = res.data.data; |
|
|
|
|
this.checkcColumnList("orderStatusName", this.columnList).checkarr=res.data.data.map(item=>{ |
|
|
|
|
item.value=item.dictKey |
|
|
|
|
item.label=item.dictValue |
|
|
|
|
return item |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('basic_grounding').then(res => { |
|
|
|
|
this.checkcColumnList("groundingStatusName", this.columnList).checkarr=res.data.data.map(item=>{ |
|
|
|
|
item.value=item.dictKey |
|
|
|
|
item.label=item.dictValue |
|
|
|
|
return item |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('freeze_status').then(res => { |
|
|
|
|
this.checkcColumnList("freezeStatusName", this.columnList).checkarr=res.data.data.map(item=>{ |
|
|
|
|
item.value=item.dictKey |
|
|
|
|
item.label=item.dictValue |
|
|
|
|
return item |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('stockup_status').then(res => { |
|
|
|
|
this.checkcColumnList("stockupStatusName", this.columnList).checkarr=res.data.data.map(item=>{ |
|
|
|
|
item.value=item.dictKey |
|
|
|
|
item.label=item.dictValue |
|
|
|
|
return item |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
getDictionaryBiz('order_reservation_status').then(res => { |
|
|
|
|
this.checkcColumnList("reservationStatusName", this.columnList).checkarr=res.data.data.map(item=>{ |
|
|
|
|
item.value=item.dictKey |
|
|
|
|
item.label=item.dictValue |
|
|
|
|
return item |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
checkcColumnList(prop,columnList){ |
|
|
|
|
for(var a = 0; a < columnList.length; a++){ |
|
|
|
|
if(columnList[a].prop===prop){ |
|
|
|
|
console.log("1111111111111",columnList[a]); |
|
|
|
|
return columnList[a]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
searchHide () { |
|
|
|
|
this.search = !this.search; |
|
|
|
@ -1370,10 +1473,11 @@ export default {
|
|
|
|
|
this.$refs.form.validate( async valid=>{ |
|
|
|
|
if (valid) { |
|
|
|
|
if (!this.form.id) { |
|
|
|
|
if(this.fileListSell.length === 0) {this.$message.warning("请上传提货证件!!!"); return;} |
|
|
|
|
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.id; |
|
|
|
|
this.form.stockArticleId = !this.$route.query.id ? null : this.$route.query.id; //订单ID |
|
|
|
|
this.form.stockDTOList = this.data; |
|
|
|
|
let o = []; |
|
|
|
|
if(this.fileListClerk.length > 0){ |
|
|
|
@ -1409,8 +1513,16 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.form.printList = o.length > 0 ? o : []; |
|
|
|
|
if(this.dataList.length === 0 && this.data.length === 0 ){ |
|
|
|
|
this.$message.warning("请填写需要自提的物品!!"); |
|
|
|
|
} |
|
|
|
|
if(this.dataList.length > 0){ |
|
|
|
|
let a = this.dataList.map(i =>i.id); |
|
|
|
|
console.log("aaaaa",a); |
|
|
|
|
this.form.stockArticleId = this.form.stockArticleId != null ? this.form.stockArticleId+a.join(',') : a.join(','); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// console.log("this.form",this.form); |
|
|
|
|
console.log("this.form",this.form); |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -1572,10 +1684,18 @@ export default {
|
|
|
|
|
i.notReceived = parseInt( i.totalNumber) - parseInt( i.handQuantity ); |
|
|
|
|
return i; |
|
|
|
|
}); |
|
|
|
|
// this.dataOrder.forEach(i =>{ |
|
|
|
|
// this.dataList.find( l => l.) |
|
|
|
|
// this.selectionList |
|
|
|
|
// }) |
|
|
|
|
this.dataOrder.forEach(i =>{ |
|
|
|
|
let asas = this.dataList.find( l => l.id == i.id); |
|
|
|
|
if(!!asas){ |
|
|
|
|
console.log("存在的数据》》》",asas); |
|
|
|
|
this.selectionList.push(i.id); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.toggleSelection(this.selectionList) |
|
|
|
|
}) |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
@ -1664,14 +1784,18 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad (page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
params.id = this.$route.query.id; |
|
|
|
|
getListOne(page.currentPage, page.pageSize, params).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
console.log(">>>>>>>>>===",data); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
// this.loading = true; |
|
|
|
|
// params.id = this.$route.query.id; |
|
|
|
|
// getListOne(page.currentPage, page.pageSize, params).then(res => { |
|
|
|
|
// const data = res.data.data; |
|
|
|
|
// console.log("订单详细>>>>>>>>>===",data); |
|
|
|
|
// |
|
|
|
|
// |
|
|
|
|
// |
|
|
|
|
// |
|
|
|
|
// this.loading = false; |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// }); |
|
|
|
|
} , |
|
|
|
|
//库存品 |
|
|
|
|
onLoadList (page, params = {}) { |
|
|
|
|