|
@@ -1,11 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-col :span="16" :offset="6">
|
|
<el-col :span="16" :offset="6">
|
|
|
- <el-form label-width="100px" ref="formRef" :model="form">
|
|
|
|
|
- <el-form-item label="审批建议" style="margin-bottom: 20px" :rules="{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择',
|
|
|
|
|
- trigger: 'change'
|
|
|
|
|
- }">
|
|
|
|
|
|
|
+ <el-form label-width="100px" ref="formRef" :model="form" :rules="rules">
|
|
|
|
|
+ <el-form-item label="审批建议" prop="reason" style="margin-bottom: 20px">
|
|
|
<el-input type="textarea" v-model="form.reason" placeholder="请输入审批建议" />
|
|
<el-input type="textarea" v-model="form.reason" placeholder="请输入审批建议" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -104,6 +100,11 @@ export default {
|
|
|
activeComp: '',
|
|
activeComp: '',
|
|
|
outInData: {
|
|
outInData: {
|
|
|
verifyStatus: ''
|
|
verifyStatus: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ reason: [
|
|
|
|
|
+ { required: true, message: '请输入审批建议', trigger: 'blur' },
|
|
|
|
|
+ ],
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
@@ -120,34 +121,38 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
async storemanApprove() {
|
|
async storemanApprove() {
|
|
|
this.$refs.formRef.validate(async (valid) => {
|
|
this.$refs.formRef.validate(async (valid) => {
|
|
|
- if (valid) return this.$message.warning('有必填项未填写,请检查')
|
|
|
|
|
|
|
+ if (valid) {
|
|
|
|
|
+ let res = await this.getTableValue();
|
|
|
|
|
+ console.log(res, 'resresresresres12')
|
|
|
|
|
+ let storageData = res.returnStorageData;
|
|
|
|
|
|
|
|
- let res = await this.getTableValue();
|
|
|
|
|
- let storageData = res.returnStorageData;
|
|
|
|
|
- // 出库来源isSkip 0-正常 1-外部(外部跳过内部审核流程)
|
|
|
|
|
- storageData.isSkip = 1;
|
|
|
|
|
- try {
|
|
|
|
|
- this.isSaveLoading = true;
|
|
|
|
|
- await storageApi.outStorage(storageData);
|
|
|
|
|
- approveTaskWithVariables({
|
|
|
|
|
- id: this.taskId,
|
|
|
|
|
- reason: this.form.reason,
|
|
|
|
|
- variables: {
|
|
|
|
|
- pass: true
|
|
|
|
|
- }
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- if (res.code != '-1') {
|
|
|
|
|
- this.$emit('handleAudit', {
|
|
|
|
|
- status: 1,
|
|
|
|
|
- title: '出库'
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 出库来源isSkip 0-正常 1-外部(外部跳过内部审核流程)
|
|
|
|
|
+ storageData.isSkip = 1;
|
|
|
|
|
+ try {
|
|
|
|
|
+ this.isSaveLoading = true;
|
|
|
|
|
+
|
|
|
|
|
+ await storageApi.outStorage(storageData);
|
|
|
|
|
+ approveTaskWithVariables({
|
|
|
|
|
+ id: this.taskId,
|
|
|
|
|
+ reason: this.form.reason,
|
|
|
|
|
+ variables: {
|
|
|
|
|
+ pass: true
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code != '-1') {
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ status: 1,
|
|
|
|
|
+ title: '出库'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isSaveLoading = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
this.isSaveLoading = false;
|
|
this.isSaveLoading = false;
|
|
|
- });
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- this.isSaveLoading = false;
|
|
|
|
|
- console.error('保存失败:', error);
|
|
|
|
|
|
|
+ console.error('保存失败:', error);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|