Browse Source

订单系统备货

zhangjinxing 3 years ago
parent
commit
81e84852c4

+ 18 - 0
src/apis/service/purchaseIn/storeManage/index.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),
+};
+   

+ 18 - 0
src/apis/service/purchaseIn/storeManageFlow/index.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),
+};
+   

+ 1 - 0
src/views/interest/handover/components/addEdit.vue

@@ -21,6 +21,7 @@
         @closeModel="handClick"
         @refresh="refresh"
       />
+      {{ id }}
     </el-card>
   </el-dialog>
 </template>

+ 48 - 46
src/views/interest/handover/components/addEditForm.vue

@@ -5,46 +5,48 @@
         ref="ruleForm"
         :model="ruleForm"
         status-icon
-        :rules="rules"
+        :rules="rulesThis"
         label-width="100px"
         class="demo-ruleForm"
       >
-        <el-form-item label="离职人" prop="resign_name">
+        <el-form-item label="离职人" prop="resign_uid">
+          <!-- :disabled="parmValue1.type == 1" -->
           <search-account
+            :disabled="!isDetail"
+            :is-detail="isDetail"
             :value="ruleForm.resign_uid"
             :size="searchSize"
             :names="ruleForm.resign_name"
-            :is-detail="ruleForm.type >= 1"
-            :disabled="isDetail"
             :placeholder="'离职人名称'"
             @searchChange="handleResignName"
           />
         </el-form-item>
-        <el-form-item label="接受人" prop="hand_name">
+        <el-form-item label="接受人" prop="hand_uid">
+          <!-- 
+             -->
           <search-account
+            :disabled="!isDetail"
+            :is-detail="isDetail"
             :value="ruleForm.hand_uid"
             :size="searchSize"
             :names="ruleForm.hand_name"
-            :is-detail="ruleForm.type >= 1"
-            :disabled="isDetail"
             :placeholder="'接受人名称'"
             @searchChange="handleHandoverName"
           />
         </el-form-item>
+        12{{ isDetail }}id:{{ id }}
       </el-form>
     </el-col>
     <el-col :span="24" style="text-align: right">
-      <el-button v-if="id === 'add'" type="primary" @click="submitForm"
-        >保 存
-      </el-button>
-
-      <el-button v-if="id && id !== 'add'" type="primary" @click="submitForm1"
+      <el-button type="primary" @click="submitForm">保 存 </el-button>
+      <el-button type="primary" @click="submitForm1" v-if="isBtn"
         >保 存 并 发 起 流 程
       </el-button>
-      <el-button @click="closeAddEdit" v-if="id === 'add'">{{
-        id === "add" ? "关 闭" : "取 消 审 核 流 程"
-      }}</el-button>
-      {{ parmValue1.type }}
+      <el-button @click="closeAddEdit" v-if="isBtn"
+        >取 消 审 核 流 程</el-button
+      >
+      <el-button @click="closeAdd" v-if="id === 'add'">关 闭</el-button>
+      type:{{ parmValue1 }}
     </el-col>
   </el-row>
 </template>
@@ -57,9 +59,7 @@ export default {
   mixins: [resToken],
   data() {
     return {
-      // parmValue: "parmValue",
-      // roleList: [],
-      // type: "1", //模拟后端交接节点    1:详情阶段  2:编辑阶段 3:
+      isBtn: false,
       loading: false,
       showModelThis: this.showModel,
       resign_name: "", //离职人
@@ -91,68 +91,67 @@ export default {
     };
   },
   mounted() {
+    console.log(this.parmValue1);
+    console.log(this.isDetail);
+    console.log(this.id);
     this.initForm();
-    // console.log(this.ruleForm);
-    // console.log(this.parmValue1);
   },
   methods: {
     //   关闭弹窗,直接隐藏表单
     async closeAddEdit() {
-      // this.isShowForm = false;
       this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
       const res = await asyncRequest.delete({ id: this.parmValue1.id });
-      if (res && res.code === 0 && res.data) {
+      console.log(res);
+      if (res && res.code === 0) {
         console.log(res);
         console.log(this.ruleForm);
-        this.$emit("refreshList");
+        this.$router.push({
+          path: "handover",
+        });
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
+        console.log("sasd");
         this.$message.warning(res.message);
       }
     },
-
+    closeAdd() {
+      this.$emit("closeModel", false);
+    },
     async initForm() {
-      console.log(this.parmValue1);
-      console.log(this.isDetail);
-
       this.loading = true;
-      // if (this.parmValue1.type === "1") {
-      //   this.rulesThis = {};
-      // } else {
-      //   this.rulesThis = this.rules;
-      // }
-      // await this.resetForm();
-      // await this.initData();
-
       if (this.id === "add") {
-        // this.title = "添加离职交接";
+        console.log("添加");
+        this.isDetail = true;
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
-        if (this.isDetail) {
+        console.log(this.isBtn);
+        this.isBtn = true;
+        if (!this.isDetail) {
           this.rulesThis = {};
+        } else {
+          this.rulesThis = this.rules;
+          await this.resetForm();
+          await this.initData();
         }
-        await this.resetForm();
-        await this.initData();
       }
+      // await this.initData();
       this.loading = false;
     },
     async initData() {
-      // console.log(this.parmValue1);
+      console.log(this.id);
       const res = await asyncRequest.detail({ id: this.parmValue1.id });
       if (res && res.code === 0 && res.data) {
-        console.log(res);
         let { hand_name, resign_name, hand_uid, resign_uid, id } = res.data;
         this.ruleForm = {
           resign_name,
           hand_name,
           hand_uid: hand_uid.split(","),
           resign_uid: resign_uid.split(","),
-          type: "1",
+          type: "2",
           id,
         };
-        console.log(this.ruleForm);
         // this.$emit("refreshList");
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
@@ -188,14 +187,19 @@ export default {
               resign_uid: resign_uid.toString(),
               hand_uid: hand_uid.toString(),
             };
+            console.log(model);
             let res = {};
             console.log(this.id);
             if (this.id === "add") {
               delete model["id"];
               res = await asyncRequest.add(model);
+
               console.log(res);
             } else {
               res = await asyncRequest.update(model);
+              this.$router.push({
+                path: "handover",
+              });
             }
             this.loading = false;
             if (res && res.code === 0) {
@@ -213,8 +217,6 @@ export default {
               this.$message.warning(res.message);
             }
           } else {
-            // console.log("12");
-
             this.$message.error("离职人和接收人不能相同");
           }
         } else {

+ 40 - 136
src/views/interest/handover/index.vue

@@ -31,13 +31,6 @@
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
-                <el-col :span="4" style="width: 180px">
-                  <all-organize
-                    :size="searchSize"
-                    :placeholder="'离职人部门名称'"
-                    @searchChange="handleResignPart"
-                  />
-                </el-col>
                 <el-col :span="4" style="width: 140px; padding-left: 10px">
                   <search-account
                     :size="searchSize"
@@ -45,6 +38,13 @@
                     @searchChange="handleResignName"
                   />
                 </el-col>
+                <el-col :span="4" style="width: 140px; padding: 0 0 0 10px">
+                  <search-account
+                    :size="searchSize"
+                    :placeholder="'接受人姓名'"
+                    @searchChange="handleHandoverName"
+                  />
+                </el-col>
                 <el-col :span="4" style="width: 125px; padding: 0 0 0 10px">
                   <el-select
                     v-model="type"
@@ -68,7 +68,24 @@
                     @timeReturned="handleTime"
                   />
                 </el-col>
-
+                <el-col :span="4" style="width: 54px; padding: 0 0 0 0">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    @click="searchList"
+                /></el-col>
+                <el-col :span="4" style="width: 66px; padding: 0 0 0 0">
+                  <el-button
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </el-button>
+                </el-col>
                 <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                     :size="searchSize"
@@ -88,49 +105,13 @@
                     :size="searchSize"
                     type="success"
                     style="float: right"
-                    @click="openModal('add', false)"
+                    @click="openModal('add', '003')"
                   >
                     新建
                   </el-button>
                 </el-col>
               </el-col>
             </el-row>
-            <el-row>
-              <el-col :span="24">
-                <el-col :span="4" style="width: 220px; padding-top: 10px">
-                  <all-organize
-                    :size="searchSize"
-                    :placeholder="'接受人部门名称'"
-                    @searchChange="handleHandoverPart"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 140px; padding: 10px 0 0 10px">
-                  <search-account
-                    :size="searchSize"
-                    :placeholder="'接受人姓名'"
-                    @searchChange="handleHandoverName"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px; padding: 10px 0 0 0">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    class="fr"
-                    icon="el-icon-search"
-                    @click="searchList"
-                /></el-col>
-                <el-col :span="4" style="width: 66px; padding: 10px 0 0 0">
-                  <el-button
-                    type="warning"
-                    class="fr"
-                    :size="searchSize"
-                    @click="restSearch"
-                  >
-                    重置
-                  </el-button>
-                </el-col>
-              </el-col>
-            </el-row>
           </div>
         </template>
         <template #status="{ scope }">
@@ -222,16 +203,16 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        startTime: "",
-        endTime: "",
+        start: "",
+        end: "",
         type: "", //审核状态
-        resign_part: [], //离职人名称
         resign_name: "", //离职人姓名
-        handover_part: [], //接收人人部门
         handover_name: "", //接受人姓名
         status: "", //
         page: 1, // 页码
         size: 15, // 每页显示条数
+        resign_uid: "",
+        hand_uid: "",
       },
       tableData: [],
       passwordModel: false,
@@ -257,31 +238,19 @@ export default {
           prop: "resign_name",
           label: "离职人",
         },
-        {
-          prop: "role_name", //没有该字段
-          label: "离职人所在部门",
-          "min-width": "150",
-        },
         {
           prop: "hand_name",
           label: "接收人",
         },
-        {
-          prop: "email", //没有该字段
-          label: "接收人所在部门",
-          "min-width": "150",
-        },
         {
           prop: "status",
           label: "状态",
           _slot_: "status",
-          width: "80px",
         },
         {
           prop: "addtime",
           label: "创建时间",
           sortable: true,
-          width: "140",
         },
       ],
     };
@@ -297,63 +266,28 @@ export default {
         path: "newProcess",
         query: {
           id: e.id,
-          type: "", //传递一个节点来进行搜索查询
         },
       });
     },
     restSearch() {
       this.parmValue = {
-        startTime: "",
-        endTime: "",
+        start: "",//开始 end结束时间
+        end: "",
         type: "", //审核状态
-        resign_part: [], //离职人部门
         resign_name: "", //离职人姓名
-        handover_part: [], //接收人人部门
         handover_name: "", //接受人姓名
         status: "", //
         page: 1, // 页码
         size: 10, // 每页显示条数
+        resign_uid: "",
+        hand_uid: "",
       };
       this.searchList();
     },
-    openModal(id, isDetail) {
+    openModal(id, detailCode) {
       this.showModel = true;
       this.modelId = id;
-      this.isDetail = isDetail;
-    },
-    openPasswordModal(id, isDetail) {
-      this.passwordModel = true;
-      this.passwordModelId = id;
-      this.isPasswordDetail = isDetail;
-    },
-
-    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("取消");
-        });
+      this.isDetail = detailCode === "007";
     },
     // 获取离职交接列表
     async searchList() {
@@ -371,36 +305,6 @@ export default {
       }
       this.loading = false;
     },
-    async statusConfirm(id, status) {
-      await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
-        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("取消");
-        });
-    },
     // 离职人部门
     handleResignPart(e) {
       console.log(e);
@@ -409,7 +313,7 @@ export default {
     // 离职人姓名
     handleResignName(e) {
       console.log(e);
-      this.parmValue.resign_name = e.id;
+      this.parmValue.resign_uid = e.id;
     },
     // 接收人部门
     handleHandoverPart(e) {
@@ -419,16 +323,16 @@ export default {
     // 接收人姓名
     handleHandoverName(e) {
       console.log(e);
-      this.parmValue.handover_name = e.id;
+      this.parmValue.hand_uid = e.id;
     },
     // 时间
     handleTime(e) {
       console.log(e);
+      this.parmValue.start = e.startTime;
+      this.parmValue.end = e.endTime;
     },
   },
 };
 </script>
    <style lang="scss" scoped>
-.account {
-}
 </style>

+ 34 - 51
src/views/interest/newProcess/index.vue

@@ -12,19 +12,8 @@
           :is-detail="!isDetail"
           @refreshList="searchList"
         />
-        <!-- @closeModel="handClick" @closeModel="handClick" -->
-      </div>
-      <el-divider content-position="center" v-if="type != 1"
-        >编辑组件</el-divider
-      >
-      <div style="width: 500px" v-if="type != 1">
-        <add-edit-form
-          :parmValue1="parmValue1"
-          :show-model="showModel"
-          :is-detail="isDetail"
-          @refreshList="searchList"
-        />
       </div>
+      type:{{ type == 1 }}
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -45,9 +34,7 @@ export default {
   name: "newProcess",
   mixins: [mixinPage, resToken],
   components: {
-    // addEdit,
     addEditForm, //详情组件
-    // editForm, //编辑组件
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
@@ -67,10 +54,7 @@ export default {
     return {
       type: "", //模拟节点
       parmValue1: {
-        resign_name: "",
-        handover_name: "",
         id: "",
-        type: "",
       },
     };
   },
@@ -87,47 +71,46 @@ export default {
       this.searchList();
     },
 
-    openModal(id, isDetail, sitem) {
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-      this.sitem = sitem;
-    },
+    // 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("取消");
-        });
+      // 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) {
         // 获取到当前的type值,
-        this.type = 2;
-        this.parmValue1.type = 2;
+        this.type = 1;
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {

+ 362 - 0
src/views/purchaseIn/storeManage/addEdit.vue

@@ -0,0 +1,362 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="closeModel"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+  >
+    <el-card>
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            ref="ruleForm"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              label="登录名"
+              prop="loginName"
+              v-if="id === 'add' || isDetail"
+            >
+              <el-input
+                v-model="ruleForm.loginName"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="姓名" prop="fullName">
+              <el-input
+                v-model="ruleForm.fullName"
+                :disabled="isDetail"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="手机号" prop="tel">
+              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
+            </el-form-item>
+            <el-form-item label="密码" prop="password" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="密码"
+                :maxlength="20"
+                v-model="ruleForm.password"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
+              <el-input
+                type="password"
+                placeholder="再次输入密码"
+                :maxlength="20"
+                v-model="ruleForm.password2"
+              ></el-input>
+            </el-form-item>
+          </el-form>
+        </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-card>
+  </el-dialog>
+   </template>
+   <script>
+   import asyncRequest from "@/apis/service/purchaseIn/storeManage";
+   import resToken from "@/mixins/resToken";
+   import {
+    isnumber,
+    isMobile,
+    validEmail,
+    isAlphanumeric,
+    isChinese,
+    isEmoticon,
+    validAlphabets,
+  } from "@/utils/validate";
+   export default {
+    name: 'storeManage',
+    props: ["showModel", "id", "isDetail","sitem"],
+    mixins: [resToken],
+    data() {
+      const validateusername = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("账号不能为空!"));
+        } else {
+          if (value.length < 6 || value.length > 18) {
+            callback(new Error("账号规则为6~18位数字与字母组合!"));
+          } else {
+            if (isnumber(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else if (validAlphabets(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else if (!isAlphanumeric(value)) {
+              callback(new Error("账号规则为6~18位数字与字母组合!"));
+            } else {
+              callback();
+            }
+          }
+        }
+      };
+      const validatename = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("真实姓名不能为空!"));
+        } else {
+          if (value.length < 2 || value.length > 12) {
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else {
+            if (!isChinese(value)) {
+              console.log(9999);
+              callback(new Error("真实姓名规则为2~12位汉字!"));
+            } else if (isEmoticon(value)) {
+              console.log(2345);
+              callback(new Error("真实姓名规则为2~12位汉字!"));
+            } else {
+              callback();
+            }
+          }
+        }
+      };
+      const validatemobile = (rule, value, callback) => {
+        if (value === "") {
+          callback(new Error("手机号不能为空!"));
+        } else {
+          if (!isMobile(value)) {
+            callback(new Error("手机号格式不正确!"));
+          } else {
+            callback();
+          }
+        }
+      };
+  
+      const validateEmail = (rule, value, callback) => {
+        if (value === "") {
+          callback();
+        } else {
+          if (!validEmail(value)) {
+            callback(new Error("邮箱格式不正确!"));
+          } else {
+            callback();
+          }
+        }
+      };
+      return {
+        loading: false,
+        title: "添加账号",
+        showModelThis: this.showModel,
+        ruleForm: {
+          username: "", // 账号
+          name: "", // 真实姓名
+          mobile: "",
+          email: "",
+          role_id: "",
+          status: "1",
+          item: [],
+        },
+        rulesThis: this.rules,
+        rules: {
+          name: [
+            {
+              required: true,
+              validator: validatename,
+              trigger: "blur",
+            },
+          ],
+          username: [
+            {
+              required: true,
+              validator: validateusername,
+              trigger: "blur",
+            },
+          ],
+          mobile: [
+            {
+              required: true,
+              validator: validatemobile,
+              trigger: "blur",
+            },
+          ],
+          email: [
+            {
+              required: false,
+              validator: validateEmail,
+              trigger: "blur",
+            },
+          ],
+          role_id: [
+            {
+              required: true,
+              message: "请选择角色",
+              trigger: "change",
+            },
+          ],
+          item: [
+            {
+              type: "array",
+              required: true,
+              message: "请选择所在部门",
+              trigger: "change",
+            },
+          ],
+          status: [
+            {
+              required: true,
+              message: "请选择状态",
+              trigger: "change",
+            },
+          ],
+        }
+      };
+    },
+    watch: {
+      showModel: function(val) {
+        this.showModelThis = val;
+        if (val) {
+          this.initForm();
+        }
+      },
+      showModelThis(val) {
+        if (!val) {
+          this.$emit("cancel");
+        }
+      }
+    },
+    methods: {
+      closeModel() {
+        console.log("closeModel!!");
+      },
+      async initForm() {
+        this.loading = true;
+        // await this.getRole();
+        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.loading = false;
+      },
+      // async getRole() {
+      //   const model = {
+      //     status: "", // 状态
+      //     level: "", // 姓名
+      //     role_name: "",
+      //   };
+      //   const res = await asyncRequest.getRole(model);
+      //   if (res && res.code === 0 && res.data) {
+      //     this.roleList = res.data;
+      //     this.roleList.map((v1) => {
+      //       v1.id += "";
+      //       v1.status += "";
+      //       return v1;
+      //     });
+      //   }
+      // },
+      async initData() {
+        const res = await asyncRequest.detail({ id: this.id });
+      if (res && res.code === 0 && res.data) {
+        this.ruleForm = res.data;
+        this.ruleForm.role_id = this.ruleForm.role;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      },
+      async resetForm(sitem) {
+        // 重置
+        await this.$nextTick(() => {
+          if (this.$refs.ruleForm) {
+            this.$refs.ruleForm.resetFields();
+            this.$refs.ruleForm.clearValidate();
+            const { username, nickname, mobile, email, roleid, status, item } =
+              sitem;
+            this.ruleForm = {
+              username: username || "", // 账号
+              name: nickname || "", // 真实姓名
+              mobile: mobile || "",
+              email: email || "",
+              role_id: roleid || "",
+              status: status || "",
+              item: item || [],
+            };
+            if (this.id === "add" || this.isDetail) {
+              this.rules.username[0].required = false;
+            }
+          }
+        });
+      },
+    
+      async submitForm() {
+        await this.$refs.ruleForm.validate(async (valid) => {
+          if (valid) {
+            this.loading = true;
+            const { username, name, mobile, email, role_id, status } = JSON.parse(
+              JSON.stringify(this.ruleForm)
+            );
+            const model = {
+              id: this.id,
+              username: username || "", // 账号
+              nickname: name || "", // 真实姓名
+              mobile: mobile || "",
+              email: email || "",
+              role: role_id || "",
+              status: status || "",
+            };
+            let res = {};
+            if (this.id === "add") {
+              delete model["id"];
+              res = await asyncRequest.add(model);
+            } else {
+              res = await asyncRequest.update(model);
+            }
+            this.loading = false;
+            if (res && res.code === 0) {
+              const title = this.id === "add" ? "添加成功" : "修改成功";
+              this.$notify.success({
+                title,
+                message: "",
+              });
+              this.showModelThis = false;
+              // 刷新
+              this.$emit("refresh");
+            } else if (res && res.code >= 100 && res.code <= 104) {
+              await this.logout();
+            } else {
+              this.$message.warning(res.message);
+            }
+          } else {
+            console.log("error submit!!");
+            return false;
+          }
+        });
+      },
+    },
+ 
+  };
+  </script>
+
+   <style lang="scss" scoped>
+   .storeManage {
+    
+   }
+   </style>
+   

+ 420 - 0
src/views/purchaseIn/storeManage/index.vue

@@ -0,0 +1,420 @@
+<template>
+  <div class="storeManage pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <ex-table
+        v-loading="false"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <!-- 时间区间 -->
+                <el-col :span="4" style="width: 295px">
+                  <period-date-picker
+                    :width="'135px'"
+                    :size="searchSize"
+                    @timeReturned="handleTime"
+                  />
+                </el-col>
+                <!-- 商品编码 -->
+                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    placeholder="商品名称"
+                    v-model="parmValue.good_name"
+                    clearable
+                  />
+                </el-col>
+                <!-- 备货申请编码 -->
+                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.username"
+                    :maxlength="40"
+                    placeholder="备货申请编码"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 54px">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    @click="searchList"
+                /></el-col>
+                <el-col :span="4" style="width: 66px">
+                  <el-button
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </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: 56px"
+                  class="mr10 fr"
+                  v-if="powers.some((item) => item == '003')"
+                >
+                  <el-button
+                    class="fl"
+                    :size="searchSize"
+                    type="success"
+                    @click="addStockFlow"
+                  >
+                    新建
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></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-edit
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </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/purchaseIn/storeManage";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "storeManage",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "storeManage"
+        ) || {};
+      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: "unit",
+          label: "单位",
+        },
+        {
+          prop: "num",
+          label: "数量",
+        },
+        {
+          prop: "time",
+          label: "期望入库时间",
+        },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          width: "80px",
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          sortable: true,
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    // this.searchList();
+  },
+
+  methods: {
+    //跳转到新建页面
+
+    addStockFlow() {
+      console.log("新建申请");
+      this.$router.push({
+        path: "storeManageFlow",
+      });
+    },
+
+    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>
+.storeManage {
+}
+</style>
+   

+ 396 - 0
src/views/purchaseIn/storeManageFlow/components/newSetStock.vue

@@ -0,0 +1,396 @@
+<template>
+  <div class="newApply pagePadding">
+    {{ ruleForm }}
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <el-form
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        label-width="120px"
+      >
+        <el-form-item label="商品名称" prop="goods_name">
+          <!-- <el-cascader
+            placeholder="请选择出库仓库"
+            filterable
+            clearable
+            :size="searchSize"
+            v-model="ruleForm.selectStock_go"
+            :options="options"
+            style="width: 30%"
+            @change="
+              pageInfo.curr = 1;
+              parmValue.page = 1;
+              stockName(true);
+            "
+          ></el-cascader> -->
+          <el-input
+            style="width: 30%"
+            v-model="ruleForm.goods_name"
+            placeholder="请输入内容"
+            :size="searchSize"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="采购数量" prop="goods_num">
+          <!-- <el-cascader
+            placeholder="请选择入库仓库"
+            filterable
+            clearable
+            :size="searchSize"
+            v-model="ruleForm.selectStock_in"
+            :options="options"
+            style="width: 30%"
+            @change="
+              pageInfo.curr = 1;
+              parmValue.page = 1;
+              stockName();
+            "
+          ></el-cascader> -->
+          <el-input
+            style="width: 30%"
+            v-model="ruleForm.goods_num"
+            placeholder="请输入内容"
+            :size="searchSize"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="最晚入库时间" prop="last_go_stock">
+          <el-date-picker
+            style="width: 30%"
+            :size="searchSize"
+            v-model="ruleForm.goTime"
+            type="date"
+            placeholder="选择日期"
+            @change="selectTime"
+            :picker-options="startDatePicker"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="入库仓库" prop="stock_in_rule">
+          <!-- <el-cascader
+            placeholder="请选择入库仓库"
+            filterable
+            clearable
+            :size="searchSize"
+            v-model="ruleForm.selectStock_in"
+            :options="options"
+            style="width: 30%"
+            @change="
+              pageInfo.curr = 1;
+              parmValue.page = 1;
+              stockName();
+            "
+          ></el-cascader> -->
+          <el-col :span="24" style="text-align: right; margin-top: 10px">
+            <el-button type="primary" @click="save">保 存 </el-button>
+            <el-button type="warning" @click="submitForm('ruleForm')"
+              >保 存 并 发 起 流 程
+            </el-button>
+          </el-col>
+        </el-form-item>
+      </el-form>
+    </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/newApply";
+import asyncRequest from "@/mock/service/stock/newApply";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "allotFlow",
+  mixins: [mixinPage, resToken],
+
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "allotFlow"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      ruleForm: {
+        goods_name: "", //商品名称
+        goods_num: "", //商品数量
+        goTime: "", //最晚入库时间
+      },
+      rules: {
+        //出入库规则
+        goods_name: [
+          {
+            required: true,
+            message: "商品名称不能为空",
+            trigger: "blur",
+          },
+        ],
+        goods_num: [
+          {
+            required: true,
+            message: "请选择入库仓库",
+            trigger: "blur",
+          },
+        ],
+        last_go_stock: [
+          {
+            // type: "date",
+            required: true,
+            message: "请输入入库最晚时间",
+            trigger: "blur",
+          },
+        ],
+        stock_go_product: [
+          {
+            required: true,
+            message: "请选择入库仓库",
+            trigger: "blur",
+          },
+        ],
+      },
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      tableData: [], //渲染表格
+      //
+      // 表格 - 数据
+      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: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+      parmValue: {},
+    };
+  },
+  mounted() {
+    // this.searchList();
+    // this.stockName(); //假数据,获取二级仓库名
+  },
+
+  methods: {
+    selectTime(e) {
+      console.log(e);
+      console.log(e.toString());
+    },
+    save() {
+      console.log("save");
+    },
+    submitForm(formName) {
+      console.log("sds");
+      console.log(formName);
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          alert("submit!");
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+  restSearch() {
+    //重置入参
+    this.parmValue = {};
+    // this.searchList();
+  },
+
+  openModal(id, isDetail, sitem) {
+    this.showModel = isDetail;
+    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("取消");
+    //   });
+  },
+  async stockName(isShowModal = false) {
+    //获取多级仓库名称的方法
+    const res = await asyncRequest.listAll(this.parmValue);
+    // console.log(res.data);
+    // this.openModal("005", true);
+    // console.log(this.selectStock_go);
+    // console.log(this.selectStock_in);
+    // this.options = res.data;
+    // console.log(this.options);
+    let arr = res.data;
+    // console.log(arr);
+    arr.forEach((ele) => {
+      //重新封装后台传递来的数据,转换格式
+      let item = {
+        value: ele.id,
+        label: ele.name,
+        children: [],
+      };
+      ele.child.forEach((elem) => {
+        let model = {
+          value: elem.id,
+          label: elem.name,
+        };
+        item.children.push(model);
+      });
+      this.options.push(item);
+    });
+    this.options.forEach((ele) => {
+      //从数据表中筛选出我们要用的数据
+      if (ele.value === this.selectStock_go[0]) {
+        ele.children.forEach((elem) => {
+          if (elem.value === this.selectStock_go[1]) {
+            this.stock_go = ele.label + "/" + elem.label;
+          }
+        });
+      }
+      if (ele.value === this.selectStock_in[0]) {
+        ele.children.forEach((elem) => {
+          if (elem.value === this.selectStock_in[1]) {
+            this.stock_in = ele.label + "/" + elem.label;
+          }
+        });
+      }
+    });
+    if (this.selectStock_in != "" || this.selectStock_go != "") {
+      console.log("选择了一个项目");
+      this.openModal("005", isShowModal);
+    }
+    console.log(this.stock_go);
+    console.log(this.stock_in);
+    //   if(){
+
+    //   }
+    // console.log(this.pageInfo.total);
+
+    this.compareStock(); //比较出库仓库和入库仓库是否相同
+  },
+
+  compareStock() {
+    //比较出库仓库和入库仓库是否相同
+    if (
+      this.stock_go === this.stock_in &&
+      this.stock_go !== "" &&
+      this.stock_go != ""
+    ) {
+      console.log("出库仓库和入库仓库相同");
+      this.$message({
+        message: "出库仓库不能和入库仓库相同",
+        type: "error",
+      });
+    }
+  },
+};
+</script>
+<style lang="scss" >
+</style>
+   

+ 81 - 0
src/views/purchaseIn/storeManageFlow/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="storeManageFlow pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <p>storeManageFlow</p>
+      <new-set-stock />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/purchaseIn/storeManageFlow";
+import { mapGetters } from "vuex";
+import newSetStock from "./components/newSetStock.vue";
+export default {
+  name: "storeManageFlow",
+  mixins: [mixinPage, resToken],
+  components: {
+    newSetStock,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "storeManageFlow"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      loading: true,
+      parmValue: {},
+    };
+  },
+  mounted() {
+    // this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {};
+      this.searchList();
+    },
+
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+    },
+    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;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+</style>
+   

+ 0 - 3
src/views/stock/allot/index.vue

@@ -64,8 +64,6 @@
                   />
                 </el-col>
 
-                
-
                 <el-col :span="4" style="width: 76px; margin-left: 10px">
                   <el-button
                     style="width: 100%"
@@ -262,7 +260,6 @@ export default {
       console.log("新建申请");
       this.$router.push({
         path: "allotFlow",
-        component: AllotFlow,
       });
     },
     restSearch() {

+ 0 - 2
src/views/stock/allotFlow/index.vue

@@ -46,7 +46,6 @@ import resToken from "@/mixins/resToken";
 import statusList from "@/assets/js/statusList";
 // import asyncRequest from "@/apis/service/stock/newApply";
 import asyncRequest from "@/mock/service/stock/newApply";
-import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 import NewApply from "./components/newApply"; //新建申请页面
 import InStock from "./components/inStock-audit.vue"; //入库方审核界面
@@ -58,7 +57,6 @@ export default {
   name: "newApply",
   mixins: [mixinPage, resToken],
   components: {
-    addEdit,
     NewApply,
     InStock,
     GoStock,

+ 0 - 362
src/views/stock/dataWeido/addEdit.vue

@@ -1,362 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="110px"
-            class="demo-ruleForm"
-          >
-            <el-form-item
-              label="登录名"
-              prop="loginName"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-input
-                v-model="ruleForm.loginName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="姓名" prop="fullName">
-              <el-input
-                v-model="ruleForm.fullName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="手机号" prop="tel">
-              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
-            </el-form-item>
-            <el-form-item label="密码" prop="password" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="密码"
-                :maxlength="20"
-                v-model="ruleForm.password"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="再次输入密码"
-                :maxlength="20"
-                v-model="ruleForm.password2"
-              ></el-input>
-            </el-form-item>
-          </el-form>
-        </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-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/stock/dataWeido";
-import resToken from "@/mixins/resToken";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
-export default {
-  name: "dataWeido",
-  props: ["showModel", "id", "isDetail", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validateusername = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("账号不能为空!"));
-      } else {
-        if (value.length < 6 || value.length > 18) {
-          callback(new Error("账号规则为6~18位数字与字母组合!"));
-        } else {
-          if (isnumber(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (validAlphabets(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (!isAlphanumeric(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("真实姓名不能为空!"));
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error("真实姓名规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            console.log(9999);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            console.log(2345);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    const validateEmail = (rule, value, callback) => {
-      if (value === "") {
-        callback();
-      } else {
-        if (!validEmail(value)) {
-          callback(new Error("邮箱格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      title: "添加账号",
-      showModelThis: this.showModel,
-      ruleForm: {
-        username: "", // 账号
-        name: "", // 真实姓名
-        mobile: "",
-        email: "",
-        role_id: "",
-        status: "1",
-        item: [],
-      },
-      rulesThis: this.rules,
-      rules: {
-        name: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        username: [
-          {
-            required: true,
-            validator: validateusername,
-            trigger: "blur",
-          },
-        ],
-        mobile: [
-          {
-            required: true,
-            validator: validatemobile,
-            trigger: "blur",
-          },
-        ],
-        email: [
-          {
-            required: false,
-            validator: validateEmail,
-            trigger: "blur",
-          },
-        ],
-        role_id: [
-          {
-            required: true,
-            message: "请选择角色",
-            trigger: "change",
-          },
-        ],
-        item: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择所在部门",
-            trigger: "change",
-          },
-        ],
-        status: [
-          {
-            required: true,
-            message: "请选择状态",
-            trigger: "change",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    closeModel() {
-      console.log("closeModel!!");
-    },
-    async initForm() {
-      this.loading = true;
-      // await this.getRole();
-      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.loading = false;
-    },
-    // async getRole() {
-    //   const model = {
-    //     status: "", // 状态
-    //     level: "", // 姓名
-    //     role_name: "",
-    //   };
-    //   const res = await asyncRequest.getRole(model);
-    //   if (res && res.code === 0 && res.data) {
-    //     this.roleList = res.data;
-    //     this.roleList.map((v1) => {
-    //       v1.id += "";
-    //       v1.status += "";
-    //       return v1;
-    //     });
-    //   }
-    // },
-    async initData() {
-      const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        this.ruleForm = res.data;
-        this.ruleForm.role_id = this.ruleForm.role;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async resetForm(sitem) {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { username, nickname, mobile, email, roleid, status, item } =
-            sitem;
-          this.ruleForm = {
-            username: username || "", // 账号
-            name: nickname || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role_id: roleid || "",
-            status: status || "",
-            item: item || [],
-          };
-          if (this.id === "add" || this.isDetail) {
-            this.rules.username[0].required = false;
-          }
-        }
-      });
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { username, name, mobile, email, role_id, status } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
-          const model = {
-            id: this.id,
-            username: username || "", // 账号
-            nickname: name || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role: role_id || "",
-            status: status || "",
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.dataWeido {
-}
-</style>
-   

+ 0 - 362
src/views/stock/productWeido/addEdit.vue

@@ -1,362 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="110px"
-            class="demo-ruleForm"
-          >
-            <el-form-item
-              label="登录名"
-              prop="loginName"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-input
-                v-model="ruleForm.loginName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="姓名" prop="fullName">
-              <el-input
-                v-model="ruleForm.fullName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="手机号" prop="tel">
-              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
-            </el-form-item>
-            <el-form-item label="密码" prop="password" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="密码"
-                :maxlength="20"
-                v-model="ruleForm.password"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="再次输入密码"
-                :maxlength="20"
-                v-model="ruleForm.password2"
-              ></el-input>
-            </el-form-item>
-          </el-form>
-        </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-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/stock/productWeido";
-import resToken from "@/mixins/resToken";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
-export default {
-  name: "productWeido",
-  props: ["showModel", "id", "isDetail", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validateusername = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("账号不能为空!"));
-      } else {
-        if (value.length < 6 || value.length > 18) {
-          callback(new Error("账号规则为6~18位数字与字母组合!"));
-        } else {
-          if (isnumber(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (validAlphabets(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (!isAlphanumeric(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("真实姓名不能为空!"));
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error("真实姓名规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            console.log(9999);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            console.log(2345);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    const validateEmail = (rule, value, callback) => {
-      if (value === "") {
-        callback();
-      } else {
-        if (!validEmail(value)) {
-          callback(new Error("邮箱格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      title: "添加账号",
-      showModelThis: this.showModel,
-      ruleForm: {
-        username: "", // 账号
-        name: "", // 真实姓名
-        mobile: "",
-        email: "",
-        role_id: "",
-        status: "1",
-        item: [],
-      },
-      rulesThis: this.rules,
-      rules: {
-        name: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        username: [
-          {
-            required: true,
-            validator: validateusername,
-            trigger: "blur",
-          },
-        ],
-        mobile: [
-          {
-            required: true,
-            validator: validatemobile,
-            trigger: "blur",
-          },
-        ],
-        email: [
-          {
-            required: false,
-            validator: validateEmail,
-            trigger: "blur",
-          },
-        ],
-        role_id: [
-          {
-            required: true,
-            message: "请选择角色",
-            trigger: "change",
-          },
-        ],
-        item: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择所在部门",
-            trigger: "change",
-          },
-        ],
-        status: [
-          {
-            required: true,
-            message: "请选择状态",
-            trigger: "change",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    closeModel() {
-      console.log("closeModel!!");
-    },
-    async initForm() {
-      this.loading = true;
-      // await this.getRole();
-      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.loading = false;
-    },
-    // async getRole() {
-    //   const model = {
-    //     status: "", // 状态
-    //     level: "", // 姓名
-    //     role_name: "",
-    //   };
-    //   const res = await asyncRequest.getRole(model);
-    //   if (res && res.code === 0 && res.data) {
-    //     this.roleList = res.data;
-    //     this.roleList.map((v1) => {
-    //       v1.id += "";
-    //       v1.status += "";
-    //       return v1;
-    //     });
-    //   }
-    // },
-    async initData() {
-      const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        this.ruleForm = res.data;
-        this.ruleForm.role_id = this.ruleForm.role;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async resetForm(sitem) {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { username, nickname, mobile, email, roleid, status, item } =
-            sitem;
-          this.ruleForm = {
-            username: username || "", // 账号
-            name: nickname || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role_id: roleid || "",
-            status: status || "",
-            item: item || [],
-          };
-          if (this.id === "add" || this.isDetail) {
-            this.rules.username[0].required = false;
-          }
-        }
-      });
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { username, name, mobile, email, role_id, status } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
-          const model = {
-            id: this.id,
-            username: username || "", // 账号
-            nickname: name || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role: role_id || "",
-            status: status || "",
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.productWeido {
-}
-</style>
-   

+ 0 - 362
src/views/stock/spaceCount/addEdit.vue

@@ -1,362 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="110px"
-            class="demo-ruleForm"
-          >
-            <el-form-item
-              label="登录名"
-              prop="loginName"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-input
-                v-model="ruleForm.loginName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="姓名" prop="fullName">
-              <el-input
-                v-model="ruleForm.fullName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="手机号" prop="tel">
-              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
-            </el-form-item>
-            <el-form-item label="密码" prop="password" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="密码"
-                :maxlength="20"
-                v-model="ruleForm.password"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="再次输入密码"
-                :maxlength="20"
-                v-model="ruleForm.password2"
-              ></el-input>
-            </el-form-item>
-          </el-form>
-        </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-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/stock/spaceCount";
-import resToken from "@/mixins/resToken";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
-export default {
-  name: "spaceCount",
-  props: ["showModel", "id", "isDetail", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validateusername = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("账号不能为空!"));
-      } else {
-        if (value.length < 6 || value.length > 18) {
-          callback(new Error("账号规则为6~18位数字与字母组合!"));
-        } else {
-          if (isnumber(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (validAlphabets(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (!isAlphanumeric(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("真实姓名不能为空!"));
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error("真实姓名规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            console.log(9999);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            console.log(2345);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    const validateEmail = (rule, value, callback) => {
-      if (value === "") {
-        callback();
-      } else {
-        if (!validEmail(value)) {
-          callback(new Error("邮箱格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      title: "添加账号",
-      showModelThis: this.showModel,
-      ruleForm: {
-        username: "", // 账号
-        name: "", // 真实姓名
-        mobile: "",
-        email: "",
-        role_id: "",
-        status: "1",
-        item: [],
-      },
-      rulesThis: this.rules,
-      rules: {
-        name: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        username: [
-          {
-            required: true,
-            validator: validateusername,
-            trigger: "blur",
-          },
-        ],
-        mobile: [
-          {
-            required: true,
-            validator: validatemobile,
-            trigger: "blur",
-          },
-        ],
-        email: [
-          {
-            required: false,
-            validator: validateEmail,
-            trigger: "blur",
-          },
-        ],
-        role_id: [
-          {
-            required: true,
-            message: "请选择角色",
-            trigger: "change",
-          },
-        ],
-        item: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择所在部门",
-            trigger: "change",
-          },
-        ],
-        status: [
-          {
-            required: true,
-            message: "请选择状态",
-            trigger: "change",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    closeModel() {
-      console.log("closeModel!!");
-    },
-    async initForm() {
-      this.loading = true;
-      // await this.getRole();
-      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.loading = false;
-    },
-    // async getRole() {
-    //   const model = {
-    //     status: "", // 状态
-    //     level: "", // 姓名
-    //     role_name: "",
-    //   };
-    //   const res = await asyncRequest.getRole(model);
-    //   if (res && res.code === 0 && res.data) {
-    //     this.roleList = res.data;
-    //     this.roleList.map((v1) => {
-    //       v1.id += "";
-    //       v1.status += "";
-    //       return v1;
-    //     });
-    //   }
-    // },
-    async initData() {
-      const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        this.ruleForm = res.data;
-        this.ruleForm.role_id = this.ruleForm.role;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async resetForm(sitem) {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          const { username, nickname, mobile, email, roleid, status, item } =
-            sitem;
-          this.ruleForm = {
-            username: username || "", // 账号
-            name: nickname || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role_id: roleid || "",
-            status: status || "",
-            item: item || [],
-          };
-          if (this.id === "add" || this.isDetail) {
-            this.rules.username[0].required = false;
-          }
-        }
-      });
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const { username, name, mobile, email, role_id, status } = JSON.parse(
-            JSON.stringify(this.ruleForm)
-          );
-          const model = {
-            id: this.id,
-            username: username || "", // 账号
-            nickname: name || "", // 真实姓名
-            mobile: mobile || "",
-            email: email || "",
-            role: role_id || "",
-            status: status || "",
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.spaceCount {
-}
-</style>
-   

+ 1 - 4
src/views/stock/dataWeido/index.vue → src/views/stock/stockCount/components/dataWeido/index.vue

@@ -240,15 +240,12 @@ import statusList from "@/assets/js/statusList";
 import asyncRequest from "@/mock/service/stock/dataWeido";
 // import asyncRequest from "@/apis/service/stock/dataWeido";
 
-import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 
 export default {
   name: "dataWeido",
   mixins: [mixinPage, resToken],
-  components: {
-    addEdit,
-  },
+
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {

+ 0 - 0
src/views/stock/dataWeido/数据维度 → src/views/stock/stockCount/components/dataWeido/数据维度


+ 4 - 121
src/views/stock/productWeido/index.vue → src/views/stock/stockCount/components/productWeido/index.vue

@@ -70,93 +70,11 @@
                     >重置</el-button
                   >
                 </el-col>
-                <!-- <el-col :span="4" style="width: 120px">
-                  <el-select
-                    :size="searchSize"
-                    v-model="parmValue.status"
-                    filterable
-                    clearable
-                    placeholder="账号状态"
-                    style="width: 100%"
-                    @change="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();
-                    "
-                  >
-                    <el-option
-                      v-for="item in statusList"
-                      :key="'status' + item.code"
-                      :label="item.name"
-                      :value="item.code"
-                    />
-                  </el-select>
-                </el-col>
-                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="searchSize"
-                    v-model="parmValue.name"
-                    :maxlength="40"
-                    placeholder="业务员姓名"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                  <el-input
-                    :size="searchSize"
-                    v-model="parmValue.username"
-                    :maxlength="40"
-                    placeholder="手机号"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    class="fr"
-                    icon="el-icon-search"
-                    @click="searchList"
-                /></el-col>
-                <el-col
-                  :span="4"
-                  style="width: 66px"
-                >
-                  <el-button
-                    type="warning"
-                    class="fr"
-                    :size="searchSize"
-                    @click="restSearch"
-                  >
-                    重置
-                  </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>
             </el-row>
           </div>
         </template>
-        <!-- <template #status="{ scope }">
-          
-          <el-tag
-            :size="tablebtnSize"
-            :type="scope.row.status == '0' ? 'warning' : ''"
-            v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
-                .label || '--'
-            "
-          ></el-tag>
-        </template> -->
+
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((item) => item == '002')"
@@ -241,15 +159,12 @@ import statusList from "@/assets/js/statusList";
 // import asyncRequest from "@/apis/service/stock/productWeido";
 import asyncRequest from "@/mock/service/stock/allot"; //获取商品假数据
 
-import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 
 export default {
   name: "productWeido",
   mixins: [mixinPage, resToken],
-  components: {
-    addEdit,
-  },
+  components: {},
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
@@ -266,29 +181,7 @@ export default {
   },
   data() {
     return {
-      options: [
-        //选择商品下拉框
-        // {
-        //   value: "选项1",
-        //   label: "黄金糕",
-        // },
-        // {
-        //   value: "选项2",
-        //   label: "双皮奶",
-        // },
-        // {
-        //   value: "选项3",
-        //   label: "蚵仔煎",
-        // },
-        // {
-        //   value: "选项4",
-        //   label: "龙须面",
-        // },
-        // {
-        //   value: "选项5",
-        //   label: "北京烤鸭",
-        // },
-      ],
+      options: [],
       sitem: null,
       // 状态
       statusOptions: [
@@ -353,22 +246,18 @@ export default {
         {
           prop: "addtime",
           label: "待入库",
-          // sortable: true,
         },
         {
           prop: "addtime",
           label: "待出库",
-          // sortable: true,
         },
         {
           prop: "addtime",
           label: "可用库存",
-          // sortable: true,
         },
         {
           prop: "addtime",
           label: "在途库存",
-          // sortable: true,
         },
       ],
     };
@@ -380,13 +269,7 @@ export default {
   methods: {
     //重置参数
     restSearch() {
-      this.parmValue = {
-        // name: "", // 业务员名字
-        // username: "", // 账号
-        // status: "", //
-        // page: 1, // 页码
-        // size: 10, // 每页显示条数
-      };
+      this.parmValue = {};
       this.searchList();
     },
 

+ 0 - 0
src/views/stock/productWeido/商品维度 → src/views/stock/stockCount/components/productWeido/商品维度


+ 0 - 10
src/views/stock/spaceCount/index.vue → src/views/stock/stockCount/components/spaceCount/index.vue

@@ -139,14 +139,6 @@
           ></el-tag>
         </template>
       </ex-table>
-      <add-edit
-        :id="modelId"
-        :sitem="sitem"
-        :show-model="showModel"
-        :is-detail="isDetail"
-        @refresh="searchList"
-        @cancel="showModel = false"
-      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -160,13 +152,11 @@ import resToken from "@/mixins/resToken";
 // import asyncRequest from "@/apis/service/stock/spaceCount";
 import asyncRequest from "@/mock/service/stock/spaceCount";
 
-import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 export default {
   name: "spaceCount",
   mixins: [mixinPage, resToken],
   components: {
-    addEdit,
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),

+ 0 - 0
src/views/stock/spaceCount/区间统计 → src/views/stock/stockCount/components/spaceCount/区间统计


+ 4 - 4
src/views/stock/stockCount/index.vue

@@ -35,10 +35,10 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import statusList from "@/assets/js/statusList";
-import asyncRequest from "@/apis/service/stock/nowCount";
-import DataWeido from "@/views/stock/dataWeido";
-import ProductWeido from "@/views/stock/productWeido";
-import SpaceCount from "@/views/stock/spaceCount";
+// import asyncRequest from "@/apis/service/stock/nowCount";
+import DataWeido from "./components/dataWeido";
+import ProductWeido from "./components/productWeido";
+import SpaceCount from "./components/spaceCount";
 
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";