|
@@ -47,7 +47,11 @@
|
|
|
></el-step>
|
|
></el-step>
|
|
|
</el-steps>
|
|
</el-steps>
|
|
|
|
|
|
|
|
- <el-tabs type="border-card">
|
|
|
|
|
|
|
+ <el-tabs
|
|
|
|
|
+ v-model="detailActiveTab"
|
|
|
|
|
+ :key="tabsRenderKey"
|
|
|
|
|
+ type="border-card"
|
|
|
|
|
+ >
|
|
|
<el-tab-pane label="领料详情" name="pick">
|
|
<el-tab-pane label="领料详情" name="pick">
|
|
|
<pickDetails
|
|
<pickDetails
|
|
|
:isDetails="true"
|
|
:isDetails="true"
|
|
@@ -119,7 +123,6 @@
|
|
|
import productionDetails from '@/views//workOrderList/components/productionDetails.vue';
|
|
import productionDetails from '@/views//workOrderList/components/productionDetails.vue';
|
|
|
import pickDetails from '../../details.vue';
|
|
import pickDetails from '../../details.vue';
|
|
|
import recordRules from '../recordRules/recordRules.vue';
|
|
import recordRules from '../recordRules/recordRules.vue';
|
|
|
- import checkList from '@/views/checklistManagement/checklist.vue';
|
|
|
|
|
import dotLineDetail from './dotLineDetail.vue';
|
|
import dotLineDetail from './dotLineDetail.vue';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -129,7 +132,8 @@
|
|
|
productionDetails,
|
|
productionDetails,
|
|
|
pickDetails,
|
|
pickDetails,
|
|
|
recordRules,
|
|
recordRules,
|
|
|
- checkList,
|
|
|
|
|
|
|
+ /** 异步加载,避免 checklist → checkDetails → 本组件 的循环依赖导致 checkList 未注册 */
|
|
|
|
|
+ checkList: () => import('@/views/checklistManagement/checklist.vue'),
|
|
|
dotLineDetail
|
|
dotLineDetail
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -147,7 +151,10 @@
|
|
|
routeObj: {
|
|
routeObj: {
|
|
|
id: null
|
|
id: null
|
|
|
},
|
|
},
|
|
|
- sourceTaskId: ''
|
|
|
|
|
|
|
+ sourceTaskId: '',
|
|
|
|
|
+ /** 任务数据就绪后递增,强制各 Tab 子组件重挂载以重新拉数 */
|
|
|
|
|
+ tabsRenderKey: 0,
|
|
|
|
|
+ detailActiveTab: 'pick'
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -172,37 +179,42 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
getTaskFn() {
|
|
getTaskFn() {
|
|
|
- getTaskInstanceList(this.workOrderInfo.id).then((res) => {
|
|
|
|
|
- this.routeList = res;
|
|
|
|
|
|
|
+ getTaskInstanceList(this.workOrderInfo.id)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.routeList = res;
|
|
|
|
|
|
|
|
- console.log(this.routeList, '9999999');
|
|
|
|
|
|
|
+ console.log(this.routeList, '9999999');
|
|
|
|
|
|
|
|
- // 使用findIndex方法查找
|
|
|
|
|
- const index = this.routeList.findIndex(
|
|
|
|
|
- (item) => item.taskId == this.workOrderInfo.taskId
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ // 使用findIndex方法查找
|
|
|
|
|
+ const index = this.routeList.findIndex(
|
|
|
|
|
+ (item) => item.taskId == this.workOrderInfo.taskId
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
- console.log('index', index);
|
|
|
|
|
|
|
+ console.log('index', index);
|
|
|
|
|
|
|
|
- this.desIndex = index;
|
|
|
|
|
- console.log(this.routeList, '888888');
|
|
|
|
|
- this.newId = this.routeList[this.desIndex]?.taskId || '';
|
|
|
|
|
- this.sourceTaskId = this.routeList[this.desIndex]?.sourceTaskId || '';
|
|
|
|
|
|
|
+ this.desIndex = index;
|
|
|
|
|
+ console.log(this.routeList, '888888');
|
|
|
|
|
+ this.newId = this.routeList[this.desIndex]?.taskId || '';
|
|
|
|
|
+ this.sourceTaskId =
|
|
|
|
|
+ this.routeList[this.desIndex]?.sourceTaskId || '';
|
|
|
|
|
|
|
|
- if (this.workOrderInfo.taskId != -2) {
|
|
|
|
|
- // this.curTaskObj = JSON.parse(JSON.stringify(this.routeObj));
|
|
|
|
|
- this.curTaskObj = {
|
|
|
|
|
- taskId: this.workOrderInfo.taskId,
|
|
|
|
|
- id: this.routeObj.id
|
|
|
|
|
- };
|
|
|
|
|
- } else {
|
|
|
|
|
- this.curTaskObj = JSON.parse(JSON.stringify(this.routeList[0]));
|
|
|
|
|
- // this.desIndex = 0;
|
|
|
|
|
- }
|
|
|
|
|
- this.activeIndex = index;
|
|
|
|
|
- console.log('this.curTaskObj', this.curTaskObj);
|
|
|
|
|
- console.log('this.newId', this.newId);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (this.workOrderInfo.taskId != -2) {
|
|
|
|
|
+ // this.curTaskObj = JSON.parse(JSON.stringify(this.routeObj));
|
|
|
|
|
+ this.curTaskObj = {
|
|
|
|
|
+ taskId: this.workOrderInfo.taskId,
|
|
|
|
|
+ id: this.routeObj.id
|
|
|
|
|
+ };
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.curTaskObj = JSON.parse(JSON.stringify(this.routeList[0]));
|
|
|
|
|
+ // this.desIndex = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.activeIndex = index;
|
|
|
|
|
+ console.log('this.curTaskObj', this.curTaskObj);
|
|
|
|
|
+ console.log('this.newId', this.newId);
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ this.tabsRenderKey += 1;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
deepCopy(obj, hash = new WeakMap()) {
|
|
deepCopy(obj, hash = new WeakMap()) {
|