|
|
@@ -73,8 +73,11 @@ export default {
|
|
|
},
|
|
|
// 查询工作中心
|
|
|
async workCenterData() {
|
|
|
- // const res = await listWorkCenter(this.current.firstTaskId);
|
|
|
- const res = await listWorkCenter(this.current.firstTaskId);
|
|
|
+ // 判断是否存在工序id 有的话就取否则取首工序id
|
|
|
+ console.log(this.current, 'this.current 查询工作中心');
|
|
|
+ let id = this.current.taskId || this.current.firstTaskId;
|
|
|
+ console.log(id, 'id 查询工作中心');
|
|
|
+ const res = await listWorkCenter(id);
|
|
|
this.workCenterList = res;
|
|
|
if (res.length > 0) {
|
|
|
this.form.factoryName = res[0].factoryName;
|
|
|
@@ -256,7 +259,10 @@ export default {
|
|
|
},
|
|
|
// 查询工位数据
|
|
|
FirstTaskIdFn() {
|
|
|
- listByFirstTaskId(this.current.firstTaskId)
|
|
|
+ console.log(this.current, 'this.current 查询工位数据');
|
|
|
+ let id = this.current.taskId || this.current.firstTaskId;
|
|
|
+ console.log(id, 'id 查询工位数据');
|
|
|
+ listByFirstTaskId(id)
|
|
|
.then((res) => {
|
|
|
this.stationList = res;
|
|
|
this.changeDispatch();
|
|
|
@@ -305,8 +311,8 @@ export default {
|
|
|
},
|
|
|
// 派单
|
|
|
dispatch(row, type) {
|
|
|
- console.log(row,'row 333');
|
|
|
- console.log(type,'type');
|
|
|
+ console.log(row, 'row 333');
|
|
|
+ console.log(type, 'type');
|
|
|
if (row.selection.length == 0) {
|
|
|
return this.$message.warning('请最少选择一条数据');
|
|
|
}
|