xiaodai2022 1 жил өмнө
parent
commit
16c5946040

+ 0 - 358
src/views/supplierSellOut/supplierSellOutOrder/components/purchase_check.vue

@@ -1,358 +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-col :span="12">
-        <el-form-item label="退回仓库" prop="return_store">
-          <el-select
-            style="width: 100%"
-            v-model="ruleForm.return_value"
-            placeholder="请选择退回仓库"
-            @change="handleStore"
-          >
-            <el-option
-              v-for="item in return_store_options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-row>
-        <el-col :span="12">
-          <el-form-item label="退回地址" prop="return_goods_addr">
-            <select-area
-              :placeholder="'请选择省/市/区'"
-              :value="ruleForm.return_goods_addr"
-              :is-detail="id !== 'add'"
-              @selectChange="selectAreaAddr_code"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="详细地址" prop="addr_detail">
-            <el-input
-              v-model="ruleForm.addr_detail"
-              placeholder="详细地址"
-               maxlength="100"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收件人" prop="addressee">
-            <el-input
-              v-model="ruleForm.addressee"
-              placeholder="收件人"
-               maxlength="20"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收件人电话" prop="addressee_phone">
-            <el-input
-              v-model="ruleForm.addressee_phone"
-              placeholder="请输入收件人电话"
-               maxlength="11"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-col :span="24" style="text-align: right">
-        <el-button type="primary" @click="submitForm" v-if="true"
-          >保 存</el-button
-        >
-        <!-- id === 'add' ||
-            (status === '0' && powers.some((i) => i == '005')) -->
-        <el-button
-          type="primary"
-          @click="statusConfirm('1', '发起审核流程')"
-          v-if="status + '' === '0' && powers.some((i) => i == '012')"
-          >发起审核流程
-        </el-button>
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          v-if="status + '' === '1' && powers.some((i) => i == '014')"
-          >取消审核流程</el-button
-        >
-        <el-button
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
-          plain
-          v-if="
-            (status + '' === '0' || status + '' === '1') &&
-            powers.some((i) => i == '015')
-          "
-          >作废该条信息</el-button
-        >
-        <el-button
-          @click="statusConfirm('2', '通过审核')"
-          type="primary"
-          v-if="status + '' === '1' && powers.some((i) => i == '016')"
-          >通过审核</el-button
-        >
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import { isMobile } from "@/utils/validate.js";
-import asyncRequest from "@/apis/service/sellOut/sellAfterApply";
-import resToken from "@/mixins/resToken";
-import { isnumber } from "@/utils/validate.js";
-export default {
-  name: "purchase_check",
-  props: ["id", "showModelThis", "newTime"],
-  mixins: [resToken],
-  data() {
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      status: "", //存储详情接口返的状态
-      showModelThis: this.showModel,
-      resign_name: "", //离职人
-      hand_name: "", //交接人
-      ruleForm: {
-        return_store: "", //退回仓库
-        return_goods_addr: [], //退货地址
-        addr_detail: "", //退货详细地址
-        addressee: "", //收件人
-        addressee_phone: "", //收件人电话
-        express_require: "", //物流要求
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        return_store: [
-          {
-            required: true,
-            trigger: "change",
-            message: "请选择退回仓库",
-          },
-        ],
-        addressee: [
-          {
-            required: true,
-            message: "请输入收件人",
-            trigger: "blur",
-          },
-        ],
-        return_goods_addr: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择退回地址所在省/市/区",
-            trigger: "change",
-          },
-        ],
-        addr_detail: [
-          {
-            required: true,
-            message: "请输入详细退货地址",
-            trigger: "blur",
-          },
-        ],
-        addressee: [
-          {
-            required: true,
-            message: "请输入收件人",
-            trigger: "blur",
-          },
-        ],
-        addressee_phone: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validatemobile,
-          },
-        ],
-        express_require: [
-          {
-            required: true,
-            trigger: "blur",
-            message: "请输入物流信息",
-          },
-        ],
-      },
-      return_store_options: [
-        {
-          value: "value1",
-          label: "供应商仓库",
-          return_goods_addr: ["110000", "110100", "110101"],
-          addr_detail: "三河道",
-          addressee: "张三",
-          addressee_phone: "13223223230",
-        },
-        {
-          value: "value2",
-          label: "自建仓/部门仓1",
-        },
-        {
-          value: "value3",
-          label: "自建仓/部门仓2",
-        },
-        {
-          value: "value4",
-          label: "自建仓/部门仓3",
-        },
-      ],
-      return_value: "", //退回仓库
-    };
-  },
-  computed: {
-    powers() {
-      const tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "purchase_check"
-        ) || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-  },
-
-  mounted() {
-    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;
-        await this.resetForm();
-      } else {
-        this.rulesThis = this.rules;
-        await this.resetForm();
-        // await this.initData();
-      }
-      this.loading = false;
-    },
-
-    async resetForm() {
-      this.resign_name = "";
-      this.hand_name = "";
-      this.status = "";
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            return_store: "", //退回仓库
-            return_goods_addr: [], //退货地址
-            addr_detail: "", //退货详细地址
-            addressee: "", //收件人
-            addressee_phone: "", //收件人电话
-            express_require: "", //物流要求
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-           if (this.loading) {
-        return;
-      }
-          this.loading = true;
-          const model = {
-            id: this.id,
-            resign_uid: rUid,
-            hand_uid: hUid,
-          };
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-  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;
-        }
-      });
-    },
-    handleStore(e) {
-      this.return_store_options.find((item) => {
-        if (item.value === e) {
-          this.ruleForm.return_goods_addr = item.return_goods_addr;
-          this.ruleForm.addr_detail = item.addr_detail;
-          this.ruleForm.addressee = item.addressee;
-          this.ruleForm.addressee_phone = item.addressee_phone;
-          this.$refs.ruleForm.validateField("addressee");
-          this.$refs.ruleForm.validateField("return_goods_addr");
-          this.$refs.ruleForm.validateField("addr_detail");
-          this.$refs.ruleForm.validateField("addressee_phone");
-        }
-      });
-      this.ruleForm.return_store = e;
-    },
-    //退货省市区
-    selectAreaAddr_code(e) {
-      this.ruleForm.return_goods_addr = e;
-      this.$refs.ruleForm.validateField("return_goods_addr");
-    },
-  },
-};
-</script>
-
-<style lang="scss" scoped>
-</style>

+ 0 - 368
src/views/supplierSellOut/supplierSellOutOrder/components/supplier_feedback.vue

@@ -1,368 +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>
-        <el-col :span="12">
-          <el-form-item label="是否同意" prop="whether_back">
-            <el-select
-              style="width: 100%"
-              v-model="ruleForm.whether_back"
-              placeholder="请选择是否同意退回"
-              @change="handleView"
-            >
-              <el-option
-                v-for="item in whether_back_options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="反馈备注" prop="feedback_remark">
-            <el-input
-              type="textarea"
-              placeholder="请输入反馈备注"
-              v-model="ruleForm.feedback_remark"
-              maxlength="250"
-              show-word-limit
-            />
-          </el-form-item>
-        </el-col>
-      </el-row>
-      <el-row v-if="ruleForm.whether_back === 'value1'">
-        <el-col :span="12">
-          <el-form-item label="退回地址" prop="return_goods_addr">
-            <select-area
-              :placeholder="'请选择省/市/区'"
-              :value="ruleForm.return_goods_addr"
-              :is-detail="id !== 'add'"
-              @selectChange="selectAreaAddr_code"
-            />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="详细地址" prop="addr_detail">
-            <el-input
-              v-model="ruleForm.addr_detail"
-              placeholder="请输入退货详细地址"
-               maxlength="100"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收件人" prop="addressee">
-            <el-input
-              v-model="ruleForm.addressee"
-              placeholder="请输入收件人"
-               maxlength="20"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="收件人电话" prop="addressee_phone">
-            <el-input
-              v-model="ruleForm.addressee_phone"
-              placeholder="请输入收件人电话"
-               maxlength="11"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item label="物流要求" prop="express_require">
-            <el-input
-              v-model="ruleForm.express_require"
-              placeholder="请输入物流"
-               maxlength="100"
-            ></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-col :span="24" style="text-align: right">
-        <el-button type="primary" @click="submitForm" v-if="true"
-          >保 存</el-button
-        >
-        <el-button
-          type="primary"
-          @click="statusConfirm('1', '发起审核流程')"
-          v-if="status + '' === '0' && powers.some((i) => i == '012')"
-          >发起审核流程
-        </el-button>
-        <el-button
-          @click="statusConfirm('0', '取消审核流程')"
-          plain
-          v-if="status + '' === '1' && powers.some((i) => i == '014')"
-          >取消审核流程</el-button
-        >
-        <el-button
-          @click="statusConfirm('-1', '作废该条信息')"
-          type="danger"
-          plain
-          v-if="
-            (status + '' === '0' || status + '' === '1') &&
-            powers.some((i) => i == '015')
-          "
-          >作废该条信息</el-button
-        >
-        <el-button
-          @click="statusConfirm('2', '通过审核')"
-          type="primary"
-          v-if="status + '' === '1' && powers.some((i) => i == '016')"
-          >通过审核</el-button
-        >
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-<script>
-import { isMobile } from "@/utils/validate.js";
-import asyncRequest from "@/apis/service/sellOut/sellAfterApply";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "supplier_feedback",
-  props: ["id", "showModelThis", "newTime"],
-  mixins: [resToken],
-  data() {
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      loading: false,
-      status: "", //存储详情接口返的状态
-      showModelThis: this.showModel,
-      ruleForm: {
-        whether_back: "", //是否同意退回
-        feedback_remark: "", //反馈备注
-        return_goods_addr: [], //退货地址
-        addr_detail: "", //退货详细地址
-        addressee: "", //收件人
-        addressee_phone: "", //收件人电话
-        express_require: "", //物流要求
-      },
-      rulesThis: this.rules,
-      // 验证规则
-      rules: {
-        whether_back: [
-          {
-            required: true,
-            trigger: "change",
-            message: "请选择是否同意退回",
-          },
-        ],
-        feedback_remark: [
-          {
-            required: true,
-            message: "请输入反馈备注",
-            trigger: "blur",
-          },
-        ],
-        return_goods_addr: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择退回地址所在省/市/区",
-            trigger: "change",
-          },
-        ],
-        addr_detail: [
-          {
-            required: true,
-            message: "请输入详细退货地址",
-            trigger: "blur",
-          },
-        ],
-        addressee: [
-          {
-            required: true,
-            message: "请输入收件人",
-            trigger: "blur",
-          },
-        ],
-        addressee_phone: [
-          {
-            required: true,
-            trigger: "blur",
-            validator: validatemobile,
-          },
-        ],
-        express_require: [
-          {
-            required: true,
-            trigger: "blur",
-            message: "请输入物流信息",
-          },
-        ],
-      },
-      whether_back_options: [
-        {
-          value: "value1",
-          label: "同意退回",
-        },
-        {
-          value: "value2",
-          label: "拒绝退回",
-        },
-      ],
-    };
-  },
-  computed: {
-    powers() {
-      const tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "supplier_feedback"
-        ) || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
-  },
-  mounted() {
-    this.initForm();
-  },
-  watch: {
-    id: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
-  methods: {
-    closeAdd() {
-      this.showModelThis = false;
-    },
-    async initForm() {
-      this.loading = true;
-      if (this.id === "add") {
-        this.rulesThis = this.rules;
-        await this.resetForm();
-      } else {
-        this.rulesThis = this.rules;
-        await this.resetForm();
-        // await this.initData();
-      }
-      this.loading = false;
-    },
-    // async initData() {
-    //   const res = await asyncRequest.detail({ id: this.id });
-    //   if (res && res.code === 0 && res.data) {
-    //     let { hand_name, resign_name, hand_uid, resign_uid, status } = res.data;
-    //     this.resign_name = resign_name;
-    //     this.hand_name = hand_name;
-    //     this.status = status;
-    //     this.ruleForm = {
-    //       hand_uid: hand_uid.split(","),
-    //       resign_uid: resign_uid.split(","),
-    //     };
-    //   } else if (res && res.code >= 100 && res.code <= 104) {
-    //     await this.logout();
-    //   } else {
-    //     this.$message.warning(res.message);
-    //   }
-    // },
-
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            whether_back: "", //是否同意退回
-            feedback_remark: "", //反馈备注
-            return_goods_addr: [], //退货地址
-            addr_detail: "", //退货详细地址
-            addressee: "", //收件人
-            addressee_phone: "", //收件人电话
-            express_require: "", //物流要求
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-         if (this.loading) {
-        return;
-      }
-        // if (valid) {
-        //   const { resign_uid, hand_uid } = this.ruleForm;
-        //   let rUid = resign_uid.toString(),
-        //     hUid = hand_uid.toString();
-        //   if (rUid === hUid) {
-        //     this.$message.error("离职人和接收人不能相同");
-        //     return;
-        //   }
-        //   this.loading = true;
-        //   const model = {
-        //     id: this.id,
-        //     resign_uid: rUid,
-        //     hand_uid: hUid,
-        //   };
-        //   let res = {};
-        //   if (this.id === "add") {
-        //     delete model["id"];
-        //     res = await asyncRequest.add(model);
-        //   } else {
-        //     res = await asyncRequest.update(model);
-        //   }
-
-        //   this.loading = false;
-        //   if (res && res.code === 0) {
-        //     const title = this.id === "add" ? "添加成功!" : "修改成功!";
-        //     this.$notify.success({
-        //       title,
-        //       message: "",
-        //     });
-
-        //     if (this.id === "add") {
-        //       this.showModelThis = false;
-        //       this.$emit("refresh", false);
-        //     } else {
-        //       this.initForm();
-        //     }
-        //   } 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;
-        // }
-      });
-    },
-    handleView(e) {
-      this.ruleForm.whether_back = e;
-      this.$refs.ruleForm.validateField("return_goods_addr");
-    },
-    //退货省市区
-    selectAreaAddr_code(e) {
-      this.ruleForm.return_goods_addr = e;
-      this.$refs.ruleForm.validateField("return_goods_addr");
-    },
-  },
-};
-</script>