|
|
|
@ -640,9 +640,14 @@ import {
|
|
|
|
|
remove, |
|
|
|
|
zeroMaterial, |
|
|
|
|
zeroUpdateMaterial, |
|
|
|
|
$_distrilbutionBillLading |
|
|
|
|
} from '@/api/distribution/distrilbutionBillLading'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import { getListOwn, getList, getEditList ,$_getBillLadingPackageIds} from '@/api/distribution/distributionParcelList'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus' |
|
|
|
|
import { getListOwn, getList, getEditList ,$_getBillLadingPackageIds,$_judgmentRemove} from '@/api/distribution/distributionParcelList'; |
|
|
|
|
import option from '@/option/distribution/distrilbutionBillLading'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
@ -654,6 +659,7 @@ import { detail } from '@/api/flow/flow';
|
|
|
|
|
import { nextTick, ref } from 'vue'; |
|
|
|
|
import { useStore } from 'vuex'; |
|
|
|
|
import { setNodeHeight } from '@/utils/util.js'; |
|
|
|
|
import error from '@/error'; |
|
|
|
|
const $store = useStore(); |
|
|
|
|
export default { |
|
|
|
|
name: '/distribution/inventory/distrilbutionBillLading', |
|
|
|
@ -2214,6 +2220,9 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
//移除数据 |
|
|
|
|
rowOrder(row) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.dataList.forEach(i => { |
|
|
|
|
if (i.id === row.id) { |
|
|
|
|
this.dataList; |
|
|
|
@ -2223,8 +2232,41 @@ export default {
|
|
|
|
|
if (item.id == row.id) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.dataList.splice(id1, 1); |
|
|
|
|
}) |
|
|
|
|
if(this.$route.query.id){ |
|
|
|
|
let data={ |
|
|
|
|
billLadingId:this.$route.query.id, |
|
|
|
|
orderId:this.dataList[id1].id |
|
|
|
|
} |
|
|
|
|
$_judgmentRemove(data).then(res=>{ |
|
|
|
|
console.log(res); |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
if(res.data.data){ |
|
|
|
|
ElMessageBox.confirm( |
|
|
|
|
'是否移除该订单?', |
|
|
|
|
'提示', |
|
|
|
|
{ |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
.then(() => { |
|
|
|
|
this.dataList.splice(id1, 1); |
|
|
|
|
}) |
|
|
|
|
.catch(() => {}) |
|
|
|
|
}else{ |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '存在签收数据,无法移除该订单', |
|
|
|
|
type: 'warning', |
|
|
|
|
plain: true, |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
this.dataList.splice(id1, 1); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//订单选择确定 |
|
|
|
|
callFordeliveryOrder() { |
|
|
|
@ -2740,6 +2782,62 @@ console.log('删除的数据对象:', deletedObjects);
|
|
|
|
|
}, |
|
|
|
|
// 最后提交 |
|
|
|
|
async handleSubmit() { |
|
|
|
|
|
|
|
|
|
if(!this.$route.query.id){ |
|
|
|
|
if(!this.dataList.length && !this.data.length){ |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '不能做空计划,请选择定制品或者库存品', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.$route.query.id){ |
|
|
|
|
if(!this.dataList.length && !this.data.length){ |
|
|
|
|
await ElMessageBox.confirm( |
|
|
|
|
'没有选择订单,是否移除该自提任务?', |
|
|
|
|
'提示', |
|
|
|
|
{ |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
.then(() => { |
|
|
|
|
let data={ |
|
|
|
|
billLodingIds:this.$route.query.id |
|
|
|
|
} |
|
|
|
|
this.Selfpickuploading = true; //关闭加载效果 |
|
|
|
|
$_distrilbutionBillLading(data).then(res=>{ |
|
|
|
|
console.log(res); |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
ElMessage({ |
|
|
|
|
message: res.data.msg, |
|
|
|
|
type: 'success', |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.Selfpickuploading = false; //关闭加载效果 |
|
|
|
|
this.$store.commit('DEL_TAG_CURRENT'); |
|
|
|
|
this.$store.commit('EDIT_REFRESHITEM', { |
|
|
|
|
title: 'distrilbutionBillLadingList', |
|
|
|
|
status: true, |
|
|
|
|
}); |
|
|
|
|
this.$router.push('/distribution/inventory/distrilbutionBillLadingList'); |
|
|
|
|
}).catch(error=>{ |
|
|
|
|
console.log(error,'error'); |
|
|
|
|
this.Selfpickuploading = false; //关闭加载效果 |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
.catch(() => {}) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.dataList,'this.dataList'); |
|
|
|
|
|
|
|
|
|
// if (this.$route.query.type !== '2') { |
|
|
|
|