|
@@ -225,11 +225,11 @@
|
|
|
tool: {
|
|
|
customTools: []
|
|
|
},
|
|
|
- log:{
|
|
|
- request:{
|
|
|
- url:'/supply/supplyPurchaseOrderOperateLog/page',
|
|
|
- method:'GET'
|
|
|
- }
|
|
|
+ log: {
|
|
|
+ request: {
|
|
|
+ url: '/supply/supplyPurchaseOrderOperateLog/page',
|
|
|
+ method: 'GET'
|
|
|
+ }
|
|
|
},
|
|
|
form: {
|
|
|
attr: {
|
|
@@ -608,27 +608,34 @@
|
|
|
}
|
|
|
// 引单
|
|
|
citationOrder() {
|
|
|
- let data : any = (this as any).$refs.bill.getSourceTableSelectData(0);
|
|
|
- console.log(data);
|
|
|
- if (data.length <= 0) return this.$message.warning('请选择引单数据');
|
|
|
- data = data.map((item : any) => {
|
|
|
- item.address = item.deliveryAddress
|
|
|
- item.consignee = item.delivery
|
|
|
- item.phone = item.deliveryPhone
|
|
|
- item.planDeliveryData = item.deliveryData
|
|
|
- const { ...newData } = item
|
|
|
- return newData
|
|
|
+ let parentData : any = (this as any).$refs.bill.getSourceTableSelectData(0);
|
|
|
+ console.log(parentData);
|
|
|
+ if (parentData.length <= 0) return this.$message.warning('请选择引单数据');
|
|
|
+ let loading = this.$loading({ target: '.main-container' });
|
|
|
+ api.single({ id: parentData[0].id }, 'supplyTaskOrder').then((res : any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ parentData = res.data ? [res.data] : parentData;
|
|
|
+ parentData = parentData.map((item : any) => {
|
|
|
+ item.address = item.deliveryAddress
|
|
|
+ item.consignee = item.delivery
|
|
|
+ item.phone = item.deliveryPhone
|
|
|
+ item.planDeliveryData = item.deliveryData
|
|
|
+ const { ...newData } = item
|
|
|
+ return newData
|
|
|
+ });
|
|
|
+ let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
|
|
|
+ billConfig.tool.tools = { order: true };
|
|
|
+ billConfig.tool.customTools = [];
|
|
|
+ this.isCitation = true;
|
|
|
+ (this.$refs.bill as any).showTab = 'bill';
|
|
|
+ loading.close();
|
|
|
+ setTimeout(() => {
|
|
|
+ (this.$refs.bill as any).setBillConfig(billConfig);
|
|
|
+ (this.$refs.bill as any).setBillFormValue(parentData[0]); // 设置单据表单数据
|
|
|
+ (this.$refs.bill as any).setBillTableValue(parentData[0].suborderList, 0);// 设置第1张单据表格数据
|
|
|
+ }, 0)
|
|
|
+ }
|
|
|
})
|
|
|
- let billConfig = (this as any).$lodash.cloneDeep(this.config.bill);
|
|
|
- billConfig.tool.tools = { order: true };
|
|
|
- billConfig.tool.customTools = [];
|
|
|
- this.isCitation = true;
|
|
|
- // (this.$refs.bill as any).showTab = 'bill';
|
|
|
- setTimeout(() => {
|
|
|
- (this.$refs.bill as any).setBillConfig(billConfig);
|
|
|
- (this.$refs.bill as any).setBillFormValue(data[0]); // 设置单据表单数据
|
|
|
- (this.$refs.bill as any).setBillTableValue(data[0].suborderList, 0);// 设置第1张单据表格数据
|
|
|
- }, 0)
|
|
|
};
|
|
|
// 接单
|
|
|
onOrder() {
|
|
@@ -850,7 +857,7 @@
|
|
|
} else this.$message.error(res.msg)
|
|
|
})
|
|
|
}).catch(() => this.$message.info('已取消终止订单'));
|
|
|
- }
|
|
|
+ }
|
|
|
// 单据操作终止订单
|
|
|
doBackOrder2(e : any) {
|
|
|
this.$confirm('确定终止订单吗!', '注意', {
|
|
@@ -903,7 +910,7 @@
|
|
|
} else {
|
|
|
(this as any).$refs.bill.$refs[data].clearSearch();
|
|
|
if (data === 'all') this.getPageList({}, 'all'); // 综合数据
|
|
|
- if (data === 'returnOrder') this.getPageList({status:2}, 'returnOrder'); // 终止订单数据
|
|
|
+ if (data === 'returnOrder') this.getPageList({ status: 2 }, 'returnOrder'); // 终止订单数据
|
|
|
}
|
|
|
}
|
|
|
}
|