戴艳蓉 3 years ago
parent
commit
e421c50ca5

+ 1 - 11
src/apis/service/stock/survey/index.js

@@ -2,18 +2,8 @@
 import http from "@/apis/axios";
 const api = "admin/";
 export default {
-  // 添加
-  add: (data, params) => http(api + "add", data, "post", params),
-  // 删除
-  delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
-  // 详情
-  detail: (data, params) => http(api + "detail", data, "post", params),
-  // 更新
-  update: (data, params) => http(api + "update", data, "post", params),
-  // 修改状态
-  status: (data, params) => http(api + "accountstatus", data, "post", params),
+  list: (data, params) => http(api + "goodloglist", data, "post", params),
   // 库存数据
   getstockwsm:(data, params) => http(api + "goodstat", data, "post", params)
 };

+ 123 - 121
src/views/sheetOrder/zxAfterSale/columns.js

@@ -1,125 +1,127 @@
 export default [
-    {
-          prop: "returnCode",
-          label: "售后申请单",
-          width:"160"
-        },
-        {
-          prop:"apply_name",
-          label:"申请人",
-        },
-        {
-          prop: "orderCode",
-          label: "确认单编号",
-          width:"160"
-        },
-        {
-          prop: "outCode",
-          label: "销售出库单编号",
-          width:"160"
-        },
-        {
-          prop: "total_num",
-          label: "出库总数",
-        },
-        {
-          prop: "good_code",
-          label: "商品编码",
-          width:"140"
-        },
-        {
-            prop:"good_name",
-            label:"商品名称",
-            width:"150"
-        },
-        {
-            prop:"error_num",
-            label:"异常数量",
-        },
-        {
-            prop:"error_msg",
-            label:"异常原因",
-        },
-        // {
-        //   prop:"error_img",
-        //   label:"异常图片",
-        // },
-        {
-            prop:"error_remark",
-            label:"备注"
-        },
-        {
-            prop:"except_code",
-            label:"期望意愿",
-          _slot_: "except_code",
-          width:100,
+  {
+    prop: "returnCode",
+    label: "售后申请单",
+    width: "160"
+  },
+  {
+    prop: "apply_name",
+    label: "申请人",
+    width: "60"
+  },
+  {
+    prop: "orderCode",
+    label: "确认单编号",
+    width: "150"
+  },
+  {
+    prop: "outCode",
+    label: "销售出库单编号",
+    width: "150"
+  },
+  {
+    prop: "total_num",
+    label: "发货数量",
+  },
+  {
+    prop: "good_code",
+    label: "商品编码",
+    width: "125"
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    width: "150"
+  },
+  // {
+  //   prop: "error_num",
+  //   label: "异常数量",
+  // },
+  // {
+  //     prop:"error_msg",
+  //     label:"异常原因",
+  // },
+  // {
+  //   prop:"error_img",
+  //   label:"异常图片",
+  // },
+  // {
+  //     prop:"error_remark",
+  //     label:"备注"
+  // },
+  {
+    prop: "except_code",
+    label: "期望意愿",
+    _slot_: "except_code",
+    width: 100,
 
-        },
-    
-        {
-          prop: "status",
-          label: "状态",
-          _slot_: "status",
-          width: "120px",
-        },
-        {
-            prop:"addtime",
-            label:"添加时间",
-            width:150,
-        },
-        
-        // {
-        //   prop:"good_name",
-        //   label:"商品名称",
-        // },
-        {
-          prop:"return_wsm",
-          label:"退回仓库编码",
-          width:"120"
-        },
-        {
-          prop:"contactor",
-          label:"联系人",
-        },
-        {
-          prop:"mobile",
-          label:"联系方式",
-        },
-        {
-          prop:"addr",
-          label:"退货地址",
-        },
-        {
-          prop:"post_company",
-          label:"快递名称",
-        },
-        {
-          prop:"post_fee",
-          label:"物流费",
-        },
-        {
-          prop:"post_own",
-          label:"费用承担方",
-          width:"100",
-          _slot_: "post_own",
+  },
 
-        },
-        {
-          prop:"customer_code",
-          label:"客户编码",
-          width:"150"
-        },
-        {
-          prop:"customer_name",
-          label:"客户名称",
-          width:"200"
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
-          width:50,
-        },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "120px",
+  },
+
+
+  // {
+  //   prop:"good_name",
+  //   label:"商品名称",
+  // },
+  // {
+  //   prop: "return_wsm",
+  //   label: "退回仓库编码",
+  //   width: "120"
+  // },
+  // {
+  //   prop:"contactor",
+  //   label:"联系人",
+  // },
+  // {
+  //   prop:"mobile",
+  //   label:"联系方式",
+  // },
+  // {
+  //   prop:"addr",
+  //   label:"退货地址",
+  // },
+  // {
+  //   prop:"post_company",
+  //   label:"快递名称",
+  // },
+  // {
+  //   prop:"post_fee",
+  //   label:"物流费",
+  // },
+  {
+    prop: "post_own",
+    label: "费用承担方",
+    width: "100",
+    _slot_: "post_own",
+
+  },
+  {
+    prop: "customer_code",
+    label: "客户编码",
+    width: "123"
+  },
+  {
+    prop: "customer_name",
+    label: "客户名称",
+    width: "160"
+  },
+  {
+    prop: "addtime",
+    label: "添加时间",
+    width: 142,
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    _slot_: "operation",
+    width: 50,
+  },
 ]

+ 123 - 229
src/views/sheetOrder/zxAfterSale/index.vue

@@ -27,77 +27,17 @@
         <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: 291px">
-                  <period-date-picker
-                    :width="'134px'"
-                    :size="searchSize"
-                    @timeReturned="handleTime"
-                  />
-                </el-col>
-                <!-- 处理状态 -->
-                <el-col :span="4" style="width: 140px; padding-left: 10px">
-                  <el-select
-                    :size="searchSize"
-                    v-model="serviceValue"
-                    clearable
-                    placeholder="处理状态"
-                    @change="serviceChange"
-                  >
-                    <el-option
-                      v-for="item in serviceOptions"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    >
-                    </el-option>
-                  </el-select>
-                </el-col>
-                <!-- 客户公司 -->
-                <el-col :span="4" style="width: 320px; padding: 0px 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="openModal('add', false)"
-                  >
-                    新建
-                  </el-button>
-                </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-top: 10px">
-              <!-- 期望意愿 -->
               <el-col :span="4" style="width: 130px">
                 <el-select
                   :size="searchSize"
-                  v-model="expectValue"
+                  v-model="parmValue.except_code"
                   clearable
                   placeholder="期望意愿"
-                  @change="expectChange"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
                 >
                   <el-option
                     v-for="item in expectOptions"
@@ -108,55 +48,95 @@
                   </el-option>
                 </el-select>
               </el-col>
-              <el-col :span="4" style="width: 620px; padding: 0 0 0 10px">
+              <el-col :span="4" style="width: 155px; padding-left: 10px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  clearable
+                  placeholder="售后申请状态"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in serviceOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-col>
+              <el-col :span="4" style="width: 380px; padding: 0px 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-row>
+            <el-row style="padding-top: 10px">
+              <el-col :span="4" style="width: 291px">
+                <period-date-picker
+                  :start="parmValue.start"
+                  :end="parmValue.end"
+                  :width="'134px'"
+                  :size="searchSize"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+
+              <el-col :span="4" style="width: 420px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   :size="searchSize"
-                  placeholder="请输入内容"
+                  placeholder="关键字"
                   v-model="s_input"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
                   class="input-with-select"
                 >
                   <el-select
-                    style="width: 150px"
+                    style="width: 140px"
                     v-model="select"
                     slot="prepend"
                     placeholder="请选择"
                   >
-                    <el-option label="申请人" value="applyer"></el-option>
-
-                    <el-option label="商品名称" value="goodsName"></el-option>
-                    <el-option label="商品编号" value="goodsNum"></el-option>
-                    <el-option
-                      label="售后申请编号"
-                      value="serviceNum"
-                    ></el-option>
-
-                    <el-option
-                      label="销售确认单编号"
-                      value="sellOrderNum"
-                    ></el-option>
-                    <el-option
-                      label="销售出库单编号"
-                      value="sellOutNum"
-                    ></el-option>
+                    <el-option label="售后申请编号" value="1" />
+                    <el-option label="销售订单编号" value="2" />
+                    <el-option label="销售出库单编号" value="3" />
+                    <el-option label="商品编号" value="4" />
+                    <el-option label="商品名称" value="5" />
+                    <el-option label="申请人" value="6" />
                   </el-select>
                   <el-button
                     slot="append"
                     icon="el-icon-search"
-                    @click="handleValue"
+                    @click="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   ></el-button>
                 </el-input>
               </el-col>
-
-              <!-- <el-col :span="4" style="width: 54px">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  class="fr"
-                  icon="el-icon-search"
-                  @click="searchList"
-              /></el-col> -->
-              <el-col :span="4" style="width: 66px">
+              <el-col :span="4" class="fr" style="width: 66px">
                 <el-button
                   type="warning"
                   class="fr"
@@ -207,18 +187,6 @@
           ></el-tag>
         </template>
         <template #operation="{ scope }">
-          <el-tooltip
-            v-if="powers.some((item) => item == '002')"
-            effect="dark"
-            content="重置密码"
-            placement="top"
-          >
-            <i
-              class="el-icon-refresh-left tb-icon"
-              @click="openPasswordModal(scope.row.id, false)"
-            ></i>
-          </el-tooltip>
-
           <el-tooltip
             v-if="powers.some((item) => item == '007')"
             effect="dark"
@@ -277,7 +245,7 @@ export default {
   },
   data() {
     return {
-      select: "",
+      select: "1",
       s_input: "",
       customerCode: [], //客户公司code
       except_codeOptions: [
@@ -305,24 +273,23 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        customer_code: "", //客户公司code
-        start_time: "",
-        end_time: "",
+        order_type: "2",
         returnCode: "", //售后单号
+        outCode: "", //销售出库单号,
+        status: "", //售后申请单处理状态
+        orderCode: "", //销售单号
+        good_code: "", //商品编号
+        except_code: "", //期望意愿
         apply_name: "", //申请人名称
-        sellNumbers: "", //销售单号
-        sellGoStock: "", //销售出库单号,
-        goodsNumber: "", //商品编号
-        goodsName: "", //商品名称
-        service_value: "", //售后申请单处理状态
-        expect_value: "", //期望意愿
-        result_value: "", //处理结果
+        start: "",
+        end: "",
+        customer_code: "", //客户公司code
+        good_name: "", //商品名称
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
-      tableData: [],
       // 表格 - 数据
-      // tableData: [],
+      tableData: [],
       // 表格 - 参数
       table: {
         stripe: true,
@@ -338,7 +305,6 @@ export default {
       // 表格 - 列参数
       columns: columns,
       serviceOptions: [
-        //假数据
         {
           value: "0",
           label: "待审核",
@@ -355,27 +321,9 @@ export default {
           value: "3",
           label: "已退货",
         },
-        // {
-        //   value: "选项4",
-        //   label: "待采购审核",
-        // },
-        // {
-        //   value: "选项5",
-        //   label: "处理已结束",
-        // },
-        // {
-        //   value: "d",
-        //   label: "业务已驳回",
-        // },
-        // {
-        //   value: "d",
-        //   label: "采购已驳回",
-        // },
       ],
       serviceValue: "", //售后申请处理状态
       expectOptions: [
-        //假数据
-
         {
           value: "1",
           label: "退货",
@@ -391,8 +339,6 @@ export default {
       ],
       expectValue: "", //期望意愿
       resultOptions: [
-        //假数据
-
         {
           value: "ad",
           label: "处理中",
@@ -416,20 +362,21 @@ export default {
   methods: {
     restSearch() {
       this.customerCode = [];
-
+      this.select = "1";
+      this.s_input = "";
       this.parmValue = {
-        customer_code: "", //客户公司code
-        start_time: "",
-        end_time: "",
+        order_type: "2",
         returnCode: "", //售后单号
+        outCode: "", //销售出库单号,
+        status: "", //售后申请单处理状态
+        orderCode: "", //销售单号
+        good_code: "", //商品编号
+        except_code: "", //期望意愿
         apply_name: "", //申请人名称
-        sellNumbers: "", //销售单号
-        sellGoStock: "", //销售出库单号,
-        goodsNumber: "", //商品编号
-        goodsName: "", //商品名称
-        service_value: "", //售后申请单处理状态
-        expect_value: "", //期望意愿
-        result_value: "", //处理结果
+        start: "",
+        end: "",
+        customer_code: "", //客户公司code
+        good_name: "", //商品名称
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -478,26 +425,22 @@ export default {
     },
     // 列表搜索
     async searchList() {
+      if (this.parmValue.start !== "" && this.parmValue.end === "") {
+        this.$message.warning("结束时间不能为空!");
+        return;
+      }
+      if (this.parmValue.start == "" && this.parmValue.end != "") {
+        this.$message.warning("开始时间不能为空!");
+        return;
+      }
       this.loading = true;
-      console.log(this.parmValue);
-      let model = JSON.parse(JSON.stringify(this.parmValue));
-      let _model = {
-        page: 1,
-        size: 15,
-        good_name: model.goodsName,
-        returnCode: model.returnCode,
-        outCode: model.sellGoStock,
-        status: model.service_value, //售后申请单处理状态
-        orderCode: model.sellNumbers,
-        good_code: model.goodsNumber,
-        except_code: model.expect_value,
-        apply_name: model.apply_name,
-        start: model.start_time,
-        end: model.end_time,
-        customer_code: model.customer_code, //客户公司code
-      };
-      console.log(_model);
-      const res = await asyncRequest.list(_model);
+      this.parmValue.returnCode = this.select === "1" ? this.s_input : "";
+      this.parmValue.orderCode = this.select === "2" ? this.s_input : "";
+      this.parmValue.outCode = this.select === "3" ? this.s_input : "";
+      this.parmValue.good_code = this.select === "4" ? this.s_input : "";
+      this.parmValue.good_name = this.select === "5" ? this.s_input : "";
+      this.parmValue.apply_name = this.select === "6" ? this.s_input : "";
+      const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
@@ -543,39 +486,22 @@ export default {
     },
     // 时间选择事件
     async handleTime(e) {
-      console.log(e, "handleTime");
       if (e.startTime !== "") {
-        this.parmValue.start_time = e.startTime;
+        this.parmValue.start = e.startTime;
       } else {
-        this.parmValue.start_time = "";
+        this.parmValue.start = "";
       }
       if (e.endTime !== "") {
-        this.parmValue.end_time = e.endTime;
+        this.parmValue.end = e.endTime;
       } else {
-        this.parmValue.end_time = "";
+        this.parmValue.end = "";
       }
-      if (this.parmValue.start_time !== "" && this.parmValue.end_time !== "") {
+      if (this.parmValue.start !== "" && this.parmValue.end !== "") {
+        this.pageInfo.curr = 1;
         this.parmValue.page = 1;
         await this.searchList();
       }
     },
-    // 处理状态选择
-    async serviceChange(e) {
-      console.log(e, "serviceChange");
-      this.parmValue.service_value = e;
-      await this.searchList();
-    },
-    // 期望意愿选择
-    async expectChange(e) {
-      console.log(e, "expectChange");
-      this.parmValue.expect_value = e;
-      await this.searchList();
-    },
-    // // 处理结果选择
-    // resultChange(e) {
-    //   console.log(e, "resultChange");
-    //   this.parmValue.result_value = e;
-    // },
     async customerChange(e) {
       if (e && e.id) {
         this.customerCode = [e.code];
@@ -584,42 +510,10 @@ export default {
         this.customerCode = [];
         this.parmValue.customer_code = "";
       }
+      this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       await this.searchList();
     },
-    async handleValue() {
-      console.log(this.select);
-      console.log(this.s_input);
-      switch (this.select) {
-        case "goodsName":
-          this.parmValue.goodsName = this.s_input;
-          await this.searchList();
-          break;
-        case "goodsNum":
-          this.parmValue.goodsNumber = this.s_input;
-          await this.searchList();
-
-          break;
-        case "sellOrderNum":
-          this.parmValue.sellNumbers = this.s_input;
-          await this.searchList();
-
-          break;
-        case "applyer":
-          this.parmValue.apply_name = this.s_input;
-          await this.searchList();
-          break;
-        case "serviceNum":
-          this.parmValue.returnCode = this.s_input;
-          await this.searchList();
-          break;
-        default:
-          this.parmValue.sellGoStock = this.s_input;
-          await this.searchList();
-
-          break;
-      }
-    },
   },
 };
 </script>

+ 36 - 38
src/views/sheetOrder/zxAfterSaleOrder/index.vue

@@ -299,16 +299,17 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        sellOrderNumber: "", //销售订单编号
-        returnNumber: "", //退货编号
-        sheetOrderNumber: "", //销售出库编号
-        serviceNumber: "", //售后申请编号
-        postCompany: "", //物流公司
-        postNumber: "", //物流单号
+        order_type: "2",
+        order_code: "", //销售订单编号
+        thNo: "", //退货编号
+        out_code: "", //销售出库编号
+        return_code: "", //售后申请编号
+        post_compay: [], //物流公司
+        post_code: "", //物流单号
         start: "", //
         end: "", //
         status: "", //状态节点
-        clientNumber: "", //退货客户编号
+        customer_code: "", //退货客户编号
         // --
         page: 1, // 页码
         size: 15, // 每页显示条数
@@ -342,18 +343,21 @@ export default {
   methods: {
     restSearch() {
       this.parmValue = {
-        sellOrderNumber: "", //销售订单编号
-        returnNumber: "", //退货编号
-        sheetOrderNumber: "", //销售出库编号
-        serviceNumber: "", //售后申请编号
-        postCompany: "", //物流公司
-        postNumber: "", //物流单号
-        start: "", //
-        end: "", //
-        status: "", //状态节点
+        return_code: "", //售后申请编号
+        outCode:"",
+            status: "", //状态节点
+        order_code: "", //销售订单编号
 
-        // --
 
+        thNo: "", //退货编号
+        out_code: "", //销售出库编号
+        
+        // post_compay: [], //物流公司
+        post_code: "", //物流单号
+        start: "", //
+        end: "", //
+    
+        order_type: "2",
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -403,19 +407,13 @@ export default {
     async searchList() {
       this.loading = true;
       let model = JSON.parse(JSON.stringify(this.parmValue));
-      let _model = {
-        thNo: model.returnNumber, //退货编号
-        status: model.status, //节点状态
-        post_code: model.postNumber, //快递编码
-        post_compay: model.postCompany.toString(), //	快递公司
-        customer_code: model.clientNumber, //客户code
-        order_code: model.sellOrderNumber, //	确认单code
-        out_code: model.sheetOrderNumber, //	出库code
-        return_code: model.serviceNumber, //return_code
-        startTime: "",
-        endTime: "",
-      };
-      const res = await asyncRequest.list(_model);
+      console.log(model);
+      // let _model = {
+      //   post_compay: model.post_compay.toString(), //	快递公司
+      //   startTime: "",
+      //   endTime: "",
+      // };
+      const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
@@ -464,10 +462,10 @@ export default {
       console.log(e, "要求传快递简称,不传id"); //
       if (e && e.code) {
         // this.ruleForm.post_name = [e.code];
-        this.parmValue.postCompany = [e.shortName];
+        this.parmValue.post_compay = [e.shortName];
         this.parmValue.page = 1;
       }
-      console.log(this.parmValue.postCompany);
+      console.log(this.parmValue.post_compay);
       await this.searchList();
     },
     // 时间
@@ -489,30 +487,30 @@ export default {
       console.log(this.s_input);
       switch (this.select) {
         case "expressNo":
-          this.parmValue.postNumber = this.s_input;
+          this.parmValue.post_code = this.s_input;
           await this.searchList();
           break;
         case "customerNo":
-          this.parmValue.clientNumber = this.s_input;
+          this.parmValue.customer_code = this.s_input;
           await this.searchList();
 
           break;
         case "serviceNo":
-          this.parmValue.serviceNumber = this.s_input;
+          this.parmValue.return_code = this.s_input;
           await this.searchList();
 
           break;
         case "outOrderNo":
-          this.parmValue.sheetOrderNumber = this.s_input;
+          this.parmValue.out_code = this.s_input;
           await this.searchList();
           break;
         case "returnNo":
-          this.parmValue.returnNumber = this.s_input;
+          this.parmValue.thNo = this.s_input;
           await this.searchList();
           break;
         default:
           //订单编号
-          this.parmValue.sellOrderNumber = this.s_input;
+          this.parmValue.order_code = this.s_input;
           await this.searchList();
 
           break;

+ 102 - 0
src/views/sheetOrder/zxDiffOrder/columns.js

@@ -0,0 +1,102 @@
+export default [
+
+  {
+    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: "class_cat",
+    label: "商品分类",
+    "width": "100px",
+  },
+
+  {
+    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: "50px",
+    _slot_: "operation",
+  },
+]

+ 689 - 0
src/views/sheetOrder/zxDiffOrder/components/addForm.vue

@@ -0,0 +1,689 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="'添加咨询订单'"
+    :center="true"
+    align="left"
+    top="5vh"
+    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">
+      <el-form
+        ref="ruleForm"
+        :model="ruleForm"
+        status-icon
+        :rules="rulesThis"
+        label-width="85px"
+        class="demo-ruleForm"
+      >
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="商品分类" prop="class_cat">
+              <el-input
+                v-model="ruleForm.class_cat"
+                placeholder="商品分类"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="商品名称" prop="goods_name">
+              <el-input
+                v-model="ruleForm.goods_name"
+                placeholder="商品分类"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="销售方" prop="supplierNo">
+              <search-supplier
+                :value="ruleForm.supplierNo"
+                :placeholder="'销售方公司'"
+                :disabled="false"
+                :isDetail="true"
+                :names="supplierName"
+                @searchChange="supplierChange"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="购买方" prop="customer_code">
+              <el-input
+                v-model="ruleForm.customer_name"
+                placeholder="购买方公司"
+                disabled
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="商品单价" prop="sale_fee">
+              <el-input
+                v-model="ruleForm.sale_fee"
+                placeholder="商品单价"
+                disabled
+                ><template slot="append">元</template></el-input
+              >
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="下单数量" prop="good_num">
+              <el-input v-model="ruleForm.good_num" placeholder="下单数量" />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="6">
+            <el-form-item label="商品类型" prop="goodtype">
+              <el-select
+                v-model="ruleForm.goodtype"
+                style="width: 100%"
+                placeholder="商品类型"
+              >
+                <el-option
+                  v-for="item in goodtypeOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="发货类型" prop="sendtype">
+              <el-select
+                v-model="ruleForm.sendtype"
+                style="width: 100%"
+                placeholder="发货类型"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div style="height: 40px" v-if="ruleForm.sendtype === '1'" class="tr">
+        <download-addr />
+        <el-button
+          type="primary"
+          size="mini"
+          @click="addrmodel = true"
+          style="margin: 0 0 0 10px"
+          >导入收货地址</el-button
+        >
+      </div>
+      <el-form
+        v-if="ruleForm.sendtype === '1'"
+        :model="addrForm"
+        ref="addrForm"
+        :size="'mini'"
+      >
+        <el-table
+          :data="addrForm.addrlist"
+          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="'addrlist.' + scope.$index + '.' + 'receipt_quantity'"
+                :rules="addrRules.receipt_quantity"
+                :size="'mini'"
+                :style="{ marginBottom: scope.row.edit ? '13px' : '0' }"
+              >
+                <el-input
+                  v-model="scope.row.receipt_quantity"
+                  :disabled="!scope.row.edit"
+                />
+              </el-form-item>
+            </template>
+          </el-table-column>
+
+          <el-table-column prop="arrive_time" label="最晚收货日期" width="150">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'addrlist.' + 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="date"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd"
+                  :picker-options="pickerOptions"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column prop="contactor" label="收件联系人" min-width="110">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'addrlist.' + 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="'addrlist.' + 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="'addrlist.' + 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="'addrlist.' + 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.addrlist)"
+                ></i>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form>
+      <in-addr-model
+        :show-model="addrmodel"
+        @cancel="addrmodel = false"
+        @refresh="addrRefresh"
+      />
+      <div style="text-align: right">
+        <el-button type="primary" :size="'mini'" @click="submitForm"
+          >保 存
+        </el-button>
+        <el-button :size="'mini'" @click="showModelThis = false">{{
+          isDetail ? "关 闭" : "取 消"
+        }}</el-button>
+      </div>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+import asyncRequest from "@/apis/service/sheetOrder/zxSheet";
+import resToken from "@/mixins/resToken";
+import { isnumber, isMobile } from "@/utils/validate";
+import inAddrModel from "@/components/in-addr-model";
+export default {
+  name: "Account",
+  props: ["showModel", "sitem"],
+  mixins: [resToken],
+  components: { inAddrModel },
+  data() {
+    const validateWeight = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("不能为空!"));
+      } else {
+        if (!isnumber(value)) {
+          callback(new Error("仅支持整数!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    const validatemobile = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("手机号不能为空!"));
+      } else {
+        if (!isMobile(value)) {
+          callback(new Error("手机号格式不正确!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      loading: false,
+      showModelThis: this.showModel,
+      addrmodel: false,
+      supplierNo: "",
+      supplierName:"",
+      options: [
+        {
+          value: "1",
+          label: "直接发货",
+        },
+        {
+          value: "2",
+          label: "延迟发货",
+        },
+      ],
+      goodtypeOptions: [
+        {
+          value: "1",
+          label: "普通商品",
+        },
+        {
+          value: "2",
+          label: "赠品",
+        },
+        {
+          value: "3",
+          label: "样品",
+        },
+      ],
+      addrForm: {
+        addrlist: [],
+      },
+      ruleForm: {
+        zxNo: "",
+        customer_code: [],
+        supplierNo: [],
+        sendtype: "1",
+        good_num: "",
+        goodtype: "1",
+        class_cat: "",
+        goods_name: "",
+        sale_fee: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        zxNo: [
+          {
+            required: true,
+            message: "咨询单号不能为空!",
+            trigger: "blur",
+          },
+        ],
+        customer_code: [
+          {
+            required: true,
+            message: "请选择购买方公司",
+            trigger: "change",
+          },
+        ],
+        class_cat: [
+          {
+            required: true,
+            message: "请选择商品分类",
+            trigger: "change",
+          },
+        ],
+        supplierNo: [
+          {
+            type: "array",
+            required: true,
+            message: "请选择销售方公司",
+            trigger: "change",
+          },
+        ],
+        sendtype: [
+          {
+            required: true,
+            message: "请选择发货类型",
+            trigger: "change",
+          },
+        ],
+
+        good_num: [
+          {
+            required: true,
+            validator: validateWeight,
+            trigger: "blur",
+          },
+        ],
+        goodtype: [
+          {
+            required: true,
+            message: "请选择商品类型",
+            trigger: "change",
+          },
+        ],
+        sale_fee: [
+          {
+            required: true,
+            message: "请输入商品单价",
+            trigger: "blur",
+          },
+        ],
+      },
+      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",
+          },
+        ],
+
+        addr_code: [
+          {
+            type: "array",
+            required: true,
+            message: "收货省市区不能为空",
+            trigger: "change",
+          },
+        ],
+        addr: [
+          {
+            required: true,
+            message: "详细地址不能为空",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    async supplierChange(e) {
+      if (e && e.id) {
+        this.ruleForm.supplierNo = [e.code];
+      } else {
+        this.ruleForm.supplierNo = [];
+      }
+      this.$refs.ruleForm.validateField("supplierNo");
+    },
+
+    async initForm() {
+      this.loading = true;
+      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 { zxNo, class_cat, khname, khNo, cpName, sale_fee } =
+            this.sitem;
+            console.log(this.sitem);
+          this.ruleForm = {
+            zxNo: zxNo || "",
+            customer_code: khNo || "",
+            customer_name: khname || "",
+            class_cat: class_cat || "",
+            goods_name: cpName || "",
+            supplierNo: [],
+            sendtype: "1", // 真实姓名
+            good_num: "",
+            sale_fee: sale_fee || "",
+            goodtype: "1",
+          };
+        }
+      });
+    },
+    addrRefresh(e) {
+      // console.log(e);
+      const { list } = e;
+      this.addrForm.addrlist.push(...list);
+    },
+    openHouseModal(index) {
+      let findex = this.addrForm.addrlist.findIndex((v) => v.edit === true);
+      if (findex !== -1) {
+        this.$message.warning("当前已有地址在编辑,请保存后再试!");
+        return;
+      } else {
+        if (index === -1) {
+          this.addrForm.addrlist.push({
+            edit: true,
+            arrive_time: "",
+            receipt_quantity: "",
+            contactor: "",
+            mobile: "",
+            addr_code: [],
+            addr: "",
+          });
+        } else {
+          this.addrForm.addrlist[index].edit = true;
+        }
+      }
+    },
+    //省市区选择
+    select_area_change(e, index) {
+      this.addrForm.addrlist[index].addr_code = e;
+    },
+    //省市区保存某一行
+    checkRow(rowIndex) {
+      this.$refs.addrForm.validate((valid) => {
+        if (valid) {
+          this.addrForm.addrlist[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 {
+            zxNo,
+            customer_code,
+            good_num,
+            sendtype,
+            supplierNo,
+            goodtype,
+          } = JSON.parse(JSON.stringify(this.ruleForm));
+          const { addrlist } = JSON.parse(JSON.stringify(this.addrForm));
+          console.log(goodtype);
+          if (sendtype === "1") {
+            let isok = true,
+              addrT = 0;
+            addrlist.forEach((v) => {
+              addrT += parseInt(v.receipt_quantity);
+              if (v.edit) {
+                isok = false;
+              }
+            });
+            if (!isok) {
+              this.$message.warning("请保存地址信息!");
+              this.loading = false;
+              return;
+            }
+            if (parseInt(good_num) !== addrT) {
+              this.$message.warning(
+                "下单数量,与收货地址信息中的总数量不一致!"
+              );
+              this.loading = false;
+              return;
+            }
+          }
+          const model = {
+            zxNo: zxNo || "",
+            customer_code: customer_code || "",
+            good_num: good_num || "",
+            supplierNo: supplierNo.length > 0 ? supplierNo[0] : "",
+            sendtype: sendtype | "",
+            goodtype: goodtype || "",
+            addrlist: [],
+          };
+          let list = [];
+          addrlist.forEach((v) => {
+            let xitem = {
+              contactor: v.contactor,
+              mobile: v.mobile,
+              addr: v.addr,
+              addr_code: v.addr_code,
+              receipt_quantity: v.receipt_quantity,
+              arrive_time: v.arrive_time,
+            };
+            list.push(xitem);
+          });
+          model.addrlist = sendtype === "1" ? list : [];
+          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>
+
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 320 - 0
src/views/sheetOrder/zxDiffOrder/components/columnsForm.js

@@ -0,0 +1,320 @@
+export default [
+    // {
+    //     prop: "name",
+    //     label: "数据标题",
+    //     col: "8",
+    // },
+    {
+        prop: "zxNo",
+        label: "咨询单号",
+        col: "8",
+    },
+    {
+        prop: "zxtime",
+        label: "咨询日期",
+        col: "8",
+    },
+    {
+        prop: "zxtype",
+        label: "咨询类型",
+        col: "8",
+    },
+    {
+        prop: "sequenceNo",
+        label: "单据号",
+        col: "8",
+    },
+    {
+        prop: "cpzxNo",
+        label: "产品咨询单号",
+        col: "8",
+    },
+    {
+        prop: "salesman",
+        label: "申请人",
+        col: "8",
+    },
+    {
+        prop: "saler",
+        label: "采购人员",
+        col: "8",
+    },
+    {
+        prop: "num",
+        label: "需求数量",
+        col: "8",
+    },
+    {
+        prop: "sale_fee",
+        label: "最终销售单价",
+        col: "8",
+    },
+
+
+
+    {
+        prop: "khname",
+        label: "客户名称",
+        col: "16",
+    },
+    {
+        prop: "khNo",
+        label: "客户编码",
+        col: "8",
+    },
+
+    {
+        prop: "cpName",
+        label: "产品名称",
+        col: "16",
+    },
+    {
+        prop: "cpNo",
+        label: "产品编码",
+        col: "8",
+    },
+
+    {
+        prop: "class_cat",
+        label: "商品分类",
+        col: "16",
+    },
+    {
+        prop: "expiry_day",
+        label: "信息有效期",
+        unit: "天",
+        col: "8",
+    },
+    {
+        prop: "desc",
+        label: "工艺说明",
+        col: "16",
+    },
+    {
+        prop: "model",
+        label: "型号",
+        col: "8",
+    },
+    {
+        prop: "specs",
+        label: "规格",
+        col: "8",
+    },
+
+    // {
+    //     prop: "cat_s",
+    //     label: "二级分类",
+    //     col: "8",
+    // },
+
+    {
+        prop: "material",
+        label: "材质",
+        col: "8",
+    },
+    {
+        prop: "color",
+        label: "颜色",
+        col: "8",
+    },
+    {
+        prop: "unit",
+        label: "单位",
+        col: "8",
+    },
+    {
+        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: "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: "brank",
+        label: "品牌",
+        col: "8",
+    },
+
+
+
+    {
+        prop: "wsm_type",
+        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",
+    // },
+]

+ 58 - 0
src/views/sheetOrder/zxDiffOrder/components/showForm.vue

@@ -0,0 +1,58 @@
+<template>
+  <div class="modal-form-style">
+    <el-form
+      ref="sitem"
+      :model="sitem"
+      status-icon
+      :rules="rulesThis"
+      label-width="110px"
+      id="demo-sitem"
+    >
+      <el-row v-if="sitem !== null">
+        <template v-for="item in columns">
+          <el-col :key="item.prop" :span="item.col" v-if="sitem[item.prop]">
+            <el-form-item :label="item.label + ':'">
+              <div>{{ sitem[item.prop] }}{{ item.unit }}</div>
+            </el-form-item>
+          </el-col>
+        </template>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+<script>
+import columns from "./columnsForm";
+export default {
+  name: "Account",
+  props: ["newTime", "sitem"],
+  data() {
+    return {
+      loading: false,
+      columns: columns,
+      sitem: null,
+    };
+  },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+
+    async initForm() {
+      this.loading = true;
+      this.loading = false;
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 204 - 0
src/views/sheetOrder/zxDiffOrder/detail.vue

@@ -0,0 +1,204 @@
+<template>
+  <div class="zxSheetDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <div class="tl" style="padding: 10px 0 22px 0">
+        <span>咨询单详情:</span>
+        <el-button
+          @click="statusConfirm('-1', '作废该条信息')"
+          type="danger"
+          class="fr"
+          plain
+          :size="'mini'"
+          v-if="powers.some((item) => item == '006')"
+          style="margin:0 0 0 10px"
+          >作废该条信息</el-button
+        >
+        <el-button
+          v-if="powers.some((item) => item == '003')"
+          style="margin: 0 0 0 10px"
+          class="fr"
+          type="primary"
+          plain
+          :size="'mini'"
+          @click="showModel = true"
+          >新建咨询订单
+        </el-button>
+      </div>
+      <show-form
+        :newTime="newTime"
+        v-if="newTime !== ''"
+        :sitem="sitem"
+        :id="queryId"
+      />
+      <add-form
+        :sitem="sitem"
+        :show-model="showModel"
+        @refresh="showModel = false"
+        @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 asyncRequest from "@/apis/service/sheetOrder/zxSheet";
+import showForm from "./components/showForm";
+import addForm from "./components/addForm";
+export default {
+  name: "zxSheetDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    showForm,
+    addForm,
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "zxSheetDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  mounted() {
+    console.log(this.$route);
+  },
+  data() {
+    return {
+      showModel: false,
+      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() + "";
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.queryId });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("zxSheet", {});
+      } 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() {
+      const res = await asyncRequest.detail({ id: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        const { can } = res.data;
+        this.sitem.class_cat = "";
+        if (can && can.length > 0) {
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
+        }
+        this.sitem.mark_fee = this.setNum(this.sitem.mark_fee);
+        this.sitem.cert_fee = this.setNum(this.sitem.cert_fee);
+        this.sitem.package_fee = this.setNum(this.sitem.package_fee);
+        this.sitem.open_fee = this.setNum(this.sitem.open_fee);
+        this.sitem.cost_fee = this.setNum(this.sitem.cost_fee);
+        this.sitem.delivery_fee = this.setNum(this.sitem.delivery_fee);
+        this.sitem.sale_craft = this.setNum(this.sitem.sale_craft);
+        this.sitem.total_fee = this.setNum(this.sitem.total_fee);
+        this.sitem.sale_price = this.setNum(this.sitem.sale_price);
+        this.sitem.sale_fee = this.setNum(this.sitem.sale_fee);
+        this.sitem.bare_fee = this.setNum(this.sitem.bare_fee);
+        console.log(this.sitem);
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.zxSheetDetail {
+}
+</style>
+   
+   

+ 395 - 0
src/views/sheetOrder/zxDiffOrder/index.vue

@@ -0,0 +1,395 @@
+<template>
+  <div class="zxSheet 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="routeGoto('zxSheetDetail', { id: scope.row.id })"
+            ></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>
+     
+    </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/sheetOrder/zxSheet";
+import { mapGetters } from "vuex";
+import columns from "./columns";
+export default {
+  name: "zxSheet",
+  mixins: [mixinPage, resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "zxSheet"
+        ) || {};
+      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: columns,
+    };
+  },
+  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);
+          v.class_cat = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.class_cat += i === 0 ? x.name : "/" + x.name;
+            });
+          }
+          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>
+.zxSheet {
+}
+</style>
+   

+ 0 - 0
src/views/sheetOrder/zxDiffOrder/咨询单管理


+ 42 - 12
src/views/sheetOrder/zxOrder/components/addForm.vue

@@ -36,8 +36,9 @@
                   :value="ruleForm.supplierNo"
                   :placeholder="'销售方公司'"
                   :disabled="false"
-                  :isDetail="false"
+                  :isDetail="true"
                   :type="'1'"
+                  :names="supplierName"
                   @searchChange="supplierChange"
                 />
               </el-form-item>
@@ -115,7 +116,7 @@
         </el-form>
       </el-col>
 
-      <el-col :span="24" style="padding: 0 0 22px 0">
+      <el-col :span="24" style="padding: 0 0 22px 0" v-if="ruleForm.sendtype==='1'">
         <el-form :model="addrForm" ref="addrForm" :size="'mini'">
           <el-table
             :data="addrForm.order_addr"
@@ -372,6 +373,7 @@ export default {
       showGoodsModel: false,
       stock_code: "",
       companyName: "",
+      supplierName: "",
       ruleForm: {
         zxNo: "",
         customer_code: [],
@@ -384,6 +386,30 @@ export default {
         sale_fee: "",
         good_code: "", // 商品选择
       },
+         options: [
+        {
+          value: "1",
+          label: "直接发货",
+        },
+        {
+          value: "2",
+          label: "延迟发货",
+        },
+      ],
+      goodtypeOptions: [
+        {
+          value: "1",
+          label: "普通商品",
+        },
+        {
+          value: "2",
+          label: "赠品",
+        },
+        {
+          value: "3",
+          label: "样品",
+        },
+      ],
       rulesThis: this.rules,
       rules: {
         zxNo: [
@@ -433,7 +459,7 @@ export default {
         goodtype: [
           {
             required: true,
-            message: "请选择是否特殊商品",
+            message: "请选择商品类型",
             trigger: "change",
           },
         ],
@@ -528,28 +554,32 @@ export default {
             status,
             supplierNo,
             good_num,
-            goodtype,
-            sendtype,
-            sale_fee,
+            good_type,
+            send_type,
+            sale_price,
+            supplierName,
           } = this.sitem;
           this.companyName = companyName;
+          this.supplierName = supplierName;
           this.status = status;
+          console.log(this.sitem);
           // this.cat_id = can.length > can ? e[e.length - 1] : "";
           let goods_class = [];
           can.forEach((v) => {
             goods_class.push(v.id);
           });
           this.ruleForm = {
-            good_num,
-            goodtype,
-            sendtype,
-            sale_fee,
+            good_num: good_num || "",
+            goodtype: good_type || "",
+            sendtype: send_type || "",
+            sale_fee: sale_price || "",
             goods_class: goods_class || [],
-            supplierNo: supplierNo || [],
             good_code: good_code || "", // 商品选择
             good_name: good_name || "",
-            customer_code: customer_code ? [customer_code] : "", // 企业客户选择
+            customer_code: customer_code ? [customer_code] : [], // 企业客户选择
+            supplierNo: supplierNo ? [supplierNo] : [],
           };
+          console.log(this.ruleForm);
         }
 
         if (this.$refs.addrForm) {

+ 45 - 84
src/views/sheetOrder/zxOrder/index.vue

@@ -51,21 +51,22 @@
               <el-col :span="4" style="width: 325px; padding: 0 0 0 10px">
                 <search-supplier
                   :size="searchSize"
-                  :value="wsm_supplierNo"
+                  :value="parmValue.supplierNo"
                   :placeholder="'销售方公司'"
                   :disabled="false"
                   :isDetail="false"
+                  :type="'1'"
                   @searchChange="supplierChange"
                 />
               </el-col>
-                   <el-col :span="4" style="width: 325px; padding: 0 0 0 10px">
-                <search-supplier
+              <el-col :span="4" style="width: 325px; padding: 0 0 0 10px">
+                <search-customer
                   :size="searchSize"
-                  :value="wsm_supplierNo"
+                  :value="parmValue.customer_code"
                   :placeholder="'购买方公司'"
                   :disabled="false"
                   :isDetail="false"
-                  @searchChange="supplierChange"
+                  @searchChange="customer_code_change"
                 />
               </el-col>
               <el-col :span="3" style="width: 66px; float: right">
@@ -105,7 +106,7 @@
                   >
                     <el-option label="咨询订单编号" value="1"></el-option>
                     <el-option label="商品属性编号" value="2"></el-option>
-                    <el-option label="品名称" value="3"></el-option>
+                    <el-option label="品名称" value="3"></el-option>
                     <el-option label="申请人" value="4"></el-option>
                   </el-select>
                   <el-button slot="append" icon="el-icon-search"></el-button>
@@ -122,21 +123,6 @@
                   重置
                 </el-button>
               </el-col>
-
-              <!-- <el-col
-                :span="3"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '003')"
-              >
-                <el-button
-                  :size="searchSize"
-                  type="success"
-                  style="float: right"
-                  @click="openModal('add', false, {})"
-                >
-                  新建
-                </el-button>
-              </el-col> -->
             </el-row>
           </div>
         </template>
@@ -150,8 +136,11 @@
             "
           ></el-tag>
         </template>
-        <!-- v-if="powers.some((item) => item == '007')" -->
-        <template #operation="{ scope }">
+
+        <template
+          #operation="{ scope }"
+          v-if="powers.some((item) => item == '007')"
+        >
           <el-tooltip effect="dark" content="详情" placement="top">
             <i
               class="el-icon-view tb-icon"
@@ -208,11 +197,6 @@ export default {
       sitem: null,
       select: "1",
       input: "",
-      parmValue: {
-        start: "", //起始时间
-        end: "", // 结束时间
-      },
-      options: ["创建时间", "最晚入库时间"],
       sselect: "创建时间",
       // 状态
       statusOptions: [
@@ -232,12 +216,14 @@ export default {
         page: 1, // 页码
         size: 15, // 每页显示条数
         status: "", //状态
-        orderCode: "", //咨询单列表
+        orderCode: "", //咨询单编号
         apply_name: "", // 申请人
         good_name: "", // 产品名称
         good_code: "", // 产品属性编号
         start: "", //新建起始时间
         end: "", // 新建结束时间
+        customer_code: [],
+        supplierNo: [],
       },
       passwordModel: false,
       passwordModelId: 0,
@@ -273,12 +259,14 @@ export default {
         page: 1, // 页码
         size: 15, // 每页显示条数
         status: "", //状态
-        orderCode: "", //咨询单列表
+        orderCode: "", //咨询单编号
         apply_name: "", // 申请人
         good_name: "", // 产品名称
         good_code: "", // 产品属性编号
         start: "", //新建起始时间
         end: "", // 新建结束时间
+        customer_code: [],
+        supplierNo: [],
       };
       // 表格 - 分页
       this.pageInfo = {
@@ -288,79 +276,43 @@ export default {
       };
       this.searchList();
     },
-    async supplierChange(e) {
-      if (e && e.id) {
-        this.parmValue.wsm_supplierNo = e.code;
-        this.wsm_supplierNo = [e.code];
-      } else {
-        this.parmValue.wsm_supplierNo = "";
-        this.wsm_supplierNo = [];
-      }
-      this.parmValue.wsm_code = "";
-      this.wsm_code = [];
-      this.parmValue.page = 1;
-      this.pageInfo.curr = 1;
-      await this.searchList();
-    },
-    async handleClick(e) {
-      this.sselect = e;
-      this.parmValue.start = e === "创建时间" ? this.parmValue.start : "";
-      this.parmValue.end = e === "创建时间" ? this.parmValue.end : "";
-      this.parmValue.last_start = e !== "创建时间" ? this.parmValue.start : "";
-      this.parmValue.last_end = e !== "创建时间" ? this.parmValue.end : "";
-      if (
-        !(
-          (this.parmValue.start !== "" && this.parmValue.end === "") ||
-          (this.parmValue.start === "" && this.parmValue.end !== "")
-        )
-      ) {
-        this.parmValue.page = 1;
-        this.pageInfo.curr = 1;
-        await this.searchList();
-      }
-    },
-    openModal(id, isDetail, sitem) {
-      this.modelId = id;
-      this.isDetail = isDetail;
-      this.sitem = sitem;
-      this.showModel = true;
-    },
+
+   
     async supplierChange(e) {
       if (e && e.id) {
         this.parmValue.supplierNo = [e.code];
-        this.supplierNo = e.code;
       } else {
         this.parmValue.supplierNo = [];
-        this.supplierNo = "";
       }
-      this.parmValue.stockNo = [];
       this.parmValue.page = 1;
       this.pageInfo.curr = 1;
       await this.searchList();
     },
-    async stockChange(e) {
+    async customer_code_change(e) {
       if (e && e.id) {
-        this.parmValue.stockNo = [e.code];
+        this.parmValue.customer_code = [e.code];
       } else {
-        this.parmValue.stockNo = [];
+        this.parmValue.customer_code = [];
       }
-
-      console.log(e);
       this.parmValue.page = 1;
       this.pageInfo.curr = 1;
       await this.searchList();
     },
+
     async searchList() {
       this.loading = true;
-      this.parmValue.cgdNo = this.select === "1" ? this.input : ""; // 采购单编码
-      this.parmValue.wsm_in_code = this.select === "2" ? this.input : ""; // 入库单号
-      this.parmValue.bk_code = this.select === "3" ? this.input : ""; // 备库编码
-      this.parmValue.good_code = this.select === "4" ? this.input : ""; // 产品属性编号
-      this.parmValue.good_name = this.select === "5" ? this.input : ""; // 产品名称
-      this.parmValue.apply_name = this.select === "6" ? this.input : ""; // 申请人
-      this.parmValue.supplierNo = this.select === "7" ? this.input : ""; // 采购供应商编号
+      let model = Object.assign({}, this.parmValue);
 
-      const res = await asyncRequest.list(this.parmValue);
+      model.customer_code =
+        model.customer_code.length == 1 ? model.customer_code[0] : "";
+      model.supplierNo =
+        model.supplierNo.length == 1 ? model.supplierNo[0] : "";
+      this.parmValue.orderCode = this.select === "1" ? this.input : ""; // 采购单编码
+      this.parmValue.good_code = this.select === "2" ? this.input : ""; // 产品属性编号
+      this.parmValue.good_name = this.select === "3" ? this.input : ""; // 产品名称
+      this.parmValue.apply_name = this.select === "4" ? this.input : ""; // 申请人
+      console.log(model);
+      const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.tableData.forEach((v) => {
@@ -393,7 +345,16 @@ export default {
       } else {
         this.parmValue.end = "";
       }
-      await this.handleClick(this.sselect);
+      if (
+        !(
+          (this.parmValue.start !== "" && this.parmValue.end === "") ||
+          (this.parmValue.start === "" && this.parmValue.end !== "")
+        )
+      ) {
+        this.parmValue.page = 1;
+        this.pageInfo.curr = 1;
+        await this.searchList();
+      }
     },
   },
 };

+ 2 - 0
src/views/sheetOrder/zxReturn/index.vue

@@ -245,6 +245,7 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+         order_type:"2",
         CG_numbers: "", //采购单号
         returnNumber: "", //退货单编号
         returnStoreNum: "", //退货仓库编号
@@ -287,6 +288,7 @@ export default {
   methods: {
     restSearch() {
       this.parmValue = {
+         order_type:"2",
         CG_numbers: "", //采购单号
         returnNumber: "", //退货单编号
         returnStoreNum: "", //退货仓库编号

+ 36 - 32
src/views/sheetOrder/zxSheet/columns.js

@@ -6,11 +6,11 @@ export default [
     fixed: "left",
     width: "152px",
   },
-  {
-    prop: "sequenceNo",
-    label: "单据号",
-    width: "152px",
-  },
+  // {
+  //   prop: "sequenceNo",
+  //   label: "单据号",
+  //   width: "152px",
+  // },
   {
     prop: "salesman",
     label: "申请人",
@@ -24,18 +24,22 @@ export default [
   {
     prop: "khname",
     label: "客户公司名称",
-    "min-width": "160px",
+    "min-width": "158px",
   },
   {
     prop: "zxtype",
     label: "咨询类型",
     width: "85px",
   },
-
   {
-    prop: "cpname",
-    label: "产品名称",
-    "min-width": "160px",
+    prop: "cpNo",
+    label: "商品编号",
+    "width": "123px",
+  },
+  {
+    prop: "cpName",
+    label: "商品名称",
+    "min-width": "155px",
   },
   {
     prop: "class_cat",
@@ -53,39 +57,39 @@ export default [
     label: "需求数量",
     width: "80px",
   },
-  {
-    prop: "sale_price",
-    label: "财务定价",
-    width: "110px",
-  },
+  // {
+  //   prop: "sale_price",
+  //   label: "财务定价",
+  //   width: "110px",
+  // },
   {
     prop: "sale_fee",
     label: "最终销售单价",
-    width: "110px",
+    width: "100px",
   },
 
-  {
-    prop: "color",
-    label: "颜色",
-  },
-  {
-    prop: "model",
-    label: "型号",
-  },
-  {
-    prop: "material",
-    label: "材质",
-  },
+  // {
+  //   prop: "color",
+  //   label: "颜色",
+  // },
+  // {
+  //   prop: "model",
+  //   label: "型号",
+  // },
+  // {
+  //   prop: "material",
+  //   label: "材质",
+  // },
   // {
   //   prop: "status",
   //   label: "状态",
   //   _slot_: "status",
   //   width: "80px",
   // },
-  {
-    prop: "scheme_name",
-    label: "方案名称",
-  },
+  // {
+  //   prop: "scheme_name",
+  //   label: "方案名称",
+  // },
   {
     prop: "zxtime",
     label: "创建时间",

+ 1 - 1
src/views/sheetOrder/zxSheet/components/addForm.vue

@@ -435,7 +435,7 @@ export default {
         goodtype: [
           {
             required: true,
-            message: "请选择是否特殊商品",
+            message: "请选择商品类型",
             trigger: "change",
           },
         ],

+ 88 - 85
src/views/sheetOrder/zxSheet/components/columnsForm.js

@@ -9,57 +9,53 @@ export default [
         label: "咨询单号",
         col: "8",
     },
+    {
+        prop: "cpzxNo",
+        label: "产品咨询单号",
+        col: "8",
+    },
     {
         prop: "zxtime",
         label: "咨询日期",
         col: "8",
     },
+
     {
         prop: "zxtype",
         label: "咨询类型",
         col: "8",
     },
-    {
-        prop: "sequenceNo",
-        label: "单据号",
-        col: "8",
-    },
-    {
-        prop: "cpzxNo",
-        label: "产品咨询单号",
-        col: "8",
-    },
+
+    // {
+    //     prop: "sequenceNo",
+    //     label: "单据号",
+    //     col: "8",
+    // },
+
     {
         prop: "salesman",
         label: "申请人",
         col: "8",
     },
     {
-        prop: "saler",
-        label: "采购人员",
+        prop: "expiry_day",
+        label: "信息有效期",
+        unit: "天",
         col: "8",
     },
     {
-        prop: "num",
-        label: "需求数量",
+        prop: "khNo",
+        label: "客户编码",
         col: "8",
     },
-    {
-        prop: "sale_fee",
-        label: "最终销售单价",
-        col: "8",
-    },
-
-
-
     {
         prop: "khname",
         label: "客户名称",
         col: "16",
     },
     {
-        prop: "khNo",
-        label: "客户编码",
+        prop: "cpNo",
+        label: "产品编码",
         col: "8",
     },
 
@@ -69,8 +65,8 @@ export default [
         col: "16",
     },
     {
-        prop: "cpNo",
-        label: "产品编码",
+        prop: "unit",
+        label: "单位",
         col: "8",
     },
 
@@ -80,9 +76,25 @@ export default [
         col: "16",
     },
     {
-        prop: "expiry_day",
-        label: "信息有效期",
-        unit: "天",
+        prop: "weight",
+        label: "商品重量",
+        unit: "g",
+        col: "8",
+    },
+
+    // {
+    //     prop: "saler",
+    //     label: "采购人员",
+    //     col: "8",
+    // },
+    {
+        prop: "num",
+        label: "需求数量",
+        col: "8",
+    },
+    {
+        prop: "sale_fee",
+        label: "最终销售单价",
         col: "8",
     },
     {
@@ -117,11 +129,7 @@ export default [
         label: "颜色",
         col: "8",
     },
-    {
-        prop: "unit",
-        label: "单位",
-        col: "8",
-    },
+
     {
         prop: "metals",
         label: "贵金属种类",
@@ -155,59 +163,54 @@ export default [
     //     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: "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: "cost_fee",
+    //     label: "成本工艺费",
+    //     col: "8",
+    // },
+    // {
+    //     prop: "delivery_fee",
+    //     label: "物流费",
+    //     col: "8",
+    // },
     // {
     //     prop: "bare_fee",
     //     label: "产品裸价",
     //     col: "8",
     // },
-    {
-        prop: "total_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",
@@ -226,17 +229,17 @@ export default [
     //     col: "8",
     // },
 
-    {
-        prop: "sale_craft",
-        label: "销售工艺费",
-        col: "8",
-    },
+    // {
+    //     prop: "sale_craft",
+    //     label: "销售工艺费",
+    //     col: "8",
+    // },
 
-    {
-        prop: "sale_price",
-        label: "采购定价",
-        col: "8",
-    },
+    // {
+    //     prop: "sale_price",
+    //     label: "采购定价",
+    //     col: "8",
+    // },
     {
         prop: "brank",
         label: "品牌",

+ 3 - 16
src/views/sheetOrder/zxoutOrder/index.vue

@@ -305,6 +305,7 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
+        order_type: "2",
         customer_code: "", //客户公司code
         start_time: "",
         end_time: "",
@@ -355,22 +356,6 @@ export default {
           value: "3",
           label: "已退货",
         },
-        // {
-        //   value: "选项4",
-        //   label: "待采购审核",
-        // },
-        // {
-        //   value: "选项5",
-        //   label: "处理已结束",
-        // },
-        // {
-        //   value: "d",
-        //   label: "业务已驳回",
-        // },
-        // {
-        //   value: "d",
-        //   label: "采购已驳回",
-        // },
       ],
       serviceValue: "", //售后申请处理状态
       expectOptions: [
@@ -418,6 +403,7 @@ export default {
       this.customerCode = [];
 
       this.parmValue = {
+        order_type: "2",
         customer_code: "", //客户公司code
         start_time: "",
         end_time: "",
@@ -482,6 +468,7 @@ export default {
       console.log(this.parmValue);
       let model = JSON.parse(JSON.stringify(this.parmValue));
       let _model = {
+        order_type: "2",
         page: 1,
         size: 15,
         good_name: model.goodsName,

+ 86 - 58
src/views/stock/survey/index.vue

@@ -4,12 +4,12 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
       <div style="width: 100%">
-        <el-row style="padding: 20px 0 0 0px">
+        <el-row style="padding: 15px 0 0 0px">
           <el-col :span="12" style="width: 300px; padding: 0">
             <search-supplier
               :size="searchSize"
               :placeholder="'供应商公司'"
-              :value="parmValue.supplier_code"
+              :value="supplier_code"
               @searchChange="selectSupplier"
             />
           </el-col>
@@ -17,8 +17,8 @@
             <search-stock
               :isDetail="true"
               :size="searchSize"
-              :value="parmValue.stock_code"
-              :disabled="isDisabled"
+              :value="stock_code"
+              :disabled="supplier_code === ''"
               :placeholder="'出库仓库'"
               :isRelation="true"
               :companyCode="supplier_code"
@@ -71,6 +71,16 @@
             <i class="el-icon-s-unfold" style="height: 10px"></i>库存操作记录
           </div>
         </template>
+        <template #type_status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.type == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.type) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
       </ex-table>
     </div>
     <div v-else>
@@ -107,15 +117,25 @@ export default {
   },
   data() {
     return {
-      isDisabled: true,
+      statusOptions: [
+        {
+          id: "1",
+          label: "增加",
+        },
+        {
+          id: "2",
+          label: "减少",
+        },
+      ],
       stock_code: "",
       supplier_code: "",
       parmValue: {
         supplier_code: [],
         stock_code: [],
+        page: 1,
+        size: 15,
       },
       stock_list: [
-        //渲染表格上方的卡片选项用的
         {
           id: "1",
           icon: "el-icon-box",
@@ -166,48 +186,72 @@ export default {
         total: 0,
       },
       columns: [
-        // 表格 - 列参数
         {
           prop: "id",
-          label: "记录编号",
+          label: "业务编号",
         },
         {
-          prop: "author",
-          label: "操作人",
+          prop: "action_type",
+          label: "库存来源",
+          width: "120px",
         },
+
         {
-          prop: "reviewer",
-          label: "部门",
+          prop: "type",
+          label: "变化类别",
+          _slot_: "type_status",
+          width: "70px",
         },
         {
-          prop: "type",
-          label: "库存类型",
+          prop: "stock",
+          label: "变动数量",
+          'min-width': "90px",
         },
         {
-          prop: "number",
-          label: "操作数量",
-          // _slot_: "status",
-          // width: "80px",
+          prop: "code",
+          label: "仓库所在公司编号",
+          width: "140px",
         },
         {
-          prop: "typeo",
-          label: "库存来源",
-          // sortable: true,
+          prop: "name",
+          label: "仓库所在公司名称",
+          width: "150px",
+        },
+        {
+          prop: "wsm_code",
+          label: "仓库编号",
+          width: "170px",
         },
         {
-          prop: "addTime",
+          prop: "wsm_name",
+          label: "仓库名称",
+          width: "100px",
+        },
+
+        {
+          prop: "action_name",
+          label: "操作人",
+          width: "70px",
+        },
+        {
+          prop: "reviewer",
+          label: "操作人所在部门",
+          width: "120px",
+        },
+        {
+          prop: "addtime",
           label: "操作时间",
-          // sortable: true,
+          width: "145px",
+          sortable: true,
         },
       ],
-      parmValue: {
-        //入参参数
-      },
     };
   },
   mounted() {
-    // this.searchList(); //获取表格信息
+    this.stock_code = "";
+    this.supplier_code = "";
     this.stockList();
+    this.searchList();
   },
 
   methods: {
@@ -228,41 +272,20 @@ export default {
       if (e && e.id) {
         this.parmValue.supplier_code = [e.code];
         this.supplier_code = e.code;
-        this.isDisabled = false;
       } else {
         this.parmValue.stock_code = [];
         this.parmValue.supplier_code = [];
         this.stock_code = "";
         this.supplier_code = "";
-        this.isDisabled = true;
       }
       this.stockList();
     },
 
-    restSearch() {
-      // 表格 - 分页
-      this.pageInfo = {
-        size: 15,
-        curr: 1,
-        total: 0,
-      };
-      //清空入参参数
-      // this.parmValue = {
-      //   name: "", // 业务员名字
-      //   username: "", // 账号
-      //   status: "", //
-      //   page: 1, // 页码
-      //   size: 10, // 每页显示条数
-      // };
-      // this.searchList();
-      // // this.stock_list[0].num
-    },
     //获取表格上方的卡片数据
     async stockList() {
-      let { supplier_code, stock_code } = this.parmValue;
       let model = {
-        supplierNo: supplier_code ? supplier_code.toString() : "",
-        wsm_code: stock_code ? stock_code.toString() : "",
+        supplier_code: this.supplier_code,
+        stock_code: this.stock_code,
       };
       const res = await asyncRequest.getstockwsm(model);
 
@@ -274,7 +297,7 @@ export default {
           usable_stock,
           wait_in_stock,
           wait_out_stock,
-          warn_stock,
+          // warn_stock,
         } = res.data;
         this.stock_list[0].endVal = Number(total_stock);
         this.stock_list[1].endVal = Number(wait_in_stock);
@@ -288,17 +311,23 @@ export default {
     },
     //获取表格数据
     async searchList() {
+      this.tableData = [];
       this.loading = true;
-      let model = {};
-      // const res = await asyncRequest.list(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.supplier_code = this.supplier_code;
+      model.stock_code = this.stock_code;
       const res = await asyncRequest.list(model);
-      // console.log(res);
       if (res && res.code === 0 && res.data) {
-        // this.tableData = res.data;
         this.tableData = res.data.list;
+        this.tableData.forEach((v) => {
+          if (v.empty) {
+            v.code = v.empty.code;
+            v.wsm_name = v.empty.wsm_name;
+            v.name = v.empty.name;
+          }
+        });
+
         this.pageInfo.total = Number(res.data.count);
-        // console.log(this.tableData);
-        // this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
@@ -311,7 +340,6 @@ export default {
 };
 </script>
    <style lang="scss" scoped>
-@import "~@/styles/index.scss";
 .card {
   width: 200px;
   height: 115px;