Jelajahi Sumber

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 tahun lalu
induk
melakukan
bb720166ae
35 mengubah file dengan 1150 tambahan dan 349 penghapusan
  1. 4 3
      src/api/basicData/customerInquiry.js
  2. 18 0
      src/api/basicData/fees.js
  3. 19 0
      src/api/financialManagement/paymentRequest.js
  4. 12 13
      src/components/bill/billDetailList.vue
  5. 74 53
      src/components/bill/config/mainList.json
  6. 35 14
      src/components/finance/applyPayment.vue
  7. 6 0
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  8. 6 0
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  9. 6 0
      src/views/businessManagement/receipt/detailsPageEdit.vue
  10. 1 1
      src/views/businessManagement/salesOrder/configuration/BuyFree.json
  11. 16 0
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  12. 1 1
      src/views/businessManagement/salesOrder/configuration/optionPolicy.json
  13. 77 20
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  14. 1 8
      src/views/financialManagement/billDetails/billDetails.vue
  15. 58 26
      src/views/financialManagement/billDetails/configuration/mainList.json
  16. 44 14
      src/views/financialManagement/paymentRequest/configuration/detailsPage.json
  17. 10 10
      src/views/financialManagement/paymentRequest/configuration/mainList.json
  18. 10 21
      src/views/financialManagement/paymentRequest/paymentRequestDetails.vue
  19. 59 24
      src/views/financialManagement/paymentSettle/configuration/detailsPage.json
  20. 1 3
      src/views/financialManagement/paymentSettle/paymentSettle.vue
  21. 16 32
      src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue
  22. 63 16
      src/views/financialManagement/receiptSettle/configuration/detailsPage.json
  23. 37 30
      src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue
  24. 15 1
      src/views/maintenance/salesPolicy/configuration/BuyFree.json
  25. 139 0
      src/views/maintenance/salesPolicy/configuration/commodity.json
  26. 15 1
      src/views/maintenance/salesPolicy/configuration/customerContact.json
  27. 310 9
      src/views/maintenance/salesPolicy/detailsPageEdit.vue
  28. 1 3
      src/views/purchase/contract/detailsPage.vue
  29. 62 21
      src/views/salesManagement/salesContract/detailsPage.vue
  30. 7 0
      src/views/workManagement/main-items/list.vue
  31. 10 3
      src/views/workManagement/receipt/configuration/settleAccounts.json
  32. 7 0
      src/views/workManagement/receipt/settleAccounts.vue
  33. 1 8
      src/views/workManagement/service-items/configuration/projectOption.json
  34. 2 14
      src/views/workManagement/task/configuration/mainList.json
  35. 7 0
      src/views/workManagement/task/index.vue

+ 4 - 3
src/api/basicData/customerInquiry.js

@@ -46,11 +46,12 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size, goodsTypeId) => {
+export const getGoods = (current, size, goodsTypeId, params) => {
   return request({
-    url: '/api//blade-client/goodsdesc/selectGoods',
+    url: '/api/blade-client/goodsdesc/selectGoods',
     method: 'get',
     params: {
+      ...params,
       current,
       size,
       goodsTypeId,
@@ -119,4 +120,4 @@ export function gainUser(query) {
     method: 'get',
     params: query
   })
-}
+}

+ 18 - 0
src/api/basicData/fees.js

@@ -0,0 +1,18 @@
+import request from '@/router/axios';
+
+// 获取销售价格
+export function getMarketPrice(data) {
+  return request({
+    url: '/api/blade-mocha-item/client/getMarketPrice',
+    method: 'get',
+    params: data
+  })
+}
+// 获取采购价格
+export function getPurchasePrice(data) {
+  return request({
+    url: '/api/blade-mocha-item/client/getPurchasePrice',
+    method: 'get',
+    params: data
+  })
+}

+ 19 - 0
src/api/financialManagement/paymentRequest.js

@@ -44,6 +44,14 @@ export const getDetails = (id) => {
   })
 }
 
+export const submit = (data) => {
+  return request({
+    url: '/api/trade-finance/settlement/submit',
+    method: 'post',
+    data: data
+  })
+}
+
 //明细
 export const modify = (data) => {
   return request({
@@ -74,3 +82,14 @@ export function getBillList(current,size,params) {
     }
   })
 }
+
+// 销售订单到账单明细
+export const paymentApply = (data) => {
+  return request({
+    url: '/api/trade-finance/settlement/paymentApply',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 12 - 13
src/components/bill/billDetail.vue → src/components/bill/billDetailList.vue

@@ -22,10 +22,14 @@
 
 <script>
   import option from './config/mainList.json'
+  import { getBillList } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "index",
     props: {
+      billType:{
+        type: String
+      },
       itemId: {
         type: String
       },
@@ -61,19 +65,14 @@
         this.selectList = row
       },
       onLoad(page, params = {}){
-        // this.loading = true;
-        // if (params.promentDate != undefined) {
-        //   params.startDate = params.promentDate[0]+ " " + "00:00:00";
-        //   params.endDate = params.promentDate[1] + " " + "23:59:59";
-        //   this.$delete(params,'promentDate')
-        // }
-        // params.tradeType = "JK"
-        // getItemListByConditions(page.currentPage, page.pageSize,params).then(res=>{
-        //   this.data = res.data.data.records
-        //   this.page.total = res.data.data.total
-        // }).finally(()=>{
-        //   this.loading = false;
-        // })
+        this.loading = true;
+        params.billType = this.billType
+        getBillList(page.currentPage, page.pageSize,params).then(res=>{
+          this.data = res.data.data.records
+          this.page.total = res.data.data.total
+        }).finally(()=>{
+          this.loading = false;
+        })
       },
       importProMent(){
         this.$emit('importProMent',this.selectList);

+ 74 - 53
src/components/bill/config/mainList.json

@@ -20,74 +20,95 @@
   "menu": false,
   "menuWidth": 0,
   "dialogClickModal": false,
-  "column":[
+  "column": [
     {
       "label": "合同号",
-      "prop": "orderNo",
+      "prop": "accSysNo",
+      "overHidden": true,
+      "width": 120,
+      "index": 2
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "index": 1,
-      "width":180
+      "overHidden": true,
+      "width": 200,
+      "index": 3
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 2,
-      "width":180
+      "label": "费用名称",
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
+      "index": 4
     },
     {
-      "label": "客户",
-      "prop": "corpName",
-      "search": true,
-      "index": 3,
-      "width":180
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
     },
     {
-      "label": "货物品种",
-      "prop": "priceCategoryNames",
-      "index": 4,
-      "width":120
-    },{
-      "label": "规格名称",
-      "prop": "itemType",
-      "index": 5,
-      "width":120
-    },{
-      "label": "件数",
-      "prop": "purchaseQuantity",
-      "index": 6,
-      "width":120
-    },{
-      "label": "发票净重(吨)",
-      "prop": "invoiceWeight",
-      "index": 7,
-      "width":120
-    },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
-      "index": 8,
-      "width":120
-    },{
       "label": "单价",
       "prop": "price",
-      "index": 9,
-      "width":120
-    },{
-      "label": "合同金额",
+      "width": 120,
+      "overHidden": true,
+      "index": 6
+    },
+    {
+      "label": "账单金额",
       "prop": "amount",
-      "index": 10,
-      "width":120
-    },{
-      "label": "订单日期",
-      "prop": "marketDate",
-      "hide": true,
+      "search": true,
+      "overHidden": true,
+      "width": 120,
+      "index": 7
+    },
+    {
+      "label": "结算金额",
+      "prop": "settlementAmount",
+      "width": 120,
+      "overHidden": true,
+      "index": 8
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
+      "overHidden": true,
+      "index": 9
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
+    },
+    {
+      "label": "录入人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 11,
+      "width": 120
+    },
+    {
+      "label": "录入日期",
+      "prop": "createTime",
       "type": "date",
+      "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "search": true,
-      "index": 6,
-      "width":150
+      "width": 200,
+      "index": 12
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 35 - 14
src/components/finance/applyPayment.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script>
-  import { applyLoan } from "@/api/financialManagement/paymentRequest";
+  import { applyLoan,paymentApply } from "@/api/financialManagement/paymentRequest";
 
     export default {
       name: "applyPayment",
@@ -93,17 +93,26 @@
                 label: '单价',
                 prop: 'price',
                 span: 12,
+                rules: [
+                  {
+                    pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                    message: ' ',
+                    trigger: 'blur'
+                  }
+                ]
               },
               {
                 label: '数量',
                 prop: 'quantity',
                 value:1,
                 span: 12,
-              },
-              {
-                label: '计价单位',
-                prop: 'unit',
-                span: 12,
+                rules: [
+                  {
+                    pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                    message: ' ',
+                    trigger: 'blur'
+                  }
+                ]
               },
               {
                 label: '金额',
@@ -118,15 +127,18 @@
                 ]
               },
               {
+                label: '计价单位',
+                prop: 'unit',
+                span: 12,
+              },
+              {
                 label: '币别',
                 prop: 'currency',
-                // value:this.billData.currency,
                 span: 12,
               },
               {
                 label: '汇率',
                 prop: 'exchangeRate',
-                // value:this.billData.exchangeRate,
                 span: 12,
               },
               {
@@ -169,12 +181,21 @@
             billType : this.billType,
             itemsList: itemsList
           }
-          applyLoan(params).then(res =>{
-             if(res.data.success){
-               this.$message.success("操作成功!")
-               this.$emit("choceFun");
-             }
-          })
+          if(this.billType === "销售"){  //销售订单 =>  账单明细
+            paymentApply(params).then(res=>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+                this.$emit("choceFun");
+              }
+            })
+          }else{ //采购订单 => 付款申请
+            applyLoan(params).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+                this.$emit("choceFun");
+              }
+            })
+          }
         }
       }
     }

+ 6 - 0
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -309,6 +309,7 @@
                        @refresh-change="refreshChangeCost"
                        @selection-change="selectionChangeCost"
                        :page.sync="pageCost"
+                       @searchChange="feesSearch"
                        @on-load="onLoadCost">
             </avue-crud>
           </basic-container>
@@ -1097,6 +1098,11 @@ export default {
         this.loading = false;
       });
     },
+    // 费用查询按钮
+    feesSearch(params, done) {
+      this.onLoadCost(this.pageCost, params)
+      done()
+    },
     //费用查询
     onLoadCost(page, params = {}) {
       this.loadingCost = true;

+ 6 - 0
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -302,6 +302,7 @@
                        @refresh-change="refreshChangeCost"
                        @selection-change="selectionChangeCost"
                        :page.sync="pageCost"
+                       @searchChange="feesSearch"
                        @on-load="onLoadCost">
             </avue-crud>
           </basic-container>
@@ -952,6 +953,11 @@ export default {
         this.loading = false;
       });
     },
+    // 费用查询按钮
+    feesSearch(params, done) {
+      this.onLoadCost(this.pageCost, params)
+      done()
+    },
     //费用查询
     onLoadCost(page, params = {}) {
       this.loadingCost = true;

+ 6 - 0
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -302,6 +302,7 @@
                        @refresh-change="refreshChangeCost"
                        @selection-change="selectionChangeCost"
                        :page.sync="pageCost"
+                       @searchChange="feesSearch"
                        @on-load="onLoadCost">
             </avue-crud>
           </basic-container>
@@ -1056,6 +1057,11 @@ export default {
         this.loading = false;
       });
     },
+    // 费用查询按钮
+    feesSearch(params, done) {
+      this.onLoadCost(this.pageCost, params)
+      done()
+    },
     //费用查询
     onLoadCost(page, params = {}) {
       this.loadingCost = true;

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

@@ -124,7 +124,7 @@
       ]
     },{
       "label": "操作员",
-      "prop": "updateUser",
+      "prop": "updateUserName",
       "index": 6,
       "width":100,
       "cell": true,

+ 16 - 0
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -156,6 +156,22 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchaseAmount",
+      "index": 6,
+      "width":100,
+      "cell": false,
+      "slot": true,
+      "overHidden": true,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入最新单价",
+          "trigger": "blur"
+        }
+      ]
     },{
       "label": "最新单价",
       "prop": "price",

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

@@ -111,7 +111,7 @@
       ]
     },{
       "label": "操作员",
-      "prop": "updateUser",
+      "prop": "updateUserName",
       "index": 6,
       "width":100,
       "cell": true,

+ 77 - 20
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -42,6 +42,7 @@
                                 size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled"/>
                 <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="date" placeholder="选择日期"
+                                value-format="yyyy-MM-dd HH:mm:ss"
                                 :disabled="detailData.seeDisabled"/>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
                                  :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>
@@ -62,6 +63,7 @@
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled || detailData.seeDisabled"/>
                 <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="date" placeholder="选择日期"
+                                value-format="yyyy-MM-dd HH:mm:ss"
                                 :disabled="detailData.seeDisabled"/>
                 <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>
                 <el-input
@@ -106,6 +108,22 @@
                 :disabled="detailData.seeDisabled">选择</el-button>
               <span>{{ row.code }}</span>
             </template>
+            <template slot="purchaseAmount" slot-scope="{ row }">
+              <el-select
+                v-if="row.$cellEdit"
+                v-model="row.purchaseAmount"
+                @focus="getPurchasePrice(row)"
+                allow-create
+                filterable
+              >
+                <el-option
+                  v-for="(item, index) in purchasePriceOption"
+                  :key="index"
+                  :label="item.purchasePrice"
+                  :value="item.purchasePrice"></el-option>
+              </el-select>
+              <span v-else>{{ row.purchaseAmount }}</span>
+            </template>
             <template slot="orderQuantity" slot-scope="{ row }">
               <el-input
                 v-if="row.$cellEdit"
@@ -304,7 +322,7 @@
     </el-dialog>
 
     <el-dialog
-        title="导入"
+        title="导入政策"
         append-to-body
         class="el-dialogDeep"
         :visible.sync="policyDialog"
@@ -381,6 +399,7 @@
                        @refresh-change="refreshChangeCost"
                        @selection-change="selectionChangeCost"
                        :page.sync="pageCost"
+                       @search-change="feesSearch"
                        @on-load="onLoadCost">
             </avue-crud>
           </basic-container>
@@ -428,6 +447,7 @@ import {
 import _ from "lodash";
 import option from "./configuration/mainList.json";
 import { contrastObj, contrastList } from "@/util/contrastData";
+import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees"
 
 export default {
   name: "detailsPage",
@@ -491,7 +511,8 @@ export default {
         lazy: true,
         treeLoad: function (node, resolve) {
           const parentId = (node.level === 0) ? 0 : node.data.id;
-          policyColumn(parentId).then(res => {
+          const newTime = new Date().toLocaleString('chinese',{hour12:false})
+          policyColumn({newTime: newTime,parentId: parentId}).then(res => {
             resolve(res.data.data.map(item => {
               return {
                 ...item,
@@ -961,6 +982,8 @@ export default {
       oldGoodsList: [],
       oldFeesList: [],
       oldUploadList: [],
+      // 采购价格
+      purchasePriceOption: [],
     }
   },
   //初始化查询
@@ -1035,11 +1058,11 @@ export default {
           goodsNum.push(item.sort)
           purchaseAmount += Number(item.purchaseAmount)
         })
-        if (Number(this.form.grossProfit) != 0) {
-          this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed(2)
-        } else {
-          this.form.grossProfitRate = '0.00'
-        }
+        // if (Number(this.form.grossProfit) != 0) {
+        //   this.form.grossProfitRate = (((Number(this.form.grossProfit) - Number(purchaseAmount)) / Number(this.form.grossProfit)) * 100).toFixed(2)
+        // } else {
+        //   this.form.grossProfitRate = '0.00'
+        // }
         if (goodsNum.length == 0) {
           this.maxGoodsNum = 0;
         } else {
@@ -1079,6 +1102,12 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    // 采购金额获取
+    getPurchasePrice(row) {
+      getPurchasePrice({code: '3ELX978F'}).then(res => {
+        this.purchasePriceOption = res.data.data
+      })
+    },
     // 生成采购单
     saveSell() {
       if (!this.form.id) {
@@ -1273,11 +1302,19 @@ export default {
             this.$set(this.tableData[item], 'priceType', '一般')
             this.$set(this.tableData[item], 'orderQuantity', 0)
             this.$set(this.tableData[item], 'actualQuantity', 0)
+            this.$set(this.tableData[item], 'purchaseAmount', 0)
             this.tableData[item].price = 0
             this.tableData[item].amount = 0
             this.tableData[item].sort = this.maxGoodsNum + 1
-            this.maxGoodsNum++
             delete this.tableData[item].id
+            delete this.tableData[item].pid
+            delete this.tableData[item].isDeleted
+            delete this.tableData[item].status
+            delete this.tableData[item].tenantId
+            delete this.tableData[item].updateTime
+            delete this.tableData[item].updateUser
+            delete this.tableData[item].updateUserName
+            this.maxGoodsNum++
             this.$refs.crudContact.rowCellAdd(this.tableData[item]);
             this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
           })
@@ -1339,8 +1376,7 @@ export default {
     },
     //销售政策特价促销选中触发
     selectionChangePolicy(list) {
-      console.log(list)
-      this.policyData = this.policyData.concat(list)
+      this.policyData = list
       // this.policyData.forEach(item => {
       //   this.$set(item, 'price', item.specialOffer)
       // })
@@ -1352,7 +1388,7 @@ export default {
     },
     //销售政策买赠促销选中触发
     selectionChangePolicyTwo(list) {
-      this.policyDataTwo = this.policyDataTwo.concat(list)
+      this.policyDataTwo = list
       // this.policyDataTwo.forEach(item => {
       //   this.$set(item, 'price', item.salesPrice)
       // })
@@ -1367,7 +1403,7 @@ export default {
       let list = this.policyData.concat(this.policyDataTwo)
       for (let item in list) {
         selectGoodsNum({
-          goodsId: list[item].id,
+          goodsId: list[item].itemId,
           typeno: list[item].typeno
         }).then(res => {
           this.$set(list[item], 'storageQuantity', res.data.data)
@@ -1385,6 +1421,14 @@ export default {
         this.$set(list[item], 'cname', list[item].productCategory)
         this.$set(list[item], 'sort', this.maxGoodsNum + 1)
         this.$set(list[item], 'purchaseAmount', list[item].purchasePrice)
+        delete list[item].id
+        delete list[item].pid
+        delete list[item].isDeleted
+        delete list[item].status
+        delete list[item].tenantId
+        delete list[item].updateTime
+        delete list[item].updateUser
+        delete list[item].updateUserName
         this.maxGoodsNum++
         this.$refs.crudContact.rowCellAdd(list[item]);
         this.$refs.crudContact.rowCell(list[item], this.contactsData.length - 1)
@@ -1447,9 +1491,17 @@ export default {
       detailList(this.treePolicyId).then(res => {
         this.policyForm = res.data.data
         //特价促销
-        this.dataPolicy = res.data.data.specialItemList
+        if(res.data.data.specialItemList) {
+          this.dataPolicy = res.data.data.specialItemList
+        } else {
+          this.dataPolicy = []
+        }
         //买赠促销
-        this.contactsDataBuyFree = res.data.data.presentItemList
+        if (res.data.data.presentItemList) {
+          this.contactsDataBuyFree = res.data.data.presentItemList
+        } else {
+          this.contactsDataBuyFree = []
+        }
       })
     },
     //
@@ -1469,6 +1521,11 @@ export default {
         this.loading = false;
       });
     },
+    // 费用查询按钮
+    feesSearch(params, done) {
+      this.onLoadCost(this.pageCost, params)
+      done()
+    },
     //费用查询
     onLoadCost(page, params = {}) {
       this.loadingCost = true;
@@ -1563,7 +1620,7 @@ export default {
             }
           }
           // 计算毛利额
-          this.$set(this.form, 'grossProfit', 0)
+          // this.$set(this.form, 'grossProfit', 0)
           this.$set(this.form, 'orderAmount', 0)
           // 成本价
           let purchaseAmount = 0
@@ -1573,12 +1630,12 @@ export default {
               purchaseAmount += (Number(item.purchaseAmount) * Number(item.orderQuantity)).toFixed(2)
             }
             // this.form.grossProfit += Number(item.amount)
-            this.form.orderAmount += Number(item.amount).toFixed(2)
+            this.form.orderAmount = (Number(this.form.orderAmount) + Number(item.amount)).toFixed(2)
           })
-          this.form.grossProfit = (Number(this.form.orderAmount) - Number(purchaseAmount)).toFixed(2)
-          if (this.form.orderAmount && this.form.overPayment) {
-            this.form.debitAmount = Number(this.form.orderAmount) - Number(this.form.overPayment)
-          }
+          // this.form.grossProfit = (Number(this.form.orderAmount) - Number(purchaseAmount)).toFixed(2)
+          // if (this.form.orderAmount && this.form.overPayment) {
+          //   this.form.debitAmount = Number(this.form.orderAmount) - Number(this.form.overPayment)
+          // }
           if (this.form.orderAmount && this.form.settlmentAmount) {
             this.$set(this.form, "balanceAmount", (Number(this.form.orderAmount) - Number(this.form.settlmentAmount)).toFixed(2));
           }

+ 1 - 8
src/views/financialManagement/billDetails/billDetails.vue

@@ -13,13 +13,6 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   size="small"
-                   icon="el-icon-plus"
-                   @click="addReceipt">新 单
-        </el-button>
-      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -50,7 +43,7 @@
 
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      option.height = window.innerHeight - 310 ;
     },
     methods: {
       //新单打开

+ 58 - 26
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -15,73 +15,105 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
+  "menu": false,
   "menuWidth": 220,
   "column": [
     {
-      "label": "合同号",
-      "prop": "srcOrderno",
+      "label": "单据类型",
+      "prop": "billType",
+      "search": true,
+      "overHidden": true,
       "width": 120,
       "index": 1
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
+      "label": "合同号",
+      "prop": "accSysNo",
+      "overHidden": true,
       "width": 120,
       "index": 2
     },
     {
-      "label": "收款日期",
-      "prop": "settlementDate",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "width": 120,
+      "overHidden": true,
+      "width": 200,
       "index": 3
     },
     {
-      "label": "金额",
-      "prop": "amount",
-      "search": true,
-      "width": 120,
+      "label": "费用名称",
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
       "width": 120,
       "index": 5
     },
     {
-      "label": "银行名称",
-      "prop": "accountBank",
+      "label": "单价",
+      "prop": "price",
       "width": 120,
+      "overHidden": true,
       "index": 6
     },
     {
-      "label": "银行户头",
-      "prop": "accountName",
+      "label": "账单金额",
+      "prop": "amount",
+      "search": true,
+      "overHidden": true,
       "width": 120,
       "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
+      "label": "结算金额",
+      "prop": "settlementAmount",
       "width": 120,
+      "overHidden": true,
       "index": 8
     },
     {
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
+      "overHidden": true,
+      "index": 9
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
+    },
+    {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 9,
+      "overHidden": true,
+      "index": 11,
       "width": 120
     },
     {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 12
+    },
+    {
       "label": "备注",
       "prop": "remark",
-      "index": 10,
-      "width": 120
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 44 - 14
src/views/financialManagement/paymentRequest/configuration/detailsPage.json

@@ -23,21 +23,57 @@
       "overHidden": true
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 1,
+      "label": "客户名称",
+      "prop": "corpId",
+      "index": 2,
       "overHidden": true
     },
     {
       "label": "费用名称",
-      "prop": "srcOrderno",
-      "index": 1,
+      "prop": "costType",
+      "index": 3,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "quantity",
+      "index": 4,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "index": 5,
+      "cell": true,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 2,
+      "index": 6,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 7,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "index": 8,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 9,
+      "cell": true,
       "overHidden": true
     },
     {
@@ -47,18 +83,12 @@
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "overHidden": true,
-      "index": 3
+      "index": 10
     },
     {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 4,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remark",
-      "index": 4,
+      "index": 11,
       "overHidden": true
     }
   ]

+ 10 - 10
src/views/financialManagement/paymentRequest/configuration/mainList.json

@@ -15,7 +15,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 180,
   "column": [
     {
       "label": "合同号",
@@ -33,7 +33,7 @@
       "index": 2
     },
     {
-      "label": "金额",
+      "label": "金额",
       "prop": "amount",
       "search": true,
       "overHidden": true,
@@ -41,14 +41,7 @@
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "overHidden": true,
-      "width": 120,
-      "index": 5
-    },
-    {
-      "label": "银行名称",
+      "label": "开户银行",
       "prop": "accountBank",
       "overHidden": true,
       "width": 150,
@@ -62,6 +55,13 @@
       "index": 7
     },
     {
+      "label": "银行账号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
       "label": "录入日期",
       "prop": "createTime",
       "type": "date",

+ 10 - 21
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -16,6 +16,11 @@
                      :disabled="checkDisabled"
                      @click.stop="settlement">结算
           </el-button>
+          <el-button type="primary"
+                     class="el-button--small-yh"
+                     :disabled="!checkDisabled"
+                     @click.stop="confirmEdit">确认修改
+          </el-button>
         </div>
       </div>
     </div>
@@ -46,14 +51,13 @@
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
-              icon="el-icon-view"
               size="small"
+              :disabled="!checkDisabled"
               @click.stop="rowCell(scope.row,scope.index)"
             >修改
             </el-button>
             <el-button
               type="text"
-              icon="el-icon-edit"
               size="small"
               @click.stop=""
             >删除
@@ -68,7 +72,7 @@
 <script>
   import itemOption from "./configuration/detailsPage.json";
   import { contrastObj,contrastList } from "@/util/contrastData";
-  import { getDetails,modify, paymentCheck } from "@/api/financialManagement/paymentRequest";
+  import { getDetails,modify,submit, paymentCheck } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "paymentDetailsPage",
@@ -127,7 +131,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -137,23 +141,8 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
             },
             {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },{
               label: '开户银行',
               prop: 'accountBank',
               span: 8,
@@ -344,7 +333,7 @@
       refreshChange() {
         console.log('1')
       },
-      editPayment(status){
+      confirmEdit(status){
         this.$refs["form"].validate((valid) => {
           if(valid){
             const params = {
@@ -352,7 +341,7 @@
               billType:"申请",
               itemsList:this.dataList
             }
-            modify(params).then(res =>{
+            submit(params).then(res =>{
               this.$message.success("操作成功!")
               this.form = res.data.data;
               this.oldForm = Object.assign({},res.data.data);

+ 59 - 24
src/views/financialManagement/paymentSettle/configuration/detailsPage.json

@@ -14,52 +14,87 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 120,
   "column": [
     {
       "label": "合同号",
-      "prop": "srcOrderno",
-      "index": 1,
-      "overHidden": true
+      "prop": "accSysNo",
+      "overHidden": true,
+      "width": 120,
+      "index": 2
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 1,
-      "overHidden": true
+      "label": "客户名称",
+      "prop": "corpId",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
     },
     {
       "label": "费用名称",
-      "prop": "srcOrderno",
-      "index": 1,
-      "overHidden": true
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
+      "index": 4
     },
     {
-      "label": "金额",
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "width": 120,
+      "overHidden": true,
+      "index": 6
+    },
+    {
+      "label": "账单金额",
       "prop": "amount",
-      "index": 2,
-      "overHidden": true
+      "overHidden": true,
+      "width": 120,
+      "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
       "overHidden": true,
-      "index": 3
+      "index": 9
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
     },
     {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 11,
+      "width": 120
+    },
+    {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 12
     },
     {
       "label": "备注",
       "prop": "remark",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 1 - 3
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -65,9 +65,7 @@
         detailData:{},
         option: option,
         parentId:0,
-        dataList: [{
-          canem:""
-        }],
+        dataList: [],
         page: {
           pageSize: 10,
           pagerCount: 5,

+ 16 - 32
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -44,14 +44,6 @@
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
-              icon="el-icon-view"
-              size="small"
-              @click.stop=""
-            >修改
-            </el-button>
-            <el-button
-              type="text"
-              icon="el-icon-edit"
               size="small"
               @click.stop=""
             >删除
@@ -63,7 +55,7 @@
         title="导入采购"
         append-to-body
         class="el-dialogDeep"
-        :visible.sync="procurementDialog"
+        :visible.sync="billDetailDialog"
         width="60%"
         :close-on-click-modal="false"
         :destroy-on-close="true"
@@ -71,7 +63,8 @@
         top="10vh"
         v-dialog-drag>
         <bill-detail
-          @closeFun="!procurementDialog"
+          :billType="billType"
+          @closeFun="!billDetailDialog"
           @importProMent="importProMent"
         >
         </bill-detail>
@@ -85,7 +78,8 @@
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
   import { getDetails,modify } from "@/api/financialManagement/paymentRequest";
   import { contrastObj,contrastList } from "@/util/contrastData";
-  import  billDetail from "@/components/bill/billDetail";
+  import  billDetail from "@/components/bill/billDetailList";
+  import _ from "lodash";
 
   export default {
     name: "paymentDetailsPage",
@@ -99,7 +93,8 @@
         form: {},
         itemsForm:{},
         itemsOption: option,
-        procurementDialog:false,
+        billDetailDialog:false,
+        billType:"申请",
         id:"",
         dataList: [],
         currencyDic:[],
@@ -143,7 +138,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -153,22 +148,6 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
-            },
-            {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
             },{
               label: '开户银行',
               prop: 'accountBank',
@@ -306,10 +285,15 @@
     },
     methods: {
       selectPurchase(){
-        this.procurementDialog = true;
+        this.billDetailDialog = true;
       },
-      importProMent(){
-
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          delete item.id;
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.billDetailDialog = false;
       },
       searchReset() {
         console.log('1')

+ 63 - 16
src/views/financialManagement/receiptSettle/configuration/detailsPage.json

@@ -18,36 +18,83 @@
   "column": [
     {
       "label": "合同号",
-      "prop": "srcOrderno",
-      "index": 1,
-      "overHidden": true
+      "prop": "accSysNo",
+      "overHidden": true,
+      "width": 120,
+      "index": 2
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
     },
     {
-      "label": "金额",
+      "label": "费用名称",
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
+      "index": 4
+    },
+    {
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "width": 120,
+      "overHidden": true,
+      "index": 6
+    },
+    {
+      "label": "账单金额",
       "prop": "amount",
-      "index": 2,
-      "overHidden": true
+      "overHidden": true,
+      "width": 120,
+      "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
       "overHidden": true,
-      "index": 3
+      "index": 9
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
     },
     {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 11,
+      "width": 120
+    },
+    {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 12
     },
     {
       "label": "备注",
       "prop": "remark",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 37 - 30
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -5,11 +5,6 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button type="info"
-                   class="el-button--small-yh add-customer-btn-two"
-                   :disabled="true"
-                   @click.stop="">请核
-        </el-button>
         <el-button class="el-button--small-yh add-customer-btn" type="primary"
                    @click.stop="editReceipt "
         >{{this.id?"确认修改" :"确认结算"}}
@@ -43,16 +38,10 @@
             <el-button type="primary"
                        size="small"
                        icon="el-icon-shopping-cart-2"
-                       @click=""
+                       @click="selectRecipt"
             >选择销售合同
             </el-button>
           </template>
-          <template slot="menuRight">
-            <el-button type="info"
-                       size="small"
-                       @click="">发送收款信息
-            </el-button>
-          </template>
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
@@ -71,6 +60,24 @@
           </template>
         </avue-crud>
       </basic-container>
+      <el-dialog
+        title="导入销售"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :billType="billType"
+          @closeFun="!billDetailDialog"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -79,6 +86,7 @@
   import option from "./configuration/detailsPage.json";
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
   import { detailSaleList } from "@/api/importTrade/salesContract"
+  import  billDetail from "@/components/bill/billDetailList";
 
   export default {
     name: "receiptDetailsPage",
@@ -87,6 +95,9 @@
         type: Object
       }
     },
+    components:{
+      billDetail
+    },
     data() {
       return {
         form: {},
@@ -126,7 +137,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -136,22 +147,6 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
-            },
-            {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
             },{
               label: '开户银行',
               prop: 'accountBank',
@@ -235,7 +230,8 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{},
+        billDetailDialog:false,
+        billType:"销售",
         //新旧数据对比
         oldForm:{},
         oldItemList:[],
@@ -298,6 +294,17 @@
       option.height = window.innerHeight - 640 ;
     },
     methods: {
+      selectRecipt(){
+        this.billDetailDialog = true;
+      },
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          delete item.id;
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.billDetailDialog = false;
+      },
       searchReset() {
         console.log('1')
       },

+ 15 - 1
src/views/maintenance/salesPolicy/configuration/BuyFree.json

@@ -5,7 +5,8 @@
   "searchShow": true,
   "addBtn":false,
   "editBtn":false,
-  "addRowBtn":true,
+  "addRowBtn":false,
+  "delBtn": false,
   "cellBtn":false,
   "cancelBtn":false,
   "refreshBtn": false,
@@ -71,6 +72,19 @@
         }
       ]
     },{
+      "label": "花纹",
+      "prop": "brandItem",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "采购价(元)",
       "prop": "purchasePrice",
       "index": 4,

+ 139 - 0
src/views/maintenance/salesPolicy/configuration/commodity.json

@@ -0,0 +1,139 @@
+
+{
+  "calcHeight": 80,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": false,
+  "searchSpan": 8,
+  "searchMenuSpan": 8,
+  "searchMenuPosition": "right",
+  "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,
+      "search": true,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "width": 100,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },
+    {
+      "label": "规格编码",
+      "prop": "typeno",
+      "search": false,
+      "width": 100
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "规格尺寸",
+      "prop": "specs",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "产品类别",
+      "prop": "category",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "产品分类",
+      "prop": "categoryitem",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "供应商",
+      "prop": "providers",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "计量单位",
+      "prop": "unit",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "包装单位",
+      "prop": "packgeunit",
+      "slot": true,
+      "width": 100
+    },
+    {
+      "label": "商品图片",
+      "prop": "url",
+      "type": "upload",
+      "listType": "picture-img",
+      "dataType": "string",
+      "action": "/api/blade-resource/oss/endpoint/put-file",
+      "propsHttp": {
+        "res": "data",
+        "url": "link"
+      },
+      "hide": true,
+      "span": 24,
+      "width": 100
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "slot": true,
+      "width": 100
+    }
+  ]
+}

+ 15 - 1
src/views/maintenance/salesPolicy/configuration/customerContact.json

@@ -5,7 +5,8 @@
   "searchShow": true,
   "addBtn":false,
   "editBtn":false,
-  "addRowBtn":true,
+  "addRowBtn":false,
+  "delBtn": false,
   "cellBtn":false,
   "cancelBtn":false,
   "refreshBtn": false,
@@ -71,6 +72,19 @@
         }
       ]
     },{
+      "label": "花纹",
+      "prop": "brandItem",
+      "index": 3,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },{
       "label": "采购价(元)",
       "prop": "purchasePrice",
       "index": 4,

+ 310 - 9
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -48,10 +48,26 @@
               @row-click="handleRowClick"
               @row-update="rowUpdate"
               @row-del="rowDel">
-<!--            <template slot="code" slot-scope="{row,index}">-->
-<!--              <span style="float: left;padding-top: 2px">{{ row.code }}</span>-->
-<!--              <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>-->
-<!--            </template>-->
+            <template slot="code" slot-scope="{ row, index }">
+              <el-button
+                size="small"
+                type="text"
+                @click="rePick(row, index, 1)"
+                :disabled="disabled"
+                class="picker"
+                style="padding:4px 10px;float:left"
+              >选择</el-button
+              >
+              <span> {{ row.code }}</span>
+            </template>
+            <template slot="menuLeft">
+              <el-button
+                type="primary"
+                icon="el-icon-plus"
+                size="small"
+                @click.stop="newSpecial"
+              >新增明细</el-button>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -59,6 +75,12 @@
                   @click="rowCell(row,index)"
               >{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
+              <el-button
+                size="small"
+                icon="el-icon-delete"
+                type="text"
+                @click="rowDel(row, index)"
+              >删 除</el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -73,10 +95,26 @@
               @row-click="handleRowClickBuyFree"
               @row-update="rowUpdateBuyFree"
               @row-del="rowDelBuyFree">
-<!--            <template slot="code" slot-scope="{row,index}">-->
-<!--              <span style="float: left;padding-top: 2px">{{ row.code }}</span>-->
-<!--              <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>-->
-<!--            </template>-->
+            <template slot="code" slot-scope="{ row, index }">
+              <el-button
+                size="small"
+                type="text"
+                @click="rePick(row, index, 2)"
+                :disabled="disabled"
+                class="picker"
+                style="padding:4px 10px;float:left"
+              >选择</el-button
+              >
+              <span> {{ row.code }}</span>
+            </template>
+            <template slot="menuLeft">
+              <el-button
+                type="primary"
+                icon="el-icon-plus"
+                size="small"
+                @click.stop="newBuyFree"
+              >新增明细</el-button>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -84,10 +122,67 @@
                   @click="rowCellE(row,index)"
               >{{ row.$cellEdit ? '保存' : '修改' }}
               </el-button>
+              <el-button
+                size="small"
+                icon="el-icon-delete"
+                type="text"
+                @click="rowDelBuyFree(row, index)"
+              >删 除</el-button>
             </template>
           </avue-crud>
         </basic-container>
       </el-form>
+      <el-dialog
+        title="导入商品"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="dialogVisible"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        @close="closeGoods"
+        top="10vh"
+        v-dialogdrag
+      >
+      <span>
+        <el-row>
+          <el-col :span="5">
+            <div>
+              <el-scrollbar>
+                <basic-container style="margin-top:45px">
+                  <avue-tree :option="treeOption" @node-click="nodeClick" />
+                </basic-container>
+              </el-scrollbar>
+            </div>
+          </el-col>
+          <el-col :span="19">
+            <avue-crud
+              :option="goodsOption"
+              :table-loading="loading"
+              :data="goodsList"
+              ref="goodsCrud"
+              @refresh-change="refreshChange"
+              @selection-change="selectionChange"
+              @row-click="rowClick"
+              :page.sync="page"
+              @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
+              @search-change="goodsSearch"
+            ></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 == 0"
+        >导入</el-button>
+      </span>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -96,6 +191,18 @@
 import customerContact from "./configuration/customerContact.json"
 import BuyFree from "./configuration/BuyFree.json"
 import {detail,corpsattn,typeSave} from "@/api/maintenance/salesPolicy"
+import {
+  submit,
+  delItem,
+  getDeptLazyTree,
+  getGoods,
+  savePurchase,
+  saveShipping,
+  getPorts,
+  getSpecification,
+  saveSell
+} from "@/api/basicData/customerInquiry";
+import goodsOption from "./configuration/commodity.json";
 
 export default {
   name: "detailsPage",
@@ -212,7 +319,46 @@ export default {
             }
           }
         ]
-      }
+      },
+      dialogVisible: false,
+      selectionList: [],
+      treeDeptId: null,
+      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"
+        }
+      },
+      goodsOption: goodsOption,
+      loading: false,
+      goodsList: [],
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      // 1特价 2买赠
+      salesType: 1,
+      reData: null,
     }
   },
   //初始化查询
@@ -245,6 +391,150 @@ export default {
     }
   },
   methods: {
+    rePick(row, index,type) {
+      this.reData = {
+        ...row,
+        index: index
+      };
+      if (type == 1) {
+        this.newSpecial();
+      } else {
+        this.newBuyFree()
+      }
+    },
+    // 新增特价弹窗
+    newSpecial() {
+      this.salesType = 1
+      this.dialogVisible = !this.dialogVisible
+    },
+    // 买赠弹窗
+    newBuyFree() {
+      this.salesType = 2
+      this.dialogVisible = !this.dialogVisible
+    },
+    closeGoods() {
+      this.selectionList = [];
+      this.treeDeptId = "";
+      this.reData = null;
+    },
+    nodeClick(data) {
+      this.treeDeptId = data.id;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    rowClick(row) {
+      this.$refs.goodsCrud.toggleSelection([this.goodsList[row.$index]]);
+    },
+    goodsSearch(params, done) {
+      this.onLoad(this.page, params);
+      done()
+    },
+    //商品查询
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getGoods(page.currentPage, page.pageSize, this.treeDeptId,params)
+        .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 - 550;
+          } else {
+            this.goodsOption.height = window.innerHeight - 475;
+          }
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    // 确认导入商品
+    importGoods() {
+      if (this.reData) {
+        if (this.selectionList.length != 1) {
+          return this.$message.error("重新选择的时候只能选择一条数据");
+        } else {
+          this.selectionList.forEach(e => {
+            if (this.reData.salesType == 1) {
+              this.contactsData.forEach((item, index) => {
+                if (index == this.reData.index) {
+                  item.itemId = e.id
+                  item.code = e.code
+                  item.cname = e.cname
+                  item.brand = e.brand
+                  item.productCategory = e.goodsTypeName
+                  item.typeno = e.typeno
+                  item.brandItem = e.brandItem
+                  // item.purchasePrice = this.brand.purchasePrice
+                  // item.salesPrice = this.brand.salesPrice
+                  // item.specialOffer = this.brand.specialOffer
+                  // item.updateUserName = this.brand.updateUserName
+                  // item.updateTime = this.brand.updateTime
+                  // item.salesType = this.brand.salesType
+                }
+              })
+            } else {
+              this.contactsDataBuyFree.forEach((item, index) => {
+                item.itemId = e.id
+                item.code = e.code
+                item.cname = e.cname
+                item.brand = e.brand
+                item.productCategory = e.goodsTypeName
+                item.typeno = e.typeno
+                item.brandItem = e.brandItem
+                // item.purchasePrice = this.brand.purchasePrice
+                // item.salesPrice = this.brand.salesPrice
+                // item.salesPrice = this.brand.purchaseAmount
+                // item.updateUserName = this.brand.salesVolume
+                // item.updateUserName = this.brand.updateUserName
+                // item.updateTime = this.brand.updateTime
+                // item.salesType = this.brand.salesType
+              })
+            }
+          })
+        }
+      } else {
+        if (this.salesType == 1) {
+          this.selectionList.forEach(item => {
+            this.contactsData.push({
+              itemId: item.id,
+              code: item.code,
+              brand: item.brand,
+              productCategory: item.goodsTypeName,
+              typeno: item.typeno,
+              brandItem: item.brandItem,
+              purchasePrice: '',
+              salesPrice: '',
+              specialOffer: '',
+              updateUserName: '',
+              updateTime: '',
+              salesType: '1',
+            })
+          })
+        } else if (this.salesType == 2) {
+          this.selectionList.forEach(item => {
+            this.contactsDataBuyFree.push({
+              itemId: item.id,
+              code: item.code,
+              brand: item.brand,
+              productCategory: item.goodsTypeName,
+              typeno: item.typeno,
+              brandItem: item.brandItem,
+              purchasePrice: '',
+              salesPrice: '',
+              purchaseAmount: '',
+              salesVolume: '',
+              updateUserName: '',
+              updateTime: '',
+              salesType: '2',
+            })
+          })
+        }
+      }
+      this.dialogVisible = false;
+    },
     //买赠列表信息保存触发
     rowSaveBuyFree(row, done, loading) {
       console.log(row)
@@ -362,6 +652,17 @@ export default {
         path: '/maintenance/salesPolicy/index',
         query: {}
       });
+    },
+    async saveGoodsColumn() {
+      // const inSave = await this.saveColumnData(
+      //   this.getColumnName(26),
+      //   this.goodsOption
+      // );
+      // if (inSave) {
+      //   this.$message.success("保存成功");
+      //   //关闭窗口
+      //   this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      // }
     }
   }
 }

+ 1 - 3
src/views/purchase/contract/detailsPage.vue

@@ -204,8 +204,6 @@
         <fee-info
           ref="feeInfo"
           :orderFeesList="orderFeesList"
-          :billData="billData"
-          :beforeBillData="beforeBillData"
           feeUrl=""
         />
         <upload-file
@@ -294,7 +292,7 @@
       <apply-payment
         :billType="billType"
         :billData="billData"
-        :choceFun="choceFun"
+        @choceFun="choceFun"
       >
       </apply-payment>
     </el-dialog>

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

@@ -272,6 +272,23 @@
           <el-button @click="payeeDialog = false ">关 闭</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applySettlementDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <apply-payment
+        :billType="billType"
+        :billData="billData"
+        @choceFun="choceFun"
+      >
+      </apply-payment>
+    </el-dialog>
   </div>
 </template>
 
@@ -295,6 +312,8 @@ import uploadFile from "@/components/upload-file/main";
 import { contrastObj,contrastList } from "@/util/contrastData";
 import _ from "lodash";
 import option from "./config/mainList.json";
+//账单组件
+import ApplyPayment from "../../../components/finance/applyPayment";
 
 export default {
   name: "detailsPage",
@@ -307,6 +326,7 @@ export default {
     return {
       disabled: false,
       dialogCommodity: false,
+      applySettlementDialog:false,
       dialogVisible: false,
       form: {},
       orderFeesList:[],
@@ -314,6 +334,8 @@ export default {
       currencyDic:[],
       contractDic:[],
       selectKind:-1,
+      billType:"销售",
+      billData:{},
       configuration:{
         multipleChoices:false,
         multiple:false,
@@ -683,6 +705,7 @@ export default {
     }
   },
   components: {
+    ApplyPayment,
     feeInfo,
     uploadFile
   },
@@ -738,6 +761,19 @@ export default {
         row.amount =_.multiply(row.invoiceWeight,row.price).toFixed(2);
       }
     },
+    beforeBillData(type){
+      this.billData = {
+        srcOrderno:this.form.orderNo,
+        itemType:"销售",
+        accDate:this.form.businesDate,
+        currency:this.form.currency,
+        exchangeRate:this.form.exchangeRate,
+        srcParentId:this.form.id,
+      }
+      if(type){ //申请货款
+        this.billData.srcId = -1
+      }
+    },
     //申请结算
     applySettlement(){
       if(contrastObj(this.form,this.oldForm) || contrastList(this.importInventoryData,this.oldInventoryData)
@@ -751,27 +787,29 @@ export default {
           this.editCustomer();
         })
       }else{
-        this.$confirm("是否确认申请结算!", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          if(this.$store.getters.takeStatus){
-            this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
-              confirmButtonText: "确定",
-              type: 'warning',
-              callback: action => {
-              }
-            });
-          }else{
-            //关闭一下存在的列表页  跳转
-            this.$router.$avueRouter.closeTag('/receipt_settle');
-            this.$router.push({
-              path: "/receipt_settle",
-              query: {params: this.form.id},
-            });
-          }
-        })
+        this.beforeBillData(true)
+        this.applySettlementDialog = true;
+        // this.$confirm("是否确认申请结算!", {
+        //   confirmButtonText: "确定",
+        //   cancelButtonText: "取消",
+        //   type: "warning"
+        // }).then(() => {
+        //   if(this.$store.getters.takeStatus){
+        //     this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
+        //       confirmButtonText: "确定",
+        //       type: 'warning',
+        //       callback: action => {
+        //       }
+        //     });
+        //   }else{
+        //     //关闭一下存在的列表页  跳转
+        //     this.$router.$avueRouter.closeTag('/receipt_settle');
+        //     this.$router.push({
+        //       path: "/receipt_settle",
+        //       query: {params: this.form.id},
+        //     });
+        //   }
+        // })
       }
     },
     //修改
@@ -846,6 +884,9 @@ export default {
         }
       });
     },
+    choceFun(){
+      this.applySettlementDialog  = false
+    },
     //刷新
     payeeRefreshChange(){
 

+ 7 - 0
src/views/workManagement/main-items/list.vue

@@ -110,6 +110,13 @@ export default {
     getList(page,params = {}) {
       params.flag = 0;
       this.loading = true;
+      if(params){
+        if (params.createTime != undefined) {  //发货
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
+        }
+      }
       getList(page.currentPage, page.pageSize,params).then(res =>{
         this.data = res.data.data.records
         this.page.total = res.data.data.total

+ 10 - 3
src/views/workManagement/receipt/configuration/settleAccounts.json

@@ -127,11 +127,13 @@
     {
       "label": "制单日期",
       "prop": "createTime",
+      "search": true,
       "type": "date",
-      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
       "unlinkPanels": true,
       "searchRange": true,
-      "search": true,
+      "overHidden": true,
       "index": 12,
       "width": 150
     },
@@ -145,8 +147,13 @@
     {
       "label": "最新修改时间",
       "prop": "updateTime",
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "unlinkPanels": true,
+      "searchRange": true,
       "overHidden": true,
-      "index": 14,
+      "index": 12,
       "width": 150
     }
   ]

+ 7 - 0
src/views/workManagement/receipt/settleAccounts.vue

@@ -78,6 +78,13 @@
       getList(page,params={}) {
         this.loading = true;
         params.flag = 1;
+        if(params){
+          if (params.createTime != undefined) {  //发货
+            params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+            params.createEndDate = params.createTime[1] + " " + "23:59:59";
+            this.$delete(params,'createTime')
+          }
+        }
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.data = res.data.data.records
           this.page.total = res.data.data.total

+ 1 - 8
src/views/workManagement/service-items/configuration/projectOption.json

@@ -18,6 +18,7 @@
     {
       "label": "项目编码",
       "prop": "code",
+      "search": true,
       "index": 1,
       "width": 150,
       "rules": [
@@ -118,14 +119,6 @@
       "addDisplay": false,
       "index": 9,
       "width": 150
-    },
-    {
-      "label": "状态",
-      "prop": "status",
-      "hide": true,
-      "editDisplay": false,
-      "addDisplay": false,
-      "search": true
     }
   ]
 }

+ 2 - 14
src/views/workManagement/task/configuration/mainList.json

@@ -113,7 +113,8 @@
     {
       "label": "需求开始日期",
       "prop": "beginTime",
-      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
       "type": "date",
       "unlinkPanels": true,
       "searchRange": true,
@@ -124,19 +125,6 @@
       "cell": true
     },
     {
-      "label": "需求完成日期",
-      "prop": "actualDate",
-      "valueFormat": "yyyy-MM-dd HH:mm:ss",
-      "type": "date",
-      "search": true,
-      "unlinkPanels": true,
-      "searchRange": true,
-      "overHidden": true,
-      "searchOrder": 4,
-      "width": 150,
-      "cell": true
-    },
-    {
       "label": "制单人",
       "prop": "createUserName",
       "disabled": true,

+ 7 - 0
src/views/workManagement/task/index.vue

@@ -133,6 +133,13 @@
         if(!params.status){
           params.status = "1,4,5";
         }
+        if(params){
+          if (params.beginTime != undefined) {  //发货
+            params.beginStartTime = params.beginTime[0]+ " " + "00:00:00";
+            params.beginEndTime = params.beginTime[1] + " " + "23:59:59";
+            this.$delete(params,'beginTime')
+          }
+        }
         this.loading = true
         getFlowList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records