浏览代码

修改bug

qukaidi 3 年之前
父节点
当前提交
25bcbc8c8a

+ 31 - 0
src/components/boxVolume/config/mainList.json

@@ -0,0 +1,31 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "headerAlign": "center",
+  "menuWidth": "70",
+  "showSummary": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "column": [
+    {
+        "index": 1,
+        "prop": "cntrid",
+        "label": "箱型",
+        "overHidden": true,
+        "cell":true
+    },
+    {
+        "index": 2,
+        "prop": "cntrcount",
+        "label": "箱量",
+        "overHidden": true,
+        "cell":true
+    }
+]
+}

+ 98 - 0
src/components/boxVolume/main.vue

@@ -0,0 +1,98 @@
+<template>
+    <div>
+        <trade-card title="箱型箱量" :show="false">
+            <avue-crud ref="crud" :data="data" :option="tableOption" @saveColumn="saveColumn"
+                @resetColumn="resetColumn" :cell-style="cellStyle" @selection-change="selectionChange">
+                <template slot="menuLeft">
+                    <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="addRow">新增
+                    </el-button>
+                </template>
+                <template slot="menu">
+                    <el-button type="text" size="small" @click.stop="rowDel">删除
+                    </el-button>
+                </template>
+            </avue-crud>
+        </trade-card>
+    </div>
+</template>
+
+<script>
+import tableOption from "./config/mainList.json";
+export default {
+    name: "detailsPageEdit",
+    data() {
+        return {
+            treeStyle: "height:" + (window.innerHeight - 315) + "px",
+            tableOption: {},
+        };
+    },
+    props: {
+        data: {
+            type: Array
+        }
+    },
+    async created() {
+        this.tableOption = await this.getColumnData(
+            this.getColumnName(162.3),
+            tableOption
+        );
+    },
+    methods: {
+        cellStyle() {
+            return "padding:0;height:40px;";
+        },
+        addRow(row) {
+            this.data.push({ ...row, $cellEdit: true });
+        },
+        rowDel(row) {
+            this.$confirm("确定删除数据?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                this.$message({
+                    type: "success",
+                    message: "删除成功!"
+                });
+                this.data.splice(row.$index, 1);
+            });
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(162.3),
+                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(162.3),
+                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>
+</style>

+ 17 - 8
src/components/warehousKH/main.vue

@@ -4,8 +4,10 @@
             <el-option v-for="item in corpList" :key="item.id" :label="item.cname" :value="item.id">
             </el-option>
         </el-select>
-        <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" :disabled="disabled"
-            @click="refreshData"></el-button>
+        <el-tooltip class="item" effect="dark" content="获取最新客户资料" placement="top-start">
+            <el-button icon="el-icon-refresh" size="mini" v-if="label != 'shortName'" :disabled="disabled"
+                @click="refreshData"></el-button>
+        </el-tooltip>
     </div>
 </template>
 
@@ -16,7 +18,7 @@ export default {
     name: "main",
     data() {
         return {
-            form:{},
+            form: {},
             corpList: []
         };
     },
@@ -25,12 +27,19 @@ export default {
         disabled: Boolean,
     },
     created() {
-        let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
-        allCropList({corpType:'KH', adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null }).then(res => {
-            this.corpList = res.data.data;
-        });
+        this.getCorpList()
+    },
+    methods: {
+        getCorpList() {
+            let userObj = JSON.parse(localStorage.getItem("saber-userInfo")).content;
+            allCropList({ corpType: 'KH', adminProfiles: userObj.role_name != "admin" ? userObj.user_id : null }).then(res => {
+                this.corpList = res.data.data;
+            });
+        },
+        refreshData() {
+            this.getCorpList()
+        }
     },
-    methods: {},
     watch: {
     }
 };

+ 67 - 0
src/views/basicData/countryRegion/config/mainList.json

@@ -0,0 +1,67 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "border": true,
+  "index": true,
+  "delBtn": false,
+  "editBtn":false,
+  "headerAlign": "center",
+  "menuWidth": "180",
+  "showSummary": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "column": [
+    {
+      "label": "中文名称",
+      "prop": "cname",
+      "index": 1,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "英文名称",
+      "prop": "ename",
+      "index": 2,
+      "overHidden": true
+    },
+    {
+      "label": "英文全称",
+      "prop": "allName",
+      "index": 3,
+      "overHidden": true
+    },
+    {
+      "label": "两字母代码",
+      "prop": "a",
+      "index": 4,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "三字母代码",
+      "prop": "b",
+      "index": 5,
+      "overHidden": true
+    },
+    {
+      "label": "数字代码",
+      "prop": "code",
+      "index": 6,
+      "overHidden": true
+    },
+    {
+      "label": "所属大洲",
+      "prop": "c",
+      "index": 7,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "d",
+      "index": 8,
+      "overHidden": true
+    }
+  ]
+}

+ 149 - 0
src/views/basicData/countryRegion/index.vue

@@ -0,0 +1,149 @@
+<template>
+    <div>
+        <basic-container 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"
+                @search-criteria-switch="searchCriteriaSwitch">
+                <template slot="menuLeft">
+                    <el-button type="primary" icon="el-icon-bottom" size="small">导入
+                    </el-button>
+                    <el-button type="primary" icon="el-icon-top" size="small">导出
+                    </el-button>
+                </template>
+                <template slot-scope="{ row,index}" slot="menu">
+                    <el-button type="text" icon="el-icon-delete" size="small" @click="$refs.crud.rowView(row, index)">
+                        查看</el-button>
+                    <el-button type="text" icon="el-icon-delete" size="small" @click="$refs.crud.rowEdit(row, index)">
+                        编辑</el-button>
+                    <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(row, index)">删除
+                    </el-button>
+                </template>
+            </avue-crud>
+        </basic-container>
+    </div>
+</template>
+
+<script>
+import option from "./config/mainList.json";
+import _ from "lodash";
+export default {
+    name: "customerInformation",
+    data() {
+        return {
+            search: {},
+            form: {},
+            option: {},
+            dataList: [],
+            page: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
+            loading: false
+        };
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(182), 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;";
+        },
+        rowDel(row, index, done) {
+            //     this.$confirm("确定删除数据?", {
+            //         confirmButtonText: "确定",
+            //         cancelButtonText: "取消",
+            //         type: "warning"
+            //     }).then(() => {
+            //         this.$message({
+            //             type: "success",
+            //             message: "删除成功!"
+            //         });
+            //         this.onLoad(this.page, this.search);
+            //     });
+        },
+        //点击搜索按钮触发
+        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() {
+
+        },
+        async saveColumn() {
+            const inSave = await this.saveColumnData(
+                this.getColumnName(182),
+                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(182), 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>

+ 10 - 1
src/views/warehousing/goodsTransfer/detailsPage.vue

@@ -21,8 +21,15 @@
           <template slot-scope="{}" slot="corpidLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
           </template>
+          <template slot-scope="{row,index}" slot="corpid">
+            <warehous-Kh v-model="form.corpid"></warehous-Kh>
+          </template>
+          <template slot-scope="{row,index}" slot="tocorpid">
+            <warehous-Kh v-model="form.tocorpid"></warehous-Kh>
+          </template>
         </avue-form>
       </trade-card>
+      <box-volume :data="[]" />
       <trade-card title="货转明细">
         <avue-crud ref="crud" :data="data" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
           @resetColumn="resetColumn" :cell-style="cellStyle">
@@ -40,6 +47,7 @@ import tableOption from "./config/customerContact.json";
 import collection from "@/components/collection/main";
 import payment from "@/components/payment/main";
 import annex from "@/components/annex/main";
+import boxVolume from "@/components/boxVolume/main";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -152,7 +160,8 @@ export default {
   components: {
     collection,
     payment,
-    annex
+    annex,
+    boxVolume
   },
   async created() {
     if (this.detailData.id) {

+ 7 - 1
src/views/warehousing/inStock/detailsPage.vue

@@ -21,8 +21,12 @@
           <template slot-scope="{}" slot="corpidLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
           </template>
+          <template slot-scope="{row,index}" slot="corpid">
+            <warehous-Kh v-model="form.corpid"></warehous-Kh>
+          </template>
         </avue-form>
       </trade-card>
+      <box-volume :data="[]" />
       <trade-card title="更多信息" :show="false">
         <avue-form class="trading-form" v-model="form" :option="option2">
         </avue-form>
@@ -44,6 +48,7 @@ import tableOption from "./config/customerContact.json";
 import collection from "@/components/collection/main";
 import payment from "@/components/payment/main";
 import annex from "@/components/annex/main";
+import boxVolume from "@/components/boxVolume/main";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -315,7 +320,8 @@ export default {
   components: {
     collection,
     payment,
-    annex
+    annex,
+    boxVolume
   },
   async created() {
     if (this.detailData.id) {

+ 7 - 1
src/views/warehousing/outStock/detailsPage.vue

@@ -21,8 +21,12 @@
           <template slot-scope="{}" slot="corpidLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
           </template>
+          <template slot-scope="{row,index}" slot="corpid">
+            <warehous-Kh v-model="form.corpid"></warehous-Kh>
+          </template>
         </avue-form>
       </trade-card>
+      <box-volume :data="[]" />
       <trade-card title="更多信息" :show="false">
         <avue-form ref="form2" class="trading-form" v-model="form" :option="option2">
         </avue-form>
@@ -45,6 +49,7 @@ import tableOption from "./config/customerContact.json";
 import collection from "@/components/collection/main";
 import payment from "@/components/payment/main";
 import annex from "@/components/annex/main";
+import boxVolume from "@/components/boxVolume/main";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -195,7 +200,8 @@ export default {
   components: {
     collection,
     payment,
-    annex
+    annex,
+    boxVolume
   },
   async created() {
     if (this.detailData.id) {

+ 7 - 1
src/views/warehousing/stockTransfer/detailsPage.vue

@@ -21,8 +21,12 @@
           <template slot-scope="{}" slot="corpidLabel">
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
           </template>
+          <template slot-scope="{row,index}" slot="corpid">
+            <warehous-Kh v-model="form.corpid"></warehous-Kh>
+          </template>
         </avue-form>
       </trade-card>
+      <box-volume :data="[]" />
       <trade-card title="更多信息" :show="false">
         <avue-form ref="form2" class="trading-form" v-model="form" :option="option2">
         </avue-form>
@@ -44,6 +48,7 @@ import tableOption from "./config/customerContact.json";
 import collection from "@/components/collection/main";
 import payment from "@/components/payment/main";
 import annex from "@/components/annex/main";
+import boxVolume from "@/components/boxVolume/main";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -193,7 +198,8 @@ export default {
   components: {
     collection,
     payment,
-    annex
+    annex,
+    boxVolume
   },
   async created() {
     if (this.detailData.id) {