|
|
@@ -11,7 +11,7 @@
|
|
|
<keep-alive>
|
|
|
<component
|
|
|
v-if="activeName && isValidComponent(activeName)"
|
|
|
- :is="activeName"
|
|
|
+ :is="componentVal"
|
|
|
ref="componentRef"
|
|
|
v-bind="activeNameProps"
|
|
|
/>
|
|
|
@@ -31,8 +31,12 @@
|
|
|
// outerStoremanOut: () => import('./outboundToOutsourcing.vue'),
|
|
|
outerStoremanOut: () =>
|
|
|
import('@/views/bpm/outgoingManagement/outbound.vue'),
|
|
|
+ outerStoremanOutDetails: () =>
|
|
|
+ import('@/views/bpm/outgoingManagement/details.vue'),
|
|
|
// outerStoremanIn: () => import('./interiorStorageToOutsourcing.vue'),
|
|
|
outerStoremanIn: () => import('@/views/bpm/stockManagement/storage.vue'),
|
|
|
+ outerStoremanInDetails: () =>
|
|
|
+ import('@/views/bpm/stockManagement/details.vue'),
|
|
|
// outerInQC: () => import('./interiorStorageToOutsourcingQuality.vue'),
|
|
|
outerInQC: () => import('@/views/bpm/stockManagement/quality.vue'),
|
|
|
// innerStoremanIn: () => import('./interiorProductionStorage'),
|
|
|
@@ -40,7 +44,11 @@
|
|
|
// innerInQC: () => import('./interiorProductionStorageQuality'),
|
|
|
innerInQC: () => import('@/views/bpm/stockManagement/quality.vue'),
|
|
|
innerFillWeight: () => import('@/views/bpm/stockManagement/quality.vue'),
|
|
|
- outerFillWeight: () => import('@/views/bpm/stockManagement/quality.vue')
|
|
|
+ outerFillWeight: () => import('@/views/bpm/stockManagement/quality.vue'),
|
|
|
+ Activity_1lfkrs6: () =>
|
|
|
+ import(
|
|
|
+ '@/views/bpm/handleTask/components/saleOrder/customerReturnGoods/productionPlanList.vue'
|
|
|
+ )
|
|
|
},
|
|
|
props: {
|
|
|
taskDefinitionKey: {
|
|
|
@@ -69,12 +77,38 @@
|
|
|
form: {},
|
|
|
warehouseInfoString: '',
|
|
|
activeName: '',
|
|
|
- outList:[]
|
|
|
+ componentVal: '',
|
|
|
+ outList: [],
|
|
|
+ detailList: []
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ activeName(val) {
|
|
|
+ let componentName = val;
|
|
|
+ const detailsArr = ['outerStoremanOut', 'outerStoremanIn'];
|
|
|
+ if (
|
|
|
+ detailsArr.includes(componentName) &&
|
|
|
+ componentName != this.taskDefinitionKey
|
|
|
+ ) {
|
|
|
+ componentName = componentName + 'Details';
|
|
|
+ }
|
|
|
+ console.log(
|
|
|
+ detailsArr.includes(componentName) &&
|
|
|
+ !detailsArr.includes(this.taskDefinitionKey),
|
|
|
+ 'sss'
|
|
|
+ );
|
|
|
+ console.log(componentName, 'componentName');
|
|
|
+ this.componentVal = componentName;
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
tabOption() {
|
|
|
let list = [
|
|
|
+ {
|
|
|
+ label: '生产计划审核',
|
|
|
+ name: 'Activity_1lfkrs6',
|
|
|
+ isOutOrIn: 'innerStore'
|
|
|
+ },
|
|
|
{
|
|
|
label: '内部生产物品入库',
|
|
|
name: 'innerStoremanIn',
|
|
|
@@ -114,7 +148,13 @@
|
|
|
return list.filter((item) => item.isOutOrIn == this.activeComp);
|
|
|
},
|
|
|
activeNameProps() {
|
|
|
- switch (this.activeName) {
|
|
|
+ switch (this.componentVal) {
|
|
|
+ case 'Activity_1lfkrs6':
|
|
|
+ return {
|
|
|
+ ids: this.form.detailList
|
|
|
+ .filter((item) => item.inOrOut == 1)
|
|
|
+ .map((item) => item.producePlanId)
|
|
|
+ };
|
|
|
case 'innerStoremanIn':
|
|
|
return {
|
|
|
form: this.form,
|
|
|
@@ -125,18 +165,30 @@
|
|
|
return {
|
|
|
form: this.form,
|
|
|
bizType: 6,
|
|
|
- sourceBizNo: this.form.returnHandleNo
|
|
|
+ sourceBizNo: this.form.returnHandleNo,
|
|
|
+ detailList: this.detailList
|
|
|
+ };
|
|
|
+ case 'outerStoremanInDetails':
|
|
|
+ return {
|
|
|
+ businessId: this.form.outerInReceiptId,
|
|
|
+ isInterior: true
|
|
|
};
|
|
|
case 'outerStoremanOut':
|
|
|
return {
|
|
|
form: this.form,
|
|
|
bizType: 7,
|
|
|
- sourceBizNo: this.form.returnHandleNo,
|
|
|
- // detailList:this.outList
|
|
|
+ sourceBizNo: this.form.returnHandleNo
|
|
|
+ };
|
|
|
+ case 'outerStoremanOutDetails':
|
|
|
+ return {
|
|
|
+ businessId: this.form.outerOutReceiptId,
|
|
|
+ isInterior: true
|
|
|
};
|
|
|
+
|
|
|
case 'outerInQC':
|
|
|
return {
|
|
|
- businessId: this.businessId
|
|
|
+ businessId: this.form.outerInReceiptId,
|
|
|
+ isInterior:true,
|
|
|
};
|
|
|
case 'innerInQC':
|
|
|
return {
|
|
|
@@ -144,7 +196,8 @@
|
|
|
};
|
|
|
case 'outerFillWeight':
|
|
|
return {
|
|
|
- businessId: this.businessId,
|
|
|
+ businessId: this.form.outerInReceiptId,
|
|
|
+ isInterior:true,
|
|
|
qualityInspectionItems: ['weight']
|
|
|
};
|
|
|
case 'innerFillWeight':
|
|
|
@@ -158,24 +211,33 @@
|
|
|
async created() {
|
|
|
this.form = await saleReturnGetByIdAPI(this.businessId);
|
|
|
let totalCount = 0;
|
|
|
- this.outList = this.form.detailList.filter((item) => { //外协
|
|
|
- item['outType'] = item.outboundType;
|
|
|
- item['categoryName'] = item.productName;
|
|
|
- item['categoryCode'] = item.productCode;
|
|
|
- item['packingQuantity'] = item.packageCount;
|
|
|
- item['quantity'] = item.measurementCount;
|
|
|
- item['measuringUnit'] = item.measurementUnit;
|
|
|
- item['categoryId'] = item.productCategoryId;
|
|
|
- item['engrave'] = item.carveCode;
|
|
|
- item['categoryName'] = item.productCategoryName;
|
|
|
- if (item.inOrOut == 2) {
|
|
|
+ this.form.productList = this.form.detailList
|
|
|
+ .filter((item) => item.inOrOut == 2)
|
|
|
+ .map((item) => {
|
|
|
+ totalCount += item.packageCount;
|
|
|
+ //外协
|
|
|
+ item['totalCount'] = item.packageCount;
|
|
|
+ item['quantity']=item.measurementCount
|
|
|
+ item['measuringUnit']=item.measurementUnit
|
|
|
+
|
|
|
return item;
|
|
|
- }
|
|
|
- });
|
|
|
- // this.form.totalCount=totalCount
|
|
|
- // this.form['warehouseId']=this.detailList[0].warehouseId
|
|
|
- // this.form['warehouseName']= this.detailList[0].warehouseName
|
|
|
- let innerStoreList = ['innerStoremanIn', 'innerFillWeight', 'innerInQC'];
|
|
|
+ });
|
|
|
+ this.detailList = this.form.detailList.filter(
|
|
|
+ (item) => item.inOrOut == 2
|
|
|
+ );
|
|
|
+ if (this.detailList.length) {
|
|
|
+
|
|
|
+ this.form.totalCount = totalCount;
|
|
|
+ this.form['warehouseId'] = this.detailList[0].warehouseId;
|
|
|
+ this.form['warehouseName'] = this.detailList[0].warehouseName;
|
|
|
+ }
|
|
|
+
|
|
|
+ let innerStoreList = [
|
|
|
+ 'Activity_1lfkrs6',
|
|
|
+ 'innerStoremanIn',
|
|
|
+ 'innerFillWeight',
|
|
|
+ 'innerInQC'
|
|
|
+ ];
|
|
|
let outerStoreList = [
|
|
|
'outerStoremanOut',
|
|
|
'outerStoremanIn',
|
|
|
@@ -183,6 +245,7 @@
|
|
|
'outerInQC'
|
|
|
];
|
|
|
if (this.activeComp === 'innerStore') {
|
|
|
+ console.log(this.taskDefinitionKey, 'dsdsd');
|
|
|
// 内部处理流程
|
|
|
if (innerStoreList.includes(this.taskDefinitionKey)) {
|
|
|
this.activeName = this.taskDefinitionKey;
|
|
|
@@ -206,6 +269,7 @@
|
|
|
methods: {
|
|
|
isValidComponent(componentName) {
|
|
|
const validComponents = [
|
|
|
+ 'Activity_1lfkrs6',
|
|
|
'outerStoremanOut',
|
|
|
'outerStoremanIn',
|
|
|
'outerInQC',
|
|
|
@@ -214,6 +278,7 @@
|
|
|
'innerFillWeight',
|
|
|
'outerFillWeight'
|
|
|
];
|
|
|
+
|
|
|
return validComponents.includes(componentName);
|
|
|
},
|
|
|
handleClick(val) {
|
|
|
@@ -232,10 +297,15 @@
|
|
|
let params = {
|
|
|
returnRecordId: this.form.returnRecordId,
|
|
|
id: this.form.id,
|
|
|
- returnStorageData: await this.$refs.componentRef.getReturnStorage(),
|
|
|
- qualityInspectionStatus: this.$refs.componentRef.getStatus&&await this.$refs.componentRef.getStatus(),
|
|
|
+ returnStorageData:
|
|
|
+ this.$refs.componentRef.getReturnStorage &&
|
|
|
+ (await this.$refs.componentRef.getReturnStorage()),
|
|
|
+ qualityInspectionStatus:
|
|
|
+ this.$refs.componentRef.getStatus &&
|
|
|
+ (await this.$refs.componentRef.getStatus()),
|
|
|
qualityInspector:
|
|
|
- ((this.$refs.componentRef&&this.$refs.componentRef.getQualityFile) &&
|
|
|
+ (this.$refs.componentRef &&
|
|
|
+ this.$refs.componentRef.getQualityFile &&
|
|
|
this.$refs.componentRef.getQualityFile()) ||
|
|
|
{}
|
|
|
};
|