瀏覽代碼

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

lichao 4 年之前
父節點
當前提交
87f58b0741

+ 16 - 1
src/api/basicData/basicFeesDesc.js

@@ -17,7 +17,22 @@ export const getDeptLazyTree = (parentId) => {
         }
     })
 }
-
+//政策列表查询
+export function policyList(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/list',
+        method: 'get',
+        params: data
+    })
+}
+//政策类列查询
+export function policyColumn(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/lazy-tree',
+        method: 'get',
+        params: data
+    })
+}
 //商品查询接口
 export const getDeptLazyTreeTwo = (parentId) => {
     return request({

+ 8 - 0
src/api/basicData/configuration.js

@@ -92,6 +92,14 @@ export const getDeptLazyTreeS = (parentId) => {
         }
     })
 }
+
+//政策列表查看明细
+export function detailList(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/detail?id='+data,
+        method: 'get'
+    })
+}
 export const getList = (current, size, params, goodsTypeId) => {
     return request({
         url: '/api//blade-client/goodsdesc/selectGoods',

+ 102 - 0
src/api/basicData/deliveryNotice.js

@@ -0,0 +1,102 @@
+import request from '@/router/axios';
+
+//客户资料列表查询
+export function customerList(data) {
+    return request({
+        url: '/api/blade-deliver-goods/delivery/list',
+        method: 'get',
+        params: data
+    })
+}
+//客户资料列表修改和新增
+export function typeSave(data) {
+    return request({
+        url: '/api/blade-deliver-goods/delivery/submit',
+        method: 'post',
+        data: data
+    })
+}
+//客户资料列表查看明细
+export function detail(data) {
+    return request({
+        url: '/api/blade-deliver-goods/delivery/detail?id='+data,
+        method: 'get'
+    })
+}
+//商品从表列表删除
+export function corpsattn(data) {
+    return request({
+        url: '/api/blade-deliver-goods/deliveryitems/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//附件列表删除
+export function corpsbank(data) {
+    return request({
+        url: '/api/blade-deliver-goods/deliveryfiles/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//费用明细列表删除
+export function corpsitem(data) {
+    return request({
+        url: '/api/blade-deliver-goods/deliveryfees/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//查询客户类型主页下拉
+export function getDeptLazyTree(parentId){
+    return request({
+        url: '/api/blade-client/corpstype/lazy-tree',
+        method: 'get',
+        params: {
+            parentId
+        }
+    })
+}
+export const getDeptLazyTreeS = (parentId) => {
+    return request({
+        url: '/api/blade-client/goodstype/lazy-tree',
+        method: 'get',
+        params: {
+            parentId
+        }
+    })
+}
+
+//政策列表查看明细
+export function detailList(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/detail?id='+data,
+        method: 'get'
+    })
+}
+export const getList = (current, size, params, goodsTypeId) => {
+    return request({
+        url: '/api//blade-client/goodsdesc/selectGoods',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+            goodsTypeId,
+        }
+    })
+}
+
+//查询客户类型下拉
+export function corpstypeTree() {
+    return request({
+        url: '/api/blade-client/corpstype/tree',
+        method: 'get'
+    })
+}

+ 122 - 0
src/api/basicData/purchaseOrder.js

@@ -0,0 +1,122 @@
+import request from '@/router/axios';
+
+//客户资料列表查询
+export function customerList(data) {
+    return request({
+        url: '/api/trade-purchase/purchase-order/page',
+        method: 'get',
+        params: data
+    })
+}
+//客户资料列表修改和新增
+export function typeSave(data) {
+    return request({
+        url: '/api/blade-purchase-sales/order/submit',
+        method: 'post',
+        data: data
+    })
+}
+//客户资料列表查看明细
+export function detail(data) {
+    return request({
+        url: '/api/blade-purchase-sales/order/detail?id='+data,
+        method: 'get'
+    })
+}
+//客户资料列表删除
+export function deleteDetails(data) {
+    return request({
+        url: '/api/blade-client/corpsdesc/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//商品从表列表删除
+export function corpsattn(data) {
+    return request({
+        url: '/api/blade-purchase-sales/orderitems/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//客户银行列表删除
+export function corpsbank(data) {
+    return request({
+        url: '/api/blade-client/corpsbank/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//客户文件列表删除
+export function corpsfiles(data) {
+    return request({
+        url: '/api/blade-client/corpsfiles/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//客户优势项目列表删除
+export function corpsitem(data) {
+    return request({
+        url: '/api/blade-purchase-sales/orderfees/update',
+        method: 'post',
+        data: {
+            id:data
+        }
+    })
+}
+//查询客户类型主页下拉
+export function getDeptLazyTree(parentId){
+    return request({
+        url: '/api/blade-client/corpstype/lazy-tree',
+        method: 'get',
+        params: {
+            parentId
+        }
+    })
+}
+export const getDeptLazyTreeS = (parentId) => {
+    return request({
+        url: '/api/blade-client/goodstype/lazy-tree',
+        method: 'get',
+        params: {
+            parentId
+        }
+    })
+}
+
+//政策列表查看明细
+export function detailList(data) {
+    return request({
+        url: '/api/blade-mocha-item/salespolicy/detail?id='+data,
+        method: 'get'
+    })
+}
+export const getList = (current, size, params, goodsTypeId) => {
+    return request({
+        url: '/api//blade-client/goodsdesc/selectGoods',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+            goodsTypeId,
+        }
+    })
+}
+
+//查询客户类型下拉
+export function corpstypeTree() {
+    return request({
+        url: '/api/blade-client/corpstype/tree',
+        method: 'get'
+    })
+}

+ 7 - 7
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -33,7 +33,7 @@
       ]
     },{
       "label": "类别",
-      "prop": "cname",
+      "prop": "priceCategory",
       "index": 1,
       "width":100,
       "cell": false,
@@ -59,7 +59,7 @@
       ]
     },{
       "label": "大字",
-      "prop": "code",
+      "prop": "bigCharacter",
       "index": 2,
       "width":100,
       "cell": false,
@@ -98,7 +98,7 @@
       ]
     },{
       "label": "包装要求",
-      "prop": "orderQuantity",
+      "prop": "packageRemarks",
       "index": 5,
       "width":100,
       "cell": true,
@@ -111,7 +111,7 @@
       ]
     },{
       "label": "库存数量",
-      "prop": "actualQuantity",
+      "prop": "inventoryNumber",
       "index": 6,
       "width":100,
       "cell": true,
@@ -124,7 +124,7 @@
       ]
     },{
       "label": "出库数量",
-      "prop": "storageQuantity",
+      "prop": "actualQuantity",
       "index": 6,
       "width":100,
       "cell": true,
@@ -137,7 +137,7 @@
       ]
     },{
       "label": "库存金额",
-      "prop": "price",
+      "prop": "inventoryAmount",
       "index": 6,
       "width":100,
       "cell": true,
@@ -150,7 +150,7 @@
       ]
     },{
       "label": "出库金额",
-      "prop": "amount",
+      "prop": "deliveryAmount",
       "index": 6,
       "width":100,
       "cell": true,

+ 19 - 11
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -24,62 +24,70 @@
             "width":100
         },
         {
-            "label": "客户名称",
-            "prop": "orderNo",
+            "label": "客户名称",
+            "prop": "corpId",
             "search": true,
             "index": 1,
             "width":100
         },{
             "label": "单据状态",
-            "prop": "morderNo",
+            "prop": "status",
+            "type": "select",
+            "dicData":[{
+                "label":"正常",
+                "value":0
+            },{
+                "label":"停用",
+                "value":1
+            }],
             "search": true,
             "index": 2,
             "width":100
         },{
             "label": "所属公司",
-            "prop": "shippingAddress",
+            "prop": "salesCompany",
             "search": true,
             "index": 4,
             "width":100
         },{
             "label": "匹配订单号",
-            "prop": "arrivalAddress",
+            "prop": "srcOrderNo",
             "search": true,
             "index": 5,
             "width":100
         },{
             "label": "仓库名称",
-            "prop": "paymentType",
+            "prop": "storageId",
             "search": true,
             "index": 6,
             "width":100
         },{
             "label": "仓库类型",
-            "prop": "packageRemarks",
+            "prop": "warehouseType",
             "search": true,
             "index": 7,
             "width":100
         },{
             "label": "出库金额",
-            "prop": "creditLevel",
+            "prop": "deliveryAmount",
             "search": true,
             "index": 8,
             "width":100
         },{
             "label": "出库数量",
-            "prop": "banks",
+            "prop": "totalQuantity",
             "search": true,
             "index": 8,
             "width":100
         },{
             "label": "出库日期",
-            "prop": "requiredDeliveryDate",
+            "prop": "businessDate",
             "search": true,
             "index": 8,
             "width":100
         },{
             "label": "制单时间",
-            "prop": "requiredArrivalDate",
+            "prop": "updateTime",
             "search": true,
             "index": 8,
             "width":100

+ 28 - 160
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -190,151 +190,18 @@
                      :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
-    <!--    打印-->
-    <el-dialog
-        title="打印单"
-        append-to-body
-        class="el-dialogDeep"
-        :visible.sync="printVisible"
-        width="100%"
-        fullscreen
-        :close-on-click-modal="false"
-        :close-on-press-escape="false">
-      <div class="print-div">
-        <div
-            style="
-            display: flex;
-            flex-direction: column;
-            justify-content: center;
-            align-item: center;
-            font-size: 24px;
-            margin-bottom: 5px;
-            width: 100%;
-            text-align: center;
-          "
-        >
-          <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
-          <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
-          <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
-          <div>
-            <b>COMMERCIAL INVOICE</b>
-            <span style="float: right">ORIGINAL</span>
-          </div>
-        </div>
-        <div class="print_table" style="display: flex">
-          <table
-              border="0"
-              cellspacing="0"
-              cellpadding="0"
-              style="width: 100%; line-height: 30px"
-          >
-            <tr>
-              <td colspan="5" rowspan="3">MESSERS:</td>
-              <td colspan="2">INVOICE NO.</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">DATE</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="2">INCOTERM .</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td colspan="5">PI NO.:</td>
-              <td colspan="2">DELIVERY PORT</td>
-              <td colspan="3"></td>
-            </tr>
-            <tr>
-              <td rowspan="2">NO.</td>
-              <td rowspan="2">DESCRIPTION</td>
-              <td>THICK</td>
-              <td>LENGTH</td>
-              <td>WIDTH</td>
-              <td rowspan="2">SHEETS</td>
-              <td rowspan="2">CRATES</td>
-              <td>UNIT PRICE</td>
-              <td>TOTAL</td>
-              <td>T. AMOUNT</td>
-            </tr>
-            <tr>
-              <td>mm</td>
-              <td>mm</td>
-              <td>mm</td>
-              <td>US$/M²</td>
-              <td>M²</td>
-              <td>US$</td>
-            </tr>
-            <tr>
-              <td>1</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>2</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td>3</td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">INSURANCE:</td>
-              <td></td>
-            </tr>
-            <tr>
-              <td colspan="9" style="text-align: right">TOTAL:</td>
-              <td>0.00</td>
-            </tr>
-          </table>
-        </div>
-        <div class="print-footer" style="margin-top: 8px">
-          <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
-          </div>
-        </div>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
 <script>
 import {
-  typeSave, detail, deleteDetails,
+  typeSave, detail,
   corpstypeTree,
   corpsattn,
   corpsbank,
-  corpsfiles,
   corpsitem,
   getList
-} from "@/api/basicData/configuration"
+} from "@/api/basicData/deliveryNotice"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"
@@ -435,7 +302,7 @@ export default {
         column: [
           {
             label: '系统编号',//发货通知(点击)
-            prop: 'orderNo',
+            prop: 'sysNo',
             rules: [
               {
                 required: true,
@@ -445,7 +312,7 @@ export default {
             ]
           }, {
             label: '客户名名称',
-            prop: 'morderNo',
+            prop: 'corpId',
             rules: [
               {
                 required: true,
@@ -455,7 +322,7 @@ export default {
             ]
           }, {
             label: '单据状态',
-            prop: 'shippingAddress',
+            prop: 'status',
             rules: [
               {
                 required: true,
@@ -465,7 +332,7 @@ export default {
             ]
           }, {
             label: '所属公司',
-            prop: 'arrivalAddress',
+            prop: 'salesCompany',
             rules: [
               {
                 required: true,
@@ -475,7 +342,7 @@ export default {
             ]
           }, {
             label: '匹配订单号',
-            prop: 'paymentType',
+            prop: 'srcOrderNo',
             rules: [
               {
                 required: true,
@@ -485,7 +352,7 @@ export default {
             ]
           }, {
             label: '仓库名称',
-            prop: 'packageRemarks',
+            prop: 'storageId',
             rules: [
               {
                 required: true,
@@ -495,7 +362,7 @@ export default {
             ]
           }, {
             label: '仓库类型',
-            prop: 'packageRemarks',
+            prop: 'warehouseType',//字典表
             rules: [
               {
                 required: true,
@@ -505,7 +372,7 @@ export default {
             ]
           }, {
             label: '出库金额',
-            prop: 'banks',
+            prop: 'deliveryAmount',
             rules: [
               {
                 required: true,
@@ -515,8 +382,7 @@ export default {
             ]
           }, {
             label: '出库数量',
-            prop: 'requiredDeliveryDate',
-            type: 'datetime',
+            prop: 'totalQuantity',
             rules: [
               {
                 required: true,
@@ -526,7 +392,7 @@ export default {
             ]
           }, {
             label: '出库日期',
-            prop: 'requiredArrivalDate',
+            prop: 'businessDate',
             type: 'datetime',
             rules: [
               {
@@ -537,7 +403,8 @@ export default {
             ]
           }, {
             label: '制单时间',
-            prop: 'banksAccountName',
+            type: 'datetime',
+            prop: 'createTime',
             rules: [
               {
                 required: false,
@@ -547,8 +414,7 @@ export default {
             ]
           }, {
             label: '费用合计',
-            type: 'datetime',
-            prop: 'creditDate',
+            prop: 'totalCost',
             rules: [
               {
                 required: true,
@@ -559,7 +425,7 @@ export default {
           }, {
             label: "备注",
             span: 24,
-            prop: "orderRemark",
+            prop: "otherRemarks",
             mock: {
               type: 'county'
             }
@@ -575,12 +441,12 @@ export default {
       detail(id).then(res => {
         console.log(res.data.data)
         this.form = res.data.data;
-        this.contactsData = this.form.orderItemsList
-        this.advantageProjectData = this.form.orderFeesList
-        this.bankOfDepositData = this.form.orderFilesList
-        delete this.form.orderItemsList
-        delete this.form.orderFeesList
-        delete this.form.orderFilesList
+        this.contactsData = this.form.deliveryItemsList
+        this.advantageProjectData = this.form.deliveryFeesList
+        this.bankOfDepositData = this.form.deliveryFilesList
+        delete this.form.deliveryItemsList
+        delete this.form.deliveryFeesList
+        delete this.form.deliveryFilesList
       });
     }
   },
@@ -685,6 +551,8 @@ export default {
           console.log(this.tableData[item])
           this.tableData[item].itemId = this.tableData[item].id
           delete this.tableData[item].id
+          delete this.tableData[item].status
+          delete this.tableData[item].isDeleted
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
         }
@@ -864,14 +732,14 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           //商品信息
-          this.form.orderItemsList = this.contactsData
-          this.form.orderFeesList = this.advantageProjectData
-          this.form.orderFilesList = this.bankOfDepositData
+          this.form.deliveryItemsList = this.contactsData
+          this.form.deliveryFeesList = this.advantageProjectData
+          this.form.deliveryFilesList = this.bankOfDepositData
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
           }
           this.disabled = true
-          this.form.billType = 'CG'
+          this.form.billType = 'FH'
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
             //成功关闭此页面回到列表页

+ 2 - 3
src/views/businessManagement/deliveryNotice/index.vue

@@ -47,7 +47,7 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails} from "@/api/basicData/configuration"
+import {customerList, typeSave, deleteDetails} from "@/api/basicData/deliveryNotice"
 
 export default {
   name: "customerInformation",
@@ -177,8 +177,7 @@ export default {
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,
-        billType:'CG',
-        corpsTypeId: this.treeDeptId
+        billType:"FH"
       })
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records

+ 3 - 3
src/views/businessManagement/purchaseOrder/index.vue

@@ -47,7 +47,7 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails} from "@/api/basicData/configuration"
+import {customerList, typeSave, deleteDetails} from "@/api/basicData/purchaseOrder"
 
 export default {
   name: "customerInformation",
@@ -177,8 +177,8 @@ export default {
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,
-        billType:'CG',
-        corpsTypeId: this.treeDeptId
+        // billType:'CG',
+        // corpsTypeId: this.treeDeptId
       })
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records

+ 154 - 0
src/views/businessManagement/salesOrder/configuration/BuyFree.json

@@ -0,0 +1,154 @@
+{
+  "lazy": true,
+  "tip": false,
+  "menu": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "编码",
+      "prop": "code",
+      "index": 1,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "品牌",
+      "prop": "brand",
+      "index": 1,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "产品分类",
+      "prop": "productCategory",
+      "index": 2,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "规格",
+      "prop": "typeno",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "采购价(元)",
+      "prop": "purchasePrice",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "销售价(元)",
+      "prop": "salesPrice",
+      "index": 5,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "采购数量",
+      "prop": "purchaseAmount",
+      "index": 5,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "赠送数量",
+      "prop": "salesVolume",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "操作员",
+      "prop": "updateUser",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "最后更新时间",
+      "prop": "updateTime",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 1 - 1
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -61,7 +61,7 @@
             "width":100
         },{
             "label": "运费",
-            "prop": "creditLevel",
+            "prop": "oceanFreight",
             "search": true,
             "index": 8,
             "width":100

+ 141 - 0
src/views/businessManagement/salesOrder/configuration/optionPolicy.json

@@ -0,0 +1,141 @@
+{
+  "lazy": true,
+  "tip": false,
+  "menu": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 300,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "编码",
+      "prop": "code",
+      "index": 1,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "品牌",
+      "prop": "brand",
+      "index": 1,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "产品分类",
+      "prop": "productCategory",
+      "index": 2,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "规格",
+      "prop": "typeno",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "采购价(元)",
+      "prop": "purchasePrice",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "销售价(元)",
+      "prop": "salesPrice",
+      "index": 5,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "特价",
+      "prop": "specialOffer",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "操作员",
+      "prop": "updateUser",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
+      "label": "最后更新时间",
+      "prop": "updateTime",
+      "index": 6,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 134 - 4
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -73,6 +73,11 @@
                          size="small"
                          @click="commoditySelection">新增
               </el-button>
+              <el-button type="primary"
+                         icon="el-icon-plus"
+                         size="small"
+                         @click="policy">政策
+              </el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -161,6 +166,54 @@
                      :disabled="tableData.length !== 1">导入</el-button>
         </span>
     </el-dialog>
+
+    <el-dialog
+        title="导入"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="policyDialog"
+        width="80%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false">
+      <el-row style="height: 0;">
+        <el-col :span="5">
+          <div>
+            <el-scrollbar>
+              <basic-container>
+                <avue-tree :option="policyOption" :data="treeDataPolicy" @node-click="policyNodeClick"/>
+              </basic-container>
+            </el-scrollbar>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <containerTitle title="特价促销"></containerTitle>
+          <basic-container style="margin-bottom: 10px">
+            <avue-crud :option="optionPolicy"
+                       :table-loading="loadingPolicy"
+                       :data="dataPolicy"
+                       ref="crud"
+                       @selection-change="selectionChangePolicy"
+                       :page.sync="pagePolicy">
+            </avue-crud>
+          </basic-container>
+          <containerTitle title="买赠促销"></containerTitle>
+          <basic-container>
+            <avue-crud
+                :option="customerBuyFree"
+                :data="contactsDataBuyFree"
+                @selection-change="selectionChangePolicyTwo"
+                ref="crudContactE">
+            </avue-crud>
+          </basic-container>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+          <el-button @click="policyDialog = false">取 消</el-button>
+          <el-button type="primary" @click="importPolicy">导入</el-button>
+        </span>
+    </el-dialog>
+
     <el-dialog
         title="导入费用"
         append-to-body
@@ -344,14 +397,17 @@ import {
   corpsbank,
   corpsfiles,
   corpsitem,
-  getList
+  getList,
+  detailList
 } from "@/api/basicData/configuration"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"
 import commodity from "./configuration/commodity.json"
 import optionTwoCost from "./configuration/mainListCost.json"
-import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
+import optionPolicy from "./configuration/optionPolicy.json"
+import BuyFree from "./configuration/BuyFree.json"
+import {getDeptLazyTree,getDeptLazyTreeTwo, customerList,policyList,policyColumn} from "@/api/basicData/basicFeesDesc";
 
 export default {
   name: "detailsPage",
@@ -359,10 +415,13 @@ export default {
     return {
       form: {},
       data: [],
+      dataPolicy: [],
+      contactsDataBuyFree: [],
       loadingCost: false,
       choiceData: false,
       commodityData: false,
       dataCost: [],
+      treeDataPolicy: [],
       choiceIndex: '',
       dialogCost: false,
       treeDeptId: '',
@@ -377,10 +436,42 @@ export default {
         currentPage: 1,
         total: 0
       },
+      pagePolicy: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       loading: false,
+      loadingPolicy: false,
       contactsForm: {},
+      optionPolicy: optionPolicy,
       optionTwo: commodity,
       optionTwoCost: optionTwoCost,
+      customerBuyFree: BuyFree,
+      policyOption: {
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          policyColumn(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'
+        }
+      },
       treeOptionCost: {
         nodeKey: 'id',
         lazy: true,
@@ -430,6 +521,7 @@ export default {
         }
       },
       dialogVisible: false,
+      policyDialog: false,
       advantageProjectForm: {},
       bankOfDepositForm: {},
       contactsData: [],
@@ -439,6 +531,8 @@ export default {
       tableDataCost: [],
       dic: [],
       tableData: [],
+      policyData: [],
+      policyDataTwo: [],
       customerContact: customerContact,
       advantageProject: advantageProject,
       bankOfDeposit: bankOfDeposit,
@@ -746,7 +840,7 @@ export default {
             ]
           }, {
             label: '运费',
-            prop: 'packageRemarks',
+            prop: 'oceanFreight',
             rules: [
               {
                 required: true,
@@ -874,6 +968,10 @@ export default {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = false
     },
+    //政策价格导入
+    policy(){
+      this.policyDialog = !this.policyDialog
+    },
     //点击费用明细选择触发
     choice(row) {
       this.dialogCost = !this.dialogCost
@@ -896,6 +994,7 @@ export default {
         this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
         this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
         this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
+        this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
       }
       this.dialogVisible = !this.dialogVisible
       this.commodityData = false
@@ -934,6 +1033,8 @@ export default {
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
           console.log(this.tableData[item])
+          this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
+          delete this.tableData[item].goodsTypeName
           this.tableData[item].itemId = this.tableData[item].id
           delete this.tableData[item].id
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
@@ -959,6 +1060,17 @@ export default {
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    //导入页销售政策查询
+    policyNodeClick(data){
+      console.log(data.id)
+      detailList(data.id).then(res=>{
+        console.log(res.data.data)
+        //特价促销
+        this.dataPolicy = res.data.data.specialItemList
+        //买赠促销
+        this.contactsDataBuyFree = res.data.data.presentItemList
+      })
+    },
     //导入页左费用类型查询
     nodeClickCost(data) {
       this.treeDeptIdCost = data.id;
@@ -967,10 +1079,28 @@ export default {
     },
     //刷新触发
     refreshChange() {
-      this.treeDeptId = '';
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    //销售政策特价促销选中触发
+    selectionChangePolicy(list){
+      this.policyData = list
+    },
+    //销售政策买赠促销选中触发
+    selectionChangePolicyTwo(list){
+      this.policyDataTwo = list
+    },
+    //导入商品政策
+    importPolicy(){
+      let list = this.policyData.concat(this.policyDataTwo)
+      console.log(list)
+      for (let item in list) {
+        console.log(list[item])
+        this.$refs.crudContact.rowCellAdd(list[item]);
+        this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
+      }
+      this.policyDialog = false
+    },
     //费用刷新触发
     refreshChangeCost() {
       this.treeDeptIdCost = '';

+ 1 - 0
src/views/businessManagement/salesOrder/index.vue

@@ -179,6 +179,7 @@ export default {
     },
     //列表刷新触发
     refreshChange() {
+      console.log(this.form)
       this.page.currentPage = 1;
       this.onLoad(this.page,this.search);
     },