Browse Source

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

QuKatie 3 years ago
parent
commit
fe3b3bf807

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

@@ -130,3 +130,11 @@ export function getSysNo(prefix){
     }
   })
 }
+//生成收货单
+export function generateShipment(data) {
+  return request({
+    url: '/api/blade-purchase-sales/order/deliverGoods',
+    method: 'post',
+    data:data
+  })
+}

+ 1 - 0
src/components/selectComponent/customerSelect.vue

@@ -18,6 +18,7 @@
     <el-button slot="append" icon="el-icon-edit" size="mini" @click="dialogVisible = true"
                :disabled="disabled?disabled:false"></el-button>
   <el-dialog
+    v-dialogdrag
       title="导入客户"
       :visible.sync="dialogVisible"
       class="el-dialogDeep"

+ 1 - 0
src/views/businessManagement/deliveryNotice/configuration/bankOfDeposit.json

@@ -1,5 +1,6 @@
 {
   "lazy": true,
+  "addBtnText": "录入明细",
   "tip": false,
   "simplePage": true,
   "searchShow": true,

+ 7 - 9
src/views/businessManagement/deliveryNotice/configuration/mainList.json

@@ -33,13 +33,11 @@
             "label": "单据状态",
             "prop": "status",
             "type": "select",
-            "dicData":[{
-                "label":"正常",
-                "value":0
-            },{
-                "label":"停用",
-                "value":1
-            }],
+            "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
+            "props": {
+              "label": "dictValue",
+              "value": "dictValue"
+            },
             "search": true,
             "index": 2,
             "width":100
@@ -83,8 +81,8 @@
             "type": "date",
             "unlinkPanels": true,
             "searchRange": true,
-        "format": "yyyy-MM-dd",
-        "valueFormat": "yyyy-MM-dd",
+            "format": "yyyy-MM-dd",
+            "valueFormat": "yyyy-MM-dd",
             "label": "出库日期",
             "prop": "businessDate",
             "search": true,

+ 104 - 9
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -32,10 +32,25 @@
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled"/>
                 <selectComponent v-else-if="item.prop === 'corpId' || item.prop === 'salesCompany'" v-model="form[item.prop]"
-                                 :configuration="configuration"/>
-                <el-select v-else-if="item.prop === 'deliveryStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%">
+                                 :configuration="configuration" style="width: 100%"/>
+                <el-select v-else-if="item.prop === 'deliveryStatus'" 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" size="small"></el-option>
                 </el-select>
+                <avue-input-tree
+                  v-else-if="item.prop === 'warehouseType'"
+                  leaf-only
+                  placeholder="请选择内容"
+                  :dic="warehouseType"
+                  type="tree"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                  size="small"
+                  @change="warehouseTreeChange"
+                >
+                </avue-input-tree>
+                <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="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
             </el-col>
@@ -70,7 +85,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="commoditySelection"
-              >新增
+              >录入明细
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -111,7 +126,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="costIncrease"
-              >新增
+              >录入明细
               </el-button>
             </template>
           </avue-crud>
@@ -229,6 +244,8 @@ import bankOfDeposit from "./configuration/bankOfDeposit.json"
 import commodity from "./configuration/commodity.json"
 import optionTwoCost from "./configuration/mainListCost.json"
 import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
+import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
+import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
 
 export default {
   name: "detailsPage",
@@ -377,8 +394,8 @@ export default {
               }
             ]
           }, {
-            label: '匹配订单号',
-            prop: 'srcOrderNo',
+            label: '仓库类型',
+            prop: 'warehouseType',//字典表
             rules: [
               {
                 required: true,
@@ -396,9 +413,9 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '仓库类型',
-            prop: 'warehouseType',//字典表
+          },{
+            label: '匹配订单号',
+            prop: 'srcOrderNo',
             rules: [
               {
                 required: true,
@@ -470,6 +487,12 @@ export default {
         ]
       },
       statusOption: [],
+      // 仓库类型
+      warehouseType: [],
+      // 仓库名称
+      warehouseName: [],
+      maxFeeNum: 0,
+      maxGoodsNum: 0,
     }
   },
   //初始化查询
@@ -477,6 +500,33 @@ export default {
     this.getWorkDicts("order_status").then(res => {
       this.statusOption = res.data.data
     })
+    wareHouseType().then(res => {
+      this.warehouseType = res.data.data.records
+      this.warehouseType.forEach(item => {
+        this.$set(item, 'label', item.cname)
+        this.$set(item, 'value', item.id)
+        if (item.hasChildren) {
+          this.$set(item, 'children', [])
+        }
+      })
+      let result = [], temp = {}
+      for(let i = 0; i < this.warehouseType.length;i++) {
+        temp[this.warehouseType[i].id] = this.warehouseType[i]
+      }
+      for (let j = 0;j < this.warehouseType.length;j++) {
+        let current = this.warehouseType[j]
+        let tempCurrentParent = temp[current.parentId]
+        if (tempCurrentParent) {
+          if (!tempCurrentParent["children"]) {
+            tempCurrentParent["children"] = []
+          }
+          tempCurrentParent["children"].push(current)
+        } else {
+          result.push(current)
+        }
+      }
+      this.warehouseType = result
+    });
     if (this.detailData.id) {
       let id = this.detailData.id
       this.queryData(id)
@@ -536,6 +586,29 @@ export default {
         delete this.form.deliveryFilesList
         delete this.form.corpName
         delete this.form.companyName
+        // 获取最大值
+        let num = []
+        this.advantageProjectData.forEach(item => {
+          num.push(item.sort)
+        })
+        if (num.length == 0) {
+          this.maxFeeNum = 0;
+        } else {
+          this.maxFeeNum = num.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
+        let goodsNum = []
+        this.contactsData.forEach(item => {
+          goodsNum.push(item.sort)
+        })
+        if (goodsNum.length == 0) {
+          this.maxGoodsNum = 0;
+        } else {
+          this.maxGoodsNum = goodsNum.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
         if (isCopy) {
           delete this.form.sysNo
           delete this.form.id
@@ -554,6 +627,24 @@ export default {
         }
       });
     },
+    // 类别变换时触发
+    warehouseTreeChange(id) {
+      this.warehouseName = []
+      if (this.firstComing) {
+        if (!this.form.storageId) {
+          this.$set(this.form, 'storageId', null)
+        } else {
+          this.form.storageId = null
+        }
+      }
+      let data =  {
+        storageTypeId: id
+      }
+      selectWareHouse(data).then(res => {
+        this.warehouseName = res.data.data.records
+      })
+      this.firstComing = true
+    },
     //点击行可编辑
     handleRowClick(row, event, column) {
       console.log(row.$index)
@@ -623,6 +714,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.tableDataCost[item].sort = this.maxFeeNum + 1
+          this.maxFeeNum++
           delete this.tableDataCost[item].id
           this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
           this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
@@ -643,6 +736,8 @@ export default {
           delete this.tableData[item].id
           delete this.tableData[item].status
           delete this.tableData[item].isDeleted
+          this.tableData[item].sort = this.maxGoodsNum + 1
+          this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           console.log(this.contactsData)
           this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)

+ 13 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -212,7 +212,19 @@ export default {
     refreshChange() {
       console.log('1')
     },
-    onLoad(page, params = {parentId: 0}) {
+    onLoad(page, params) {
+      if (params) {
+        if (params.businessDate) {
+          params.businessStartDate = params.businessDate[0]+ " " + "00:00:00"
+          params.businessEndDate = params.businessDate[1]+ " " + "23:59:59"
+          this.$delete(params,'businessDate')
+        }
+        if (params.createTime) {
+          params.createStartTime = params.createTime[0]+ " " + "00:00:00"
+          params.createEndTime = params.createTime[1]+ " " + "23:59:59"
+          this.$delete(params,'createTime')
+        }
+      }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,

+ 1 - 0
src/views/businessManagement/purchaseOrder/configuration/bankOfDeposit.json

@@ -1,5 +1,6 @@
 {
   "lazy": true,
+  "addBtnText": "录入明细",
   "tip": false,
   "simplePage": true,
   "searchShow": true,

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

@@ -46,7 +46,7 @@
             "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
             "props": {
               "label": "dictValue",
-              "value": "dictKey"
+              "value": "dictValue"
             },
             "label": "付款方式",
             "prop": "paymentType",

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

@@ -35,7 +35,7 @@
                   <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
-                                 :configuration="configuration"/>
+                                 :configuration="configuration" style="width: 100%"/>
                 <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>
@@ -52,6 +52,7 @@
               @row-click="handleRowClick"
               @row-update="rowUpdate"
               @row-del="rowDel"
+              @selection-change="productSelection"
           >
             <template slot="orderQuantity" slot-scope="{ row }">
               <el-input
@@ -88,7 +89,13 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="commoditySelection"
-              >新增
+              >录入明细
+              </el-button>
+              <el-button type="warning"
+                         icon="el-icon-plus"
+                         size="small"
+                         :disabled="selection.length < 1"
+                         @click="generateShipmentC">生成发货单
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -129,7 +136,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="costIncrease"
-              >新增
+              >录入明细
               </el-button>
             </template>
           </avue-crud>
@@ -373,7 +380,8 @@ import {
   corpsitem,
   getList,
   getDeptLazyTreeS,
-  getSysNo
+  getSysNo,
+  generateShipment
 } from "@/api/basicData/purchaseOrder"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
@@ -591,6 +599,9 @@ export default {
         ]
       },
       paymentOption: [],
+      maxFeeNum: 0,
+      maxGoodsNum: 0,
+      selection: [],
     }
   },
   //初始化查询
@@ -648,6 +659,29 @@ export default {
         delete this.form.orderFeesList
         delete this.form.orderFilesList
         delete this.form.corpsName
+        // 获取最大值
+        let num = []
+        this.advantageProjectData.forEach(item => {
+          num.push(item.sort)
+        })
+        if (num.length == 0) {
+          this.maxFeeNum = 0;
+        } else {
+          this.maxFeeNum = num.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
+        let goodsNum = []
+        this.contactsData.forEach(item => {
+          goodsNum.push(item.sort)
+        })
+        if (goodsNum.length == 0) {
+          this.maxGoodsNum = 0;
+        } else {
+          this.maxGoodsNum = goodsNum.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
         if (isCopy) {
           delete this.form.sysNo;
           delete this.form.id
@@ -672,6 +706,39 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    //生成收货单
+    generateShipmentC() {
+      let lsit = []
+      for (let item in this.selection) {
+        if (!this.selection[item].id) {
+          return this.$confirm('商品信息有未保存数据, 是否立即保存?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.editCustomer(false)
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消'
+            });
+          });
+        } else {
+          lsit.push(this.selection[item].id)
+        }
+      }
+      let data = {
+        id: this.form.id,
+        orderItemIds: lsit
+      }
+      generateShipment(data).then(res => {
+        console.log(res.data.data)
+        this.$router.push({
+          path: "/businessManagement/receipt/index",
+          query: {form: JSON.stringify(res.data.data)},
+        });
+      })
+    },
     //点击行可编辑
     handleRowClick(row, event, column) {
       console.log(row.$index)
@@ -686,6 +753,10 @@ export default {
       console.log(row)
       this.$refs.crudProject.rowCell(row, index)
     },
+    //商品选中触发
+    productSelection(selection) {
+      this.selection = selection
+    },
     //费用新增触发
     costIncrease() {
       this.dialogCost = !this.dialogCost
@@ -746,6 +817,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.tableDataCost[item].sort = this.maxFeeNum + 1
+          this.maxFeeNum++
           delete this.tableDataCost[item].id
           this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
           this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
@@ -766,6 +839,8 @@ export default {
           this.$set(this.tableData[item], 'orderQuantity', 0)
           this.tableData[item].price = 0
           this.tableData[item].amount = 0
+          this.tableData[item].sort = this.maxGoodsNum + 1
+          this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
         }

+ 1 - 0
src/views/businessManagement/receipt/configuration/bankOfDeposit.json

@@ -1,5 +1,6 @@
 {
   "lazy": true,
+  "addBtnText": "录入明细",
   "tip": false,
   "simplePage": true,
   "searchShow": true,

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

@@ -28,7 +28,7 @@
             "dicUrl": "/api/blade-system/dict-biz/dictionary?code=procurement_method",
             "props": {
               "label": "dictValue",
-              "value": "dictKey"
+              "value": "dictValue"
             },
             "label": "采购方式",
             "prop": "purchaseMode",

+ 132 - 8
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -32,10 +32,25 @@
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <selectComponent v-else-if="item.prop === 'corpId' || item.prop === 'salesCompany'" v-model="form[item.prop]"
-                                 :configuration="configuration"/>
+                                 :configuration="configuration" style="width: 100%"/>
                 <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in procurementMethodOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
+                <avue-input-tree
+                  v-else-if="item.prop === 'warehouseType'"
+                  leaf-only
+                  placeholder="请选择内容"
+                  :dic="warehouseType"
+                  type="tree"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                  size="small"
+                  @change="warehouseTreeChange"
+                >
+                </avue-input-tree>
+                <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="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input>
               </el-form-item>
             </el-col>
@@ -70,7 +85,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="commoditySelection"
-              >新增
+              >录入明细
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -111,7 +126,7 @@
                          icon="el-icon-plus"
                          size="small"
                          @click="costIncrease"
-              >新增
+              >录入明细
               </el-button>
             </template>
           </avue-crud>
@@ -362,6 +377,8 @@ import bankOfDeposit from "./configuration/bankOfDeposit.json"
 import commodity from "./configuration/commodity.json"
 import optionTwoCost from "./configuration/mainListCost.json"
 import {getDeptLazyTree, customerList,getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
+import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
+import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
 
 export default {
   name: "detailsPage",
@@ -509,9 +526,9 @@ export default {
                 trigger: 'blur'
               }
             ]
-          }, {
-            label: '匹配订单号',
-            prop: 'srcOrderNo',
+          },{
+            label: '仓库类型',
+            prop: 'warehouseType',//字典表
             rules: [
               {
                 required: true,
@@ -530,6 +547,16 @@ export default {
               }
             ]
           }, {
+            label: '匹配订单号',
+            prop: 'srcOrderNo',
+            rules: [
+              {
+                required: true,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },{
             label: '入库金额',
             prop: 'deliveryAmount',
             rules: [
@@ -591,7 +618,16 @@ export default {
         ]
       },
       statusOption: [],
-      procurementMethodOption: []
+      procurementMethodOption: [],
+      // 仓库类型
+      warehouseType: [],
+      // 仓库名称
+      warehouseName: [],
+      // 第一次进入
+      firstComing: false,
+      // 费用信息排序的最大值
+      maxFeeNum: 0,
+      maxGoodsNum: 0,
     }
   },
   //初始化查询
@@ -599,12 +635,56 @@ export default {
     this.getWorkDicts("procurement_method").then(res => {
       this.procurementMethodOption = res.data.data
     })
+    wareHouseType().then(res => {
+      this.warehouseType = res.data.data.records
+      this.warehouseType.forEach(item => {
+        this.$set(item, 'label', item.cname)
+        this.$set(item, 'value', item.id)
+        if (item.hasChildren) {
+          this.$set(item, 'children', [])
+        }
+      })
+      let result = [], temp = {}
+      for(let i = 0; i < this.warehouseType.length;i++) {
+        temp[this.warehouseType[i].id] = this.warehouseType[i]
+      }
+      for (let j = 0;j < this.warehouseType.length;j++) {
+        let current = this.warehouseType[j]
+        let tempCurrentParent = temp[current.parentId]
+        if (tempCurrentParent) {
+          if (!tempCurrentParent["children"]) {
+            tempCurrentParent["children"] = []
+          }
+          tempCurrentParent["children"].push(current)
+        } else {
+          result.push(current)
+        }
+      }
+      this.warehouseType = result
+    });
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     }else if (this.detailData.form){
+      console.log(this.detailData.form)
       this.form = JSON.parse(this.detailData.form);
+      delete this.form.createTime
+      delete this.form.id
+      delete this.form.sysNo
       this.contactsData = this.form.orderItemsList
       delete this.form.orderItemsList
+      this.configuration.dicData = this.form.corpName
+      delete this.form.corpName
+      this.$set(this.form, 'deliveryStatus', '录入')
+      if (this.form.belongToCorpList) {
+        this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
+        delete this.form.belongToCorpId
+        this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
+      }
+      delete this.form.belongToCorpList
+      this.contactsData.forEach(item => {
+        delete item.id
+        delete item.pid
+      })
     } else if (this.detailData.copyId) {
       this.queryData(this.detailData.copyId, true)
     }
@@ -639,7 +719,29 @@ export default {
         delete this.form.deliveryFilesList
         delete this.form.corpName
         delete this.form.companyName
-        console.log(this.configuration.dicData)
+        // 获取最大值
+        let num = []
+        this.advantageProjectData.forEach(item => {
+          num.push(item.sort)
+        })
+        if (num.length == 0) {
+          this.maxFeeNum = 0;
+        } else {
+          this.maxFeeNum = num.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
+        let goodsNum = []
+        this.contactsData.forEach(item => {
+          goodsNum.push(item.sort)
+        })
+        if (goodsNum.length == 0) {
+          this.maxGoodsNum = 0;
+        } else {
+          this.maxGoodsNum = goodsNum.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
         if (isCopy) {
           delete this.form.id
           delete this.form.sysNo
@@ -661,6 +763,24 @@ export default {
     copyOrder() {
       this.queryData(this.form.id, true)
     },
+    // 类别变换时触发
+    warehouseTreeChange(id) {
+      this.warehouseName = []
+      if (this.firstComing) {
+        if (!this.form.storageId) {
+          this.$set(this.form, 'storageId', null)
+        } else {
+          this.form.storageId = null
+        }
+      }
+      let data =  {
+        storageTypeId: id
+      }
+      selectWareHouse(data).then(res => {
+        this.warehouseName = res.data.data.records
+      })
+      this.firstComing = true
+    },
     //点击行可编辑
     handleRowClick(row, event, column) {
       console.log(row.$index)
@@ -731,6 +851,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.tableDataCost[item].sort = this.maxFeeNum + 1
+          this.maxFeeNum++
           delete this.tableDataCost[item].id
           this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
           this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
@@ -751,6 +873,8 @@ export default {
           delete this.tableData[item].id
           delete this.tableData[item].status
           delete this.tableData[item].isDeleted
+          this.tableData[item].sort = this.maxGoodsNum + 1
+          this.maxGoodsNum++
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
         }

+ 7 - 0
src/views/businessManagement/receipt/index.vue

@@ -90,6 +90,13 @@ export default {
   },
   created() {
     // this.onLoad()
+    if (this.$route.query.form) {
+      console.log(this.$route.query.form)
+      this.detailData = {
+        form: this.$route.query.form,
+      };
+      this.isShow = false;
+    }
   },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)

+ 9 - 5
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -54,7 +54,7 @@
             "dicUrl": "/api/blade-system/dict-biz/dictionary?code=payment_term",
             "props": {
                 "label": "dictValue",
-                "value": "dictKey"
+                "value": "dictValue"
             },
             "label": "付款方式",
             "prop": "paymentType",
@@ -87,8 +87,10 @@
             "prop": "requiredDeliveryDate",
             "search": true,
             "index": 8,
-            "width":100
-        },{
+            "width":100,
+            "format": "yyyy-MM-dd",
+            "valueFormat": "yyyy-MM-dd"
+      },{
             "label": "要求到货日期",
             "type": "date",
             "unlinkPanels": true,
@@ -96,8 +98,10 @@
             "prop": "requiredArrivalDate",
             "search": true,
             "index": 8,
-            "width":100
-        },{
+            "width":100,
+            "format": "yyyy-MM-dd",
+            "valueFormat": "yyyy-MM-dd"
+      },{
             "label": "公司户头",
             "prop": "banksAccountName",
             "search": true,

+ 17 - 3
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -30,7 +30,7 @@
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
                                 size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"
-                                 :configuration="configuration"/>
+                                 :configuration="configuration" style="width: 100%"/>
                 <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small">
                   <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
@@ -46,7 +46,7 @@
             <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
               <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="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="item.disabled"/>
-                <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration"/>
+                <selectComponent v-else-if="item.prop === 'belongToCorpId'" v-model="form[item.prop]" :configuration="configuration" style="width: 100%"/>
                 <el-input v-else-if="(item.prop === 'advancePayment') || (item.prop === 'settlmentAmount')" v-model="form[item.prop]" size="small" autocomplete="off" @change="computedCost"></el-input>
                 <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>
@@ -987,6 +987,7 @@ export default {
       statusOption: [],
       // 费用信息排序的最大值
       maxFeeNum: 0,
+      maxGoodsNum: 0,
     }
   },
   //初始化查询
@@ -1061,6 +1062,17 @@ export default {
             return b > a? b: a;
           })
         }
+        let goodsNum = []
+        this.contactsData.forEach(item => {
+          goodsNum.push(item.sort)
+        })
+        if (goodsNum.length == 0) {
+          this.maxGoodsNum = 0;
+        } else {
+          this.maxGoodsNum = goodsNum.reduce((a, b) => {
+            return b > a? b: a;
+          })
+        }
         if (isCopy) {
           delete this.form.id
           this.contactsData.forEach(item => {
@@ -1119,7 +1131,7 @@ export default {
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            this.editCustomer()
+            this.editCustomer(false)
           }).catch(() => {
             this.$message({
               type: 'info',
@@ -1231,6 +1243,8 @@ export default {
           this.$set(this.tableData[item], 'orderQuantity', 0)
           this.tableData[item].price = 0
           this.tableData[item].amount = 0
+          this.tableData[item].sort = this.maxGoodsNum + 1
+          this.maxGoodsNum++
           delete this.tableData[item].id
           this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)

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

@@ -224,6 +224,18 @@ export default {
       this.onLoad(this.page,this.search);
     },
     onLoad(page, params = {parentId: 0}) {
+      if (params) {
+        if (params.requiredDeliveryDate) {
+          params.deliveryStartDate = params.requiredDeliveryDate[0]+ " " + "00:00:00"
+          params.deliveryEndDate = params.requiredDeliveryDate[1]+ " " + "23:59:59"
+          this.$delete(params,'requiredDeliveryDate')
+        }
+        if (params.requiredArrivalDate) {
+          params.arrivalStartDate = params.requiredArrivalDate[0]+ " " + "00:00:00"
+          params.arrivalEndDate = params.requiredArrivalDate[1]+ " " + "23:59:59"
+          this.$delete(params,'requiredArrivalDate')
+        }
+      }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
         current: page.currentPage,