wsx 10 сар өмнө
parent
commit
88b350daad

+ 48 - 3
src/views/salesServiceManagement/components/invoiceDialog.vue

@@ -106,7 +106,13 @@
         tool-class="ele-toolbar-form"
         :selection.sync="selection"
         height="400px"
-      ></ele-pro-table>
+      >
+        <template v-slot:componentAttribute="{ row }">
+          <div>
+            {{ getDictValueFn(row.componentAttribute) }}
+          </div>
+        </template>
+      </ele-pro-table>
     </div>
     <div slot="footer" class="footer">
       <el-button type="primary" @click="submitAdd">确认</el-button>
@@ -222,7 +228,8 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'productCategoryName',
+            slot: 'componentAttribute',
+            prop: 'componentAttribute',
             label: '类型',
             align: 'center',
             showOverflowTooltip: true
@@ -284,7 +291,25 @@
         ],
         contactId: '',
         goodsShow: false,
-        searchForm: {}
+        searchForm: {},
+        sxtList: [
+          {
+            label: '自制件',
+            value: 1
+          },
+          {
+            label: '采购件',
+            value: 2
+          },
+          {
+            label: '外协件',
+            value: 3
+          },
+          {
+            label: '受托件',
+            value: 4
+          }
+        ]
       };
     },
     created() {},
@@ -405,15 +430,20 @@
         this.infoData = res;
         this.productList = res?.outInDetailList?.map(
           (productItem, productIndex) => {
+            console.log(productItem);
             return {
               ...productItem,
               outInDetailRecordRequestList:
                 productItem.outInDetailRecordRequestList.map((packingItem) => {
                   return {
                     ...packingItem,
+                    componentAttribute: productItem.componentAttribute,
+
                     categoryName: productItem.categoryName,
                     categoryCode: productItem.categoryCode,
+                    productBrand: productItem.brandNum,
                     categoryModel: productItem.categoryModel,
+                    packingSpecification: productItem.specification,
                     produceTime: packingItem.produceTime || null,
                     shipmentDate: res.createTime || null,
                     guaranteePeriodDeadline: this.getTime(res.createTime)[0],
@@ -442,6 +472,21 @@
         let warrantyStatus =
           new Date(time).getTime() > new Date().getTime() ? 0 : 1;
         return [time, warrantyStatus];
+      },
+      findFn(e) {
+        return this.sxtList.find((item) => item.value == Number(e));
+      },
+      getDictValueFn(e) {
+        if (e.length) {
+          let arr = [];
+          e.map((v) => {
+            arr.push(this.findFn(v)?.label);
+          });
+
+          return arr.join(',');
+        } else {
+          return '';
+        }
       }
     }
   };

+ 6 - 12
vue.config.js

@@ -28,24 +28,18 @@ module.exports = {
     }
   },
   devServer: {
-    headers: {			
+    headers: {
       // 允许跨域访问子应用页面
-      'Access-Control-Allow-Origin': '*',
+      'Access-Control-Allow-Origin': '*'
     },
     // 代理跨域的配置
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
-        // target: 'http://192.168.3.51:18086', // 测试环境
-        // target: 'http://124.71.68.31:50001',
-        // target: 'http://192.168.1.139:18086', // 粟
-        // target: 'http://192.168.1.132:18086', // 徐1
-        // target: 'http://192.168.1.134:18086', //徐2
-        target: 'http://192.168.1.105:18086',
-        // target: 'http://192.168.1.103:18086',
-        // target: 'http://192.168.1.251:18186',
-        // target: 'http://192.168.1.105:18086',
-        // target: 'http://192.168.1.114:18086',
+        target: 'http://192.168.1.251:18086',//开发
+        // target: 'http://192.168.1.251:18186',//测试
+        // target: 'http://192.168.1.23:18086',//罗
+        // target: 'http://192.168.1.144:18086',//付
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''