Przeglądaj źródła

修改bom 用量

chencc 1 rok temu
rodzic
commit
3977e84523

+ 24 - 21
src/views/material/BOMmanage/components/detailedList.vue

@@ -2,8 +2,8 @@
   <div class="ele-body">
 
     <BOMSearch @search="reload" :statusOpt="statusOpt" />
-    <ele-pro-table ref="table" :key="tableKey" :columns="columns" :pagination="pagination" :header-cell-style="headerCellStyle" :datasource="datasource" class="dict-table"
-      tool-class="ele-toolbar-actions">
+    <ele-pro-table ref="table" :key="tableKey" :columns="columns" :pagination="pagination"
+      :header-cell-style="headerCellStyle" :datasource="datasource" class="dict-table" tool-class="ele-toolbar-actions">
       <template v-slot:toolbar>
         <div class="toolbar_box">
           <div v-if="attributeData.status != 1">
@@ -21,6 +21,13 @@
         </div>
       </template>
       <!-- 用量 -->
+      <template v-slot:dosageHead="{ column }">
+        <div>
+          <span class="is-required">{{ column.label }}</span>
+        </div>
+
+      </template>
+
       <template v-slot:dosage="{ row }">
 
         <el-input v-model="row.dosage" placeholder="请输入" size="mini" style="width: 68px">
@@ -104,9 +111,9 @@
       </template>
 
       <!-- 表头工具栏 -->
-      <template v-slot:action="{ row,$index }">
+      <template v-slot:action="{ row, $index }">
         <el-link v-if="attributeData.status != 1" type="danger" :underline="false" icon="el-icon-delete"
-          @click="handleDel(row,$index)">
+          @click="handleDel(row, $index)">
           删除
         </el-link>
       </template>
@@ -143,8 +150,8 @@ export default {
 
   data() {
     return {
-      pagination:{
-        tableTotal:0
+      pagination: {
+        tableTotal: 0
       },
       // 表格列配置
       columns: [
@@ -200,9 +207,9 @@ export default {
         {
           prop: 'dosage',
           slot: 'dosage',
-          label: '用量*',
+          label: '用量',
           width: 100,
- 
+          headerSlot: "dosageHead"
         },
 
         {
@@ -298,6 +305,7 @@ export default {
           label: '加工',
           value: 1
         },
+
         {
           label: '装配',
           value: 3
@@ -441,14 +449,7 @@ export default {
 
 
   methods: {
-    headerCellStyle({ column }) {
-      if (column.property === 'dosage') {
-        return {
-          color: 'red',
-        }
-      }
-      return {}
-    },
+
     rootCategoryLevelIdText(v) {
       if (v) {
         let a = this.rootCategoryLevelIdList.find(item => item.value == v)
@@ -475,7 +476,7 @@ export default {
         this.list = [...list];
         this.listTow = JSON.parse(JSON.stringify(this.list));
 
-       
+
         this.$refs.table.setData(this.list)
         this.updateFn()
         this.tableKey = Date.now();
@@ -598,6 +599,8 @@ export default {
         status: 1
       };
       contactList(param).then((res) => {
+        console.log(res, 'res11111111111');
+
         this.gysList = res.list;
       });
     },
@@ -668,11 +671,11 @@ export default {
           })
 
           this.list = [...data, ...this.$refs.table.getData()];
-  
+
           this.$refs.table._data.tableTotal = this.list.length;
 
 
-  
+
           this.$refs.table.setData(this.list)
         })
 
@@ -719,7 +722,7 @@ export default {
         });
       });
     },
-    
+
 
     bomClose() {
       this.$nextTick(() => {
@@ -729,7 +732,7 @@ export default {
       });
     },
 
-    handleDel(row,i) {
+    handleDel(row, i) {
       this.$confirm('是否确认删除?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',

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

@@ -180,6 +180,7 @@
             <el-form-item :label="f.label">
               <template>
                 <div class="form-line">
+    
                   <component :is="f.tagType" v-model="form.extField[f.prop]" :disabled="f.extAttribute?.disabled"
                     clearable :isProhibit="f.modelType == 'dict' ? f.extAttribute?.disabled : false
                       " :dictName="f.modelType == 'dict' ? f.label : ''"></component>

+ 2 - 2
vue.config.js

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