caojunjie 2 лет назад
Родитель
Сommit
b8a7153794

+ 11 - 1
src/api/basicData/customerInquiry.js

@@ -133,6 +133,16 @@ export const getPricebank = (current, size, params) => {
     }
   })
 }
+//所有价格库
+export const getPricebankAll = (params) => {
+  return request({
+    url: '/api/blade-mocha-item/pricebank/pageListAll',
+    method: 'get',
+    params: {
+      ...params
+    }
+  })
+}
 //商品类别列表查询
 export const getGoodstype = (current, size, data) => {
   return request({
@@ -202,4 +212,4 @@ export const calculationDomesticFees = (data) => {
     method: 'post',
     data: data
   })
-}
+}

+ 1 - 1
src/views/basicData/commodityType/detailsPageEdit.vue

@@ -24,7 +24,7 @@
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <avue-input-tree v-if="item.prop === 'goodsTypeId'" leaf-only multiple style="width: 100%;"
                   :props="{ label: 'title' }" v-model="form[item.prop]" placeholder=" " type="tree" size="small"
-                  dataType="string" :dic="dicData" />
+                  dataType="string" :dic="dicData" tags/>
                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small"
                   autocomplete="off" placeholder=" "></el-input>
                 <el-select v-else-if="item.type === 'select'" style="width: 100%" v-model="form[item.prop]" size="small"

+ 37 - 30
src/views/exportTrade/customerInquiry/components/goodsInfo.vue

@@ -57,9 +57,12 @@
             //产品名称
             <template slot="cnameForm" slot-scope="{type,disabled}">
                 <span style="display:flex">
-                    <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small" filterable
-                        @change="cnameChange(goodsForm)">
-                        <el-option v-for="item in goodsoptions" :key="item.itemId" :label="item.cname"
+                    <el-select v-model="goodsForm.itemId" placeholder="请选择" size="small"
+                               @change="cnameChange(goodsForm)">
+                        <el-option
+                            v-for="item in goodsoptions"
+                            :key="item.itemId"
+                            :label="item.cname"
                             :value="item.itemId">
                         </el-option>
                     </el-select>
@@ -251,12 +254,13 @@
             </template>
             //产品型号
             <template slot="itemTypeForm" slot-scope="{type,disabled}">
-                <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"
-                    size="small" @focus="itemTypeFocus(goodsForm)">
-                    <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"
-                        :value="item.value">
-                    </el-option>
-                </el-select>
+              <el-input v-model="goodsForm.itemType" placeholder="请输入内容"></el-input>
+<!--                <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"-->
+<!--                    size="small" @focus="itemTypeFocus(goodsForm)">-->
+<!--                    <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value"-->
+<!--                        :value="item.value">-->
+<!--                    </el-option>-->
+<!--                </el-select>-->
             </template>
         </avue-crud>
         <!-- <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
@@ -304,14 +308,14 @@ import priceLibrary from "@/components/price-Library/main";
 import propertyDialog from "@/components/property-dialog/main";
 import { dateFormat } from "@/util/date";
 import {
-    delItem,
-    getDeptLazyTree,
-    getGoods,
-    savePurchase,
-    saveShipping,
-    getSpecification,
-    getPricebank,
-    calculationDomesticFees
+  delItem,
+  getDeptLazyTree,
+  getGoods,
+  savePurchase,
+  saveShipping,
+  getSpecification,
+  getPricebank,
+  calculationDomesticFees, getPricebankAll
 } from "@/api/basicData/customerInquiry";
 import {
     sum,
@@ -434,18 +438,21 @@ export default {
         this.getWorkDicts("unit").then(res => {
             this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
         });
-        getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
-            if (res.data.data.total > 0) {
-                this.goodsoptions = res.data.data.records;
-                if (Math.ceil(res.data.data.total / 10) > 1) {
-                    for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-                        getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
-                            this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-                        });
-                    }
-                }
-            }
-        });
+        getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res=>{
+          this.goodsoptions = res.data.data
+        })
+      // getPricebank(1, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res => {
+      //   if (res.data.data.total > 0) {
+      //     this.goodsoptions = res.data.data.records;
+      //     if (Math.ceil(res.data.data.total / 10) > 1) {
+      //       for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+      //         getPricebank(i, 10, { billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(e => {
+      //           this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+      //         });
+      //       }
+      //     }
+      //   }
+      // });
     },
     methods: {
         cellStyle() {
@@ -613,7 +620,7 @@ export default {
                     row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
                     row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
                     row.taxRate = 0;
-                    row.unit = 'PCS';
+                    row.unit = e.unit;
                     row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
                     row.partsDescribe = null;
                     row.remarks = null;

+ 2 - 1
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -15,6 +15,7 @@
     "dialogDrag": true,
     "summaryText": "合计",
     "dialogWidth":"80%",
+    "dialogTop":"25",
     "sumColumnList": [
         {
             "name": "orderQuantity",
@@ -412,4 +413,4 @@
             "span": 12
         }
     ]
-}
+}

+ 29 - 24
src/views/exportTrade/salesContract/components/goodsInfo.vue

@@ -230,11 +230,12 @@
       </template>
       //产品型号
       <template slot="itemTypeForm" slot-scope="{type,disabled}">
-        <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"
-          size="small" @focus="itemTypeFocus(goodsForm)">
-          <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">
-          </el-option>
-        </el-select>
+        <el-input v-model="goodsForm.itemType" placeholder="请输入内容"></el-input>
+<!--        <el-select v-model="goodsForm.itemType" filterable allow-create default-first-option placeholder="请输入"-->
+<!--          size="small" @focus="itemTypeFocus(goodsForm)">-->
+<!--          <el-option v-for="(item, index) in itemtypeList" :key="index" :label="item.value" :value="item.value">-->
+<!--          </el-option>-->
+<!--        </el-select>-->
       </template>
     </avue-crud>
     <!-- <el-dialog title="导入商品" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
@@ -304,6 +305,7 @@ import {
   divide
 } from "@/util/calculate";
 import _ from "lodash";
+import {getPricebankAll} from "@/api/basicData/customerInquiry";
 export default {
   name: "customerInformation",
   data() {
@@ -414,24 +416,27 @@ export default {
     this.getWorkDicts("unit").then(res => {
       this.findObject(this.tableOption.column, "unit").dicData = res.data.data;
     });
-    getPricebank(1, 10, {
-      billType: "CG",
-      statusTime: dateFormat(new Date(), "yyyy-MM-dd")
-    }).then(res => {
-      if (res.data.data.total > 0) {
-        this.goodsoptions = res.data.data.records;
-        if (Math.ceil(res.data.data.total / 10) > 1) {
-          for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
-            getPricebank(i, 10, {
-              billType: "CG",
-              statusTime: dateFormat(new Date(), "yyyy-MM-dd")
-            }).then(e => {
-              this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
-            });
-          }
-        }
-      }
-    });
+    getPricebankAll({ billType: "CG", statusTime: dateFormat(new Date(), "yyyy-MM-dd") }).then(res=>{
+      this.goodsoptions = res.data.data
+    })
+    // getPricebank(1, 10, {
+    //   billType: "CG",
+    //   statusTime: dateFormat(new Date(), "yyyy-MM-dd")
+    // }).then(res => {
+    //   if (res.data.data.total > 0) {
+    //     this.goodsoptions = res.data.data.records;
+    //     if (Math.ceil(res.data.data.total / 10) > 1) {
+    //       for (let i = 2; i <= Math.ceil(res.data.data.total / 10); i++) {
+    //         getPricebank(i, 10, {
+    //           billType: "CG",
+    //           statusTime: dateFormat(new Date(), "yyyy-MM-dd")
+    //         }).then(e => {
+    //           this.goodsoptions = this.goodsoptions.concat(e.data.data.records);
+    //         });
+    //       }
+    //     }
+    //   }
+    // });
   },
   methods: {
     cellStyle() {
@@ -606,7 +611,7 @@ export default {
           row.price = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
           row.amount = sellingCal(productCal(e.purchaseAmount, 0, this.form.coefficient), this.form.exchangeRate);
           row.taxRate = 0;
-          row.unit = 'PCS';
+          row.unit = e.unit;
           row.itemMargin = grossProfitCal(e.purchaseAmount, 0, sellingCal(productCal(e.purchaseAmount, 0, this
             .form.coefficient), this.form.exchangeRate), this.form.exchangeRate);
           row.partsDescribe = null;

+ 2 - 1
src/views/exportTrade/salesContract/config/customerContact.json

@@ -15,7 +15,8 @@
   "indexSlot": true,
   "tip": false,
   "summaryText": "合计",
-  "dialogWidth": "80%",
+  "dialogWidth": "90%",
+  "dialogTop":"25",
   "sumColumnList": [{
       "name": "orderQuantity",
       "type": "sum"

+ 9 - 0
src/views/maintenance/priceLibrary/config/mainList.json

@@ -52,6 +52,15 @@
       "overHidden": true
     },
     {
+      "label": "计价单位",
+      "prop": "unit",
+      "search": true,
+      "searchSpan": 8,
+      "index": 4.1,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "产品属性",
       "prop": "goodNature",
       "index": 5,