瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

001295 1 年之前
父節點
當前提交
c60e6e0c25

+ 81 - 0
src/components/pageTurning/index.vue

@@ -0,0 +1,81 @@
+<script>
+export default {
+  name: "PageTurning",
+  props: {
+    value: {
+      type: [String, Number],
+      required: true,
+    },
+    idList: {
+      type: Array,
+      default: () => [],
+    },
+    size: {
+      type: String,
+      default: "mini",
+    },
+  },
+  data() {
+    return {};
+  },
+  computed: {
+    currentIndex: {
+      get() {
+        let { value, idList } = this.$props;
+        let cIndex = idList.findIndex((item) => item == value);
+        return cIndex;
+      },
+      set() {},
+    },
+    innerList: {
+      get() {
+        return this.$props.idList;
+      },
+      set() {},
+    },
+  },
+  watch: {},
+  methods: {
+    // 上一页
+    Previous() {
+      let { currentIndex } = this;
+      if (currentIndex !== -1) {
+        if (!(currentIndex - 1 < 0)) {
+          // 超出
+        } else {
+          let id = innerList[currentIndex - 1];
+          this.$emit("change", id);
+          this.$emit("input", id);
+          //  this.$emit("update:source", id);
+        }
+      }
+    },
+    // 下一页
+    Down() {
+      let { currentIndex, innerList } = this;
+      if (currentIndex !== -1) {
+        if (currentIndex + 1 === innerList.length) {
+          // 超出
+        } else {
+          //
+          let id = innerList[currentIndex + 1];
+          this.$emit("change", id);
+          this.$emit("input", id);
+        }
+      }
+    },
+  },
+  created() {},
+};
+</script>
+
+<template>
+  <el-button-group>
+    <el-button icon="el-icon-arrow-left" :size="size" @click="Previous"
+      >上一页</el-button
+    >
+    <el-button icon="el-icon-arrow-right" :size="size" @click="Down"
+      >下一页</el-button
+    >
+  </el-button-group>
+</template>

+ 26 - 0
src/components/popover-select/components/MKCMCONTACTS_PARAM.js

@@ -0,0 +1,26 @@
+// 客户管理科室负责人参照
+export default [{
+    item: {
+      key: "code",
+      title: "编码",
+      width: "auto"
+    },
+    attr: {},
+  },
+  {
+    item: {
+      key: "name",
+      title: "名称",
+      width: "auto"
+    },
+    attr: {},
+  },
+  {
+    item: {
+      key: "cell",
+      title: "联系电话",
+      width: "auto"
+    },
+    attr: {},
+  },
+];

+ 59 - 10
src/views/WMS/historical-route/index.vue

@@ -7,7 +7,7 @@
           <el-button class="OutCss" v-print="'#print'" type="primary">导出</el-button>
           <el-timeline>
             <!-- 数据表 -->
-            <h2>车辆温湿度列表</h2>
+            <h2 v-if="isCarData">车辆温湿度列表</h2>
             <div v-for="(item, index) in dataCar">
               <h2>
                 ============================================================================================================================
@@ -33,7 +33,7 @@
               </el-table>
               <template></template>
             </div>
-            <h2>保温箱温湿度列表</h2>
+            <h2 v-if="isBoxData">保温箱温湿度列表</h2>
             <div v-for="(item, index) in dataBox">
               <h2>
                 ============================================================================================================================
@@ -178,6 +178,8 @@
         dataCar: [],
         dataBox: [],
         dataMerge: [],
+        isCarData: false,
+        isBoxData: false,
       };
     },
     mounted() {
@@ -267,28 +269,44 @@
                       }
                     ],
                     [{
-                        name: '冷藏温度警戒线',
                         yAxis: '2'
                       },
                       {
                         yAxis: '1.9'
                       }
                     ],
+                    // -0.5这条只用来做下方的提示文本
+                    [{
+                        name: '冷藏温度警戒线',
+                        yAxis: '-0.5'
+                      },
+                      {
+                        yAxis: '-0.5'
+                      }
+                    ],
                     [{
-                        name: '冷冻温度警戒线',
                         yAxis: '-15'
                       },
                       {
+                        name: '冷冻温度警戒线',
                         yAxis: '-14.9'
                       }
                     ],
                     [{
-                        name: '冷冻温度警戒线',
                         yAxis: '-25'
                       },
                       {
                         yAxis: '-25.1'
                       }
+                    ],
+                    // -27.5这条只用来做下方的提示文本
+                    [{
+                        name: '冷冻温度警戒线',
+                        yAxis: '-27.5'
+                      },
+                      {
+                        yAxis: '-27.5'
+                      }
                     ]
                   ]
                 }
@@ -335,28 +353,44 @@
                         }
                       ],
                       [{
-                          name: '冷藏温度警戒线',
                           yAxis: '2'
                         },
                         {
                           yAxis: '1.9'
                         }
                       ],
+                      // -0.5这条只用来做下方的提示文本
+                      [{
+                          name: '冷藏温度警戒线',
+                          yAxis: '-0.5'
+                        },
+                        {
+                          yAxis: '-0.5'
+                        }
+                      ],
                       [{
-                          name: '冷冻温度警戒线',
                           yAxis: '-15'
                         },
                         {
+                          name: '冷冻温度警戒线',
                           yAxis: '-14.9'
                         }
                       ],
                       [{
-                          name: '冷冻温度警戒线',
                           yAxis: '-25'
                         },
                         {
                           yAxis: '-25.1'
                         }
+                      ],
+                      // -27.5这条只用来做下方的提示文本
+                      [{
+                          name: '冷冻温度警戒线',
+                          yAxis: '-27.5'
+                        },
+                        {
+                          yAxis: '-27.5'
+                        }
                       ]
                     ]
                   }
@@ -450,7 +484,7 @@
             }
           },
           grid: {
-            x: 22,
+            x: 30,
             y: 30,
             x2: 20,
             y2: 18,
@@ -480,8 +514,13 @@
             // Y轴最大值
             min: -30,
             splitNumber: 2,
+            // 最小刻度间隔
+            minInterval: 2,
+            // 最大刻度间隔
+            maxInterval: 5,
             // 间隔值
-            // interval: 3
+            interval: 2,
+            scale: true
           },
           //加上dataZoom可实现缩放
           dataZoom: [{
@@ -639,6 +678,7 @@
         let differenceValueCar;
         let arr2 = [];
         if (dataCar != null && dataCar != '') {
+          this.isCarData = true;
           for (let i = 0; i < dataCar.length; i++) {
             let arr3 = [];
             // 向上取整差值
@@ -683,6 +723,7 @@
         let differenceValueBox;
         let arr = [];
         if (dataBox != null && dataBox != '') {
+          this.isBoxData = true;
           for (let i = 0; i < dataBox.length; i++) {
             let arr1 = [];
             // 向上取整差值
@@ -732,18 +773,26 @@
             arr[differenceValue - 1].end = arr[j].hisDate4;
             return;
           }
+        }
+        for (let j = differenceValue - 1; j >= 0; j--) {
           if (arr[j].hisDate3 != null && arr[j].hisDate3 != '' && arr[j].hisDate3 != undefined) {
             arr[differenceValue - 1].end = arr[j].hisDate3;
             return;
           }
+        }
+        for (let j = differenceValue - 1; j >= 0; j--) {
           if (arr[j].hisDate2 != null && arr[j].hisDate2 != '' && arr[j].hisDate2 != undefined) {
             arr[differenceValue - 1].end = arr[j].hisDate2;
             return;
           }
+        }
+        for (let j = differenceValue - 1; j >= 0; j--) {
           if (arr[j].hisDate1 != null && arr[j].hisDate1 != '' && arr[j].hisDate1 != undefined) {
             arr[differenceValue - 1].end = arr[j].hisDate1;
             return;
           }
+        }
+        for (let j = differenceValue - 1; j >= 0; j--) {
           if (arr[j].hisDate != null && arr[j].hisDate != '' && arr[j].hisDate != undefined) {
             arr[differenceValue - 1].end = arr[j].hisDate;
             return;

+ 40 - 1
src/views/business/spd/cm/customers/index.vue

@@ -713,9 +713,47 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.resetForm("queryForm");
+        this.resetQueryParams();
         this.handleQuery();
       },
+      /** 查询参数重置 */
+      resetQueryParams() {
+        this.queryParams = {
+          abbreviation: null,
+          areaClassification: null,
+          billingCustomer: null,
+          billingCustomerName: null,
+          businessType: null,
+          category: null,
+          channel: null,
+          classification: null,
+          code: null,
+          detailedAddress: null,
+          enterpriseName: null,
+          enterpriseType: null,
+          firstBattalion: null,
+          industry: null,
+          latitude: null,
+          licenseNumber: null,
+          longitude: null,
+          marketingArea: null,
+          marketingAreaName: null,
+          name: null,
+          org: null,
+          orgName: null,
+          pageNum: 1,
+          pageSize: 10,
+          potential: null,
+          registrationArea: null,
+          responsibleDept: null,
+          responsibleDeptName: null,
+          responsiblePerson: null,
+          responsiblePersonName: null,
+          taxType: null,
+          type: null
+        };
+        this.resetForm("queryForm");
+      },
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map(item => item.id)
@@ -763,6 +801,7 @@
         const id = row.id || this.ids
         getCustomers(id).then(response => {
           this.form = response.data;
+          this.form.oldName = response.data.name;
           this.mkCmCustomersResponsiblePersonList = response.data.mkCmCustomersResponsiblePersonList;
           this.mkCmCustomersDepartmentList = response.data.mkCmCustomersDepartmentList;
           this.openState = 'update';

+ 16 - 2
src/views/business/spd/cm/customersDepartment/index.vue

@@ -16,8 +16,8 @@
         <el-col :span="6">
           <el-form-item label="负责人姓名" prop="responsiblePersonName">
             <el-popover-select-v2 v-model="form.responsiblePersonName" title="负责人" valueKey="name"
-              referName="CONTACTS_PARAM" :dataMapping="{responsiblePerson: 'id', responsiblePersonName: 'name'}"
-              :source.sync="form" placeholder="请选择负责人" :disabled="disable" />
+              referName="MKCMCONTACTS_PARAM" :dataMapping="{responsiblePerson: 'id', responsiblePersonName: 'name', phone: 'cell'}"
+              :source.sync="form" :queryParams="referQuery" placeholder="请选择负责人" :disabled="disable" />
           </el-form-item>
         </el-col>
       </el-row>
@@ -103,6 +103,8 @@
         total: 0,
         // 客户科室表格数据
         customersDepartmentList: [],
+        // 当前操作人
+        operator: null,
         // 表单参数
         form: {
           id: null,
@@ -152,6 +154,8 @@
       if (this.pageStu == 'check' || this.pageStu == 'update') {
         this.getDetails(this.row);
       }
+      // 获取当前登录用户的编码
+      this.operator = this.$store.state.user.name;
     },
     methods: {
       // 取消按钮
@@ -186,6 +190,16 @@
           }
         })
       },
+      // 参照查询条件
+      referQuery() {
+        const parameter = {
+          parame: {
+            customersName: this.form.customersName,
+            operator: this.operator
+          }
+        };
+        return parameter;
+      }
     }
   };
 

+ 16 - 140
src/views/material/basicFile/details.vue

@@ -60,14 +60,6 @@
                 <el-button :size="size" @click="handleMaterialType"
                   >维护物料类别</el-button
                 >
-                <!-- <el-button
-                  :size="size"
-                  @click="handleIsInvoke"
-                  :key="count"
-                  v-hasPermi="['system:material:add']"
-                >
-                  {{ basicData.value.isEnable == "已启用" ? "停用" : "启用" }}
-                </el-button> -->
               </el-button-group>
             </el-col>
             <el-col :span="1.5">
@@ -1795,10 +1787,8 @@ export default {
 
     // 新增
     handleInster() {
-      this.$notify({
-        title: "警告",
+      this.$notify.warning({
         message: "物料只能通过申请审批增加,不能在节点直接录入!",
-        type: "warning",
       });
     },
     // 除基本信息之后的修改
@@ -1818,10 +1808,8 @@ export default {
           // 查询其他标签页列表详情
           this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
         } else {
-          this.$notify({
-            title: "警告",
+          this.$notify.warning({
             message: "修改请选择单个数据!",
-            type: "warning",
           });
         }
       } else if ("form" === type) {
@@ -1875,10 +1863,8 @@ export default {
             break;
         }
       } else {
-        this.$notify({
-          title: "警告",
+        this.$notify.warning({
           message: "请选择需要删除的数据!",
-          type: "warning",
         });
       }
     },
@@ -1955,15 +1941,12 @@ export default {
     },
     // 刷新
     handleRefresh() {
-      console.log("刷新");
-
       this.$refs.basicMessageRef.clearValidate();
       this.$refs.medcineRef.clearValidate();
       this.handleRest();
     },
     // 维护物料类别
     handleMaterialType() {
-      console.log("维护物料类别");
       this.materialType.show = true;
 
       this.materialType.loading = true;
@@ -1972,20 +1955,6 @@ export default {
         this.getMedcineitemList(this.materialId);
       });
     },
-    // 启用
-    handleIsInvoke(e) {
-      console.log("启用", this.basicData.value.isEnable);
-
-      let param = {
-        isEnable: this.basicData.value.isEnable == "已启用" ? "2" : "0",
-        id: this.basicData.value.id,
-      };
-      console.log(param, "启用/停用param");
-      materialApi.updateEnableMaterial(param).then((res) => {
-        console.log(res, "启用/停用");
-        if (res.code == 200) this.handleRefresh();
-      });
-    },
     // 维护新版本
     handleNewVersion() {
       let _this = this;
@@ -1994,15 +1963,12 @@ export default {
         code: this.basicData.value.code,
       };
       materialApi.versions(data).then((res) => {
-        console.log(res, "维护新版本");
         if (res.code == 200) {
           _this.maintainNewVersion = res.data.result;
           // 维护版本消息展示 by shiy 2023/05/31
           if (!res.data.result) {
-            this.$notify({
-              title: "警告",
+            this.$notify.warning({
               message: res.data.msg,
-              type: "warning",
             });
           }
         }
@@ -2057,7 +2023,6 @@ export default {
     },
     // 物料类别列表选中
     handleSelectionType(list) {
-      console.log("物料类别列表选中", list);
       this.materialType.checkedList = list;
     },
     // 物料类别增删行
@@ -2075,12 +2040,10 @@ export default {
           }
           rowObj["insertId"] = new Date().getTime();
           this.materialType.value.push(rowObj);
-          console.log(this.materialType.value, "物料类别增行rowObj后");
 
           break;
         // 删行
         case "del":
-          console.log("物料类别删行", _this.materialType.checkedList);
           if (_this.materialType.checkedList.length) {
             _this.materialType.checkedList.map((c) => {
               _this.materialType.value = _this.materialType.value.filter(
@@ -2098,10 +2061,8 @@ export default {
               );
             });
           } else {
-            this.$notify({
-              title: "警告",
+            this.$notify.warning({
               message: "请选择需要删除的信息!",
-              type: "warning",
             });
           }
           break;
@@ -2119,13 +2080,11 @@ export default {
             );
             console.log(nullList, "nullList");
             if (!nullList.length && _this.materialType.value.length) {
-              console.log("物料类别保存", _this.materialType.value);
               let params = {
                 materialId: _this.materialId,
                 medcineItems: _this.materialType.value,
               };
               materialApi.medcineitemBatchSave(params).then((res) => {
-                console.log(res, "保存物料类型");
                 if (res.code == 200) {
                   _this.materialType.isEdit = false;
                   _this.handleMaterialTypeRow();
@@ -2133,26 +2092,20 @@ export default {
               });
               // 保存
             } else {
-              this.$notify({
-                title: "警告",
+              this.$notify.warning({
                 message: "不能保存空数据或存在数据为空!",
-                type: "warning",
               });
             }
           } else {
             // 非编辑状态
-            console.log("物料类别修改");
             this.materialType.isEdit = true;
           }
           break;
         // 刷新
         default:
-          console.log("物料类别刷新");
           if (this.materialType.isEdit) {
-            this.$notify({
-              title: "警告",
+            this.$notify.warning({
               message: "请先保存数据!",
-              type: "warning",
             });
           } else {
             this.materialType.loading = true;
@@ -2166,22 +2119,14 @@ export default {
     },
     // 物料类别弹窗关闭前
     handleCloseTypeDetails(done) {
-      console.log("物料类别弹窗关闭前");
       this.materialType.isEdit
-        ? this.$notify({
-            title: "警告",
+        ? this.$notify.warning({
             message: "请先保存数据!",
-            type: "warning",
           })
         : done();
     },
-    // 保存修改并新增
-    handleSaveAdd() {
-      console.log("保存修改并新增");
-    },
     // 其他标签页弹窗取消操作
     handleOtherCancel() {
-      console.log("其他标签页弹窗取消操作");
       this.optionDialog.show = true;
       this.optionDialog.op = "修改";
     },
@@ -2222,13 +2167,10 @@ export default {
     },
     // 其他页签详情弹窗关闭事件
     handleCloseOtherDetails(done) {
-      console.log("其他页签详情弹窗关闭事件");
       // 处于编辑状态
       if (this.otherDeatils.isEdit) {
-        this.$notify({
-          title: "警告",
+        this.$notify.warning({
           message: "请先退出编辑操作",
-          type: "warning",
         });
       } else {
         this.handleOtherListRefresh();
@@ -2401,10 +2343,8 @@ export default {
             );
             console.log(drug, "drug------------------------------------");
             if (drug.length) {
-              _this.$notify({
-                title: "警告",
+              _this.$notify.warning({
                 message: "不能维护相同的物料类别!",
-                type: "warning",
               });
               confirm = false;
             } else {
@@ -2527,10 +2467,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2558,10 +2496,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2586,10 +2522,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2614,10 +2548,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2643,10 +2575,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2671,10 +2601,8 @@ export default {
         if (code == 200) {
           this.otherDeatils.isEdit = false;
           this.handleOtherRefresh();
-          this.$notify({
-            title: "成功",
+          this.$notify.success({
             message: msg,
-            type: "success",
           });
         }
       } catch (error) {
@@ -2691,7 +2619,6 @@ export default {
 
     judgeIsRequriedByProps(message) {
       // condiition:条件,tergetNames:目标porps数组,formName:表单,formRef:表单ref名,
-
       this[message.formName].form.forEach((formItem) => {
         let target = message.tergetNames.filter((t) => t === formItem.prop);
 
@@ -2720,9 +2647,6 @@ export default {
       });
       // 医疗行业
       await this.getTagList("material_medcine", async (form) => {
-        // form.forEach((item) => {
-        //   this.medcineData.value[item.prop] = ''
-        // })
         this.medcineData.form = [...form];
         this.medcineData.value = initParams(this.medcineData.form, "prop");
         this.medcineRules = initRules(form);
@@ -2758,29 +2682,7 @@ export default {
       },
       deep: true,
     },
-    // 通过一级分类判断业务线是否必填
-    // "basicData.value.oneClass": {
-    //   handler(nVal, oVal) {
-
-    //     this.basicData.form = this.basicData.form.map(formItem => {
 
-    //       if (formItem.prop === "businessLine" && nVal) {
-
-    //         if ( nVal.includes('介入耗材&5') || nVal.includes('骨科耗材&2') ||
-    //             nVal.includes('普通耗材&3') || nVal.includes('医用设备&1') ||
-    //             nVal.includes('体外诊断&4')) {
-
-    //               formItem.required  = true
-    //         } else {
-    //           formItem.required  = false
-    //         }
-
-    //       }
-    //       return formItem;
-    //     })
-    //   },
-    //   deep: true,
-    // },
     // 物料分类改变同时改变一二三级分类
     "basicData.value.classifyId": {
       async handler(nVal, oVal) {
@@ -2822,7 +2724,6 @@ export default {
   },
 
   created() {
-    console.log(this, "created");
     // 基本信息
     this.handleRest();
     if (window.name === "") {
@@ -2855,8 +2756,6 @@ export default {
   }
 
   .md-content {
-    // margin-top: 12px;
-    // height: calc(100vh - 260px);
     // height: calc(100vh - 200px);
     box-sizing: border-box;
 
@@ -2864,13 +2763,8 @@ export default {
       overflow: auto;
 
       .md-main {
-        // height: calc(100vh - 625px);
         margin-bottom: 10px;
 
-        .el-table__body {
-          // height: calc(100vh - 300px);
-        }
-
         .el-form {
           max-height: 430px;
           overflow-y: auto;
@@ -2901,9 +2795,6 @@ export default {
     }
   }
 
-  // .md-content>.el-tabs {
-  //   height: calc(100vh - 280px);
-  // }
 
   .otherDialog {
     .el-collapse-item__content {
@@ -2930,9 +2821,6 @@ export default {
       overflow-x: hidden;
     }
 
-    // .el-dialog__header {
-    //   background-color: rgb(244, 244, 244);
-    // }
   }
 
   .el-dialog__header {
@@ -3084,16 +2972,4 @@ export default {
 >>> .referTree {
   margin-top: 10px;
 }
-
-/* .md-main>>>.el-table .el-table__body {
-    height: calc(100vh - 300px);
-  } */
-
-/* .otherDialog>>>.el-collapse-item__content {
-    padding-bottom: 12px;
-  }
-
-  .otherDialog>>>.el-dialog__body {
-    padding: 12px 20px;
-  } */
 </style>

+ 2 - 77
src/views/material/basicFile/index.vue

@@ -46,14 +46,6 @@
             :select-data="checkedList"
             @success="handleQuery"
           ></is-using>
-          <!-- <el-button
-              :size="size"
-              @click="handleIsInvoke"
-              :disabled="checkedList.length != 1"
-              v-hasPermi="['system:material:add']"
-            >
-              {{ handleJudgeIsUsing() ? "停用" : "启用" }}
-            </el-button> -->
         </el-col>
 
         <!-- 导入导出 -->
@@ -97,7 +89,6 @@
           :height="tableHeight"
           ref="materialTable"
           @cell-dblclick="handledbClick"
-          @selection-change="handleSelectionChange"
           @select="handleSelect"
           @select-all="handleSelectAll"
           :header-row-style="{
@@ -350,14 +341,6 @@ export default {
       );
     },
 
-    // 新增
-    handleInster() {
-      this.$notify({
-        title: "警告",
-        message: "物料只能通过申请审批增加,不能在节点直接录入!",
-        type: "warning",
-      });
-    },
     // 修改
     handleEdit() {
       if (this.checkedList.length == 1) {
@@ -368,14 +351,12 @@ export default {
           },
         });
       } else {
-        this.$notify({
-          title: "警告",
+        this.$notify.warning({
           message: `${
             this.checkedList.length > 1
               ? "修改只能选择单个数据!"
               : "请选择需要修改的信息!"
           }`,
-          type: "warning",
         });
       }
     },
@@ -394,17 +375,11 @@ export default {
           }
         });
       } else {
-        this.$notify({
-          title: "警告",
+        this.$notify.warning({
           message: `请选择需要删除的数据!`,
-          type: "warning",
         });
       }
     },
-    // 复制
-    handleCopy() {
-      console.log("复制");
-    },
     //查询
     handleQuery() {
       // 重新查询后需要清空列表选中的数据
@@ -414,10 +389,6 @@ export default {
     },
     // 重置查询条件
     handleResetQuery() {
-      // for (const key in this.queryForm) {
-
-      //   this.queryForm[key] = '';
-      // }
 
       this.queryParams.pageNum = 1;
 
@@ -435,30 +406,6 @@ export default {
       // }
     },
 
-    // 启用/停用
-    handleIsInvoke() {
-      // true   当前状态为启用,需要改为停用
-      // 0:启用  2:停用
-      let param = {
-        isEnable: this.handleJudgeIsUsing() ? "2" : "0",
-        id: this.checkedList[0].id,
-      };
-      materialApi.updateEnableMaterial(param).then((res) => {
-        if (res.code == 200) {
-          this.handleRefresh();
-          // 清空选中数据
-          this.checkedList = [];
-          this.$refs.materialTable.clearSelection();
-        }
-      });
-    },
-    isInvoke(val) {
-      return val;
-    },
-    // 申请单查询
-    handleQueryForm() {
-      console.log("申请单查询");
-    },
     // 批量导入
     handleImport() {
       this.importData.show = true;
@@ -618,11 +565,6 @@ export default {
       const res = new Map();
       return arr.filter((arr) => !res.has(arr[key]) && res.set(arr[key], 1));
     },
-    // 选中数据改变
-    handleSelectionChange(list) {
-      // this.checkedList = this.handleUnique([...this.checkedList, ...list], 'id');
-      // this.$emit('headerOption', JSON.stringify({ checkedList: [... this.checkedList] }))
-    },
     // 行数据勾选操作
     handleSelect(selection, row) {
       this.checkedList = selection;
@@ -688,23 +630,6 @@ export default {
       materialApi.tagList({ templateCode }).then((res) => {
         console.log(res, "获取物料列表表头");
         if (res.code == 200) {
-          // let dictList = []
-          // res.data.forEach(item =>{
-          //   if(item.dictId){
-          //     // 字典
-          //     dictList.push({
-          //       item:{...item},
-          //       attr:{
-          //         dictName:item.dictId
-          //       }
-          //     });
-
-          //   }
-          // })
-          // console.log(dictList,'dictList');
-          // console.log(this,'this');
-          // this.dict =[...initDicts([...SearchColumns,...dictList])]
-
           this.tableHeader = res.data;
         }
       });

+ 40 - 4
src/views/purchase/purchase-order/add/index.vue

@@ -17,7 +17,10 @@ const { Columns, TabColumns } = judgeColumns();
 const NewColumns = initColumns(Columns);
 const NewTabColumns = TabColumns.map((element) => ({
   ...element,
-  tableColumns: initColumns(element.tableColumns),
+  tableColumns: initColumns(element.tableColumns).map((item, index) => ({
+    ...item,
+    hidden: true,
+  })),
 }));
 
 const SelectColumns = NewColumns.filter(
@@ -39,6 +42,7 @@ export default {
     FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
     popDialog: () => import("@/components/PopDialog/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
+    ButtonHide: () => import("../components/hide/index.vue"),
   },
 
   data() {
@@ -86,6 +90,27 @@ export default {
       },
       set() {},
     },
+    innerColumns: {
+      get() {
+        let { tabName, tabColumns } = this;
+        let obj = tabColumns.find(({ key }) => key === tabName).tableColumns;
+
+        return obj;
+      },
+      set(value) {
+        let { tabName, tabColumns } = this;
+        this.tabColumns = tabColumns.map((item) => {
+          if (item.key === tabName) {
+            item.tableColumns = value;
+          }
+          return { ...item };
+        });
+        this.$nextTick(() => {
+          this.$refs.puOrderItemList &&
+            this.$refs.puOrderItemList[0].doLayout();
+        });
+      },
+    },
   },
   watch: {
     // 同步物料信息与执行结果
@@ -737,7 +762,8 @@ export default {
 
           let sumColumn = tabColumns
             .find((tab) => tab.key === tabName)
-            .tableColumns.filter(
+            .tableColumns.filter((item) => item.hidden)
+            .filter(
               ({ key, isSummary }) => isSummary && key === column.property
             );
 
@@ -847,6 +873,9 @@ export default {
         }
       }
     },
+    onHide(prop) {
+      this.innerColumns = prop;
+    },
   },
   created() {
     console.log("ADD CREATED", this.params);
@@ -1068,8 +1097,10 @@ export default {
             >
               <template slot="empty">暂无数据</template>
               <ux-table-column
-                v-for="(cColumn, cIndex) in column.tableColumns"
-                :key="cIndex"
+                v-for="(cColumn, cIndex) in column.tableColumns.filter(
+                  (item) => item.hidden
+                )"
+                :key="cColumn.key + cColumn.hidden"
                 :title="cColumn.title"
                 :width="cColumn.width || 80"
                 :field="cColumn.key"
@@ -1210,6 +1241,11 @@ export default {
             :fileSize="2"
           ></BatchImport>
         </el-row>
+        <el-row style="margin-top: 10px">
+          <el-col>
+            <button-hide v-model="innerColumns" @change="onHide"></button-hide>
+          </el-col>
+        </el-row>
       </el-card>
     </el-form>
   </el-drawer>

+ 135 - 0
src/views/purchase/purchase-order/components/hide/index.vue

@@ -0,0 +1,135 @@
+<template>
+  <el-button size="mini" @click="drawer = true">
+    {{ number ? `隐藏列 :${number}` : "隐藏列" }}
+    <el-drawer
+      :show-close="false"
+      :visible.sync="drawer"
+      size="22%"
+      title="隐藏列"
+      append-to-body
+    >
+      <template slot="title">
+        <span>隐藏列</span>
+      </template>
+      <el-input
+        v-model="key"
+        size="mini"
+        placeholder="请输入列名称"
+        style="width: 100%; padding: 0 16px 16px"
+      >
+      </el-input>
+      <el-row
+        :gutter="20"
+        style="margin: 0; display: flex; flex-direction: column"
+      >
+        <!-- <el-draggable
+          v-model="columns"
+          :group="{ item: 'key' }"
+          @change="onDraggableChange"
+        > -->
+        <el-col
+          v-for="(item, index) in searchColumns"
+          :key="index"
+          :span="24"
+          style="
+            display: flex;
+            justify-content: space-between;
+            padding: 12px 16px;
+          "
+        >
+          <span
+            style="
+              height: 20px;
+              line-height: 20px;
+              font-size: 13px;
+              flex: 1;
+              cursor: move;
+              padding: 0 12px 0 0;
+              text-overflow: ellipsis;
+              overflow: hidden;
+              word-break: break-all;
+              white-space: nowrap;
+            "
+          >
+            <!-- <i
+              class="el-icon-mouse"
+              style="color: #72767b; margin: 0 6px 0 0"
+            ></i> -->
+            <i
+              class="el-icon-user"
+              style="color: #72767b; margin: 0 6px 0 0"
+            ></i>
+            {{ item.title }}
+          </span>
+          <el-switch
+            v-model="item.hidden"
+            size="mini"
+            @change="onDraggableChange"
+          ></el-switch>
+        </el-col>
+        <!-- </el-draggable> -->
+      </el-row>
+    </el-drawer>
+  </el-button>
+</template>
+
+<script>
+import deepCopy from "@gby/deep-copy";
+export default {
+  name: "Hide",
+  components: {
+    ElDraggable: () => import("@/components/draggable/index.vue"),
+  },
+  props: {
+    value: {
+      type: Array,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      drawer: false,
+      key: "",
+    };
+  },
+  computed: {
+    columns: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+    searchColumns: {
+      get() {
+        return this.columns.filter((item) => item.title.indexOf(this.key) > -1);
+      },
+      set(value) {},
+    },
+    number: {
+      get() {
+        return this.columns.filter((item) => !item.hidden).length;
+      },
+      set(value) {},
+    },
+  },
+  watch: {},
+  methods: {
+    onClone(prop) {
+      return deepCopy(prop);
+    },
+    onDraggableChange() {
+      event.stopPropagation();
+      this.$emit("change", this.columns);
+    },
+    useSubmit() {
+      this.drawer = false;
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 36 - 3
src/views/purchase/purchase-order/edit/index.vue

@@ -19,6 +19,7 @@ export default {
     VirtualColumn,
     FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
+    ButtonHide: () => import("../components/hide/index.vue"),
   },
   data() {
     return {
@@ -60,6 +61,27 @@ export default {
       },
       set() {},
     },
+    innerColumns: {
+      get() {
+        let { tabName, tabColumns } = this;
+        let obj = tabColumns.find(({ key }) => key === tabName).tableColumns;
+
+        return obj;
+      },
+      set(value) {
+        let { tabName, tabColumns } = this;
+        this.tabColumns = tabColumns.map((item) => {
+          if (item.key === tabName) {
+            item.tableColumns = value;
+          }
+          return { ...item };
+        });
+        this.$nextTick(() => {
+          this.$refs.puOrderItemList &&
+            this.$refs.puOrderItemList[0].doLayout();
+        });
+      },
+    },
   },
   watch: {
     "params.contractType": function (newProp) {
@@ -695,7 +717,8 @@ export default {
 
           let sumColumn = tabColumns
             .find((tab) => tab.key === tabName)
-            .tableColumns.filter(
+            .tableColumns.filter((item) => item.hidden)
+            .filter(
               ({ key, isSummary }) => isSummary && key === column.property
             );
 
@@ -814,6 +837,9 @@ export default {
         }
       }
     },
+    onHide(prop) {
+      this.innerColumns = prop;
+    },
   },
   created() {},
   mounted() {},
@@ -1034,8 +1060,10 @@ export default {
                 width="60"
               ></ux-table-column>
               <ux-table-column
-                v-for="(cColumn, cIndex) in column.tableColumns"
-                :key="cIndex"
+                v-for="(cColumn, cIndex) in column.tableColumns.filter(
+                  (item) => item.hidden
+                )"
+                :key="cColumn.key + cColumn.hidden"
                 :field="cColumn.key"
                 :title="cColumn.title"
                 :width="cColumn.width || 80"
@@ -1186,6 +1214,11 @@ export default {
             :fileSize="2"
           ></BatchImport>
         </el-row>
+        <el-row style="margin-top: 10px">
+          <el-col>
+            <button-hide v-model="innerColumns" @change="onHide"></button-hide>
+          </el-col>
+        </el-row>
       </el-card>
     </el-form>
   </el-drawer>

+ 4 - 1
src/views/purchase/purchase-order/edit/initColumn.js

@@ -12,7 +12,10 @@ export const editColumns = initColumns(Columns);
 export const editTabColumns = TabColumns.map((element) => 
 ({
   ...element,
-  tableColumns: initColumns(element.tableColumns),
+  tableColumns: initColumns(element.tableColumns).map((item) => ({
+    ...item,
+    hidden: true,
+  })),
 }));
 
 export const SelectColumns = editColumns.filter(column => column.inputType === 'Select')

+ 40 - 6
src/views/purchase/purchase-order/see/index.vue

@@ -18,7 +18,10 @@ const { Columns, TabColumns } = judgeColumns();
 const NewColumns = initColumns(Columns);
 const NewTabColumns = TabColumns.map((element) => ({
   ...element,
-  tableColumns: initColumns(element.tableColumns),
+  tableColumns: initColumns(element.tableColumns).map((item, index) => ({
+    ...item,
+    hidden: true,
+  })),
 }));
 //
 const SelectColumns = NewColumns.filter(
@@ -38,6 +41,7 @@ export default {
     VirtualColumn,
     FileUploadCenter: () => import("../components/FileUploadCenter/index.vue"),
     FilePrint: () => import("../print/index.vue"),
+    ButtonHide: () => import("../components/hide/index.vue"),
   },
   data() {
     return {
@@ -68,6 +72,27 @@ export default {
       },
       set() {},
     },
+    innerColumns: {
+      get() {
+        let { tabName, tabColumns } = this;
+        let obj = tabColumns.find(({ key }) => key === tabName).tableColumns;
+
+        return obj;
+      },
+      set(value) {
+        let { tabName, tabColumns } = this;
+        this.tabColumns = tabColumns.map((item) => {
+          if (item.key === tabName) {
+            item.tableColumns = value;
+          }
+          return { ...item };
+        });
+        this.$nextTick(() => {
+          this.$refs.puOrderItemList &&
+            this.$refs.puOrderItemList[0].doLayout();
+        });
+      },
+    },
   },
   watch: {},
   methods: {
@@ -121,7 +146,6 @@ export default {
     },
     // 发送NC
     async handleSendNC() {
-
       try {
         let { code } = await orderApi.toNc({ puOrderId: this.params.id });
 
@@ -162,7 +186,8 @@ export default {
 
           let sumColumn = tabColumns
             .find((tab) => tab.key === tabName)
-            .tableColumns.filter(
+            .tableColumns.filter((item) => item.hidden)
+            .filter(
               ({ key, isSummary }) => isSummary && key === column.property
             );
 
@@ -186,6 +211,9 @@ export default {
       // sums[index] = sums[index] && sums[index].toFixed(2); // 保留2位小数,解决小数合计列
       return [means];
     },
+    onHide(prop) {
+      this.innerColumns = prop;
+    },
   },
   created() {},
   mounted() {},
@@ -396,7 +424,6 @@ export default {
             :label="column.title"
             :name="column.key"
           >
-           
             <ux-grid
               border
               use-virtual
@@ -420,8 +447,10 @@ export default {
                 width="60"
               ></ux-table-column>
               <ux-table-column
-                v-for="(cColumn, cIndex) in column.tableColumns"
-                :key="cIndex"
+                v-for="(cColumn, cIndex) in column.tableColumns.filter(
+                  (item) => item.hidden
+                )"
+                :key="cColumn.key + cColumn.hidden"
                 :field="cColumn.key"
                 :title="cColumn.title"
                 :width="cColumn.width || 80"
@@ -507,6 +536,11 @@ export default {
             </ux-grid>
           </el-tab-pane>
         </el-tabs>
+        <el-row style="margin-top: 10px">
+          <el-col>
+            <button-hide v-model="innerColumns" @change="onHide"></button-hide>
+          </el-col>
+        </el-row>
       </el-card>
     </el-form>
   </el-drawer>