Browse Source

修改国内贸易

lichao 3 năm trước cách đây
mục cha
commit
a4efa29377
22 tập tin đã thay đổi với 596 bổ sung78 xóa
  1. 8 0
      src/api/basicData/deliveryNotice.js
  2. 7 5
      src/router/views/index.js
  3. 12 0
      src/views/businessManagement/deliveryNotice/configuration/advantageProject.json
  4. 24 12
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  5. 16 4
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  6. 72 5
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  7. 50 5
      src/views/businessManagement/deliveryNotice/index.vue
  8. 12 0
      src/views/businessManagement/purchaseOrder/configuration/advantageProject.json
  9. 8 0
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  10. 17 3
      src/views/businessManagement/purchaseOrder/configuration/mainList.json
  11. 39 4
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  12. 41 4
      src/views/businessManagement/purchaseOrder/index.vue
  13. 12 0
      src/views/businessManagement/receipt/configuration/advantageProject.json
  14. 12 0
      src/views/businessManagement/receipt/configuration/customerContact.json
  15. 30 4
      src/views/businessManagement/receipt/configuration/mainList.json
  16. 39 4
      src/views/businessManagement/receipt/detailsPageEdit.vue
  17. 22 3
      src/views/businessManagement/receipt/index.vue
  18. 12 0
      src/views/businessManagement/salesOrder/configuration/advantageProject.json
  19. 8 0
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  20. 66 15
      src/views/businessManagement/salesOrder/configuration/mainList.json
  21. 52 4
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  22. 37 6
      src/views/businessManagement/salesOrder/index.vue

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

@@ -110,3 +110,11 @@ export function corpstypeTree() {
         method: 'get'
     })
 }
+//确认发货
+export function sendOutGoods(data) {
+  return request({
+    url: '/api/blade-deliver-goods/delivery/save',
+    method: 'post',
+    data: data
+  })
+}

+ 7 - 5
src/router/views/index.js

@@ -126,7 +126,7 @@ export default [{
         children: [
             {
                 path: '/businessManagement/salesOrder/index',
-                name: '销售订单',
+                name: '销售订单(N)',
                 meta: {
                     i18n: 'businessManagement/salesOrder/index',
                     keepAlive: true,
@@ -143,7 +143,7 @@ export default [{
         children: [
             {
                 path: '/businessManagement/deliveryNotice/index',
-                name: '发货单',
+                name: '发货单(N)',
                 meta: {
                     i18n: 'businessManagement/deliveryNotice/index',
                     keepAlive: true,
@@ -175,8 +175,10 @@ export default [{
         children: [
             {
                 path: '/salesPolicy_detailsPageEdit',
+                name: '销售政策',
                 meta: {
-                    i18n: 'salesPolicy_detailsPageEdit'
+                    i18n: 'salesPolicy_detailsPageEdit',
+                    keepAlive: true,
                 },
                 component: () => import( /* webpackChunkName: "views" */ '@/views/maintenance/salesPolicy/detailsPageEdit')
             }
@@ -205,7 +207,7 @@ export default [{
         children: [
             {
                 path: '/businessManagement/receipt/index',
-                name: '收货单',
+                name: '收货单(N)',
                 meta: {
                     i18n: 'businessManagement/receipt/index',
                     keepAlive: true,
@@ -222,7 +224,7 @@ export default [{
         children: [
             {
                 path: '/businessManagement/purchaseOrder/index',
-                name: '采购订单',
+                name: '采购订单(N)',
                 meta: {
                     i18n: 'businessManagement/purchaseOrder/index',
                     keepAlive: true,

+ 12 - 0
src/views/businessManagement/deliveryNotice/configuration/advantageProject.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlmentAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 24 - 12
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "deliveryAmount",
+      "type": "sum"
+    },
+    {
+      "name": "inventoryAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",
@@ -98,54 +110,54 @@
         }
       ]
     },{
-      "label": "库数量",
-      "prop": "inventoryNumber",
+      "label": "库数量",
+      "prop": "actualQuantity",
       "index": 6,
       "width":100,
       "cell": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入库数量",
+          "message": "请输入库数量",
           "trigger": "blur"
         }
       ]
     },{
-      "label": "出库数量",
-      "prop": "actualQuantity",
+      "label": "出库金额",
+      "prop": "deliveryAmount",
       "index": 6,
       "width":100,
       "cell": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入出库数量",
+          "message": "请输入出库金额",
           "trigger": "blur"
         }
       ]
     },{
-      "label": "库存金额",
-      "prop": "inventoryAmount",
+      "label": "库存数量",
+      "prop": "inventoryNumber",
       "index": 6,
       "width":100,
       "cell": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入库存金额",
+          "message": "请输入库存数量",
           "trigger": "blur"
         }
       ]
     },{
-      "label": "库金额",
-      "prop": "deliveryAmount",
+      "label": "库金额",
+      "prop": "inventoryAmount",
       "index": 6,
       "width":100,
       "cell": true,
       "rules": [
         {
           "required": false,
-          "message": "请输入库金额",
+          "message": "请输入库金额",
           "trigger": "blur"
         }
       ]

+ 16 - 4
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -3,7 +3,7 @@
     "tip": false,
     "simplePage": true,
     "searchShow": true,
-  "searchMenuPosition": "right",
+    "searchMenuPosition": "right",
     "dialogWidth": "60%",
     "tree": true,
     "border": true,
@@ -15,6 +15,16 @@
     "menuWidth": 300,
     "dialogClickModal": false,
     "searchLabelWidth": 100,
+    "showSummary": true,
+    "searchIcon": true,
+    "searchIndex": 3,
+    "sumText": "合计",
+    "sumColumnList": [
+      {
+        "name": "deliveryAmount",
+        "type": "sum"
+      }
+    ],
     "column":[
         {
             "label": "系统编号",
@@ -28,10 +38,11 @@
             "prop": "corpId",
             "search": true,
             "index": 1,
-            "width":100
+            "width":100,
+            "overHidden": true
         },{
             "label": "单据状态",
-            "prop": "status",
+            "prop": "deliveryStatus",
             "type": "select",
             "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
             "props": {
@@ -46,7 +57,8 @@
             "prop": "salesCompany",
             "search": true,
             "index": 4,
-            "width":100
+            "width":100,
+          "overHidden": true
         },{
             "label": "匹配订单号",
             "prop": "srcOrderNo",

+ 72 - 5
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -51,6 +51,7 @@
                 <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
                 </el-select>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
             </el-col>
@@ -67,6 +68,7 @@
               @row-click="handleRowClick"
               @row-update="rowUpdate"
               @row-del="rowDel"
+              @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -88,6 +90,7 @@
               >录入明细
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
+              <el-button type="primary" size="small" @click="sendOutGoods">确认发货</el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -101,6 +104,7 @@
               @row-save="rowSaveProject"
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
+              @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -236,7 +240,8 @@ import {
   corpsattn,
   corpsbank,
   corpsitem,
-  getList
+  getList,
+  sendOutGoods
 } from "@/api/basicData/deliveryNotice"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
@@ -347,8 +352,8 @@ export default {
       tableDataCost: [],
       dic: [],
       tableData: [],
-      customerContact: customerContact,
-      advantageProject: advantageProject,
+      customerContact: {},
+      advantageProject: {},
       bankOfDeposit: bankOfDeposit,
       basicData: {
         column: [
@@ -479,6 +484,7 @@ export default {
           }, {
             label: "备注",
             span: 24,
+            type: 'textarea',
             prop: "otherRemarks",
             mock: {
               type: 'county'
@@ -496,7 +502,9 @@ export default {
     }
   },
   //初始化查询
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(21), customerContact);
+    this.advantageProject = await this.getColumnData(this.getColumnName(22), advantageProject);
     this.getWorkDicts("order_status").then(res => {
       this.statusOption = res.data.data
     })
@@ -548,7 +556,16 @@ export default {
         this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
       }
       delete this.form.belongToCorpList
+      this.$set(this.form, 'deliveryAmount', 0)
+      this.$set(this.form, 'totalQuantity', 0)
+      this.$set(this.form, 'totalCost', 0)
       this.contactsData.forEach(item => {
+        this.$set(item, "srcId", item.id)
+        this.$set(item, "actualQuantity", item.orderQuantity)
+        this.$set(item, "deliveryAmount", item.amount)
+        this.form.deliveryAmount += Number(item.deliveryAmount)
+        this.form.totalQuantity += Number(item.actualQuantity)
+        this.form.totalCost += Number(item.deliveryAmount)
         delete item.id
         delete item.pid
       })
@@ -993,7 +1010,57 @@ export default {
       }).catch(() => {
         this.$emit("goBack");
       })
-    }
+    },
+    // 确认发货
+    sendOutGoods() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          //商品信息
+          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(",")
+          }
+          sendOutGoods(this.form).then(res => {
+            console.log(res)
+            this.$message.success('发货成功')
+          })
+        } else {
+          return false;
+        }
+      });
+
+    },
+    // 保存列设置
+    async saveColumn(name) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      if (name == 'goods') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(21),
+          this.customerContact
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+        }
+      } else if (name === 'fees') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(22),
+          this.advantageProject
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
+        }
+      }
+    },
   }
 }
 </script>

+ 50 - 5
src/views/businessManagement/deliveryNotice/index.vue

@@ -6,6 +6,7 @@
                  ref="crud"
                  v-model="form"
                  :page.sync="page"
+                 :search.sync="search"
                  @row-del="rowDel"
                  @row-update="rowUpdate"
                  :before-open="beforeOpen"
@@ -18,11 +19,30 @@
                  @size-change="sizeChange"
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
-                 @tree-load="treeLoad">
+                 @tree-load="treeLoad"
+                 @saveColumn="saveColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
         </template>
+        <template slot="corpIdSearch">
+          <select-component
+            v-model="search.corpId"
+            :configuration="configuration"
+          ></select-component>
+        </template>
+        <template slot="salesCompanySearch">
+          <select-component
+            v-model="search.salesCompany"
+            :configuration="configuration"
+          ></select-component>
+        </template>
+        <template slot-scope="scope" slot="corpId">
+          {{ scope.row.corpsName }}
+        </template>
+        <template slot-scope="scope" slot="salesCompany">
+          {{ scope.row.salesCompanyName }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -70,8 +90,16 @@ export default {
   },
   data() {
     return {
+      configuration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
       form: {},
-      option: option,
+      search: {},
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -88,9 +116,9 @@ export default {
       detailData: {},
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(20), option);
     if (this.$route.query.form) {
-      console.log(this.$route.query.form)
       this.detailData = {
         form: this.$route.query.form,
       };
@@ -197,7 +225,7 @@ export default {
       done()
     },
     searchReset() {
-      console.log('1')
+      // this.configuration.dicData = []
     },
     selectionChange(list) {
       this.selection = list;
@@ -246,6 +274,23 @@ export default {
       this.detailData=this.$options.data().detailData
       this.isShow = true;
     },
+    //列保存触发
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(
+        this.getColumnName(20),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 12 - 0
src/views/businessManagement/purchaseOrder/configuration/advantageProject.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlmentAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 8 - 0
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -17,6 +17,14 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 17 - 3
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -3,7 +3,7 @@
     "tip": false,
     "simplePage": true,
     "searchShow": true,
-  "searchMenuPosition": "right",
+    "searchMenuPosition": "right",
     "dialogWidth": "60%",
     "tree": true,
     "border": true,
@@ -15,6 +15,8 @@
     "menuWidth": 300,
     "dialogClickModal": false,
     "searchLabelWidth": 100,
+    "searchIcon": true,
+    "searchIndex": 3,
     "column":[
         {
             "label": "系统编号",
@@ -37,7 +39,7 @@
             "width":100
         },{
             "label": "供应商",
-            "prop": "shippingAddress",
+            "prop": "corpId",
             "search": true,
             "index": 4,
             "width":100
@@ -55,7 +57,7 @@
             "width":100
         },{
             "label": "公司户头",
-            "prop": "banksAccountname",
+            "prop": "banksAccountName",
             "search": true,
             "index": 6,
             "width":100
@@ -82,6 +84,18 @@
             "search": true,
             "index": 8,
             "width":100
+        },{
+          "label": "合同日期",
+          "type": "date",
+          "unlinkPanels": true,
+          "searchRange": true,
+          "prop": "businesDate",
+          "search": true,
+          "index": 9,
+          "width":100,
+          "format": "yyyy-MM-dd",
+          "valueFormat": "yyyy-MM-dd",
+          "overHidden": true
         }
     ]
 }

+ 39 - 4
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -36,6 +36,7 @@
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
                                  :configuration="configuration" style="width: 100%"/>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
             </el-col>
@@ -53,6 +54,7 @@
               @row-update="rowUpdate"
               @row-del="rowDel"
               @selection-change="productSelection"
+              @saveColumn="saveColumn('goods')"
           >
             <template slot="orderQuantity" slot-scope="{ row }">
               <el-input
@@ -129,6 +131,7 @@
               @row-save="rowSaveProject"
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
+              @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -509,8 +512,8 @@ export default {
       tableDataCost: [],
       dic: [],
       tableData: [],
-      customerContact: customerContact,
-      advantageProject: advantageProject,
+      customerContact: {},
+      advantageProject: {},
       bankOfDeposit: bankOfDeposit,
       basicData: {
         column: [
@@ -610,6 +613,7 @@ export default {
             label: "备注",
             span: 24,
             prop: "orderRemark",
+            type: 'textarea',
             mock: {
               type: 'county'
             }
@@ -623,7 +627,9 @@ export default {
     }
   },
   //初始化查询
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(18), customerContact);
+    this.advantageProject = await this.getColumnData(this.getColumnName(19), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
       this.paymentOption = res.data.data
     })
@@ -1127,7 +1133,36 @@ export default {
       }).catch(() => {
         this.$emit("goBack");
       })
-    }
+    },
+    // 保存列设置
+    async saveColumn(name) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      if (name == 'goods') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(18),
+          this.customerContact
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+        }
+      } else if (name === 'fees') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(19),
+          this.advantageProject
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
+        }
+      }
+    },
   }
 }
 </script>

+ 41 - 4
src/views/businessManagement/purchaseOrder/index.vue

@@ -6,6 +6,7 @@
                  ref="crud"
                  v-model="form"
                  :page.sync="page"
+                 :search.sync="search"
                  @row-del="rowDel"
                  :before-open="beforeOpen"
                  :before-close="beforeClose"
@@ -16,11 +17,21 @@
                  @size-change="sizeChange"
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
-                 @tree-load="treeLoad">
+                 @tree-load="treeLoad"
+                 @saveColumn="saveColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
         </template>
+        <template slot="corpIdSearch">
+          <select-component
+            v-model="search.corpId"
+            :configuration="configuration"
+          ></select-component>
+        </template>
+        <template slot-scope="scope" slot="corpId">
+          {{ scope.row.strCorpName }}
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -73,8 +84,16 @@ export default {
   },
   data() {
     return {
+      configuration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
+      search: {},
       form: {},
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -91,8 +110,9 @@ export default {
       detailData: {},
     }
   },
-  created() {
-    // this.onLoad()
+  async created() {
+    // this.option = option
+    this.option = await this.getColumnData(this.getColumnName(17), option);
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
@@ -217,6 +237,23 @@ export default {
       this.detailData=this.$options.data().detailData
       this.isShow = true;
     },
+    //列保存触发
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(
+        this.getColumnName(17),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 12 - 0
src/views/businessManagement/receipt/configuration/advantageProject.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlmentAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 12 - 0
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "purchaseAmount",
+      "type": "sum"
+    },
+    {
+      "name": "deliveryAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 30 - 4
src/views/businessManagement/receipt/configuration/mainList.json

@@ -15,6 +15,20 @@
     "menuWidth": 300,
     "dialogClickModal": false,
     "searchLabelWidth": 100,
+    "searchIcon": true,
+    "searchIndex": 3,
+    "showSummary": true,
+    "sumText": "合计",
+    "sumColumnList": [
+      {
+        "name": "deliveryAmount",
+        "type": "sum"
+      },
+      {
+        "name": "purchaseAmount",
+        "type": "sum"
+      }
+    ],
     "column":[
         {
             "label": "系统编号",
@@ -82,8 +96,8 @@
             "unlinkPanels": true,
             "searchRange": true,
             "label": "入库日期",
-        "format": "yyyy-MM-dd",
-        "valueFormat": "yyyy-MM-dd",
+            "format": "yyyy-MM-dd",
+            "valueFormat": "yyyy-MM-dd",
             "prop": "businessDate",
             "search": true,
             "index": 8,
@@ -92,13 +106,25 @@
             "type": "date",
             "unlinkPanels": true,
             "searchRange": true,
-        "format": "yyyy-MM-dd",
-        "valueFormat": "yyyy-MM-dd",
+            "format": "yyyy-MM-dd",
+            "valueFormat": "yyyy-MM-dd",
             "label": "制单时间",
             "prop": "createTime",
             "search": true,
             "index": 8,
             "width":100
+        },{
+          "label": "合同日期",
+          "type": "date",
+          "unlinkPanels": true,
+          "searchRange": true,
+          "prop": "businesDate",
+          "search": true,
+          "index": 9,
+          "width":100,
+          "format": "yyyy-MM-dd",
+          "valueFormat": "yyyy-MM-dd",
+          "overHidden": true
         }
     ]
 }

+ 39 - 4
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -51,6 +51,7 @@
                 <el-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in warehouseName" :key="index" :label="item.cname" :value="item.id" size="small"></el-option>
                 </el-select>
+                <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
             </el-col>
@@ -67,6 +68,7 @@
               @row-click="handleRowClick"
               @row-update="rowUpdate"
               @row-del="rowDel"
+              @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -101,6 +103,7 @@
               @row-save="rowSaveProject"
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
+              @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -480,8 +483,8 @@ export default {
       tableDataCost: [],
       dic: [],
       tableData: [],
-      customerContact: customerContact,
-      advantageProject: advantageProject,
+      customerContact: {},
+      advantageProject: {},
       bankOfDeposit: bankOfDeposit,
       basicData: {
         column: [
@@ -610,6 +613,7 @@ export default {
           }, {
             label: "入库单备注",
             span: 24,
+            type: 'textarea',
             prop: "deliveryRemarks",
             mock: {
               type: 'county'
@@ -631,7 +635,9 @@ export default {
     }
   },
   //初始化查询
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(24), customerContact);
+    this.advantageProject = await this.getColumnData(this.getColumnName(25), advantageProject);
     this.getWorkDicts("procurement_method").then(res => {
       this.procurementMethodOption = res.data.data
     })
@@ -1120,7 +1126,36 @@ export default {
       }).catch(() => {
         this.$emit("goBack");
       })
-    }
+    },
+    // 保存列设置
+    async saveColumn(name) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      if (name == 'goods') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(24),
+          this.customerContact
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+        }
+      } else if (name === 'fees') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(25),
+          this.advantageProject
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
+        }
+      }
+    },
   }
 }
 </script>

+ 22 - 3
src/views/businessManagement/receipt/index.vue

@@ -18,7 +18,8 @@
                  @size-change="sizeChange"
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
-                 @tree-load="treeLoad">
+                 @tree-load="treeLoad"
+                 @saveColumn="saveColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -71,7 +72,7 @@ export default {
   data() {
     return {
       form: {},
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -88,7 +89,8 @@ export default {
       detailData: {},
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(23), option);
     // this.onLoad()
     if (this.$route.query.form) {
       console.log(this.$route.query.form)
@@ -248,6 +250,23 @@ export default {
       this.detailData=this.$options.data().detailData
       this.isShow = true;
     },
+    //列保存触发
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(
+        this.getColumnName(23),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 12 - 0
src/views/businessManagement/salesOrder/configuration/advantageProject.json

@@ -17,6 +17,18 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "settlmentAmount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

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

@@ -17,6 +17,14 @@
   "selection": true,
   "menuWidth": 300,
   "dialogClickModal": false,
+  "showSummary": true,
+  "sumText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column":[
     {
       "label": "排序",

+ 66 - 15
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -17,38 +17,68 @@
     "menuWidth": 300,
     "dialogClickModal": false,
     "searchLabelWidth": 100,
+    "searchIcon": true,
+    "searchIndex": 3,
     "column":[
         {
             "label": "系统编号",
             "prop": "sysNo",
             "search": true,
             "index": 1,
-            "width":100
+            "width":100,
+          "overHidden": true
         },
         {
             "label": "销售订单号",
             "prop": "orderNo",
             "search": true,
             "index": 2,
-            "width":100
-        },{
+            "width":100,
+          "overHidden": true
+        },
+        {
             "label": "主订单号",
             "prop": "morderNo",
             "search": true,
             "index": 3,
-            "width":100
-        },{
+            "width":100,
+          "overHidden": true
+        },
+        {
+          "label": "客户名称",
+          "prop": "corpId",
+          "search": true,
+          "index": 4,
+          "width":100,
+          "overHidden": true
+        },
+        {
+          "label": "合同日期",
+          "type": "date",
+          "unlinkPanels": true,
+          "searchRange": true,
+          "prop": "businesDate",
+          "search": true,
+          "index": 4,
+          "width":100,
+          "format": "yyyy-MM-dd",
+          "valueFormat": "yyyy-MM-dd",
+          "overHidden": true
+        },
+        {
             "label": "发货地址",
             "prop": "shippingAddress",
             "search": true,
             "index": 4,
-            "width":100
+            "width":100,
+          "overHidden": true
         },{
             "label": "到货地址",
             "prop": "arrivalAddress",
             "search": true,
             "index": 5,
-            "width":100
+            "width":100,
+        "overHidden": true
         },{
             "type": "select",
             "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
@@ -60,26 +90,44 @@
             "prop": "paymentType",
             "search": true,
             "index": 6,
-            "width":100
+            "width":100,
+        "overHidden": true
         },{
             "label": "包装要求",
             "prop": "packageRemarks",
             "search": true,
             "index": 7,
-            "width":100
+            "width":100,
+        "overHidden": true
         },{
             "label": "运费",
             "prop": "oceanFreight",
             "search": true,
             "index": 8,
-            "width":100
+            "width":100,
+        "overHidden": true
         },{
             "label": "银行帐号",
             "prop": "banks",
             "search": true,
             "index": 8,
-            "width":100
-        },{
+            "width":100,
+        "overHidden": true
+        },
+        {
+          "label": "发货日期",
+          "type": "date",
+          "unlinkPanels": true,
+          "searchRange": true,
+          "prop": "actualDeliveryDate",
+          "search": true,
+          "index": 8,
+          "width":100,
+          "format": "yyyy-MM-dd",
+          "valueFormat": "yyyy-MM-dd",
+          "overHidden": true
+        },
+        {
             "label": "要求发货日期",
             "type": "date",
             "unlinkPanels": true,
@@ -89,7 +137,8 @@
             "index": 8,
             "width":100,
             "format": "yyyy-MM-dd",
-            "valueFormat": "yyyy-MM-dd"
+            "valueFormat": "yyyy-MM-dd",
+          "overHidden": true
       },{
             "label": "要求到货日期",
             "type": "date",
@@ -100,13 +149,15 @@
             "index": 8,
             "width":100,
             "format": "yyyy-MM-dd",
-            "valueFormat": "yyyy-MM-dd"
+            "valueFormat": "yyyy-MM-dd",
+        "overHidden": true
       },{
             "label": "公司户头",
             "prop": "banksAccountName",
             "search": true,
             "index": 8,
-            "width":100
+            "width":100,
+        "overHidden": true
         }
     ]
 }

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

@@ -51,6 +51,9 @@
                 <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
+                <el-input type="age" v-else-if="item.prop === 'grossProfitRate'" v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入">
+                  <template   slot="append">%</template>
+                </el-input>
                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
                 <el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
@@ -69,6 +72,7 @@
               @row-update="rowUpdate"
               @selection-change="productSelection"
               @row-del="rowDel"
+              @saveColumn="saveColumn('goods')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -164,6 +168,7 @@
               @row-save="rowSaveProject"
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
+              @saveColumn="saveColumn('fees')"
           >
             <template slot="code" slot-scope="{row,index}">
               <span style="float: left;padding-top: 2px">{{ row.code }}</span>
@@ -503,6 +508,7 @@ import {
   policyColumn
 } from "@/api/basicData/basicFeesDesc";
 import _ from "lodash";
+import option from "./configuration/mainList.json";
 
 export default {
   name: "detailsPage",
@@ -645,8 +651,8 @@ export default {
       tableData: [],
       policyData: [],
       policyDataTwo: [],
-      customerContact: customerContact,
-      advantageProject: advantageProject,
+      customerContact: {},
+      advantageProject: {},
       bankOfDeposit: bankOfDeposit,
       contactInformation: {
         column: [
@@ -1027,7 +1033,9 @@ export default {
     }
   },
   //初始化查询
-  created() {
+  async created() {
+    this.customerContact = await this.getColumnData(this.getColumnName(15), customerContact);
+    this.advantageProject = await this.getColumnData(this.getColumnName(16), advantageProject);
     this.getWorkDicts("payment_term").then(res => {
       this.paymentOption = res.data.data
     })
@@ -1266,6 +1274,8 @@ export default {
           console.log(this.tableDataCost[item])
           this.tableDataCost[item].itemId = this.tableDataCost[item].id
           this.tableDataCost[item].feeName = this.tableDataCost[item].cname
+          this.$set(this.tableDataCost[item], 'amount', 0)
+          this.$set(this.tableDataCost[item], 'settlmentAmount', 0)
           this.tableDataCost[item].sort = this.maxFeeNum + 1
           this.maxFeeNum++
           delete this.tableDataCost[item].id
@@ -1575,6 +1585,15 @@ export default {
               return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
             }
           }
+          // 计算毛利额
+          this.$set(this.form, 'grossProfit', 0)
+          this.contactsData.forEach(item => {
+            this.form.grossProfit += Number(item.amount)
+          })
+          // 计算毛利率
+          if (this.form.orderAmount) {
+            this.form.grossProfitRate = ((Number(this.form.grossProfit) / Number(this.form.orderAmount)) * 100).toFixed(2)
+          }
           //商品信息
           this.form.orderItemsList = this.contactsData
           this.form.orderFeesList = this.advantageProjectData
@@ -1644,7 +1663,36 @@ export default {
         // });
         this.$emit("goBack");
       })
-    }
+    },
+    // 保存列设置
+    async saveColumn(name) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      if (name == 'goods') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(15),
+          this.customerContact
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+        }
+      } else if (name === 'fees') {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(16),
+          this.advantageProject
+        );
+        if (inSave) {
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
+        }
+      }
+    },
   }
 }
 </script>

+ 37 - 6
src/views/businessManagement/salesOrder/index.vue

@@ -21,7 +21,17 @@
                  @size-change="sizeChange"
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
-                 @tree-load="treeLoad">
+                 @tree-load="treeLoad"
+      >
+        <template slot="corpIdSearch">
+          <select-component
+            v-model="search.corpId"
+            :configuration="configuration"
+          ></select-component>
+        </template>
+        <template slot-scope="scope" slot="corpId">
+          {{ scope.row.corpsName }}
+        </template>
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制新单</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -73,8 +83,15 @@ export default {
   },
   data() {
     return {
+      configuration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
       form: {},
-      option: option,
+      option: {},
       parentId: 0,
       search:{},
       dataList: [],
@@ -92,7 +109,8 @@ export default {
       detailData: {},
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(14), option);
     if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
       this.option.searchMenuSpan = 6;
       this.option.searchMenuPosition = "center";
@@ -138,8 +156,21 @@ export default {
       })
     },
     //列保存触发
-    saveColumn(data){
-      console.log(data.objectOption)
+    async saveColumn() {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(
+        this.getColumnName(14),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
     },
     //查询全部
     initData() {
@@ -204,7 +235,7 @@ export default {
       done()
     },
     searchReset() {
-      console.log('1')
+      this.configuration.dicData = []
     },
     // 选择框
     selectionChange(list) {