|
|
|
@ -516,7 +516,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["permission",'tagWel','tagList']), |
|
|
|
|
...mapGetters(["permission",'tagWel','tagList','tag']), |
|
|
|
|
ids () { |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
@ -537,15 +537,64 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
action() { |
|
|
|
|
return '/api/logpm-basicdata/common/uploadFile' |
|
|
|
|
// return '/api/blade-resource/oss/endpoint/put-file-attach' |
|
|
|
|
// return '/api/logpm-basicdata/common/uploadFile' |
|
|
|
|
return '/api/blade-resource/oss/endpoint/put-file-attach' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询提货详情信息 |
|
|
|
|
getDetailOen(){ |
|
|
|
|
getDetail(this.$route.query.id).then(res =>{ |
|
|
|
|
console.log("详情信息》》》》",res.data.data); |
|
|
|
|
// console.log("详情信息》》》》",res.data.data); |
|
|
|
|
let s = res.data.data; |
|
|
|
|
this.form = s; |
|
|
|
|
let f =[]; |
|
|
|
|
s.chargeList.forEach(c =>{ |
|
|
|
|
let a = this.clientType.find( i =>c.cost == i.dictKey ); |
|
|
|
|
|
|
|
|
|
if(!!c.cost && c.cost != '-1'){ |
|
|
|
|
f.push(c.cost) |
|
|
|
|
} |
|
|
|
|
if(!!a){ |
|
|
|
|
a.remark = c.money.substring(0,c.money.lastIndexOf(".")) |
|
|
|
|
this.costList[c.cost] = a.remark; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.form.freightMark = f; |
|
|
|
|
this.costListName = f; |
|
|
|
|
this.form.totalCost = s.totalCost.substring(0,s.totalCost.lastIndexOf(".")) |
|
|
|
|
this.dataList = s.stockArticleVOS; |
|
|
|
|
this.data = s.stockListVOS; |
|
|
|
|
if (!!s.printVOS) { |
|
|
|
|
let le1 = []; |
|
|
|
|
let le2 = []; |
|
|
|
|
let le3 = []; |
|
|
|
|
|
|
|
|
|
const genreMapping = { |
|
|
|
|
'1': le1, // 提 |
|
|
|
|
'2': le2, // 文 |
|
|
|
|
'3': le3, // 库 |
|
|
|
|
}; |
|
|
|
|
s.printVOS.forEach(i => { |
|
|
|
|
if (i.genre in genreMapping) { |
|
|
|
|
const q = { |
|
|
|
|
name: i.siteName, |
|
|
|
|
url: i.site |
|
|
|
|
}; |
|
|
|
|
genreMapping[i.genre].push(q); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.fileListLibrary = genreMapping['3']; |
|
|
|
|
this.fileListSell = genreMapping['1']; |
|
|
|
|
this.fileListClerk = genreMapping['2']; |
|
|
|
|
// console.log("le1",le1); |
|
|
|
|
// console.log("le2",le2); |
|
|
|
|
// console.log("le3",le3); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
//移除数据 |
|
|
|
@ -567,6 +616,7 @@ export default {
|
|
|
|
|
//确定 |
|
|
|
|
callFordelivery(inde){ |
|
|
|
|
let isa= false; |
|
|
|
|
console.log("执行了"); |
|
|
|
|
this.selectionListStock.some( i =>{ |
|
|
|
|
console.log("asdgfasdv",i); |
|
|
|
|
if(parseInt(i.inventoryQuantity) > parseInt(i.quantityStock) ){ |
|
|
|
@ -580,6 +630,7 @@ export default {
|
|
|
|
|
this.data.push(i); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if(!isa){ |
|
|
|
|
this.dialogFormVisible = false; |
|
|
|
|
} |
|
|
|
@ -601,6 +652,9 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
uploadSuccess(fileList) { |
|
|
|
|
console.log('123123123', fileList); |
|
|
|
|
// console.log('123123123==fileListSell', this.fileListSell); |
|
|
|
|
// console.log('123123123==fileListClerk', this.fileListClerk); |
|
|
|
|
// console.log('123123123==fileListLibrary', this.fileListLibrary); |
|
|
|
|
// this.form.fileName = |
|
|
|
|
// this.$set(row, 'imageCos', fileList); |
|
|
|
|
}, |
|
|
|
@ -611,17 +665,14 @@ export default {
|
|
|
|
|
console.log(file); |
|
|
|
|
}, |
|
|
|
|
textbox(e,index) { |
|
|
|
|
console.log("e,index",e,index); |
|
|
|
|
// console.log("e,index",e,index); |
|
|
|
|
this.costList[index+1] = e; |
|
|
|
|
//计算合计费用 |
|
|
|
|
let n = 0; |
|
|
|
|
this.costList.forEach( i =>{ |
|
|
|
|
if(!! this.form.totalCost){ |
|
|
|
|
this.form.totalCost = parseInt(this.form.totalCost)+parseInt(i); |
|
|
|
|
}else{ |
|
|
|
|
this.form.totalCost =parseInt(i); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
n += parseInt(i); |
|
|
|
|
}) |
|
|
|
|
this.form.totalCost = n; |
|
|
|
|
}, |
|
|
|
|
handleCheckedCitiesChange(value) { |
|
|
|
|
console.log(">>>>>>>",value ); |
|
|
|
@ -661,14 +712,14 @@ export default {
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
bianLier(costListName,clientType,costList,fei){ |
|
|
|
|
console.log(">>>>>>>>>",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]); |
|
|
|
|
// console.log("进来了",clientType[a].dictKey , costListName[i]); |
|
|
|
|
let zhi = costList[costListName[i]]; |
|
|
|
|
if(!zhi){ |
|
|
|
|
this.pan = true; |
|
|
|
@ -695,36 +746,39 @@ export default {
|
|
|
|
|
let o = []; |
|
|
|
|
if(this.fileListClerk.length > 0){ |
|
|
|
|
this.fileListClerk.forEach( i =>{ |
|
|
|
|
// console.log("iiii",i); |
|
|
|
|
// console.log("iiii文员",i); |
|
|
|
|
let num = {}; |
|
|
|
|
num.state = "2"; |
|
|
|
|
num.name = i.response.data.name; |
|
|
|
|
num.name = i.name; |
|
|
|
|
num.url = i.response.data.link; |
|
|
|
|
o.push(num); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}else if(this.fileListLibrary.length > 0){ |
|
|
|
|
} |
|
|
|
|
if(this.fileListLibrary.length > 0){ |
|
|
|
|
this.fileListLibrary.forEach( i =>{ |
|
|
|
|
// console.log("库管》》》",i); |
|
|
|
|
let num = {}; |
|
|
|
|
num.state = "3"; |
|
|
|
|
num.name = i.response.data.name; |
|
|
|
|
num.name = i.name; |
|
|
|
|
num.url = i.response.data.link; |
|
|
|
|
o.push(num); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}else if(this.fileListSell.length > 0){ |
|
|
|
|
} |
|
|
|
|
if(this.fileListSell.length > 0){ |
|
|
|
|
this.fileListSell.forEach( i =>{ |
|
|
|
|
// console.log(",.,.,.,.",i); |
|
|
|
|
// console.log(",.,.,.,.提货",i); |
|
|
|
|
let num = {}; |
|
|
|
|
num.state = "1"; |
|
|
|
|
num.name = i.response.data.name; |
|
|
|
|
num.name = i.name; |
|
|
|
|
num.url = i.response.data.link; |
|
|
|
|
o.push(num); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.form.printList = o.length > 0 ? o : []; |
|
|
|
|
|
|
|
|
|
console.log("this.form",this.form); |
|
|
|
|
// console.log("this.form",this.form); |
|
|
|
|
add(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -737,19 +791,85 @@ export default {
|
|
|
|
|
this.$router.push(this.tagWel); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
update(this.form).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
let fei = new Map(); |
|
|
|
|
await this.bianLier(this.costListName,this.clientType,this.costList,fei); |
|
|
|
|
this.form.fei = Object.fromEntries(fei); |
|
|
|
|
this.form.stockDTOList = this.data; |
|
|
|
|
let o = []; |
|
|
|
|
const fileListMapping = { |
|
|
|
|
fileListClerk: '2', // 文员 |
|
|
|
|
fileListLibrary: '3', // 库管 |
|
|
|
|
fileListSell: '1', // 提货 |
|
|
|
|
}; |
|
|
|
|
let mark = false; |
|
|
|
|
Object.entries(fileListMapping).forEach(([fileList, state]) => { |
|
|
|
|
if (this[fileList].length > 0) { |
|
|
|
|
this[fileList].forEach(i => { |
|
|
|
|
console.log("i>>>>",i); |
|
|
|
|
let num = { |
|
|
|
|
state, |
|
|
|
|
}; |
|
|
|
|
if(!!i.response){ |
|
|
|
|
num.name = i.name; |
|
|
|
|
num.url = i.response.data.link; |
|
|
|
|
mark = true; |
|
|
|
|
}else{ |
|
|
|
|
num.name = i.name; |
|
|
|
|
num.url = i.url; |
|
|
|
|
} |
|
|
|
|
o.push(num); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.form.printList = o.length > 0 ? o : []; |
|
|
|
|
// console.log("修改》》》",this.form); |
|
|
|
|
let up = {} |
|
|
|
|
up.printList = o.length > 0 ? o : []; |
|
|
|
|
up.fei = this.form.fei; |
|
|
|
|
up.stockDTOList = this.form.stockDTOList; |
|
|
|
|
up.id = this.form.id; |
|
|
|
|
up.pickUpPlate = this.form.pickUpPlate; |
|
|
|
|
up.pickUpTime = this.form.pickUpTime; |
|
|
|
|
up.consignee = this.form.consignee; |
|
|
|
|
up.deliveryDocument = this.form.deliveryDocument; |
|
|
|
|
up.certificateType = this.form.certificateType; |
|
|
|
|
up.totalCost = this.form.totalCost; |
|
|
|
|
up.mark = mark; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("修改提交数据》》》",up); |
|
|
|
|
/*console.log(this.$route.matched) // 当前路由匹配的路由信息 |
|
|
|
|
console.log(tag,key); |
|
|
|
|
let { tag, key } = this.findTag(this.$route.path); |
|
|
|
|
this.$store.commit('DEL_TAG', tag); |
|
|
|
|
if (tag.fullPath === this.tag.fullPath) { |
|
|
|
|
tag = this.tagList[key - 1]; |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: tag.path, |
|
|
|
|
query: tag.query, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
update(up).then(() => { |
|
|
|
|
// this.box = false; |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!" |
|
|
|
|
}); |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$router.push(this.tagWel); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
findTag(fullPath) { |
|
|
|
|
let tag = this.tagList.find(item => item.fullPath === fullPath); |
|
|
|
|
let key = this.tagList.findIndex(item => item.fullPath === fullPath); |
|
|
|
|
return { tag, key }; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
handleAdd () { |
|
|
|
|
this.title = '新增' |
|
|
|
|
this.form = {} |
|
|
|
@ -827,6 +947,7 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
selectionChangeStock (list) { |
|
|
|
|
console.log("执行了啦啦啦",list); |
|
|
|
|
this.selectionListStock = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear () { |
|
|
|
|