Browse Source

Merge branch 'live' into edit

戴艳蓉 3 years ago
parent
commit
5e2f0b6c00
32 changed files with 528 additions and 313 deletions
  1. 1 1
      .gitignore
  2. 0 0
      dist/index.html
  3. 0 0
      dist/static/css/app.87fcb7ab.css
  4. BIN
      dist/static/css/app.87fcb7ab.css.gz
  5. 0 0
      dist/static/css/chunk-62128cce.1d4e836c.css
  6. 0 0
      dist/static/css/chunk-6527b0a8.97fd7ca0.css
  7. BIN
      dist/static/css/chunk-7f91f0d5.ce4acdfa.css.gz
  8. 0 0
      dist/static/css/chunk-97b7471c.cf768914.css
  9. BIN
      dist/static/css/chunk-97b7471c.cf768914.css.gz
  10. 0 0
      dist/static/js/app.0758c1e8.js
  11. BIN
      dist/static/js/app.0758c1e8.js.gz
  12. 0 0
      dist/static/js/app.a4ea5dec.js
  13. BIN
      dist/static/js/app.a4ea5dec.js.gz
  14. 0 0
      dist/static/js/chunk-62128cce.f209f7e8.js
  15. BIN
      dist/static/js/chunk-62128cce.f209f7e8.js.gz
  16. 0 0
      dist/static/js/chunk-6527b0a8.dafc0933.js
  17. BIN
      dist/static/js/chunk-6527b0a8.dafc0933.js.gz
  18. 0 0
      dist/static/js/chunk-7f91f0d5.1fb5eac3.js
  19. BIN
      dist/static/js/chunk-7f91f0d5.1fb5eac3.js.gz
  20. 0 0
      dist/static/js/chunk-97b7471c.02c7cf48.js
  21. BIN
      dist/static/js/chunk-97b7471c.02c7cf48.js.gz
  22. 0 0
      src/apis/service/interest/handover/detail.js
  23. 4 1
      src/assets/js/btnList.js
  24. 4 4
      src/components/search-customer/main.vue
  25. 0 1
      src/views/interest/handover/components/addEdit.vue
  26. 195 150
      src/views/interest/handover/components/addEditForm.vue
  27. 55 0
      src/views/interest/handover/detail.vue
  28. 108 109
      src/views/interest/handover/index.vue
  29. 2 1
      src/views/interest/organize/index.vue
  30. 118 41
      src/views/sellOut/consultOrder/index.vue
  31. 35 3
      src/views/stock/check/components/addEdit.vue
  32. 6 2
      src/views/stock/check/detail.vue

+ 1 - 1
.gitignore

@@ -1,6 +1,6 @@
 .DS_Store
 node_modules/
-dist/
+# dist/
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.87fcb7ab.css


BIN
dist/static/css/app.f8efaa60.css.gz → dist/static/css/app.87fcb7ab.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-62128cce.1d4e836c.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-6527b0a8.97fd7ca0.css


BIN
dist/static/css/chunk-7f91f0d5.ce4acdfa.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-97b7471c.cf768914.css


BIN
dist/static/css/chunk-97b7471c.cf768914.css.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.0758c1e8.js


BIN
dist/static/js/app.0758c1e8.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a4ea5dec.js


BIN
dist/static/js/app.a4ea5dec.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-62128cce.f209f7e8.js


BIN
dist/static/js/chunk-62128cce.f209f7e8.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6527b0a8.dafc0933.js


BIN
dist/static/js/chunk-6527b0a8.dafc0933.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-7f91f0d5.1fb5eac3.js


BIN
dist/static/js/chunk-7f91f0d5.1fb5eac3.js.gz


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-97b7471c.02c7cf48.js


BIN
dist/static/js/chunk-97b7471c.02c7cf48.js.gz


+ 0 - 0
src/apis/service/interest/newProcess/index.js → src/apis/service/interest/handover/detail.js


+ 4 - 1
src/assets/js/btnList.js

@@ -10,7 +10,10 @@ const btnList = [
   { code: "009", name: "上/下架" },
   { code: "010", name: "复制" },
   { code: "011", name: "设为/取消负责人" },
-  { code: "012", name: "发起流程" },
   { code: "013", name: "模板下载" },
+  { code: "012", name: "发起流程" },
+  { code: "014", name: "取消流程" },
+  { code: "015", name: "作废数据" },
+  { code: "016", name: "离职交接审核" },
 ];
 export default btnList;

+ 4 - 4
src/components/search-customer/main.vue

@@ -16,9 +16,9 @@
   >
     <el-option
       v-for="(item, index) in options"
-      :key="item.id + index"
+      :key="item.pid + index"
       :label="item.name"
-      :value="item.id"
+      :value="item.pid"
       :disabled="item.status!=='1'"
     >
     </el-option>
@@ -71,8 +71,8 @@ export default {
         let index = this.options.findIndex((v) => v.id === e[0]);
         if (index !== -1) {
           let model = {
-            id: this.options[index].id,
-            code: this.options[index].id,
+            id: this.options[index].pid,
+            code: this.options[index].pid,
             label: this.options[index].name,
           };
           this.$emit("searchChange", model);

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

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

+ 195 - 150
src/views/interest/handover/components/addEditForm.vue

@@ -1,67 +1,92 @@
 <template>
-  <el-row :gutter="10" :loading="loading">
-    <el-col :span="24">
-      <el-form
-        ref="ruleForm"
-        :model="ruleForm"
-        status-icon
-        :rules="rulesThis"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
+  <el-form
+    ref="ruleForm"
+    :loading="loading"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    label-width="100px"
+    style="width: 100%"
+    class="demo-ruleForm"
+  >
+    <el-row>
+      <el-col :span="24">
         <el-form-item label="离职人" prop="resign_uid">
-          <!-- :disabled="parmValue1.type == 1" -->
           <search-account
-            :disabled="status != 0"
-            :is-detail="isDetail"
+            :disabled="
+              !(
+                id === 'add' ||
+                (status === '0' && powers.some((item) => item == '005'))
+              )
+            "
+            :is-detail="id !== 'add'"
             :value="ruleForm.resign_uid"
             :size="searchSize"
-            :names="ruleForm.resign_name"
+            :names="resign_name"
             :placeholder="'离职人名称'"
             @searchChange="handleResignName"
           />
         </el-form-item>
+      </el-col>
+      <el-col :span="24">
         <el-form-item label="接受人" prop="hand_uid">
-          <!-- 
-             -->
           <search-account
-            :disabled="status != 0"
-            :is-detail="isDetail"
+            :disabled="
+              !(
+                id === 'add' ||
+                (status === '0' && powers.some((item) => item == '005'))
+              )
+            "
+            :is-detail="id !== 'add'"
             :value="ruleForm.hand_uid"
             :size="searchSize"
-            :names="ruleForm.hand_name"
+            :names="hand_name"
             :placeholder="'接受人名称'"
             @searchChange="handleHandoverName"
           />
         </el-form-item>
-        isDetail:{{ isDetail }} ---------id:{{ id }}-------status{{
-          status == 0
-        }}
-      </el-form>
-    </el-col>
-    <el-col :span="24" style="text-align: right">
-      <el-button
-        type="primary"
-        @click="submitForm"
-        v-if="id === 'add' || status != 1"
-        >{{ id === "add" || status != 1 ? "保 存" : "关 闭" }}</el-button
-      >
-      <el-button
-        type="primary"
-        @click="submitForm('flow')"
-        v-if="status == 0 && id != 'add'"
-        >保 存 并 发 起 流 程
-      </el-button>
-      <el-button
-        @click="closeAddEdit"
-        v-if="status == 0 && id != 'add'"
-        type="danger"
-        >作 废 审 核 流 程</el-button
-      >
-
-      <el-button @click="closeAdd" v-if="id == 'add'"> 关 闭</el-button>
-    </el-col>
-  </el-row>
+      </el-col>
+      <el-col :span="24" style="text-align: right">
+        <el-button
+          type="primary"
+          @click="submitForm"
+          v-if="
+            id === 'add' ||
+            (status === '0' && powers.some((item) => item == '005'))
+          "
+          >保 存</el-button
+        >
+        <el-button
+          type="primary"
+          @click="statusConfirm('1', '发起审核流程')"
+          v-if="status === '0' && powers.some((item) => item == '012')"
+          >发起审核流程
+        </el-button>
+        <el-button
+          @click="statusConfirm('0', '取消审核流程')"
+          plain
+          v-if="status === '1' && powers.some((item) => item == '014')"
+          >取消审核流程</el-button
+        >
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          plain
+          v-if="
+            (status === '0' || status === '1') &&
+            powers.some((item) => item == '015')
+          "
+          >作废该条信息</el-button
+        >
+        <el-button
+          @click="statusConfirm('2', '通过审核')"
+          type="primary"
+          v-if="status === '1' && powers.some((item) => item == '016')"
+          >通过审核</el-button
+        >
+      </el-col>
+    </el-row>
+  </el-form>
 </template>
 <script>
 import asyncRequest from "@/apis/service/interest/handover";
@@ -72,9 +97,8 @@ export default {
   mixins: [resToken],
   data() {
     return {
-      detailId: "", //详情接口使用
-      isBtn: false,
       loading: false,
+      disabled: true,
       status: "", //存储详情接口返的状态
       showModelThis: this.showModel,
       resign_name: "", //离职人
@@ -105,10 +129,23 @@ export default {
       },
     };
   },
-  mounted() {
-    console.log(this.id);
-    this.initForm();
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "handoverDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
   },
+  // mounted() {
+  //   console.log(this.id);
+  //   this.initForm();
+  // },
   created() {
     this.initForm();
   },
@@ -128,21 +165,10 @@ export default {
   },
   methods: {
     //   关闭弹窗,直接隐藏表单
-    async closeAddEdit() {
-      // this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
-      console.log("121");
-      const res = await asyncRequest.delete({ id: this.id });
-      console.log(res);
-      if (res && res.code === 0) {
-        window.vm.$router.push({
-          path: "handover",
-        });
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
+    // async closeAddEdit() {
+    //   this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
+    //
+    // },
     closeAdd() {
       // window.vm.$router.push({
       //   path: "handover",
@@ -150,133 +176,152 @@ export default {
       this.showModelThis = false;
     },
     async initForm() {
+      this.status = "";
       this.loading = true;
       if (this.id === "add") {
-        this.isBtn = true;
-        this.isDetail = false;
         this.rulesThis = this.rules;
+        this.disabled = false;
         await this.resetForm();
       } else {
-        if (this.status == 1) {
-          this.rulesThis = {};
-        } else {
-          this.rulesThis = this.rules;
-          await this.resetForm();
-          await this.initData();
-        }
+        this.rulesThis = this.rules;
+        await this.resetForm();
         await this.initData();
       }
       this.loading = false;
     },
     async initData() {
-      const model = {
-        // id: this.parmValue1.id,
-      };
-      // console.log(model);
       const res = await asyncRequest.detail({ id: this.id });
       if (res && res.code === 0 && res.data) {
         let { hand_name, resign_name, hand_uid, resign_uid, id, status } =
           res.data;
+        this.resign_name = resign_name;
+        this.hand_name = hand_name;
+        this.status = status;
         this.ruleForm = {
-          resign_name,
-          hand_name,
           hand_uid: hand_uid.split(","),
           resign_uid: resign_uid.split(","),
-          type: status,
-          id,
         };
-        this.status = status;
-        // this.$emit("refreshList");
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
         this.$message.warning(res.message);
       }
     },
+
     async resetForm() {
+      this.resign_name = "";
+      this.hand_name = "";
+      this.status = "";
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
           this.ruleForm = {
-            resign_name: "", //离职人
-            hand_name: "", //交接人
             hand_uid: [],
             resign_uid: [],
           };
         }
       });
     },
-    async submitForm(flow) {
-      console.log("12");
-      this.$emit("refreshDom",this.ruleForm);
-      // await this.$refs.ruleForm.validate(async (valid) => {
-      //   if (valid) {
-      //     let resign_uid = this.ruleForm.resign_uid;
-      //     let hand_uid = this.ruleForm.hand_uid;
-      //     if (resign_uid.toString() !== hand_uid.toString()) {
-      //       this.loading = true;
-      //       const model = {
-      //         id: this.ruleForm.id,
-      //         resign_uid: resign_uid.toString(),
-      //         hand_uid: hand_uid.toString(),
-      //       };
-      //       let res = {};
-      //       if (this.id === "add") {
-      //         delete model["id"];
-      //         res = await asyncRequest.add(model);
-      //       } else {
-      //         res = await asyncRequest.update(model);
-      //         if (flow == "flow") {
-      //           this.updateStatus();
-      //         }
-      //       }
-      //       // window.vm.$router.push({
-      //       //   path: "handover",
-      //       // });
-      //       this.loading = false;
-      //       if (res && res.code === 0) {
-      //         const title = this.id === "add" ? "添加成功!" : "修改成功!";
-      //         this.$notify.success({
-      //           title,
-      //           message: "",
-      //         });
-      //         this.showModelThis = false;
-      //         // 刷新
-      //         this.$emit("refresh", false);
-      //       } else if (res && res.code >= 100 && res.code <= 104) {
-      //         await this.logout();
-      //       } else {
-      //         this.$message.warning(res.message);
-      //       }
-      //     } else {
-      //       this.$message.error("离职人和接收人不能相同");
-      //     }
-      //   } else {
-      //     console.log("error submit!!");
-      //     return false;
-      //   }
-      // });
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          const { resign_uid, hand_uid } = this.ruleForm;
+          let rUid = resign_uid.toString(),
+            hUid = hand_uid.toString();
+          if (rUid === hUid) {
+            this.$message.error("离职人和接收人不能相同");
+            return;
+          }
+          this.loading = true;
+          const model = {
+            id: this.id,
+            resign_uid: rUid,
+            hand_uid: hUid,
+          };
+          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: "",
+            });
+
+            if (this.id === "add") {
+              this.showModelThis = false;
+              this.$emit("refresh", false);
+            }
+          } 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;
+        }
+      });
+    },
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
     },
-    async updateStatus() {
-      let { id, type } = this.ruleForm;
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.id });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("handover", {});
+        // window.vm.$router.push({
+        //   path: "handover",
+        // });
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message) {
       let model = {
-        id: id,
-        remark: "123",
-        status: "1",
+        id: this.id,
+        remark: "",
+        status: status,
       };
-      console.log(model);
-      const res = await asyncRequest.updateStatus(model);
+      const res = await asyncRequest.status(model);
+      this.loading = false;
       if (res && res.code === 0) {
-        const title = this.id === "add" ? "添加成功!" : "修改成功!";
         this.$notify.success({
-          title,
+          title: message + "成功!",
           message: "",
         });
-        this.showModelThis = false;
-        // 刷新
-        this.$emit("refresh", false);
+        this.initForm();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {

+ 55 - 0
src/views/interest/handover/detail.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="handoverDetail pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+      style="padding:100px 0 0 0"
+    >
+      <add-edit-form
+        :id="$route.query.id"
+        :show-model="showModel"
+        :is-detail="!isDetail"
+        @refreshList="searchList"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import addEditForm from "./components/addEditForm.vue";
+
+export default {
+  name: "handoverDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEditForm, //详情组件
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "handoverDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+    };
+  },
+
+  mounted() {},
+
+  methods: {
+  },
+};
+</script>
+
+   

+ 108 - 109
src/views/interest/handover/index.vue

@@ -5,9 +5,6 @@
     >
       <ex-table
         v-loading="loading"
-        v-if="
-          powers && powers.length > 0 && powers.some((item) => item == '001')
-        "
         :table="table"
         :data="tableData"
         :columns="columns"
@@ -30,39 +27,38 @@
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
-                <el-col :span="4" style="width: 140px; padding-left: 10px">
-                  <search-account
-                    :size="searchSize"
-                    :placeholder="'离职人姓名'"
-                    @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>
-
-                <!-- style="width: 125px; padding: 0 0 0 10px" -->
-                <el-col :span="4" class="auditStatus">
+                <el-col :span="6" style="width: 210px">
                   <el-select
-                    v-model="type"
-                    filterable
+                    v-model="parmValue.status"
                     placeholder="审核状态"
+                    style="width: 100%"
                     :size="searchSize"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   >
                     <el-option
                       v-for="item in status_options"
-                      :key="item.value"
+                      :key="item.id"
                       :label="item.label"
-                      :value="item.value"
+                      :value="item.id"
                     >
                     </el-option>
                   </el-select>
                 </el-col>
-                <el-col :span="3" style="width: 66px; float: right">
+                <el-col :span="4" style="width: 250px; padding: 0 0 0 10px">
+                  <search-account
+                    :value="resign_uid"
+                    :disabled="false"
+                    :is-detail="false"
+                    :size="searchSize"
+                    :placeholder="'离职人姓名'"
+                    @searchChange="handleResignName"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 66px; float: right">
                   <el-button
                     :size="searchSize"
                     type="primary"
@@ -72,6 +68,42 @@
                     刷新
                   </el-button>
                 </el-col>
+                <el-col
+                  :span="4"
+                  class="fr"
+                  style="width: 66px; padding: 0 0 0 10px"
+                >
+                  <el-button
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="24">
+                <el-col :span="5" style="width: 291px">
+                  <period-date-picker
+                    :width="'134px'"
+                    :size="searchSize"
+                    @timeReturned="handleTime"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 250px; padding: 0 0 0 10px">
+                  <search-account
+                    :value="hand_uid"
+                    :size="searchSize"
+                    :disabled="false"
+                    :is-detail="false"
+                    :placeholder="'接受人姓名'"
+                    @searchChange="handleHandoverName"
+                  />
+                </el-col>
+
                 <el-col
                   :span="3"
                   style="width: 66px; float: right"
@@ -86,14 +118,8 @@
                     新建
                   </el-button>
                 </el-col>
-                <el-col :span="5" style="width: 305px" class="pt10">
-                  <period-date-picker
-                    :width="'135px'"
-                    :size="searchSize"
-                    @timeReturned="handleTime"
-                  />
-                </el-col>
-                <el-col :span="4" style="width: 54px" class="pt10">
+
+                <el-col :span="4" style="width: 54px; float: right">
                   <el-button
                     :size="searchSize"
                     type="primary"
@@ -101,16 +127,6 @@
                     icon="el-icon-search"
                     @click="searchList"
                 /></el-col>
-                <el-col :span="4" style="width: 66px" class="pt10">
-                  <el-button
-                    type="warning"
-                    class="fr"
-                    :size="searchSize"
-                    @click="restSearch"
-                  >
-                    重置
-                  </el-button>
-                </el-col>
               </el-col>
             </el-row>
           </div>
@@ -119,9 +135,15 @@
           <!-- :type="scope.row.status == '0' ? 'warning' : ''" -->
           <el-tag
             :size="tablebtnSize"
-            :type="getType(scope.row.status)"
+            :type="
+              scope.row.status == '0'
+                ? 'warning'
+                : scope.row.status == '2'
+                ? 'success'
+                : ''
+            "
             v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
+              (status_options.find((item) => item.id == scope.row.status) || {})
                 .label || '--'
             "
           ></el-tag>
@@ -135,7 +157,7 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="routeGoto('newProcess', { id: scope.row.id })"
+              @click="routeGoto('handoverDetail', { id: scope.row.id })"
             ></i>
           </el-tooltip>
         </template>
@@ -156,9 +178,7 @@
 <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import asyncRequest from "@/apis/service/interest/handover";
-// import addEdit from "./addEdit";
 import addEdit from "./components/addEdit.vue";
-import statusList from "@/assets/js/statusList";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
 export default {
@@ -184,24 +204,14 @@ export default {
   },
   data() {
     return {
+      resign_uid: [],
+      hand_uid: [],
       // 状态
-      statusOptions: [
-        { id: "0", label: "待发起流程" },
-        { id: "1", label: "发起流程" },
-        { id: "2", label: "审核完成" },
-      ],
-      type: "",
       status_options: [
-        {
-          value: "1",
-          label: "状态1",
-        },
-        {
-          value: "2",
-          label: "状态2",
-        },
+        { id: "0", label: "待发起流程" },
+        { id: "1", label: "待审核" },
+        { id: "2", label: "审核通过" },
       ],
-      statusList: statusList,
       loading: true,
       showModel: false,
       isDetail: false,
@@ -209,9 +219,6 @@ export default {
       parmValue: {
         start: "",
         end: "",
-        type: "", //审核状态
-        resign_name: "", //离职人姓名
-        handover_name: "", //接受人姓名
         status: "", //
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -270,28 +277,15 @@ export default {
     this.searchList();
   },
   methods: {
-    getType(status) {
-      if (status == 0) {
-        return "";
-      } else if (status == 1) {
-        return "warning";
-      } else {
-        return "success";
-      }
-    },
-
     restSearch() {
       this.parmValue = {
         start: "", //开始 end结束时间
         end: "",
-        // type: "", //审核状态
-        // resign_name: "", //离职人姓名
-        // handover_name: "", //接受人姓名
         status: "", //
-        // page: 1, // 页码
-        // size: 10, // 每页显示条数
         resign_uid: "",
         hand_uid: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
       };
       this.searchList();
     },
@@ -302,7 +296,14 @@ export default {
     },
     // 获取离职交接列表
     async searchList() {
-      console.log(this.parmValue);
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
       this.loading = true;
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
@@ -316,41 +317,39 @@ export default {
       }
       this.loading = false;
     },
-
     // 离职人姓名
-    handleResignName(e) {
-      console.log(e);
-      this.parmValue.resign_uid = e.id;
+    async handleResignName(e) {
+      this.parmValue.resign_uid = e && e.id ? e.id : "";
+      this.resign_uid = e && e.id ? [e.id] : [];
+      this.parmValue.page = 1;
+      await this.searchList();
     },
-
     // 接收人姓名
-    handleHandoverName(e) {
-      console.log(e);
-      this.parmValue.hand_uid = e.id;
+    async handleHandoverName(e) {
+      this.parmValue.hand_uid = e && e.id ? e.id : "";
+      this.hand_uid = e && e.id ? [e.id] : [];
+      this.parmValue.page = 1;
+      await this.searchList();
     },
     // 时间
-    handleTime(e) {
-      console.log(e);
-      this.parmValue.start = e.startTime;
-      this.parmValue.end = e.endTime;
+    async handleTime(e) {
+      if (e.startTime !== "") {
+        this.parmValue.start = e.startTime;
+      } else {
+        this.parmValue.start = "";
+      }
+      if (e.endTime !== "") {
+        this.parmValue.end = e.endTime;
+      } else {
+        this.parmValue.end = "";
+      }
+      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
     },
   },
 };
 </script>
 <style lang="scss" scoped>
-.auditStatus {
-  width: 125px;
-  padding: 0 0 0 10px;
-}
-.pt10 {
-  padding: 0 0 0 10px;
-}
-@media screen and (max-width: 1300px) {
-  .auditStatus {
-    width: 450px;
-  }
-  .pt10 {
-    padding-top: 10px;
-  }
-}
 </style>

+ 2 - 1
src/views/interest/organize/index.vue

@@ -159,7 +159,8 @@ export default {
   },
   data() {
     return {
-      titleList: [],
+      titleList: [
+      ],
       sitem: null,
       statusList: statusList,
       loading: true,

+ 118 - 41
src/views/sellOut/consultOrder/index.vue

@@ -27,7 +27,7 @@
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
-                <el-col :span="4" style="width: 120px">
+                <el-col :span="4" style="width: 140px">
                   <el-select
                     :size="searchSize"
                     v-model="parmValue.zxtype"
@@ -49,31 +49,69 @@
                     />
                   </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
+                <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
+                  <search-customer
+                    :value="customerCode"
                     :size="searchSize"
-                    v-model="parmValue.username"
-                    :maxlength="40"
-                    placeholder="手机号"
+                    :placeholder="'客户公司名称'"
+                    @searchChange="customerChange"
                   />
                 </el-col>
-                <el-col :span="4" style="width: 54px">
+
+                <el-col :span="3" style="width: 66px; float: right">
                   <el-button
                     :size="searchSize"
                     type="primary"
-                    class="fr"
-                    icon="el-icon-search"
+                    style="float: right; margin-left: 5px"
                     @click="searchList"
-                /></el-col>
-                <el-col :span="4" style="width: 66px">
+                  >
+                    刷新
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="24">
+                <el-col :span="6" style="width: 292px">
+                  <period-date-picker
+                    :start="parmValue.start"
+                    :end="parmValue.end"
+                    :type="1"
+                    :width="'135px'"
+                    :size="searchSize"
+                    @timeReturned="timeReturned($event)"
+                  />
+                </el-col>
+
+                <el-col :span="4" style="width: 350px; padding: 0 0 0 10px">
+                  <el-input
+                    placeholder="关键字"
+                    v-model="input"
+                    :size="searchSize"
+                  >
+                    <el-select
+                      v-model="select"
+                      slot="prepend"
+                      placeholder="请选择"
+                      style="width: 115px"
+                      :size="searchSize"
+                    >
+                      <el-option label="咨询单编码" value="1"></el-option>
+                      <el-option label="申请人" value="2"></el-option>
+                      <el-option label="商品名称" value="3"></el-option>
+                    </el-select>
+                    <el-button
+                      slot="append"
+                      icon="el-icon-search"
+                      @click="
+                        pageInfo.curr = 1;
+                        parmValue.page = 1;
+                        searchList();
+                      "
+                    ></el-button>
+                  </el-input>
+                </el-col>
+                <el-col :span="4" style="width: 66px; float: right">
                   <el-button
                     type="warning"
                     class="fr"
@@ -83,16 +121,6 @@
                     重置
                   </el-button>
                 </el-col>
-                <el-col :span="3" style="width: 66px; float: right">
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    style="float: right; margin-left: 5px"
-                    @click="searchList"
-                  >
-                    刷新
-                  </el-button>
-                </el-col>
               </el-col>
             </el-row>
           </div>
@@ -151,7 +179,6 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import addEdit from "./addEdit";
-import statusList from "@/assets/js/statusList";
 import asyncRequest from "@/apis/service/sellOut/consultOrder";
 import { mapGetters } from "vuex";
 
@@ -177,21 +204,36 @@ export default {
   },
   data() {
     return {
+      select: "1",
+      input: "",
+      customerCode: [],
       sitem: null,
       // 状态
       statusOptions: [
         { id: "0", label: "禁用" },
         { id: "1", label: "启用" },
       ],
-      statusList: statusList,
+      statusList: [
+        "样品咨询单",
+        "线上咨询",
+        "线上贵金属",
+        "线下咨询",
+        "线下贵金属",
+        "赠品咨询单",
+        "项目竞聘",
+      ],
       loading: true,
       showModel: false,
       isDetail: false,
       modelId: 0,
       parmValue: {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        zxNo: "", // 咨询单编码
+        khNo: "", // 客户编码
+        cpName: "", //商品名称
+        zxtype: "", //咨询类型
+        salesman: "", //申请人
+        start: "",
+        end: "",
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
@@ -311,16 +353,51 @@ export default {
   },
 
   methods: {
+    async timeReturned(e) {
+      if (e.startTime !== "") {
+        this.parmValue.start = e.startTime;
+      } else {
+        this.parmValue.start = "";
+      }
+
+      if (e.endTime !== "") {
+        this.parmValue.end = e.endTime;
+      } else {
+        this.parmValue.end = "";
+      }
+      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
     restSearch() {
+      this.select = "1";
+      this.input = "";
+      this.customerCode = [];
       this.parmValue = {
-        name: "", // 业务员名字
-        username: "", // 账号
-        status: "", //
+        zxNo: "", // 咨询单编码
+        khNo: "", // 客户编码
+        cpName: "", //商品名称
+        zxtype: "", //咨询类型
+        salesman: "", //申请人
+        start: "",
+        end: "",
         page: 1, // 页码
-        size: 10, // 每页显示条数
+        size: 15, // 每页显示条数
       };
       this.searchList();
     },
+    async customerChange(e) {
+      if (e && e.id) {
+        this.customerCode = [e.code];
+        this.parmValue.khNo = e.code;
+      } else {
+        this.customerCode = [];
+        this.parmValue.khNo = "";
+      }
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
     openModal(id, isDetail) {
       this.showModel = true;
       this.modelId = id;
@@ -356,17 +433,17 @@ export default {
     },
     async searchList() {
       this.loading = true;
+      this.parmValue.zxNo = this.select === "1" ? this.input : ""; //咨询类型
+      this.parmValue.salesman = this.select === "2" ? this.input : ""; //申请人
+      this.parmValue.cpName = this.select === "3" ? this.input : ""; //商品名称
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.tableData.map((v) => {
           v.sale_price = this.setNum(v.sale_price);
           v.sale_fee = this.setNum(v.sale_fee);
-          // v.num =
-          //pa (v.sale_price);
           return v;
         });
-        //
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 35 - 3
src/views/stock/check/components/addEdit.vue

@@ -71,7 +71,10 @@
           <el-button type="primary" @click="submitForm" v-if="status === '0'"
             >保 存
           </el-button>
-          <el-button type="primary" @click="submitForm" v-if="status === '0'"
+          <el-button
+            type="primary"
+            @click="submitForm(true)"
+            v-if="status === '0'"
             >保存并发起流程
           </el-button>
         </el-col>
@@ -197,6 +200,7 @@ export default {
               title: "作废成功!",
               message: "",
             });
+            this.routeGoto("check", {});
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -210,7 +214,7 @@ export default {
     async initForm() {
       this.loading = true;
       if (this.id === "add") {
-        this.status = "";
+        this.status = "0";
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
@@ -257,7 +261,7 @@ export default {
       let arr = JSON.parse(JSON.stringify(list));
       return arr.join(",");
     },
-    async submitForm() {
+    async submitForm(status) {
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
@@ -285,6 +289,9 @@ export default {
             });
             // 刷新
             this.$emit("refresh");
+            if (status) {
+              await this.setProcess("1");
+            }
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {
@@ -296,6 +303,31 @@ export default {
         }
       });
     },
+    async setProcess(status) {
+      if (this.loading === false) {
+        this.loading = true;
+      }
+      let model = {
+        id: this.id,
+        status: status,
+      };
+
+      let res = await asyncRequest.update(model);
+      if (res && res.code === 0) {
+        const title =
+          status === "1" ? "发起审核流程成功!" : "取消审核流程成功!";
+        this.$notify.success({
+          title,
+          message: "",
+        });
+        this.initForm();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
   },
 };
 </script>

+ 6 - 2
src/views/stock/check/detail.vue

@@ -140,7 +140,7 @@ export default {
       this.sitem = sitem;
     },
     async deleteById(id, status) {
-      await this.$confirm("确定要删除?", {
+      await this.$confirm("确定要作废申请?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
@@ -156,7 +156,11 @@ export default {
               title: "删除成功",
               message: "",
             });
-            this.routeGoto("check", {});
+
+            window.vm.$router.push({
+              path: "check",
+            });
+            // this.routeGoto("check", {});
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {

Some files were not shown because too many files changed in this diff