|
@@ -49,6 +49,7 @@
|
|
|
icon="el-icon-edit-outline"
|
|
icon="el-icon-edit-outline"
|
|
|
type="success"
|
|
type="success"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
|
|
+ :loading="isLoading"
|
|
|
@click="handleAudit(1)"
|
|
@click="handleAudit(1)"
|
|
|
>通过
|
|
>通过
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -115,6 +116,7 @@
|
|
|
},
|
|
},
|
|
|
userId: { required: true, message: '请选择指派人', trigger: 'change' }
|
|
userId: { required: true, message: '请选择指派人', trigger: 'change' }
|
|
|
},
|
|
},
|
|
|
|
|
+ isLoading: false,
|
|
|
userOptions: [],
|
|
userOptions: [],
|
|
|
activeComp: '',
|
|
activeComp: '',
|
|
|
permissionType: '',
|
|
permissionType: '',
|
|
@@ -220,6 +222,7 @@
|
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
|
if (boolen) {
|
|
if (boolen) {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
const res = await outin.save(storageData);
|
|
const res = await outin.save(storageData);
|
|
|
data.outerInReceiptId = res.data[0];
|
|
data.outerInReceiptId = res.data[0];
|
|
|
await updateReceiptAPI(data);
|
|
await updateReceiptAPI(data);
|
|
@@ -236,8 +239,10 @@
|
|
|
title: !pass ? '驳回' : ''
|
|
title: !pass ? '驳回' : ''
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
});
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
console.error('保存失败:', error);
|
|
console.error('保存失败:', error);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -251,6 +256,7 @@
|
|
|
storageData.storageSource = 1;
|
|
storageData.storageSource = 1;
|
|
|
console.log(storageData);
|
|
console.log(storageData);
|
|
|
try {
|
|
try {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
const res = await outin.saveNew(storageData);
|
|
const res = await outin.saveNew(storageData);
|
|
|
data.outerOutReceiptId = res.data[0];
|
|
data.outerOutReceiptId = res.data[0];
|
|
|
await updateReceiptAPI(data);
|
|
await updateReceiptAPI(data);
|
|
@@ -267,8 +273,10 @@
|
|
|
title: !pass ? '驳回' : ''
|
|
title: !pass ? '驳回' : ''
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
});
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
console.error('保存失败:', error);
|
|
console.error('保存失败:', error);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -286,6 +294,7 @@
|
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
|
if (boolen) {
|
|
if (boolen) {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
const res = await outin.save(storageData);
|
|
const res = await outin.save(storageData);
|
|
|
data.innerInReceiptId = res.data[0];
|
|
data.innerInReceiptId = res.data[0];
|
|
|
await updateReceiptAPI(data);
|
|
await updateReceiptAPI(data);
|
|
@@ -302,8 +311,10 @@
|
|
|
title: !pass ? '驳回' : ''
|
|
title: !pass ? '驳回' : ''
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
});
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
console.error('保存失败:', error);
|
|
console.error('保存失败:', error);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -344,20 +355,26 @@
|
|
|
let storageData = data.returnStorageData;
|
|
let storageData = data.returnStorageData;
|
|
|
// 是否已经入库
|
|
// 是否已经入库
|
|
|
if (storageData.isStorage) {
|
|
if (storageData.isStorage) {
|
|
|
- approveTaskWithVariablesAPI({
|
|
|
|
|
- id: this.taskId,
|
|
|
|
|
- reason: this.form.reason,
|
|
|
|
|
- variables: {
|
|
|
|
|
- pass: !!pass
|
|
|
|
|
- }
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code != '-1') {
|
|
|
|
|
- this.$emit('handleAudit', {
|
|
|
|
|
- status: pass,
|
|
|
|
|
- title: !pass ? '驳回' : ''
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
|
+ approveTaskWithVariablesAPI({
|
|
|
|
|
+ id: this.taskId,
|
|
|
|
|
+ reason: this.form.reason,
|
|
|
|
|
+ variables: {
|
|
|
|
|
+ pass: !!pass
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code != '-1') {
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status: pass,
|
|
|
|
|
+ title: !pass ? '驳回' : ''
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isLoading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
// 入库来源storageSource 0-正常 1-外部(外部跳过内部审核流程)
|
|
// 入库来源storageSource 0-正常 1-外部(外部跳过内部审核流程)
|
|
|
storageData.storageSource = 1;
|
|
storageData.storageSource = 1;
|
|
@@ -368,6 +385,7 @@
|
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
let boolen = houseListLength.every((item) => item > 0);
|
|
|
if (boolen) {
|
|
if (boolen) {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ this.isLoading = true;
|
|
|
const res = await outin.save(storageData);
|
|
const res = await outin.save(storageData);
|
|
|
data.returnInReceiptId = res.data[0];
|
|
data.returnInReceiptId = res.data[0];
|
|
|
await saleReturnUpdateAPI(data);
|
|
await saleReturnUpdateAPI(data);
|
|
@@ -384,8 +402,10 @@
|
|
|
title: !pass ? '驳回' : ''
|
|
title: !pass ? '驳回' : ''
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ this.isLoading = false;
|
|
|
});
|
|
});
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
|
|
+ this.isLoading = false;
|
|
|
console.error('保存失败:', error);
|
|
console.error('保存失败:', error);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|