xiaodai2022 2 years ago
parent
commit
c4b5729cb8
2 changed files with 417 additions and 125 deletions
  1. BIN
      public/static/C端订单导入模板.xlsx
  2. 417 125
      src/views/orderEntry/orderConfirm/index.vue

BIN
public/static/C端订单导入模板.xlsx


+ 417 - 125
src/views/orderEntry/orderConfirm/index.vue

@@ -4,134 +4,369 @@
       style="width: 100%"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <!-- <div
-        class="detail-page-title"
-        v-if="status === '1' && powers.some((item) => item == '082')"
-      >
-        <span>采购单编号:</span><span>{{ queryId }} </span>
-        <tolerance
-          :newTime="newTime"
-          v-if="newTime !== ''"
-          :sitem="sitem"
-          :showBtn="status === '1' && powers.some((item) => item == '082')"
-        />
-
-       
-      </div> -->
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="平台订单信息" name="1">
-              <el-row class="tab-title">
-                <el-col :span="3">字段</el-col>
-                <el-col :span="4">文件导入数据</el-col>
-                <el-col :span="8">系统解析数据</el-col>
-                <el-col :span="9">确认后的数据</el-col>
-              </el-row>
-              <div
-                v-if="
-                  importSitem &&
-                  importSitem.platform_code &&
-                  confirmSitem &&
-                  confirmSitem.platform_code
-                "
+              <el-form
+                ref="ruleForm"
+                :model="ruleForm"
+                status-icon
+                :size="'mini'"
+                :rules="rulesThis"
+                label-width="0px"
               >
-                <el-row class="tab-title">
-                  <el-col :span="3">平台订单号</el-col>
-                  <el-col :span="4">{{ importSitem.platform_code }}</el-col>
-                  <el-col :span="8">{{ importSitem.platform_code }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">平台订单下单时间</el-col>
-                  <el-col :span="4">{{ importSitem.platform_time }}</el-col>
-                  <el-col :span="8">{{ importSitem.platform_time }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">平台商品编号</el-col>
-                  <el-col :span="4">{{ importSitem.plat_code }}</el-col>
-                  <el-col :span="8">{{ importSitem.plat_code }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">销售渠道</el-col>
-                  <el-col :span="4">{{ importSitem.sale_source }}</el-col>
-                  <el-col :span="8">{{ importSitem.sale_source }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">订单单价</el-col>
-                  <el-col :span="4">{{ importSitem.price }}</el-col>
-                  <el-col :span="8">{{ importSitem.price }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">销售数量</el-col>
-                  <el-col :span="4">{{ importSitem.num }}</el-col>
-                  <el-col :span="8">{{ importSitem.num }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">订单总金额</el-col>
-                  <el-col :span="4">{{
-                    importSitem.before_discount_all_price
-                  }}</el-col>
-                  <el-col :span="8">{{
-                    importSitem.before_discount_all_price
-                  }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">活动名称</el-col>
-                  <el-col :span="4">{{ importSitem.activity_name }}</el-col>
-                  <el-col :span="8">{{ importSitem.activity_name }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">优惠金额</el-col>
-                  <el-col :span="4">{{ importSitem.discount_price }}</el-col>
-                  <el-col :span="8">{{ importSitem.discount_price }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">优惠后的金额</el-col>
-                  <el-col :span="4">{{ importSitem.after_price }}</el-col>
-                  <el-col :span="8">{{ importSitem.after_price }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">收费模式</el-col>
-                  <el-col :span="4">{{ importSitem.mode }}</el-col>
-                  <el-col :span="8">{{ importSitem.mode }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
+                <div class="tab-row">
+                  <div class="tab-item-label">字段</div>
+                  <div class="tab-item-main">
+                    <el-row class="tab-title">
+                      <el-col :span="5">文件导入数据</el-col>
+                      <el-col :span="8">系统解析数据</el-col>
+                      <el-col :span="11">确认后的数据</el-col>
+                    </el-row>
+                  </div>
+                </div>
+
+                <div
+                  v-if="
+                    importSitem &&
+                    importSitem.platform_code &&
+                    confirmSitem &&
+                    confirmSitem.platform_code
+                  "
+                >
+                  <div class="tab-row">
+                    <div class="tab-item-label">
+                      <div><label style="color: red">*</label>平台订单号</div>
+                      <div>
+                        <label style="color: red">*</label>平台订单下单时间
+                      </div>
+                    </div>
+                    <div class="tab-item-main">
+                      <el-row class="tab-title">
+                        <el-col :span="5">
+                          <div>{{ importSitem.platform_code }}</div>
+                          <div>{{ importSitem.platform_time }}</div>
+                        </el-col>
+                        <el-col :span="8">
+                          <div>{{ importSitem.platform_code }}</div>
+                          <div>{{ importSitem.platform_time }}</div>
+                        </el-col>
+                        <el-col :span="11" class="nop">
+                          <el-row>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-input
+                                  v-model="ruleForm.platform_code"
+                                  maxlength="100"
+                                  :disabled="isDetail"
+                                  placeholder="平台订单号"
+                                /> </el-form-item
+                            ></el-col>
+
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-date-picker
+                                  type="datetime"
+                                  placeholder="平台订单下单时间"
+                                  v-model="ruleForm.post_time"
+                                  style="width: 100%"
+                                  value-format="yyyy-MM-dd HH:mm:ss"
+                                  :picker-options="pickerOptions"
+                                  @change="selectTime"
+                                >
+                                </el-date-picker>
+                              </el-form-item>
+                            </el-col>
+                          </el-row>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+                  <div class="tab-row">
+                    <div class="tab-item-label">
+                      <label style="color: red">*</label>平台商品编号
+                    </div>
+                    <div class="tab-item-main">
+                      <el-row class="tab-title">
+                        <el-col :span="5">{{ importSitem.plat_code }}</el-col>
+                        <el-col :span="8">{{ importSitem.plat_code }}</el-col>
+                        <el-col :span="11">
+                          <el-form-item prop="platform_code">
+                            <el-input
+                              v-model="ruleForm.platform_code"
+                              maxlength="100"
+                              :disabled="isDetail"
+                              placeholder="平台商品编号" /></el-form-item
+                        ></el-col>
+                      </el-row>
+                    </div>
+                  </div>
+
+                  <div class="tab-row">
+                    <div class="tab-item-label">
+                      <label style="color: red">*</label>收费模式/销售渠道
+                    </div>
+                    <div class="tab-item-main">
+                      <el-row class="tab-title">
+                        <el-col :span="5"
+                          >{{ importSitem.mode }}/{{
+                            importSitem.sale_source
+                          }}</el-col
+                        >
+                        <el-col :span="8"
+                          >{{ importSitem.mode }}/{{
+                            importSitem.sale_source
+                          }}</el-col
+                        >
+                        <el-col :span="11" class="nop">
+                          <el-row>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-select
+                                  v-model="value"
+                                  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-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-select
+                                  v-model="value"
+                                  style="width: 100%"
+                                  placeholder="销售渠道"
+                                >
+                                  <el-option
+                                    v-for="item in coptions"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value"
+                                  >
+                                  </el-option> </el-select></el-form-item></el-col
+                          ></el-row>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+                  <div class="tab-row">
+                    <div class="tab-item-label">
+                      <label style="color: red">*</label>收货人/收货电话
+                    </div>
+                    <div class="tab-item-main">
+                      <el-row class="tab-title">
+                        <el-col :span="5"
+                          >{{ importSitem.contactor }}/{{
+                            importSitem.mobile
+                          }}</el-col
+                        >
+                        <el-col :span="8"
+                          >{{ importSitem.contactor }}/{{
+                            importSitem.mobile
+                          }}</el-col
+                        >
+                        <el-col :span="11" class="nop">
+                          <el-row>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-input
+                                  v-model="ruleForm.platform_code"
+                                  maxlength="100"
+                                  :disabled="isDetail"
+                                  placeholder="收货人"
+                                />
+                              </el-form-item>
+                            </el-col>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-input
+                                  v-model="ruleForm.platform_code"
+                                  maxlength="100"
+                                  :disabled="isDetail"
+                                  placeholder="收货电话"
+                                />
+                              </el-form-item>
+                            </el-col>
+                          </el-row>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+
+  <div class="tab-row">
+                    <div class="tab-item-label">
+                      <label style="color: red">*</label>收货人/收货电话
+                    </div>
+                    <div class="tab-item-main">
+                      <el-row class="tab-title">
+                        <el-col :span="5"
+                          >{{ importSitem.contactor }}/{{
+                            importSitem.mobile
+                          }}</el-col
+                        >
+                        <el-col :span="8"
+                          >{{ importSitem.contactor }}/{{
+                            importSitem.mobile
+                          }}</el-col
+                        >
+                        <el-col :span="11" class="nop">
+                          <el-row>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-input
+                                  v-model="ruleForm.platform_code"
+                                  maxlength="100"
+                                  :disabled="isDetail"
+                                  placeholder="收货人"
+                                />
+                              </el-form-item>
+                            </el-col>
+                            <el-col :span="12" class="border">
+                              <el-form-item prop="platform_code">
+                                <el-input
+                                  v-model="ruleForm.platform_code"
+                                  maxlength="100"
+                                  :disabled="isDetail"
+                                  placeholder="收货电话"
+                                />
+                              </el-form-item>
+                            </el-col>
+                          </el-row>
+                        </el-col>
+                      </el-row>
+                    </div>
+                  </div>
+                  <el-row class="tab-title">
+                    <el-col :span="4"
+                      ><label style="color: red">*</label>收货地址</el-col
+                    >
+                    <el-col :span="4">{{ importSitem.addr }}</el-col>
+                    <el-col :span="7">{{ importSitem.addr }}</el-col>
+                    <el-col :span="9"
+                      ><el-form-item prop="platform_code">
+                        <el-input
+                          v-model="ruleForm.platform_code"
+                          maxlength="100"
+                          :disabled="isDetail"
+                          placeholder="平台订单下单时间"
+                        /> </el-form-item
+                    ></el-col>
+                  </el-row>
+                  <el-row class="tab-title">
+                    <el-col :span="4"
+                      ><label style="color: red">*</label>订单备注</el-col
+                    >
+                    <el-col :span="4">{{ importSitem.order_remark }}</el-col>
+                    <el-col :span="7">{{ importSitem.order_remark }}</el-col>
+                    <el-col :span="9"
+                      ><el-form-item prop="platform_code">
+                        <el-input
+                          v-model="ruleForm.platform_code"
+                          maxlength="100"
+                          :disabled="isDetail"
+                          placeholder="平台订单下单时间"
+                        /> </el-form-item
+                    ></el-col>
+                  </el-row>
+                  <el-row class="tab-title">
+                    <el-col :span="4"
+                      ><label style="color: red">*</label
+                      >订单单价/销售数量</el-col
+                    >
+                    <el-col :span="4"
+                      >{{ importSitem.price }}/{{ importSitem.num }}</el-col
+                    >
+                    <el-col :span="7"
+                      >{{ importSitem.price }}/{{ importSitem.num }}</el-col
+                    >
+                    <el-col :span="9" style="padding: 0">
+                      <el-row>
+                        <el-col :span="12" style="border: 0">
+                          <el-form-item prop="platform_code">
+                            <el-input
+                              v-model="ruleForm.platform_code"
+                              maxlength="100"
+                              :disabled="isDetail"
+                              placeholder="订单单价"
+                            />
+                          </el-form-item>
+                        </el-col>
+                        <el-col :span="12" style="border: 0">
+                          <el-form-item prop="platform_code">
+                            <el-input
+                              v-model="ruleForm.platform_code"
+                              maxlength="100"
+                              :disabled="isDetail"
+                              placeholder="销售数量"
+                            />
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                    </el-col>
+                  </el-row>
+                  <el-row class="tab-title">
+                    <el-col :span="4">活动名称</el-col>
+                    <el-col :span="4">{{ importSitem.activity_name }}</el-col>
+                    <el-col :span="7">{{ importSitem.activity_name }}</el-col>
+                    <el-col :span="9"
+                      ><el-form-item prop="platform_code">
+                        <el-input
+                          v-model="ruleForm.platform_code"
+                          maxlength="100"
+                          :disabled="isDetail"
+                          placeholder="活动名称"
+                        /> </el-form-item
+                    ></el-col>
+                  </el-row>
+                  <el-row class="tab-title">
+                    <el-col :span="4">订单总金额/优惠金额 </el-col>
+                    <el-col :span="4"
+                      >{{ importSitem.before_discount_all_price }}/{{
+                        importSitem.discount_price
+                      }}</el-col
+                    >
+                    <el-col :span="7"
+                      >{{ importSitem.before_discount_all_price }}/{{
+                        importSitem.discount_price
+                      }}</el-col
+                    >
+                    <el-col :span="9" style="padding: 0">
+                      <el-row>
+                        <el-col :span="12" style="border: 0">{{
+                          importSitem.before_discount_all_price
+                        }}</el-col>
+                        <el-col :span="12" style="border: 0">
+                          <el-form-item prop="platform_code">
+                            <el-input
+                              v-model="ruleForm.platform_code"
+                              maxlength="100"
+                              :disabled="isDetail"
+                              placeholder="平台订单下单时间"
+                            />
+                          </el-form-item>
+                        </el-col>
+                      </el-row>
+                    </el-col>
+                  </el-row>
 
-                <el-row class="tab-title">
-                  <el-col :span="3">收货人</el-col>
-                  <el-col :span="4">{{ importSitem.contactor }}</el-col>
-                  <el-col :span="8">{{ importSitem.contactor }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">收货电话</el-col>
-                  <el-col :span="4">{{ importSitem.mobile }}</el-col>
-                  <el-col :span="8">{{ importSitem.mobile }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">收货地址</el-col>
-                  <el-col :span="4">{{ importSitem.addr }}</el-col>
-                  <el-col :span="8">{{ importSitem.addr }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-                <el-row class="tab-title">
-                  <el-col :span="3">订单备注</el-col>
-                  <el-col :span="4">{{ importSitem.order_remark }}</el-col>
-                  <el-col :span="8">{{ importSitem.order_remark }}</el-col>
-                  <el-col :span="9">确认后的数据</el-col>
-                </el-row>
-              </div>
+                  <el-row class="tab-title">
+                    <el-col :span="4"> 优惠后的金额 </el-col>
+                    <el-col :span="4">{{ importSitem.after_price }}</el-col>
+                    <el-col :span="7">{{ importSitem.after_price }}</el-col>
+                    <el-col :span="9">
+                      {{ importSitem.after_price }}
+                    </el-col>
+                  </el-row>
+                </div>
+              </el-form>
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
@@ -178,7 +413,40 @@ export default {
       activeTabs: "1",
       isMetal: false,
       finishStatus: "finish",
+      pickerOptions: {
+        disabledDate: (time) => {
+          return time.getTime() > new Date().valueOf();
+        },
+      },
       activeNames: ["0", "1", "2", "3", "4", "5", "10"],
+      coptions: [
+        {
+          value: "1",
+          label: "卡券支付",
+        },
+        {
+          value: "2",
+          label: "现金支付",
+        },
+        {
+          value: "3",
+          label: "混合支付",
+        },
+      ],
+      options: [
+        {
+          value: "1",
+          label: "卡券支付",
+        },
+        {
+          value: "2",
+          label: "现金支付",
+        },
+        {
+          value: "3",
+          label: "混合支付",
+        },
+      ],
       sitem: null,
       importSitem: null,
       confirmSitem: null,
@@ -186,6 +454,8 @@ export default {
       newTime: "",
       loading: false,
       queryId: "",
+      ruleForm: {},
+      rulesThis: {},
       ReturnAddModel: false, //采购单退货弹窗
     };
   },
@@ -256,14 +526,36 @@ export default {
 </script>
    <style lang="scss" scoped>
 .orderConfirm {
-  .tab-title {
+  .tab-row {
     border-left: 1px solid #eee;
     border-top: 1px solid #eee;
     display: flex;
     align-items: stretch;
-    .el-col {
+    .tab-item-label {
       padding: 3px 5px;
-      border-right: 1px solid #eee;
+      width: 150px;
+      .red {
+        color: red;
+        padding: 0 5px 0 0;
+      }
+    }
+    .tab-item-main {
+      width: calc(100% - 150px);
+      border-left: 1px solid #eee;
+      .tab-title {
+        display: flex;
+        align-items: stretch;
+        .el-col {
+          padding: 3px 5px;
+          border-right: 1px solid #eee;
+          &.nop {
+            padding: 0;
+          }
+          &.border {
+            border: 0;
+          }
+        }
+      }
     }
   }
 }