Ver código fonte

添加下拉框

QuKatie 3 anos atrás
pai
commit
92564c267a

+ 22 - 14
src/api/basicData/customerInquiry.js

@@ -46,25 +46,25 @@ export function remove(data) {
   })
 }
 //获取商品
-export const getGoods = (current, size,goodsTypeId) => {
+export const getGoods = (current, size, goodsTypeId) => {
   return request({
-      url: '/api//blade-client/goodsdesc/selectGoods',
-      method: 'get',
-      params: {
-          current,
-          size,
-          goodsTypeId,
-      }
+    url: '/api//blade-client/goodsdesc/selectGoods',
+    method: 'get',
+    params: {
+      current,
+      size,
+      goodsTypeId,
+    }
   })
 }
 //树形
 export const getDeptLazyTree = (parentId) => {
   return request({
-      url: '/api/blade-client/goodstype/lazy-tree',
-      method: 'get',
-      params: {
-          parentId
-      }
+    url: '/api/blade-client/goodstype/lazy-tree',
+    method: 'get',
+    params: {
+      parentId
+    }
   })
 }
 //生成采购询价单
@@ -93,4 +93,12 @@ export function getPorts() {
     url: '/api/blade-client/port/listPort',
     method: 'get',
   })
-}
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -66,4 +66,12 @@ export const getDeptLazyTree = (parentId) => {
           parentId
       }
   })
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
 }

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

@@ -73,4 +73,12 @@ export function getPorts() {
     url: '/api/blade-client/port/listPort',
     method: 'get',
   })
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
 }

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

@@ -84,3 +84,18 @@ export function getPorts() {
     method: 'get',
   })
 }
+//获取系统号
+export function getSysNo() {
+  return request({
+    url: '/api/trade-purchase/purchase-order/getSysNo?prefix=CK-XS',
+    method: 'get',
+  })
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
+}

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

@@ -73,4 +73,12 @@ export function getPorts() {
     url: '/api/blade-client/port/listPort',
     method: 'get',
   })
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
 }

+ 8 - 0
src/api/exportTrade/purchaseContract.js

@@ -88,3 +88,11 @@ export function getSysNo() {
     method: 'get',
   })
 }
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
+}

+ 8 - 0
src/api/exportTrade/receipt.js

@@ -66,4 +66,12 @@ export const getDeptLazyTree = (parentId) => {
           parentId
       }
   })
+}
+//规格
+export function getSpecification(query) {
+  return request({
+    url: '/api/blade-client/client/get_Specification',
+    method: 'get',
+    params: query
+  })
 }

+ 0 - 1
src/enums/column-name.js

@@ -42,7 +42,6 @@ const columnName = [{
   name: '出口船务询价商品信息'
 }]
 export const getColumnName = (key) => {
-  console.log(key)
   for (let index = 0; index < columnName.length; index++) {
     const element = columnName[index];
     if (element.code === key) {

+ 17 - 18
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -8,34 +8,34 @@
   "addBtn": false,
   "delBtn":false,
   "align": "center",
-  "menuWidth": 80,
+  "menuWidth": 100,
   "refreshBtn": false,
   "column": [{
       "label": "产品类别",
       "prop": "priceCategory",
       "index": 1,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "产品编号",
       "prop": "code",
       "index": 2,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "产品名称",
       "prop": "cname",
       "index": 3,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "产品属性",
       "prop": "itemProp",
       "index": 4,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -49,7 +49,7 @@
       "label": "产品照片",
       "prop": "itemUrl",
       "index": 5,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true,
       "hide": true
     },
@@ -57,7 +57,7 @@
       "label": "产品描述",
       "prop": "itemDescription",
       "index": 6,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true,
       "cell": true
     },
@@ -65,21 +65,20 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "minWidth": 80,
-      "cell": true
+      "minWidth": 100
     },
     {
       "label": "单价",
       "prop": "price",
       "index": 8,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "计价单位",
       "prop": "unit",
       "index": 9,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -93,14 +92,14 @@
       "label": "数量",
       "prop": "orderQuantity",
       "index": 10,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "价格条款",
       "prop": "tradeTerms",
       "index": 11,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true,
       "cell": true,
       "type": "select",
@@ -114,35 +113,35 @@
       "label": "金额",
       "prop": "amount",
       "index": 12,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "税率",
       "prop": "taxRate",
       "index": 13,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "保险",
       "prop": "insurance",
       "index": 14,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "运费",
       "prop": "freight",
       "index": 15,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {
       "label": "折扣",
       "prop": "discount",
       "index": 16,
-      "minWidth": 80,
+      "minWidth": 100,
       "overHidden": true
     },
     {

+ 32 - 3
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -168,6 +168,26 @@
             ></el-input>
             <span v-else>{{ row.taxRate | isPercentage }}</span>
           </template>
+          <template slot="itemType" slot-scope="{ row }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.itemType"
+              filterable
+              allow-create
+              default-first-option
+              placeholder="请输入"
+              @focus="itemTypeFocus(row)"
+            >
+              <el-option
+                v-for="(item, index) in itemtypeList"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.itemType }}</span>
+          </template>
         </avue-crud>
       </basic-container>
       <fee-info
@@ -248,7 +268,8 @@ import {
   getGoods,
   savePurchase,
   saveShipping,
-  getPorts
+  getPorts,
+  getSpecification
 } from "@/api/basicData/customerInquiry";
 import reportDialog from "@/components/report-dialog/main";
 import { isDiscount, isPercentage, micrometerFormat } from "@/util/validate";
@@ -258,6 +279,7 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      itemtypeList: [],
       configuration: {
         multipleChoices: false,
         multiple: false,
@@ -498,6 +520,13 @@ export default {
     }
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     priceChange(row) {
       if (!row.price) {
         row.price = 0;
@@ -693,7 +722,7 @@ export default {
               this.oldorderFeesList = this.deepClone(
                 res.data.data.orderFeesList
               );
-              if(status=='goBack'){
+              if (status == "goBack") {
                 this.$emit("goBack");
               }
             }
@@ -717,7 +746,7 @@ export default {
           type: "warning"
         })
           .then(() => {
-            this.editCustomer('goBack');
+            this.editCustomer("goBack");
           })
           .catch(() => {
             this.$emit("goBack");

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

@@ -74,8 +74,7 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 8,
-      "minWidth": 80,
-      "cell": true
+      "minWidth": 80
     },
     {
       "label": "包装要求",

+ 32 - 3
src/views/exportTrade/invoice/detailsPage.vue

@@ -60,6 +60,26 @@
               >报 表</el-button
             >
           </template>
+          <template slot="itemType" slot-scope="{ row }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.itemType"
+              filterable
+              allow-create
+              default-first-option
+              placeholder="请输入"
+              @focus="itemTypeFocus(row)"
+            >
+              <el-option
+                v-for="(item, index) in itemtypeList"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.itemType }}</span>
+          </template>
           <template slot="taxRate" slot-scope="{ row }">
             <el-input
               v-if="row.$cellEdit"
@@ -191,7 +211,8 @@ import {
   submit,
   delItem,
   getDeptLazyTree,
-  getGoods
+  getGoods,
+  getSpecification
 } from "@/api/basicData/invoice";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
@@ -241,7 +262,7 @@ export default {
         menuBtn: false,
         labelWidth: 100,
         column: [
-                    {
+          {
             label: "客户名称",
             prop: "corpId",
             rules: [
@@ -374,7 +395,8 @@ export default {
       selectionList: [],
       treeDeptId: null,
       orderFeesList: [],
-      orderFilesList: []
+      orderFilesList: [],
+      itemtypeList:[]
     };
   },
   props: {
@@ -418,6 +440,13 @@ export default {
     });
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     //编辑
     rowCell(row, index) {
       if (row.$cellEdit == true) {

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

@@ -66,8 +66,7 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "minWidth": 80,
-      "cell": true
+      "minWidth": 80
     },
     {
       "label": "数量",

+ 31 - 4
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -75,6 +75,26 @@
               ></el-input>
               <span v-else>{{ row.orderQuantity }}</span>
             </template>
+            <template slot="itemType" slot-scope="{ row }">
+              <el-select
+                v-if="row.$cellEdit"
+                v-model="row.itemType"
+                filterable
+                allow-create
+                default-first-option
+                placeholder="请输入"
+                @focus="itemTypeFocus(row)"
+              >
+                <el-option
+                  v-for="(item, index) in itemtypeList"
+                  :key="index"
+                  :label="item.value"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <span v-else>{{ row.itemType }}</span>
+            </template>
             <template slot="menuLeft">
               <el-button
                 type="primary"
@@ -195,9 +215,8 @@ import {
   delItem,
   getDeptLazyTree,
   getGoods,
-  deliverGoods,
-  getPorts,
-  getSysNo
+  getSysNo,
+  getSpecification
 } from "@/api/exportTrade/purchaseContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
@@ -452,7 +471,8 @@ export default {
       treeDeptId: null,
       orderFeesList: [],
       orderFilesList: [],
-      orderItemIds: []
+      orderItemIds: [],
+      itemtypeList:[]
     };
   },
   props: {
@@ -501,6 +521,13 @@ export default {
     }
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     priceChange(row) {
       console.log(row);
       if (!row.price) {

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

@@ -64,8 +64,7 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "minWidth": 80,
-      "cell": true
+      "minWidth": 80
     },
     {
       "label": "数量",

+ 31 - 2
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -81,6 +81,26 @@
             ></el-input>
             <span v-else>{{ row.orderQuantity }}</span>
           </template>
+          <template slot="itemType" slot-scope="{ row }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.itemType"
+              filterable
+              allow-create
+              default-first-option
+              placeholder="请输入"
+              @focus="itemTypeFocus(row)"
+            >
+              <el-option
+                v-for="(item, index) in itemtypeList"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.itemType }}</span>
+          </template>
           <template slot="menuLeft">
             <el-button
               type="primary"
@@ -177,7 +197,8 @@ import {
   delItem,
   getDeptLazyTree,
   getGoods,
-  getPorts
+  getPorts,
+  getSpecification
 } from "@/api/basicData/purchaseInquiry";
 import reportDialog from "@/components/report-dialog/main";
 import { isvalidatemobile, validatename } from "@/util/validate";
@@ -411,7 +432,8 @@ export default {
       data: [],
       goodsList: [],
       selectionList: [],
-      treeDeptId: null
+      treeDeptId: null,
+      itemtypeList:[]
     };
   },
   props: {
@@ -455,6 +477,13 @@ export default {
     });
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     priceChange(row) {
       console.log(row);
       if (!row.price) {

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

@@ -71,6 +71,26 @@
             />
             <span v-else>{{ row.taxRate }}</span>
           </template>
+          <template slot="specificationAndModel" slot-scope="{ row }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.specificationAndModel"
+              filterable
+              allow-create
+              default-first-option
+              placeholder="请输入"
+              @focus="itemTypeFocus(row)"
+            >
+              <el-option
+                v-for="(item, index) in itemtypeList"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.itemType }}</span>
+          </template>
           <template slot="menu" slot-scope="{ row, index }">
             <el-button
               size="small"
@@ -191,7 +211,8 @@ import {
   submit,
   delItem,
   getDeptLazyTree,
-  getGoods
+  getGoods,
+  getSpecification
 } from "@/api/exportTrade/receipt";
 import uploadFile from "@/components/upload-file/main";
 import reportDialog from "@/components/report-dialog/main";
@@ -357,7 +378,8 @@ export default {
       selectionList: [],
       treeDeptId: null,
       orderFeesList: [],
-      orderFilesList: []
+      orderFilesList: [],
+      itemtypeList:[]
     };
   },
   props: {
@@ -398,6 +420,13 @@ export default {
     });
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     //编辑
     rowCell(row, index) {
       if (row.$cellEdit == true) {
@@ -468,7 +497,7 @@ export default {
           itemUrl: e.url,
           packageRemarks: null,
           productDesc: null,
-          specificationAndModel: e.specs,
+          specificationAndModel: null,
           actualQuantity: 0,
           tradeTerms: null,
           price: 0,

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

@@ -66,8 +66,7 @@
       "label": "产品型号",
       "prop": "itemType",
       "index": 7,
-      "minWidth": 80,
-      "cell": true
+      "minWidth": 80
     },
     {
       "label": "数量",

+ 43 - 7
src/views/exportTrade/salesContract/detailsPage.vue

@@ -87,6 +87,26 @@
               ></el-input>
               <span v-else>{{ row.orderQuantity }}</span>
             </template>
+            <template slot="itemType" slot-scope="{ row }">
+              <el-select
+                v-if="row.$cellEdit"
+                v-model="row.itemType"
+                filterable
+                allow-create
+                default-first-option
+                placeholder="请输入"
+                @focus="itemTypeFocus(row)"
+              >
+                <el-option
+                  v-for="(item, index) in itemtypeList"
+                  :key="index"
+                  :label="item.value"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <span v-else>{{ row.itemType }}</span>
+            </template>
             <template slot="menuLeft">
               <el-button
                 type="primary"
@@ -228,7 +248,9 @@ import {
   getDeptLazyTree,
   getGoods,
   deliverGoods,
-  getPorts
+  getPorts,
+  getSysNo,
+  getSpecification
 } from "@/api/basicData/salesContract";
 import _ from "lodash";
 import reportDialog from "@/components/report-dialog/main";
@@ -293,7 +315,8 @@ export default {
           {
             label: "系统号",
             prop: "sysNo",
-            span: 8
+            span: 8,
+            disabled: true
           },
           {
             label: "订单状态",
@@ -519,7 +542,8 @@ export default {
       treeDeptId: null,
       orderFeesList: [],
       orderFilesList: [],
-      orderItemIds: []
+      orderItemIds: [],
+      itemtypeList:[]
     };
   },
   props: {
@@ -566,8 +590,20 @@ export default {
       this.findObject(this.option.column, "portOfDestination").dicData =
         res.data;
     });
+    if (this.detailData.pageType == "new") {
+      getSysNo().then(res => {
+        this.form.sysNo = res.data.data;
+      });
+    }
   },
   methods: {
+    itemTypeFocus(row) {
+      this.itemtypeList = [];
+      getSpecification({ goodId: row.itemId }).then(res => {
+        const data = res.data.data;
+        this.itemtypeList = data.map(item => ({ value: item }));
+      });
+    },
     priceChange(row) {
       console.log(row);
       if (!row.price) {
@@ -739,13 +775,13 @@ export default {
       if (this.$store.getters.outStatus) {
         this.$alert("出口发货单存在,请保存发货单再进行操作", "温馨提示", {
           confirmButtonText: "确定",
-          type: 'warning',
+          type: "warning",
           callback: action => {
-           console.log(action)
+            console.log(action);
           }
         });
       } else {
-        this.inInvoice()
+        this.inInvoice();
       }
     },
     inInvoice() {
@@ -776,7 +812,7 @@ export default {
             delete data.updateTime;
             delete data.isDeleted;
             delete data.orderStatus;
-            this.$router.$avueRouter.closeTag('/exportTrade/invoice/index');
+            this.$router.$avueRouter.closeTag("/exportTrade/invoice/index");
             this.$router.push({
               path: "/exportTrade/invoice/index",
               query: {

+ 6 - 3
src/views/exportTrade/salesContract/index.vue

@@ -19,7 +19,7 @@
             type="primary"
             icon="el-icon-plus"
             size="small"
-            @click.stop="newAdd()"
+            @click.stop="newAdd('new')"
             >新单</el-button
           >
           <el-button type="success" size="small" disabled>复制新单</el-button>
@@ -177,7 +177,7 @@ export default {
         params.orderStartDate = params.businesDate[0];
         params.orderEndDate = params.businesDate[1];
       }
-      delete params.businesDate
+      delete params.businesDate;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
       done();
@@ -203,7 +203,10 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
-    newAdd() {
+    newAdd(type) {
+      this.detailData = {
+        pageType: type
+      };
       this.show = false;
     },
     goBack() {