ysy 2 лет назад
Родитель
Сommit
0f06da465f

+ 37 - 5
src/views/material/product/components/MaterialAdd.vue

@@ -1,6 +1,6 @@
 
 
 <template>
 <template>
-    <ele-modal width="1060px" :visible="visible" v-if="visible" :append-to-body="true" :close-on-click-modal="true"
+    <ele-modal width="1160px" :visible="visible" v-if="visible" :append-to-body="true" :close-on-click-modal="true"
         custom-class="ele-dialog-form" title="物料BOM" @update:visible="updateVisible">
         custom-class="ele-dialog-form" title="物料BOM" @update:visible="updateVisible">
         <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-form ref="form" :model="form" :rules="rules" label-width="120px">
             <header-title title="物料BOM"> </header-title>
             <header-title title="物料BOM"> </header-title>
@@ -80,8 +80,10 @@
                             <el-input v-model="row.subCode" placeholder="请输入"></el-input>
                             <el-input v-model="row.subCode" placeholder="请输入"></el-input>
                         </template>
                         </template>
                         <template v-slot:unit="{ row }">
                         <template v-slot:unit="{ row }">
-                            <DictSelection dictName="量单位" v-model="row.unit"></DictSelection>
+                            <DictSelection dictName="量单位" v-model="row.unit"></DictSelection>
                         </template>
                         </template>
+
+
                         <template v-slot:count="{ row }">
                         <template v-slot:count="{ row }">
                             <el-input v-model="row.count" placeholder="请输入" @input="(value) =>
                             <el-input v-model="row.count" placeholder="请输入" @input="(value) =>
                             (row.count = value.replace(
                             (row.count = value.replace(
@@ -90,6 +92,21 @@
                             ))
                             ))
                                 "></el-input>
                                 "></el-input>
                         </template>
                         </template>
+
+                        
+                        <template v-slot:netWeight="{ row }">
+                            <el-input v-model="row.netWeight" placeholder="请输入" @input="(value) =>
+                            (row.netWeight = value.replace(
+                                /^(-)*(\d+)\.(\d\d\d\d\d\d).*$/,
+                                '$1$2.$3'
+                            ))
+                                "></el-input>
+                        </template>
+
+                        <template v-slot:weightUnit="{ row }">
+                            <DictSelection dictName="重量单位" v-model="row.weightUnit"></DictSelection>
+                        </template>
+
                         <template v-slot:categoryName="{ row, $index }">
                         <template v-slot:categoryName="{ row, $index }">
                             <el-input :value="row.categoryName" placeholder="请选择"
                             <el-input :value="row.categoryName" placeholder="请选择"
                                 @click.native="categorySelect(row, $index)"></el-input>
                                 @click.native="categorySelect(row, $index)"></el-input>
@@ -227,15 +244,27 @@ export default {
                     prop: 'modelType'
                     prop: 'modelType'
                 },
                 },
                 {
                 {
-                    label: '净重',
+                    label: '数量',
                     slot: 'count',
                     slot: 'count',
                     action: 'count'
                     action: 'count'
                 },
                 },
                 {
                 {
-                    label: '量单位',
+                    label: '量单位',
                     slot: 'unit',
                     slot: 'unit',
                     action: 'unit'
                     action: 'unit'
                 },
                 },
+
+                {
+                    label: '重量',
+                    slot: 'netWeight',
+                    action: 'netWeight'
+                },
+                {
+                    label: '重量单位',
+                    slot: 'weightUnit',
+                    action: 'weightUnit'
+                },
+
                 {
                 {
                     action: 'action',
                     action: 'action',
                     slot: 'action',
                     slot: 'action',
@@ -292,7 +321,9 @@ export default {
                 brandNum: '',
                 brandNum: '',
                 count: '',
                 count: '',
                 modelType: '',
                 modelType: '',
-                unit: ''
+                unit: '',
+                netWeight: '',
+                weightUnit: ''
             });
             });
         },
         },
 
 
@@ -367,6 +398,7 @@ export default {
                 this.$set(this.tableData[idx], 'categoryId', row.id)
                 this.$set(this.tableData[idx], 'categoryId', row.id)
                 this.$set(this.tableData[idx], 'categoryCode', row.code)
                 this.$set(this.tableData[idx], 'categoryCode', row.code)
                 this.$set(this.tableData[idx], 'unit', row.measuringUnit)
                 this.$set(this.tableData[idx], 'unit', row.measuringUnit)
+                this.$set(this.tableData[idx], 'weightUnit', row.weightUnit)
                 this.$set(this.tableData[idx], 'brandNum', row.brandNum)
                 this.$set(this.tableData[idx], 'brandNum', row.brandNum)
                 this.$set(this.tableData[idx], 'modelType', row.modelType)
                 this.$set(this.tableData[idx], 'modelType', row.modelType)
 
 

+ 29 - 2
src/views/material/product/components/MoldInfo.vue

@@ -4,7 +4,7 @@
       <div class="divider">
       <div class="divider">
         <div class="title">
         <div class="title">
           <div class="ele-bg-primary"></div>
           <div class="ele-bg-primary"></div>
-          <span>模具信息</span>
+          <span>工装模具信息</span>
         </div>
         </div>
         <div class="ele-bg-primary ele-width"></div>
         <div class="ele-bg-primary ele-width"></div>
       </div>
       </div>
@@ -53,13 +53,40 @@
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
 
 
-        <el-col :span="8">
+        <el-col :span="8" class="rx-sc">
           <el-form-item label="芯棒直径" prop="mandrelDiameter">
           <el-form-item label="芯棒直径" prop="mandrelDiameter">
             <el-input v-model="form.mandrelDiameter">
             <el-input v-model="form.mandrelDiameter">
             </el-input>
             </el-input>
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
 
 
+        <el-col :span="24">
+         <div class="rx-sc">
+          <el-form-item label="长" prop="length">
+            <el-input v-model="form.length">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+
+          <el-form-item label="宽" prop="breadth">
+            <el-input v-model="form.breadth">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+
+          <el-form-item label="高" prop="altitude">
+            <el-input v-model="form.altitude">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+          <el-form-item label="直径" prop="diameter">
+            <el-input v-model="form.diameter">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+         </div>
+        </el-col>
+
       </el-row>
       </el-row>
     </el-form>
     </el-form>
   </div>
   </div>

+ 1 - 1
src/views/material/product/components/index-search.vue

@@ -15,7 +15,7 @@
           <el-input
           <el-input
             clearable
             clearable
             size="small"
             size="small"
-            v-model="where.keyWord"
+            v-model="where.searchKey"
             placeholder="型号、牌号"
             placeholder="型号、牌号"
           />
           />
         </el-form-item>
         </el-form-item>

+ 4 - 0
src/views/material/product/detail.vue

@@ -213,6 +213,10 @@ export default {
         ],
         ],
         measuringUnit: [
         measuringUnit: [
           { required: true, message: '请选择计量单位', trigger: 'change' }
           { required: true, message: '请选择计量单位', trigger: 'change' }
+        ],
+
+        weightUnit: [
+        { required: true, message: '请选择重量单位', trigger: 'change' }
         ]
         ]
       },
       },
       PathInfo: {},
       PathInfo: {},

+ 40 - 19
src/views/technology/production/components/user-search.vue

@@ -17,19 +17,21 @@
           <el-input clearable v-model="where.name" placeholder="请输入" />
           <el-input clearable v-model="where.name" placeholder="请输入" />
         </el-form-item>
         </el-form-item>
       </el-col>
       </el-col>
-      <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="性别:">
-          <el-select
-            clearable
-            v-model="where.sex"
-            placeholder="请选择"
-            class="ele-fluid"
-          >
-            <el-option label="男" :value="1" />
-            <el-option label="女" :value="2" />
-          </el-select>
-        </el-form-item>
-      </el-col> -->
+
+      <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 6 }">
+        <el-form-item label="控制码:" prop="controlId">
+            <el-select v-model="where.controlId" >
+              <el-option
+                v-for="item in controlList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+     
 
 
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <div class="ele-form-actions">
         <div class="ele-form-actions">
@@ -47,20 +49,24 @@
     </el-row>
     </el-row>
   </el-form>
   </el-form>
 </template>
 </template>
-
+  import control from '@/api/technology/control';
 <script>
 <script>
+  import control from '@/api/technology/control';
   export default {
   export default {
+
+  
     data() {
     data() {
       // 默认表单数据
       // 默认表单数据
       const defaultWhere = {
       const defaultWhere = {
         code: '',
         code: '',
-        name: ''
-        // nickname: '',
-        // sex: undefined
+        name: '',
+        controlId: null
+
       };
       };
       return {
       return {
         // 表单数据
         // 表单数据
-        where: { ...defaultWhere }
+        where: { ...defaultWhere },
+        controlList: [],
       };
       };
     },
     },
     computed: {
     computed: {
@@ -69,6 +75,9 @@
         return this.$store.state.theme.styleResponsive;
         return this.$store.state.theme.styleResponsive;
       }
       }
     },
     },
+    created() {
+      this.getControlList()
+    },
     methods: {
     methods: {
       /* 搜索 */
       /* 搜索 */
       search() {
       search() {
@@ -78,7 +87,19 @@
       reset() {
       reset() {
         this.where = { ...this.defaultWhere };
         this.where = { ...this.defaultWhere };
         this.search();
         this.search();
-      }
+      },
+
+      
+      getControlList(){
+         const params = {
+           pageNum: 1, size: -1
+         }
+         control.list().then(res=>{
+            this.controlList = res.list
+         })
+      },
+
+
     }
     }
   };
   };
 </script>
 </script>

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

@@ -2,7 +2,7 @@
   <div class="ele-body">
   <div class="ele-body">
     <el-card shadow="never">
     <el-card shadow="never">
       <!-- 搜索表单 -->
       <!-- 搜索表单 -->
-      <user-search @search="reload" />
+      <user-search @search="reload"  />
       <!-- 数据表格 -->
       <!-- 数据表格 -->
       <ele-pro-table
       <ele-pro-table
         ref="table"
         ref="table"

+ 2 - 2
vue.config.js

@@ -32,8 +32,8 @@ module.exports = {
     proxy: {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
       '/api': {
-        target: 'http://124.71.68.31:50001',
-        // target: 'http://192.168.1.139:18086',
+        // target: 'http://124.71.68.31:50001',
+        target: 'http://192.168.1.139:18086',
         // target: 'http://192.168.1.132:18086',
         // target: 'http://192.168.1.132:18086',
               // target: 'http://124.71.21.222:50001',
               // target: 'http://124.71.21.222:50001',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域