|
@@ -23,7 +23,7 @@
|
|
|
type="success"
|
|
type="success"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleAudit(1)"
|
|
@click="handleAudit(1)"
|
|
|
- v-if="outInData.verifyStatus == 2"
|
|
|
|
|
|
|
+ v-if="outInData.verifyStatus == 2 || !['warehouseManager'].includes(taskDefinitionKey)"
|
|
|
>通过
|
|
>通过
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -32,11 +32,11 @@
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="storemanApprove"
|
|
@click="storemanApprove"
|
|
|
v-if="
|
|
v-if="
|
|
|
- ['storemanApprove'].includes(taskDefinitionKey) &&
|
|
|
|
|
|
|
+ (['storemanApprove'].includes(taskDefinitionKey) &&
|
|
|
activeComp == 'main' &&
|
|
activeComp == 'main' &&
|
|
|
- [0, 3].includes(outInData.verifyStatus)
|
|
|
|
|
|
|
+ [0, 3].includes(outInData.verifyStatus)) || ['warehouseManager'].includes(taskDefinitionKey)
|
|
|
"
|
|
"
|
|
|
- >申请出库
|
|
|
|
|
|
|
+ >申请入库
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
icon="el-icon-circle-close"
|
|
icon="el-icon-circle-close"
|
|
@@ -44,8 +44,9 @@
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleAudit(0)"
|
|
@click="handleAudit(0)"
|
|
|
v-if="
|
|
v-if="
|
|
|
- !['starter'].includes(taskDefinitionKey) &&
|
|
|
|
|
- outInData.verifyStatus != 1
|
|
|
|
|
|
|
+ !((['starter'].includes(taskDefinitionKey) &&
|
|
|
|
|
+ outInData.verifyStatus != 1) ||
|
|
|
|
|
+ ['warehouseManager'].includes(taskDefinitionKey))
|
|
|
"
|
|
"
|
|
|
>驳回
|
|
>驳回
|
|
|
</el-button>
|
|
</el-button>
|
|
@@ -93,7 +94,9 @@
|
|
|
UpdateReturnInformation,
|
|
UpdateReturnInformation,
|
|
|
getWarehouseListByIds,
|
|
getWarehouseListByIds,
|
|
|
approve,
|
|
approve,
|
|
|
- saleReturnProcessCancel
|
|
|
|
|
|
|
+ saleReturnProcessCancel,
|
|
|
|
|
+ getReturnSaleOrderrecordDetail
|
|
|
|
|
+
|
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
|
import {
|
|
import {
|
|
|
approveTaskWithVariables,
|
|
approveTaskWithVariables,
|
|
@@ -101,6 +104,7 @@
|
|
|
cancelTask
|
|
cancelTask
|
|
|
} from '@/api/bpm/task';
|
|
} from '@/api/bpm/task';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
|
|
+ import storageApi from '@/api/warehouseManagement';
|
|
|
|
|
|
|
|
// 流程实例的详情页,可用于审批
|
|
// 流程实例的详情页,可用于审批
|
|
|
export default {
|
|
export default {
|
|
@@ -133,7 +137,8 @@
|
|
|
},
|
|
},
|
|
|
userOptions: [],
|
|
userOptions: [],
|
|
|
activeComp: '',
|
|
activeComp: '',
|
|
|
- outInData: { verifyStatus: 2 }
|
|
|
|
|
|
|
+ outInData: { verifyStatus: 2 },
|
|
|
|
|
+ isSaveLoading: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
@@ -141,7 +146,7 @@
|
|
|
listAllUserBind().then((data) => {
|
|
listAllUserBind().then((data) => {
|
|
|
this.userOptions.push(...data);
|
|
this.userOptions.push(...data);
|
|
|
});
|
|
});
|
|
|
- if (this.taskDefinitionKey == 'storemanApprove') {
|
|
|
|
|
|
|
+ if (this.taskDefinitionKey == 'storemanApprove' || this.taskDefinitionKey == 'warehouseManager') {
|
|
|
let data = await getReturnSaleOrderrecordDetail(this.businessId);
|
|
let data = await getReturnSaleOrderrecordDetail(this.businessId);
|
|
|
try {
|
|
try {
|
|
|
this.outInData = await getOutInBySourceBizNo(data.orderNo);
|
|
this.outInData = await getOutInBySourceBizNo(data.orderNo);
|
|
@@ -159,7 +164,54 @@
|
|
|
this.$emit('handleBackList');
|
|
this.$emit('handleBackList');
|
|
|
},
|
|
},
|
|
|
async storemanApprove() {
|
|
async storemanApprove() {
|
|
|
- this.$emit('submit');
|
|
|
|
|
|
|
+ // this.$emit('submit');
|
|
|
|
|
+ let res = await this.getTableValue();
|
|
|
|
|
+ let storageData = res.returnStorageData;
|
|
|
|
|
+
|
|
|
|
|
+ if (!storageData) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 入库来源isSkip 0-正常 1-外部(外部跳过内部审核流程)
|
|
|
|
|
+ storageData.isSkip = 1;
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ this.isSaveLoading = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 用于回显
|
|
|
|
|
+ if (storageData?._packingList?.length) {
|
|
|
|
|
+ res.productList.forEach((val, index) => {
|
|
|
|
|
+ val.receiveTotalWeight = storageData._packingList[index].weight;
|
|
|
|
|
+ val.materielDesignation =
|
|
|
|
|
+ storageData._packingList[index].materielDesignation;
|
|
|
|
|
+ val.clientCode = storageData._packingList[index].clientCode;
|
|
|
|
|
+ val.engrave = storageData._packingList[index].engrave;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ await UpdateReturnInformation(res);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ await storageApi.storage(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;
|
|
|
|
|
+ // });
|
|
|
|
|
+ this.approveTaskWithVariables(1, res.type)
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.isSaveLoading = false;
|
|
|
|
|
+ this.$message.error('保存失败');
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
async handleAudit(status) {
|
|
async handleAudit(status) {
|
|
|
let returnType = '';
|
|
let returnType = '';
|
|
@@ -226,6 +278,7 @@
|
|
|
id: this.taskId,
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
reason: this.form.reason,
|
|
|
operateType: status == 0 ? 2 : 1,
|
|
operateType: status == 0 ? 2 : 1,
|
|
|
|
|
+ businessId: this.businessId,
|
|
|
returnType
|
|
returnType
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code != '-1') {
|
|
if (res.code != '-1') {
|