浏览代码

修改进口销售、采购订单

lichao 4 年之前
父节点
当前提交
deeee61b60

+ 15 - 9
src/views/exportTrade/salesContract/config/mainList.json

@@ -21,42 +21,48 @@
     "column":[
         {
             "label": "合同日期",
-            "prop": "Business_date",
+            "prop": "businessDate",
             "search": true,
             "index": 1,
             "width":100
         },
         {
             "label": "合同号",
-            "prop": "OrderNo",
+            "prop": "orderNo",
             "search": true,
             "index": 2,
             "width":100
         },{
             "label": "销售公司",
-            "prop": "Corpid",
+            "prop": "corpId",
             "search": true,
             "index": 3,
             "width":100
         },{
             "label": "工厂/贸易商名称",
-            "prop": "Purchaserid",
+            "prop": "purchaserId",
             "search": true,
             "index": 4,
             "width":100
         },{
             "label": "合同金额",
-            "prop": "Accounts_collection_date",
+            "prop": "orderAmount",
             "search": false,
             "index": 5,
             "width":100
         },{
-            "label": "币别及汇率",
-            "prop": "arrival_date",
+            "label": "币别",
+            "prop": "currency",
             "search": false,
             "index": 6,
             "width":100
         },{
+          "label": "汇率",
+          "prop": "exchangeRate",
+          "search": false,
+          "index": 6,
+          "width":100
+        },{
             "label": "是否全部发货",
             "prop": "Order_amount",
             "search": false,
@@ -64,13 +70,13 @@
             "width":100
         },{
             "label": "业务员",
-            "prop": "Currency",
+            "prop": "salesName",
             "search": true,
             "index": 8,
             "width":100
         },{
             "label": "单据状态",
-            "prop": "banks",
+            "prop": "status",
             "search": false,
             "index": 8,
             "width":100

+ 7 - 7
src/views/purchase/contract/config/detailedList.json

@@ -21,7 +21,7 @@
   "column":[
     {
       "label": "提单号",
-      "prop": "fMblno",
+      "prop": "billNO",
       "index": 1,
       "width":100,
       "cell": true,
@@ -34,7 +34,7 @@
       ]
     },{
       "label": "货物品种",
-      "prop": "goodsVarieties",
+      "prop": "itemId",
       "index": 2,
       "width":100,
       "cell": true,
@@ -60,7 +60,7 @@
       ]
     },{
       "label": "箱号",
-      "prop": "boxNo",
+      "prop": "containerNo",
       "index": 4,
       "width":100,
       "cell": true,
@@ -73,7 +73,7 @@
       ]
     },{
       "label": "件数",
-      "prop": "number",
+      "prop": "purchaseQuantity",
       "index": 5,
       "width":100,
       "cell": true,
@@ -86,7 +86,7 @@
       ]
     },{
       "label": "发票净重(吨)",
-      "prop": "invoiceNetWeight",
+      "prop": "invoiceWeight",
       "index": 6,
       "width":100,
       "cell": true,
@@ -99,7 +99,7 @@
       ]
     },{
       "label": "码单重量(吨)",
-      "prop": "codeListNetWeight",
+      "prop": "billWeight",
       "index": 7,
       "width":100,
       "cell": true,
@@ -177,7 +177,7 @@
       ]
     }, {
       "label": "备注",
-      "prop": "remark",
+      "prop": "remarks",
       "index": 13,
       "width":100,
       "cell": true,

+ 118 - 0
src/views/purchase/contract/config/goodsList.json

@@ -0,0 +1,118 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": true,
+  "menuWidth": 300,
+  "column": [
+    {
+      "label": "提单号",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "合同号",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入商品名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "货物品种",
+      "prop": "fcyno",
+      "search": true,
+      "index": 3,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入币别",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "货物详情",
+      "prop": "unitno",
+      "search": true,
+      "index": 4,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入计量单位",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "件数",
+      "type": "select",
+      "prop": "dc",
+      "search": false,
+      "index": 5,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请选择",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "发票净重(吨)",
+      "prop": "feesTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 6,
+      "width":100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 25 - 13
src/views/purchase/contract/config/mainList.json

@@ -21,74 +21,86 @@
     "column":[
         {
             "label": "合同日期",
-            "prop": "Business_date",
+            "prop": "businessDate",
             "search": true,
             "index": 1,
             "width":100
         },
         {
             "label": "合同号",
-            "prop": "OrderNo",
+            "prop": "orderNo",
             "search": true,
             "index": 2,
             "width":100
         },{
             "label": "供应商",
-            "prop": "Corpid",
+            "prop": "corpId",
             "search": true,
             "index": 3,
             "width":100
         },{
             "label": "采购商",
-            "prop": "Purchaserid",
+            "prop": "purchaserId",
             "search": true,
             "index": 4,
             "width":100
         },{
             "label": "付款日期/开证日期",
-            "prop": "Accounts_collection_date",
+            "prop": "accountsCollectionDate",
+            "type": "date",
+            "unlinkPanels": true,
+            "searchRange": true,
             "search": true,
             "index": 5,
             "width":100
         },{
             "label": "到港日期",
-            "prop": "arrival_date",
+            "prop": "dateOfArrival",
+            "type": "date",
+            "unlinkPanels": true,
+            "searchRange": true,
             "search": true,
             "index": 6,
             "width":100
         },{
             "label": "合同金额",
-            "prop": "Order_amount",
+            "prop": "orderAmount",
             "search": false,
             "index": 7,
             "width":100
         },{
-            "label": "币别及汇率",
-            "prop": "Currency",
+            "label": "币别",
+            "prop": "currency",
             "search": false,
             "index": 8,
             "width":100
         },{
+          "label": "汇率",
+          "prop": "exChangeRate",
+          "search": false,
+          "index": 8,
+          "width":100
+        },{
             "label": "是否全部到货",
-            "prop": "banks",
+            "prop": "arrival",
             "search": false,
             "index": 8,
             "width":100
         },{
             "label": "单据状态",
-            "prop": "requiredDeliveryDate",
+            "prop": "status",
             "search": false,
             "index": 8,
             "width":100
         },{
             "label": "单据类型",
-            "prop": "Order_type",
+            "prop": "orderType",
             "search": false,
             "index": 8,
             "width":100
         },{
             "label": "备注",
-            "prop": "Order_Remark",
+            "prop": "orderRemark",
             "search": false,
             "index": 8,
             "width":100

+ 29 - 76
src/views/purchase/contract/detailsPage.vue

@@ -52,6 +52,12 @@
                 size="small"
                 @click="rowCellDetailed(row,index)"
               >{{row.$cellEdit?'保存':'修改'}}</el-button>
+              <el-button
+                type="text"
+                size="small"
+                @click="sendHandle"
+                v-if="!row.$cellEdit"
+              >发货</el-button>
             </template>
             <template slot="menuLeft" slot-scope="{size}">
               <el-button type="warning"
@@ -63,13 +69,6 @@
                          size="small"
               >打 印</el-button>
             </template>
-            <template slot-scope="{row,index}" slot="menu">
-              <el-button
-                type="text"
-                size="small"
-                @click="sendHandle"
-              >发货</el-button>
-            </template>
           </avue-crud>
         </basic-container>
 <!--        其他费用-->
@@ -229,7 +228,7 @@ export default {
         column: [
           {
             label: '系统编号',
-            prop: 'systemNo',
+            prop: 'sysNo',
             rules: [
               {
                 required: false,
@@ -250,13 +249,9 @@ export default {
             ]
           }, {
             label: '供应商',
-            prop: 'supplier',
+            prop: 'corpId',
             type:'select',
-            dicData: [
-              {value:1,label: '供应商测试'},
-              {value:2,label: '内部供应'},
-              {value:3,label: '外部供应'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -266,12 +261,9 @@ export default {
             ]
           }, {
             label: '业务员',
-            prop: 'salesman',
+            prop: 'salesName',
             type:'select',
-            dicData: [
-              {value:1,label: '张三'},
-              {value:2,label: '李四'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -281,7 +273,7 @@ export default {
             ]
           }, {
             label: '合同号',
-            prop: 'contractNo',
+            prop: 'orderNo',
             rules: [
               {
                 required: true,
@@ -291,7 +283,7 @@ export default {
             ]
           }, {
             label: '合同日期',
-            prop: 'contractDate',
+            prop: 'businessDate',
             type:'datetime',
             rules: [
               {
@@ -302,12 +294,9 @@ export default {
             ]
           }, {
             label: '合同类型',
-            prop: 'contractType',
+            prop: 'orderType',
             type:'select',
-            dicData: [
-              {value:1,label: '类型1'},
-              {value:2,label: '类型2'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -317,12 +306,9 @@ export default {
             ]
           }, {
             label: '采购商',
-            prop: 'buyer',
+            prop: 'purchaserId',
             type:'select',
-            dicData: [
-              {value:1,label: '采购商测试'},
-              {value:2,label: '内部采购'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -332,13 +318,9 @@ export default {
             ]
           }, {
             label: '付款方式',
-            prop: 'paymentMethod',
+            prop: 'paymentType',
             type:'select',
-            dicData: [
-              {value:1,label: '支付宝'},
-              {value:2,label: '微信'},
-              {value:3,label: '银行卡'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -348,7 +330,7 @@ export default {
             ]
           }, {
             label: '付款/开证日期',
-            prop: 'paymentDate',
+            prop: 'accountsCollectionDate',
             type:'datetime',
             rules: [
               {
@@ -359,7 +341,7 @@ export default {
             ]
           }, {
             label: '信用证到期日',
-            prop: 'lpcDate',
+            prop: 'creditDate',
             type:'datetime',
             rules: [
               {
@@ -370,7 +352,7 @@ export default {
             ]
           }, {
             label: '合同金额',
-            prop: 'amount',
+            prop: 'orderAmount',
             rules: [
               {
                 required: true,
@@ -380,7 +362,7 @@ export default {
             ]
           }, {
             label: '人民币金额',
-            prop: 'RMBprice',
+            prop: 'rmbAmount',
             rules: [
               {
                 required: true,
@@ -390,7 +372,7 @@ export default {
             ]
           }, {
             label: '预付(保证)金额',
-            prop: 'paymentAmount',
+            prop: 'advancePayment',
             rules: [
               {
                 required: true,
@@ -400,7 +382,7 @@ export default {
             ]
           }, {
             label: '单价',
-            prop: 'price',
+            prop: 'salesPrice',
             rules: [
               {
                 required: true,
@@ -420,7 +402,7 @@ export default {
             ]
           }, {
             label: '汇率',
-            prop: 'exRate',
+            prop: 'exchangeRate',
             rules: [
               {
                 required: true,
@@ -439,8 +421,8 @@ export default {
               }
             ]
           }, {
-            label: '码重量',
-            prop: 'wharfWeight',
+            label: '码重量',
+            prop: 'billWeight',
             rules: [
               {
                 required: true,
@@ -450,7 +432,7 @@ export default {
             ]
           }, {
             label: '已付金额',
-            prop: 'amountPaid',
+            prop: 'settlmentAmount',
             rules: [
               {
                 required: true,
@@ -472,35 +454,6 @@ export default {
   },
   created() {
     if (this.$route.query.id) {
-      this.form = {
-        id: 1,
-        systemNo: '2021101801',
-        arrivalDate: '2021-10-20',
-        supplier: 1,
-        salesman: 1,
-        contractNo: '001',
-        contractDate: '2021-10-20',
-        contractType: 1,
-        buyer: 1,
-        paymentMethod: 1,
-        paymentDate: '2021-10-19',
-        lpcDate: '2022-10-19',
-        amount: 3000,
-        RMBprice: 3000,
-        paymentAmount: 1000,
-        price: 20,
-        currency: '美元',
-        exRate: '6.4331',
-        contractWeight: '13.11',
-        wharfWeight: '14.34',
-        amountPaid: 1000,
-        orderRemark: '我是测试'
-      }
-      this.detailedData = [{fMblno: 'TD-101801', goodsVarieties: '巴西棉', goodsDetails: '巴西', boxNo: '01', number: 800, invoiceNetWeight: 18.99, codeListNetWeight: 10.00, price: 10, amount: 8000, taxRate: 0.01, currency: '美元',exRate: 6.4369, remark: ''},]
-      // this.contactsData = [
-      //   {fMblno: '2021101501', contractNo: '001', goodsVariety: '水泥', goodsDetail: '印度', number: 30, netWeight: 12, codeList: 20, price: 20, amount: 600, taxRate: '0.03', remark: ''},
-      //   {fMblno: '2021101502', contractNo: '001', goodsVariety: '巴西棉', goodsDetail: '巴西', number: 10, netWeight: 12, codeList: 20, price: 7, amount: 70, taxRate: '0.03', remark: '测试啊测试'},
-      // ]
     }
   },
   methods: {

+ 11 - 11
src/views/purchase/contract/index.vue

@@ -69,15 +69,14 @@
 
 <script>
 import option from "./config/mainList.json";
+import {selectPurchaseList} from "@/api/importTrade/purchase"
 
 export default {
   name: "index",
   data() {
     return {
       option: option,
-      dataList: [
-        {id: 1,Business_date: '2021-10-18',OrderNo:'101801',Corpid:'供应商测试',Purchaserid:'采购商测试',Accounts_collection_date:'2021-10-18',arrival_date:'2021-10-20',Order_amount:'10000',Currency:'美元/6.434',banks: '是', requiredDeliveryDate:'正常',Order_type:'采购',Order_Remark:'测试数据'}
-      ],
+      dataList: [],
       page: {
         pageSize: 10,
         pagerCount: 5,
@@ -193,16 +192,17 @@ export default {
     refreshChange() {
       console.log('1')
     },
-    onLoad(page, params = {parentId: 0}) {
+    onLoad(page, params) {
       let queryParams = Object.assign({}, params, {
-        pageSize: page.pageSize,
-        pageNum: page.currentPage,
-        corpsTypeId: this.treeDeptId
+        size: page.pageSize,
+        current: page.currentPage,
+      })
+      selectPurchaseList(queryParams).then(res => {
+        console.log(res)
+        this.dataList = res.data.records
+        // this.dataList = res.data.data.records
+        // this.page.total = res.data.data.total
       })
-      // customerList(queryParams).then(res => {
-      //   this.dataList = res.data.data.records
-      //   this.page.total = res.data.data.total
-      // })
       this.dataList.forEach(item => {
         this.$set(item,'insideList',[])
         this.$set(item,'loading', true)

+ 125 - 0
src/views/salesManagement/salesContract/config/commodity.json

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

+ 8 - 8
src/views/salesManagement/salesContract/config/importInventory.json

@@ -20,7 +20,7 @@
   "column":[
     {
       "label": "提单号",
-      "prop": "a",
+      "prop": "billNO",
       "index": 1,
       "width":100,
       "cell": false,
@@ -33,7 +33,7 @@
       ]
     },{
       "label": "合同号",
-      "prop": "b",
+      "prop": "orgOrderNo",
       "index": 2,
       "width":100,
       "cell": false,
@@ -72,7 +72,7 @@
       ]
     },{
       "label": "件数",
-      "prop": "e",
+      "prop": "storageQuantity",
       "index": 5,
       "width":100,
       "cell": true,
@@ -85,7 +85,7 @@
       ]
     },{
       "label": "发票净重(吨)",
-      "prop": "f",
+      "prop": "invoiceWeight",
       "index": 6,
       "width":100,
       "cell": true,
@@ -98,7 +98,7 @@
       ]
     },{
       "label": "码单重量(吨)",
-      "prop": "g",
+      "prop": "billWeight",
       "index": 7,
       "width":100,
       "cell": true,
@@ -111,7 +111,7 @@
       ]
     },{
       "label": "单价",
-      "prop": "h",
+      "prop": "price",
       "index": 8,
       "width":100,
       "cell": true,
@@ -124,7 +124,7 @@
       ]
     },{
       "label": "合同金额",
-      "prop": "i",
+      "prop": "amount",
       "index": 9,
       "width":100,
       "cell": true,
@@ -137,7 +137,7 @@
       ]
     },{
       "label": "税率",
-      "prop": "j",
+      "prop": "taxRate",
       "index": 10,
       "width":100,
       "cell": true,

+ 89 - 83
src/views/salesManagement/salesContract/config/mainList.json

@@ -1,85 +1,91 @@
 {
-    "lazy": true,
-    "tip": false,
-    "simplePage": true,
-    "searchShow": true,
-    "searchMenuSpan": 6,
-    "dialogWidth": "60%",
-    "tree": true,
-    "border": true,
-    "index": true,
-    "selection": true,
-    "viewBtn": false,
-    "editBtn": false,
-    "delBtn": false,
-    "menuWidth": 300,
-    "dialogClickModal": false,
-    "searchLabelWidth": 100,
-    "addBtnText": "新单",
-    "expand": true,
-    "rowKey": "id",
-    "column":[
-        {
-            "label": "合同日期",
-            "prop": "Business_date",
-            "search": true,
-            "index": 1,
-            "width":100
-        },
-        {
-            "label": "合同号",
-            "prop": "OrderNo",
-            "search": true,
-            "index": 2,
-            "width":100
-        },{
-            "label": "销售公司",
-            "prop": "Corpid",
-            "search": true,
-            "index": 3,
-            "width":100
-        },{
-            "label": "工厂/贸易商名称",
-            "prop": "Purchaserid",
-            "search": true,
-            "index": 4,
-            "width":100
-        },{
-            "label": "合同金额",
-            "prop": "Accounts_collection_date",
-            "search": false,
-            "index": 5,
-            "width":100
-        },{
-            "label": "币别及汇率",
-            "prop": "arrival_date",
-            "search": false,
-            "index": 6,
-            "width":100
-        },{
-            "label": "是否全部发货",
-            "prop": "Order_amount",
-            "search": false,
-            "index": 7,
-            "width":100
-        },{
-            "label": "业务员",
-            "prop": "Currency",
-            "search": true,
-            "index": 8,
-            "width":100
-        },{
-            "label": "单据状态",
-            "prop": "banks",
-            "search": false,
-            "index": 8,
-            "width":100
-        },{
-            "label": "备注",
-            "prop": "remark",
-            "search": false,
-            "index": 8,
-            "width":100
-        }
-    ]
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "searchLabelWidth": 100,
+  "addBtnText": "新单",
+  "expand": true,
+  "rowKey": "id",
+  "column":[
+    {
+      "label": "合同日期",
+      "prop": "businessDate",
+      "search": true,
+      "index": 1,
+      "width":100
+    },
+    {
+      "label": "合同号",
+      "prop": "orderNo",
+      "search": true,
+      "index": 2,
+      "width":100
+    },{
+      "label": "销售公司",
+      "prop": "belongToCorpId",
+      "search": true,
+      "index": 3,
+      "width":100
+    },{
+      "label": "工厂/贸易商名称",
+      "prop": "corpId",
+      "search": true,
+      "index": 4,
+      "width":100
+    },{
+      "label": "合同金额",
+      "prop": "orderAmount",
+      "search": false,
+      "index": 5,
+      "width":100
+    },{
+      "label": "币别",
+      "prop": "currency",
+      "search": false,
+      "index": 6,
+      "width":100
+    },{
+      "label": "汇率",
+      "prop": "exChangeRate",
+      "search": false,
+      "index": 6,
+      "width":100
+    },{
+      "label": "是否全部发货",
+      "prop": "arrival",
+      "search": false,
+      "index": 7,
+      "width":100
+    },{
+      "label": "业务员",
+      "prop": "salesName",
+      "search": true,
+      "index": 8,
+      "width":100
+    },{
+      "label": "单据状态",
+      "prop": "status",
+      "search": false,
+      "index": 8,
+      "width":100
+    },{
+      "label": "备注",
+      "prop": "orderRemark",
+      "search": false,
+      "index": 8,
+      "width":100
+    }
+  ]
 }

+ 130 - 90
src/views/salesManagement/salesContract/detailsPage.vue

@@ -115,28 +115,45 @@
       </el-form>
     </div>
 
-<!--    导入库存-->
+
     <el-dialog
-      title="导入库存"
+      title="导入商品"
       append-to-body
-      :visible.sync="dialogStock"
+      class="el-dialogDeep"
+      :visible.sync="dialogVisible"
       width="80%"
       :close-on-click-modal="false"
       :destroy-on-close="true"
-      :close-on-press-escape="false"
-    ></el-dialog>
-<!--    导入商品-->
-    <el-dialog
-        title="导入商品"
-        :visible.sync="dialogCommodity"
-        width="70%"
-        append-to-body
-        :before-close="handleClose">
-      <span>暂无数据</span>
+      :close-on-press-escape="false">
+      <el-row style="height: 0;">
+        <el-col :span="5">
+          <div>
+            <el-scrollbar>
+              <basic-container>
+                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
+              </basic-container>
+            </el-scrollbar>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <basic-container>
+            <avue-crud :option="optionTwo"
+                       :table-loading="loading"
+                       :data="data"
+                       ref="crud"
+                       @refresh-change="refreshChange"
+                       @selection-change="selectionChange"
+                       :page.sync="page"
+                       @on-load="onLoad"></avue-crud>
+          </basic-container>
+        </el-col>
+      </el-row>
       <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogCommodity = false">取 消</el-button>
-    <el-button type="primary" @click="dialogCommodity = false">确 定</el-button>
-  </span>
+          <el-button @click="dialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
+          <el-button type="primary" @click="importChoice" v-if="commodityData === true"
+                     :disabled="tableData.length !== 1">导入</el-button>
+        </span>
     </el-dialog>
 <!--    导入其他费用-->
     <el-dialog
@@ -186,7 +203,8 @@ import importInventory from './config/importInventory.json';
 import uploadList from './config/uploadList.json';
 import advantageProject from "./config/advantageProject.json";
 import optionTwoCost from "./config/mainListCost.json";
-import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
+import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
+import commodity from "./config/commodity.json"
 
 export default {
   name: "detailsPage",
@@ -194,13 +212,14 @@ export default {
     return {
       disabled: false,
       dialogCommodity: false,
+      dialogVisible: false,
       form: {},
       //  基础信息
       basicData: {
         column: [
           {
             label: '系统号',
-            prop: 'a1',
+            prop: 'sysNo',
             rules: [
               {
                 required: false,
@@ -210,7 +229,7 @@ export default {
             ]
           }, {
             label: '订单号',
-            prop: 'a2',
+            prop: 'orderNo',
             rules: [
               {
                 required: true,
@@ -220,7 +239,7 @@ export default {
             ]
           }, {
             label: '订单日期',
-            prop: 'a3',
+            prop: 'businessDate',
             type:'datetime',
             data: [],
             rules: [
@@ -232,12 +251,9 @@ export default {
             ]
           }, {
             label: '业务员',
-            prop: 'a4',
+            prop: 'salesName',
             type:'select',
-            dicData: [
-              {value:1,label: '张三'},
-              {value:2,label: '李四'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -247,12 +263,9 @@ export default {
             ]
           }, {
             label: '销售公司',
-            prop: 'a5',
+            prop: 'belongToCorpId',
             type:'select',
-            dicData: [
-              {value:1,label: '一家公司'},
-              {value:2,label: '另一家公司'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -262,12 +275,9 @@ export default {
             ]
           }, {
             label: '工厂/贸易商名称',
-            prop: 'a6',
+            prop: 'corpId',
             type:'select',
-            dicData: [
-              {value:1,label: '大厂'},
-              {value:2,label: '小厂'},
-            ],
+            dicData: [],
             rules: [
               {
                 required: true,
@@ -277,7 +287,7 @@ export default {
             ]
           }, {
             label: '提成标准',
-            prop: 'a7',
+            prop: 'commissionRate',
             rules: [
               {
                 required: true,
@@ -287,7 +297,7 @@ export default {
             ]
           }, {
             label: '发票号(PI)',
-            prop: 'a8',
+            prop: 'proformaInvoice',
             rules: [
               {
                 required: true,
@@ -297,7 +307,7 @@ export default {
             ]
           }, {
             label: '起运港',
-            prop: 'b1',
+            prop: 'portOfLoad',
             rules: [
               {
                 required: true,
@@ -308,7 +318,7 @@ export default {
           },
           {
             label: '目的港',
-            prop: 'b2',
+            prop: 'portOfDestination',
             rules: [
               {
                 required: true,
@@ -319,7 +329,7 @@ export default {
           },
           {
             label: '包装要求',
-            prop: 'b3',
+            prop: 'packageRemarks',
             rules: [
               {
                 required: true,
@@ -330,7 +340,7 @@ export default {
           },
           {
             label: '计划交期',
-            prop: 'b4',
+            prop: 'plannedDeliveryDate',
             type: 'datetime',
             rules: [
               {
@@ -365,7 +375,7 @@ export default {
           },
           {
             label: '首付金额',
-            prop: 'b7',
+            prop: 'advancePayment',
             rules: [
               {
                 required: true,
@@ -376,7 +386,7 @@ export default {
           },
           {
             label: '销售单价',
-            prop: 'a9',
+            prop: 'salesPrice',
             data: [],
             rules: [
               {
@@ -387,7 +397,7 @@ export default {
             ]
           }, {
             label: '发票重量',
-            prop: 'a10',
+            prop: 'invoiceWeight',
             data: [],
             rules: [
               {
@@ -398,7 +408,7 @@ export default {
             ]
           }, {
             label: '码单重量',
-            prop: 'a11',
+            prop: 'billWeight',
             rules: [
               {
                 required: true,
@@ -408,7 +418,7 @@ export default {
             ]
           }, {
             label: '币别',
-            prop: 'a12',
+            prop: 'currency',
             rules: [
               {
                 required: true,
@@ -418,17 +428,7 @@ export default {
             ]
           }, {
             label: '汇率',
-            prop: 'a13',
-            rules: [
-              {
-                required: true,
-                message: ' ',
-                trigger: 'blur'
-              }
-            ]
-          }, {
-            label: '预收金额',
-            prop: 'a14',
+            prop: 'exChangeRate',
             rules: [
               {
                 required: true,
@@ -436,9 +436,21 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
+          },
+          // {
+          //   label: '预收金额',
+          //   prop: 'a14',
+          //   rules: [
+          //     {
+          //       required: true,
+          //       message: ' ',
+          //       trigger: 'blur'
+          //     }
+          //   ]
+          // },
+          {
             label: '合同金额',
-            prop: 'a15',
+            prop: 'orderAmount',
             rules: [
               {
                 required: true,
@@ -448,7 +460,7 @@ export default {
             ]
           }, {
             label: '收款金额',
-            prop: 'a16',
+            prop: 'settlmentAmount',
             rules: [
               {
                 required: true,
@@ -501,6 +513,39 @@ export default {
           children: 'children'
         }
       },
+      treeOption: {
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getDeptLazyTreeTwo(parentId).then(res => {
+            resolve(res.data.data.map(item => {
+              return {
+                ...item,
+                leaf: !item.hasChildren
+              }
+            }))
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: 'small',
+        props: {
+          labelText: '标题',
+          label: 'title',
+          value: 'value',
+          children: 'children'
+        }
+      },
+      // 导入商品配置
+      optionGoods: [],
+      loadingGoods: false,
+      dataGoods:[],
+      pageGoods:{
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       // 导入其他费用配置
       optionTwoCost: optionTwoCost,
       loadingCost: false,
@@ -518,40 +563,14 @@ export default {
       // 合同数据
       bankOfDepositData: [],
       bankOfDepositForm: {},
+
+      optionTwo: commodity,
+      loading: false,
+      data: [],
     }
   },
   created() {
     if (this.$route.query.id) {
-      this.form = {
-        id: 1,
-        a1: '101801',
-        a2: 'HT20211019',
-        a3: '2021-10-19',
-        a4: 1,
-        a5: 2,
-        a6: 1,
-        a7: 1.2,
-        a8: 'FP01',
-        a9: 10,
-        a10: 1.8,
-        a11: 1.11,
-        a12: '美元',
-        a13: '6.4369',
-        a14: 1000,
-        a15: 8000,
-        a16: 1000,
-        orderRemark: '我是测试',
-        b1: '青岛',
-        b2: '威海',
-        b3: '密封',
-        b4: '2021-10-20',
-        b5: '2021-10-19',
-        b6: '10%',
-        b7: 1000,
-      }
-      this.importInventoryData = [
-        {a: '101801', b: 'HT2021101901',c: '巴西棉',d :'巴西',e: 800,f: 1.3,g: 1.11,h:10,i:8000,j: 6.4369,remarks:'测试备注'}
-      ]
     }
   },
   methods: {
@@ -592,6 +611,17 @@ export default {
         this.loadingCost = false;
       });
     },
+    //商品列表查询
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
+        console.log(res)
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+      });
+    },
     //点击费用明细选择触发
     choice(row){
       this.dialogCost = !this.dialogCost
@@ -603,12 +633,22 @@ export default {
       this.pageCost.currentPage = 1;
       this.onLoadCost(this.pageCost);
     },
+    //刷新触发
+    refreshChange() {
+      this.treeDeptId = '';
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
     //费用刷新触发
     refreshChangeCost() {
       this.treeDeptIdCost = '';
       this.pageCost.currentPage = 1;
       this.onLoadCost(this.pageCost);
     },
+    //选中触发
+    selectionChange(list) {
+      this.tableData = list
+    },
     //费用选中触发
     selectionChangeCost(list){
       this.tableDataCost = list