wsx пре 1 година
родитељ
комит
0a1bc07d7e

+ 243 - 235
src/views/marketManagem/index.vue

@@ -99,255 +99,263 @@
 </template>
 
 <script>
-import tabMixins from '@/mixins/tableColumnsMixin';
-import dictMixins from '@/mixins/dictMixins';
-import addOrEditDialog from './components/addOrEditDialog.vue';
-import viewDialog from './components/viewDialog.vue';
-import searchTable from './components/searchTable.vue';
-import { getList, del } from '@/api/marketManagem/index';
-import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+  import dictMixins from '@/mixins/dictMixins';
+  import addOrEditDialog from './components/addOrEditDialog.vue';
+  import viewDialog from './components/viewDialog.vue';
+  import searchTable from './components/searchTable.vue';
+  import { getList, del } from '@/api/marketManagem/index';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
 
-export default {
-  mixins: [dictMixins,tabMixins],
-  components: {
-    processSubmitDialog,
-    addOrEditDialog,
-    viewDialog,
-    searchTable
-  },
-  data() {
-    return {
-      // 加载状态
-      loading: false,
-      delVisible: false,
-      selection: [],
-      processSubmitDialogFlag: false,
-      cacheKeyUrl:'eos-a2e6abd9-marketManagement',
-      columnsVersion:1,
-    };
-  },
-  computed: {
-    columns() {
-      // 当columnsVersion变化时会重新计算,用作更新列配置
-      const version = this.columnsVersion;
-      return [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center',
-          selectable: (row, index) => {
-            return (
-              row.reviewStatus != 1 && row.reviewStatus != 2
-            );
-          }
-        },
-        {
-          width: 60,
-          label: '序号',
-          type: 'index',
-          columnKey: 'index',
-          align: 'center'
-        },
-        {
-          minWidth: 200,
-          prop: 'code',
-          label: '编码',
-          align: 'center',
-          slot: 'code',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 80,
-          prop: 'type',
-          label: '类型',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 200,
-          prop: 'name',
-          label: '主题',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 200,
-          prop: 'visitingUnitsName',
-          label: '来访单位',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 120,
-          prop: 'start',
-          label: '来访时间',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 120,
-          prop: 'numberOfVisitors',
-          label: '来访总人数',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 100,
-          prop: 'commanderName',
-          label: '负责人',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 120,
-          prop: 'promoterName',
-          label: '发起人',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-
-        {
-          minWidth: 120,
-          label: '审核状态',
-          align: 'center',
-          prop: 'reviewStatus',
-          showOverflowTooltip: true,
-          formatter: (row, column, val) => {
-            return val == 0
-              ? '未提交'
-              : val == 1
-              ? '审核中'
-              : val == 2
-              ? '审核通过'
-              : '审核不通过';
-          }
-        },
-        {
-          minWidth: 100,
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 100,
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          slot: 'createTime',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 200,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ];
-    }
-  },
-  created() {},
-  methods: {
-    //新增、修改
-    handleAddOrEdit(row = {}, type) {
-      this.$nextTick(() => {
-        if (type == 'view') {
-          this.$refs.viewDialogRef.open(row, type);
-        } else {
-          this.$refs.addOrEditDialogRef.open(row, type);
-        }
-      });
+  export default {
+    mixins: [dictMixins, tabMixins],
+    components: {
+      processSubmitDialog,
+      addOrEditDialog,
+      viewDialog,
+      searchTable
     },
-    //新增、修改
-    handleDetail(row = {}, type) {
-      this.detailDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.detailDialogRef.init(row, type);
-      });
+    data() {
+      return {
+        // 加载状态
+        loading: false,
+        delVisible: false,
+        selection: [],
+        processSubmitDialogFlag: false,
+        cacheKeyUrl: 'eos-a2e6abd9-marketManagement',
+        columnsVersion: 1
+      };
     },
+    computed: {
+      columns() {
+        // 当columnsVersion变化时会重新计算,用作更新列配置
+        const version = this.columnsVersion;
+        return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            selectable: (row, index) => {
+              return row.reviewStatus != 1 && row.reviewStatus != 2;
+            }
+          },
+          {
+            width: 60,
+            label: '序号',
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            minWidth: 200,
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            slot: 'code',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 80,
+            prop: 'type',
+            label: '类型',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 200,
+            prop: 'name',
+            label: '主题',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 200,
+            prop: 'visitingUnitsName',
+            label: '来访单位',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'start',
+            label: '来访时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'numberOfVisitors',
+            label: '来访总人数',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'commanderName',
+            label: '负责人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 120,
+            prop: 'promoterName',
+            label: '发起人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
 
-    /* 表格数据源 */
-    datasource({ page, limit, where, order }) {
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    submit(res) {
-      this.processSubmitDialogFlag = true;
-      this.$nextTick(() => {
-        let params = {
-          businessId: res.id,
-          businessKey: 'market_management_approve',
-          formCreateUserId: res.createUserId,
-          pcHandle: '/bpm/handleTask/components/marketManagem/submit.vue',
-          pcView: '/bpm/handleTask/components/marketManagem/view.vue',
-          variables: {
-            businessCode: res.code,
-            businessName: res.name,
-            businessType: res.type,
+          {
+            minWidth: 120,
+            label: '审核状态',
+            align: 'center',
+            prop: 'reviewStatus',
+            showOverflowTooltip: true,
+            formatter: (row, column, val) => {
+              return val == 0
+                ? '未提交'
+                : val == 1
+                ? '审核中'
+                : val == 2
+                ? '审核通过'
+                : '审核不通过';
+            }
+          },
+          {
+            minWidth: 100,
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            slot: 'createTime',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'updateTime',
+            label: '修改时间',
+            align: 'center',
+            slot: 'updateTime',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 200,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
           }
-        };
-        this.$refs.processSubmitDialogRef.init(params);
-      });
-    },
-    /* 刷新表格 */
-    reload(where = {}) {
-      this.$refs.table.reload({ page: 1, where });
+        ];
+      }
     },
+    created() {},
+    methods: {
+      //新增、修改
+      handleAddOrEdit(row = {}, type) {
+        this.$nextTick(() => {
+          if (type == 'view') {
+            this.$refs.viewDialogRef.open(row, type);
+          } else {
+            this.$refs.addOrEditDialogRef.open(row, type);
+          }
+        });
+      },
+      //新增、修改
+      handleDetail(row = {}, type) {
+        this.detailDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.detailDialogRef.init(row, type);
+        });
+      },
 
-    //批量删除
-    allDelBtn() {
-      if (this.selection.length === 0) return;
-      let flag = this.selection.some((item) =>
-        [1, 2].includes(item.approvalStatus)
-      );
-      if (flag)
-        return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
-      this.delVisible = true;
-    },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      submit(res) {
+        this.processSubmitDialogFlag = true;
+        this.$nextTick(() => {
+          let params = {
+            businessId: res.id,
+            businessKey: 'market_management_approve',
+            formCreateUserId: res.createUserId,
+            pcHandle: '/bpm/handleTask/components/marketManagem/submit.vue',
+            pcView: '/bpm/handleTask/components/marketManagem/view.vue',
+            variables: {
+              businessCode: res.code,
+              businessName: res.name,
+              businessType: res.type
+            }
+          };
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
+      /* 刷新表格 */
+      reload(where = {}) {
+        this.$refs.table.reload({ page: 1, where });
+      },
 
-    commitBtn() {
-      const dataId = this.selection.map((v) => v.id);
-      del(dataId).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
-    remove(row) {
-      del(row).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
+      //批量删除
+      allDelBtn() {
+        if (this.selection.length === 0) return;
+        let flag = this.selection.some((item) =>
+          [1, 2].includes(item.approvalStatus)
+        );
+        if (flag)
+          return this.$message.warning(
+            '抱歉已审核、审核中的数据不能删除,请检查'
+          );
+        this.delVisible = true;
+      },
+
+      commitBtn() {
+        const dataId = this.selection.map((v) => v.id);
+        del(dataId).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
+      remove(row) {
+        del(row).then((res) => {
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-:deep(.el-link--inner) {
-  margin-left: 0px !important;
-}
+  :deep(.el-link--inner) {
+    margin-left: 0px !important;
+  }
 
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 40px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  & > .el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 </style>

+ 16 - 9
src/views/saleManage/contact/index.vue

@@ -212,12 +212,11 @@
       width="70%"
       @close="visible = false"
       :maxable="true"
-    :resizable="true"
+      :resizable="true"
     >
       <followList ref="followListRef" @success="followListSuccess"></followList>
     </ele-modal>
     <myqsCode ref="qsCodeRef"></myqsCode>
-
   </div>
 </template>
 
@@ -245,7 +244,7 @@
   import dictMixins from '@/mixins/dictMixins';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       AssetTree,
       ContactSearch,
@@ -335,7 +334,7 @@
             formatter: (_row, _column, cellValue) => {
               return (
                 (_row.addressName ? _row.addressName.replaceAll(',', '') : '') +
-                 ( _row.address || '')
+                (_row.address || '')
               );
             }
           },
@@ -441,6 +440,16 @@
               return this.$util.toDateString(cellValue);
             }
           },
+          {
+            prop: 'updateTime',
+            label: '修改时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 160,
+            formatter: (_row, _column, cellValue) => {
+              return this.$util.toDateString(cellValue);
+            }
+          },
           {
             columnKey: 'action',
             label: '操作',
@@ -465,7 +474,7 @@
         showEdit: true,
         visible: false,
         codeVisible: false,
-        cacheKeyUrl:'eos-6c810d8f-saleManage-contact',
+        cacheKeyUrl: 'eos-6c810d8f-saleManage-contact'
       };
     },
     computed: {},
@@ -484,8 +493,7 @@
           type: 1,
           salesmanId: this.$store.state.user.info.userId,
           ...where,
-          categoryId:this.curNodeData.id,
-
+          categoryId: this.curNodeData.id
         });
       },
       async addFollowDialog(row) {
@@ -594,8 +602,7 @@
         // this.$refs.contactDetailDialogRef.open(row);
 
         this.$refs.drawerRef.open(row, 'myList');
-      },
-    
+      }
     }
   };
 </script>

+ 412 - 314
src/views/salesServiceManagement/components/AssetsDialog.vue

@@ -63,27 +63,45 @@
         <el-row>
           <el-col :span="6">
             <el-form-item label="批次号:">
-              <el-input type="text" placeholder="搜索批次号" v-model="searchForm.batchNo"></el-input>
+              <el-input
+                type="text"
+                placeholder="搜索批次号"
+                v-model="searchForm.batchNo"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="刻码">
-              <el-input type="text" placeholder="搜索物品刻码" v-model="searchForm.engrave"></el-input>
+              <el-input
+                type="text"
+                placeholder="搜索物品刻码"
+                v-model="searchForm.engrave"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="发货码">
-              <el-input type="text" placeholder="搜索发货码" v-model="searchForm.barcodes"></el-input>
+              <el-input
+                type="text"
+                placeholder="搜索发货码"
+                v-model="searchForm.barcodes"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="6">
             <el-form-item label="牌号">
-              <el-input type="text" placeholder="搜索牌号" v-model="searchForm.brandNum"></el-input>
+              <el-input
+                type="text"
+                placeholder="搜索牌号"
+                v-model="searchForm.brandNum"
+              ></el-input>
             </el-form-item>
           </el-col>
           <el-col style="text-align: right">
             <el-button type="primary" @click="doSearch">搜索</el-button>
-            <el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
+            <el-button icon="el-icon-refresh-left" @click="reset"
+              >重置</el-button
+            >
           </el-col>
         </el-row>
       </el-row>
@@ -91,18 +109,36 @@
         <el-row :gutter="10">
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="编码">
-              <el-input @keyup.enter.native="doSearch" clearable size="small" v-model="searchForm.code" placeholder="请输入" />
+              <el-input
+                @keyup.enter.native="doSearch"
+                clearable
+                size="small"
+                v-model="searchForm.code"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="名称">
-              <el-input @keyup.enter.native="doSearch" clearable size="small" v-model="searchForm.name" placeholder="请输入" />
+              <el-input
+                @keyup.enter.native="doSearch"
+                clearable
+                size="small"
+                v-model="searchForm.name"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
 
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="型号">
-              <el-input @keyup.enter.native="doSearch"  clearable size="small" v-model="searchForm.modelType" placeholder="请输入" />
+              <el-input
+                @keyup.enter.native="doSearch"
+                clearable
+                size="small"
+                v-model="searchForm.modelType"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
 
@@ -114,9 +150,16 @@
                 icon="el-icon-search"
                 class="ele-btn-icon"
                 @click="doSearch"
-              >查询</el-button>
+                >查询</el-button
+              >
 
-              <el-button @click="reset" icon="el-icon-refresh" class="ele-btn-icon" size="medium">重置</el-button>
+              <el-button
+                @click="reset"
+                icon="el-icon-refresh"
+                class="ele-btn-icon"
+                size="medium"
+                >重置</el-button
+              >
               <slot></slot>
             </el-form-item>
           </el-col>
@@ -124,13 +167,19 @@
         <el-row :gutter="10">
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="牌号">
-              <el-input @keyup.enter.native="doSearch" clearable size="small" v-model="searchForm.brandNum" placeholder="请输入" />
+              <el-input
+                @keyup.enter.native="doSearch"
+                clearable
+                size="small"
+                v-model="searchForm.brandNum"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="规格">
               <el-input
-              @keyup.enter.native="doSearch"
+                @keyup.enter.native="doSearch"
                 clearable
                 size="small"
                 v-model="searchForm.specification"
@@ -140,7 +189,13 @@
           </el-col>
           <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
             <el-form-item label="关键字">
-              <el-input @keyup.enter.native="doSearch" clearable size="small" v-model="searchForm.searchKey" placeholder="请输入" />
+              <el-input
+                @keyup.enter.native="doSearch"
+                clearable
+                size="small"
+                v-model="searchForm.searchKey"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
         </el-row>
@@ -148,7 +203,12 @@
     </el-form>
     <el-container class="assets-dialog">
       <el-aside width="200px" class="wrapper-assets">
-        <AssetTree ref="treeList" :treeIds="[]" itemType="5" @handleNodeClick="handleNodeClick" />
+        <AssetTree
+          ref="treeList"
+          :treeIds="[]"
+          itemType="5"
+          @handleNodeClick="handleNodeClick"
+        />
       </el-aside>
       <el-main>
         <el-table
@@ -171,22 +231,38 @@
             align="center"
             v-if="isAll"
           ></el-table-column>
-          <el-table-column label="序号" type="index" width="50"></el-table-column>
+          <el-table-column
+            label="序号"
+            type="index"
+            width="50"
+          ></el-table-column>
           <el-table-column
             prop="categoryCode"
-            :label="!fieldShow?'编码':'物品编码'"
+            :label="!fieldShow ? '编码' : '物品编码'"
             min-width="120"
             :show-overflow-tooltip="true"
           ></el-table-column>
           <el-table-column
             prop="categoryName"
             width="200"
-            :label="!fieldShow?'名称':'物品名称'"
+            :label="!fieldShow ? '名称' : '物品名称'"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            prop="brandNum"
+            label="牌号"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            prop="categoryModel"
+            label="型号"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column
+            prop="specification"
+            label="规格"
             :show-overflow-tooltip="true"
           ></el-table-column>
-          <el-table-column prop="brandNum" label="牌号" :show-overflow-tooltip="true"></el-table-column>
-          <el-table-column prop="categoryModel" label="型号" :show-overflow-tooltip="true"></el-table-column>
-          <el-table-column prop="specification" label="规格" :show-overflow-tooltip="true"></el-table-column>
           <!-- <el-table-column
        
             label="出库数量"
@@ -210,10 +286,28 @@
             min-width="80"
           ></el-table-column>
           <el-table-column prop="level" label="级别"></el-table-column>
-          <el-table-column prop="measureQuantity" v-if="fieldShow" label="计量数量" width="120"></el-table-column>
-          <el-table-column prop="measureUnit" v-if="fieldShow" label="计量单位" width="90"></el-table-column>
-          <el-table-column prop="weight" label="重量" min-width="120"></el-table-column>
-          <el-table-column prop="weightUnit" label="重量单位" min-width="120"></el-table-column>
+          <el-table-column
+            prop="measureQuantity"
+            v-if="fieldShow"
+            label="计量数量"
+            width="120"
+          ></el-table-column>
+          <el-table-column
+            prop="measureUnit"
+            v-if="fieldShow"
+            label="计量单位"
+            width="90"
+          ></el-table-column>
+          <el-table-column
+            prop="weight"
+            label="重量"
+            min-width="120"
+          ></el-table-column>
+          <el-table-column
+            prop="weightUnit"
+            label="重量单位"
+            min-width="120"
+          ></el-table-column>
           <el-table-column
             v-if="dimension == 3"
             prop="packageNo"
@@ -275,6 +369,20 @@
             :show-overflow-tooltip="true"
           ></el-table-column>
         </el-table>
+
+        <div style="text-align: right; padding: 10px">
+          <el-pagination
+            background
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="total"
+            :page-sizes="[5, 10, 20, 50]"
+            :page-size.sync="searchForm.size"
+            :current-page.sync="searchForm.pageNum"
+            @current-change="handleCurrentChange"
+            @size-change="handleSizeChange"
+          ></el-pagination>
+        </div>
+
         <ele-pro-table
           ref="table"
           :columns="columns"
@@ -283,25 +391,13 @@
           v-if="isAll"
           row-key="id"
           height="20vh"
-          :needPage="false"
+          :needPage="true"
         >
           <template v-slot:toolbar>
             <el-button type="primary" size="small" @click="add">添加</el-button>
             <el-button size="small" @click="del">移除</el-button>
           </template>
         </ele-pro-table>
-        <div style="text-align: right; padding: 10px">
-          <el-pagination
-            background
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="total"
-            :page-sizes="[5, 10, 20, 50]"
-            :page-size.sync="searchForm.size"
-            :current-page.sync="searchForm.pageNum"
-            @current-change="handleCurrentChange"
-            @size-change="handleSizeChange"
-          ></el-pagination>
-        </div>
       </el-main>
     </el-container>
 
@@ -313,299 +409,301 @@
 </template>
 
 <script>
-import {
-  getOutindetailtwoList,
-  getBatchList,
-  getMaterialList,
-  getPackingList
-} from '@/api/wms';
-import AssetTree from './assetTree.vue';
-import { getProductList } from '@/api/saleManage/quotation';
-import { getWarehouseList } from '@/api/saleManage/saleorder';
-// import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import {
+    getOutindetailtwoList,
+    getBatchList,
+    getMaterialList,
+    getPackingList
+  } from '@/api/wms';
+  import AssetTree from './assetTree.vue';
+  import { getProductList } from '@/api/saleManage/quotation';
+  import { getWarehouseList } from '@/api/saleManage/saleorder';
+  // import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
 
-export default {
-  components: { AssetTree },
-  props: {
-    treeIds: { type: Array, default: () => [] },
-    isAll: {
-      default: true
-    }
-  },
-  computed: {
-    // 物品字段
-    fieldShow() {
-      return this.dataSources == '0';
+  export default {
+    components: { AssetTree },
+    props: {
+      treeIds: { type: Array, default: () => [] },
+      isAll: {
+        default: true
+      }
     },
-    // 是否开启响应式布局
-    styleResponsive() {
-      return this.$store.state.theme.styleResponsive;
-    }
-  },
-  data() {
-    return {
-      fullscreen: false,
-      isShowTable: true,
-      qualityResultOption: [
-        {
-          value: 0,
-          label: '合格'
-        },
-        {
-          value: 1,
-          label: '不合格'
-        }
-      ],
-      qualityStatusOption: [
-        {
-          value: 1,
-          label: '已质检'
-        },
-        {
-          value: 0,
-          label: '未质检'
-        }
-      ],
-      visible1: false,
-      tableData: [],
-      total: 0,
-      categoryLevelId: '',
-      // warehouseList: [],
-      searchForm: {
-        categoryCode: '',
-        categoryName: '',
-        batchNo: '',
-        brandNum: '',
-        engrave: '',
-        barcodes: '',
-        categoryLevelId: '',
-        warehouseId: '',
-        pageNum: 1,
-        size: 20
+    computed: {
+      // 物品字段
+      fieldShow() {
+        return this.dataSources == '0';
       },
-      selectionList: [],
-      materialType: '',
-      warehouseList: [],
-      dimension: '1',
-      selection: [],
-      tableList: [],
-      columns: [
-        {
-          columnKey: 'selection',
-          type: 'selection',
-          width: 45,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    data() {
+      return {
+        fullscreen: false,
+        isShowTable: true,
+        qualityResultOption: [
+          {
+            value: 0,
+            label: '合格'
+          },
+          {
+            value: 1,
+            label: '不合格'
+          }
+        ],
+        qualityStatusOption: [
+          {
+            value: 1,
+            label: '已质检'
+          },
+          {
+            value: 0,
+            label: '未质检'
+          }
+        ],
+        visible1: false,
+        tableData: [],
+        total: 0,
+        categoryLevelId: '',
+        // warehouseList: [],
+        searchForm: {
+          categoryCode: '',
+          categoryName: '',
+          batchNo: '',
+          brandNum: '',
+          engrave: '',
+          barcodes: '',
+          categoryLevelId: '',
+          warehouseId: '',
+          pageNum: 1,
+          size: 20
         },
+        selectionList: [],
+        materialType: '',
+        warehouseList: [],
+        dimension: '1',
+        selection: [],
+        tableList: [],
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
 
-        {
-          prop: 'categoryCode',
-          label: !this.fieldShow ? '编码' : '物品编码',
-          align: 'center'
-        },
-        {
-          prop: 'categoryName',
-          // label: '物品名称',
-          label: !this.fieldShow ? '名称' : '物品名称',
-          align: 'center'
-        },
+          {
+            prop: 'categoryCode',
+            label: !this.fieldShow ? '编码' : '物品编码',
+            align: 'center'
+          },
+          {
+            prop: 'categoryName',
+            // label: '物品名称',
+            label: !this.fieldShow ? '名称' : '物品名称',
+            align: 'center'
+          },
 
-        {
-          prop: 'categoryModel',
-          label: '型号',
-          align: 'center'
-        },
-        {
-          prop: 'specification',
-          label: '规格',
-          align: 'center'
-        },
-        {
-          prop: 'level',
-          label: '级别',
-          align: 'center'
-        },
-        {
-          prop: 'measureQuantity',
-          label: '库存',
-          align: 'center'
-        },
-        {
-          prop: 'measureUnit',
-          label: '计量单位',
-          align: 'center',
-          show: this.dataSources == '0'
-        },
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center'
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center'
+          },
+          {
+            prop: 'level',
+            label: '级别',
+            align: 'center'
+          },
+          {
+            prop: 'measureQuantity',
+            label: '库存',
+            align: 'center'
+          },
+          {
+            prop: 'measureUnit',
+            label: '计量单位',
+            align: 'center',
+            show: this.dataSources == '0'
+          },
 
-        {
-          prop: 'warehouseName',
-          label: '仓库',
-          align: 'center'
-        }
-      ],
-      currentRow: {},
-      dataSources: '0' // 0:仓库;1:主数据
-    };
-  },
-  created() {
-    getWarehouseList({}).then((res) => {
-      this.warehouseList = res;
-    });
-  },
-  methods: {
-    getRowKeys(row) {
-      return row.id;
-    },
-
-    // 切换维度
-    changeDimensionHandler(e) {
-      this.searchForm.pageNum = 1;
-      this.selectionList = [];
-      this.$refs.multipleTable.clearSelection();
-      this.changeDimension(e);
-    },
-    currentChange(val) {
-      this.currentRow = val;
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            align: 'center'
+          }
+        ],
+        currentRow: {},
+        dataSources: '0' // 0:仓库;1:主数据
+      };
     },
-    async warehouseData() {
-      const res = await getProductList(this.searchForm);
-      this.tableData = res.list.map((el) => {
-        el.categoryModel = el.modelType;
-        el.categoryName = el.name;
-        el.categoryCode = el.code;
-        return el;
+    created() {
+      getWarehouseList({}).then((res) => {
+        this.warehouseList = res;
       });
-      this.total = res.count;
-    },
-    async changeDimension(e) {
-      // 查询主数据
-      if (this.dataSources == '1') {
-        this.warehouseData();
-        return;
-      }
-      this.dimension = e;
-      if (this.dimension == 1) {
-        // 物品维度
-        const data = await getOutindetailtwoList(this.searchForm);
-        this.tableData = data.list;
-        this.total = data.count;
-      } else if (this.dimension == 2) {
-        // 批次维度
-        const data = await getBatchList(this.searchForm);
-        this.tableData = data.list;
-        this.total = data.count;
-      } else if (this.dimension == 4) {
-        // 物料维度
-        const data = await getMaterialList(this.searchForm);
-        this.tableData = data.list;
-        this.total = data.count;
-      } else {
-        // 包装维度
-        const data = await getPackingList(this.searchForm);
-        this.tableData = data.list;
-        this.total = data.count;
-      }
     },
-    open(tableList, value) {
-      this.dataSources = value || '0';
-      this.visible1 = true;
-      this.tableList = JSON.parse(JSON.stringify(tableList));
-      this.$nextTick(() => {
-        this.$refs.treeList.getTreeData().then((data) => {
-          this.handleNodeClick(data);
+    methods: {
+      getRowKeys(row) {
+        return row.id;
+      },
+
+      // 切换维度
+      changeDimensionHandler(e) {
+        this.searchForm.pageNum = 1;
+        this.selectionList = [];
+        this.$refs.multipleTable.clearSelection();
+        this.changeDimension(e);
+      },
+      currentChange(val) {
+        this.currentRow = val;
+      },
+      async warehouseData() {
+        const res = await getProductList(this.searchForm);
+        this.tableData = res.list.map((el) => {
+          el.categoryModel = el.modelType;
+          el.categoryName = el.name;
+          el.categoryCode = el.code;
+          return el;
         });
-      });
-    },
-    async confirm() {
-      this.$emit(
-        'choose',
-        this.isAll ? this.tableList : this.currentRow,
-        this.dimension
-      );
-      this.cancel();
-    },
-    async add() {
-      if (!this.selectionList.length) {
-        this.$message.error('请至少选择一条数据!');
-        return;
-      }
-      this.selectionList = this.selectionList.filter((item) => {
-        if (item.warehouseList?.length > 0) {
-          item['warehouseId'] = item.warehouseList[0].warehouse_id;
-          item['warehouseName'] = item.warehouseList[0].warehouse_name;
+        this.total = res.count;
+      },
+      async changeDimension(e) {
+        // 查询主数据
+        if (this.dataSources == '1') {
+          this.warehouseData();
+          return;
         }
-        return !this.tableList
-          .map((item) => item.categoryCode)
-          .includes(item.categoryCode);
-      });
-      this.tableList.push(...this.selectionList);
-    },
-    del() {
-      let ids = this.selection.map((item) => item.id);
-      this.tableList = this.tableList.filter((item) => !ids.includes(item.id));
-    },
-    cancel() {
-      this.selectionList = [];
-      this.$refs.multipleTable.clearSelection();
-      this.visible1 = false;
-    },
-    handleSelectionChange(val) {
-      this.selectionList = val;
-    },
-    handleNodeClick(data) {
-      this.categoryLevelId = data.id;
-      this.searchForm.categoryLevelId = data.id;
-      this.doSearch();
-    },
-    handleCurrentChange() {
-      this.changeDimension(this.dimension);
-    },
-    reset() {
-      this.searchForm = {
-        categoryCode: '',
-        categoryName: '',
-        batchNo: '',
-        brandNum: '',
-        engrave: '',
-        barcodes: '',
-        categoryLevelId: this.categoryLevelId,
-        pageNum: 1,
-        warehouseId: '',
-        size: 20
-      };
-      this.doSearch();
-    },
-    doSearch() {
-      this.searchForm.pageNum = 1;
-      this.changeDimension(this.dimension);
-    },
-    handleSizeChange() {
-      this.searchForm.pageNum = 1;
-      this.changeDimension(this.dimension, 'page');
+        this.dimension = e;
+        if (this.dimension == 1) {
+          // 物品维度
+          const data = await getOutindetailtwoList(this.searchForm);
+          this.tableData = data.list;
+          this.total = data.count;
+        } else if (this.dimension == 2) {
+          // 批次维度
+          const data = await getBatchList(this.searchForm);
+          this.tableData = data.list;
+          this.total = data.count;
+        } else if (this.dimension == 4) {
+          // 物料维度
+          const data = await getMaterialList(this.searchForm);
+          this.tableData = data.list;
+          this.total = data.count;
+        } else {
+          // 包装维度
+          const data = await getPackingList(this.searchForm);
+          this.tableData = data.list;
+          this.total = data.count;
+        }
+      },
+      open(tableList, value) {
+        this.dataSources = value || '0';
+        this.visible1 = true;
+        this.tableList = JSON.parse(JSON.stringify(tableList));
+        this.$nextTick(() => {
+          this.$refs.treeList.getTreeData().then((data) => {
+            this.handleNodeClick(data);
+          });
+        });
+      },
+      async confirm() {
+        this.$emit(
+          'choose',
+          this.isAll ? this.tableList : this.currentRow,
+          this.dimension
+        );
+        this.cancel();
+      },
+      async add() {
+        if (!this.selectionList.length) {
+          this.$message.error('请至少选择一条数据!');
+          return;
+        }
+        this.selectionList = this.selectionList.filter((item) => {
+          if (item.warehouseList?.length > 0) {
+            item['warehouseId'] = item.warehouseList[0].warehouse_id;
+            item['warehouseName'] = item.warehouseList[0].warehouse_name;
+          }
+          return !this.tableList
+            .map((item) => item.categoryCode)
+            .includes(item.categoryCode);
+        });
+        this.tableList.push(...this.selectionList);
+      },
+      del() {
+        let ids = this.selection.map((item) => item.id);
+        this.tableList = this.tableList.filter(
+          (item) => !ids.includes(item.id)
+        );
+      },
+      cancel() {
+        this.selectionList = [];
+        this.$refs.multipleTable.clearSelection();
+        this.visible1 = false;
+      },
+      handleSelectionChange(val) {
+        this.selectionList = val;
+      },
+      handleNodeClick(data) {
+        this.categoryLevelId = data.id;
+        this.searchForm.categoryLevelId = data.id;
+        this.doSearch();
+      },
+      handleCurrentChange() {
+        this.changeDimension(this.dimension);
+      },
+      reset() {
+        this.searchForm = {
+          categoryCode: '',
+          categoryName: '',
+          batchNo: '',
+          brandNum: '',
+          engrave: '',
+          barcodes: '',
+          categoryLevelId: this.categoryLevelId,
+          pageNum: 1,
+          warehouseId: '',
+          size: 20
+        };
+        this.doSearch();
+      },
+      doSearch() {
+        this.searchForm.pageNum = 1;
+        this.changeDimension(this.dimension);
+      },
+      handleSizeChange() {
+        this.searchForm.pageNum = 1;
+        this.changeDimension(this.dimension, 'page');
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.el-dialog__wrapper {
-  ::v-deep .el-aside {
-    background-color: #fff !important;
-    border: 1px solid #ccc;
+  .el-dialog__wrapper {
+    ::v-deep .el-aside {
+      background-color: #fff !important;
+      border: 1px solid #ccc;
+    }
   }
-}
 
-.wrapper-assets {
-  max-height: 53vh;
-  overflow: auto;
-}
+  .wrapper-assets {
+    max-height: 53vh;
+    overflow: auto;
+  }
 </style>