Browse Source

修改bug

QuKatie 3 years ago
parent
commit
d1e779aacb
29 changed files with 734 additions and 406 deletions
  1. 8 0
      src/api/basicData/customerInquiry.js
  2. 8 0
      src/api/basicData/salesContract.js
  3. 2 2
      src/page/login/userlogin.vue
  4. 13 42
      src/views/exportTrade/customerInquiry/config/commodity.json
  5. 13 13
      src/views/exportTrade/customerInquiry/config/customerContact.json
  6. 2 0
      src/views/exportTrade/customerInquiry/config/mainList.json
  7. 60 7
      src/views/exportTrade/customerInquiry/detailsPage.vue
  8. 106 10
      src/views/exportTrade/customerInquiry/index.vue
  9. 13 42
      src/views/exportTrade/invoice/config/commodity.json
  10. 26 5
      src/views/exportTrade/invoice/detailsPage.vue
  11. 16 4
      src/views/exportTrade/invoice/index.vue
  12. 13 42
      src/views/exportTrade/purchaseContract/config/commodity.json
  13. 20 2
      src/views/exportTrade/purchaseContract/detailsPage.vue
  14. 28 4
      src/views/exportTrade/purchaseContract/index.vue
  15. 13 42
      src/views/exportTrade/purchaseInquiry/config/commodity.json
  16. 25 4
      src/views/exportTrade/purchaseInquiry/detailsPage.vue
  17. 21 5
      src/views/exportTrade/purchaseInquiry/index.vue
  18. 13 42
      src/views/exportTrade/receipt/config/commodity.json
  19. 25 3
      src/views/exportTrade/receipt/detailsPage.vue
  20. 21 5
      src/views/exportTrade/receipt/index.vue
  21. 13 42
      src/views/exportTrade/salesContract/config/commodity.json
  22. 16 16
      src/views/exportTrade/salesContract/config/customerContact.json
  23. 2 0
      src/views/exportTrade/salesContract/config/mainList.json
  24. 60 8
      src/views/exportTrade/salesContract/detailsPage.vue
  25. 117 9
      src/views/exportTrade/salesContract/index.vue
  26. 13 42
      src/views/exportTrade/shippingInquiry/config/commodity.json
  27. 26 11
      src/views/exportTrade/shippingInquiry/detailsPage.vue
  28. 10 2
      src/views/exportTrade/shippingInquiry/index.vue
  29. 31 2
      src/views/maintenance/priceLibrary/index.vue

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

@@ -143,4 +143,12 @@ export const getGoodstype = (current, size) => {
       size,
     }
   })
+}
+//商品类别列表查询
+export const getGoodsInfo = (query) => {
+  return request({
+    url: ' /api/blade-purchase-sales/orderitems/orderItemsList',
+    method: 'get',
+    params:query
+  })
 }

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

@@ -116,4 +116,12 @@ export function gainUser(query) {
     method: 'get',
     params: query
   })
+}
+//商品类别列表查询
+export const getGoodsInfo = (query) => {
+  return request({
+    url: ' /api/blade-purchase-sales/orderitems/orderItemsList',
+    method: 'get',
+    params:query
+  })
 }

+ 2 - 2
src/page/login/userlogin.vue

@@ -82,7 +82,7 @@
         tenantMode: this.website.tenantMode,
         loginForm: {
           //租户ID
-          tenantId: "000000",
+          tenantId: "577435",
           //部门ID
           deptId: "",
           //角色ID
@@ -90,7 +90,7 @@
           //用户名
           username: "admin",
           //密码
-          password: "8866",
+          password: "123456",
           //账号类型
           type: "account",
           //验证码的值

+ 13 - 42
src/views/exportTrade/customerInquiry/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 13 - 13
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -118,9 +118,16 @@
       "overHidden": true
     },
     {
+      "label": "单品毛利率",
+      "prop": "itemMargin",
+      "index": 17,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "计价单位",
       "prop": "unit",
-      "index": 17,
+      "index": 18,
       "width": 100,
       "overHidden": true,
       "cell": true,
@@ -134,41 +141,34 @@
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 18,
+      "index": 19,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "保险",
       "prop": "insurance",
-      "index": 19,
+      "index": 20,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "运费",
       "prop": "freight",
-      "index": 20,
+      "index": 21,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "折扣",
       "prop": "discount",
-      "index": 21,
+      "index": 22,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 22,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "单品毛利率",
-      "prop": "itemMargin",
       "index": 23,
       "width": 100,
       "overHidden": true
@@ -183,7 +183,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 24,
+      "index": 25,
       "width": 100,
       "overHidden": true,
       "cell": true

+ 2 - 0
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -14,6 +14,8 @@
   "searchIndex": 2,
   "selection": true,
   "tip":false,
+  "expand": true,
+  "expandWidth": 38,
   "column": [{
       "label": "客户名称",
       "prop": "corpId",

+ 60 - 7
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -11,6 +11,14 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
+        <el-button
+          type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
         <el-button type="info" @click="saveSell" size="small"
           >生成销售单</el-button
         >
@@ -64,6 +72,7 @@
               placeholder="请选择"
               @change="corpAttnChange"
               clearable
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in corpsattns"
@@ -88,6 +97,7 @@
               placeholder="请选择"
               @change="priceTermsChange"
               clearable
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in priceTermsList"
@@ -105,6 +115,7 @@
               placeholder="请选择"
               @change="paymentTypeChange"
               clearable
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in paymentTermList"
@@ -121,6 +132,7 @@
               v-model="form.currency"
               placeholder="请选择"
               @change="currencyChange"
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in currencyList"
@@ -245,7 +257,7 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
-              :disabled="disabled"
+              :disabled="disabled || detailData.status == 1"
               >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
             >
             <el-button
@@ -297,7 +309,7 @@
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
               <el-select
-                v-model="row.cname"
+                v-model="row.itemId"
                 placeholder="请选择"
                 size="small"
                 style="width:60%"
@@ -307,7 +319,7 @@
                   v-for="item in goodsoptions"
                   :key="item.id"
                   :label="item.cname"
-                  :value="item.cname"
+                  :value="item.id"
                 >
                 </el-option>
               </el-select>
@@ -386,7 +398,7 @@
               oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
               @change="priceChange(row)"
             ></el-input>
-            <span v-else>{{ row.orderQuantity }}</span>
+            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
           </template>
           <template slot="discount" slot-scope="{ row }">
             <el-input
@@ -536,7 +548,12 @@ import {
 import { getCorpsattn } from "@/api/basicData/customerInformation";
 import reportDialog from "@/components/report-dialog/main";
 import priceLibrary from "@/components/price-Library/main";
-import { isDiscount, isPercentage, micrometerFormat } from "@/util/validate";
+import {
+  isDiscount,
+  isPercentage,
+  micrometerFormat,
+  IntegerFormat
+} from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { dateFormat } from "@/util/date";
 import {
@@ -940,6 +957,9 @@ export default {
     },
     micrometerFormat(val) {
       return micrometerFormat(val);
+    },
+    IntegerFormat(num) {
+      return IntegerFormat(num);
     }
   },
   methods: {
@@ -1009,13 +1029,42 @@ export default {
     },
     cnameChange(row) {
       this.goodsoptions.forEach(e => {
-        if (e.cname == row.cname) {
-          row.itemId = e.id;
+        if (e.id == row.itemId) {
+          row.cname = e.cname;
           row.code = e.code;
           row.priceCategory = e.goodsTypeName;
           row.itemUrl = e.url;
           row.itemDescription = e.cnameDescription;
           row.unit = e.unit;
+          row.purchaseAmount = 0;
+          row.productPrice = productCal(
+            0,
+            row.partsPrice,
+            this.form.coefficient
+          );
+          row.price = sellingCal(
+            productCal(0, row.partsPrice, this.form.coefficient),
+            this.form.exchangeRate
+          );
+          row.amount = amountCal(
+            sellingCal(
+              productCal(0, row.partsPrice, this.form.coefficient),
+              this.form.exchangeRate
+            ),
+            row.orderQuantity,
+            row.freight,
+            row.insurance,
+            row.discount
+          );
+          row.itemMargin = grossProfitCal(
+            0,
+            row.partsPrice,
+            sellingCal(
+              productCal(0, row.partsPrice, this.form.coefficient),
+              this.form.exchangeRate
+            ),
+            this.form.exchangeRate
+          );
         }
       });
     },
@@ -1596,6 +1645,10 @@ export default {
       }
       return sums;
     },
+    openEdit(){
+      this.detailData.status = 2;
+      this.option=this.$options.data().option
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(1),

+ 106 - 10
src/views/exportTrade/customerInquiry/index.vue

@@ -18,10 +18,23 @@
         :cell-style="cellStyle"
         :summary-method="summaryMethod"
         @selection-change="selectionChange"
+        @expand-change="expandChange"
       >
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemData"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          ></avue-crud>
+        </template>
         <template slot-scope="{ row }" slot="createUser">
           <span>{{ row.createUserName }}</span>
         </template>
+        <template slot-scope="{ row }" slot="orderQuantity">
+          <span>{{ row.orderQuantity | IntegerFormat }}</span>
+        </template>
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
         </template>
@@ -70,19 +83,18 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd()"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="success" size="small" disabled>复制单据</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
-          <crop-select
-            v-model="search.corpId"
-            corpType="KH"
-          ></crop-select>
+          <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
         </template>
         <template slot-scope="scope" slot="grossProfitRate">
           {{ scope.row.grossProfitRate ? scope.row.grossProfitRate : 0 }}%
@@ -115,10 +127,15 @@
 
 <script>
 import option from "./config/mainList.json";
-import { getList, remove, gainUser } from "@/api/basicData/customerInquiry";
+import {
+  getList,
+  remove,
+  gainUser,
+  getGoodsInfo
+} from "@/api/basicData/customerInquiry";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -141,7 +158,56 @@ export default {
       detailData: {},
       loading: false,
       searchShow: true,
-      selectionList: []
+      selectionList: [],
+      itemOption: {
+        align: "center",
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品类别",
+            prop: "priceCategory",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "产品名称",
+            prop: "cname",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "产品描述",
+            prop: "itemDescription",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "配件描述",
+            prop: "partsDescribe",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "配件价格描述",
+            prop: "partsPriceDescribe",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "金额",
+            prop: "amount",
+            width: 100,
+            overHidden: true
+          }
+        ]
+      }
     };
   },
   components: { detailPage },
@@ -160,10 +226,26 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    expandChange(row) {
+      if (!row.itemData) {
+        getGoodsInfo({ id: row.id, tradeType: "CK" })
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data;
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定删除数据?", {
@@ -238,8 +320,16 @@ export default {
         delete params.businesDate;
       }
       this.loading = true;
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
       getList(page.currentPage, page.pageSize, params)
         .then(res => {
+          if (res.data.data.records) {
+            res.data.data.records.forEach(e => {
+              e.itemLoading = true;
+            });
+          }
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
           if (this.page.total) {
@@ -328,4 +418,10 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+.itemTable ::v-deep .el-table {
+  width: 738px;
+}
 </style>

+ 13 - 42
src/views/exportTrade/invoice/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 26 - 5
src/views/exportTrade/invoice/detailsPage.vue

@@ -13,6 +13,14 @@
       </div>
       <div class="add-customer-btn" v-if="showBut">
         <el-button
+          type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
+        <el-button
           type="info"
           @click.stop="editCustomer('save')"
           v-if="form.deliveryStatus == '录入'"
@@ -93,8 +101,8 @@
               >报 表</el-button
             >
           </template>
-          <template slot-scope="scope" slot="corpId">
-            {{ scope.row.corpsName }}
+          <template slot-scope="{ row }" slot="corpId">
+            {{ row.corpsName }}
           </template>
           <template slot="itemType" slot-scope="{ row }">
             <el-select
@@ -174,7 +182,7 @@
               oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
               @change="quantityChange(row)"
             ></el-input>
-            <span v-else>{{ row.actualQuantity }}</span>
+            <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
           </template>
         </avue-crud>
       </basic-container>
@@ -211,7 +219,11 @@
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
+                  <avue-tree
+                    :option="treeOption"
+                    @node-click="nodeClick"
+                    :style="treeStyle"
+                  />
                 </basic-container>
               </el-scrollbar>
             </div>
@@ -269,7 +281,7 @@ import {
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import _ from "lodash";
 export default {
@@ -494,6 +506,11 @@ export default {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -864,6 +881,10 @@ export default {
       }
       return sums;
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(9),

+ 16 - 4
src/views/exportTrade/invoice/index.vue

@@ -21,6 +21,9 @@
         <template slot-scope="{ row }" slot="salesCompany">
           <span>{{ row.salesCompanyName }}</span>
         </template>
+        <template slot-scope="{ row }" slot="totalQuantity">
+          <span>{{ row.totalQuantity | IntegerFormat }}</span>
+        </template>
         <template slot-scope="{ row }" slot="storageId">
           <span>{{ row.storageName }}</span>
         </template>
@@ -28,7 +31,11 @@
           <span>{{ row.createUserName }}</span>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
         </template>
         <template slot="storageIdSearch">
           <warehouse-select
@@ -66,8 +73,8 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd()"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="success" size="small" disabled>复制单据</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
@@ -104,7 +111,7 @@
 import option from "./config/mainList.json";
 import { getList, remove, gainUser } from "@/api/basicData/invoice";
 import detailPage from "./detailsPage.vue";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { defaultDate } from "@/util/date";
 import _ from "lodash";
 export default {
@@ -154,6 +161,11 @@ export default {
       }
     }, 100);
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";

+ 13 - 42
src/views/exportTrade/purchaseContract/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 20 - 2
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -11,6 +11,14 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut" size="small">
+        <el-button
+          type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
         <el-dropdown style="margin-right: 8px;">
           <el-button type="primary" size="small">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
@@ -118,7 +126,7 @@
                 oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
                 @change="quantityChange(row)"
               ></el-input>
-              <span v-else>{{ row.orderQuantity }}</span>
+              <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
             </template>
             <template slot="cname" slot-scope="{ row, index }">
               <el-button
@@ -310,7 +318,8 @@ import { contrastObj, contrastList } from "@/util/contrastData";
 import {
   isvalidatemobile,
   validatename,
-  micrometerFormat
+  micrometerFormat,
+  IntegerFormat
 } from "@/util/validate";
 export default {
   name: "detailsPageEdit",
@@ -626,6 +635,11 @@ export default {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -989,6 +1003,10 @@ export default {
         }
       });
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(3),

+ 28 - 4
src/views/exportTrade/purchaseContract/index.vue

@@ -35,8 +35,8 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd('new')"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="success" size="small" disabled>复制单据</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
@@ -80,11 +80,25 @@
           </el-date-picker>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.strCorpName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
+        </template>
+        <template slot-scope="scope" slot="orderNo">
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.orderNo }}
+          </span>
         </template>
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>
+        <template slot-scope="{ row }" slot="orderQuantity">
+          <span>{{ row.orderQuantity | IntegerFormat }}</span>
+        </template>
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
@@ -103,7 +117,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 
@@ -112,6 +130,7 @@ import option from "./config/mainList.json";
 import { getList, remove, gainUser } from "@/api/exportTrade/purchaseContract";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
+import { IntegerFormat } from "@/util/validate";
 export default {
   name: "customerInformation",
   data() {
@@ -145,6 +164,11 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";

+ 13 - 42
src/views/exportTrade/purchaseInquiry/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 25 - 4
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -14,6 +14,14 @@
       <div class="add-customer-btn" v-if="showBut">
         <el-button
           type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
+        <el-button
+          type="primary"
           :disabled="detailData.status == 1"
           v-if="detailData.status != 1"
           @click="editCustomer('submit')"
@@ -124,7 +132,7 @@
               oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
               @change="quantityChange(row)"
             ></el-input>
-            <span v-else>{{ row.orderQuantity }}</span>
+            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
           </template>
           <template slot="itemType" slot-scope="{ row }">
             <el-select
@@ -226,7 +234,11 @@
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
+                  <avue-tree
+                    :option="treeOption"
+                    @node-click="nodeClick"
+                    :style="treeStyle"
+                  />
                 </basic-container>
               </el-scrollbar>
             </div>
@@ -281,9 +293,9 @@ import {
 } from "@/api/basicData/purchaseInquiry";
 import customerDialog from "@/components/customer-dialog/main";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
-import {purchaseCal} from "@/util/calculate";
+import { purchaseCal } from "@/util/calculate";
 import _ from "lodash";
 export default {
   name: "detailsPageEdit",
@@ -472,6 +484,11 @@ export default {
     reportDialog,
     customerDialog
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   async created() {
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
@@ -833,6 +850,10 @@ export default {
       }
       return sums;
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(11),

+ 21 - 5
src/views/exportTrade/purchaseInquiry/index.vue

@@ -24,8 +24,8 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd()"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="corpIdSearch">
@@ -71,7 +71,14 @@
           <span>{{ row.createUserName }}</span>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpName }}
+          </span>
+        </template>
+        <template slot-scope="{ row }" slot="orderQuantity">
+          <span>{{ row.orderQuantity | IntegerFormat }}</span>
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -91,7 +98,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 
@@ -105,7 +116,7 @@ import {
 } from "@/api/basicData/purchaseInquiry";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
-import { micrometerFormat } from "@/util/validate";
+import { IntegerFormat } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -140,6 +151,11 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";

+ 13 - 42
src/views/exportTrade/receipt/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 25 - 3
src/views/exportTrade/receipt/detailsPage.vue

@@ -13,6 +13,14 @@
       </div>
       <div class="add-customer-btn" v-if="showBut">
         <el-button
+          type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
+        <el-button
           type="info"
           @click.stop="editCustomer('save')"
           v-if="form.deliveryStatus == '录入'"
@@ -159,7 +167,7 @@
               oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
               @change="quantityChange(row)"
             ></el-input>
-            <span v-else>{{ row.actualQuantity }}</span>
+            <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
           </template>
         </avue-crud>
       </basic-container>
@@ -196,7 +204,11 @@
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
+                  <avue-tree
+                    :option="treeOption"
+                    @node-click="nodeClick"
+                    :style="treeStyle"
+                  />
                 </basic-container>
               </el-scrollbar>
             </div>
@@ -258,7 +270,8 @@ import { contrastObj, contrastList } from "@/util/contrastData";
 import {
   isvalidatemobile,
   validatename,
-  micrometerFormat
+  micrometerFormat,
+  IntegerFormat
 } from "@/util/validate";
 import _ from "lodash";
 export default {
@@ -505,6 +518,11 @@ export default {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -870,6 +888,10 @@ export default {
       }
       return sums;
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(7),

+ 21 - 5
src/views/exportTrade/receipt/index.vue

@@ -24,8 +24,8 @@
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd()"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="success" size="small" disabled>复制单据</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
@@ -35,6 +35,9 @@
         <template slot-scope="{ row }" slot="createUser">
           <span>{{ row.createUserName }}</span>
         </template>
+        <template slot-scope="{ row }" slot="totalQuantity">
+          <span>{{ row.totalQuantity | IntegerFormat }}</span>
+        </template>
         <template slot="businessDateSearch">
           <el-date-picker
             v-model="search.businessDate"
@@ -63,7 +66,11 @@
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -83,7 +90,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 
@@ -91,7 +102,7 @@
 import option from "./config/mainList.json";
 import { getList, remove, gainUser } from "@/api/exportTrade/receipt";
 import detailPage from "./detailsPage.vue";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { defaultDate } from "@/util/date";
 import _ from "lodash";
 export default {
@@ -126,6 +137,11 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   activated() {
     //当页面已打开并无法重新渲染时,用activated重新激活keepalive组件
     setTimeout(() => {

+ 13 - 42
src/views/exportTrade/salesContract/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 16 - 16
src/views/exportTrade/salesContract/config/customerContact.json

@@ -113,9 +113,16 @@
       "overHidden": true
     },
     {
+      "label": "单品毛利率",
+      "prop": "itemMargin",
+      "index": 15,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "计价单位",
       "prop": "unit",
-      "index": 15,
+      "index": 16,
       "width": 100,
       "overHidden": true,
       "cell": true,
@@ -129,63 +136,56 @@
     {
       "label": "数量",
       "prop": "orderQuantity",
-      "index": 16,
+      "index": 17,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "发货数量",
       "prop": "actualQuantity",
-      "index": 17,
+      "index": 18,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "保险",
       "prop": "insurance",
-      "index": 18,
+      "index": 19,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "运费",
       "prop": "freight",
-      "index": 19,
+      "index": 20,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "折扣",
       "prop": "discount",
-      "index": 20,
+      "index": 21,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 21,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "单品毛利率",
-      "prop": "itemMargin",
-      "index": 23,
+      "index": 22,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "税率",
       "prop": "taxRate",
-      "index": 24,
+      "index": 23,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 25,
+      "index": 24,
       "width": 100,
       "overHidden": true,
       "cell": true

+ 2 - 0
src/views/exportTrade/salesContract/config/mainList.json

@@ -15,6 +15,8 @@
   "showSummary": true,
   "selection": true,
   "tip": false,
+  "expand": true,
+  "expandWidth": 38,
   "column": [{
       "label": "客户名称",
       "prop": "corpId",

+ 60 - 8
src/views/exportTrade/salesContract/detailsPage.vue

@@ -11,7 +11,15 @@
         </el-button>
       </div>
       <div class="add-customer-btn" v-if="showBut">
-        <el-dropdown style="margin-right: 8px;">
+        <el-button
+          type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
+        <el-dropdown style="margin-right: 8px;margin-left: 8px;">
           <el-button type="primary" size="small">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
@@ -95,6 +103,7 @@
               placeholder="请选择"
               @change="priceTermsChange"
               clearable
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in priceTermsList"
@@ -112,6 +121,7 @@
               placeholder="请选择"
               @change="paymentTypeChange"
               clearable
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in paymentTermList"
@@ -128,6 +138,7 @@
               v-model="form.currency"
               placeholder="请选择"
               @change="currencyChange"
+              :disabled="detailData.status == 1"
             >
               <el-option
                 v-for="item in currencyList"
@@ -221,7 +232,7 @@
             <template slot="cname" slot-scope="{ row, index }">
               <span v-if="row.$cellEdit" style="display:flex">
                 <el-select
-                  v-model="row.cname"
+                  v-model="row.itemId"
                   placeholder="请选择"
                   size="small"
                   style="width:60%"
@@ -231,7 +242,7 @@
                     v-for="item in goodsoptions"
                     :key="item.id"
                     :label="item.cname"
-                    :value="item.cname"
+                    :value="item.id"
                   >
                   </el-option>
                 </el-select>
@@ -346,7 +357,10 @@
                 oninput='this.value=this.value.replace(/[^(\d)]/g,"")'
                 @change="priceChange(row)"
               ></el-input>
-              <span v-else>{{ row.orderQuantity }}</span>
+              <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
+            </template>
+            <template slot="actualQuantity" slot-scope="{ row }">
+              <span>{{ row.actualQuantity | IntegerFormat }}</span>
             </template>
             <template slot="discount" slot-scope="{ row }">
               <el-input
@@ -430,7 +444,7 @@
                 icon="el-icon-edit"
                 type="text"
                 @click="rowCell(row, index)"
-                :disabled="disabled"
+                :disabled="disabled||detailData.status == 1"
                 >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
               >
               <el-button
@@ -584,7 +598,7 @@ import {
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
 import partDialog from "@/components/part-dialog/main";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import customerDialog from "@/components/customer-dialog/main";
 import priceLibrary from "@/components/price-Library/main";
@@ -1038,6 +1052,11 @@ export default {
       this.goodsoptions = res.data.data.records;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -1087,13 +1106,42 @@ export default {
     },
     cnameChange(row) {
       this.goodsoptions.forEach(e => {
-        if (e.cname == row.cname) {
-          row.itemId = e.id;
+        if (e.id == row.itemId) {
+          row.cname = e.cname;
           row.code = e.code;
           row.priceCategory = e.goodsTypeName;
           row.itemUrl = e.url;
           row.itemDescription = e.cnameDescription;
           row.unit = e.unit;
+          row.purchaseAmount = 0;
+          row.productPrice = productCal(
+            0,
+            row.partsPrice,
+            this.form.coefficient
+          );
+          row.price = sellingCal(
+            productCal(0, row.partsPrice, this.form.coefficient),
+            this.form.exchangeRate
+          );
+          row.amount = amountCal(
+            sellingCal(
+              productCal(0, row.partsPrice, this.form.coefficient),
+              this.form.exchangeRate
+            ),
+            row.orderQuantity,
+            row.freight,
+            row.insurance,
+            row.discount
+          );
+          row.itemMargin = grossProfitCal(
+            0,
+            row.partsPrice,
+            sellingCal(
+              productCal(0, row.partsPrice, this.form.coefficient),
+              this.form.exchangeRate
+            ),
+            this.form.exchangeRate
+          );
         }
       });
     },
@@ -1686,6 +1734,10 @@ export default {
         }
       });
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(5),

+ 117 - 9
src/views/exportTrade/salesContract/index.vue

@@ -16,21 +16,34 @@
         @saveColumn="saveColumn"
         :cell-style="cellStyle"
         :summary-method="summaryMethod"
+        @expand-change="expandChange"
       >
-        <template slot-scope="scope" slot="grossProfitRate">
-          {{ scope.row.grossProfitRate }}%
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud
+            :data="row.itemData"
+            :option="itemOption"
+            :table-loading="row.itemLoading"
+            :cell-style="cellStyle"
+            class="itemTable"
+          ></avue-crud>
+        </template>
+        <template slot-scope="{ row }" slot="grossProfitRate">
+          {{ row.grossProfitRate }}%
         </template>
         <template slot-scope="{ row }" slot="createUser">
           <span>{{ row.createUserName }}</span>
         </template>
+        <template slot-scope="{ row }" slot="orderQuantity">
+          <span>{{ row.orderQuantity | IntegerFormat }}</span>
+        </template>
         <template slot="menuLeft">
           <el-button
             type="primary"
             icon="el-icon-plus"
             size="small"
             @click.stop="newAdd('new')"
-            >创建单据 </el-button
-          >
+            >创建单据
+          </el-button>
           <el-button type="success" size="small" disabled>复制单据</el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
@@ -80,7 +93,18 @@
           </el-date-picker>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpsName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
+        </template>
+        <template slot-scope="scope" slot="orderNo">
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.orderNo}}
+          </span>
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -100,7 +124,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 
@@ -110,11 +138,12 @@ import {
   getList,
   remove,
   getPorts,
-  gainUser
+  gainUser,
+  getGoodsInfo
 } from "@/api/basicData/salesContract";
 import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import _ from "lodash";
 export default {
   name: "customerInformation",
@@ -135,7 +164,56 @@ export default {
       },
       show: true,
       detailData: {},
-      loading: false
+      loading: false,
+      itemOption: {
+        align: "center",
+        header: false,
+        menu: false,
+        column: [
+          {
+            label: "产品类别",
+            prop: "priceCategory",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "产品名称",
+            prop: "cname",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "产品描述",
+            prop: "itemDescription",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "配件描述",
+            prop: "partsDescribe",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "配件价格描述",
+            prop: "partsPriceDescribe",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "数量",
+            prop: "orderQuantity",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "金额",
+            prop: "amount",
+            width: 100,
+            overHidden: true
+          }
+        ]
+      }
     };
   },
   components: { detailPage },
@@ -154,10 +232,26 @@ export default {
       this.findObject(this.option.column, "createUser").dicData = res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    expandChange(row) {
+      if (!row.itemData) {
+        getGoodsInfo({ id: row.id, tradeType: "CK" })
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data;
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定删除数据?", {
@@ -228,7 +322,15 @@ export default {
         };
         delete params.businesDate;
       }
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
       getList(page.currentPage, page.pageSize, params).then(res => {
+        if (res.data.data.records) {
+          res.data.data.records.forEach(e => {
+            e.itemLoading = true;
+          });
+        }
         this.dataList = res.data.data.records ? res.data.data.records : [];
         this.page.total = res.data.data.total;
         if (this.page.total) {
@@ -357,4 +459,10 @@ export default {
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+.itemTable ::v-deep .el-table {
+  width: 738px;
+}
 </style>

+ 13 - 42
src/views/exportTrade/shippingInquiry/config/commodity.json

@@ -1,4 +1,3 @@
-
 {
   "border": true,
   "searchMenuSpan": 8,
@@ -21,74 +20,46 @@
       "overHidden": true
     },
     {
-      "label": "商品类别",
-      "prop": "goodsTypeName",
+      "label": "商品名称",
+      "search": true,
+      "searchSpan": 16,
+      "prop": "cname",
       "index": 2,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "商品名称",
-      "search": true,
-      "searchSpan": 16,
-      "prop": "cname",
+      "label": "商品类别",
+      "prop": "goodsTypeName",
       "index": 3,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "中文规格",
+      "prop": "typeno",
       "index": 4,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品类别",
-      "prop": "category",
+      "label": "英文规格",
+      "prop": "etypeno",
       "index": 5,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "产品分类",
-      "prop": "categoryitem",
+      "label": "中文描述",
+      "prop": "nameDescription",
       "index": 6,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "供应商",
-      "prop": "providers",
-      "index": 7,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "index": 8,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "index": 9,
-      "width": 100,
-      "overHidden": true
-    },
-    {
       "label": "英文描述",
       "prop": "cnameDescription",
-      "index": 10,
-      "width": 100,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remarks",
-      "index": 11,
+      "index": 7,
       "width": 100,
       "overHidden": true
     }

+ 26 - 11
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -13,6 +13,14 @@
       <div class="add-customer-btn" v-if="showBut">
         <el-button
           type="primary"
+          size="small"
+          v-if="detailData.status == 1"
+          class="el-button--small-yh "
+          @click.stop="openEdit"
+          >编辑
+        </el-button>
+        <el-button
+          type="primary"
           :disabled="disabled && detailData.status == 1"
           @click="editCustomer('submit')"
           v-if="form.id && detailData.status != 1"
@@ -58,15 +66,9 @@
           :summary-method="summaryMethod"
           :cell-style="cellStyle"
         >
-          <!-- <template slot="menuLeft">
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click.stop="openReport()"
-              >报 表</el-button
-            >
-          </template> -->
+          <template slot-scope="{ row }" slot="orderQuantity">
+            <span>{{ row.orderQuantity | IntegerFormat }}</span>
+          </template>
         </avue-crud>
       </basic-container>
       <containerTitle title="运费明细"></containerTitle>
@@ -158,7 +160,11 @@
             <div>
               <el-scrollbar>
                 <basic-container>
-                  <avue-tree :option="treeOption" @node-click="nodeClick" :style="treeStyle"/>
+                  <avue-tree
+                    :option="treeOption"
+                    @node-click="nodeClick"
+                    :style="treeStyle"
+                  />
                 </basic-container>
               </el-scrollbar>
             </div>
@@ -214,7 +220,7 @@ import {
   commit
 } from "@/api/basicData/shippingInquiry";
 import reportDialog from "@/components/report-dialog/main";
-import { micrometerFormat } from "@/util/validate";
+import { micrometerFormat, IntegerFormat } from "@/util/validate";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import _ from "lodash";
 export default {
@@ -383,6 +389,11 @@ export default {
         res.data.data;
     });
   },
+  filters: {
+    IntegerFormat(num) {
+      return IntegerFormat(num);
+    }
+  },
   methods: {
     cellStyle() {
       return "padding:0;height:40px;";
@@ -618,6 +629,10 @@ export default {
       }
       return sums;
     },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+    },
     async saveColumn() {
       const inSave = await this.saveColumnData(
         this.getColumnName(13),

+ 10 - 2
src/views/exportTrade/shippingInquiry/index.vue

@@ -65,7 +65,11 @@
           <span>{{ row.createUserName }}</span>
         </template>
         <template slot-scope="scope" slot="corpId">
-          {{ scope.row.corpName }}
+          <span
+            style="color: #409EFF;cursor: pointer"
+            @click.stop="beforeOpenPage(scope.row, 1)"
+            >{{ scope.row.corpsName }}
+          </span>
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button
@@ -78,7 +82,11 @@
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    <detail-page
+      @goBack="goBack"
+      :detailData="detailData"
+      v-if="!show"
+    ></detail-page>
   </div>
 </template>
 

+ 31 - 2
src/views/maintenance/priceLibrary/index.vue

@@ -96,6 +96,24 @@
           ></el-input>
           <span v-else>{{ row.price }}</span>
         </template>
+        <template slot-scope="{ row }" slot="currency">
+          <el-select
+            size="small"
+            v-model="row.currency"
+            placeholder="请选择"
+            @change="currencyChange(row)"
+            v-if="row.$cellEdit"
+          >
+            <el-option
+              v-for="item in currencyList"
+              :key="item.id"
+              :label="item.dictValue"
+              :value="item.dictValue"
+            >
+            </el-option>
+          </el-select>
+          <span v-else>{{ row.currency }}</span>
+        </template>
         <template slot-scope="{ row }" slot="taxRate">
           <el-input
             v-if="row.$cellEdit"
@@ -207,7 +225,8 @@ export default {
         pageSizes: [10, 50, 100, 200, 300, 400, 500]
       },
       detailData: {},
-      loading: false
+      loading: false,
+      currencyList: []
     };
   },
   async created() {
@@ -224,6 +243,9 @@ export default {
       this.findObject(this.option.column, "goodsTypeName").dicData =
         res.data.data.records;
     });
+    this.getWorkDicts("price_library_currency").then(res => {
+      this.currencyList = res.data.data;
+    });
   },
   filters: {
     orderStateFormat(val) {
@@ -263,6 +285,13 @@ export default {
         );
       });
     },
+    currencyChange(row) {
+      this.currencyList.forEach(e => {
+        if (e.dictValue == row.currency) {
+          row.exchangeRate = e.remark;
+        }
+      });
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定删除数据?", {
@@ -284,7 +313,7 @@ export default {
     editOpen(row, index) {
       if (row.$cellEdit == true) {
         submit({ ...row, tradeType: "CK" }).then(res => {
-          console.log(res)
+          console.log(res);
           this.$set(row, "$cellEdit", false);
         });
       } else {