소스 검색

进口修改

qinbai 3 년 전
부모
커밋
895638873e

+ 17 - 4
src/components/procurement/market.vue

@@ -7,6 +7,7 @@
                @refresh-change="refreshChange"
                @selection-change="selectionChange"
                @search-change="searchChange"
+               @saveColumn="saveColumn"
                :page.sync="page"
                @on-load="onLoad">
     </avue-crud>
@@ -35,7 +36,7 @@
     },
     data(){
       return {
-        option:option,
+        option:{},
         loading:false,
         data:[],
         selectMarketList:[],
@@ -46,8 +47,8 @@
         },
       }
     },
-    created() {
-
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(42), option);
     },
     methods:{
       refreshChange(){
@@ -77,7 +78,19 @@
       },
       importMarket(){
         this.$emit('importMarket',this.selectMarketList);
-      }
+      },
+      //列保存触发
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(42),
+          this.option
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
     }
   }
 </script>

+ 17 - 4
src/components/procurement/purchase.vue

@@ -7,6 +7,7 @@
                @refresh-change="refreshChange"
                @selection-change="selectionChange"
                @search-change="searchChange"
+               @saveColumn="saveColumn"
                :page.sync="page"
                @on-load="onLoad">
     </avue-crud>
@@ -35,7 +36,7 @@
     },
     data(){
       return {
-        option:option,
+        option:{},
         loading:false,
         data:[],
         selectPromentList:[],
@@ -46,8 +47,8 @@
         },
       }
     },
-    created() {
-
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(45), option);
     },
     methods:{
       refreshChange(){
@@ -77,7 +78,19 @@
       },
       importProMent(){
         this.$emit('importProMent',this.selectPromentList);
-      }
+      },
+      //列保存触发
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(45),
+          this.option
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
     }
   }
 </script>

+ 0 - 2
src/util/contrastData.js

@@ -2,7 +2,6 @@
 export function contrastObj(newval, oldval) {
   let reg = /^[A-Za-z]+$/;
   for (let newitem in newval) {
-    console.log(newval, oldval)
     if (Object.keys(oldval).length == 0) {
       if (newval[newitem]) {
         return true
@@ -16,7 +15,6 @@ export function contrastObj(newval, oldval) {
         delete oldval.olditem
       }
       if (newitem == olditem) {
-        console.log(newitem, olditem)
         if (newval[newitem] != oldval[olditem]) {
           return true
         }

+ 1 - 1
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -1087,7 +1087,7 @@ export default {
           goodsNum.push(item.sort)
           purchaseAmount += Number(item.purchaseAmount)
         })
-        this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed()
+        // this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed()
         if (goodsNum.length == 0) {
           this.maxGoodsNum = 0;
         } else {

+ 17 - 3
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -53,6 +53,7 @@
             @row-save="rowSave"
             @row-click="handleRowClick"
             @row-update="rowUpdate"
+            @saveColumn="saveColumn"
             @row-del="rowDel"
           >
             <template slot-scope="{row}" slot="billNo">
@@ -283,7 +284,7 @@ export default {
       disabled: false,
       goodsDisable:false,
       marketDialog:false,
-      customerContact: customerContact,
+      customerContact: {},
       contactsForm: {},
       contactsData: [],
       storageIdDic:[],
@@ -435,7 +436,8 @@ export default {
       oldUpLoadData:[],
     }
   },
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(44), customerContact);
     getStorage().then(res =>{
       this.storageIdDic = res.data
     })
@@ -816,7 +818,19 @@ export default {
       }else{
         this.$emit("goBack");
       }
-    }
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(44),
+        this.customerContact
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   },
 }
 </script>

+ 26 - 8
src/views/importTrade/invoice/index.vue

@@ -15,6 +15,7 @@
                @selection-change="selectionChange"
                @current-change="currentChange"
                @size-change="sizeChange"
+               @saveColumn="saveColumn"
                @refresh-change="refreshChange"
                @on-load="onLoad">
       <template slot="menuLeft">
@@ -90,14 +91,19 @@ export default {
   components:{
     detailPage
   },
-  created() {
-    if(this.$route.query.form){
-      this.detailData={
-        form:this.$route.query.form
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(43), option);
+  },
+  activated() {
+    setTimeout(() => {
+      if(this.$route.query.form){
+        this.detailData={
+          form:this.$route.query.form
+        }
+        this.show = false;
+        this.$store.commit("GO_IN_DETAIL");
       }
-      this.show = false;
-      this.$store.commit("GO_IN_DETAIL");
-    }
+    }, 100);
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
@@ -221,7 +227,19 @@ export default {
     goBack() {
       this.detailData=this.$options.data().detailData
       this.show = true;
-    }
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(43),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 18 - 3
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -53,6 +53,7 @@
             @row-save="rowSave"
             @row-click="handleRowClick"
             @row-update="rowUpdate"
+            @saveColumn="saveColumn"
             @row-del="rowDel"
           >
             <template slot-scope="{row}" slot="billNo">
@@ -268,6 +269,7 @@ import { contrastObj,contrastList } from "@/util/contrastData";
 import { getOrgOrderNo } from "@/api/importTrade/salesContract"
 import  procurementDetail from "@/components/procurement/purchase";
 import _ from "lodash";
+import importInventory from "../../salesManagement/salesContract/config/importInventory.json";
 
 export default {
   name: "detailsPageEdit",
@@ -284,7 +286,7 @@ export default {
       form: {},
       disabled: false,
       receiptDisable:false,
-      customerContact: customerContact,
+      customerContact: {},
       contactsForm: {},
       contactsData: [],
       contractDic:[],
@@ -450,7 +452,8 @@ export default {
       oldUpLoadData:[],
     }
   },
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(41), customerContact);
     getStorage().then(res =>{
       this.storageIdDic = res.data
     })
@@ -840,7 +843,19 @@ export default {
       }else{
         this.$emit("goBack");
       }
-    }
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(41),
+        this.customerContact
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   },
 }
 </script>

+ 2 - 1
src/views/importTrade/receipt/index.vue

@@ -16,6 +16,7 @@
                @current-change="currentChange"
                @size-change="sizeChange"
                @refresh-change="refreshChange"
+               @saveColumn="saveColumn"
                @on-load="onLoad">
       <template slot="menuLeft">
         <el-button size="small"
@@ -91,7 +92,7 @@ export default {
     detailPage
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(38), option);
+    this.option = await this.getColumnData(this.getColumnName(40), option);
   },
   activated() {
     setTimeout(() => {

+ 22 - 22
src/views/purchase/contract/config/customerContact.json

@@ -53,20 +53,16 @@
       "width":150
     },
     {
-      "label": "数",
+      "label": "数",
       "prop": "purchaseQuantity",
       "index": 4,
       "width":120
-    },{
-      "label": "单价",
-      "prop": "price",
+    },
+    {
+      "label": "已收数量",
+      "prop": "actualQuantity",
       "index": 5,
-      "width":120
-    },{
-      "label": "合同金额",
-      "prop": "amount",
-      "index": 6,
-      "width":120,
+      "width":100,
       "rules": [
         {
           "required": false,
@@ -74,12 +70,16 @@
           "trigger": "blur"
         }
       ]
-    },
-    {
-      "label": "已收数量",
-      "prop": "actualQuantity",
+    },{
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
+      "index": 6,
+      "width":120
+    },{
+      "label": "发票净重(吨)",
+      "prop": "invoiceWeight",
       "index": 7,
-      "width":100,
+      "width":120,
       "rules": [
         {
           "required": false,
@@ -88,9 +88,14 @@
         }
       ]
     },{
-      "label": "发票净重(吨)",
-      "prop": "invoiceWeight",
+      "label": "单价",
+      "prop": "price",
       "index": 8,
+      "width":120
+    },{
+      "label": "合同金额",
+      "prop": "amount",
+      "index": 9,
       "width":120,
       "rules": [
         {
@@ -100,11 +105,6 @@
         }
       ]
     },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
-      "index": 9,
-      "width":120
-    },{
       "label": "货物详情",
       "prop": "itemDescription",
       "index": 10,

+ 12 - 12
src/views/purchase/contract/detailsPage.vue

@@ -475,7 +475,7 @@ export default {
             prop: 'orderNo',
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -640,8 +640,8 @@ export default {
               }
             ]
           },  {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+            label: '码单重量',
+            prop: 'billWeight',
             disabled: true,
             rules: [
               {
@@ -651,8 +651,8 @@ export default {
               }
             ]
           },  {
-            label: '码单重量',
-            prop: 'billWeight',
+            label: '发票重量',
+            prop: 'invoiceWeight',
             disabled: true,
             rules: [
               {
@@ -981,13 +981,13 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      const params ={
-        billWeight:0,
-        invoiceWeight:0,
-        price:0,
-        purchaseQuantity:0,
-      }
-      this.$refs.crudContact.rowCellAdd(params);
+      // const params ={
+      //   billWeight:"0",
+      //   invoiceWeight:"0",
+      //   price:"0",
+      //   purchaseQuantity:"0",
+      // }
+      this.$refs.crudContact.rowCellAdd();
       // this.dialogVisible = !this.dialogVisible
       // this.commodityData = false
     },

+ 1 - 3
src/views/salesManagement/salesContract/detailsPage.vue

@@ -830,7 +830,7 @@ export default {
           id:this.form.id,
           orderItemIds:this.selection.map(i=>{return i.id})
         }
-        if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        if(contrastObj(this.form,this.oldForm) || contrastList(this.importInventoryData,this.oldInventoryData)
           || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
         ){
           this.$confirm("您已改动数据,是否先保存在进行操作!", {
@@ -869,10 +869,8 @@ export default {
     },
     //提单号带出合同号
     bingOut(row){
-      console.log(row)
       getOrgOrderNo(row.billNo).then(res =>{
         if(res.data){
-          console.log(res.data[0])
           this.contractDic = res.data;
           row.orgOrderNo =  res.data[0].orderNo
           row.cntrNo =  res.data[0].cntrNo