Переглянути джерело

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

caojunjie 3 роки тому
батько
коміт
123c54865f

+ 7 - 0
src/components/price-Library/configuration/mainList.json

@@ -153,6 +153,13 @@
       "index": 18,
       "width": 100,
       "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 19,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 9 - 1
src/views/basicData/commodityType/configuration/mainList.json

@@ -4,7 +4,9 @@
   "tip": false,
   "stripe": true,
   "searchShow": true,
-  "searchMenuSpan": 12,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "searchMenuSpan": 16,
   "searchMenuPosition": "right",
   "border": true,
   "index": true,
@@ -17,6 +19,7 @@
       "label": "商品编码",
       "prop": "code",
       "search": true,
+      "searchSpan": 8,
       "width": 100,
       "overHidden": true,
       "rules": [{
@@ -29,6 +32,8 @@
       "label": "商品名称",
       "prop": "cname",
       "slot": true,
+      "search": true,
+      "searchSpan": 8,
       "overHidden": true,
       "width": 100,
       "rules": [{
@@ -40,6 +45,8 @@
     {
       "label": "英文名称",
       "prop": "ename",
+      "searchSpan": 8,
+      "search": true,
       "overHidden": true
     },
     {
@@ -50,6 +57,7 @@
     {
       "label": "规格编码",
       "prop": "typeno",
+      "searchSpan": 8,
       "search": true,
       "overHidden": true
     },

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

@@ -1776,6 +1776,9 @@ export default {
           this.$message.success("保存成功");
           //关闭窗口
           this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+          this.$nextTick(() => {
+            this.$refs.crudContact.doLayout()
+          })
         }
       } else if (name === 'fees') {
         const inSave = await this.saveColumnData(
@@ -1796,6 +1799,9 @@ export default {
         customerContact
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crudContact.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crudContact.$refs.dialogColumn.columnBox = false;

+ 10 - 0
src/views/businessManagement/deliveryNotice/index.vue

@@ -103,6 +103,7 @@ import {customerList, typeSave, deleteDetails} from "@/api/basicData/deliveryNot
 import detailPage from "./detailsPageEdit";
 import { defaultDate } from "@/util/date";
 import reportDialog from "@/components/report-dialog/main";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "customerInformation",
@@ -154,6 +155,9 @@ export default {
     this.search.businessDate = defaultDate(1)
     this.option = option
       // this.option = await this.getColumnData(this.getColumnName(20), option);
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -436,6 +440,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
@@ -445,6 +452,9 @@ export default {
         option
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

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

@@ -1580,6 +1580,9 @@ export default {
           this.$message.success("保存成功");
           //关闭窗口
           this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+          this.$nextTick(() => {
+            this.$refs.crudContact.doLayout()
+          })
         }
       } else if (name === 'fees') {
         const inSave = await this.saveColumnData(
@@ -1600,6 +1603,9 @@ export default {
         customerContact
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crudContact.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crudContact.$refs.dialogColumn.columnBox = false;

+ 14 - 0
src/views/businessManagement/purchaseOrder/index.vue

@@ -124,6 +124,7 @@ import detailPage from "./detailsPageEdit";
 import { defaultDate } from "@/util/date";
 import ApplyPayment from "@/components/finance/applyPayment";
 import financialAccount from "../../../components/finance/financialAccount";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "customerInformation",
@@ -183,6 +184,13 @@ export default {
     this.search.requiredArrivalDate = defaultDate(1)
     // this.option = option
     this.option = await this.getColumnData(this.getColumnName(17), option);
+    this.getWorkDicts("payment_term").then(res => {
+      this.findObject(this.option.column, "paymentType").dicData =
+        res.data.data;
+    });
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -459,6 +467,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
@@ -468,6 +479,9 @@ export default {
         option
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

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

@@ -1321,6 +1321,9 @@ export default {
           this.$message.success("保存成功");
           //关闭窗口
           this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+          this.$nextTick(() => {
+            this.$refs.crudContact.doLayout()
+          })
         }
       } else if (name === 'fees') {
         const inSave = await this.saveColumnData(
@@ -1341,6 +1344,9 @@ export default {
         customerContact
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crudContact.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crudContact.$refs.dialogColumn.columnBox = false;

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

@@ -95,6 +95,7 @@ import option from "./configuration/mainList.json";
 import {customerList, typeSave, deleteDetails} from "@/api/basicData/receipt"
 import detailPage from "./detailsPageEdit";
 import { defaultDate } from "@/util/date";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "customerInformation",
@@ -144,6 +145,13 @@ export default {
     this.search.businessDate = defaultDate(1)
     this.option = option
       // this.option = await this.getColumnData(this.getColumnName(23), option);
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
+    this.getWorkDicts("procurement_method").then(res => {
+      this.findObject(this.option.column, "purchaseMode").dicData =
+        res.data.data;
+    });
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -420,6 +428,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
@@ -429,6 +440,9 @@ export default {
         option
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

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

@@ -3004,6 +3004,9 @@ export default {
           this.$message.success("保存成功");
           //关闭窗口
           this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
+          this.$nextTick(() => {
+            this.$refs.crudContact.doLayout()
+          })
         }
       } else if (name === 'fees') {
         const inSave = await this.saveColumnData(
@@ -3024,6 +3027,9 @@ export default {
         customerContact
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crudContact.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crudContact.$refs.dialogColumn.columnBox = false;

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

@@ -106,6 +106,7 @@ import search from "../../../page/index/search";
 import { defaultDate } from "@/util/date";
 import { getToken } from "@/util/auth";
 import os from "os";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "customerInformation",
@@ -147,6 +148,17 @@ export default {
     this.search.businesDate = defaultDate(1)
     // this.option = option
     this.option = await this.getColumnData(this.getColumnName(14), option);
+    this.getWorkDicts("payment_term").then(res => {
+      this.findObject(this.option.column, "paymentType").dicData =
+        res.data.data;
+    });
+    this.getWorkDicts("order_status").then(res => {
+      this.findObject(this.option.column, "orderStatus").dicData =
+        res.data.data;
+    });
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -502,6 +514,10 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+
       }
     },
     async resetColumn() {
@@ -511,6 +527,9 @@ export default {
         option
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;

+ 15 - 0
src/views/dealer/purchase/config/customerContact.json

@@ -11,6 +11,21 @@
   "menuWidth": 120,
   "refreshBtn": false,
   "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "actualQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "price",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "产品编码",

+ 27 - 12
src/views/dealer/purchase/config/mainList.json

@@ -11,12 +11,14 @@
   "addBtn": false,
   "align": "center",
   "menuWidth": "70",
-  "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
   "selection": true,
   "tip": false,
   "searchSpan": 8,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [],
   "column": [
     {
       "label": "采购订单号",
@@ -27,18 +29,10 @@
       "overHidden": true
     },
     {
-      "label": "系统编号",
-      "prop": "sysNo",
-      "search": true,
-      "index": 2,
-      "minWidth": 80,
-      "overHidden": true
-    },
-    {
-      "label": "客户名称",
+      "label": "供应商",
       "prop": "corpId",
       "search": true,
-      "index": 3,
+      "index": 2,
       "minWidth": 80,
       "overHidden": true
     },
@@ -46,7 +40,7 @@
       "label": "业务时间",
       "prop": "businesDate",
       "search": true,
-      "index": 4,
+      "index": 3,
       "minWidth": 80,
       "overHidden": true,
       "format": "yyyy-MM-dd",
@@ -56,6 +50,14 @@
       "searchRange": true
     },
     {
+      "label": "系统编号",
+      "prop": "sysNo",
+      "search": true,
+      "index": 4,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
       "label": "电话",
       "prop": "tel",
       "search": false,
@@ -70,6 +72,19 @@
       "index": 6,
       "minWidth": 80,
       "overHidden": true
+    },
+    {
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "id"
+      },
+      "label": "制单人",
+      "prop": "createUser",
+      "search": true,
+      "index": 7,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 136 - 11
src/views/dealer/purchase/detail.vue

@@ -118,19 +118,27 @@
             <span v-else> {{ row.cname }}</span>
           </template>
           <template slot="actualQuantity" slot-scope="{ row, index }">
-            <el-input
+            <el-input-number
               v-if="row.$cellEdit"
               v-model="row.actualQuantity"
               size="small"
-            ></el-input>
+              :controls="false"
+              :precision="0"
+              @input="amountChange(row)"
+              style="width: 100%"
+            />
             <span v-else>{{ row.actualQuantity }}</span>
           </template>
           <template slot="price" slot-scope="{ row, index }">
-            <el-input
+            <el-input-number
               v-if="row.$cellEdit"
               v-model="row.price"
               size="small"
-            ></el-input>
+              :controls="false"
+              :precision="2"
+              @input="amountChange(row)"
+              style="width: 100%"
+            ></el-input-number>
             <span v-else>{{ row.price }}</span>
           </template>
           <!--          单位-->
@@ -153,6 +161,21 @@
           </template>
         </avue-crud>
       </basic-container>
+      <containerTitle title="详细信息"/>
+      <basic-container :showBtn="true">
+        <avue-form
+          ref="form"
+          class="trading-form"
+          v-model="form"
+          :option="detailOption"
+        ></avue-form>
+      </basic-container>
+      <containerTitle title="附件管理"></containerTitle>
+      <c-upload
+        :data="uploadData"
+        deleteUrl="/api/blade-client/corpsbank/update"
+        :enumerationValue="84"
+      />
     </div>
     <el-dialog
       title="导入商品"
@@ -221,6 +244,7 @@ import goodsOption from "./config/commodity.json";
 import {getDeptLazyTree,
   getGoods,} from "@/api/basicData/customerInquiry";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
+import {getUserInfo} from "@/api/system/user"; //登录用户信息
 
 export default {
   name: "detail",
@@ -251,12 +275,6 @@ export default {
             slot: true
           },
           {
-            label: "系统号",
-            prop: "sysNo",
-            span: 8,
-            disabled: true
-          },
-          {
             label: "业务时间",
             prop: "businesDate",
             span: 8,
@@ -282,12 +300,67 @@ export default {
             span: 8
           },
           {
+            label: "备注",
+            prop: "orderRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 24
+          },
+        ],
+      },
+      detailOption: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            span: 8,
+            disabled: true
+          },
+          {
             label: "打印时间",
             prop: "a",
             span: 8,
             disabled: true
           },
-        ],
+          {
+            label: "打印次数",
+            prop: "a",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "客户欠款",
+            prop: "a",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "总数量",
+            prop: "b",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "应付金额",
+            prop: "c",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "总金额",
+            prop: "d",
+            span: 8,
+            disabled: true
+          },
+          {
+            label: "制单人",
+            prop: "createUser",
+            span: 8,
+            disabled: true,
+          },
+        ]
       },
       dataList: [],
       tableOption: {},
@@ -331,6 +404,7 @@ export default {
       goodsOption: {},
       treeStyle: "height:" + (window.innerHeight - 315) + "px",
       goodsoptions: [],
+      uploadData: [],
     }
   },
   async created() {
@@ -345,6 +419,35 @@ export default {
     getGoods(1, 500).then(res => {
       this.goodsoptions = res.data.data.records;
     });
+    getUserInfo().then(res => {
+      this.$set(this.form, 'createUser', res.data.data.realName)
+    })
+
+    if (this.detailData.id) {
+      this.$set(this.form, 'id', this.detailData.id)
+      this.$set(this.form, 'businesDate', this.detailData.row.businesDate)
+      this.$set(this.form, 'corpId', this.detailData.row.corpsName)
+      this.$set(this.form, 'corpTel', '1918766221')
+      this.$set(this.form, 'arrivalAddress', '山东省青岛市')
+    } else {
+      this.dataList = [
+        {
+          code: null,
+          cname: null,
+          typeno: null,
+          brandItem: null,
+          specsOne: null,
+          specsTwo: null,
+          a: null,
+          storageQuantity: 0,
+          actualQuantity: 0,
+          size: null,
+          price: 0,
+          amount: 0,
+          $cellEdit: true
+        }
+      ]
+    }
   },
   methods: {
     cellStyle() {
@@ -372,6 +475,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
@@ -381,6 +487,9 @@ export default {
         tableOption
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {
@@ -501,6 +610,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
       }
     },
     async resetGoodsColumn() {
@@ -510,6 +622,9 @@ export default {
         goodsOption
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {
@@ -572,6 +687,16 @@ export default {
       };
       this.newDetails();
     },
+    // 商品信息价格计算
+    amountChange(row) {
+      if (!row.actualQuantity) {
+        row.actualQuantity = 0;
+      }
+      if (!row.price) {
+        row.price = 0;
+      }
+      row.amount = Number(row.price) * Number(row.actualQuantity)
+    },
   },
 }
 </script>

+ 18 - 2
src/views/dealer/purchase/index.vue

@@ -26,6 +26,12 @@
         <template slot="corpId" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
+        <template slot="corpIdSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="GYS"
+          ></crop-select>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -64,6 +70,7 @@
 <script>
 import option from './config/mainList.json';
 import detailPage from "./detail";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "index",
@@ -134,6 +141,9 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(81), option);
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -147,9 +157,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type) {
-        this.option.height = window.innerHeight - 240 - 190
+        this.option.height = this.option.height - 190
       } else {
-        this.option.height = window.innerHeight - 240 + 190
+        this.option.height = this.option.height + 190
       }
       this.$refs.crud.getTableHeight();
     },
@@ -204,12 +214,18 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
       this.option = option;
       const inSave = await this.delColumnData(this.getColumnName(81), option);
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }

+ 15 - 0
src/views/dealer/sales/config/customerContact.json

@@ -11,6 +11,21 @@
   "menuWidth": 120,
   "refreshBtn": false,
   "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "actualQuantity",
+      "type": "sum"
+    },
+    {
+      "name": "price",
+      "type": "sum"
+    },
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "产品编码",

+ 66 - 7
src/views/dealer/sales/config/mainList.json

@@ -2,7 +2,6 @@
   "stripe": true,
   "height": "auto",
   "searchShow": true,
-  "searchMenuSpan": 24,
   "border": true,
   "index": true,
   "viewBtn": false,
@@ -11,12 +10,14 @@
   "addBtn": false,
   "align": "center",
   "menuWidth": "70",
-  "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
   "selection": true,
   "tip": false,
   "searchSpan": 8,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [],
   "column": [
     {
       "label": "销售订单号",
@@ -27,17 +28,17 @@
       "overHidden": true
     },
     {
-      "label": "系统编号",
-      "prop": "sysNo",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
       "index": 2,
       "minWidth": 80,
       "overHidden": true
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
+      "label": "所属公司",
+      "prop": "belongToCorpId",
+      "search": false,
       "index": 3,
       "minWidth": 80,
       "overHidden": true
@@ -70,6 +71,64 @@
       "index": 6,
       "minWidth": 80,
       "overHidden": true
+    },
+    {
+      "label": "经办人",
+      "prop": "e",
+      "search": true,
+      "index": 7,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "type": "select",
+      "props": {
+        "label": "dictValue",
+        "value": "dictValue"
+      },
+      "label": "结算方式",
+      "prop": "paymentType",
+      "search": true,
+      "index": 8,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "配送方式",
+      "prop": "f",
+      "search": false,
+      "index": 9,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "发货仓库",
+      "prop": "storageId",
+      "search": true,
+      "index": 10,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "label": "系统编号",
+      "prop": "sysNo",
+      "search": true,
+      "index": 11,
+      "minWidth": 80,
+      "overHidden": true
+    },
+    {
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "id"
+      },
+      "label": "制单人",
+      "prop": "createUser",
+      "search": true,
+      "index": 12,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 165 - 42
src/views/dealer/sales/detail.vue

@@ -46,7 +46,14 @@
               v-model="form.corpId"
               @getCorpData="getCorpData"
               corpType="KH"
-            ></crop-select>
+            />
+          </template>
+          <template slot="belongToCorpId">
+            <crop-select
+              v-model="form.belongToCorpId"
+              @getCorpData="getGSData"
+              corpType="GS"
+            />
           </template>
           <template slot="storageId">
             <warehouse-select
@@ -123,19 +130,27 @@
             <span v-else> {{ row.cname }}</span>
           </template>
           <template slot="actualQuantity" slot-scope="{ row, index }">
-            <el-input
+            <el-input-number
               v-if="row.$cellEdit"
               v-model="row.actualQuantity"
               size="small"
-            ></el-input>
+              :controls="false"
+              :precision="0"
+              @input="amountChange(row)"
+              style="width: 100%"
+            />
             <span v-else>{{ row.actualQuantity }}</span>
           </template>
           <template slot="price" slot-scope="{ row, index }">
-            <el-input
+            <el-input-number
               v-if="row.$cellEdit"
               v-model="row.price"
               size="small"
-            ></el-input>
+              :controls="false"
+              :precision="2"
+              @input="amountChange(row)"
+              style="width: 100%"
+            ></el-input-number>
             <span v-else>{{ row.price }}</span>
           </template>
 <!--          单位-->
@@ -158,6 +173,21 @@
           </template>
         </avue-crud>
       </basic-container>
+      <containerTitle title="详细信息"/>
+      <basic-container :showBtn="true">
+        <avue-form
+          ref="form"
+          class="trading-form"
+          v-model="form"
+          :option="detailOption"
+        ></avue-form>
+      </basic-container>
+      <containerTitle title="附件管理"></containerTitle>
+      <c-upload
+        :data="uploadData"
+        deleteUrl="/api/blade-client/corpsbank/update"
+        :enumerationValue="84"
+      />
     </div>
     <el-dialog
       title="导入商品"
@@ -227,6 +257,7 @@ import {getDeptLazyTree,
   getGoods,} from "@/api/basicData/customerInquiry";
 import {getUserInfo} from "@/api/system/user";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"; // 库存查询
+import {detail as KHDetail} from "@/api/basicData/customerInformation";
 
 export default {
   name: "detail",
@@ -257,12 +288,6 @@ export default {
             slot: true
           },
           {
-            label: "系统号",
-            prop: "sysNo",
-            span: 8,
-            disabled: true
-          },
-          {
             label: "业务时间",
             prop: "businesDate",
             span: 8,
@@ -278,6 +303,19 @@ export default {
             ]
           },
           {
+            label: "所属公司",
+            prop: "belongToCorpId",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
+            span: 16,
+            slot: true
+          },
+          {
             label: "电话",
             prop: "corpTel",
             span: 8
@@ -288,35 +326,85 @@ export default {
             span: 8
           },
           {
+            label: "经办人",
+            prop: "e",
+            span: 8,
+          },
+          {
+            label: "结算方式",
+            prop: "paymentType",
+            span: 8,
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
+            props: {
+              label: "dictValue",
+              value: "dictValue"
+            }
+          },
+          {
+            label: "配送方式",
+            prop: "f",
+            span: 8,
+          },
+          {
+            label: "发货仓库",
+            prop: "storageId",
+            span: 8,
+          },
+          {
+            label: "备注",
+            prop: "orderRemark",
+            type: "textarea",
+            minRows: 2,
+            span: 24
+          },
+        ],
+      },
+      detailOption: {
+        menuBtn: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            span: 8,
+            disabled: true
+          },
+          {
             label: "打印时间",
             prop: "a",
             span: 8,
             disabled: true
           },
           {
+            label: "打印次数",
+            prop: "a",
+            span: 8,
+            disabled: true
+          },
+          {
             label: "客户欠款",
             prop: "a",
             span: 8,
+            disabled: true
           },
           {
             label: "总数量",
             prop: "b",
             span: 8,
+            disabled: true
           },
           {
             label: "应收金额",
             prop: "c",
             span: 8,
+            disabled: true
           },
           {
             label: "总金额",
             prop: "d",
             span: 8,
-          },
-          {
-            label: "经办人",
-            prop: "e",
-            span: 8,
+            disabled: true
           },
           {
             label: "制单人",
@@ -324,28 +412,7 @@ export default {
             span: 8,
             disabled: true,
           },
-          {
-            label: "结算方式",
-            prop: "paymentType",
-            span: 8,
-            type: "select",
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_term",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            }
-          },
-          {
-            label: "配送方式",
-            prop: "f",
-            span: 8,
-          },
-          {
-            label: "发货仓库",
-            prop: "storageId",
-            span: 8,
-          },
-        ],
+        ]
       },
       dataList: [],
       tableOption: {},
@@ -397,6 +464,7 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: [],
       },
+      uploadData: [],
     }
   },
   async created() {
@@ -415,12 +483,36 @@ export default {
       this.$set(this.form, 'createUser', res.data.data.realName)
     })
     if (this.detailData.id) {
-      this.$set(this.form, 'paymentType', '到付')
       this.$set(this.form, 'id', this.detailData.id)
       this.$set(this.form, 'businesDate', this.detailData.row.businesDate)
       this.$set(this.form, 'corpId', this.detailData.row.corpsName)
-      this.$set(this.form, 'corpTel', '1918766221')
-      this.$set(this.form, 'arrivalAddress', '山东省青岛市')
+      this.$set(this.form, 'corpTel', this.detailData.row.tel)
+      this.$set(this.form, 'arrivalAddress', this.detailData.row.attn)
+      this.$set(this.form, 'createUser', this.detailData.row.createUser)
+      this.$set(this.form, 'storageId', this.detailData.row.storageId)
+      this.$set(this.form, 'paymentType', this.detailData.row.paymentType)
+      this.$set(this.form, 'belongToCorpId', this.detailData.row.belongToCorpId)
+      this.$set(this.form, 'e', this.detailData.row.e)
+      this.$set(this.form, 'f', this.detailData.row.f)
+
+    } else {
+      this.dataList = [
+        {
+          code: null,
+          cname: null,
+          typeno: null,
+          brandItem: null,
+          specsOne: null,
+          specsTwo: null,
+          a: null,
+          storageQuantity: 0,
+          actualQuantity: 0,
+          size: null,
+          price: 0,
+          amount: 0,
+          $cellEdit: true
+        }
+      ]
     }
   },
   methods: {
@@ -431,7 +523,16 @@ export default {
     copyDoc() {
       this.$emit("copyOrder", this.form.id);
     },
-    getCorpData(row) {},
+    getCorpData(row) {
+      KHDetail(row.id).then(res => {
+        if (res.data.data.belongtocompany) {
+          this.$set(this.form, 'belongToCorpId', res.data.data.belongtocompany)
+        } else {
+          this.$set(this.form, 'belongToCorpId', null)
+        }
+      })
+    },
+    getGSData(row) {},
     //修改提交触发
     editCustomer(status) {
       this.$message.success('保存成功')
@@ -449,6 +550,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
@@ -458,6 +562,9 @@ export default {
         tableOption
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {
@@ -578,6 +685,9 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
       }
     },
     async resetGoodsColumn() {
@@ -587,6 +697,9 @@ export default {
         goodsOption
       );
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.goodsCrud.doLayout()
+        })
         this.$message.success("重置成功");
         //关闭窗口
         setTimeout(() => {
@@ -649,6 +762,16 @@ export default {
       };
       this.newDetails();
     },
+    // 商品信息价格计算
+    amountChange(row) {
+      if (!row.actualQuantity) {
+        row.actualQuantity = 0;
+      }
+      if (!row.price) {
+        row.price = 0;
+      }
+      row.amount = Number(row.price) * Number(row.actualQuantity)
+    },
   },
 }
 </script>

+ 64 - 4
src/views/dealer/sales/index.vue

@@ -26,6 +26,17 @@
         <template slot="corpId" slot-scope="scope">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.corpsName }}</span>
         </template>
+        <template slot="storageIdSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"/>
+        </template>
+        <template slot="corpIdSearch">
+          <crop-select
+            v-model="search.corpId"
+            corpType="KH"
+          ></crop-select>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -64,6 +75,7 @@
 <script>
 import option from './config/mainList.json';
 import detailPage from "./detail";
+import { gainUser } from "@/api/basicData/customerInquiry";
 
 export default {
   name: "index",
@@ -72,8 +84,35 @@ export default {
     return {
       option: {},
       dataList: [
-        {id: 10, orderNo: 'xs00001', sysNo: 'xt00001', corpId: '1', corpsName: '张叁', businesDate: '2022-03-09'},
-        {id: 11, orderNo: 'xs00002', sysNo: 'xt00002', corpId: '2', corpsName: '李四', businesDate: '2022-03-09'},
+        {
+          id: 10,
+          orderNo: 'xs00001',
+          sysNo: 'xt00001',
+          corpId: '1',
+          corpsName: '张叁',
+          businesDate: '2022-03-09',
+          storageId: '测试库',
+          paymentType: '预付',
+          belongToCorpId: '测试所属公司',
+          tel: '13887762678',
+          attn: '山东省青岛市李沧区峰山路',
+          e: 'admin',
+          f: '空运',
+          createUser: 'admin'
+        },
+        {id: 11, orderNo: 'xs00002',
+          sysNo: 'xt00002',
+          corpId: '2',
+          corpsName: '李四',
+          businesDate: '2022-03-09',
+          storageId: '测试库',
+          paymentType: '到付',
+          belongToCorpId: '测试所属公司',
+          tel: '13633346789',
+          attn: '山东省青岛市市北区台东步行街',
+          e: 'admin',
+          f: '陆运',
+          createUser: '王富贵'},
         {id: 12, orderNo: 'xs00003', sysNo: 'xt00003', corpId: '3', corpsName: '王五', businesDate: '2022-03-10'},
       ],
       form: {},
@@ -88,10 +127,25 @@ export default {
       loading: false,
       selection: [],
       detailData: {},
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
     }
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(78), option);
+    this.getWorkDicts("payment_term").then(res => {
+      this.findObject(this.option.column, "paymentType").dicData =
+        res.data.data;
+    });
+    gainUser().then(res => {
+      this.findObject(this.option.column, "createUser").dicData = res.data.data;
+    })
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -105,9 +159,9 @@ export default {
   methods: {
     searchCriteriaSwitch(type) {
       if (type){
-        this.option.height = window.innerHeight - 240 - 190
+        this.option.height =  this.option.height - 190
       }else {
-        this.option.height = window.innerHeight - 240 + 190
+        this.option.height =  this.option.height + 190
       }
       this.$refs.crud.getTableHeight()
     },
@@ -162,12 +216,18 @@ export default {
         this.$message.success("保存成功");
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
       }
     },
     async resetColumn() {
       this.option = option;
       const inSave = await this.delColumnData(this.getColumnName(78), option);
       if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }

+ 15 - 4
src/views/maintenance/priceLibrary/index.vue

@@ -18,6 +18,7 @@
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
         :summary-method="summaryMethod"
+        @search-criteria-switch="searchCriteriaSwitch"
       >
         <template slot="menuLeft">
           <el-button
@@ -263,6 +264,7 @@ export default {
     this.getWorkDicts("price_library_currency").then(res => {
       this.currencyList = res.data.data;
     });
+     this.option.height = window.innerHeight - 210;
   },
   filters: {
     orderStateFormat(val) {
@@ -291,6 +293,14 @@ export default {
     }
   },
   methods: {
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 93;
+      } else {
+        this.option.height = this.option.height + 93;
+      }
+      this.$refs.crud.getTableHeight();
+    },
     cellStyle() {
       return "padding:0;height:40px;";
     },
@@ -378,7 +388,11 @@ export default {
         tradeType: "CK"
       };
       this.loading = true;
-      getList(page.currentPage, page.pageSize,Object.assign(params, this.search))
+      getList(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(params, this.search)
+      )
         .then(res => {
           // if (res.data.data.records) {
           //   res.data.data.records.forEach(e => {
@@ -387,9 +401,6 @@ export default {
           // }
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
-          if (this.page.total) {
-            this.option.height = window.innerHeight - 260;
-          }
         })
         .finally(() => {
           this.loading = false;