Browse Source

基础资料列设置

qukaidi 4 years ago
parent
commit
7a7c21f258

+ 25 - 0
src/views/basicdata/area/index.vue

@@ -162,6 +162,9 @@
 
 <script>
 import { listArea, getArea, delArea, addArea, updateArea, exportArea } from "@/api/basicdata/area";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   name: "Area",
@@ -334,3 +337,25 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/company/index.vue

@@ -138,6 +138,9 @@
 
 <script>
 import { listCompany, getCompany, delCompany, addCompany, updateCompany, exportCompany } from "../../../api/basicdata/company";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   name: "Company",
@@ -300,3 +303,25 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/contact/index.vue

@@ -176,6 +176,9 @@
 
 <script>
 import { listContact, getContact, delContact, addContact, updateContact, exportContact } from "../../../api/basicdata/contact";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   name: "Contact",
@@ -353,3 +356,25 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 268 - 3
src/views/basicdata/corps/index.vue

@@ -126,18 +126,98 @@
           >导出</el-button
         >
       </el-col>
+      <div class="tabSetting">
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
       ></right-toolbar>
+         <div style="margin: 0 12px">
+          <el-tooltip
+            class="item"
+            effect="dark"
+            content="列设置"
+            placement="top"
+          >
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+            ></el-button>
+          </el-tooltip>
+        </div>
+      </div>
     </el-row>
+    <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                    >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
     <el-table
       v-loading="loading"
       :data="corpsList"
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column
+           <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :fixed="item.fixed"
+        :show-overflow-tooltip="true"
+        sortable
+      />
+      <!-- <el-table-column
         :show-overflow-tooltip="true"
         label="客户类别"
         align="center"
@@ -192,7 +272,7 @@
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="状态" align="center" prop="fStatus">
         <template slot-scope="scope">
           <el-switch
@@ -701,7 +781,9 @@ import {
 } from "@/api/basicdata/corps";
 import { queryUserVal } from "@/api/system/user";
 import { isArray } from "@/utils/validate";
+import { addSet, select, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 import Vue from "vue";
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
@@ -762,7 +844,7 @@ Vue.directive("dialogDrag", {
 
 export default {
   name: "Corps",
-  components: {},
+  components: {draggable},
   data() {
     return {
       disCorps: false,
@@ -845,9 +927,95 @@ export default {
           },
         ],
       },
+      showSetting: false,
+      drag: false,
+      setRowList: [],
+      getRowList: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "fTypename",
+          name: "客户类别",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fNo",
+          name: "编号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fName",
+          name: "名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fCname",
+          name: "简称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fEname",
+          name: "英文名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fTel",
+          name: "电话",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "createBy",
+          name: "录入人",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "createTime",
+          name: "录入时间",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "updateBy",
+          name: "修改人",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "updateTime",
+          name: "修改时间",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "sendTime",
+          name: "提交日期",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      allCheck: false,
     };
   },
   created() {
+      this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
     this.getList();
     this.getDicts("data_customer_category").then((response) => {
       this.fTypeidOptions = response.data;
@@ -861,8 +1029,83 @@ export default {
     this.getDicts("sys_normal_disable").then((response) => {
       this.statusOptions = response.data;
     });
+    this.getRow();
   },
   methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "客户信息",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //重置列表
+    delRow() {
+      this.data = {
+        tableName: "客户信息",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "客户信息",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+        }
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -1158,3 +1401,25 @@ export default {
   content: "\e719";
 }
 </style>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 23 - 0
src/views/basicdata/dept/index.vue

@@ -229,6 +229,7 @@ import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild }
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Vue from 'vue'
+
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector('.el-dialog__header')
@@ -500,3 +501,25 @@ export default {
   content: "\e719";
 }
 </style>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 254 - 5
src/views/basicdata/fees/index.vue

@@ -114,12 +114,95 @@
           v-hasPermi="['basicdata:fees:export']"
         >导出</el-button>
       </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+	 <div class="tabSetting">
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+         <div style="margin: 0 12px">
+          <el-tooltip
+            class="item"
+            effect="dark"
+            content="列设置"
+            placement="top"
+          >
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+            ></el-button>
+          </el-tooltip>
+        </div>
+      </div>
     </el-row>
+       <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                    >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
     <el-table v-loading="loading" :data="feesList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="index" label="序号" align="center"/>
-      <el-table-column label="编号" align="center" prop="fNo" :show-overflow-tooltip="true" />
+      <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :fixed="item.fixed"
+        :show-overflow-tooltip="true"
+        sortable
+      />
+      <!-- <el-table-column label="编号" align="center" prop="fNo" :show-overflow-tooltip="true" />
       <el-table-column label="名称" align="center" prop="fName" :show-overflow-tooltip="true" />
       <el-table-column label="费用属性" align="center" prop="fFeetype" :formatter="fFeetypeFormat"  />
       <el-table-column label="收付方向" align="center" prop="fDc">
@@ -132,7 +215,7 @@
       <el-table-column label="计量单位" align="center" prop="fFeeunitid" :formatter="fFeeunitidFormat" />
       <el-table-column label="币种" align="center" prop="fCurrency" :show-overflow-tooltip="true"  />
       <el-table-column label="状态" align="center" prop="fStatus" :formatter="statusFormat" />
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" fixed="right">
         <template slot-scope="scope">
           <el-button
@@ -268,6 +351,10 @@
 <script>
 import { listFees, getFees, delFees, addFees, updateFees, exportFees } from "../../../api/basicdata/fees";
 import Vue from 'vue'
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
+
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector('.el-dialog__header')
@@ -324,7 +411,7 @@ Vue.directive('dialogDrag', {
 })
 export default {
   name: "Fees",
-  components: {
+  components: {draggable
   },
   data() {
     return {
@@ -375,10 +462,75 @@ export default {
         fName: [
           { required: true, message: "名称不能为空", trigger: "blur" }
         ],
-      }
+      },
+        showSetting: false,
+      drag: false,
+      setRowList: [],
+      getRowList: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "fTypename",
+          name: "编号",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "2",
+          label: "fName",
+          name: "名称",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "3",
+          label: "fFeetype",
+          name: "费用属性",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "4",
+          label: "fDc",
+          name: "收付方向",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fFeeunitid",
+          name: "计量单位",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fCurrency",
+          name: "币种",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fStatus",
+          name: "状态",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "remark",
+          name: "备注",
+          checked: 0,
+          width:null,
+        }
+      ],
+      allCheck: false,
     };
   },
   created() {
+      this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
     this.getList();
     this.getDicts("data_cost_attribute").then(response => {
       this.fFeetypeOptions = response.data;
@@ -389,8 +541,83 @@ export default {
     this.getDicts("data_unitfees").then(response => {
       this.fFeeunitidOptions = response.data;
     });
+    this.getRow();
   },
   methods: {
+     //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "我的审核",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //重置列表
+    delRow() {
+      this.data = {
+        tableName: "我的审核",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "我的审核",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+        }
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
     full(){
       this.dialogFull = !this.dialogFull
     },
@@ -559,3 +786,25 @@ export default {
   content: "\e719";
 }
 </style>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/fleet/carManage.vue

@@ -370,6 +370,9 @@
 <script>
 import { listFtmsorderbills, deleted } from "@/api/fleet/carManage";
 import AddOrUpdate from "./carManage-add-or-update";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   data() {
@@ -513,3 +516,25 @@ export default {
   },
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/fleet/companyMsg.vue

@@ -206,6 +206,9 @@
 <script>
 import { listFtmsorderbills, deleted } from '@/api/fleet/companyMsg'
 import AddOrUpdate from './companyMsg-add-or-update'
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   data() {
@@ -355,3 +358,25 @@ export default {
   }
 }
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 26 - 0
src/views/basicdata/fleet/driverMsg.vue

@@ -172,6 +172,10 @@
 <script>
 import {listFtmsorderbills, deleted} from '@/api/fleet/driverMsg'
   import AddOrUpdate from './driverMsg-add-or-update'
+  import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
+
   export default {
     data () {
       return {
@@ -307,3 +311,25 @@ import {listFtmsorderbills, deleted} from '@/api/fleet/driverMsg'
     }
   }
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>s

+ 256 - 4
src/views/basicdata/goods/index.vue

@@ -155,12 +155,80 @@
           >导出</el-button
         >
       </el-col>
+     <div class="tabSetting">
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
       ></right-toolbar>
+         <div style="margin: 0 12px">
+          <el-tooltip
+            class="item"
+            effect="dark"
+            content="列设置"
+            placement="top"
+          >
+            <el-button
+              icon="el-icon-setting"
+              size="mini"
+              circle
+              @click="showSetting = !showSetting"
+            ></el-button>
+          </el-tooltip>
+        </div>
+      </div>
     </el-row>
-
+<el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                    >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
     <el-table
       v-loading="loading"
       :data="goodsList"
@@ -169,7 +237,18 @@
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="index" label="序号" align="center" />
       <!--<el-table-column label="存储id" align="center" prop="fTypeid" />--><!-- 后期添加 -->
-      <el-table-column
+               <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :fixed="item.fixed"
+        :show-overflow-tooltip="true"
+        sortable
+      />
+      <!-- <el-table-column
         label="编号"
         align="center"
         prop="fNo"
@@ -219,7 +298,7 @@
         prop="fHscode"
         :show-overflow-tooltip="true"
       />
-      <el-table-column label="包装类型" align="center" prop="fPackageid" />
+      <el-table-column label="包装类型" align="center" prop="fPackageid" /> -->
       <el-table-column label="状态" align="center" prop="fStatus">
         <template slot-scope="scope">
           <el-switch
@@ -441,6 +520,10 @@ import {
   exportGoods,
 } from "@/api/basicdata/goods";
 import Vue from "vue";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -500,7 +583,7 @@ Vue.directive("dialogDrag", {
 
 export default {
   name: "Goods",
-  components: {},
+  components: {draggable},
   data() {
     return {
       //全屏放大
@@ -559,9 +642,81 @@ export default {
           { required: true, message: "商品类别不能为空", trigger: "blur" },
         ],
       },
+      showSetting: false,
+      drag: false,
+      setRowList: [],
+      getRowList: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "fNo",
+          name: "编号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "fName",
+          name: "名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "fEnam",
+          name: "英文名称",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fTypeid",
+          name: "商品类别",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "5",
+          label: "fSpecs",
+          name: "规格",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fPackagespecs",
+          name: "包装规格",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fColor",
+          name: "颜色",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fHscode",
+          name: "海关编码",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "fPackageid",
+          name: "包装类型",
+          checked: 0,
+          width: 100,
+        }
+      ],
+      allCheck: false,
     };
   },
   created() {
+    this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
     this.getList();
     this.getDicts("data_customer_category").then((response) => {
       this.fIdOptions = response.data;
@@ -575,8 +730,83 @@ export default {
     this.getDicts("data_goods_category").then((response) => {
       this.fTypeidOptions = response.data;
     });
+    this.getRow();
   },
   methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "商品信息",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //重置列表
+    delRow() {
+      this.data = {
+        tableName: "商品信息",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "商品信息",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+        }
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
     full() {
       this.dialogFull = !this.dialogFull;
     },
@@ -770,3 +1000,25 @@ export default {
   content: "\e719";
 }
 </style>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/location/index.vue

@@ -162,6 +162,9 @@
 
 <script>
 import { listLocation, getLocation, delLocation, addLocation, updateLocation, exportLocation } from "../../../api/basicdata/location";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   name: "Location",
@@ -331,3 +334,25 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/warehouse/index.vue

@@ -255,6 +255,9 @@ import { listWarehouse, getWarehouse, delWarehouse, addWarehouse,changeWareStatu
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {addUser, updateUser} from "@/api/system/user";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 import Vue from 'vue'
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
@@ -605,3 +608,25 @@ export default {
   content: "\e719";
 }
 </style>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 25 - 0
src/views/basicdata/warehousebills/index.vue

@@ -575,6 +575,9 @@ RK CK DB HZ
 
 <script>
 import { listWarehousebills, getWarehousebills, delWarehousebills, addWarehousebills, updateWarehousebills, exportWarehousebills } from "../../../api/basicdata/warehousebills";
+import { addSet, select, resetModule } from "@/api/system/set";
+import Cookies from "js-cookie";
+import draggable from "vuedraggable";
 
 export default {
   name: "Warehousebills",
@@ -861,3 +864,25 @@ export default {
   }
 };
 </script>
+<style lang="scss" scoped>
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
+</style>

+ 2 - 2
vue.config.js

@@ -34,9 +34,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `http://192.168.137.1:9010`,
+        target: `http://192.168.137.1:9010`,
         // target: `http://engineering.echepei.com:9010/`,
-         target: `http://test.tms.tubaosoft.com:9010/`,
+        //  target: `http://test.tms.tubaosoft.com:9010/`,
         //  target: `https://test.fms.tubaosoft.com/prod-api/`,
         changeOrigin: true,
         pathRewrite: {