QuKatie 3 роки тому
батько
коміт
7bcb385876

+ 124 - 0
public/util/commodity.json

@@ -0,0 +1,124 @@
+
+{
+  "calcHeight": 80,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": true,
+  "dialogClickModal": false,
+  "column": [
+    {
+      "label": "商品编码",
+      "prop": "code",
+      "search": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品名称",
+      "prop": "cname",
+      "slot": true,
+      "minWidth": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },
+    {
+      "label": "规格编码",
+      "prop": "typeno",
+      "search": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
+      "slot": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "slot": true
+    },
+    {
+      "label": "规格尺寸",
+      "prop": "specs",
+      "slot": true
+    },
+    {
+      "label": "产品类别",
+      "prop": "category",
+      "slot": true
+    },
+    {
+      "label": "产品分类",
+      "prop": "categoryitem",
+      "slot": true
+    },
+    {
+      "label": "供应商",
+      "prop": "providers",
+      "slot": true
+    },
+    {
+      "label": "计量单位",
+      "prop": "unit",
+      "slot": true
+    },
+    {
+      "label": "包装单位",
+      "prop": "packgeunit",
+      "slot": true
+    },
+    {
+      "label": "商品图片",
+      "prop": "url",
+      "type": "upload",
+      "listType": "picture-img",
+      "dataType": "string",
+      "action": "/api/blade-resource/oss/endpoint/put-file",
+      "propsHttp": {
+        "res": "data",
+        "url": "link"
+      },
+      "hide": true,
+      "span": 24
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "slot": true
+    }
+  ]
+}

+ 23 - 0
src/api/saveColumn.js

@@ -0,0 +1,23 @@
+import request from '@/router/axios';
+
+export const saveColumn = (data) => {
+  return request({
+    url: '/api/blade-client/tablemessage/save',
+    method: 'post',
+    data: data
+  })
+}
+export const getColumn = (query) => {
+  return request({
+    url: '/api/blade-client/tablemessage/detail',
+    method: 'get',
+    params: query
+  })
+}
+
+export const getJson = (url) => {
+  return request({
+    url: url,
+    method: 'get',
+  })
+}

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

@@ -0,0 +1,7 @@
+export const columnName = [{
+  code: 0,
+  name: '出口报价单'
+}, {
+  code: 1,
+  name: '出口采购订单'
+}]

+ 0 - 2
src/main.js

@@ -55,7 +55,6 @@ Vue.use(avueUeditor);
 //自定义标题
 import containerTitle from './components/titleComponent/main.vue';
 Vue.component('containerTitle', containerTitle);
-
 // 加载相关url地址
 Object.keys(urls).forEach(key => {
   Vue.prototype[key] = urls[key];
@@ -70,7 +69,6 @@ iconfontVersion.forEach(ele => {
 });
 
 Vue.config.productionTip = false;
-
 new Vue({
   router,
   store,

+ 43 - 0
src/views/basicData/commodityType/configuration/specification.json

@@ -0,0 +1,43 @@
+
+{
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "align": "center",
+  "menuWidth": 130,
+  "column": [
+    {
+      "label": "规格名称",
+      "prop": "cname",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "材质",
+      "prop": "texture",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "颜色",
+      "prop": "colour",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "描述",
+      "prop": "describe",
+      "minWidth": 100,
+      "cell": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "minWidth": 100,
+      "cell": true
+    }
+  ]
+}

Різницю між файлами не показано, бо вона завелика
+ 445 - 265
src/views/basicData/commodityType/detailsPageEdit.vue


+ 15 - 15
src/views/exportTrade/customerInquiry/config/mainList.json

@@ -14,14 +14,14 @@
       "prop": "sysNo",
       "search": true,
       "index": 1,
-      "minWidth": 60,
+      "width": 60,
       "overHidden": true
     }, {
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
       "index": 2,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     },
     {
@@ -29,7 +29,7 @@
       "prop": "orderStatus",
       "search": true,
       "index": 4,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true,
       "type": "select",
       "dicUrl": "/api/blade-system/dict-biz/dictionary?code=order_status",
@@ -41,27 +41,27 @@
       "label": "联系人",
       "prop": "corpAttn",
       "index": 5,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "电话",
       "prop": "corpTel",
       "index": 6,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "起运港",
       "prop": "portOfLoad",
       "search": true,
       "index": 7,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "目的港",
       "prop": "portOfDestination",
       "search": true,
       "index": 8,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true,
       "type": "select",
       "filterable":true,
@@ -74,20 +74,20 @@
       "label": "运输方式",
       "prop": "transport",
       "index": 9,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "价格条款",
       "prop": "priceTerms",
       "index": 10,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "订单日期",
       "prop": "businesDate",
       "search": true,
       "index": 12,
-      "minWidth": 100,
+      "width": 100,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -96,7 +96,7 @@
       "label": "有效日期",
       "prop": "dateValidity",
       "index": 13,
-      "minWidth": 80,
+      "width": 80,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd 00:00:00",
@@ -105,25 +105,25 @@
       "label": "收款方式",
       "prop": "paymentType",
       "index": 14,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "币别",
       "prop": "currency",
       "index": 15,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 16,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }, {
       "label": "备注",
       "prop": "orderRemark",
       "index": 20,
-      "minWidth": 80,
+      "width": 80,
       "overHidden": true
     }
   ]

+ 32 - 4
src/views/exportTrade/customerInquiry/index.vue

@@ -14,6 +14,7 @@
         @refresh-change="refreshChange"
         @on-load="onLoad"
         :table-loading="loading"
+        @saveColumn="saveColumn"
       >
         <template slot="portOfLoadSearch">
           <port-info v-model="search.portOfLoad" />
@@ -83,10 +84,13 @@
 </template>
 
 <script>
-import option from "./config/mainList.json";
+import mainOption from "./config/mainList.json";
 import { getList, remove } from "@/api/basicData/customerInquiry";
 import detailPage from "./detailsPage.vue";
-
+import { saveColumn, getColumn, getJson } from "@/api/saveColumn";
+import {columnName} from "@/enums/column-name"
+let columnKey=columnName[0].name
+console.log(columnKey)
 export default {
   name: "customerInformation",
   data() {
@@ -100,7 +104,7 @@ export default {
       },
       search: {},
       form: {},
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -114,7 +118,19 @@ export default {
     };
   },
   components: { detailPage },
-  created() {
+  async created() {
+    const localData = JSON.parse(localStorage.getItem(columnKey) || null);
+    if (localData != null) {
+      this.option = localData;
+    } else {
+      const res = await getColumn({ fileName: columnKey });
+      console.log(res.data.data);
+      this.option =
+        res.data.data != null
+          ? JSON.parse(res.data.data.jsonMessage)
+          : mainOption;
+      localStorage.setItem(columnKey, JSON.stringify(this.option));
+    }
     let _this = this;
     this.option.column.forEach(e => {
       if (e.prop == "exchangeRate") {
@@ -210,6 +226,18 @@ export default {
     goBack() {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+    },
+    saveColumn(row, column) {
+      saveColumn({
+        fileName: columnKey,
+        jsonMessage: JSON.stringify(this.option)
+      }).then(res => {
+        if (res.data.code == 200) {
+          this.$message.success("保存成功");
+          localStorage.setItem(columnKey, JSON.stringify(this.option));
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      });
     }
   }
 };

Деякі файли не було показано, через те що забагато файлів було змінено