瀏覽代碼

feat:运费折扣对接

chenjiaxin 4 月之前
父節點
當前提交
8e8803e6b7

+ 26 - 3
src/lang/en/label.js

@@ -455,7 +455,7 @@ export default {
   discount: 'Discount code',
   autoDiscount: "Automatic discount",
   discountSetting: "Discount Setting",
-  paidTips: '現在の注文には未払いの価格差額注文があります。適用する前に顧客に支払いまたはキャンセルを促してください。',
+  paidTips: 'There is an unpaid price difference order for the current order. Please remind the customer to pay or cancel before applying.',
   order: "Order",
   product: "Product",
   discountStr: 'Discount',
@@ -526,10 +526,33 @@ export default {
     minimunQuantity: "Minimum quantity of items",
   },
   countries: 'Countries',
-  selectedCountries: 'Selected countries',
-  allCountries: 'All countries',
+  shippingTargetList: [
+    {
+      label: "All countries",
+      value: 1
+    },
+    {
+      label: "Selected countries",
+      value: 2
+    },
+  ],
   shippingRates: 'Shipping rates',
   shippingRatesValue: 'Exclude shipping rates over a certain amount',
+  recurringPayment: 'Recurring payments for subscriptions',
+  recurringPaymentList: [
+    {
+      label: 'Limit discount to the first payment',
+      value: 1
+    },
+    {
+      label: 'Limit discount to multiple recurring payments',
+      value: 2
+    },
+    {
+      label: 'Discount applies to all recurring payments',
+      value: 3
+    },
+  ],
   item: "Item",
   promotions: 'Promotion ',
   operateTypeList: [

+ 28 - 5
src/lang/ja/label.js

@@ -775,13 +775,36 @@ export default {
   SLFee: "配送ラベル配送",
   flashPurchase: "フラッシュセール",
   exchangePurchase: "交換",
-  countries: '国',
-  selectedCountries: '特定の国',
-  allCountries: 'すべての国',
   shippingRates: '貨物',
+  countries: "国家",
+  shippingTargetList: [
+    {
+      label: "すべての国",
+      value: 1
+    },
+    {
+      label: "特定の国",
+      value: 2
+    },
+  ],
+  recurringPayment: '定期購読のお支払い',
+  recurringPaymentList: [
+    {
+      label: '初回支払いのみ割引対象',
+      value: 1
+    },
+    {
+      label: '割引を複数の定期支払いに制限する',
+      value: 2
+    },
+    {
+      label: '割引はすべての定期支払いに適用されます',
+      value: 3
+    },
+  ],
   shippingRatesValue: '一定額を超える送料を除外する',
   needPayWithCustomers: "差額はお客様がお支払いいただきます",
-  paidTips: 'There is an unpaid price difference order for the current order. Please remind the customer to pay or cancel before applying.',
+  paidTips: '現在の注文には未払いの価格差額注文があります。適用する前に顧客に支払いまたはキャンセルを促してください。',
   promotionBuyTyper: [{
     label: '一度限りの購入',
     value: 1
@@ -801,5 +824,5 @@ export default {
   {
     label: '特定の製品',
     value: 2
-  }]
+  }],
 };

+ 25 - 2
src/lang/zh/label.js

@@ -819,8 +819,31 @@ export default {
     },
   ],
   countries: '国家/地区',
-  selectedCountries: '特定国家/地区',
-  allCountries: '所有国家/地区',
+  shippingTargetList: [
+    {
+      label: "所有国家/地区",
+      value: 1
+    },
+    {
+      label: "特定国家/地区",
+      value: 2
+    },
+  ],
+  recurringPayment: '定期订阅付款',
+  recurringPaymentList: [
+    {
+      label: '将折扣限制在第一次付款',
+      value: 1
+    },
+    {
+      label: '将折扣限制为多次定期付款',
+      value: 2
+    },
+    {
+      label: '折扣适用于所有定期付款',
+      value: 3
+    },
+  ],
   shippingRates: '运费',
   shippingRatesValue: '排除超过特定金额的运费',
   promotionBuyTyper: [{

+ 1 - 1
src/views/oms/promotion/amountOffOrder/index.vue

@@ -211,7 +211,7 @@ import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
 import ElContainer from "element-ui/packages/container/src/main";
 import PromotionForm from "@/views/oms/promotion/amountOffOrder/promotionForm.vue";
-import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+import PromotionLogList from "@/views/oms/promotion/components/promotionLogList.vue";
 import { fetchList } from "@/api/oms/order/multiBuyDiscount";
 import { getToken } from "@/utils/auth";
 import i18n from "@/lang";

+ 419 - 405
src/views/oms/promotion/amountOffOrder/promotionForm.vue

@@ -12,148 +12,154 @@
       @open="handleOpenDialog"
       @close="resetData"
     >
-      <div class="dialog-body" v-loading="pageLoad">
-        <el-form
-          ref="promotionBuyXgetYDertailFormRef"
-          :model="promotion"
-          label-width="210px"
-          size="medium"
-        >
-          <!-- 活动基本信息 -->
-          <div class="box base">
-            <div class="title">
-              <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
-            </div>
-            <div class="info">
-              <!--促销名称-->
-              <el-form-item
-                :label="$t('label.promotionName') + ':'"
-                prop="promotionName"
-              >
-                <el-input
-                  v-model.trim="promotion.title"
-                  :disabled="edit"
-                ></el-input>
-              </el-form-item>
-              <div class="item row">
-                <!--促销开始时间-->
+      <div class="dialog-box" v-loading="pageLoad">
+        <div class="dialog-body" v-loading="pageLoad">
+          <el-form
+            ref="promotionBuyXgetYDertailFormRef"
+            :model="promotion"
+            label-width="210px"
+            size="medium"
+          >
+            <!-- 活动基本信息 -->
+            <div class="box base">
+              <div class="title">
+                <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
+              </div>
+              <div class="info">
+                <!--促销名称-->
                 <el-form-item
-                  :label="$t('label.promotionStartTime') + ':'"
-                  prop="startTime"
+                  :label="$t('label.promotionName') + ':'"
+                  prop="promotionName"
                 >
-                  <el-date-picker
+                  <el-input
+                    v-model.trim="promotion.title"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.startTime"
-                  ></el-date-picker>
+                  ></el-input>
                 </el-form-item>
+                <div class="item row">
+                  <!--促销开始时间-->
+                  <el-form-item
+                    :label="$t('label.promotionStartTime') + ':'"
+                    prop="startTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.startTime"
+                    ></el-date-picker>
+                  </el-form-item>
 
-                <!--促销失效时间-->
+                  <!--促销失效时间-->
+                  <el-form-item
+                    :label="$t('label.promotionEndTime') + ':'"
+                    prop="endTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.endTime"
+                    ></el-date-picker>
+                  </el-form-item>
+                </div>
+                <!--应用方式-->
                 <el-form-item
-                  :label="$t('label.promotionEndTime') + ':'"
-                  prop="endTime"
+                  :label="$t('label.applicationMethod') + ':'"
+                  prop="discountMethod"
                 >
-                  <el-date-picker
+                  <el-radio-group
+                    v-model="promotion.discountMethod"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.endTime"
-                  ></el-date-picker>
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
+                      <el-input
+                        v-show="promotion.discountMethod === 1"
+                        class="codeinput"
+                        v-model.trim="promotion.discountCode"
+                        :disabled="edit"
+                      />
+                      <el-radio :label="2">{{
+                        $t("label.autoDiscount")
+                      }}</el-radio>
+                    </div>
+                  </el-radio-group>
                 </el-form-item>
               </div>
-              <!--应用方式-->
-              <el-form-item
-                :label="$t('label.applicationMethod') + ':'"
-                prop="discountMethod"
-              >
-                <el-radio-group
-                  v-model="promotion.discountMethod"
-                  :disabled="edit"
-                >
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
-                    <el-input
-                      v-show="promotion.discountMethod === 1"
-                      class="codeinput"
-                      v-model.trim="promotion.discountCode"
-                      :disabled="edit"
-                    />
-                    <el-radio :label="2">{{
-                      $t("label.autoDiscount")
-                    }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 折扣设置 -->
-          <div class="box discount">
-            <!-- 客户购买条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerPurchaseConditions") }}</span>
             </div>
-            <div class="info">
-              <!--最低购买要求-->
-              <el-form-item
-                :label="$t('label.minimumPurchaseRequirement') + ':'"
-                prop="minimum"
-              >
-                <el-radio-group
-                  v-model="promotion.purchaseRequire"
-                  :disabled="edit"
+            <!-- 折扣设置 -->
+            <div class="box discount">
+              <!-- 客户购买条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerPurchaseConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--最低购买要求-->
+                <el-form-item
+                  :label="$t('label.minimumPurchaseRequirement') + ':'"
+                  prop="minimum"
                 >
-                  <div class="item row">
-                    <el-radio :label="3">{{ $t("label.numberStr") }}</el-radio>
-                    <el-radio :label="2">{{ $t("label.money") }}</el-radio>
-                    <el-radio :label="1">{{ $t("label.free") }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
-              <!--折扣内容 数量&金额-->
-              <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <!--最低要求 免费 不展示 -->
-                  <div class="item-box" v-if="promotion.purchaseRequire !== 1">
-                    <span class="label">{{ discountContentValue }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.requireValue"
-                      :disabled="edit"
-                    />
-                  </div>
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.buyType") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.purchaseType"
-                      :disabled="edit"
-                    />
+                  <el-radio-group
+                    v-model="promotion.purchaseRequire"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.numberStr")
+                      }}</el-radio>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-radio :label="1">{{ $t("label.free") }}</el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+                <!--折扣内容 数量&金额-->
+                <el-form-item :label="$t('label.discountValue') + ':'">
+                  <div class="item">
+                    <!--最低要求 免费 不展示 -->
+                    <div
+                      class="item-box"
+                      v-if="promotion.purchaseRequire !== 1"
+                    >
+                      <span class="label">{{ discountContentValue }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.requireValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item-box">
+                      <span class="label">{{ $t("label.buyType") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.purchaseType"
+                        :disabled="edit"
+                      />
+                    </div>
                   </div>
-                </div>
-                <div class="item product">
-                  <div class="item row">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productBuyType"
-                      :disabled="edit"
-                    />
-                    <div class="value" v-for="(data, j) in tagLists" :key="j">
-                      <p>{{ tagValue(data) }}</p>
-                      <a
-                        href="javascript:void();"
-                        @click="handleProductDialog(data)"
-                        >{{ $t("label.viewProductDetaiL") }}</a
-                      >
+                  <div class="item product">
+                    <div class="item row">
+                      <span class="label">{{ $t("label.product") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.productBuyType"
+                        :disabled="edit"
+                      />
+                      <div class="value" v-for="(data, j) in tagLists" :key="j">
+                        <p>{{ tagValue(data) }}</p>
+                        <a
+                          href="javascript:void();"
+                          @click="handleProductDialog(data)"
+                          >{{ $t("label.viewProductDetaiL") }}</a
+                        >
+                      </div>
                     </div>
                   </div>
-                </div>
-              </el-form-item>
-              <!-- 每个订单一次 获得条件为金额才可见 -->
-              <!-- <el-form-item
+                </el-form-item>
+                <!-- 每个订单一次 获得条件为金额才可见 -->
+                <!-- <el-form-item
                 v-if="promotion.valueType === 2"
                 :label="$t('label.oncePerOrder') + ':'"
               >
@@ -163,14 +169,14 @@
                   >{{ $t("label.oncePerOrderDesc") }}</el-checkbox
                 >
               </el-form-item> -->
-            </div>
-            <!-- 客户获得条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerGetConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--折扣内容 数量&金额-->
-              <!-- <el-form-item :label="$t('label.discountValue') + ':'">
+              </div>
+              <!-- 客户获得条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerGetConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--折扣内容 数量&金额-->
+                <!-- <el-form-item :label="$t('label.discountValue') + ':'">
                 <div class="item">
                   <span class="label">{{ $t("label.numberStr") }}</span>
                   <el-input
@@ -209,41 +215,46 @@
                   </div>
                 </div>
               </el-form-item> -->
-              <!--折扣额-->
-              <el-form-item
-                :label="$t('label.discountPromotion') + ':'"
-                prop="discount"
-                class="discount"
-              >
-                <el-radio-group v-model="promotion.valueType" :disabled="edit">
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.percentage") }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 1"
-                      class="mininput"
-                      v-model.trim="promotion.discountNumber"
-                      :disabled="edit"
-                    >
-                      <span class="el-input__icon" slot="suffix">%</span>
-                    </el-input>
-                  </div>
-                  <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.discountPerItem")
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.numericValue"
-                      :disabled="edit"
-                    />
-                  </div>
-                  <el-radio :label="3">{{ $t("label.free") }}</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-            <!-- 每个订单使用次数 折扣码才有-->
-            <!-- <div v-if="promotion.discountMethod === 1">
+                <!--折扣额-->
+                <el-form-item
+                  :label="$t('label.discountPromotion') + ':'"
+                  prop="discount"
+                  class="discount"
+                >
+                  <el-radio-group
+                    v-model="promotion.valueType"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{
+                        $t("label.percentage")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 1"
+                        class="mininput"
+                        v-model.trim="promotion.discountNumber"
+                        :disabled="edit"
+                      >
+                        <span class="el-input__icon" slot="suffix">%</span>
+                      </el-input>
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.discountPerItem")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.numericValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <el-radio :label="3">{{ $t("label.free") }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+              <!-- 每个订单使用次数 折扣码才有-->
+              <!-- <div v-if="promotion.discountMethod === 1">
               <div class="title">
                 <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
               </div>
@@ -262,107 +273,107 @@
                 </el-form-item>
               </div>
             </div> -->
-          </div>
-          <!-- 客户资格  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.customerQualification") }}</span>
             </div>
-            <div class="info customerQualification">
-              <el-form-item prop="customerQualification" required>
-                <el-radio-group
-                  class="customerqualification"
-                  v-model="promotion.targetCustomerType"
-                  :disabled="edit"
-                >
-                  <el-radio :label="1">{{
-                    $t("label.customerQualificationList")[0].label
-                  }}</el-radio>
-                  <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.customerQualificationList")[1].label
+            <!-- 客户资格  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.customerQualification") }}</span>
+              </div>
+              <div class="info customerQualification">
+                <el-form-item prop="customerQualification" required>
+                  <el-radio-group
+                    class="customerqualification"
+                    v-model="promotion.targetCustomerType"
+                    :disabled="edit"
+                  >
+                    <el-radio :label="1">{{
+                      $t("label.customerQualificationList")[0].label
                     }}</el-radio>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.customerQualificationList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.customerQualificationList")[2].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 3"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <!-- <el-radio
+                    v-for="(item, i) in $t('label.customerQualificationList')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  > -->
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+            </div>
+            <!-- 最大折扣使用次数  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item>
+                  <!-- <el-checkbox-group v-model="promotion.startTime"> -->
+                  <div class="item row">
+                    <el-checkbox
+                      :checked="codeUsageLimitchecked"
+                      :disabled="edit"
+                      >{{ $t("label.limitDiscountCount") }}</el-checkbox
+                    >
                     <el-input
-                      v-if="promotion.targetCustomerType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.codeUsageLimit"
                       :disabled="edit"
                     />
                   </div>
                   <div class="item row">
-                    <el-radio :label="3">{{
-                      $t("label.customerQualificationList")[2].label
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.targetCustomerType === 3"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                    <el-checkbox
+                      :checked="promotion.codeCustomerUsageType === 1"
                       :disabled="edit"
-                    />
+                      >{{ $t("label.customerCount") }}</el-checkbox
+                    >
                   </div>
-                  <!-- <el-radio
-                    v-for="(item, i) in $t('label.customerQualificationList')"
-                    :key="i"
-                    :label="item.value"
-                    >{{ item.label }}</el-radio
-                  > -->
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 最大折扣使用次数  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
-            </div>
-            <div class="info">
-              <el-form-item>
-                <!-- <el-checkbox-group v-model="promotion.startTime"> -->
-                <div class="item row">
-                  <el-checkbox
-                    :checked="codeUsageLimitchecked"
-                    :disabled="edit"
-                    >{{ $t("label.limitDiscountCount") }}</el-checkbox
-                  >
-                  <el-input
-                    class="mininput checkboxinput"
-                    v-model.trim="promotion.codeUsageLimit"
-                    :disabled="edit"
-                  />
-                </div>
-                <div class="item row">
-                  <el-checkbox
-                    :checked="promotion.codeCustomerUsageType === 1"
-                    :disabled="edit"
-                    >{{ $t("label.customerCount") }}</el-checkbox
-                  >
-                </div>
-                <!-- </el-checkbox-group> -->
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 组合 自动折扣才有 -->
-          <div class="box">
-            <div class="title">
-              <span>{{ $t("label.combination") }}</span>
+                  <!-- </el-checkbox-group> -->
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item :label="$t('label.combinationLable') + ':'">
-                <el-checkbox-group v-model="promotion.combination">
-                  <el-checkbox
-                    v-for="(item, i) in $t('label.combinationList')"
-                    :key="i"
-                    :label="item.value"
-                    :disabled="edit"
-                    >{{ item.label }}
-                  </el-checkbox>
-                </el-checkbox-group>
-              </el-form-item>
+            <!-- 组合 自动折扣才有 -->
+            <div class="box">
+              <div class="title">
+                <span>{{ $t("label.combination") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item :label="$t('label.combinationLable') + ':'">
+                  <el-checkbox-group v-model="promotion.combination">
+                    <el-checkbox
+                      v-for="(item, i) in $t('label.combinationList')"
+                      :key="i"
+                      :label="item.value"
+                      :disabled="edit"
+                      >{{ item.label }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </div>
             </div>
-          </div>
-        </el-form>
+          </el-form>
+        </div>
       </div>
-
       <template slot="footer">
         <el-button
           @click="
@@ -648,174 +659,177 @@ export default {
 }
 </style>
 <style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 80vh;
-  overflow: auto;
-  .box {
-    border-bottom: 1px solid #d8d8d8;
-    padding-bottom: 20px;
-    margin-bottom: 42px;
-    &.base {
-      .info {
-        width: 25%;
+.dialog-box {
+  height: 100%;
+  .dialog-body {
+    height: 80vh;
+    overflow: auto;
+    .box {
+      border-bottom: 1px solid #d8d8d8;
+      padding-bottom: 20px;
+      margin-bottom: 42px;
+      &.base {
+        .info {
+          width: 25%;
+        }
       }
-    }
-    &.discount {
-      .info {
-        margin-bottom: 60px;
+      &.discount {
+        .info {
+          margin-bottom: 60px;
+        }
+      }
+      .title {
+        color: #606266;
+        font-size: 16px;
+        line-height: 16px;
+        position: relative;
+        font-weight: bold;
+        padding-left: 6px;
+        margin-bottom: 23px;
+        &:before {
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          content: "";
+          display: inline-block;
+          width: 3px;
+          height: 13px;
+          background: #ae8877;
+          border-radius: 0px 0px 0px 0px;
+        }
       }
     }
-    .title {
-      color: #606266;
-      font-size: 16px;
+    // /deep/.el-form-item__label-wrap {
+    //   margin-left: 0px !important;
+    //   .el-form-item__label {
+    //     text-align: right;
+    //   }
+    // }
+    .skucon {
+      width: 90%;
+      height: 139px;
+      overflow-y: auto;
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid #dcdfe6;
+      background: #f5f7fa;
+      margin-top: 12px;
+      padding: 10px;
+      font-size: 12px;
       line-height: 16px;
-      position: relative;
-      font-weight: bold;
-      padding-left: 6px;
-      margin-bottom: 23px;
-      &:before {
-        position: absolute;
-        left: 0px;
-        top: 0px;
-        content: "";
-        display: inline-block;
-        width: 3px;
-        height: 13px;
-        background: #ae8877;
-        border-radius: 0px 0px 0px 0px;
+      .active {
+        color: #fd5959;
       }
     }
-  }
-  // /deep/.el-form-item__label-wrap {
-  //   margin-left: 0px !important;
-  //   .el-form-item__label {
-  //     text-align: right;
-  //   }
-  // }
-  .skucon {
-    width: 90%;
-    height: 139px;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    background: #f5f7fa;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    .active {
-      color: #fd5959;
+    .productbox {
+      border-bottom: none;
     }
-  }
-  .productbox {
-    border-bottom: none;
-  }
-  .info {
-    .item {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      align-items: center;
-      &.row {
-        flex-wrap: nowrap;
-      }
-      .el-form-item {
-        margin-right: 42px !important;
-      }
-      .codeinput {
-        margin-right: 36px;
-      }
-      .mininput {
-        margin-right: 30px;
-        width: 180px !important;
-      }
-      .checkboxinput {
-        margin-left: 20px;
-      }
-      .productinput {
-        width: 340px !important;
-      }
-      .label {
-        margin-right: 12px;
-      }
-      &.product {
-        margin-top: 26px;
-        .label {
-          margin-bottom: 10px;
+    .info {
+      .item {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+        &.row {
+          flex-wrap: nowrap;
+        }
+        .el-form-item {
+          margin-right: 42px !important;
+        }
+        .codeinput {
+          margin-right: 36px;
         }
         .mininput {
-          margin-right: 20px;
-          margin-bottom: 10px;
+          margin-right: 30px;
+          width: 180px !important;
         }
-        .row {
-          flex-wrap: wrap;
+        .checkboxinput {
+          margin-left: 20px;
         }
-        .collectioninput {
-          margin-right: 20px;
-          min-width: 220px !important;
-          width: auto !important;
-          /deep/.el-input-group__append {
-            color: #ae8877;
-            border-left: none;
-            font-size: 12px;
-            padding: 0px 5px;
-            background: #f5f7fa;
-            span {
-              cursor: pointer;
+        .productinput {
+          width: 340px !important;
+        }
+        .label {
+          margin-right: 12px;
+        }
+        &.product {
+          margin-top: 26px;
+          .label {
+            margin-bottom: 10px;
+          }
+          .mininput {
+            margin-right: 20px;
+            margin-bottom: 10px;
+          }
+          .row {
+            flex-wrap: wrap;
+          }
+          .collectioninput {
+            margin-right: 20px;
+            min-width: 220px !important;
+            width: auto !important;
+            /deep/.el-input-group__append {
+              color: #ae8877;
+              border-left: none;
+              font-size: 12px;
+              padding: 0px 5px;
+              background: #f5f7fa;
+              span {
+                cursor: pointer;
+              }
+            }
+            /deep/.el-input__inner {
+              border-right: none;
             }
           }
-          /deep/.el-input__inner {
-            border-right: none;
+          .value {
+            margin-bottom: 10px;
           }
         }
-        .value {
-          margin-bottom: 10px;
+      }
+      .discount {
+        .item {
+          margin-bottom: 20px;
+          /deep/.el-radio {
+            min-width: 135px;
+          }
         }
       }
-    }
-    .discount {
-      .item {
-        margin-bottom: 20px;
-        /deep/.el-radio {
-          min-width: 135px;
+      .customerqualification {
+        .el-radio {
+          display: block;
+          margin-bottom: 30px;
         }
       }
     }
-    .customerqualification {
-      .el-radio {
-        display: block;
-        margin-bottom: 30px;
+    .value {
+      position: relative;
+      min-width: 300px;
+      height: 36px;
+      padding: 0px 6px;
+      font-size: 12px;
+      margin-right: 13px;
+      color: #c0c4cc;
+      background: #f5f7fa;
+      border-radius: 3px;
+      border: 1px solid #dcdfe6;
+      p {
+        line-height: 12px;
+        padding-right: 130px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      a {
+        position: absolute;
+        right: 10px;
+        top: 0%;
+        color: #ae8877;
       }
     }
-  }
-  .value {
-    position: relative;
-    min-width: 300px;
-    height: 36px;
-    padding: 0px 6px;
-    font-size: 12px;
-    margin-right: 13px;
-    color: #c0c4cc;
-    background: #f5f7fa;
-    border-radius: 3px;
-    border: 1px solid #dcdfe6;
-    p {
-      line-height: 12px;
-      padding-right: 130px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-    a {
-      position: absolute;
-      right: 10px;
-      top: 0%;
-      color: #ae8877;
-    }
-  }
-  .customerQualification {
-    .mininput {
-      margin-bottom: 30px;
+    .customerQualification {
+      .mininput {
+        margin-bottom: 30px;
+      }
     }
   }
 }

+ 1 - 1
src/views/oms/promotion/amountOffProducts/index.vue

@@ -211,7 +211,7 @@ import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
 import ElContainer from "element-ui/packages/container/src/main";
 import PromotionForm from "@/views/oms/promotion/amountOffProducts/promotionForm.vue";
-import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+import PromotionLogList from "@/views/oms/promotion/components/promotionLogList.vue";
 import { fetchList } from "@/api/oms/order/multiBuyDiscount";
 import { getToken } from "@/utils/auth";
 import i18n from "@/lang";

+ 427 - 413
src/views/oms/promotion/amountOffProducts/promotionForm.vue

@@ -12,165 +12,171 @@
       @open="handleOpenDialog"
       @close="resetData"
     >
-      <div class="dialog-body" v-loading="pageLoad">
-        <el-form
-          ref="promotionBuyXgetYDertailFormRef"
-          :model="promotion"
-          label-width="210px"
-          size="medium"
-        >
-          <!-- 活动基本信息 -->
-          <div class="box base">
-            <div class="title">
-              <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
-            </div>
-            <div class="info">
-              <!--促销名称-->
-              <el-form-item
-                :label="$t('label.promotionName') + ':'"
-                prop="promotionName"
-              >
-                <el-input
-                  v-model.trim="promotion.title"
-                  :disabled="edit"
-                ></el-input>
-              </el-form-item>
-              <div class="item row">
-                <!--促销开始时间-->
+      <div class="dialog-box" v-loading="pageLoad">
+        <div class="dialog-body" v-loading="pageLoad">
+          <el-form
+            ref="promotionBuyXgetYDertailFormRef"
+            :model="promotion"
+            label-width="210px"
+            size="medium"
+          >
+            <!-- 活动基本信息 -->
+            <div class="box base">
+              <div class="title">
+                <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
+              </div>
+              <div class="info">
+                <!--促销名称-->
                 <el-form-item
-                  :label="$t('label.promotionStartTime') + ':'"
-                  prop="startTime"
+                  :label="$t('label.promotionName') + ':'"
+                  prop="promotionName"
                 >
-                  <el-date-picker
+                  <el-input
+                    v-model.trim="promotion.title"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.startTime"
-                  ></el-date-picker>
+                  ></el-input>
                 </el-form-item>
+                <div class="item row">
+                  <!--促销开始时间-->
+                  <el-form-item
+                    :label="$t('label.promotionStartTime') + ':'"
+                    prop="startTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.startTime"
+                    ></el-date-picker>
+                  </el-form-item>
 
-                <!--促销失效时间-->
+                  <!--促销失效时间-->
+                  <el-form-item
+                    :label="$t('label.promotionEndTime') + ':'"
+                    prop="endTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.endTime"
+                    ></el-date-picker>
+                  </el-form-item>
+                </div>
+                <!--应用方式-->
                 <el-form-item
-                  :label="$t('label.promotionEndTime') + ':'"
-                  prop="endTime"
+                  :label="$t('label.applicationMethod') + ':'"
+                  prop="discountMethod"
                 >
-                  <el-date-picker
+                  <el-radio-group
+                    v-model="promotion.discountMethod"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.endTime"
-                  ></el-date-picker>
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
+                      <el-input
+                        v-show="promotion.discountMethod === 1"
+                        class="codeinput"
+                        v-model.trim="promotion.discountCode"
+                        :disabled="edit"
+                      />
+                      <el-radio :label="2">{{
+                        $t("label.autoDiscount")
+                      }}</el-radio>
+                    </div>
+                  </el-radio-group>
                 </el-form-item>
               </div>
-              <!--应用方式-->
-              <el-form-item
-                :label="$t('label.applicationMethod') + ':'"
-                prop="discountMethod"
-              >
-                <el-radio-group
-                  v-model="promotion.discountMethod"
-                  :disabled="edit"
-                >
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
-                    <el-input
-                      v-show="promotion.discountMethod === 1"
-                      class="codeinput"
-                      v-model.trim="promotion.discountCode"
-                      :disabled="edit"
-                    />
-                    <el-radio :label="2">{{
-                      $t("label.autoDiscount")
-                    }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
             </div>
-          </div>
-          <!-- 折扣设置 -->
-          <div class="box discount">
-            <!-- 客户购买条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerPurchaseConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--最低购买要求-->
-              <el-form-item
-                :label="$t('label.minimumPurchaseRequirement') + ':'"
-                prop="minimum"
-              >
-                <el-radio-group
-                  v-model="promotion.purchaseRequire"
-                  :disabled="edit"
+            <!-- 折扣设置 -->
+            <div class="box discount">
+              <!-- 客户购买条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerPurchaseConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--最低购买要求-->
+                <el-form-item
+                  :label="$t('label.minimumPurchaseRequirement') + ':'"
+                  prop="minimum"
                 >
-                  <div class="item row">
-                    <el-radio :label="3">{{ $t("label.numberStr") }}</el-radio>
-                    <el-radio :label="2">{{ $t("label.money") }}</el-radio>
-                    <el-radio :label="1">{{ $t("label.free") }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
-              <!--折扣内容 数量&金额-->
-              <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <!--最低要求 免费 不展示 -->
-                  <div class="item-box" v-if="promotion.purchaseRequire !== 1">
-                    <span class="label">{{ discountContentValue }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.requireValue"
-                      :disabled="edit"
-                    />
-                  </div>
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.buyType") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.purchaseType"
-                      :disabled="edit"
-                    />
+                  <el-radio-group
+                    v-model="promotion.purchaseRequire"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.numberStr")
+                      }}</el-radio>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-radio :label="1">{{ $t("label.free") }}</el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+                <!--折扣内容 数量&金额-->
+                <el-form-item :label="$t('label.discountValue') + ':'">
+                  <div class="item">
+                    <!--最低要求 免费 不展示 -->
+                    <div
+                      class="item-box"
+                      v-if="promotion.purchaseRequire !== 1"
+                    >
+                      <span class="label">{{ discountContentValue }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.requireValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item-box">
+                      <span class="label">{{ $t("label.buyType") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.purchaseType"
+                        :disabled="edit"
+                      />
+                    </div>
                   </div>
-                </div>
-                <div class="item product">
-                  <div class="item row">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productBuyType"
-                      :disabled="edit"
-                    />
-                    <div class="value" v-for="(data, j) in tagLists" :key="j">
-                      <p>{{ tagValue(data) }}</p>
-                      <a
-                        href="javascript:void();"
-                        @click="handleProductDialog(data)"
-                        >{{ $t("label.viewProductDetaiL") }}</a
-                      >
+                  <div class="item product">
+                    <div class="item row">
+                      <span class="label">{{ $t("label.product") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.productBuyType"
+                        :disabled="edit"
+                      />
+                      <div class="value" v-for="(data, j) in tagLists" :key="j">
+                        <p>{{ tagValue(data) }}</p>
+                        <a
+                          href="javascript:void();"
+                          @click="handleProductDialog(data)"
+                          >{{ $t("label.viewProductDetaiL") }}</a
+                        >
+                      </div>
                     </div>
                   </div>
-                </div>
-              </el-form-item>
-              <!-- 每个订单一次 获得条件为金额才可见 -->
-              <el-form-item
-                v-if="promotion.valueType === 2"
-                :label="$t('label.oncePerOrder') + ':'"
-              >
-                <el-checkbox
-                  v-model="promotion.oncePerOrder"
-                  :disabled="edit"
-                  >{{ $t("label.oncePerOrderDesc") }}</el-checkbox
+                </el-form-item>
+                <!-- 每个订单一次 获得条件为金额才可见 -->
+                <el-form-item
+                  v-if="promotion.valueType === 2"
+                  :label="$t('label.oncePerOrder') + ':'"
                 >
-              </el-form-item>
-            </div>
-            <!-- 客户获得条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerGetConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--折扣内容 数量&金额-->
-              <!-- <el-form-item :label="$t('label.discountValue') + ':'">
+                  <el-checkbox
+                    v-model="promotion.oncePerOrder"
+                    :disabled="edit"
+                    >{{ $t("label.oncePerOrderDesc") }}</el-checkbox
+                  >
+                </el-form-item>
+              </div>
+              <!-- 客户获得条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerGetConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--折扣内容 数量&金额-->
+                <!-- <el-form-item :label="$t('label.discountValue') + ':'">
                 <div class="item">
                   <span class="label">{{ $t("label.numberStr") }}</span>
                   <el-input
@@ -209,41 +215,46 @@
                   </div>
                 </div>
               </el-form-item> -->
-              <!--折扣额-->
-              <el-form-item
-                :label="$t('label.discountPromotion') + ':'"
-                prop="discount"
-                class="discount"
-              >
-                <el-radio-group v-model="promotion.valueType" :disabled="edit">
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.percentage") }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 1"
-                      class="mininput"
-                      v-model.trim="promotion.discountNumber"
-                      :disabled="edit"
-                    >
-                      <span class="el-input__icon" slot="suffix">%</span>
-                    </el-input>
-                  </div>
-                  <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.discountPerItem")
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.numericValue"
-                      :disabled="edit"
-                    />
-                  </div>
-                  <el-radio :label="3">{{ $t("label.free") }}</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-            <!-- 每个订单使用次数 折扣码才有-->
-            <!-- <div v-if="promotion.discountMethod === 1">
+                <!--折扣额-->
+                <el-form-item
+                  :label="$t('label.discountPromotion') + ':'"
+                  prop="discount"
+                  class="discount"
+                >
+                  <el-radio-group
+                    v-model="promotion.valueType"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{
+                        $t("label.percentage")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 1"
+                        class="mininput"
+                        v-model.trim="promotion.discountNumber"
+                        :disabled="edit"
+                      >
+                        <span class="el-input__icon" slot="suffix">%</span>
+                      </el-input>
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.discountPerItem")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.numericValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <el-radio :label="3">{{ $t("label.free") }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+              <!-- 每个订单使用次数 折扣码才有-->
+              <!-- <div v-if="promotion.discountMethod === 1">
               <div class="title">
                 <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
               </div>
@@ -262,107 +273,107 @@
                 </el-form-item>
               </div>
             </div> -->
-          </div>
-          <!-- 客户资格  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.customerQualification") }}</span>
             </div>
-            <div class="info customerQualification">
-              <el-form-item prop="customerQualification" required>
-                <el-radio-group
-                  class="customerqualification"
-                  v-model="promotion.targetCustomerType"
-                  :disabled="edit"
-                >
-                  <el-radio :label="1">{{
-                    $t("label.customerQualificationList")[0].label
-                  }}</el-radio>
-                  <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.customerQualificationList")[1].label
+            <!-- 客户资格  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.customerQualification") }}</span>
+              </div>
+              <div class="info customerQualification">
+                <el-form-item prop="customerQualification" required>
+                  <el-radio-group
+                    class="customerqualification"
+                    v-model="promotion.targetCustomerType"
+                    :disabled="edit"
+                  >
+                    <el-radio :label="1">{{
+                      $t("label.customerQualificationList")[0].label
                     }}</el-radio>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.customerQualificationList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.customerQualificationList")[2].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 3"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <!-- <el-radio
+                    v-for="(item, i) in $t('label.customerQualificationList')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  > -->
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+            </div>
+            <!-- 最大折扣使用次数  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item>
+                  <!-- <el-checkbox-group v-model="promotion.startTime"> -->
+                  <div class="item row">
+                    <el-checkbox
+                      :checked="codeUsageLimitchecked"
+                      :disabled="edit"
+                      >{{ $t("label.limitDiscountCount") }}</el-checkbox
+                    >
                     <el-input
-                      v-if="promotion.targetCustomerType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.codeUsageLimit"
                       :disabled="edit"
                     />
                   </div>
                   <div class="item row">
-                    <el-radio :label="3">{{
-                      $t("label.customerQualificationList")[2].label
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.targetCustomerType === 3"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                    <el-checkbox
+                      :checked="promotion.codeCustomerUsageType === 1"
                       :disabled="edit"
-                    />
+                      >{{ $t("label.customerCount") }}</el-checkbox
+                    >
                   </div>
-                  <!-- <el-radio
-                    v-for="(item, i) in $t('label.customerQualificationList')"
-                    :key="i"
-                    :label="item.value"
-                    >{{ item.label }}</el-radio
-                  > -->
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 最大折扣使用次数  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
-            </div>
-            <div class="info">
-              <el-form-item>
-                <!-- <el-checkbox-group v-model="promotion.startTime"> -->
-                <div class="item row">
-                  <el-checkbox
-                    :checked="codeUsageLimitchecked"
-                    :disabled="edit"
-                    >{{ $t("label.limitDiscountCount") }}</el-checkbox
-                  >
-                  <el-input
-                    class="mininput checkboxinput"
-                    v-model.trim="promotion.codeUsageLimit"
-                    :disabled="edit"
-                  />
-                </div>
-                <div class="item row">
-                  <el-checkbox
-                    :checked="promotion.codeCustomerUsageType === 1"
-                    :disabled="edit"
-                    >{{ $t("label.customerCount") }}</el-checkbox
-                  >
-                </div>
-                <!-- </el-checkbox-group> -->
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 组合 自动折扣才有 -->
-          <div class="box">
-            <div class="title">
-              <span>{{ $t("label.combination") }}</span>
+                  <!-- </el-checkbox-group> -->
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item :label="$t('label.combinationLable') + ':'">
-                <el-checkbox-group v-model="promotion.combination">
-                  <el-checkbox
-                    v-for="(item, i) in $t('label.combinationList')"
-                    :key="i"
-                    :label="item.value"
-                    :disabled="edit"
-                    >{{ item.label }}
-                  </el-checkbox>
-                </el-checkbox-group>
-              </el-form-item>
+            <!-- 组合 自动折扣才有 -->
+            <div class="box">
+              <div class="title">
+                <span>{{ $t("label.combination") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item :label="$t('label.combinationLable') + ':'">
+                  <el-checkbox-group v-model="promotion.combination">
+                    <el-checkbox
+                      v-for="(item, i) in $t('label.combinationList')"
+                      :key="i"
+                      :label="item.value"
+                      :disabled="edit"
+                      >{{ item.label }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </div>
             </div>
-          </div>
-        </el-form>
+          </el-form>
+        </div>
       </div>
-
       <template slot="footer">
         <el-button
           @click="
@@ -648,174 +659,177 @@ export default {
 }
 </style>
 <style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 80vh;
-  overflow: auto;
-  .box {
-    border-bottom: 1px solid #d8d8d8;
-    padding-bottom: 20px;
-    margin-bottom: 42px;
-    &.base {
-      .info {
-        width: 25%;
+.dialog-box {
+  height: 100%;
+  .dialog-body {
+    height: 80vh;
+    overflow: auto;
+    .box {
+      border-bottom: 1px solid #d8d8d8;
+      padding-bottom: 20px;
+      margin-bottom: 42px;
+      &.base {
+        .info {
+          width: 25%;
+        }
       }
-    }
-    &.discount {
-      .info {
-        margin-bottom: 60px;
+      &.discount {
+        .info {
+          margin-bottom: 60px;
+        }
+      }
+      .title {
+        color: #606266;
+        font-size: 16px;
+        line-height: 16px;
+        position: relative;
+        font-weight: bold;
+        padding-left: 6px;
+        margin-bottom: 23px;
+        &:before {
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          content: "";
+          display: inline-block;
+          width: 3px;
+          height: 13px;
+          background: #ae8877;
+          border-radius: 0px 0px 0px 0px;
+        }
       }
     }
-    .title {
-      color: #606266;
-      font-size: 16px;
+    // /deep/.el-form-item__label-wrap {
+    //   margin-left: 0px !important;
+    //   .el-form-item__label {
+    //     text-align: right;
+    //   }
+    // }
+    .skucon {
+      width: 90%;
+      height: 139px;
+      overflow-y: auto;
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid #dcdfe6;
+      background: #f5f7fa;
+      margin-top: 12px;
+      padding: 10px;
+      font-size: 12px;
       line-height: 16px;
-      position: relative;
-      font-weight: bold;
-      padding-left: 6px;
-      margin-bottom: 23px;
-      &:before {
-        position: absolute;
-        left: 0px;
-        top: 0px;
-        content: "";
-        display: inline-block;
-        width: 3px;
-        height: 13px;
-        background: #ae8877;
-        border-radius: 0px 0px 0px 0px;
+      .active {
+        color: #fd5959;
       }
     }
-  }
-  // /deep/.el-form-item__label-wrap {
-  //   margin-left: 0px !important;
-  //   .el-form-item__label {
-  //     text-align: right;
-  //   }
-  // }
-  .skucon {
-    width: 90%;
-    height: 139px;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    background: #f5f7fa;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    .active {
-      color: #fd5959;
+    .productbox {
+      border-bottom: none;
     }
-  }
-  .productbox {
-    border-bottom: none;
-  }
-  .info {
-    .item {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      align-items: center;
-      &.row {
-        flex-wrap: nowrap;
-      }
-      .el-form-item {
-        margin-right: 42px !important;
-      }
-      .codeinput {
-        margin-right: 36px;
-      }
-      .mininput {
-        margin-right: 30px;
-        width: 180px !important;
-      }
-      .checkboxinput {
-        margin-left: 20px;
-      }
-      .productinput {
-        width: 340px !important;
-      }
-      .label {
-        margin-right: 12px;
-      }
-      &.product {
-        margin-top: 26px;
-        .label {
-          margin-bottom: 10px;
+    .info {
+      .item {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+        &.row {
+          flex-wrap: nowrap;
+        }
+        .el-form-item {
+          margin-right: 42px !important;
+        }
+        .codeinput {
+          margin-right: 36px;
         }
         .mininput {
-          margin-right: 20px;
-          margin-bottom: 10px;
+          margin-right: 30px;
+          width: 180px !important;
         }
-        .row {
-          flex-wrap: wrap;
+        .checkboxinput {
+          margin-left: 20px;
         }
-        .collectioninput {
-          margin-right: 20px;
-          min-width: 220px !important;
-          width: auto !important;
-          /deep/.el-input-group__append {
-            color: #ae8877;
-            border-left: none;
-            font-size: 12px;
-            padding: 0px 5px;
-            background: #f5f7fa;
-            span {
-              cursor: pointer;
+        .productinput {
+          width: 340px !important;
+        }
+        .label {
+          margin-right: 12px;
+        }
+        &.product {
+          margin-top: 26px;
+          .label {
+            margin-bottom: 10px;
+          }
+          .mininput {
+            margin-right: 20px;
+            margin-bottom: 10px;
+          }
+          .row {
+            flex-wrap: wrap;
+          }
+          .collectioninput {
+            margin-right: 20px;
+            min-width: 220px !important;
+            width: auto !important;
+            /deep/.el-input-group__append {
+              color: #ae8877;
+              border-left: none;
+              font-size: 12px;
+              padding: 0px 5px;
+              background: #f5f7fa;
+              span {
+                cursor: pointer;
+              }
+            }
+            /deep/.el-input__inner {
+              border-right: none;
             }
           }
-          /deep/.el-input__inner {
-            border-right: none;
+          .value {
+            margin-bottom: 10px;
           }
         }
-        .value {
-          margin-bottom: 10px;
+      }
+      .discount {
+        .item {
+          margin-bottom: 20px;
+          /deep/.el-radio {
+            min-width: 135px;
+          }
         }
       }
-    }
-    .discount {
-      .item {
-        margin-bottom: 20px;
-        /deep/.el-radio {
-          min-width: 135px;
+      .customerqualification {
+        .el-radio {
+          display: block;
+          margin-bottom: 30px;
         }
       }
     }
-    .customerqualification {
-      .el-radio {
-        display: block;
-        margin-bottom: 30px;
+    .value {
+      position: relative;
+      min-width: 300px;
+      height: 36px;
+      padding: 0px 6px;
+      font-size: 12px;
+      margin-right: 13px;
+      color: #c0c4cc;
+      background: #f5f7fa;
+      border-radius: 3px;
+      border: 1px solid #dcdfe6;
+      p {
+        line-height: 12px;
+        padding-right: 130px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      a {
+        position: absolute;
+        right: 10px;
+        top: 0%;
+        color: #ae8877;
       }
     }
-  }
-  .value {
-    position: relative;
-    min-width: 300px;
-    height: 36px;
-    padding: 0px 6px;
-    font-size: 12px;
-    margin-right: 13px;
-    color: #c0c4cc;
-    background: #f5f7fa;
-    border-radius: 3px;
-    border: 1px solid #dcdfe6;
-    p {
-      line-height: 12px;
-      padding-right: 130px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-    a {
-      position: absolute;
-      right: 10px;
-      top: 0%;
-      color: #ae8877;
-    }
-  }
-  .customerQualification {
-    .mininput {
-      margin-bottom: 30px;
+    .customerQualification {
+      .mininput {
+        margin-bottom: 30px;
+      }
     }
   }
 }

+ 1 - 1
src/views/oms/promotion/buyXGetYDiscount/index.vue

@@ -211,7 +211,7 @@ import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
 import ElContainer from "element-ui/packages/container/src/main";
 import PromotionForm from "@/views/oms/promotion/buyXGetYDiscount/promotionForm.vue";
-import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+import PromotionLogList from "@/views/oms/promotion/components/promotionLogList.vue";
 import { fetchList } from "@/api/oms/order/multiBuyDiscount";
 import { getToken } from "@/utils/auth";
 import i18n from "@/lang";

+ 451 - 440
src/views/oms/promotion/buyXGetYDiscount/promotionForm.vue

@@ -12,343 +12,351 @@
       @open="handleOpenDialog"
       @close="resetData"
     >
-      <div class="dialog-body" v-loading="pageLoad">
-        <el-form
-          ref="promotionBuyXgetYDertailFormRef"
-          :model="promotion"
-          label-width="210px"
-          size="medium"
-        >
-          <!-- 活动基本信息 -->
-          <div class="box base">
-            <div class="title">
-              <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
-            </div>
-            <div class="info">
-              <!--促销名称-->
-              <el-form-item
-                :label="$t('label.promotionName') + ':'"
-                prop="promotionName"
-              >
-                <el-input
-                  v-model.trim="promotion.title"
-                  :disabled="edit"
-                ></el-input>
-              </el-form-item>
-              <div class="item row">
-                <!--促销开始时间-->
+      <div class="dialog-box" v-loading="pageLoad">
+        <div class="dialog-body" v-loading="pageLoad">
+          <el-form
+            ref="promotionBuyXgetYDertailFormRef"
+            :model="promotion"
+            label-width="210px"
+            size="medium"
+          >
+            <!-- 活动基本信息 -->
+            <div class="box base">
+              <div class="title">
+                <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
+              </div>
+              <div class="info">
+                <!--促销名称-->
                 <el-form-item
-                  :label="$t('label.promotionStartTime') + ':'"
-                  prop="startTime"
+                  :label="$t('label.promotionName') + ':'"
+                  prop="promotionName"
                 >
-                  <el-date-picker
+                  <el-input
+                    v-model.trim="promotion.title"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.startTime"
-                  ></el-date-picker>
+                  ></el-input>
                 </el-form-item>
+                <div class="item row">
+                  <!--促销开始时间-->
+                  <el-form-item
+                    :label="$t('label.promotionStartTime') + ':'"
+                    prop="startTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.startTime"
+                    ></el-date-picker>
+                  </el-form-item>
 
-                <!--促销失效时间-->
+                  <!--促销失效时间-->
+                  <el-form-item
+                    :label="$t('label.promotionEndTime') + ':'"
+                    prop="endTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.endTime"
+                    ></el-date-picker>
+                  </el-form-item>
+                </div>
+                <!--应用方式-->
                 <el-form-item
-                  :label="$t('label.promotionEndTime') + ':'"
-                  prop="endTime"
+                  :label="$t('label.applicationMethod') + ':'"
+                  prop="discountMethod"
                 >
-                  <el-date-picker
+                  <el-radio-group
+                    v-model="promotion.discountMethod"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.endTime"
-                  ></el-date-picker>
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
+                      <el-input
+                        v-show="promotion.discountMethod === 1"
+                        class="codeinput"
+                        v-model.trim="promotion.discountCode"
+                        :disabled="edit"
+                      />
+                      <el-radio :label="2">{{
+                        $t("label.autoDiscount")
+                      }}</el-radio>
+                    </div>
+                  </el-radio-group>
                 </el-form-item>
               </div>
-              <!--应用方式-->
-              <el-form-item
-                :label="$t('label.applicationMethod') + ':'"
-                prop="discountMethod"
-              >
-                <el-radio-group
-                  v-model="promotion.discountMethod"
-                  :disabled="edit"
-                >
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
-                    <el-input
-                      v-show="promotion.discountMethod === 1"
-                      class="codeinput"
-                      v-model.trim="promotion.discountCode"
-                      :disabled="edit"
-                    />
-                    <el-radio :label="2">{{
-                      $t("label.autoDiscount")
-                    }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
             </div>
-          </div>
-          <!-- 折扣设置 -->
-          <div class="box discount">
-            <!-- 客户购买条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerPurchaseConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--最低购买要求-->
-              <el-form-item
-                :label="$t('label.minimumPurchaseRequirement') + ':'"
-                prop="minimum"
-              >
-                <el-radio-group
-                  v-model="promotion.purchaseRequire"
-                  :disabled="edit"
+            <!-- 折扣设置 -->
+            <div class="box discount">
+              <!-- 客户购买条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerPurchaseConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--最低购买要求-->
+                <el-form-item
+                  :label="$t('label.minimumPurchaseRequirement') + ':'"
+                  prop="minimum"
                 >
-                  <div class="item row">
-                    <el-radio :label="3">{{ $t("label.numberStr") }}</el-radio>
-                    <el-radio :label="2">{{ $t("label.money") }}</el-radio>
-                    <el-radio :label="1">{{ $t("label.free") }}</el-radio>
+                  <el-radio-group
+                    v-model="promotion.purchaseRequire"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.numberStr")
+                      }}</el-radio>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-radio :label="1">{{ $t("label.free") }}</el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+                <!--折扣内容 数量&金额-->
+                <el-form-item :label="$t('label.discountValue') + ':'">
+                  <div class="item">
+                    <div class="item-box">
+                      <span class="label">{{ discountContentValue }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.requireValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item-box">
+                      <span class="label">{{ $t("label.buyType") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.purchaseType"
+                        :disabled="edit"
+                      />
+                    </div>
                   </div>
-                </el-radio-group>
-              </el-form-item>
-              <!--折扣内容 数量&金额-->
-              <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <div class="item-box">
-                    <span class="label">{{ discountContentValue }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.requireValue"
-                      :disabled="edit"
-                    />
+                  <div class="item product">
+                    <div class="item row">
+                      <span class="label">{{ $t("label.product") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.productBuyType"
+                        :disabled="edit"
+                      />
+                      <div class="value" v-for="(data, j) in tagLists" :key="j">
+                        <p>{{ tagValue(data) }}</p>
+                        <a
+                          href="javascript:void();"
+                          @click="handleProductDialog(data)"
+                          >{{ $t("label.viewProductDetaiL") }}</a
+                        >
+                      </div>
+                    </div>
                   </div>
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.buyType") }}</span>
+                </el-form-item>
+              </div>
+              <!-- 客户获得条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerGetConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--折扣内容 数量&金额-->
+                <el-form-item :label="$t('label.discountValue') + ':'">
+                  <div class="item">
+                    <span class="label">{{ $t("label.numberStr") }}</span>
                     <el-input
                       class="mininput"
-                      v-model.trim="promotion.purchaseType"
+                      v-model.trim="promotion.customerGetNumber"
                       :disabled="edit"
                     />
                   </div>
-                </div>
-                <div class="item product">
-                  <div class="item row">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productBuyType"
-                      :disabled="edit"
-                    />
-                    <div class="value" v-for="(data, j) in tagLists" :key="j">
-                      <p>{{ tagValue(data) }}</p>
-                      <a
-                        href="javascript:void();"
-                        @click="handleProductDialog(data)"
-                        >{{ $t("label.viewProductDetaiL") }}</a
-                      >
+                  <div class="item product">
+                    <div class="item-box">
+                      <span class="label">{{ $t("label.product") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.productType"
+                        :disabled="edit"
+                      />
+                      <el-input
+                        class="productinput"
+                        :placeholder="$t('label.productPlaceholder')"
+                        v-model.trim="productSku"
+                      />
+                      <el-button
+                        @click="handleProductSearch"
+                        v-waves
+                        type="primary"
+                        >{{ $t("view.search") }}
+                      </el-button>
+                      <div class="skucon">
+                        <span
+                          v-for="(item, i) in getTagList"
+                          :class="productKeys.includes(item) ? 'active' : ''"
+                          :key="i"
+                          >{{ item }},</span
+                        >
+                      </div>
                     </div>
                   </div>
-                </div>
-              </el-form-item>
-            </div>
-            <!-- 客户获得条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerGetConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--折扣内容 数量&金额-->
-              <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <span class="label">{{ $t("label.numberStr") }}</span>
-                  <el-input
-                    class="mininput"
-                    v-model.trim="promotion.customerGetNumber"
+                </el-form-item>
+                <!--折扣额-->
+                <el-form-item
+                  :label="$t('label.discountPromotion') + ':'"
+                  prop="discount"
+                  class="discount"
+                >
+                  <el-radio-group
+                    v-model="promotion.valueType"
                     :disabled="edit"
-                  />
-                </div>
-                <div class="item product">
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productType"
-                      :disabled="edit"
-                    />
-                    <el-input
-                      class="productinput"
-                      :placeholder="$t('label.productPlaceholder')"
-                      v-model.trim="productSku"
-                    />
-                    <el-button
-                      @click="handleProductSearch"
-                      v-waves
-                      type="primary"
-                      >{{ $t("view.search") }}
-                    </el-button>
-                    <div class="skucon">
-                      <span
-                        v-for="(item, i) in getTagList"
-                        :class="productKeys.includes(item) ? 'active' : ''"
-                        :key="i"
-                        >{{ item }},</span
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{
+                        $t("label.percentage")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 1"
+                        class="mininput"
+                        v-model.trim="promotion.discountNumber"
+                        :disabled="edit"
                       >
+                        <span class="el-input__icon" slot="suffix">%</span>
+                      </el-input>
                     </div>
-                  </div>
-                </div>
-              </el-form-item>
-              <!--折扣额-->
-              <el-form-item
-                :label="$t('label.discountPromotion') + ':'"
-                prop="discount"
-                class="discount"
-              >
-                <el-radio-group v-model="promotion.valueType" :disabled="edit">
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.percentage") }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 1"
-                      class="mininput"
-                      v-model.trim="promotion.discountNumber"
-                      :disabled="edit"
-                    >
-                      <span class="el-input__icon" slot="suffix">%</span>
-                    </el-input>
-                  </div>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.discountPerItem")
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.valueType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.numericValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <el-radio :label="3">{{ $t("label.free") }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+              <!-- 每个订单使用次数 自动折扣才有-->
+              <div class="title" v-if="promotion.discountMethod === 2">
+                <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item>
                   <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.discountPerItem")
-                    }}</el-radio>
+                    <el-checkbox v-model="usageLimitchecked" :disabled="edit">{{
+                      $t("label.maxNumberOfTimesUsedPerOrder")
+                    }}</el-checkbox>
                     <el-input
-                      v-if="promotion.valueType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.numericValue"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.customerGetOrderUsageLimit"
                       :disabled="edit"
                     />
                   </div>
-                  <el-radio :label="3">{{ $t("label.free") }}</el-radio>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-            <!-- 每个订单使用次数 自动折扣才有-->
-            <div class="title" v-if="promotion.discountMethod === 2">
-              <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item>
-                <div class="item row">
-                  <el-checkbox v-model="usageLimitchecked" :disabled="edit">{{
-                    $t("label.maxNumberOfTimesUsedPerOrder")
-                  }}</el-checkbox>
-                  <el-input
-                    class="mininput checkboxinput"
-                    v-model.trim="promotion.customerGetOrderUsageLimit"
+            <!-- 客户资格  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.customerQualification") }}</span>
+              </div>
+              <div class="info customerQualification">
+                <el-form-item prop="customerQualification" required>
+                  <el-radio-group
+                    class="customerqualification"
+                    v-model="promotion.targetCustomerType"
                     :disabled="edit"
-                  />
-                </div>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 客户资格  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.customerQualification") }}</span>
+                  >
+                    <el-radio :label="1">{{
+                      $t("label.customerQualificationList")[0].label
+                    }}</el-radio>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.customerQualificationList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.customerQualificationList")[2].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 3"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <!-- <el-radio
+                    v-for="(item, i) in $t('label.customerQualificationList')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  > -->
+                  </el-radio-group>
+                </el-form-item>
+              </div>
             </div>
-            <div class="info customerQualification">
-              <el-form-item prop="customerQualification" required>
-                <el-radio-group
-                  class="customerqualification"
-                  v-model="promotion.targetCustomerType"
-                  :disabled="edit"
-                >
-                  <el-radio :label="1">{{
-                    $t("label.customerQualificationList")[0].label
-                  }}</el-radio>
+            <!-- 最大折扣使用次数  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item>
+                  <!-- <el-checkbox-group v-model="promotion.startTime"> -->
                   <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.customerQualificationList")[1].label
-                    }}</el-radio>
+                    <el-checkbox
+                      :checked="codeUsageLimitchecked"
+                      :disabled="edit"
+                      >{{ $t("label.limitDiscountCount") }}</el-checkbox
+                    >
                     <el-input
-                      v-if="promotion.targetCustomerType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.codeUsageLimit"
                       :disabled="edit"
                     />
                   </div>
                   <div class="item row">
-                    <el-radio :label="3">{{
-                      $t("label.customerQualificationList")[2].label
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.targetCustomerType === 3"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                    <el-checkbox
+                      :checked="promotion.codeCustomerUsageType === 1"
                       :disabled="edit"
-                    />
+                      >{{ $t("label.customerCount") }}</el-checkbox
+                    >
                   </div>
-                  <!-- <el-radio
-                    v-for="(item, i) in $t('label.customerQualificationList')"
-                    :key="i"
-                    :label="item.value"
-                    >{{ item.label }}</el-radio
-                  > -->
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 最大折扣使用次数  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
-            </div>
-            <div class="info">
-              <el-form-item>
-                <!-- <el-checkbox-group v-model="promotion.startTime"> -->
-                <div class="item row">
-                  <el-checkbox
-                    :checked="codeUsageLimitchecked"
-                    :disabled="edit"
-                    >{{ $t("label.limitDiscountCount") }}</el-checkbox
-                  >
-                  <el-input
-                    class="mininput checkboxinput"
-                    v-model.trim="promotion.codeUsageLimit"
-                    :disabled="edit"
-                  />
-                </div>
-                <div class="item row">
-                  <el-checkbox
-                    :checked="promotion.codeCustomerUsageType === 1"
-                    :disabled="edit"
-                    >{{ $t("label.customerCount") }}</el-checkbox
-                  >
-                </div>
-                <!-- </el-checkbox-group> -->
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 组合 自动折扣才有 -->
-          <div class="box" v-if="promotion.discountMethod === 2">
-            <div class="title">
-              <span>{{ $t("label.combination") }}</span>
+                  <!-- </el-checkbox-group> -->
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item :label="$t('label.combinationLable') + ':'">
-                <el-checkbox-group v-model="promotion.combination">
-                  <el-checkbox
-                    v-for="(item, i) in $t('label.combinationList')"
-                    :key="i"
-                    :label="item.value"
-                    :disabled="edit"
-                    >{{ item.label }}
-                  </el-checkbox>
-                </el-checkbox-group>
-              </el-form-item>
+            <!-- 组合 自动折扣才有 -->
+            <div class="box" v-if="promotion.discountMethod === 2">
+              <div class="title">
+                <span>{{ $t("label.combination") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item :label="$t('label.combinationLable') + ':'">
+                  <el-checkbox-group v-model="promotion.combination">
+                    <el-checkbox
+                      v-for="(item, i) in $t('label.combinationList')"
+                      :key="i"
+                      :label="item.value"
+                      :disabled="edit"
+                      >{{ item.label }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </div>
             </div>
-          </div>
-        </el-form>
+          </el-form>
+        </div>
       </div>
-
       <template slot="footer">
         <el-button
           @click="
@@ -634,174 +642,177 @@ export default {
 }
 </style>
 <style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 80vh;
-  overflow: auto;
-  .box {
-    border-bottom: 1px solid #d8d8d8;
-    padding-bottom: 20px;
-    margin-bottom: 42px;
-    &.base {
-      .info {
-        width: 25%;
+.dialog-box {
+  height: 100%;
+  .dialog-body {
+    height: 80vh;
+    overflow: auto;
+    .box {
+      border-bottom: 1px solid #d8d8d8;
+      padding-bottom: 20px;
+      margin-bottom: 42px;
+      &.base {
+        .info {
+          width: 25%;
+        }
       }
-    }
-    &.discount {
-      .info {
-        margin-bottom: 60px;
+      &.discount {
+        .info {
+          margin-bottom: 60px;
+        }
+      }
+      .title {
+        color: #606266;
+        font-size: 16px;
+        line-height: 16px;
+        position: relative;
+        font-weight: bold;
+        padding-left: 6px;
+        margin-bottom: 23px;
+        &:before {
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          content: "";
+          display: inline-block;
+          width: 3px;
+          height: 13px;
+          background: #ae8877;
+          border-radius: 0px 0px 0px 0px;
+        }
       }
     }
-    .title {
-      color: #606266;
-      font-size: 16px;
+    // /deep/.el-form-item__label-wrap {
+    //   margin-left: 0px !important;
+    //   .el-form-item__label {
+    //     text-align: right;
+    //   }
+    // }
+    .skucon {
+      width: 90%;
+      height: 139px;
+      overflow-y: auto;
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid #dcdfe6;
+      background: #f5f7fa;
+      margin-top: 12px;
+      padding: 10px;
+      font-size: 12px;
       line-height: 16px;
-      position: relative;
-      font-weight: bold;
-      padding-left: 6px;
-      margin-bottom: 23px;
-      &:before {
-        position: absolute;
-        left: 0px;
-        top: 0px;
-        content: "";
-        display: inline-block;
-        width: 3px;
-        height: 13px;
-        background: #ae8877;
-        border-radius: 0px 0px 0px 0px;
+      .active {
+        color: #fd5959;
       }
     }
-  }
-  // /deep/.el-form-item__label-wrap {
-  //   margin-left: 0px !important;
-  //   .el-form-item__label {
-  //     text-align: right;
-  //   }
-  // }
-  .skucon {
-    width: 90%;
-    height: 139px;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    background: #f5f7fa;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    .active {
-      color: #fd5959;
+    .productbox {
+      border-bottom: none;
     }
-  }
-  .productbox {
-    border-bottom: none;
-  }
-  .info {
-    .item {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      align-items: center;
-      &.row {
-        flex-wrap: nowrap;
-      }
-      .el-form-item {
-        margin-right: 42px !important;
-      }
-      .codeinput {
-        margin-right: 36px;
-      }
-      .mininput {
-        margin-right: 30px;
-        width: 180px !important;
-      }
-      .checkboxinput {
-        margin-left: 20px;
-      }
-      .productinput {
-        width: 340px !important;
-      }
-      .label {
-        margin-right: 12px;
-      }
-      &.product {
-        margin-top: 26px;
-        .label {
-          margin-bottom: 10px;
+    .info {
+      .item {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+        &.row {
+          flex-wrap: nowrap;
+        }
+        .el-form-item {
+          margin-right: 42px !important;
+        }
+        .codeinput {
+          margin-right: 36px;
         }
         .mininput {
-          margin-right: 20px;
-          margin-bottom: 10px;
+          margin-right: 30px;
+          width: 180px !important;
+        }
+        .checkboxinput {
+          margin-left: 20px;
         }
-        .row {
-          flex-wrap: wrap;
+        .productinput {
+          width: 340px !important;
+        }
+        .label {
+          margin-right: 12px;
         }
-        .collectioninput {
-          margin-right: 20px;
-          min-width: 220px !important;
-          width: auto !important;
-          /deep/.el-input-group__append {
-            color: #ae8877;
-            border-left: none;
-            font-size: 12px;
-            padding: 0px 5px;
-            background: #f5f7fa;
-            span {
-              cursor: pointer;
+        &.product {
+          margin-top: 26px;
+          .label {
+            margin-bottom: 10px;
+          }
+          .mininput {
+            margin-right: 20px;
+            margin-bottom: 10px;
+          }
+          .row {
+            flex-wrap: wrap;
+          }
+          .collectioninput {
+            margin-right: 20px;
+            min-width: 220px !important;
+            width: auto !important;
+            /deep/.el-input-group__append {
+              color: #ae8877;
+              border-left: none;
+              font-size: 12px;
+              padding: 0px 5px;
+              background: #f5f7fa;
+              span {
+                cursor: pointer;
+              }
+            }
+            /deep/.el-input__inner {
+              border-right: none;
             }
           }
-          /deep/.el-input__inner {
-            border-right: none;
+          .value {
+            margin-bottom: 10px;
           }
         }
-        .value {
-          margin-bottom: 10px;
+      }
+      .discount {
+        .item {
+          margin-bottom: 20px;
+          /deep/.el-radio {
+            min-width: 135px;
+          }
         }
       }
-    }
-    .discount {
-      .item {
-        margin-bottom: 20px;
-        /deep/.el-radio {
-          min-width: 135px;
+      .customerqualification {
+        .el-radio {
+          display: block;
+          margin-bottom: 30px;
         }
       }
     }
-    .customerqualification {
-      .el-radio {
-        display: block;
-        margin-bottom: 30px;
+    .value {
+      position: relative;
+      min-width: 300px;
+      height: 36px;
+      padding: 0px 6px;
+      font-size: 12px;
+      margin-right: 13px;
+      color: #c0c4cc;
+      background: #f5f7fa;
+      border-radius: 3px;
+      border: 1px solid #dcdfe6;
+      p {
+        line-height: 12px;
+        padding-right: 130px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      a {
+        position: absolute;
+        right: 10px;
+        top: 0%;
+        color: #ae8877;
       }
     }
-  }
-  .value {
-    position: relative;
-    min-width: 300px;
-    height: 36px;
-    padding: 0px 6px;
-    font-size: 12px;
-    margin-right: 13px;
-    color: #c0c4cc;
-    background: #f5f7fa;
-    border-radius: 3px;
-    border: 1px solid #dcdfe6;
-    p {
-      line-height: 12px;
-      padding-right: 130px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-    a {
-      position: absolute;
-      right: 10px;
-      top: 0%;
-      color: #ae8877;
-    }
-  }
-  .customerQualification {
-    .mininput {
-      margin-bottom: 30px;
+    .customerQualification {
+      .mininput {
+        margin-bottom: 30px;
+      }
     }
   }
 }

+ 1 - 1
src/views/oms/promotion/multiBuyDiscount/promotionLogList.vue → src/views/oms/promotion/components/promotionLogList.vue

@@ -1,6 +1,6 @@
 <template>
   <el-dialog append-to-body width="420px" :visible.sync="dialogFormVisible">
-    <div class="box" v-loading="listLoading" v-has="'priceRule:detail'">
+    <div v-loading="listLoading" class="box" v-has="'priceRule:detail'">
       <p v-for="(data, i) in list" :key="i">
         <a href="javascript:void(0)" @click="handleDetail(data)">
           {{ $t("label.viewVersion") }} V{{ data.version }}</a

+ 0 - 214
src/views/oms/promotion/freeShipping/components/productCollectionDetail.vue

@@ -1,214 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="pageLoad"
-    element-loading-text="loading..."
-    lock-scroll
-    top="8%"
-    width="80%"
-    custom-class="productcollection"
-    :close-on-click-modal="false"
-    :visible.sync="promotionFormVisible"
-    @open="handleOpenDialog"
-    @close="resetData"
-  >
-    <div class="dialog-body">
-      <el-input
-        class="productinput"
-        :placeholder="$t('label.productPlaceholder')"
-        v-model.trim="productSku"
-      />
-      <el-button @click="handleProductSearch" v-waves type="primary"
-        >{{ $t("view.search") }}
-      </el-button>
-      <div class="collection">
-        <span class="label">{{
-          $t("label.specifyProductCollection") + ":"
-        }}</span>
-        <el-input
-          class="mininput"
-          :value="productCollection"
-          :disabled="true"
-        />
-      </div>
-      <div class="skucon">
-        <span
-          v-for="(item, i) in ProductList"
-          :class="productKeys.includes(item) ? 'active' : ''"
-          :key="i"
-          >{{ item }},</span
-        >
-      </div>
-    </div>
-  </el-dialog>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import { getById, save, storeList, update } from "@/api/oms/order/promotion";
-import i18n from "@/lang";
-
-export default {
-  inject: ["reload"],
-  directives: {
-    waves
-  },
-  name: "productCollection",
-  data() {
-    return {
-      promotionFormVisible: false,
-      productSku: "",
-      productCollection: "买5送1商品集合   共1322件商品",
-      productKeys: [],
-      ProductList: [
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B014",
-        "132J0B06V",
-        "124C2B014",
-        "132J0B06V",
-        "121J0B04B",
-        "124C2B"
-      ],
-      promotion: {
-        // 配置基本信息
-        id: "",
-        promotionName: "",
-        promotionStartTime: "",
-        promotionEndTime: "",
-        type: 1,
-        promotionStatus: "",
-        priority: "",
-        participateType: "",
-        conditionType: "",
-        stackableType: [],
-        minimum: "1",
-        purchaseType: "",
-        productCollection: "",
-        discount: "",
-        number: 1,
-        combination: []
-      },
-      storeList: [],
-      noDataText: "加载中",
-      pageLoad: false
-    };
-  },
-  methods: {
-    async showDialog(id) {
-      if (id) {
-        // 修改配置
-        this.promotion.id = id;
-        await this.getPromotionInfo();
-      }
-      this.promotionFormVisible = true;
-    },
-    // 款号搜索
-    handleProductSearch() {
-      this.productKeys = this.productSku.split(",");
-    },
-    resetData() {
-      this.promotion = {
-        id: "",
-        promotionName: "",
-        promotionStartTime: "",
-        promotionEndTime: "",
-        type: 1,
-        promotionStatus: "",
-        rejectCause: "",
-        priority: "",
-        participateType: "",
-        conditionType: "",
-        stackableType: [],
-        minimum: "1"
-      };
-    },
-    handleOpenDialog() {
-      this.resetData();
-    },
-    getPromotionInfo() {
-      this.pageLoad = true;
-      getById(this.promotion.id).then(res => {
-        // 促销配置信息
-        this.promotion = res.data;
-        this.pageLoad = false;
-      });
-    }
-  }
-};
-</script>
-<style lang="scss">
-.productcollection {
-  height: 80vh;
-  .el-dialog__body {
-    padding: 30px 10px 30px 34px;
-  }
-  .el-dialog__headerbtn {
-    top: 14px;
-    right: 14px;
-    font-weight: bold;
-    .el-icon-close {
-      font-weight: bold;
-    }
-  }
-}
-</style>
-<style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 60vh;
-  overflow: auto;
-  .skucon {
-    width: 90%;
-    min-height: 38vh;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    background: #f5f7fa;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    .active {
-      color: #fd5959;
-    }
-  }
-  .collection {
-    margin: 18px 0px;
-  }
-  .productinput {
-    width: 340px !important;
-    margin-right: 18px;
-  }
-  .mininput {
-    width: 280px !important;
-  }
-}
-</style>

+ 2 - 2
src/views/oms/promotion/freeShipping/index.vue

@@ -210,8 +210,8 @@
 import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
 import ElContainer from "element-ui/packages/container/src/main";
-import PromotionForm from "@/views/oms/promotion/amountOffOrder/promotionForm.vue";
-import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+import PromotionForm from "@/views/oms/promotion/freeShipping/promotionForm.vue";
+import PromotionLogList from "@/views/oms/promotion/components/promotionLogList.vue";
 import { fetchList } from "@/api/oms/order/multiBuyDiscount";
 import { getToken } from "@/utils/auth";
 import i18n from "@/lang";

+ 424 - 464
src/views/oms/promotion/freeShipping/promotionForm.vue

@@ -12,357 +12,320 @@
       @open="handleOpenDialog"
       @close="resetData"
     >
-      <div class="dialog-body" v-loading="pageLoad">
-        <el-form
-          ref="promotionBuyXgetYDertailFormRef"
-          :model="promotion"
-          label-width="210px"
-          size="medium"
-        >
-          <!-- 活动基本信息 -->
-          <div class="box base">
-            <div class="title">
-              <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
-            </div>
-            <div class="info">
-              <!--促销名称-->
-              <el-form-item
-                :label="$t('label.promotionName') + ':'"
-                prop="promotionName"
-              >
-                <el-input
-                  v-model.trim="promotion.title"
-                  :disabled="edit"
-                ></el-input>
-              </el-form-item>
-              <div class="item row">
-                <!--促销开始时间-->
+      <div class="dialog-box" v-loading="pageLoad">
+        <div class="dialog-body" v-loading="pageLoad">
+          <el-form
+            ref="promotionBuyXgetYDertailFormRef"
+            :model="promotion"
+            label-width="210px"
+            size="medium"
+          >
+            <!-- 活动基本信息 -->
+            <div class="box base">
+              <div class="title">
+                <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
+              </div>
+              <div class="info">
+                <!--促销名称-->
                 <el-form-item
-                  :label="$t('label.promotionStartTime') + ':'"
-                  prop="startTime"
+                  :label="$t('label.promotionName') + ':'"
+                  prop="promotionName"
                 >
-                  <el-date-picker
+                  <el-input
+                    v-model.trim="promotion.title"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.startTime"
-                  ></el-date-picker>
+                  ></el-input>
                 </el-form-item>
+                <div class="item row">
+                  <!--促销开始时间-->
+                  <el-form-item
+                    :label="$t('label.promotionStartTime') + ':'"
+                    prop="startTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.startTime"
+                    ></el-date-picker>
+                  </el-form-item>
 
-                <!--促销失效时间-->
+                  <!--促销失效时间-->
+                  <el-form-item
+                    :label="$t('label.promotionEndTime') + ':'"
+                    prop="endTime"
+                  >
+                    <el-date-picker
+                      :disabled="edit"
+                      type="datetime"
+                      placeholder="选择日期"
+                      value-format="yyyy-MM-dd HH:mm:ss"
+                      v-model="promotion.endTime"
+                    ></el-date-picker>
+                  </el-form-item>
+                </div>
+                <!--应用方式-->
                 <el-form-item
-                  :label="$t('label.promotionEndTime') + ':'"
-                  prop="endTime"
+                  :label="$t('label.applicationMethod') + ':'"
+                  prop="discountMethod"
                 >
-                  <el-date-picker
+                  <el-radio-group
+                    v-model="promotion.discountMethod"
                     :disabled="edit"
-                    type="datetime"
-                    placeholder="选择日期"
-                    value-format="yyyy-MM-dd HH:mm:ss"
-                    v-model="promotion.endTime"
-                  ></el-date-picker>
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
+                      <el-input
+                        v-show="promotion.discountMethod === 1"
+                        class="codeinput"
+                        v-model.trim="promotion.discountCode"
+                        :disabled="edit"
+                      />
+                      <el-radio :label="2">{{
+                        $t("label.autoDiscount")
+                      }}</el-radio>
+                    </div>
+                  </el-radio-group>
                 </el-form-item>
               </div>
-              <!--应用方式-->
-              <el-form-item
-                :label="$t('label.applicationMethod') + ':'"
-                prop="discountMethod"
-              >
-                <el-radio-group
-                  v-model="promotion.discountMethod"
-                  :disabled="edit"
-                >
-                  <div class="item row">
-                    <el-radio :label="1">{{ $t("label.discount") }}</el-radio>
-                    <el-input
-                      v-show="promotion.discountMethod === 1"
-                      class="codeinput"
-                      v-model.trim="promotion.discountCode"
-                      :disabled="edit"
-                    />
-                    <el-radio :label="2">{{
-                      $t("label.autoDiscount")
-                    }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 折扣设置 -->
-          <div class="box discount">
-            <!-- 客户购买条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerPurchaseConditions") }}</span>
             </div>
-            <div class="info">
-              <!--最低购买要求-->
-              <el-form-item
-                :label="$t('label.minimumPurchaseRequirement') + ':'"
-                prop="minimum"
-              >
-                <el-radio-group
-                  v-model="promotion.purchaseRequire"
-                  :disabled="edit"
+            <!-- 折扣设置 -->
+            <div class="box discount">
+              <!-- 客户购买条件 -->
+              <div class="title">
+                <span>{{ $t("label.customerPurchaseConditions") }}</span>
+              </div>
+              <div class="info">
+                <!--最低购买要求-->
+                <el-form-item
+                  :label="$t('label.minimumPurchaseRequirement') + ':'"
+                  prop="minimum"
                 >
-                  <div class="item row">
-                    <el-radio :label="3">{{ $t("label.numberStr") }}</el-radio>
-                    <el-radio :label="2">{{ $t("label.money") }}</el-radio>
-                    <el-radio :label="1">{{ $t("label.free") }}</el-radio>
-                  </div>
-                </el-radio-group>
-              </el-form-item>
-              <!--折扣内容 数量&金额-->
-              <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <!--最低要求 免费 不展示 -->
-                  <div class="item-box" v-if="promotion.purchaseRequire !== 1">
-                    <span class="label">{{ discountContentValue }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.requireValue"
-                      :disabled="edit"
-                    />
-                  </div>
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.buyType") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.purchaseType"
-                      :disabled="edit"
-                    />
-                  </div>
-                </div>
-                <div class="item product">
-                  <div class="item row">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productBuyType"
-                      :disabled="edit"
-                    />
-                    <div class="value" v-for="(data, j) in tagLists" :key="j">
-                      <p>{{ tagValue(data) }}</p>
-                      <a
-                        href="javascript:void();"
-                        @click="handleProductDialog(data)"
-                        >{{ $t("label.viewProductDetaiL") }}</a
-                      >
+                  <el-radio-group
+                    v-model="promotion.purchaseRequire"
+                    :disabled="edit"
+                  >
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.numberStr")
+                      }}</el-radio>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-radio :label="1">{{ $t("label.free") }}</el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+                <!--折扣内容 数量&金额-->
+                <el-form-item :label="$t('label.discountValue') + ':'">
+                  <div class="item">
+                    <!--最低要求 免费 不展示 -->
+                    <div
+                      class="item-box"
+                      v-if="promotion.purchaseRequire !== 1"
+                    >
+                      <span class="label">{{ discountContentValue }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.requireValue"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item-box">
+                      <span class="label">{{ $t("label.buyType") }}</span>
+                      <el-input
+                        class="mininput"
+                        v-model.trim="promotion.purchaseType"
+                        :disabled="edit"
+                      />
                     </div>
                   </div>
-                </div>
-              </el-form-item>
-              <!-- 每个订单一次 获得条件为金额才可见 -->
-              <!-- <el-form-item
-                v-if="promotion.valueType === 2"
-                :label="$t('label.oncePerOrder') + ':'"
-              >
-                <el-checkbox
-                  v-model="promotion.oncePerOrder"
-                  :disabled="edit"
-                  >{{ $t("label.oncePerOrderDesc") }}</el-checkbox
+                </el-form-item>
+                <!--国家-->
+                <el-form-item
+                  :label="$t('label.countries') + ':'"
+                  prop="shippingTargetType"
+                  class="discount"
                 >
-              </el-form-item> -->
-            </div>
-            <!-- 客户获得条件 -->
-            <div class="title">
-              <span>{{ $t("label.customerGetConditions") }}</span>
-            </div>
-            <div class="info">
-              <!--折扣内容 数量&金额-->
-              <!-- <el-form-item :label="$t('label.discountValue') + ':'">
-                <div class="item">
-                  <span class="label">{{ $t("label.numberStr") }}</span>
-                  <el-input
-                    class="mininput"
-                    v-model.trim="promotion.requireValue"
+                  <el-radio-group
+                    v-model="promotion.shippingTargetType"
                     :disabled="edit"
-                  />
-                </div>
-                <div class="item product">
-                  <div class="item-box">
-                    <span class="label">{{ $t("label.product") }}</span>
-                    <el-input
-                      class="mininput"
-                      v-model.trim="promotion.productType"
-                      :disabled="edit"
-                    />
-                    <el-input
-                      class="productinput"
-                      :placeholder="$t('label.productPlaceholder')"
-                      v-model.trim="productSku"
-                    />
-                    <el-button
-                      @click="handleProductSearch"
-                      v-waves
-                      type="primary"
-                      >{{ $t("view.search") }}
-                    </el-button>
-                    <div class="skucon">
-                      <span
-                        v-for="(item, i) in getTagList"
-                        :class="productKeys.includes(item) ? 'active' : ''"
-                        :key="i"
-                        >{{ item }},</span
-                      >
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{
+                        $t("label.shippingTargetList")[0].label
+                      }}</el-radio>
                     </div>
-                  </div>
-                </div>
-              </el-form-item> -->
-              <!--折扣额-->
-              <el-form-item
-                :label="$t('label.discountPromotion') + ':'"
-                prop="discount"
-                class="discount"
-              >
-                <el-radio-group v-model="promotion.valueType" :disabled="edit">
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.shippingTargetList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.shippingTargetType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.shippingTarget"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <el-radio :label="3">{{ $t("label.free") }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <!-- 运输税率 -->
+                <el-form-item
+                  :label="$t('label.shippingRates') + ':'"
+                  prop="shippingExceptAmountType"
+                  class="discount"
+                >
                   <div class="item row">
-                    <el-radio :label="1">{{ $t("label.percentage") }}</el-radio>
-                    <el-input
-                      v-if="promotion.valueType === 1"
-                      class="mininput"
-                      v-model.trim="promotion.discountNumber"
+                    <el-checkbox
+                      v-model="shippingExceptCheck"
                       :disabled="edit"
+                      >{{ $t("label.shippingRatesValue") }}</el-checkbox
                     >
-                      <span class="el-input__icon" slot="suffix">%</span>
-                    </el-input>
-                  </div>
-                  <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.discountPerItem")
-                    }}</el-radio>
                     <el-input
-                      v-if="promotion.valueType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.numericValue"
+                      v-if="promotion.shippingExceptAmountType === 1"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.shippingExceptAmount"
                       :disabled="edit"
                     />
                   </div>
-                  <el-radio :label="3">{{ $t("label.free") }}</el-radio>
-                </el-radio-group>
-              </el-form-item>
+                </el-form-item>
+              </div>
             </div>
-            <!-- 每个订单使用次数 折扣码才有-->
-            <!-- <div v-if="promotion.discountMethod === 1">
+            <!-- 客户资格  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
               <div class="title">
-                <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+                <span>{{ $t("label.customerQualification") }}</span>
               </div>
-              <div class="info">
-                <el-form-item>
-                  <div class="item row">
-                    <el-checkbox v-model="usageLimitchecked" :disabled="edit">{{
-                      $t("label.maxNumberOfTimesUsedPerOrder")
-                    }}</el-checkbox>
-                    <el-input
-                      class="mininput checkboxinput"
-                      v-model.trim="promotion.customerGetOrderUsageLimit"
-                      :disabled="edit"
-                    />
-                  </div>
+              <div class="info customerQualification">
+                <el-form-item prop="customerQualification" required>
+                  <el-radio-group
+                    class="customerqualification"
+                    v-model="promotion.targetCustomerType"
+                    :disabled="edit"
+                  >
+                    <el-radio :label="1">{{
+                      $t("label.customerQualificationList")[0].label
+                    }}</el-radio>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.customerQualificationList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.customerQualificationList")[2].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.targetCustomerType === 3"
+                        class="mininput"
+                        v-model.trim="promotion.targetCustomer"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <!-- <el-radio
+                    v-for="(item, i) in $t('label.customerQualificationList')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  > -->
+                  </el-radio-group>
                 </el-form-item>
               </div>
-            </div> -->
-          </div>
-          <!-- 客户资格  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.customerQualification") }}</span>
             </div>
-            <div class="info customerQualification">
-              <el-form-item prop="customerQualification" required>
-                <el-radio-group
-                  class="customerqualification"
-                  v-model="promotion.targetCustomerType"
-                  :disabled="edit"
-                >
-                  <el-radio :label="1">{{
-                    $t("label.customerQualificationList")[0].label
-                  }}</el-radio>
+            <!-- 最大折扣使用次数  折扣码才有-->
+            <div class="box" v-if="promotion.discountMethod === 1">
+              <div class="title">
+                <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item>
+                  <!-- <el-checkbox-group v-model="promotion.startTime"> -->
                   <div class="item row">
-                    <el-radio :label="2">{{
-                      $t("label.customerQualificationList")[1].label
-                    }}</el-radio>
+                    <el-checkbox
+                      :checked="codeUsageLimitchecked"
+                      :disabled="edit"
+                      >{{ $t("label.limitDiscountCount") }}</el-checkbox
+                    >
                     <el-input
-                      v-if="promotion.targetCustomerType === 2"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                      class="mininput checkboxinput"
+                      v-model.trim="promotion.codeUsageLimit"
                       :disabled="edit"
                     />
                   </div>
                   <div class="item row">
-                    <el-radio :label="3">{{
-                      $t("label.customerQualificationList")[2].label
-                    }}</el-radio>
-                    <el-input
-                      v-if="promotion.targetCustomerType === 3"
-                      class="mininput"
-                      v-model.trim="promotion.targetCustomer"
+                    <el-checkbox
+                      :checked="promotion.codeCustomerUsageType === 1"
                       :disabled="edit"
-                    />
+                      >{{ $t("label.customerCount") }}</el-checkbox
+                    >
                   </div>
-                  <!-- <el-radio
-                    v-for="(item, i) in $t('label.customerQualificationList')"
-                    :key="i"
-                    :label="item.value"
-                    >{{ item.label }}</el-radio
-                  > -->
-                </el-radio-group>
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 最大折扣使用次数  折扣码才有-->
-          <div class="box" v-if="promotion.discountMethod === 1">
-            <div class="title">
-              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+                  <!-- </el-checkbox-group> -->
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item>
-                <!-- <el-checkbox-group v-model="promotion.startTime"> -->
-                <div class="item row">
-                  <el-checkbox
-                    :checked="codeUsageLimitchecked"
-                    :disabled="edit"
-                    >{{ $t("label.limitDiscountCount") }}</el-checkbox
-                  >
-                  <el-input
-                    class="mininput checkboxinput"
-                    v-model.trim="promotion.codeUsageLimit"
-                    :disabled="edit"
-                  />
-                </div>
-                <div class="item row">
-                  <el-checkbox
-                    :checked="promotion.codeCustomerUsageType === 1"
+            <!-- 定期订阅付款 购买方式为订阅 才展示-->
+            <div class="box" v-if="promotion.targetType !== 1">
+              <div class="title">
+                <span>{{ $t("label.recurringPayment") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item prop="subscribePayType" required>
+                  <el-radio-group
+                    class="customerqualification"
+                    v-model="promotion.subscribePayType"
                     :disabled="edit"
-                    >{{ $t("label.customerCount") }}</el-checkbox
                   >
-                </div>
-                <!-- </el-checkbox-group> -->
-              </el-form-item>
-            </div>
-          </div>
-          <!-- 组合 自动折扣才有 -->
-          <div class="box">
-            <div class="title">
-              <span>{{ $t("label.combination") }}</span>
+                    <el-radio :label="1">{{
+                      $t("label.recurringPaymentList")[0].label
+                    }}</el-radio>
+                    <div class="item row">
+                      <el-radio :label="2">{{
+                        $t("label.recurringPaymentList")[1].label
+                      }}</el-radio>
+                      <el-input
+                        v-if="promotion.subscribePayType === 2"
+                        class="mininput"
+                        v-model.trim="promotion.subscribeUsageLimit"
+                        :disabled="edit"
+                      />
+                    </div>
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.recurringPaymentList")[2].label
+                      }}</el-radio>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
             </div>
-            <div class="info">
-              <el-form-item :label="$t('label.combinationLable') + ':'">
-                <el-checkbox-group v-model="promotion.combination">
-                  <el-checkbox
-                    v-for="(item, i) in $t('label.combinationList')"
-                    :key="i"
-                    :label="item.value"
-                    :disabled="edit"
-                    >{{ item.label }}
-                  </el-checkbox>
-                </el-checkbox-group>
-              </el-form-item>
+            <!-- 组合 自动折扣才有 -->
+            <div class="box">
+              <div class="title">
+                <span>{{ $t("label.combination") }}</span>
+              </div>
+              <div class="info">
+                <el-form-item :label="$t('label.combinationLable') + ':'">
+                  <el-checkbox-group v-model="promotion.combination">
+                    <el-checkbox
+                      v-for="(item, i) in $t('label.combinationList')"
+                      :key="i"
+                      :label="item.value"
+                      :disabled="edit"
+                      >{{ item.label }}
+                    </el-checkbox>
+                  </el-checkbox-group>
+                </el-form-item>
+              </div>
             </div>
-          </div>
-        </el-form>
+          </el-form>
+        </div>
       </div>
-
       <template slot="footer">
         <el-button
           @click="
@@ -371,13 +334,8 @@
           "
           >{{ $t("view.cancel") }}
         </el-button>
-        <!-- 未审核时/审核驳回 状态可进行提交 -->
-        <!-- <el-button type="primary" @click="handleSaveOrUpdate" :disabled="edit"
-          >{{ $t("view.confirm") }}
-        </el-button> -->
       </template>
     </el-dialog>
-    <product-collection ref="productCollectionRef" />
   </div>
 </template>
 <script>
@@ -385,17 +343,13 @@ import waves from "@/directive/waves"; // 水波纹指令
 import { fetchDetailByIdAndVersion } from "@/api/oms/order/multiBuyDiscount";
 import i18n from "@/lang";
 import { isEmpty } from "@/utils/toolUtil";
-import productCollection from "@/views/oms/promotion/buyXGetYDiscount/components/productCollectionDetail";
 
 export default {
   inject: ["reload"],
   directives: {
     waves
   },
-  name: "buyXgetYbuyDiscountForm",
-  components: {
-    productCollection
-  },
+  name: "freeShipping",
   computed: {
     discountContentValue() {
       return this.promotion.purchaseRequire === 2
@@ -411,6 +365,7 @@ export default {
       productKeys: [],
       usageLimitchecked: false,
       codeUsageLimitchecked: false,
+      shippingExceptCheck: false,
       tagLists: [],
       getTagList: [],
       promotion: {
@@ -544,7 +499,8 @@ export default {
             getTargetShopifyProductSpu,
             getTargetShopifySku,
             customerGetOrderUsageLimit,
-            codeUsageLimit
+            codeUsageLimit,
+            shippingExceptAmountType
           } = priceRule;
           let combinationArr = [];
           if (combineWithOrder) {
@@ -558,6 +514,7 @@ export default {
           }
           this.usageLimitchecked = !!customerGetOrderUsageLimit;
           this.codeUsageLimitchecked = !!codeUsageLimit;
+          this.shippingExceptCheck = shippingExceptAmountType === 1;
           this.$set(this.promotion, "combination", combinationArr);
           // 折扣适用  1特定系列  其他2,3 特定商品
           let tagLists = [];
@@ -648,174 +605,177 @@ export default {
 }
 </style>
 <style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 80vh;
-  overflow: auto;
-  .box {
-    border-bottom: 1px solid #d8d8d8;
-    padding-bottom: 20px;
-    margin-bottom: 42px;
-    &.base {
-      .info {
-        width: 25%;
+.dialog-box {
+  height: 100%;
+  .dialog-body {
+    height: 80vh;
+    overflow: auto;
+    .box {
+      border-bottom: 1px solid #d8d8d8;
+      padding-bottom: 20px;
+      margin-bottom: 42px;
+      &.base {
+        .info {
+          width: 25%;
+        }
       }
-    }
-    &.discount {
-      .info {
-        margin-bottom: 60px;
+      &.discount {
+        .info {
+          margin-bottom: 60px;
+        }
+      }
+      .title {
+        color: #606266;
+        font-size: 16px;
+        line-height: 16px;
+        position: relative;
+        font-weight: bold;
+        padding-left: 6px;
+        margin-bottom: 23px;
+        &:before {
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          content: "";
+          display: inline-block;
+          width: 3px;
+          height: 13px;
+          background: #ae8877;
+          border-radius: 0px 0px 0px 0px;
+        }
       }
     }
-    .title {
-      color: #606266;
-      font-size: 16px;
+    // /deep/.el-form-item__label-wrap {
+    //   margin-left: 0px !important;
+    //   .el-form-item__label {
+    //     text-align: right;
+    //   }
+    // }
+    .skucon {
+      width: 90%;
+      height: 139px;
+      overflow-y: auto;
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid #dcdfe6;
+      background: #f5f7fa;
+      margin-top: 12px;
+      padding: 10px;
+      font-size: 12px;
       line-height: 16px;
-      position: relative;
-      font-weight: bold;
-      padding-left: 6px;
-      margin-bottom: 23px;
-      &:before {
-        position: absolute;
-        left: 0px;
-        top: 0px;
-        content: "";
-        display: inline-block;
-        width: 3px;
-        height: 13px;
-        background: #ae8877;
-        border-radius: 0px 0px 0px 0px;
+      .active {
+        color: #fd5959;
       }
     }
-  }
-  // /deep/.el-form-item__label-wrap {
-  //   margin-left: 0px !important;
-  //   .el-form-item__label {
-  //     text-align: right;
-  //   }
-  // }
-  .skucon {
-    width: 90%;
-    height: 139px;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    background: #f5f7fa;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    .active {
-      color: #fd5959;
+    .productbox {
+      border-bottom: none;
     }
-  }
-  .productbox {
-    border-bottom: none;
-  }
-  .info {
-    .item {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      align-items: center;
-      &.row {
-        flex-wrap: nowrap;
-      }
-      .el-form-item {
-        margin-right: 42px !important;
-      }
-      .codeinput {
-        margin-right: 36px;
-      }
-      .mininput {
-        margin-right: 30px;
-        width: 180px !important;
-      }
-      .checkboxinput {
-        margin-left: 20px;
-      }
-      .productinput {
-        width: 340px !important;
-      }
-      .label {
-        margin-right: 12px;
-      }
-      &.product {
-        margin-top: 26px;
-        .label {
-          margin-bottom: 10px;
+    .info {
+      .item {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+        &.row {
+          flex-wrap: nowrap;
+        }
+        .el-form-item {
+          margin-right: 42px !important;
+        }
+        .codeinput {
+          margin-right: 36px;
         }
         .mininput {
-          margin-right: 20px;
-          margin-bottom: 10px;
+          margin-right: 30px;
+          width: 180px !important;
+        }
+        .checkboxinput {
+          margin-left: 20px;
         }
-        .row {
-          flex-wrap: wrap;
+        .productinput {
+          width: 340px !important;
         }
-        .collectioninput {
-          margin-right: 20px;
-          min-width: 220px !important;
-          width: auto !important;
-          /deep/.el-input-group__append {
-            color: #ae8877;
-            border-left: none;
-            font-size: 12px;
-            padding: 0px 5px;
-            background: #f5f7fa;
-            span {
-              cursor: pointer;
+        .label {
+          margin-right: 12px;
+        }
+        &.product {
+          margin-top: 26px;
+          .label {
+            margin-bottom: 10px;
+          }
+          .mininput {
+            margin-right: 20px;
+            margin-bottom: 10px;
+          }
+          .row {
+            flex-wrap: wrap;
+          }
+          .collectioninput {
+            margin-right: 20px;
+            min-width: 220px !important;
+            width: auto !important;
+            /deep/.el-input-group__append {
+              color: #ae8877;
+              border-left: none;
+              font-size: 12px;
+              padding: 0px 5px;
+              background: #f5f7fa;
+              span {
+                cursor: pointer;
+              }
+            }
+            /deep/.el-input__inner {
+              border-right: none;
             }
           }
-          /deep/.el-input__inner {
-            border-right: none;
+          .value {
+            margin-bottom: 10px;
           }
         }
-        .value {
-          margin-bottom: 10px;
+      }
+      .discount {
+        .item {
+          margin-bottom: 20px;
+          /deep/.el-radio {
+            min-width: 135px;
+          }
         }
       }
-    }
-    .discount {
-      .item {
-        margin-bottom: 20px;
-        /deep/.el-radio {
-          min-width: 135px;
+      .customerqualification {
+        .el-radio {
+          display: block;
+          margin-bottom: 30px;
         }
       }
     }
-    .customerqualification {
-      .el-radio {
-        display: block;
-        margin-bottom: 30px;
+    .value {
+      position: relative;
+      min-width: 300px;
+      height: 36px;
+      padding: 0px 6px;
+      font-size: 12px;
+      margin-right: 13px;
+      color: #c0c4cc;
+      background: #f5f7fa;
+      border-radius: 3px;
+      border: 1px solid #dcdfe6;
+      p {
+        line-height: 12px;
+        padding-right: 130px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      a {
+        position: absolute;
+        right: 10px;
+        top: 0%;
+        color: #ae8877;
       }
     }
-  }
-  .value {
-    position: relative;
-    min-width: 300px;
-    height: 36px;
-    padding: 0px 6px;
-    font-size: 12px;
-    margin-right: 13px;
-    color: #c0c4cc;
-    background: #f5f7fa;
-    border-radius: 3px;
-    border: 1px solid #dcdfe6;
-    p {
-      line-height: 12px;
-      padding-right: 130px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      white-space: nowrap;
-    }
-    a {
-      position: absolute;
-      right: 10px;
-      top: 0%;
-      color: #ae8877;
-    }
-  }
-  .customerQualification {
-    .mininput {
-      margin-bottom: 30px;
+    .customerQualification {
+      .mininput {
+        margin-bottom: 30px;
+      }
     }
   }
 }

+ 1 - 1
src/views/oms/promotion/multiBuyDiscount/index.vue

@@ -322,7 +322,7 @@ import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
 import ElContainer from "element-ui/packages/container/src/main";
 import PromotionForm from "@/views/oms/promotion/multiBuyDiscount/promotionForm.vue";
-import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+import PromotionLogList from "@/views/oms/promotion/components/promotionLogList.vue";
 import {
   fetchList,
   deleteMutiDiscount,

+ 108 - 105
src/views/oms/promotion/multiBuyDiscount/promotionForm.vue

@@ -11,7 +11,7 @@
     @open="handleOpenDialog"
     @close="resetData"
   >
-    <div v-loading="pageLoad">
+    <div class="dialog-box" v-loading="pageLoad">
       <div class="dialog-body">
         <el-form
           ref="promotionFormRef"
@@ -570,119 +570,122 @@ export default {
 }
 </style>
 <style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 80vh;
-  overflow: auto;
-  .box {
-    border-bottom: 1px solid #d8d8d8;
-    padding-bottom: 20px;
-    margin-bottom: 42px;
-    &.base {
-      .info {
-        width: 25%;
+.dialog-box {
+  height: 100%;
+  .dialog-body {
+    height: 80vh;
+    overflow: auto;
+    .box {
+      border-bottom: 1px solid #d8d8d8;
+      padding-bottom: 20px;
+      margin-bottom: 42px;
+      &.base {
+        .info {
+          width: 25%;
+        }
       }
-    }
-    .title {
-      color: #606266;
-      font-size: 16px;
-      line-height: 16px;
-      position: relative;
-      font-weight: bold;
-      padding-left: 6px;
-      margin-bottom: 23px;
-      &:before {
-        position: absolute;
-        left: 0px;
-        top: 0px;
-        content: "";
-        display: inline-block;
-        width: 3px;
-        height: 13px;
-        background: #ae8877;
-        border-radius: 0px 0px 0px 0px;
+      .title {
+        color: #606266;
+        font-size: 16px;
+        line-height: 16px;
+        position: relative;
+        font-weight: bold;
+        padding-left: 6px;
+        margin-bottom: 23px;
+        &:before {
+          position: absolute;
+          left: 0px;
+          top: 0px;
+          content: "";
+          display: inline-block;
+          width: 3px;
+          height: 13px;
+          background: #ae8877;
+          border-radius: 0px 0px 0px 0px;
+        }
       }
     }
-  }
-  // /deep/.el-form-item__label-wrap {
-  //   margin-left: 0px !important;
-  //   .el-form-item__label {
-  //     text-align: right;
-  //   }
-  // }
-  .productcheckbox {
-    margin-right: 10px;
-  }
-  .productinfo {
-    // display: flex;
-    // align-items: flex-start;
-    /deep/.el-form-item__content {
-      display: flex;
-      align-items: flex-start;
-    }
-    /deep/.el-select__tags {
-      max-width: 300px !important;
-    }
-  }
-  .skutitle {
-    min-width: 300px;
-    max-width: 400px;
-    min-height: 36px;
-    line-height: 36px;
-    border-radius: 3px;
-    border: 1px solid #dcdfe6;
-    padding: 0px 7px;
-    &.disabled {
-      background: #f5f7fa;
-      color: #c0c4cc;
-    }
-  }
-  .skucon {
-    width: 90%;
-    height: 139px;
-    overflow-y: auto;
-    border-radius: 3px 3px 3px 3px;
-    border: 1px solid #dcdfe6;
-    margin-top: 12px;
-    padding: 10px;
-    font-size: 12px;
-    line-height: 16px;
-    &.disabled {
-      background: #f5f7fa;
-      color: #c0c4cc;
+    // /deep/.el-form-item__label-wrap {
+    //   margin-left: 0px !important;
+    //   .el-form-item__label {
+    //     text-align: right;
+    //   }
+    // }
+    .productcheckbox {
+      margin-right: 10px;
     }
-    .active {
-      color: #fd5959;
+    .productinfo {
+      // display: flex;
+      // align-items: flex-start;
+      /deep/.el-form-item__content {
+        display: flex;
+        align-items: flex-start;
+      }
+      /deep/.el-select__tags {
+        max-width: 300px !important;
+      }
     }
-  }
-  .productbox {
-    border-bottom: none;
-  }
-  .search {
-    margin-bottom: 20px;
-    .productinput {
-      width: 340px !important;
-      margin-right: 12px;
+    .skutitle {
+      min-width: 300px;
+      max-width: 400px;
+      min-height: 36px;
+      line-height: 36px;
+      border-radius: 3px;
+      border: 1px solid #dcdfe6;
+      padding: 0px 7px;
+      &.disabled {
+        background: #f5f7fa;
+        color: #c0c4cc;
+      }
     }
-  }
-  .info {
-    .item {
-      display: flex;
-      flex-direction: row;
-      flex-wrap: wrap;
-      align-items: center;
-      &.row {
-        flex-wrap: nowrap;
+    .skucon {
+      width: 90%;
+      height: 139px;
+      overflow-y: auto;
+      border-radius: 3px 3px 3px 3px;
+      border: 1px solid #dcdfe6;
+      margin-top: 12px;
+      padding: 10px;
+      font-size: 12px;
+      line-height: 16px;
+      &.disabled {
+        background: #f5f7fa;
+        color: #c0c4cc;
       }
-      .el-form-item {
-        margin-right: 42px !important;
+      .active {
+        color: #fd5959;
       }
-      .codeinput {
-        margin-right: 36px;
+    }
+    .productbox {
+      border-bottom: none;
+    }
+    .search {
+      margin-bottom: 20px;
+      .productinput {
+        width: 340px !important;
+        margin-right: 12px;
       }
-      .mininput {
-        margin-right: 30px;
-        .el-input__inner {
-          width: 142px;
+    }
+    .info {
+      .item {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+        &.row {
+          flex-wrap: nowrap;
+        }
+        .el-form-item {
+          margin-right: 42px !important;
+        }
+        .codeinput {
+          margin-right: 36px;
+        }
+        .mininput {
+          margin-right: 30px;
+          .el-input__inner {
+            width: 142px;
+          }
         }
       }
     }

+ 3 - 3
vue.config.js

@@ -73,14 +73,14 @@ module.exports = {
       //   }
       // },
       // [process.env.VUE_APP_OMS_API]: {
-      //   target: `http://10.41.3.106:18081/oms`,
+      //   target: `http://10.41.3.106:18081/oms`, // 胡超
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志
       //   pathRewrite: {
       //     ['^' + process.env.VUE_APP_OMS_API]: ''
       //   }
       // },
-      // [process.env.VUE_APP_OMS_API]: {
+      // [process.env.VUE_APP_OMS_API]: { // 林群
       //   target: `http://10.41.3.65:18081/oms`,
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志
@@ -88,7 +88,7 @@ module.exports = {
       //     ['^' + process.env.VUE_APP_OMS_API]: ''
       //   }
       // },
-      // [process.env.VUE_APP_OMS_API]: {   廖望
+      // [process.env.VUE_APP_OMS_API]: {   // 廖望
       //   target: `http://10.41.3.152:18081/oms`,
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志