戴艳蓉 vor 3 Jahren
Ursprung
Commit
5d57095c0a

+ 22 - 7
src/styles/index.scss

@@ -576,12 +576,27 @@ aside {
   }
 }
 .detail-page-title{
-  line-height: 50px!important;
-  font-size: 16px!important;
-  padding:0 0 0 10px!important;
-  span.title{
-    line-height: 50px!important;
-  font-size: 16px!important;
-  margin: 0 20px 0 0;
+  line-height: 28px!important;
+  height: 28px!important;
+  // font-size: 16px!important;
+  padding:0!important;
+  margin: 20px 0 30px 0!important;
+
+  // span.title{
+  //   line-height: 50px!important;
+  // font-size: 16px!important;
+  // margin: 0 20px 0 0;
+  // }
+}
+.exam-content{
+  line-height: 28px!important;
+  height: 28px!important;
+  // font-size: 16px!important;
+  padding:0!important;
+  margin: 0 0 20px 0!important;
+  &::after,&::before{
+    content: "";
+  display: block;
+  clear: both;
   }
 }

+ 23 - 50
src/views/process/columns.js

@@ -1,7 +1,7 @@
 export default [
   {
     name: "离职交接流程",
-    type: "",
+    type: "LZJJ",
     toRouter: "/interest/handoverDetail",
     to: "id",
   },
@@ -56,68 +56,61 @@ export default [
     to: "id",
   },
   {
-    name: "出库单流程",
+    name: "销售出库单流程",
     type: "CKD",
-    order_type:"1",
-    toRouter: "sellOut/sellOutOrderDetail",
+    toRouter: "/sellOut/sellOutOrderDetail",
     to: "code",
   },
   {
-    name: "售后申请单流程",
+    name: "销售售后申请单流程",
     type: "SHD",
-    order_type:"1",
     toRouter: "/sellOut/sellAfterApplyDetail",
     to: "code",
   },
 
   {
-    name: "售后退货单流程",
+    name: "销售售后退货单流程",
     type: "CKTHD",
-    order_type:"1",
     toRouter: "/sellOut/returnOrderDetail",
     to: "code",
   },
   {
     name: "销售退货流程",
     type: "QRTHD",
-    order_type:"1",
-    toRouter: "storeManageFlow",
-    to: "id",
+    toRouter: "/sellOut/sellReturnDetail",
+    to: "code",
   },
   //咨询订单
-
- 
-  // 
   {
     name: "咨询订单流程",
     type: "ZXQRD",
-    toRouter: "sheetOrder/zxOrderDetail",
+    toRouter: "/sheetOrder/zxOrderDetail",
     to: "id",
   },
   {
-    name: "出库单流程",
-    type: "CKD",
-    toRouter: "storeManageFlow",
-    to: "id",
+    name: "咨询出库单流程",
+    type: "ZXCKD",
+    toRouter: "/sheetOrder/zxoutOrderDetail",
+    to: "code",
   },
   {
-    name: "售后申请单流程",
-    type: "SHD",
-    toRouter: "serviceDetail",
+    name: "咨询售后申请单流程",
+    type: "ZXSHD",
+    toRouter: "/sheetOrder/zxAfterSaleDetail",
     to: "code",
   },
 
   {
-    name: "售后退货单流程",
-    type: "CKTHD",
-    toRouter: "storeManageFlow",
-    to: "id",
+    name: "咨询售后退货单流程",
+    type: "ZXCKTHD",
+    toRouter: "/sheetOrder/zxAfterSaleOrderDetail",
+    to: "code",
   },
   {
-    name: "销售退货流程",
-    type: "QRTHD",
-    toRouter: "storeManageFlow",
-    to: "id",
+    name: "咨询退货单流程",
+    type: "ZXTHD",
+    toRouter: "/sheetOrder/zxReturnDetail",
+    to: "code",
   },
   {
     name: "咨询工差单流程",
@@ -125,24 +118,4 @@ export default [
     toRouter: "/sheetOrder/zxDiffOrderDetail",
     to: "id",
   },
-  
-  
-
-
-  // {
-  //   name: "反馈单流程",//暂时不用,与备货流程冲突,其实是同一个
-  //   type: "FKD",
-  //   toRouter: "/purchaseIn/storeManageFlow",
-  //   to: "id",
-  // },
-
-
-
-  // {
-  //   name: "入库单退货流程", //采购部分 暂无该流程
-  //   type: "RKTHD",
-  //   toRouter: "storeManageFlow",
-  //   to: "id",
-  // },
-
 ];

+ 40 - 168
src/views/process/done/index.vue

@@ -71,44 +71,7 @@
         >
           <i
             class="el-icon-view tb-icon"
-            @click="getRouter(scope.row.order_type, scope.row.order_code)"
-          ></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)"
-          ></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="changeStatus(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="changeStatus(scope.row.id, scope.row.status)"
+            @click="getRouter(scope.row.toRouter, scope.row.queryId)"
           ></i>
         </el-tooltip>
       </template>
@@ -121,6 +84,7 @@ import asyncRequest from "@/apis/service/process/done";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
+import routerList from "@/views/process/columns";
 export default {
   name: "done",
   mixins: [mixinPage, resToken],
@@ -144,8 +108,8 @@ export default {
       showModel: false,
       isDetail: false,
       modelId: 0,
+      process_router_list: JSON.parse(JSON.stringify(routerList)),
       parmValue: {
-       
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
@@ -172,12 +136,17 @@ export default {
       columns: [
         {
           prop: "order_code",
-          label: "订单编号",
+          label: "业务编号",
         },
-        {
-          prop: "order_type",
-          label: "订单类型",
+          {
+          prop: "process_name",
+          label: "流程名称",
+          // sortable: true,
         },
+        // {
+        //   prop: "order_type",
+        //   label: "订单类型",
+        // },
 
         {
           prop: "apply_name",
@@ -186,17 +155,15 @@ export default {
         {
           prop: "action_name",
           label: "操作人",
-          // sortable: true,
-          // _slot_: "status",
-        },
-        {
-          prop: "order_process",
-          label: "状态",
         },
+        // {
+        //   prop: "order_process",
+        //   label: "状态",
+        // },
         {
           prop: "addtime",
           label: "创建时间",
-          width: "150",
+          // width: "150",
         },
         {
           prop: "",
@@ -213,80 +180,11 @@ export default {
     this.searchList();
   },
   methods: {
-    async getRouter(type, code, id) {
-      let list = [
-        {
-          type: "CGD", //采购单管理
-          sellR: "/purchaseIn/purchaseOrderDetail",
-          askR: "",
-          to: "code",
-        },
-        {
-          type: "BKD", //入库单
-          sellR: "/purchaseIn/stockApplyDetailFlow",
-          askR: "",
-          to: "id",
-        },
-        {
-          type: "RKD", //备货入库单
-          sellR: "/purchaseIn/wsmInOrderDetail",
-          askR: "",
-          to: "code",
-        },
-        // {
-        //   type: "FKD", //反馈单流程
-        //   rname: "stockApplyDetailFlow",
-        //   to: "id",
-        // },
-        {
-          type: "BHD", //备货申请管理
-          sellR: "/purchaseIn/stockApplyDetailFlow",
-          askR: "",
-          to: "code",
-        },
-        {
-          type: "PDD", //盘点流程
-          sellR: "/stock/checkDetail",
-          askR: "",
-          to: "id",
-        },
-        {
-          type: "DBD", //调拨流程
-          rname: "/stock/allotDetail",
-          to: "id",
-        },
-        // {
-        //   type: "RKTHD",//入库单退货流程
-        //   rname: "stockApplyDetailFlow",
-        //   to: "id",
-        // },
-        // {
-        //   type: "CGDTHD",//采购单单流程
-        //   rname: "stockApplyDetailFlow",
-        //   to: "id",
-        // },
-        {
-          type: "XSQRD", //销售确认单流程
-          sellR: "/sellOut/salesOrderDetai",
-          askR: "",
-          to: "id",
-        },
-        // {
-        //   type: "CKD",//出库单流程
-        //   rname: "stockApplyDetailFlow",
-        //   to: "id",
-        // },
-        {
-          type: "SHD", //售后流程
-          rname: "serviceDetail",
-          to: "code",
-        },
-      ];
-      let item = list.find((v) => {
-        return v.type == type;
-      });
-      if (item && item.type) {
-        this.routeGoto(item.sellR, { id: item.to === "id" ? id : code });
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        this.routeGoto(toRouter, { id: queryId });
+      } else {
+        this.$message.warning("暂未找到相关流程!");
       }
     },
     restSearch() {
@@ -297,51 +195,13 @@ export default {
         total: 0,
       };
       this.parmValue = {
-       
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
       this.searchList();
     },
-    // 新建/编辑/详情
-    openModal(id, isDetail) {
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-    },
-    /**
-     * 启用/禁用
-     * @param {String} id id
-     * @param {String} status 0-禁用 1-启用
-     */
-    async changeStatus(id, status) {
-      await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          const model = {
-            roleid: 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() {
@@ -349,10 +209,22 @@ export default {
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        // this.tableData.map((e) => {
-        //   e.userdoneList = e.userlist.join(",");
-        //   return e;
-        // });
+        this.tableData.forEach((v, i) => {
+          let index = this.process_router_list.findIndex(
+            (y) => y.type === v.order_type
+          );
+          if (index !== -1) {
+            const { name, toRouter, to } = this.process_router_list[index];
+            this.tableData[i].process_name = name;
+            this.tableData[i].toRouter = toRouter;
+            this.tableData[i].queryId =
+              to == "code" ? v.order_code : v.order_id;
+          } else {
+            this.tableData[i].process_name = "";
+            this.tableData[i].toRouter = "";
+            this.tableData[i].queryId = "";
+          }
+        });
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 34 - 140
src/views/process/oing/index.vue

@@ -73,13 +73,7 @@
         >
           <i
             class="el-icon-view tb-icon"
-            @click="
-              getRouter(
-                scope.row.order_type,
-                scope.row.order_code,
-                scope.row.order_id
-              )
-            "
+            @click="getRouter(scope.row.toRouter, scope.row.queryId)"
           ></i>
         </el-tooltip>
       </template>
@@ -88,12 +82,13 @@
   </div>
 </template>
 <script>
-import asyncRequest from "@/apis/service/process/oing"; 
+import asyncRequest from "@/apis/service/process/oing";
 import statusList from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
+import routerList from "@/views/process/columns";
 export default {
   name: "role",
   mixins: [mixinPage, resToken],
@@ -115,6 +110,7 @@ export default {
     return {
       statusList: statusList,
       roleLevel: roleLevel,
+      process_router_list: JSON.parse(JSON.stringify(routerList)),
       loading: true,
       showModel: false,
       isDetail: false,
@@ -153,29 +149,22 @@ export default {
       columns: [
         {
           prop: "order_code",
-          label: "订单编号",
+          label: "业务编号",
         },
         {
-          prop: "order_type",
-          label: "订单类型",
+          prop: "process_name",
+          label: "流程名称",
+          // sortable: true,
         },
-
         {
           prop: "apply_name",
           label: "申请人",
         },
+       
         {
-          prop: "action_process",
-          label: "订单流程",
-          // sortable: true,
+          prop: "action_name",
+          label: "操作人",
         },
-        // {
-        //   prop: "order_status",
-        //   label: "状态",
-        //   fixed: "right",
-        //   // _noset_: true,
-        //   _slot_: "status",
-        // },
         {
           prop: "addtime",
           label: "申请时间",
@@ -196,80 +185,11 @@ export default {
     this.searchList();
   },
   methods: {
-    getRouter(type, code, id) {
-      let list = [
-        {
-          type: "CGD", //采购单管理
-          sellR: "/purchaseIn/purchaseOrderDetail",
-          askR: "",
-          to: "code",
-        },
-        {
-          type: "BKD", //入库单
-          sellR: "/purchaseIn/storeManageFlow",
-          askR: "",
-          to: "id",
-        },
-        {
-          type: "RKD", //备货入库单
-          sellR: "/purchaseIn/wsmInOrderDetail",
-          askR: "",
-          to: "code",
-        },
-        // {
-        //   type: "FKD", //反馈单流程
-        //   rname: "storeManageFlow",
-        //   to: "id",
-        // },
-        {
-          type: "BHD", //备货申请管理
-          sellR: "/purchaseIn/storeManageFlow",
-          askR: "",
-          to: "code",
-        },
-        {
-          type: "PDD", //盘点流程
-          sellR: "/stock/checkDetail",
-          askR: "",
-          to: "id",
-        },
-        {
-          type: "DBD", //调拨流程
-          rname: "/stock/allotDetail",
-          to: "id",
-        },
-        // {
-        //   type: "RKTHD",//入库单退货流程
-        //   rname: "storeManageFlow",
-        //   to: "id",
-        // },
-        // {
-        //   type: "CGDTHD",//采购单单流程
-        //   rname: "storeManageFlow",
-        //   to: "id",
-        // },
-        {
-          type: "XSQRD", //销售确认单流程
-          sellR: "/sellOut/salesOrderDetai",
-          askR: "",
-          to: "id",
-        },
-        // {
-        //   type: "CKD",//出库单流程
-        //   rname: "storeManageFlow",
-        //   to: "id",
-        // },
-        {
-          type: "SHD", //售后流程
-          rname: "serviceDetail",
-          to: "code",
-        },
-      ];
-      let item = list.find((v) => {
-        return v.type == type;
-      });
-      if (item && item.type) {
-        this.routeGoto(item.sellR, { id: item.to === "id" ? id : code });
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        this.routeGoto(toRouter, { id: queryId });
+      }else{
+         this.$message.warning("暂未找到相关流程!");
       }
     },
 
@@ -284,51 +204,9 @@ export default {
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
-      this.searchProList();
+      // this.searchProList();
       this.searchList();
     },
-    // 新建/编辑/详情
-    openModal(id, isDetail) {
-      this.showModel = true;
-      this.modelId = id;
-      this.isDetail = isDetail;
-    },
-    /**
-     * 启用/禁用
-     * @param {String} id id
-     * @param {String} status 0-禁用 1-启用
-     */
-    async changeStatus(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.loading = false;
-            this.$message.warning(res.message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
 
     // 刷新表格
     async searchList() {
@@ -336,6 +214,22 @@ export default {
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
+        this.tableData.forEach((v, i) => {
+          let index = this.process_router_list.findIndex(
+            (y) => y.type === v.order_type
+          );
+          if (index !== -1) {
+            const { name, toRouter, to } = this.process_router_list[index];
+            this.tableData[i].process_name = name;
+            this.tableData[i].toRouter = toRouter;
+            this.tableData[i].queryId =
+              to == "code" ? v.order_code : v.order_id;
+          } else {
+            this.tableData[i].process_name = "";
+            this.tableData[i].toRouter = "";
+            this.tableData[i].queryId = "";
+          }
+        });
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
@@ -348,7 +242,7 @@ export default {
     // 刷新表格
     async searchProList() {
       this.loading = true;
-      const res = await asyncRequest.processList( {
+      const res = await asyncRequest.processList({
         page: 1, // 页码
         size: 50, // 每页显示条数
       });

+ 1 - 1
src/views/purchaseIn/stockApply/columns.js

@@ -33,7 +33,7 @@ export default [
           prop: "status",
           label: "状态",
           _slot_: "status",
-          width: "100px",
+          width: "120px",
         },
         {
           prop: "addtime",

+ 1 - 1
src/views/purchaseIn/stockApply/components/addEdit.vue

@@ -10,7 +10,7 @@
     >
       <el-row>
         <el-col :span="type === '1' ? 12 : 24">
-          <el-form-item label="商品分类" prop="goods_name">
+          <el-form-item label="商品分类" prop="goods_class">
             <good-class
               :value="ruleForm.goods_class"
               @handleChange="goods_class_change"

+ 21 - 18
src/views/purchaseIn/stockApply/detail.vue

@@ -3,25 +3,28 @@
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <!-- <p>{{ status }}---{{ powers }}</p> -->
-
-      <div class="tr" style="padding: 10px 0; height: 50px">
-        <span class="fl" style="padding: 3px 0 0 3px">备货详情</span>
+      <p>{{ status }}---{{ powers }}</p>
+      <div class="detail-page-title">
+        <span>备货申请编号:</span><span v-if="sitem">{{ sitem.bk_code }}</span>
 
         <el-button
-          @click="statusConfirm('0', '取消审核流程')"
+          v-if="(powers.some((item) => item === '015') && (status === '0'||status === '1'||status === '2'))"
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
           plain
+          class="fr"
           :size="'mini'"
-          v-if="status === '1' && powers.some((item) => item == '014')"
-          >取消备货申请</el-button
+          style="margin:0 0 0 12px;"
+          >作废该条信息</el-button
         >
         <el-button
-          v-if="!(powers.some((item) => item === '015') && status === '3')"
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
+          @click="statusConfirm('0', '取消审核流程')"
           plain
+          class="fr"
+           type="primary"
           :size="'mini'"
-          >作废该条信息</el-button
+          v-if="status === '1' && powers.some((item) => item == '014')"
+          >取消备货申请</el-button
         >
       </div>
       <status-bar
@@ -46,10 +49,10 @@
           title="发起审核流程"
           v-if="status === '0' && powers.some((item) => item == '012')"
         >
-          <div style="padding: 0 0 20px 0" class="tr">
+          <div  class="exam-content">
             <el-button
               type="primary"
-              plain
+              class="fr"
               :size="'mini'"
               @click="statusConfirm('1', '发起审核流程')"
               >发起审核流程
@@ -68,7 +71,7 @@
 
         <el-collapse-item
           name="4"
-          title="反馈认同"
+          title="同意采购"
           v-if="status === '2' && powers.some((item) => item === '025')"
         >
           <el-row style="padding: 0 0 20px 0">
@@ -156,10 +159,10 @@ export default {
       sitem: null,
       status: "",
       statusOptions: [
-        { value: "0", label: "待发起流程" },
-        { value: "1", label: "采购反馈" },
-        // { value: "2", label: "采购意见反馈" },
-        { value: "3", label: "采购单生成" },
+        { value: "0", label: "待发起审核流程" },
+        { value: "1", label: "采购反馈" },
+        { value: "2", label: "待同意采购" },
+        { value: "3", label: "已同意采购" },
       ],
     };
   },

+ 68 - 95
src/views/purchaseIn/stockApply/index.vue

@@ -36,23 +36,18 @@
                     @timeReturned="handleTime"
                   />
                 </el-col>
-                <el-col style="width: 130px; padding-left: 10px">
-                  <search-account
-                    :value="apply_name"
-                    :disabled="false"
-                    :is-detail="false"
-                    :size="searchSize"
-                    :placeholder="'申请人'"
-                    @searchChange="handleResignName"
-                  />
-                </el-col>
-                <el-col style="width: 160px; padding: 0 0 0 10px">
+
+                <el-col style="width: 200px; padding: 0 0 0 10px">
                   <el-select
                     clearable
                     :size="searchSize"
                     v-model="parmValue.status"
-                    placeholder="状态"
-                    @change="searchList"
+                    placeholder="备货申请状态"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   >
                     <el-option
                       v-for="item in options"
@@ -74,66 +69,61 @@
                     刷新
                   </el-button>
                 </el-col>
-                <el-col
-                  :span="3"
-                  style="width: 56px"
-                  class="mr10 fr"
-                  v-if="powers.some((item) => item == '003')"
-                >
+
+                <el-col :span="4" style="width: 66px; float: right">
                   <el-button
-                    class="fl"
+                    type="warning"
+                    class="fr"
                     :size="searchSize"
-                    type="success"
-                    @click="openModal('add', false)"
+                    @click="restSearch"
                   >
-                    新建
+                    重置
                   </el-button>
                 </el-col>
               </el-col>
             </el-row>
-            <el-row>
-              <el-col style="width: 190px; padding-top: 10px">
-                <el-input
-                  :size="searchSize"
-                  placeholder="商品名称"
-                  v-model="parmValue.good_name"
-                  clearable
-                  @blur="searchList"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 195px; padding: 10px 0 0 10px">
-                <el-input
-                  placeholder="商品编码"
-                  :size="searchSize"
-                  v-model="parmValue.good_code"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 195px; padding: 10px 0 0 10px">
+            <el-row style="padding-top: 10px">
+              <el-col style="width: 400px; ">
                 <el-input
+                  placeholder="关键字"
+                  v-model="input"
                   :size="searchSize"
-                  v-model="parmValue.bk_code"
-                  :maxlength="40"
-                  placeholder="申请编码"
-                  @blur="searchList"
-                />
+                >
+                  <el-select
+                    v-model="select"
+                    slot="prepend"
+                    placeholder="请选择"
+                    style="width: 130px"
+                  >
+                    <el-option label="备货申请编号" value="1" />
+                    <el-option label="商品属性编号" value="2" />
+                    <el-option label="商品名称" value="3" />
+                    <el-option label="申请人" value="4" />
+                  </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: 54px; padding-top: 10px">
+              <el-col
+                :span="3"
+                style="width: 56px"
+                class="fr"
+                v-if="powers.some((item) => item == '003')"
+              >
                 <el-button
+                  class="fl"
                   :size="searchSize"
-                  type="primary"
-                  class="fr"
-                  icon="el-icon-search"
-                  @click="searchList"
-              /></el-col>
-
-              <el-col :span="4" style="width: 66px; padding-top: 10px">
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
+                  type="success"
+                  @click="openModal('add', false)"
                 >
-                  重置
+                  新建
                 </el-button>
               </el-col>
             </el-row>
@@ -152,7 +142,7 @@
                 : ''
             "
             v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
+              (options.find((item) => item.value == scope.row.status) || {})
                 .label || '--'
             "
           ></el-tag>
@@ -216,7 +206,7 @@ export default {
       options: [
         {
           value: "0",
-          label: "待备货申请",
+          label: "待发起审核流程",
         },
         {
           value: "1",
@@ -224,29 +214,23 @@ export default {
         },
         {
           value: "2",
-          label: "待反馈认同",
+          label: "待同意采购",
         },
         {
           value: "3",
-          label: "同意下单",
+          label: "已同意采购",
         },
         {
           value: "4",
-          label: "取消订单",
+          label: "已取消采购",
         },
       ],
-      statusOptions: [
-        { id: "0", label: "待备货申请" },
-        { id: "1", label: "待采购反馈" },
-        { id: "2", label: "待反馈认同" },
-        { id: "3", label: "同意下单" },
-        { id: "4", label: "取消订单" },
-      ],
+      select: "1",
+      input: "",
       loading: true,
       showModel: false,
       isDetail: false,
       modelId: 0,
-      apply_name: [],
       parmValue: {
         good_code: "",
         bk_code: "",
@@ -298,7 +282,8 @@ export default {
     },
     // 重置参数
     restSearch() {
-      this.apply_name = [];
+      this.select = "";
+      this.input = "";
       this.parmValue = {
         status: "",
         apply_name: "",
@@ -327,23 +312,18 @@ export default {
     // 列表搜索
     async searchList() {
       this.loading = true;
-      let { status, apply_name, bk_code, start, end, page, size, good_name } =
-        this.parmValue;
-      if ((start !== "" && end === "") || (start == "" && end != "")) {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start == "" && this.parmValue.end != "")
+      ) {
         this.$message.warning("开始时间和结束时间不能为空");
         return;
       }
-      let model = {
-        status,
-        apply_name,
-        start,
-        end,
-        page,
-        size,
-        good_name,
-        bk_code,
-      };
-      const res = await asyncRequest.list(model);
+      this.parmValue.bk_code = this.select === "1" ? this.input : "";
+      this.parmValue.good_code = this.select === "2" ? this.input : "";
+      this.parmValue.good_name = this.select === "3" ? this.input : "";
+      this.parmValue.apply_name = this.select === "4" ? this.input : "";
+      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);
@@ -355,13 +335,6 @@ export default {
       }
       this.loading = false;
     },
-    async handleResignName(e) {
-      console.log(e);
-      this.parmValue.apply_name = e && e.id ? e.label : "";
-      this.apply_name = e && e.id ? [e.id] : [];
-      this.parmValue.page = 1;
-      await this.searchList();
-    },
   },
 };
 </script>

+ 1 - 0
src/views/sellOut/sellReturn/columns.js

@@ -60,6 +60,7 @@ export default [
         },
         {
           prop: "",
+          width:50,
           label: "操作",
           fixed: "right",
           _noset_: true,

+ 1 - 1
src/views/sellOut/sellReturn/index.vue

@@ -154,7 +154,7 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="routeGoto('noSendDetail', { id: scope.row.returnCode })"
+              @click="routeGoto('sellReturnDetail', { id: scope.row.returnCode })"
             ></i>
           </el-tooltip>
         </template>

+ 0 - 560
src/views/sellOut/sellReturnList/components/returnCheck.vue

@@ -1,560 +0,0 @@
-<template>
-  <el-form
-    ref="ruleForm"
-    :loading="loading"
-    :model="ruleForm"
-    status-icon
-    :rules="rulesThis"
-    label-width="100px"
-    style="width: 100%"
-    class="demo-ruleForm"
-  >
-    <el-row>
-      <el-row>
-        <!-- 收货商品数量 getGoods_numbers-->
-        <el-col :span="12">
-          <el-form-item label="收货数量" prop="getGoods_numbers">
-            <el-input
-              :disabled="disabled"
-              v-model="ruleForm.getGoods_numbers"
-              placeholder="请输入收货数量"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <!-- 正常销售商品数量 canSellGoods_numbers-->
-        <el-col :span="12">
-          <el-form-item label="可销售数量" prop="canSellGoods_numbers">
-            <el-input
-              :disabled="disabled"
-              v-model="ruleForm.getGoods_numbers"
-              placeholder="请输入可销售数量"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <!-- 其他备注 otherRemark-->
-        <el-col :span="12" offset="12">
-          <el-form-item label="其他备注" prop="otherRemark">
-            <el-input
-              type="textarea"
-              placeholder="请输入其他原因备注"
-              v-model="ruleForm.otherRemark"
-              :disabled="disabled"
-              maxlength="250"
-              show-word-limit
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row>
-        <!-- 异常情况记录  anomalousRecard-->
-        <el-col :span="12" offset="12">
-          <el-form-item label="异常情况记录" prop="anomalousRecard">
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <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 { isnumber } from "@/utils/validate.js";
-import asyncRequest from "@/apis/service/sellOut/sellAfterApply";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "handover",
-  props: ["id", "sitem", "showModelThis", "newTime"],
-  mixins: [resToken],
-  data() {
-    const validatenumbers = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("异常数量不能为空!"));
-      } else {
-        if (!isnumber(value)) {
-          callback(new Error("异常数量必须为数字"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      isShow: true,
-      loading: false,
-      disabled: true,
-      status: "", //存储详情接口返的状态
-      showModelThis: this.showModel,
-      resign_name: "", //离职人
-      hand_name: "", //交接人
-      ruleForm: {
-        order_type: "1", //售后类型 1销售2咨询,
-        outCode: "", //
-        stock_out_numbers: "", //出库单编号
-        anomalous_numbers: "", //异常数量
-        anomalous_reason: "", //异常原因
-        expect_wish: "", //期望意愿
-        anomalous_images: [],
-        anomalous_remark: "", //异常备注
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        anomalous_numbers: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validatenumbers,
-          },
-        ],
-        anomalous_reason: [
-          {
-            required: true,
-            message: "请选择异常原因",
-            trigger: "change",
-          },
-        ],
-        expect_wish: [
-          {
-            required: true,
-            message: "请选择期望意愿",
-            trigger: "change",
-          },
-        ],
-        anomalous_images: [
-          {
-            type: "array",
-            required: true,
-            message: "异常图片不能为空!",
-            trigger: "change",
-          },
-        ],
-        anomalous_remark: [
-          {
-            required: true,
-            message: "请输入异常原因备注",
-            trigger: "blur",
-          },
-        ],
-      },
-      reason_options: [],
-      reason_value: "", //异常原因
-      expect_options: [
-        {
-          value: "1",
-          label: "退货",
-        },
-        {
-          value: "2",
-          label: "换货",
-        },
-        {
-          value: "3",
-          label: "接受差异改变售价",
-        },
-      ],
-      expect_value: "", //期望意愿
-    };
-  },
-  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() {
-    this.getReason(); //获取异常原因
-    this.initForm();
-  },
-  watch: {
-    id: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    //   关闭弹窗,直接隐藏表单
-    // async closeAddEdit() {
-    //   this.$emit("closeModel", false); //抛出一个事件,关闭弹窗
-    //
-    // },
-    closeAdd() {
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.loading = true;
-      if (this.id === "add") {
-        this.status = "";
-        this.rulesThis = this.rules;
-        this.disabled = false;
-        await this.resetForm();
-      } else {
-        this.isShow = false;
-        this.rulesThis = this.rules;
-        await this.resetForm();
-        await this.initData();
-      }
-      this.loading = false;
-    },
-    async initData() {
-      if (this.sitem) {
-        let { returnCode } = this.sitem;
-        let model = {
-          returnCode,
-        };
-        const res = await asyncRequest.detail(model);
-        if (res && res.code === 0 && res.data) {
-          let { error_num, error_img, error_remark, except_code, error_code } =
-            res.data;
-          this.ruleForm = {
-            stock_out_numbers: "", //出库单编号
-            anomalous_numbers: error_num, //异常数量
-            anomalous_reason: error_code, //异常原因
-            expect_wish: except_code, //期望意愿
-            anomalous_images: [error_img],
-            anomalous_remark: error_remark, //异常备注
-          };
-        } 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();
-
-          let { bum } = this.sitem;
-          if (this.id === "add") {
-            let OutCode = "";
-            bum.map((ele) => {
-              OutCode = ele.outCode;
-            });
-            this.ruleForm = {
-              anomalous_numbers: "", //异常数量
-              anomalous_reason: "", //异常原因
-              expect_wish: "", //期望意愿
-              anomalous_images: [],
-              outCode: OutCode,
-            };
-          }
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          const { anomalous_numbers } = this.ruleForm;
-          if (this.sitem.send_num < anomalous_numbers) {
-            this.$message.warning("异常数量不能大于发货数量");
-            return false;
-          }
-          let model = JSON.parse(JSON.stringify(this.ruleForm));
-
-          // console.log("调接口");
-          let _model = {
-            order_type: "1",
-            outCode: model.outCode,
-            errorCode: model.anomalous_reason, //异常原因
-            num: model.anomalous_numbers,
-            remark: model.anomalous_remark,
-            except_code: model.expect_wish,
-            img: model.anomalous_images.toString(),
-          };
-
-          const res = await asyncRequest.add(_model);
-
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-
-           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 deleteById(message) {
-      const res = await asyncRequest.delete({ id: this.id });
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: message + "成功!",
-          message: "",
-        });
-
-        this.routeGoto("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: this.id,
-        remark: "",
-        status: status,
-      };
-      const res = await asyncRequest.status(model);
-      this.loading = false;
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: message + "成功!",
-          message: "",
-        });
-        this.initForm();
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-
-    open() {
-      this.show = true;
-    },
-    // 获取异常原因
-    async getReason() {
-      let model = {
-        type: "2",
-        page: 1,
-        size: 100,
-      };
-      const res = await asyncRequest.reasonList(model);
-      this.loading = false;
-      if (res && res.code === 0) {
-        this.reason_options = res.data.list;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    // 异常原因
-    handleAnomalousReason(e) {
-      console.log(e);
-      if (e) {
-        this.ruleForm.anomalous_reason = e;
-      } else {
-        this.ruleForm.anomalous_reason = "";
-      }
-      this.$refs.ruleForm.validateField("company_img");
-    },
-    //图片上传失败
-    UploadErrorEvent() {
-      this.$message.error("图片上传失败!");
-      this.$refs.ruleForm.validateField("anomalous_images");
-    },
-    //图片上传成功
-    UploadSuccessEvent(data) {
-      if (data && data.url && data.url !== "break") {
-        const { url } = data.url;
-        this.ruleForm.anomalous_images.push(url);
-        this.$message.success("图片上传成功!");
-        this.$refs.ruleForm.validateField("anomalous_images");
-      }
-    },
-    //判断图片规格
-    beforeAvatarUpload(file) {
-      let isJPG = false,
-        isLt2M = false;
-      if (file) {
-        if (
-          file.type === "image/jpg" ||
-          file.type === "image/png" ||
-          file.type === "image/bmp" ||
-          file.type === "image/jpeg"
-        ) {
-          isJPG = true;
-        }
-        isLt2M = file.size / 1024 / 1024 < 1;
-        if (!isJPG) {
-          this.$message.error("图片格式不正确!");
-        }
-        if (!isLt2M) {
-          this.$message.error("图片大小不能超过 1MB!");
-        }
-      }
-
-      return isJPG && isLt2M;
-    },
-    imgClose(index) {
-      this.ruleForm.anomalous_images.splice(index, 1);
-      this.$refs.ruleForm.validateField("anomalous_images");
-    },
-    getMargin() {
-      if (this.ruleForm.anomalous_images.length == 0) {
-        return "margin:0;";
-      } else if (this.ruleForm.anomalous_images.length < 3) {
-        return "margin:0px 0 0 10px";
-      } else {
-        return "margin:10px 0 0 10px";
-      }
-    },
-    getMargin_li() {
-      if (this.ruleForm.anomalous_images.length <= 3) {
-        return "margin:0 0 0 10px";
-      } else {
-        return "margin:10px 0 0 10px";
-      }
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-.el-form-item-error-img {
-  width: 100%;
-  ul {
-    width: 100%;
-    li {
-      float: left;
-      border: 1px solid rgb(220, 223, 230);
-      // border-left: 0;
-      box-sizing: border-box;
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
-      position: relative;
-      img {
-        display: inline-block;
-        width: 100%;
-        height: 100%;
-      }
-      .el-icon-close {
-        position: absolute;
-        top: 0;
-        right: 0;
-        z-index: 2;
-        width: 25px;
-        height: 25px;
-        text-align: center;
-        line-height: 25px;
-        font-size: 19px;
-        &:hover {
-          color: #63cbe7;
-        }
-      }
-    }
-  }
-}
-.images_li {
-  // width: 254px;
-  // height: 164px;
-  float: left;
-}
-.btnupload {
-  float: left;
-  border: 1px solid rgb(220, 223, 230);
-  // border-left: 0;
-  box-sizing: border-box;
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
-  text-align: center;
-}
-.Upload {
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
-  text-align: center;
-  position: absolute;
-  line-height: 0px;
-  top: 0;
-  left: 0;
-  z-index: 2;
-  line-height: 164px;
-}
-.avatar-uploader-icon {
-  font-size: 33px;
-  color: #8c939d;
-  width: 50px;
-  height: 50px;
-  line-height: 50px;
-  text-align: center;
-}
-</style>

+ 18 - 19
src/views/stock/allot/components/addForm.vue

@@ -75,23 +75,6 @@
       </el-form>
     </el-col>
     <el-col :span="24">
-      <el-row
-        v-if="
-          status == '' ||
-          (status === '0' && powers.some((item) => item == '005'))
-        "
-      >
-        <el-col :span="24" style="padding: 0 0 10px 0">
-          <span>调拨商品:</span>
-          <el-button
-            :size="'mini'"
-            type="primary"
-            class="fr"
-            @click="openGoodsModel"
-            >添加商品</el-button
-          ></el-col
-        >
-      </el-row>
       <el-form
         :model="tableForm"
         :rules="tableFormThis"
@@ -188,9 +171,25 @@
           <el-table-column
             fixed="right"
             label="操作"
-            v-if="status === '' || status == '0'"
+            v-if="status === '0' && powers.some((item) => item == '005')"
             width="80"
           >
+             <template slot="header" slot-scope="scope">
+               <span>操作</span>
+          <el-tooltip
+            style="margin: 3px 0 0 0"
+            effect="dark"
+            class="fr"
+            content="添加"
+            placement="top"
+          >
+            <i
+              class="el-icon-circle-plus-outline tb-icon"
+              style="color: #63cbe7; magin: 0 0 0 10px"
+              @click="openGoodsModel"
+            ></i>
+          </el-tooltip>
+        </template>
             <template slot-scope="scope">
               <el-tooltip
                 effect="dark"
@@ -227,7 +226,7 @@
         </el-table>
       </el-form>
     </el-col>
-    <el-col :span="24" style="text-align: right; padding: 10px 0 0 0">
+    <el-col :span="24" style="text-align: right; padding: 10px 0 10px 0">
       <el-button
         type="primary"
         :size="'mini'"

+ 1 - 1
src/views/stock/allot/components/columns.js

@@ -62,7 +62,7 @@ export default {
     },
     {
       prop: "good_name",
-      label: "商品名称",
+      label: "调拨商品名称",
       minWidth: "180",
       show: true,
       type:"text"

+ 4 - 11
src/views/stock/allot/components/goStock-audit.vue

@@ -3,17 +3,12 @@
     <el-row>
       <el-col :span="12"
         ><el-form-item label="物流公司" prop="post_name">
-          <!-- <el-input
-            placeholder="请输入物流公司"
-            :disabled="!(status == '2' && powers.some((item) => item == '021'))"
-            v-model="ruleForm.post_name"
-          /> -->
           <search-express
             :value="ruleForm.post_name"
             :placeholder="'请输入物流公司'"
             :names="''"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
-            :is-detail="false"
+            :is-detail="!(status == '2' && powers.some((item) => item == '021'))"
             @searchChange="handleCompany"
           />
         </el-form-item>
@@ -148,7 +143,7 @@ export default {
           this.ruleForm = {
             post_code,
             post_fee: post_fee + "",
-            post_name,
+            post_name: post_name ? [post_name] : [],
           };
         }
       });
@@ -180,10 +175,8 @@ export default {
       });
     },
     handleCompany(e) {
-      if (e && e.code) {
-        this.ruleForm.post_name = [e.shortName];
-        this.ruleForm.page = 1;
-      }
+      console.log(e);
+      this.ruleForm.post_name = e && e.code ? [e.label] : [];
       this.$refs.ruleForm.validateField("post_name");
     },
   },

+ 36 - 21
src/views/stock/allot/detail.vue

@@ -4,28 +4,14 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      {{ status }}
-      <div class="tr" style="padding: 10px 0 30px 0">
-        <el-button
-          type="primary"
-          plain
-          :size="'mini'"
-          @click="statusConfirm('1', '发起审核流程')"
-          v-if="status === '0' && powers.some((item) => item == '012')"
-          >发起审核流程
-        </el-button>
-
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          :size="'mini'"
-          v-if="status === '1' && powers.some((item) => item == '014')"
-          >取消审核流程</el-button
-        >
+      <!-- <p>{{ status }}--{{ powers }}</p> -->
+      <div class="detail-page-title">
+        <span>调拨编号:</span><span v-if="sitem">{{ sitem.allot_code }}</span>
         <el-button
           @click="statusConfirm('-1', '作废该条信息')"
           type="danger"
           plain
+          class="fr"
           :size="'mini'"
           v-if="
             status !== '' &&
@@ -35,6 +21,7 @@
           >作废该条信息</el-button
         >
       </div>
+
       <status-bar
         v-if="newTime !== ''"
         :newTime="newTime"
@@ -42,7 +29,7 @@
         :status="status"
       />
       <el-collapse v-model="activeNames" @change="handleChange">
-        <el-collapse-item title="调拨详情" name="0">
+        <el-collapse-item title="调拨详情" name="-1">
           <add-form
             :newTime="newTime"
             v-if="newTime !== ''"
@@ -51,7 +38,34 @@
             @refresh="initData()"
           />
         </el-collapse-item>
+        <el-collapse-item
+          title="发起审核流程"
+          name="0"
+          v-if="
+            (status === '0' && powers.some((item) => item == '012')) ||
+            (status === '1' && powers.some((item) => item == '014'))
+          "
+        >
+          <div class="exam-content">
+            <el-button
+              type="primary"
+              class="fr"
+              :size="'mini'"
+              @click="statusConfirm('1', '发起审核流程')"
+              v-if="status === '0' && powers.some((item) => item == '012')"
+              >发起审核流程
+            </el-button>
 
+            <el-button
+              @click="statusConfirm('0', '取消审核流程')"
+              plain
+              class="fr"
+              :size="'mini'"
+              v-if="status === '1' && powers.some((item) => item == '014')"
+              >取消审核流程</el-button
+            >
+          </div>
+        </el-collapse-item>
         <el-collapse-item
           title="入库方审核"
           name="1"
@@ -72,6 +86,7 @@
           v-if="status !== '' && status !== '0' && status !== '1'"
         >
           <go-stock-audit
+          
             :newTime="newTime"
             :sitem="sitem"
             v-if="newTime !== ''"
@@ -144,14 +159,14 @@ export default {
   data() {
     return {
       code: "",
-      activeNames: ["0", "1", "2", "3", "4", "5", "10"],
+      activeNames: ["-1", "0", "1", "2", "3", "4", "5", "10"],
       sitem: null,
       status: "",
       newTime: "",
       loading: false,
       queryId: "",
       statusOptions: [
-        { value: "0", label: "发起" },
+        { value: "0", label: "发起审核流程" },
         { value: "1", label: "入库方审核" },
         { value: "2", label: "出库方发货" },
         { value: "3", label: "入库方验货" },

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

@@ -9,7 +9,7 @@
       class="demo-ruleForm"
     >
       <el-row>
-        <el-col :span="24">
+        <el-col :span="id === 'add'?24:8">
           <el-form-item label="盘点公司" prop="wsm_supplier">
             <search-supplier
               :value="ruleForm.wsm_supplier"
@@ -26,7 +26,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="24">
+        <el-col :span="id === 'add'?24:8">
           <el-form-item label="盘点仓库" prop="wsm_code">
             <search-stock
               :value="ruleForm.wsm_code"
@@ -45,7 +45,7 @@
             />
           </el-form-item>
         </el-col>
-        <el-col :span="24">
+        <el-col :span="id === 'add'?24:8">
           <el-form-item label="盘点类型" prop="type">
             <el-select
               v-model="ruleForm.type"

+ 68 - 64
src/views/stock/check/components/resultUplod.vue

@@ -1,65 +1,69 @@
 <template>
   <div>
-    <ex-table
+    <el-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();
-      "
+      border
+      stripe
+      :size="'mini'"
+      style="width: 100%"
     >
-      <template
-        #table-header="{}"
-        v-if="
-          tableData.length === 0 &&
-          status == '1' &&
-          powers.some((item) => item == '017')
-        "
-      >
-        <div style="width: 100%">
-          <el-button
-            @click="importshowModel = true"
-            :size="'mini'"
-            type="success"
-            style="float: right"
+      <el-table-column
+        prop="good_type_code"
+        label="商品属性编号"
+        min-width="130"
+      />
+      <el-table-column prop="good_name" label="商品名称" min-width="200" />
+      <el-table-column prop="is_profit" label="盘盈/盘亏" min-width="100">
+        <template slot-scope="scope">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.is_profit == '0' ? 'success' : 'warning'"
+            v-text="
+              (typeOptions.find((item) => item.id == scope.row.is_profit) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="origin_num" label="盘点前数量" min-width="110" />
+      <el-table-column prop="check_num" label="盘点后数量" min-width="110" />
+      <el-table-column prop="diff_num" label="差额数量" min-width="110" />
+      <el-table-column prop="addtime" width="145" label="结果上传时间">
+        <template slot="header" slot-scope="scope">
+          <span>结果上传时间</span>
+          <el-tooltip
+            style="margin: 3px 0 0 0"
+            effect="dark"
+            class="fr"
+            v-if="status == '1' && powers.some((item) => item == '017')"
+            content="添加"
+            placement="top"
           >
-            添加
-          </el-button>
-        </div>
-      </template>
-      <template #is_profit="{ scope }">
-        <el-tag
-          :size="tablebtnSize"
-          :type="scope.row.is_profit == '0' ? 'success' : 'warning'"
-          v-text="
-            (typeOptions.find((item) => item.id == scope.row.is_profit) || {})
-              .label || '--'
-          "
-        ></el-tag>
-      </template>
-      <template #type="{ scope }">
-        <el-tag
-          :size="tablebtnSize"
-          :type="scope.row.type == '1' ? 'success' : ''"
-          v-text="
-            (typeOptions.find((item) => item.id == scope.row.type) || {})
-              .label || '--'
-          "
-        ></el-tag>
-      </template>
-    </ex-table>
+            <i
+              class="el-icon-circle-plus-outline tb-icon"
+              style="color: #63cbe7; magin: 0 0 0 10px"
+              @click="importshowModel = true"
+            ></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div
+      v-if="tableData && tableData.length > 0"
+      class="Pagination"
+      style="text-align: right; margin-top: 10px"
+    >
+      <el-pagination
+        :current-page="parmValue.page"
+        :page-size="parmValue.size"
+        :size="'mini'"
+        layout="total,  prev, pager, next, jumper"
+        :total="pageInfo.total"
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange"
+      />
+    </div>
     <result-uplod-model
       :show-model="importshowModel"
       :id="id"
@@ -107,14 +111,6 @@ export default {
     return {
       importshowModel: false,
       status: "",
-      // 节点状态
-      statusOptions: [
-        { id: "0", label: "待发起流程" },
-        { id: "1", label: "待上传盘点结果" },
-        { id: "2", label: "待审核盘点结果" },
-        { id: "3", label: "待系统更新" },
-        { id: "4", label: "盘点已结束" },
-      ],
       // 盘点类型
       typeOptions: [
         { id: "0", label: "盘盈" },
@@ -188,6 +184,14 @@ export default {
           label: "结果上传时间",
           width: "145px",
         },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          width: "50px",
+          _slot_: "operation",
+        },
       ],
     };
   },

+ 49 - 46
src/views/stock/check/detail.vue

@@ -4,67 +4,71 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      {{ status }}
-      <div class="tr" style="padding: 10px 0 50px 0; height: 50px">
-        <span class="fl" style="padding: 3px 0 0 3px">盘点详情</span>
-        <el-button
-          type="primary"
-          plain
-          :size="'mini'"
-          @click="statusConfirm('1', '发起审核流程')"
-          v-if="status === '0' && powers.some((item) => item == '012')"
-          >发起审核流程
-        </el-button>
+      {{ status }}--{{ powers }}
+      <div class="detail-page-title">
+        <span>盘点编号:</span><span v-if="sitem">{{ sitem.check_code }}</span>
 
-        <el-button
-          type="primary"
-          :size="'mini'"
-          @click="statusConfirm('-2', '导出盘点商品')"
-          v-if="status === '1' && powers.some((item) => item == '019')"
-          >导出盘点商品
-        </el-button>
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          :size="'mini'"
-          v-if="status === '1' && powers.some((item) => item == '014')"
-          >取消审核流程</el-button
-        >
         <el-button
           @click="statusConfirm('-1', '作废该条信息')"
           type="danger"
           plain
           :size="'mini'"
+          class="fr"
           v-if="
             (status === '0' || status === '1') &&
             powers.some((item) => item == '015')
           "
           >作废该条信息</el-button
         >
+        <el-button
+          type="primary"
+          :size="'mini'"
+          class="fr"
+          @click="statusConfirm('-2', '导出盘点商品')"
+          v-if="status === '1' && powers.some((item) => item == '019')"
+          >导出盘点商品
+        </el-button>
       </div>
-      <!-- {{ newTime !== "" }} -->
       <status-bar
         v-if="newTime !== ''"
         :newTime="newTime"
         :options="statusOptions"
         :status="status"
       />
-      <add-edit
-        :newTime="newTime"
-        v-if="newTime !== ''"
-        :sitem="sitem"
-        :id="queryId"
-        @refresh="initData()"
-      />
-
-      <el-collapse
-        v-if="
-          status == '3' ||
-          (status == '1' && powers.some((item) => item == '017')) ||
-          (status == '2' && powers.some((item) => item == '018'))
-        "
-        v-model="activeNames"
-      >
+      <el-collapse v-model="activeNames">
+        <el-collapse-item title="盘点详情" name="-1">
+          <add-edit
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+        </el-collapse-item>
+        <el-collapse-item
+          v-if="
+            (status === '0' && powers.some((item) => item == '012')) ||
+            (status === '1' && powers.some((item) => item == '014'))
+          "
+          title="发起审核流程"
+          name="1"
+        >
+          <el-button
+            type="primary"
+            plain
+            :size="'mini'"
+            @click="statusConfirm('1', '发起审核流程')"
+            v-if="status === '0' && powers.some((item) => item == '012')"
+            >发起审核流程
+          </el-button>
+          <el-button
+            @click="statusConfirm('0', '取消审核流程')"
+            plain
+            :size="'mini'"
+            v-if="status === '1' && powers.some((item) => item == '014')"
+            >取消审核流程</el-button
+          >
+        </el-collapse-item>
         <el-collapse-item
           v-if="
             status == '3' ||
@@ -143,15 +147,14 @@ export default {
     return {
       code: "",
       statusOptions: [
-        { value: "0", label: "发起" },
+        { value: "0", label: "发起审核流程" },
         { value: "1", label: "上传盘点结果" },
-        { value: "2", label: "审核判断结果" },
+        { value: "2", label: "盘点审核" },
         { value: "3", label: "系统更新" },
         { value: "4", label: "盘点完成 " },
-        // { value: "5", label: "已发货" },
       ],
 
-      activeNames: ["0", "1", "2", "3", "4", "10"],
+      activeNames: ["-1", "0", "1", "2", "3", "4", "10"],
       sitem: null,
       status: "",
       newTime: "",

+ 19 - 17
src/views/stock/stockCount/components/spaceCount/columns.js

@@ -2,37 +2,39 @@ export default [
      {
           prop: "supplier_code",
           label: "供应商编码",
-          width: "150",
-        },
-        {
-          prop: "supplier_name",
-          label: "供应商名称",
-          "min-width": "180",
+          width: "140",
         },
         {
           prop: "wsm_code",
           label: "仓库编码",
-          width: "180",
+          width: "170",
         },
         {
-          prop: "wsm_name",
+          prop: "supplier_wsm_name",
           label: "仓库名称",
-        },
+          "min-width": "220",
+        },
+        
+        // {
+        //   prop: "wsm_name",
+        //   label: "仓库名称",
+        // },
+        // {
+        //   prop: "good_code",
+        //   label: "商品编码",
+        //   width: "150",
+        // },
         {
-          prop: "good_code",
-          label: "商品编码",
-          width: "150",
+          prop: "type_code",
+          label: "商品属性编码",
+          width: "130",
         },
         {
           prop: "good_name",
           label: "商品名称",
           "min-width": "150",
         },
-        {
-          prop: "type_code",
-          label: "商品属性编码",
-          width: "130",
-        },
+       
         {
           prop: "in_total",
           label: "入库量",

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

@@ -264,6 +264,13 @@ export default {
       const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
+        this.tableData.forEach((e) => {
+          e.supplier_wsm_name =
+            e.supplier_name === e.wsm_name
+              ? e.supplier_name
+              : e.supplier_name + "/" + e.wsm_name;
+        });
+
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 19 - 13
src/views/stock/survey/index.vue

@@ -9,7 +9,7 @@
             <search-supplier
               :size="searchSize"
               :placeholder="'供应商公司'"
-              :value="supplier_code"
+              :value="parmValue.supplier_code"
               @searchChange="selectSupplier"
             />
           </el-col>
@@ -17,7 +17,7 @@
             <search-stock
               :isDetail="true"
               :size="searchSize"
-              :value="stock_code"
+              :value="parmValue.stock_code"
               :disabled="supplier_code === ''"
               :placeholder="'出库仓库'"
               :isRelation="true"
@@ -205,7 +205,7 @@ export default {
         {
           prop: "stock",
           label: "变动数量",
-          'min-width': "90px",
+          "min-width": "90px",
         },
         {
           prop: "code",
@@ -255,29 +255,35 @@ export default {
   },
 
   methods: {
-    // 选择供应商仓库
-    selectStock(e) {
+    // 选择供应商
+    selectSupplier(e) {
       if (e && e.id) {
-        this.parmValue.stock_code = [e.code];
-        this.stock_code = e.code;
+        this.parmValue.supplier_code = [e.code];
+        this.supplier_code = e.code;
       } else {
         this.parmValue.stock_code = [];
+        this.parmValue.supplier_code = [];
         this.stock_code = "";
+        this.supplier_code = "";
       }
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
       this.stockList();
+      this.searchList();
     },
-    // 选择供应商
-    selectSupplier(e) {
+    // 选择供应商仓库
+    selectStock(e) {
       if (e && e.id) {
-        this.parmValue.supplier_code = [e.code];
-        this.supplier_code = e.code;
+        this.parmValue.stock_code = [e.code];
+        this.stock_code = e.code;
       } else {
         this.parmValue.stock_code = [];
-        this.parmValue.supplier_code = [];
         this.stock_code = "";
-        this.supplier_code = "";
       }
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
       this.stockList();
+      this.searchList();
     },
 
     //获取表格上方的卡片数据