Browse Source

修改bug

Qukatie 3 years ago
parent
commit
7ba04000b2
25 changed files with 2326 additions and 618 deletions
  1. 10 1
      src/api/basicData/customerInquiry.js
  2. 52 0
      src/api/maintenance/landFreight.js
  3. 0 0
      src/api/maintenance/portSurcharge.js
  4. 8 0
      src/api/maintenance/priceLibrary.js
  5. 156 0
      src/components/part-library/configuration/mainList.json
  6. 45 0
      src/components/part-library/configuration/mainList2.json
  7. 219 0
      src/components/part-library/main.vue
  8. 29 1
      src/util/calculate.js
  9. 7 19
      src/views/basicData/commodityType/configuration/partList.json
  10. 4 0
      src/views/basicData/commodityType/configuration/specification.json
  11. 106 39
      src/views/basicData/commodityType/detailsPageEdit.vue
  12. 1125 0
      src/views/exportTrade/customerInquiry/components/goodsInfo.vue
  13. 1 1
      src/views/exportTrade/customerInquiry/config/commodity.json
  14. 354 218
      src/views/exportTrade/customerInquiry/config/customerContact.json
  15. 1 1
      src/views/exportTrade/customerInquiry/config/mainList.json
  16. 35 32
      src/views/exportTrade/customerInquiry/detailsPage.vue
  17. 24 32
      src/views/maintenance/landFreight/detailsPage.vue
  18. 13 37
      src/views/maintenance/landFreight/index.vue
  19. 13 18
      src/views/maintenance/landFreight/js/optionList.js
  20. 30 34
      src/views/maintenance/portSurcharge/detailsPage.vue
  21. 12 37
      src/views/maintenance/portSurcharge/index.vue
  22. 18 21
      src/views/maintenance/portSurcharge/js/optionList.js
  23. 2 0
      src/views/maintenance/priceLibrary/config/mainList.json
  24. 51 125
      src/views/maintenance/priceLibrary/index.vue
  25. 11 2
      src/views/wel/index.vue

+ 10 - 1
src/api/basicData/customerInquiry.js

@@ -134,13 +134,14 @@ export const getPricebank = (current, size, params) => {
   })
 }
 //商品类别列表查询
-export const getGoodstype = (current, size) => {
+export const getGoodstype = (current, size,data) => {
   return request({
     url: '/api/blade-client/goodstype/page',
     method: 'get',
     params: {
       current,
       size,
+      ...data
     }
   })
 }
@@ -186,3 +187,11 @@ export function getCharge(corpType, id) {
     }
   })
 }
+//树形
+export const getPartTree = (data) => {
+  return request({
+    url: '/api/blade-client/goodstype/page',
+    method: 'get',
+    params:data
+  })
+}

+ 52 - 0
src/api/maintenance/landFreight.js

@@ -0,0 +1,52 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-purchase-sales/ordercost/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
+
+export const getDetail = (id) => {
+    return request({
+        url: '/api/blade-purchase-sales/ordercost/detail',
+        method: 'get',
+        params: {
+            id
+        }
+    })
+}
+
+export const remove = (ids) => {
+    return request({
+        url: '/api/blade-purchase-sales/ordercost/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+
+//修改和新增
+export function submit(data) {
+    return request({
+      url: '/api/blade-purchase-sales/ordercost/submit',
+      method: 'post',
+      data: data
+    })
+  }
+
+  export const itemDel = (ids) => {
+    return request({
+      url: '/api/blade-purchase-sales/ordercostitem/remove',
+      method: 'post',
+      params: {
+        ids,
+      }
+    })
+  }

+ 0 - 0
src/api/maintenance/portSurcharge.js


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

@@ -131,4 +131,12 @@ export const getGoodstype = (current, size) => {
       size,
     }
   })
+}
+//更新商品类型
+export function updateParts(query) {
+  return request({
+    url: '/api/blade-mocha-item/pricebank/updateParts',
+    method: 'get',
+    params: query
+  })
 }

+ 156 - 0
src/components/part-library/configuration/mainList.json

@@ -0,0 +1,156 @@
+{
+  "border": true,
+  "searchMenuSpan": 24,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "menu": false,
+  "align": "center",
+  "menuWidth": "180",
+  "selection": true,
+  "tip": false,
+  "column": [{
+      "label": "商品编号",
+      "prop": "code",
+      "search": true,
+      "searchSpan": 8,
+      "index": 1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 2,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "index": 3,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "英文名称",
+      "search": true,
+      "searchSpan": 8,
+      "prop": "ename",
+      "index": 4,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "最新价格",
+      "prop": "price",
+      "index": 5,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchaseAmount",
+      "index": 6,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "供应商",
+      "prop": "corpCode",
+      "index": 7,
+      "width": 100,
+      "searchSpan": 8,
+      "search": true,
+      "overHidden": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 8,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "推荐理由",
+      "prop": "referrerReason",
+      "index": 10,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "有效截止日期",
+      "prop": "endTime",
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格1",
+      "prop": "priceOne",
+      "index": 12,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期1",
+      "prop": "priceOneTime",
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格2",
+      "prop": "priceTwo",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期2",
+      "prop": "priceTwoTime",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史价格3",
+      "prop": "priceThree",
+      "index": 16,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "历史日期3",
+      "prop": "priceThreeTime",
+      "index": 17,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "英文描述",
+      "prop": "cnameDescription",
+      "index": 18,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 19,
+      "width": 100,
+      "overHidden": true
+    }
+  ]
+}

+ 45 - 0
src/components/part-library/configuration/mainList2.json

@@ -0,0 +1,45 @@
+{
+  "align": "center",
+  "border": true,
+  "index": true,
+  "addBtn": false,
+  "menuWidth": 100,
+  "tip": false,
+  "delBtn": false,
+  "editBtn": false,
+  "showSummary": true,
+  "refreshBtn":false,
+  "column": [{
+      "label": "类型",
+      "prop": "goodTypeName"
+    },
+    {
+      "label": "名称",
+      "prop": "goodName"
+    },
+    {
+      "label": "英文名称",
+      "prop": "ename"
+    },
+    {
+      "label": "供应商",
+      "prop": "corpName"
+    },
+    {
+      "label": "数量",
+      "prop": "goodNumber"
+    },
+    {
+      "label": "配件成本",
+      "prop": "partsCost"
+    },
+    {
+      "label": "单价",
+      "prop": "price"
+    },
+    {
+      "label": "金额",
+      "prop": "amout"
+    }
+  ]
+}

+ 219 - 0
src/components/part-library/main.vue

@@ -0,0 +1,219 @@
+<template>
+  <div>
+    <el-dialog title="配件库" class="el-dialogDeep" :visible.sync="visible" top="5vh" width="80%" append-to-body
+      @closed="closed" :close-on-click-modal="false" v-dialog-drag>
+      <span>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+          <el-tab-pane label="选择配件价格库" name="first">
+            <avue-crud ref="crud" :data="data" :option="tableOption" :page.sync="page" :search.sync="search"
+              @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+              @refresh-change="refreshChange" @on-load="getList" @saveColumn="saveColumn"
+              @selection-change="selectionChange" :cell-style="cellStyle" :table-loading="loading">
+              <template slot="corpCodeSearch">
+                <crop-select v-model="search.corpId" gysType="CK" corpType="GYS"></crop-select>
+              </template>
+              <template slot="menuLeft">
+                <el-button type="primary" size="small" @click.stop="addRow" :disabled="selectionList.length==0">选中
+                </el-button>
+              </template>
+            </avue-crud>
+          </el-tab-pane>
+          <el-tab-pane label="已选择价格库" name="second">
+            <avue-crud ref="crud2" :data="pickData" :option="tableOption2" @refresh-change="refreshChange"
+              :summary-method="summaryMethod" :cell-style="cellStyle">
+              <template slot="goodNumber" slot-scope="{ row }">
+                <el-input v-model="row.goodNumber" size="small" @change="priceChange(row)"></el-input>
+              </template>
+              <template slot="menu" slot-scope="{ row, index }">
+                <el-button type="text" size="small" @click.stop="rowDel(row, index)" icon="el-icon-delete">删除
+                </el-button>
+              </template>
+            </avue-crud>
+          </el-tab-pane>
+        </el-tabs>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button type="primary" @click="importData" :disabled="pickData.length == 0">导 入</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import option from "./configuration/mainList.json";
+import tableOption2 from "./configuration/mainList2.json";
+import {
+  getPricebank,
+  getPartTree,
+  getGoodstype
+} from "@/api/basicData/customerInquiry";
+import { dateFormat } from "@/util/date";
+import { costCal } from "@/util/calculate";
+import _ from "lodash";
+import { Switch } from "element-ui";
+export default {
+  data() {
+    return {
+      activeName: 'first',
+      visible: false,
+      loading: true,
+      data: [],
+      search: {},
+      tableOption: option,
+      height: window.innerHeight - 500,
+      page: {
+        currentPage: 1,
+        total: 0,
+        pageSize: 10
+      },
+      selectionList: [],
+      partType: null,
+      pickData: [],
+      tableOption2: tableOption2,
+    };
+  },
+  props: {},
+  filters: {},
+  created() {
+    if (localStorage.getItem("roleName") == "贸易") {
+      this.findObject(this.tableOption.column, "taxRate").hide = true;
+      this.findObject(this.tableOption.column, "taxRate").showColumn = false;
+      this.findObject(this.tableOption.column, "price").hide = true;
+      this.findObject(this.tableOption.column, "price").showColumn = false;
+    }
+  },
+  methods: {
+    init(status, partData) {
+      this.partType = status;
+      this.pickData = partData ? JSON.parse(partData) : []
+      this.visible = true;
+      this.getList(this.page, this.search);
+    },
+    addRow() {
+      this.selectionList.forEach(e => {
+        this.pickData.push({
+          goodId: e.itemId,
+          goodTypeId: e.goodTypeId,
+          goodTypeName: e.goodsTypeName,
+          ename: e.ename,
+          corpId: e.corpId,
+          corpName: e.corpCode,
+          goodName: e.cname,
+          price: e.purchaseAmount,
+          goodNumber: 1,
+          amout: e.purchaseAmount,
+          partsCost: costCal(e.price, e.taxRate)
+        });
+      });
+      this.$refs.crud.toggleSelection();
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "删除成功!"
+        });
+        this.pickData.splice(index, 1);
+      });
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.search = this.deepClone(params);
+      this.getList(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.getList(this.page, this.search);
+    },
+    getgoodsTypeName(val) {
+      let name = null
+      switch (val) {
+        case 0:
+          name = '阀门配件'
+          break;
+        case 1:
+          name = '瓶帽配件'
+          break;
+        case 2:
+          name = '特殊处理'
+          break;
+        case 3:
+          name = '包装方式'
+          break;
+        case 4:
+          name = '特殊颜色'
+          break;
+        case 5:
+          name = '认证'
+          break;
+        case 6:
+          name = '其他'
+          break;
+
+      }
+      return name
+    },
+    getList(page, params) {
+      let data = {
+        ...params,
+        billType: "CG",
+        goodsTypeName:this.getgoodsTypeName(this.partType),
+        statusTime: dateFormat(new Date(), "yyyy-MM-dd")
+      };
+      let obj = Object.assign(data, this.search);
+      this.loading = true;
+      getPricebank(page.currentPage, page.pageSize, obj)
+        .then(res => {
+          this.data = res.data.data.records ? res.data.data.records : [];
+          this.page.total = res.data.data.total;
+          if (this.page.total > 0) {
+            this.tableOption.height = window.innerHeight - 350;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    priceChange(row) {
+      row.amout = _.multiply(row.price, row.goodNumber)
+    },
+    importData() {
+      this.$emit("importPart", this.pickData, this.partType);
+      this.visible = false;
+    },
+    closed() {
+      this.pickData = null;
+      this.activeName = 'first';
+      this.pickData = [];
+      this.$refs.crud.toggleSelection();
+    }
+  },
+  watch: {
+  }
+};
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 29 - 1
src/util/calculate.js

@@ -1,4 +1,32 @@
 import _ from "lodash";
+//配件总价
+export function partSum(num, num2, num3, num4, num5, num6, num7) {
+  const val = Number(num ? num : 0)
+  const val2 = Number(num2 ? num2 : 0)
+  const val3 = Number(num3 ? num3 : 0)
+  const val4 = Number(num4 ? num4 : 0)
+  const val5 = Number(num5 ? num5 : 0)
+  const val6 = Number(num6 ? num6 : 0)
+  const val7 = Number(num7 ? num7 : 0)
+  const sum = _.add(val, _.add(val2, _.add(val3, _.add(val4, _.add(val5, _.add(val6, val7))))))
+  return Number(sum).toFixed(2)
+}
+//总价
+export function sum(num, num2) {
+  //最新价格
+  const val = Number(num ? num : 0)
+  const val2 = Number(num2 ? num2 : 0)
+  const sum = _.add(val, val2)
+  return Number(sum).toFixed(2)
+}
+//金额相乘
+export function multiply(num, num2) {
+  //最新价格
+  const val = Number(num ? num : 0)
+  const val2 = Number(num2 ? num2 : 0)
+  const multiply = _.multiply(val, val2)
+  return Number(multiply).toFixed(2)
+}
 //原始成本=最新价格/(1+税率/100)
 export function costCal(num, num2) {
   //最新价格
@@ -80,7 +108,7 @@ export function grossProfitCal(num, num2, num3, num4) {
   const price = Number(num3 ? num3 : 0)
   const exchangeRate = Number(Number(num4) ? num4 : 1)
   const sum = _.multiply(_.divide(_.subtract(_.multiply(price, exchangeRate), _.add(purchase, fitting)), _.multiply(price, exchangeRate)), 100)
-  return sum?Number(sum).toFixed(2):'0.00'
+  return sum ? Number(sum).toFixed(2) : '0.00'
 }
 //单票毛利: (金额*汇率+费用应收合计)-(成本*数量+费用应付合计)
 export function STGPCal(num, num2, num3, num4) {

+ 7 - 19
src/views/basicData/commodityType/configuration/partList.json

@@ -4,7 +4,7 @@
   "index": true,
   "addBtn": false,
   "menuWidth": 140,
-  "selection": true,
+  "menu":false,
   "tip": false,
   "delBtn": false,
   "editBtn": false,
@@ -12,28 +12,16 @@
   "refreshBtn": false,
   "column": [
     {
-      "label": "商品编号",
-      "prop": "code",
-      "minwidth": 150,
-      "overHidden": true
+      "label": "类型",
+      "prop": "attributeName"
     },
     {
-      "label": "商品类型",
-      "prop": "goodsTypeName",
-      "minwidth": 150,
-      "overHidden": true
+      "label": "编号",
+      "prop": "attributeNo"
     },
     {
-      "label": "名称",
-      "prop": "cname",
-      "minwidth": 200,
-      "overHidden": true
-    },
-    {
-      "label": "英文名称",
-      "prop": "ename",
-      "minwidth": 200,
-      "overHidden": true
+      "label": "启用",
+      "prop": "status"
     }
   ]
 }

+ 4 - 0
src/views/basicData/commodityType/configuration/specification.json

@@ -16,6 +16,10 @@
     {
       "label": "属性编号",
       "prop": "attributeNo"
+    },
+    {
+      "label": "启用",
+      "prop": "status"
     }
   ]
 }

+ 106 - 39
src/views/basicData/commodityType/detailsPageEdit.vue

@@ -7,12 +7,12 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button class="el-button--small-yh" type="primary" :disabled="disabled" size="small" @click="editCustomer">{{
-        form.id ? "确认修改" : "确认新增" }}
-        </el-button>
         <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc">
           复制单据
         </el-button>
+        <el-button class="el-button--small-yh" type="primary" :disabled="disabled" size="small" @click="editCustomer">{{
+        form.id ? "确认修改" : "确认新增" }}
+        </el-button>
       </div>
     </div>
     <div style="margin-top: 60px">
@@ -87,6 +87,8 @@
             <template slot="menuLeft" slot-scope="{ row, index }">
               <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addSftRow(row, index)">新增明细
               </el-button>
+              <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addSftRow2(row, index)">默认模板
+              </el-button>
             </template>
             <template slot="attributeName" slot-scope="{ row, index }">
               <span v-if="row.$cellEdit">
@@ -97,11 +99,16 @@
               </span>
               <span v-else> {{ row.attributeName }}</span>
             </template>
+            <template slot="status" slot-scope="{ row, index }">
+              <el-switch v-model="row.status" active-color="#13ce66" inactive-color="#ff4949" :active-value="0"
+                :inactive-value="1">
+              </el-switch>
+            </template>
             <template slot="menu" slot-scope="{ row, index }">
               <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowSftEdit(row, index)">
                 {{ row.$cellEdit ? "保存" : "编辑" }}
               </el-button>
-              <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowSftDel(row, index)">
+              <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowSftDel(row)">
                 删 除
               </el-button>
             </template>
@@ -112,25 +119,12 @@
           <avue-crud ref="crud" :data="partList" :option="partOption" @saveColumn="partsaveColumn"
             :cell-style="cellStyle">
             <template slot="menuLeft">
-              <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="rowAdd">选择</el-button>
-            </template>
-            <template slot="menu" slot-scope="{ row, index }">
-              <el-button size="small" icon="el-icon-edit" type="text" @click.stop="rowEdit(row, index)">
-                {{ row.$cellEdit ? "保存" : "编辑" }}
-              </el-button>
-              <el-button type="text" size="small" @click.stop="rowDel(row, index)" icon="el-icon-delete">删除</el-button>
-            </template>
-            <template slot="goodNumber" slot-scope="{ row }">
-              <el-input v-if="row.$cellEdit" v-model="row.goodNumber" size="small"
-                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-                @change="priceChange(row)"></el-input>
-              <span v-else>{{ row.goodNumber }}</span>
+              <el-button type="primary" :disabled="partList.length>0" size="small" @click.stop="rowAdd">默认模板</el-button>
             </template>
-            <template slot="price" slot-scope="{ row }">
-              <span>{{ row.price | micrometerFormat }}</span>
-            </template>
-            <template slot="corpId" slot-scope="{ row }">
-              <span>{{ row.corpName }}</span>
+            <template slot="status" slot-scope="{ row, index }">
+              <el-switch v-model="row.status" active-color="#13ce66" inactive-color="#ff4949" :active-value="0"
+                :inactive-value="1">
+              </el-switch>
             </template>
           </avue-crud>
         </basic-container>
@@ -227,6 +221,7 @@ import { mapGetters } from "vuex";
 import priceLibrary from "@/components/price-Library/main";
 import _ from "lodash";
 import partOption from "./configuration/partList.json";
+import { getPartTree, getGoodstype } from "@/api/basicData/customerInquiry";
 import { costCal } from "@/util/calculate";
 export default {
   name: "detailsPage",
@@ -749,11 +744,11 @@ export default {
         if (res.data.data.buyGoodsPrice) {
           this.purchaseData = res.data.data.buyGoodsPrice;
         }
-        if (res.data.data.priceBankList) {
-          this.partList = res.data.data.priceBankList
-        }
         this.sftData = this.form.goodsSpecificationList
-          ? this.form.goodsSpecificationList
+          ? this.form.goodsSpecificationList.filter(e => e.type == 0)
+          : [];
+        this.partList = this.form.goodsSpecificationList
+          ? this.form.goodsSpecificationList.filter(e => e.type == 1)
           : [];
       });
     }
@@ -778,6 +773,38 @@ export default {
     },
     addSftRow() {
       this.sftData.push({
+        type: 0,
+        status: 1,
+        $cellEdit: true,
+      });
+    },
+    addSftRow2() {
+      if(this.sftData.length>0){
+        return this.$message.error('配置信息已存在数据,暂不能生成模板')
+      }
+      this.sftData.push({
+        type: 0,
+        attributeName: '螺纹',
+        attributeNo: 'Thread',
+        status: 1,
+        $cellEdit: true,
+      }, {
+        type: 0,
+        attributeName: '介质',
+        attributeNo: 'medium',
+        status: 1,
+        $cellEdit: true,
+      }, {
+        type: 0,
+        attributeName: '颜色',
+        attributeNo: 'property_color',
+        status: 1,
+        $cellEdit: true,
+      }, {
+        type: 0,
+        attributeName: '电压',
+        attributeNo: 'stencil',
+        status: 1,
         $cellEdit: true,
       });
     },
@@ -840,7 +867,8 @@ export default {
         }
       });
     },
-    rowSftDel(row, index) {
+    rowSftDel(row) {
+      console.log(row)
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -853,14 +881,14 @@ export default {
           //     type: "success",
           //     message: "操作成功!"
           //   });
-          //   this.purchaseData.splice(index, 1);
+          //   this.sftData.splice(row.$index, 1);
           // });
         } else {
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          this.SftData.splice(index, 1);
+          this.sftData.splice(row.$index, 1);
         }
       });
     },
@@ -897,20 +925,18 @@ export default {
               this.form.corpName = e.cname;
             }
           });
-          let idsArr = []
-          if (this.partList.length > 0) {
-            this.partList.forEach(e => {
-              idsArr.push(e.id)
-            })
-          }
-          let ids = idsArr.join(',')
+          this.sftData.forEach((e, index) => {
+            e.sort = Number(index + 1)
+          })
+          this.partList.forEach((e, index) => {
+            e.sort = Number(index + 1)
+          })
           const params = {
             ...this.form,
             type: 0,
             saleGoodsPrice: this.contactsData,
             buyGoodsPrice: this.purchaseData,
-            goodsSpecificationList: this.sftData,
-            partsIds: ids
+            goodsSpecificationList: this.sftData.concat(this.partList),
           };
           updateDetail(params).then(res => {
             this.$message({
@@ -1067,8 +1093,49 @@ export default {
         this.$set(row, "$cellEdit", true);
       }
     },
+    rowDel(row) {
+      console.log(row)
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          console.log('待开发')
+          // priceDelete(row.id).then(res => {
+          //   this.$message({
+          //     type: "success",
+          //     message: "操作成功!"
+          //   });
+          //   this.partList.splice(row.$index, 1);
+          // });
+        } else {
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.partList.splice(row.$index, 1);
+        }
+      });
+    },
     rowAdd() {
-      this.$refs.library.init(true);
+      if(this.partList.length>0){
+        return this.$message.error('配置信息已存在数据,暂不能生成模板')
+      }
+      getGoodstype("1", "10", { cname: '配件库' }).then(res => {
+        res.data.data.records.forEach(e => {
+          getPartTree({ parentId: e.id }).then(res2 => {
+            res2.data.data.records.forEach(e => {
+              this.partList.push({
+                type: 1,
+                attributeName: e.cname,
+                attributeNo: e.id,
+                status:1,
+              })
+            })
+          })
+        })
+      })
     },
     priceChange(row) {
       row.amout = Number(

+ 1125 - 0
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -0,0 +1,1125 @@
+<template>
+    <trade-card title="商品信息">
+        <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" :summary-method="summaryMethod"
+            @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" v-model="goodsForm"
+            :before-close="beforeClose" @row-save="handleRowSave" @row-update="handleRowUpdate">
+            <template slot="menuLeft">
+                <el-row>
+                    <!-- <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addGoods"
+                        :disabled="detailData.status == 1">导入商品</el-button> -->
+                    <!-- <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addLibrary"
+                        :disabled="detailData.status == 1">出口价格库</el-button> -->
+                    <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印
+                    </el-button>
+                    <el-button type="info" size="small" @click.stop="savePurchase" :disabled="detailData.status == 1">
+                        采购询价
+                    </el-button>
+                    <el-button type="info" size="small" @click.stop="saveShipping" :disabled="detailData.status == 1">
+                        船务询价
+                    </el-button>
+                    <el-button type="info" size="small" @click="cnameData">刷新基础资料</el-button>
+                </el-row>
+            </template>
+            <template slot="headerSerial">
+                <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
+                    :disabled="detailData.status == 1" circle></el-button>
+            </template>
+            <template slot="codeHeader" slot-scope="{column}">
+                <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit('cname')">{{column.label}}</span>
+            </template>
+            //操作栏
+            <template slot="menu" slot-scope="{ row, index }">
+                <div style="display:flex;justify-content: center;">
+                    <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+                        :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
+                    <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                        :disabled="detailData.status == 1">删除</el-button>
+                    <div v-if="!goodsEditShow"
+                        style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
+                        <el-tooltip effect="dark" content="向上移动" placement="top">
+                            <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
+                                @click="moveUp(row, index)" style="color:#409EFF;"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
+                                v-if="index != (data.length - 1)" :disabled="detailData.status == 1"
+                                class="el-icon-arrow-down" @click="moveDown(row, index)" style="color:#409EFF;"></i>
+                        </el-tooltip>
+                    </div>
+                </div>
+            </template>
+            //产品名称
+            <template slot="cnameForm" slot-scope="{type,disabled}">
+                <span style="display:flex">
+                    <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small" filterable
+                        @change="cnameChange(goodsForm)">
+                        <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname" :value="item.itemId">
+                        </el-option>
+                    </el-select>
+                    <el-button icon="el-icon-search" size="small" @click="pickGoods"></el-button>
+                </span>
+            </template>
+            //螺纹
+            <template slot="remarksOneForm" slot-scope="{type,disabled}">
+                <el-select v-model="goodsForm.remarksOne" placeholder="请选择" size="small" :disabled="disabled"
+                    @change="propsChange(goodsForm)">
+                    <el-option v-for="item in ThreadList" :key="item.id" :label="item.dictValue"
+                        :value="item.dictValue">
+                    </el-option>
+                </el-select>
+            </template>
+            //介质
+            <template slot="customTwoForm" slot-scope="{type,disabled}">
+                <el-select v-model="goodsForm.customTwo" placeholder="请选择" size="small" :disabled="disabled"
+                    @change="propsChange(goodsForm)">
+                    <el-option v-for="item in mediumList" :key="item.id" :label="item.dictValue"
+                        :value="item.dictValue">
+                    </el-option>
+                </el-select>
+            </template>
+            //颜色
+            <template slot="customThreeForm" slot-scope="{type,disabled}">
+                <el-select v-model="goodsForm.customThree" placeholder="请选择" size="small" :disabled="disabled"
+                    @change="propsChange(goodsForm)">
+                    <el-option v-for="item in colorList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
+                    </el-option>
+                </el-select>
+            </template>
+            //电压
+            <template slot="customFourForm" slot-scope="{type,disabled}">
+                <el-select v-model="goodsForm.customFour" placeholder="请选择" size="small" :disabled="disabled"
+                    @change="propsChange(goodsForm)">
+                    <el-option v-for="item in stencilList" :key="item.id" :label="item.dictValue"
+                        :value="item.dictValue">
+                    </el-option>
+                </el-select>
+            </template>
+            //产品属性
+            <template slot="itemPropForm" slot-scope="{type,disabled}">
+                <el-input type="textarea" :rows="2" v-model="goodsForm.itemProp" size="small" placeholder="">
+                </el-input>
+            </template>
+            //阀门配件
+            <template slot="partsValveNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsValveName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsValveSalePrice?goodsForm.partsValveSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(0,goodsForm.partsValveValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //瓶帽配件
+            <template slot="partsCapNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsCapName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsCapSalePrice?goodsForm.partsCapSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(1,goodsForm.partsCapValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //特殊处理
+            <template slot="partsHandleNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsHandleName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsHandleSalePrice?goodsForm.partsHandleSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(2,goodsForm.partsHandleValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //包装方式
+            <template slot="partsColourNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsColourName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsColourSalePrice?goodsForm.partsColourSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(3,goodsForm.partsColourValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //特殊颜色
+            <template slot="partsModeNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsModeName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsModeSalePrice?goodsForm.partsModeSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(4,goodsForm.partsModeValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //认证
+            <template slot="partsAuthenticationNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsAuthenticationName" size="small" placeholder=""
+                        :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsAuthenticationSalePrice?goodsForm.partsAuthenticationSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(5,goodsForm.partsAuthenticationValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //其他
+            <template slot="partsOtherNameForm" slot-scope="{type,disabled}">
+                <div style="display:flex;">
+                    <el-input v-model="goodsForm.partsOtherName" size="small" placeholder="" :disabled="disabled">
+                        <template slot="append">{{goodsForm.partsOtherSalePrice?goodsForm.partsOtherSalePrice:0}}</template>
+                    </el-input>
+                    <el-button icon="el-icon-edit" size="mini" @click="openpart(6,goodsForm.partsOtherValue)"
+                        :disabled="disabled"></el-button>
+                </div>
+            </template>
+            //配件信息
+            <template slot="partsDescribeForm" slot-scope="{type,disabled}">
+                <el-input type="textarea" :rows="2" v-model="goodsForm.partsDescribe" size="small" placeholder=""
+                    @change="editChange(goodsForm)">
+                </el-input>
+            </template>
+            //英文名称
+            <template slot="enameForm" slot-scope="{type,disabled}">
+                <el-input type="textarea" :rows="2" v-model="goodsForm.ename" size="small" placeholder="请点击右边按钮"
+                    @change="editChange(row)"></el-input>
+            </template>
+            //产品描述
+            <template slot="itemDescriptionForm" slot-scope="{type,disabled}">
+                <el-input type="textarea" :rows="2" v-model="goodsForm.itemDescription" size="small" placeholder="请输入"
+                    @change="editChange(goodsForm)">
+                </el-input>
+            </template>
+            //采购单价
+            <template slot="purchaseAmountForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.purchaseAmount" size="small" placeholder="请输入"
+                    @change="purchaseAmountChange(goodsForm)" :disabled="disabled"></el-input>
+            </template>
+            //单价
+            <template slot="priceForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.price" size="small"
+                    oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+                    @change="priceChange(goodsForm)"></el-input>
+            </template>
+            //数量
+            <template slot="orderQuantityForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.orderQuantity" size="small"
+                    oninput='this.value=this.value.replace(/[^(\d)]/g,"")' @change="priceChange(goodsForm)"></el-input>
+            </template>
+            //折扣
+            <template slot="discountForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.discount" size="small"
+                    oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+                    @change="discountChange(goodsForm)"></el-input>
+            </template>
+            //税率
+            <template slot="taxRateForm" slot-scope="{type,disabled}">
+                <el-input v-model="goodsForm.taxRate" size="small"
+                    oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+                    @change="taxRateChange(goodsForm)"></el-input>
+            </template>
+            //产品型号
+            <template slot="itemTypeForm" slot-scope="{type,disabled}">
+                <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"
+                    size="small" @focus="itemTypeFocus(goodsForm)">
+                    <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"
+                        :value="item.value">
+                    </el-option>
+                </el-select>
+            </template>
+        </avue-crud>
+        <!-- <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+            :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods"
+            top="5vh" v-dialog-drag>
+            <span>
+                <el-row>
+                    <el-col :span="4">
+                        <div>
+                            <el-scrollbar>
+                                <basic-container>
+                                    <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle" />
+                                </basic-container>
+                            </el-scrollbar>
+                        </div>
+                    </el-col>
+                    <el-col :span="20">
+                        <avue-crud :option="goodsOption" :table-loading="loading" :data="goodsList" ref="goodsCrud"
+                            :search.sync="search" @search-change="searchChange" @refresh-change="refreshChange"
+                            @selection-change="selectionChange" @row-click="rowClick" :page.sync="page"
+                            @on-load="onLoad" @saveColumn="saveGoodsColumn" @resetColumn="resetGoodsColumn"
+                            :cell-style="cellStyle"></avue-crud>
+                    </el-col>
+                </el-row>
+            </span>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="importGoods" :disabled="selectionList.length !=1">导入</el-button>
+            </span>
+        </el-dialog> -->
+        <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="报价单明细(E)" @onClose="onClose()">
+        </report-dialog>
+        <part-library ref="partLibrary" @importPart="importPart"></part-library>
+        <price-library ref="library" @importLibray="importLibray" />
+    </trade-card>
+</template>
+  
+<script>
+import goodsOption from "../config/commodity.json";
+import tableOption from "../config/customerContact.json";
+import reportDialog from "@/components/report-dialog/main";
+import partLibrary from "@/components/part-library/main";
+import priceLibrary from "@/components/price-Library/main";
+import propertyDialog from "@/components/property-dialog/main";
+import { dateFormat } from "@/util/date";
+import {
+    detail,
+    submit,
+    delItem,
+    getDeptLazyTree,
+    getGoods,
+    savePurchase,
+    saveShipping,
+    getPorts,
+    getSpecification,
+    getPricebank,
+    saveSell,
+    getPricedetail,
+    getParities,
+    getCode
+} from "@/api/basicData/customerInquiry";
+import {
+    sum,
+    multiply,
+    partSum,
+    productCal,
+    sellingCal,
+    amountCal,
+    transformCal,
+    grossProfitCal,
+    STGPCal,
+    numCal,
+    costsCal,
+    costCal
+} from "@/util/calculate";
+import _ from "lodash";
+export default {
+    name: "customerInformation",
+    data() {
+        return {
+            switchDialog: false,
+            loading: false,
+            itemtypeList: [],
+            goodsForm: {},
+            tableOption: {},
+            goodsoptions: [],
+            partList: [],
+            ThreadList: [],
+            mediumList: [],
+            colorList: [],
+            stencilList: [],
+            selectionList: [],
+            dialogVisible: false,
+            treeDeptId: null,
+            treeStyle: "height:" + (window.innerHeight - 315) + "px",
+            goodsOption: {},
+            goodsList: [],
+            page: {
+                pageSize: 10,
+                currentPage: 1,
+                total: 0
+            },
+            treeOption: {
+                nodeKey: "id",
+                lazy: true,
+                treeLoad: function (node, resolve) {
+                    const parentId = node.level === 0 ? 0 : node.data.id;
+                    getDeptLazyTree(parentId).then(res => {
+                        resolve(
+                            res.data.data.map(item => {
+                                return {
+                                    ...item,
+                                    leaf: !item.hasChildren
+                                };
+                            })
+                        );
+                    });
+                },
+                addBtn: false,
+                menu: false,
+                size: "small",
+                props: {
+                    label: "title",
+                    value: "value",
+                    children: "children"
+                }
+            },
+        };
+    },
+    props: {
+        data: {
+            type: Array
+        },
+        detailData: {
+            type: Object
+        },
+        form: {
+            type: Object
+        }
+    },
+    components: {
+        partLibrary,
+        propertyDialog,
+        priceLibrary,
+        reportDialog
+    },
+    async created() {
+        this.tableOption = await this.getColumnData(
+            this.getColumnName(1),
+            tableOption
+        );
+        this.goodsOption = await this.getColumnData(
+            this.getColumnName(26),
+            goodsOption
+        );
+        this.getWorkDicts("Thread").then(res => {
+            this.ThreadList = res.data.data;
+        });
+        this.getWorkDicts("medium").then(res => {
+            this.mediumList = res.data.data;
+        });
+        this.getWorkDicts("property_color").then(res => {
+            this.colorList = res.data.data;
+        });
+        this.getWorkDicts("stencil").then(res => {
+            this.stencilList = res.data.data;
+        });
+        this.getWorkDicts("unit").then(res => {
+            this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
+        });
+        getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+            if (res.data.data.total > 0) {
+                this.goodsoptions = res.data.data.records;
+                if (Math.ceil(res.data.data.total / 10) > 1) {
+                    for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+                        getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
+                            this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+                        });
+                    }
+                }
+            }
+        });
+    },
+    methods: {
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        pickGoods() {
+            // this.dialogVisible = !this.dialogVisible;
+            this.$refs.library.init(false);
+        },
+        nodeClick(data) {
+            this.treeDeptId = data.id;
+            this.page.currentPage = 1;
+            this.onLoad(this.page);
+        },
+        //费用查询
+        onLoad(page, params = {}) {
+            let obj = this.deepClone(Object.assign(params, this.search));
+            this.loading = true;
+            getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
+                .then(res => {
+                    const data = res.data.data;
+                    this.page.total = data.total;
+                    this.goodsList = data.records;
+                    if (this.page.total) {
+                        this.goodsOption.height = window.innerHeight - 350;
+                    }
+                })
+                .finally(() => {
+                    this.loading = false;
+                });
+        },
+        rowClick(row) {
+            this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
+        },
+        // importGoods() {
+        //     this.upDataOption()
+        //     this.selectionList.forEach(e => {
+        //         this.goodsForm.itemId = e.id;
+        //         this.goodsForm.ename = e.ename;
+        //         this.goodsForm.code = e.code;
+        //         this.goodsForm.cname = e.cname;
+        //         this.goodsForm.corpId = e.corpId;
+        //         this.goodsForm.corpName = e.corpCode;
+        //         this.goodsForm.priceCategory = e.goodsTypeName;
+        //         this.goodsForm.itemUrl = e.url;
+        //         this.goodsForm.itemProp = null;
+        //         this.goodsForm.remarksOne = null;
+        //         this.goodsForm.customTwo = null;
+        //         this.goodsForm.customThree = null;
+        //         this.goodsForm.customFour = null;
+        //         this.goodsForm.customFive = null;
+        //         this.goodsForm.customSix = null;
+        //         this.goodsForm.customSeven = null;
+        //         this.goodsForm.customEight = null;
+        //         this.goodsForm.customNine = null;
+        //         this.goodsForm.customTen = null;
+        //         this.goodsForm.itemDescription = e.cnameDescription;
+        //         this.goodsForm.partsList = [];
+        //         this.goodsForm.partsPrice = 0;
+        //         this.goodsForm.itemType = null;
+        //         this.goodsForm.tradeTerms = null;
+        //         this.goodsForm.purchaseCost = 0;
+        //         this.goodsForm.purchaseAmount = 0;
+        //         this.goodsForm.price = 0;
+        //         this.goodsForm.orderQuantity = 0;
+        //         this.goodsForm.insurance = 0;
+        //         this.goodsForm.freight = 0;
+        //         this.goodsForm.discount = null;
+        //         this.goodsForm.amount = 0;
+        //         this.goodsForm.taxRate = 0;
+        //         this.goodsForm.unit = e.unit;
+        //         this.goodsForm.itemMargin = 0;
+        //         this.goodsForm.remarks = null;
+        //         this.goodsForm.exchangeRate = this.form.exchangeRate;
+        //         this.goodsForm.partsDescribe = null;
+        //         this.goodsForm.productRemark = e.ename;
+        //         this.goodsForm.attributeList = this.getAttribute(e.goodsSpecificationList);
+        //     })
+        //     this.dialogVisible = false
+        // },
+        closeGoods() {
+            this.selectionList = [];
+            this.treeDeptId = "";
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        refreshTable() {
+            this.$refs.crud.refreshTable();
+        },
+        openpart(val, list) {
+            this.$refs.partLibrary.init(val, list)
+        },
+        addRow() {
+            if (!this.form.corpId) {
+                return this.$message.error("请选择客户名称");
+            }
+            this.$refs.crud.rowAdd()
+        },
+        cnameChange(row) {
+            this.upDataOption()
+            this.goodsoptions.forEach(e => {
+                if (e.itemId == row.itemId) {
+                    row.itemId = e.itemId;
+                    row.code = e.code;
+                    row.cname = e.cname;
+                    row.ename = e.ename;
+                    row.priceCategory = e.goodsTypeName;
+                    row.purchaseCost = costCal(e.price, e.taxRate);
+                    row.purchaseAmount = e.purchaseAmount;
+                    row.itemProp = null;
+                    row.remarksOne = null;
+                    row.customTwo = null;
+                    row.customThree = null;
+                    row.customFour = null;
+                    row.customFive = null;
+                    row.customSix = null;
+                    row.customSeven = null;
+                    row.customEight = null;
+                    row.customNine = null;
+                    row.customTen = null;
+                    row.corpId = e.corpId;
+                    row.corpName = e.corpCode;
+                    row.itemDescription = e.cnameDescription;
+                    row.partsPrice = 0;
+                    row.itemType = e.specs;
+                    row.tradeTerms = null;
+                    row.productPrice = productCal(e.purchaseAmount, 0, this.form.coefficient);
+                    row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+                    row.orderQuantity = 1;
+                    row.insurance = 0;
+                    row.freight = 0;
+                    row.discount = null;
+                    row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
+                    row.taxRate = 0;
+                    row.unit = e.unit;
+                    row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
+                    row.partsDescribe = null;
+                    row.remarks = null;
+                    row.exchangeRate = this.form.exchangeRate;
+                    row.productRemark = e.ename;
+                    row.attributeList = this.getAttribute(e.goodsSpecificationList)
+                }
+            })
+        },
+        importLibray(rows) {
+            this.upDataOption()
+            rows.forEach(e => {
+                this.goodsForm = {
+                    itemId: e.itemId,
+                    code: e.code,
+                    cname: e.cname,
+                    ename: e.ename,
+                    priceCategory: e.goodsTypeName,
+                    purchaseCost: costCal(e.price, e.taxRate),
+                    purchaseAmount: e.purchaseAmount,
+                    itemProp: null,
+                    remarksOne: null,
+                    customTwo: null,
+                    customThree: null,
+                    customFour: null,
+                    customFive: null,
+                    customSix: null,
+                    customSeven: null,
+                    customEight: null,
+                    customNine: null,
+                    customTen: null,
+                    corpId: e.corpId,
+                    corpName: e.corpCode,
+                    itemDescription: e.cnameDescription,
+                    partsPrice: 0,
+                    itemType: e.specs,
+                    tradeTerms: null,
+                    productPrice: productCal(e.purchaseAmount, 0, this.form.coefficient),
+                    price: sellingCal(
+                        productCal(e.purchaseAmount, 0, this.form.coefficient),
+                        this.form.exchangeRate
+                    ),
+                    orderQuantity: 1,
+                    insurance: 0,
+                    freight: 0,
+                    discount: null,
+                    amount: sellingCal(
+                        productCal(e.purchaseAmount, 0, this.form.coefficient),
+                        this.form.exchangeRate
+                    ),
+                    taxRate: 0,
+                    unit: e.unit,
+                    itemMargin: grossProfitCal(
+                        e.purchaseAmount,
+                        0,
+                        sellingCal(
+                            productCal(e.purchaseAmount, 0, this.form.coefficient),
+                            this.form.exchangeRate
+                        ),
+                        this.form.exchangeRate
+                    ),
+                    partsDescribe: null,
+                    remarks: null,
+                    exchangeRate: this.form.exchangeRate,
+                    productRemark: e.ename,
+                    attributeList: this.getAttribute(e.goodsSpecificationList)
+                }
+            });
+            this.$refs.crud.rowAdd()
+        },
+        openProperty(row) {
+            this.$refs.property.init(row);
+        },
+        addLibrary() {
+            if (!this.form.corpId) {
+                return this.$message.error("请选择客户名称");
+            }
+            if (!this.form.currency) {
+                return this.$message.error("请选择币别");
+            }
+            this.$refs.library.init(false);
+        },
+        openReport() {
+            this.switchDialog = !this.switchDialog;
+        },
+        onClose(val) {
+            this.switchDialog = val;
+        },
+        savePurchase() {
+            if (!this.form.id) {
+                return this.$message.error("此单据没有提交记录,请先提交");
+            }
+            this.$confirm("是否生成采购询价单?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                savePurchase(this.form.id).then(res => {
+                    if (res.data.code == 200) {
+                        this.$message.success("生成成功");
+                    }
+                });
+            });
+        },
+        saveShipping() {
+            if (!this.form.id) {
+                return this.$message.error("此单据没有提交记录,请先提交");
+            }
+            this.$confirm("是否生成船务询价单?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                saveShipping(this.form.id).then(res => {
+                    if (res.data.code == 200) {
+                        this.$message.success("生成成功");
+                    }
+                });
+            });
+        },
+        cnameData() {
+
+        },
+        khEdit(status) {
+            if (status == 'cname') {
+                this.$router.push({
+                    path: '/basicData/commodityType/index'
+                })
+            }
+        },
+        rowCell(row, index) {
+            this.getAttribute(JSON.parse(row.attributeList))
+            this.$refs.crud.rowEdit(row, index)
+        },
+        rowDel(row) {
+            this.$confirm("确定删除数据?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                if (row.id) {
+                    delItem(row.id).then(res => {
+                        this.$message({
+                            type: "success",
+                            message: "删除成功!"
+                        });
+                        this.data.splice(row.$index, 1);
+                    });
+                } else {
+                    this.$message({
+                        type: "success",
+                        message: "删除成功!"
+                    });
+                    this.data.splice(row.$index, 1);
+                }
+            });
+        },
+        moveUp(row, index) {
+            this.data[index] = this.data.splice(index - 1, 1, row)[0]
+        },
+        moveDown(row, index) {
+            this.data[index] = this.data.splice(index + 1, 1, row)[0]
+        },
+        transition(rows) {
+            let data = []
+            rows.forEach(e => {
+                data.push({
+                    goodId: e.itemId,
+                    goodTypeId: e.goodTypeId,
+                    goodTypeName: e.goodsTypeName,
+                    ename: e.ename,
+                    corpId: e.corpId,
+                    corpName: e.corpName,
+                    goodName: e.cname,
+                    price: e.purchaseAmount,
+                    goodNumber: 1,
+                    amout: e.purchaseAmount,
+                    partsCost: costCal(e.price, e.taxRate),
+                    $cellEdit: true
+                })
+            })
+            return data
+        },
+        purchaseAmountChange(row) {
+            row.productPrice = productCal(
+                row.purchaseAmount,
+                row.partsPrice,
+                this.form.coefficient
+            );
+            row.price = sellingCal(row.productPrice, this.form.exchangeRate);
+            row.amount = amountCal(
+                row.price,
+                row.orderQuantity,
+                row.freight,
+                row.insurance,
+                row.discount
+            );
+            row.itemMargin = grossProfitCal(
+                row.purchaseAmount,
+                row.partsPrice,
+                row.price,
+                this.form.exchangeRate
+            );
+        },
+        priceChange(row) {
+            row.amount = amountCal(
+                row.price,
+                row.orderQuantity,
+                row.freight,
+                row.insurance,
+                row.discount
+            );
+            row.itemMargin = grossProfitCal(
+                row.purchaseAmount,
+                row.partsPrice,
+                row.price,
+                this.form.exchangeRate
+            );
+        },
+        itemTypeFocus(row) {
+            this.itemtypeList = [];
+            getSpecification({ goodId: row.itemId }).then(res => {
+                const data = res.data.data;
+                this.itemtypeList = data.map(item => ({ value: item }));
+            });
+        },
+        getAttribute(rows) {
+            let data = []
+            rows.forEach(e => {
+                if (e.attributeNo == 'Thread' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "remarksOne").disabled = false;
+                }
+                if (e.attributeNo == 'medium' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "customTwo").disabled = false;
+                }
+                if (e.attributeNo == 'property_color' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "customThree").disabled = false;
+                }
+                if (e.attributeNo == 'stencil' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "customFour").disabled = false;
+                }
+                if (e.attributeName == '阀门配件' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsValveName").disabled = false;
+                }
+                if (e.attributeName == '瓶帽配件' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsCapName").disabled = false;
+                }
+                if (e.attributeName == '特殊处理' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsHandleName").disabled = false;
+                }
+                if (e.attributeName == '包装方式' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsColourName").disabled = false;
+                }
+                if (e.attributeName == '特殊颜色' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsModeName").disabled = false;
+                }
+                if (e.attributeName == '认证' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsAuthenticationName").disabled = false;
+                }
+                if (e.attributeName == '其他' && e.status == 0) {
+                    this.findObject(this.tableOption.column, "partsOtherName").disabled = false;
+                }
+                data.push({
+                    type: e.type,
+                    attributeName: e.attributeName,
+                    attributeNo: e.attributeNo,
+                    status: e.status,
+                })
+            })
+            return JSON.stringify(data);
+        },
+        // importProperty(row) {
+        //     const arr = [];
+        //     for (let key in row) {
+        //         if (row[key]) {
+        //             arr.push(row[key]);
+        //         }
+        //     }
+        //     this.goodsForm.itemProp = arr.join(",");
+        //     this.goodsForm.remarksOne = row.remarksOne;
+        //     this.goodsForm.customTwo = row.customTwo;
+        //     this.goodsForm.customThree = row.customThree;
+        //     this.goodsForm.customFour = row.customFour;
+        //     this.goodsForm.customFive = row.customFive;
+        //     this.goodsForm.customSix = row.customSix;
+        //     this.goodsForm.customSeven = row.customSeven;
+        //     this.goodsForm.customEight = row.customEight;
+        //     this.goodsForm.customNine = row.customNine;
+        //     this.goodsForm.customTen = row.customTen;
+        //     this.goodsForm.productRemark = this.getproductRemark(this.goodsForm)
+        // },
+        importPart(rows, type) {
+            if (type == 0) {
+                this.goodsForm.partsValveCostPrice = 0
+                this.goodsForm.partsValveSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsValveCostPrice = sum(this.goodsForm.partsValveCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsValveSalePrice = sum(this.goodsForm.partsValveSalePrice, e.amout);
+                })
+                this.goodsForm.partsValveName = names.join(",")
+                this.goodsForm.partsValveValue = JSON.stringify(rows)
+            }
+            if (type == 1) {
+                this.goodsForm.partsCapCostPrice = 0
+                this.goodsForm.partsCapSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsCapCostPrice = sum(this.goodsForm.partsCapCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsCapSalePrice = sum(this.goodsForm.partsCapSalePrice, e.amout);
+                })
+                this.goodsForm.partsCapName = names.join(",")
+                this.goodsForm.partsCapValue = JSON.stringify(rows)
+            }
+            if (type == 2) {
+                this.goodsForm.partsHandleCostPrice = 0
+                this.goodsForm.partsHandleSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsHandleCostPrice = sum(this.goodsForm.partsHandleCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsHandleSalePrice = sum(this.goodsForm.partsHandleSalePrice, e.amout);
+                })
+                this.goodsForm.partsHandleName = names.join(",")
+                this.goodsForm.partsHandleValue = JSON.stringify(rows)
+            }
+            if (type == 3) {
+                this.goodsForm.partsColourCostPrice = 0
+                this.goodsForm.partsColourSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsColourCostPrice = sum(this.goodsForm.partsColourCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsColourSalePrice = sum(this.goodsForm.partsColourSalePrice, e.amout);
+                })
+                this.goodsForm.partsColourName = names.join(",")
+                this.goodsForm.partsColourValue = JSON.stringify(rows)
+            }
+            if (type == 4) {
+                this.goodsForm.partsModeCostPrice = 0
+                this.goodsForm.partsModeSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsModeCostPrice = sum(this.goodsForm.partsModeCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsModeSalePrice = sum(this.goodsForm.partsModeSalePrice, e.amout);
+                })
+                this.goodsForm.partsModeName = names.join(",")
+                this.goodsForm.partsModeValue = JSON.stringify(rows)
+            }
+            if (type == 5) {
+                this.goodsForm.partsAuthenticationCostPrice = 0
+                this.goodsForm.partsAuthenticationSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsAuthenticationCostPrice = sum(this.goodsForm.partsAuthenticationCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsAuthenticationSalePrice = sum(this.goodsForm.partsAuthenticationSalePrice, e.amout);
+                })
+                this.goodsForm.partsAuthenticationName = names.join(",")
+                this.goodsForm.partsAuthenticationValue = JSON.stringify(rows)
+            }
+            if (type == 6) {
+                this.goodsForm.partsOtherCostPrice = 0
+                this.goodsForm.partsOtherSalePrice = 0
+                let names = []
+                rows.forEach(e => {
+                    names.push(e.goodName)
+                    this.goodsForm.partsOtherCostPrice = sum(this.goodsForm.partsOtherCostPrice, multiply(e.partsCost, e.goodNumber));
+                    this.goodsForm.partsOtherSalePrice = sum(this.goodsForm.partsOtherSalePrice, e.amout);
+                })
+                this.goodsForm.partsOtherName = names.join(",")
+                this.goodsForm.partsOtherValue = JSON.stringify(rows)
+            }
+            this.goodsForm.partsCost = partSum(this.goodsForm.partsValveCostPrice, this.goodsForm.partsCapCostPrice, this.goodsForm.partsHandleCostPrice, this.goodsForm.partsColourCostPrice, this.goodsForm.partsModeCostPrice, this.goodsForm.partsAuthenticationCostPrice, this.goodsForm.partsOtherCostPrice)
+            this.goodsForm.partsPrice = partSum(this.goodsForm.partsValveSalePrice, this.goodsForm.partsCapSalePrice, this.goodsForm.partsHandleSalePrice, this.goodsForm.partsColourSalePrice, this.goodsForm.partsModeSalePrice, this.goodsForm.partsAuthenticationSalePrice, this.goodsForm.partsOtherSalePrice)
+            // 销售价=(配件采购价格+产品价格)/汇率 *(1+客户FOB系数/100)
+            this.goodsForm.productPrice = productCal(
+                this.goodsForm.purchaseAmount,
+                this.goodsForm.partsPrice,
+                this.form.coefficient
+            );
+            this.goodsForm.price = sellingCal(
+                this.goodsForm.productPrice,
+                this.form.exchangeRate
+            );
+            this.goodsForm.amount = amountCal(
+                this.goodsForm.price,
+                this.goodsForm.orderQuantity,
+                this.goodsForm.freight,
+                this.goodsForm.insurance,
+                this.goodsForm.discount
+            );
+            this.goodsForm.itemMargin = grossProfitCal(
+                this.goodsForm.purchaseAmount,
+                this.goodsForm.partsPrice,
+                this.goodsForm.price,
+                this.form.exchangeRate
+            );
+            const names = [this.goodsForm.partsValveName, this.goodsForm.partsCapName, this.goodsForm.partsHandleName, this.goodsForm.partsColourName, this.goodsForm.partsModeName, this.goodsForm.partsAuthenticationName, this.goodsForm.partsOtherName];
+            const name = []
+            names.forEach(e => {
+                if (e) {
+                    name.push(e)
+                }
+            })
+            this.goodsForm.partsDescribe = name.join(";");
+            // this.data[index].partsPriceDescribe = namePrices.join(";");
+            this.goodsForm.productRemark = this.getproductRemark(this.goodsForm)
+            this.priceChange(this.goodsForm);
+        },
+        propsChange(row) {
+            const data = {
+                remarksOne: row.remarksOne,
+                customTwo: row.customTwo,
+                customThree: row.customThree,
+                customFour: row.customFour,
+                customFive: row.customFive,
+                customSix: row.customSix,
+                customSeven: row.customSeven,
+                customEight: row.customEight,
+                customNine: row.customNine,
+                customTen: row.customTen,
+            };
+            const arr = []
+            for (let key in data) {
+                if (row[key]) {
+                    arr.push(row[key]);
+                }
+            }
+            this.goodsForm.itemProp = arr.join(' ')
+        },
+        getproductRemark(row) {
+            const ename = row.ename ? row.ename : "";
+            const itemDescription = row.itemDescription
+                ? row.itemDescription
+                : "";
+            const itemProp = row.itemProp ? row.itemProp : "";
+            const partsDescribe = row.partsDescribe ? (', ' + row.partsDescribe) : "";
+            const productRemark =
+                ename +
+                "\n" +
+                itemProp +
+                " " +
+                itemDescription +
+                " " +
+                partsDescribe;
+            return productRemark
+        },
+        beforeClose(done) {
+            this.upDataOption()
+            done();
+        },
+        upDataOption() {
+            this.findObject(this.tableOption.column, "remarksOne").disabled = true;
+            this.findObject(this.tableOption.column, "customTwo").disabled = true;
+            this.findObject(this.tableOption.column, "customThree").disabled = true;
+            this.findObject(this.tableOption.column, "customFour").disabled = true;
+            this.findObject(this.tableOption.column, "partsValveName").disabled = true;
+            this.findObject(this.tableOption.column, "partsCapName").disabled = true;
+            this.findObject(this.tableOption.column, "partsHandleName").disabled = true;
+            this.findObject(this.tableOption.column, "partsColourName").disabled = true;
+            this.findObject(this.tableOption.column, "partsModeName").disabled = true;
+            this.findObject(this.tableOption.column, "partsAuthenticationName").disabled = true;
+            this.findObject(this.tableOption.column, "partsOtherName").disabled = true;
+
+        },
+        discountChange(row) {
+            if (row.discount >= 10) {
+                row.discount = null;
+                this.$message.error("请正确输入折扣");
+            }
+            this.priceChange(row);
+        },
+        taxRateChange(row) {
+            if (row.taxRate > 100) {
+                row.taxRate = 0;
+                this.$message.error("请正确输入税率");
+            }
+        },
+        handleRowSave(row, done, loading) {
+            this.data.push(row)
+            loading()
+            done()
+        },
+        handleRowUpdate(row, index, done, loading) {
+            this.data[index] = row
+            // this.$refs.crud.rowUpdate()
+            loading()
+            done()
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(1),
+                this.tableOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.getWorkDicts("cargo_type").then(res => {
+                    this.findObject(this.tableOption.column, "cargoType").dicData =
+                        res.data.data;
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetColumn() {
+            this.tableOption = tableOption;
+            const inSave = await this.delColumnData(
+                this.getColumnName(1),
+                tableOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("重置成功");
+                //关闭窗口
+                setTimeout(() => {
+                    this.$refs.crud.$refs.dialogColumn.columnBox = false;
+                }, 1000);
+            }
+        },
+        async saveGoodsColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(26),
+                this.goodsOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.goodsCrud.doLayout();
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetGoodsColumn() {
+            this.goodsOption = goodsOption;
+            const inSave = await this.delColumnData(
+                this.getColumnName(26),
+                goodsOption
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.goodsCrud.doLayout();
+                });
+                this.$message.success("重置成功");
+                //关闭窗口
+                setTimeout(() => {
+                    this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+                }, 1000);
+            }
+        }
+    },
+    watch: {
+    }
+};
+</script>
+  
+<style scoped>
+::v-deep .select-component {
+    display: flex;
+}
+
+.page-crad ::v-deep .basic-container__card {
+    height: 94.2vh;
+}
+
+.itemTable ::v-deep .el-table {
+    width: 738px;
+}
+::v-deep .el-input-group__append, .el-input-group__prepend {
+    padding: 0 5px;
+}
+</style>
+  

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

@@ -85,4 +85,4 @@
       "overHidden": true
     }
   ]
-}
+}

+ 354 - 218
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -1,219 +1,355 @@
 {
-  "searchShow": true,
-  "searchMenuSpan": 6,
-  "border": true,
-  "index": true,
-  "viewBtn": false,
-  "editBtn": false,
-  "addBtn": false,
-  "delBtn": false,
-  "headerAlign": "center",
-  "menuWidth": 150,
-  "refreshBtn": false,
-  "showSummary": true,
-  "indexSlot":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": "ename",
-      "index": 4,
-      "width": 200,
-      "overHidden": true
-    },
-    {
-      "label": "产品属性",
-      "prop": "itemProp",
-      "index": 6,
-      "width": 200,
-      "overHidden": true
-    },
-    {
-      "label": "产品描述",
-      "prop": "itemDescription",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "产品型号",
-      "prop": "itemType",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "采购成本",
-      "prop": "purchaseCost",
-      "index": 9,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "采购单价",
-      "prop": "purchaseAmount",
-      "index": 10,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "配件信息",
-      "prop": "partsDescribe",
-      "index": 11,
-      "width": 200,
-      "overHidden": true
-    },
-    {
-      "label": "配件成本",
-      "prop": "partsCost",
-      "index": 12,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "配件价格",
-      "prop": "partsPrice",
-      "index": 13,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "配件价格描述",
-      "prop": "partsPriceDescribe",
-      "index": 14,
-      "width": 120,
-      "overHidden": true
-    },
-    {
-      "label": "供应商",
-      "prop": "corpId",
-      "index": 15,
-      "width": 200,
-      "overHidden": true
-    },
-    {
-      "label": "重点推荐",
-      "prop": "priorityReferrer",
-      "index": 16,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "推荐理由",
-      "prop": "referrerReason",
-      "index": 17,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    },
-    {
-      "label": "产品价格",
-      "prop": "productPrice",
-      "index": 18,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "销售价",
-      "prop": "price",
-      "index": 19,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "单品毛利率",
-      "prop": "itemMargin",
-      "index": 20,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "计价单位",
-      "prop": "unit",
-      "index": 21,
-      "width": 100,
-      "overHidden": true,
-      "cell": true,
-      "type": "select",
-      "dicData": [],
-      "props": {
-        "label": "dictValue",
-        "value": "dictValue"
-      }
-    },
-    {
-      "label": "数量",
-      "prop": "orderQuantity",
-      "index": 22,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "折扣",
-      "prop": "discount",
-      "index": 25,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "金额",
-      "prop": "amount",
-      "index": 26,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "税率",
-      "prop": "taxRate",
-      "index": 27,
-      "width": 100,
-      "align": "right",
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 28,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    },
-    {
-      "label": "商品信息",
-      "prop": "productRemark",
-      "index": 29,
-      "width": 100,
-      "overHidden": true,
-      "cell": true
-    }
-  ]
-}
+    "searchShow": true,
+    "searchMenuSpan": 6,
+    "border": true,
+    "index": true,
+    "viewBtn": false,
+    "editBtn": false,
+    "addBtn": false,
+    "delBtn": false,
+    "headerAlign": "center",
+    "menuWidth": 150,
+    "refreshBtn": false,
+    "showSummary": true,
+    "indexSlot": true,
+    "column": [
+        {
+            "label": "产品名称",
+            "prop": "cname",
+            "index": 1,
+            "width": 200,
+            "span": 8,
+            "overHidden": true
+        },
+        {
+            "label": "产品编号",
+            "prop": "code",
+            "index": 2,
+            "width": 100,
+            "span": 8,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "产品类别",
+            "prop": "priceCategory",
+            "index": 3,
+            "width": 100,
+            "span": 8,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "螺纹",
+            "prop": "remarksOne",
+            "index": 4,
+            "width": 100,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "介质",
+            "prop": "customTwo",
+            "index": 5,
+            "width": 100,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "颜色",
+            "prop": "customThree",
+            "index": 6,
+            "width": 100,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "电压",
+            "prop": "customFour",
+            "index": 7,
+            "width": 100,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "产品属性",
+            "prop": "itemProp",
+            "index": 8,
+            "width": 200,
+            "span": 24,
+            "overHidden": true
+        },
+        {
+            "label": "阀门配件",
+            "prop": "partsValveName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "瓶帽配件",
+            "prop": "partsCapName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "特殊处理",
+            "prop": "partsHandleName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "包装方式",
+            "prop": "partsColourName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "特殊颜色",
+            "prop": "partsModeName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "认证",
+            "prop": "partsAuthenticationName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "其他",
+            "prop": "partsOtherName",
+            "index": 9,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "配件信息",
+            "prop": "partsDescribe",
+            "index": 9,
+            "width": 200,
+            "span": 24,
+            "overHidden": true
+        },
+        {
+            "label": "英文名称",
+            "prop": "ename",
+            "index": 10,
+            "width": 200,
+            "span": 12,
+            "overHidden": true
+        },
+        {
+            "label": "产品描述",
+            "prop": "itemDescription",
+            "index": 11,
+            "width": 100,
+            "span": 12,
+            "overHidden": true
+        },
+        {
+            "label": "数量",
+            "prop": "orderQuantity",
+            "index": 12,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "overHidden": true
+        },
+        {
+            "label": "计价单位",
+            "prop": "unit",
+            "index": 13,
+            "width": 100,
+            "overHidden": true,
+            "span": 6,
+            "type": "select",
+            "dicData": [],
+            "props": {
+                "label": "dictValue",
+                "value": "dictValue"
+            }
+        },
+        {
+            "label": "销售价",
+            "prop": "price",
+            "index": 14,
+            "width": 100,
+            "span": 6,
+            "align": "right",
+            "overHidden": true
+        },
+        {
+            "label": "金额",
+            "prop": "amount",
+            "index": 15,
+            "width": 100,
+            "span": 6,
+            "align": "right",
+            "overHidden": true
+        },
+        {
+            "label": "商品信息",
+            "prop": "productRemark",
+            "type": "textarea",
+            "index": 16,
+            "width": 100,
+            "overHidden": true,
+            "minRows": 2,
+            "span": 24
+        },
+        {
+            "label": "产品型号",
+            "prop": "itemType",
+            "index": 17,
+            "width": 100,
+            "span": 6,
+            "overHidden": true
+        },
+        {
+            "label": "采购成本",
+            "prop": "purchaseCost",
+            "index": 18,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "采购单价",
+            "prop": "purchaseAmount",
+            "index": 19,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "配件成本",
+            "prop": "partsCost",
+            "index": 20,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "配件价格",
+            "prop": "partsPrice",
+            "index": 21,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "配件价格描述",
+            "prop": "partsPriceDescribe",
+            "index": 22,
+            "width": 120,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "供应商",
+            "prop": "corpName",
+            "index": 23,
+            "width": 200,
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "重点推荐",
+            "prop": "priorityReferrer",
+            "index": 24,
+            "width": 100,
+            "span": 6,
+            "overHidden": true
+        },
+        {
+            "label": "推荐理由",
+            "prop": "referrerReason",
+            "index": 25,
+            "width": 100,
+            "overHidden": true,
+            "span": 6
+        },
+        {
+            "label": "产品价格",
+            "prop": "productPrice",
+            "index": 26,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "单品毛利率",
+            "prop": "itemMargin",
+            "index": 27,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "disabled": true,
+            "overHidden": true
+        },
+        {
+            "label": "折扣",
+            "prop": "discount",
+            "index": 28,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "overHidden": true
+        },
+        {
+            "label": "税率",
+            "prop": "taxRate",
+            "index": 29,
+            "width": 100,
+            "align": "right",
+            "span": 6,
+            "overHidden": true
+        },
+        {
+            "label": "备注",
+            "prop": "remarks",
+            "type": "textarea",
+            "minRows": 2,
+            "index": 30,
+            "width": 100,
+            "overHidden": true,
+            "span": 12
+        }
+    ]
+}

+ 1 - 1
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -248,4 +248,4 @@
       "overHidden": true
     }
   ]
-}
+}

+ 35 - 32
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -126,7 +126,8 @@
           </template>
         </avue-form>
       </trade-card>
-      <trade-card title="商品信息">
+      <goods-info ref="goodsInfo" :form="form" :data="data" :detailData="detailData"></goods-info>
+      <!-- <trade-card title="商品信息">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" :summary-method="summaryMethod"
           @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" @row-dblclick="handleRowDBLClick">
           <template slot="headerSerial">
@@ -296,7 +297,7 @@
             <span>{{ row.itemMargin | isPercentage }}</span>
           </template>
         </avue-crud>
-      </trade-card>
+      </trade-card> -->
       <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
         feeUrl="/blade-purchase-sales/orderfees/update" optionType="CK" itemType="报价" @beforeFinance="beforeFinance"
         :inCropId="true" />
@@ -388,7 +389,7 @@ import {
   costsCal,
   costCal
 } from "@/util/calculate";
-
+import goodsInfo from "./components/goodsInfo.vue";
 import _ from "lodash";
 import { revokeWarehousing } from "../../../api/basicData/financing";
 export default {
@@ -826,7 +827,8 @@ export default {
     partDialog,
     priceLibrary,
     propertyDialog,
-    detailsSelect
+    detailsSelect,
+    goodsInfo
   },
   async created() {
     if (this.detailData.id) {
@@ -888,18 +890,18 @@ export default {
     getAllBoxs().then(res => {
       this.allBoxs = res.data.data;
     });
-    getGoods(1, 10).then(res => {
-      if (res.data.data.total > 0) {
-        this.goodsoptions = res.data.data.records;
-        if (Math.ceil(res.data.data.total / 10) > 1) {
-          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-            getGoods(i, 10).then(e => {
-              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-            });
-          }
-        }
-      }
-    });
+    // getGoods(1, 10).then(res => {
+    //   if (res.data.data.total > 0) {
+    //     this.goodsoptions = res.data.data.records;
+    //     if (Math.ceil(res.data.data.total / 10) > 1) {
+    //       for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+    //         getGoods(i, 10).then(e => {
+    //           this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+    //         });
+    //       }
+    //     }
+    //   }
+    // });
   },
   filters: {
     isDiscount(val) {
@@ -1100,21 +1102,21 @@ export default {
       this.goodsEditShow = false
       this.goodsEditForm = this.$options.data().goodsEditForm
     },
-    cnameData() {
-      this.goodsoptions = []
-      getGoods(1, 10).then(res => {
-        if (res.data.data.total > 0) {
-          this.goodsoptions = res.data.data.records;
-          if (Math.ceil(res.data.data.total / 10) > 1) {
-            for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-              getGoods(i, 10).then(e => {
-                this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-              });
-            }
-          }
-        }
-      });
-    },
+    // cnameData() {
+    //   this.goodsoptions = []
+    //   getGoods(1, 10).then(res => {
+    //     if (res.data.data.total > 0) {
+    //       this.goodsoptions = res.data.data.records;
+    //       if (Math.ceil(res.data.data.total / 10) > 1) {
+    //         for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+    //           getGoods(i, 10).then(e => {
+    //             this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+    //           });
+    //         }
+    //       }
+    //     }
+    //   });
+    // },
     cnameChange(row) {
       this.goodsoptions.forEach(e => {
         if (e.id == row.itemId) {
@@ -2094,7 +2096,8 @@ export default {
               this.detailData.status = 2;
               this.option = this.$options.data().option;
               this.goodsEditOption = this.$options.data().goodsEditOption;
-              this.$refs.crud.refreshTable();
+              // this.$refs.crud.refreshTable();
+              this.$refs.goodsInfo.refreshTable();
               this.getWorkDicts("cargo_type").then(res => {
                 this.findObject(this.option.column, "cargoType").dicData =
                   res.data.data;

+ 24 - 32
src/views/maintenance/landFreight/detailsPage.vue

@@ -8,7 +8,7 @@
           </el-button>
         </div>
         <div class="add-customer-btn">
-          <el-button type="primary" size="small" @click="editCustomer" :disabled="form.status==0">
+          <el-button type="primary" size="small" @click="editCustomer">
             保存数据
           </el-button>
         </div>
@@ -16,6 +16,9 @@
       <containerTitle title="基础资料" style="margin-top: 60px"></containerTitle>
       <basic-container v-loading="loadingBtn">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot="outHarborName">
+            <port-info v-model="form.outHarborName" :disabled="detailData.status == 1" />
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="基础明细"></containerTitle>
@@ -26,11 +29,11 @@
             <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
             </el-button>
           </template>
-          <template slot="feeId" slot-scope="{ row,index }">
-            <breakdown-select v-if="row.$cellEdit" v-model="row.feeId" @selectValue="value => selectValue(value,row)"
+          <template slot="feesId" slot-scope="{ row,index }">
+            <breakdown-select v-if="row.$cellEdit" v-model="row.feesId" @selectValue="value => selectValue(value,row)"
               :configuration="breakConfiguration">
             </breakdown-select>
-            <span v-else>{{ row.feeName }}</span>
+            <span v-else>{{ row.feesName }}</span>
           </template>
           <template slot="currency" slot-scope="{ row,index }">
             <el-select size="small" v-if="row.$cellEdit" v-model="row.currency" placeholder="请选择" clearable>
@@ -40,9 +43,9 @@
             <span v-else>{{ row.currency}}</span>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button size="small" type="text" @click="rowCell(row, index)" :disabled="form.status==0">{{
+            <el-button size="small" type="text" @click="rowCell(row, index)">{{
             row.$cellEdit ? "保存" : "修改" }}</el-button>
-            <el-button size="small" type="text" @click="rowDel(row, index)" :disabled="form.status==0">删除
+            <el-button size="small" type="text" @click="rowDel(row, index)">删除
             </el-button>
           </template>
         </avue-crud>
@@ -53,7 +56,7 @@
 
 <script>
 import { optionList } from "./js/optionList";
-import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist, itemDel } from "@/api/basicData/agreement";
+import { getDetail, submit, itemDel } from "@/api/maintenance/landFreight";
 import { areaTypeTree } from "@/api/basicData/customerInformation";
 import { getCode } from "@/api/basicData/customerInquiry";
 export default {
@@ -69,7 +72,7 @@ export default {
         column: [
           {
             label: "货物属性",
-            prop: "goodsProps",
+            prop: "goodsAttribute",
             type: "select",
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=cargo_type",
             props: {
@@ -86,19 +89,13 @@ export default {
             span: 12,
           },
           {
-            label: "出运港",
-            prop: "portOfDestination",
-            dicUrl: "/api/blade-system/region/lazy-list",
-            type: "cascader",
-            props: {
-              label: 'name',
-              value: 'code'
-            },
+            label: "起运港",
+            prop: "outHarborName",
             span: 12,
           },
           {
             label: "备注",
-            prop: "remark",
+            prop: "remarks",
             type: "textarea",
             minRows: 2,
             span: 24,
@@ -142,19 +139,17 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      areaTypeTree().then(res => {
-        this.findObject(this.optionList.column, "POD").dicData = res.data.data;
-      });
+      this.findObject(this.optionList.column, "departureId").dicData = JSON.parse(localStorage.getItem('areaTypeTree'));
     },
     cellStyle() {
       return "padding:0;height:40px;";
     },
     selectValue(value, row) {
       console.log(value, row)
-      if (row.feeId) {
-        row.feeName = value.cname
+      if (row.feesId) {
+        row.feesName = value.cname
       } else {
-        row.feeName = ""
+        row.feesName = ""
       }
     },
     getDetail(id) {
@@ -162,10 +157,7 @@ export default {
       getDetail(id)
         .then(res => {
           this.form = res.data.data;
-          if (res.data.data.status == 0) {
-            this.option.disabled = true
-          }
-          this.dataList = res.data.data.agreementitemsList;
+          this.dataList = res.data.data.orderCostItemList;
         })
         .finally(() => {
           this.loadingBtn = false;
@@ -175,7 +167,7 @@ export default {
       this.form.corpName = row.cname
     },
     addRow() {
-      this.dataList.push({currency:'CYN',$cellEdit: true });
+      this.dataList.push({ currency: 'CYN',type:1, $cellEdit: true });
     },
     rowCell(row, index) {
       this.$refs.crud.rowCell(row, index)
@@ -193,7 +185,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          itemDel({ ids: row.id }).then(res => {
+          itemDel(row.id).then(res => {
             this.$message({
               type: "success",
               message: "删除成功!"
@@ -215,11 +207,11 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({ ...this.form, agreementitemsList: this.dataList })
+          submit({ ...this.form, feesType: 1, orderCostItemList: this.dataList })
             .then(res => {
               this.$message.success("保存成功");
-              this.form = res.data.data.data;
-              this.dataList = res.data.data.data.agreementitemsList;
+              this.form = res.data.data;
+              this.dataList = res.data.data.orderCostItemList;
             })
             .finally(() => {
               this.loadingBtn = false;

+ 13 - 37
src/views/maintenance/landFreight/index.vue

@@ -9,21 +9,14 @@
           <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">新增
           </el-button>
         </template>
-        <template slot-scope="{ row,index}" slot="contractNo">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.contractNo }}</span>
-        </template>
-        <template slot-scope="{ row,index}" slot="corpId">
-          <span>{{ row.corpName }}</span>
-        </template>
-        <template slot-scope="{ row,index}" slot="status">
-          <el-switch v-model="row.status" active-value="0" inactive-value="1" @change="switchChange(row)">
-          </el-switch>
-        </template>
-        <template slot="corpIdSearch">
-          <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
+        <template slot="outHarborNameSearch">
+          <port-info v-model="search.outHarborName"/>
         </template>
         <template slot-scope="{ row, index }" slot="menu">
-          <el-button type="text" size="small" :disabled="row.status==0" @click.stop="rowDel(row, index)">
+          <el-button type="text" size="small" @click.stop="editOpen(row,2)">
+            查看
+          </el-button>
+          <el-button type="text" size="small" @click.stop="rowDel(row, index)">
             删除
           </el-button>
         </template>
@@ -36,7 +29,7 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList, remove, submit } from "@/api/basicData/agreement";
+import { getList, remove } from "@/api/maintenance/landFreight";
 import { areaTypeTree } from "@/api/basicData/customerInformation";
 export default {
   name: "index",
@@ -68,14 +61,11 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      areaTypeTree().then(res => {
-        this.findObject(this.option.column, "portOfDestination").dicData = res.data.data;
-        this.$refs.crud.init();
-      });
       this.getWorkDicts("cargo_type").then(res => {
-        this.findObject(this.option.column, "goodsProps").dicData =
+        this.findObject(this.option.column, "goodsAttribute").dicData =
           res.data.data;
       });
+      this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
       if (type) {
@@ -100,15 +90,17 @@ export default {
     newAdd() {
       this.show = false;
     },
-    onLoad(page, params = {}) {
+    onLoad(page, params={}) {
       this.loading = true;
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
+      let data = this.deepClone(Object.assign(params, this.search));
+      data.feesType = 1
       getList(
         page.currentPage,
         page.pageSize,
-        Object.assign(params, this.search)
+        data
       )
         .then(res => {
           if (res.data.data.records) {
@@ -154,22 +146,6 @@ export default {
         });
       });
     },
-    switchChange(row) {
-      this.$confirm("确定要" + row.stauts == 0 ? "开启" : "停用" + row.corpName + "吗?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        submit({ ...row })
-          .then(res => {
-            this.$message.success("修改成功");
-          })
-          .finally(() => {
-            this.onLoad(this.page, this.search);
-          });
-      });
-
-    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(203),

+ 13 - 18
src/views/maintenance/landFreight/js/optionList.js

@@ -12,37 +12,31 @@ export const option = {
   viewBtn: false,
   editBtn: false,
   delBtn: false,
-  menuWidth: 70,
+  menuWidth: 120,
   searchIcon: true,
   searchIndex: 2,
   column: [
     {
       label: "货物属性",
-      prop: "goodsProps",
+      prop: "goodsAttribute",
       type: "select",
       props: {
         label: "dictValue",
-        value: "dictKey"
+        value: "dictValue"
       },
-      dicdata:[],
+      dicData:[],
       overHidden: true,
       search: true
     },
     {
       label: "出运港",
-      prop: "portOfDestination",
-      dicdata:[],
-      type: "cascader",
-      props: {
-        label: 'name',
-        value: 'code'
-      },
+      prop: "outHarborName",
       overHidden: true,
       search: true
     },
     {
       label: "备注",
-      prop: "remark",
+      prop: "remarks",
       overHidden: true,
     }
   ]
@@ -59,10 +53,11 @@ export const optionList = {
   column: [
     {
       label: "起运地",
-      prop: "POD",
+      prop: "departureId",
       overHidden: true,
       dicData:[],
       type: "cascader",
+      dataType: "number",
       props: {
         label: 'name',
         value: 'code'
@@ -72,7 +67,7 @@ export const optionList = {
     },
     {
       label: "费用名称",
-      prop: "feeId",
+      prop: "feesId",
       overHidden: true,
       width: 250,
     },
@@ -84,28 +79,28 @@ export const optionList = {
     },
     {
       label: "20GP",
-      prop: "20GP",
+      prop: "twentyGp",
       overHidden: true,
       cell: true,
       width: 120,
     },
     {
       label: "40GP",
-      prop: "40GP",
+      prop: "fortyGp",
       overHidden: true,
       cell: true,
       width: 120,
     },
     {
       label: "40HC",
-      prop: "40HC",
+      prop: "fortyHc",
       overHidden: true,
       cell: true,
       width: 120,
     },
     {
       label: "45GP",
-      prop: "45GP",
+      prop: "fortyFiveGp",
       overHidden: true,
       cell: true,
       width: 120,

+ 30 - 34
src/views/maintenance/portSurcharge/detailsPage.vue

@@ -8,7 +8,7 @@
           </el-button>
         </div>
         <div class="add-customer-btn">
-          <el-button type="primary" size="small" @click="editCustomer" :disabled="form.status==0">
+          <el-button type="primary" size="small" @click="editCustomer">
             保存数据
           </el-button>
         </div>
@@ -16,6 +16,9 @@
       <containerTitle title="基础资料" style="margin-top: 60px"></containerTitle>
       <basic-container v-loading="loadingBtn">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+          <template slot="outHarborName">
+            <port-info v-model="form.outHarborName" />
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="基础明细"></containerTitle>
@@ -26,14 +29,14 @@
               @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave"
               @row-update="addUpdate">
               <template slot="menuLeft">
-                <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
+                <el-button type="primary" @click="addRow" size="small">新增
                 </el-button>
               </template>
-              <template slot="feeId" slot-scope="{ row,index }">
-                <breakdown-select v-if="row.$cellEdit" v-model="row.feeId"
+              <template slot="feesId" slot-scope="{ row,index }">
+                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId"
                   @selectValue="value => selectValue(value,row)" :configuration="breakConfiguration">
                 </breakdown-select>
-                <span v-else>{{ row.feeName }}</span>
+                <span v-else>{{ row.feesName }}</span>
               </template>
               <template slot="currency" slot-scope="{ row,index }">
                 <el-select size="small" v-if="row.$cellEdit" v-model="row.currency" placeholder="请选择" clearable>
@@ -43,9 +46,9 @@
                 <span v-else>{{ row.currency}}</span>
               </template>
               <template slot="menu" slot-scope="{ row, index }">
-                <el-button size="small" type="text" @click="rowCell(row, index)" :disabled="form.status==0">{{
+                <el-button size="small" type="text" @click="rowCell(row, index)">{{
                 row.$cellEdit ? "保存" : "修改" }}</el-button>
-                <el-button size="small" type="text" @click="rowDel(row, index)" :disabled="form.status==0">删除
+                <el-button size="small" type="text" @click="rowDel(row, index)">删除
                 </el-button>
               </template>
             </avue-crud>
@@ -58,11 +61,11 @@
                 <el-button type="primary" @click="addRow2" size="small" :disabled="detailData.status == 1">新增
                 </el-button>
               </template>
-              <template slot="feeId" slot-scope="{ row,index }">
-                <breakdown-select v-if="row.$cellEdit" v-model="row.feeId"
+              <template slot="feesId" slot-scope="{ row,index }">
+                <breakdown-select v-if="row.$cellEdit" v-model="row.feesId"
                   @selectValue="value => selectValue(value,row)" :configuration="breakConfiguration">
                 </breakdown-select>
-                <span v-else>{{ row.feeName }}</span>
+                <span v-else>{{ row.feesName }}</span>
               </template>
               <template slot="currency" slot-scope="{ row,index }">
                 <el-select size="small" v-if="row.$cellEdit" v-model="row.currency" placeholder="请选择" clearable>
@@ -72,9 +75,9 @@
                 <span v-else>{{ row.currency}}</span>
               </template>
               <template slot="menu" slot-scope="{ row, index }">
-                <el-button size="small" type="text" @click="rowCell2(row, index)" :disabled="form.status==0">{{
+                <el-button size="small" type="text" @click="rowCell2(row, index)">{{
                 row.$cellEdit ? "保存" : "修改" }}</el-button>
-                <el-button size="small" type="text" @click="rowDel2(row, index)" :disabled="form.status==0">删除
+                <el-button size="small" type="text" @click="rowDel2(row, index)">删除
                 </el-button>
               </template>
             </avue-crud>
@@ -87,7 +90,7 @@
 
 <script>
 import { optionList, optionList2 } from "./js/optionList";
-import { getDetail, submit, getStoragetree, getAllgoodstype, getLazylist, itemDel } from "@/api/basicData/agreement";
+import { getDetail, submit, itemDel } from "@/api/maintenance/landFreight";
 import { areaTypeTree } from "@/api/basicData/customerInformation";
 import { getCode } from "@/api/basicData/customerInquiry";
 export default {
@@ -104,7 +107,7 @@ export default {
         column: [
           {
             label: "货物属性",
-            prop: "goodsProps",
+            prop: "goodsAttribute",
             type: "select",
             dicUrl: "/api/blade-system/dict-biz/dictionary?code=cargo_type",
             props: {
@@ -122,18 +125,12 @@ export default {
           },
           {
             label: "起运港",
-            prop: "portOfDestination",
-            dicUrl: "/api/blade-system/region/lazy-list",
-            type: "cascader",
-            props: {
-              label: 'name',
-              value: 'code'
-            },
+            prop: "outHarborName",
             span: 12,
           },
           {
             label: "备注",
-            prop: "remark",
+            prop: "remarks",
             type: "textarea",
             minRows: 2,
             span: 24,
@@ -185,10 +182,10 @@ export default {
     },
     selectValue(value, row) {
       console.log(value, row)
-      if (row.feeId) {
-        row.feeName = value.cname
+      if (row.feesId) {
+        row.feesName = value.cname
       } else {
-        row.feeName = ""
+        row.feesName = ""
       }
     },
     getDetail(id) {
@@ -196,10 +193,8 @@ export default {
       getDetail(id)
         .then(res => {
           this.form = res.data.data;
-          if (res.data.data.status == 0) {
-            this.option.disabled = true
-          }
-          this.dataList = res.data.data.agreementitemsList;
+          this.dataList = res.data.data.orderCostItemList.filter(e => e.type == 2);
+          this.dataList2 = res.data.data.orderCostItemList.filter(e => e.type == 3);
         })
         .finally(() => {
           this.loadingBtn = false;
@@ -209,7 +204,7 @@ export default {
       this.form.corpName = row.cname
     },
     addRow() {
-      this.dataList.push({ currency: 'CYN', $cellEdit: true });
+      this.dataList.push({ currency: 'CYN', type: 2, $cellEdit: true });
     },
     rowCell(row, index) {
       this.$refs.crud.rowCell(row, index)
@@ -244,7 +239,7 @@ export default {
       });
     },
     addRow2() {
-      this.dataList2.push({ currency: 'CYN', $cellEdit: true });
+      this.dataList2.push({ currency: 'CYN', type: 3, $cellEdit: true });
     },
     rowCell2(row, index) {
       this.$refs.crud2.rowCell(row, index)
@@ -284,11 +279,12 @@ export default {
         done();
         if (valid) {
           this.loadingBtn = true;
-          submit({ ...this.form, agreementitemsList: this.dataList })
+          submit({ ...this.form, feesType: 2, orderCostItemList: this.dataList.concat(this.dataList2) })
             .then(res => {
               this.$message.success("保存成功");
-              this.form = res.data.data.data;
-              this.dataList = res.data.data.data.agreementitemsList;
+              this.form = res.data.data;
+              this.dataList = res.data.data.orderCostItemList.filter(e => e.type == 2);
+              this.dataList2 = res.data.data.orderCostItemList.filter(e => e.type == 3);
             })
             .finally(() => {
               this.loadingBtn = false;

+ 12 - 37
src/views/maintenance/portSurcharge/index.vue

@@ -9,21 +9,14 @@
           <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">新增
           </el-button>
         </template>
-        <template slot-scope="{ row,index}" slot="contractNo">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.contractNo }}</span>
-        </template>
-        <template slot-scope="{ row,index}" slot="corpId">
-          <span>{{ row.corpName }}</span>
-        </template>
-        <template slot-scope="{ row,index}" slot="status">
-          <el-switch v-model="row.status" active-value="0" inactive-value="1" @change="switchChange(row)">
-          </el-switch>
-        </template>
-        <template slot="corpIdSearch">
-          <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
+        <template slot="outHarborNameSearch">
+          <port-info v-model="search.outHarborName" />
         </template>
         <template slot-scope="{ row, index }" slot="menu">
-          <el-button type="text" size="small" :disabled="row.status==0" @click.stop="rowDel(row, index)">
+          <el-button type="text" size="small" @click.stop="editOpen(row,2)">
+            查看
+          </el-button>
+          <el-button type="text" size="small" @click.stop="rowDel(row, index)">
             删除
           </el-button>
         </template>
@@ -36,8 +29,8 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList, remove, submit } from "@/api/basicData/agreement";
-import {areaTypeTree} from "@/api/basicData/customerInformation";
+import { getList, remove } from "@/api/maintenance/landFreight";
+import { areaTypeTree } from "@/api/basicData/customerInformation";
 export default {
   name: "index",
   data() {
@@ -68,12 +61,8 @@ export default {
   },
   methods: {
     getAllWorkDicts() {
-      areaTypeTree().then(res => {
-        this.findObject(this.option.column, "portOfDestination").dicData = res.data.data;
-        this.$refs.crud.init();
-      });
       this.getWorkDicts("cargo_type").then(res => {
-        this.findObject(this.option.column, "goodsProps").dicData =
+        this.findObject(this.option.column, "goodsAttribute").dicData =
           res.data.data;
       });
     },
@@ -105,10 +94,12 @@ export default {
       this.dataList.forEach(item => {
         this.$refs.crud.toggleRowExpansion(item, false);
       });
+      let data = this.deepClone(Object.assign(params, this.search));
+      data.feesType = 2
       getList(
         page.currentPage,
         page.pageSize,
-        Object.assign(params, this.search)
+        data
       )
         .then(res => {
           if (res.data.data.records) {
@@ -154,22 +145,6 @@ export default {
         });
       });
     },
-    switchChange(row) {
-      this.$confirm("确定要"+row.stauts==0?"开启":"停用"+row.corpName+"吗?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        submit({ ...row })
-          .then(res => {
-            this.$message.success("修改成功");
-          })
-          .finally(() => {
-            this.onLoad(this.page, this.search);
-          });
-      });
-
-    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(205),

+ 18 - 21
src/views/maintenance/portSurcharge/js/optionList.js

@@ -12,37 +12,31 @@ export const option = {
   viewBtn: false,
   editBtn: false,
   delBtn: false,
-  menuWidth: 70,
+  menuWidth: 120,
   searchIcon: true,
   searchIndex: 2,
   column: [
     {
       label: "货物属性",
-      prop: "goodsProps",
+      prop: "goodsAttribute",
       type: "select",
       props: {
         label: "dictValue",
-        value: "dictKey"
+        value: "dictValue"
       },
-      dicdata:[],
+      dicData:[],
       overHidden: true,
       search: true
     },
     {
-      label: "起运港",
-      prop: "portOfDestination",
-      dicdata:[],
-      type: "cascader",
-      props: {
-        label: 'name',
-        value: 'code'
-      },
+      label: "出运港",
+      prop: "outHarborName",
       overHidden: true,
       search: true
     },
     {
       label: "备注",
-      prop: "remark",
+      prop: "remarks",
       overHidden: true,
     }
   ]
@@ -59,7 +53,7 @@ export const optionList = {
   column: [
     {
       label: "费用名称",
-      prop: "feeId",
+      prop: "feesId",
       overHidden: true
     },
     {
@@ -69,21 +63,24 @@ export const optionList = {
     },
     {
       label: "20GP",
-      prop: "20GP",
+      prop: "twentyGp",
       overHidden: true,
-      cell: true
+      cell: true,
+      width: 120,
     },
     {
       label: "40GP",
-      prop: "40GP",
+      prop: "fortyGp",
       overHidden: true,
-      cell: true
+      cell: true,
+      width: 120,
     },
     {
       label: "40HC",
-      prop: "40HC",
+      prop: "fortyHc",
       overHidden: true,
-      cell: true
+      cell: true,
+      width: 120,
     }
   ]
 }
@@ -99,7 +96,7 @@ export const optionList2 = {
   column: [
     {
       label: "费用名称",
-      prop: "feeId",
+      prop: "feesId",
       overHidden: true
     },
     {

+ 2 - 0
src/views/maintenance/priceLibrary/config/mainList.json

@@ -13,6 +13,8 @@
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
+  "selection": true,
+  "tip": false,
   "column": [{
       "label": "商品编号",
       "prop": "code",

+ 51 - 125
src/views/maintenance/priceLibrary/index.vue

@@ -1,69 +1,31 @@
 <template>
   <div>
     <basic-container class="page-crad">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        v-model="form"
-        :page.sync="page"
-        :search.sync="search"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @resetColumn="resetColumn"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        :table-loading="loading"
-        @saveColumn="saveColumn"
-        :cell-style="cellStyle"
-        :summary-method="summaryMethod"
-        @search-criteria-switch="searchCriteriaSwitch"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
+        @search-change="searchChange" @current-change="currentChange" @resetColumn="resetColumn"
+        @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
+        @saveColumn="saveColumn" :cell-style="cellStyle" :summary-method="summaryMethod"
+        @selection-change="selectionChange" @search-criteria-switch="searchCriteriaSwitch">
         <template slot="menuLeft">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="small"
-            @click.stop="excelBox = !excelBox"
-            >导入</el-button
-          >
-          <el-button
-            type="success"
-            icon="el-icon-upload2"
-            size="small"
-            @click="derivation()"
-            >下载模板
+          <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="excelBox = !excelBox">导入</el-button>
+          <el-button type="success" icon="el-icon-upload2" size="small" @click="derivation()">下载模板
           </el-button>
           <el-button type="info" size="small">报表打印</el-button>
+          <el-button type="primary" size="small" :disabled="selectionList.length==0" @click.stop="upType">更新商品类型
+          </el-button>
         </template>
         <template slot="cnameSearch">
-          <goods-select
-            v-model="search.cname"
-            :configuration="goodsConfiguration"
-          />
+          <goods-select v-model="search.cname" :configuration="goodsConfiguration" />
         </template>
         <template slot="priorityReferrer" slot-scope="{ row }">
-          <el-checkbox
-            :disabled="!row.$cellEdit"
-            v-model="row.priorityReferrer"
-            :true-label="1"
-            :false-label="0"
-          />
+          <el-checkbox :disabled="!row.$cellEdit" v-model="row.priorityReferrer" :true-label="1" :false-label="0" />
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="GYS"></crop-select>
         </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 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="{ row }" slot="corpId">
@@ -76,103 +38,51 @@
           {{ row.status | orderStateFormat }}
         </template>
         <template slot-scope="{ row }" slot="ename">
-          <el-input
-            v-if="row.$cellEdit"
-            v-model="row.ename"
-            size="small"
-          ></el-input>
+          <el-input v-if="row.$cellEdit" v-model="row.ename" size="small"></el-input>
           <span v-else>{{ row.ename }}</span>
         </template>
         <template slot-scope="{ row }" slot="coefficient">
-          <el-input
-            v-if="row.$cellEdit"
-            v-model="row.coefficient"
-            size="small"
+          <el-input v-if="row.$cellEdit" v-model="row.coefficient" size="small"
             oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-            @change="priceChange(row)"
-          ></el-input>
+            @change="priceChange(row)"></el-input>
           <span v-else>{{ row.coefficient }}</span>
         </template>
         <template slot-scope="{ row }" slot="price">
-          <el-input
-            v-if="row.$cellEdit"
-            v-model="row.price"
-            size="small"
+          <el-input v-if="row.$cellEdit" v-model="row.price" size="small"
             oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-            @change="priceChange(row)"
-          ></el-input>
+            @change="priceChange(row)"></el-input>
           <span v-else>{{ row.price }}</span>
         </template>
         <template slot-scope="{ row }" slot="endTime">
-          <el-date-picker
-            v-if="row.$cellEdit"
-            format="yyyy-MM-dd"
-            value-format="yyyy-MM-dd 00:00:00"
-            v-model="row.endTime"
-            type="date"
-            placeholder="选择日期"
-          ></el-date-picker>
+          <el-date-picker v-if="row.$cellEdit" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
+            v-model="row.endTime" type="date" placeholder="选择日期"></el-date-picker>
           <span v-else v-html="$options.filters.endTimeFormat(row.endTime)" />
         </template>
         <template slot-scope="{ row }" slot="currency">
-          <el-select
-            size="small"
-            v-model="row.currency"
-            placeholder="请选择"
-            @change="currencyChange(row)"
-            v-if="row.$cellEdit"
-          >
-            <el-option
-              v-for="item in currencyList"
-              :key="item.id"
-              :label="item.dictValue"
-              :value="item.dictValue"
-            >
+          <el-select size="small" v-model="row.currency" placeholder="请选择" @change="currencyChange(row)"
+            v-if="row.$cellEdit">
+            <el-option v-for="item in currencyList" :key="item.id" :label="item.dictValue" :value="item.dictValue">
             </el-option>
           </el-select>
           <span v-else>{{ row.currency }}</span>
         </template>
         <template slot-scope="{ row }" slot="taxRate">
-          <el-input
-            v-if="row.$cellEdit"
-            v-model="row.taxRate"
-            size="small"
+          <el-input v-if="row.$cellEdit" v-model="row.taxRate" size="small"
             oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
-            @change="priceChange(row)"
-          ></el-input>
+            @change="priceChange(row)"></el-input>
           <span v-else>{{ row.taxRate | taxRateFormat }}</span>
         </template>
         <template slot-scope="{ row, index }" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-edit"
-            size="small"
-            v-if="permission.priceLibrary_edit"
-            @click.stop="editOpen(row, index)"
-            >{{ row.$cellEdit ? "保存" : "修改" }}
+          <el-button type="text" icon="el-icon-edit" size="small" v-if="permission.priceLibrary_edit"
+            @click.stop="editOpen(row, index)">{{ row.$cellEdit ? "保存" : "修改" }}
           </el-button>
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            v-if="permission.priceLibrary_delete"
-            @click.stop="rowDel(row, index)"
-            >删除
+          <el-button type="text" icon="el-icon-delete" size="small" v-if="permission.priceLibrary_delete"
+            @click.stop="rowDel(row, index)">删除
           </el-button>
         </template>
       </avue-crud>
-      <el-dialog
-        title="导入价格"
-        append-to-body
-        :visible.sync="excelBox"
-        width="555px"
-      >
-        <avue-form
-          :option="excelOption"
-          v-model="excelForm"
-          :upload-after="uploadAfter"
-          class="excelUpload"
-        />
+      <el-dialog title="导入价格" append-to-body :visible.sync="excelBox" width="555px">
+        <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter" class="excelUpload" />
       </el-dialog>
     </basic-container>
   </div>
@@ -185,7 +95,8 @@ import {
   getList,
   remove,
   getGoodstype,
-  submit
+  submit,
+  updateParts
 } from "@/api/maintenance/priceLibrary";
 import { micrometerFormat } from "@/util/validate";
 import { orderStateFormat } from "@/enums/order-stauts";
@@ -248,6 +159,7 @@ export default {
       detailData: {},
       loading: false,
       currencyList: [],
+      selectionList: []
     };
   },
   async created() {
@@ -327,8 +239,7 @@ export default {
         type: "warning"
       }).then(() => {
         window.open(
-          `/api/blade-mocha-item/pricebank/exportPrice?${
-            this.website.tokenHeader
+          `/api/blade-mocha-item/pricebank/exportPrice?${this.website.tokenHeader
           }=${getToken()}`
         );
       });
@@ -437,6 +348,19 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    upType() {
+      let ids =[]
+      this.selectionList.forEach(e => {
+        ids.push(e.id)
+      })
+      updateParts({ ids: ids.join(',') }).then(res => {
+        this.$message.success("更新成功");
+        this.onLoad(this.page, this.search);
+      })
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(50),
@@ -461,7 +385,7 @@ export default {
     ...mapGetters(["permission"])
   },
   watch: {
-    option: function() {
+    option: function () {
       if (localStorage.getItem("roleName") == "贸易") {
         this.findObject(this.option.column, "coefficient").hide = true;
         this.findObject(this.option.column, "coefficient").showColumn = false;
@@ -479,9 +403,11 @@ export default {
 ::v-deep .select-component {
   display: flex;
 }
+
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+
 .excelUpload ::v-deep .el-upload-list {
   display: none;
 }

+ 11 - 2
src/views/wel/index.vue

@@ -14,6 +14,7 @@ import landTransportation from "@/views/wel/home/landTransportation/landTranspor
 import jiatongPage from "@/views/wel/home/jiatongPage/landTransportation";
 import { getUserInfo } from "@/api/system/user";
 import { setStore } from "@/util/store";
+import { areaTypeTree } from "@/api/basicData/customerInformation";
 export default {
   name: "wel",
   data() {
@@ -25,8 +26,14 @@ export default {
     getUserInfo().then(res => {
       console.log(res.data)
       this.billType = res.data.data.billType;
-      localStorage.setItem('sysitemType',this.billType)
+      localStorage.setItem('sysitemType', this.billType)
     });
+    if (!localStorage.getItem('areaTypeTree')) {
+      areaTypeTree().then(res => {
+        localStorage.setItem('areaTypeTree', JSON.stringify(res.data.data));
+      })
+    }
+
   },
   components: {
     tongjiSchool,
@@ -37,4 +44,6 @@ export default {
   methods: {}
 };
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+
+</style>