Explorar o código

禅道bug 2577 2552 修复

jingshuyong hai 9 meses
pai
achega
c94ca8469c

+ 2 - 0
src/views/workOrder/components/order-search.vue

@@ -258,6 +258,8 @@
         // 表单数据
         where: { ...defaultWhere },
         statusOpt: [
+          { label: '暂停', value: 9 },
+          { label: '终止', value: 10 },
           { label: '待下达', value: 8 },
           { label: '待生产', value: 4 },
           { label: '生产中', value: 5 }

+ 11 - 5
src/views/workOrder/mixins/release.js

@@ -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('请最少选择一条数据');
       }