Browse Source

Merge branch 'live' into edit

戴艳蓉 3 years ago
parent
commit
8a669d6750

+ 18 - 0
src/apis/service/stock/check/detail.js

@@ -0,0 +1,18 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "add", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "list", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "detail", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "accountstatus", data, "post", params),
+};
+   

+ 0 - 1
src/layout/components/TagsView/index.vue

@@ -56,7 +56,6 @@ export default {
   },
   computed: {
     visitedViews() {
-      
       return this.$store.state.tagsView.visitedViews;
     },
     routes() {

+ 2 - 10
src/views/stock/check/addModel.vue

@@ -3,8 +3,8 @@
     title="新建盘点"
     :center="true"
     align="left"
-    top="8vh"
-    width="1040px"
+    top="18vh"
+    width="600px"
     @close="closeModel"
     :close-on-click-modal="false"
     :visible.sync="showModelThis"
@@ -37,9 +37,6 @@ export default {
   watch: {
     showModel: function (val) {
       this.showModelThis = val;
-      if (val) {
-        // this.initForm();
-      }
     },
     showModelThis(val) {
       if (!val) {
@@ -51,11 +48,6 @@ export default {
     closeModel() {
       console.log("closeModel!!");
     },
-    async initForm() {
-      this.loading = true;
-      this.formId = this.id;
-      this.loading = false;
-    },
   },
 };
 </script>

+ 18 - 100
src/views/stock/check/components/addEdit.vue

@@ -9,7 +9,7 @@
       class="demo-ruleForm"
     >
       <el-row>
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item label="盘点公司" prop="wsm_supplier">
             <search-supplier
               :value="ruleForm.wsm_supplier"
@@ -18,7 +18,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item label="盘点仓库" prop="wsm_code">
             <search-stock
               :value="ruleForm.wsm_code"
@@ -31,7 +31,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="24">
           <el-form-item label="盘点类型" prop="type">
             <el-select
               v-model="ruleForm.type"
@@ -48,64 +48,10 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="24" v-if="ruleForm.type !== '1'">
-          <el-form-item label="盘点商品" :size="'mini'" prop="good_type_code">
-            <el-table
-              :data="ruleForm.good_type_code"
-              border
-              :size="'mini'"
-              max-height="400"
-              style="width: 100%"
-            >
-              <el-table-column
-                show-overflow-tooltip
-                v-for="item in columns"
-                :key="item.prop"
-                :prop="item.prop"
-                :label="item.label"
-                :width="item.width"
-                :min-width="item.minWidth + 'px'"
-              >
-              </el-table-column>
-              <el-table-column width="60px">
-                <template slot="header" slot-scope="scope">
-                  <el-tooltip effect="dark" content="添加商品" placement="top">
-                    <i
-                      class="el-icon-circle-plus-outline tb-icon"
-                      style="color: #63cbe7"
-                      @click="showGoodsModel = true"
-                    ></i>
-                  </el-tooltip>
-
-                  <!-- <el-link type="primary"  @click="showGoodsModel = true">添加商品</el-link> -->
-                  <!-- <el-button
-                  @click="showGoodsModel = true"
-                  :size="'mini'"
-                  type="primary"
-                  icon="el-icon-circle-plus-outline"
-                  circle
-                >
-                </el-button> -->
-                </template>
-                <template slot-scope="scope">
-                  <el-tooltip effect="dark" content="删除" placement="top">
-                    <i
-                      class="el-icon-delete tb-icon"
-                      @click="deleteById(scope.$index)"
-                    ></i>
-                  </el-tooltip>
-                </template>
-              </el-table-column>
-            </el-table>
-          </el-form-item>
-        </el-col>
         <el-col :span="24" style="text-align: right">
           <el-button type="primary" @click="submitForm" v-if="!isDetail"
             >保 存
           </el-button>
-          <el-button @click="showModelThis = false">{{
-            isDetail ? "关 闭" : "取 消"
-          }}</el-button>
         </el-col>
       </el-row>
     </el-form>
@@ -122,7 +68,7 @@ import resToken from "@/mixins/resToken";
 import columns from "./columns";
 export default {
   name: "addEdit",
-  props: ["showModel", "id"],
+  props: ["id"],
   mixins: [resToken],
   data() {
     return {
@@ -139,13 +85,12 @@ export default {
           label: "抽盘",
         },
       ],
-      showModelThis: this.showModel,
       columns: columns,
       ruleForm: {
         wsm_supplier: [], //供应商
         wsm_code: [], // 盘点仓库
         type: "2", // 盘点类型
-        good_type_code: [], //商品列表
+        // good_type_code: [], //商品列表
       },
       rulesThis: this.rules,
       rules: {
@@ -172,38 +117,24 @@ export default {
             trigger: "change",
           },
         ],
-
-        good_type_code: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择盘点商品",
-            trigger: "change",
-          },
-        ],
       },
     };
   },
   created() {
     this.initForm();
   },
+  watch: {
+    id: function (val) {
+      console.log(val);
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
   methods: {
     closeModel() {
       console.log("closeModel!!");
     },
-    addGoodsRes(e) {
-      let oldList = JSON.parse(JSON.stringify(this.ruleForm.good_type_code)),
-        addList = JSON.parse(JSON.stringify(e)),
-        newList = [].concat(...oldList);
-      addList.forEach((v1, index) => {
-        let oldindex = oldList.findIndex((v2) => v1.good_code === v2.good_code);
-        if (oldindex === -1) {
-          newList.push(addList[index]);
-        }
-      });
-      this.ruleForm.good_type_code = [].concat(...newList);
-      this.$refs.ruleForm.validateField("good_type_code");
-    },
     //供应商选择
     supplierChange(e) {
       if (e && e.id) {
@@ -213,7 +144,9 @@ export default {
         this.ruleForm.wsm_supplier = [];
         this.companyCode = "";
       }
+      this.ruleForm.wsm_code = [];
       this.$refs.ruleForm.validateField("wsm_supplier");
+      this.$refs.ruleForm.validateField("wsm_code");
     },
     //仓库选择
     stockChange(e) {
@@ -229,22 +162,14 @@ export default {
       this.$refs.ruleForm.validateField("good_type_code");
     },
     async initForm() {
-      console.log(this.id);
       this.loading = true;
       if (this.id === "add") {
-        this.title = "添加账号";
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
-        if (this.isDetail) {
-          this.title = "账号详情";
-          this.rulesThis = {};
-        } else {
-          this.title = "修改账号";
-          this.rulesThis = this.rules;
-        }
-        await this.resetForm(this.sitem);
-        // await this.initData()
+        this.rulesThis = this.rules;
+        await this.resetForm();
+        await this.initData();
       }
       this.loading = false;
     },
@@ -270,7 +195,6 @@ export default {
             wsm_supplier: [], // 盘点公司
             wsm_code: [], // 盘点仓库
             type: "2", // 真实姓名
-            good_type_code: [], //商品列表
           };
         }
       });
@@ -286,15 +210,10 @@ export default {
           const { wsm_code, type, good_type_code } = JSON.parse(
             JSON.stringify(this.ruleForm)
           );
-          let goodcode = "";
-          good_type_code.forEach((v, i) => {
-            goodcode += i !== 0 ? `,${v.good_code}` : v.good_code;
-          });
           const model = {
             id: this.id,
             wsm_code: this.getId(wsm_code) || "", // 盘点仓库
             type: type || "", // 盘点类型
-            good_type_code: goodcode || "", //商品列表
           };
           let res = {};
           if (this.id === "add") {
@@ -310,7 +229,6 @@ export default {
               title,
               message: "",
             });
-            this.showModelThis = false;
             // 刷新
             this.$emit("refresh");
           } else if (res && res.code >= 100 && res.code <= 104) {

+ 223 - 0
src/views/stock/check/detail.vue

@@ -0,0 +1,223 @@
+<template>
+  <div class="checkDetail pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <add-edit :id="$route.query.id" />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import statusList from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/stock/check/detail";
+import addEdit from "./components/addEdit";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "checkDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "checkDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "nickname",
+          label: "真实姓名",
+        },
+        {
+          prop: "role_name",
+          label: "角色名称",
+        },
+        {
+          prop: "mobile",
+          label: "联系电话",
+        },
+        {
+          prop: "email",
+          label: "邮箱",
+        },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          width: "80px",
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          sortable: true,
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    console.log(this.$route.query.id);
+
+    // this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 10, // 每页显示条数
+      };
+      this.searchList();
+    },
+
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+
+    async statusConfirm(id, status) {
+      let str = status === "1" ? "禁用" : "启用";
+      await this.$confirm("确定要改为" + str + "?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.checkDetail {
+}
+</style>
+   

+ 155 - 171
src/views/stock/check/index.vue

@@ -12,6 +12,7 @@
         :size="size"
         @page-curr-change="handlePageChange"
         @page-size-change="handleSizeChange"
+        @RowClick="RowClick"
         @screen-reset="
           pageInfo.curr = 1;
           parmValue.page = 1;
@@ -27,13 +28,23 @@
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
-                <el-col :span="4" style="width: 120px">
+                <el-col :span="6" style="width: 292px">
+                  <period-date-picker
+                    :start="parmValue.start"
+                    :end="parmValue.end"
+                    :type="1"
+                    :width="'135px'"
+                    :size="searchSize"
+                    @timeReturned="timeReturned($event)"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 180px; padding: 0 0 0 10px">
                   <el-select
                     :size="searchSize"
                     v-model="parmValue.status"
                     filterable
                     clearable
-                    placeholder="账号状态"
+                    placeholder="盘点状态"
                     style="width: 100%"
                     @change="
                       pageInfo.curr = 1;
@@ -42,27 +53,63 @@
                     "
                   >
                     <el-option
-                      v-for="item in statusList"
-                      :key="'status' + item.code"
-                      :label="item.name"
-                      :value="item.code"
+                      v-for="item in statusOptions"
+                      :key="'status' + item.id"
+                      :label="item.label"
+                      :value="item.id"
                     />
                   </el-select>
                 </el-col>
-                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                <el-col :span="4" style="width: 130px; padding: 0 0 0 10px">
+                  <el-select
+                    :size="searchSize"
+                    v-model="parmValue.type"
+                    filterable
+                    clearable
+                    placeholder="盘点类型"
+                    style="width: 100%"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option
+                      v-for="item in typeOptions"
+                      :key="'type' + item.id"
+                      :label="item.label"
+                      :value="item.id"
+                    />
+                  </el-select>
+                </el-col>
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    style="float: right; margin-left: 5px"
+                    @click="searchList"
+                  >
+                    刷新
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="24">
+                <el-col :span="4" style="width: 260px">
                   <el-input
                     :size="searchSize"
-                    v-model="parmValue.name"
+                    v-model="parmValue.wsm_code"
                     :maxlength="40"
-                    placeholder="业务员姓名"
+                    placeholder="仓库编号"
                   />
                 </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <el-col :span="4" style="width: 250px; padding: 0 0 0 10px">
                   <el-input
                     :size="searchSize"
-                    v-model="parmValue.username"
+                    v-model="parmValue.check_code"
                     :maxlength="40"
-                    placeholder="手机号"
+                    placeholder="盘点编号"
                   />
                 </el-col>
                 <el-col :span="4" style="width: 54px">
@@ -83,16 +130,6 @@
                     重置
                   </el-button>
                 </el-col>
-                <el-col :span="3" style="width: 66px; float: right">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    style="float: right; margin-left: 5px"
-                    @click="searchList"
-                  >
-                    刷新
-                  </el-button>
-                </el-col>
                 <el-col
                   :span="3"
                   style="width: 66px; float: right"
@@ -121,68 +158,6 @@
             "
           ></el-tag>
         </template>
-        <template #operation="{ scope }">
-          <el-tooltip
-            v-if="powers.some((item) => item == '002')"
-            effect="dark"
-            content="重置密码"
-            placement="top"
-          >
-            <i
-              class="el-icon-refresh-left tb-icon"
-              @click="openPasswordModal(scope.row.id, false)"
-            ></i>
-          </el-tooltip>
-
-          <el-tooltip
-            v-if="powers.some((item) => item == '007')"
-            effect="dark"
-            content="详情"
-            placement="top"
-          >
-            <i
-              class="el-icon-view tb-icon"
-              @click="openModal(scope.row.id, true, scope.row)"
-            ></i>
-          </el-tooltip>
-          <el-tooltip
-            v-if="powers.some((item) => item == '005')"
-            effect="dark"
-            content="修改"
-            placement="top"
-          >
-            <i
-              class="el-icon-edit tb-icon"
-              @click="openModal(scope.row.id, false, scope.row)"
-            ></i>
-          </el-tooltip>
-          <el-tooltip
-            v-if="
-              powers.some((item) => item == '004') && scope.row.status === '1'
-            "
-            effect="dark"
-            content="禁用"
-            placement="top"
-          >
-            <i
-              class="el-icon-video-pause tb-icon"
-              @click="statusConfirm(scope.row.id, scope.row.status)"
-            ></i>
-          </el-tooltip>
-          <el-tooltip
-            v-if="
-              powers.some((item) => item == '004') && scope.row.status === '0'
-            "
-            effect="dark"
-            content="启用"
-            placement="top"
-          >
-            <i
-              class="el-icon-video-play tb-icon"
-              @click="statusConfirm(scope.row.id, scope.row.status)"
-            ></i>
-          </el-tooltip>
-        </template>
       </ex-table>
       <add-model
         :id="modelId"
@@ -201,7 +176,6 @@
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-import statusList from "@/assets/js/statusList";
 import asyncRequest from "@/apis/service/stock/check";
 import addModel from "./addModel";
 import { mapGetters } from "vuex";
@@ -213,7 +187,7 @@ export default {
     addModel,
   },
   computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "visitedViews"]),
     powers() {
       let tran =
         this.$store.getters.btnList.find(
@@ -229,22 +203,32 @@ export default {
   data() {
     return {
       sitem: null,
-      // 状态
+      // 节点状态
       statusOptions: [
-        { id: "0", label: "禁用" },
-        { id: "1", label: "启用" },
+        { id: "0", label: "待发起流程" },
+        { id: "1", label: "待上传盘点结果" },
+        { id: "2", label: "待审核盘点结果" },
+        { id: "3", label: "待系统更新" },
+        { id: "4", label: "盘点已结束" },
+      ],
+      // 盘点类型
+      typeOptions: [
+        { id: "1", label: "全盘" },
+        { id: "2", label: "抽盘" },
       ],
-      statusList: statusList,
       loading: true,
       showModel: false,
       isDetail: false,
       modelId: 0,
       parmValue: {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
         page: 1, // 页码
         size: 15, // 每页显示条数
+        wsm_code: "", // 盘点仓库 
+        check_code: "", // 	盘点编号
+        type: "", //盘点类型
+        status: "", //判断状态
+        start: "",
+        end: "",
       },
       tableData: [],
       passwordModel: false,
@@ -271,34 +255,34 @@ export default {
           label: "盘点编号",
         },
         {
-          prop: "role_name",
-          label: "角色名称",
+          prop: "wsm_code",
+          label: "仓库编码",
+          width: "170px",
         },
         {
-          prop: "mobile",
-          label: "联系电话",
+          prop: "name",
+          label: "仓库名称",
         },
         {
-          prop: "email",
-          label: "邮箱",
+          prop: "code",
+          label: "公司编码",
+          width: "140px",
         },
         {
-          prop: "status",
-          label: "状态",
-          _slot_: "status",
-          width: "80px",
+          prop: "caname",
+          label: "公司名称",
         },
+
+        // {
+        //   prop: "status",
+        //   label: "状态",
+        //   _slot_: "status",
+        //   width: "80px",
+        // },
         {
           prop: "addtime",
           label: "创建时间",
-          sortable: true,
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
+          width: "140px",
         },
       ],
     };
@@ -310,9 +294,12 @@ export default {
   methods: {
     restSearch() {
       this.parmValue = {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        wsm_code: "", // 盘点仓库
+        check_code: "", // 	盘点编号
+        type: "", //盘点类型
+        status: "", //判断状态
+        start: "",
+        end: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -325,35 +312,32 @@ export default {
       this.isDetail = isDetail;
       this.sitem = sitem;
     },
-    async deleteById(id, status) {
-      // await this.$confirm("确定要删除?", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(async () => {
-      //     const model = {
-      //       id: id,
-      //       status: status === "1" ? "0" : "1",
-      //     };
-      //     const res = await asyncRequest.status(model);
-      //     if (res && res.code === 0) {
-      //       this.$notify.success({
-      //         title: "删除成功",
-      //         message: "",
-      //       });
-      //       this.searchList();
-      //     } else if (res && res.code >= 100 && res.code <= 104) {
-      //       await this.logout();
-      //     } else {
-      //       this.$message.warning(res.message);
-      //     }
-      //   })
-      //   .catch(() => {
-      //     console.log("取消");
-      //   });
+    async timeReturned(e) {
+      if (e.startTime !== "") {
+        this.parmValue.start = e.startTime;
+      } else {
+        this.parmValue.start = "";
+      }
+
+      if (e.endTime !== "") {
+        this.parmValue.end = e.endTime;
+      } else {
+        this.parmValue.end = "";
+      }
+      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
     },
     async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
       this.loading = true;
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
@@ -367,37 +351,37 @@ export default {
       }
       this.loading = false;
     },
+    async RowClick(e) {
+      let path = "checkDetail";
+      let index = this.visitedViews.findIndex((v) => v.name === path);
+      if (index !== -1) {
+        await this.$confirm("当前已打开盘点详情页,是否关闭?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(async () => {
+            this.$store
+              .dispatch("tagsView/delView", this.visitedViews[index])
+              .then(() => {
+                this.gotoDetail(path, e.id);
+              });
+          })
+          .catch(() => {
+            console.log("取消");
+          });
+      } else {
+        this.gotoDetail(path, e.id);
+      }
+    },
 
-    async statusConfirm(id, status) {
-      // let str = status === "1" ? "禁用" : "启用";
-      // await this.$confirm("确定要改为" + str + "?", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(async () => {
-      //     this.loading = true;
-      //     const model = {
-      //       id: id,
-      //       status: status === "1" ? "0" : "1",
-      //     };
-      //     const res = await asyncRequest.status(model);
-      //     if (res && res.code === 0) {
-      //       this.loading = false;
-      //       this.$notify.success({
-      //         title: "状态修改成功!",
-      //         message: "",
-      //       });
-      //       await this.searchList();
-      //     } else if (res && res.code >= 100 && res.code <= 104) {
-      //       await this.logout();
-      //     } else {
-      //       this.$message.warning(res.message);
-      //     }
-      //   })
-      //   .catch(() => {
-      //     console.log("取消");
-      //   });
+    gotoDetail(path, id) {
+      window.vm.$router.push({
+        path: path,
+        query: {
+          id: id,
+        },
+      });
     },
   },
 };