xiaodai2022 пре 1 година
родитељ
комит
dd64664730

+ 2 - 0
src/components/globalComponents/open-msg/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 99 - 0
src/components/globalComponents/open-msg/main.vue

@@ -0,0 +1,99 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="18vh"
+    append-to-body
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    @close="showModelThis = false"
+    @closed="closed"
+  >
+    <span v-html="msg"></span>
+    <span slot="footer" class="dialog-footer">
+      <b>{{ nums }}s&nbsp;后自动关闭</b>
+      <el-button class="fr" type="primary" @click="showModelThis = false" size="mini"
+        >确 定</el-button
+      >
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "OpenMsg",
+  props: ["showModel", "title", "msg", "num"],
+
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  data() {
+    return {
+      nums: this.num,
+      timer: null,
+      // title: "",
+      showModelThis: this.showModel,
+    };
+  },
+  beforeDestroy() {
+    if (this.timer) {
+      clearInterval(this.timer);
+    }
+  },
+  methods: {
+    closed() {
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+    },
+    initForm() {
+      this.timer = null;
+      this.nums = Number(this.num);
+      this.timer = setInterval(() => {
+        if (this.nums !== 0) {
+          this.nums--;
+        } else {
+          clearInterval(this.timer);
+          this.$emit("cancel");
+        }
+      }, 1000);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.select-area {
+  .loading-input {
+    background-color: transparent;
+    border: 1px solid #dfe4ed;
+    color: #c0c4cc;
+    width: 100%;
+    height: 36px;
+    line-height: 36px;
+    padding: 0 30px 0 12px;
+    border-radius: 4px;
+    &.disabled {
+      background-color: #f5f7fa;
+    }
+    span {
+      font-size: 16px;
+      height: 36px;
+      line-height: 36px;
+      padding: 0 0 0 3px;
+      vertical-align: top;
+    }
+  }
+}
+</style>

+ 0 - 0
src/components/globalComponents/open-msg/倒计时弹窗


+ 26 - 10
src/views/sellOut/sellAfterApply/detail.vue

@@ -266,6 +266,14 @@
           <img src="~@/assets/afterSale.png" />
         </el-tab-pane>
       </el-tabs>
+      <open-msg
+        :num="10"
+        :title="'结算系统中已参与了业务,请解除后审批:'"
+        :show-model="showModel1"
+        :msg="msg"
+        @refresh="showModel1 = false"
+        @cancel="showModel1 = false"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -321,6 +329,8 @@ export default {
   },
   data() {
     return {
+      showModel1: "",
+      msg: "",
       xs_order_type_options,
       xs_order_source_options,
       activeTabs: "1",
@@ -420,17 +430,20 @@ export default {
         params.status = "5";
       }
 
-      let res = await asyncRequest.status(params);
-      if (res && res.code === 0) {
+      const { code, message } = await asyncRequest.status(params);
+      if (code === 0) {
         this.$notify.success({
-          title: "修改成功!",
+          title: "提交成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
     async handleSupplierExam(data) {
@@ -445,18 +458,21 @@ export default {
         params.status = "5";
       }
 
-      let res = await asyncRequest.status(params);
+      const { code, message } = await asyncRequest.status(params);
 
-      if (res && res.code === 0) {
+      if (code === 0) {
         this.$notify.success({
-          title: "修改成功!",
+          title: "提交成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
     getNewTime() {

+ 29 - 28
src/views/sellOut/sellOutOrder/components/addEditFormA.vue

@@ -12,7 +12,7 @@
   >
     <el-row>
       <el-col :span="24">
-        <el-form-item  label="期望结果" prop="is_receive">
+        <el-form-item label="期望结果" prop="is_receive">
           <el-select
             disabled
             style="width: 100%"
@@ -69,7 +69,8 @@
                 <i
                   class="el-icon-close"
                   v-if="
-                    id === 'add' || (status + '' === '0' && powers.some((i) => i == '005'))
+                    id === 'add' ||
+                    (status + '' === '0' && powers.some((i) => i == '005'))
                   "
                   @click="imgClose(index)"
                 ></i>
@@ -145,23 +146,24 @@
           />
         </el-form-item>
 
-        <div style="width:100%;display:flex;justify-content:flex-end">
+        <div style="width: 100%; display: flex; justify-content: flex-end">
           <el-button
-             type="primary"
-             @click="submitForm"
-             v-if="id === 'add' || (status + '' === '0' && powers.some((i) => i == '005'))"
-           >保 存</el-button
+            type="primary"
+            @click="submitForm"
+            v-if="id === 'add' || (status + '' === '0' && powers.some((i) => i == '005'))"
+            >保 存</el-button
           >
         </div>
       </el-col>
-      <!-- <el-col :span="20">
-
-      </el-col>
-
-      <el-col :span="4" style="text-align: right">
-
-      </el-col> -->
     </el-row>
+    <open-msg
+      :num="10"
+      :title="'结算系统中已参与了业务,请解除后申请:'"
+      :show-model="showModel1"
+      :msg="msg"
+      @refresh="showModel1 = false"
+      @cancel="showModel1 = false"
+    />
   </el-form>
 </template>
 <script>
@@ -185,6 +187,8 @@ export default {
       }
     };
     return {
+      showModel1: false,
+      msg: "",
       isShow: true,
       loading: false,
       disabled: true,
@@ -266,7 +270,7 @@ export default {
         {
           value: "1",
           label: "退货",
-        }
+        },
       ],
       expect_options1: [
         {
@@ -278,7 +282,7 @@ export default {
         {
           value: "1",
           label: "退货",
-        }
+        },
       ],
       expect_value: "", //期望意愿
       code: "",
@@ -318,7 +322,7 @@ export default {
       this.rulesThis = this.rules;
       this.disabled = false;
       await this.resetForm();
-      await this.is_receive_change()
+      await this.is_receive_change();
       this.loading = false;
     },
     async initData() {
@@ -327,15 +331,9 @@ export default {
         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,
-          } = console.log(res.data);
+        const { code, data, message } = await asyncRequest.detail(model);
+        if (code === 0) {
+          let { error_num, error_img, error_remark, except_code, error_code } = data;
           this.ruleForm = {
             stock_out_numbers: "", //发货单编号
             num: error_num, //异常数量
@@ -344,10 +342,10 @@ export default {
             img: [error_img],
             remark: error_remark, //异常备注
           };
-        } else if (res && res.code >= 100 && res.code <= 104) {
+        } else if (code >= 100 && code <= 104) {
           await this.logout();
         } else {
-          this.$message.warning(res.message);
+          this.$message.warning(message);
         }
       }
     },
@@ -415,6 +413,9 @@ export default {
             this.$emit("refresh", false);
           } else if (code >= 100 && code <= 104) {
             await this.logout();
+          } else if (code === 1005) {
+            this.msg = message;
+            this.showModel1 = true;
           } else {
             this.$message.warning(message);
           }

+ 151 - 143
src/views/sellOut/sellReturn/components/addModel.vue

@@ -63,7 +63,8 @@
                 maxlength="250"
                 show-word-limit
                 placeholder="请填写备注"
-              /> </el-form-item></el-col>
+              /> </el-form-item
+          ></el-col>
           <el-col v-show="ruleForm.return_type + '' === '2'" :span="24">
             <el-form-item label="收货信息" :size="'mini'" required>
               <el-table
@@ -82,7 +83,8 @@
                     {{ scope.row.contactor }}-{{ scope.row.mobile }}-{{
                       scope.row.addr_info
                     }}{{ scope.row.addr }}
-                  </template></el-table-column>
+                  </template></el-table-column
+                >
                 <!-- <el-table-column label="发货状态" prop="status" width="100px">
                   <template slot-scope="scope">
                     <el-tag
@@ -124,22 +126,19 @@
                     <el-tooltip
                       v-if="
                         !scope.row.edit &&
-                          (scope.row.status + '' === '0' || scope.row.status + '' === '1')
+                        (scope.row.status + '' === '0' || scope.row.status + '' === '1')
                       "
                       effect="dark"
                       content="编辑"
                       placement="top"
                     >
-                      <i
-                        class="el-icon-edit tb-icon"
-                        @click="editRow(scope.$index, 1)"
-                      />
+                      <i class="el-icon-edit tb-icon" @click="editRow(scope.$index, 1)" />
                     </el-tooltip>
 
                     <el-tooltip
                       v-if="
                         scope.row.edit &&
-                          (scope.row.status + '' === '0' || scope.row.status + '' === '1')
+                        (scope.row.status + '' === '0' || scope.row.status + '' === '1')
                       "
                       effect="dark"
                       content="保存"
@@ -186,157 +185,162 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8" style="text-align: right">
-                <el-button
-                  type="primary"
-                  :size="'mini'"
-                  @click="submitForm"
-                >保 存
+                <el-button type="primary" :size="'mini'" @click="submitForm"
+                  >保 存
                 </el-button>
-                <el-button
-                  v-if="!isDetail"
-                  :size="'mini'"
-                  @click="showModelThis = false"
-                >关 闭</el-button>
+                <el-button v-if="!isDetail" :size="'mini'" @click="showModelThis = false"
+                  >关 闭</el-button
+                >
               </el-col>
             </el-row>
           </el-col>
         </el-row>
       </el-form>
     </el-card>
+    <open-msg
+      :num="10"
+      :title="'结算系统中已参与了业务,请解除后申请:'"
+      :show-model="showModel1"
+      :msg="msg"
+      @refresh="showModel1 = false"
+      @cancel="showModel1 = false"
+    />
   </el-dialog>
 </template>
 <script>
-import asyncRequest from '@/apis/service/sellOut/sellReturn'
-import resToken from '@/mixins/resToken'
-import { isnumber } from '@/utils/validate'
+import asyncRequest from "@/apis/service/sellOut/sellReturn";
+import resToken from "@/mixins/resToken";
+import { isnumber } from "@/utils/validate";
 export default {
-  name: 'SellReturn',
+  name: "SellReturn",
   mixins: [resToken],
-  props: ['showModel', 'id', 'isDetail', 'sitem'],
+  props: ["showModel", "id", "isDetail", "sitem"],
   data() {
     return {
+      showModel1: false,
+      msg: "",
       loading: false,
       showModelThis: this.showModel,
       statusOptions: [
-        { id: '0', label: '待公司采购' },
-        { id: '1', label: '待库管发货' },
-        { id: '2', label: '已发货待收货' },
-        { id: '3', label: '已收货' },
-        { id: '4', label: '已全部退货' }
+        { id: "0", label: "待公司采购" },
+        { id: "1", label: "待库管发货" },
+        { id: "2", label: "已发货待收货" },
+        { id: "3", label: "已收货" },
+        { id: "4", label: "已全部退货" },
       ],
       ruleForm: {
-        good_num: '',
-        thnum: '',
-        return_type: '1',
-        orderCode: '', // 发货单编号
-        remark: '', // 退货备注
-        errorCode: '', // 退货原因
-        returnT: ''
+        good_num: "",
+        thnum: "",
+        return_type: "1",
+        orderCode: "", // 发货单编号
+        remark: "", // 退货备注
+        errorCode: "", // 退货原因
+        returnT: "",
       },
       rulesThis: this.rules,
       options: [
         {
-          value: '1',
-          label: '无地址'
+          value: "1",
+          label: "无地址",
         },
         {
-          value: '2',
-          label: '有地址'
-        }
+          value: "2",
+          label: "有地址",
+        },
       ],
       rules: {
         errorCode: [
           {
             required: true,
-            message: '请选择退货原因',
-            trigger: 'change'
-          }
+            message: "请选择退货原因",
+            trigger: "change",
+          },
         ],
         good_num: [
           {
             required: true,
-            message: '请输入购买数量',
-            trigger: 'blur'
-          }
+            message: "请输入购买数量",
+            trigger: "blur",
+          },
         ],
         thnum: [
           {
             required: true,
-            message: '请输入退货数量',
-            trigger: 'blur'
-          }
+            message: "请输入退货数量",
+            trigger: "blur",
+          },
         ],
         remark: [
           {
             required: true,
-            message: '请输入退货备注',
-            trigger: 'blur'
-          }
+            message: "请输入退货备注",
+            trigger: "blur",
+          },
         ],
         return_type: [
           {
             required: true,
-            message: '请选择退货类型',
-            trigger: 'change'
-          }
-        ]
+            message: "请选择退货类型",
+            trigger: "change",
+          },
+        ],
       },
       get_product_go: [],
       noAddrT: 0,
       hasAddrT: 0,
-      type_change: true
-    }
+      type_change: true,
+    };
   },
   watch: {
-    showModel: function(val) {
-      this.showModelThis = val
+    showModel: function (val) {
+      this.showModelThis = val;
       if (val) {
-        this.initForm()
+        this.initForm();
       }
     },
     showModelThis(val) {
       if (!val) {
-        this.$emit('cancel')
+        this.$emit("cancel");
       }
-    }
+    },
   },
 
   methods: {
     errorCode_change(e) {
-      this.ruleForm.errorCode = e && e.code ? e.code : ''
-      this.$refs.ruleForm.validateField('errorCode')
+      this.ruleForm.errorCode = e && e.code ? e.code : "";
+      this.$refs.ruleForm.validateField("errorCode");
     },
     async initForm() {
-      this.loading = true
-      this.rulesThis = this.rules
-      await this.resetForm()
-      this.loading = false
+      this.loading = true;
+      this.rulesThis = this.rules;
+      await this.resetForm();
+      this.loading = false;
     },
     async number_change(e, key, index) {
       if (index === undefined) {
-        this.ruleForm[key] = e + '' || '0'
-        this.$refs.ruleForm.validateField(key)
+        this.ruleForm[key] = e + "" || "0";
+        this.$refs.ruleForm.validateField(key);
       } else {
-        this.get_product_go[index][key] = e + '' || '0'
+        this.get_product_go[index][key] = e + "" || "0";
         // this.get_product_go[index].newTime = new Date().valueOf() + "";
 
-        this.$set(this.get_product_go, index, this.get_product_go[index])
-        this.ruleForm.thnum = 0
+        this.$set(this.get_product_go, index, this.get_product_go[index]);
+        this.ruleForm.thnum = 0;
         this.get_product_go.forEach((s) => {
-          this.ruleForm.thnum += parseInt(s.return_num + '')
-        })
+          this.ruleForm.thnum += parseInt(s.return_num + "");
+        });
       }
     },
     return_type_change() {
-      const { return_type } = this.ruleForm
-      this.ruleForm.returnT = return_type === '1' ? this.noAddrT : this.hasAddrT
+      const { return_type } = this.ruleForm;
+      this.ruleForm.returnT = return_type === "1" ? this.noAddrT : this.hasAddrT;
     },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields()
-          this.$refs.ruleForm.clearValidate()
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
           const {
             good_num,
             orderCode,
@@ -345,8 +349,8 @@ export default {
             errorCode, // 退货原因
             thnum,
             returnT,
-            returnAddr
-          } = this.sitem
+            returnAddr,
+          } = this.sitem;
           this.ruleForm = {
             good_num,
             thnum,
@@ -355,108 +359,112 @@ export default {
             remark, // 退货备注
             errorCode, // 退货原因
             returnT,
-            returnAddr: []
-          }
+            returnAddr: [],
+          };
           returnAddr.map((s) => {
-            s.return_num = s.send_num
-            s.edit = false
-            s.newTime = new Date().valueOf() + ''
-            return s
-          })
+            s.return_num = s.send_num;
+            s.edit = false;
+            s.newTime = new Date().valueOf() + "";
+            return s;
+          });
 
-          this.get_product_go = returnAddr
+          this.get_product_go = returnAddr;
         }
-      })
+      });
     },
 
     async submitForm() {
-      await this.$refs.ruleForm.validate(async(valid) => {
+      await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          if (this.loading) return
-          const index = this.get_product_go.findIndex((v) => v.edit === true)
+          if (this.loading) return;
+          const index = this.get_product_go.findIndex((v) => v.edit === true);
           if (index !== -1) {
-            this.$message.warning('请保存完当前行!')
-            return
+            this.$message.warning("请保存完当前行!");
+            return;
           }
-          this.loading = true
-          const model = JSON.parse(JSON.stringify(this.ruleForm))
-          const { good_num, thnum, return_type } = model
-          if (thnum + '' === '0') {
-            this.$message.warning('退货数量不能为0!')
-            this.loading = false
-            return
+          this.loading = true;
+          const model = JSON.parse(JSON.stringify(this.ruleForm));
+          const { good_num, thnum, return_type } = model;
+          if (thnum + "" === "0") {
+            this.$message.warning("退货数量不能为0!");
+            this.loading = false;
+            return;
           }
-          if (parseInt(good_num + '') < parseInt(thnum + '')) {
-            this.$message.warning('退货数量不能大于可退数量!')
-            this.loading = false
-            return
+          if (parseInt(good_num + "") < parseInt(thnum + "")) {
+            this.$message.warning("退货数量不能大于可退数量!");
+            this.loading = false;
+            return;
           }
-          if (return_type + '' === '2') {
+          if (return_type + "" === "2") {
             // model.returnAddr[0].return_num = thnum;
             this.get_product_go.forEach((s) => {
-              const { addrid, return_num } = s
+              const { addrid, return_num } = s;
               const item = {
                 id: addrid,
-                return_num
-              }
-              model.returnAddr.push(item)
-            })
+                return_num,
+              };
+              model.returnAddr.push(item);
+            });
           }
 
-          const { code, data, message } = await asyncRequest.add(model)
-          this.loading = false
+          const { code, data, message } = await asyncRequest.add(model);
+          this.loading = false;
           if (code === 0) {
             this.$notify.success({
-              title: '添加成功',
-              message: ''
-            })
-            this.showModelThis = false
+              title: "添加成功",
+              message: "",
+            });
+            this.showModelThis = false;
             // 刷新
-            this.$emit('refresh', false)
+            this.$emit("refresh", false);
           } else if (code >= 100 && code <= 104) {
-            await this.logout()
+            await this.logout();
+          } else if (code === 1005) {
+            this.msg = message;
+            this.showModel1 = true;
           } else {
-            this.$message.warning(message)
+            this.$message.warning(message);
           }
         } else {
-          return false
+          return false;
         }
-      })
+      });
     },
+
     // 保存某一行
     checkRow(rowIndex) {
-      const { wsend_num, return_num } = this.get_product_go[rowIndex]
+      const { wsend_num, return_num } = this.get_product_go[rowIndex];
       if (!isnumber(return_num)) {
-        this.$message.warning('退货数量不规范!')
-        return
+        this.$message.warning("退货数量不规范!");
+        return;
       }
       if (parseInt(wsend_num) < parseInt(return_num)) {
-        this.$message.warning('退货数量不能大于未发货总数量!')
-        return
+        this.$message.warning("退货数量不能大于未发货总数量!");
+        return;
       }
-      this.get_product_go[rowIndex].edit = false
-      this.get_product_go[rowIndex].newTime = new Date().valueOf() + ''
-      this.$set(this.get_product_go, rowIndex, this.get_product_go[rowIndex])
+      this.get_product_go[rowIndex].edit = false;
+      this.get_product_go[rowIndex].newTime = new Date().valueOf() + "";
+      this.$set(this.get_product_go, rowIndex, this.get_product_go[rowIndex]);
     },
     // 编辑某一行
     editRow(rowIndex) {
-      const list = JSON.parse(JSON.stringify(this.get_product_go))
-      const index = list.findIndex((v) => v.edit === true)
+      const list = JSON.parse(JSON.stringify(this.get_product_go));
+      const index = list.findIndex((v) => v.edit === true);
       if (index !== -1) {
-        this.$message.warning('请完成其他行的编辑!')
-        return
+        this.$message.warning("请完成其他行的编辑!");
+        return;
       }
 
       this.$set(this.get_product_go, rowIndex, {
         ...this.get_product_go[rowIndex],
-        edit: true
-      })
+        edit: true,
+      });
       // this.get_product_go[rowIndex].edit = true
-      this.get_product_go[rowIndex].newTime = new Date().valueOf() + ''
-      this.$set(this.get_product_go, rowIndex, this.get_product_go[rowIndex])
-    }
-  }
-}
+      this.get_product_go[rowIndex].newTime = new Date().valueOf() + "";
+      this.$set(this.get_product_go, rowIndex, this.get_product_go[rowIndex]);
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped></style>

+ 207 - 96
src/views/sellOut/sellReturn/detail.vue

@@ -22,7 +22,13 @@
                 </template>
 
                 <template slot="is_addr">
-                  <el-tag size="mini">{{sitem.is_addr === '0' ? '无地址退货' : sitem.is_addr === '1' ? '有地址退货' : '--'}}</el-tag>
+                  <el-tag size="mini">{{
+                    sitem.is_addr === "0"
+                      ? "无地址退货"
+                      : sitem.is_addr === "1"
+                      ? "有地址退货"
+                      : "--"
+                  }}</el-tag>
                 </template>
 
                 <template slot="order_type">
@@ -49,9 +55,9 @@
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
                   </el-popover>
                 </template>
-              <template slot="loop_total">
-                <span>供应商负责人共修改供应商审批结果 {{sitem.loop_total}} 次</span>
-              </template>
+                <template slot="loop_total">
+                  <span>供应商负责人共修改供应商审批结果 {{ sitem.loop_total }} 次</span>
+                </template>
 
                 <template slot="companyName">
                   <span>{{ sitem.customer_name }}</span>
@@ -66,9 +72,10 @@
                   </el-popover>
                 </template>
                 <template slot="is_active">
-                  <span v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
+                  <span
+                    v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
                     ><span
-                      >{{ sitem.is_activity  + '' === "1" ? "参与活动" : "不参与活动" }}/{{
+                      >{{ sitem.is_activity + "" === "1" ? "参与活动" : "不参与活动" }}/{{
                         sitem.good_type
                       }}</span
                     ></span
@@ -77,9 +84,9 @@
                 </template>
                 <template slot="send_type">
                   <el-tag :size="'mini'">{{
-                    sitem.send_type + '' === "1"
+                    sitem.send_type + "" === "1"
                       ? "有地址下单"
-                      : sitem.send_type + '' === "2"
+                      : sitem.send_type + "" === "2"
                       ? "无地址下单"
                       : "--"
                   }}</el-tag>
@@ -145,12 +152,29 @@
               </show-data-table>
             </el-collapse-item>
 
-
-            <el-collapse-item title="申请退货的发货单" name="8" v-if="sitem && sitem.is_addr === '1'">
-              <child-list ref="childListRef" :sitem="sitem" @getCurrentWorkOrderCount="_currentOrderWork => currentWorkOrder = _currentOrderWork" @getWorkOrderCount="_workOrderCount => workOrderCount = _workOrderCount" @getSendInfoFirst="onGetSendInfoFirst"/>
+            <el-collapse-item
+              title="申请退货的发货单"
+              name="8"
+              v-if="sitem && sitem.is_addr === '1'"
+            >
+              <child-list
+                ref="childListRef"
+                :sitem="sitem"
+                @getCurrentWorkOrderCount="
+                  (_currentOrderWork) => (currentWorkOrder = _currentOrderWork)
+                "
+                @getWorkOrderCount="
+                  (_workOrderCount) => (workOrderCount = _workOrderCount)
+                "
+                @getSendInfoFirst="onGetSendInfoFirst"
+              />
             </el-collapse-item>
 
-            <el-collapse-item title="待业务审核" name="3" v-if="isHasPermission({status:'1', process:'1'})">
+            <el-collapse-item
+              title="待业务审核"
+              name="3"
+              v-if="isHasPermission({ status: '1', process: '1' })"
+            >
               <exam-form
                 v-if="newTime"
                 :statusList="statusList"
@@ -160,7 +184,14 @@
                 @searchChange="examForm"
               />
             </el-collapse-item>
-            <el-collapse-item title="待供应商审核" name="4" v-if="isHasPermission({status:'9', process:'9'}) && String(sitem.has_account) === '0'">
+            <el-collapse-item
+              title="待供应商审核"
+              name="4"
+              v-if="
+                isHasPermission({ status: '9', process: '9' }) &&
+                String(sitem.has_account) === '0'
+              "
+            >
               <exam-form
                 v-if="newTime"
                 :statusList="statusList"
@@ -170,11 +201,22 @@
                 @searchChange="examForm_supplier"
               />
             </el-collapse-item>
-            <el-collapse-item title="供应商已驳回,待采购审核" name="5" v-if="isHasPermission({status:'8', process:'8'})">
+            <el-collapse-item
+              title="供应商已驳回,待采购审核"
+              name="5"
+              v-if="isHasPermission({ status: '8', process: '8' })"
+            >
               <approval-results :sitem="sitem" @changeStatus="handlePurchaseExam" />
             </el-collapse-item>
-            
-            <el-collapse-item title="业务公司修改,待供应商确认" name="6" v-if="isHasPermission({status:'10', process:'10'}) && String(sitem.has_account) === '0'">
+
+            <el-collapse-item
+              title="业务公司修改,待供应商确认"
+              name="6"
+              v-if="
+                isHasPermission({ status: '10', process: '10' }) &&
+                String(sitem.has_account) === '0'
+              "
+            >
               <exam-form
                 v-if="newTime"
                 :statusList="statusList"
@@ -185,13 +227,17 @@
               />
             </el-collapse-item>
 
-            <el-collapse-item title="待设置工单" name="7" v-if="isHasPermission({status:'11',process:'11'})">
-              <set-work-order 
-                :sitem="sitem" 
-                :currentWorkOrder="currentWorkOrder" 
-                :workOrderCount="workOrderCount" 
+            <el-collapse-item
+              title="待设置工单"
+              name="7"
+              v-if="isHasPermission({ status: '11', process: '11' })"
+            >
+              <set-work-order
+                :sitem="sitem"
+                :currentWorkOrder="currentWorkOrder"
+                :workOrderCount="workOrderCount"
                 :outItem="outItem"
-                 @reload="handleReload" 
+                @reload="handleReload"
               />
             </el-collapse-item>
 
@@ -205,10 +251,9 @@
                 :iscgd="false"
               />
             </el-collapse-item>
-
           </el-collapse>
         </el-tab-pane>
-       <el-tab-pane label="审批记录" name="2">
+        <el-tab-pane label="审批记录" name="2">
           <process-time-line
             v-if="newTime !== ''"
             :newTime="newTime"
@@ -222,9 +267,17 @@
         </el-tab-pane> -->
 
         <el-tab-pane label="流程图(按执行角色区分)" name="4">
-          <img src="~@/assets/beforeSale.jpg" style="width:100%" />
+          <img src="~@/assets/beforeSale.jpg" style="width: 100%" />
         </el-tab-pane>
       </el-tabs>
+      <open-msg
+        :num="10"
+        :title="'结算系统中已参与了业务,请解除后审批:'"
+        :show-model="showModel1"
+        :msg="msg"
+        @refresh="showModel1 = false"
+        @cancel="showModel1 = false"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -239,9 +292,9 @@ import comExamForm from "./components/comExamForm";
 import ApprovalResults from "./components/approval-results.vue";
 import { showColumns } from "./components/ShowDataTableColumns";
 import { xs_order_type_options } from "@/assets/js/statusList";
-import SetWorkOrder from "./components/set-work-order.vue"
+import SetWorkOrder from "./components/set-work-order.vue";
 import { mapGetters } from "vuex";
-import ShowWorkOrder from "./components/show-work-order.vue"
+import ShowWorkOrder from "./components/show-work-order.vue";
 import childList from "./components/child-list.vue";
 export default {
   name: "sellReturnDetail",
@@ -251,10 +304,10 @@ export default {
     ApprovalResults,
     SetWorkOrder,
     ShowWorkOrder,
-    childList
+    childList,
   },
   computed: {
-    ...mapGetters(['isSupertube']),
+    ...mapGetters(["isSupertube"]),
     powers() {
       const tran =
         this.$store.getters.btnList.find(
@@ -272,25 +325,27 @@ export default {
   },
   data() {
     return {
+      showModel1: false,
+      msg: "",
       activeTabs: "1",
       showColumns: showColumns,
-      workOrderCount:"",
-      currentWorkOrder:"",
+      workOrderCount: "",
+      currentWorkOrder: "",
       outItem: {},
       statusOptions: [
         { value: "1", label: "待业务审批" },
         { value: "4", label: "退货完成" },
         { value: "5", label: "业务驳回" },
-        { value: '8', label:'供应商已驳回,待采购审核'},
-        { value: '9', label:'待供应商审核'},
-        { value: '10', label:'业务公司修改,待供应商确认'},
-        { value: '11', label:'待设置工单'},
-        { value: '12', label:'待库管收货'},
-        { value: "13", label: "已取消申请" }
+        { value: "8", label: "供应商已驳回,待采购审核" },
+        { value: "9", label: "待供应商审核" },
+        { value: "10", label: "业务公司修改,待供应商确认" },
+        { value: "11", label: "待设置工单" },
+        { value: "12", label: "待库管收货" },
+        { value: "13", label: "已取消申请" },
       ],
       xs_order_type_options,
       sitem: null, //传给组件
-      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7","8",'10'],
+      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "10"],
       status: "", //存储详情接口状态
       statusList: [
         {
@@ -318,39 +373,88 @@ export default {
     this.renderChart();
   },
   methods: {
-    createNodes(){
-    return [
-        {"id":"0","text":"创建售前退货申请","type":"NormalTask","x":650,"y":100, "properties":{}},
-        {"id":"1","text":"待业务审核","type":"NormalTask","x":650,"y":200,"properties":{}},
-        {"id":"9","text":"待供应商审核","type":"NormalTask","x":650,"y":300,"properties":{}},
-        {"id":"8","text":"供应商已驳回," + '\n' + "待采购审核","type":"NormalTask","x":650,"y":400,"properties":{}},
-        {"id":"10","text":"业务公司修改," + '\n' + "待供应商确认","type":"NormalTask","x":650,"y":500,"properties":{}},
-        {"id":"4","text":"完成退货","type":"NormalTask","x":650,"y":600,"properties":{}},
-        {"id":"11","text":"待设置退货工单","type":"NormalTask","x":350,"y":400,"properties":{}},
-        {"id":"12","text":"待库管收货","type":"NormalTask","x":350,"y":500,"properties":{}}
-      ]
+    createNodes() {
+      return [
+        {
+          id: "0",
+          text: "创建售前退货申请",
+          type: "NormalTask",
+          x: 650,
+          y: 100,
+          properties: {},
+        },
+        {
+          id: "1",
+          text: "待业务审核",
+          type: "NormalTask",
+          x: 650,
+          y: 200,
+          properties: {},
+        },
+        {
+          id: "9",
+          text: "待供应商审核",
+          type: "NormalTask",
+          x: 650,
+          y: 300,
+          properties: {},
+        },
+        {
+          id: "8",
+          text: "供应商已驳回," + "\n" + "待采购审核",
+          type: "NormalTask",
+          x: 650,
+          y: 400,
+          properties: {},
+        },
+        {
+          id: "10",
+          text: "业务公司修改," + "\n" + "待供应商确认",
+          type: "NormalTask",
+          x: 650,
+          y: 500,
+          properties: {},
+        },
+        { id: "4", text: "完成退货", type: "NormalTask", x: 650, y: 600, properties: {} },
+        {
+          id: "11",
+          text: "待设置退货工单",
+          type: "NormalTask",
+          x: 350,
+          y: 400,
+          properties: {},
+        },
+        {
+          id: "12",
+          text: "待库管收货",
+          type: "NormalTask",
+          x: 350,
+          y: 500,
+          properties: {},
+        },
+      ];
     },
-    createEdges(){
-        return [
-          {"sourceNodeId":"0","targetNodeId":"1","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"1","targetNodeId":"9","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"9","targetNodeId":"8","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"8","targetNodeId":"11","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"11","targetNodeId":"12","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"10","targetNodeId":"4","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"8","targetNodeId":"10","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"10","targetNodeId":"8","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"11","targetNodeId":"12","isHitable":false,"type":"dashe-edge"},
-          {"sourceNodeId":"12","targetNodeId":"4","isHitable":false,"type":"dashe-edge"},
-        ]
+    createEdges() {
+      return [
+        { sourceNodeId: "0", targetNodeId: "1", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "1", targetNodeId: "9", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "9", targetNodeId: "8", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "8", targetNodeId: "11", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "11", targetNodeId: "12", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "10", targetNodeId: "4", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "8", targetNodeId: "10", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "10", targetNodeId: "8", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "11", targetNodeId: "12", isHitable: false, type: "dashe-edge" },
+        { sourceNodeId: "12", targetNodeId: "4", isHitable: false, type: "dashe-edge" },
+      ];
     },
-    renderChart(){
+    renderChart() {
       this.$refs.flowChart.render({
         nodes: this.createNodes(),
-        edges: this.createEdges()
-      })
+        edges: this.createEdges(),
+      });
     },
-    onGetSendInfoFirst(item){
+    onGetSendInfoFirst(item) {
       this.outItem = item;
     },
     async statusConfirm(status, message, remark) {
@@ -366,10 +470,10 @@ export default {
           console.log("取消");
         });
     },
-    async handlePurchaseExam(data){
+    async handlePurchaseExam(data) {
       let _model = {
         returnCode: this.queryId,
-        ...data
+        ...data,
       };
 
       let res = await asyncRequest.status(_model);
@@ -389,71 +493,78 @@ export default {
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
-   async handleReload(){
-    this.initData()
-    /*  重新获取最第一条退货单 **/
-    this.$refs.childListRef && this.$refs.childListRef.searchList()
-   },
+    async handleReload() {
+      this.initData();
+      /*  重新获取最第一条退货单 **/
+      this.$refs.childListRef && this.$refs.childListRef.searchList();
+    },
     //供应商确认
-    async handleSupplierConfirm(e){
+    async handleSupplierConfirm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
     // 点击业务审核的保存按钮
     async examForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "9" : "5";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "9" : "5";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
-    async examForm_supplier(e){
+    async examForm_supplier(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
     // 点击采购主管审核的保存按钮
     async dirExamForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
-    async setstatus(type, message, remark = "") {
+    async setstatus(type, msg, remark = "") {
       let _model = {
         returnCode: this.queryId,
         status: type,
         remark: remark,
       };
-      let res = await asyncRequest.status(_model);
-      if (res && res.code === 0) {
+      const { code, data, message } = await asyncRequest.status(_model);
+      if (code === 0) {
         this.$notify.success({
-          title: message + "成功!",
+          title: msg + "成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
 
-    isHasPermission({status, process}){
-      return this.sitem 
-             && String(this.sitem.status) === status  
-             && this.ppowers.includes(process) 
-             && !this.isSupertube
+    isHasPermission({ status, process }) {
+      return (
+        this.sitem &&
+        String(this.sitem.status) === status &&
+        this.ppowers.includes(process) &&
+        !this.isSupertube
+      );
     },
-    
+
     async initData() {
-      const { code, data, message } = await asyncRequest.detail({ returnCode: this.queryId });
+      const { code, data, message } = await asyncRequest.detail({
+        returnCode: this.queryId,
+      });
 
       if (code === 0) {
         const { is_stock, status } = data;

+ 109 - 79
src/views/supplierSellOut/supplierSellAfterApply/detail.vue

@@ -17,35 +17,36 @@
                     :type="sitem.status == '0' ? 'warning' : ''"
                     v-text="
                       (
-                      statusOptions.find(
-                          (item) => String(item.id) === String( sitem.status)
+                        statusOptions.find(
+                          (item) => String(item.id) === String(sitem.status)
                         ) || {}
                       ).label || '--'
                     "
                   ></el-tag>
                 </template>
 
-              <template slot="returnWsm">
-                <span>{{ sitem.wsm_name }}</span>
-                <el-popover placement="top" width="400" trigger="hover">
-                  <ul>
-                    <li><h3>退货仓库</h3></li>
-                    <li>
-                      <span>编码:</span><span>{{ sitem.wsm_code }}</span>
-                    </li>
-                    <li>
-                      <span>名称:</span><span>{{ sitem.wsm_name }}</span>
-                    </li>
-                    <li>
-                      <span>所在供应商编码:</span><span>{{ sitem.wsm_supplierNo }}</span>
-                    </li>
-                    <li>
-                      <span>所在供应商名称:</span><span>{{ sitem.wsm_supplier }}</span>
-                    </li>
-                  </ul>
-                  <i slot="reference" class="el-icon-warning-outline fr" />
-                </el-popover>
-              </template>
+                <template slot="returnWsm">
+                  <span>{{ sitem.wsm_name }}</span>
+                  <el-popover placement="top" width="400" trigger="hover">
+                    <ul>
+                      <li><h3>退货仓库</h3></li>
+                      <li>
+                        <span>编码:</span><span>{{ sitem.wsm_code }}</span>
+                      </li>
+                      <li>
+                        <span>名称:</span><span>{{ sitem.wsm_name }}</span>
+                      </li>
+                      <li>
+                        <span>所在供应商编码:</span
+                        ><span>{{ sitem.wsm_supplierNo }}</span>
+                      </li>
+                      <li>
+                        <span>所在供应商名称:</span><span>{{ sitem.wsm_supplier }}</span>
+                      </li>
+                    </ul>
+                    <i slot="reference" class="el-icon-warning-outline fr" />
+                  </el-popover>
+                </template>
 
                 <template slot="order_type">
                   <el-tag
@@ -61,9 +62,9 @@
                 </template>
                 <template slot="is_receive">
                   <el-tag :size="'mini'" :type="''">{{
-                    sitem.is_receive + '' === "1"
+                    sitem.is_receive + "" === "1"
                       ? "销售订单退货,采购订单也退货"
-                      : sitem.is_receive + '' === "0"
+                      : sitem.is_receive + "" === "0"
                       ? "采购订单不退货(货物已丢失,且无法找回,由业务公司承担)"
                       : "--"
                   }}</el-tag>
@@ -101,16 +102,23 @@
                 :spucode="sitem.good_code"
               />
             </el-collapse-item>
-            <el-collapse-item name="5" title="供应商审核" v-if="isHasPermission({status:'9', process:'9'})">
+            <el-collapse-item
+              name="5"
+              title="供应商审核"
+              v-if="isHasPermission({ status: '9', process: '9' })"
+            >
               <supplier-exam :sitem="sitem" @changeStatus="handleSupplierExam" />
             </el-collapse-item>
-            <el-collapse-item name="7" title="业务公司修改,待供应商确认" v-if="isHasPermission({status:'10', process:'10'})">
-              <supplier-confrim :sitem="sitem"  @changeStatus="handleSupplierConfirm"/>
+            <el-collapse-item
+              name="7"
+              title="业务公司修改,待供应商确认"
+              v-if="isHasPermission({ status: '10', process: '10' })"
+            >
+              <supplier-confrim :sitem="sitem" @changeStatus="handleSupplierConfirm" />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
 
-        
         <el-tab-pane label="审批记录" name="2">
           <process-time-line
             v-if="newTime !== ''"
@@ -120,10 +128,18 @@
           />
         </el-tab-pane>
 
-        <el-tab-pane label="流程图(按执行角色区分)" name="4"  style="width:100%">
+        <el-tab-pane label="流程图(按执行角色区分)" name="4" style="width: 100%">
           <img src="~@/assets/afterSale.png" />
         </el-tab-pane>
       </el-tabs>
+      <open-msg
+        :num="10"
+        :title="'结算系统中已参与了业务,请解除后申请:'"
+        :show-model="showModel1"
+        :msg="msg"
+        @refresh="showModel1 = false"
+        @cancel="showModel1 = false"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -140,7 +156,7 @@ import SupplierExam from "./components/supplier_exam.vue";
 import { xs_order_type_options } from "@/assets/js/statusList";
 import WaitReturn from "./components/wait-return.vue";
 import SupplierConfrim from "./components/supplier-confirm.vue";
-import SetWorkOrder from "./components/set-work-order.vue"
+import SetWorkOrder from "./components/set-work-order.vue";
 import WaitStockman from "./components/wait-stockman.vue";
 import { mapGetters } from "vuex";
 
@@ -153,12 +169,13 @@ export default {
     purchaseExam,
     SupplierConfrim,
     SetWorkOrder,
-    WaitStockman
+    WaitStockman,
   },
   computed: {
-    ...mapGetters(['isSuppertube']),
+    ...mapGetters(["isSuppertube"]),
     powers() {
-      const tran = this.$store.getters.btnList.find(
+      const tran =
+        this.$store.getters.btnList.find(
           (item) => item.menu_route == "supplierSellAfterApplyDetail"
         ) || {};
       const { action } = tran ?? {};
@@ -173,6 +190,8 @@ export default {
   },
   data() {
     return {
+      showModel1: false,
+      msg: "",
       xs_order_type_options,
       activeTabs: "1",
       expect_options: [],
@@ -226,20 +245,20 @@ export default {
     this.initData();
   },
   methods: {
-    isHasPermission({ status, process }){
+    isHasPermission({ status, process }) {
       return (
-        this.sitem
-        && status === String(this.sitem.status) 
-        && this.ppowers.includes(process) 
-        && !this.isSupertube 
-      )
+        this.sitem &&
+        status === String(this.sitem.status) &&
+        this.ppowers.includes(process) &&
+        !this.isSupertube
+      );
     },
-    async handleExpress(data){
+    async handleExpress(data) {
       let res = await asyncRequest.express({
         ...data,
-        returnCode: this.code
+        returnCode: this.code,
       });
-      
+
       if (res && res.code === 0) {
         this.$notify.success({
           title: "修改成功!",
@@ -253,65 +272,71 @@ export default {
       }
     },
 
-    async handleSupplierConfirm(data){
+    async handleSupplierConfirm(data) {
       const params = {
         ...data,
-        returnCode: this.code
-      }
+        returnCode: this.code,
+      };
 
-      const { is_receive } = this.sitem
+      const { is_receive } = this.sitem;
 
-      if(params.status === '4' && String(is_receive) === '0'){
-        params.status = '5'
+      if (params.status === "4" && String(is_receive) === "0") {
+        params.status = "5";
       }
 
-      let res = await asyncRequest.status(params);
-      
-      if (res && res.code === 0) {
+      const { code, message } = await asyncRequest.status(params);
+
+      if (code === 0) {
         this.$notify.success({
-          title: "修改成功!",
+          title: "提交成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
-    async handleSupplierExam(data){
+    async handleSupplierExam(data) {
       const params = {
         ...data,
-        returnCode: this.code
-      }
+        returnCode: this.code,
+      };
 
-      const { is_receive } = this.sitem
+      const { is_receive } = this.sitem;
 
-      if(params.status === '4' && String(is_receive) === '0'){
-        params.status = '5'
+      if (params.status === "4" && String(is_receive) === "0") {
+        params.status = "5";
       }
 
-      let res = await asyncRequest.status(params);
-      
-      if (res && res.code === 0) {
+      const { code, message } = await asyncRequest.status(params);
+
+      if (code === 0) {
         this.$notify.success({
-          title: "修改成功!",
+          title: "提交成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
     getNewTime() {
       this.newTime = new Date().valueOf();
     },
-    async handlePurchaseConfirm(data){
+    async handlePurchaseConfirm(data) {
       const model = {
         returnCode: this.code,
-        ...data
+        ...data,
       };
 
       let res = await asyncRequest.status(model);
@@ -321,7 +346,6 @@ export default {
           message: "",
         });
         await this.initData();
-        
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
@@ -335,7 +359,7 @@ export default {
         type: "warning",
       })
         .then(async () => {
-          if (status + '' === "-1") {
+          if (status + "" === "-1") {
             await this.deleteById(message);
           } else {
             await this.setstatus(status, message, remark);
@@ -348,12 +372,12 @@ export default {
     // 点击业务审核的保存按钮
     async examForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "9" : "6";
+        let type = e.state + "" === "1" ? "9" : "6";
         const { order_type } = this.sitem;
-        const isStock = order_type === "1"
+        const isStock = order_type === "1";
 
-        if(isStock && type === "9") type = "2"
-        let message = e.state + '' === "1" ? "提交业务审核" : "提交业务审核";
+        if (isStock && type === "9") type = "2";
+        let message = e.state + "" === "1" ? "提交业务审核" : "提交业务审核";
         await this.statusConfirm(type, message, e.remark);
       }
     },
@@ -378,9 +402,13 @@ export default {
         this.$message.warning(res.message);
       }
     },
-    hasPermission({status, process}){
-      console.log(this.sitem)
-      return !this.isSupertube && String(this.sitem.status) === status && this.ppowers.includes(process)
+    hasPermission({ status, process }) {
+      console.log(this.sitem);
+      return (
+        !this.isSupertube &&
+        String(this.sitem.status) === status &&
+        this.ppowers.includes(process)
+      );
     },
     async initData() {
       let model = {
@@ -395,7 +423,9 @@ export default {
         this.sitem.error_img = this.sitem.error_img.split(",");
         this.expect_options = JSON.parse(
           JSON.stringify(
-            this.sitem.is_receive + '' === "1" ? this.expect_options1 : this.expect_options0
+            this.sitem.is_receive + "" === "1"
+              ? this.expect_options1
+              : this.expect_options0
           )
         );
         this.getNewTime();

+ 77 - 45
src/views/supplierSellOut/supplierSellReturn/detail.vue

@@ -37,12 +37,18 @@
                   <div class="ql-editor" v-html="sitem.record" />
                 </template>
 
-              <template slot="loop_total">
-                <span>供应商负责人共修改供应商审批结果 {{sitem.loop_total}} 次</span>
-              </template>
+                <template slot="loop_total">
+                  <span>供应商负责人共修改供应商审批结果 {{ sitem.loop_total }} 次</span>
+                </template>
 
                 <template slot="is_addr">
-                  <el-tag size="mini">{{sitem.is_addr === '0' ? '无地址退货' : sitem.is_addr === '1' ? '有地址退货' : '--'}}</el-tag>
+                  <el-tag size="mini">{{
+                    sitem.is_addr === "0"
+                      ? "无地址退货"
+                      : sitem.is_addr === "1"
+                      ? "有地址退货"
+                      : "--"
+                  }}</el-tag>
                 </template>
 
                 <template slot="supplierName">
@@ -69,9 +75,10 @@
                   </el-popover>
                 </template>
                 <template slot="is_active">
-                  <span v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
+                  <span
+                    v-if="sitem.order_type + '' === '1' || sitem.order_type + '' === '2'"
                     ><span
-                      >{{ sitem.is_activity  + '' === "1" ? "参与活动" : "不参与活动" }}/{{
+                      >{{ sitem.is_activity + "" === "1" ? "参与活动" : "不参与活动" }}/{{
                         sitem.good_type
                       }}</span
                     ></span
@@ -80,9 +87,9 @@
                 </template>
                 <template slot="send_type">
                   <el-tag :size="'mini'">{{
-                    sitem.send_type + '' === "1"
+                    sitem.send_type + "" === "1"
                       ? "有地址下单"
-                      : sitem.send_type + '' === "2"
+                      : sitem.send_type + "" === "2"
                       ? "无地址下单"
                       : "--"
                   }}</el-tag>
@@ -148,7 +155,11 @@
               </show-data-table>
             </el-collapse-item>
 
-            <el-collapse-item title="申请退货的发货单" name="8" v-if="sitem && sitem.is_addr === '1'">
+            <el-collapse-item
+              title="申请退货的发货单"
+              name="8"
+              v-if="sitem && sitem.is_addr === '1'"
+            >
               <child-list :sitem="sitem" />
             </el-collapse-item>
 
@@ -162,7 +173,11 @@
                 :iscgd="false"
               />
             </el-collapse-item>
-            <el-collapse-item title="待供应商审核" name="4" v-if="isHasPermission({status:'9', process:'9'})">
+            <el-collapse-item
+              title="待供应商审核"
+              name="4"
+              v-if="isHasPermission({ status: '9', process: '9' })"
+            >
               <exam-form
                 v-if="newTime"
                 :statusList="statusList"
@@ -173,7 +188,11 @@
               />
             </el-collapse-item>
 
-            <el-collapse-item title="业务公司修改,待供应商确认" name="6" v-if="isHasPermission({status:'10', process:'10'})">
+            <el-collapse-item
+              title="业务公司修改,待供应商确认"
+              name="6"
+              v-if="isHasPermission({ status: '10', process: '10' })"
+            >
               <exam-form
                 v-if="newTime"
                 :statusList="statusList"
@@ -196,9 +215,17 @@
         </el-tab-pane>
 
         <el-tab-pane label="流程图(按执行角色区分)" name="4">
-          <img src="~@/assets/beforeSale.jpg" style="width:100%" />
+          <img src="~@/assets/beforeSale.jpg" style="width: 100%" />
         </el-tab-pane>
       </el-tabs>
+      <open-msg
+        :num="10"
+        :title="'结算系统中已参与了业务,请解除后审批:'"
+        :show-model="showModel1"
+        :msg="msg"
+        @refresh="showModel1 = false"
+        @cancel="showModel1 = false"
+      />
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -215,7 +242,7 @@ import { showColumns } from "./components/ShowDataTableColumns";
 import { xs_order_type_options } from "@/assets/js/statusList";
 import SetWorkOrder from "@/views/sellOut/sellAfterApply/components/set-work-order.vue";
 import { mapGetters } from "vuex";
-import ChildList from "./components/child-list.vue"
+import ChildList from "./components/child-list.vue";
 export default {
   name: "sellReturnDetail",
   mixins: [mixinPage, resToken],
@@ -223,10 +250,10 @@ export default {
     comExamForm,
     SetWorkOrder,
     ApprovalResults,
-    ChildList
+    ChildList,
   },
   computed: {
-    ...mapGetters(['isSupertube']),
+    ...mapGetters(["isSupertube"]),
     powers() {
       const tran =
         this.$store.getters.btnList.find(
@@ -244,18 +271,20 @@ export default {
   },
   data() {
     return {
+      showModel1: false,
+      msg: "",
       activeTabs: "1",
       showColumns: showColumns,
       statusOptions: [
         { value: "1", label: "待业务审批" },
         { value: "4", label: "退货完成" },
         { value: "5", label: "业务驳回" },
-        { value: '8', label:'供应商已驳回,待采购审核'},
-        { value: '9', label:'待供应商审核'},
-        { value: '10', label:'业务公司修改,待供应商确认'},
-        { value: '11', label:'待设置工单'},
-        { value: '12', label:'待库管收货'},
-        { value: "13", label: "已取消申请" }
+        { value: "8", label: "供应商已驳回,待采购审核" },
+        { value: "9", label: "待供应商审核" },
+        { value: "10", label: "业务公司修改,待供应商确认" },
+        { value: "11", label: "待设置工单" },
+        { value: "12", label: "待库管收货" },
+        { value: "13", label: "已取消申请" },
       ],
       xs_order_type_options,
       sitem: null, //传给组件
@@ -300,10 +329,10 @@ export default {
           console.log("取消");
         });
     },
-    async handlePurchaseExam(data){
+    async handlePurchaseExam(data) {
       let _model = {
         returnCode: this.queryId,
-        ...data
+        ...data,
       };
 
       let res = await asyncRequest.status(_model);
@@ -324,63 +353,66 @@ export default {
       this.newTime = new Date().valueOf();
     },
     //供应商确认
-    async handleSupplierConfirm(e){
+    async handleSupplierConfirm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
     // 点击业务审核的保存按钮
     async examForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "9" : "5";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "9" : "5";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
-    async examForm_supplier(e){
+    async examForm_supplier(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
     // 点击采购主管审核的保存按钮
     async dirExamForm(e) {
       if (!this.loading) {
-        let type = e.state + '' === "1" ? "4" : "8";
-        let message = e.state + '' === "1" ? "提交审核结果" : "提交审核结果";
+        let type = e.state + "" === "1" ? "4" : "8";
+        let message = e.state + "" === "1" ? "提交审核结果" : "提交审核结果";
         await this.statusConfirm(type, message, e.remark);
       }
     },
-    async setstatus(type, message, remark = "") {
+    async setstatus(type, msg, remark = "") {
       let _model = {
         returnCode: this.queryId,
         status: type,
         remark: remark,
       };
-      let res = await asyncRequest.status(_model);
-      if (res && res.code === 0) {
+      const { code, message } = await asyncRequest.status(_model);
+      if (code === 0) {
         this.$notify.success({
-          title: message + "成功!",
+          title: msg + "成功!",
           message: "",
         });
         await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
+      } else if (code >= 100 && code <= 104) {
         await this.logout();
+      } else if (code === 1005) {
+        this.msg = message;
+        this.showModel1 = true;
       } else {
-        this.$message.warning(res.message);
+        this.$message.warning(message);
       }
     },
 
-    isHasPermission({status, process}){
+    isHasPermission({ status, process }) {
       return (
-       !this.isSupertube
-       && this.sitem
-       && String(this.sitem.status) === status 
-       && this.ppowers.includes(process)
-      )
+        !this.isSupertube &&
+        this.sitem &&
+        String(this.sitem.status) === status &&
+        this.ppowers.includes(process)
+      );
     },
     async initData() {
       const { code, data, message } = await asyncRequest.detail({