QuKatie 3 éve
szülő
commit
7cda334eb4

+ 3 - 3
src/components/crop-dialog/main.vue

@@ -5,14 +5,14 @@
       top="5vh"
       class="el-dialogDeep"
       :visible.sync="portinfoVisible"
-      width="60%"
+      width="80%"
       append-to-body
       @closed="closed"
       v-dialog-drag
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <el-scrollbar>
               <basic-container>
                 <avue-tree
@@ -24,7 +24,7 @@
               </basic-container>
             </el-scrollbar>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="tableOption"
               :data="dataList"

+ 2 - 2
src/components/crop-select/configuration/mainList.json

@@ -1,6 +1,6 @@
 {
     "searchShow": true,
-    "searchMenuSpan": 16,
+    "searchMenuSpan": 8,
     "lazy": true,
     "align": "center",
     "border": true,
@@ -20,7 +20,7 @@
             "label": "名称",
             "prop": "cname",
             "search": true,
-            "searchSpan": 8,
+            "searchSpan": 16,
             "index": 2,
             "width":180
         },{

+ 3 - 3
src/components/crop-select/main.vue

@@ -32,7 +32,7 @@
     <el-dialog
       :title="title"
       :visible.sync="corpVisible"
-      width="60%"
+      width="80%"
       top="5vh"
       append-to-body
       @closed="closed"
@@ -41,7 +41,7 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <el-scrollbar>
               <basic-container>
                 <avue-tree
@@ -53,7 +53,7 @@
               </basic-container>
             </el-scrollbar>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="tableOption"
               :data="data"

+ 3 - 3
src/components/customer-dialog/main.vue

@@ -13,14 +13,14 @@
       title="客户"
       top="5vh"
       :visible.sync="portinfoVisible"
-      width="60%"
+      width="80%"
       append-to-body
       @closed="closed"
       v-dialog-drag
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <el-scrollbar>
               <basic-container>
                 <avue-tree
@@ -32,7 +32,7 @@
               </basic-container>
             </el-scrollbar>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="tableOption"
               :data="dataList"

+ 1 - 1
src/components/part-dialog/main.vue

@@ -3,7 +3,7 @@
     <el-dialog
       title="配件信息"
       :visible.sync="partVisible"
-      width="60%"
+      width="80%"
       top="5vh"
       append-to-body
       @closed="closed"

+ 3 - 3
src/components/port-info/index.vue

@@ -28,14 +28,14 @@
       title="港口信息"
       top="5vh"
       :visible.sync="portinfoVisible"
-      width="60%"
+      width="80%"
       append-to-body
       @closed="closed"
       v-dialog-drag
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <el-scrollbar>
               <basic-container>
                 <avue-tree
@@ -46,7 +46,7 @@
               </basic-container>
             </el-scrollbar>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               ref="crud"
               :data="data"

+ 21 - 97
src/components/price-Library/configuration/mainList.json

@@ -11,8 +11,7 @@
   "menuWidth": "180",
   "selection": true,
   "tip": false,
-  "column": [
-    {
+  "column": [{
       "label": "商品类别",
       "prop": "goodsTypeName",
       "search": true,
@@ -38,161 +37,86 @@
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "corpId",
+      "label": "采购价格",
+      "prop": "purchaseAmount",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "币别",
-      "prop": "currency",
+      "label": "供应商",
+      "prop": "corpId",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "width": 100,
+      "label": "税率",
+      "prop": "taxRate",
       "index": 5,
+      "width": 100,
       "overHidden": true
     },
     {
-      "label": "FOB系数",
-      "prop": "coefficient",
+      "label": "币别",
+      "prop": "currency",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "价格类型",
-      "prop": "billType",
+      "label": "推荐理由",
+      "prop": "referrerReason",
       "index": 7,
       "width": 100,
-      "overHidden": true,
-      "dicData": [],
-      "props": {
-        "label": "dictValue",
-        "value": "dictKey"
-      }
-    },
-    {
-      "label": "最新价格",
-      "prop": "price",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "美元价格",
-      "prop": "greenback",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "采购价格",
-      "prop": "purchaseAmount",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "税率",
-      "prop": "taxRate",
-      "index": 11,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "是否重点推荐",
-      "prop": "priorityReferrer",
-      "index": 12,
-      "width": 100,
       "overHidden": true
     },
     {
-      "label": "推荐理由",
-      "prop": "referrerReason",
-      "index": 13,
+      "label": "有效截止日期",
+      "prop": "endTime",
+      "index": 8,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格1",
       "prop": "priceOne",
-      "index": 14,
+      "index": 9,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史日期1",
       "prop": "priceOneTime",
-      "index": 15,
+      "index": 10,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格2",
       "prop": "priceTwo",
-      "index": 16,
+      "index": 11,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史日期2",
       "prop": "priceTwoTime",
-      "index": 17,
+      "index": 12,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格3",
       "prop": "priceThree",
-      "index": 18,
+      "index": 13,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史日期3",
       "prop": "priceThreeTime",
-      "index": 19,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 20,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "有效期开始",
-      "prop": "startTime",
-      "index": 21,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "有效期结束",
-      "prop": "endTime",
-      "index": 22,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "业务员",
-      "prop": "person",
-      "index": 23,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "状态",
-      "prop": "status",
-      "index": 24,
+      "index": 14,
       "width": 100,
       "overHidden": true
     }

+ 1 - 1
src/components/price-Library/main.vue

@@ -5,7 +5,7 @@
       class="el-dialogDeep"
       :visible.sync="visible"
       top="5vh"
-      width="60%"
+      width="80%"
       append-to-body
       @closed="closed"
       v-dialog-drag

+ 11 - 13
src/util/calculate.js

@@ -1,24 +1,22 @@
 import _ from "lodash";
-//采购价格乘以(1+客户FOB系数)计算出产品价格
-export function productCal(num, num2) {
+//采购价格加配件价计算出产品价格
+export function productCal(num, num2, num3) {
   //采购价格
   const price = Number(num ? num : 0)
-  //FOB
-  const fob = Number(num2 ? num2 : 0)
-  const sum = _.multiply(price, _.add(1, _.divide(fob, 100)))
+  //配件价
+  const fitting = Number(num2 ? num2 : 0)
+  //fob
+  const fob = Number(num3 ? num3 : 0)
+  const sum = _.multiply(_.add(price, fitting), _.add(1, _.divide(fob, 100)))
   return Number(sum).toFixed(2)
 }
-//产品价格+配件价格)乘以(1+客户FOB系数)/汇率 计算出销售价格
-export function sellingCal(num, num2, num3, num4) {
+//产品价格/汇率 计算出销售价格
+export function sellingCal(num, num2) {
   //产品价格
   const product = Number(num ? num : 0)
-  //配件价格
-  const fitting = Number(num2 ? num2 : 0)
-  //fob
-  const fob = Number(num3 ? num3 : 0)
   //汇率
-  const exchangeRate = Number(Number(num4) ? num4 : 1)
-  const sum = _.divide(_.multiply(_.add(product, fitting), _.add(1, _.divide(fob, 100))), exchangeRate)
+  const exchangeRate = Number(Number(num2) ? num2 : 1)
+  const sum = _.divide(product,exchangeRate)
   return Number(sum).toFixed(2)
 }
 //销售价格乘以数量加运费加保险乘以(折扣除以10) 计算出金额

+ 2 - 2
src/views/exportTrade/customerInquiry/config/commodity.json

@@ -1,7 +1,7 @@
 
 {
   "border": true,
-  "searchMenuSpan": 16,
+  "searchMenuSpan": 8,
   "index": true,
   "viewBtn": false,
   "editBtn": false,
@@ -23,7 +23,7 @@
     {
       "label": "商品名称",
       "search": true,
-      "searchSpan": 8,
+      "searchSpan": 16,
       "prop": "cname",
       "index": 2,
       "width": 100,

+ 27 - 36
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -417,7 +417,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -427,7 +427,7 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
                 <basic-container>
@@ -440,7 +440,7 @@
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -521,7 +521,7 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
-      oldExchange: 1,
+      oldExchange: null,
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       itemtypeList: [],
       switchDialog: false,
@@ -694,7 +694,14 @@ export default {
             label: "汇率",
             prop: "exchangeRate",
             span: 8,
-            row: true
+            row: true,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "箱型",
@@ -878,6 +885,7 @@ export default {
           if (e.dictValue == "USD") {
             this.form.exchangeRate = e.remark;
             this.oldform.exchangeRate = e.remark;
+            this.oldExchange = e.remark;
           }
         });
       }
@@ -910,13 +918,12 @@ export default {
       this.form.coefficient = row.coefficient;
       if (this.data.length > 0) {
         this.data.forEach(e => {
-          e.productPrice = productCal(e.purchaseAmount, this.form.coefficient);
-          e.price = sellingCal(
-            e.productPrice,
+          e.productPrice = productCal(
+            e.purchaseAmount,
             e.partsPrice,
-            this.form.coefficient,
-            this.form.exchangeRate
+            this.form.coefficient
           );
+          e.price = sellingCal(e.productPrice, this.form.exchangeRate);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -999,12 +1006,11 @@ export default {
       // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
       this.data[index].productPrice = productCal(
         this.data[index].purchaseAmount,
+        this.data[index].partsPrice,
         this.form.coefficient
       );
       this.data[index].price = sellingCal(
         this.data[index].productPrice,
-        this.data[index].partsPrice,
-        this.form.coefficient,
         this.form.exchangeRate
       );
       this.data[index].amount = amountCal(
@@ -1056,13 +1062,12 @@ export default {
       });
     },
     purchaseAmountChange(row) {
-      row.productPrice = productCal(row.purchaseAmount, this.form.coefficient);
-      row.price = sellingCal(
-        row.productPrice,
+      row.productPrice = productCal(
+        row.purchaseAmount,
         row.partsPrice,
-        this.form.coefficient,
-        this.form.exchangeRate
+        this.form.coefficient
       );
+      row.price = sellingCal(row.productPrice, this.form.exchangeRate);
       row.amount = amountCal(
         row.price,
         row.orderQuantity,
@@ -1098,12 +1103,7 @@ export default {
             this.oldExchange,
             this.form.exchangeRate
           );
-          e.price = sellingCal(
-            e.productPrice,
-            e.partsPrice,
-            this.form.coefficient,
-            this.form.exchangeRate
-          );
+          e.price = sellingCal(e.productPrice, this.form.exchangeRate);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -1120,12 +1120,7 @@ export default {
         this.data.forEach(e => {
           e.freight = transformCal(e.freight, this.oldExchange, row);
           e.insurance = transformCal(e.insurance, this.oldExchange, row);
-          e.price = sellingCal(
-            e.productPrice,
-            e.partsPrice,
-            this.form.coefficient,
-            row
-          );
+          e.price = sellingCal(e.productPrice, row);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -1337,11 +1332,9 @@ export default {
           partsPrice: 0,
           itemType: e.specs,
           tradeTerms: null,
-          productPrice: productCal(e.purchaseAmount, this.form.coefficient),
+          productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
           price: sellingCal(
-            productCal(e.purchaseAmount, this.form.coefficient),
-            0,
-            this.form.coefficient,
+            productCal(e.purchaseAmount, 0, this.form.coefficient),
             this.form.exchangeRate
           ),
           orderQuantity: 1,
@@ -1349,9 +1342,7 @@ export default {
           freight: 0,
           discount: null,
           amount: sellingCal(
-            productCal(e.purchaseAmount, this.form.coefficient),
-            0,
-            this.form.coefficient,
+            productCal(e.purchaseAmount, 0, this.form.coefficient),
             this.form.exchangeRate
           ),
           taxRate: 0,

+ 31 - 91
src/views/exportTrade/invoice/config/commodity.json

@@ -1,136 +1,76 @@
 
 {
-  "calcHeight": 100,
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
   "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
+  "tip": false,
   "column": [
     {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 1,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
+      "overHidden": true
     },
     {
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
       "prop": "cname",
-      "slot": true,
+      "index": 2,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }],
-      "width": 100
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true,
-      "width": 100
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true,
-      "width": 100
+      "overHidden": true
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
       "slot": true,
-      "width": 100
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true,
-      "width": 100
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 6 - 5
src/views/exportTrade/invoice/detailsPage.vue

@@ -197,7 +197,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -207,16 +207,16 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
-                <basic-container style="margin-top:45px">
-                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                <basic-container>
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -276,6 +276,7 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
       configuration2: {
         multipleChoices: false,
         multiple: false,

+ 32 - 79
src/views/exportTrade/purchaseContract/config/commodity.json

@@ -1,123 +1,76 @@
 
 {
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
   "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
+  "tip": false,
   "column": [
     {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 1,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
+      "overHidden": true
     },
     {
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
       "prop": "cname",
-      "slot": true,
+      "index": 2,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true
+      "overHidden": true
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24
+      "slot": true,
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 6 - 5
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -206,7 +206,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -216,16 +216,16 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
-                <basic-container style="margin-top:45px">
-                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                <basic-container>
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -312,6 +312,7 @@ export default {
       }
     };
     return {
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
       switchDialog: false,
       form: {
         orderStatus: "录入"

+ 32 - 80
src/views/exportTrade/purchaseInquiry/config/commodity.json

@@ -1,124 +1,76 @@
 
 {
-  "calcHeight": 80,
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
   "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
+  "tip": false,
   "column": [
     {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 1,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
+      "overHidden": true
     },
     {
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
       "prop": "cname",
-      "slot": true,
+      "index": 2,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true
+      "overHidden": true
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24
+      "slot": true,
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 7 - 12
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -212,7 +212,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -222,16 +222,16 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
-                <basic-container style="margin-top:45px">
-                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                <basic-container>
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -283,18 +283,13 @@ import customerDialog from "@/components/customer-dialog/main";
 import reportDialog from "@/components/report-dialog/main";
 import { micrometerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
-import {
-  productCal,
-  sellingCal,
-  amountCal,
-  transformCal,
-  purchaseCal
-} from "@/util/calculate";
+import {purchaseCal} from "@/util/calculate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
   data() {
     return {
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
       switchDialog: false,
       form: {
         orderStatus: "录入",

+ 32 - 79
src/views/exportTrade/receipt/config/commodity.json

@@ -1,123 +1,76 @@
 
 {
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
   "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
+  "tip": false,
   "column": [
     {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 1,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
+      "overHidden": true
     },
     {
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
       "prop": "cname",
-      "slot": true,
+      "index": 2,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true
+      "overHidden": true
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24
+      "slot": true,
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 6 - 5
src/views/exportTrade/receipt/detailsPage.vue

@@ -182,7 +182,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -192,16 +192,16 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
-                <basic-container style="margin-top:45px">
-                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                <basic-container>
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -289,6 +289,7 @@ export default {
       }
     };
     return {
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
       configuration2: {
         multipleChoices: false,
         multiple: false,

+ 2 - 2
src/views/exportTrade/salesContract/config/commodity.json

@@ -1,7 +1,7 @@
 
 {
   "border": true,
-  "searchMenuSpan": 16,
+  "searchMenuSpan": 8,
   "index": true,
   "viewBtn": false,
   "editBtn": false,
@@ -23,7 +23,7 @@
     {
       "label": "商品名称",
       "search": true,
-      "searchSpan": 8,
+      "searchSpan": 16,
       "prop": "cname",
       "index": 2,
       "width": 100,

+ 25 - 35
src/views/exportTrade/salesContract/detailsPage.vue

@@ -462,7 +462,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -472,7 +472,7 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
                 <basic-container>
@@ -485,7 +485,7 @@
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -744,7 +744,14 @@ export default {
             label: "汇率",
             prop: "exchangeRate",
             span: 8,
-            row: true
+            row: true,
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "箱型",
@@ -1018,13 +1025,12 @@ export default {
       this.form.coefficient = row.coefficient;
       if (this.data.length > 0) {
         this.data.forEach(e => {
-          e.productPrice = productCal(e.purchaseAmount, this.form.coefficient);
-          e.price = sellingCal(
-            e.productPrice,
+          e.productPrice = productCal(
+            e.purchaseAmount,
             e.partsPrice,
-            this.form.coefficient,
-            this.form.exchangeRate
+            this.form.coefficient
           );
+          e.price = sellingCal(e.productPrice, this.form.exchangeRate);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -1066,12 +1072,11 @@ export default {
       // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
       this.data[index].productPrice = productCal(
         this.data[index].purchaseAmount,
+        this.data[index].partsPrice,
         this.form.coefficient
       );
       this.data[index].price = sellingCal(
         this.data[index].productPrice,
-        this.data[index].partsPrice,
-        this.form.coefficient,
         this.form.exchangeRate
       );
       this.data[index].amount = amountCal(
@@ -1146,13 +1151,12 @@ export default {
       });
     },
     purchaseAmountChange(row) {
-      row.productPrice = productCal(row.purchaseAmount, this.form.coefficient);
-      row.price = sellingCal(
-        row.productPrice,
+      row.productPrice = productCal(
+        row.purchaseAmount,
         row.partsPrice,
-        this.form.coefficient,
-        this.form.exchangeRate
+        this.form.coefficient
       );
+      row.price = sellingCal(row.productPrice, this.form.exchangeRate);
       row.amount = amountCal(
         row.price,
         row.orderQuantity,
@@ -1205,12 +1209,7 @@ export default {
             this.oldExchange,
             this.form.exchangeRate
           );
-          e.price = sellingCal(
-            e.productPrice,
-            e.partsPrice,
-            this.form.coefficient,
-            this.form.exchangeRate
-          );
+          e.price = sellingCal(e.productPrice, this.form.exchangeRate);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -1227,12 +1226,7 @@ export default {
         this.data.forEach(e => {
           e.freight = transformCal(e.freight, this.oldExchange, row);
           e.insurance = transformCal(e.insurance, this.oldExchange, row);
-          e.price = sellingCal(
-            e.productPrice,
-            e.partsPrice,
-            this.form.coefficient,
-            row
-          );
+      e.price = sellingCal(e.productPrice, row);
           e.amount = amountCal(
             e.price,
             e.orderQuantity,
@@ -1411,11 +1405,9 @@ export default {
           partsPrice: 0,
           itemType: e.specs,
           tradeTerms: null,
-          productPrice: productCal(e.purchaseAmount, this.form.coefficient),
+          productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
           price: sellingCal(
-            productCal(e.purchaseAmount, this.form.coefficient),
-            0,
-            this.form.coefficient,
+            productCal(e.purchaseAmount, 0, this.form.coefficient),
             this.form.exchangeRate
           ),
           orderQuantity: 1,
@@ -1423,9 +1415,7 @@ export default {
           freight: 0,
           discount: null,
           amount: sellingCal(
-            productCal(e.purchaseAmount, this.form.coefficient),
-            0,
-            this.form.coefficient,
+            productCal(e.purchaseAmount, 0, this.form.coefficient),
             this.form.exchangeRate
           ),
           taxRate: 0,

+ 32 - 79
src/views/exportTrade/shippingInquiry/config/commodity.json

@@ -1,123 +1,76 @@
 
 {
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
   "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
+  "tip": false,
   "column": [
     {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 1,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
+      "overHidden": true
     },
     {
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
       "prop": "cname",
-      "slot": true,
+      "index": 2,
       "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true
+      "overHidden": true
     },
     {
       "label": "规格尺寸",
       "prop": "specs",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品类别",
       "prop": "category",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "产品分类",
       "prop": "categoryitem",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "供应商",
       "prop": "providers",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "计量单位",
       "prop": "unit",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "包装单位",
       "prop": "packgeunit",
-      "slot": true
-    },
-    {
-      "label": "商品图片",
-      "prop": "url",
-      "type": "upload",
-      "listType": "picture-img",
-      "dataType": "string",
-      "action": "/api/blade-resource/oss/endpoint/put-file",
-      "propsHttp": {
-        "res": "data",
-        "url": "link"
-      },
-      "hide": true,
-      "span": 24
+      "slot": true,
+      "width": 100,
+      "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 6 - 5
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -144,7 +144,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="dialogVisible"
-      width="60%"
+      width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -154,16 +154,16 @@
     >
       <span>
         <el-row>
-          <el-col :span="5">
+          <el-col :span="4">
             <div>
               <el-scrollbar>
-                <basic-container style="margin-top:45px">
-                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                <basic-container>
+                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
                 </basic-container>
               </el-scrollbar>
             </div>
           </el-col>
-          <el-col :span="19">
+          <el-col :span="20">
             <avue-crud
               :option="goodsOption"
               :table-loading="loading"
@@ -221,6 +221,7 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
       switchDialog: false,
       form: {},
       disabled: false,