Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

lucw 1 год назад
Родитель
Сommit
d49f378655
35 измененных файлов с 1799 добавлено и 533 удалено
  1. 14 0
      src/api/produce/index.js
  2. 22 15
      src/components/addDoc/api/index.js
  3. 7 3
      src/components/addDoc/doc_template.vue
  4. 213 147
      src/components/addDoc/file-edit.vue
  5. 0 1
      src/components/addDoc/file-table-listTemplate.vue
  6. 1 0
      src/components/addDoc/fileUpload.vue
  7. 3 13
      src/components/addDoc/getCode.vue
  8. 5 1
      src/components/addDoc/index.vue
  9. 4 0
      src/components/addDoc/main.vue
  10. 2 2
      src/components/addDoc/util.js
  11. 4 0
      src/components/common/seekPage.vue
  12. 3 1
      src/enum/dict.js
  13. 196 195
      src/views/entrust/components/create.vue
  14. 29 28
      src/views/produce/components/common.js
  15. 68 11
      src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue
  16. 1 1
      src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue
  17. 6 2
      src/views/produce/components/jobBooking/components/detailPackagingGrouping.vue
  18. 4 10
      src/views/produce/components/jobBooking/components/jobBom.vue
  19. 4 6
      src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue
  20. 2 2
      src/views/produce/components/outsourcing/details.vue
  21. 60 28
      src/views/produce/components/outsourcing/index.vue
  22. 34 6
      src/views/produce/components/outsourcing/outsourceList.vue
  23. 981 0
      src/views/produce/components/outsourcing/pleaseEntrust.vue
  24. 16 0
      src/views/produce/components/picking/index.vue
  25. 10 3
      src/views/produce/components/picking/outsourceIndex.vue
  26. 2 4
      src/views/produce/components/picking/outsourcingPickingList.vue
  27. 14 14
      src/views/produce/components/taskDialog/index.vue
  28. 7 0
      src/views/produce/components/warehousing/components/detailsBom.vue
  29. 6 6
      src/views/produce/components/warehousing/index.vue
  30. 46 20
      src/views/produce/index.vue
  31. 10 10
      src/views/taskList/components/Ddtails.vue
  32. 1 1
      src/views/taskList/components/task-search.vue
  33. 11 0
      src/views/warehousing/components/tgDetails.vue
  34. 11 1
      src/views/warehousing/index.vue
  35. 2 2
      vue.config.js

+ 14 - 0
src/api/produce/index.js

@@ -81,6 +81,20 @@ export async function checkOutsourceMaterial(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+//请托申请单
+export async function checkPleaseEntrust(data) {
+  const res = await request.get(
+    `/mes/please_entrust_management/checkPleaseEntrustMaterial`,
+    {
+      params: data
+    }
+  );
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 export async function pdaTreeByPid(data) {
   const res = await request.get(`/api/main/asset/pdaPage`, { params: data });
   if (res.data.code == 0) {

+ 22 - 15
src/components/addDoc/api/index.js

@@ -13,9 +13,9 @@ export async function getDocTreeListAPI(data) {
 }
 
 /**
-* 查询文件数据
-* @data data
-*/
+ * 查询文件数据
+ * @data data
+ */
 export async function filePageAPI(data) {
   const res = await request.post('/fm/file/pageBusiness', data);
   if (res.data.code == 0) {
@@ -51,7 +51,7 @@ export async function fileGetByIdAPI(id) {
  * ids查询文件列表
  * @data data
  */
- export async function queryIds(data) {
+export async function queryIds(data) {
   const res = await request.post('/fm/file/queryIds', data);
   if (res.data.code == 0) {
     return res.data.data;
@@ -59,12 +59,12 @@ export async function fileGetByIdAPI(id) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
-
-
 // 获取编码树
 export async function selectTreeList(data) {
-  const res = await request.post(`/main/business_code_category/selectTreeList`, data);
+  const res = await request.post(
+    `/main/business_code_category/selectTreeList`,
+    data
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -72,7 +72,10 @@ export async function selectTreeList(data) {
 }
 // 获取右侧列表
 export async function listParentId(data) {
-  const res = await request.post(`/main/business_code_category/listPageParentId`, data);
+  const res = await request.post(
+    `/main/business_code_category/listPageParentId`,
+    data
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -87,10 +90,11 @@ export async function pageSegment(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-
 // 生成编码
 export async function getCode(id) {
-  const res = await request.get(`/main/business_code_category/applyForCode/`+id);
+  const res = await request.get(
+    `/main/business_code_category/applyForCode/` + id
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -101,7 +105,7 @@ export async function getCode(id) {
  * 上传文件
  * @param file 文件
  */
- export async function uploadFileNew (data) {
+export async function uploadFileNew(data) {
   const formData = new FormData();
   formData.append('multiPartFile', data.multiPartFile);
   formData.append('module', data.module);
@@ -112,11 +116,14 @@ export async function getCode(id) {
   return Promise.reject(new Error(res.data.message));
 }
 // 编码方案
-export async function listCode() {
-  const res = await request.get(`/main/business_code_category/listCode/WD0001`);
+export async function listCode(data = {}) {
+  const res = await request.get(
+    `/main/business_code_category/listCode/${data.id || '0'}` +
+      '?parentId=' +
+      (data.parentId || '')
+  );
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
-

+ 7 - 3
src/components/addDoc/doc_template.vue

@@ -11,7 +11,11 @@
           <ele-toolbar class="ele-toolbar-actions">
             <div style="margin: 5px 0"> </div>
           </ele-toolbar>
-          <div class="ele-border-lighter sys-organization-list">
+
+          <div
+            class="ele-border-lighter sys-organization-list"
+            style="height: 65vh"
+          >
             <el-tree
               ref="tree"
               :data="data"
@@ -23,7 +27,7 @@
               :default-expand-all="true"
               @node-click="onNodeClick"
             >
-              <span class="custom-tree-node" slot-scope="{ node }">
+              <span class="custom-tree-node" slot-scope="{ node, data }">
                 <ElementTreeLine
                   :node="node"
                   :showLabelLine="true"
@@ -74,7 +78,7 @@
       };
     },
     props: {
-      lcyStatus: null, //1:文档工作区 2:文档归档区 3:文档发布区 4:文档废止区
+      lcyStatus: '', //1:文档工作区 2:文档归档区 3:文档发布区 4:文档废止区
 
       disabledTableList: {
         //已选择列表

+ 213 - 147
src/components/addDoc/file-edit.vue

@@ -9,9 +9,38 @@
     @close="cancel"
     :title="title"
     ref="Emodal"
+    :maxable="true"
+    :resizable="true"
   >
+    <el-tabs
+      v-model="activeName"
+      type="card"
+      @tab-click="handleClick"
+      style="margin-bottom: 10px"
+    >
+      <el-tab-pane label="文档工作区" name="1"></el-tab-pane>
+      <el-tab-pane label="个人文档" name="2"></el-tab-pane>
+    </el-tabs>
     <el-form ref="form" :model="form" :rules="rules" label-width="82px">
       <el-row :gutter="15">
+        <el-col :span="24">
+          <el-form-item label="文档位置" prop="directoryId">
+            <el-cascader
+              style="width: 100%"
+              v-model="form.directoryId"
+              :options="folderList"
+              @change="initFileCode"
+              ref="cascaderRef"
+              :props="{
+                value: 'id',
+                label: 'name',
+                children: 'sonDirectoryList',
+                emitPath: false,
+                checkStrictly: true
+              }"
+            ></el-cascader>
+          </el-form-item>
+        </el-col>
         <el-col :span="24">
           <el-form-item label="编码分类" prop="codeType">
             <ele-tree-select
@@ -63,27 +92,11 @@
                 :multiple="true"
                 @fileChange="fileChange"
               >
-
               </fileUpload>
             </div>
           </el-form-item>
         </el-col>
-        <el-col :span="24">
-          <el-form-item label="文档位置" prop="directoryId">
-            <el-cascader
-              style="width: 100%"
-              v-model="form.directoryId"
-              :options="folderList"
-              :props="{
-                value: 'id',
-                label: 'name',
-                children: 'sonDirectoryList',
-                emitPath: false,
-                checkStrictly: true
-              }"
-            ></el-cascader>
-          </el-form-item>
-        </el-col>
+
         <el-col :span="24">
           <el-form-item label="备注" prop="remark">
             <el-input
@@ -105,159 +118,212 @@
 </template>
 
 <script>
-import { fileSaveAPI,selectTreeList, listParentId,getDocTreeListAPI,listCode} from './api/index';
-import FileUpload from './fileUpload.vue';
-import { setFolderList } from './util.js';
-import { mapGetters } from 'vuex';
-export default {
-  components: { FileUpload },
+  import {
+    fileSaveAPI,
+    selectTreeList,
+    listParentId,
+    getDocTreeListAPI,
+    listCode
+  } from './api/index';
+  import FileUpload from './fileUpload.vue';
+  import { setFolderList } from './util.js';
+  import { mapGetters } from 'vuex';
+  export default {
+    components: { FileUpload },
 
-  data() {
-    const defaultForm = {
-      name: '', //名称
-      type: '', //类型
-      sizeUnit: '', //大小,
-      unit: '', //单位
-      remark: '', //备注
-      status: '', //状态
-      storagePathId: '',
-      directoryId: '',
-      businessCodeId: '',
-      storagePath: [],
-      id: '',
-      lcyStatus: 1,
-      fileType:0
-    };
-    return {
-      rules: {
-        businessCodeId: [
-          { required: true, message: '请选择', trigger: 'blur' }
-        ],
-        // codeType: [{ required: true, message: '请选择', trigger: 'blur' }],
-        directoryId: [{ required: true, message: '请选择', trigger: 'blur' }],
-        storagePath: [{ required: true, message: '请选择', trigger: 'blur' }]
-      },
-      templateVisible: false,
-      folderList: [],
-      list: [],
-      options: [],
-      defaultForm,
-      code: '',
-      // 表单数据
-      form: { ...defaultForm },
+    data() {
+      const defaultForm = {
+        name: '', //名称
+        type: '1', //类型
+        sizeUnit: '', //大小,
+        unit: '', //单位
+        remark: '', //备注
+        status: '', //状态
+        storagePathId: '',
+        directoryId: '',
+        businessCodeId: '',
+        storagePath: [],
+        id: '',
+        lcyStatus: 1,
+        fileType: 0
+      };
+      return {
+        activeName: '1',
+        rules: {
+          businessCodeId: [
+            { required: true, message: '请选择', trigger: 'blur' }
+          ],
+          // codeType: [{ required: true, message: '请选择', trigger: 'blur' }],
+          directoryId: [{ required: true, message: '请选择', trigger: 'blur' }],
+          storagePath: [{ required: true, message: '请选择', trigger: 'blur' }]
+        },
+        templateVisible: false,
+        folderList: [],
+        allFolderList: [],
+        myFolderList: [],
+        list: [],
+        options: [],
+        defaultForm,
+        code: '',
+        // 表单数据
+        form: { ...defaultForm },
 
-      // 提交状态
-      loading: false,
-      showEditFlag: false,
-      title: '',
-      type: '新建附件'
-    };
-  },
-  computed: {
-    // 是否开启响应式布局
-    styleResponsive() {
-      return this.$store.state.theme.styleResponsive;
+        // 提交状态
+        loading: false,
+        showEditFlag: false,
+        title: '',
+        type: '新建附件',
+        nodeData: {}
+      };
     },
-    ...mapGetters(['user'])
-  },
-  async created() {
-    let query = {
-      type: 0,
-      currentUserId: this.user.info.userId
-    };
-    this.folderList = await getDocTreeListAPI(query);
-    setFolderList(this.folderList); //权限过滤
-  },
-  methods: {
-    async open() {
-    
-      this.showEditFlag = true;
-      this.list = await selectTreeList();
-      this.options= await listCode();
-      if(this.options.length>0){
-        this.form.businessCodeId=this.options[0].id
-      }
-      this.setTree(this.list);
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      },
+      ...mapGetters(['user'])
     },
-    setTree(data) {
-      data.forEach((item) => {
-        item.sonDirectoryList = item.sonDirectoryList.filter(
-          (item) => item.type == 1
-        );
-        if (item.sonDirectoryList.length > 0) {
-          this.setTree(item.sonDirectoryList);
-        }
+    async created() {
+      this.allFolderList = await getDocTreeListAPI({
+        type: 0,
+        currentUserId: this.user.info.userId
       });
-    },
-    async typeChange(val) {
-      let data = await listParentId({
-        pageNum: 1,
-        size: 100,
-        parentId: val
+      this.myFolderList = await getDocTreeListAPI({
+        type: 1,
+        currentUserId: this.user.info.userId
       });
-      this.options = data.list.filter((item) => item.type == 2);
-      this.form.businessCodeId = '';
-    },
-
-    fileChange(file) {
-      this.form.name = file.name.replace(/\.[^/.]+$/, '');
+      this.folderList = this.allFolderList;
+      setFolderList(this.folderList); //权限过滤
     },
-
-    /* 保存编辑 */
-    save() {
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) {
-          return false;
+    methods: {
+      handleClick() {
+        this.form.directoryId = '';
+        this.form.businessCodeId = '';
+        this.form.codeType = '';
+        if (this.activeName == 2) {
+          this.folderList = this.myFolderList;
+        } else {
+          this.folderList = this.allFolderList;
+        }
+      },
+      async getTreeCode() {
+        let nodeData = {};
+        await this.$nextTick(() => {
+          // console.log(this.$refs,'this.$refs')
+          nodeData =
+            this.$refs.cascaderRef && this.$refs.cascaderRef.getCheckedNodes();
+        });
+        this.nodeData = {
+          id: nodeData[0]?.data?.id,
+          parentId:
+            nodeData[0]?.data?.parentId != 0 ? nodeData[0]?.data?.parentId : ''
+        };
+      },
+      async initFileCode() {
+        await this.getTreeCode();
+        this.options = this.nodeData.id ? await listCode(this.nodeData) : [];
+        if (this.options.length > 0) {
+          this.form.businessCodeId = this.options[0].id;
+          this.form.codeType = this.options[0].parentId;
+        } else {
+          this.form.businessCodeId = '';
         }
+      },
+      async open() {
+        this.showEditFlag = true;
+        this.$nextTick(async () => {
+          this.list = await selectTreeList();
+          await this.initFileCode();
+          this.setTree(this.list);
+        });
+      },
 
-        const data = {
-          ...this.form,
+      setTree(data) {
+        data.forEach((item) => {
+          item.sonDirectoryList = item.sonDirectoryList.filter(
+            (item) => item.type == 1
+          );
+          if (item.sonDirectoryList.length > 0) {
+            this.setTree(item.sonDirectoryList);
+          }
+        });
+      },
+      async typeChange(val) {
+        let obj = {
+          pageNum: 1,
+          size: 100,
+          parentId: val
         };
+        if (this.activeName == 1) {
+          obj['objId'] = this.nodeData?.id;
+          obj['objParentId'] = this.nodeData?.parentId;
+        }
+        let data = await listParentId(obj);
+        this.options = data.list.filter((item) => item.type == 2);
+        this.form.businessCodeId = '';
+      },
+
+      fileChange(file) {
+        this.form.name = file.name.replace(/\.[^/.]+$/, '');
+      },
 
-        this.loading = true;
-        fileSaveAPI(data)
-          .then( (msg) => {
-            this.loading = false;
+      /* 保存编辑 */
+      save() {
+        this.$refs.form.validate(async (valid) => {
+          if (!valid) {
+            return false;
+          }
 
-            this.cancel();
-            this.$emit('done',msg);
-          })
-          .catch((e) => {
-            this.loading = false;
-          });
-      });
-    },
+          let data = {
+            ...this.form
+          };
+          if (this.activeName == 2) {
+            data.fileType = 1;
+          }
+          this.loading = true;
+          fileSaveAPI(data)
+            .then((msg) => {
+              this.loading = false;
+
+              this.cancel();
+              this.$emit('done', msg);
+            })
+            .catch((e) => {
+              this.loading = false;
+            });
+        });
+      },
 
-    cancel() {
-      this.form = { ...this.defaultForm };
-      this.$refs.form.clearValidate();
-      this.showEditFlag = false;
+      cancel() {
+        this.form = { ...this.defaultForm, directoryId: this.form.directoryId };
+        this.$refs.form.clearValidate();
+        this.showEditFlag = false;
+      }
     }
-  }
-};
+  };
 </script>
 <style scoped lang="scss">
-.aaa {
-  width: 100%;
-
-  ::v-deep .upload-demo {
+  .aaa {
     width: 100%;
 
-    .el-upload--text {
+    ::v-deep .upload-demo {
       width: 100%;
 
-      button {
+      .el-upload--text {
         width: 100%;
-        background: #ffffff;
-        border: 1px solid #dbdbdb;
-        border-radius: 5px;
+
+        button {
+          width: 100%;
+          background: #ffffff;
+          border: 1px solid #dbdbdb;
+          border-radius: 5px;
+        }
       }
-    }
 
-    .el-upload-list {
-      transform: translate(10px, -39px);
-      position: absolute;
+      .el-upload-list {
+        transform: translate(10px, -39px);
+        position: absolute;
+      }
     }
   }
-}
 </style>

+ 0 - 1
src/components/addDoc/file-table-listTemplate.vue

@@ -6,7 +6,6 @@
       :columns="columns"
       :datasource="datasource"
       tool-class="ele-toolbar-form"
-      :needPage="false"
       row-key="id"
       :selection.sync="selection"
       :toolbar="false"

+ 1 - 0
src/components/addDoc/fileUpload.vue

@@ -180,6 +180,7 @@
           }).then(() => {
             return true;
           });
+          return true;
         } else {
           return true;
         }

+ 3 - 13
src/components/addDoc/getCode.vue

@@ -8,6 +8,8 @@
     append-to-body
     @close="cancel"
     title="申请编码"
+    :maxable="true"
+    :resizable="true"
   >
     <el-form ref="form" :model="form" :rules="rules" label-width="82px">
       <el-row :gutter="15">
@@ -61,7 +63,6 @@
 
 <script>
   import { selectTreeList, listParentId, getCode } from './api';
-  import headerTitle from '@/components/header-title/index.vue';
 
   export default {
     data() {
@@ -90,7 +91,6 @@
       }
     },
     components: {
-      headerTitle
     },
     created() {},
     methods: {
@@ -119,17 +119,7 @@
         this.form.type1 = '';
       },
       async type1Change(val) {
-        this.form.code = await getCode(val);
-        // let data = await pageSegment({
-        //   pageNum: 1,
-        //   size: 100,
-        //   businessCodeCategoryId: val
-        // });
-        // data.list.map((item) =>{
-        //   console.log(item,'dsds')
-        // });
-        // console.log(code, 'ds');
-        // this.options = data.list.map((item) => item.type == 2);
+        // this.form.code = await getCode(val);
       },
       /* 保存编辑 */
       save() {

+ 5 - 1
src/components/addDoc/index.vue

@@ -6,6 +6,7 @@
         v-if="type != 'view'"
         type="primary"
         @click="handleUpload"
+        :size="size"
       >
         上传</el-button
       >
@@ -43,6 +44,10 @@
         default: () => {
           return [];
         }
+      },
+      size: {
+        type: String,
+        default: 'mini'
       }
     },
     data() {
@@ -53,7 +58,6 @@
     watch: {
       value: {
         handler(newVal) {
-          console.log(newVal, '=======');
           this.selectVal = newVal || [];
         },
         immediate: true

+ 4 - 0
src/components/addDoc/main.vue

@@ -6,6 +6,8 @@
     custom-class="ele-dialog-form"
     append-to-body
     ref="Emodal"
+    :maxable="true"
+    :resizable="true"
   >
     <!-- 数据表格 -->
     <ele-pro-table
@@ -60,6 +62,8 @@
       :close-on-click-modal="false"
       custom-class="ele-dialog-form"
       append-to-body
+      :maxable="true"
+      :resizable="true"
     >
       <doc_template
         :disabledTableList="tableList"

+ 2 - 2
src/components/addDoc/util.js

@@ -1,6 +1,6 @@
 import store from '@/store';
-const userId = store.state.user.info.userId;
-const userName = store.state.user.info.name;
+const userId = store.state.user?.info?.userId;
+const userName = store.state.user?.info?.name;
 export function isPower(data = {}, power, selection = []) {
   if (power == 'add' && data.userAuthority.length == 0) {
     //文件夹默认开放新增权限

+ 4 - 0
src/components/common/seekPage.vue

@@ -15,6 +15,7 @@
                 v-model="defaultWhere[item.value]"
                 :placeholder="item.placeholder || '请输入内容'"
                 :style="{ width: item.width ? item.width + 'px' : '230px' }"
+                @keydown.enter.native.stop="search"
               />
             </div>
             <div v-if="item.type == 'select'">
@@ -73,6 +74,7 @@
           :hide-on-click="false"
           v-model="dropdownVisible"
           v-if="seekList.length > maxLength"
+          @keydown.enter.native.stop="search"
         >
           <div>
             <span class="el-dropdown-link">
@@ -102,6 +104,8 @@
                           :style="{
                             width: item.width ? item.width + 'px' : '230px'
                           }"
+                          @keydown.enter.native="() => search()"
+                          @keyup.enter.native="() => search()"
                         />
                       </div>
                       <div v-if="item.type == 'select'">

+ 3 - 1
src/enum/dict.js

@@ -41,7 +41,9 @@ export default {
   规则周期: 'rule_cycle',
   流程实例的结果: 'bpm_process_instance_result',
   取样类型: 'quality_method_code',
-  放行类型: 'checklist_type'
+  放行类型: 'checklist_type',
+  文档类型: 'doc_type'
+
 };
 export const numberList = ['date_method'];
 

+ 196 - 195
src/views/entrust/components/create.vue

@@ -2,7 +2,7 @@
   <ele-modal
     :visible.sync="visible"
     :title="title"
-    width="45vw"
+    width="75vw"
     append-to-body
     @close="cancel"
     :maxable="true"
@@ -32,7 +32,7 @@
       <headerTitle title="基本信息" style="margin-top: 15px"></headerTitle>
 
       <el-row :gutter="15">
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 12 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
           <el-form-item label="类型:" prop="type">
             <DictSelection
               dictName="请托类型"
@@ -41,7 +41,7 @@
             ></DictSelection>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="紧急程度:" prop="priority">
             <el-select
               style="width: 100%"
@@ -60,17 +60,17 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 24 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 24 } : { span: 6 }">
           <el-form-item label="编码:" prop="code">
             <el-input v-model="form.code" disabled />
           </el-form-item>
         </el-col>
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 24 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 24 } : { span: 6 }">
           <el-form-item label="名称:" prop="name">
             <el-input v-model="form.name" :disabled="type == 'detail'" />
           </el-form-item>
         </el-col>
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 24 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 24 } : { span: 6 }">
           <el-form-item label="生产工单:" prop="workOrderCode">
             <el-input
               v-model="form.workOrderCode"
@@ -83,7 +83,7 @@
             </el-input>
           </el-form-item>
         </el-col>
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 24 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 24 } : { span: 6 }">
           <el-form-item label="工序:" prop="procedureList">
             <el-select
               style="width: 100%"
@@ -103,7 +103,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="请托部门:" prop="pleaseEntrustDeptName">
             <!-- <deptSelect
               :disabled="type == 'detail'"
@@ -114,7 +114,7 @@
             </el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="请托人:" prop="pleaseEntrustUserId">
             <el-input v-model="form.pleaseEntrustUserName" clearable disabled />
 
@@ -135,13 +135,13 @@
             </el-select> -->
           </el-form-item>
         </el-col>
-        <el-col v-bind="styleResponsive ? { lg: 8, md: 8 } : { span: 8 }">
+        <el-col v-bind="styleResponsive ? { lg: 6, md: 8 } : { span: 6 }">
           <el-form-item label="所属工厂:" prop="factoriesName">
             <el-input v-model="form.factoriesName" style="width: 100%" disabled>
             </el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="受托工厂:" prop="beEntrustedFactoriesId">
             <el-select
               style="width: 100%"
@@ -161,7 +161,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="受托部门:" prop="beEntrustedDeptId">
             <deptSelect
               :disabled="type == 'detail'"
@@ -170,7 +170,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="8">
+        <el-col :span="6">
           <el-form-item label="完成时间:" prop="finishTime">
             <el-date-picker
               style="width: 100%"
@@ -181,7 +181,7 @@
             ></el-date-picker>
           </el-form-item>
         </el-col>
-      
+
         <el-col v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
           <el-form-item label="需求描述:">
             <el-input
@@ -293,204 +293,205 @@
 </template>
 
 <script>
-import { save } from '@/api/entrust/index';
-import produceOrder from './produceOrder';
-import detail from '@/views/bpm/processInstance/detail.vue';
-import deptSelect from '@/components/CommomSelect/dept-select.vue';
-import { getProduceTaskList } from '@/api/aps';
-import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { save } from '@/api/entrust/index';
+  import produceOrder from './produceOrder';
+  import detail from '@/views/bpm/processInstance/detail.vue';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import { getProduceTaskList } from '@/api/aps';
+  import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
 
-const defaultForm = function () {
-  return {
-    createTime: '', //创建时间
-    code: '', //编码
-    name: '', //名称
-    workOrderCode: '', //工单编码
-    pleaseEntrustUserId: '', //请托人id
-    pleaseEntrustUserName: '', //请托人名称
-    pleaseEntrustDeptId: '', //请托人部门id
-    pleaseEntrustDeptName: '', //请托人部门名称
-    beEntrustedDeptId: '', //受托人部门id
-    beEntrustedDeptName: '', //受托人部门名称
-    produceRoutingId: null,
-    produceRoutingName: '',
-    procedureList: [],
-    pleaseEntrustObjList: [], //具体请托对象
-    type: '', //类型
-    status: '',
-    describes: '', //描述
-    finishTime: '', //完成时间
-    processInstanceId: '', //流程实例id
-    factoriesName: '',
-    factoriesId: '',
-    priority: '',
-    beEntrustedFactoriesId: '', //受托工厂id
-    beEntrustedFactoriesName: '' //受托工厂名称
-  };
-};
-export default {
-  components: { produceOrder, detail, deptSelect },
-  data() {
+  const defaultForm = function () {
     return {
-      visible: false,
-      loading: false,
-      activeComp: 'main',
-      options: [
-        {
-          name: '一般',
-          value: 1
-        },
-        {
-          name: '紧急',
-          value: 2
-        }
-      ],
-      tabOptions: [
-        { key: 'main', name: '异常详情' },
-        { key: 'bpm', name: '流程详情' }
-      ],
-      form: { ...defaultForm() },
-      // 表单验证规则
-      rules: {
-        type: [{ required: true, message: '请选择', trigger: 'change' }],
-        name: [{ required: true, message: '请输入', trigger: 'change' }],
-
-        workOrderCode: [
-          { required: true, message: '请选择', trigger: 'change' }
+      createTime: '', //创建时间
+      code: '', //编码
+      name: '', //名称
+      workOrderCode: '', //工单编码
+      pleaseEntrustUserId: '', //请托人id
+      pleaseEntrustUserName: '', //请托人名称
+      pleaseEntrustDeptId: '', //请托人部门id
+      pleaseEntrustDeptName: '', //请托人部门名称
+      beEntrustedDeptId: '', //受托人部门id
+      beEntrustedDeptName: '', //受托人部门名称
+      produceRoutingId: null,
+      produceRoutingName: '',
+      procedureList: [],
+      pleaseEntrustObjList: [], //具体请托对象
+      type: '', //类型
+      status: '',
+      describes: '', //描述
+      finishTime: '', //完成时间
+      processInstanceId: '', //流程实例id
+      factoriesName: '',
+      factoriesId: '',
+      priority: '',
+      beEntrustedFactoriesId: '', //受托工厂id
+      beEntrustedFactoriesName: '' //受托工厂名称
+    };
+  };
+  export default {
+    components: { produceOrder, detail, deptSelect },
+    data() {
+      return {
+        visible: false,
+        loading: false,
+        activeComp: 'main',
+        options: [
+          {
+            name: '一般',
+            value: 1
+          },
+          {
+            name: '紧急',
+            value: 2
+          }
         ],
-        beEntrustedDeptId: [
-          { required: true, message: '请选择', trigger: 'change' }
+        tabOptions: [
+          { key: 'main', name: '异常详情' },
+          { key: 'bpm', name: '流程详情' }
         ],
-        finishTime: [{ required: true, message: '请选择', trigger: 'change' }]
-      },
-      type: '',
-      title: '创建',
-      produceTaskList: [],
-      factoryList: []
-    };
-  },
+        form: { ...defaultForm() },
+        // 表单验证规则
+        rules: {
+          type: [{ required: true, message: '请选择', trigger: 'change' }],
+          name: [{ required: true, message: '请输入', trigger: 'change' }],
 
-  computed: {
-    // 是否开启响应式布局
-    styleResponsive() {
-      return this.$store.state.theme.styleResponsive;
-    }
-  },
-  created() {
-    this.getFactoryList();
-  },
-  methods: {
-    open(type, row) {
-      this.visible = true;
+          workOrderCode: [
+            { required: true, message: '请选择', trigger: 'change' }
+          ],
+          beEntrustedDeptId: [
+            { required: true, message: '请选择', trigger: 'change' }
+          ],
+          finishTime: [{ required: true, message: '请选择', trigger: 'change' }]
+        },
+        type: '',
+        title: '创建',
+        produceTaskList: [],
+        factoryList: []
+      };
+    },
 
-      (this.activeComp = 'main'), (this.type = type);
-      if (type != 'add') {
-        this.form = JSON.parse(JSON.stringify(row));
-        this.getProduceTaskList();
-        this.form.procedureList = this.form.procedureList.map(
-          (item) => item.produceTaskId
-        );
-        this.form.type = this.form.type + '';
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
       }
-      this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情';
     },
-
-    addProduct() {
-      this.$refs.produceOrderRef.open();
+    created() {
+      this.getFactoryList();
     },
+    methods: {
+      open(type, row) {
+        this.visible = true;
 
-    beEntrustedDeptIdChange(val, row) {
-      this.form.beEntrustedDeptName = row.name;
-    },
-    factoryListChange(row) {
-      this.form.beEntrustedFactoriesName = row.name;
-    },
-    async getFactoryList() {
-      const { list } = await warehouseDefinition.getFactoryarea({
-        pageNum: 1,
-        size: 999,
-        type: 1
-      });
-      this.factoryList = list || [];
-    },
-    cancel() {
-      this.form = { ...defaultForm() };
-      this.produceTaskList=[]
-      this.visible = false;
-    },
-    choose(data) {
-      this.form.workOrderCode = data.code;
-      this.form.produceRoutingId = data.produceRoutingId;
-      this.form.produceRoutingName = data.produceRoutingName;
-      this.form.pleaseEntrustObjList = [data];
-      this.form.procedureList = [];
-      this.getProduceTaskList();
-    },
-    async getProduceTaskList() {
-      const res = await getProduceTaskList({
-        isDetail: true,
-        pageNum: 1,
-        routingId: this.form.produceRoutingId,
-        size: -1
-      });
-      console.log(res, 'res');
-      this.produceTaskList = res.list;
-    },
-    /* 保存编辑 */
-    save() {
-      this.$refs.form.validate((valid) => {
-        if (!valid) {
-          return false;
+        (this.activeComp = 'main'), (this.type = type);
+        if (type != 'add') {
+          this.form = JSON.parse(JSON.stringify(row));
+          this.getProduceTaskList();
+          this.form.procedureList = this.form.procedureList.map(
+            (item) => item.produceTaskId
+          );
+          this.form.type = this.form.type + '';
         }
+        this.title = type == 'add' ? '新增' : type == 'edit' ? '修改' : '详情';
+      },
+
+      addProduct() {
+        this.$refs.produceOrderRef.open();
+      },
 
-        // for (let key in this.form) {
-        //   if (key.includes('create')) {
-        //     this.form[key] = '';
-        //   }
-        // }
-        this.loading = true;
-        let data = JSON.parse(JSON.stringify(this.form));
-        data.procedureList = data.procedureList.map((item) => {
-          return {
-            produceTaskId: item,
-            produceTaskName: this.produceTaskList.find((val) => val.id == item)
-              .name
-          };
+      beEntrustedDeptIdChange(val, row) {
+        this.form.beEntrustedDeptName = row.name;
+      },
+      factoryListChange(row) {
+        this.form.beEntrustedFactoriesName = row.name;
+      },
+      async getFactoryList() {
+        const { list } = await warehouseDefinition.getFactoryarea({
+          pageNum: 1,
+          size: 999,
+          type: 1
+        });
+        this.factoryList = list || [];
+      },
+      cancel() {
+        this.form = { ...defaultForm() };
+        this.produceTaskList = [];
+        this.visible = false;
+      },
+      choose(data) {
+        this.form.workOrderCode = data.code;
+        this.form.produceRoutingId = data.produceRoutingId;
+        this.form.produceRoutingName = data.produceRoutingName;
+        this.form.pleaseEntrustObjList = [data];
+        this.form.procedureList = [];
+        this.getProduceTaskList();
+      },
+      async getProduceTaskList() {
+        const res = await getProduceTaskList({
+          isDetail: true,
+          pageNum: 1,
+          routingId: this.form.produceRoutingId,
+          size: -1
         });
-        // console.log(data);
-        // return;
-        save(data)
-          .then((res) => {
-            this.loading = false;
-            this.$message.success('成功');
-            this.cancel();
-            this.$emit('refresh');
-          })
-          .catch((e) => {
-            this.loading = false;
+        console.log(res, 'res');
+        this.produceTaskList = res.list;
+      },
+      /* 保存编辑 */
+      save() {
+        this.$refs.form.validate((valid) => {
+          if (!valid) {
+            return false;
+          }
+
+          // for (let key in this.form) {
+          //   if (key.includes('create')) {
+          //     this.form[key] = '';
+          //   }
+          // }
+          this.loading = true;
+          let data = JSON.parse(JSON.stringify(this.form));
+          data.procedureList = data.procedureList.map((item) => {
+            return {
+              produceTaskId: item,
+              produceTaskName: this.produceTaskList.find(
+                (val) => val.id == item
+              ).name
+            };
           });
-      });
+          // console.log(data);
+          // return;
+          save(data)
+            .then((res) => {
+              this.loading = false;
+              this.$message.success('成功');
+              this.cancel();
+              this.$emit('refresh');
+            })
+            .catch((e) => {
+              this.loading = false;
+            });
+        });
+      }
     }
-  }
-};
+  };
 </script>
 <style lang="scss" scoped>
-.basic-details-title {
-  margin: 10px 0;
-}
+  .basic-details-title {
+    margin: 10px 0;
+  }
 
-.add-product {
-  width: 100%;
-  display: flex;
-  align-items: center;
-  justify-content: flex-end;
-  font-size: 30px;
-  color: #1890ff;
-  margin: 10px 0;
-  cursor: pointer;
-}
+  .add-product {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    font-size: 30px;
+    color: #1890ff;
+    margin: 10px 0;
+    cursor: pointer;
+  }
 
-.create-form .el-form-item {
-  margin-bottom: 15px !important;
-}
+  .create-form .el-form-item {
+    margin-bottom: 15px !important;
+  }
 </style>

+ 29 - 28
src/views/produce/components/common.js

@@ -1,29 +1,30 @@
 export const typeName = {
-  1: "物料",
-  2: "在制品",
-  3: "零部件",
-  4: "生产设备",
-  5: "模具",
-  6: "备品备件",
-  7: "周转车",
-  8: "舟皿",
-  9: "产品",
-  10: "消耗材料",
-  11: "干燥区",
-  12: "质检",
-  13: "包装材料",
-  14: "生产辅助设备",
-  15: "仪表计量设备",
-  16: "办公设备",
-  17: "客户",
-  18: "房屋、建筑物",
-  19: "供应商",
-  20: "工装夹具",
-  21: "半成品",
-  22: "会计科目",
-  23: "费用类型",
-  24: "周转盘",
-  25: "文档",
-  26: "废品",
-  99: "其他"
-}
+  1: '物料',
+  2: '在制品',
+  3: '零部件',
+  4: '生产设备',
+  5: '模具',
+  6: '备品备件',
+  7: '周转车',
+  8: '舟皿',
+  9: '产品',
+  10: '消耗材料',
+  11: '干燥区',
+  12: '质检',
+  13: '包装材料',
+  14: '生产辅助设备',
+  15: '仪表计量设备',
+  16: '办公设备',
+  17: '客户',
+  18: '房屋、建筑物',
+  19: '供应商',
+  20: '工装夹具',
+  22: '工装夹具',
+  23: '半成品',
+  24: '会计科目',
+  25: '费用类型',
+  26: '周转盘',
+  27: '文档',
+  28: '废品',
+  99: '其他'
+};

+ 68 - 11
src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue

@@ -148,6 +148,10 @@
                       }}{{ row.extInfo.weightUnit }}</span
                     >
                   </template>
+
+                  <template v-slot:feedQuantity="{ row, $index }">
+                    <span>{{ row.feedQuantity }}{{ row.unit }}</span>
+                  </template>
                 </ele-pro-table>
 
                 <!-- <template v-slot:newWeight="{ row, $index }">
@@ -316,7 +320,7 @@
               </template>
 
               <template v-slot:feedQuantity="{ row, $index }">
-                <span>{{ row.feedQuantity }}</span>
+                <span>{{ row.feedQuantity }}{{ row.unit }}</span>
               </template>
 
               <template v-slot:reportWeight="{ row, $index }">
@@ -392,6 +396,7 @@
         splitList: [],
         localdataList: [],
         newDispositionList: [],
+        DispositionListes: [],
         withinQuantity: '', //内包装数量
         withinUnit: '', //内包装单位
         outsideQuantity: '', //外包装数量
@@ -460,12 +465,24 @@
             console.log(newVal.product, 'newVal.product');
             this.newCategoryId = newVal.product[0].categoryId;
             this.formedNumLast = newVal.product.reduce((acc, pro) => {
-              return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
+              return pro.feedQuantity &&
+                (!pro.extInfo.isQualified ||
+                  pro.extInfo.isQualified == 1 ||
+                  pro.extInfo.isQualified == 3) &&
+                !pro.extInfo.isLoss
+                ? this.add(acc, Number(pro.feedQuantity))
+                : acc;
             }, 0);
           } else if (newVal.semiProductList && newVal.semiProductList.length) {
             this.newCategoryId = newVal.semiProductList[0].categoryId;
             this.formedNumLast = newVal.semiProductList.reduce((acc, pro) => {
-              return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
+              return pro.feedQuantity &&
+                (!pro.extInfo.isQualified ||
+                  pro.extInfo.isQualified == 1 ||
+                  pro.extInfo.isQualified == 3) &&
+                !pro.extInfo.isLoss
+                ? this.add(acc, Number(pro.feedQuantity))
+                : acc;
             }, 0);
           } else {
             this.formedNumLast = 0;
@@ -473,6 +490,10 @@
           if (newVal.isUnpack == '1') {
             this.packageDispositionFn();
           }
+
+          if (this.isNewUnpack == 1) {
+            this.checkUnpackProduction();
+          }
         },
         deep: true,
         immediate: true
@@ -931,6 +952,38 @@
         });
       },
 
+      toInteger(num) {
+        const len = this.getDecimalLength(num);
+        return {
+          int: Math.round(num * Math.pow(10, len)),
+          factor: Math.pow(10, len)
+        };
+      },
+
+      add(a, b) {
+        const { int: aInt, factor: aFactor } = this.toInteger(a);
+        const { int: bInt, factor: bFactor } = this.toInteger(b);
+        const maxFactor = Math.max(aFactor, bFactor);
+        return (
+          (aInt * (maxFactor / aFactor) + bInt * (maxFactor / bFactor)) /
+          maxFactor
+        );
+      },
+
+      sub(a, b) {
+        const { int: aInt, factor: aFactor } = this.toInteger(a);
+        const { int: bInt, factor: bFactor } = this.toInteger(b);
+        const maxFactor = Math.max(aFactor, bFactor);
+        return (
+          (aInt * (maxFactor / aFactor) - bInt * (maxFactor / bFactor)) /
+          maxFactor
+        );
+      },
+
+      getDecimalLength(num) {
+        return (num.toString().split('.')[1] || '').length;
+      },
+
       checkUnpack() {
         this.$confirm('此操作将进行拆包, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -943,12 +996,12 @@
           .catch(() => {});
       },
 
-      changeUserTypeOne() {
-        let list = this.localdataList.find((item) => item.value === e);
+      changeUserTypeOne(e) {
+        let list = this.localdataList.find((item) => item.value == e);
         // this.text = e.text;
         // this.value = e.value;
         this.selectList = list.arr;
-        this.initFn1(list.arr);
+        this.initData(list.arr);
       },
 
       checkUnpackProduction() {
@@ -983,7 +1036,8 @@
             v.splitList = [];
           });
 
-          this.newDispositionList = res;
+          this.DispositionListes = res;
+          // this.newDispositionList = res;
 
           this.selectList = res;
           this.initData(this.localdataList[0].arr);
@@ -1058,6 +1112,7 @@
       },
 
       async listFn1(res) {
+        console.log(res, 'resres');
         let {
           minimumPackage,
           withinQuantity,
@@ -1077,14 +1132,16 @@
         this.withinPackage = withinPackage; // 内包装
         this.outsidePackage = outsidePackage; //外包装
 
+        console.log(arr);
+
+        this.newDispositionList = this.DispositionListes.filter(
+          (it) => it.code == this.Usertype && it.sort != '0'
+        );
+
         this.newDispositionList.map((v, i) => {
           v.splitList = arr[i].list;
           v.titel = textList[i];
-          // if (i == 0) {
-          //   v.formedNumLast = this.formedNumLast;
-          // } else {
           v.formedNumLast = arr[i].num;
-          // }
         });
         this.$nextTick(() => {
           this.newDispositionList.forEach((item, index) => {

+ 1 - 1
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -1587,7 +1587,7 @@
       },
 
       async getLossParam() {
-        if (this.lossForm.quantity && this.lossForm.batchNo) {
+        if (this.lossForm.quantity) {
           if (
             Number(this.lossData.feedQuantity) < Number(this.lossForm.quantity)
           ) {

+ 6 - 2
src/views/produce/components/jobBooking/components/detailPackagingGrouping.vue

@@ -129,7 +129,11 @@
                 class="time-form"
                 max-height="400"
                 row-key="index"
-              ></ele-pro-table>
+              >
+                <template v-slot:feedQuantity="{ row, $index }">
+                  <span>{{ row.feedQuantity }}{{ row.unit }}</span>
+                </template>
+              </ele-pro-table>
               <!-- <el-table :data="item.splitList" style="width: 100%">
               <el-table-column prop="computeSize" label="序号" width="65">
                 <template v-slot="{ row, $index }">
@@ -292,7 +296,7 @@
             row-key="index"
           >
             <template v-slot:feedQuantity="{ row, $index }">
-              <span>{{ row.feedQuantity }}{{ row.packingUnit }}</span>
+              <span>{{ row.feedQuantity }}{{ row.unit }}</span>
             </template>
 
             <template v-slot:packageQuantity="{ row, $index }">

+ 4 - 10
src/views/produce/components/jobBooking/components/jobBom.vue

@@ -8,8 +8,8 @@
 
     <div class="material">
       <div class="content_table">
-        <div class="item rx-sc">
-          <!-- <div
+        <!-- <div class="item rx-sc"> -->
+        <!-- <div
             class="rx ww33"
             v-if="
               Object.prototype.hasOwnProperty.call(item, 'product') &&
@@ -21,7 +21,7 @@
               {{ item.product[0] && item.product[0].feedQuantity }}
             </div>
           </div> -->
-
+        <!--
           <div class="rx ww33">
             <div class="lable lable100 rx-cc">要求生产数量</div>
             <div class="content">{{ item.formingNum }} {{ item.unit }}</div>
@@ -33,7 +33,7 @@
               >{{ item.formingWeight }}{{ item.weightUnit }}</div
             >
           </div>
-        </div>
+        </div> -->
 
         <!-- v-if="(clientEnvironmentId == 3 && item.singleReport == 0) ||  taskObj.type == 4 || clientEnvironmentId == 2" -->
         <div class="item rx-sc">
@@ -304,21 +304,15 @@
                   item.extInfo.isQualified == 3) &&
                 !item.extInfo.isLoss
               ) {
-                // formedNum = formedNum + Number(item.feedQuantity);
                 formedNum = this.add(formedNum, Number(item.feedQuantity));
               } else if (!item.extInfo.isLoss) {
                 if (item.extInfo.notType == 5 || item.extInfo.notType == 8) {
-                  // formedNum = formedNum + Number(item.feedQuantity);
-
                   formedNum = this.add(formedNum, Number(item.feedQuantity));
                 } else {
-                  // notFormedNum = notFormedNum + Number(item.feedQuantity);
-                  // if (!item.extInfo.isLoss) {
                   notFormedNum = this.add(
                     notFormedNum,
                     Number(item.feedQuantity)
                   );
-                  // }
                 }
               } else if (item.extInfo.isLoss == 1) {
                 lossNum = this.add(lossNum, Number(item.feedQuantity));

+ 4 - 6
src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue

@@ -271,7 +271,7 @@
                 placeholder="请选择"
                 style="width: 160px"
                 :disabled="isDetails"
-                @change="changeQuality(row.extInfo.appearance, row)"
+                @change="changeQuality(row.extInfo.appearance, row, $index)"
               >
                 <el-option
                   v-for="item in qualityList"
@@ -593,13 +593,14 @@
         this.list.splice(idx, 1);
       },
 
-      changeQuality(type, item) {
-        // console.log(type, item, '质检结果');
+      changeQuality(type, item, index) {
+        this.$set(this.item.sampleQuality[index].extInfo, 'isQualified', type);
         if (type == 1) {
           item.extInfo.notType = '';
           item.extInfo.notReason = '';
         }
         this.qualityChange();
+        this.$forceUpdate();
       },
 
       qualityChange() {
@@ -633,9 +634,6 @@
             }
           });
 
-          console.log(formedWeightCount, '合格品重量');
-          console.log(notFormedWeightCount, '不合格品重量');
-
           this.$set(this.item.workReportInfo, 'formedNum', formedNum);
           this.$set(this.item.workReportInfo, 'notFormedNum', notFormedNum);
           this.$set(

+ 2 - 2
src/views/produce/components/outsourcing/details.vue

@@ -56,8 +56,8 @@
         <div v-if="row.type == 1">采购委外</div>
         <div v-if="row.type == 2">直接发货委外</div>
         <div v-if="row.type == 3">无采购委外</div>
-        <div v-if="row.type == 4">有料委外</div>
-        <div v-if="row.type == 5">无料委外</div>
+        <div v-if="row.type == 4">带料委外</div>
+        <div v-if="row.type == 5">不带料委外</div>
       </template>
 
       <template v-slot:status="{ row }">

+ 60 - 28
src/views/produce/components/outsourcing/index.vue

@@ -7,7 +7,7 @@
       </el-tabs> -->
       <div class="c_title">委外记录</div>
     </div>
-    <div style="overflow: auto">
+    <div style="overflow: auto" v-if="activeName == '1'">
       <el-form
         label-width="100px"
         :rules="rules"
@@ -190,7 +190,13 @@
         </el-form-item>
 
         <el-form-item label="请托类型:" prop="type">
-          <el-select
+          <DictSelection
+            dictName="请托类型"
+            v-model="attributeData.type"
+            style="width: 260px"
+          ></DictSelection>
+
+          <!-- <el-select
             v-model="attributeData.type"
             placeholder="请选择"
             style="width: 260px"
@@ -202,7 +208,7 @@
               :value="item.id"
             >
             </el-option>
-          </el-select>
+          </el-select> -->
         </el-form-item>
         <el-form-item label="请托数量:" prop="formedNumLast">
           <el-input
@@ -365,7 +371,8 @@
           supplierName: '',
           taskIdes: [],
           factoriesId: '',
-          factoriesName: ''
+          factoriesName: '',
+          taskDataList: []
         },
         isInWarehouse: true,
         produceList: [],
@@ -476,13 +483,13 @@
     mounted() {
       this.getContactList();
       this.getFactoryList();
-      // if (this.activeName == '1') {
-      //   // this.attributeData.name = this.outsourceFormVal.name + '委托';
-      //   this.$set(this.outsourceFormVal, 'name', this.taskName + '委托');
-      // } else if (this.activeName == '2') {
-      //   // this.attributeData.name = this.outsourceFormVal.name + '请托';
-      //   this.$set(this.outsourceFormVal, 'name', this.taskName + '请托');
-      // }
+      if (this.activeName == '1') {
+        this.attributeData.name = this.outsourceFormVal.name + '委托';
+        // this.$set(this.outsourceFormVal, 'name', this.taskName + '委托');
+      } else if (this.activeName == '2') {
+        this.attributeData.name = this.outsourceFormVal.name + '请托';
+        // this.$set(this.outsourceFormVal, 'name', this.taskName + '请托');
+      }
     },
 
     methods: {
@@ -613,6 +620,7 @@
         this.attributeData.supplierId = '';
         this.attributeData.taskIdes = [];
         this.attributeData.factoriesId = '';
+        this.attributeData.taskDataList = [];
       },
 
       //跳转
@@ -620,25 +628,49 @@
       confirm() {
         this.$refs.form.validate((valid) => {
           if (valid) {
-            // if (this.activeName == '1') {
-            if (this.attributeData.supplierId) {
-              const obj = this.gysList.find(
-                (item) => item.id === this.attributeData.supplierId
+            if (this.activeName == '1') {
+              if (this.attributeData.supplierId) {
+                const obj = this.gysList.find(
+                  (item) => item.id === this.attributeData.supplierId
+                );
+                this.attributeData.supplierName = obj ? obj.name : '';
+              }
+
+              this.attributeData.taskIdes.forEach((it) => {
+                this.newStepsList.filter((i) => {
+                  if (i.taskId == it) {
+                    this.attributeData.taskDataList.push(i);
+                  }
+                });
+              });
+              this.attributeData.taskIds =
+                this.attributeData.taskIdes.join(',');
+              console.log(
+                this.attributeData.taskDataList,
+                'this.attributeData.taskDataList1'
+              );
+              this.$emit('changePlugIn', this.attributeData, this.activeName);
+            } else if (this.activeName == '2') {
+              const obj = this.factoryList.find(
+                (item) => item.id === this.attributeData.factoriesId
+              );
+              this.attributeData.factoriesName = obj ? obj.name : '';
+              this.attributeData.taskIdes.forEach((it) => {
+                this.newStepsList.filter((i) => {
+                  if (i.taskId == it) {
+                    this.attributeData.taskDataList.push(i);
+                  }
+                });
+              });
+              this.attributeData.taskIds =
+                this.attributeData.taskIdes.join(',');
+              console.log(
+                this.attributeData.taskDataList,
+                'this.attributeData.taskDataList2'
               );
-              this.attributeData.supplierName = obj ? obj.name : '';
+              console.log(this.attributeData);
+              this.$emit('changePlugIn', this.attributeData, this.activeName);
             }
-            this.attributeData.taskIds = this.attributeData.taskIdes.join(',');
-            this.$emit('changePlugIn', this.attributeData, this.activeName);
-            // } else if (this.activeName == '2') {
-            //   const obj = this.factoryList.find(
-            //     (item) => item.id === this.attributeData.factoriesId
-            //   );
-            //   this.attributeData.factoriesName = obj ? obj.name : '';
-            //   this.attributeData.taskIds =
-            //     this.attributeData.taskIdes.join(',');
-            //   console.log(this.attributeData);
-            //   this.$emit('changePlugIn', this.attributeData, this.activeName);
-            // }
           } else {
             console.log('error submit!!');
             return false;

+ 34 - 6
src/views/produce/components/outsourcing/outsourceList.vue

@@ -364,14 +364,14 @@
       <el-tab-pane label="产出清单" name="2">
         <div class="materialList">
           <div class="u-reset">
-            <el-button
+            <!-- <el-button
               type="primary"
               size="small"
               class="u-reset-button"
               @click="openPicking(3, 'output')"
             >
               添加
-            </el-button>
+            </el-button> -->
           </div>
           <div v-for="(item, index) in standardOutputList" :key="index">
             <label class="listBox rx-bs">
@@ -394,7 +394,7 @@
                     >{{ item[itm.prop] }}
                   </div>
 
-                  <div class="items content_num">
+                  <div class="items">
                     <span>数量</span>
                     <input
                       style="width: 30% !important"
@@ -402,6 +402,22 @@
                     />
                   </div>
 
+                  <div
+                    class="items"
+                    v-if="item.isSelection && item.isSelection == '1'"
+                  >
+                    <span>产出工序</span>
+                    <el-select v-model="item.taskId" placeholder="请选择">
+                      <el-option
+                        v-for="item in outObj.taskDataList"
+                        :key="item.taskId"
+                        :label="item.taskTypeName"
+                        :value="item.taskId"
+                      >
+                      </el-option>
+                    </el-select>
+                  </div>
+
                   <div>
                     <el-button
                       type="text"
@@ -513,7 +529,8 @@
 
         warehouseList: [],
         pickOutInListSelect: [],
-        selectionIds: []
+        selectionIds: [],
+        newStepsList: []
       };
     },
 
@@ -574,7 +591,18 @@
           }
         } else if (e == 3) {
           if (item.length) {
-            this.standardOutputList = item;
+            item.map((it) => {
+              it.isSelection = '1';
+              it.categoryCode = it.code;
+              it.feedQuantity = 1;
+              it.categoryId = it.id;
+              it.newWeight = it.weight;
+              it.rootCategoryLevelId = it.categoryLevelPathIdParent;
+              it.taskId = '';
+              it.taskName = '';
+              this.standardOutputList.push(this.deepCopy(it));
+            });
+            // this.standardOutputList = item;
           }
         }
       },
@@ -950,7 +978,7 @@
 
   .items {
     font-size: 12px;
-    width: 25%;
+    width: 23%;
     display: flex;
     align-items: center;
     white-space: nowrap;

+ 981 - 0
src/views/produce/components/outsourcing/pleaseEntrust.vue

@@ -0,0 +1,981 @@
+<template>
+  <!-- 委外下一步 -->
+  <div class="card">
+    <div class="c_header_title">
+      <div class="c_title">请托记录</div>
+    </div>
+    <div class="card_box">
+      <el-descriptions>
+        <el-descriptions-item label="请托名称">{{
+          outObj.name
+        }}</el-descriptions-item>
+        <el-descriptions-item label="请托类型">
+          <template>
+            <DictSelection
+              dictName="请托类型"
+              v-model="attributeData.type"
+            ></DictSelection>
+          </template>
+        </el-descriptions-item>
+        <!-- <el-descriptions-item label="直接入库">{{ outObj.isInWarehouse == 1 ? '是' : '否' }}</el-descriptions-item> -->
+        <el-descriptions-item label="直接入库">{{ '是' }}</el-descriptions-item>
+      </el-descriptions>
+    </div>
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="物品清单" name="0">
+        <div class="materialList">
+          <div class="u-reset">
+            <el-button
+              type="primary"
+              size="small"
+              class="u-reset-button"
+              @click="openPicking(2, 'goods')"
+              v-if="clientEnvironmentId == 3"
+            >
+              添加
+            </el-button>
+          </div>
+          <!--  <div class="u-reset" style="display: flex;" v-if="clientEnvironmentId != 2">
+						<el-checkbox color="#fff" v-model="checkedAll" :checked="seletedAll" @change="_seletedAll">全选
+						</el-checkbox>
+						<div class="gxList">勾选:<span style="color: #157A2C">{{ checkListLen || 0 }}个</span></div>
+					</div>
+						<div v-for="(item, index) in pickOutInList" :key="index">
+							<div class="listBox rx-bs">
+
+								<div class="listBox-sel">
+									<el-checkbox  v-model="item.checked" color="#fff"
+										@change="e => selectVal(e, item, index)"
+										v-if='(item.rootCategoryLevelId != 11 || (item.rootCategoryLevelId == 11 && item.status != 1)) && clientEnvironmentId != 2'
+										 >
+										 </el-checkbox>
+
+								</div>
+
+								<div class="listBox-con">
+									<div class="listBox-top rx-bc">
+										<div> {{ item.name }}</div>
+										<div class="code">
+											{{ item.rootCategoryLevelId == 4 ? item.codeNumber : item.code }}
+										</div>
+									</div>
+
+									<div class="listBox-bottom rx">
+										<div v-for="(itm, index) in tableH(item.rootCategoryLevelId)" :key="index"
+											class="items" v-if="!itm.formatter">
+											<span>{{ itm.label }}</span>{{ item[itm.prop] }}
+										</div>
+
+
+
+
+										<div class="items"
+											v-if='(item.rootCategoryLevelId == 1 && item.isConsumable == 1) && item.rootCategoryLevelId != 11 && item.rootCategoryLevelId != 4'>
+											<span>可用库存:</span>{{ item.availableCountBase }} {{ item.unit }}
+										</div>
+
+
+										<div class="items"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0)'>
+											<span>刻码:</span>{{ item.extInfo.engrave }}
+										</div>
+
+
+										<div class="items"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0)'>
+											<span>物料代号:</span>{{ item.extInfo.materielCode }}
+										</div>
+
+
+										<div class="items"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0)'>
+											<span>客户代号:</span>{{ item.extInfo.clientCode }}
+										</div>
+
+
+										<div class="items" style="width: 15%;"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 0)'>
+											<span>重量:</span>{{ item.extInfo.newWeight }} {{ item.extInfo.weightUnit }}
+										</div>
+
+
+										<div class="items" style="width: 15%;"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1)'>
+											<span>数量:</span>{{ item.feedQuantity }}
+										</div>
+
+										<div class="items" style="width: 15%;"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1)'>
+											<span>重量:</span>{{ item.weight || 0 }} {{ item.weightUnit }}
+										</div>
+
+										<div class="items"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1)'>
+											<span>规格:</span> {{ item.specification }}
+										</div>
+
+										<div class="items"
+											v-if='([1, 2, 9, 23].includes(Number(item.rootCategoryLevelId)) && item.isConsumable == 1)'>
+											<span>型号:</span> {{ item.modelType }}
+										</div>
+
+									</div>
+
+								</div>
+							</div>
+						</div> -->
+
+          <el-table
+            ref="pickOutRef"
+            class="table_content"
+            :max-height="600"
+            :data="pickOutInList"
+            tooltip-effect="dark"
+            style="width: 100%; margin-top: 10px"
+            stripe
+            border
+            @selection-change="selectionPickOut"
+          >
+            <el-table-column align="center" type="selection" width="55">
+            </el-table-column>
+            <el-table-column label="序号" type="index" width="55">
+              <template slot-scope="{ row, $index }">
+                {{ $index + 1 }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="编码"
+              type="code"
+              minWidth="110"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.categoryCode }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="名称"
+              type="name"
+              minWidth="110"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.name }}
+                <!-- ({{
+							row.rootCategoryLevelId == 2
+							? '在制品'
+							: row.rootCategoryLevelId == 23
+							? '半成品'
+							: row.rootCategoryLevelId == 9
+							? '产品'
+							: item.rootCategoryLevelId == 28
+							? '废品'
+							: ''
+						}}) -->
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="型号"
+              type="modelType"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.modelType }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="规格"
+              type="specification"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.specification }}
+              </template>
+            </el-table-column>
+
+            <el-table-column label="牌号" type="brandNum" show-overflow-tooltip>
+              <template slot-scope="{ row, $index }">
+                {{ row.brandNum }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="数量"
+              type="feedQuantity"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                <el-input
+                  v-model="row.feedQuantity"
+                  v-if="row.isSelection == '1'"
+                  @input="inputNum(row, $index)"
+                ></el-input>
+                <span v-else> {{ row.feedQuantity }}</span>
+              </template>
+              <!-- <template slot-scope="{ row, $index }" v-else>
+                {{ row.feedQuantity }}
+              </template> -->
+            </el-table-column>
+
+            <el-table-column
+              label="重量"
+              type="weightUnit"
+              width="120"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.newWeight || 0 }} {{ row.weightUnit }}
+              </template>
+            </el-table-column>
+            <el-table-column label="刻码" type="engrave" show-overflow-tooltip>
+              <template slot-scope="{ row, $index }">
+                {{ row.extInfo.engrave }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              label="物料代号"
+              type="materielCode"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.extInfo.materielCode }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              type="clientCode"
+              show-overflow-tooltip
+            >
+              <template slot-scope="{ row, $index }">
+                {{ row.extInfo.clientCode }}
+              </template>
+            </el-table-column>
+
+            <el-table-column label="操作" show-overflow-tooltip fixed="right">
+              <template slot-scope="{ row, $index }">
+                <el-button type="text" @click="deleteData(row, $index)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="带料清单" name="1">
+        <div class="materialList">
+          <div class="u-reset">
+            <el-button
+              type="primary"
+              size="small"
+              class="u-reset-button"
+              @click="openPicking(2, 'belting')"
+            >
+              添加
+            </el-button>
+          </div>
+
+          <div v-for="(item, index) in bomMaterialList" :key="index">
+            <label class="listBox rx-bs">
+              <div class="listBox-con">
+                <div class="listBox-bottom rx">
+                  <div class="items"> <span>序号</span>{{ index + 1 }} </div>
+                  <div class="items" :title="item.name">
+                    <span>名称</span>{{ item.name }}
+                  </div>
+
+                  <div class="items" :title="item.code">
+                    <span>编码</span>{{ item.code }}
+                  </div>
+
+                  <div
+                    v-for="(itm, index) in tableH(item.rootCategoryLevelId)"
+                    :key="index"
+                    class="items"
+                    v-if="!itm.formatter"
+                  >
+                    <span>{{ itm.label }}</span
+                    >{{ item[itm.prop] }}
+                  </div>
+
+                  <div
+                    class="items"
+                    v-if="item.isDemandQuantity && clientEnvironmentId != 2"
+                    style="width: 15%"
+                  >
+                    <span>数量</span
+                    >{{
+                      checkListLen == 0
+                        ? item.demandQuantity
+                        : item.count * (checkListLen || 1)
+                    }}
+                    {{ item.unit }}
+                  </div>
+                  <div
+                    class="items content_num"
+                    v-if="!item.isDemandQuantity && clientEnvironmentId != 2"
+                    style="width: 15%"
+                  >
+                    <span>数量</span>
+                    <input
+                      style="width: 90% !important"
+                      v-model="item.demandQuantity"
+                    />
+                    {{ item.measuringUnit }}
+                  </div>
+
+                  <div
+                    class="items"
+                    v-if="item.isDemandQuantity && clientEnvironmentId == 2"
+                    style="width: 15%"
+                  >
+                    <span>数量</span
+                    >{{ item.count * (outObj.formedNumLast || 1) }}
+                  </div>
+                  <div
+                    class="items content_num"
+                    v-if="!item.isDemandQuantity && clientEnvironmentId == 2"
+                    style="width: 15%"
+                  >
+                    <span>数量</span>
+                    <input
+                      style="width: 90% !important"
+                      v-model="item.demandQuantity"
+                    />
+                    {{ item.measuringUnit }}
+                  </div>
+
+                  <div v-if="clientEnvironmentId == 3">
+                    <el-button type="text" @click="convertList(item, index)"
+                      >转物品清单</el-button
+                    >
+
+                    <el-button
+                      type="text"
+                      style="color: red"
+                      @click="deleteBomMaterial(item, index)"
+                      >删除</el-button
+                    >
+                  </div>
+                </div>
+              </div>
+            </label>
+          </div>
+        </div>
+      </el-tab-pane>
+      <el-tab-pane label="产出清单" name="2">
+        <div class="materialList">
+          <div class="u-reset">
+            <el-button
+              type="primary"
+              size="small"
+              class="u-reset-button"
+              @click="openPicking(3, 'output')"
+            >
+              添加
+            </el-button>
+          </div>
+          <div v-for="(item, index) in standardOutputList" :key="index">
+            <label class="listBox rx-bs">
+              <div class="listBox-con">
+                <div class="listBox-bottom rx">
+                  <div class="items" style="width: 15%">
+                    <span>序号</span>{{ index + 1 }}
+                  </div>
+                  <div class="items"> <span>名称</span>{{ item.name }} </div>
+
+                  <div class="items"> <span>编码</span>{{ item.code }} </div>
+
+                  <div
+                    v-for="(itm, index) in tableH(item.rootCategoryLevelId)"
+                    :key="index"
+                    class="items"
+                    v-if="!itm.formatter"
+                  >
+                    <span>{{ itm.label }}</span
+                    >{{ item[itm.prop] }}
+                  </div>
+
+                  <div class="items content_num">
+                    <span>数量</span>
+                    <input
+                      style="width: 30% !important"
+                      v-model="item.demandQuantity"
+                    />
+                  </div>
+
+                  <div>
+                    <el-button
+                      type="text"
+                      @click="deleteOutput(index)"
+                      style="color: red"
+                      >删除</el-button
+                    >
+                  </div>
+                </div>
+              </div>
+            </label>
+          </div>
+        </div>
+      </el-tab-pane>
+    </el-tabs>
+
+    <div class="operate_box">
+      <el-button
+        size="small"
+        class="u-reset-button"
+        @click="close"
+        style="margin-left: 10px"
+      >
+        取消
+      </el-button>
+      <el-button
+        type="primary"
+        size="small"
+        class="u-reset-button"
+        @click="handOK(0)"
+      >
+        确认
+      </el-button>
+
+      <el-button
+        type="primary"
+        size="small"
+        class="u-reset-button"
+        @click="handOK(1)"
+      >
+        提交
+      </el-button>
+    </div>
+
+    <pickingList
+      ref="pickingListRef"
+      isType="weiwai"
+      @allSelection="allSelection"
+    ></pickingList>
+  </div>
+</template>
+
+<script>
+  import {
+    // 	checkOutsourceMaterial,
+    applyoutsourceSave
+    // 	getWarehouseList
+  } from '@/api/produce/index.js';
+
+  import { tableHeader } from '@/utils/dict/common.js';
+  // import {
+  // 	EventBus
+  // } from '@/utils/eventBus.js'
+  import pickingList from './pickingList.vue';
+  export default {
+    components: { pickingList },
+    data() {
+      return {
+        checkListLen: 0,
+        checkedAll: true,
+        checkList: [],
+        mode: 'center',
+        show: false,
+        topHight: 20 || 20,
+        activeName: '0',
+        outObj: {
+          name: '111',
+          type: 4,
+          isInWarehouse: 1
+        },
+
+        tabList: [
+          {
+            name: '物品清单'
+          },
+          {
+            name: '带料清单'
+          },
+          {
+            name: '产出清单'
+          }
+        ],
+
+        actTab: '物品清单',
+        datapickOutInList: [],
+        bomMaterialList: [],
+        pickOutInList: [],
+        materialList: [],
+        standardOutputList: [],
+
+        isFirstTask: null,
+        isLoading: null,
+
+        // clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
+        // 	.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
+
+        seletedAll: false, //全选状态
+        checkListLen: 0,
+
+        warehouseList: [],
+        pickOutInListSelect: [],
+        selectionIds: []
+      };
+    },
+
+    created() {
+      // EventBus.$on('outEvent', this.handleEvent);
+      // this.outsourceMaterialFn()
+    },
+
+    computed: {
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
+      }
+    },
+
+    props: {
+      outsourceFormVal: {
+        type: Object,
+        default: () => {}
+      }
+    },
+    watch: {
+      outsourceFormVal: {
+        handler(val) {
+          console.log(val, 'outsourceFormVal');
+          this.outsourceMaterialFn(val);
+          this.outObj = val;
+        },
+        deep: true,
+        immediate: true
+      }
+    },
+
+    methods: {
+      // open(obj) {
+      // 	// this.outObj = obj;
+      // 	this.actTab = '物品清单';
+      // 	// this.outsourceMaterialFn()
+      // 	// this.getWarehouseFn()
+      // },
+      allSelection(e, item, type) {
+        if (e == 2) {
+          if (type == 'goods') {
+            item.map((it) => {
+              it.isSelection = '1';
+              it.categoryCode = it.code;
+              it.feedQuantity = 1;
+              it.categoryId = it.id;
+              it.newWeight = it.weight;
+              this.pickOutInList.push(this.deepCopy(it));
+            });
+            this.selectionData();
+          } else {
+            if (item.length) {
+              item.map((v) => {
+                this.bomMaterialList.push(v);
+              });
+            }
+          }
+        } else if (e == 3) {
+          if (item.length) {
+            this.standardOutputList = item;
+          }
+        }
+      },
+
+      // selectionData(ids) {
+      //   this.$nextTick(() => {
+      //     this.tableData.forEach((row) => {
+      //       if (ids.includes(row.id)) {
+      //         this.$refs.table.toggleRowSelection(row, true);
+      //       }
+      //     });
+      //   });
+      // },
+
+      deepCopy(obj, hash = new WeakMap()) {
+        if (obj === null) return null;
+        if (obj instanceof Date) return new Date(obj);
+        if (obj instanceof RegExp) return new RegExp(obj);
+        if (typeof obj !== 'object' && typeof obj !== 'function') return obj;
+        if (hash.has(obj)) return hash.get(obj);
+
+        const result = Array.isArray(obj) ? [] : {};
+        hash.set(obj, result);
+
+        return Object.keys(obj).reduce((acc, key) => {
+          acc[key] = this.deepCopy(obj[key], hash);
+          return acc;
+        }, result);
+      },
+
+      openPicking(id, type) {
+        this.$refs.pickingListRef.open(id, type);
+      },
+
+      outsourceMaterialFn(res) {
+        let _arr = [];
+        _arr = [...res.pickOutInList, ...res.materialList];
+
+        this.pickOutInList = _arr.reduce((acc, item) => {
+          const existingItem = acc.find((existing) => existing.id === item.id);
+          if (!existingItem) {
+            item.isSelection = '2';
+            acc.push(item);
+          }
+          return acc;
+        }, []);
+
+        this.bomMaterialList = res.bomMaterialList.map((m) => {
+          return {
+            ...m,
+            isDemandQuantity: true
+          };
+        });
+
+        this.pickOutInList.map((v) => {
+          v.checked = true;
+        });
+
+        this.checkListLen = this.pickOutInList.length;
+
+        this.standardOutputList = res.standardOutputList;
+
+        // let param = {
+        // 	taskId: this.outObj.taskId,
+        // 	taskIds: this.outObj.taskIds,
+        // 	workOrderId: this.outObj.workOrderId
+
+        // }
+        // checkOutsourceMaterial(param).then(res => {
+
+        // 	let _arr = []
+        // 	_arr = [...res.pickOutInList, ...res.materialList]
+        // 	this.pickOutInList = _arr.reduce((acc, item) => {
+        // 		const existingItem = acc.find(existing => existing.id === item.id);
+        // 		if (!existingItem) {
+        // 			acc.push(item);
+        // 		}
+        // 		return acc;
+        // 	}, []);
+
+        // 	this.bomMaterialList = res.bomMaterialList.map((m) => {
+        // 		return {
+        // 			...m,
+        // 			isDemandQuantity: true
+
+        // 		}
+        // 	})
+        // 	this.standardOutputList = res.standardOutputList
+        // 	this.$forceUpdate()
+        // })
+        this.$nextTick(() => {
+          this.$refs.pickOutRef.toggleAllSelection();
+        });
+      },
+
+      inputNum(item, index) {
+        if (item.feedQuantity) {
+          const totalWeight = Number(item.feedQuantity) * Number(item.weight);
+          this.$set(this.pickOutInList[index], 'newWeight', totalWeight);
+          this.$forceUpdate();
+        } else {
+          this.$set(this.pickOutInList[index], 'newWeight', item.weight);
+          this.$forceUpdate();
+        }
+      },
+
+      // 仓库
+      getWarehouseFn() {
+        getWarehouseList().then((res) => {
+          this.warehouseList = res;
+        });
+      },
+
+      deleteData(item, index) {
+        this.pickOutInList.splice(index, 1);
+      },
+
+      handTab(item) {
+        this.actTab = item.name;
+      },
+      //关闭弹窗
+      close() {
+        this.$emit('closeForm');
+      },
+
+      handleEvent({ message }) {
+        if (message.pid == 3) {
+          this.standardOutputList = message.memoList;
+        } else {
+          if (message.pid == 2) {
+            this.bomMaterialList = message.memoList;
+          }
+        }
+      },
+
+      tableH(type) {
+        return tableHeader(type);
+      },
+      //勾选
+      selectVal(e, val, index) {
+        this.$forceUpdate();
+        this.pickOutInList[index] = val;
+        this.$set(this, 'pickOutInList', this.pickOutInList);
+
+        this.checkListLen = this.pickOutInList.filter(
+          (f) => f.checked == true
+        ).length;
+      },
+
+      _seletedAll() {
+        console.log(this.seletedAll, this.pickOutInList, 'this.seletedAll');
+        // this.seletedAll true 是全选
+
+        if (!this.seletedAll) {
+          // 非全选
+          this.seletedAll = true;
+          this.checkListLen = 0;
+
+          this.pickOutInList.map((item) => {
+            item.checked = false;
+          });
+
+          this.$set(this, 'pickOutInList', this.pickOutInList);
+        } else {
+          this.seletedAll = false;
+
+          this.pickOutInList.map((item) => {
+            item.checked = true;
+          });
+          this.$set(this, 'pickOutInList', this.pickOutInList);
+        }
+        this.checkListLen = this.pickOutInList.filter(
+          (f) => f.checked == true
+        ).length;
+      },
+      selectionPickOut(val) {
+        this.pickOutInListSelect = val;
+      },
+
+      deleteOutput(index) {
+        this.standardOutputList.splice(index, 1);
+      },
+
+      deleteBomMaterial(item, index) {
+        this.bomMaterialList.splice(index, 1);
+      },
+
+      convertList(item, index) {
+        if (item.demandQuantity) {
+          item.categoryCode = item.code;
+          item.feedQuantity = item.demandQuantity;
+          item.isSelection = '1';
+          item.categoryId = item.id;
+          item.newWeight = item.weight;
+          this.pickOutInList.push(this.deepCopy(item));
+          this.selectionData();
+          this.bomMaterialList.splice(index, 1);
+          this.$forceUpdate();
+        } else {
+          return this.$message({
+            message: '请输入转换数量',
+            type: 'warning'
+          });
+        }
+      },
+
+      selectionData() {
+        this.$nextTick(() => {
+          this.$refs.pickOutRef.toggleAllSelection();
+        });
+      },
+
+      scrolltolower() {},
+
+      addPicking(id) {
+        const storageKey = Date.now() + '';
+        let arr = null;
+        if (id == 3) {
+          arr = [
+            {
+              standardOutputList: this.standardOutputList
+            }
+          ];
+        } else {
+          arr = [
+            {
+              bomMaterialList: this.bomMaterialList
+            }
+          ];
+        }
+
+        // uni.setStorageSync(storageKey, arr);
+        // uni.navigateTo({
+        // 	url: `/pages/pda/workOrder/search/index?id=${id}&storageKey=${storageKey}&isType=zdy&taskId=${this.outObj.taskId}&classIds=[1,23,9]`
+        // })
+      },
+
+      handOK(isRelease) {
+        // isRelease? 0 提交 2提交并发布
+
+        if (this.checkListLen > 0 && !this.outObj.warehouseId) {
+          return this.$message({
+            message: '请选择仓库',
+            type: 'warning'
+          });
+        }
+
+        // 环境判断
+        let _pickOutInList = [];
+
+        if (this.clientEnvironmentId == 2) {
+          _pickOutInList = this.pickOutInList;
+        } else {
+          // _pickOutInList = this.pickOutInList.filter(f => f.checked == true)
+          _pickOutInList = this.pickOutInListSelect;
+        }
+
+        for (let i = 0; i < _pickOutInList.length; i++) {
+          if (
+            !_pickOutInList[i].feedQuantity &&
+            _pickOutInList[i].isSelection == '1'
+          ) {
+            this.$message.warning('物品数量不能为空');
+            return;
+          }
+        }
+
+        let param = {
+          ...this.outObj,
+          isRelease: isRelease,
+          bomMaterialList: this.bomMaterialList,
+          pickOutInList: _pickOutInList,
+          materialList: this.materialList,
+          standardOutputList: this.standardOutputList
+        };
+
+        this.isLoading = this.$loading({
+          lock: true,
+          text: '加载中',
+          background: 'rgba(0, 0, 0, 0.7)'
+        });
+
+        applyoutsourceSave(param)
+          .then((res) => {
+            this.$emit('outScucc');
+            this.isLoading.close();
+            return this.$message({
+              message: '提交成功',
+              type: 'scuccess'
+            });
+            this.checkListLen = 0;
+          })
+          .catch(() => {
+            this.isLoading.close();
+          });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .c_header_title {
+    display: flex;
+    align-items: center;
+    margin-bottom: 0;
+    height: 58px;
+    margin-bottom: 10px;
+    box-sizing: border-box;
+    border-bottom: 1px solid var(--border-color-lighter);
+  }
+
+  .operate_box {
+    display: flex;
+    flex-direction: row-reverse;
+    padding: 15px;
+    box-shadow: 0px -2px 15px 0px rgba(0, 0, 0, 0.1);
+  }
+
+  .c_title {
+    color: #157a2c;
+    font-size: 16px;
+    font-weight: bold;
+  }
+
+  .materialList {
+    height: 50vh;
+    overflow: auto;
+  }
+
+  .card {
+    width: 100%;
+    padding: 0 20px;
+  }
+
+  .u-reset {
+    width: 100%;
+    padding: 5px;
+    text-align: right;
+  }
+
+  .listBox-con {
+    width: 100%;
+  }
+  .gxList {
+    margin-left: 10px;
+  }
+
+  .listBox-sel {
+    margin: 0 10px;
+  }
+
+  .listBox-top {
+    display: flex;
+    padding: 15px;
+    font-size: 14px;
+    font-weight: bold;
+    border-bottom: 1px solid #ddd;
+  }
+
+  .listBox-bottom {
+    display: flex;
+    width: 100%;
+    flex-wrap: wrap;
+    margin-bottom: 0;
+  }
+
+  .listBox {
+    display: flex;
+    align-items: center;
+    border: 1px solid #ddd;
+    margin-bottom: 20px;
+  }
+
+  .items {
+    font-size: 12px;
+    width: 25%;
+    display: flex;
+    align-items: center;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+
+    // border: 1px solid #ddd;
+    // border-bottom: 1px solid #ddd;
+    // border-right: 0;
+    span {
+      display: block;
+      padding: 10px;
+      margin-right: 5px;
+      color: #157a2c;
+      background-color: #f7f9fa;
+    }
+  }
+
+  ::v-deep .el-input--medium .el-input__inner {
+    height: 26px;
+    line-height: 26px;
+  }
+</style>

+ 16 - 0
src/views/produce/components/picking/index.vue

@@ -52,6 +52,21 @@
               <div class="name">产品名称</div>
               <div class="content">{{ item.productName }}</div>
             </div>
+
+            <div class="col">
+              <div class="name">型号</div>
+              <div class="content">{{ item.model }}</div>
+            </div>
+
+            <div class="col">
+              <div class="name">要求生产数量</div>
+              <div class="content">{{ item.formingNum }}</div>
+            </div>
+
+            <div class="col">
+              <div class="name">计量单位</div>
+              <div class="content">{{ item.unit }}</div>
+            </div>
             <!-- <div class="col">
               <div class="name">批次号</div>
               <div class="content">{{ item.batchNo }}</div>
@@ -407,6 +422,7 @@
 
             // getInventoryTotal
             // this.workList = arr;
+            console.log(arr, '12344');
             this.$set(this, 'workList', arr);
 
             this.getOrderCode();

+ 10 - 3
src/views/produce/components/picking/outsourceIndex.vue

@@ -149,7 +149,7 @@
                         : row.demandQuantity
                     "
                     size="mini"
-                    style="width: 130px"
+                    style="width: 120px"
                   >
                     <template slot="append">{{ row.unit }}</template>
                   </el-input>
@@ -409,7 +409,7 @@
         res.map((ritem) => {
           this.workList.map((item) => {
             item.pickList.map((pitem, index) => {
-              if (pitem.warehouseId == ritem.warehouseId) {
+              if (pitem.warehouseName == ritem.warehouseName) {
                 // pitem.availableCountBase = ritem.availableCountBase;
                 this.$set(
                   this.workList[0].pickList[index],
@@ -444,7 +444,8 @@
           let param = {
             outsourceOrder: list || [],
             workOrderId: this.workListIds[0],
-            taskId: this.taskObj.id
+            taskId: this.taskObj.id,
+            isPC: 1
           };
           listOutsourceInWarehouse(param).then((res) => {
             let indexList = [];
@@ -568,6 +569,12 @@
           };
         });
         this.loadingBtn = true;
+
+        if (_arr.length != 0) {
+          _arr.forEach((it) => {
+            it.isOutsource = 1;
+          });
+        }
         // if (this.clientEnvironmentId == 21) {
         //   let param = {
         //     workOrderId: this.workListIds[0],

+ 2 - 4
src/views/produce/components/picking/outsourcingPickingList.vue

@@ -69,9 +69,7 @@
         </template>
 
         <template v-slot:batchNo="{ row, $index }">
-          <span v-if="row.batchNo && row.deliveryMethod == 2">{{
-            row.batchNo
-          }}</span>
+          <span v-if="row.batchNo">{{ row.batchNo }}</span>
         </template>
 
         <template v-slot:requireDeliveryTime="{ row, $index }">
@@ -250,7 +248,7 @@
             _arr.push({
               id: item.id,
               code: item.code,
-              batchNo: item.batchNo
+              batchNo: item.batchNo,
             });
           });
           this.$emit('outsourceEmit', _arr);

+ 14 - 14
src/views/produce/components/taskDialog/index.vue

@@ -322,15 +322,15 @@
         if (!row.qualifiedQuantity && row.qualifiedQuantity != 0) {
           return this.$message.warning('请输入合格数量');
         }
-        if (!row.qualifiedWeight && row.qualifiedWeight != 0) {
-          return this.$message.warning('请输入合格重量');
-        }
+        // if (!row.qualifiedWeight && row.qualifiedWeight != 0) {
+        //   return this.$message.warning('请输入合格重量');
+        // }
         if (!row.unqualifiedQuantity && row.unqualifiedQuantity != 0) {
           return this.$message.warning('请输入不合格数量');
         }
-        if (!row.unqualifiedWeight && row.unqualifiedWeight != 0) {
-          return this.$message.warning('请输入不合格重量');
-        }
+        // if (!row.unqualifiedWeight && row.unqualifiedWeight != 0) {
+        //   return this.$message.warning('请输入不合格重量');
+        // }
         if (
           row.qualifiedQuantity - 0 + (row.unqualifiedQuantity - 0) !=
           row.quantity - 0
@@ -339,14 +339,14 @@
             `合格数量加不合格数量需要等于任务数量${row.quantity}`
           );
         }
-        if (
-          row.qualifiedWeight - 0 + (row.unqualifiedWeight - 0) !=
-          row.weight - 0
-        ) {
-          return this.$message.warning(
-            `合格重量加不合格重量需要等于任务重量${row.weight}`
-          );
-        }
+        // if (
+        //   row.qualifiedWeight - 0 + (row.unqualifiedWeight - 0) !=
+        //   row.weight - 0
+        // ) {
+        //   return this.$message.warning(
+        //     `合格重量加不合格重量需要等于任务重量${row.weight}`
+        //   );
+        // }
 
         let params = {
           realStartTime: row.realStartTime,

+ 7 - 0
src/views/produce/components/warehousing/components/detailsBom.vue

@@ -78,6 +78,12 @@
         />
       </template>
 
+      <template v-slot:quantity="{ row, $index }">
+        <div class="content_num"
+          >{{ row.quantity }} {{ row.measuringUnit }}</div
+        >
+      </template>
+
       <template v-slot:materielCode="{ row, $index }">
         <span v-if="isDetails">{{ row.extInfo.materielCode }}</span>
         <el-input
@@ -98,6 +104,7 @@
           placeholder="请输入客户代号"
         />
       </template>
+
       <!-- <template v-slot:deviceId="{ row, $index }">
         <el-select
           v-if="deviceList?.length > 0"

+ 6 - 6
src/views/produce/components/warehousing/index.vue

@@ -114,7 +114,7 @@
               </div>
             </div>
 
-            <div>
+            <!-- <div>
               <div class="text">入库规格</div>
               <div class="select-type">
                 <el-select
@@ -134,7 +134,7 @@
                   ></el-option>
                 </el-select>
               </div>
-            </div>
+            </div> -->
           </div>
           <!-- <div style="margin-top: 6px">
             <el-select
@@ -260,7 +260,7 @@
               </div>
             </div>
 
-            <div>
+            <!-- <div>
               <div class="text">入库规格</div>
               <div class="select-type">
                 <el-select
@@ -280,7 +280,7 @@
                   ></el-option>
                 </el-select>
               </div>
-            </div>
+            </div> -->
           </div>
 
           <!-- <div v-for="(it, idx) in item.toWarehouseList" :key="idx"> -->
@@ -365,7 +365,7 @@
               </div>
             </div>
 
-            <div>
+            <!-- <div>
               <div class="text">入库规格</div>
               <div class="select-type">
                 <el-select
@@ -385,7 +385,7 @@
                   ></el-option>
                 </el-select>
               </div>
-            </div>
+            </div> -->
           </div>
           <!-- <div style="margin-top: 6px">
             <el-select

+ 46 - 20
src/views/produce/index.vue

@@ -236,7 +236,7 @@
                 <outsourcingDetails
                   ref="outsourcingListRef"
                   @outsourcingAdd="outsourcingAdd"
-                  v-if="!isStep && !isOutsource"
+                  v-if="!isStep && !isOutsource && !isPleaseEntrust"
                 ></outsourcingDetails>
                 <outsourcing
                   :outsourceFormVal="outsourceForm"
@@ -253,6 +253,13 @@
                   @outScucc="outScucc"
                   v-if="isOutsource"
                 ></outsourceList>
+
+                <pleaseEntrust
+                  :outsourceFormVal="outObj"
+                  @closeForm="closeForm"
+                  @outScucc="outScucc"
+                  v-if="isPleaseEntrust"
+                ></pleaseEntrust>
               </div>
 
               <!-- <div class="menu-container">
@@ -348,6 +355,7 @@
   import workes from './components/workPlan/components/work.vue';
   import warehousing from './components/warehousing/index.vue';
   import outsourceList from './components/outsourcing/outsourceList.vue';
+  import pleaseEntrust from './components/outsourcing/pleaseEntrust.vue';
   import workStep from './components/workStep/index.vue';
   import createError from './components/createError.vue';
   import device from './components/device/index.vue';
@@ -364,7 +372,8 @@
     factoryworkstationPage,
     nextTask,
     singleListTask,
-    pleaseEntrustManagement
+    pleaseEntrustManagement,
+    checkPleaseEntrust
   } from '@/api/produce/index';
   import prenatalExamination from './components/prenatalExamination/index.vue';
 
@@ -392,7 +401,8 @@
       turnover,
       outsourcingDetails,
       BomDetailsPop,
-      prenatalExamination
+      prenatalExamination,
+      pleaseEntrust
     },
     data() {
       return {
@@ -420,6 +430,7 @@
         wokePopup: false,
         workPlanType: '',
         isOutsource: false,
+        isPleaseEntrust: false,
         BomObj: {},
         defaultProps: {
           children: 'children',
@@ -678,6 +689,7 @@
 
       closeForm() {
         this.isOutsource = false;
+        // this.isPleaseEntrust = false;
         this.$nextTick(() => {
           this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
         });
@@ -685,6 +697,7 @@
       outScucc() {
         // this.operationType = null;
         this.isOutsource = false;
+        // this.isPleaseEntrust = false;
         this.$nextTick(() => {
           this.$refs.outsourcingListRef.getDataList(this.workData.list[0].code);
         });
@@ -692,27 +705,39 @@
 
       // 切换组件
       async changePlugIn(e, index) {
-        // if (index == '1') {
-        this.outObj = e;
-        let req = {
-          taskId: e.taskId,
-          taskIds: e.taskIds,
-          workOrderId: e.workOrderId,
-          quantity: e.formedNumLast
-        };
-        const res = await checkOutsourceMaterial(req);
+        if (index == '1') {
+          this.outObj = e;
+          let req = {
+            taskId: e.taskId,
+            taskIds: e.taskIds,
+            workOrderId: e.workOrderId,
+            quantity: e.formedNumLast
+          };
+          const res = await checkOutsourceMaterial(req);
 
-        this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
+          this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
 
-        this.isStep = false;
-        this.isOutsource = true;
-        // } else if (index == '2') {
-        //   this.outObj = e;
+          this.isStep = false;
+          this.isOutsource = true;
+        } else if (index == '2') {
+          this.outObj = e;
+          let req = {
+            taskId: e.taskId,
+            taskIds: e.taskIds,
+            workOrderId: e.workOrderId,
+            quantity: e.formedNumLast
+          };
 
-        //   const res = await pleaseEntrustManagement(this.outObj);
+          const res = await checkPleaseEntrust(req);
 
-        //   console.log(res, '请托的结果');
-        // }
+          this.outObj = { ...res.data, ...this.outsourceForm, ...this.outObj };
+
+          this.isStep = false;
+          this.isPleaseEntrust = true;
+          // this.isOutsource = true;
+
+          console.log(res, '请托的结果');
+        }
       },
 
       workSelect(data) {
@@ -790,6 +815,7 @@
 
         if (t == 'pick') {
           this.$nextTick(() => {
+            console.log(this.taskObj);
             this.$refs.pickListRef.getList(this.workListIds);
           });
         }

+ 10 - 10
src/views/taskList/components/Ddtails.vue

@@ -372,16 +372,16 @@
       submitAdd() {
         this.$refs.form.validate((valid) => {
           if (!valid) return;
-          if (
-            this.form.qualifiedQuantity -
-              0 +
-              (this.form.unqualifiedQuantity - 0) !==
-            this.current.quantity
-          ) {
-            return this.$message.warning(
-              `合格数量加不合格数量要等于任务数量${this.current.quantity}`
-            );
-          }
+          // if (
+          //   this.form.qualifiedQuantity -
+          //     0 +
+          //     (this.form.unqualifiedQuantity - 0) !==
+          //   this.current.quantity
+          // ) {
+          //   return this.$message.warning(
+          //     `合格数量加不合格数量要等于任务数量${this.current.quantity}`
+          //   );
+          // }
           // if (
           //   this.form.qualifiedWeight -
           //     0 +

+ 1 - 1
src/views/taskList/components/task-search.vue

@@ -42,7 +42,7 @@
             placeholder: ''
           },
           {
-            label: '工单编码:',
+            label: '订单编码:',
             value: 'workOrderCode',
             type: 'input',
             placeholder: ''

+ 11 - 0
src/views/warehousing/components/tgDetails.vue

@@ -20,6 +20,12 @@
           </el-form-item>
         </el-col>
 
+        <el-col :span="8">
+          <el-form-item label="物品编码:" prop="categoryCode">
+            <el-input v-model="row.categoryCode" disabled />
+          </el-form-item>
+        </el-col>
+
         <el-col :span="8">
           <el-form-item label="仓库名称:" prop="warehouseName">
             <el-input v-model="row.warehouseName" style="width: 100%" disabled>
@@ -163,6 +169,11 @@
           //   label: '入库申请单id',
           //   prop: 'applyStorageId'
           // },
+          {
+            label: '物品编码',
+            prop: 'categoryCode',
+            showOverflowTooltip: true
+          },
 
           {
             label: '物品名称',

+ 11 - 1
src/views/warehousing/index.vue

@@ -15,7 +15,10 @@
         </template>
 
         <template v-slot:totalPackage="{ row }">
-          {{ row.totalPackage }}
+          {{ row.totalPackage
+          }}{{
+            row.detailList.length != 0 ? row.detailList[0].packingUnit : ''
+          }}
         </template>
 
         <template v-slot:totalWeight="{ row }">
@@ -93,6 +96,13 @@
             minWidth: 110,
             showOverflowTooltip: true
           },
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            align: 'center',
+            minWidth: 110,
+            showOverflowTooltip: true
+          },
           {
             prop: 'workOrderCode',
             label: '工单编码',

+ 2 - 2
vue.config.js

@@ -36,7 +36,7 @@ module.exports = {
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
@@ -44,7 +44,7 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
-        target: 'http://192.168.1.116:18086',
+        // target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''