QuKatie hace 3 años
padre
commit
fc5fbdc92c

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

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,

+ 5 - 3
src/views/exportTrade/customerInquiry/index.vue

@@ -138,11 +138,13 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},
-      loading: false
+      loading: false,
+      selectionList:[]
     };
   },
   components: { detailPage },
@@ -203,7 +205,7 @@ export default {
       });
     },
     selectionChange(list){
-
+      this.selectionList=list
     },
     //查看跳转页面
     beforeOpenPage(row, status) {

+ 1 - 1
src/views/exportTrade/invoice/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "searchLabelWidth": "90",
   "showSummary": true,
   "searchIcon": true,

+ 2 - 1
src/views/exportTrade/invoice/index.vue

@@ -134,7 +134,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 1 - 1
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "searchLabelWidth": "90",
   "searchIcon": true,
   "searchIndex": 2,

+ 2 - 1
src/views/exportTrade/purchaseContract/index.vue

@@ -136,7 +136,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 1 - 1
src/views/exportTrade/purchaseInquiry/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "searchIcon": true,
   "searchIndex": 2,
   "showSummary": true,

+ 2 - 1
src/views/exportTrade/purchaseInquiry/index.vue

@@ -123,7 +123,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 1 - 1
src/views/exportTrade/receipt/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "searchLabelWidth": "90",
   "showSummary": true,
   "searchIcon": true,

+ 2 - 1
src/views/exportTrade/receipt/index.vue

@@ -118,7 +118,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 1 - 1
src/views/exportTrade/salesContract/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "150",
+  "menuWidth": "120",
   "searchIcon": true,
   "searchIndex": 2,
   "searchLabelWidth": 90,

+ 2 - 1
src/views/exportTrade/salesContract/index.vue

@@ -140,7 +140,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 1 - 1
src/views/exportTrade/shippingInquiry/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "80",
+  "menuWidth": "70",
   "searchIcon": true,
   "searchIndex": 2,
   "selection": true,

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

@@ -111,7 +111,8 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
       show: true,
       detailData: {},

+ 68 - 19
src/views/maintenance/priceLibrary/config/mainList.json

@@ -8,7 +8,7 @@
   "delBtn": false,
   "addBtn": false,
   "align": "center",
-  "menuWidth": "180",
+  "menuWidth": "120",
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
@@ -54,19 +54,26 @@
       "overHidden": true
     },
     {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 100,
+      "index": 6,
+      "overHidden": true
+    },
+    {
       "label": "FOB系数",
       "prop": "coefficient",
-      "index": 6,
+      "index": 7,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "价格类型",
       "prop": "billType",
-      "index": 7,
+      "index": 8,
       "width": 100,
       "overHidden": true,
-      "dicData":[],
+      "dicData": [],
       "props": {
         "label": "dictValue",
         "value": "dictKey"
@@ -75,84 +82,126 @@
     {
       "label": "最新价格",
       "prop": "price",
-      "index": 8,
+      "index": 9,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "美元价格",
+      "prop": "greenback",
+      "index": 10,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "采购价格",
+      "prop": "purchaseAmount",
+      "index": 11,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "税率",
+      "prop": "taxRate",
+      "index": 12,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "商品类别",
+      "prop": "goodsTypeName",
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "是否重点推荐",
+      "prop": "priorityReferrer",
+      "index": 14,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "推荐理由",
+      "prop": "referrerReason",
+      "index": 15,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格1",
       "prop": "priceOne",
-      "index": 9,
+      "index": 16,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格1日期",
+      "label": "历史日期1",
       "prop": "priceOneTime",
-      "index": 10,
+      "index": 17,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格2",
       "prop": "priceTwo",
-      "index": 11,
+      "index": 18,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格2日期",
+      "label": "历史日期2",
       "prop": "priceTwoTime",
-      "index": 12,
+      "index": 19,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "历史价格3",
       "prop": "priceThree",
-      "index": 13,
+      "index": 20,
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "历史价格3日期",
+      "label": "历史日期3",
       "prop": "priceThreeTime",
-      "index": 14,
+      "index": 21,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
-      "index": 15,
+      "index": 22,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "有效期开始",
       "prop": "startTime",
-      "index": 16,
+      "index": 23,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "有效期结束",
       "prop": "endTime",
-      "index": 17,
+      "index": 24,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "业务员",
       "prop": "person",
-      "index": 18,
+      "index": 25,
       "width": 100,
       "overHidden": true
     },
     {
       "label": "状态",
       "prop": "status",
-      "index": 18,
+      "index": 26,
       "width": 100,
       "overHidden": true
     }

+ 68 - 61
src/views/maintenance/priceLibrary/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container v-if="show" class="page-crad">
+    <basic-container class="page-crad">
       <avue-crud
         ref="crud"
         :option="option"
@@ -23,9 +23,16 @@
             type="primary"
             icon="el-icon-plus"
             size="small"
-            @click.stop="newAdd()"
-            >新单</el-button
+            @click.stop="excelBox = !excelBox"
+            >导入</el-button
           >
+          <el-button
+            type="success"
+            icon="el-icon-upload2"
+            size="small"
+            @click="derivation()"
+            >下载模板
+          </el-button>
           <el-button type="info" size="small">报表</el-button>
         </template>
         <template slot="cnameSearch">
@@ -52,13 +59,6 @@
         <template slot-scope="scope" slot="menu">
           <el-button
             type="text"
-            icon="el-icon-view"
-            size="small"
-            @click.stop="beforeOpenPage(scope.row, 1)"
-            >查看
-          </el-button>
-          <el-button
-            type="text"
             icon="el-icon-edit"
             size="small"
             @click.stop="editOpen(scope.row, 2)"
@@ -73,15 +73,26 @@
           </el-button>
         </template>
       </avue-crud>
+      <el-dialog
+        title="导入价格"
+        append-to-body
+        :visible.sync="excelBox"
+        width="555px"
+      >
+        <avue-form
+          :option="excelOption"
+          v-model="excelForm"
+          :upload-after="uploadAfter"
+        />
+      </el-dialog>
     </basic-container>
-    <detail-page @goBack="goBack" :detailData="detailData" v-else></detail-page>
   </div>
 </template>
 
 <script>
 import option from "./config/mainList.json";
+import { getToken } from "@/util/auth";
 import { getList, remove } from "@/api/maintenance/priceLibrary";
-import detailPage from "./detailsPage.vue";
 import { defaultDate } from "@/util/date";
 import { micrometerFormat } from "@/util/validate";
 import { orderStateFormat } from "@/enums/order-stauts";
@@ -90,6 +101,27 @@ export default {
   name: "customerInformation",
   data() {
     return {
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "导入数据",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "导入数据中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-mocha-item/pricebank/importPrice"
+          }
+        ]
+      },
+      excelBox: false,
+      excelForm: {},
       goodsConfiguration: {
         multipleChoices: false,
         multiple: false,
@@ -116,14 +148,13 @@ export default {
       page: {
         pageSize: 10,
         currentPage: 1,
-        total: 0
+        total: 0,
+        pageSizes:[10,50,100,200,300,400,500]
       },
-      show: true,
       detailData: {},
       loading: false
     };
   },
-  components: { detailPage },
   async created() {
     /**
      * 已定义全局方法,直接使用,getColumnData获取列数据,参数传值(表格名称,引入的本地JSON的数据定义的名称)
@@ -131,28 +162,8 @@ export default {
      * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
      */
     this.option = await this.getColumnData(this.getColumnName(50), option);
-    let _this = this;
-    this.option.column.forEach(e => {
-      if (e.prop == "exchangeRate") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.exchangeRate ? row.exchangeRate : 0) / 100,
-            "0.00%"
-          );
-        };
-      }
-      if (e.prop == "creditAmount") {
-        e.formatter = function(row) {
-          return _this.textFormat(
-            Number(row.creditAmount ? row.creditAmount : 0),
-            "#,##0.00"
-          );
-        };
-      }
-    });
     this.getWorkDicts("billType").then(res => {
-      this.findObject(this.option.column, "billType").dicData =
-        res.data.data;
+      this.findObject(this.option.column, "billType").dicData = res.data.data;
     });
   },
   filters: {
@@ -164,6 +175,26 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
+    uploadAfter(res, done, loading, column) {
+      this.excelBox = false;
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+      loading();
+      done();
+    },
+    derivation() {
+      this.$confirm("是否下载模板?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        window.open(
+          `/api/blade-mocha-item/pricebank/exportPrice?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      });
+    },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
       this.$confirm("确定删除数据?", {
@@ -182,20 +213,8 @@ export default {
         });
       });
     },
-    //查看跳转页面
-    beforeOpenPage(row, status) {
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      this.show = false;
-    },
     editOpen(row, status) {
-      this.detailData = {
-        id: row.id,
-        status: status
-      };
-      this.show = false;
+      console.log(row, status);
     },
     //点击搜索按钮触发
     searchChange(params, done) {
@@ -266,13 +285,6 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.search);
     },
-    newAdd() {
-      this.show = false;
-    },
-    goBack() {
-      this.detailData = this.$options.data().detailData;
-      this.show = true;
-    },
     async saveColumn() {
       /**
        * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
@@ -289,11 +301,6 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     }
-  },
-  watch: {
-    option: function() {
-      this.search.businesDate = defaultDate();
-    }
   }
 };
 </script>