ysy 2 лет назад
Родитель
Сommit
8cc215e808

+ 10 - 0
src/api/material/list.js

@@ -79,3 +79,13 @@ export async function getBomRoutingList(categoryId) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+
+// 产品工序与模具关联
+export async function categoryTaskPallet(data) {
+  const res = await request.post(`/main/category/categoryTaskPallet`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 0 - 18
src/components/AssetTree/index.vue

@@ -107,25 +107,7 @@
         } catch (error) {}
         this.treeLoading = false;
       },
-      // 递归 - 往树children里面添加parentName
-      // _setParentName (tree) {
-      //   let data = tree;
-      //   for (let i = 0; i < data.length; i++) {
-      //     if (data[i].parentId === '0') {
-      //       this.parentName = data[i].name;
-      //       originId = data[i].id;
-      //       originType = data[i].type;
-      //     }
 
-      //     data[i]['originId'] = originId;
-      //     data[i]['originType'] = originType;
-      //     data[i]['parentId'] = data[i]['parentId'];
-      //     if (data[i].children && data[i].children.length > 0) {
-      //       this._setParentName(data[i].children);
-      //     }
-      //   }
-      //   return data;
-      // },
 
       handleNodeClick(data, node) {
         this.$emit('handleNodeClick', data, node);

+ 9 - 0
src/views/classifyManage/treeClassify/components/list-edit.vue

@@ -46,6 +46,15 @@
           </el-select> 
         </el-form-item>
 
+        <el-form-item label="排序:" prop="sort">
+          <el-input
+            clearable
+            v-model.number="formData.sort"
+            placeholder="请输入排序"
+          />
+        </el-form-item>
+
+
         <el-form-item label="编码规则:" prop="ruleCode">
           <el-input
             clearable

+ 64 - 24
src/views/material/product/components/mouldDialog.vue

@@ -44,7 +44,7 @@
 
             <header-title title="工序">
             </header-title>
-             
+
             <ele-pro-table ref="table" :needPage="false" :columns="columns" :datasource="datasource" row-key="id">
 
                 <!-- 表头工具栏 -->
@@ -55,21 +55,32 @@
 
                 </template>
 
-                <template v-slot:mouldName="{ row, $index }">
-                  
-                    <el-input :v-model="row.mouldName" placeholder="请选择" @click.native="mouldSelect(row, $index)"></el-input>
+                <template v-slot:palletName="{ row, $index }">
+                    <el-input :value="row.palletName" placeholder="请选择"
+                        @click.native="palletSelect(row, $index)"></el-input>
+                </template>
+
+                <template v-slot:palletCode="{ row }">
+                    <el-input :value="row.palletCode" disabled placeholder="自动带入"></el-input>
                 </template>
 
 
+                <template v-slot:palletModelType="{ row }">
+                    <el-input :value="row.palletModelType" disabled placeholder="自动带入"></el-input>
+                </template>
+
+
+
+
 
 
                 <!-- 操作列 -->
                 <template v-slot:action="{ row, $index }">
-                 
+
                     <el-popconfirm class="ele-action" title="确定要删除当前工序吗?" @confirm="handleDel(row, $index)">
                         <template v-slot:reference>
                             <el-link type="danger" :underline="false" icon="el-icon-delete">
-                                删除 {{ row.mouldName }}
+                                删除
                             </el-link>
                         </template>
                     </el-popconfirm>
@@ -78,7 +89,6 @@
 
 
 
-
             </ele-pro-table>
 
 
@@ -101,6 +111,7 @@
 
 import processModal from '@/views/technology/productParam/components/processModal.vue'
 import ProductModal from '@/views/technology/productParam/components/ProductModal.vue'
+import { categoryTaskPallet } from '@/api/material/list'
 export default {
     components: {
         processModal,
@@ -116,7 +127,6 @@ export default {
     data() {
         const defaultForm = {
             id: null,
-
             code: '',
             name: '',
             modelType: '',
@@ -149,8 +159,23 @@ export default {
 
                 {
                     label: '模具名称',
-                    prop: 'mouldName',
-                    slot: 'mouldName',
+                    prop: 'palletName',
+                    slot: 'palletName',
+                    minWidth: 110
+                },
+
+                {
+                    label: '模具编码',
+                    prop: 'palletCode',
+                    slot: 'palletCode',
+                    minWidth: 110
+                },
+
+                {
+                    label: '模具型号',
+                    prop: 'palletModelType',
+                    slot: 'palletModelType',
+                    minWidth: 110
                 },
 
                 {
@@ -186,7 +211,7 @@ export default {
                 {
                     columnKey: 'action',
                     label: '操作',
-                    width: 260,
+                    width: 160,
                     align: 'center',
                     resizable: false,
                     slot: 'action',
@@ -195,6 +220,7 @@ export default {
             ],
 
             removeList: [],
+            categoryId: null
 
 
 
@@ -241,24 +267,29 @@ export default {
             }
         },
 
-        mouldSelect(row, idx) {
-            this.$refs.productRefs.open(row, '模具', '5', idx)
+        palletSelect(row, idx) {
+            let _arr = this.$refs.table.getData()
+            let param = {
+                categoryId: _arr[idx].palletId,
+                categoryName: _arr[idx].palletName,
+                categoryCode: _arr[idx].palletCode
+            }
+            this.$refs.productRefs.open(param, '模具', '5', idx)
         },
 
         determineChoose(title, row, idx) {
-         
+
             if (title == '模具') {
                 let _arr = this.$refs.table.getData()
-                let _new = _arr
+                this.$set(_arr[idx], 'palletId', row.id)
+                this.$set(_arr[idx], 'palletName', row.name)
+                this.$set(_arr[idx], 'palletCode', row.code)
+                this.$set(_arr[idx], 'palletModelType', row.modelType)
 
-              
-               
-                _new[idx].mouldId = row.id
-                _new[idx]['mouldName'] = row.name
-              
-                console.log(_new)
 
-                this.$refs.table.setData(_new);
+                this.$nextTick(() => {
+                    this.$refs.table.setData(_arr);
+                })
 
             }
 
@@ -266,7 +297,16 @@ export default {
         },
 
 
-        save() { },
+        save() {
+            let _arr = this.$refs.table.getData()
+            let param = {
+                categoryId: this.categoryId,
+                takeList: _arr
+            }
+            categoryTaskPallet(param).then((res) => {
+                console.log(res)
+            })
+        },
 
 
 
@@ -278,7 +318,7 @@ export default {
 
                 if (this.data) {
 
-
+                    this.categoryId = this.data.id
                     this.$util.assignObject(this.form, {
                         ...this.data
                     });

+ 2 - 1
src/views/technology/productParam/components/ProductModal.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog :title="title" :visible.sync="visible" v-if="visible" :before-close="handleClose"
-    :close-on-click-modal="false" :close-on-press-escape="false" append-to-body width="70%">
+    :close-on-click-modal="false" :close-on-press-escape="false" append-to-body width="75%">
     <el-card shadow="never">
       <ProductSearch @search="reload" />
       <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
@@ -147,6 +147,7 @@ export default {
     },
     /* 刷新表格 */
     reload(where) {
+      this.categoryLevelId = null
       this.$refs.table.reload({ pageNum: 1, where: where });
     },
     open(item, title, categoryLevelId, idx) {

+ 0 - 1
src/views/technology/productParam/components/product-search.vue

@@ -54,7 +54,6 @@
       const defaultWhere = {
         name: '',
         code: '',
-        brandNum: '',
         modelType: ''
       };
       return {

+ 3 - 2
src/views/technology/route/components/user-edit.vue

@@ -26,8 +26,8 @@
         </el-col>
 
         <el-col :span="8">
-          <el-form-item label="生产版本:" prop="produceVersionId" :disabled="isUpdate">
-            <el-select v-model="form.produceVersionId" filterable placeholder="请选择" :style="{ width: '100%' }">
+          <el-form-item label="生产版本:" prop="produceVersionId">
+            <el-select v-model="form.produceVersionId" filterable placeholder="请选择" :style="{ width: '100%' }" :disabled="isUpdate">
               <el-option v-for="item in versionList" :key="item.code" :label="item.code + '-' + item.name"
                 :value="item.id">
               </el-option>
@@ -96,6 +96,7 @@ export default {
       factoryId: '',
       status: -1,
       categoryId: '',
+      produceVersionId: '',
       version: '1.0',
       id: '',
 

+ 0 - 2
src/views/technology/route/index.vue

@@ -26,8 +26,6 @@
           </el-link>
 
 
-
-
           <el-link type="primary" :underline="false" icon="el-icon-document" @click="openHistory(row)">
             历史版本
           </el-link>