|
@@ -312,7 +312,6 @@
|
|
width: 144,
|
|
width: 144,
|
|
title: '单据编号',
|
|
title: '单据编号',
|
|
field: 'orderNumber',
|
|
field: 'orderNumber',
|
|
- // component: OrderType,
|
|
|
|
isDetail: true,
|
|
isDetail: true,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -516,31 +515,6 @@
|
|
this.getDataList()
|
|
this.getDataList()
|
|
}, 500)
|
|
}, 500)
|
|
}
|
|
}
|
|
- // 工具栏退单
|
|
|
|
- doBackOrder() {
|
|
|
|
- // console.log((this as any).$refs.bill.getTableSelectData('all'));
|
|
|
|
- let selectData = (this as any).$refs.bill.getTableSelectData('all');
|
|
|
|
- let ids = '';
|
|
|
|
- if (selectData.length > 0) {
|
|
|
|
- selectData.map((v : any) => {
|
|
|
|
- ids += v.id + ','
|
|
|
|
- })
|
|
|
|
- } else return this.$message({ type: 'warning', message: '请选择退单数据' })
|
|
|
|
- ids = ids.slice(0, ids.length - 1);
|
|
|
|
- this.$confirm('确定退单吗!', '注意', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- center: true
|
|
|
|
- }).then(() => {
|
|
|
|
- api.backOrder({ mid: ids }, 'supplyPurchaseOrder').then((res : any) => {
|
|
|
|
- if (res.code === 200) {
|
|
|
|
- this.$message.success('退单成功!');
|
|
|
|
- this.getDataList();
|
|
|
|
- } else this.$message.error(res.msg)
|
|
|
|
- })
|
|
|
|
- }).catch(() => this.$message.info('已取消退单'));
|
|
|
|
- }
|
|
|
|
// 右拆单数据变化
|
|
// 右拆单数据变化
|
|
rightChange(e : any) {
|
|
rightChange(e : any) {
|
|
console.log(e.number);
|
|
console.log(e.number);
|
|
@@ -658,20 +632,13 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
|
|
|
|
- click: () => {
|
|
|
|
- // (this as any)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
];
|
|
];
|
|
} else {
|
|
} else {
|
|
billConfig.tool.customTools = [
|
|
billConfig.tool.customTools = [
|
|
{
|
|
{
|
|
name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
|
|
name: '退单', icon: 'el-icon-bottom', audit: [''], event: {
|
|
click: () => {
|
|
click: () => {
|
|
- // (this as any)
|
|
|
|
|
|
+ (this as any).doBackOrder2(e)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -682,6 +649,53 @@
|
|
(this.$refs.bill as any).setBillTableValue(e.suborderList, 0);// 设置第1张单据表格数据
|
|
(this.$refs.bill as any).setBillTableValue(e.suborderList, 0);// 设置第1张单据表格数据
|
|
(this.$refs.bill as any).showTab = 'bill';
|
|
(this.$refs.bill as any).showTab = 'bill';
|
|
}
|
|
}
|
|
|
|
+ // 单据操作退单
|
|
|
|
+ doBackOrder2(e : any) {
|
|
|
|
+ console.log(e);
|
|
|
|
+ this.$confirm('确定退单吗!', '注意', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ api.backOrder({ mid: e.id }, 'supplyPurchaseOrder', e.id).then((res : any) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message.success('退单成功!');
|
|
|
|
+ this.getDataList();
|
|
|
|
+ (this.$refs.bill as any).showTab = 'all';
|
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => this.$message.info('已取消退单'));
|
|
|
|
+ }
|
|
|
|
+ // 工具栏退单
|
|
|
|
+ doBackOrder() {
|
|
|
|
+ let selectData = (this as any).$refs.bill.getTableSelectData('all');
|
|
|
|
+ if (selectData.length > 1) return this.$message.warning('只能选择一条退单数据')
|
|
|
|
+ let ids = '';
|
|
|
|
+ if (selectData.length > 0) {
|
|
|
|
+ selectData.map((v : any) => {
|
|
|
|
+ ids += v.id + ','
|
|
|
|
+ })
|
|
|
|
+ } else return this.$message({ type: 'warning', message: '请选择退单数据' })
|
|
|
|
+ ids = ids.slice(0, ids.length - 1);
|
|
|
|
+ selectData[0].suborderList.map((v : any) => {
|
|
|
|
+ delete v.id;
|
|
|
|
+ })
|
|
|
|
+ this.$confirm('确定退单吗!', '注意', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ api.backOrder(selectData[0].suborderList, 'supplyPurchaseOrder', ids).then((res : any) => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$message.success('退单成功!');
|
|
|
|
+ this.getDataList();
|
|
|
|
+ (this.$refs.bill as any).showTab = 'all';
|
|
|
|
+ } else this.$message.error(res.msg)
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => this.$message.info('已取消退单'));
|
|
|
|
+ }
|
|
// 导航切换
|
|
// 导航切换
|
|
clickTab(e : any) {
|
|
clickTab(e : any) {
|
|
console.log('导航切换 ==> ', e);
|
|
console.log('导航切换 ==> ', e);
|