xiaodai2022 il y a 2 ans
Parent
commit
ea11b67882

+ 2 - 0
src/apis/service/orderEntry/orderConfirm/index.js

@@ -20,4 +20,6 @@ export default {
     sourceList: (data, params) => http(api + "getsourcedata", data, "post", params),
     sourceList: (data, params) => http(api + "getsourcedata", data, "post", params),
     //验证售价
     //验证售价
     salegetprice: (data, params) => http(api + "salegetprice", data, "post", params),
     salegetprice: (data, params) => http(api + "salegetprice", data, "post", params),
+    // 线上商品获取活动
+    goods_active: (data, params) => http(api + "actquery", data, "post", params),
 };
 };

+ 9 - 0
src/apis/service/purchaseIn/recovery/index.js

@@ -0,0 +1,9 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 分页查询
+  list: (data, params) => http(api + "consultbidlist", data, "post", params),
+  // 采返商品详情
+  good_detail: (data, params) => http(api + "consultfeadinfo", data, "post", params),
+};

+ 1 - 1
src/components/show-good-data-modal/main.vue

@@ -187,7 +187,7 @@ export default {
     async initData() {
     async initData() {
       this.loading = true;
       this.loading = true;
       const { code, message, data } = await asyncRequest.detail({
       const { code, message, data } = await asyncRequest.detail({
-        skuCode: this.id,
+        skuCode: this.skuCode,
       });
       });
       this.loading = false;
       this.loading = false;
       if (code === 0) {
       if (code === 0) {

+ 6 - 5
src/views/goodStore/active/components/baseForm.vue

@@ -113,12 +113,13 @@
         <el-col
         <el-col
           :span="24"
           :span="24"
           v-if="
           v-if="
-            status == '' ||
             status == '4' ||
             status == '4' ||
-            (status === '0' && powers.some((item) => item !== '056')) ||
-            (status === '1' && powers.some((item) => item !== '057')) ||
-            (status === '2' && powers.some((item) => item !== '058')) ||
-            (status === '3' && powers.some((item) => item !== '059'))
+            !(
+              (status === '0' && powers.some((item) => item == '056')) ||
+              (status === '1' && powers.some((item) => item == '057')) ||
+              (status === '2' && powers.some((item) => item == '058')) ||
+              (status === '3' && powers.some((item) => item == '059'))
+            )
           "
           "
         >
         >
           <el-form-item
           <el-form-item

+ 6 - 6
src/views/goodStore/active/detail.vue

@@ -234,15 +234,15 @@ export default {
 </script>
 </script>
    <style lang="scss" scoped>
    <style lang="scss" scoped>
 .activeDetail {
 .activeDetail {
-  position: relative;
-  height: 100%;
-  width: 100%;
+  // position: relative;
+  // height: 100%;
+  // width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
   .activeDetail-main {
   .activeDetail-main {
-    overflow-y: scroll;
-    position: relative;
+    // overflow-y: scroll;
+    // position: relative;
     padding: 10px;
     padding: 10px;
-    height: 100%;
+    // height: 100%;
     width: 100%;
     width: 100%;
   }
   }
   .activeDetail-title {
   .activeDetail-title {

+ 53 - 13
src/views/orderEntry/orderConfirm/columns.js

@@ -56,19 +56,52 @@ const ruleForm = {
   price: "", //单价
   price: "", //单价
   num: "", //数量
   num: "", //数量
   before_discount_all_price: "", //优惠前总金额
   before_discount_all_price: "", //优惠前总金额
-  activity_name: "", //优惠活动名称
-
+  activity_id: "", //优惠活动名称
   order_remark: "", //订单备注
   order_remark: "", //订单备注
-
   addr: "", //联系地址
   addr: "", //联系地址
   addr_code: [], //省市区
   addr_code: [], //省市区
 }
 }
 const rules = {
 const rules = {
+  platform_code: [
+    {
+      required: true,
+      trigger: "blur",
+      message: "平台订单号不能为空",
+    },
+  ],
+  platform_time: [
+    {
+      required: true,
+      trigger: "change",
+      message: "平台订单下单时间不能为空",
+    },
+  ],
+  plat_code: [
+    {
+      required: true,
+      trigger: "blur",
+      message: "平台商品编号不能为空",
+    },
+  ],
+  mode: [
+    {
+      required: true,
+      trigger: "change",
+      message: "收费模式不能为空",
+    },
+  ],
+  sale_source: [
+    {
+      required: true,
+      trigger: "change",
+      message: "销售渠道不能为空",
+    },
+  ],
   contactor: [
   contactor: [
     {
     {
       required: true,
       required: true,
       trigger: "blur",
       trigger: "blur",
-      message: "联系人不能为空",
+      message: "收货人不能为空",
     },
     },
   ],
   ],
   mobile: [
   mobile: [
@@ -108,6 +141,13 @@ const rules = {
       trigger: "blur",
       trigger: "blur",
     },
     },
   ],
   ],
+  order_remark: [
+    {
+      required: true,
+      message: "订单备注不能为空",
+      trigger: "blur",
+    },
+  ],
 }
 }
 //是否定制
 //是否定制
 const options1 = [
 const options1 = [
@@ -195,7 +235,7 @@ const onlineColumns = [
     prop: "company",
     prop: "company",
     label: "业务企业名称",
     label: "业务企业名称",
     _slot_: "company",
     _slot_: "company",
-    span:24
+    span: 24
   },
   },
   // {
   // {
   //   prop: "online_reason",
   //   prop: "online_reason",
@@ -212,12 +252,12 @@ const onlineColumns = [
   {
   {
     prop: "platform_name",
     prop: "platform_name",
     label: "所属平台",
     label: "所属平台",
-    span:24
+    span: 24
   },
   },
   {
   {
     prop: "brand_name",
     prop: "brand_name",
     label: "品牌",
     label: "品牌",
-    span:24
+    span: 24
   },
   },
   // {
   // {
   //   prop: "platform_code_en",
   //   prop: "platform_code_en",
@@ -232,15 +272,15 @@ const onlineColumns = [
   {
   {
     prop: "cat_info",
     prop: "cat_info",
     label: "分类",
     label: "分类",
-    _slot_:'cat_info',
-    span:24
+    _slot_: 'cat_info',
+    span: 24
   },
   },
 
 
 
 
   {
   {
     prop: "unit",
     prop: "unit",
     label: "单位",
     label: "单位",
-    span:10
+    span: 10
   },
   },
 
 
 
 
@@ -255,13 +295,13 @@ const onlineColumns = [
     prop: "is_stock",
     prop: "is_stock",
     label: "是否库存品",
     label: "是否库存品",
     _slot_: "is_stock",
     _slot_: "is_stock",
-    span:14
+    span: 14
   },
   },
   {
   {
     prop: "tax",
     prop: "tax",
     label: "税点",
     label: "税点",
     append: '%',
     append: '%',
-    span:10
+    span: 10
   },
   },
 
 
 
 
@@ -269,7 +309,7 @@ const onlineColumns = [
     prop: "exclusive",
     prop: "exclusive",
     label: "专属类型",
     label: "专属类型",
     _slot_: "exclusive",
     _slot_: "exclusive",
-    span:14
+    span: 14
   },
   },
 ]
 ]
 export {
 export {

+ 199 - 87
src/views/orderEntry/orderConfirm/index.vue

@@ -51,21 +51,31 @@
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="platform_code">
+                      <el-form-item
+                        prop="platform_code"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.platform_code"
                           v-model="ruleForm.platform_code"
                           maxlength="100"
                           maxlength="100"
-                          :disabled="isDetail"
+                          :disabled="status !== '2'"
                           placeholder="平台订单号"
                           placeholder="平台订单号"
                         /> </el-form-item
                         /> </el-form-item
                     ></el-col>
                     ></el-col>
 
 
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="po_code">
+                      <el-form-item
+                        prop="po_code"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.po_code"
                           v-model="ruleForm.po_code"
                           maxlength="100"
                           maxlength="100"
-                          :disabled="isDetail"
+                          :disabled="status !== '2'"
                           placeholder="其他单号"
                           placeholder="其他单号"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
@@ -130,10 +140,10 @@
                               <span>SPU编号:</span
                               <span>SPU编号:</span
                               ><span>{{ conGoodData.spuCode }}</span>
                               ><span>{{ conGoodData.spuCode }}</span>
                             </li>
                             </li>
-                            <li>
+                            <!-- <li>
                               <span>平台商品编码:</span
                               <span>平台商品编码:</span
                               ><span>{{ conGoodData.platform_code_en }}</span>
                               ><span>{{ conGoodData.platform_code_en }}</span>
-                            </li>
+                            </li> -->
                           </ul>
                           </ul>
                           <i
                           <i
                             class="el-icon-warning-outline fr"
                             class="el-icon-warning-outline fr"
@@ -193,25 +203,36 @@
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="platform_time">
+                      <el-form-item
+                        prop="platform_time"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-date-picker
                         <el-date-picker
                           type="datetime"
                           type="datetime"
                           placeholder="平台订单下单时间"
                           placeholder="平台订单下单时间"
                           v-model="ruleForm.platform_time"
                           v-model="ruleForm.platform_time"
                           style="width: 100%"
                           style="width: 100%"
                           value-format="yyyy-MM-dd HH:mm:ss"
                           value-format="yyyy-MM-dd HH:mm:ss"
+                          :disabled="status !== '2'"
                           :picker-options="pickerOptions"
                           :picker-options="pickerOptions"
                           @change="selectTime"
                           @change="selectTime"
                         >
                         >
                         </el-date-picker> </el-form-item
                         </el-date-picker> </el-form-item
                     ></el-col>
                     ></el-col>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <!-- :disabled="isDetail" -->
-                      <el-form-item prop="plat_code">
+                      <el-form-item
+                        prop="plat_code"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.plat_code"
                           v-model="ruleForm.plat_code"
                           maxlength="100"
                           maxlength="100"
                           readonly
                           readonly
+                          :disabled="status !== '2'"
                           @focus="showModel = true"
                           @focus="showModel = true"
                           placeholder="平台商品编号"
                           placeholder="平台商品编号"
                       /></el-form-item>
                       /></el-form-item>
@@ -264,10 +285,10 @@
                                 <span>SPU编号:</span
                                 <span>SPU编号:</span
                                 ><span>{{ subGoodData.spuCode }}</span>
                                 ><span>{{ subGoodData.spuCode }}</span>
                               </li>
                               </li>
-                              <li>
+                              <!-- <li>
                                 <span>平台商品编码:</span
                                 <span>平台商品编码:</span
                                 ><span>{{ subGoodData.platform_code_en }}</span>
                                 ><span>{{ subGoodData.platform_code_en }}</span>
-                              </li>
+                              </li> -->
                             </ul>
                             </ul>
                             <i
                             <i
                               class="el-icon-warning-outline fr"
                               class="el-icon-warning-outline fr"
@@ -350,10 +371,17 @@
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="mode">
+                      <el-form-item
+                        prop="mode"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-select
                         <el-select
                           v-model="ruleForm.mode"
                           v-model="ruleForm.mode"
                           style="width: 100%"
                           style="width: 100%"
+                          clearable
+                          :disabled="status !== '2'"
                           placeholder="收费模式"
                           placeholder="收费模式"
                         >
                         >
                           <el-option
                           <el-option
@@ -367,10 +395,17 @@
                     </el-col>
                     </el-col>
 
 
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="sale_source">
+                      <el-form-item
+                        prop="sale_source"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-select
                         <el-select
                           v-model="ruleForm.sale_source"
                           v-model="ruleForm.sale_source"
                           style="width: 100%"
                           style="width: 100%"
+                          clearable
+                          :disabled="status !== '2'"
                           placeholder="销售渠道"
                           placeholder="销售渠道"
                         >
                         >
                           <el-option
                           <el-option
@@ -411,21 +446,31 @@
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="contactor">
+                      <el-form-item
+                        prop="contactor"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.contactor"
                           v-model="ruleForm.contactor"
                           maxlength="100"
                           maxlength="100"
-                          :disabled="isDetail"
+                          :disabled="status !== '2'"
                           placeholder="收货人"
                           placeholder="收货人"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
                     </el-col>
                     </el-col>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="mobile">
+                      <el-form-item
+                        prop="mobile"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.mobile"
                           v-model="ruleForm.mobile"
                           maxlength="100"
                           maxlength="100"
-                          :disabled="isDetail"
+                          :disabled="status !== '2'"
                           placeholder="收货电话"
                           placeholder="收货电话"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
@@ -444,31 +489,44 @@
             <div class="tab-item-main">
             <div class="tab-item-main">
               <el-row class="tab-title">
               <el-row class="tab-title">
                 <el-col :span="4">
                 <el-col :span="4">
-                  <div>{{ importSitem.addr }}</div>
+                  <div style="min-height: 26px">&nbsp;</div>
                   <div>{{ importSitem.addr }}</div></el-col
                   <div>{{ importSitem.addr }}</div></el-col
                 >
                 >
                 <el-col :span="9">
                 <el-col :span="9">
-                  <div>{{ confirmSitem.addr }}</div>
+                  <div style="min-height: 26px">
+                    {{ confirmSitem.addr_name }}&nbsp;
+                  </div>
                   <div>{{ confirmSitem.addr }}</div>
                   <div>{{ confirmSitem.addr }}</div>
                 </el-col>
                 </el-col>
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="addr_code">
+                      <el-form-item
+                        prop="addr_code"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <select-area
                         <select-area
                           :value="ruleForm.addr_code"
                           :value="ruleForm.addr_code"
                           :size="'mini'"
                           :size="'mini'"
+                          :disabled="status !== '2'"
                           placeholder="收货省市区"
                           placeholder="收货省市区"
                           @selectChange="select_area_change($event)"
                           @selectChange="select_area_change($event)"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
                     </el-col>
                     </el-col>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="addr">
+                      <el-form-item
+                        prop="addr"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <el-input
                         <el-input
                           v-model="ruleForm.addr"
                           v-model="ruleForm.addr"
                           maxlength="100"
                           maxlength="100"
-                          :disabled="isDetail"
+                          :disabled="status !== '2'"
                           placeholder="详细地址"
                           placeholder="详细地址"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
@@ -488,11 +546,16 @@
                 <el-col :span="4">{{ importSitem.order_remark }}</el-col>
                 <el-col :span="4">{{ importSitem.order_remark }}</el-col>
                 <el-col :span="9">{{ confirmSitem.order_remark }}</el-col>
                 <el-col :span="9">{{ confirmSitem.order_remark }}</el-col>
                 <el-col :span="11">
                 <el-col :span="11">
-                  <el-form-item prop="order_remark">
+                  <el-form-item
+                    prop="order_remark"
+                    :style="{
+                      marginBottom: status !== '2' ? '0px' : '18px',
+                    }"
+                  >
                     <el-input
                     <el-input
                       v-model="ruleForm.order_remark"
                       v-model="ruleForm.order_remark"
                       maxlength="100"
                       maxlength="100"
-                      :disabled="isDetail"
+                      :disabled="status !== '2'"
                       placeholder="订单备注" /></el-form-item
                       placeholder="订单备注" /></el-form-item
                 ></el-col>
                 ></el-col>
               </el-row>
               </el-row>
@@ -517,29 +580,39 @@
                 <el-col :span="11" class="nop">
                 <el-col :span="11" class="nop">
                   <el-row>
                   <el-row>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="num">
+                      <el-form-item
+                        prop="num"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <digital-input
                         <digital-input
                           :values="ruleForm.num"
                           :values="ruleForm.num"
                           :placeholder="'数量'"
                           :placeholder="'数量'"
                           :min="0"
                           :min="0"
-                          :disabled="false"
                           :max="100000000000"
                           :max="100000000000"
                           :position="'right'"
                           :position="'right'"
                           :precision="0"
                           :precision="0"
                           :size="'mini'"
                           :size="'mini'"
                           :controls="false"
                           :controls="false"
                           :append="''"
                           :append="''"
+                          :disabled="status !== '2'"
                           @reschange="number_change($event, 'num')"
                           @reschange="number_change($event, 'num')"
                         />
                         />
                       </el-form-item>
                       </el-form-item>
                     </el-col>
                     </el-col>
                     <el-col :span="12" class="border">
                     <el-col :span="12" class="border">
-                      <el-form-item prop="price">
+                      <el-form-item
+                        prop="price"
+                        :style="{
+                          marginBottom: status !== '2' ? '0px' : '18px',
+                        }"
+                      >
                         <digital-input
                         <digital-input
                           :values="ruleForm.price"
                           :values="ruleForm.price"
                           :placeholder="'单价'"
                           :placeholder="'单价'"
                           :min="price_min"
                           :min="price_min"
-                          :disabled="false"
+                          :disabled="status !== '2'"
                           :max="100000000000"
                           :max="100000000000"
                           :position="'right'"
                           :position="'right'"
                           :precision="2"
                           :precision="2"
@@ -565,14 +638,30 @@
                 <el-col :span="4">{{ importSitem.activity_name }}</el-col>
                 <el-col :span="4">{{ importSitem.activity_name }}</el-col>
                 <el-col :span="9">{{ confirmSitem.activity_name }}</el-col>
                 <el-col :span="9">{{ confirmSitem.activity_name }}</el-col>
                 <el-col :span="11">
                 <el-col :span="11">
-                  <el-form-item prop="activity_name">
-                    <el-input
-                      v-model="ruleForm.activity_name"
-                      maxlength="100"
-                      :disabled="isDetail"
+                  <el-form-item
+                    prop="activity_code"
+                    :style="{
+                      marginBottom: status !== '2' ? '0px' : '18px',
+                    }"
+                  >
+                    <el-select
+                      v-model="ruleForm.activity_code"
+                      style="width: 100%"
+                      clearable
+                      :disabled="status !== '2'"
+                      @change="get_new_price"
                       placeholder="活动名称"
                       placeholder="活动名称"
-                    /> </el-form-item
-                ></el-col>
+                    >
+                      <el-option
+                        v-for="(item, i) in actOptions"
+                        :key="item.activity_code + i"
+                        :label="item.activity_name"
+                        :value="item.activity_code"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </el-col>
               </el-row>
               </el-row>
             </div>
             </div>
           </div>
           </div>
@@ -594,16 +683,12 @@
               </el-row>
               </el-row>
             </div>
             </div>
           </div>
           </div>
-          <div class="tab-row">
+          <div class="tab-row" v-if="status === '2'">
             <div class="tab-item-label">
             <div class="tab-item-label">
               <label style="color: transparent">*</label>
               <label style="color: transparent">*</label>
             </div>
             </div>
             <div class="tab-item-main tr">
             <div class="tab-item-main tr">
-              <el-button
-                v-if="!isDetail"
-                type="primary"
-                @click="submitForm"
-                :size="'mini'"
+              <el-button type="primary" @click="submitForm" :size="'mini'"
                 >保 存
                 >保 存
               </el-button>
               </el-button>
               <!-- <el-button @click="showModelThis = false" :size="'mini'">{{
               <!-- <el-button @click="showModelThis = false" :size="'mini'">{{
@@ -692,6 +777,7 @@ export default {
       rulesThis: {},
       rulesThis: {},
       coptions: [],
       coptions: [],
       options,
       options,
+      actOptions: [],
       ruleForm: {},
       ruleForm: {},
       rules,
       rules,
       options1,
       options1,
@@ -735,7 +821,7 @@ export default {
         price,
         price,
         num,
         num,
         before_discount_all_price,
         before_discount_all_price,
-        activity_name,
+        activity_code,
         order_remark,
         order_remark,
         addr,
         addr,
         addr_code,
         addr_code,
@@ -753,15 +839,21 @@ export default {
         price: price || "", //单价
         price: price || "", //单价
         num: num || "", //数量
         num: num || "", //数量
         before_discount_all_price: before_discount_all_price || "", //优惠前总金额
         before_discount_all_price: before_discount_all_price || "", //优惠前总金额
-        activity_name: activity_name || "", //优惠活动名称
+        activity_code: activity_code || "", //优惠活动名称
         order_remark: order_remark || "", //订单备注
         order_remark: order_remark || "", //订单备注
         addr: addr || "", //联系地址
         addr: addr || "", //联系地址
-        addr_code: addr_code && addr_code.length > 0 ? addr_code : [], //省市区
+        addr_code:
+          addr_code && addr_code.length > 0 ? addr_code.split(",") : [], //省市区
       };
       };
       this.ruleForm.before_discount_all_price = this.accMul(
       this.ruleForm.before_discount_all_price = this.accMul(
         this.ruleForm.num,
         this.ruleForm.num,
         this.ruleForm.price
         this.ruleForm.price
       );
       );
+      await this.get_goods_active();
+      const { platform_code: platformCode } = this.subGoodData;
+      if (platformCode) {
+        await this.get_source(platformCode);
+      }
     },
     },
 
 
     async initData() {
     async initData() {
@@ -775,28 +867,24 @@ export default {
         this.confirmSitem = confirm
         this.confirmSitem = confirm
           ? JSON.parse(JSON.stringify(confirm))
           ? JSON.parse(JSON.stringify(confirm))
           : null;
           : null;
-        this.subSitem = user_update
-          ? JSON.parse(JSON.stringify(user_update))
-          : null;
+
         this.status = status;
         this.status = status;
+        if (
+          !(this.status === "3" || this.status === "4" || this.status === "5")
+        ) {
+          this.subSitem = confirm ? JSON.parse(JSON.stringify(confirm)) : null;
+        } else {
+          this.subSitem = user_update
+            ? JSON.parse(JSON.stringify(user_update))
+            : null;
+        }
         // console.log(this.status);
         // console.log(this.status);
         if (this.confirmSitem && this.confirmSitem.plat_code) {
         if (this.confirmSitem && this.confirmSitem.plat_code) {
           await this.onlineData(1, this.confirmSitem.plat_code);
           await this.onlineData(1, this.confirmSitem.plat_code);
-          if (
-            !(this.status === "3" || this.status === "4" || this.status === "5")
-          ) {
-            await this.againForm(this.confirmSitem);
-          }
         }
         }
         if (this.subSitem && this.subSitem.plat_code) {
         if (this.subSitem && this.subSitem.plat_code) {
           await this.onlineData(2, this.subSitem.plat_code);
           await this.onlineData(2, this.subSitem.plat_code);
-          if (
-            this.status === "3" ||
-            this.status === "4" ||
-            this.status === "5"
-          ) {
-            await this.againForm(this.subSitem);
-          }
+          await this.againForm(this.subSitem);
         }
         }
 
 
         this.getNewTime();
         this.getNewTime();
@@ -817,13 +905,6 @@ export default {
           this.conGoodData = data;
           this.conGoodData = data;
         } else {
         } else {
           this.subGoodData = data;
           this.subGoodData = data;
-          const { platform_code } = this.subGoodData;
-          if (platform_code) {
-            await this.get_source(platform_code);
-          }
-          if (this.status === "2") {
-            await this.get_new_price();
-          }
         }
         }
       } else if (code >= 100 && code <= 104) {
       } else if (code >= 100 && code <= 104) {
         await this.logout();
         await this.logout();
@@ -847,6 +928,11 @@ export default {
       } else {
       } else {
         this.$message.warning(message);
         this.$message.warning(message);
       }
       }
+      console.log(this.coptions.length);
+      if (this.coptions.length == 0) {
+        this.ruleForm.sale_source = "";
+        this.$refs.ruleForm.validateField("sale_source");
+      }
     },
     },
     async resultList(e) {
     async resultList(e) {
       if (e && e.length === 1) {
       if (e && e.length === 1) {
@@ -883,26 +969,9 @@ export default {
         this.ruleForm.price
         this.ruleForm.price
       );
       );
     },
     },
-    accMul(arg1, arg2) {
-      var m = 0,
-        s1 = arg1.toString(),
-        s2 = arg2.toString();
 
 
-      try {
-        m += s1.split(".")[1].length;
-      } catch (e) {}
-
-      try {
-        m += s2.split(".")[1].length;
-      } catch (e) {}
-
-      return (
-        (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
-        Math.pow(10, m)
-      );
-    },
     async get_new_price() {
     async get_new_price() {
-      const { num, activity_name } = this.ruleForm;
+      const { num, activity_code } = this.ruleForm;
 
 
       if (num * 1 === 0) {
       if (num * 1 === 0) {
         this.price_min = "0";
         this.price_min = "0";
@@ -918,8 +987,8 @@ export default {
               ? subSkuCode
               ? subSkuCode
               : conSkuCode,
               : conSkuCode,
           sale_num: num,
           sale_num: num,
-          is_activity: activity_name ? "1" : "0",
-          act_code: activity_name ? activity_name : "",
+          is_activity: activity_code ? "1" : "0",
+          act_code: activity_code ? activity_code : "",
         };
         };
         if (!this.priceLoding) {
         if (!this.priceLoding) {
           const { isok, price } = await this.set_salegetprice(model);
           const { isok, price } = await this.set_salegetprice(model);
@@ -933,7 +1002,28 @@ export default {
         }
         }
       }
       }
     },
     },
-
+    async get_goods_active() {
+      this.actOptions = [];
+      const { skuCode, companyNo, platform_code } = this.subGoodData;
+      let model = {
+        skuCode,
+        companyNo,
+        platform_id: platform_code,
+      };
+      const { code, data, message } = await asyncRequest.goods_active(model);
+      if (code === 0) {
+        const { act } = data;
+        this.actOptions = act;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+      if (this.actOptions.length === 0) {
+        this.ruleForm.activity_code = "";
+        this.$refs.ruleForm.validateField("activity_code");
+      }
+    },
     async resetForm() {
     async resetForm() {
       // 重置
       // 重置
       await this.$nextTick(() => {
       await this.$nextTick(() => {
@@ -968,6 +1058,24 @@ export default {
         }
         }
       });
       });
     },
     },
+    accMul(arg1, arg2) {
+      var m = 0,
+        s1 = arg1.toString(),
+        s2 = arg2.toString();
+
+      try {
+        m += s1.split(".")[1].length;
+      } catch (e) {}
+
+      try {
+        m += s2.split(".")[1].length;
+      } catch (e) {}
+
+      return (
+        (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
+        Math.pow(10, m)
+      );
+    },
     async set_salegetprice(model) {
     async set_salegetprice(model) {
       this.priceLoding = true;
       this.priceLoding = true;
       let resModel = {
       let resModel = {
@@ -997,6 +1105,7 @@ export default {
    <style lang="scss" scoped>
    <style lang="scss" scoped>
 .orderConfirm {
 .orderConfirm {
   font-size: 13px;
   font-size: 13px;
+
   color: #909399 !important;
   color: #909399 !important;
   line-height: 26px;
   line-height: 26px;
   .tab-row {
   .tab-row {
@@ -1004,6 +1113,9 @@ export default {
     border-top: 1px solid #ebeef5;
     border-top: 1px solid #ebeef5;
     display: flex;
     display: flex;
     align-items: stretch;
     align-items: stretch;
+    &:last-child {
+      border-bottom: 1px solid #ebeef5;
+    }
     .tab-item-label {
     .tab-item-label {
       padding: 4px 5px;
       padding: 4px 5px;
       width: 125px;
       width: 125px;

+ 219 - 0
src/views/purchaseIn/recovery/columns.js

@@ -0,0 +1,219 @@
+const columns = [
+  {
+    prop: "infoNo",
+    label: "咨询单编号",
+    width: "155px",
+  },
+
+  {
+    prop: "bidNo",
+    label: "反馈编号",
+    width: "158px",
+  },
+  {
+    prop: "spuCode",
+    label: "反馈编号",
+    width: "158px",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    'min-width': "220px",
+  },
+  {
+    prop: "can",
+    label: "分类",
+    _slot_: "can",
+    'min-width': "180px",
+  },
+
+
+  {
+    prop: "brand_name",
+    label: "品牌",
+    width: "80px",
+  },
+
+
+  {
+    prop: "unit",
+    label: "单位",
+    width: "60px",
+  },
+  {
+    prop: "creater",
+    label: "采购员",
+    width: "60px",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "145px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]
+const statusOptions = [
+  { value: "0", label: "待与供应商确认" },
+  { value: "1", label: "待入库" },
+  { value: "2", label: "部分入库" },
+  { value: "3", label: "入库完成" },
+  { value: "4", label: "已取消订单" },
+];
+const order_type_options = [
+  {
+    value: "1",
+    label: "备货单",
+  },
+  {
+    value: "2",
+    label: "线上非库存品",
+  },
+  {
+    value: "3",
+    label: "咨询采返",
+  },
+  { value: "4", label: "项目采返" },
+];
+//是否定制
+const options1 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//专属类型
+const options2 = [
+  { id: "0", name: "非泰康" },
+  { id: "1", name: "泰康" },
+]
+//销售权限
+const options3 = [
+  { id: "0", name: "无销售权限" },
+  { id: "1", name: "有销售权限" },
+]
+
+//是否库存品
+const options4 = [
+  { id: "0", name: "非库存品" },
+  { id: "1", name: "库存品" },
+]
+//是否启用实时金价
+const options5 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//供货区域
+const options6 = [
+  { id: "1", name: "全国" },
+  { id: "2", name: "全国除偏远" },
+]
+//是否启用阶梯
+const options7 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+const options8 = [
+  // { id: "0", name: "待提交" },
+  { id: "1", name: "待完善成本" },
+  { id: "2", name: "待产品审核" },
+  { id: "3", name: "待财务定价" },
+  { id: "4", name: "待财务审核定价" },
+  { id: "5", name: "待上线" },
+  { id: "6", name: "上线成功" },
+  { id: "7", name: "审核失败" },
+  { id: "8", name: "已下线" },
+]
+
+const options9 = [
+  { id: "0", name: "现结" },
+  { id: "1", name: "月清" },
+  { id: "2", name: "双月清" },
+]
+const costColumns = [
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+
+  {
+    prop: "cat",
+    label: "分类",
+    _slot_: "cat",
+    span: 8,
+  },
+
+  {
+    prop: "brand_name",
+    label: "品牌",
+    span: 6,
+  },
+
+
+  {
+    prop: "unit",
+    label: "单位",
+    span: 4,
+  },
+  {
+    prop: "send_way",
+    label: "发货方式",
+    _slot_: "send_way",
+    span: 6,
+  },
+
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 4,
+  },
+  {
+    prop: "pay_way",
+    label: "付款方式",
+    _slot_: "pay_way",
+    span: 4,
+  },
+
+
+  {
+    prop: "weight",
+    label: "商品总克重",
+    append: 'g',
+    span: 6,
+  },
+  {
+    prop: "creater",
+    label: "反馈人",
+    span: 4,
+  },
+  {
+    prop: "addtime",
+    label: "反馈时间",
+    span: 6,
+  },
+  {
+    prop: "noble",
+    _slot_: "noble",
+    label: "贵金属信息",
+    span: 24,
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+  {
+    prop: "remark",
+    label: "采返备注",
+    span: 24,
+  },
+]
+export { columns, statusOptions, order_type_options, options1, options2, options3, options4, options5, options6, options7, options8, options9, costColumns }

+ 229 - 0
src/views/purchaseIn/recovery/index.vue

@@ -0,0 +1,229 @@
+<template>
+  <div class="recovery 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="6" style="width: 200px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  placeholder="咨询单编号"
+                  v-model="parmValue.infoNo"
+                  maxlength="40"
+                  :size="searchSize"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                </el-input>
+              </el-col>
+              <el-col :span="6" style="width: 200px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  placeholder="反馈商品编号"
+                  v-model="parmValue.bidNo"
+                  maxlength="40"
+                  :size="searchSize"
+                  @blur="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                </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 :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>
+          </div>
+        </template>
+        <template #good_name="{ scope }">
+          <img
+            style="width: 20px; height: 20px"
+            class="hover fl"
+            v-viewer
+            :src="scope.row.good_img"
+            alt=""
+            v-if="scope.row.good_img"
+          />
+          <span>{{ scope.row.good_name }}</span>
+          <span v-for="(si, i) in scope.row.specinfo" :key="si.spec_id + i">
+            {{ i === 0 ? "__" : "--" }}{{ si.spec_name }}[{{ si.spec_value }}]
+          </span>
+        </template>
+        <template #can="{ scope }">
+          <span v-for="(si, i) in scope.row.can" :key="si.id + i">
+            {{ i === 0 ? "" : "_" }}{{ si.name }}
+          </span>
+        </template>
+
+        <template #operation="{ scope }">
+          <el-tooltip effect="dark" content="详情" placement="top">
+            <i
+              class="el-icon-view tb-icon"
+              @click="(modelId = scope.row.bidNo), (showModel = true)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+      <show-data
+        :showModel="showModel"
+        :bidNo="modelId"
+        @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/purchaseIn/recovery";
+import { columns } from "./columns";
+import { mapGetters } from "vuex";
+import showData from "./showData";
+export default {
+  name: "recovery",
+  mixins: [mixinPage, resToken],
+  components: {
+    showData,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "recovery"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      // 状态
+      loading: false,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+
+      parmValue: {
+        infoNo: "",
+        bidNo: "",
+        // is_own: "1",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      tableData: [],
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        infoNo: "",
+        bidNo: "",
+        // is_own: "1",
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+
+    async searchList() {
+      this.loading = true;
+      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);
+      } 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>
+.recovery {
+  // text-align: right;
+}
+</style>
+   

+ 164 - 0
src/views/purchaseIn/recovery/showData.vue

@@ -0,0 +1,164 @@
+<template>
+  <el-dialog
+    :title="'采返商品详情'"
+    :center="true"
+    align="left"
+    top="8vh"
+    width="1040px"
+    @close="showModelThis = false"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    v-loading="loading"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    append-to-body
+  >
+    <show-data-table
+      style="margin: -20px 0 0 0"
+      :sitem="sitem"
+      :columns="costColumns"
+      :border="true"
+    >
+      <template slot="good_name">
+        <img
+          v-viewer
+          style="width: 23px; height: 23px; margin: 0 5px 0 0"
+          class="fl"
+          v-if="sitem.good_img"
+          :src="sitem.good_img"
+          alt=""
+        />
+        <span>{{ sitem.good_name }}</span>
+        <span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
+          <span v-if="i !== 0">-</span>
+          <span v-else>_</span>
+          <span>{{ si.spec_name }}[{{ si.spec_value_name }}]</span>
+        </span>
+        <el-popover placement="top" width="300" trigger="hover">
+          <ul>
+            <li>
+              <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
+            </li>
+          </ul>
+          <i class="el-icon-warning-outline fr" slot="reference"></i>
+        </el-popover>
+      </template>
+      <template slot="cat">
+        <span v-for="(si, i) in sitem.cat_info" :key="si.id + i">
+          {{ i === 0 ? "" : "_" }}{{ si.name }}
+        </span>
+      </template>
+      <template slot="send_way">
+        <span>{{ sitem.send_way === "1" ? "供应商包邮" : "公司自提" }}</span>
+      </template>
+
+      <template slot="good_type">
+        <el-tag
+          :size="'mini'"
+          v-text="
+            (options1.find((item) => item.id == sitem.good_type) || {}).name ||
+            '--'
+          "
+        />
+        <span v-if="sitem.good_type === '1'" style="padding: 0 0 0 5px"
+          >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
+        >
+      </template>
+      <template slot="pay_way">
+        <el-tag
+          :size="'mini'"
+          v-text="
+            (options9.find((item) => item.id == sitem.pay_way) || {}).name ||
+            '--'
+          "
+        />
+      </template>
+      <template slot="noble">
+        <span v-if="sitem.noble_name"
+          >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+            sitem.noble_name
+          }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+            sitem.is_gold_price === "0" ? "不" : ""
+          }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
+            sitem.config
+          }}-{{ sitem.other_config }}</span
+        >
+        <span v-else>--</span>
+      </template>
+    </show-data-table>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+  options9,
+  costColumns,
+} from "./columns";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/purchaseIn/recovery";
+export default {
+  name: "showData",
+  props: ["showModel", "bidNo"],
+  mixins: [resToken],
+  data() {
+    return {
+      newTime: "",
+      loading: true,
+      showModelThis: this.showModel,
+      sitem: "",
+      options1,
+      options2,
+      options3,
+      options4,
+      options5,
+      options6,
+      options7,
+      options8,
+      options9,
+      costColumns,
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initData();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+
+  methods: {
+    async initData() {
+      this.loading = true;
+      const { code, message, data } = await asyncRequest.good_detail({
+        bidNo: this.bidNo,
+      });
+      if (code === 0) {
+        this.sitem = data;
+        this.loading = false;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 0 - 0
src/views/purchaseIn/recovery/采购采返查询


+ 1 - 1
src/views/sellOut/bargainList/detail.vue

@@ -437,7 +437,7 @@ export default {
 
 
                 {
                 {
                   confirmButtonText: "确定",
                   confirmButtonText: "确定",
-                  cancelButtonText: "取消2",
+                  cancelButtonText: "取消",
                   type: "error",
                   type: "error",
                 }
                 }
               )
               )

+ 33 - 16
src/views/stock/allot/components/goStock-audit.vue

@@ -1,5 +1,11 @@
 <template>
 <template>
-  <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px">
+  <el-form
+    :model="ruleForm"
+    :rules="rules"
+    ref="ruleForm"
+    :size="'mini'"
+    label-width="90px"
+  >
     <el-row>
     <el-row>
       <el-col :span="12"
       <el-col :span="12"
         ><el-form-item label="物流公司" prop="post_name">
         ><el-form-item label="物流公司" prop="post_name">
@@ -7,20 +13,28 @@
             :value="ruleForm.post_name"
             :value="ruleForm.post_name"
             :placeholder="'请输入物流公司'"
             :placeholder="'请输入物流公司'"
             :names="''"
             :names="''"
+            :size="'mini'"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
-            :is-detail="!(status == '2' && powers.some((item) => item == '021'))"
+            :is-detail="
+              !(status == '2' && powers.some((item) => item == '021'))
+            "
             @searchChange="handleCompany"
             @searchChange="handleCompany"
           />
           />
         </el-form-item>
         </el-form-item>
         <el-form-item label="物流费用" prop="post_fee">
         <el-form-item label="物流费用" prop="post_fee">
-          <el-input
-            type="number"
-            placeholder="请输入物流费用"
+          <digital-input
+            :values="ruleForm.post_fee"
+            :placeholder="'物流费用'"
+            :min="0"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
-            v-model="ruleForm.post_fee"
-          >
-            <template slot="append">元</template>
-          </el-input>
+            :max="100000000000"
+            :position="'right'"
+            :precision="2"
+            :size="'mini'"
+            :controls="false"
+            :append="'元'"
+            @reschange="number_change($event, 'post_fee')"
+          />
         </el-form-item>
         </el-form-item>
       </el-col>
       </el-col>
 
 
@@ -29,6 +43,7 @@
           <el-input
           <el-input
             placeholder="请输入物流单号"
             placeholder="请输入物流单号"
             maxlength="100"
             maxlength="100"
+            :size="'mini'"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
             :disabled="!(status == '2' && powers.some((item) => item == '021'))"
             v-model="ruleForm.post_code"
             v-model="ruleForm.post_code"
             clearable
             clearable
@@ -83,16 +98,14 @@ export default {
       }
       }
     };
     };
     const validate_post_fee = (rule, value, callback) => {
     const validate_post_fee = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("物流费用不能为空!"));
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
       } else {
       } else {
-        if (isnumber2(value)) {
-          callback();
-        } else {
-          callback(new Error("物流费用仅支持整数及两位小数!"));
-        }
+        callback();
       }
       }
     };
     };
+
     return {
     return {
       status: "",
       status: "",
       ruleForm: {
       ruleForm: {
@@ -148,6 +161,10 @@ export default {
         }
         }
       });
       });
     },
     },
+    async number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
+    },
     // 商品保存提交
     // 商品保存提交
     async submitForm() {
     async submitForm() {
       await this.$refs.ruleForm.validate(async (valid) => {
       await this.$refs.ruleForm.validate(async (valid) => {