695593266@qq.com 1 год назад
Родитель
Сommit
687db8729b

+ 18 - 41
src/api/produce/workOrder.js

@@ -1,7 +1,5 @@
 import request from '@/utils/request';
 
-
-
 // 生成编码
 export async function getCode(code) {
   const res = await request.get(`/main/codemanage/getCode/` + code, {});
@@ -11,7 +9,6 @@ export async function getCode(code) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 工单列表
 export async function workorderPage(data) {
   const res = await request.post('/pda/mes/workorder/page', data);
@@ -21,9 +18,7 @@ export async function workorderPage(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-// 工单列表 
+// 工单列表
 export async function workorderPage2(data) {
   const res = await request.post('/mes/workorder/taskReportPage2', data);
   if (res.data.code == 0) {
@@ -32,8 +27,7 @@ export async function workorderPage2(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-// 工单列表 
+// 工单列表
 
 export async function pickTaskReportPage(data) {
   const res = await request.post('/mes/workorder/pickTaskReportPage', data);
@@ -43,12 +37,14 @@ export async function pickTaskReportPage(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
-
-
-
+// 查询 工序的工步列表
+export async function listByParam(id) {
+  const res = await request.get('/main/categoryparamstep/listByParamId/' + id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 
 // 查询库存台账首页列表
 
@@ -82,11 +78,6 @@ export async function listInProduct(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
-
-
 // 父级ID查询分类树
 export async function treeByPid(data) {
   const res = await request.get('/pda/main/categoryLevel/pdaTreeByPid', {
@@ -98,7 +89,6 @@ export async function treeByPid(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 根据工单ids获取工单列表
 export async function workorderList(data) {
   const res = await request.post('/mes/workorder/list', data);
@@ -117,8 +107,6 @@ export async function znworkorderList(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
 // pda报工保存
 
 export async function jobSave(data) {
@@ -129,8 +117,6 @@ export async function jobSave(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
 // pda报工保存缓存
 
 export async function saveCache(data) {
@@ -141,12 +127,8 @@ export async function saveCache(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
 // pda报工查缓存
 
-
-
 export async function getCache(data) {
   const res = await request.post('/mes/workreport/getCache', data);
   if (res.data.code == 0) {
@@ -155,10 +137,6 @@ export async function getCache(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
-
 // 清空缓存
 export async function removeCache(data) {
   const res = await request.post('/mes/workreport/removeCache', data);
@@ -168,9 +146,6 @@ export async function removeCache(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
 // PDA  碳谷 入库查询
 
 export async function listPcToWarehouseTG(data) {
@@ -189,7 +164,6 @@ export async function listPCToWarehouse(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // pda根据工单id和工序id查询报工详情
 export async function listWorkReport(data) {
   const res = await request.post('/pda/mes/workreport/listWorkReport', data);
@@ -199,8 +173,6 @@ export async function listWorkReport(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
 // pda根据工单id和工序id查询报工详情  (入库)
 export async function listApplystorage(data) {
   const res = await request.get('/mes/applystorage/list', {
@@ -212,10 +184,12 @@ export async function listApplystorage(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 获取配置信息
 export async function packageDisposition(data) {
-  const res = await request.get('/main/category/packageDisposition/'+data,{});
+  const res = await request.get(
+    '/main/category/packageDisposition/' + data,
+    {}
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -266,7 +240,10 @@ export async function createInProduct(data) {
   return Promise.reject(new Error(res.data.message));
 }
 export async function createInProductBatchTG(data) {
-  const res = await request.post('/pda/mes/workreport/createInProductBatchTG', data);
+  const res = await request.post(
+    '/pda/mes/workreport/createInProductBatchTG',
+    data
+  );
 
   if (res.data.code == 0) {
     return res.data.data;

+ 8 - 2
src/views/oneClickWorkReporting/index.vue

@@ -1866,8 +1866,14 @@ export default {
         type: 'warning'
       })
         .then(async () => {
-          const res = await onekeyStop({ id: row.id });
-          console.log(res);
+          await onekeyScrap({
+            tid: row.id,
+            cuttingWork: row.productName.includes('板材') ? '1' : '2'
+          });
+        // 编组进窑成功后重新刷新底部表格数据,并将编组的小车数据重新赋值
+        let ids = this.cuttingTaskTableData.map((item) => item.id);
+          // 调新接口刷新页面下面表格数据
+          await this._getCuttingTaskData(ids);
           this.getOnekeyWorkReportByPageFun();
         })
         .catch(() => {});

+ 201 - 203
src/views/produce/components/footBtn.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="foot_box">
-    <div v-for="(item, index) in btnList" :key="index" class="btn" :style="{ background: item.bjColor }"
-      @click="footClick(item.type)">
+    <div
+      v-for="(item, index) in btnList"
+      :key="index"
+      class="btn"
+      :style="{ background: item.bjColor }"
+      @click="footClick(item.type)"
+    >
       <img src="../../../assets/Frame.png" class="Frame" />
       {{ item.name }}
     </div>
@@ -9,227 +14,220 @@
 </template>
 
 <script>
-export default {
-  data() {
-    return {
-      btnList1: [
-        {
-          name: '领料',
-          type: 'pick',
-          bjColor: '#FC1B75'
-        },
-        {
-          name: '投料',
-          type: 'feed',
-          bjColor: '#FBD114'
-        },
-        {
-          name: '报工',
-          type: 'job',
-          bjColor: '#157A2C'
-        },
-        {
-          name: '委外请托',
-          type: 'Outsourcing',
-          bjColor: '#39D9AC'
-        },
-        {
-          name: '暂停启动',
-          type: '',
-          bjColor: '#858585'
-        },
-        // {
-        //   name: '工单交接',
-        //   type: '',
-        //   bjColor: '#2B56C2'
-        // },
-        {
-          name: '工艺文件',
-          type: 'work',
-          bjColor: '#2f3033'
-        }
-
-      ],
-      btnList2: [
-        // {
-        //   name: '取样质检',
-        //   type: 'inspection',
-        //   bjColor: '#FBD114'
-        // },
-        {
-          name: '报工',
-          type: 'job',
-          bjColor: '#157A2C'
-        },
-        
-        {
-          name: '委外请托',
-          type: 'Outsourcing',
-          bjColor: '#39D9AC'
-        },
-        {
-          name: '暂停启动',
-          type: '',
-          bjColor: '#858585'
-        },
-        {
-          name: '工艺文件',
-          type: 'work',
-          bjColor: '#2B56C2'
-        }
-
-      ],
-      btnList3: [
-        {
-          name: '入库',
-          type: 'job',
-          bjColor: '#157A2C'
-        },
-        {
-          name: '暂停启动',
-          type: '',
-          bjColor: '#858585'
-        },
-        {
-          name: '工艺文件',
-          type: 'work',
-          bjColor: '#2B56C2'
-        }
-
-      ],
-      btnList: [
-
-      ]
-    };
-  },
-  props: {
-    type: {
-      type: String | Number,
-      default: ''
+  export default {
+    data() {
+      return {
+        btnList1: [
+          {
+            name: '领料',
+            type: 'pick',
+            bjColor: '#FC1B75'
+          },
+          {
+            name: '投料',
+            type: 'feed',
+            bjColor: '#FBD114'
+          },
+          {
+            name: '报工',
+            type: 'job',
+            bjColor: '#157A2C'
+          },
+          {
+            name: '委外请托',
+            type: 'Outsourcing',
+            bjColor: '#39D9AC'
+          },
+          {
+            name: '暂停启动',
+            type: '',
+            bjColor: '#858585'
+          },
+          // {
+          //   name: '工单交接',
+          //   type: '',
+          //   bjColor: '#2B56C2'
+          // },
+          {
+            name: '工艺文件',
+            type: 'work',
+            bjColor: '#2f3033'
+          },
+          {
+            name: '工步',
+            type: 'workStep',
+            bjColor: '#409EFF'
+          }
+        ],
+        btnList2: [
+          // {
+          //   name: '取样质检',
+          //   type: 'inspection',
+          //   bjColor: '#FBD114'
+          // },
+          {
+            name: '报工',
+            type: 'job',
+            bjColor: '#157A2C'
+          },
+
+          {
+            name: '委外请托',
+            type: 'Outsourcing',
+            bjColor: '#39D9AC'
+          },
+          {
+            name: '暂停启动',
+            type: '',
+            bjColor: '#858585'
+          },
+          {
+            name: '工艺文件',
+            type: 'work',
+            bjColor: '#2B56C2'
+          }
+        ],
+        btnList3: [
+          {
+            name: '入库',
+            type: 'job',
+            bjColor: '#157A2C'
+          },
+          {
+            name: '暂停启动',
+            type: '',
+            bjColor: '#858585'
+          },
+          {
+            name: '工艺文件',
+            type: 'work',
+            bjColor: '#2B56C2'
+          }
+        ],
+        btnList: []
+      };
+    },
+    props: {
+      type: {
+        type: String | Number,
+        default: ''
+      },
+      singleReportInspection: {}
     },
-    singleReportInspection:{
-
-    }
 
-  },
+    computed: {
+      taskObj() {
+        return this.$store.state.user.taskObj;
+      },
 
-  computed: {
-    taskObj() {
-      return this.$store.state.user.taskObj;
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
     },
-
-    clientEnvironmentId() {
-      return this.$store.state.user.info.clientEnvironmentId;
-    }
-  },
-  watch: {
-    taskObj(val) {
-      // if (this.clientEnvironmentId == 2 && val.type == 3) {
-      //   this.btnList[1].name = '质检';
-      //   this.btnList[1].type = 'inspection';
-      // } else {
-      //   this.btnList[1].name = '投料';
-      //   this.btnList[1].type = 'feed';
-      // }
-      if(this.clientEnvironmentId == 3 && (this.taskObj.type == 3||this.taskObj.type == 6)){
-          let index=this.btnList2.findIndex(obj => obj.name == '取样质检');
-          if( index !==-1){
+    watch: {
+      taskObj(val) {
+        // if (this.clientEnvironmentId == 2 && val.type == 3) {
+        //   this.btnList[1].name = '质检';
+        //   this.btnList[1].type = 'inspection';
+        // } else {
+        //   this.btnList[1].name = '投料';
+        //   this.btnList[1].type = 'feed';
+        // }
+        if (
+          this.clientEnvironmentId == 3 &&
+          (this.taskObj.type == 3 || this.taskObj.type == 6)
+        ) {
+          let index = this.btnList2.findIndex((obj) => obj.name == '取样质检');
+          if (index !== -1) {
             this.btnList2.splice(0, 1);
           }
-      }
-    },
-    type: {
-      handler(v) {
-
-
-        if (v == '2' || v == '3' || v == '6') {
-          console.log(111);
-          let btnList2=this.btnList2.filter(item=>{
-             if(v!=6){
-
-             }
-          })
-          
-          this.$set(this, 'btnList', this.btnList2)
-
-        }else if (v == '5') {
-          this.$set(this, 'btnList', this.btnList3)
-        }else {
-          this.$set(this, 'btnList', this.btnList1)
         }
+      },
+      type: {
+        handler(v) {
+          if (v == '2' || v == '3' || v == '6') {
+            console.log(111);
+            let btnList2 = this.btnList2.filter((item) => {
+              if (v != 6) {
+              }
+            });
+
+            this.$set(this, 'btnList', this.btnList2);
+          } else if (v == '5') {
+            this.$set(this, 'btnList', this.btnList3);
+          } else {
+            this.$set(this, 'btnList', this.btnList1);
+          }
 
-        console.log(this.btnList, 'btnList');
-
+          console.log(this.btnList, 'btnList');
+        },
+        immediate: true,
+        deep: true
       },
-      immediate: true,
-      deep: true
-    },
-    singleReportInspection:{
-      handler(v) {
-       if(v==1||v==null){
-          let index=this.btnList2.findIndex(obj => obj.name == '取样质检');
-          if( index !==-1){
-            this.btnList2.splice(0, 1);
+      singleReportInspection: {
+        handler(v) {
+          if (v == 1 || v == null) {
+            let index = this.btnList2.findIndex(
+              (obj) => obj.name == '取样质检'
+            );
+            if (index !== -1) {
+              this.btnList2.splice(0, 1);
+            }
+          } else if (v == 0 && this.clientEnvironmentId != 3) {
+            let arr = {
+              name: '取样质检',
+              type: 'inspection',
+              bjColor: '#FBD114'
+            };
+            this.btnList2.unshift(arr);
           }
-       }else if(v==0 && this.clientEnvironmentId != 3){
-         let arr= {
-          name: '取样质检',
-          type: 'inspection',
-          bjColor: '#FBD114'
         }
-        this.btnList2.unshift(arr)
-       }
-
       }
-    }
-
-  },
-
-  created() { 
+    },
 
-  },
-  mounted(){
+    created() {},
+    mounted() {
       // if(this.clientEnvironmentId == 3 && (this.taskObj.type == 3||this.taskObj.type == 6)){
       //     this.btnList2.splice(0, 1);
       // }
-  },
-  methods: {
-    footClick(type) {
-      this.$emit('footBtn', type);
+    },
+    methods: {
+      footClick(type) {
+        this.$emit('footBtn', type);
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.foot_box {
-  min-width: 1280px;
-  width: 100%;
-  height: 80px;
-  padding: 0 20px;
-  display: flex;
-  align-items: center;
-  // justify-content: space-between;
-  font-size: 20px;
-}
-
-.btn {
-  height: 70px;
-  width: calc(100% / 10);
-  margin: 0 10px;
-  color: #fff;
-  font-weight: 800;
-  font-size: 20px;
-  border-radius: 4px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  cursor: pointer;
+  .foot_box {
+    min-width: 1280px;
+    width: 100%;
+    height: 80px;
+    padding: 0 20px;
+    display: flex;
+    align-items: center;
+    // justify-content: space-between;
+    font-size: 20px;
+  }
 
-  .Frame {
-    width: 26px;
-    height: 26px;
+  .btn {
+    height: 70px;
+    width: calc(100% / 10);
+    margin: 0 10px;
+    color: #fff;
+    font-weight: 800;
+    font-size: 20px;
+    border-radius: 4px;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    cursor: pointer;
+
+    .Frame {
+      width: 26px;
+      height: 26px;
+    }
   }
-}
 </style>

+ 100 - 0
src/views/produce/components/workStep/details.vue

@@ -0,0 +1,100 @@
+<template>
+  <ele-modal
+    :title="title"
+    :maxable="true"
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible.sync="detailsVisible"
+    :close-on-click-modal="false"
+    width="35%"
+    append-to-body
+    @close="handleClose"
+  >
+    <ele-pro-table
+      v-if="title == '注意事项'"
+      style="min-height: 400px"
+      ref="fileTable"
+      :columns="columns"
+      :datasource="list"
+    >
+    </ele-pro-table>
+    <ele-pro-table
+      v-else
+      style="min-height: 400px"
+      ref="fileTable"
+      :columns="columns1"
+      :datasource="list"
+    >
+    </ele-pro-table>
+  </ele-modal>
+</template>
+<script>
+  export default {
+    props: {
+      list: {
+        type: Array,
+        default: () => []
+      },
+      title: {
+        type: String,
+        default: ''
+      },
+      detailsVisible: {
+        type: Boolean,
+        default: false
+      }
+    },
+    watch: {
+      list: {
+        hanlder(newVal) {
+          this.list = newVal;
+        }
+      }
+    },
+    data() {
+      return {
+        // 物品列表
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '编码',
+            prop: 'code',
+            width: 110,
+            align: 'center',
+            showOverflowTooltip: true
+          }
+        ],
+        // 注意事项
+        columns1: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '编码',
+            prop: 'code',
+            width: 110,
+            align: 'center',
+            showOverflowTooltip: true
+          }
+        ]
+      };
+    },
+    methods: {
+      handleClose() {
+        this.$emit('close');
+      }
+    }
+  };
+</script>

+ 239 - 0
src/views/produce/components/workStep/index.vue

@@ -0,0 +1,239 @@
+<template>
+  <ele-modal
+    title="弹窗示例"
+    :maxable="true"
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
+    width="85%"
+    append-to-body
+    @close="handleClose"
+  >
+    <ele-pro-table
+      style="min-height: 400px"
+      ref="fileTable"
+      :columns="columns"
+      :datasource="workList"
+    >
+      <template v-slot:starttime="{ row, $index }">
+        <el-date-picker
+          v-model="row.starttime"
+          type="datetime"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          placeholder="选择开始日期"
+        >
+        </el-date-picker>
+      </template>
+      <template v-slot:endtime="{ row, $index }">
+        <el-date-picker
+          v-model="row.endtime"
+          type="datetime"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          placeholder="选择结束日期"
+        >
+        </el-date-picker>
+      </template>
+      <template v-slot:wuping="{ row }">
+        <el-button type="primary" @click="goDetails(row, 'wuping')"
+          >物品({{ dataLeng(row, 'wuping') }})</el-button
+        >
+      </template>
+      <template v-slot:zysx="{ row }">
+        <el-button type="primary" @click="goDetails(row, 'zysx')"
+          >注意事项({{ dataLeng(row, 'zysx') }})</el-button
+        >
+      </template>
+      <template v-slot:action="{ row }">
+        <el-link type="primary" @click="saveData(row)" :underline="false"
+          >保存</el-link
+        >
+      </template>
+      <!-- 表头工具栏 -->
+    </ele-pro-table>
+    <Details
+      v-if="detailsVisible"
+      :detailsVisible="detailsVisible"
+      @close="close"
+      :list="list"
+    />
+  </ele-modal>
+</template>
+
+<script>
+  import Details from './details.vue';
+  import { listByParam } from '@/api/produce/workOrder';
+  export default {
+    components: { Details },
+    data() {
+      return {
+        visible: false,
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '编码',
+            prop: 'code',
+            width: 110,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '名称',
+            prop: 'name',
+            width: 180,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '内容',
+            prop: 'defaultValue',
+            minWidth: 300,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            slot: 'wuping',
+            label: '物品',
+            prop: 'wuping',
+            width: 130,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            slot: 'zysx',
+            label: '注意事项',
+            prop: 'zysx',
+            width: 130,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '工时',
+            prop: 'hs',
+            width: 100,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '开始时间',
+            slot: 'starttime',
+            prop: 'starttime',
+            width: 250,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '结束时间',
+            slot: 'endtime',
+            prop: 'endtime',
+            width: 250,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            columnKey: 'action',
+            slot: 'action',
+            label: '操作',
+            align: 'center',
+            width: 130,
+            resizable: false,
+            showOverflowTooltip: true
+          }
+        ],
+        workList: [
+          {
+            name: '哈哈哈哈哈哈哈',
+            timeFlag: false
+          },
+          {
+            name: '哈哈哈哈哈哈哈',
+            time: '',
+            timeFlag: true
+          },
+          {
+            name: '哈哈哈哈哈哈哈',
+            wuping: [
+              {
+                code: '物品'
+              }
+            ]
+          },
+          {
+            name: '哈哈哈哈哈哈哈',
+            zysx: [
+              {
+                code: '注意事项'
+              }
+            ]
+          },
+          {
+            name: '哈哈哈哈哈哈哈'
+          },
+          {
+            name: '哈哈哈哈哈哈哈'
+          },
+          {
+            name: '哈哈哈哈哈哈哈'
+          },
+          {
+            name: '哈哈哈哈哈哈哈'
+          }
+        ],
+        detailsVisible: false,
+        list: []
+      };
+    },
+    computed: {
+      dataLeng() {
+        return (row, type) => {
+          if (!row[type]) {
+            return 0;
+          }
+          return row[type].length;
+        };
+      }
+    },
+    methods: {
+      open(id) {
+        console.log(id, 'id ----');
+        this.visible = true;
+        this.getList(id);
+      },
+      getList(id) {
+        listByParam(id)
+          .then((res) => {
+            console.log(res, 'res ---');
+          })
+          .catch((err) => {
+            console.log(err, 'err');
+          });
+      },
+      //   保存
+      saveData(row) {
+        // 注意判断时间 是否填写
+        console.log('这里做最后的提交', row);
+      },
+      handleClose() {
+        this.visible = false;
+      },
+      close() {
+        this.detailsVisible = false;
+      },
+      goDetails(row, type) {
+        if (!row[type] || row[type].length == 0) {
+          return this.$message.warning('暂无详细数据');
+        }
+        this.list = row[type];
+        this.detailsVisible = true;
+      }
+    }
+  };
+</script>

+ 47 - 5
src/views/produce/index.vue

@@ -125,6 +125,7 @@
           <template v-slot:content>
             <div class="right_main">
               <!-- 领料 -->
+              <!-- <div v-if="operationType == 'pick'"> -->
               <div v-if="operationType == 'pick'">
                 <pickDetails
                   ref="pickListRef"
@@ -169,6 +170,8 @@
                 </workPlan> -->
               </div>
 
+              <!-- 工步 -->
+              <div v-if="operationType == 'workStep'"> </div>
               <!-- 质检工序 -->
 
               <div v-if="operationType == 'inspection'">
@@ -225,6 +228,8 @@
     <!-- <workes ref="jobRefs"> </workes> -->
 
     <!-- :workListIds="workListIds" :taskId="taskObj.id" -->
+    <!-- 工步 -->
+    <workStep ref="workStepRef" />
   </div>
 </template>
 
@@ -248,7 +253,7 @@
   import workes from './components/workPlan/components/work.vue';
   import warehousing from './components/warehousing/index.vue';
   import outsourceList from './components/outsourcing/outsourceList.vue';
-
+  import workStep from './components/workStep/index.vue';
   import {
     getByTaskId,
     pcCheckOutsource,
@@ -275,8 +280,7 @@
       jobBooking,
       inspection,
       warehousing,
-      workPlan,
-      workes
+      workStep
     },
     data() {
       return {
@@ -288,6 +292,7 @@
         type: '',
         loading: false,
         operationType: null,
+        popupType: '', // 弹窗
         workListIds: [],
         factoryworkstationList: [],
         title1: '',
@@ -325,6 +330,9 @@
       },
       info() {
         return this.$store.state.user.info;
+      },
+      rightShow() {
+        return (type) => {};
       }
     },
 
@@ -491,7 +499,17 @@
       },
 
       footBtn(t) {
+<<<<<<< HEAD
         this.operationType = t;
+=======
+        // this.operationType = t;
+        // 新增判断 *** 出现弹窗的时候不然右边数据消失
+        if (t == 'work' || t == 'workStep') {
+          this.popupType = t;
+        } else {
+          this.operationType = t;
+        }
+>>>>>>> 84a2352d571acd9b0391474c4774d67069ce10e0
         if (
           Object.keys(this.$store.state.user.taskObj).length === 0 &&
           this.$store.state.user.taskObj.constructor === Object
@@ -499,7 +517,7 @@
           this.$message.warning('请选择工序');
           return true;
         }
-        if (['pick', 'feed', 'job'].includes(t)) {
+        if (['pick', 'feed', 'job', 'work', 'workStep'].includes(t)) {
           if (this.workListIds.length == 0) {
             this.$message.warning('请选择工单列表');
             return false;
@@ -524,8 +542,32 @@
             this.$refs.pickListRef.getList(this.workListIds);
           });
         }
-        // 工艺路线
+        // 工步
+        if (t === 'workStep') {
+          if (this.workListIds.length > 1) {
+            return this.$message.warning('工步只能选择一个工单!');
+          }
+          this.$refs.workStepRef.open(this.workTaskId);
+          // let req = {
+          //   taskId: this.taskObj.id,
+          //   workOrderId: this.workListIds[0]
+          // };
+
+          // this.$refs.wokePopupRef.open(req);
+        }
+        // 工艺路线 *** 修改 判断只能选择一个
+        // if (t === 'work') {
+        //   let req = {
+        //     taskId: this.taskObj.id,
+        //     workOrderId: this.workListIds[0]
+        //   };
+
+        //   this.$refs.wokePopupRef.open(req);
+        // }
         if (t === 'work') {
+          if (this.workListIds.length > 1) {
+            return this.$message.warning('工艺文件只能选择一个工单!');
+          }
           let req = {
             taskId: this.taskObj.id,
             workOrderId: this.workListIds[0]

+ 3 - 3
vue.config.js

@@ -34,9 +34,9 @@ module.exports = {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.103:18086',
-        // target: 'http://192.168.1.251:18086',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.103:18086',192.168.1.116
+        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''