Browse Source

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie 3 năm trước cách đây
mục cha
commit
66ef274651

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

@@ -730,6 +730,22 @@ const columnName = [{
     code: 178,
     name: '统计分析-利润总账(仓储)'
   },
+  {
+    code: 177,
+    name: '报表分析-库存总账'
+  },
+  {
+    code: 177.1,
+    name: '报表分析-库存总账明细'
+  },
+  {
+    code: 178,
+    name: '报表分析-收款总账'
+  },
+  {
+    code: 179,
+    name: '报表分析-付款总账'
+  }
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 78 - 0
src/views/analyze/inventory/config/customerContact.json

@@ -0,0 +1,78 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "addBtn": false,
+  "delBtn": false,
+  "headerAlign": "center",
+  "menuWidth": 150,
+  "refreshBtn": false,
+  "showSummary": true,
+  "column": [
+    {
+      "index": 1,
+      "prop": "corpid",
+      "label": "货主",
+      "width": 100
+    },
+    {
+      "index": 2,
+      "prop": "mblno",
+      "label": "提单号",
+      "width": 100
+    },
+    {
+      "index": 3,
+      "prop": "businessType",
+      "label": "货物属性",
+      "checked": 1,
+      "width": 100
+    },
+    {
+      "index": 4,
+      "prop": "marks",
+      "label": "属性详情",
+      "width": 100
+    },
+    {
+      "index": 5,
+      "prop": "billtype",
+      "label": "业务类型",
+      "width": 100
+    },
+    {
+      "index": 6,
+      "prop": "bsdate",
+      "label": "业务日期",
+      "width": 100
+    },
+    {
+      "index": 7,
+      "prop": "trademodeid",
+      "label": "贸易方式",
+      "width": 100
+    },
+    {
+      "index": 8,
+      "prop": "qty",
+      "label": "件数",
+      "width": 100
+    },
+    {
+      "index": 9,
+      "prop": "grossweight",
+      "label": "毛重",
+      "width": 100
+    },
+    {
+      "index": 10,
+      "prop": "netweight",
+      "label": "净重",
+      "checked": 1,
+      "width": 100
+    }
+  ]
+}

+ 176 - 0
src/views/analyze/inventory/config/mainList.json

@@ -0,0 +1,176 @@
+{
+  "searchShow": true,
+  "searchSpan": 8,
+  "searchMenuSpan": 24,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "headerAlign": "center",
+  "menuWidth": "70",
+  "showSummary": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "selection": true,
+  "tip": false,
+  "column": [
+    {
+      "index": 1,
+      "prop": "mblno",
+      "label": "提单号",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 2,
+      "prop": "corpid",
+      "label": "客户",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 3,
+      "prop": "originalbilldate",
+      "label": "入库日期",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 4,
+      "prop": "chargedate",
+      "label": "仓储费日期",
+      "overHidden": true,
+      "width": 150
+    },
+    {
+      "index": 5,
+      "prop": "businessTypes",
+      "label": "货物属性",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 6,
+      "prop": "marks",
+      "label": "属性详情",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 7,
+      "prop": "goodsids",
+      "label": "货物名称",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 8,
+      "prop": "warehouseids",
+      "label": "仓库",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 9,
+      "prop": "trademodeid",
+      "label": "贸易方式",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 10,
+      "prop": "qtyD",
+      "label": "入库件数",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 11,
+      "prop": "grossweightD",
+      "label": "入库毛重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 12,
+      "prop": "netweightD",
+      "label": "入库净重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 13,
+      "prop": "qtyC",
+      "label": "出库件数",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 14,
+      "prop": "grossweightC",
+      "label": "出库毛重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 15,
+      "prop": "netweightC",
+      "label": "出库净重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 16,
+      "prop": "qtyblc",
+      "label": "结余件数",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 17,
+      "prop": "grossweightblc",
+      "label": "结余毛重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 18,
+      "prop": "netweightblc",
+      "label": "结余净重(kg)",
+      "overHidden": true,
+      "width": 200
+    },
+    {
+      "index": 19,
+      "prop": "cntrno",
+      "label": "箱号",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 20,
+      "prop": "remark",
+      "label": "备注",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 21,
+      "prop": "localcntrno",
+      "label": "库存箱号",
+      "search": true,
+      "overHidden": true,
+      "width": 100
+    }
+  ]
+}

+ 114 - 0
src/views/analyze/inventory/detailsPage.vue

@@ -0,0 +1,114 @@
+<template>
+  <div class="borderless" v-loading="pageLoading">
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList">返回列表
+        </el-button>
+      </div>
+    </div>
+    <div class="customer-main">
+      <trade-card title="基础明细">
+        <avue-crud ref="crud" :data="data" :option="tableOption" @saveColumn="saveColumn" @resetColumn="resetColumn"
+          :cell-style="cellStyle">
+        </avue-crud>
+      </trade-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import tableOption from "./config/customerContact.json";
+export default {
+  name: "detailsPageEdit",
+  data() {
+    return {
+      show: true,
+      treeStyle: "height:" + (window.innerHeight - 315) + "px",
+      disabled: false,
+      tableOption: {},
+      data: [],
+    };
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  async created() {
+    if (this.detailData.id) {
+      this.getDetail(this.detailData.id);
+    }
+    this.tableOption = await this.getColumnData(
+      this.getColumnName(177.1),
+      tableOption
+    );
+
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    getDetail(id) {
+      this.loading = true;
+      this.pageLoading = true;
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    },
+    openEdit() {
+      this.detailData.status = 2;
+      this.option = this.$options.data().option;
+      this.$refs.crud.refreshTable();
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(177.1),
+        this.tableOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.tableOption = tableOption;
+      const inSave = await this.delColumnData(
+        this.getColumnName(177.1),
+        tableOption
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("重置成功");
+        //关闭窗口
+        setTimeout(() => {
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }, 1000);
+      }
+    }
+  },
+  watch: {
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+::v-deep .select-component {
+  display: flex !important;
+}
+</style>

+ 158 - 0
src/views/analyze/inventory/index.vue

@@ -0,0 +1,158 @@
+<template>
+    <div>
+        <basic-container v-show="show" class="page-crad">
+            <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page"
+                :search.sync="search" @search-change="searchChange" @current-change="currentChange"
+                @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
+                @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle"
+                @selection-change="selectionChange" @search-criteria-switch="searchCriteriaSwitch">
+                <template slot-scope="{row}" slot="mblno">
+                    <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{
+                            row.mblno
+                    }}
+                    </span>
+                </template>
+            </avue-crud>
+        </basic-container>
+        <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
+    </div>
+</template>
+
+<script>
+import option from "./config/mainList.json";
+import detailPage from "./detailsPage";
+import _ from "lodash";
+export default {
+    name: "customerInformation",
+    data() {
+        return {
+            search: {},
+            form: {},
+            option: {},
+            dataList: [{
+                mblno: '1111'
+            }],
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
+            show: true,
+            detailData: {},
+            loading: false,
+            searchShow: true,
+            selectionList: [],
+        };
+    },
+    components: { detailPage },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(177), option);
+        this.option.height = window.innerHeight - 210;
+    },
+    methods: {
+        searchCriteriaSwitch(type) {
+            if (type) {
+                this.option.height = this.option.height - 191;
+            } else {
+                this.option.height = this.option.height + 191;
+            }
+            this.$refs.crud.getTableHeight();
+        },
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        selectionChange(list) {
+            this.selectionList = list;
+        },
+        editOpen(row, status) {
+            this.detailData = {
+                id: row.id,
+                status: status
+            };
+            this.show = false;
+        },
+        //点击搜索按钮触发
+        searchChange(params, done) {
+            this.page.currentPage = 1;
+            this.onLoad(this.page, params);
+            done();
+        },
+        currentChange(val) {
+            this.page.currentPage = val;
+        },
+        sizeChange(val) {
+            this.page.currentPage = 1;
+            this.page.pageSize = val;
+        },
+        onLoad(page, params) {
+            // let data = this.deepClone(Object.assign(params, this.search));
+            // this.loading = true;
+            // getList(page.currentPage, page.pageSize, data)
+            //     .then(res => {
+            //         this.dataList = res.data.data.records ? res.data.data.records : [];
+            //         this.page.total = res.data.data.total;
+            //     })
+            //     .finally(() => {
+            //         this.loading = false;
+            //     });
+        },
+        refreshChange() {
+            this.onLoad(this.page, this.search);
+        },
+        newAdd() {
+            this.show = false;
+        },
+        goBack() {
+            if (this.$route.query.id) {
+                this.$router.$avueRouter.closeTag(this.$route.fullPath);
+                this.$router.push({
+                    path: "/analyze/inventory/index"
+                });
+            }
+            this.detailData = this.$options.data().detailData;
+            this.show = true;
+            this.onLoad(this.page, this.search);
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(177),
+                this.option
+            );
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        },
+        async resetColumn() {
+            this.option = option;
+            const inSave = await this.delColumnData(this.getColumnName(177), this.option);
+            if (inSave) {
+                this.$nextTick(() => {
+                    this.$refs.crud.doLayout();
+                });
+                this.$message.success("重置成功");
+                this.$refs.crud.$refs.dialogColumn.columnBox = false;
+            }
+        }
+    }
+};
+</script>
+
+<style scoped>
+::v-deep .select-component {
+    display: flex;
+}
+
+.page-crad ::v-deep .basic-container__card {
+    height: 94.2vh;
+}
+
+.itemTable ::v-deep .el-table {
+    width: 738px;
+}
+</style>

+ 4 - 5
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -23,7 +23,7 @@
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="portOfLoad">
-            <port-info v-model="form.portOfLoad" :disabled="detailData.status == 1" />
+            <port-info v-model="form.portOfLoad" :disabled="detailData.status == 1" /> 
           </template>
           <template slot="portOfDestination">
             <port-info v-model="form.portOfDestination" :disabled="detailData.status == 1" />
@@ -136,9 +136,9 @@
                   <i v-if="index != 0" :disabled="detailData.status == 1" class="el-icon-arrow-up"
                     @click="moveUp(row, index)" style="color:#409EFF;"></i>
                 </el-tooltip>
-                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
-                    v-if="index != (data.length - 1)" :disabled="detailData.status == 1" class="el-icon-arrow-down"
-                    @click="moveDown(row, index)" style="color:#409EFF;"></i></el-tooltip>
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i v-if="index != (data.length - 1)"
+                    :disabled="detailData.status == 1" class="el-icon-arrow-down" @click="moveDown(row, index)"
+                    style="color:#409EFF;"></i></el-tooltip>
               </div>
             </div>
           </template>
@@ -846,7 +846,6 @@ export default {
       this.form.corpTel = null;
       this.form.coefficient = row.coefficient;
       this.form.clientMessage = (row.cname ? row.cname : '') + '\r\n' + (row.addr ? row.addr : '')
-      console.log(row)
       if (this.data.length > 0) {
         this.data.forEach(e => {
           e.productPrice = productCal(