戴艳蓉 3 years ago
parent
commit
fd6b3f5825

+ 18 - 0
src/apis/service/sellOut/consultSheet/index.js

@@ -0,0 +1,18 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "add", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "Consultdel", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "Consultlist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "Consultinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "accountstatus", data, "post", params),
+};
+   

+ 1 - 1
src/styles/index.scss

@@ -506,7 +506,7 @@ aside {
   background: #f0f9eb !important;
 }
 
-.consultOrder {
+.consultSheet {
   .modal-form-style {
     #demo-ruleForm.el-form {
       .el-row {

+ 70 - 0
src/views/sellOut/consultOrder/columns.js

@@ -0,0 +1,70 @@
+export default [
+
+  {
+    prop: "orderCode",
+    label: "销售订单编号",
+    width: "155px",
+  },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    width: "60px",
+  },
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+  {
+    prop: "good_class",
+    label: "商品分类",
+  },
+
+  {
+    prop: "good_num",
+    label: "商品数量",
+  },
+  {
+    prop: "sale_price",
+    label: "销售单价",
+  },
+  {
+    prop: "total_price",
+    label: "总价",
+  },
+  {
+    prop: "post_fee",
+    label: "总物流费",
+  },
+  {
+    prop: "customer_code",
+    label: "客户公司编码",
+
+    width: "215px",
+  },
+
+
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "120px",
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "145px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]

+ 767 - 0
src/views/sellOut/consultOrder/components/addEdit.vue

@@ -0,0 +1,767 @@
+<template>
+  <el-dialog
+    :title="title"
+    :center="true"
+    align="left"
+    top="5vh"
+    width="1040px"
+    @close="closeModel"
+    :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)"
+  >
+    <el-card style="margin-top: -20px">
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            label-width="95px"
+            class="demo-ruleForm"
+          >
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="商品分类" prop="good_code">
+                  <good-class
+                    :value="ruleForm.goods_class"
+                    @handleChange="goods_class_change"
+                    :disabled="
+                      !(
+                        id === 'add' ||
+                        (status === '0' && powers.some((item) => item == '005'))
+                      )
+                    "
+                    :placeholder="'商品分类'"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item label="商品名称" prop="good_code">
+                  <el-input
+                    v-model="ruleForm.good_name"
+                    readonly
+                    @focus="showGoodsModel = true"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="企业客户" prop="customer_code">
+                  <search-customer
+                    :value="ruleForm.customer_code"
+                    @searchChange="customer_code_change"
+                  />
+                </el-form-item>
+              </el-col>
+
+              <el-col :span="24">
+                <search-stock-good-modal
+                  :show-model="showGoodsModel"
+                  :code="stock_code"
+                  @cancel="showGoodsModel = false"
+                  @searchChange="addGoodsRes"
+                />
+              </el-col>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="padding: 0 0 20px 0">
+          <el-form :model="stockForm" ref="stockForm" :size="'mini'">
+            <el-table
+              :data="stockForm.good_stock"
+              border
+              :size="'mini'"
+              style="width: 100%"
+              row-key="key"
+            >
+              <el-table-column
+                prop="wsm_supplierNo"
+                label="发货公司编号"
+                width="145"
+              />
+
+              <el-table-column
+                show-overflow-tooltip
+                prop="wsm_supplier"
+                label="发货公司名称"
+                min-width="145"
+              />
+              <el-table-column
+                prop="wsm_code"
+                label="发货仓库编码"
+                width="180"
+              />
+              <el-table-column
+                show-overflow-tooltip
+                prop="wsm_name"
+                label="发货仓库名称"
+                min-width="180"
+              />
+              <el-table-column
+                prop="usable_stock"
+                label="商品可用库存"
+                width="120"
+              />
+
+              <el-table-column prop="num" label="下单数量" width="150">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'good_stock.' + scope.$index + '.' + 'num'"
+                    :rules="{}"
+                    :size="'mini'"
+                    style="margin-bottom: 0"
+                  >
+                    <el-input
+                      v-model="scope.row.num"
+                      :disabled="!scope.row.edit"
+                    />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="original_price"
+                label="销售价"
+                width="110"
+              />
+
+              <el-table-column fixed="right" width="80" label="操作">
+                <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)"
+                    ></i>
+                  </el-tooltip>
+
+                  <el-tooltip
+                    effect="dark"
+                    content="保存"
+                    v-if="scope.row.edit"
+                    placement="top"
+                  >
+                    <i
+                      class="el-icon-circle-check tb-icon"
+                      @click="checkStockRow(scope.$index)"
+                    ></i>
+                  </el-tooltip>
+
+                  <el-tooltip effect="dark" content="删除" placement="top">
+                    <i
+                      class="el-icon-delete tb-icon"
+                      @click="deleteRow(scope.$index, stockForm.good_stock)"
+                    ></i>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="padding: 0 0 22px 0">
+          <el-form :model="addrForm" ref="addrForm" :size="'mini'">
+            <el-table
+              :data="addrForm.order_addr"
+              border
+              :size="'mini'"
+              style="width: 100%"
+              row-key="key"
+            >
+              <el-table-column
+                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="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 fixed="right" width="80">
+                <template slot="header" slot-scope="scope">
+                  <span>操作</span>
+                  <el-tooltip
+                    class="fr"
+                    style="margin: 3px 0 0 0"
+                    effect="dark"
+                    content="添加"
+                    placement="top"
+                  >
+                    <i
+                      class="el-icon-circle-plus-outline tb-icon"
+                      style="color: #63cbe7"
+                      @click="openHouseModal(-1)"
+                    ></i>
+                  </el-tooltip>
+                </template>
+                <template slot-scope="scope">
+                  <el-tooltip
+                    effect="dark"
+                    content="编辑"
+                    v-if="!scope.row.edit"
+                    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"
+                      @click="deleteRow(scope.$index, addrForm.order_addr)"
+                    ></i>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button :size="'mini'" type="primary" @click="submitForm"
+            >保 存
+          </el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+   <script>
+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";
+export default {
+  name: "allot",
+  props: ["showModel", "id"],
+  mixins: [resToken],
+  components: { searchStockGoodModal },
+  data() {
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validateWeight = (rule, value, callback) => {
+      console.log(value);
+      if (value === "") {
+        callback(new Error("收货总数不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("收货总数仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      loading: false,
+      title: "新建销售订单",
+      showModelThis: this.showModel,
+      showGoodsModel: false,
+      stock_code: "",
+      cat_id: "",
+      ruleForm: {
+        goods_class: [],
+        good_name: "",
+        good_code: "", // 商品选择
+        customer_code: [], // 企业客户选择
+      },
+      rulesThis: this.rules,
+      rules: {
+        good_code: [
+          {
+            required: true,
+            message: "请选择商品",
+            trigger: "blur",
+          },
+        ],
+        customer_code: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择企业客户",
+            trigger: "change",
+          },
+        ],
+      },
+      addrForm: {
+        order_addr: [], //收货地址
+      },
+      addrRules: {
+        arrive_time: {
+          required: true,
+          message: "最晚收货日期不能为空",
+          trigger: "change",
+        },
+        receipt_quantity: {
+          required: true,
+          validator: validateWeight,
+          trigger: "blur",
+        },
+
+        contactor: {
+          required: true,
+          trigger: "blur",
+          message: "联系人不能为空",
+        },
+        mobile: {
+          required: true,
+          validator: validatemobile,
+          trigger: "blur",
+        },
+
+        order_addr: {
+          type: "array",
+          required: true,
+          message: "收货省市区不能为空",
+          trigger: "change",
+        },
+        addr: {
+          required: true,
+          message: "详细地址不能为空",
+          trigger: "blur",
+        },
+      },
+      stockForm: {
+        good_stock: [], //出货仓库
+      },
+      loading: false,
+      id: "",
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.rulesThis = this.rules;
+        this.resetForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+      this.showModelThis = false;
+    },
+
+    goods_class_change(e) {
+      this.ruleForm.goods_class = e;
+      this.cat_id = e.length > 0 ? e[e.length - 1] : "";
+      this.$refs.ruleForm.validateField("goods_class");
+      this.ruleForm.good_code = "";
+      this.ruleForm.good_name = "";
+      this.$refs.ruleForm.validateField("good_code");
+    },
+    refresh(e) {
+      this.showModelThis = e;
+      this.$emit("refresh", true);
+    },
+    async getstock(code) {
+      this.loading = true;
+      let model = {
+        wsm_code: "",
+        page: 1,
+        size: 100,
+        type_code: code,
+        good_code: "",
+        good_name: "",
+        supplierNo: "",
+        stock_low: "",
+        stock_up: "",
+        warn_low: "",
+        warn_up: "",
+        stock_max: "1",
+      };
+      const res = await asyncRequest.getGoodStock(model);
+      if (res && res.code === 0 && res.data) {
+        this.stockForm = {
+          good_stock: [], //出货仓库
+        };
+        const { list } = res.data;
+        list.forEach((v) => {
+          let model = {
+            num: v.usable_stock,
+            usable_stock: v.usable_stock,
+            wsm_name: v.wsm_name,
+            wsm_supplier: v.wsm_supplier,
+            wsm_supplierNo: v.wsm_supplierNo,
+            wsm_code: v.wsm_code,
+            original_price: v.original_price,
+            edit: false,
+          };
+          this.stockForm.good_stock.push(model);
+        });
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.cat_id = "";
+          this.ruleForm = {
+            goods_class: [],
+            good_code: "", // 商品选择
+            customer_code: [], // 企业客户选择
+          };
+        }
+        if (this.$refs.stockForm) {
+          this.$refs.stockForm.resetFields();
+          this.$refs.stockForm.clearValidate();
+
+          this.stockForm = {
+            good_stock: [], //出货仓库
+          };
+        }
+        if (this.$refs.addrForm) {
+          this.$refs.addrForm.resetFields();
+          this.$refs.addrForm.clearValidate();
+          this.addrForm = {
+            order_addr: [],
+          };
+        }
+      });
+    },
+    async addGoodsRes(e) {
+      if (e && e.length === 1) {
+        this.ruleForm.good_name = e[0].good_name;
+        this.ruleForm.good_code = e[0].type_code;
+      } else {
+        this.ruleForm.good_name = "";
+        this.ruleForm.good_code = "";
+      }
+      this.$refs.ruleForm.validateField("good_code");
+      if (this.ruleForm.good_code !== "" && this.id === "add") {
+        await this.getstock(this.ruleForm.good_code);
+      } else {
+        this.stockForm = {
+          good_stock: [], //出货仓库
+        };
+      }
+    },
+    editRow(index) {
+      let findex = this.stockForm.good_stock.findIndex((v) => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有发货仓库信息在编辑,请保存后再试!");
+        return;
+      } else {
+        this.stockForm.good_stock[index].edit = true;
+      }
+    },
+    checkStockRow(index) {
+      let total = parseInt(this.stockForm.good_stock[index].usable_stock),
+        num = parseInt(this.stockForm.good_stock[index].num);
+      if (total === 0) {
+        this.$message.warning("该仓库已无该商品库存!不能销售!");
+        return;
+      } else {
+        if (num > total) {
+          this.$message.warning("销售数量不能大于可用库存!");
+          return;
+        } else {
+          this.stockForm.good_stock[index].edit = false;
+        }
+      }
+    },
+    customer_code_change(e) {
+      if (e && e.code) {
+        this.ruleForm.customer_code = [e.code];
+      } else {
+        this.ruleForm.customer_code = [];
+      }
+      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;
+      } 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) {
+      this.addrForm.order_addr[index].addr_code = e;
+    },
+    //省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate((valid) => {
+        if (valid) {
+          this.addrForm.order_addr[rowIndex].edit = false;
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 省市区删除行操作
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { good_code, customer_code } = JSON.parse(
+            JSON.stringify(this.ruleForm)
+          );
+          const { good_stock } = JSON.parse(JSON.stringify(this.stockForm));
+          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
+          let model = {
+            good_code,
+            customer_code: customer_code.join(","), // 账号
+            order_addr: [],
+            good_stock: [],
+          };
+          let stockT = 0,
+            addrT = 0,
+            isStockOk = true,
+            isSEdit = false,
+            isAEdit = false;
+          good_stock.forEach((v1) => {
+            if (v1.edit) {
+              isSEdit = true;
+            }
+            if (parseInt(v1.usable_stock) < parseInt(v1.num)) {
+              isStockOk = false;
+            }
+            stockT += parseInt(v1.num);
+            let model1 = {
+              num: v1.num,
+              wsm_code: v1.wsm_code,
+            };
+            model.good_stock.push(model1);
+          });
+          order_addr.forEach((v2) => {
+            if (v2.edit) {
+              isAEdit = true;
+            }
+            addrT += parseInt(v2.receipt_quantity);
+            let model2 = {
+              contactor: v2.contactor,
+              mobile: v2.mobile,
+              arrive_time: v2.arrive_time,
+              addr: v2.addr,
+              receipt_quantity: v2.receipt_quantity,
+              addr_code: v2.addr_code,
+            };
+            model.order_addr.push(model2);
+          });
+          if (isSEdit) {
+            this.$message.warning("请保存仓库信息!");
+            this.loading = false;
+            return;
+          }
+          if (isAEdit) {
+            this.$message.warning("请保存地址信息!");
+            this.loading = false;
+            return;
+          }
+          if (!isStockOk) {
+            this.$message.warning("部分仓库销售数量已大于可用数量!");
+            this.loading = false;
+            return;
+          }
+          if (stockT !== addrT) {
+            this.$message.warning(
+              "库存出库总数量,与收货地址信息中的总数量不一致!"
+            );
+            this.loading = false;
+            return;
+          }
+
+          let res = await asyncRequest.add(model);
+
+          this.loading = false;
+          if (res && res.code === 0) {
+            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;
+        }
+      });
+    },
+  },
+};
+</script>
+
+   

+ 843 - 0
src/views/sellOut/consultOrder/components/addForm.vue

@@ -0,0 +1,843 @@
+<template>
+  <div class="salesOrderDetail">
+    <el-row>
+      <el-col :span="24">
+        <el-form
+          ref="ruleForm"
+          :model="ruleForm"
+          status-icon
+          :rules="rulesThis"
+          label-width="95px"
+          class="demo-ruleForm"
+        >
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="商品名称" prop="good_code">
+                <el-input
+                  v-model="ruleForm.good_name"
+                  disabled
+                  readonly
+                  @focus="showGoodsModel = true"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="企业客户" prop="customer_code">
+                <search-customer
+                  :value="ruleForm.customer_code"
+                  :names="companyName"
+                  :disabled="!(status === '0' && powers.some((item) => item == '005'))"
+                  :is-detail="true"
+                  @searchChange="customer_code_change"
+                />
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <search-stock-good-modal
+                :show-model="showGoodsModel"
+                :code="stock_code"
+                @cancel="showGoodsModel = false"
+                @searchChange="addGoodsRes"
+              />
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-col>
+      <el-col :span="24" style="padding: 0 0 20px 0">
+        <el-form :model="stockForm" ref="stockForm" :size="'mini'">
+          <el-table
+            :data="stockForm.good_stock"
+            border
+            :size="'mini'"
+            style="width: 100%"
+            row-key="key"
+          >
+            <el-table-column
+              prop="wsm_supplierNo"
+              label="发货公司编号"
+              width="142"
+            />
+
+            <el-table-column
+              show-overflow-tooltip
+              prop="wsm_supplier"
+              label="发货公司名称"
+              min-width="165"
+            />
+            <el-table-column prop="wsm_code" label="发货仓库编码" width="170" />
+            <el-table-column
+              show-overflow-tooltip
+              prop="wsm_name"
+              label="发货仓库名称"
+              min-width="100"
+            />
+            <el-table-column
+              prop="usable_stock"
+              label="商品可用库存"
+              width="120"
+            />
+
+            <el-table-column prop="num" label="下单数量" width="150">
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="'good_stock.' + scope.$index + '.' + 'num'"
+                  :rules="{}"
+                  :size="'mini'"
+                  style="margin-bottom: 0"
+                >
+                  <el-input
+                    v-model="scope.row.num"
+                    :disabled="!scope.row.edit"
+                  />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="original_price" label="销售价" width="110" />
+
+            <el-table-column
+              fixed="right"
+              width="80"
+              label="操作"
+              v-if="status === '0' && powers.some((item) => item == '005')"
+            >
+              <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)"
+                  ></i>
+                </el-tooltip>
+
+                <el-tooltip
+                  effect="dark"
+                  content="保存"
+                  v-if="scope.row.edit"
+                  placement="top"
+                >
+                  <i
+                    class="el-icon-circle-check tb-icon"
+                    @click="checkStockRow(scope.$index)"
+                  ></i>
+                </el-tooltip>
+
+                <el-tooltip effect="dark" content="删除" placement="top">
+                  <i
+                    class="el-icon-delete tb-icon"
+                    @click="deleteRow(scope.$index, stockForm.good_stock, 0)"
+                  ></i>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </el-col>
+      <el-col :span="24" style="padding: 0 0 22px 0">
+        <el-form :model="addrForm" ref="addrForm" :size="'mini'">
+          <el-table
+            :data="addrForm.order_addr"
+            border
+            :size="'mini'"
+            style="width: 100%"
+            row-key="key"
+          >
+            <el-table-column
+              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="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
+              fixed="right"
+              width="80"
+              v-if="status === '0' && powers.some((item) => item == '005')"
+            >
+              <template slot="header" slot-scope="scope">
+                <span>操作</span>
+                <el-tooltip
+                  class="fr"
+                  style="margin: 3px 0 0 0"
+                  effect="dark"
+                  content="添加"
+                  placement="top"
+                >
+                  <i
+                    class="el-icon-circle-plus-outline tb-icon"
+                    style="color: #63cbe7"
+                    @click="openHouseModal(-1)"
+                  ></i>
+                </el-tooltip>
+              </template>
+              <template slot-scope="scope">
+                <el-tooltip
+                  effect="dark"
+                  content="编辑"
+                  v-if="!scope.row.edit"
+                  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"
+                    @click="deleteRow(scope.$index, addrForm.order_addr, 1)"
+                  ></i>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </el-col>
+      <el-col
+        :span="24"
+        style="text-align: right"
+        v-if="status === '0' && powers.some((item) => item == '005')"
+      >
+        <el-button :size="'mini'" type="primary" @click="submitForm"
+          >保 存
+        </el-button>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+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";
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  props: ["newTime", "id", "sitem"],
+  components: { searchStockGoodModal },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+
+  data() {
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("收货总数不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("收货总数仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      showGoodsModel: false,
+      stock_code: "",
+      companyName: "",
+      ruleForm: {
+        good_name: "",
+        good_code: "", // 商品选择
+        customer_code: [], // 企业客户选择
+      },
+      rulesThis: this.rules,
+      rules: {
+        good_code: [
+          {
+            required: true,
+            message: "请选择商品",
+            trigger: "blur",
+          },
+        ],
+        customer_code: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择企业客户",
+            trigger: "change",
+          },
+        ],
+      },
+      addrForm: {
+        order_addr: [], //收货地址
+      },
+      delAddrList: [],
+      delStockList: [],
+      addrRules: {
+        arrive_time: {
+          required: true,
+          message: "最晚收货日期不能为空",
+          trigger: "change",
+        },
+        receipt_quantity: {
+          required: true,
+          validator: validateWeight,
+          trigger: "blur",
+        },
+
+        contactor: {
+          required: true,
+          trigger: "blur",
+          message: "联系人不能为空",
+        },
+        mobile: {
+          required: true,
+          validator: validatemobile,
+          trigger: "blur",
+        },
+
+        order_addr: {
+          type: "array",
+          required: true,
+          message: "收货省市区不能为空",
+          trigger: "change",
+        },
+        addr: {
+          required: true,
+          message: "详细地址不能为空",
+          trigger: "blur",
+        },
+      },
+      stockForm: {
+        good_stock: [], //出货仓库
+      },
+      loading: false,
+      queryId: "",
+      status: "",
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      this.status = "";
+      this.queryId = this.$route.query.id;
+      this.rulesThis = this.rules;
+      this.resetForm();
+    },
+    async getstock(code) {
+      this.loading = true;
+      let model = {
+        wsm_code: "",
+        page: 1,
+        size: 100,
+        type_code: code,
+        good_code: "",
+        good_name: "",
+        supplierNo: "",
+        stock_low: "",
+        stock_up: "",
+        warn_low: "",
+        warn_up: "",
+        stock_max: "1",
+      };
+      const res = await asyncRequest.getGoodStock(model);
+      if (res && res.code === 0 && res.data) {
+        this.stockForm = {
+          good_stock: [], //出货仓库
+        };
+        const { list } = res.data;
+        list.forEach((v) => {
+          let model = {
+            num: v.usable_stock,
+            usable_stock: v.usable_stock,
+            wsm_name: v.wsm_name,
+            wsm_supplier: v.wsm_supplier,
+            wsm_supplierNo: v.wsm_supplierNo,
+            wsm_code: v.wsm_code,
+            original_price: v.original_price,
+            id: "",
+            is_del: 0,
+            edit: false,
+          };
+          this.stockForm.good_stock.push(model);
+        });
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          const { good_code, good_name, customer_code, companyName, status } =
+            this.sitem;
+          this.companyName = companyName;
+          this.status = status;
+          this.ruleForm = {
+            good_code: good_code || "", // 商品选择
+            good_name: good_name || "",
+            customer_code: customer_code ? [customer_code] : "", // 企业客户选择
+          };
+        }
+        if (this.$refs.stockForm) {
+          this.$refs.stockForm.resetFields();
+          this.$refs.stockForm.clearValidate();
+          const { info } = this.sitem;
+          this.stockForm = {
+            good_stock: [], //出货仓库
+          };
+          this.delStockList = [];
+          if (info && info.length > 0) {
+            info.forEach((v) => {
+              let model = {
+                id: v.id,
+                num: v.num || "",
+                usable_stock: v.usable_stock || "",
+                wsm_name: v.wsm_name || "",
+                wsm_supplier: v.wsm_supplier || "",
+                wsm_supplierNo: v.wsm_supplierNo || "",
+                wsm_code: v.wsm_code || "",
+                original_price: v.sale_price || "",
+                edit: false,
+                is_del: 0,
+              };
+              this.delStockList.push(model);
+              this.stockForm.good_stock.push(model);
+            });
+          }
+        }
+        if (this.$refs.addrForm) {
+          this.$refs.addrForm.resetFields();
+          this.$refs.addrForm.clearValidate();
+          const { addrs } = this.sitem;
+          this.addrForm = {
+            order_addr: [],
+          };
+          this.delAddrList = [];
+
+          if (addrs && addrs.length > 0) {
+            addrs.forEach((v) => {
+              const { area_code, city_code, provice_code } = v.addr_code;
+              let model = {
+                edit: false,
+                arrive_time: v.arrive_time || "",
+                receipt_quantity: v.receipt_quantity || "",
+                contactor: v.contactor || "",
+                mobile: v.mobile || "",
+                addr_code: area_code&&city_code&&provice_code?[provice_code,city_code,area_code] : [],
+                addr: v.addr || "",
+                id: v.id,
+                is_del: 0,
+              };
+              this.delAddrList.push(model);
+              this.addrForm.order_addr.push(model);
+            });
+          }
+        }
+      });
+    },
+    async addGoodsRes(e) {
+      if (e && e.length === 1) {
+        this.ruleForm.good_name = e[0].good_name;
+        this.ruleForm.good_code = e[0].type_code;
+      } else {
+        this.ruleForm.good_name = "";
+        this.ruleForm.good_code = "";
+      }
+      this.$refs.ruleForm.validateField("good_code");
+      if (this.ruleForm.good_code !== "" && this.queryId === "add") {
+        await this.getstock(this.ruleForm.good_code);
+      } else {
+        // this.stockForm = {
+        //   good_stock: [], //出货仓库
+        // };
+      }
+    },
+    editRow(index) {
+      let findex = this.stockForm.good_stock.findIndex((v) => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有发货仓库信息在编辑,请保存后再试!");
+        return;
+      } else {
+        this.stockForm.good_stock[index].edit = true;
+      }
+    },
+    checkStockRow(index) {
+      let total = parseInt(this.stockForm.good_stock[index].usable_stock),
+        num = parseInt(this.stockForm.good_stock[index].num);
+      if (total === 0) {
+        this.$message.warning("该仓库已无该商品库存!不能销售!");
+        return;
+      } else {
+        if (num > total) {
+          this.$message.warning("销售数量不能大于可用库存!");
+          return;
+        } else {
+          this.stockForm.good_stock[index].edit = false;
+        }
+      }
+    },
+    customer_code_change(e) {
+      if (e && e.code) {
+        this.ruleForm.customer_code = [e.code];
+      } else {
+        this.ruleForm.customer_code = [];
+      }
+      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;
+      } 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) {
+      this.addrForm.order_addr[index].addr_code = e;
+    },
+    //省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate((valid) => {
+        if (valid) {
+          this.addrForm.order_addr[rowIndex].edit = false;
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 删除收货地址操作
+    deleteRow(index, rows, type) {
+      const id = rows[index].id;
+      if (type === 0) {
+        if (id) {
+          this.delStockList.push(rows[index]);
+        }
+      } else {
+        if (id) {
+          this.delAddrList.push(rows[index]);
+        }
+      }
+      rows.splice(index, 1);
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { good_code, customer_code } = JSON.parse(
+            JSON.stringify(this.ruleForm)
+          );
+          const { good_stock } = JSON.parse(JSON.stringify(this.stockForm));
+          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
+          if (good_stock.length === 0) {
+            this.$message.warning("请填写仓库信息!");
+            this.loading = false;
+            return;
+          }
+          if (order_addr.length === 0) {
+            this.$message.warning("请填写仓库信息!");
+            this.loading = false;
+            return;
+          }
+          let model = {
+            good_code,
+            customer_code: customer_code.join(","), // 账号
+            order_addr: [],
+            good_stock: [],
+          };
+          let stockT = 0,
+            addrT = 0,
+            isStockOk = true,
+            isSEdit = false,
+            isAEdit = false;
+          good_stock.forEach((v1) => {
+            if (v1.edit) {
+              isSEdit = true;
+            }
+            if (parseInt(v1.usable_stock) < parseInt(v1.num)) {
+              isStockOk = false;
+            }
+            stockT += parseInt(v1.num);
+            let model1 = {
+              num: v1.num,
+              wsm_code: v1.wsm_code,
+              id: v1.id,
+              is_del: 0,
+            };
+            model.good_stock.push(model1);
+          });
+          order_addr.forEach((v2) => {
+            if (v2.edit) {
+              isAEdit = true;
+            }
+            addrT += parseInt(v2.receipt_quantity);
+            let model2 = {
+              contactor: v2.contactor,
+              mobile: v2.mobile,
+              arrive_time: v2.arrive_time,
+              addr: v2.addr,
+              receipt_quantity: v2.receipt_quantity,
+              addr_code: v2.addr_code,
+              id: v2.id,
+              is_del: 0,
+            };
+            model.order_addr.push(model2);
+          });
+          if (isSEdit) {
+            this.$message.warning("请保存仓库信息!");
+            this.loading = false;
+            return;
+          }
+          if (isAEdit) {
+            this.$message.warning("请保存地址信息!");
+            this.loading = false;
+            return;
+          }
+          if (!isStockOk) {
+            this.$message.warning("部分仓库销售数量已大于可用数量!");
+            this.loading = false;
+            return;
+          }
+          if (stockT !== addrT) {
+            this.$message.warning(
+              "库存出库总数量,与收货地址信息中的总数量不一致!"
+            );
+            this.loading = false;
+            return;
+          }
+          let dAList = JSON.parse(JSON.stringify(this.delAddrList));
+          let dSList = JSON.parse(JSON.stringify(this.delStockList));
+          good_stock.forEach((v) => {
+            let findex = dSList.findIndex((v1) => v1.wsm_code === v.wsm_code);
+            if (findIndex !== -1) {
+              dSList.splice(findex, 1);
+            }
+          });
+          order_addr.forEach((v) => {
+            let findex = dAList.findIndex(
+              (v1) => v1.id !== "" && v1.id === v.id
+            );
+            if (findIndex !== -1) {
+              dAList.splice(findex, 1);
+            }
+          });
+          dSList.forEach((v) => {
+            v.is_del = 1;
+          });
+          dAList.forEach((v) => {
+            v.is_del = 1;
+          });
+
+          let res = {};
+          if (this.queryId === "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.queryId === "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;
+        }
+      });
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.salesOrderDetail {
+}
+</style>
+   
+   

+ 286 - 0
src/views/sellOut/consultOrder/components/feedback-form.vue

@@ -0,0 +1,286 @@
+<template>
+  <div class="salesOrderDetail">
+    <el-row>
+      <el-col :span="24" style="padding: 0 0 22px 0">
+        <el-form :model="addrForm" ref="addrForm" :size="'mini'">
+          <el-table
+            :data="addrForm.order_addr"
+            border
+            :size="'mini'"
+            style="width: 100%"
+            row-key="key"
+          >
+            <el-table-column
+              show-overflow-tooltip
+              prop="receipt_quantity"
+              label="收货总数"
+              width="110"
+            />
+
+            <el-table-column
+              show-overflow-tooltip
+              prop="arrive_time"
+              label="最晚收货日期"
+              width="145"
+            />
+            <el-table-column
+              show-overflow-tooltip
+              prop="contactor"
+              label="收件联系人"
+              width="85"
+            />
+
+            <el-table-column
+              show-overflow-tooltip
+              prop="mobile"
+              label="收货联系电话"
+              width="110"
+            />
+
+            <el-table-column
+              show-overflow-tooltip
+              prop="addr"
+              label="收货地址"
+              min-width="200"
+            />
+
+            <el-table-column
+              prop="post_fee"
+              label="预计物流费用"
+              min-width="170"
+            >
+              <template slot-scope="scope">
+                <el-form-item
+                  :prop="'order_addr.' + scope.$index + '.' + 'post_fee'"
+                  :rules="addrRules.post_fee"
+                  :size="'mini'"
+                  :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
+                >
+                  <el-input
+                    v-model="scope.row.post_fee"
+                    :disabled="!scope.row.edit"
+                  />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column
+              fixed="right"
+              width="80"
+              label="操作"
+              v-if="status === '1' && powers.some((item) => item == '033')"
+            >
+              <template slot-scope="scope">
+                <el-tooltip
+                  effect="dark"
+                  content="编辑"
+                  v-if="!scope.row.edit"
+                  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>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form>
+      </el-col>
+      <el-col
+        :span="24"
+        style="text-align: right"
+        v-if="status === '1' && powers.some((item) => item == '033')"
+      >
+        <el-button :size="'mini'" type="primary" @click="submitForm"
+          >保 存
+        </el-button>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
+import searchStockGoodModal from "@/components/search-stock-good-modal";
+import { isnumber2 } from "@/utils/validate";
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  props: ["newTime", "id", "sitem"],
+  components: { searchStockGoodModal },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+
+  data() {
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("物流费用不能为空"));
+      } else {
+        if (!isnumber2(value)) {
+          callback(new Error("物流费用仅支持整数或两位小数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+
+    return {
+      showGoodsModel: false,
+      stock_code: "",
+      addrForm: {
+        order_addr: [], //收货地址
+      },
+      addrRules: {
+        post_fee: {
+          required: true,
+          validator: validateWeight,
+          trigger: "blur",
+        },
+      },
+      loading: false,
+      queryId: "",
+      status: "",
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      this.status = "";
+      this.queryId = this.$route.query.id;
+      this.rulesThis = this.rules;
+      this.resetForm();
+    },
+
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.addrForm) {
+          this.$refs.addrForm.resetFields();
+          this.$refs.addrForm.clearValidate();
+          const { addrs, status } = this.sitem;
+          this.status = status;
+          this.addrForm = {
+            order_addr: [],
+          };
+          if (addrs && addrs.length > 0) {
+            addrs.forEach((v) => {
+              let model = {
+                edit: false,
+                arrive_time: v.arrive_time || "",
+                receipt_quantity: v.receipt_quantity || "",
+                contactor: v.contactor || "",
+                mobile: v.mobile || "",
+                addr: v.addr_info + v.addr || "",
+                id: v.id,
+                post_fee: v.post_fee || "",
+                is_del: 0,
+              };
+              this.addrForm.order_addr.push(model);
+            });
+          }
+        }
+      });
+    },
+
+    openHouseModal(index) {
+      let findex = this.addrForm.order_addr.findIndex((v) => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
+      } else {
+        this.addrForm.order_addr[index].edit = true;
+      }
+    },
+
+    //省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate((valid) => {
+        if (valid) {
+          this.addrForm.order_addr[rowIndex].edit = false;
+        } else {
+          return false;
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.addrForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
+          let model = {
+            id: this.queryId,
+            order_addr: [],
+          };
+          order_addr.forEach((v2) => {
+            let model2 = {
+              post_fee: v2.post_fee,
+              id: v2.id,
+            };
+            model.order_addr.push(model2);
+          });
+          let res = await asyncRequest.salefee(model);
+          this.loading = false;
+          if (res && res.code === 0) {
+            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;
+        }
+      });
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.salesOrderDetail {
+}
+</style>
+   
+   

+ 365 - 0
src/views/sellOut/consultOrder/components/order-out-table.vue

@@ -0,0 +1,365 @@
+<template>
+  <div class="outOrderTable">
+    <el-table
+      ref="addrForm"
+      :data="tableData"
+      border
+      :size="'mini'"
+      style="width: 100%"
+      row-key="key"
+    >
+      <el-table-column
+        show-overflow-tooltip
+        prop="orderCode"
+        label="出库订单号"
+        width="150"
+      />
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="outCode"
+        label="出库单号"
+        width="150"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="apply_name"
+        label="申请人名称"
+        width="85"
+      />
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_name"
+        label="物流公司"
+        width="110"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_code"
+        label="物流单号"
+        width="160"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_fee"
+        label="预计物流费"
+        width="100"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="status"
+        label="状态"
+        width="80"
+      >
+        <template slot-scope="scope">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </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="验收数量"
+        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"
+        label="联系人"
+        width="80"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="mobile"
+        label="联系电话"
+        width="110"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="wsm_supplier"
+        label="供应商"
+        min-width="220"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="wsm_supplierNo"
+        label="仓库供应商"
+        min-width="170"
+      />
+
+      <!-- v-if="status === '0' && powers.some((item) => item == '005')" -->
+      <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"
+            effect="dark"
+            content="添加"
+            placement="top"
+          >
+            <i
+              class="el-icon-circle-plus-outline tb-icon"
+              style="color: #63cbe7"
+              @click="openHouseModal()"
+            ></i>
+            <!-- @click="openModal('add', '028')"  -->
+
+            <!--  -->
+          </el-tooltip>
+        </template>
+
+        <template slot-scope="scope">
+          <el-tooltip
+            effect="dark"
+            content="查看"
+            v-if="!scope.row.edit"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openHouseModal(scope.$index)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="sitem.status == '5'"
+            class="fr"
+            effect="dark"
+            content="新建售后申请"
+            placement="top"
+          >
+            <i
+              class="el-icon-warning tb-icon"
+              @click="openModal('add', scope.row)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <out-order-add-model
+      :showModel="modelShowModel"
+      :id="modelId"
+      :sitem="modelItem"
+    />
+    <add-edit
+      :id="modelId"
+      :sitem="s_sitem"
+      :show-model="showModel"
+      :is-detail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
+  </div>
+</template>
+   <script>
+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/goodsService/components/addEdit.vue";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  props: ["newTime", "id", "sitem"],
+  components: { addEdit, outOrderAddModel },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+
+  data() {
+    return {
+      // 状态
+      statusOptions: [
+        { id: "1", label: "已出库" },
+        { id: "2", label: "验收中" },
+        { id: "3", label: "验收完成" },
+      ],
+      showGoodsModel: false,
+      stock_code: "",
+      tableData: [],
+      loading: false,
+      queryId: "",
+      status: "",
+      showModel: null,
+      modelId: "",
+      modelItem: null,
+      s_sitem: null,
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      console.log("12");
+      this.status = "";
+      this.queryId = this.$route.query.id;
+      // this.rulesThis = this.rules;
+      this.resetForm();
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        // console.log(this.$refs.addrForm);
+        // if (this.$refs.addrForm) {
+        //   this.$refs.addrForm.resetFields();
+        //   this.$refs.addrForm.clearValidate();
+        const { bum } = this.sitem;
+        this.tableData = bum;
+        // }
+      });
+    },
+
+    editRow(index) {
+      let findex = this.stockForm.good_stock.findIndex((v) => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有发货仓库信息在编辑,请保存后再试!");
+        return;
+      } else {
+        this.stockForm.good_stock[index].edit = true;
+      }
+    },
+    checkStockRow(index) {
+      let total = parseInt(this.stockForm.good_stock[index].usable_stock),
+        num = parseInt(this.stockForm.good_stock[index].num);
+      if (total === 0) {
+        this.$message.warning("该仓库已无该商品库存!不能销售!");
+        return;
+      } else {
+        if (num > total) {
+          this.$message.warning("销售数量不能大于可用库存!");
+          return;
+        } else {
+          this.stockForm.good_stock[index].edit = false;
+        }
+      }
+    },
+
+    openHouseModal() {
+      this.modelId = "add";
+      this.modelItem = this.sitem;
+      this.modelShowModel = true;
+    },
+
+    //省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate((valid) => {
+        if (valid) {
+          this.tableData[rowIndex].edit = false;
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    // 省市区删除行操作
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { order_addr } = JSON.parse(JSON.stringify(this.addrForm));
+          let model = {
+            id: this.queryId,
+            order_addr: [],
+          };
+          order_addr.forEach((v2) => {
+            let model2 = {
+              post_fee: v2.post_fee,
+              id: v2.id,
+            };
+            model.order_addr.push(model2);
+          });
+          let res = await asyncRequest.salefee(model);
+          this.loading = false;
+          if (res && res.code === 0) {
+            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;
+        }
+      });
+    },
+    openModal(code, btn_code) {
+      console.log(code, btn_code);
+      this.s_sitem = btn_code;
+      this.btn_code = btn_code;
+      this.modelId = code;
+      this.showModel = true;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+
+</style>
+   

+ 402 - 0
src/views/sellOut/consultOrder/components/out-order-add-model.vue

@@ -0,0 +1,402 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="title"
+    :center="true"
+    align="left"
+    top="8vh"
+    width="900px"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    @close="closeModel"
+  >
+    <el-card style="margin-top: -20px" class="account">
+      <el-row :gutter="10">
+        <el-col :span="24" style="margin: -15px 0 0 0">
+          <el-divider>选择销售仓库</el-divider>
+        </el-col>
+        <el-col :span="24">
+          <el-table
+            ref="multipleTable"
+            :data="tableData"
+            border
+            :size="'mini'"
+            tooltip-effect="dark"
+            style="width: 100%"
+            @selection-change="handleSelectionChange($event, 0)"
+          >
+            <el-table-column type="selection" width="40" align="center" />
+            <el-table-column
+              prop="wsm_supplier"
+              label="发货仓库"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.wsm_supplier }}/{{ scope.row.wsm_name }}
+              </template>
+            </el-table-column>
+            <el-table-column prop="num" label="总下单数量" width="110" />
+            <el-table-column prop="send_num" label="已发货数量" width="110" />
+            <el-table-column prop="wsend_num" label="未发货数量" width="110" />
+            <el-table-column prop="sale_price" label="销售价" width="110" />
+          </el-table>
+        </el-col>
+        <el-col :span="24">
+          <el-divider>选择收货地址</el-divider>
+        </el-col>
+        <el-col :span="24">
+          <el-table
+            ref="multipleTable"
+            :data="tableData1"
+            border
+            :size="'mini'"
+            tooltip-effect="dark"
+            style="width: 100%"
+            @selection-change="handleSelectionChange($event, 1)"
+          >
+            <el-table-column type="selection" width="40" align="center" />
+            <el-table-column
+              prop="receipt_quantity"
+              label="总数量"
+              width="100"
+            />
+            <el-table-column prop="send_num" label="已发货数量" width="100" />
+            <el-table-column prop="wsend_num" label="未发货数量" width="100" />
+            <el-table-column
+              prop="arrive_time"
+              label="最晚到货时间"
+              width="145"
+            />
+            <el-table-column prop="contactor" label="收件人" width="60" />
+            <el-table-column prop="mobile" label="联系电话" width="105" />
+            <el-table-column
+              prop="contactor"
+              label="收件地址"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.addr_info }}{{ scope.row.addr }}
+              </template>
+            </el-table-column>
+            <!-- <el-table-column prop="post_fee" label="物流费" width="100" /> -->
+          </el-table>
+        </el-col>
+        <el-form
+          ref="ruleForm"
+          :model="ruleForm"
+          status-icon
+          :rules="rulesThis"
+          label-width="90px"
+          class="demo-ruleForm"
+        >
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="发货数量" prop="send_num">
+                <el-input v-model="ruleForm.send_num" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流费用" prop="post_fee">
+                <el-input v-model="ruleForm.post_fee" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流公司" prop="post_name">
+                <!-- <el-input v-model="ruleForm.post_name" /> -->
+                <search-express
+                  :value="ruleForm.post_name"
+                  :placeholder="'请输入物流公司'"
+                  :names="''"
+                  :disabled="false"
+                  :is-detail="false"
+                  @searchChange="handleCompany"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="物流单号" prop="post_code">
+                <el-input v-model="ruleForm.post_code" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-col :span="24" style="text-align: right">
+            <el-button type="primary" @click="submitForm">保 存 </el-button>
+            <el-button @click="showModelThis = false">关 闭</el-button>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
+import resToken from "@/mixins/resToken";
+import { isnumber, isnumber2, isAlphanumeric } from "@/utils/validate";
+export default {
+  name: "Account",
+  props: ["showModel", "id", "sitem"],
+  mixins: [resToken],
+  data() {
+    const validatePrice = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (isnumber2(value)) {
+          callback();
+        } else {
+          callback(new Error("仅支持整数或两位小数!"));
+        }
+      }
+    };
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validateCode = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isAlphanumeric(value)) {
+          callback(new Error("仅支持字母和数字!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      roleList: [],
+      tableData: [],
+      tableData1: [],
+      loading: false,
+      title: "新建销售出库单",
+      list1: [],
+      list0: [],
+      showModelThis: this.showModel,
+      rulesThis: {},
+      rules: {
+        send_num: {
+          required: true,
+          validator: validateWeight,
+          trigger: "blur",
+        },
+        post_name: {
+          type: "array",
+          required: true,
+          trigger: "change",
+          message: "请输入物流公司",
+        },
+        post_code: {
+          required: true,
+          validator: validateCode,
+          trigger: "blur",
+        },
+        post_fee: {
+          required: true,
+          validator: validatePrice,
+          trigger: "blur",
+        },
+      },
+      supplierName: "",
+      good_price: "0",
+      lasttime: "",
+      ruleForm: {
+        post_name: [], //裸价
+        post_code: "", //仓库
+        post_fee: "", //供应商
+        send_num: "", //采购供应商编码
+        addrid: "",
+        orderCode: "",
+        wsm_code: "",
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+
+    handleSelectionChange(e, type) {
+      if (type === 0) {
+        this.list0 = e;
+        this.ruleForm.wsm_code = e && e.length > 0 ? e[0].wsm_code : "";
+      } else {
+        this.list1 = e;
+        this.ruleForm.addrid = e && e.length > 0 ? e[0].id : "";
+      }
+      console.log(type);
+      console.log(this.ruleForm.wsm_code, this.ruleForm.addrid);
+      console.log(this.ruleForm);
+    },
+    async initForm() {
+      this.loading = true;
+      this.list0 = [];
+      this.list1 = [];
+      this.rulesThis = this.rules;
+      await this.resetForm();
+      this.loading = false;
+    },
+
+    //初始化表单
+    async resetForm() {
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          const { addrs, info, orderCode } = this.sitem;
+          this.tableData = info;
+          this.tableData1 = addrs;
+          this.ruleForm = {
+            post_name: [],
+            post_code: "xxx2322",
+            post_fee: "20",
+            send_num: "10",
+            addrid: "",
+            orderCode: orderCode || "",
+            wsm_code: "",
+          };
+        }
+      });
+    },
+    // 保存更改
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          const item = JSON.parse(JSON.stringify(this.ruleForm));
+          if (this.list0.length === 0) {
+            this.$message.warning("请选择发货仓库!");
+            return;
+          }
+          if (this.list1.length === 0) {
+            this.$message.warning("请选择收货地址!");
+            return;
+          }
+          if (this.list0.length !== 1) {
+            this.$message.warning("只能选择一个发货仓库!");
+            return;
+          }
+          if (this.list1.length !== 1) {
+            this.$message.warning("只能选择一个收货地址!");
+            return;
+          }
+          let cNum = parseInt(this.list0[0].wsend_num);
+          let aNum = parseInt(this.list1[0].wsend_num);
+          let num = parseInt(this.ruleForm.send_num);
+          if (num > cNum) {
+            this.$message.warning("发货数量不能大于仓库未发货数量!");
+            return;
+          }
+          if (num > aNum) {
+            this.$message.warning("发货数量不能大于收货地址未发货数量!");
+            return;
+          }
+          this.loading = true;
+          const res = await asyncRequest.saleout(item);
+          this.loading = false;
+          if (res && res.code === 0) {
+            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;
+        }
+      });
+    },
+    handleCompany(e) {
+      console.log(e);
+      if (e && e.code) {
+        this.ruleForm.post_name = [e.code];
+        this.ruleForm.page = 1;
+      }
+      console.log(this.ruleForm);
+      this.$refs.ruleForm.validateField("post_name");
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.account {
+  .gongshi {
+    span {
+      vertical-align: top;
+      display: inline-block;
+      color: #000;
+    }
+    .icon-span {
+      padding: 0 5px;
+      height: 40px;
+      line-height: 40px;
+      font-size: 20px;
+      color: #606266;
+      display: inline-block;
+      // vertical-align: top;
+      // display: inline-block;
+    }
+    .label {
+      height: 40px;
+      line-height: 40px;
+    }
+    .tuan {
+      &.chu {
+        width: 60px;
+        height: 40px;
+        display: inline-block;
+        span {
+          width: 60px;
+          display: inline-block;
+          line-height: 20px;
+          text-align: center;
+          font-size: 12px;
+          height: 20px;
+          &:last-child {
+            border-top: 1px solid #606266;
+          }
+        }
+      }
+      &.cheng {
+        .name {
+          height: 40px;
+          line-height: 40px;
+        }
+        .icon-span {
+          line-height: 40px;
+          font-size: 16px;
+          padding: 0 1px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 245 - 0
src/views/sellOut/consultOrder/detail.vue

@@ -0,0 +1,245 @@
+<template>
+  <div class="salesOrderDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <div class="tl" style="padding: 10px 0">
+        <!-- <span> {{ status }}----{{ powers }}</span> -->
+
+        <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
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="statusConfirm('3', '开始发货')"
+          v-if="status === '2' && powers.some((item) => item == '026')"
+          >开始发货
+        </el-button>
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          plain
+          :size="'mini'"
+          v-if="
+            status !== '' &&
+            status !== '3' &&
+            powers.some((item) => item == '015')
+          "
+          >作废该条信息</el-button
+        >
+      </div>
+  <status-bar
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :options="statusOptions"
+            :status="status"
+          />
+      <el-collapse v-model="activeNames">
+        <!-- <el-collapse-item title="审批节点" name="-1">
+        
+        </el-collapse-item> -->
+        <el-collapse-item title="销售订单信息" name="0">
+          <add-form
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+        </el-collapse-item>
+        <el-collapse-item title="采购反馈物流" name="1">
+          <feedback-form
+            :newTime="newTime"
+            v-if="newTime !== '' && status == 1"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+        </el-collapse-item>
+        <el-collapse-item title="销售出库单" name="3">
+          <order-out-table
+            :newTime="newTime"
+            v-if="newTime !== '' && status == 3"
+            :sitem="sitem"
+            :id="queryId"
+            @refresh="initData()"
+          />
+        </el-collapse-item>
+        <el-collapse-item title="审批记录" name="10">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'XSQRD'"
+            :orderCode="orderCode"
+          />
+        </el-collapse-item>
+      </el-collapse>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+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";
+
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    addForm,
+    feedbackForm,
+    orderOutTable,
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  mounted() {
+    console.log(this.$route);
+  },
+  data() {
+    return {
+      finishStatus: "finish",
+      activeNames: ["-1", "0", "1", "2", "3", "4", "5", "10"],
+      statusOptions: [
+        { value: "0", label: "取消" },
+        { value: "1", label: "发起" },
+        { value: "2", label: "反馈物流费" },
+        { value: "3", label: "同意下单" },
+        { value: "4", label: "发货中" },
+        { value: "5", label: "已发货" },
+      ],
+      sitem: null,
+      orderCode: "",
+      status: "",
+      newTime: "",
+      loading: false,
+      queryId: "",
+    };
+  },
+  mounted() {
+    this.status = "";
+    this.queryId = this.$route.query.id;
+    this.initData();
+  },
+  methods: {
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf() + "";
+      console.log(this.orderCode);
+      console.log(this.newTime);
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.queryId });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("check", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message, remark) {
+      let model = {
+        id: this.queryId,
+        remark: remark || "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        this.initData();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    async examForm(e) {
+      if (!this.loading) {
+        let type = e.state === "1" ? "2" : "0";
+        await this.setStatus(type, "提交入库方审核", e.remark);
+      }
+    },
+    async initData() {
+      this.loading = true;
+      const res = await asyncRequest.detail({ id: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        this.status = this.sitem.status;
+        this.orderCode = this.sitem.orderCode;
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.salesOrderDetail {
+}
+</style>
+   
+   

+ 0 - 0
src/views/sellOut/consultOrder/咨询单管理 → src/views/sellOut/consultOrder/咨询订单管理


+ 368 - 0
src/views/sellOut/consultSheet/addEdit.vue

@@ -0,0 +1,368 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="title"
+    :center="true"
+    align="left"
+    top="10vh"
+    width="1040px"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    @close="closeModel"
+  >
+    <el-card style="margin-top: -20px" class="modal-form-style">
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            label-width="110px"
+            id="demo-ruleForm"
+          >
+            <el-row v-if="ruleForm !== null">
+              <el-col v-for="item in columns" :key="item.prop" :span="item.col">
+                <el-form-item :label="item.label + ':'">
+                  <div>{{ ruleForm[item.prop] }}{{ item.unit }}</div>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+          <!-- <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            label-width="110px"
+            class="demo-ruleForm"
+          >
+            <el-form-item
+              v-if="id === 'add' || isDetail"
+              label="账号"
+              prop="username"
+            >
+              <el-input v-model="ruleForm.username" :disabled="isDetail" />
+            </el-form-item>
+            <el-form-item label="真实姓名" prop="name">
+              <el-input v-model="ruleForm.name" :disabled="isDetail" />
+            </el-form-item>
+            <el-form-item label="手机号" prop="mobile">
+              <el-input v-model="ruleForm.mobile" :disabled="isDetail" />
+            </el-form-item>
+            <el-form-item label="所在部门" prop="itemid">
+              <all-organize
+                :value="ruleForm.itemid"
+                :is-detail="isDetail"
+                :disabled="isDetail"
+                :multiple="true"
+                :checkStrictly="true"
+                :placeholder="'请选择所在部门'"
+                @searchChange="itemidChange"
+              />
+            </el-form-item>
+            <el-form-item label="邮箱" prop="email">
+              <el-input v-model="ruleForm.email" :disabled="isDetail" />
+            </el-form-item>
+
+            <el-form-item label="角色" prop="role_id">
+              <el-radio-group v-model="ruleForm.role_id" :disabled="isDetail">
+                <el-radio
+                  v-for="item in roleList"
+                  :key="item.id"
+                  :label="item.id"
+                  :disabled="item.status !== '1'"
+                  >{{ item.role_name }}</el-radio
+                >
+              </el-radio-group>
+            </el-form-item>
+
+            <el-form-item label="状态" prop="status">
+              <el-switch
+                v-model="ruleForm.status"
+                active-value="1"
+                inactive-value="0"
+                :disabled="isDetail"
+              />
+            </el-form-item>
+          </el-form> -->
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button v-if="!isDetail" type="primary" @click="submitForm"
+            >保 存
+          </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/consultSheet";
+import resToken from "@/mixins/resToken";
+import {
+  isnumber,
+  isMobile,
+  validEmail,
+  isAlphanumeric,
+  isChinese,
+  isEmoticon,
+  validAlphabets,
+} from "@/utils/validate";
+import columns from "./columnsForm";
+export default {
+  name: "Account",
+  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)) {
+            console.log(9999);
+            callback(new Error("真实姓名规则为2~12位汉字!"));
+          } else if (isEmoticon(value)) {
+            console.log(2345);
+            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 {
+      roleList: [],
+      loading: false,
+      title: "添加账号",
+      organizeList: [],
+      columns: columns.addColumns,
+      showModelThis: this.showModel,
+      ruleForm: {
+        username: "", // 账号
+        name: "", // 真实姓名
+        mobile: "",
+        email: "",
+        role_id: "",
+        status: "1",
+        itemid: [],
+      },
+      rulesThis: this.rules,
+      rules: {
+        name: [
+          {
+            required: true,
+            validator: validatename,
+            trigger: "blur",
+          },
+        ],
+        username: [
+          {
+            required: true,
+            validator: validateusername,
+            trigger: "blur",
+          },
+        ],
+        mobile: [
+          {
+            required: true,
+            validator: validatemobile,
+            trigger: "blur",
+          },
+        ],
+        email: [
+          {
+            required: false,
+            validator: validateEmail,
+            trigger: "blur",
+          },
+        ],
+        role_id: [
+          {
+            required: true,
+            message: "请选择角色",
+            trigger: "change",
+          },
+        ],
+        itemid: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择所在部门",
+            trigger: "change",
+          },
+        ],
+        status: [
+          {
+            required: true,
+            message: "请选择状态",
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    itemidChange(e) {
+      console.log(e);
+      this.ruleForm.itemid = e;
+      this.$refs.ruleForm.validateField("itemid");
+    },
+    async initForm() {
+      this.title = "添加咨询订单";
+      this.loading = true;
+      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) {
+        this.ruleForm = res.data;
+        this.ruleForm.mark_fee = this.setNum(this.ruleForm.mark_fee);
+        this.ruleForm.cert_fee = this.setNum(this.ruleForm.cert_fee);
+        this.ruleForm.package_fee = this.setNum(this.ruleForm.package_fee);
+        this.ruleForm.open_fee = this.setNum(this.ruleForm.open_fee);
+        this.ruleForm.cost_fee = this.setNum(this.ruleForm.cost_fee);
+        this.ruleForm.delivery_fee = this.setNum(this.ruleForm.delivery_fee);
+        this.ruleForm.sale_craft = this.setNum(this.ruleForm.sale_craft);
+        this.ruleForm.total_fee = this.setNum(this.ruleForm.total_fee);
+        this.ruleForm.sale_price = this.setNum(this.ruleForm.sale_price);
+        this.ruleForm.sale_fee = this.setNum(this.ruleForm.sale_fee);
+        this.ruleForm.bare_fee = this.setNum(this.ruleForm.bare_fee);
+      } 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 =null
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const { username, name, mobile, email, role_id, status, itemid } =
+            JSON.parse(JSON.stringify(this.ruleForm));
+          console.log(this.ruleForm);
+          const model = {
+            id: this.id,
+            username: username || "", // 账号
+            nickname: name || "", // 真实姓名
+            mobile: mobile || "",
+            email: email || "",
+            role: role_id || "",
+            status: status || "",
+            itemid: itemid || [],
+          };
+          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;
+        }
+      });
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 70 - 0
src/views/sellOut/consultSheet/columns.js

@@ -0,0 +1,70 @@
+export default [
+
+  {
+    prop: "orderCode",
+    label: "销售订单编号",
+    width: "155px",
+  },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    width: "60px",
+  },
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+  {
+    prop: "good_class",
+    label: "商品分类",
+  },
+
+  {
+    prop: "good_num",
+    label: "商品数量",
+  },
+  {
+    prop: "sale_price",
+    label: "销售单价",
+  },
+  {
+    prop: "total_price",
+    label: "总价",
+  },
+  {
+    prop: "post_fee",
+    label: "总物流费",
+  },
+  {
+    prop: "customer_code",
+    label: "客户公司编码",
+
+    width: "215px",
+  },
+
+
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "120px",
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "145px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]

+ 656 - 0
src/views/sellOut/consultSheet/columnsForm.js

@@ -0,0 +1,656 @@
+export default {
+    showColumns: [
+        // {
+        //     prop: "name",
+        //     label: "数据标题",
+        //     col: "8",
+        // },
+        {
+            prop: "sequenceNo",
+            label: "单据号",
+            col: "8",
+        },
+        {
+            prop: "cpzxNo",
+            label: "产品咨询单号",
+            col: "8",
+        },
+        {
+            prop: "salesman",
+            label: "申请人",
+            col: "8",
+        },
+        {
+            prop: "saler",
+            label: "采购人员",
+            col: "8",
+        },
+
+        {
+            prop: "brank",
+            label: "品牌",
+            col: "8",
+        },
+
+        {
+            prop: "cat_f",
+            label: "一级分类",
+            col: "8",
+        },
+        {
+            prop: "cat_s",
+            label: "二级分类",
+            col: "8",
+        },
+
+        {
+            prop: "wsm_type",
+            label: "库房性质",
+            col: "8",
+        },
+        {
+            prop: "model",
+            label: "型号",
+            col: "8",
+        },
+        {
+            prop: "khNo",
+            label: "客户编码",
+            col: "8",
+        },
+        {
+            prop: "khname",
+            label: "客户名称",
+            col: "16",
+        },
+        {
+            prop: "cpNo",
+            label: "产品编码",
+            col: "8",
+        },
+        {
+            prop: "cpName",
+            label: "产品名称",
+            col: "16",
+        },
+
+
+        {
+            prop: "material",
+            label: "材质",
+            col: "8",
+        },
+        {
+            prop: "color",
+            label: "颜色",
+            col: "8",
+        },
+        {
+            prop: "unit",
+            label: "单位",
+            col: "8",
+        },
+        {
+            prop: "zxNo",
+            label: "咨询单号",
+            col: "8",
+        },
+        {
+            prop: "zxtime",
+            label: "咨询日期",
+            col: "8",
+        },
+        {
+            prop: "zxtype",
+            label: "咨询类型",
+            col: "8",
+        },
+        {
+            prop: "specs",
+            label: "规格",
+            col: "8",
+        },
+        {
+            prop: "desc",
+            label: "工艺说明",
+            col: "16",
+        },
+        {
+            prop: "metals",
+            label: "贵金属种类",
+            col: "8",
+        },
+        {
+            prop: "is_diff",
+            label: "是否有公差",
+            col: "8",
+        },
+        {
+            prop: "delivery_day",
+            label: "物流时间",
+            unit: "天",
+            col: "8",
+        },
+        {
+            prop: "work_day",
+            label: "产品工期",
+            unit: "天",
+            col: "8",
+        },
+        {
+            prop: "expiry_day",
+            label: "信息有效期",
+            unit: "天",
+            col: "8",
+        },
+        // {
+        //     prop: "min_num",
+        //     label: "最低一次一地起订量",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "delivery_way",
+        //     label: "发货方式",
+        //     col: "8",
+        // },
+        {
+            prop: "mark_fee",
+            label: "加标费",
+            col: "8",
+        },
+        {
+            prop: "cert_fee",
+            label: "证书费",
+            col: "8",
+        },
+        {
+            prop: "package_fee",
+            label: "包装费",
+            col: "8",
+        },
+        {
+            prop: "open_fee",
+            label: "开模费",
+            col: "8",
+        },
+
+        {
+            prop: "cost_fee",
+            label: "成本工艺费",
+            col: "8",
+        },
+        {
+            prop: "delivery_fee",
+            label: "物流费",
+            col: "8",
+        },
+        // {
+        //     prop: "bare_fee",
+        //     label: "产品裸价",
+        //     col: "8",
+        // },
+        {
+            prop: "total_fee",
+            label: "成本合计",
+            col: "8",
+        },
+        // {
+        //     prop: "gold_price",
+        //     label: "当日进价",
+        //     col: "8",
+        // },
+
+        {
+            prop: "weight",
+            label: "商品重量",
+            unit: "g",
+            col: "8",
+        },
+
+        // {
+        //     prop: "pay_way",
+        //     label: "付款方式",
+        //     col: "8",
+        // },
+        {
+            prop: "tax",
+            label: "税点",
+            col: "8",
+        },
+
+        // {
+        //     prop: "addr",
+        //     label: "产品所在地",
+        //     col: "8",
+        // },
+
+        {
+            prop: "sale_craft",
+            label: "销售工艺费",
+            col: "8",
+        },
+
+        {
+            prop: "sale_price",
+            label: "采购定价",
+            col: "8",
+        },
+
+        // {
+        //     prop: "cgremark",
+        //     label: "采购备注",
+        //     col: "8",
+        // },
+
+        {
+            prop: "num",
+            label: "需求数量",
+            col: "8",
+        },
+        {
+            prop: "sale_fee",
+            label: "最终销售单价",
+            col: "8",
+        },
+        // {
+        //     prop: "cfNo",
+        //     label: "采反单号",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "cfDate",
+        //     label: "采反日期",
+        //     col: "8",
+        // },
+
+
+        // {
+        //     prop: "proname",
+        //     label: "项目名称",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "scheme_name",
+        //     label: "方案名称",
+        //     col: "8",
+        // },
+
+
+        // {
+        //     prop: "sale_remark",
+        //     label: "采购备注",
+        //     col: "8",
+        // },
+
+        // {
+        //     prop: "gysNo",
+        //     label: "供应商编码",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "gysname",
+        //     label: "供应商名称",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "status",
+        //     label: "状态",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "is_del",
+        //     label: "是否删除",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "addtime",
+        //     label: "添加时间",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "updatetime",
+        //     label: "更新时间",
+        //     col: "8",
+        // },
+    ],
+    addColumns: [
+
+        {
+            prop: "cpzxNo",
+            label: "产品咨询单号",
+            col: "8",
+        },
+        {
+            prop: "cpNo",
+            label: "产品编码",
+            col: "8",
+        },
+        {
+            prop: "cpName",
+            label: "产品名称",
+            col: "16",
+        },
+        {
+            prop: "khNo",
+            label: "客户编码",
+            col: "8",
+        },
+        {
+            prop: "khname",
+            label: "客户名称",
+            col: "16",
+        },
+        {
+            prop: "saler",
+            label: "采购人员",
+            col: "8",
+        },
+
+        {
+            prop: "num",
+            label: "咨询数量",
+            col: "8",
+        },
+        {
+            prop: "num",
+            label: "销售数量",
+            col: "8",
+        },
+        {
+            prop: "num",
+            label: "销售总额",
+            col: "8",
+        },
+        {
+            prop: "sale_fee",
+            label: "要求到货时间",
+            col: "8",
+        },
+        {
+            prop: "sale_fee",
+            label: "最终销售单价",
+            col: "8",
+        },
+
+
+
+
+        // {
+        //     prop: "name",
+        //     label: "数据标题",
+        //     col: "8",
+        // },
+        {
+            prop: "sequenceNo",
+            label: "单据号",
+            col: "8",
+        },
+       
+        {
+            prop: "salesman",
+            label: "申请人",
+            col: "8",
+        },
+      
+
+        {
+            prop: "brank",
+            label: "品牌",
+            col: "8",
+        },
+
+        {
+            prop: "cat_f",
+            label: "一级分类",
+            col: "8",
+        },
+        {
+            prop: "cat_s",
+            label: "二级分类",
+            col: "8",
+        },
+
+        {
+            prop: "wsm_type",
+            label: "库房性质",
+            col: "8",
+        },
+        {
+            prop: "model",
+            label: "型号",
+            col: "8",
+        },
+     
+      
+
+        {
+            prop: "material",
+            label: "材质",
+            col: "8",
+        },
+        {
+            prop: "color",
+            label: "颜色",
+            col: "8",
+        },
+        {
+            prop: "unit",
+            label: "单位",
+            col: "8",
+        },
+        {
+            prop: "zxNo",
+            label: "咨询单号",
+            col: "8",
+        },
+        {
+            prop: "zxtime",
+            label: "咨询日期",
+            col: "8",
+        },
+        {
+            prop: "zxtype",
+            label: "咨询类型",
+            col: "8",
+        },
+        {
+            prop: "specs",
+            label: "规格",
+            col: "8",
+        },
+        {
+            prop: "desc",
+            label: "工艺说明",
+            col: "16",
+        },
+        {
+            prop: "metals",
+            label: "贵金属种类",
+            col: "8",
+        },
+        {
+            prop: "is_diff",
+            label: "是否有公差",
+            col: "8",
+        },
+        {
+            prop: "delivery_day",
+            label: "物流时间",
+            unit: "天",
+            col: "8",
+        },
+        {
+            prop: "work_day",
+            label: "产品工期",
+            unit: "天",
+            col: "8",
+        },
+        {
+            prop: "expiry_day",
+            label: "信息有效期",
+            unit: "天",
+            col: "8",
+        },
+        // {
+        //     prop: "min_num",
+        //     label: "最低一次一地起订量",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "delivery_way",
+        //     label: "发货方式",
+        //     col: "8",
+        // },
+        {
+            prop: "mark_fee",
+            label: "加标费",
+            col: "8",
+        },
+        {
+            prop: "cert_fee",
+            label: "证书费",
+            col: "8",
+        },
+        {
+            prop: "package_fee",
+            label: "包装费",
+            col: "8",
+        },
+        {
+            prop: "open_fee",
+            label: "开模费",
+            col: "8",
+        },
+
+        {
+            prop: "cost_fee",
+            label: "成本工艺费",
+            col: "8",
+        },
+        {
+            prop: "delivery_fee",
+            label: "物流费",
+            col: "8",
+        },
+        // {
+        //     prop: "bare_fee",
+        //     label: "产品裸价",
+        //     col: "8",
+        // },
+        {
+            prop: "total_fee",
+            label: "成本合计",
+            col: "8",
+        },
+        // {
+        //     prop: "gold_price",
+        //     label: "当日进价",
+        //     col: "8",
+        // },
+
+        {
+            prop: "weight",
+            label: "商品重量",
+            unit: "g",
+            col: "8",
+        },
+
+        // {
+        //     prop: "pay_way",
+        //     label: "付款方式",
+        //     col: "8",
+        // },
+        {
+            prop: "tax",
+            label: "税点",
+            col: "8",
+        },
+
+        // {
+        //     prop: "addr",
+        //     label: "产品所在地",
+        //     col: "8",
+        // },
+
+        {
+            prop: "sale_craft",
+            label: "销售工艺费",
+            col: "8",
+        },
+
+        {
+            prop: "sale_price",
+            label: "采购定价",
+            col: "8",
+        },
+
+        // {
+        //     prop: "cgremark",
+        //     label: "采购备注",
+        //     col: "8",
+        // },
+
+   
+        // {
+        //     prop: "cfNo",
+        //     label: "采反单号",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "cfDate",
+        //     label: "采反日期",
+        //     col: "8",
+        // },
+
+
+        // {
+        //     prop: "proname",
+        //     label: "项目名称",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "scheme_name",
+        //     label: "方案名称",
+        //     col: "8",
+        // },
+
+
+        // {
+        //     prop: "sale_remark",
+        //     label: "采购备注",
+        //     col: "8",
+        // },
+
+        // {
+        //     prop: "gysNo",
+        //     label: "供应商编码",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "gysname",
+        //     label: "供应商名称",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "status",
+        //     label: "状态",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "is_del",
+        //     label: "是否删除",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "addtime",
+        //     label: "添加时间",
+        //     col: "8",
+        // },
+        // {
+        //     prop: "updatetime",
+        //     label: "更新时间",
+        //     col: "8",
+        // },
+    ],
+}
+

+ 506 - 0
src/views/sellOut/consultSheet/index.vue

@@ -0,0 +1,506 @@
+<template>
+  <div class="consultSheet pagePadding">
+    <div
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="4" style="width: 140px">
+                  <el-select
+                    :size="searchSize"
+                    v-model="parmValue.zxtype"
+                    filterable
+                    clearable
+                    placeholder="咨询类型"
+                    style="width: 100%"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option
+                      v-for="item in statusList"
+                      :key="'zxtype' + item"
+                      :label="iteme"
+                      :value="item"
+                    />
+                  </el-select>
+                </el-col>
+                <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
+                  <search-customer
+                    :value="customerCode"
+                    :size="searchSize"
+                    :placeholder="'客户公司名称'"
+                    @searchChange="customerChange"
+                  />
+                </el-col>
+
+                <el-col :span="3" style="width: 66px; float: right">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    style="float: right; margin-left: 5px"
+                    @click="searchList"
+                  >
+                    刷新
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="24">
+                <el-col :span="6" style="width: 292px">
+                  <period-date-picker
+                    :start="parmValue.start"
+                    :end="parmValue.end"
+                    :type="1"
+                    :width="'135px'"
+                    :size="searchSize"
+                    @timeReturned="timeReturned($event)"
+                  />
+                </el-col>
+
+                <el-col :span="4" style="width: 350px; padding: 0 0 0 10px">
+                  <el-input
+                    placeholder="关键字"
+                    v-model="input"
+                    :size="searchSize"
+                  >
+                    <el-select
+                      v-model="select"
+                      slot="prepend"
+                      placeholder="请选择"
+                      style="width: 115px"
+                      :size="searchSize"
+                    >
+                      <el-option label="咨询单编码" value="1"></el-option>
+                      <el-option label="申请人" value="2"></el-option>
+                      <el-option label="商品名称" value="3"></el-option>
+                    </el-select>
+                    <el-button
+                      slot="append"
+                      icon="el-icon-search"
+                      @click="
+                        pageInfo.curr = 1;
+                        parmValue.page = 1;
+                        searchList();
+                      "
+                    ></el-button>
+                  </el-input>
+                </el-col>
+                <el-col :span="4" style="width: 66px; float: right">
+                  <el-button
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </el-button>
+                </el-col>
+              </el-col>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, true)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="创建咨询订单"
+            placement="top"
+          >
+            <i
+              class="el-icon-circle-plus-outline tb-icon"
+              @click="addModal(scope.row.id, true)"
+            ></i>
+          </el-tooltip>
+
+          <el-tooltip
+            v-if="powers.some((item) => item == '006')"
+            effect="dark"
+            content="删除"
+            placement="top"
+          >
+            <i
+              class="el-icon-delete tb-icon"
+              @click="deleteById(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+      <!---展示咨询单详情-->
+      <show-detail-model
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+      <!---新建咨询订单--->
+      <add-edit
+        :id="addModelId"
+        :sitem="sitem"
+        :show-model="addShowModel"
+        :is-detail="addIsDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import addEdit from "./addEdit";
+import showDetailModel from "./showDetailModel";
+import asyncRequest from "@/apis/service/sellOut/consultSheet";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "consultSheet",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+    showDetailModel,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "consultSheet"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      select: "1",
+      input: "",
+      addShowModel: false,
+      addModelId: "",
+      addIsDetail: false,
+
+      customerCode: [],
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      statusList: [
+        "样品咨询单",
+        "线上咨询",
+        "线上贵金属",
+        "线下咨询",
+        "线下贵金属",
+        "赠品咨询单",
+        "项目竞聘",
+      ],
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        zxNo: "", // 咨询单编码
+        khNo: "", // 客户编码
+        cpName: "", //商品名称
+        zxtype: "", //咨询类型
+        salesman: "", //申请人
+        start: "",
+        end: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "zxNo",
+          label: "咨询单号",
+          fixed: "left",
+          width: "152px",
+        },
+        {
+          prop: "sequenceNo",
+          label: "单据号",
+          width: "152px",
+        },
+        {
+          prop: "salesman",
+          label: "申请人",
+          width: "60px",
+        },
+        {
+          prop: "khNo",
+          label: "客户公司编码",
+          width: "125px",
+        },
+        {
+          prop: "khname",
+          label: "客户公司名称",
+          "min-width": "160px",
+        },
+        {
+          prop: "zxtype",
+          label: "咨询类型",
+          width: "85px",
+        },
+
+        {
+          prop: "cpname",
+          label: "产品名称",
+          "min-width": "160px",
+        },
+        {
+          prop: "unit",
+          label: "单位",
+          width: "45px",
+        },
+        {
+          prop: "num",
+          label: "需求数量",
+          width: "80px",
+        },
+        {
+          prop: "sale_price",
+          label: "财务定价",
+          width: "110px",
+        },
+        {
+          prop: "sale_fee",
+          label: "最终销售单价",
+          width: "110px",
+        },
+
+        {
+          prop: "color",
+          label: "颜色",
+        },
+        {
+          prop: "model",
+          label: "型号",
+        },
+        {
+          prop: "material",
+          label: "材质",
+        },
+        // {
+        //   prop: "status",
+        //   label: "状态",
+        //   _slot_: "status",
+        //   width: "80px",
+        // },
+        {
+          prop: "scheme_name",
+          label: "方案名称",
+        },
+        {
+          prop: "zxtime",
+          label: "创建时间",
+          width: "140px",
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          width: "110px",
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    async timeReturned(e) {
+      if (e.startTime !== "") {
+        this.parmValue.start = e.startTime;
+      } else {
+        this.parmValue.start = "";
+      }
+
+      if (e.endTime !== "") {
+        this.parmValue.end = e.endTime;
+      } else {
+        this.parmValue.end = "";
+      }
+      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.select = "1";
+      this.input = "";
+      this.customerCode = [];
+      this.parmValue = {
+        zxNo: "", // 咨询单编码
+        khNo: "", // 客户编码
+        cpName: "", //商品名称
+        zxtype: "", //咨询类型
+        salesman: "", //申请人
+        start: "",
+        end: "",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    async customerChange(e) {
+      if (e && e.id) {
+        this.customerCode = [e.code];
+        this.parmValue.khNo = e.code;
+      } else {
+        this.customerCode = [];
+        this.parmValue.khNo = "";
+      }
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    openModal(id, isDetail) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+    },
+    addModal(id, isDetail) {
+      this.addShowModel = true;
+      this.addModelId = id;
+      this.addIsDetail = isDetail;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+            // status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      this.loading = true;
+      this.parmValue.zxNo = this.select === "1" ? this.input : ""; //咨询类型
+      this.parmValue.salesman = this.select === "2" ? this.input : ""; //申请人
+      this.parmValue.cpName = this.select === "3" ? this.input : ""; //商品名称
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.map((v) => {
+          v.sale_price = this.setNum(v.sale_price);
+          v.sale_fee = this.setNum(v.sale_fee);
+          return v;
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.consultSheet {
+}
+</style>
+   

+ 108 - 0
src/views/sellOut/consultSheet/showDetailModel.vue

@@ -0,0 +1,108 @@
+<template>
+  <el-dialog
+    title="咨询单详情"
+    :center="true"
+    align="left"
+    top="8vh"
+    width="1040px"
+    @close="closeModel"
+    :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)"
+  >
+    <el-card style="margin-top: -20px" class="modal-form-style">
+      <el-form
+        ref="ruleForm"
+        :model="ruleForm"
+        status-icon
+        :rules="rulesThis"
+        label-width="110px"
+        id="demo-ruleForm"
+      >
+        <el-row v-if="ruleForm !== null">
+          <el-col v-for="item in columns" :key="item.prop" :span="item.col">
+            <el-form-item :label="item.label + ':'">
+              <div>{{ ruleForm[item.prop] }}{{ item.unit }}</div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+  </el-dialog>
+</template>
+   <script>
+import asyncRequest from "@/apis/service/sellOut/consultSheet";
+import resToken from "@/mixins/resToken";
+import columns from "./columnsForm";
+export default {
+  name: "consultSheet",
+  props: ["showModel", "id", "isDetail"],
+  mixins: [resToken],
+  data() {
+    return {
+      loading: false,
+      showModelThis: this.showModel,
+      columns: columns.showColumns,
+      ruleForm: null,
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    async initForm() {
+      this.loading = true;
+      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) {
+        this.ruleForm = res.data;
+        this.ruleForm.mark_fee = this.setNum(this.ruleForm.mark_fee);
+        this.ruleForm.cert_fee = this.setNum(this.ruleForm.cert_fee);
+        this.ruleForm.package_fee = this.setNum(this.ruleForm.package_fee);
+        this.ruleForm.open_fee = this.setNum(this.ruleForm.open_fee);
+        this.ruleForm.cost_fee = this.setNum(this.ruleForm.cost_fee);
+        this.ruleForm.delivery_fee = this.setNum(this.ruleForm.delivery_fee);
+        this.ruleForm.sale_craft = this.setNum(this.ruleForm.sale_craft);
+        this.ruleForm.total_fee = this.setNum(this.ruleForm.total_fee);
+        this.ruleForm.sale_price = this.setNum(this.ruleForm.sale_price);
+        this.ruleForm.sale_fee = this.setNum(this.ruleForm.sale_fee);
+        this.ruleForm.bare_fee = this.setNum(this.ruleForm.bare_fee);
+      } 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 = null;
+        }
+      });
+    },
+  },
+};
+</script>

+ 0 - 0
src/views/sellOut/consultSheet/咨询单管理