Просмотр исходного кода

Merge remote-tracking branch 'origin/dev' into dev

lichao 3 лет назад
Родитель
Сommit
99f6907ad9
33 измененных файлов с 432 добавлено и 1196 удалено
  1. 0 0
      public/cdn/avue/2.8.18/avue.min.js
  2. 11 0
      src/api/basicData/customerInquiry.js
  3. 11 0
      src/api/maintenance/priceLibrary.js
  4. 1 0
      src/components/selectComponent/customerSelect.vue
  5. 18 0
      src/enums/tax-rate.js
  6. 4 2
      src/util/contrastData.js
  7. 98 18
      src/views/exportTrade/customerInquiry/config/priceLibrary.json
  8. 0 1
      src/views/exportTrade/customerInquiry/detailsPage.vue
  9. 0 19
      src/views/exportTrade/customerInquiry/index.vue
  10. 50 13
      src/views/exportTrade/customerInquiry/priceLibrary.vue
  11. 0 19
      src/views/exportTrade/invoice/detailsPage.vue
  12. 0 19
      src/views/exportTrade/invoice/index.vue
  13. 0 19
      src/views/exportTrade/purchaseContract/detailsPage.vue
  14. 0 19
      src/views/exportTrade/purchaseContract/index.vue
  15. 0 19
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  16. 0 19
      src/views/exportTrade/purchaseInquiry/index.vue
  17. 0 19
      src/views/exportTrade/receipt/detailsPage.vue
  18. 0 19
      src/views/exportTrade/receipt/index.vue
  19. 0 19
      src/views/exportTrade/salesContract/detailsPage.vue
  20. 0 19
      src/views/exportTrade/salesContract/index.vue
  21. 0 19
      src/views/exportTrade/shippingInquiry/detailsPage.vue
  22. 0 19
      src/views/exportTrade/shippingInquiry/index.vue
  23. 20 4
      src/views/importTrade/invoice/detailsPageEdit.vue
  24. 0 136
      src/views/maintenance/priceLibrary/config/commodity.json
  25. 0 178
      src/views/maintenance/priceLibrary/config/customerContact.json
  26. 21 1
      src/views/maintenance/priceLibrary/config/mainList.json
  27. 0 436
      src/views/maintenance/priceLibrary/detailsPage.vue
  28. 49 31
      src/views/maintenance/priceLibrary/index.vue
  29. 0 1
      src/views/purchase/contract/config/customerContact.json
  30. 36 22
      src/views/purchase/contract/detailsPage.vue
  31. 78 84
      src/views/purchase/stockBill/config/mainList.json
  32. 14 13
      src/views/purchase/stockBill/index.vue
  33. 21 9
      src/views/salesManagement/salesContract/detailsPage.vue

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
public/cdn/avue/2.8.18/avue.min.js


+ 11 - 0
src/api/basicData/customerInquiry.js

@@ -132,4 +132,15 @@ export const getPricebank = (current, size, params) => {
       size,
     }
   })
+}
+//商品类别列表查询
+export const getGoodstype = (current, size) => {
+  return request({
+    url: '/api/blade-client/goodstype/page',
+    method: 'get',
+    params: {
+      current,
+      size,
+    }
+  })
 }

+ 11 - 0
src/api/maintenance/priceLibrary.js

@@ -121,3 +121,14 @@ export function gainUser(query) {
     params: query
   })
 }
+//商品类别列表查询
+export const getGoodstype = (current, size) => {
+  return request({
+    url: '/api/blade-client/goodstype/page',
+    method: 'get',
+    params: {
+      current,
+      size,
+    }
+  })
+}

+ 1 - 0
src/components/selectComponent/customerSelect.vue

@@ -11,6 +11,7 @@
         :collapse-tags="configuration.collapseTags?configuration.collapseTags:false"
         filterable
         remote
+        clearable
         @change="changeName"
         :remote-method="remoteMethod"
     >

+ 18 - 0
src/enums/tax-rate.js

@@ -0,0 +1,18 @@
+//税率
+export const taxRates = [{
+  code: 3,
+  name: '3%'
+}, {
+  code: 6,
+  name: '6%'
+}, {
+  code: 9,
+  name: '9%'
+}, {
+  code: 13,
+  name: '13%'
+}]
+// 订单状态过滤器
+export const taxRateFormat = (num) => {
+  return Number(num?num:0)+'%'
+}

+ 4 - 2
src/util/contrastData.js

@@ -25,8 +25,10 @@ export function contrastList(newlist, oldlist) {
           delete oldlist[i].olditem
         }
         if (newitem == olditem) {
-          if (newlist[i][newitem] != oldlist[i][olditem]) {
-            return true
+          if(!(newlist[i][newitem] instanceof Array)){
+            if (newlist[i][newitem] != oldlist[i][olditem]) {
+              return true
+            }
           }
         }
       }

+ 98 - 18
src/views/exportTrade/customerInquiry/config/priceLibrary.json

@@ -1,17 +1,20 @@
 {
   "border": true,
+  "searchMenuSpan": 8,
   "index": true,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
   "addBtn": false,
-  "menu":false,
+  "menu": false,
   "align": "center",
   "menuWidth": "180",
   "selection": true,
-  "tip":false,
+  "tip": false,
   "column": [{
       "label": "商品名称",
+      "search": true,
+      "searchSpan": 8,
       "prop": "cname",
       "index": 1,
       "width": 100,
@@ -33,7 +36,7 @@
     },
     {
       "label": "供应商",
-      "prop": "corpName",
+      "prop": "corpId",
       "index": 4,
       "width": 100,
       "overHidden": true
@@ -46,86 +49,163 @@
       "overHidden": true
     },
     {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 100,
+      "index": 6,
+      "overHidden": true
+    },
+    {
       "label": "FOB系数",
       "prop": "coefficient",
-      "index": 6,
+      "index": 7,
       "width": 100,
       "overHidden": true
     },
     {
+      "label": "价格类型",
+      "prop": "billType",
+      "index": 8,
+      "width": 100,
+      "overHidden": true,
+      "dicData": [],
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      }
+    },
+    {
       "label": "最新价格",
       "prop": "price",
-      "index": 7,
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "美元价格",
+      "prop": "greenback",
+      "index": 10,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchaseAmount",
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 12,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "search": true,
+      "searchSpan": 8,
+      "index": 13,
+      "width": 100,
+      "type": "select",
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "value": "cname",
+        "label": "cname"
+      },
+      "overHidden": true
+    },
+    {
+      "label": "是否重点推荐",
+      "prop": "priorityReferrer",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "推荐理由",
+      "prop": "referrerReason",
+      "index": 15,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格1",
       "prop": "priceOne",
-      "index": 8,
+      "index": 16,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格1日期",
+      "label": "历史日期1",
       "prop": "priceOneTime",
-      "index": 9,
+      "index": 17,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格2",
       "prop": "priceTwo",
-      "index": 10,
+      "index": 18,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格2日期",
+      "label": "历史日期2",
       "prop": "priceTwoTime",
-      "index": 11,
+      "index": 19,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格3",
       "prop": "priceThree",
-      "index": 12,
+      "index": 20,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格3日期",
+      "label": "历史日期3",
       "prop": "priceThreeTime",
-      "index": 13,
+      "index": 21,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 14,
+      "index": 22,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "有效期开始",
       "prop": "startTime",
-      "index": 15,
+      "index": 23,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "有效期结束",
       "prop": "endTime",
-      "index": 16,
+      "index": 24,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "业务员",
       "prop": "person",
-      "index": 17,
+      "index": 25,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "状态",
+      "prop": "status",
+      "index": 26,
       "width": 100,
       "overHidden": true
     }

+ 0 - 1
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -1248,7 +1248,6 @@ export default {
     //返回列表
     backToList() {
       let orderFeesList = this.$refs.feeInfo.submitData();
-      console.log(this.data, this.olddata);
       if (
         contrastObj(this.form, this.oldform) ||
         contrastList(this.data, this.olddata) ||

+ 0 - 19
src/views/exportTrade/customerInquiry/index.vue

@@ -159,25 +159,6 @@ export default {
       this.findObject(this.option.column, "orderStatus").dicData =
         res.data.data;
     });
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     gainUser().then(res => {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });

+ 50 - 13
src/views/exportTrade/customerInquiry/priceLibrary.vue

@@ -15,6 +15,8 @@
           :data="data"
           :option="tableOption"
           :page.sync="page"
+          :search.sync="search"
+          @search-change="searchChange"
           @current-change="currentChange"
           @size-change="sizeChange"
           @refresh-change="refreshChange"
@@ -24,11 +26,22 @@
           :cell-style="cellStyle"
           :table-loading="loading"
         >
+          <template slot="cnameSearch">
+            <goods-select
+              v-model="search.cname"
+              :configuration="goodsConfiguration"
+            />
+          </template>
         </avue-crud>
       </span>
       <span slot="footer" class="dialog-footer">
         <el-button @click="visible = false">取 消</el-button>
-        <el-button type="primary" @click="importData" :disabled="selectionList.length==0">导 入</el-button>
+        <el-button
+          type="primary"
+          @click="importData"
+          :disabled="selectionList.length == 0"
+          >导 入</el-button
+        >
       </span>
     </el-dialog>
   </div>
@@ -36,7 +49,7 @@
 
 <script>
 import option from "./config/priceLibrary.json";
-import { getPricebank } from "@/api/basicData/customerInquiry";
+import { getPricebank, getGoodstype } from "@/api/basicData/customerInquiry";
 import { dateFormat } from "@/util/date";
 import _ from "lodash";
 export default {
@@ -45,6 +58,7 @@ export default {
       visible: false,
       loading: true,
       data: [],
+      search: {},
       tableOption: option,
       height: window.innerHeight - 500,
       page: {
@@ -52,23 +66,36 @@ export default {
         total: 0,
         pageSize: 10
       },
-      selectionList: []
+      selectionList: [],
+      goodsConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+        clearable: true
+      }
     };
   },
   props: {},
   filters: {},
-  created() {},
+  created() {
+    getGoodstype(1, 500).then(res => {
+      this.findObject(this.tableOption.column, "goodsTypeName").dicData =
+        res.data.data.records;
+    });
+  },
   methods: {
     init() {
       this.visible = true;
-      this.getList();
+      this.getList(this.page, this.search);
     },
     cellStyle() {
       return "padding:0;height:40px;";
     },
     importData() {
       this.visible = false;
-      this.$emit('importLibray',this.selectionList)
+      this.$emit("importLibray", this.selectionList);
     },
     currentChange(val) {
       this.page.currentPage = val;
@@ -77,17 +104,27 @@ export default {
       this.page.currentPage = 1;
       this.page.pageSize = val;
     },
-    getList() {
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      if (params.dateValidity) {
+        params.dateValidityStart = params.dateValidity[0];
+        params.dateValidityEnd = params.dateValidity[1];
+      }
+      delete params.dateValidity;
+      this.getList(this.page, params);
+      done();
+    },
+    getList(page, params) {
       const data = {
+        ...params,
         billType: "CG",
         statusTime: dateFormat(new Date(), "yyyy-MM-dd")
       };
       this.loading = true;
-      getPricebank(this.page.currentPage, this.page.pageSize, data)
+      getPricebank(page.currentPage, page.pageSize, data)
         .then(res => {
           this.data = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
-          console.log(this.page.total);
           if (this.page.total > 0) {
             this.tableOption.height = window.innerHeight - 500;
           }
@@ -96,11 +133,11 @@ export default {
           this.loading = false;
         });
     },
-    selectionChange(list){
-      this.selectionList=list
+    selectionChange(list) {
+      this.selectionList = list;
     },
-    closed(){
-       this.$refs.crud.toggleSelection();
+    closed() {
+      this.$refs.crud.toggleSelection();
     }
   },
   watch: {}

+ 0 - 19
src/views/exportTrade/invoice/detailsPage.vue

@@ -491,29 +491,10 @@ export default {
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
-    let _this = this;
     this.getWorkDicts("product_properties").then(res => {
       this.findObject(this.tableOption.column, "itemProp").dicData =
         res.data.data;
     });
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "contractAmount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.contractAmount ? row.contractAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("unit").then(res => {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });

+ 0 - 19
src/views/exportTrade/invoice/index.vue

@@ -148,25 +148,6 @@ export default {
     if (this.$route.query.pageType == "Generate") {
       this.newAdd();
     }
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     gainUser().then(res => {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });

+ 0 - 19
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -595,25 +595,6 @@ export default {
       this.insuranceOption.disabled = true;
       this.markOption.disabled = true;
     }
-    let _this = this;
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "amount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.amount ? row.amount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("product_properties").then(res => {
       this.findObject(this.tableOption.column, "itemProp").dicData =
         res.data.data;

+ 0 - 19
src/views/exportTrade/purchaseContract/index.vue

@@ -147,25 +147,6 @@ export default {
   components: { detailPage },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(2), option);
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("payment_term").then(res => {
       this.findObject(this.option.column, "paymentType").dicData =
         res.data.data;

+ 0 - 19
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -446,25 +446,6 @@ export default {
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
-    let _this = this;
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "amount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.amount ? row.amount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("product_properties").then(res => {
       this.findObject(this.tableOption.column, "itemProp").dicData =
         res.data.data;

+ 0 - 19
src/views/exportTrade/purchaseInquiry/index.vue

@@ -134,25 +134,6 @@ export default {
   components: { detailPage },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(10), option);
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     getPorts().then(res => {
       this.findObject(this.option.column, "portOfLoad").dicData = res.data;
       this.findObject(this.option.column, "portOfDestination").dicData =

+ 0 - 19
src/views/exportTrade/receipt/detailsPage.vue

@@ -502,25 +502,6 @@ export default {
     if (this.detailData.status == 1) {
       this.option.disabled = true;
     }
-    let _this = this;
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "contractAmount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.contractAmount ? row.contractAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("product_properties").then(res => {
       this.findObject(this.tableOption.column, "itemProp").dicData =
         res.data.data;

+ 0 - 19
src/views/exportTrade/receipt/index.vue

@@ -132,25 +132,6 @@ export default {
     if (this.$route.query.pageType == "Generate") {
       this.newAdd();
     }
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     gainUser().then(res => {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });

+ 0 - 19
src/views/exportTrade/salesContract/detailsPage.vue

@@ -841,25 +841,6 @@ export default {
       this.insuranceOption.disabled = true;
       this.markOption.disabled = true;
     }
-    let _this = this;
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "amount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.amount ? row.amount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     getPorts().then(res => {
       this.findObject(this.option.column, "portOfLoad").dicData = res.data;
       this.findObject(this.option.column, "portOfDestination").dicData =

+ 0 - 19
src/views/exportTrade/salesContract/index.vue

@@ -151,25 +151,6 @@ export default {
   components: { detailPage },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(4), option);
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     getPorts().then(res => {
       this.findObject(this.option.column, "portOfLoad").dicData = res.data;
       this.findObject(this.option.column, "portOfDestination").dicData =

+ 0 - 19
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -365,25 +365,6 @@ export default {
       this.getColumnName(32),
       goodsOption
     );
-    let _this = this;
-    this.tableOption.column.forEach(e => {
-      if (e.prop == "taxRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.taxRate ? row.taxRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "amount" || e.prop == "price") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.amount ? row.amount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     getPorts().then(res => {
       this.findObject(this.option.column, "portOfLoad").dicData = res.data;
       this.findObject(this.option.column, "portOfDestination").dicData =

+ 0 - 19
src/views/exportTrade/shippingInquiry/index.vue

@@ -122,25 +122,6 @@ export default {
   components: { detailPage },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(12), option);
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     getPorts().then(res => {
       this.findObject(this.option.column, "portOfLoad").dicData = res.data;
       this.findObject(this.option.column, "portOfDestination").dicData =

+ 20 - 4
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -173,6 +173,18 @@
                          clearable filterable>
                 <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
               </el-select>
+              <span v-else>{{ row.currency }}</span>
+            </template>
+            <template slot="cntrNo" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.cntrNo"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+                @change="selectInventory(row)"
+              ></el-input>
+              <span v-else>{{ row.cntrNo }}</span>
             </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
@@ -483,17 +495,18 @@ export default {
     if (this.detailData.form) {
       this.buttonLoading = true;
       this.form = JSON.parse(this.detailData.form);
-      this.$set(this.form,"saleman",this.detailData.form.salesName)
+      this.$set(this.form,"saleman",this.form.salesName)
       //是否计算合同号
       this.form.id = null
       this.form.sysNo = null
 
       this.form.orderItemsList.forEach((item, index) => {
         item.srcId = item.id
-        item.itemId = item.itemId
         item.orgOrderNo = this.form.orgOrderNo
         item.contractNumber = item.orgOrderNo
         item.contractAmount = item.amount
+        item.currency = this.form.currency
+        item.exRate = this.form.exchangeRate
         if (item.actualQuantity !== 0) {   //如果发过货
           item.actualQuantity = _.subtract(item.orderQuantity, item.actualQuantity); //发货件数 =  总件数 - 已发件数
         } else {
@@ -504,8 +517,10 @@ export default {
         //   BQ : _.divide(item.billWeight, item.orderQuantity),
         //   IQ : _.divide(item.invoiceWeight, item.orderQuantity)
         // }
-        delete item.actualQuantity
+        delete item.orderQuantity
         delete item.id
+        // this.$refs.crudContact.rowCellAdd(item);
+        // this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
       })
       this.contactsData = this.form.orderItemsList
       this.sumOrderNo();
@@ -577,12 +592,13 @@ export default {
     },
     //查询库存
     selectInventory(row) {
-      if (row.billNo && row.contractNumber && row.priceCategory && this.form.storageId) {
+      if (row.billNo && row.contractNumber && row.priceCategory && row.cntrNo && this.form.storageId) {
         const params = {
           billNo: row.billNo,
           contractNumber: row.contractNumber,
           priceCategory: row.priceCategory,
           storageId: this.form.storageId,
+          cntrNo: row.cntrNo
         }
         selectGoodsNum(params).then(res => {
           this.$set(this.contactsData[row.$index], "inventoryNumber", res.data.data)

+ 0 - 136
src/views/maintenance/priceLibrary/config/commodity.json

@@ -1,136 +0,0 @@
-
-{
-  "calcHeight": 80,
-  "tip": false,
-  "addBtn": false,
-  "searchShow": false,
-  "searchShowBtn": false,
-  "menu": false,
-  "searchMenuSpan": 6,
-  "border": true,
-  "index": true,
-  "selection": true,
-  "viewBtn": true,
-  "dialogClickModal": false,
-  "column": [
-    {
-      "label": "商品编码",
-      "prop": "code",
-      "search": true,
-      "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品名称",
-      "prop": "cname",
-      "slot": true,
-      "width": 100,
-      "rules": [
-        {
-          "required": true,
-          "message": " ",
-          "trigger": "blur"
-        }
-      ]
-    },
-    {
-      "label": "商品类别",
-      "prop": "goodsTypeId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "addDisabled": false,
-      "multiple": true,
-      "width": 100,
-      "props": {
-        "label": "title"
-      },
-      "rules": [{
-        "required": true,
-        "message": " ",
-        "trigger": "click"
-      }]
-    },
-    {
-      "label": "规格编码",
-      "prop": "typeno",
-      "search": true,
-      "width": 100
-    },
-    {
-      "label": "品牌",
-      "prop": "brand",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "花纹",
-      "prop": "brandItem",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "规格尺寸",
-      "prop": "specs",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "产品类别",
-      "prop": "category",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "产品分类",
-      "prop": "categoryitem",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "供应商",
-      "prop": "providers",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true,
-      "width": 100
-    },
-    {
-      "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
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "slot": true,
-      "width": 100
-    }
-  ]
-}

+ 0 - 178
src/views/maintenance/priceLibrary/config/customerContact.json

@@ -1,178 +0,0 @@
-{
-  "searchShow": true,
-  "searchMenuSpan": 6,
-  "border": true,
-  "index": true,
-  "viewBtn": false,
-  "editBtn": false,
-  "addBtn": false,
-  "delBtn": false,
-  "align": "center",
-  "menuWidth": 150,
-  "refreshBtn": false,
-  "showSummary": true,
-  "column": [{
-      "label": "产品类别",
-      "prop": "priceCategory",
-      "index": 1,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "产品编号",
-      "prop": "code",
-      "index": 2,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "产品名称",
-      "prop": "cname",
-      "index": 3,
-      "width": 200,
-      "overHidden": true
-    },
-    {
-      "label": "产品属性",
-      "prop": "itemProp",
-      "index": 4,
-      "width": 100,
-      "overHidden": true,
-      "cell": true,
-      "type": "select",
-      "dicData": [],
-      "props": {
-        "label": "dictValue",
-        "value": "dictKey"
-      }
-    },
-    {
-      "label": "产品描述",
-      "prop": "itemDescription",
-      "index": 5,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    },
-    {
-      "label": "产品型号",
-      "prop": "itemType",
-      "index": 6,
-      "width": 100
-    },
-    {
-      "label": "采购单价",
-      "prop": "purchaseAmount",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "配件信息",
-      "prop": "partsList",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "配件价格",
-      "prop": "partsPrice",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "供应商",
-      "prop": "corpId",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "重点推荐",
-      "prop": "priorityReferrer",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "推荐理由",
-      "prop": "referrerReason",
-      "index": 10,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    },
-    {
-      "label": "销售价",
-      "prop": "price",
-      "index": 11,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计价单位",
-      "prop": "unit",
-      "index": 12,
-      "width": 100,
-      "overHidden": true,
-      "cell": true,
-      "type": "select",
-      "dicData": [],
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
-    },
-    {
-      "label": "数量",
-      "prop": "orderQuantity",
-      "index": 13,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "保险",
-      "prop": "insurance",
-      "index": 14,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "运费",
-      "prop": "freight",
-      "index": 15,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "折扣",
-      "prop": "discount",
-      "index": 16,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "金额",
-      "prop": "amount",
-      "index": 17,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "税率",
-      "prop": "taxRate",
-      "index": 18,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 19,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    }
-  ]
-}

+ 21 - 1
src/views/maintenance/priceLibrary/config/mainList.json

@@ -1,6 +1,6 @@
 {
   "searchShow": true,
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 8,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -110,8 +110,17 @@
     {
       "label": "商品类别",
       "prop": "goodsTypeName",
+      "search": true,
+      "searchSpan": 8,
       "index": 13,
       "width": 100,
+      "type": "select",
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "value": "cname",
+        "label": "cname"
+      },
       "overHidden": true
     },
     {
@@ -192,6 +201,17 @@
       "overHidden": true
     },
     {
+      "label": "有效日期",
+      "prop": "dateValidity",
+      "index": 25,
+      "width": 100,
+      "search": true,
+      "searchSpan": 8,
+      "hide": true,
+      "showColumn": false,
+      "overHidden": true
+    },
+    {
       "label": "业务员",
       "prop": "person",
       "index": 25,

+ 0 - 436
src/views/maintenance/priceLibrary/detailsPage.vue

@@ -1,436 +0,0 @@
-<template>
-  <div class="borderless" v-loading="pageLoading">
-    <div class="customer-head">
-      <div class="customer-back">
-        <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          >返回列表
-        </el-button>
-      </div>
-      <div class="add-customer-btn" v-if="showBut">
-        <el-button
-          type="primary"
-          :disabled="disabled"
-          @click="editCustomer"
-          size="small"
-          :loading="subLoading"
-          v-if="detailData.status != 1"
-          >{{ form.id ? "确认修改" : "确认新增" }}
-        </el-button>
-      </div>
-    </div>
-    <div style="margin-top: 60px;margin-bottom:35px">
-      <containerTitle title="基础信息"></containerTitle>
-      <basic-container style="margin-bottom: 10px">
-        <avue-form ref="form" v-model="form" :option="option">
-          <template slot="corpId">
-            <select-component
-              v-model="form.corpId"
-              :configuration="configuration"
-              :disabled="detailData.status == 1"
-            ></select-component>
-          </template>
-          <template slot="cname">
-            <goods-select
-              v-model="form.cname"
-              :configuration="goodsConfiguration"
-              @getRow="getGoodsRow"
-              @returnRow="returnRow"
-              :disabled="detailData.status == 1"
-            />
-          </template>
-        </avue-form>
-      </basic-container>
-    </div>
-  </div>
-</template>
-
-<script>
-import { detail, submit } from "@/api/maintenance/priceLibrary";
-import { contrastObj } from "@/util/contrastData";
-import { orderStates } from "@/enums/order-stauts";
-import _ from "lodash";
-export default {
-  name: "detailsPageEdit",
-  data() {
-    return {
-      goodsConfiguration: {
-        multipleChoices: false,
-        multiple: false,
-        collapseTags: false,
-        placeholder: "请点击右边按钮选择",
-        dicData: [],
-        clearable: true
-      },
-      configuration: {
-        multipleChoices: false,
-        multiple: false,
-        collapseTags: false,
-        placeholder: "请点击右边按钮选择",
-        dicData: []
-      },
-      form: {},
-      option: {
-        menuBtn: false,
-        labelWidth: 100,
-        column: [
-          {
-            label: "商品名称",
-            prop: "cname",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "规格",
-            prop: "specs",
-            disabled: true,
-            span: 8
-          },
-          {
-            label: "产品属性",
-            prop: "goodNature",
-            span: 8
-          },
-          {
-            label: "供应商",
-            prop: "corpId",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "币别",
-            prop: "currency",
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            },
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            change: ({ value }) => {
-              if (value == "CNY") {
-                this.form.exchangeRate = 1;
-              }
-              if (value == "USD") {
-                this.form.exchangeRate = 6.3843;
-              }
-            },
-            span: 8
-          },
-          {
-            label: "汇率",
-            prop: "exchangeRate",
-            disabled: true,
-            span: 8
-          },
-          {
-            label: "FOB系数",
-            prop: "coefficient",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "价格类型",
-            prop: "billType",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=billType",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            span: 8
-          },
-          {
-            label: "最新价格",
-            prop: "price",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "美元价格",
-            prop: "greenback",
-            span: 8
-          },
-          { 
-            label: "采购价格",
-            prop: "purchaseAmount",
-            span: 8
-          },
-          {
-            label: "税率",
-            prop: "taxRate",
-            span: 8
-          },
-          {
-            label: "商品类别",
-            prop: "goodsTypeName",
-            span: 8
-          },
-          {
-            label: "状态",
-            prop: "status",
-            type: "select",
-            dicData: orderStates,
-            props: {
-              label: "name",
-              value: "code"
-            },
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "有效期开始",
-            prop: "startTime",
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "有效期结束",
-            prop: "endTime",
-            type: "date",
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 23:59:59",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 8
-          },
-          {
-            label: "业务员",
-            prop: "person",
-            span: 8,
-            row: true
-          },
-          {
-            label: "历史价格1",
-            prop: "priceOne",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "历史日期1",
-            prop: "priceOneTime",
-            type: "datetime",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "历史价格2",
-            prop: "priceTwo",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "历史日期2",
-            prop: "priceTwoTime",
-            type: "datetime",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "历史价格3",
-            prop: "priceThree",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "历史日期3",
-            prop: "priceThreeTime",
-            type: "datetime",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
-            span: 8,
-            disabled: true
-          },
-          {
-            label: "备注",
-            prop: "remarks",
-            type: "textarea",
-            minRows: 2,
-            span: 24
-          }
-        ]
-      },
-      oldform: {},
-      loading: false,
-      subLoading: false,
-      pageLoading: false,
-      showBut: true
-    };
-  },
-  props: {
-    detailData: {
-      type: Object
-    }
-  },
-  created() {
-    if (this.detailData.id) {
-      this.getDetail(this.detailData.id);
-    }
-    if (this.detailData.status == 1) {
-      this.option.disabled = true;
-    }
-  },
-  filters: {},
-  methods: {
-    getDetail(id) {
-      this.loading = true;
-      this.showBut = false;
-      this.pageLoading = true;
-      detail(id)
-        .then(res => {
-          this.form = res.data.data;
-          this.oldform = res.data.data;
-        })
-        .finally(() => {
-          this.loading = false;
-          this.showBut = true;
-          this.pageLoading = false;
-        });
-    },
-    //修改提交触发
-    editCustomer(status) {
-      this.$refs["form"].validate((valid, done) => {
-        done();
-        if (valid) {
-          this.subLoading = true;
-          this.form.tradeType = "CK";
-          this.configuration.dicData.forEach(e => {
-            if (this.form.corpId == e.id) {
-              this.form.corpName = e.cname;
-            }
-          });
-          submit({
-            ...this.form
-          })
-            .then(res => {
-              if (res.data.code == 200) {
-                this.$message.success(this.form.id ? "修改成功" : "提交成功");
-                this.form = res.data.data;
-                this.oldform = res.data.data;
-                if (status == "goBack") {
-                  this.$emit("goBack");
-                }
-              }
-            })
-            .finally(() => {
-              this.subLoading = false;
-            });
-        } else {
-          return false;
-        }
-      });
-    },
-    //返回列表
-    backToList() {
-      if (contrastObj(this.form, this.oldform)) {
-        this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            this.editCustomer("goBack");
-          })
-          .catch(() => {
-            this.$emit("goBack");
-          });
-      } else {
-        this.$emit("goBack");
-      }
-    },
-    openReport() {
-      this.switchDialog = !this.switchDialog;
-    },
-    onClose(val) {
-      this.switchDialog = val;
-    },
-    getGoodsRow(row) {
-      this.form.itemId = row.id;
-      this.form.code = row.code;
-      this.form.specs = row.specs;
-    },
-    returnRow(rows) {
-      this.form.itemId = rows[0].id;
-      this.form.code = rows[0].code;
-      this.form.specs = rows[0].specs;
-    }
-  }
-};
-</script>
-
-<style lang="scss" scoped>
-::v-deep .el-form-item {
-  margin-bottom: 8px;
-}
-::v-deep .el-form-item__error {
-  display: none;
-}
-::v-deep .select-component {
-  display: flex;
-}
-</style>

+ 49 - 31
src/views/maintenance/priceLibrary/index.vue

@@ -55,6 +55,18 @@
             :configuration="configuration"
           ></select-component>
         </template>
+        <template slot="dateValiditySearch">
+          <el-date-picker
+            v-model="search.dateValidity"
+            type="daterange"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :default-time="['00:00:00', '23:59:59']"
+          >
+          </el-date-picker>
+        </template>
         <template slot-scope="scope" slot="corpId">
           {{ scope.row.corpName }}
         </template>
@@ -64,13 +76,16 @@
         <template slot-scope="scope" slot="status">
           {{ scope.row.status | orderStateFormat }}
         </template>
+        <template slot-scope="scope" slot="taxRate">
+          {{ scope.row.taxRate | taxRateFormat }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
             icon="el-icon-edit"
             size="small"
             @click.stop="editOpen(scope.row, 2)"
-            >编辑
+            >修改
           </el-button>
           <el-button
             type="text"
@@ -91,6 +106,7 @@
           :option="excelOption"
           v-model="excelForm"
           :upload-after="uploadAfter"
+          class="excelUpload"
         />
       </el-dialog>
     </basic-container>
@@ -100,10 +116,11 @@
 <script>
 import option from "./config/mainList.json";
 import { getToken } from "@/util/auth";
-import { getList, remove } from "@/api/maintenance/priceLibrary";
+import { getList, remove, getGoodstype } from "@/api/maintenance/priceLibrary";
 import { defaultDate } from "@/util/date";
 import { micrometerFormat } from "@/util/validate";
 import { orderStateFormat } from "@/enums/order-stauts";
+import { taxRateFormat } from "@/enums/tax-rate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -146,9 +163,7 @@ export default {
         dicData: [],
         clearable: true
       },
-      search: {
-        businesDate: defaultDate()
-      },
+      search: {},
       form: {},
       option: {},
       parentId: 0,
@@ -173,10 +188,17 @@ export default {
     this.getWorkDicts("billType").then(res => {
       this.findObject(this.option.column, "billType").dicData = res.data.data;
     });
+    getGoodstype(1, 500).then(res => {
+      this.findObject(this.option.column, "goodsTypeName").dicData =
+        res.data.data.records;
+    });
   },
   filters: {
     orderStateFormat(val) {
       return orderStateFormat(val);
+    },
+    taxRateFormat(val) {
+      return taxRateFormat(val);
     }
   },
   methods: {
@@ -184,6 +206,9 @@ export default {
       return "padding:0;height:40px;";
     },
     uploadAfter(res, done, loading, column) {
+      if (res != "导入成功") {
+        this.$message.error(res);
+      }
       this.excelBox = false;
       this.page.currentPage = 1;
       this.onLoad(this.page);
@@ -222,11 +247,16 @@ export default {
       });
     },
     editOpen(row, status) {
+      this.$message.warning("暂不支持修改");
       console.log(row, status);
     },
     //点击搜索按钮触发
     searchChange(params, done) {
-      this.page.currentPage = 1;
+      if (params.dateValidity) {
+        params.dateValidityStart = params.dateValidity[0];
+        params.dateValidityEnd = params.dateValidity[1];
+      }
+      delete params.dateValidity;
       this.onLoad(this.page, params);
       done();
     },
@@ -260,30 +290,20 @@ export default {
       if (columns.length > 0) {
         columns.forEach((item, index) => {
           sums[0] = "合计";
-          if (
-            item.property == "orderQuantity" ||
-            item.property == "amount" ||
-            item.property == "purchaseAmount"
-          ) {
-            let qtySum = 0;
-            let instoreSum = 0;
-            let totalSum = 0;
+          if (item.property == "price" || item.property == "purchaseAmount") {
+            let priceSum = 0;
+            let amountSum = 0;
             data.forEach(e => {
-              qtySum = _.add(qtySum, Number(e.orderQuantity));
-              instoreSum = _.add(instoreSum, Number(e.amount));
-              totalSum = _.add(totalSum, Number(e.purchaseAmount));
+              priceSum = _.add(priceSum, Number(e.price));
+              amountSum = _.add(amountSum, Number(e.purchaseAmount));
             });
-            //数量总计
-            if (item.property == "orderQuantity") {
-              sums[index] = qtySum ? qtySum.toFixed(2) : "0.00";
+            //最新价格
+            if (item.property == "price") {
+              sums[index] = micrometerFormat(priceSum);
             }
-            //入库金额总计
-            if (item.property == "amount") {
-              sums[index] = micrometerFormat(instoreSum);
-            }
-            //金额总计
+            //采购价格
             if (item.property == "purchaseAmount") {
-              sums[index] = micrometerFormat(totalSum);
+              sums[index] = micrometerFormat(amountSum);
             }
           }
         });
@@ -294,11 +314,6 @@ export default {
       this.onLoad(this.page, this.search);
     },
     async saveColumn() {
-      /**
-       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-       */
       const inSave = await this.saveColumnData(
         this.getColumnName(50),
         this.option
@@ -320,4 +335,7 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+.excelUpload ::v-deep .el-upload-list {
+  display: none;
+}
 </style>

+ 0 - 1
src/views/purchase/contract/config/customerContact.json

@@ -129,7 +129,6 @@
       "prop": "taxRate",
       "index": 10,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,

+ 36 - 22
src/views/purchase/contract/detailsPage.vue

@@ -76,9 +76,15 @@
                 <el-select v-else-if="item.prop === 'currency'" style="width: 100%"    v-model="form[item.prop]" size="small" placeholder="请选择" @change="currencyChange" clearable filterable>
                   <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
                 </el-select>
+                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  :disabled="item.disabled?true:false" size="small" autocomplete="off"  @change="currencyChange" placeholder="请输入">
+                  <template   slot="append">%</template>
+                </el-input>
                 <el-select v-else-if="item.prop === 'paymentType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in paymentTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
+                <!--<div v-else-if="item.prop === 'advancePayment'">
+                  <el-input type="textarea" v-else-if="(item.prop === 'advancePayment')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
+                </div>-->
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false || takeDisabled" size="small" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
@@ -198,6 +204,17 @@
               ></el-input>
               <span v-else>{{ row.amount }}</span>
             </template>
+            <template slot="taxRate" slot-scope="{ row }">
+              <el-input v-if="row.$cellEdit"
+                        v-model="row.taxRate"
+                        size="small"
+                        autocomplete="off"
+                        placeholder="请输入">
+                <template slot="append"
+                >%</template>
+              </el-input>
+              <span v-else>{{ row.taxRate }}</span>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                 type="text"
@@ -249,7 +266,7 @@
       append-to-body
       class="el-dialogDeep"
       :visible.sync="applicationDialog"
-      width="70%"
+      width="60%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false"
@@ -286,20 +303,16 @@
 import customerContact from "./config/customerContact.json"
 import uploadList from './config/uploadList.json'
 import advantageProject from "./config/advantageProject.json"
-import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
+import { getDeptLazyTree } from "@/api/basicData/basicFeesDesc";
 import optionTwoCost from "./config/mainListCost.json"
-import {detailListData, submitData,getSysNo} from "@/api/importTrade/purchase";
-import commodity from "./config/commodity.json"
+import {detailListData, submitData} from "@/api/importTrade/purchase";
 import feeInfo from "@/components/fee-info/main";
 import uploadFile from "@/components/upload-file/main";
 import _ from "lodash";
 import  billApplication from "@/components/bill/billApplication";
 //商品详情接口
-import {corpsattn, corpsbank,  getDeptLazyTreeS} from "@/api/basicData/configuration"
-import { getList } from "@/api/basicData/commodityType"
+import { corpsattn } from "@/api/basicData/configuration"
 import { contrastObj,contrastList } from "@/util/contrastData";
-import {getSpecification} from "@/api/exportTrade/purchaseContract";
-import option from "./config/mainList.json";
 import ApplyPayment from "../../../components/finance/applyPayment";
 export default {
   name: "detailsPage",
@@ -457,7 +470,7 @@ export default {
             disabled:this.takeDisabled,
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -589,6 +602,7 @@ export default {
             prop: 'currency'
           }, {
             label: '汇率',
+            type:"unit",
             prop: 'exchangeRate',
           }, {
             label: '人民币金额',
@@ -758,20 +772,20 @@ export default {
     },
     //带出人民币
     currencyChange(){
-      if(this.form.orderAmount){
-        if(this.form.currency === "CNY"){
-          this.form.exchangeRate = 1
+      if(this.form.currency === "CNY" && this.form.exchangeRate == 6.368600){  //如果为人民币
+        this.form.exchangeRate = 1
+        if(this.form.orderAmount){   //合同金额不为0  赋值人民币金额
           this.$set(this.form,"rmbAmount",this.form.orderAmount)
-        }else{
-          if(this.form.exchangeRate != 6.368600){
-            this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, this.form.exchangeRate).toFixed(2))
-          }else{
-            this.form.exchangeRate = 6.3686
+        }
+      }else if(this.form.exchangeRate === 1){
+          this.form.exchangeRate = 6.3686
+          if(this.form.orderAmount){
             this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, 6.3686).toFixed(2))
           }
-        }
       }else{
-        this.$set(this.form,"rmbAmount","")
+        if(this.form.orderAmount && this.form.exchangeRate){
+          this.$set(this.form,"rmbAmount",_.multiply(this.form.orderAmount, this.form.exchangeRate).toFixed(2))
+        }
       }
     },
     //合计
@@ -888,7 +902,7 @@ export default {
         if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
           || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
         ){
-          this.$confirm("您已改动数据,是否先保存在进行操作!", {
+          this.$confirm("数据发生变化,请先提交保存?", {
             confirmButtonText: "保存",
             cancelButtonText: "取消",
             type: "warning"
@@ -964,7 +978,7 @@ export default {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
         || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
       ){
-        this.$confirm("您已改动数据,是否先保存在进行操作!", {
+        this.$confirm("数据发生变化,请先提交保存?", {
           confirmButtonText: "保存",
           cancelButtonText: "取消",
           type: "warning"
@@ -1040,7 +1054,7 @@ export default {
       if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
         || contrastList(this.orderFeesList,this.oldFeesList) || contrastList(this.orderFilesList,this.oldFilesList)
       ){
-        this.$confirm("是否保存当前页面?", "提示", {
+        this.$confirm("数据发生变化,是否提交保存?", "提示", {
           confirmButtonText: "保存",
           cancelButtonText: "取消",
           type: "warning",

+ 78 - 84
src/views/purchase/stockBill/config/mainList.json

@@ -7,7 +7,8 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 6,
+  "searchSpan": 8,
+  "searchMenuSpan": 16,
   "tree": true,
   "selection": false,
   "addBtn": false,
@@ -15,140 +16,133 @@
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 150,
+  "menu": false,
+  "searchIcon": true,
+  "searchIndex": 2,
   "searchLabelWidth": 100,
-  "column": [
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
     {
-      "label": "状态",
-      "hide": true,
-      "prop": "status",
-      "search": true,
-      "width": 120,
-      "type": "select",
-      "dicData": [
-        {
-          "label": "已审核",
-          "value": "1"
-        },
-        {
-          "label": "正在结算",
-          "value": "4"
-        },
-        {
-          "label": "结算完成",
-          "value": "5"
-        }
-      ]
+      "name": "inAmount",
+      "type": "sum"
     },
     {
-      "label": "状态",
-      "prop": "strStatus",
-      "type": "select",
-      "overHidden": true,
-      "searchOrder": 5,
-      "width": 120
+      "name": "outAmount",
+      "type": "sum"
     },
     {
-      "label": "客户名称",
+      "name": "balanceAmount",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "合同号",
+      "prop": "contractNumber",
       "overHidden": true,
-      "prop": "cornName",
-      "width": 220
+      "search": true,
+      "index": 1,
+      "width": 150
     },
     {
-      "label": "客户名称",
-      "hide": true,
+      "label": "提单号",
+      "overHidden": true,
       "search": true,
-      "prop": "cornId",
-      "searchOrder": 1
+      "prop": "billNo",
+      "index": 2,
+      "width": 150
     },
     {
-      "label": "服务项目",
-      "prop": "pname",
+      "label": "货物名称",
+      "search": true,
       "overHidden": true,
-      "width": 120
+      "index": 3,
+      "width": 220,
+      "prop": "cname"
     },
     {
-      "label": "任务部门",
-      "prop": "deptName",
+      "label": "箱号",
+      "prop": "cntrNo",
+      "index": 4,
       "overHidden": true,
       "width": 120
     },
     {
-      "label": "单价",
-      "prop": "price",
+      "label": "采购日期",
+      "search": true,
+      "prop": "createTime",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "type": "date",
+      "unlinkPanels": true,
+      "searchRange": true,
       "overHidden": true,
-      "width": 120
+      "index": 5,
+      "width": 150
     },
     {
-      "label": "计价单位",
-      "prop": "unit",
+      "label": "入库件数",
+      "prop": "inQuantity",
       "overHidden": true,
+      "index": 6,
       "width": 120
     },
     {
-      "label": "量",
-      "prop": "quantity",
+      "label": "入库发票重量",
+      "prop": "inWeight",
       "overHidden": true,
+      "index": 7,
       "width": 120
     },
     {
-      "label": "合计金额",
-      "prop": "amount",
+      "label": "入库金额",
+      "prop": "inAmount",
       "overHidden": true,
+      "index": 8,
       "width": 120
     },
     {
-      "label": "频率",
-      "prop": "frequency",
+      "label": "出库件数",
+      "prop": "outQuantity",
       "overHidden": true,
+      "index": 9,
       "width": 120
     },
     {
-      "label": "提醒日",
-      "prop": "reminderDay",
-      "valueFormat": "timestamp",
+      "label": "出库发票重量",
+      "prop": "outWeight",
       "overHidden": true,
-      "type": "date",
-      "width": 150
+      "index": 10,
+      "width": 120
     },
     {
-      "label": "需求开始日期",
-      "prop": "beginTime",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "type": "date",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "search": true,
+      "label": "出库金额",
+      "prop": "outAmount",
       "overHidden": true,
-      "searchOrder": 3,
-      "width": 150,
-      "cell": true
+      "index": 11,
+      "width": 120
     },
     {
-      "label": "制单人",
-      "prop": "createUserName",
-      "disabled": true,
+      "label": "结余件数",
+      "prop": "balanceQuantity",
       "overHidden": true,
+      "index": 12,
       "width": 120
     },
     {
-      "label": "制单日期",
-      "prop": "createTime",
-      "disabled": true,
+      "label": "结余重量",
+      "prop": "balanceWeight",
       "overHidden": true,
-      "width": 150
-    },
-    {
-      "label": "最新修改人",
-      "prop": "updateUserName",
-      "width": 120,
-      "overHidden": true
+      "index": 13,
+      "width": 120
     },
     {
-      "label": "最新修改时间",
-      "prop": "updateTime",
-      "width": 150,
-      "overHidden": true
+      "label": "结余金额",
+      "prop": "balanceAmount",
+      "overHidden": true,
+      "index": 14,
+      "width": 120
     }
   ]
 }

+ 14 - 13
src/views/purchase/stockBill/index.vue

@@ -20,7 +20,7 @@
 
 <script>
   import option from "./config/mainList.json";
-  import { getBillList } from "@/api/financialManagement/paymentRequest";
+  import {customerList} from "@/api/basicData/inventoryAccount"
 
   export default {
     data() {
@@ -45,7 +45,6 @@
 
     },
     mounted() {
-      option.height = window.innerHeight - 200 ;
     },
     methods: {
       //新单打开
@@ -90,17 +89,19 @@
         console.log('1')
       },
       onLoad(page, params = {}) {
-        // this.loading = true;
-        // if (params.createTime != undefined) {  //合同
-        //   params.createStartDate = params.createTime[0]+ " " + "00:00:00";
-        //   params.createEndDate = params.createTime[1] + " " + "23:59:59";
-        //   this.$delete(params,'createTime')
-        // }
-        // getBillList(page.currentPage, page.pageSize,params).then(res=>{
-        //   this.dataList = res.data.data.records
-        //   this.page.total = res.data.data.total
-        //   this.loading = false;
-        // })
+        this.loading = true;
+        if(params){
+          if (params.createTime!= undefined) {  //付款
+            params.createStartTime = params.createTime[0]+ " " + "00:00:00";
+            params.createEndTime = params.createTime[1] + " " + "23:59:59";
+            this.$delete(params,'createTime')
+          }
+        }
+        customerList(page.currentPage, page.pageSize,params).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false;
+        })
       },
     }
   }

+ 21 - 9
src/views/salesManagement/salesContract/detailsPage.vue

@@ -60,7 +60,7 @@
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
                 <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="bConfiguration"/>
-                <el-input type="age" v-else-if="item.prop === 'downPayment'" v-model="form[item.prop]"  @change="downPaymentChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
+                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  @change="downPaymentChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
                   <template slot="append">%</template>
                 </el-input>
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
@@ -116,10 +116,12 @@
               <span v-else>{{ row.orgOrderNo }}</span>
             </template>
             <template slot="price" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.price"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
                 @input="priceChange(row)"
@@ -127,6 +129,7 @@
               <span v-else>{{ row.price }}</span>
             </template>
             <template slot="orderQuantity" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.orderQuantity"
@@ -138,7 +141,9 @@
               <span v-else>{{ row.orderQuantity }}</span>
             </template>
             <template slot="priceCategory" slot-scope="{row,index}">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <goods-select
+                style="width:90% !important;"
                 v-if="row.$cellEdit"
                 v-model="row.priceCategoryNames"
                 @valueName="(value) => valueName(value,row)"
@@ -148,9 +153,11 @@
               <span v-else>{{ row.priceCategoryNames }}</span>
             </template>
             <template slot="invoiceWeight" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.invoiceWeight"
+                style="width: 90%"
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
@@ -159,10 +166,12 @@
               <span v-else>{{ row.invoiceWeight }}</span>
             </template>
             <template slot="billWeight" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.billWeight"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
                 @input="billWeightChange(row)"
@@ -171,10 +180,12 @@
               <span v-else>{{ row.billWeight }}</span>
             </template>
             <template slot="amount" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
                 v-if="row.$cellEdit"
                 v-model="row.amount"
                 placeholder="请输入"
+                style="width: 90%"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
               ></el-input>
@@ -449,6 +460,7 @@ export default {
             prop: 'currency',
           }, {
             label: '汇率',
+            type:"unit",
             prop: 'exchangeRate',
             rules: [
               {
@@ -472,6 +484,7 @@ export default {
           },
           {
             label: '首付比例',
+            type:"unit",
             prop: 'downPayment',
             rules: [
               {
@@ -717,14 +730,13 @@ export default {
     },
     //汇率
     currencyChange(value){
-      if(this.form.orderAmount){
-        if(value === "CNY"){
-          this.form.exchangeRate = 1
-          // this.form.rmbAmount = this.form.orderAmount
-        }else{
-          this.form.exchangeRate = 6.3843
-          // this.form.rmbAmount =  _.multiply(this.form.orderAmount, 6.3843)
-        }
+      if(value === "CNY" &&  this.form.exchangeRate ==6.384300){
+        this.$set(this.form,"exchangeRate",1)
+        this.form.exchangeRate = 1
+        // this.form.rmbAmount = this.form.orderAmount
+      }else if( this.form.exchangeRate ===  1){
+        this.$set(this.form,"exchangeRate",6.384300)
+        // this.form.rmbAmount =  _.multiply(this.form.orderAmount, 6.3843)
       }
     },
     //单价

Некоторые файлы не были показаны из-за большого количества измененных файлов