Sfoglia il codice sorgente

销售业务模块

戴艳蓉 3 anni fa
parent
commit
c64a53c7cd

+ 0 - 668
src/views/sellOut/salesOrder/addEdit copy.vue

@@ -1,668 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="1040px"
-    @close="showModelThis = false"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    id:{{ id }} isDetail:{{ isDetail }},
-    <!-- sitem:{{ sitem }}, -->
-    入参:{{ ruleForm }}
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="110px"
-            class="demo-ruleForm"
-          >
-            <el-form-item
-              label="退货原因"
-              prop="returnReason"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-select
-                style="width: 100%"
-                v-model="ruleForm.returnReason"
-                placeholder="退换货原因"
-              >
-                <el-option
-                  v-for="item in reason_options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-
-            <el-form-item label="退货备注" prop="return_remark">
-              <!-- <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input> -->
-              <el-input
-                type="textarea"
-                maxlength="250"
-                show-word-limit
-                placeholder="请填写备注"
-                v-model="ruleForm.return_remark"
-              />
-            </el-form-item>
-            <el-form-item label="仓库信息">
-              <el-table
-                :data="tableForm.product_go"
-                border
-                :size="'mini'"
-                row-key="key"
-              >
-                <el-table-column label="商品总数量" width="100">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.num }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="已发货数量" width="100">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>
-                        {{ scope.row.send_num }}
-                      </p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="未发货数量" width="100">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsend_num }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="退货数量">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.return_num'" -->
-                    <el-form-item
-                      :style="!scope.row.edit ? 'margin:0' : ''"
-                      :rules="{
-                        required: true,
-                        message: '退货数量不能为空',
-                        trigger: 'blur',
-                      }"
-                    >
-                      <el-input
-                        :disabled="!scope.row.edit"
-                        v-model="ruleForm.return_num"
-                      ></el-input>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="采购编码" width="180">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.orderCode }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="仓库名称" width="150">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsm_name }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="仓库供应商" width="220">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsm_supplier }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="仓库编码" width="200">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsm_code }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-
-                <!-- <el-table-column label="仓库供应商">
-                  <template slot-scope="scope">
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsm_supplierNo }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column> -->
-
-                <el-table-column fixed="right" label="操作" width="80">
-                  <template slot-scope="scope">
-                    <el-tooltip
-                      effect="dark"
-                      content="编辑"
-                      v-if="!scope.row.edit"
-                      placement="top"
-                    >
-                      <i
-                        class="el-icon-edit tb-icon"
-                        @click="editRow(scope.$index, 'return')"
-                      ></i>
-                    </el-tooltip>
-
-                    <el-tooltip
-                      effect="dark"
-                      content="保存"
-                      v-if="scope.row.edit"
-                      placement="top"
-                    >
-                      <i
-                        class="el-icon-circle-check tb-icon"
-                        @click="checkRow(scope.$index, 'return')"
-                      ></i>
-                    </el-tooltip>
-
-                    <el-tooltip effect="dark" content="重置" placement="top">
-                      <i
-                        v-if="scope.row.edit"
-                        class="el-icon-refresh-left tb-icon"
-                        @click="resetRow(scope.$index)"
-                      ></i>
-                    </el-tooltip>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <!-- <el-col
-                :span="24"
-                style="text-align: right; padding: 30px 0 10px 0"
-              >
-                <el-button type="primary" :size="'mini'" @click="submitForm"
-                  >保 存
-                </el-button>
-              </el-col> -->
-            </el-form-item>
-            <el-form-item label="收货信息">
-              <el-table
-                :data="tableForm.get_product_go"
-                border
-                :size="'mini'"
-                row-key="key"
-              >
-                <el-table-column label="收货总数量">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>
-                        {{ scope.row.receipt_quantity }}
-                      </p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="已发货数量">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>
-                        {{ scope.row.send_num }}
-                      </p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="未发货数量">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsend_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsend_num }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="退货数量">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.return_num'" -->
-                    <el-form-item
-                      :style="!scope.row.edit ? 'margin:0' : ''"
-                      :rules="{
-                        required: true,
-                        message: '退货数量不能为空',
-                        trigger: 'blur',
-                      }"
-                    >
-                      <el-input
-                        :disabled="!scope.row.edit"
-                        v-model="ruleForm.get_return_num"
-                      ></el-input>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="采购编码" width="200">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.send_num'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>
-                        {{ scope.row.orderCode }}
-                      </p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <!-- <el-table-column label="仓库供应商">
-                  <template slot-scope="scope">
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.wsm_supplierNo }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column> -->
-                <el-table-column label="收货联系人 ">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.contactor }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-                <el-table-column label="联系方式" width="120">
-                  <template slot-scope="scope">
-                    <!-- :prop="'product_go.' + scope.$index + '.wsm_name'" -->
-                    <el-form-item :style="!scope.row.edit ? 'margin:0' : ''">
-                      <p>{{ scope.row.mobile }}</p>
-                    </el-form-item>
-                  </template>
-                </el-table-column>
-
-                <el-table-column fixed="right" label="操作" width="80">
-                  <template slot-scope="scope">
-                    <el-tooltip
-                      effect="dark"
-                      content="编辑"
-                      v-if="!scope.row.edit"
-                      placement="top"
-                    >
-                      <i
-                        class="el-icon-edit tb-icon"
-                        @click="editRow(scope.$index, 'get')"
-                      ></i>
-                    </el-tooltip>
-
-                    <el-tooltip
-                      effect="dark"
-                      content="保存"
-                      v-if="scope.row.edit"
-                      placement="top"
-                    >
-                      <i
-                        class="el-icon-circle-check tb-icon"
-                        @click="checkRow(scope.$index, 'get')"
-                      ></i>
-                    </el-tooltip>
-
-                    <el-tooltip effect="dark" content="重置" placement="top">
-                      <i
-                        v-if="scope.row.edit"
-                        class="el-icon-refresh-left tb-icon"
-                        @click="resetRow(scope.$index)"
-                      ></i>
-                    </el-tooltip>
-                  </template>
-                </el-table-column>
-              </el-table>
-              <!-- <el-col
-                :span="24"
-                style="text-align: right; padding: 30px 0 10px 0"
-              >
-                <el-button type="primary" :size="'mini'" @click="submitForm"
-                  >保 存
-                </el-button>
-              </el-col> -->
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right">
-          <el-button type="primary" @click="submitForm" v-if="!isDetail"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false">{{
-            isDetail ? "关 闭" : "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/sellOut/sellReturnList";
-import resToken from "@/mixins/resToken";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
-export default {
-  name: "sellReturnList",
-  props: ["showModel", "id", "isDetail", "sitem"],
-  mixins: [resToken],
-  data() {
-    const validateusername = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("账号不能为空!"));
-      } else {
-        if (value.length < 6 || value.length > 18) {
-          callback(new Error("账号规则为6~18位数字与字母组合!"));
-        } else {
-          if (isnumber(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (validAlphabets(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (!isAlphanumeric(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("真实姓名不能为空!"));
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error("真实姓名规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    const validateEmail = (rule, value, callback) => {
-      if (value === "") {
-        callback();
-      } else {
-        if (!validEmail(value)) {
-          callback(new Error("邮箱格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-    return {
-      noSendNumbers: "", //收货-未发货数量
-      noSendNum: "", //销售-未发货数量
-      reason_options: [], //退换货原因备选项
-      loading: false,
-      title: "添加销售退货单",
-      showModelThis: this.showModel,
-      ruleForm: {
-        get_return_num: "",
-        outCode: "", //出库单编号
-        return_remark: "", //退货备注
-        return_num: "", //退货数量
-        returnReason: [], //退货原因
-        // email: "",
-        // role_id: "",
-        // status: "1",
-        // item: [],
-      },
-      rulesThis: this.rules,
-      rules: {
-        returnReason: [
-          {
-            required: true,
-            message: "请选择退货原因",
-            // type: "array",
-            trigger: "change",
-          },
-        ],
-        return_num: [
-          {
-            required: true,
-            validator: validatemobile,
-            trigger: "blur",
-          },
-        ],
-        return_remark: [
-          {
-            required: true,
-            message: "请输入退货备注",
-            trigger: "blur",
-          },
-        ],
-      },
-      tableForm: {
-        product_go: [],
-        get_product_go: [],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-
-  methods: {
-    
-    // 获取退换货原因
-    async getReason() {
-      this.loading = true;
-      let model = {
-        page: 1,
-        size: 100,
-        type: "5",
-      };
-      const res = await asyncRequest.getReason(model);
-      if (res && res.code === 0 && res.data) {
-       const {list}=res.data
-        list.forEach((element) => {
-          let obj = {
-            value: element.result_code,
-            label: element.result,
-            id: element.id,
-          };
-          this.reason_options.push(obj);
-        });
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.tableData = [];
-        this.pageInfo.total = 0;
-      }
-      this.loading = false;
-    },
-    async initForm() {
-      this.loading = true;
-      // await this.getRole();
-      if (this.id === "add") {
-        this.title = "添加销售退货单";
-        this.rulesThis = this.rules;
-        await this.resetForm();
-      } else {
-        if (this.isDetail) {
-          this.title = "添加销售退货单详情";
-          this.rulesThis = {};
-        } else {
-          this.title = "修改添加销售退货单";
-          this.rulesThis = this.rules;
-        }
-        await this.resetForm(this.sitem);
-        // await this.initData()
-      }
-      this.getReason(); //获取退还货原因
-
-      this.loading = false;
-    },
-    async initData() {
-      // const res = await asyncRequest.detail({ id: this.id });
-      // if (res && res.code === 0 && res.data) {
-      //   this.ruleForm = res.data;
-      //   this.ruleForm.role_id = this.ruleForm.role;
-      // } else if (res && res.code >= 100 && res.code <= 104) {
-      //   await this.logout();
-      // } else {
-      //   this.$message.warning(res.message);
-      // }
-    },
-    async resetForm(sitem) {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-        
-          this.ruleForm = {
-            return_remark: "", //退货备注
-            return_num: "", //退货数量
-            returnReason: [], //退货原因
-          };
-        }
-      });
-    },
-
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          const model = JSON.parse(JSON.stringify(this.ruleForm));
-          model.errorCode = model.returnReason.toString();
-          model.num = model.return_num;
-          model.remark = model.return_remark;
-          model.outCode = this.outCode;
-          if (model.return_num > this.noSendNum) {
-            this.$message.warning("退货数量不能大于未发货数量");
-            return;
-          }
-          let res = {};
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功" : "修改成功";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    //异常原因筛选
-    //保存某一行
-    checkRow(rowIndex, name) {
-      if (name == "return") {
-        const model = JSON.parse(JSON.stringify(this.ruleForm));
-        if (Number(model.return_num) > Number(this.noSendNum)) {
-          this.$message.warning("退货数量不能大于未发货数量");
-          return;
-        }
-        const { check_value, check_remark } =
-          this.tableForm.product_go[rowIndex];
-        if (check_value != "" && check_remark != "") {
-          this.tableForm.product_go[rowIndex].edit = false;
-        } else {
-          this.$message.warning("审核情况或审核备注不能为空");
-        }
-      } else if (name == "get") {
-        const model = JSON.parse(JSON.stringify(this.ruleForm));
-        if (Number(model.get_return_num) > Number(this.noSendNum)) {
-          this.$message.warning("退货数量不能大于未发货数量");
-          return;
-        }
-        const { check_value, check_remark } =
-          this.tableForm.get_product_go[rowIndex];
-        if (check_value != "" && check_remark != "") {
-          this.tableForm.get_product_go[rowIndex].edit = false;
-        } else {
-          this.$message.warning("审核情况或审核备注不能为空");
-        }
-      }
-    },
-    //编辑某一行
-    editRow(rowIndex, name) {
-      if (name == "return") {
-        let index = this.tableForm.product_go.findIndex((v) => {
-          v.edit;
-        });
-        if (index !== -1) {
-          this.$message.warning("请完成其他行的编辑!");
-          return;
-        } else {
-          this.tableForm.product_go[rowIndex].edit = true;
-        }
-      } else if (name == "get") {
-        let index = this.tableForm.product_go.findIndex((v) => {
-          v.edit;
-        });
-        if (index !== -1) {
-          this.$message.warning("请完成其他行的编辑!");
-          return;
-        } else {
-          this.tableForm.get_product_go[rowIndex].edit = true;
-        }
-      }
-    },
-    resetRow(rowIndex) {
-      this.tableForm.product_go[rowIndex].check_remark = "";
-      this.tableForm.product_go[rowIndex].check_value = "agree";
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.sellReturnList {
-}
-</style>
-   

+ 71 - 136
src/views/sellOut/salesOrder/components/addEdit.vue

@@ -195,7 +195,6 @@
               style="margin: 0 0 0 10px"
               >导入收货地址</el-button
             >
-            
           </div>
           <el-form :model="addrForm" ref="addrForm" :size="'mini'">
             <el-table
@@ -209,132 +208,34 @@
                 prop="receipt_quantity"
                 label="收货总数"
                 min-width="125"
-              >
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="
-                      'order_addr.' + scope.$index + '.' + 'receipt_quantity'
-                    "
-                    :rules="addrRules.receipt_quantity"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <el-input
-                      v-model="scope.row.receipt_quantity"
-                      :disabled="!scope.row.edit"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
+              />
 
               <el-table-column
                 prop="arrive_time"
                 label="最晚收货日期"
                 width="150"
-              >
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="'order_addr.' + scope.$index + '.' + 'arrive_time'"
-                    :rules="addrRules.arrive_time"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <!-- type="datetime"
-                      style="width: 100%"
-                      value-format="yyyy-MM-dd HH:mm:ss" -->
-                    <el-date-picker
-                      :disabled="!scope.row.edit"
-                      v-model="scope.row.arrive_time"
-                      type="date"
-                      style="width: 100%"
-                      value-format="yyyy-MM-dd"
-                      :picker-options="pickerOptions"
-                    >
-                    </el-date-picker>
-                  </el-form-item>
-                </template>
-              </el-table-column>
+              />
               <el-table-column
                 prop="contactor"
                 label="收件联系人"
                 min-width="110"
-              >
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="'order_addr.' + scope.$index + '.' + 'contactor'"
-                    :rules="addrRules.contactor"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <el-input
-                      v-model="scope.row.contactor"
-                      :disabled="!scope.row.edit"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
+              />
 
               <el-table-column
                 prop="mobile"
                 label="收货联系电话"
                 min-width="130"
-              >
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="'order_addr.' + scope.$index + '.' + 'mobile'"
-                    :rules="addrRules.mobile"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <el-input
-                      v-model="scope.row.mobile"
-                      :disabled="!scope.row.edit"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
+              />
 
               <el-table-column
                 prop="addr_code"
                 label="收货省市区"
                 min-width="230"
-              >
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="'order_addr.' + scope.$index + '.' + 'addr_code'"
-                    :rules="addrRules.addr_code"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <select-area
-                      :value="scope.row.addr_code"
-                      :disabled="!scope.row.edit"
-                      :size="'mini'"
-                      @selectChange="select_area_change($event, scope.$index)"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-              <el-table-column prop="addr" label="详细地址" min-width="170">
-                <template slot-scope="scope">
-                  <el-form-item
-                    :prop="'order_addr.' + scope.$index + '.' + 'addr'"
-                    :rules="addrRules.addr"
-                    :size="'mini'"
-                    :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                  >
-                    <el-input
-                      v-model="scope.row.addr"
-                      :disabled="!scope.row.edit"
-                    />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-
+              />
+              <el-table-column prop="addr" label="详细地址" min-width="170" />
               <el-table-column fixed="right" width="80">
                 <template slot="header" slot-scope="scope">
                   <span>操作</span>
-
                   <el-tooltip
                     class="fr"
                     style="margin: 3px 0 0 0"
@@ -361,19 +262,6 @@
                       @click="openHouseModal(scope.$index)"
                     ></i>
                   </el-tooltip>
-
-                  <el-tooltip
-                    effect="dark"
-                    content="保存"
-                    v-if="scope.row.edit"
-                    placement="top"
-                  >
-                    <i
-                      class="el-icon-circle-check tb-icon"
-                      @click="checkRow(scope.$index)"
-                    ></i>
-                  </el-tooltip>
-
                   <el-tooltip effect="dark" content="删除" placement="top">
                     <i
                       class="el-icon-delete tb-icon"
@@ -392,6 +280,13 @@
             @cancel="addrmodel = false"
             @refresh="addrRefresh"
           />
+          <addr-add-edit-modal
+            :showModel="showAddrAddEditModal"
+            :index="AddrAddEditModalIndex"
+            :sitem="AddrAddEditModalSitem"
+            @cancel="showAddrAddEditModal = false"
+            @refresh="showAddrAddEditModalRefresh"
+          />
         </el-col>
         <el-col :span="24" style="text-align: right">
           <el-button :size="'mini'" type="primary" @click="submitForm"
@@ -408,11 +303,12 @@ import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import searchStockGoodModal from "@/components/search-stock-good-modal";
 import { isnumber, isMobile } from "@/utils/validate";
 import inAddrModel from "@/components/in-addr-model";
+import AddrAddEditModal from "@/components/addr-add-edit-modal";
 export default {
   name: "allot",
   props: ["showModel", "id"],
   mixins: [resToken],
-  components: { searchStockGoodModal, inAddrModel },
+  components: { searchStockGoodModal, inAddrModel, AddrAddEditModal },
   data() {
     const validatemobile = (rule, value, callback) => {
       if (value === "") {
@@ -437,6 +333,9 @@ export default {
       }
     };
     return {
+      showAddrAddEditModal: false,
+      AddrAddEditModalIndex: -1,
+      AddrAddEditModalSitem: {},
       loading: false,
       addrmodel: false,
       title: "新建销售订单",
@@ -662,6 +561,33 @@ export default {
         }
       });
     },
+    showAddrAddEditModalRefresh(e) {
+      const { index, item } = e;
+
+      if (index === -1) {
+        this.addrForm.order_addr.push(JSON.parse(JSON.stringify(item)));
+      } else {
+        const {
+          arrive_time,
+          receipt_quantity,
+          contactor,
+          mobile,
+          addr_code,
+          addr_code_name,
+          addr,
+          id,
+        } = JSON.parse(JSON.stringify(item));
+        this.addrForm.order_addr[index].receipt_quantity = receipt_quantity;
+        this.addrForm.order_addr[index].arrive_time = arrive_time;
+        this.addrForm.order_addr[index].contactor = contactor;
+        this.addrForm.order_addr[index].mobile = mobile;
+        this.addrForm.order_addr[index].addr_code = addr_code;
+        this.addrForm.order_addr[index].addr_code_name = addr_code_name;
+        this.addrForm.order_addr[index].addr = addr;
+        this.addrForm.order_addr[index].id = id;
+      }
+      this.$refs.addrForm.validateField("addrlist");
+    },
     async addGoodsRes(e) {
       if (e && e.length === 1) {
         this.ruleForm.good_name = e[0].good_name;
@@ -726,25 +652,34 @@ export default {
       this.$refs.ruleForm.validateField("sell_code");
     },
     openHouseModal(index) {
-      let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
-      if (findex !== -1) {
-        this.$message.warning("当前已有地址在编辑,请保存后再试!");
-        return;
+      this.AddrAddEditModalIndex = index;
+      if (index === -1) {
+        this.AddrAddEditModalSitem = {};
       } else {
-        if (index === -1) {
-          this.addrForm.order_addr.push({
-            edit: true,
-            arrive_time: "",
-            receipt_quantity: "",
-            contactor: "",
-            mobile: "",
-            addr_code: [],
-            addr: "",
-          });
-        } else {
-          this.addrForm.order_addr[index].edit = true;
-        }
+        this.AddrAddEditModalSitem = JSON.parse(
+          JSON.stringify(this.addrForm.order_addr[index])
+        );
       }
+      this.showAddrAddEditModal = true;
+      // let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
+      // if (findex !== -1) {
+      //   this.$message.warning("当前已有地址在编辑,请保存后再试!");
+      //   return;
+      // } else {
+      //   if (index === -1) {
+      //     this.addrForm.order_addr.push({
+      //       edit: true,
+      //       arrive_time: "",
+      //       receipt_quantity: "",
+      //       contactor: "",
+      //       mobile: "",
+      //       addr_code: [],
+      //       addr: "",
+      //     });
+      //   } else {
+      //     this.addrForm.order_addr[index].edit = true;
+      //   }
+      // }
     },
     //省市区选择
     select_area_change(e, index) {

+ 89 - 139
src/views/sellOut/salesOrder/components/addForm.vue

@@ -175,120 +175,31 @@
               prop="receipt_quantity"
               label="收货总数"
               min-width="125"
-            >
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="
-                    'order_addr.' + scope.$index + '.' + 'receipt_quantity'
-                  "
-                  :rules="addrRules.receipt_quantity"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-input
-                    v-model="scope.row.receipt_quantity"
-                    :disabled="!scope.row.edit"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
+            />
 
             <el-table-column
               prop="arrive_time"
               label="最晚收货日期"
               min-width="200"
-            >
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'arrive_time'"
-                  :rules="addrRules.arrive_time"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-date-picker
-                    :disabled="!scope.row.edit"
-                    v-model="scope.row.arrive_time"
-                    type="datetime"
-                    style="width: 100%"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    :picker-options="pickerOptions"
-                  >
-                  </el-date-picker>
-                </el-form-item>
-              </template>
-            </el-table-column>
+            />
             <el-table-column
               prop="contactor"
               label="收件联系人"
               min-width="110"
-            >
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'contactor'"
-                  :rules="addrRules.contactor"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-input
-                    v-model="scope.row.contactor"
-                    :disabled="!scope.row.edit"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
+            />
 
-            <el-table-column prop="mobile" label="收货联系电话" min-width="130">
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'mobile'"
-                  :rules="addrRules.mobile"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-input
-                    v-model="scope.row.mobile"
-                    :disabled="!scope.row.edit"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
+            <el-table-column
+              prop="mobile"
+              label="收货联系电话"
+              min-width="130"
+            />
 
             <el-table-column
               prop="addr_code"
               label="收货省市区"
               min-width="230"
-            >
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'addr_code'"
-                  :rules="addrRules.addr_code"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <select-area
-                    :value="scope.row.addr_code"
-                    :disabled="!scope.row.edit"
-                    :size="'mini'"
-                    @selectChange="select_area_change($event, scope.$index)"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column prop="addr" label="详细地址" min-width="170">
-              <template slot-scope="scope">
-                <el-form-item
-                  :prop="'order_addr.' + scope.$index + '.' + 'addr'"
-                  :rules="addrRules.addr"
-                  :size="'mini'"
-                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
-                >
-                  <el-input
-                    v-model="scope.row.addr"
-                    :disabled="!scope.row.edit"
-                  />
-                </el-form-item>
-              </template>
-            </el-table-column>
+            />
+            <el-table-column prop="addr" label="详细地址" min-width="170" />
 
             <el-table-column
               fixed="right"
@@ -312,30 +223,13 @@
                 </el-tooltip>
               </template>
               <template slot-scope="scope">
-                <el-tooltip
-                  effect="dark"
-                  content="编辑"
-                  v-if="!scope.row.edit"
-                  placement="top"
-                >
+                <el-tooltip effect="dark" content="编辑" placement="top">
                   <i
                     class="el-icon-edit tb-icon"
                     @click="openHouseModal(scope.$index)"
                   ></i>
                 </el-tooltip>
 
-                <el-tooltip
-                  effect="dark"
-                  content="保存"
-                  v-if="scope.row.edit"
-                  placement="top"
-                >
-                  <i
-                    class="el-icon-circle-check tb-icon"
-                    @click="checkRow(scope.$index)"
-                  ></i>
-                </el-tooltip>
-
                 <el-tooltip effect="dark" content="删除" placement="top">
                   <i
                     class="el-icon-delete tb-icon"
@@ -347,9 +241,24 @@
           </el-table>
         </el-form>
       </el-col>
+      <el-col :span="24">
+        <in-addr-model
+          :show-model="addrmodel"
+          @cancel="addrmodel = false"
+          @refresh="addrRefresh"
+        />
+
+        <addr-add-edit-modal
+          :showModel="showAddrAddEditModal"
+          :index="AddrAddEditModalIndex"
+          :sitem="AddrAddEditModalSitem"
+          @cancel="showAddrAddEditModal = false"
+          @refresh="showAddrAddEditModalRefresh"
+        />
+      </el-col>
       <el-col
         :span="24"
-        style="text-align: right"
+        style="text-align: right;padding:0 0 20px 0;"
         v-if="status === '0' && powers.some((item) => item == '005')"
       >
         <el-button :size="'mini'" type="primary" @click="submitForm"
@@ -365,12 +274,13 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import searchStockGoodModal from "@/components/search-stock-good-modal";
 import { isnumber, isMobile } from "@/utils/validate";
-
+import inAddrModel from "@/components/in-addr-model";
+import AddrAddEditModal from "@/components/addr-add-edit-modal";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   props: ["newTime", "id", "sitem"],
-  components: { searchStockGoodModal },
+  components: { searchStockGoodModal, inAddrModel, AddrAddEditModal },
   watch: {
     newTime: function (val) {
       if (val) {
@@ -416,6 +326,9 @@ export default {
       }
     };
     return {
+      showAddrAddEditModal: false,
+      AddrAddEditModalIndex: -1,
+      AddrAddEditModalSitem: {},
       showGoodsModel: false,
       stock_code: "",
       companyName: "",
@@ -519,6 +432,33 @@ export default {
       this.rulesThis = this.rules;
       this.resetForm();
     },
+    showAddrAddEditModalRefresh(e) {
+      const { index, item } = e;
+
+      if (index === -1) {
+        this.addrForm.order_addr.push(JSON.parse(JSON.stringify(item)));
+      } else {
+        const {
+          arrive_time,
+          receipt_quantity,
+          contactor,
+          mobile,
+          addr_code,
+          addr_code_name,
+          addr,
+          id,
+        } = JSON.parse(JSON.stringify(item));
+        this.addrForm.order_addr[index].receipt_quantity = receipt_quantity;
+        this.addrForm.order_addr[index].arrive_time = arrive_time;
+        this.addrForm.order_addr[index].contactor = contactor;
+        this.addrForm.order_addr[index].mobile = mobile;
+        this.addrForm.order_addr[index].addr_code = addr_code;
+        this.addrForm.order_addr[index].addr_code_name = addr_code_name;
+        this.addrForm.order_addr[index].addr = addr;
+        this.addrForm.order_addr[index].id = id;
+      }
+      this.$refs.addrForm.validateField("addrlist");
+    },
     async getstock(code) {
       this.loading = true;
       let model = {
@@ -709,27 +649,37 @@ export default {
       this.$refs.ruleForm.validateField("customer_code");
     },
     openHouseModal(index) {
-      let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
-      if (findex !== -1) {
-        this.$message.warning("当前已有地址在编辑,请保存后再试!");
-        return;
+      this.AddrAddEditModalIndex = index;
+
+      if (index === -1) {
+        this.AddrAddEditModalSitem = {};
       } else {
-        if (index === -1) {
-          this.addrForm.order_addr.push({
-            edit: true,
-            arrive_time: "",
-            receipt_quantity: "",
-            contactor: "",
-            mobile: "",
-            addr_code: [],
-            addr: "",
-            id: "",
-            is_del: 0,
-          });
-        } else {
-          this.addrForm.order_addr[index].edit = true;
-        }
+        this.AddrAddEditModalSitem = JSON.parse(
+          JSON.stringify(this.addrForm.order_addr[index])
+        );
       }
+      this.showAddrAddEditModal = true;
+      // let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
+      // if (findex !== -1) {
+      //   this.$message.warning("当前已有地址在编辑,请保存后再试!");
+      //   return;
+      // } else {
+      //   if (index === -1) {
+      //     this.addrForm.order_addr.push({
+      //       edit: true,
+      //       arrive_time: "",
+      //       receipt_quantity: "",
+      //       contactor: "",
+      //       mobile: "",
+      //       addr_code: [],
+      //       addr: "",
+      //       id: "",
+      //       is_del: 0,
+      //     });
+      //   } else {
+      //     this.addrForm.order_addr[index].edit = true;
+      //   }
+      // }
     },
     //省市区选择
     select_area_change(e, index) {

+ 2 - 2
src/views/sellOut/salesOrder/components/feedback-form.vue

@@ -65,7 +65,7 @@
             </el-table-column>
             <el-table-column
               fixed="right"
-              width="80"
+              width="50"
               label="操作"
               v-if="status === '1' && powers.some((item) => item == '033')"
             >
@@ -100,7 +100,7 @@
       </el-col>
       <el-col
         :span="24"
-        style="text-align: right"
+        style="text-align: right;padding:0 0 20px 0;"
         v-if="status === '1' && powers.some((item) => item == '033')"
       >
         <el-button :size="'mini'" type="primary" @click="submitForm"

+ 34 - 55
src/views/sellOut/salesOrder/components/order-out-table.vue

@@ -8,12 +8,12 @@
       style="width: 100%"
       row-key="key"
     >
-      <el-table-column
+      <!-- <el-table-column
         show-overflow-tooltip
         prop="orderCode"
         label="出库订单号"
         width="150"
-      />
+      /> -->
 
       <el-table-column
         show-overflow-tooltip
@@ -21,12 +21,12 @@
         label="出库单号"
         width="150"
       />
-      <el-table-column
+      <!-- <el-table-column
         show-overflow-tooltip
         prop="apply_name"
         label="申请人名称"
         width="85"
-      />
+      /> -->
 
       <el-table-column
         show-overflow-tooltip
@@ -40,12 +40,6 @@
         label="物流单号"
         width="160"
       />
-      <el-table-column
-        show-overflow-tooltip
-        prop="post_fee"
-        label="预计物流费"
-        width="100"
-      />
       <el-table-column
         show-overflow-tooltip
         prop="status"
@@ -64,36 +58,12 @@
         </template>
       </el-table-column>
 
-      <el-table-column
-        show-overflow-tooltip
-        prop="sendtime"
-        label="发货时间"
-        min-width="170"
-      />
       <el-table-column
         show-overflow-tooltip
         prop="send_num"
-        label="	发货数量"
-        width="80"
-      />
-      <el-table-column
-        show-overflow-tooltip
-        prop="check_num"
-        label="验收数量"
+        label="发货数量"
         width="80"
       />
-      <el-table-column
-        show-overflow-tooltip
-        prop="addr_info"
-        label="省市区"
-        min-width="170"
-      />
-      <el-table-column
-        show-overflow-tooltip
-        prop="addr"
-        label="收货地址"
-        min-width="170"
-      />
       <el-table-column
         show-overflow-tooltip
         prop="contact"
@@ -108,49 +78,57 @@
       />
       <el-table-column
         show-overflow-tooltip
-        prop="wsm_supplier"
-        label="供应商"
-        min-width="220"
-      />
+        prop="addr"
+        label="收货地址"
+        width="170"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.addr_info }}{{ scope.row.addr }}
+        </template>
+      </el-table-column>
       <el-table-column
         show-overflow-tooltip
-        prop="wsm_supplierNo"
-        label="仓库供应商"
+        prop="sendtime"
+        label="发货时间"
         min-width="170"
       />
-
-      <!-- v-if="status === '0' && powers.some((item) => item == '005')" -->
-      <el-table-column fixed="right" width="80">
+      <el-table-column
+        fixed="right"
+        width="50"
+        v-if="
+          ((status === '3'||status === '4') && powers.some((item) => item == '048')) ||
+          powers.some((item) => item == '007')
+        "
+      >
         <template slot="header" slot-scope="scope">
-          <span>操作</span>
           <el-tooltip
-            class="fr"
             style="margin: 3px 0 0 0"
             effect="dark"
+            v-if="(status === '3'||status === '4')&& powers.some((item) => item == '048')"
             content="添加"
             placement="top"
           >
             <i
               class="el-icon-circle-plus-outline tb-icon"
-              style="color: #63cbe7"
+              style="color: #63cbe7; magin: 0 0 0 10px"
               @click="openHouseModal()"
             ></i>
-            <!-- @click="openModal('add', '028')"  -->
-
-            <!--  -->
           </el-tooltip>
+          <span v-else>操作</span>
         </template>
 
         <template slot-scope="scope">
           <el-tooltip
             effect="dark"
             content="查看"
-            v-if="!scope.row.edit"
             placement="top"
+            v-if="powers.some((item) => item == '007')"
           >
             <i
               class="el-icon-view tb-icon"
-              @click="openHouseModal(scope.$index)"
+              @click="
+                routeGoto('sellOutOrderDetail', { id: scope.row.outCode })
+              "
             ></i>
           </el-tooltip>
         </template>
@@ -178,7 +156,6 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import outOrderAddModel from "./out-order-add-model";
-// import addEdit from "@/views/sellOut/sellAfterApply/components/addEdit";
 
 import { mapGetters } from "vuex";
 
@@ -257,8 +234,10 @@ export default {
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
-        const { bum } = this.sitem;
-        this.tableData = bum;
+        const { orderout, status } = this.sitem;
+        this.status = status;
+        console.log(this.status);
+        this.tableData = JSON.parse(JSON.stringify(orderout));
       });
     },
 

+ 4 - 4
src/views/sellOut/salesOrder/components/out-order-add-model.vue

@@ -47,7 +47,7 @@
         <el-col :span="24">
           <el-divider>选择收货地址</el-divider>
         </el-col>
-        <el-col :span="24">
+        <el-col :span="24" style="padding:0 0 20px 0">
           <el-table
             ref="multipleTable"
             :data="tableData1"
@@ -269,9 +269,9 @@ export default {
           this.tableData1 = addrs;
           this.ruleForm = {
             post_name: [],
-            post_code: "xxx2322",
-            post_fee: "20",
-            send_num: "10",
+            post_code: "",
+            post_fee: "",
+            send_num: "",
             addrid: "",
             orderCode: orderCode || "",
             wsm_code: "",

+ 77 - 48
src/views/sellOut/salesOrder/detail.vue

@@ -6,46 +6,31 @@
     >
       <div class="tl" style="padding: 10px 0 50px 0">
         <span> {{ status }}----{{ powers }}</span>
-
-        <el-button
-          v-if="status !== '0'"
-          style="margin: 0 0 0 10px"
-          class="fr"
-          type="primary"
-          plain
-          :size="'mini'"
-          @click="openModal('add', false, 'sell')"
-          >新建销售退货单
-        </el-button>
-
-        <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-button
           @click="statusConfirm('-1', '作废该条信息')"
           type="danger"
           plain
+          class="fr"
           :size="'mini'"
           v-if="
-            status !== '' &&
-            status !== '3' &&
+            (status == '0' ||
+              status == '1' ||
+              status == '2' ||
+              status == '3') &&
             powers.some((item) => item == '015')
           "
           >作废该条信息</el-button
         >
+        <el-button
+          v-if="status !== '0'"
+          style="margin: 0 0 0 10px"
+          class="fr"
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="openModal('add', false, 'sell')"
+          >新建销售退货单
+        </el-button>
       </div>
       <status-bar
         v-if="newTime !== ''"
@@ -54,7 +39,7 @@
         :status="status"
       />
       <el-collapse v-model="activeNames">
-        <el-collapse-item title="销售订单信息" name="0">
+        <el-collapse-item title="销售订单信息" name="-1">
           <add-form
             :newTime="newTime"
             v-if="newTime !== ''"
@@ -63,32 +48,75 @@
             @refresh="initData()"
           />
         </el-collapse-item>
-        <el-collapse-item title="采购反馈物流" name="1">
+        <el-collapse-item
+          title="发起申请流程"
+          name="0"
+          v-if="
+            (status === '0' && powers.some((item) => item == '012')) ||
+            ((status === '1' || status === '2' || status === '3') &&
+              powers.some((item) => item == '014'))
+          "
+        >
+          <div style="height: 60px" class="tr">
+            <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' || status === '2' || status === '3') &&
+                powers.some((item) => item == '014')
+              "
+              >取消审核流程</el-button
+            >
+          </div>
+        </el-collapse-item>
+        <el-collapse-item
+          title="采购反馈物流"
+          name="1"
+          v-if="
+            (status === '1' && powers.some((item) => item == '033')) ||
+            status === '2' ||
+            status === '3' ||
+            status === '4'
+          "
+        >
           <feedback-form
             :newTime="newTime"
-            v-if="newTime !== '' && status == 1"
+            v-if="newTime !== ''"
             :sitem="sitem"
             :id="queryId"
             @refresh="initData()"
           />
         </el-collapse-item>
-        <el-collapse-item title="准备发货" name="6" v-if="status === '2'">
+        <el-collapse-item
+          title="同意下单"
+          name="6"
+          v-if="status === '2' && powers.some((item) => item == '026')"
+        >
           <el-button
             class="fr"
-            style="margin: 0 0 10px 0"
+            style="margin: 0 0 20px 0"
             type="primary"
             plain
             :size="'mini'"
-            @click="statusConfirm('3', '开始发货')"
-            v-if="status === '2' && powers.some((item) => item == '026')"
-            >开始发货
+            @click="statusConfirm('3', '同意下单')"
+            >同意下单,开始发货
           </el-button>
         </el-collapse-item>
         <el-collapse-item title="销售出库单" name="3">
-          <!-- && status == 3 -->
+          <!-- && status == 3 && (status == 3 || status == 4)-->
           <order-out-table
             :newTime="newTime"
-            v-if="newTime !== '' && (status == 3 || status == 4)"
+            v-if="newTime !== '' "
             :sitem="sitem"
             :id="queryId"
             @refresh="initData()"
@@ -103,14 +131,14 @@
           />
         </el-collapse-item>
       </el-collapse>
-      <add-edit
+      <!-- <add-edit
         :id="modelId"
         :sitem="s_sitem"
         :show-model="showModel"
         :is-detail="isDetail"
         @refresh="searchList"
         @cancel="showModel = false"
-      />
+      /> -->
       <!-- <edit-add
         :id="modelId"
         :sitem="sitem"
@@ -132,12 +160,12 @@ import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
 import addForm from "./components/addForm";
 import feedbackForm from "./components/feedback-form";
 import orderOutTable from "./components/order-out-table";
-import addEdit from "./addEdit.vue";
+// import addEdit from "./addEdit";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
-    addEdit,
+    // addEdit,
     addForm,
     feedbackForm,
     orderOutTable,
@@ -161,10 +189,11 @@ export default {
       finishStatus: "finish",
       activeNames: ["-1", "0", "1", "2", "3", "4", "5", "6", "10"],
       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: "填写发货信息" },
+        { value: "3", label: "待发货" },
         { value: "4", label: "发货中" },
         { value: "5", label: "发货完成" },
       ],

+ 21 - 22
src/views/sellOut/sellOutOrder/detail.vue

@@ -4,9 +4,11 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <!-- <div class="tr" style="height: 50px; padding: 10px 0 0 0">
+      <div class="tl" style="height: 50px; padding: 10px 0 0 0">
+        <p>{{ status }}---ssss{{ powers }}</p>
         <el-button
           class="fr"
+          v-if="status === '2' && powers.some((item) => item == '049')"
           type="primary"
           plain
           :size="'mini'"
@@ -14,8 +16,8 @@
           @click="showModel = true"
           >新建售后申请单
         </el-button>
-      </div> -->
-      <p>{{ status }}---{{ powers }}</p>
+      </div>
+
       <status-bar
         v-if="newTime !== ''"
         :newTime="newTime"
@@ -30,25 +32,25 @@
             v-if="newTime != ''"
           ></add-edit-form>
         </el-collapse-item>
-        <el-collapse-item title="商品验收" name="3" v-if="status === '1'">
-          <div class="tr" style="padding: 0 20px 20px 0">
-            <el-button
-              type="primary"
-              plain
-              :size="'mini'"
-              @click="goodsCheck"
-              >退货审核</el-button
+        <el-collapse-item
+          title="客户验收"
+          name="3"
+          v-if="status === '1' && powers.some((item) => item == '052')"
+        >
+          <div class="tr" style="padding: 0 0 20px 0">
+            <el-button type="primary" plain :size="'mini'" @click="goodsCheck"
+              >客户已收到货</el-button
             >
           </div>
         </el-collapse-item>
-        <el-collapse-item title="填写售后申请单" name="3" v-if="status === '4'">
+        <!-- <el-collapse-item title="填写售后申请单" name="3" v-if="status === '4'">
           <sell-return-apply
             :sitem="sitem"
             v-if="newTime != '' || true"
             :newTime="newTime"
             @refresh="updateStatus"
           />
-        </el-collapse-item>
+        </el-collapse-item> -->
         <el-collapse-item title="审批记录" name="10">
           <process-time-line
             v-if="newTime !== ''"
@@ -79,7 +81,7 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
 import addEditForm from "./components/addEditForm.vue"; //出库单详情
-// import addEditA from "./components/addEditA";
+import addEditA from "./components/addEditA";
 import SellReturnApply from "./components/sellReturnApply.vue";
 
 export default {
@@ -87,7 +89,7 @@ export default {
   mixins: [mixinPage, resToken],
   components: {
     addEditForm,
-    // addEditA,
+    addEditA,
     SellReturnApply,
   },
   computed: {
@@ -113,11 +115,8 @@ export default {
       showModel: false,
       loading: false,
       statusOptions: [
-        // { value: "0", label: "待发货" },
-        { value: "1", label: "待验收" },
-        { value: "4", label: "填写售后申请单" },
-        { value: "5", label: "已完成" },
-        // { value: "3", label: "已完成" },
+        { value: "1", label: "待客户验收" },
+        { value: "2", label: "订单出库完成" },
       ],
       code: "",
       did: "", //详情页上的id
@@ -174,9 +173,9 @@ export default {
       let model = {
         outCode: this.code,
         orderCode: this.sitem.orderCode,
-        status: "4",
+        status: "2",
       };
-      this.$confirm("商品审核是否完成?", {
+      this.$confirm("客户是否已收到货?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",

+ 2 - 2
src/views/sellOut/sellOutOrder/index.vue

@@ -63,7 +63,7 @@
                   v-model="parmValue.status"
                   filterable
                   clearable
-                  placeholder="状态"
+                  placeholder="出库单状态"
                   style="width: 100%"
                   @change="
                     pageInfo.curr = 1;
@@ -91,7 +91,7 @@
               </el-col>
             </el-row>
             <el-row style="padding-top: 10px">
-              <el-col :span="4" style="width: 500px; padding: 0 0 0 10px">
+              <el-col :span="4" style="width: 500px;">
                 <el-input
                   clearable
                   :size="searchSize"