Browse Source

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

caojunjie 4 years ago
parent
commit
45b0ec2b10
40 changed files with 1151 additions and 176 deletions
  1. 8 0
      src/api/basicData/deliveryNotice.js
  2. 25 0
      src/api/importTrade/receipt.js
  3. 75 0
      src/components/procurement/config/mainList.json
  4. 59 0
      src/components/procurement/procurementDetail.vue
  5. 2 2
      src/components/selectComponent/configuration/mainList.json
  6. 6 8
      src/components/selectComponent/customerSelect.vue
  7. 2 2
      src/page/index/tags.vue
  8. 1 1
      src/router/axios.js
  9. 11 9
      src/router/views/index.js
  10. 2 1
      src/views/basicData/commodityCategory/index.vue
  11. 3 2
      src/views/basicData/customerInformation/detailsPageEdit.vue
  12. 17 1
      src/views/basicData/customerInformation/index.vue
  13. 27 0
      src/views/basicData/productInformation/index.vue
  14. 12 0
      src/views/businessManagement/deliveryNotice/configuration/advantageProject.json
  15. 24 12
      src/views/businessManagement/deliveryNotice/configuration/customerContact.json
  16. 16 4
      src/views/businessManagement/deliveryNotice/configuration/mainList.json
  17. 72 5
      src/views/businessManagement/deliveryNotice/detailsPageEdit.vue
  18. 50 5
      src/views/businessManagement/deliveryNotice/index.vue
  19. 12 0
      src/views/businessManagement/purchaseOrder/configuration/advantageProject.json
  20. 8 0
      src/views/businessManagement/purchaseOrder/configuration/customerContact.json
  21. 17 3
      src/views/businessManagement/purchaseOrder/configuration/mainList.json
  22. 39 4
      src/views/businessManagement/purchaseOrder/detailsPageEdit.vue
  23. 41 4
      src/views/businessManagement/purchaseOrder/index.vue
  24. 12 0
      src/views/businessManagement/receipt/configuration/advantageProject.json
  25. 12 0
      src/views/businessManagement/receipt/configuration/customerContact.json
  26. 30 4
      src/views/businessManagement/receipt/configuration/mainList.json
  27. 39 4
      src/views/businessManagement/receipt/detailsPageEdit.vue
  28. 22 3
      src/views/businessManagement/receipt/index.vue
  29. 12 0
      src/views/businessManagement/salesOrder/configuration/advantageProject.json
  30. 8 0
      src/views/businessManagement/salesOrder/configuration/customerContact.json
  31. 66 15
      src/views/businessManagement/salesOrder/configuration/mainList.json
  32. 52 4
      src/views/businessManagement/salesOrder/detailsPageEdit.vue
  33. 37 6
      src/views/businessManagement/salesOrder/index.vue
  34. 18 13
      src/views/importTrade/receipt/config/customerContact.json
  35. 210 51
      src/views/importTrade/receipt/detailsPageEdit.vue
  36. 16 4
      src/views/purchase/contract/config/customerContact.json
  37. 81 8
      src/views/purchase/contract/detailsPage.vue
  38. 1 1
      src/views/workManagement/main-items/detailsPage.vue
  39. 1 0
      src/views/workManagement/receipt/settleAccountsDetailsPage.vue
  40. 5 0
      src/views/workManagement/task/configuration/mainList.json

+ 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
+  })
+}

+ 25 - 0
src/api/importTrade/receipt.js

@@ -43,3 +43,28 @@ export function removeGoodsItem(data) {
     }
   })
 }
+
+//获取仓库
+export function getStorage() {
+  return request({
+    url: 'api/blade-client/storagedesc/storage/list',
+    method: 'get',
+  })
+}
+
+export function getInventory(data) {
+  return request({
+    url: 'api/blade-deliver-goods/importDelivery/findStockByConditions',
+    method: 'get',
+    data:data
+  })
+}
+
+//确认收货
+export function confirmReceipt(data) {
+  return request({
+    url: 'api/blade-deliver-goods/importReCeVing/comfire',
+    method: 'post',
+    data: data
+  })
+}

+ 75 - 0
src/components/procurement/config/mainList.json

@@ -0,0 +1,75 @@
+{
+  "lazy": true,
+  "tip": false,
+  "simplePage": true,
+  "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
+  "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":true,
+  "dialogWidth": "60%",
+  "tree": true,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "column":[
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "index": 1,
+      "width":180
+    },{
+      "label": "货物品种",
+      "prop": "priceCategory",
+      "index": 2,
+      "width":120
+    },{
+      "label": "货物详情",
+      "prop": "itemDescription",
+      "index": 3,
+      "width":180
+    },{
+      "label": "箱号",
+      "prop": "containerNo",
+      "index": 4,
+      "width":100
+    },{
+      "label": "发票净重(吨)",
+      "prop": "invoiceWeight",
+      "index": 5,
+      "width":120
+    },{
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
+      "index": 6,
+      "width":120
+    },{
+      "label": "件数",
+      "prop": "purchaseQuantity",
+      "index": 7,
+      "width":120
+    },{
+      "label": "单价",
+      "prop": "price",
+      "index": 8,
+      "width":120
+    },{
+      "label": "合同金额",
+      "prop": "amount",
+      "index": 9,
+      "width":120
+    },{
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 10,
+      "width":120
+    }
+  ]
+}

+ 59 - 0
src/components/procurement/procurementDetail.vue

@@ -0,0 +1,59 @@
+<template>
+    <div>
+      <avue-crud :option="option"
+                 :table-loading="loading"
+                 :data="data"
+                 ref="crud"
+                 @refresh-change="refreshChange"
+                 :page.sync="page"
+                 @on-load="onLoad">
+      </avue-crud>
+       <span slot="footer" class="dialog-footer" >
+          <el-button type="primary"  @click="closeFun()">关 闭</el-button>
+         <el-button type="primary"  @click="closeFun()">导 入</el-button>
+       </span>
+    </div>
+</template>
+
+<script>
+  import option from "./config/mainList.json"
+
+   export default {
+        name: "detail",
+      props:{
+          status:{
+            type:String
+          },
+        closeFun:{
+          type:Function
+        }
+      },
+      data(){
+          return {
+            option:option,
+            loading:false,
+            data:[],
+            page: {
+              pageSize: 10,
+              pagerCount: 5,
+              total: 0,
+            },
+          }
+      },
+      created() {
+
+      },
+      methods:{
+        refreshChange(){
+
+        },
+        onLoad(){
+
+        }
+      }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/components/selectComponent/configuration/mainList.json

@@ -37,7 +37,7 @@
             "prop": "cname",
             "search": true,
             "index": 2,
-            "width":100,
+            "width":180,
             "rules": [
                 {
                     "required": true,
@@ -50,7 +50,7 @@
             "prop": "belongtoarea",
             "search": true,
             "index": 4,
-            "width":100,
+            "width":180,
             "rules": [
                 {
                     "required": true,

+ 6 - 8
src/components/selectComponent/customerSelect.vue

@@ -22,11 +22,9 @@
       title="导入客户"
       :visible.sync="dialogVisible"
       class="el-dialogDeep"
-      top="0vh"
-      bottom="2vh"
       append-to-body
       width="80%">
-    <el-row style="margin-top: -5px;height: 0">
+    <el-row style="height: 0">
       <el-col :span="5">
         <div class="box">
           <el-scrollbar>
@@ -209,9 +207,12 @@ export default {
       })
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
-        console.log(res.data.data.total)
         this.page.total = res.data.data.total
-        console.log(this.page)
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 500;
+        } else {
+          this.option.height = window.innerHeight - 200;
+        }
       })
     },
     //树桩列点击展开触发
@@ -228,9 +229,6 @@ export default {
 <style scoped lang="scss">
 .el-dialogDeep {
   ::v-deep .el-dialog {
-    margin: 1vh auto 0 !important;
-    padding-bottom: 10px !important;
-
     .el-dialog__body, .el-dialog__footer {
       padding-bottom: 0 !important;
       padding-top: 0 !important;

+ 2 - 2
src/page/index/tags.vue

@@ -142,10 +142,10 @@ import {clearCache} from "@/api/user";
             if(tag.label=="国内发货单"){
             this.$store.commit("IN_OUT_DETAIL");
           }
-            if(tag.label=="发货单"){
+            if(tag.label=="发货单(I)"){
             this.$store.commit("GO_OUT_DETAIL");
           }
-          if(tag.label=="收货单"){
+          if(tag.label=="收货单(I)"){
             this.$store.commit("TAKE_OUT_DETAIL");
           }
           if(tag.label=="付款管理"){

+ 1 - 1
src/router/axios.js

@@ -17,7 +17,7 @@ import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 
 //默认超时时间
-axios.defaults.timeout = 10000;
+axios.defaults.timeout = 120000;
 //返回其他状态码
 axios.defaults.validateStatus = function (status) {
   return status >= 200 && status <= 500;

+ 11 - 9
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,
@@ -239,7 +241,7 @@ export default [{
       children: [
         {
           path: '/purchase/contract/index',
-          name:'采购订单',
+          name:'采购订单(I)',
           meta: {
             i18n: '/purchase/contract/index',
             keepAlive: true
@@ -256,7 +258,7 @@ export default [{
       children: [
         {
           path: '/salesManagement/salesContract/index',
-          name:'销售订单',
+          name:'销售订单(I)',
           meta: {
             i18n: '/salesManagement/salesContract/index',
             keepAlive: true
@@ -273,7 +275,7 @@ export default [{
     children: [
       {
         path: '/importTrade/receipt/index',
-        name:'收货单',
+        name:'收货单(I)',
         meta: {
           i18n: '/importTrade/receipt/index',
           keepAlive: true
@@ -290,7 +292,7 @@ export default [{
     children: [
       {
         path: '/importTrade/invoice/index',
-        name:'发货单',
+        name:'发货单(I)',
         meta: {
           i18n: 'importTrade/invoice/index',
           keepAlive: true

+ 2 - 1
src/views/basicData/commodityCategory/index.vue

@@ -169,12 +169,13 @@ export default {
       customerList(values).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        console.log()
       })
     },
     //树桩列点击展开触发
     treeLoad(tree, treeNode, resolve) {
       const parentId = tree.id;
-      customerList({parentId:parentId}).then(res => {
+      customerList({parentId:parentId,size:10000}).then(res => {
         resolve(res.data.data.records);
       });
     },

+ 3 - 2
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -638,7 +638,6 @@ export default {
     },
     //修改提交触发
     editCustomer() {
-      console.log(this.form);
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.corpsAttnList = this.contactsData;
@@ -648,7 +647,9 @@ export default {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",");
           }
           this.disabled = true;
-          this.form.belongtoarea = this.form.belongtoarea.toString();
+          if(this.form.belongtoarea){
+            this.form.belongtoarea = this.form.belongtoarea.toString();
+          }
           typeSave(this.form).then(res => {
             if (res.data.data === "error") {
               this.disabled = false;

+ 17 - 1
src/views/basicData/customerInformation/index.vue

@@ -85,7 +85,8 @@
                    width="555px"
                    v-dialog-drag
         >
-          <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
+          <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading"
+                     :upload-before="uploadBefore" :upload-after="uploadAfter">
             <template slot="excelTemplate">
               <el-button type="primary" @click="derivation">
                 点击下载<i class="el-icon-download el-icon--right"></i>
@@ -153,6 +154,7 @@ export default {
         total: 0
       },
       excelBox: false,
+      excelLoading:false,
       excelForm: {},
       excelOption: {
         submitBtn: false,
@@ -187,14 +189,28 @@ export default {
   created() {
 
   },
+  // watch:{
+  //   'excelForm.isCovered'() {
+  //     if (this.excelForm.isCovered !== '') {
+  //       const column = this.findObject(this.excelOption.column, "excelFile");
+  //       column.action = `/api/blade-user/import-user?isCovered=${this.excelForm.isCovered}`;
+  //     }
+  //   }
+  // },
   methods: {
     derivation() {
       window.open(`/api/blade-client/corpsdesc/export-template?${this.website.tokenHeader}=${getToken()}`);
     },
+    uploadBefore(file,done,loading){
+      done();
+      loading = true
+    },
     uploadAfter(res, done, loading, column) {
       window.console.log(column);
       this.excelBox = false;
+      this.$message.success("导入成功!")
       this.refreshChange();
+      loading = false
       done();
     },
     nodeClick(data) {

+ 27 - 0
src/views/basicData/productInformation/index.vue

@@ -33,6 +33,14 @@
               @click="excelBox = true"
             >导入
             </el-button>
+            <el-button
+              type="warning"
+              size="small"
+              :disabled="selectionList.length==0"
+              icon="el-icon-delete"
+              @click="batchDelete"
+            >批量删除
+            </el-button>
           </template>
           <template slot-scope="scope" slot="menu">
 <!--            <el-button-->
@@ -243,6 +251,25 @@ export default {
         loading();
       });
     },
+    //批量删除
+    batchDelete(){
+      this.$confirm("确定批量删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(()=>{
+        let batchDeleteList =  this.selectionList.map(item =>{
+          return  item.id
+        })
+        remove(batchDeleteList.join(",")).then(res =>{
+          if(res.data.success){
+            this.$message.success("删除成功!")
+            this.refreshChange()
+          }
+        })
+      })
+
+    },
     //查看跳转页面
     beforeOpenPage(row, index) {
       this.$router.push({

+ 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) {

+ 18 - 13
src/views/importTrade/receipt/config/customerContact.json

@@ -25,10 +25,9 @@
       "prop": "billNo",
       "index": 1,
       "width":150,
-      "cell": true,
       "rules": [
         {
-          "required": true,
+          "required": false,
           "message": " ",
           "trigger": "blur"
         }
@@ -38,10 +37,9 @@
       "prop": "contractNumber",
       "index": 1,
       "width":150,
-      "cell": true,
       "rules": [
         {
-          "required": true,
+          "required": false,
           "message": " ",
           "trigger": "blur"
         }
@@ -60,7 +58,7 @@
       ]
     },{
       "label": "货物详情",
-      "prop": "cname",
+      "prop": "itemDescription",
       "index": 3,
       "width":150,
       "cell": true,
@@ -71,10 +69,17 @@
           "trigger": "blur"
         }
       ]
-    },{
+    },
+    {
+      "label": "箱号",
+      "prop": "containerNo",
+      "index": 4,
+      "width":120
+    },
+   {
       "label": "发票净重(吨)",
       "prop": "invoiceWeight",
-      "index": 4,
+      "index": 6,
       "width":120,
       "cell": true,
       "rules": [
@@ -87,7 +92,7 @@
     },{
       "label": "码单重量(吨)",
       "prop": "billWeight",
-      "index": 5,
+      "index": 7,
       "width":120,
       "cell": true,
       "rules": [
@@ -100,7 +105,7 @@
     },{
       "label": "件数",
       "prop": "actualQuantity",
-      "index": 6,
+      "index": 8,
       "width":120,
       "rules": [
         {
@@ -112,7 +117,7 @@
     },{
       "label": "单价",
       "prop": "price",
-      "index": 7,
+      "index": 9,
       "width":120,
       "rules": [
         {
@@ -124,7 +129,7 @@
     },{
       "label": "合同金额",
       "prop": "contractAmount",
-      "index": 8,
+      "index": 9,
       "width":120,
       "rules": [
         {
@@ -136,7 +141,7 @@
     },{
       "label": "税率",
       "prop": "taxRate",
-      "index": 9,
+      "index": 10,
       "width":120,
       "cell": true,
       "rules": [
@@ -149,7 +154,7 @@
     },{
       "label": "备注",
       "prop": "remarks",
-      "index": 10,
+      "index": 11,
       "width":150,
       "cell": true,
       "rules": [

+ 210 - 51
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -6,6 +6,11 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
+      <el-button type="primary"
+                 class="el-button--small-yh add-customer-btn-three"
+                 :disabled="!form.id"
+                 @click.stop="confirmReceipt">确认收货
+      </el-button>
       <el-button type="success"
                  class="el-button--small-yh add-customer-btn-two"
                  :disabled="true"
@@ -28,7 +33,9 @@
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="请选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
-                <selectComponent v-else-if="item.prop === 'salesCompany'" v-model="form[item.prop]" :configuration="sConfiguration"/>
+                <el-select v-else-if="item.prop === 'storageId'" style="width: 100%"   v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
+                  <el-option v-for="(item,index) in storageIdDic" :key="index" :label="item.cname" :value="item.id"></el-option>
+                </el-select>
                 <el-input type="textarea" v-else-if="(item.prop === 'deliveryRemarks')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input v-else v-model="form[item.prop]" size="small" :disabled="item.disabled?true:false" placeholder="请输入" autocomplete="off"></el-input>
               </el-form-item>
@@ -69,6 +76,61 @@
               ></el-input>
               <span v-else>{{ row.actualQuantity }}</span>
             </template>
+            <template slot-scope="{row}" slot="billNo">
+              <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.billNo"
+                style="width: 90%"
+                placeholder=" "
+                size="small"
+                @change="bingOut(row)"
+              ></el-input>
+              <span v-else>{{ row.billNo }}</span>
+            </template>
+            <template slot-scope="{row}" slot="contractNumber">
+              <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
+              <el-select
+                v-if="row.$cellEdit"
+                style="width:90%"
+                v-model="row.contractNumber"
+                placeholder=" "
+                size="small"
+                clearable
+                filterable
+              >
+                <el-option
+                  style="width:90%"
+                  v-for="(item,index) in contractDic"
+                  :key="index"
+                  :label="item.orderNo"
+                  :value="item.orderNo"
+                ></el-option>
+              </el-select>
+              <span v-else>{{ row.contractNumber }}</span>
+            </template>
+            <template slot="invoiceWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.invoiceWeight"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+                @input="totalChange(row.invoiceWeight)"
+              ></el-input>
+              <span v-else>{{ row.invoiceWeight }}</span>
+            </template>
+            <template slot="billWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.billWeight"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+                @input="totalChange(row.billWeight)"
+              ></el-input>
+              <span v-else>{{ row.billWeight }}</span>
+            </template>
             <template slot="priceCategory" slot-scope="{row,index}">
               <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
               <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
@@ -140,11 +202,26 @@
       <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="commodityConfirm" v-if="selectKind != -1"  :disabled="tableData.length !== 1">确定</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>
-          <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"
-                     :disabled="tableData.length !== 1">导入</el-button>
+<!--          <el-button type="primary" @click="importGoods" v-if="commodityData !== true  && selectKind == -1" :disabled="tableData.length !== 1" >导入</el-button>-->
+<!--          <el-button type="primary" @click="importChoice" v-if="commodityData === true  && selectKind == -1"-->
+<!--                     :disabled="tableData.length !== 1">导入</el-button>-->
         </span>
     </el-dialog>
+    <el-dialog
+      title="导入采购"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="procurementDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false">
+      <procurement-detail
+        :status="132"
+        :closeFun="procurementClose"
+      >
+      </procurement-detail>
+    </el-dialog>
   </div>
 </template>
 
@@ -155,13 +232,19 @@ import {getSysNo} from "@/api/importTrade/purchase";
 import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
 import {detailReceiptList,
   submitReceiptList,
-  removeGoodsItem,} from "@/api/importTrade/receipt"
+  removeGoodsItem,
+  getStorage,
+  getInventory,
+  confirmReceipt
+} from "@/api/importTrade/receipt"
 import {
   getList
 } from "@/api/basicData/deliveryNotice"
 import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 import {detailListData } from "@/api/importTrade/purchase";
 import { contrastObj,contrastList } from "@/util/contrastData";
+import { getOrgOrderNo } from "@/api/importTrade/salesContract"
+import { procurementDetail } from "@/components/procurement/procurementDetail";
 
 export default {
   name: "detailsPageEdit",
@@ -170,6 +253,9 @@ export default {
       type: Object
     }
   },
+  components:{
+    procurementDetail
+  },
   data() {
     return {
       form: {},
@@ -177,6 +263,7 @@ export default {
       customerContact: customerContact,
       contactsForm: {},
       contactsData: [],
+      contractDic:[],
       selectKind:-1,
       configuration:{
         multipleChoices:false,
@@ -187,15 +274,6 @@ export default {
         placeholder:'请点击右边按钮选择',
         dicData:[]
       },
-      sConfiguration:{
-        multipleChoices:false,
-        multiple:false,
-        disabled:false,
-        searchShow:true,
-        collapseTags:false,
-        placeholder:'请点击右边按钮选择',
-        dicData:[]
-      },
       basicData: {
         column: [
           {
@@ -204,7 +282,7 @@ export default {
             disabled:true,
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -214,7 +292,7 @@ export default {
             prop: 'orderNo',
             rules: [
               {
-                required: true,
+                required: false,
                 message: ' ',
                 trigger: 'blur'
               }
@@ -230,29 +308,31 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '销售公司',
-            prop: 'salesCompany',
+          },  {
+            label: '供应商',
+            prop: 'corpId',
             dicData: [],
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '工厂/贸易商名称',
-            prop: 'corpId',
+          },
+          {
+            label: '仓库名称',
+            type:'select',
+            prop: 'storageId',
             dicData: [],
             rules: [
               {
-                required: false,
+                required: true,
                 message: ' ',
                 trigger: 'blur'
               }
             ]
-          }, {
+          },{
             label: '收货日期',
             prop: 'businessDate',
             type:'datetime',
@@ -263,10 +343,10 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },{
-            label: '仓库名称',
-            prop: 'storageId',
-            dicData: [],
+          },  {
+            label: '发票重量',
+            prop: 'invoiceWeight',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -274,9 +354,11 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },  {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+          },
+          {
+            label: '码单重量',
+            prop: 'billWeight',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -284,7 +366,8 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
+          },
+          {
             label: '备注',
             prop: 'deliveryRemarks',
             span: 24,
@@ -297,6 +380,7 @@ export default {
       //上传文件
       upLoadOption: upLoadOption,
       upLoadData:[],
+      storageIdDic:[],
       upLoadForm:{},
       dialogVisible: false,
       treeOption: {
@@ -334,6 +418,8 @@ export default {
       },
       commodityData: false,
       tableData: [],
+      //
+      procurementDialog:false,
       //新旧数据对比
       oldForm:{},
       oldContactsData:[],
@@ -341,13 +427,17 @@ export default {
     }
   },
   created() {
+    getStorage().then(res =>{
+      this.storageIdDic = res.data
+    })
     if (this.detailData.id) {
       let id = this.detailData.id.replace(/\"/g, "")
       detailReceiptList(id).then(res => {
         this.form = res.data.data;
         this.oldForm = Object.assign({},res.data.data);
-        this.configuration.dicData = this.form.companyName
-        this.sConfiguration.dicData = this.form.salesCompanyNameList
+        if(this.form.companyName){
+          this.configuration.dicData = this.form.companyName
+        }
         if(this.form.deliveryItemsList){
           this.contactsData = this.form.deliveryItemsList
           this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
@@ -357,17 +447,22 @@ export default {
           this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
         }
       })
-    }else{
-      getSysNo("JK-SH").then(res =>{
-        this.$set(this.form,"sysNo", res.data.data)
-      })
     }
+    // else{
+    //   getSysNo("JK-SH").then(res =>{
+    //     this.$set(this.form,"sysNo", res.data.data)
+    //   })
+    // }
     if(this.detailData.params){
       detailListData(this.detailData.params.id).then(res =>{
-        this.form.orderNo =  res.data.data.orderNo;
+        // this.form.orderNo =  res.data.data.orderNo;
+        // this.form.saleman =  res.data.data.salesName;
+        // this.configuration.dicData = res.data.data.corpsName
+        // this.form.corpId = res.data.data.corpsName[0].cname
         res.data.data.itemsVOList.forEach((item,index) =>{
           this.detailData.params.orderItemIds.forEach((e,i) =>{
             if(e ==  index){
+              item.srcId =  item.id;
               item.contractNumber =  res.data.data.orderNo;
               item.actualQuantity =  item.purchaseQuantity;
               item.contractAmount =  item.amount;
@@ -377,14 +472,35 @@ export default {
             }
           })
         })
-        res.data.data.orderNo = this.form.orderNo
-      })
-      getSysNo("JK-SH").then(res =>{
-        this.$set(this.form,"sysNo", res.data.data)
       })
     }
   },
   methods: {
+    //合计
+    totalChange(){
+      let invoiceList =  this.contactsData.map(item => {
+        if(!item.invoiceWeight){
+          item.invoiceWeight = 0
+        }
+        return parseFloat(item.invoiceWeight);
+      });
+      let billList =  this.contactsData.map(item => {
+        if(!item.billWeight){
+          item.billWeight = 0
+        }
+        return parseFloat(item.billWeight);
+      });
+      this.form.invoiceWeight = invoiceList.reduce((n,m) => n + m)
+      this.form.billWeight = billList.reduce((n,m) => n + m)
+    },
+    //提单号带出合同号
+    bingOut(row){
+      getOrgOrderNo(row.billNo).then(res =>{
+        if(res.data){
+          this.contractDic = res.data;
+        }
+      })
+    },
     //单价
     priceChange(row) {
       if (!row.price) {
@@ -463,12 +579,11 @@ export default {
           };
           submitReceiptList(submitDto).then(res => {
             if(res.data.success){
-              this.$message.success("操作成功!")
+              this.$message.success("保存成功!")
               detailReceiptList(res.data.data.id).then(res => {
                 this.form = res.data.data;
                 this.oldForm = Object.assign({},res.data.data);
                 this.configuration.dicData = this.form.companyName
-                this.sConfiguration.dicData = this.form.salesCompanyNameList
                 if(this.form.deliveryItemsList){
                   this.contactsData = this.form.deliveryItemsList
                   this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
@@ -488,6 +603,30 @@ export default {
         }
       });
     },
+    //确认收货
+    confirmReceipt(){
+      if(contrastObj(this.form,this.oldForm) || contrastList(this.contactsData,this.oldContactsData)
+        || contrastList(this.upLoadData,this.oldUpLoadData)
+      ){
+        this.$confirm("请先保存在进行收货?", {
+          confirmButtonText: "保存",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(()=>{
+          this.editCustomer()
+        })
+      }else{
+        this.$confirm("是否确认全部收货?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(()=>{
+          this.form.deliveryItemsList = this.contactsData;
+          confirmReceipt(this.form).then(res =>{
+          })
+        })
+      }
+    },
     //上传文件保存
     upLoadSave(row, done, loading){
       this.upLoadData.push(row)
@@ -531,10 +670,19 @@ export default {
     //选择货品
     commodityConfirm(){
       if(this.tableData){
-        this.importInventoryData[this.selectKind].priceCategory = this.tableData[0].id;
-        this.$set(this.importInventoryData[this.selectKind],'priceCategoryNames',this.tableData[0].cname)
+        this.contactsData[this.selectKind].priceCategory = this.tableData[0].id;
+        this.contactsData[this.selectKind].itemDescription = this.tableData[0].cnameDescription;
+        this.$set(this.contactsData[this.selectKind],'priceCategoryNames',this.tableData[0].cname)
+        // let  params = {
+        //   corpId : this.form.corpId,
+        //   storageId: this.form.storageId,
+        //   goodId:  this.contactsData[this.selectKind].priceCategory,
+        //   cntrNo: this.contactsData[this.selectKind].containerNo ,
+        //   billNo: this.contactsData[this.selectKind].billNo ,
+        //   contractNumber:  this.contactsData[this.selectKind].contractNumber,
+        // }
         this.dialogVisible = !this.dialogVisible
-        this.selectKind = -1
+        this.selectKind = -1;
       }
     },
     //点击商品明细选择触发
@@ -545,8 +693,10 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      this.dialogVisible = !this.dialogVisible
-      this.commodityData = false
+      this.procurementDialog = true;
+      // this.$refs.crudContact.rowCellAdd();
+      // this.dialogVisible = !this.dialogVisible
+      // this.commodityData = false
     },
     //导入页左商品类型查询
     nodeClick(data) {
@@ -670,6 +820,12 @@ export default {
   top: 115px;
 }
 
+.add-customer-btn-three {
+  position: fixed;
+  right: 266px;
+  top: 115px;
+}
+
 .el-dialogDeep {
   ::v-deep .el-dialog {
     margin: 1vh auto 0 !important;
@@ -681,4 +837,7 @@ export default {
     }
   }
 }
+::v-deep .el-form-item__content{
+  line-height: 32px;
+}
 </style>

+ 16 - 4
src/views/purchase/contract/config/customerContact.json

@@ -48,7 +48,7 @@
       ]
     },{
       "label": "货物详情",
-      "prop": "cname",
+      "prop": "itemDescription",
       "index": 3,
       "width":180,
       "cell": true,
@@ -72,12 +72,25 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "已发数量",
+      "prop": "actualQuantity",
+      "index": 4,
+      "width":100,
+      "cell": true,
+      "rules": [
+        {
+          "required": false,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
     },{
       "label": "发票净重(吨)",
       "prop": "invoiceWeight",
       "index": 5,
       "width":120,
-      "cell": true,
       "rules": [
         {
           "required": false,
@@ -89,8 +102,7 @@
       "label": "码单重量(吨)",
       "prop": "billWeight",
       "index": 6,
-      "width":120,
-      "cell": true
+      "width":120
     },{
       "label": "件数",
       "prop": "purchaseQuantity",

+ 81 - 8
src/views/purchase/contract/detailsPage.vue

@@ -41,8 +41,8 @@
                 <el-select v-else-if="item.prop === 'orderType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in contractTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
-                <el-select v-else-if="item.prop === 'currency'" style="width: 100%"   v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
-                  <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
+                <el-select v-else-if="item.prop === 'currency'" style="width: 100%"    v-model="form[item.prop]" size="small" placeholder="请选择" @change="currencyChange" clearable filterable>
+                  <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
                 </el-select>
                 <el-select v-else-if="item.prop === 'paymentType'"  style="width: 100%"  v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in paymentTypeDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
@@ -89,6 +89,32 @@
               ></el-input>
               <span v-else>{{ row.purchaseQuantity }}</span>
             </template>
+            <template slot="invoiceWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.invoiceWeight"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+                @input="totalChange(row.invoiceWeight)"
+              ></el-input>
+              <span v-else>{{ row.invoiceWeight }}</span>
+            </template>
+            <template slot="billWeight" slot-scope="{ row }">
+              <el-input
+                v-if="row.$cellEdit"
+                v-model="row.billWeight"
+                placeholder="请输入"
+                size="small"
+                oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+                @input="totalChange(row.billWeight)"
+              ></el-input>
+              <span v-else>{{ row.billWeight }}</span>
+            </template>
+            <template slot="priceCategory" slot-scope="{row,index}">
+              <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
+              <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                 type="text"
@@ -122,10 +148,11 @@
                          @click="applicationDialog = true,applicationData = contactsData"
               >查看申请记录
               </el-button>
-            </template>
-            <template slot="priceCategory" slot-scope="{row,index}">
-              <span style="margin-left: 12px;padding-top: 2px">{{ row.priceCategoryNames }}</span>
-              <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
+              <el-button type="info"
+                         size="small"
+                         @click=""
+              >审批流
+              </el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -511,6 +538,7 @@ export default {
           }, {
             label: '汇率',
             prop: 'exchangeRate',
+            disabled: true,
           }, {
             label: '人民币金额',
             prop: 'rmbAmount',
@@ -566,7 +594,18 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },   {
+          },  {
+            label: '发票重量',
+            prop: 'invoiceWeight',
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },  {
             label: '码单重量',
             prop: 'billWeight',
             disabled: true,
@@ -642,6 +681,34 @@ export default {
         row.amount = (row.purchaseQuantity * row.price).toFixed(2);
       }
     },
+    currencyChange(value){
+      if(this.form.orderAmount){
+        if(value === "人民币"){
+          this.form.exchangeRate = 1
+          this.form.rmbAmount = this.form.orderAmount
+        }else{
+          this.form.exchangeRate = 6.3843
+          this.form.rmbAmount = this.form.orderAmount * 6.3843
+        }
+      }
+    },
+    //合计
+    totalChange(){
+      let invoiceList =  this.contactsData.map(item => {
+        if(!item.invoiceWeight){
+          item.invoiceWeight = 0
+        }
+        return parseFloat(item.invoiceWeight);
+      });
+      let billList =  this.contactsData.map(item => {
+        if(!item.billWeight){
+          item.billWeight = 0
+        }
+        return parseFloat(item.billWeight);
+      });
+      this.form.invoiceWeight = invoiceList.reduce((n,m) => n + m)
+      this.form.billWeight = billList.reduce((n,m) => n + m)
+    },
     //件数
     quantityChange(row) {
       if (!row.purchaseQuantity) {
@@ -843,7 +910,13 @@ export default {
     },
     //商品新增触发
     commoditySelection() {
-      this.$refs.crudContact.rowCellAdd();
+      const params ={
+        billWeight:0,
+        invoiceWeight:0,
+        price:0,
+        purchaseQuantity:0,
+      }
+      this.$refs.crudContact.rowCellAdd(params);
       // this.dialogVisible = !this.dialogVisible
       // this.commodityData = false
     },

+ 1 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -249,7 +249,7 @@
           multipleChoices:false,
           multiple:false,
           disabled:false,
-          searchShow:false,
+          searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
           dicData:[]

+ 1 - 0
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -338,6 +338,7 @@
         if(this.id){
           projectDetail(this.id,"4,5").then(res =>{
             this.form = res.data.data;
+            this.configuration.dicData   = res.data.data.corpName
             if(res.data.data.itemList){
               this.loading = true;
               this.dataList = res.data.data.itemList;

+ 5 - 0
src/views/workManagement/task/configuration/mainList.json

@@ -35,6 +35,11 @@
       "width": 120
     },
     {
+      "label": "客户名称",
+      "prop": "cornName",
+      "width": 220
+    },
+    {
       "label": "服务项目",
       "prop": "pname",
       "search": true,