695593266@qq.com 10 месяцев назад
Родитель
Сommit
3b9ea99590

+ 49 - 23
src/views/material/BOMmanage/components/detailedList.vue

@@ -38,6 +38,7 @@
             <el-input
               placeholder="请输入"
               v-model.number="attributeData.baseCount"
+              disabled
             >
               <template #append>
                 {{
@@ -90,7 +91,7 @@
       </template>
 
       <template v-slot:attributeType="{ row }">
-        <el-select
+        <!-- <el-select
           v-model="row.attributeType"
           filterable
           disabled
@@ -103,7 +104,8 @@
             :value="item.value"
             :label="item.label"
           ></el-option>
-        </el-select>
+        </el-select> -->
+        {{ attributeTypeText(row.attributeType) }}
       </template>
 
       <template v-slot:componentAttribute="{ row }">
@@ -428,22 +430,22 @@
         ],
 
         attributeList: [
-          {
-            label: '总装',
-            value: 1
-          },
-          {
-            label: '部件',
-            value: 2
-          },
-          {
-            label: '零件',
-            value: 3
-          },
-          {
-            label: '原材料',
-            value: 4
-          }
+          // {
+          //   label: '总装',
+          //   value: 1
+          // },
+          // {
+          //   label: '部件',
+          //   value: 2
+          // },
+          // {
+          //   label: '零件',
+          //   value: 3
+          // },
+          // {
+          //   label: '原材料',
+          //   value: 4
+          // }
         ],
 
         sxtList: [
@@ -521,6 +523,10 @@
           {
             label: '废品',
             value: 28
+          },
+          {
+            label: '周转车',
+            value: 7
           }
         ],
 
@@ -539,6 +545,7 @@
     },
 
     created() {
+      this.getAttriButeList('inventory_type');
       // this.getDictList('productionType');
       // this.getZeroPartPros('zeroPartPros');
       this.getContactList();
@@ -606,18 +613,37 @@
     //   }
     // },
 
-    mounted() {
-      console.log(this.attributeData, 'attributeData');
-      console.log(this.isWt, 'isWt');
-    },
+    mounted() {},
 
     methods: {
+      attributeTypeText(v) {
+        if (v) {
+          let a = this.attributeList.find((item) => item.value == v);
+          return a.label;
+        }
+      },
+
+      async getAttriButeList(code) {
+        let { data: res } = await getByCode(code);
+        this.attributeList = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: Number(values[0]),
+            label: item[values[0]]
+          };
+        });
+      },
+
       rootCategoryLevelIdText(v) {
         console.log(v, '111111');
+        console.log(
+          this.rootCategoryLevelIdList,
+          'this.rootCategoryLevelIdList'
+        );
 
         if (v) {
           let a = this.rootCategoryLevelIdList.find((item) => item.value == v);
-          return a.label;
+          return a ? a.label : '';
         }
       },
 

+ 20 - 2
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -1253,12 +1253,14 @@
         );
       },
       determineChoose(title, row, idx) {
+        console.log('111111111111111');
         let type = '';
         if (this.activeName === '材料定额') {
           type = 'materialQuota';
         } else if (this.activeName === '制造资源') {
           type = 'resource';
         }
+
         if (title == '选择物料') {
           this.$set(
             this.tableData.taskParam[this.currentIndex][type][idx],
@@ -1295,6 +1297,11 @@
             'modelType',
             row.modelType
           );
+          this.$set(
+            this.tableData.taskParam[this.currentIndex][type][idx],
+            'rootCategoryLevelId',
+            row.categoryLevelPathIdParent
+          );
         }
       },
       uploadedSuccess(data, row) {
@@ -1464,13 +1471,18 @@
 
         this.tableData.taskParam[this.currentIndex][type].push({
           subCode,
+          bomArtFiles: '',
           categoryId: '',
           categoryName: '',
           isReworkBom: 0,
           brandNum: '',
           count: '',
           modelType: '',
-          unit: ''
+          unit: '',
+          rootCategoryLevelId: '',
+          categoryCode: '',
+          id: '',
+          specification: ''
         });
       },
       /* 表格数据源 */
@@ -1613,6 +1625,12 @@
         this.resourceBomId = resourceBomId;
         this.attributeData = attributeData;
 
+        if (this.attributeData) {
+          this.form.baseCount = this.attributeData.baseCount;
+        } else {
+          this.form.baseCount = 1;
+        }
+
         if (!this.isView) {
           this.columns = this.defaultColumns.concat({
             columnKey: 'action',
@@ -1645,7 +1663,7 @@
 
         console.log(rowData, 'rowData');
 
-        this.form.baseCount = rowData.baseCount || 1;
+        // this.form.baseCount = rowData.baseCount || 1;
         this.form.baseCountUnit = rowData.baseCountUnit;
 
         this.baseCount2 = rowData.baseCount2;

+ 4 - 4
src/views/material/BOMmanage/detailsPop.vue

@@ -712,10 +712,10 @@
           this.versList = res || [];
           if (type == 'del' || type == 'add') {
             if (this.versList.length >= 1) {
-              if (!this.searchObj.versions) {
-                this.searchObj.versions =
-                  this.versList[this.versList.length - 1].versions;
-              }
+              // if (!this.searchObj.versions) {
+              this.searchObj.versions =
+                this.versList[this.versList.length - 1].versions;
+              // }
               this.getTreeData();
             } else {
               this.searchObj.versions = '';

+ 30 - 18
src/views/material/BOMmanage/index.vue

@@ -219,7 +219,7 @@
             prop: 'componentAttribute',
             label: '属性类型',
             showOverflowTooltip: true,
-            minWidth: 100
+            minWidth: 180
           },
           {
             slot: 'attributeType',
@@ -232,7 +232,7 @@
             slot: 'produceType',
             label: '生产类型',
             showOverflowTooltip: true,
-            minWidth: 100
+            minWidth: 180
           },
 
           {
@@ -313,22 +313,22 @@
         dictList: [],
         where: {},
         attributeList: [
-          {
-            label: '总装',
-            value: 1
-          },
-          {
-            label: '部件',
-            value: 2
-          },
-          {
-            label: '零件',
-            value: 3
-          },
-          {
-            label: '原材料',
-            value: 4
-          }
+          // {
+          //   label: '总装',
+          //   value: 1
+          // },
+          // {
+          //   label: '部件',
+          //   value: 2
+          // },
+          // {
+          //   label: '零件',
+          //   value: 3
+          // },
+          // {
+          //   label: '原材料',
+          //   value: 4
+          // }
         ],
         sort: {},
         rootCategoryLevelIdList: [
@@ -409,6 +409,7 @@
 
     created() {
       this.getDictList('productionType');
+      this.getAttriButeList('inventory_type');
     },
     methods: {
       attributeTypeText(v) {
@@ -424,6 +425,17 @@
         }
       },
 
+      async getAttriButeList(code) {
+        let { data: res } = await getByCode(code);
+        this.attributeList = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: Number(values[0]),
+            label: item[values[0]]
+          };
+        });
+      },
+
       async getDictList(code) {
         let { data: res } = await getByCode(code);
         this.dictList = res.map((item) => {

+ 42 - 1
src/views/technology/production/index.vue

@@ -49,6 +49,15 @@
           >
             导入
           </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            @click="batchUpdateWorkCenter()"
+            v-if="$hasPermission('main:producetask:save')"
+          >
+            批量修改工作中心
+          </el-button>
         </template>
 
         <template v-slot:name="{ row }">
@@ -123,6 +132,8 @@
       ref="importDialogRef"
       @success="reload"
     />
+
+    <WorkCenter ref="centerRefs" @changeCenter="determineChoose" />
   </div>
 </template>
 
@@ -136,6 +147,7 @@
   import control from '@/api/technology/control';
   import importDialog from '@/components/upload/comm-dialog.vue';
   import work from '@/api/technology/work';
+  import WorkCenter from './components/WorkCenter.vue';
 
   export default {
     name: 'technologyProduction',
@@ -145,7 +157,8 @@
       UserEdit,
       UserSetting,
       SampleParam,
-      importDialog
+      importDialog,
+      WorkCenter
     },
     data() {
       return {
@@ -324,6 +337,14 @@
         return res;
       },
 
+      batchUpdateWorkCenter() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        this.$refs.centerRefs.open(this.selection[0]);
+      },
+
       /* 刷新表格 */
       reload(where) {
         this.$refs.table.reload({ page: 1, where: where });
@@ -337,6 +358,26 @@
           this.$refs.userEdit.$refs.form.clearValidate();
       },
 
+      determineChoose(row) {
+        // this.loading = true;
+        // for (let i = 0; i < this.selection.length; i++) {
+        //   this.selection[i].workCenterName = row.name;
+        //   this.selection[i].workCenterId = row.id;
+        //   producetask
+        //     .save(this.selection[i])
+        //     .then((msg) => {
+        //       if (this.selection.length == i) {
+        //         this.loading = false;
+        //         this.$message.success('修改成功');
+        //       }
+        //     })
+        //     .catch((e) => {
+        //       this.loading = false;
+        //       return;
+        //     });
+        // }
+      },
+
       getControlList() {
         const params = {
           pageNum: 1,

+ 4 - 5
src/views/technology/work/components/user-edit.vue

@@ -130,8 +130,8 @@
             { required: true, message: '请输入工序名称', trigger: 'blur' }
           ],
           code: [
-            { required: true, message: '工作中心编码', trigger: 'change' },
-            { validator: this.codeExists, trigger: 'blur' }
+            { required: true, message: '工作中心编码', trigger: 'change' }
+            // { validator: this.codeExists, trigger: 'blur' }
           ],
           factoryId: [
             { required: true, message: '请选择所属工厂', trigger: 'blur' }
@@ -211,12 +211,11 @@
               this.isUpdate = true;
             } else {
               this.isUpdate = false;
-              this.form.code = await getCode('work_center')
+              this.form.code = await getCode('work_center');
             }
           } else {
             this.isUpdate = false;
-            this.form.code = await getCode('work_center')
-
+            this.form.code = await getCode('work_center');
           }
         } else {
           this.$refs.form.clearValidate();

+ 125 - 123
src/views/workforceManagement/team/index.vue

@@ -59,7 +59,6 @@
             title="确定要删除此角色吗?"
             @confirm="remove(row)"
             v-if="$hasPermission('main:team:delete')"
-
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -75,138 +74,141 @@
   </div>
 </template>
 <script>
-import tabMixins from '@/mixins/tableColumnsMixin';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
-import edit from './components/edit.vue';
-import setclasses from './components/setclasses.vue';
-import { getteampage, deleteteam } from '@/api/workforceManagement/team';
-import search from './components/search.vue';
-export default {
-  mixins: [tabMixins],
-  components: {
-    search,
-    edit,
-    setclasses
-  },
-  data() {
-    return {
-      selection: [],
-      columns: [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          width: 45,
-          type: 'index',
-          columnKey: 'index',
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          prop: 'code',
-          label: '编码'
-        },
-        {
-          label: '名称',
-          prop: 'name'
-        },
-
-        {
-          label: '所属工厂',
-          prop: 'factoryName'
-        },
+  import edit from './components/edit.vue';
+  import setclasses from './components/setclasses.vue';
+  import { getteampage, deleteteam } from '@/api/workforceManagement/team';
+  import search from './components/search.vue';
+  export default {
+    mixins: [tabMixins],
+    components: {
+      search,
+      edit,
+      setclasses
+    },
+    data() {
+      return {
+        selection: [],
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '编码'
+          },
+          {
+            label: '名称',
+            prop: 'name'
+          },
 
-        // {
-        //   label: '所属厂房',
-        //   prop: 'workshopPlanName'
-        // },
+          {
+            label: '所属工厂',
+            prop: 'factoryName'
+          },
 
-        {
-          label: '所属产线',
-          prop: 'productionLineName'
-        },
-        {
-          label: '工作中心',
-          prop: 'workCenterNames'
-        },
+          // {
+          //   label: '所属厂房',
+          //   prop: 'workshopPlanName'
+          // },
 
+          {
+            label: '所属产线',
+            prop: 'productionLineName'
+          },
+          {
+            label: '工作中心',
+            prop: 'workCenterNames'
+          },
 
-        {
-          label: '工艺类型',
-          prop: 'produceVersionName'
-        },
-        {
-          label: '人数',
-          prop: 'userNumber'
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 220,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ],
-      dict: {
-        enabled: {
-          1: '生效',
-          0: '未生效'
+          {
+            label: '工艺类型',
+            prop: 'produceVersionName'
+          },
+          {
+            label: '班组长',
+            prop: 'leaderUserName'
+          },
+          {
+            label: '人数',
+            prop: 'userNumber'
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 220,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        dict: {
+          enabled: {
+            1: '生效',
+            0: '未生效'
+          },
+          groupId: []
         },
-        groupId: []
-      },
-      pageSize: this.$store.state.tablePageSize,
-      cacheKeyUrl: '000a249c-workforceManagement-team'
-    };
-  },
-  methods: {
-    datasource({ page, where, limit }) {
-      let data = getteampage({
-        ...where,
-        pageNum: page,
-        size: limit
-      });
-      return data;
-    },
-    openEdit(type, row) {
-      this.$refs.edit.open(type, row);
+        pageSize: this.$store.state.tablePageSize,
+        cacheKeyUrl: '000a249c-workforceManagement-team'
+      };
     },
-    remove(row) {
-      let par = [row.id];
-      deleteteam(par)
-        .then((message) => {
-          this.$message.success(message);
-          this.done();
-        })
-        .catch((e) => {
-          this.$message.error(e.message);
+    methods: {
+      datasource({ page, where, limit }) {
+        let data = getteampage({
+          ...where,
+          pageNum: page,
+          size: limit
         });
-    },
+        return data;
+      },
+      openEdit(type, row) {
+        this.$refs.edit.open(type, row);
+      },
+      remove(row) {
+        let par = [row.id];
+        deleteteam(par)
+          .then((message) => {
+            this.$message.success(message);
+            this.done();
+          })
+          .catch((e) => {
+            this.$message.error(e.message);
+          });
+      },
 
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ page: 1, where: where });
-    },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
 
-    done() {
-      this.$refs.table.reload({
-        page: 1
-      });
-    },
-    openclass() {
-      if (this.selection.length <= 0) {
-        this.$message.error('请选择班组');
-        return;
+      done() {
+        this.$refs.table.reload({
+          page: 1
+        });
+      },
+      openclass() {
+        if (this.selection.length <= 0) {
+          this.$message.error('请选择班组');
+          return;
+        }
+        let list = this.selection.map((n) => n.id);
+        this.$refs.setclasses.open(list);
       }
-      let list = this.selection.map((n) => n.id);
-      this.$refs.setclasses.open(list);
     }
-  }
-};
+  };
 </script>

+ 1 - 0
vue.config.js

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