Ver Fonte

feat:多件多折

chenjiaxin há 5 meses atrás
pai
commit
4889613882
58 ficheiros alterados com 11038 adições e 2974 exclusões
  1. 21 0
      .env.test
  2. 1 0
      package.json
  3. 50 0
      src/api/oms/order/multiBuyDiscount.js
  4. 9 0
      src/api/oms/order/promotionLog.js
  5. 11 7
      src/lang/en.js
  6. 194 3
      src/lang/en/label.js
  7. 1 1
      src/lang/es.js
  8. 10 0
      src/lang/es/label.js
  9. 7 3
      src/lang/ja.js
  10. 191 2
      src/lang/ja/label.js
  11. 8 4
      src/lang/zh.js
  12. 189 10
      src/lang/zh/label.js
  13. 42 17
      src/router/modules/promotion.js
  14. 82 64
      src/styles/element-ui.scss
  15. 2 1
      src/views/oms/order/abnormalList.vue
  16. 7 33
      src/views/oms/order/components/discountInfoTab.vue
  17. 5 11
      src/views/oms/order/components/orderInfoDialog.vue
  18. 6 1
      src/views/oms/order/components/orderItemListTab.vue
  19. 5 5
      src/views/oms/order/components/promotionInfoTab.vue
  20. 6 6
      src/views/oms/order/orderList.vue
  21. 1 0
      src/views/oms/order/orderProcess.vue
  22. 214 0
      src/views/oms/promotion/amountOffOrder/components/productCollectionDetail.vue
  23. 425 0
      src/views/oms/promotion/amountOffOrder/index.vue
  24. 556 0
      src/views/oms/promotion/amountOffOrder/promotionForm copy.vue
  25. 760 0
      src/views/oms/promotion/amountOffOrder/promotionForm.vue
  26. 91 0
      src/views/oms/promotion/amountOffOrder/promotionLogList.vue
  27. 214 0
      src/views/oms/promotion/amountOffProducts/components/productCollectionDetail.vue
  28. 425 0
      src/views/oms/promotion/amountOffProducts/index.vue
  29. 556 0
      src/views/oms/promotion/amountOffProducts/promotionForm copy.vue
  30. 770 0
      src/views/oms/promotion/amountOffProducts/promotionForm.vue
  31. 91 0
      src/views/oms/promotion/amountOffProducts/promotionLogList.vue
  32. 214 0
      src/views/oms/promotion/buyXGetYDiscount/components/productCollectionDetail.vue
  33. 359 0
      src/views/oms/promotion/buyXGetYDiscount/index.vue
  34. 556 0
      src/views/oms/promotion/buyXGetYDiscount/promotionForm copy.vue
  35. 732 0
      src/views/oms/promotion/buyXGetYDiscount/promotionForm.vue
  36. 91 0
      src/views/oms/promotion/buyXGetYDiscount/promotionLogList.vue
  37. 214 0
      src/views/oms/promotion/freeShipping/components/productCollectionDetail.vue
  38. 425 0
      src/views/oms/promotion/freeShipping/index.vue
  39. 556 0
      src/views/oms/promotion/freeShipping/promotionForm copy.vue
  40. 801 0
      src/views/oms/promotion/freeShipping/promotionForm.vue
  41. 91 0
      src/views/oms/promotion/freeShipping/promotionLogList.vue
  42. 504 0
      src/views/oms/promotion/multiBuyDiscount/index.vue
  43. 654 0
      src/views/oms/promotion/multiBuyDiscount/promotionForm.vue
  44. 94 0
      src/views/oms/promotion/multiBuyDiscount/promotionLogList.vue
  45. 1 1
      src/views/oms/promotion/multiBuyDiscount/promotionVersionForm.vue
  46. 54 23
      src/views/oms/promotion/promotionLogList/components/promotionLogDetail.vue
  47. 46 35
      src/views/oms/promotion/promotionLogList/index.vue
  48. 0 699
      src/views/oms/promotion/shopifyPromotion/index.vue
  49. 0 472
      src/views/oms/promotion/shopifyPromotion/promotionForm.vue
  50. 0 246
      src/views/oms/promotion/shopifyPromotion/promotionGiftForm.vue
  51. 0 423
      src/views/oms/promotion/shopifyPromotion/promotionGiftList.vue
  52. 0 349
      src/views/oms/promotion/shopifyPromotion/promotionGoodsList.vue
  53. 0 139
      src/views/oms/promotion/shopifyPromotion/promotionLogList.vue
  54. 420 244
      src/views/oms/refund/components/createRefundDialog.vue
  55. 5 6
      src/views/oms/refund/refundCwList.vue
  56. 215 135
      src/views/oms/refund/refundDetail.vue
  57. 26 28
      src/views/oms/refund/refundList.vue
  58. 30 6
      vue.config.js

+ 21 - 0
.env.test

@@ -0,0 +1,21 @@
+# just a flag
+ENV = 'development'
+
+# base api
+
+VUE_APP_OAUTH_API = '/oauth/'
+VUE_APP_PIM_API = '/'
+VUE_APP_OMS_API = '/order/'
+
+# 静态资源
+VUE_APP_RESOURCE_URL='/pim'
+VUE_APP_IMS_API='/ims/'
+
+# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
+# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
+# It only does one thing by converting all import() to require().
+# This configuration can significantly increase the speed of hot updates,
+# when you have a large number of pages.
+# Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
+
+VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 0
package.json

@@ -7,6 +7,7 @@
   "scripts": {
     "dev": "vue-cli-service serve --inline --host swings.pim.com",
     "dev:local": "vue-cli-service serve",
+    "dev:test": "vue-cli-service serve  build --mode test",
     "build:prod": "vue-cli-service build",
     "build:stage": "vue-cli-service build --mode staging",
     "preview": "node build/index.js --preview",

+ 50 - 0
src/api/oms/order/multiBuyDiscount.js

@@ -0,0 +1,50 @@
+import request from "@/utils/requestOms";
+// 列表
+export function fetchList(query) {
+  return request({
+    url: "/priceRule/list",
+    method: "get",
+    params: query
+  });
+}
+
+// 版本
+export function fetchVersions(id, query) {
+  return request({
+    url: `/priceRule/version/${id}`,
+    method: "get",
+    params: query
+  });
+}
+// 获取详情
+export function fetchDetailByIdAndVersion(query) {
+  const { id, version } = query
+  return request({
+    url: `/priceRule/detail/${id}/${version}`,
+    method: "get",
+  });
+}
+// 新增&编辑多件多折
+export function updateMutiDiscount(data) {
+  return request({
+    url: "/priceRule/editMultiplePieceDiscount",
+    method: "post",
+    data
+  });
+}
+// 删除折扣
+export function deleteMutiDiscount(query) {
+  return request({
+    url: "/priceRule/delete",
+    method: "delete",
+    params: query
+  });
+}
+// 启用禁用折扣
+export function updateStatusMutiDiscount(query) {
+  return request({
+    url: "/priceRule/updateStatus",
+    method: "post",
+    params: query
+  });
+}

+ 9 - 0
src/api/oms/order/promotionLog.js

@@ -0,0 +1,9 @@
+import request from "@/utils/requestOms";
+// 日志列表
+export function fetchLogList(query) {
+  return request({
+    url: "/priceRuleLog/list",
+    method: "get",
+    params: query
+  });
+}

+ 11 - 7
src/lang/en.js

@@ -185,7 +185,7 @@ export default {
   contNumberp: "contact number",
   courCompanines: "Express company",
   courCode: "Shippment number",
-  discountInfo: "Multiple pieces and multiple discount information",
+  discountInfo: "Multi-Buy Discount Information", // 多件多折扣
   // onlyCode: "barcode",
   // orderDetails: "derails",
   // goodsCode: "skcs",
@@ -485,7 +485,7 @@ export default {
     fixedHeader: "Fixed Header",
     sidebarLogo: "Sidebar Logo"
   },
-  shopifyPromotion: {
+  multiBuyDiscount: {
     promotionMessage: "Promotional Information",
     targetType: "Promotional Application Type",
     useType: "Usage Type",
@@ -500,10 +500,14 @@ export default {
     operator: "Operator"
   },
   multipleDiscountInfo: {
-    OriginalDiscount: "Original order meets discount",
-    OriginalMoneny: "Original order payment amount",
-    afterReturnDiscount: "Refund after satisfying discount",
-    returnMoney: "Amount to be refunded",
-    needPayMoney: "Additional amount paid by the customer",
+    payMoneny: "Order Payment Amount",
+    multipleDiscount: "Multi-Buy Discount",
+    multipleDiscountReCal: "Recalculation Multi-Buy Discount",
+    OriginalDiscount: "Original Order Multi-Buy Discount Imformation",
+    OriginalMoneny: "Original Order Payment Amount",
+    afterReturnDiscount: "Information On Multi-Buy Discount After Refund",
+    afterReturnMoney: "Order Amount After Refund",
+    returnMoney: "Amount To Be Refunded",
+    needPayMoney: "Additional Amount Paid By The Customer",
   }
 };

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

@@ -249,6 +249,18 @@ export default {
   specificProductsDisplay: "Specific Products Display",
   regionDetails: "Region Details",
   priority: "Priority",
+  priorityValue: [
+    {
+      label: "High",
+      value: 1
+    }, {
+      label: "Middle",
+      value: 2
+    }, {
+      label: "Low",
+      value: 3
+    }
+  ],
   supportSplit: "Support Split",
   region: "Region",
   sourceProtection: "Source Protection",
@@ -412,10 +424,11 @@ export default {
   trackCode: "Logistics Tracking Platform Company Code",
   // 促销相关开始
   promotionName: "Promotion Name",
+  promotionEventName: "Promotion Name",
   promotionInfo: "Promotion Information",
   promotionStoreName: "Promotion Store Name",
   promotionStartTime: "Promotion Start Time",
-  promotionEndTime: "Promotion Overdue Time",
+  promotionEndTime: "Promotion End Time",
   promotionStatus: "Promotion Status",
   checkBy: "Check User",
   rejectCause: "Causes of Depression",
@@ -429,7 +442,175 @@ export default {
   goodsRelation: "Goods Relation",
   goodsScope: "Goods Scope",
   giftRelation: "Giveaway Relationships",
-
+  applicationMethod: "Application Method",
+  minimumPurchaseRequirement: "Minimum Purchase Requirement",
+  promotionId: "Promotion Id",
+  promotionLevel: "Promotion Level",
+  discountValue: "Discount Value",
+  version: "Version",
+  stackableType: "Stackable Type",
+  setBasicEventInformation: "Set Basic Event Information",
+  discount: 'Discount code',
+  autoDiscount: "Automatic discount",
+  discountSetting: "Discount Setting",
+  order: "Order",
+  product: "Product",
+  discountStr: 'Discount',
+  numberStr: "Quantity",
+  money: 'Amount',
+  productCollection: " product collections",
+  all: ", total ",
+  itemProduct: ' items',
+  specifyProductTag: "Specify Product Tag",
+  setProductRange: "Set Product Range",
+  mutiPromotionDetailTitle: "Promotion Details",
+  mutiPromotionCreateTitle: "Create Muti Buy Discount Promotion",
+  mutiPromotionUpdateTitle: "Edit Muti Buy Discount Promotion",
+  setBasicEventInformationDetail: "Basic Event Information",
+  discountSettingDetail: "Discount Information",
+  setProductRangeDetail: "Product Range",
+  stackableTypes: "Stackable Type",
+  customerPurchaseConditions: "Customer Buys Condition",
+  customerGetConditions: "Customer Gets Condition",
+  productPlaceholder: "Please enter the sku, separate sku with commas",
+  buyType: 'Purchase Type',
+  discountPromotion: 'Discount',
+  percentage: 'Percentage',
+  discountPerItem: 'Amount off each',
+  free: 'Free',
+  noRequirement: 'No Requirement',
+  numberOfTimesUsedPerOrder: 'Number of times used per order',
+  maxNumberOfTimesUsedPerOrder: 'Set a maximum number of uses per order',
+  maximumNumberOfDiscounts: 'Maximum discount uses',
+  limitDiscountCount: 'Limit number of times this discount can be used in total',
+  customerCount: "Limit to one use per customer",
+  customerQualification: 'Eligibility',
+  combination: 'Combinations',
+  specifyProductCollection: "Specify Product Collection",
+  combinationLable: "This product discount can be combined with",
+  oncePerOrder: 'Once Per Order',
+  viewVersion: 'View Version',
+  updateTime: 'Update Time',
+  deleteNotice: 'Do you want to delete this record?',
+  notice: 'Notice',
+  comfire: 'Confirm',
+  cancel: 'Cancel',
+  successVal: 'Operation successful',
+  auditDisableNotice: 'Are you sure to disable?',
+  auditEnableNotice: 'Are you sure to enable?',
+  statusList: [{
+    label: "Enable",
+    value: 1
+  }, {
+    label: "Disable",
+    value: 2
+  }],
+  applicationMethodList: [
+    {
+      label: "Discount code",
+      value: 1
+    },
+    {
+      label: "Automatic discount",
+      value: 2
+    },
+  ],
+  minimunPurchaseObj: {
+    noMinimun: "No minimum requirements",
+    minimunAmount: "Minimum purchase amount",
+    minimunQuantity: "Minimum quantity of items",
+  },
+  countries: 'Countries',
+  selectedCountries: 'Selected countries',
+  allCountries: 'All countries',
+  shippingRates: 'Shipping rates',
+  shippingRatesValue: 'Exclude shipping rates over a certain amount',
+  item: "Item",
+  promotions: 'Promotion ',
+  operateTypeList: [
+    {
+      label: 'Created',
+      value: 1
+    },
+    {
+      label: 'Edit',
+      value: 2
+    },
+    {
+      label: 'Delete',
+      value: 3
+    }
+  ],
+  resultStatusList: [
+    {
+      label: 'Success',
+      value: 1
+    },
+    {
+      label: 'Fail',
+      value: 2
+    }
+  ],
+  successful: 'success',
+  fail: 'fail',
+  ruleTypeList: [
+    {
+      label: "Amount Off Order",
+      value: 1
+    },
+    {
+      label: "Amount Off Products",
+      value: 2
+    },
+    {
+      label: "Buy X Get Y",
+      value: 3
+    },
+    {
+      label: "Free Shipping",
+      value: 4
+    },
+    {
+      label: "Multi Buy Discount",
+      value: 5
+    },
+  ],
+  combinationList: [
+    {
+      label: "Product discounts",
+      value: "1"
+    }, {
+      label: "Order discounts",
+      value: "2"
+    }, {
+      label: "Shipping discounts",
+      value: "3"
+    }
+  ],
+  customerQualificationList: [
+    {
+      label: "All customers",
+      value: "1"
+    }, {
+      label: "Specific customer segments",
+      value: "2"
+    }, {
+      label: "Specific customers",
+      value: "3"
+    }
+  ],
+  stackableTypesValue: [
+    {
+      label: "Product Discount",
+      value: "product"
+    }, {
+      label: "Order Discount",
+      value: "order"
+    }, {
+      label: "Shipping Discount",
+      value: "shipping"
+    }
+  ],
   participateTypeArr: [
     {
       label: "Buy and get free",
@@ -593,5 +774,15 @@ export default {
       label: "Defective",
       value: 2
     }
-  ]
+  ],
+  openShippingLabel: "Whether To Enable Shipping Label",
+  useShippingLabel: "Whether To Enable Shipping",
+  sumGiftCardRefundAmount: "Gift Card Refund Amount",
+  sumAiGiftCardRefundAmount: "Purchase Type Gift Card Refund Amount",
+  isSelfPickupOrder: "Whether To Pick Up The Order",
+  sellerDiscount: "Merchant Discounts",
+  platformDiscount: "Platform Discounts",
+  SLFee: "ShippingLabel Shipping",
+  flashPurchase: "Flash Sale",
+  exchangePurchase: "Exchange",
 };

+ 1 - 1
src/lang/es.js

@@ -186,7 +186,7 @@ export default {
     fixedHeader: "Fixed Header",
     sidebarLogo: "Sidebar Logo"
   },
-  shopifyPromotion: {
+  multiBuyDiscount: {
     promotionMessage: "Información promocional",
     targetType: "Tipo de aplicación promocional",
     useType: "Tipo de uso",

+ 10 - 0
src/lang/es/label.js

@@ -0,0 +1,10 @@
+export default {
+  applicationMethod: 'Método de aplicación',
+  minimumPurchaseRequirement: 'Requisito de compra mínima',
+  promotionId: 'Promocione Id',
+  promotionLevel: 'Nivel de promoción',
+  discountValue: "割引内容",
+  version: "Versión",
+  stackableType: "Tipos apilables",
+  setBasicEventInformation: "Establecer información básica del evento",
+}

+ 7 - 3
src/lang/ja.js

@@ -402,7 +402,7 @@ export default {
     fixedHeader: "Fixed Header",
     sidebarLogo: "Sidebar Logo"
   },
-  shopifyPromotion: {
+  multiBuyDiscount: {
     promotionMessage: "プロモーション情報",
     targetType: "プロモーションアプリケーションの種類",
     useType: "使用タイプ",
@@ -417,9 +417,13 @@ export default {
     operator: "オペレーター"
   },
   multipleDiscountInfo: {
-    OriginalDiscount: "元の注文に割引が適用されます",
+    multipleDiscountReCal: "複数の商品 複数の割引の再計算",
+    payMoneny: "注文支払金額",
+    multipleDiscount: "ピースが増えれば、折り目も増える",
+    OriginalDiscount: "初回注文の複数割引に関する情報",
     OriginalMoneny: "元の注文の支払い金額",
-    afterReturnDiscount: "満足のいく割引後の払い戻し",
+    afterReturnDiscount: "返金後の複数商品に対する複数割引に関する情報",
+    afterReturnMoney: "返金後の注文金額",
     returnMoney: "返金金額",
     needPayMoney: "顧客が支払う追加金額",
   }

+ 191 - 2
src/lang/ja/label.js

@@ -258,6 +258,18 @@ export default {
   specificProductsDisplay: "特定の製品の表示",
   regionDetails: "地域の詳細",
   priority: "優先順位",
+  priorityValue: [
+    {
+      label: "高い",
+      value: 1
+    }, {
+      label: "真ん中",
+      value: 2
+    }, {
+      label: "低い",
+      value: 3
+    }
+  ],
   supportSplit: "分割をサポート",
   region: "地域",
   sourceProtection: "ソース保護",
@@ -407,6 +419,7 @@ export default {
   trackCode: "物流追跡プラットフォーム会社コード",
   // 促销相关开始
   promotionName: "プロモーションの名前",
+  promotionEventName: "プロモーション名",
   promotionInfo: "プロモーションの説明",
   promotionStoreName: "販促品店",
   promotionStartTime: "プロモーション開始時刻",
@@ -424,7 +437,140 @@ export default {
   goodsRelation: "商品関係",
   goodsScope: "商品の範囲",
   giftRelation: "景品関係",
-
+  applicationMethod: '応募方法',
+  productCollection: "製品コレクション",
+  all: "一般",
+  itemProduct: 'アイテム',
+  viewVersion: 'バージョンを表示',
+  updateTime: '更新時間',
+  deleteNotice: 'このレコードを削除しますか?',
+  notice: 'ヒント',
+  comfire: '確認する',
+  cancel: 'キャンセル',
+  successVal: '操作は成功しました',
+  auditDisableNotice: '本当に無効にしますか?',
+  auditEnableNotice: '有効にしますか?',
+  promotions: 'プロモーション',
+  operateTypeList: [
+    {
+      label: '追加した',
+      value: 1
+    },
+    {
+      label: '改訂',
+      value: 2
+    },
+    {
+      label: '消去',
+      value: 3
+    }
+  ],
+  resultStatusList: [
+    {
+      label: '成功',
+      value: 1
+    },
+    {
+      label: '失敗',
+      value: 2
+    }
+  ],
+  statusList: [{
+    label: "有効にする",
+    value: 1
+  }, {
+    label: "無効にする",
+    value: 2
+  }],
+  applicationMethodList: [
+    {
+      label: "割引コード",
+      value: 1
+    },
+    {
+      label: "自動割引",
+      value: 2
+    },
+  ],
+  minimumPurchaseRequirement: '最低購入要件',
+  promotionId: 'プロモーションId',
+  promotionLevel: '昇進レベル',
+  discountValue: "割引内容",
+  version: "バージョン",
+  stackableType: "スタッキングタイプ",
+  setBasicEventInformation: "イベント情報を設定する",
+  discount: '割引コード',
+  autoDiscount: "自動昇格",
+  discountSetting: "割引設定",
+  order: "注文",
+  product: "商品",
+  discountStr: '割引',
+  numberStr: "量",
+  money: '額',
+  setProductRange: "セット製品範囲",
+  specifyProductTag: "製品ラベルを指定する",
+  mutiPromotionDetailTitle: "プロモーションの詳細",
+  mutiPromotionUpdateTitle: "複数商品、複数割引プロモーションを編集する",
+  mutiPromotionCreateTitle: "複数アイテムの複数割引プロモーションを設定する",
+  setBasicEventInformationDetail: "活動の基本情報",
+  discountSettingDetail: "割引情報",
+  setProductRangeDetail: "製品ラインナップ",
+  stackableTypes: "スタッキングタイプ",
+  customerPurchaseConditions: "顧客購入条件",
+  customerGetConditions: "顧客獲得条件",
+  productPlaceholder: "商品番号を入力してください。複数の商品番号を入力する場合は、カンマで区切ってください",
+  buyType: '購入タイプ',
+  percentage: 'パーセンテージ',
+  discountPerItem: '1品あたりの割引',
+  discountPromotion: '割引',
+  free: '無料',
+  numberOfTimesUsedPerOrder: '注文あたりの使用回数',
+  maxNumberOfTimesUsedPerOrder: '注文ごとの最大使用回数を設定する',
+  maximumNumberOfDiscounts: '割引の最大数',
+  limitDiscountCount: 'この割引を利用できる合計回数を制限する',
+  customerCount: "1人1回のみ使用可能",
+  customerQualification: '顧客資格',
+  combination: '組み合わせ',
+  specifyProductCollection: "製品コレクションを指定する",
+  item: 'アイテム',
+  noRequirement: '要件なし',
+  combinationLable: "以下の割引と併用可能",
+  combinationList: [
+    {
+      label: "製品割引",
+      value: "1"
+    }, {
+      label: "注文割引",
+      value: "2"
+    }, {
+      label: "配送割引",
+      value: "3"
+    }
+  ],
+  customerQualificationList: [
+    {
+      label: "すべてのお客様",
+      value: "1"
+    }, {
+      label: "特定の顧客セグメント",
+      value: "2"
+    }, {
+      label: "特定の顧客",
+      value: "3"
+    }
+  ],
+  stackableTypesValue: [
+    {
+      label: "製品の割引",
+      value: "product"
+    }, {
+      label: "注文割引",
+      value: "order"
+    }, {
+      label: "送料割引",
+      value: "shipping"
+    }
+  ],
   participateTypeArr: [
     {
       label: "購入して無料で入手",
@@ -588,5 +734,48 @@ export default {
       label: "不良品",
       value: 2
     }
-  ]
+  ],
+  minimunPurchaseObj: {
+    noMinimun: "最低要件なし",
+    minimunAmount: "最低購入金額($)",
+    minimunQuantity: "商品の最小数量",
+  },
+  ruleTypeList: [
+    {
+      label: "製品価格の値下げ",
+      value: 1
+    },
+    {
+      label: "注文価格の値下げ",
+      value: 2
+    },
+    {
+      label: "X を購入して Y をゲット",
+      value: 3
+    },
+    {
+      label: "送料無料",
+      value: 4
+    },
+    {
+      label: "複数のピース、複数のバックル",
+      value: 5
+    },
+  ],
+  oncePerOrder: '注文ごとに1回',
+  openShippingLabel: "shippingLabelを有効にするかどうか",
+  useShippingLabel: "配送を有効にするかどうか",
+  sumGiftCardRefundAmount: "ギフトカードの返金額",
+  sumAiGiftCardRefundAmount: "購入タイプ ギフトカード 返金額",
+  isSelfPickupOrder: "注文品を受け取るかどうか",
+  sellerDiscount: "加盟店割引",
+  platformDiscount: "プラットフォーム割引",
+  SLFee: "配送ラベル配送",
+  flashPurchase: "フラッシュセール",
+  exchangePurchase: "交換",
+  countries: '国',
+  selectedCountries: '特定の国',
+  allCountries: 'すべての国',
+  shippingRates: '貨物',
+  shippingRatesValue: '一定額を超える送料を除外する',
 };

+ 8 - 4
src/lang/zh.js

@@ -503,7 +503,7 @@ export default {
     fixedHeader: "固定 Header",
     sidebarLogo: "侧边栏 Logo"
   },
-  shopifyPromotion: {
+  multiBuyDiscount: {
     promotionMessage: "促销信息",
     targetType: "促销应用类型",
     useType: "使用类型",
@@ -518,10 +518,14 @@ export default {
     operator: "操作人"
   },
   multipleDiscountInfo: {
-    OriginalDiscount: "原单满足折扣",
+    multipleDiscountReCal: "多件多折折扣重算",
+    payMoneny: "订单支付金额",
+    multipleDiscount: "多件多折",
+    OriginalDiscount: "原单多件多折信息",
     OriginalMoneny: "原单支付金额",
-    afterReturnDiscount: "退款后满足折扣",
+    afterReturnDiscount: "退款后多件多折信息",
+    afterReturnMoney: "退款后订单金额",
     returnMoney: "应退款金额",
-    needPayMoney: "顾客额外支付金额",
+    needPayMoney: "顾客需补差价",
   }
 };

+ 189 - 10
src/lang/zh/label.js

@@ -85,12 +85,12 @@ export default {
   returnRefund: "退货退款",
   other: "其他",
 
-  waitSellerAgree:"退款申请,等待卖家确认中",
-  waitBuyerReturnGoods:"退款申请达成,等待买家退货",
-  waitSellerConfirmGoods:"买家已经退货,等待卖家确认收货",
-  sellerRefuseBuyer:"卖家不同意协议,等待买家修改",
-  channelStatusSuccess:"退款成功",
-  channelStatusClosed:"退款关闭",
+  waitSellerAgree: "退款申请,等待卖家确认中",
+  waitBuyerReturnGoods: "退款申请达成,等待买家退货",
+  waitSellerConfirmGoods: "买家已经退货,等待卖家确认收货",
+  sellerRefuseBuyer: "卖家不同意协议,等待买家修改",
+  channelStatusSuccess: "退款成功",
+  channelStatusClosed: "退款关闭",
 
   // refundContentChinese: "退款内容(中文)",
   // refundContentEnglish: "退款内容(English)",
@@ -283,6 +283,19 @@ export default {
   specificProductsDisplay: "特定货品展示",
   regionDetails: "大区明细",
   priority: "优先级",
+  priorityValue: [
+    {
+      label: "高",
+      value: 1
+    }, {
+      label: "中",
+      value: 2
+    }, {
+      label: "低",
+      value: 3
+    }
+  ],
+  stackableType: "可叠加类型",
   supportSplit: "支持拆单",
   region: "大区",
   sourceProtection: "寻源保护",
@@ -457,10 +470,11 @@ export default {
   adjustSku: "调整货品",
   // 促销相关开始
   promotionName: "促销名称",
+  promotionEventName: "促销活动名称",
   promotionInfo: "促销描述",
   promotionStoreName: "促销店铺",
   promotionStartTime: "促销开始时间",
-  promotionEndTime: "促销失效时间",
+  promotionEndTime: "促销结束时间",
   promotionStatus: "促销状态",
   checkBy: "审核人",
   rejectCause: "驳回原因",
@@ -474,7 +488,140 @@ export default {
   goodsRelation: "商品关系",
   goodsScope: "商品范围",
   giftRelation: "赠品关系",
-
+  applicationMethod: '应用方式',
+  productCollection: "商品集合",
+  all: "供",
+  itemProduct: '件商品',
+  applicationMethodList: [
+    {
+      label: "折扣码",
+      value: 1
+    },
+    {
+      label: "自动折扣",
+      value: 2
+    },
+  ],
+  minimumPurchaseRequirement: '最低购买要求',
+  promotionId: '促销id',
+  promotionLevel: '促销级别',
+  discountValue: "折扣内容",
+  version: "版本",
+  setBasicEventInformation: "设置活动基本信息",
+  discountSetting: "折扣设置",
+  setProductRange: "设置商品范围",
+  setBasicEventInformationDetail: "活动基本信息",
+  discountSettingDetail: "折扣信息",
+  setProductRangeDetail: "商品范围",
+  discount: '折扣码',
+  autoDiscount: "自动促销",
+  order: "订单",
+  product: "商品",
+  discountStr: '折扣',
+  numberStr: "数量",
+  money: '金额',
+  item: '件',
+  noRequirement: '无要求',
+  specifyProductTag: "指定商品标签",
+  specifyProductCollection: "指定商品集合",
+  mutiPromotionDetailTitle: "促销活动详情",
+  mutiPromotionCreateTitle: "设置多件多折促销",
+  mutiPromotionUpdateTitle: "编辑多件多折促销",
+  stackableTypes: "可叠加类型",
+  customerPurchaseConditions: "客户购买条件",
+  customerGetConditions: "客户获得条件",
+  productPlaceholder: "请输入款号,多个款号用逗号隔开",
+  buyType: '购买类型',
+  percentage: '百分比',
+  discountPromotion: '折扣额',
+  discountPerItem: '每件金额折扣',
+  numberOfTimesUsedPerOrder: '每个订单使用次数',
+  maxNumberOfTimesUsedPerOrder: '设置每个订单的最大使用次数',
+  maximumNumberOfDiscounts: '最大折扣使用次数',
+  limitDiscountCount: '限制此折扣可使用的总次数',
+  customerCount: "每位客户限使用一次",
+  free: '免费',
+  customerQualification: '客户资格',
+  customerCount: "每位客户限使用一次",
+  combination: '组合',
+  combinationLable: "可与以下折扣组合",
+  viewVersion: '查看版本',
+  updateTime: '更新时间',
+  combinationList: [
+    {
+      label: "产品折扣",
+      value: "1"
+    }, {
+      label: "订单折扣",
+      value: "2"
+    }, {
+      label: "运费折扣",
+      value: "3"
+    }
+  ],
+  deleteNotice: '是否删除该记录',
+  notice: '提示',
+  comfire: '确认',
+  cancel: '取消',
+  successVal: '操作成功',
+  resultStatusList: [
+    {
+      label: '成功',
+      value: 1
+    },
+    {
+      label: '失败',
+      value: 2
+    }
+  ],
+  promotions: '促销',
+  operateTypeList: [
+    {
+      label: '新增',
+      value: 1
+    },
+    {
+      label: '修改',
+      value: 2
+    },
+    {
+      label: '删除',
+      value: 3
+    }
+  ],
+  auditDisableNotice: '确认禁用吗?',
+  auditEnableNotice: '确认启用吗?',
+  statusList: [{
+    label: "启用",
+    value: 1
+  }, {
+    label: "禁用",
+    value: 2
+  }],
+  customerQualificationList: [
+    {
+      label: "全部客户",
+      value: "1"
+    }, {
+      label: "特定客户细分",
+      value: "2"
+    }, {
+      label: "特定客户",
+      value: "3"
+    }
+  ],
+  stackableTypesValue: [
+    {
+      label: "产品折扣",
+      value: "product"
+    }, {
+      label: "订单折扣",
+      value: "order"
+    }, {
+      label: "运费折扣",
+      value: "shipping"
+    }
+  ],
   participateTypeArr: [
     {
       label: "买就送",
@@ -565,7 +712,12 @@ export default {
       value: 2
     }
   ],
-
+  minimunPurchaseObj: {
+    noMinimun: "无最低要求",
+    minimunAmount: "最低购买金额 ($)",
+    minimunQuantity: "最低商品数量",
+  },
+  oncePerOrder: '每个订单一次',
   // 促销赠品
   giftSku: "Sku Code",
   giftNum: "单次赠送数量",
@@ -639,5 +791,32 @@ export default {
       label: "不良品",
       value: 2
     }
-  ]
+  ],
+  ruleTypeList: [
+    {
+      label: "订单降价金额",
+      value: 1
+    },
+    {
+      label: "产品降价金额",
+      value: 2
+    },
+    {
+      label: "买X得Y",
+      value: 3
+    },
+    {
+      label: "免运费",
+      value: 4
+    },
+    {
+      label: "多件多折",
+      value: 5
+    },
+  ],
+  countries: '国家/地区',
+  selectedCountries: '特定国家/地区',
+  allCountries: '所有国家/地区',
+  shippingRates: '运费',
+  shippingRatesValue: '排除超过特定金额的运费',
 };

+ 42 - 17
src/router/modules/promotion.js

@@ -21,30 +21,55 @@ const promotionRouter = {
       name: "virtualGoodsList",
       meta: { title: "virtualGifts" }
     },
-    // {
-    //   path: "bagProduct",
-    //   component: () => import("@/views/oms/promotion/bagProduct/index"),
-    //   name: "bagProduct",
-    //   meta: { title: "福袋商品" }
-    // },
-    // {
-    //   path: "promotion",
-    //   component: () => import("@/views/oms/promotion/promotion/index"),
-    //   name: "promotion",
-    //   meta: { title: "promotionConfig" }
-    // },
     {
       path: "bagProduct",
-      component: () => import("@/views/oms/promotion/promotionLogList/promotionLogList.vue"),
+      component: () => import("@/views/oms/promotion/bagProduct/index"),
       name: "bagProduct",
-      meta: { title: "促销设置日志" }
+      meta: { title: "福袋商品" }
     },
     {
       path: "promotion",
-      component: () =>
-        import("@/views/oms/promotion/shopifyPromotion/index"),
+      component: () => import("@/views/oms/promotion/promotion/index"),
       name: "promotion",
-      meta: { title: "shopifyPromotion" }
+      meta: { title: "promotionConfig" }
+    },
+    {
+      path: "multiBuyDiscount",
+      component: () =>
+        import("@/views/oms/promotion/multiBuyDiscount/index"),
+      name: "multiBuyDiscount",
+      meta: { title: "多件多折促销" }
+    },
+    {
+      path: "buyXGetYList",
+      component: () =>
+        import("@/views/oms/promotion/buyXGetYDiscount/index"),
+      name: "buyXGetYList",
+      meta: { title: "Buy X Get Y" }
+    },
+    {
+      path: "amountOffProducts",
+      component: () => import("@/views/oms/promotion/amountOffProducts/index"),
+      name: "amountOffProducts",
+      meta: { title: "产品降价金额" }
+    },
+    {
+      path: "amountOffOrder",
+      component: () => import("@/views/oms/promotion/amountOffOrder/index"),
+      name: "amountOffOrder",
+      meta: { title: "订单降价金额" }
+    },
+    {
+      path: "freeShipping",
+      component: () => import("@/views/oms/promotion/freeShipping/index"),
+      name: "freeShipping",
+      meta: { title: "运费折扣" }
+    },
+    {
+      path: "promotionLogList",
+      component: () => import("@/views/oms/promotion/promotionLogList/index"),
+      name: "promotionLogList",
+      meta: { title: "促销日志" }
     }
   ]
 };

+ 82 - 64
src/styles/element-ui.scss

@@ -1,82 +1,100 @@
- //覆盖一些element-ui样式
+//覆盖一些element-ui样式
 
- .el-breadcrumb__inner, .el-breadcrumb__inner a{
-  font-weight: 400!important;
+.el-breadcrumb__inner,
+.el-breadcrumb__inner a {
+  font-weight: 400 !important;
 }
 
- .el-upload {
-   input[type="file"] {
-     display: none !important;
-   }
- }
+.el-upload {
+  input[type="file"] {
+    display: none !important;
+  }
+}
 
- .el-upload__input {
-   display: none;
- }
+.el-upload__input {
+  display: none;
+}
 
- .cell {
-   .el-tag {
-     margin-right: 0px;
-   }
- }
+.cell {
+  .el-tag {
+    margin-right: 0px;
+  }
+}
 
- .small-padding {
-   .cell {
-     padding-left: 5px;
-     padding-right: 5px;
-   }
- }
+.small-padding {
+  .cell {
+    padding-left: 5px;
+    padding-right: 5px;
+  }
+}
 
- .fixed-width{
-  .el-button--mini{
+.fixed-width {
+  .el-button--mini {
     padding: 7px 10px;
     width: 60px;
   }
- }
+}
 
- .status-col {
-   .cell {
-     padding: 0 10px;
-     text-align: center;
-     .el-tag {
-       margin-right: 0px;
-     }
-   }
- }
+.status-col {
+  .cell {
+    padding: 0 10px;
+    text-align: center;
+    .el-tag {
+      margin-right: 0px;
+    }
+  }
+}
 
- //暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
- .el-dialog {
-   transform: none;
-   left: 0;
-   position: relative;
-   margin: 0 auto;
- }
+//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
+.el-dialog {
+  transform: none;
+  left: 0;
+  position: relative;
+  margin: 0 auto;
+}
 
- //文章页textarea修改样式
- .article-textarea {
-   textarea {
-     padding-right: 40px;
-     resize: none;
-     border: none;
-     border-radius: 0px;
-     border-bottom: 1px solid #bfcbd9;
-   }
- }
+//文章页textarea修改样式
+.article-textarea {
+  textarea {
+    padding-right: 40px;
+    resize: none;
+    border: none;
+    border-radius: 0px;
+    border-bottom: 1px solid #bfcbd9;
+  }
+}
 
- //element ui upload
- .upload-container {
-   .el-upload {
-     width: 100%;
-     .el-upload-dragger {
-       width: 100%;
-       height: 200px;
-     }
-   }
- }
+//element ui upload
+.upload-container {
+  .el-upload {
+    width: 100%;
+    .el-upload-dragger {
+      width: 100%;
+      height: 200px;
+    }
+  }
+}
 
 //dropdown
- .el-dropdown-menu{
-  a{
-    display: block
+.el-dropdown-menu {
+  a {
+    display: block;
+  }
+}
+.el-dialog__header {
+  padding: 36px 20px 0px 20px;
+  .el-dialog__title {
+    font-size: 18px;
+    font-weight: bold;
+    color: #ae8877;
+    line-height: 22px;
+  }
+}
+.el-dialog__headerbtn {
+  top: 14px;
+  right: 14px;
+  font-weight: bold;
+  .el-icon-close {
+    font-weight: bold;
   }
 }

+ 2 - 1
src/views/oms/order/abnormalList.vue

@@ -418,11 +418,12 @@
 
       <!-- 多件多件信息 -->
       <el-table-column
+        v-has="'priceRule:list'"
         :label="$t('discountInfo')"
         min-width="200"
         align="center"
         prop="discountInfo"
-      ></el-table-column>
+      />
 
       <el-table-column
         :label="$t('sellerDiscount')"

+ 7 - 33
src/views/oms/order/components/discountInfoTab.vue

@@ -5,7 +5,7 @@
       ref="multipleTable"
       v-loading="listLoading"
       key="0"
-      :data="orderGiftCards"
+      :data="datas"
       row-key="id"
       stripe
       border
@@ -14,44 +14,18 @@
       <el-table-column align="center" type="index"> </el-table-column>
 
       <el-table-column
-        :label="$t('multipleDiscountInfo.OriginalDiscount')"
+        :label="$t('discountInfo')"
         width="300"
         align="center"
         prop="payId"
-      >
-      </el-table-column>
+      />
 
       <el-table-column
-        :label="$t('multipleDiscountInfo.OriginalMoneny')"
+        :label="$t('multipleDiscountInfo.payMoneny')"
         width="300"
         align="center"
         prop="authorization"
-      >
-      </el-table-column>
-
-      <el-table-column
-        :label="$t('multipleDiscountInfo.afterReturnDiscount')"
-        width="300"
-        align="center"
-        prop="giftCardAmount"
-      >
-      </el-table-column>
-
-      <el-table-column
-        :label="$t('multipleDiscountInfo.returnMoney')"
-        width="300"
-        align="center"
-        prop="currency"
-      >
-      </el-table-column>
-
-      <el-table-column
-        :label="$t('multipleDiscountInfo.needPayMoney')"
-        width="300"
-        align="center"
-        prop="payMethod"
-      >
-      </el-table-column>
+      />
     </el-table>
   </div>
 </template>
@@ -61,7 +35,7 @@ import row from "element-ui/packages/row";
 import swPage from "@/views/common/swPage.vue";
 
 export default {
-  name: "orderGiftCardsTab",
+  name: "discountInfoTab",
   components: { swPage },
   data() {
     return {
@@ -73,7 +47,7 @@ export default {
       return row;
     }
   },
-  props: ["orderGiftCards"],
+  props: ["datas"],
   methods: {
     retPage() {
       //分页

+ 5 - 11
src/views/oms/order/components/orderInfoDialog.vue

@@ -18,7 +18,7 @@
           accordion
         >
           <el-collapse-item
-            :title="$t('shopifyPromotion.promotionMessage')"
+            :title="$t('multiBuyDiscount.promotionMessage')"
             name="2"
           >
             <div class="ptitle">
@@ -27,7 +27,7 @@
           </el-collapse-item>
         </el-collapse>
         <!-- <div class="item_title">
-          <span>{{ $t("shopifyPromotion.promotionMessage") }}</span>
+          <span>{{ $t("multiBuyDiscount.promotionMessage") }}</span>
         </div>
         <div class="ptitle">
           <promotionInfoTab :orderInfo="orderInfo"></promotionInfoTab>
@@ -149,11 +149,7 @@
         </div> -->
       </div>
       <!-- 多件多折信息 -->
-      <div
-        class="box"
-        style="margin-top: 15px;"
-        v-if="this.orderGiftCards != null"
-      >
+      <div class="box" style="margin-top: 15px;" v-has="'priceRule:list'">
         <el-collapse
           class="collapseContainer"
           v-model="collapse.orderGiftCardsActive"
@@ -161,9 +157,7 @@
         >
           <el-collapse-item :title="$t('discountInfo')" name="2">
             <div class="ptitle">
-              <discountInfoTab
-                :orderGiftCards="orderGiftCards"
-              ></discountInfoTab>
+              <discountInfoTab :datas="orderGiftCards"></discountInfoTab>
             </div>
           </el-collapse-item>
         </el-collapse>
@@ -480,7 +474,7 @@ export default {
   .el-dialog__header {
     padding: 36px 21px 0px 28px;
     .el-dialog__title {
-      font-size: 19px;
+      font-size: 18px;
       font-weight: bold;
       color: #ae8877;
       line-height: 22px;

+ 6 - 1
src/views/oms/order/components/orderItemListTab.vue

@@ -198,7 +198,12 @@
         </template>
       </el-table-column>
       <!-- 多件多折 -->
-      <el-table-column width="55" label="多件多折" align="center">
+      <el-table-column
+        v-has="'priceRule:list'"
+        width="55"
+        :label="$t('multipleDiscountInfo.multipleDiscount')"
+        align="center"
+      >
         <template slot-scope="scope">
           <el-checkbox v-model="scope.row.manyfoldFlag == 1"></el-checkbox>
         </template>

+ 5 - 5
src/views/oms/order/components/promotionInfoTab.vue

@@ -12,10 +12,10 @@
       <el-descriptions-item :label="$t('label.participateType')">{{
         orderInfo.status | statusFilter
       }}</el-descriptions-item>
-      <el-descriptions-item :label="$t('shopifyPromotion.targetType')">{{
+      <el-descriptions-item :label="$t('multiBuyDiscount.targetType')">{{
         orderInfo.ormorder
       }}</el-descriptions-item>
-      <el-descriptions-item :label="$t('shopifyPromotion.useType')">{{
+      <el-descriptions-item :label="$t('multiBuyDiscount.useType')">{{
         orderInfo.orderType | orderTypeFilter
       }}</el-descriptions-item>
     </el-descriptions>
@@ -25,13 +25,13 @@
       :column="4"
       direction="horizontal"
     >
-      <el-descriptions-item :label="$t('shopifyPromotion.priceSet')">{{
+      <el-descriptions-item :label="$t('multiBuyDiscount.priceSet')">{{
         orderInfo.timeplaced
       }}</el-descriptions-item>
-      <el-descriptions-item :label="$t('shopifyPromotion.paySet')">{{
+      <el-descriptions-item :label="$t('multiBuyDiscount.paySet')">{{
         orderInfo.payTime
       }}</el-descriptions-item>
-      <el-descriptions-item :label="$t('shopifyPromotion.amountSet')">{{
+      <el-descriptions-item :label="$t('multiBuyDiscount.amountSet')">{{
         orderInfo.currency
       }}</el-descriptions-item>
     </el-descriptions>

+ 6 - 6
src/views/oms/order/orderList.vue

@@ -440,32 +440,32 @@
       </el-table-column>
       <!-- 多件多件信息 -->
       <el-table-column
+        v-has="'priceRule:list'"
         :label="$t('discountInfo')"
         min-width="200"
         align="center"
         prop="discountInfo"
-      ></el-table-column>
+      />
 
       <el-table-column
         :label="$t('sellerDiscount')"
         min-width="200"
         align="center"
         prop="sellerDiscount"
-      ></el-table-column>
-
+      />
       <el-table-column
         :label="$t('platformDiscount')"
         min-width="200"
         align="center"
         prop="platformDiscount"
-      ></el-table-column>
+      />
 
       <el-table-column
         :label="$t('loanAmount')"
         min-width="200"
         align="center"
         prop="loanAmount"
-      ></el-table-column>
+      />
 
       <el-table-column :label="$t('opt')" align="left" fixed="right" width="50">
         <template slot-scope="scope">
@@ -850,7 +850,7 @@ export default {
 <style>
 .orderDetailDialog .el-dialog__title {
   font-size: 14px;
-  font-weight:bold;
+  font-weight: bold;
   color: #ae8877;
   line-height: 22px;
 }

+ 1 - 0
src/views/oms/order/orderProcess.vue

@@ -448,6 +448,7 @@
       </el-table-column>
       <!-- 多件多件信息 -->
       <el-table-column
+        v-has="'priceRule:list'"
         :label="$t('discountInfo')"
         min-width="200"
         align="center"

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

@@ -0,0 +1,214 @@
+<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>

+ 425 - 0
src/views/oms/promotion/amountOffOrder/index.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="app-container">
+    <el-container>
+      <el-main>
+        <div class="filter-container">
+          <el-input
+            :placeholder="$t('label.promotionName')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.promotionName"
+            @keyup.enter.native="retPage"
+          />
+          <el-input
+            :placeholder="$t('label.minimumPurchaseRequirement')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.minimumPurchaseRequirement"
+            @keyup.enter.native="retPage"
+          />
+          <el-select
+            v-model="listQuery.applicationMethod"
+            clearable
+            class="filter-item"
+            style="width: 200px;"
+            :placeholder="$t('label.applicationMethod')"
+            @keyup.enter.native="retPage"
+          >
+            <el-option
+              :key="index"
+              v-for="(item, index) in storeList"
+              :label="item.storeName"
+              :value="item.storeId"
+            />
+          </el-select>
+          <el-button
+            v-waves
+            v-has="'promotion:list'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-search"
+            @click="retPage"
+            >{{ $t("view.search") }}
+          </el-button>
+        </div>
+        <el-table
+          v-loading="listLoading"
+          :key="tableKey"
+          :data="list"
+          stripe
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+        >
+          <el-table-column type="index" width="40"></el-table-column>
+
+          <el-table-column
+            :label="$t('label.promotionEventName')"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionId')"
+            align="center"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionInfo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.participateType')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.participateTypeArr").find(
+                  item => item.value === row.participateType
+                )
+                  ? $t("label.participateTypeArr").find(
+                      item => item.value === row.participateType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionLevel')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.applicationMethod')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateNum }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.minimumPurchaseRequirement')"
+            align="center"
+            width="160"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            :label="$t('label.discountValue')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.conditionTypeArr").find(
+                  item => item.value === row.conditionType
+                )
+                  ? $t("label.conditionTypeArr").find(
+                      item => item.value === row.conditionType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.priority')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.stackableType')"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionStartTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionEndTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionEndTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.version')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.operation')"
+            min-width="180"
+            align="center"
+            fixed="right"
+          >
+            <template v-slot="{ row }">
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.edit')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:update'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-edit"
+                  circle
+                  @click="showDialog(row.id, false)"
+                >
+                </el-button>
+              </el-tooltip> -->
+
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.details')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:list'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-more"
+                  circle
+                  @click="showDialog(row.id, true)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.delete')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:delete'"
+                  type="danger"
+                  circle
+                  size="mini"
+                  icon="el-icon-delete"
+                  @click="handleDelete(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('label.version')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:status'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('title.operationLog')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotionLog:list'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <swPage
+          v-if="total > 0"
+          key="2"
+          :listQuery="listQuery"
+          :total="total"
+          pos="btmRight"
+          @retPage="getList"
+        />
+      </el-main>
+    </el-container>
+
+    <promotion-form ref="promotionFormRef" @refresh-table="getList" />
+    <promotion-log-list ref="logListRef" @show="id => showDialog(id, true)" />
+  </div>
+</template>
+
+<script>
+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/amountOffOrder/promotionLogList.vue";
+import {
+  fetchList,
+  deleteById,
+  storeList,
+  checkPromotion,
+  changeStatus
+} from "@/api/oms/order/promotion";
+import { getToken } from "@/utils/auth";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    SwPage,
+    ElContainer,
+    PromotionForm,
+    PromotionLogList
+  },
+  name: "multiBuyDiscount",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      activeName: "productIndex",
+      iconSize: "mini",
+      //右侧列表
+      tableKey: 0,
+      list: null,
+      total: null,
+      listLoading: false,
+      listQuery: {
+        applicationMethod: null,
+        promotionName: null,
+        minimumPurchaseRequirement: null,
+        page: 1,
+        limit: 10
+      },
+      storeList: []
+    };
+  },
+  created() {
+    this.getList();
+    this.getStoreList();
+  },
+  computed: {
+    headers: function() {
+      return { "X-Token": getToken() };
+    }
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    getList() {
+      this.listLoading = true;
+      fetchList(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            this.total = response.data.total;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    retPage() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+    handleDelete(id) {
+      this.$confirm("是否删除该记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        deleteById(id).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: "操作成功",
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    showDialog(id, edit) {
+      this.$refs.promotionFormRef.showDialog(id, edit);
+    },
+    handleDetail(id) {
+      console.log(id, "detail");
+    },
+    // changePromotionStatus(id, status) {
+    //   this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning"
+    //   }).then(() => {
+    //     changeStatus(id).then(res => {
+    //       if (res.code === 200) {
+    //         this.$message({
+    //           message: "操作成功",
+    //           type: "success"
+    //         });
+    //         this.getList();
+    //       }
+    //     });
+    //   });
+    // },
+    handleLog(id) {
+      this.$refs.logListRef.handleOpen(id);
+    }
+  }
+};
+</script>
+
+<style scoped></style>

+ 556 - 0
src/views/oms/promotion/amountOffOrder/promotionForm copy.vue

@@ -0,0 +1,556 @@
+<template>
+  <el-dialog
+    v-loading="pageLoad"
+    element-loading-text="loading..."
+    :title="title"
+    top="0"
+    width="100%"
+    lock-scroll
+    custom-class="promotionform"
+    :close-on-click-modal="false"
+    :visible.sync="promotionFormVisible"
+    @open="handleOpenDialog"
+    @close="resetData"
+  >
+    <div class="dialog-body">
+      <el-form
+        ref="promotionFormRef"
+        :rules="baseRule"
+        :model="promotion"
+        label-width="auto"
+        size="medium"
+      >
+        <!-- 设置活动基本信息 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.setBasicEventInformation") }}</span>
+          </div>
+          <div class="info">
+            <!--促销名称-->
+            <el-form-item
+              :label="$t('label.promotionName') + ':'"
+              prop="promotionName"
+              style="width:418px"
+              required
+            >
+              <el-input
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              ></el-input>
+            </el-form-item>
+            <div class="item">
+              <!--促销开始时间-->
+              <el-form-item
+                :label="$t('label.promotionStartTime') + ':'"
+                prop="promotionStartTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionStartTime"
+                ></el-date-picker>
+              </el-form-item>
+
+              <!--促销失效时间-->
+              <el-form-item
+                :label="$t('label.promotionEndTime') + ':'"
+                prop="promotionEndTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionEndTime"
+                ></el-date-picker>
+              </el-form-item>
+            </div>
+            <!--应用方式-->
+            <el-form-item
+              :label="$t('label.applicationMethod') + ':'"
+              prop="mutual"
+              required
+            >
+              <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                <div class="item row">
+                  <el-radio :label="true">{{ $t("label.discount") }}</el-radio>
+                  <el-input
+                    class="codeinput"
+                    v-model.trim="promotion.promotionName"
+                    :disabled="edit"
+                  />
+                  <el-radio :label="false">{{
+                    $t("label.autoDiscount")
+                  }}</el-radio>
+                </div>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+        </div>
+        <!-- 折扣设置 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.discountSetting") }}</span>
+          </div>
+          <div class="info">
+            <div class="item">
+              <!--最低购买要求-->
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.promotionLevel') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio :label="true">{{ $t("label.order") }}</el-radio>
+                  <el-radio :label="false">{{ $t("label.product") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <div class="item">
+              <!--折扣内容-->
+              <el-form-item
+                :label="$t('label.discountValue') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.priority') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio
+                    v-for="(item, i) in $t('label.priorityValue')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <!--可叠加类型-->
+            <el-form-item
+              :label="$t('label.stackableTypes') + ':'"
+              prop="stackableType"
+              required
+            >
+              <el-checkbox-group
+                v-model="promotion.stackableType"
+                :disabled="edit"
+              >
+                <el-checkbox
+                  v-for="(item, i) in $t('label.stackableTypesValue')"
+                  :key="i"
+                  :label="item.value"
+                  >{{ item.label }}</el-checkbox
+                >
+              </el-checkbox-group>
+            </el-form-item>
+          </div>
+        </div>
+
+        <!-- 设置商品范围 -->
+        <div class="box productbox">
+          <div class="title">
+            <span>{{ $t("label.setProductRange") }}</span>
+          </div>
+          <div class="info">
+            <!-- 指定商品标签 -->
+            <el-form-item
+              :label="$t('label.product') + ':'"
+              prop="participateType"
+              required
+            >
+              <el-select
+                multiple
+                v-model="promotion.participateType"
+                @change="handleChangeParticipateType"
+                :disabled="edit"
+              >
+                <el-option
+                  :key="index"
+                  v-for="(item, index) in $t('label.participateTypeArr')"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              :label="$t('label.specifyProductTag') + ':'"
+              prop="mutual"
+            >
+              <el-input
+                class="mininput"
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              />
+              <div class="skucon">
+                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
+              </div>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+    </div>
+
+    <template slot="footer">
+      <el-button
+        @click="
+          resetData();
+          promotionFormVisible = false;
+        "
+        >{{ $t("view.cancel") }}
+      </el-button>
+      <!-- 未审核时/审核驳回 状态可进行提交 -->
+      <el-button
+        type="primary"
+        @click="handleSaveOrUpdate"
+        v-if="promotion.promotionStatus !== 1"
+        :disabled="edit"
+        >{{ $t("view.confirm") }}
+      </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import promotion from "@/views/oms/promotion/multiBuyDiscount/index.vue";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  components: {},
+  computed: {},
+  name: "multiBuyDiscountForm",
+  filters: {},
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      promotion: {
+        // 配置基本信息
+        id: "",
+        promotionName: "",
+        stackableType: [],
+        promotionInfo: "",
+        promotionStore: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: 1,
+        mutual: "",
+        isSuperposition: "",
+        participateWeight: 0,
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: ""
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      baseRule: {
+        // 促销配置
+        promotionName: [
+          {
+            required: true,
+            message: "请输入促销名称",
+            trigger: ["change", "blur"]
+          },
+          {
+            min: 2,
+            max: 50,
+            message: "长度在 2 到 50 个字符",
+            trigger: ["change", "blur"]
+          }
+        ]
+      },
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  mounted() {},
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+      }
+      this.title = id
+        ? i18n.t("title.updateTitle")
+        : i18n.t("title.createTitle");
+      this.promotionFormVisible = true;
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionInfo: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: "",
+        mutual: "",
+        participateWeight: "",
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: "",
+        stackableType: []
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+  }
+  .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: 80vh;
+  overflow: auto;
+  .box {
+    border-bottom: 1px solid #d8d8d8;
+    padding-bottom: 20px;
+    margin-bottom: 42px;
+    .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;
+  //   }
+  // }
+  .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;
+  }
+  .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;
+        .el-input__inner {
+          width: 142px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 760 - 0
src/views/oms/promotion/amountOffOrder/promotionForm.vue

@@ -0,0 +1,760 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="pageLoad"
+      element-loading-text="loading..."
+      :title="title"
+      top="0"
+      width="100%"
+      lock-scroll
+      custom-class="promotionform"
+      :close-on-click-modal="false"
+      :visible.sync="promotionFormVisible"
+      @open="handleOpenDialog"
+      @close="resetData"
+    >
+      <div class="dialog-body">
+        <el-form
+          ref="promotionFormRef"
+          :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.promotionName"
+                  :disabled="edit"
+                ></el-input>
+              </el-form-item>
+              <div class="item row">
+                <!--促销开始时间-->
+                <el-form-item
+                  :label="$t('label.promotionStartTime') + ':'"
+                  prop="promotionStartTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionStartTime"
+                  ></el-date-picker>
+                </el-form-item>
+
+                <!--促销失效时间-->
+                <el-form-item
+                  :label="$t('label.promotionEndTime') + ':'"
+                  prop="promotionEndTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionEndTime"
+                  ></el-date-picker>
+                </el-form-item>
+              </div>
+              <!--应用方式-->
+              <el-form-item
+                :label="$t('label.applicationMethod') + ':'"
+                prop="type"
+              >
+                <el-radio-group v-model="promotion.type" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.discount") }}</el-radio>
+                    <el-input
+                      class="codeinput"
+                      v-model.trim="promotion.promotionName"
+                      :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.discountValue") }}</span>
+            </div>
+            <div class="info">
+              <!--折扣内容 数量&金额-->
+              <el-form-item :label="$t('label.discountValue') + ':'">
+                <div class="item row">
+                  <el-input
+                    class="mininput"
+                    v-model.trim="promotion.minimumMoney"
+                    :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> -->
+              </el-form-item>
+              <!--折扣内容 商品-->
+              <!-- <el-form-item :label="$t('label.product') + ':'">
+                <div class="item product">
+                  <div class="item-box">
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.productType"
+                      :disabled="edit"
+                    />
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                  </div>
+                </div>
+              </el-form-item> -->
+            </div>
+            <!-- 最低购买要求 -->
+            <div class="title">
+              <span>{{ $t("label.minimumPurchaseRequirement") }}</span>
+            </div>
+            <div class="info info-mini">
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="minimumPurchaseRequirement"
+              >
+                <el-radio-group
+                  v-model="promotion.minimumPurchaseRequirement"
+                  :disabled="edit"
+                >
+                  <el-radio label="1">{{
+                    $t("label.minimunPurchaseObj.noMinimun")
+                  }}</el-radio>
+
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.minimunPurchaseObj.minimunAmount")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="3">{{
+                      $t("label.minimunPurchaseObj.minimunQuantity")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '3'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </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.minimumMoney"
+                    :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 ProductList"
+                        :class="productKeys.includes(item) ? 'active' : ''"
+                        :key="i"
+                        >{{ item }},</span
+                      >
+                    </div>
+                  </div>
+                </div>
+              </el-form-item>
+              <el-form-item
+                :label="$t('label.discountPromotion') + ':'"
+                prop="discount"
+                class="discount"
+              >
+                <el-radio-group v-model="promotion.discount" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.percentage") }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '1'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.discountPerItem")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <el-radio label="3">{{ $t("label.free") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div> -->
+            <!-- 每个订单使用次数 -->
+            <!-- <div class="title">
+              <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.maxNumberOfTimesUsedPerOrder")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+              </el-form-item>
+            </div> -->
+          </div>
+          <!-- 客户资格  折扣码才有-->
+          <div class="box" v-if="promotion.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.customerQualification") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item prop="customerQualification" required>
+                <el-radio-group
+                  class="customerqualification"
+                  v-model="promotion.customerQualification"
+                  :disabled="edit"
+                >
+                  <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.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.limitDiscountCount")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.customerCount")
+                  }}</el-checkbox>
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 组合 自动折扣才有 -->
+          <div class="box" v-if="promotion.type === '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>
+        </el-form>
+      </div>
+
+      <template slot="footer">
+        <el-button
+          @click="
+            resetData();
+            promotionFormVisible = false;
+          "
+          >{{ $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>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import productCollection from "@/views/oms/promotion/amountOffOrder/components/productCollectionDetail";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  name: "multiBuyDiscountForm",
+  components: {
+    productCollection
+  },
+  computed: {
+    checked() {
+      return !!this.promotion.number;
+    }
+  },
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      productSku: "",
+      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",
+        discountValue: "1",
+        purchaseType: "",
+        productType: "",
+        discount: "",
+        number: 1,
+        combination: [],
+        minimumPurchaseRequirement: "1",
+        oncePerOrder: 1
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+        this.title = this.edit
+          ? i18n.t("label.mutiPromotionDetailTitle")
+          : i18n.t("label.mutiPromotionUpdateTitle");
+      } else {
+        this.title = i18n.t("label.mutiPromotionCreateTitle");
+      }
+      this.promotionFormVisible = true;
+    },
+    // 款号搜索
+    handleProductSearch() {
+      this.productKeys = this.productSku.split(",");
+    },
+    handleProductDialog(id) {
+      this.$refs.productCollectionRef.showDialog(id);
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        type: 1,
+        promotionStatus: "",
+        rejectCause: "",
+        priority: "",
+        participateType: "",
+        conditionType: "",
+        stackableType: [],
+        minimum: "1"
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+    font-size: 12px;
+  }
+  .el-dialog__body {
+    padding: 30px 10px 30px 34px;
+  }
+  .el-dialog__headerbtn {
+    top: 14px;
+    right: 14px;
+    font-weight: bold;
+    .el-icon-close {
+      font-weight: bold;
+    }
+  }
+  .el-input {
+    width: 220px !important;
+  }
+}
+</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%;
+      }
+    }
+    &.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;
+      }
+    }
+  }
+  // /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;
+  }
+  .info {
+    &.info-mini {
+      .item {
+        margin-top: 20px;
+      }
+    }
+    .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: 142px !important;
+      }
+      .checkboxinput {
+        margin-left: 20px;
+      }
+      .productinput {
+        width: 340px !important;
+      }
+      .label {
+        margin-right: 12px;
+      }
+      &.product {
+        .mininput {
+          margin-right: 20px;
+        }
+        .collectioninput {
+          margin-right: 20px;
+          /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;
+          }
+        }
+      }
+    }
+    .discount {
+      .item {
+        margin-bottom: 20px;
+        /deep/.el-radio {
+          min-width: 135px;
+        }
+      }
+    }
+    .customerqualification {
+      .el-radio {
+        display: block;
+        margin-bottom: 30px;
+      }
+    }
+  }
+}
+</style>

+ 91 - 0
src/views/oms/promotion/amountOffOrder/promotionLogList.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <el-dialog append-to-body width="355px" :visible.sync="dialogFormVisible">
+      <div class="box">
+        <p>
+          <a href="javascript:void(0)" @click="handleDetail"> 查看版本V2</a>
+          更新时间 2025-01-24
+        </p>
+      </div>
+      <template slot="footer">
+        <el-button @click="dialogFormVisible = false"
+          >{{ $t("tagsView.close") }}
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import ElContainer from "element-ui/packages/container/src/main";
+import { promotionLogs } from "@/api/oms/order/promotion";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    ElContainer
+  },
+  name: "promotionLogList",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      dialogFormVisible: false,
+      list: [],
+      listLoading: false,
+      listQuery: {}
+    };
+  },
+  created() {},
+  computed: {},
+  methods: {
+    handleOpen(id) {
+      this.listQuery.promotionId = id;
+      this.dialogFormVisible = true;
+      this.retPage();
+    },
+    getList() {
+      this.listLoading = true;
+      promotionLogs(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    handleDetail(t) {
+      let id = this.listQuery.promotionId;
+      this.$emit("show", id);
+    },
+    retPage() {
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.box {
+  max-height: 350px;
+  overflow-y: auto;
+  p {
+    margin-left: 23px;
+    color: #9f9f9f;
+    line-height: 24px;
+    a {
+      color: #ae8877;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

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

@@ -0,0 +1,214 @@
+<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>

+ 425 - 0
src/views/oms/promotion/amountOffProducts/index.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="app-container">
+    <el-container>
+      <el-main>
+        <div class="filter-container">
+          <el-input
+            :placeholder="$t('label.promotionName')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.promotionName"
+            @keyup.enter.native="retPage"
+          />
+          <el-input
+            :placeholder="$t('label.minimumPurchaseRequirement')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.minimumPurchaseRequirement"
+            @keyup.enter.native="retPage"
+          />
+          <el-select
+            v-model="listQuery.applicationMethod"
+            clearable
+            class="filter-item"
+            style="width: 200px;"
+            :placeholder="$t('label.applicationMethod')"
+            @keyup.enter.native="retPage"
+          >
+            <el-option
+              :key="index"
+              v-for="(item, index) in storeList"
+              :label="item.storeName"
+              :value="item.storeId"
+            />
+          </el-select>
+          <el-button
+            v-waves
+            v-has="'promotion:list'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-search"
+            @click="retPage"
+            >{{ $t("view.search") }}
+          </el-button>
+        </div>
+        <el-table
+          v-loading="listLoading"
+          :key="tableKey"
+          :data="list"
+          stripe
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+        >
+          <el-table-column type="index" width="40"></el-table-column>
+
+          <el-table-column
+            :label="$t('label.promotionEventName')"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionId')"
+            align="center"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionInfo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.participateType')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.participateTypeArr").find(
+                  item => item.value === row.participateType
+                )
+                  ? $t("label.participateTypeArr").find(
+                      item => item.value === row.participateType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionLevel')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.applicationMethod')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateNum }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.minimumPurchaseRequirement')"
+            align="center"
+            width="160"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            :label="$t('label.discountValue')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.conditionTypeArr").find(
+                  item => item.value === row.conditionType
+                )
+                  ? $t("label.conditionTypeArr").find(
+                      item => item.value === row.conditionType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.priority')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.stackableType')"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionStartTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionEndTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionEndTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.version')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.operation')"
+            min-width="180"
+            align="center"
+            fixed="right"
+          >
+            <template v-slot="{ row }">
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.edit')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:update'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-edit"
+                  circle
+                  @click="showDialog(row.id, false)"
+                >
+                </el-button>
+              </el-tooltip> -->
+
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.details')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:list'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-more"
+                  circle
+                  @click="showDialog(row.id, true)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.delete')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:delete'"
+                  type="danger"
+                  circle
+                  size="mini"
+                  icon="el-icon-delete"
+                  @click="handleDelete(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('label.version')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:status'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('title.operationLog')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotionLog:list'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <swPage
+          v-if="total > 0"
+          key="2"
+          :listQuery="listQuery"
+          :total="total"
+          pos="btmRight"
+          @retPage="getList"
+        />
+      </el-main>
+    </el-container>
+
+    <promotion-form ref="promotionFormRef" @refresh-table="getList" />
+    <promotion-log-list ref="logListRef" @show="id => showDialog(id, true)" />
+  </div>
+</template>
+
+<script>
+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/amountOffProducts/promotionLogList.vue";
+import {
+  fetchList,
+  deleteById,
+  storeList,
+  checkPromotion,
+  changeStatus
+} from "@/api/oms/order/promotion";
+import { getToken } from "@/utils/auth";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    SwPage,
+    ElContainer,
+    PromotionForm,
+    PromotionLogList
+  },
+  name: "multiBuyDiscount",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      activeName: "productIndex",
+      iconSize: "mini",
+      //右侧列表
+      tableKey: 0,
+      list: null,
+      total: null,
+      listLoading: false,
+      listQuery: {
+        applicationMethod: null,
+        promotionName: null,
+        minimumPurchaseRequirement: null,
+        page: 1,
+        limit: 10
+      },
+      storeList: []
+    };
+  },
+  created() {
+    this.getList();
+    this.getStoreList();
+  },
+  computed: {
+    headers: function() {
+      return { "X-Token": getToken() };
+    }
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    getList() {
+      this.listLoading = true;
+      fetchList(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            this.total = response.data.total;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    retPage() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+    handleDelete(id) {
+      this.$confirm("是否删除该记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        deleteById(id).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: "操作成功",
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    showDialog(id, edit) {
+      this.$refs.promotionFormRef.showDialog(id, edit);
+    },
+    handleDetail(id) {
+      console.log(id, "detail");
+    },
+    // changePromotionStatus(id, status) {
+    //   this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning"
+    //   }).then(() => {
+    //     changeStatus(id).then(res => {
+    //       if (res.code === 200) {
+    //         this.$message({
+    //           message: "操作成功",
+    //           type: "success"
+    //         });
+    //         this.getList();
+    //       }
+    //     });
+    //   });
+    // },
+    handleLog(id) {
+      this.$refs.logListRef.handleOpen(id);
+    }
+  }
+};
+</script>
+
+<style scoped></style>

+ 556 - 0
src/views/oms/promotion/amountOffProducts/promotionForm copy.vue

@@ -0,0 +1,556 @@
+<template>
+  <el-dialog
+    v-loading="pageLoad"
+    element-loading-text="loading..."
+    :title="title"
+    top="0"
+    width="100%"
+    lock-scroll
+    custom-class="promotionform"
+    :close-on-click-modal="false"
+    :visible.sync="promotionFormVisible"
+    @open="handleOpenDialog"
+    @close="resetData"
+  >
+    <div class="dialog-body">
+      <el-form
+        ref="promotionFormRef"
+        :rules="baseRule"
+        :model="promotion"
+        label-width="auto"
+        size="medium"
+      >
+        <!-- 设置活动基本信息 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.setBasicEventInformation") }}</span>
+          </div>
+          <div class="info">
+            <!--促销名称-->
+            <el-form-item
+              :label="$t('label.promotionName') + ':'"
+              prop="promotionName"
+              style="width:418px"
+              required
+            >
+              <el-input
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              ></el-input>
+            </el-form-item>
+            <div class="item">
+              <!--促销开始时间-->
+              <el-form-item
+                :label="$t('label.promotionStartTime') + ':'"
+                prop="promotionStartTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionStartTime"
+                ></el-date-picker>
+              </el-form-item>
+
+              <!--促销失效时间-->
+              <el-form-item
+                :label="$t('label.promotionEndTime') + ':'"
+                prop="promotionEndTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionEndTime"
+                ></el-date-picker>
+              </el-form-item>
+            </div>
+            <!--应用方式-->
+            <el-form-item
+              :label="$t('label.applicationMethod') + ':'"
+              prop="mutual"
+              required
+            >
+              <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                <div class="item row">
+                  <el-radio :label="true">{{ $t("label.discount") }}</el-radio>
+                  <el-input
+                    class="codeinput"
+                    v-model.trim="promotion.promotionName"
+                    :disabled="edit"
+                  />
+                  <el-radio :label="false">{{
+                    $t("label.autoDiscount")
+                  }}</el-radio>
+                </div>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+        </div>
+        <!-- 折扣设置 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.discountSetting") }}</span>
+          </div>
+          <div class="info">
+            <div class="item">
+              <!--最低购买要求-->
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.promotionLevel') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio :label="true">{{ $t("label.order") }}</el-radio>
+                  <el-radio :label="false">{{ $t("label.product") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <div class="item">
+              <!--折扣内容-->
+              <el-form-item
+                :label="$t('label.discountValue') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.priority') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio
+                    v-for="(item, i) in $t('label.priorityValue')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <!--可叠加类型-->
+            <el-form-item
+              :label="$t('label.stackableTypes') + ':'"
+              prop="stackableType"
+              required
+            >
+              <el-checkbox-group
+                v-model="promotion.stackableType"
+                :disabled="edit"
+              >
+                <el-checkbox
+                  v-for="(item, i) in $t('label.stackableTypesValue')"
+                  :key="i"
+                  :label="item.value"
+                  >{{ item.label }}</el-checkbox
+                >
+              </el-checkbox-group>
+            </el-form-item>
+          </div>
+        </div>
+
+        <!-- 设置商品范围 -->
+        <div class="box productbox">
+          <div class="title">
+            <span>{{ $t("label.setProductRange") }}</span>
+          </div>
+          <div class="info">
+            <!-- 指定商品标签 -->
+            <el-form-item
+              :label="$t('label.product') + ':'"
+              prop="participateType"
+              required
+            >
+              <el-select
+                multiple
+                v-model="promotion.participateType"
+                @change="handleChangeParticipateType"
+                :disabled="edit"
+              >
+                <el-option
+                  :key="index"
+                  v-for="(item, index) in $t('label.participateTypeArr')"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              :label="$t('label.specifyProductTag') + ':'"
+              prop="mutual"
+            >
+              <el-input
+                class="mininput"
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              />
+              <div class="skucon">
+                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
+              </div>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+    </div>
+
+    <template slot="footer">
+      <el-button
+        @click="
+          resetData();
+          promotionFormVisible = false;
+        "
+        >{{ $t("view.cancel") }}
+      </el-button>
+      <!-- 未审核时/审核驳回 状态可进行提交 -->
+      <el-button
+        type="primary"
+        @click="handleSaveOrUpdate"
+        v-if="promotion.promotionStatus !== 1"
+        :disabled="edit"
+        >{{ $t("view.confirm") }}
+      </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import promotion from "@/views/oms/promotion/multiBuyDiscount/index.vue";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  components: {},
+  computed: {},
+  name: "multiBuyDiscountForm",
+  filters: {},
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      promotion: {
+        // 配置基本信息
+        id: "",
+        promotionName: "",
+        stackableType: [],
+        promotionInfo: "",
+        promotionStore: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: 1,
+        mutual: "",
+        isSuperposition: "",
+        participateWeight: 0,
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: ""
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      baseRule: {
+        // 促销配置
+        promotionName: [
+          {
+            required: true,
+            message: "请输入促销名称",
+            trigger: ["change", "blur"]
+          },
+          {
+            min: 2,
+            max: 50,
+            message: "长度在 2 到 50 个字符",
+            trigger: ["change", "blur"]
+          }
+        ]
+      },
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  mounted() {},
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+      }
+      this.title = id
+        ? i18n.t("title.updateTitle")
+        : i18n.t("title.createTitle");
+      this.promotionFormVisible = true;
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionInfo: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: "",
+        mutual: "",
+        participateWeight: "",
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: "",
+        stackableType: []
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+  }
+  .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: 80vh;
+  overflow: auto;
+  .box {
+    border-bottom: 1px solid #d8d8d8;
+    padding-bottom: 20px;
+    margin-bottom: 42px;
+    .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;
+  //   }
+  // }
+  .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;
+  }
+  .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;
+        .el-input__inner {
+          width: 142px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 770 - 0
src/views/oms/promotion/amountOffProducts/promotionForm.vue

@@ -0,0 +1,770 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="pageLoad"
+      element-loading-text="loading..."
+      :title="title"
+      top="0"
+      width="100%"
+      lock-scroll
+      custom-class="promotionform"
+      :close-on-click-modal="false"
+      :visible.sync="promotionFormVisible"
+      @open="handleOpenDialog"
+      @close="resetData"
+    >
+      <div class="dialog-body">
+        <el-form
+          ref="promotionFormRef"
+          :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.promotionName"
+                  :disabled="edit"
+                ></el-input>
+              </el-form-item>
+              <div class="item row">
+                <!--促销开始时间-->
+                <el-form-item
+                  :label="$t('label.promotionStartTime') + ':'"
+                  prop="promotionStartTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionStartTime"
+                  ></el-date-picker>
+                </el-form-item>
+
+                <!--促销失效时间-->
+                <el-form-item
+                  :label="$t('label.promotionEndTime') + ':'"
+                  prop="promotionEndTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionEndTime"
+                  ></el-date-picker>
+                </el-form-item>
+              </div>
+              <!--应用方式-->
+              <el-form-item
+                :label="$t('label.applicationMethod') + ':'"
+                prop="type"
+              >
+                <el-radio-group v-model="promotion.type" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.discount") }}</el-radio>
+                    <el-input
+                      class="codeinput"
+                      v-model.trim="promotion.promotionName"
+                      :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.discountValue") }}</span>
+            </div>
+            <div class="info">
+              <!--折扣内容 数量&金额-->
+              <el-form-item :label="$t('label.discountValue') + ':'">
+                <div class="item row">
+                  <el-input
+                    class="mininput"
+                    v-model.trim="promotion.minimumMoney"
+                    :disabled="edit"
+                  />
+                  <el-checkbox
+                    v-model="promotion.oncePerOrder"
+                    :disabled="edit"
+                    >{{ $t("label.oncePerOrder") }}</el-checkbox
+                  >
+                </div>
+                <!-- <div class="item-box">
+                    <span class="label">{{ $t("label.buyType") }}</span>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.purchaseType"
+                      :disabled="edit"
+                    />
+                  </div> -->
+              </el-form-item>
+              <!--折扣内容 商品-->
+              <el-form-item :label="$t('label.product') + ':'">
+                <div class="item product">
+                  <div class="item-box">
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.productType"
+                      :disabled="edit"
+                    />
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                  </div>
+                </div>
+              </el-form-item>
+            </div>
+            <!-- 最低购买要求 -->
+            <div class="title">
+              <span>{{ $t("label.minimumPurchaseRequirement") }}</span>
+            </div>
+            <div class="info info-mini">
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="minimumPurchaseRequirement"
+              >
+                <el-radio-group
+                  v-model="promotion.minimumPurchaseRequirement"
+                  :disabled="edit"
+                >
+                  <el-radio label="1">{{
+                    $t("label.minimunPurchaseObj.noMinimun")
+                  }}</el-radio>
+
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.minimunPurchaseObj.minimunAmount")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="3">{{
+                      $t("label.minimunPurchaseObj.minimunQuantity")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '3'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </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.minimumMoney"
+                    :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 ProductList"
+                        :class="productKeys.includes(item) ? 'active' : ''"
+                        :key="i"
+                        >{{ item }},</span
+                      >
+                    </div>
+                  </div>
+                </div>
+              </el-form-item>
+              <el-form-item
+                :label="$t('label.discountPromotion') + ':'"
+                prop="discount"
+                class="discount"
+              >
+                <el-radio-group v-model="promotion.discount" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.percentage") }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '1'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.discountPerItem")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <el-radio label="3">{{ $t("label.free") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div> -->
+            <!-- 每个订单使用次数 -->
+            <!-- <div class="title">
+              <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.maxNumberOfTimesUsedPerOrder")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+              </el-form-item>
+            </div> -->
+          </div>
+          <!-- 客户资格  折扣码才有-->
+          <div class="box" v-if="promotion.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.customerQualification") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item prop="customerQualification" required>
+                <el-radio-group
+                  class="customerqualification"
+                  v-model="promotion.customerQualification"
+                  :disabled="edit"
+                >
+                  <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.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.limitDiscountCount")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.customerCount")
+                  }}</el-checkbox>
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 组合 自动折扣才有 -->
+          <div class="box" v-if="promotion.type === '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>
+        </el-form>
+      </div>
+
+      <template slot="footer">
+        <el-button
+          @click="
+            resetData();
+            promotionFormVisible = false;
+          "
+          >{{ $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>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import productCollection from "@/views/oms/promotion/buyXGetYDiscount/components/productCollectionDetail";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  name: "multiBuyDiscountForm",
+  components: {
+    productCollection
+  },
+  computed: {
+    discountContentValue() {
+      return this.promotion.minimum === "2"
+        ? i18n.t("label.money")
+        : i18n.t("label.numberStr");
+    },
+    checked() {
+      return !!this.promotion.number;
+    }
+  },
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      productSku: "",
+      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",
+        discountValue: "1",
+        purchaseType: "",
+        productType: "",
+        discount: "",
+        number: 1,
+        combination: [],
+        minimumPurchaseRequirement: "1",
+        oncePerOrder: 1
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+        this.title = this.edit
+          ? i18n.t("label.mutiPromotionDetailTitle")
+          : i18n.t("label.mutiPromotionUpdateTitle");
+      } else {
+        this.title = i18n.t("label.mutiPromotionCreateTitle");
+      }
+      this.promotionFormVisible = true;
+    },
+    // 款号搜索
+    handleProductSearch() {
+      this.productKeys = this.productSku.split(",");
+    },
+    handleProductDialog(id) {
+      this.$refs.productCollectionRef.showDialog(id);
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        type: 1,
+        promotionStatus: "",
+        rejectCause: "",
+        priority: "",
+        participateType: "",
+        conditionType: "",
+        stackableType: [],
+        minimum: "1"
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+    font-size: 12px;
+  }
+  .el-dialog__body {
+    padding: 30px 10px 30px 34px;
+  }
+  .el-dialog__headerbtn {
+    top: 14px;
+    right: 14px;
+    font-weight: bold;
+    .el-icon-close {
+      font-weight: bold;
+    }
+  }
+  .el-input {
+    width: 220px !important;
+  }
+}
+</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%;
+      }
+    }
+    &.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;
+      }
+    }
+  }
+  // /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;
+  }
+  .info {
+    &.info-mini {
+      .item {
+        margin-top: 20px;
+      }
+    }
+    .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: 142px !important;
+      }
+      .checkboxinput {
+        margin-left: 20px;
+      }
+      .productinput {
+        width: 340px !important;
+      }
+      .label {
+        margin-right: 12px;
+      }
+      &.product {
+        .mininput {
+          margin-right: 20px;
+        }
+        .collectioninput {
+          margin-right: 20px;
+          /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;
+          }
+        }
+      }
+    }
+    .discount {
+      .item {
+        margin-bottom: 20px;
+        /deep/.el-radio {
+          min-width: 135px;
+        }
+      }
+    }
+    .customerqualification {
+      .el-radio {
+        display: block;
+        margin-bottom: 30px;
+      }
+    }
+  }
+}
+</style>

+ 91 - 0
src/views/oms/promotion/amountOffProducts/promotionLogList.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <el-dialog append-to-body width="355px" :visible.sync="dialogFormVisible">
+      <div class="box">
+        <p>
+          <a href="javascript:void(0)" @click="handleDetail"> 查看版本V2</a>
+          更新时间 2025-01-24
+        </p>
+      </div>
+      <template slot="footer">
+        <el-button @click="dialogFormVisible = false"
+          >{{ $t("tagsView.close") }}
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import ElContainer from "element-ui/packages/container/src/main";
+import { promotionLogs } from "@/api/oms/order/promotion";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    ElContainer
+  },
+  name: "promotionLogList",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      dialogFormVisible: false,
+      list: [],
+      listLoading: false,
+      listQuery: {}
+    };
+  },
+  created() {},
+  computed: {},
+  methods: {
+    handleOpen(id) {
+      this.listQuery.promotionId = id;
+      this.dialogFormVisible = true;
+      this.retPage();
+    },
+    getList() {
+      this.listLoading = true;
+      promotionLogs(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    handleDetail(t) {
+      let id = this.listQuery.promotionId;
+      this.$emit("show", id);
+    },
+    retPage() {
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.box {
+  max-height: 350px;
+  overflow-y: auto;
+  p {
+    margin-left: 23px;
+    color: #9f9f9f;
+    line-height: 24px;
+    a {
+      color: #ae8877;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

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

@@ -0,0 +1,214 @@
+<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>

+ 359 - 0
src/views/oms/promotion/buyXGetYDiscount/index.vue

@@ -0,0 +1,359 @@
+<template>
+  <div class="app-container">
+    <el-container>
+      <el-main>
+        <div class="filter-container">
+          <el-input
+            :placeholder="$t('label.promotionName')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.title"
+            @keyup.enter.native="retPage"
+          />
+          <el-input
+            :placeholder="$t('label.minimumPurchaseRequirement')"
+            style="width: 220px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.requireValue"
+            @keyup.enter.native="retPage"
+          />
+          <el-select
+            v-model="listQuery.discountMethod"
+            clearable
+            class="filter-item"
+            style="width: 200px;"
+            :placeholder="$t('label.applicationMethod')"
+            @keyup.enter.native="retPage"
+          >
+            <el-option
+              :key="index"
+              v-for="(item, index) in $t('label.applicationMethodList')"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+          <el-button
+            v-waves
+            v-has="'promotion:list'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-search"
+            @click="retPage"
+            >{{ $t("view.search") }}
+          </el-button>
+          <el-button
+            v-waves
+            v-has="'promotion:update'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-circle-plus-outline"
+            @click="showDialog('', false)"
+            >{{ $t("view.create") }}
+          </el-button>
+        </div>
+        <el-table
+          v-loading="listLoading"
+          :key="tableKey"
+          :data="list"
+          stripe
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+        >
+          <el-table-column type="index" width="40"></el-table-column>
+
+          <el-table-column
+            :label="$t('label.promotionEventName')"
+            width="220"
+            show-overflow-tooltip
+            prop="title"
+          />
+          <el-table-column
+            :label="$t('label.promotionId')"
+            align="center"
+            width="220"
+            show-overflow-tooltip
+            prop="id"
+          />
+          <el-table-column
+            :label="$t('label.participateType')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ ruleTypeLabel(row.ruleType) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionLevel')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.applicationMethod')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ applicationMethod(row.discountMethod) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.minimumPurchaseRequirement')"
+            align="center"
+            width="160"
+          >
+            <template v-slot="{ row }">
+              <span>{{ purchaseRequire(row) }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            :label="$t('label.discountValue')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              {{ discountVal(row) }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.priority')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.stackableType')"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionStartTime')"
+            align="center"
+            prop="startTime"
+            width="220"
+          />
+          <el-table-column
+            :label="$t('label.promotionEndTime')"
+            align="center"
+            width="220"
+            prop="endTime"
+          />
+          <el-table-column
+            :label="$t('label.status')"
+            align="center"
+            width="120"
+            prop="status"
+          >
+            <template v-slot="{ row }">{{ statusVal(row.status) }}</template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.version')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">{{
+              row.version ? "V" + row.version : ""
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.operation')"
+            min-width="180"
+            align="center"
+            fixed="right"
+          >
+            <template v-slot="{ row }">
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('label.version')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'priceRule:version'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-more"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <swPage
+          v-if="total > 0"
+          key="2"
+          :listQuery="listQuery"
+          :total="total"
+          pos="btmRight"
+          @retPage="getList"
+        />
+      </el-main>
+    </el-container>
+
+    <promotion-form ref="promotionFormRef" @refresh-table="getList" />
+    <promotion-log-list
+      ref="logListRef"
+      @show="({ id, version }) => showDialog(id, true, version)"
+    />
+  </div>
+</template>
+
+<script>
+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/buyXGetYDiscount/promotionLogList.vue";
+import { fetchList } from "@/api/oms/order/multiBuyDiscount";
+import { deleteById } from "@/api/oms/order/promotion";
+import { getToken } from "@/utils/auth";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    SwPage,
+    ElContainer,
+    PromotionForm,
+    PromotionLogList
+  },
+  name: "multiBuyDiscount",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      activeName: "productIndex",
+      iconSize: "mini",
+      //右侧列表
+      tableKey: 0,
+      list: null,
+      total: null,
+      listLoading: false,
+      listQuery: {
+        discountMethod: null,
+        title: null,
+        requireValue: null,
+        page: 1,
+        limit: 10,
+        ruleType: 3
+      },
+      storeList: []
+    };
+  },
+  created() {
+    this.getList();
+  },
+  computed: {
+    headers: function() {
+      return { "X-Token": getToken() };
+    }
+  },
+  methods: {
+    // 折扣类型
+    applicationMethod(val) {
+      const data = i18n
+        .t("label.applicationMethodList")
+        .find(item => item.value === val);
+      return val && data ? data.label : "";
+    },
+    // 最低购买条件
+    purchaseRequire(row) {
+      let { purchaseRequire, requireValue } = row;
+      if (purchaseRequire === 2) {
+        return "$" + requireValue;
+      } else if (purchaseRequire === 3) {
+        return requireValue + i18n.t("label.item");
+      } else {
+        return i18n.t("label.noRequirement");
+      }
+    },
+    // 折扣内容
+    discountVal(row) {
+      let { valueType, numericValue } = row;
+      if (valueType === 1) {
+        return numericValue * 100 + "% off";
+      } else if (valueType === 2) {
+        return numericValue;
+      } else {
+        return i18n.t("label.free");
+      }
+    },
+    // 折扣类型
+    ruleTypeLabel(val) {
+      const obj = i18n.t("label.ruleTypeList").find(item => item.value === val);
+      return val && obj ? obj.label : "";
+    },
+    // 状态
+    statusVal(val) {
+      const data = i18n.t("label.statusList").find(item => item.value === val);
+      return val && data ? data.label : "";
+    },
+    getList() {
+      this.listLoading = true;
+      fetchList(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            this.total = response.data.total;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    retPage() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+    showDialog(id, edit) {
+      this.$refs.promotionFormRef.showDialog(id, edit);
+    },
+    // changePromotionStatus(id, status) {
+    //   this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning"
+    //   }).then(() => {
+    //     changeStatus(id).then(res => {
+    //       if (res.code === 200) {
+    //         this.$message({
+    //           message: "操作成功",
+    //           type: "success"
+    //         });
+    //         this.getList();
+    //       }
+    //     });
+    //   });
+    // },
+    handleLog(id) {
+      this.$refs.logListRef.handleOpen(id);
+    }
+  }
+};
+</script>
+
+<style scoped></style>

+ 556 - 0
src/views/oms/promotion/buyXGetYDiscount/promotionForm copy.vue

@@ -0,0 +1,556 @@
+<template>
+  <el-dialog
+    v-loading="pageLoad"
+    element-loading-text="loading..."
+    :title="title"
+    top="0"
+    width="100%"
+    lock-scroll
+    custom-class="promotionform"
+    :close-on-click-modal="false"
+    :visible.sync="promotionFormVisible"
+    @open="handleOpenDialog"
+    @close="resetData"
+  >
+    <div class="dialog-body">
+      <el-form
+        ref="promotionFormRef"
+        :rules="baseRule"
+        :model="promotion"
+        label-width="auto"
+        size="medium"
+      >
+        <!-- 设置活动基本信息 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.setBasicEventInformation") }}</span>
+          </div>
+          <div class="info">
+            <!--促销名称-->
+            <el-form-item
+              :label="$t('label.promotionName') + ':'"
+              prop="promotionName"
+              style="width:418px"
+              required
+            >
+              <el-input
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              ></el-input>
+            </el-form-item>
+            <div class="item">
+              <!--促销开始时间-->
+              <el-form-item
+                :label="$t('label.promotionStartTime') + ':'"
+                prop="promotionStartTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionStartTime"
+                ></el-date-picker>
+              </el-form-item>
+
+              <!--促销失效时间-->
+              <el-form-item
+                :label="$t('label.promotionEndTime') + ':'"
+                prop="promotionEndTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionEndTime"
+                ></el-date-picker>
+              </el-form-item>
+            </div>
+            <!--应用方式-->
+            <el-form-item
+              :label="$t('label.applicationMethod') + ':'"
+              prop="mutual"
+              required
+            >
+              <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                <div class="item row">
+                  <el-radio :label="true">{{ $t("label.discount") }}</el-radio>
+                  <el-input
+                    class="codeinput"
+                    v-model.trim="promotion.promotionName"
+                    :disabled="edit"
+                  />
+                  <el-radio :label="false">{{
+                    $t("label.autoDiscount")
+                  }}</el-radio>
+                </div>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+        </div>
+        <!-- 折扣设置 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.discountSetting") }}</span>
+          </div>
+          <div class="info">
+            <div class="item">
+              <!--最低购买要求-->
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.promotionLevel') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio :label="true">{{ $t("label.order") }}</el-radio>
+                  <el-radio :label="false">{{ $t("label.product") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <div class="item">
+              <!--折扣内容-->
+              <el-form-item
+                :label="$t('label.discountValue') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.priority') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio
+                    v-for="(item, i) in $t('label.priorityValue')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <!--可叠加类型-->
+            <el-form-item
+              :label="$t('label.stackableTypes') + ':'"
+              prop="stackableType"
+              required
+            >
+              <el-checkbox-group
+                v-model="promotion.stackableType"
+                :disabled="edit"
+              >
+                <el-checkbox
+                  v-for="(item, i) in $t('label.stackableTypesValue')"
+                  :key="i"
+                  :label="item.value"
+                  >{{ item.label }}</el-checkbox
+                >
+              </el-checkbox-group>
+            </el-form-item>
+          </div>
+        </div>
+
+        <!-- 设置商品范围 -->
+        <div class="box productbox">
+          <div class="title">
+            <span>{{ $t("label.setProductRange") }}</span>
+          </div>
+          <div class="info">
+            <!-- 指定商品标签 -->
+            <el-form-item
+              :label="$t('label.product') + ':'"
+              prop="participateType"
+              required
+            >
+              <el-select
+                multiple
+                v-model="promotion.participateType"
+                @change="handleChangeParticipateType"
+                :disabled="edit"
+              >
+                <el-option
+                  :key="index"
+                  v-for="(item, index) in $t('label.participateTypeArr')"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              :label="$t('label.specifyProductTag') + ':'"
+              prop="mutual"
+            >
+              <el-input
+                class="mininput"
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              />
+              <div class="skucon">
+                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
+              </div>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+    </div>
+
+    <template slot="footer">
+      <el-button
+        @click="
+          resetData();
+          promotionFormVisible = false;
+        "
+        >{{ $t("view.cancel") }}
+      </el-button>
+      <!-- 未审核时/审核驳回 状态可进行提交 -->
+      <el-button
+        type="primary"
+        @click="handleSaveOrUpdate"
+        v-if="promotion.promotionStatus !== 1"
+        :disabled="edit"
+        >{{ $t("view.confirm") }}
+      </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import promotion from "@/views/oms/promotion/multiBuyDiscount/index.vue";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  components: {},
+  computed: {},
+  name: "multiBuyDiscountForm",
+  filters: {},
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      promotion: {
+        // 配置基本信息
+        id: "",
+        promotionName: "",
+        stackableType: [],
+        promotionInfo: "",
+        promotionStore: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: 1,
+        mutual: "",
+        isSuperposition: "",
+        participateWeight: 0,
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: ""
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      baseRule: {
+        // 促销配置
+        promotionName: [
+          {
+            required: true,
+            message: "请输入促销名称",
+            trigger: ["change", "blur"]
+          },
+          {
+            min: 2,
+            max: 50,
+            message: "长度在 2 到 50 个字符",
+            trigger: ["change", "blur"]
+          }
+        ]
+      },
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  mounted() {},
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+      }
+      this.title = id
+        ? i18n.t("title.updateTitle")
+        : i18n.t("title.createTitle");
+      this.promotionFormVisible = true;
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionInfo: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: "",
+        mutual: "",
+        participateWeight: "",
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: "",
+        stackableType: []
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+  }
+  .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: 80vh;
+  overflow: auto;
+  .box {
+    border-bottom: 1px solid #d8d8d8;
+    padding-bottom: 20px;
+    margin-bottom: 42px;
+    .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;
+  //   }
+  // }
+  .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;
+  }
+  .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;
+        .el-input__inner {
+          width: 142px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 732 - 0
src/views/oms/promotion/buyXGetYDiscount/promotionForm.vue

@@ -0,0 +1,732 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="pageLoad"
+      element-loading-text="loading..."
+      :title="title"
+      top="0"
+      width="100%"
+      lock-scroll
+      custom-class="promotionform"
+      :close-on-click-modal="false"
+      :visible.sync="promotionFormVisible"
+      @open="handleOpenDialog"
+      @close="resetData"
+    >
+      <div class="dialog-body">
+        <el-form
+          ref="promotionFormRef"
+          :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.promotionName"
+                  :disabled="edit"
+                ></el-input>
+              </el-form-item>
+              <div class="item row">
+                <!--促销开始时间-->
+                <el-form-item
+                  :label="$t('label.promotionStartTime') + ':'"
+                  prop="promotionStartTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionStartTime"
+                  ></el-date-picker>
+                </el-form-item>
+
+                <!--促销失效时间-->
+                <el-form-item
+                  :label="$t('label.promotionEndTime') + ':'"
+                  prop="promotionEndTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionEndTime"
+                  ></el-date-picker>
+                </el-form-item>
+              </div>
+              <!--应用方式-->
+              <el-form-item
+                :label="$t('label.applicationMethod') + ':'"
+                prop="type"
+              >
+                <el-radio-group v-model="promotion.type" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.discount") }}</el-radio>
+                    <el-input
+                      class="codeinput"
+                      v-model.trim="promotion.promotionName"
+                      :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.minimum" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.numberStr") }}</el-radio>
+                    <el-radio label="2">{{ $t("label.money") }}</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.minimumMoney"
+                      :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-box">
+                    <span class="label">{{ $t("label.product") }}</span>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.productType"
+                      :disabled="edit"
+                    />
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                  </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.minimumMoney"
+                    :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 ProductList"
+                        :class="productKeys.includes(item) ? 'active' : ''"
+                        :key="i"
+                        >{{ item }},</span
+                      >
+                    </div>
+                  </div>
+                </div>
+              </el-form-item>
+              <!--折扣额-->
+              <el-form-item
+                :label="$t('label.discountPromotion') + ':'"
+                prop="discount"
+                class="discount"
+              >
+                <el-radio-group v-model="promotion.discount" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.percentage") }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '1'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.discountPerItem")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <el-radio label="3">{{ $t("label.free") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <!-- 每个订单使用次数 -->
+            <div class="title">
+              <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.maxNumberOfTimesUsedPerOrder")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 客户资格  折扣码才有-->
+          <div class="box" v-if="promotion.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.customerQualification") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item prop="customerQualification" required>
+                <el-radio-group
+                  class="customerqualification"
+                  v-model="promotion.customerQualification"
+                  :disabled="edit"
+                >
+                  <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.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.limitDiscountCount")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.customerCount")
+                  }}</el-checkbox>
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 组合 自动折扣才有 -->
+          <div class="box" v-if="promotion.type === '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>
+        </el-form>
+      </div>
+
+      <template slot="footer">
+        <el-button
+          @click="
+            resetData();
+            promotionFormVisible = false;
+          "
+          >{{ $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>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import productCollection from "@/views/oms/promotion/buyXGetYDiscount/components/productCollectionDetail";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  name: "multiBuyDiscountForm",
+  components: {
+    productCollection
+  },
+  computed: {
+    discountContentValue() {
+      return this.promotion.minimum === "2"
+        ? i18n.t("label.money")
+        : i18n.t("label.numberStr");
+    },
+    checked() {
+      return !!this.promotion.number;
+    }
+  },
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      productSku: "",
+      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: "",
+        productType: "",
+        discount: "",
+        number: 1,
+        combination: []
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+        this.title = this.edit
+          ? i18n.t("label.mutiPromotionDetailTitle")
+          : i18n.t("label.mutiPromotionUpdateTitle");
+      } else {
+        this.title = i18n.t("label.mutiPromotionCreateTitle");
+      }
+      this.promotionFormVisible = true;
+    },
+    // 款号搜索
+    handleProductSearch() {
+      this.productKeys = this.productSku.split(",");
+    },
+    handleProductDialog(id) {
+      this.$refs.productCollectionRef.showDialog(id);
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        type: 1,
+        promotionStatus: "",
+        rejectCause: "",
+        priority: "",
+        participateType: "",
+        conditionType: "",
+        stackableType: [],
+        minimum: "1"
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+    font-size: 12px;
+  }
+  .el-dialog__body {
+    padding: 30px 10px 30px 34px;
+  }
+  .el-dialog__headerbtn {
+    top: 14px;
+    right: 14px;
+    font-weight: bold;
+    .el-icon-close {
+      font-weight: bold;
+    }
+  }
+  .el-input {
+    width: 220px !important;
+  }
+}
+</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%;
+      }
+    }
+    &.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;
+      }
+    }
+  }
+  // /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;
+  }
+  .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: 142px !important;
+      }
+      .checkboxinput {
+        margin-left: 20px;
+      }
+      .productinput {
+        width: 340px !important;
+      }
+      .label {
+        margin-right: 12px;
+      }
+      &.product {
+        margin-top: 26px;
+        .mininput {
+          margin-right: 20px;
+        }
+        .collectioninput {
+          margin-right: 20px;
+          /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;
+          }
+        }
+      }
+    }
+    .discount {
+      .item {
+        margin-bottom: 20px;
+        /deep/.el-radio {
+          min-width: 135px;
+        }
+      }
+    }
+    .customerqualification {
+      .el-radio {
+        display: block;
+        margin-bottom: 30px;
+      }
+    }
+  }
+}
+</style>

+ 91 - 0
src/views/oms/promotion/buyXGetYDiscount/promotionLogList.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <el-dialog append-to-body width="355px" :visible.sync="dialogFormVisible">
+      <div class="box">
+        <p>
+          <a href="javascript:void(0)" @click="handleDetail"> 查看版本V2</a>
+          更新时间 2025-01-24
+        </p>
+      </div>
+      <template slot="footer">
+        <el-button @click="dialogFormVisible = false"
+          >{{ $t("tagsView.close") }}
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import ElContainer from "element-ui/packages/container/src/main";
+import { promotionLogs } from "@/api/oms/order/promotion";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    ElContainer
+  },
+  name: "promotionLogList",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      dialogFormVisible: false,
+      list: [],
+      listLoading: false,
+      listQuery: {}
+    };
+  },
+  created() {},
+  computed: {},
+  methods: {
+    handleOpen(id) {
+      this.listQuery.promotionId = id;
+      this.dialogFormVisible = true;
+      this.retPage();
+    },
+    getList() {
+      this.listLoading = true;
+      promotionLogs(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    handleDetail(t) {
+      let id = this.listQuery.promotionId;
+      this.$emit("show", id);
+    },
+    retPage() {
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.box {
+  max-height: 350px;
+  overflow-y: auto;
+  p {
+    margin-left: 23px;
+    color: #9f9f9f;
+    line-height: 24px;
+    a {
+      color: #ae8877;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

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

@@ -0,0 +1,214 @@
+<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>

+ 425 - 0
src/views/oms/promotion/freeShipping/index.vue

@@ -0,0 +1,425 @@
+<template>
+  <div class="app-container">
+    <el-container>
+      <el-main>
+        <div class="filter-container">
+          <el-input
+            :placeholder="$t('label.promotionName')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.promotionName"
+            @keyup.enter.native="retPage"
+          />
+          <el-input
+            :placeholder="$t('label.minimumPurchaseRequirement')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.minimumPurchaseRequirement"
+            @keyup.enter.native="retPage"
+          />
+          <el-select
+            v-model="listQuery.applicationMethod"
+            clearable
+            class="filter-item"
+            style="width: 200px;"
+            :placeholder="$t('label.applicationMethod')"
+            @keyup.enter.native="retPage"
+          >
+            <el-option
+              :key="index"
+              v-for="(item, index) in storeList"
+              :label="item.storeName"
+              :value="item.storeId"
+            />
+          </el-select>
+          <el-button
+            v-waves
+            v-has="'promotion:list'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-search"
+            @click="retPage"
+            >{{ $t("view.search") }}
+          </el-button>
+        </div>
+        <el-table
+          v-loading="listLoading"
+          :key="tableKey"
+          :data="list"
+          stripe
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+        >
+          <el-table-column type="index" width="40"></el-table-column>
+
+          <el-table-column
+            :label="$t('label.promotionEventName')"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionId')"
+            align="center"
+            width="220"
+            show-overflow-tooltip
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionInfo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.participateType')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.participateTypeArr").find(
+                  item => item.value === row.participateType
+                )
+                  ? $t("label.participateTypeArr").find(
+                      item => item.value === row.participateType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionLevel')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.applicationMethod')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateNum }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.minimumPurchaseRequirement')"
+            align="center"
+            width="160"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            :label="$t('label.discountValue')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{
+                $t("label.conditionTypeArr").find(
+                  item => item.value === row.conditionType
+                )
+                  ? $t("label.conditionTypeArr").find(
+                      item => item.value === row.conditionType
+                    ).label
+                  : ""
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.priority')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.stackableType')"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionStartTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.promotionEndTime')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionEndTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.version')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.operation')"
+            min-width="180"
+            align="center"
+            fixed="right"
+          >
+            <template v-slot="{ row }">
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.edit')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:update'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-edit"
+                  circle
+                  @click="showDialog(row.id, false)"
+                >
+                </el-button>
+              </el-tooltip> -->
+
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.details')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:list'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-more"
+                  circle
+                  @click="showDialog(row.id, true)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.delete')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:delete'"
+                  type="danger"
+                  circle
+                  size="mini"
+                  icon="el-icon-delete"
+                  @click="handleDelete(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('label.version')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:status'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('title.operationLog')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotionLog:list'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <swPage
+          v-if="total > 0"
+          key="2"
+          :listQuery="listQuery"
+          :total="total"
+          pos="btmRight"
+          @retPage="getList"
+        />
+      </el-main>
+    </el-container>
+
+    <promotion-form ref="promotionFormRef" @refresh-table="getList" />
+    <promotion-log-list ref="logListRef" @show="id => showDialog(id, true)" />
+  </div>
+</template>
+
+<script>
+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/freeShipping/promotionForm.vue";
+import PromotionLogList from "@/views/oms/promotion/freeShipping/promotionLogList.vue";
+import {
+  fetchList,
+  deleteById,
+  storeList,
+  checkPromotion,
+  changeStatus
+} from "@/api/oms/order/promotion";
+import { getToken } from "@/utils/auth";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    SwPage,
+    ElContainer,
+    PromotionForm,
+    PromotionLogList
+  },
+  name: "multiBuyDiscount",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      activeName: "productIndex",
+      iconSize: "mini",
+      //右侧列表
+      tableKey: 0,
+      list: null,
+      total: null,
+      listLoading: false,
+      listQuery: {
+        applicationMethod: null,
+        promotionName: null,
+        minimumPurchaseRequirement: null,
+        page: 1,
+        limit: 10
+      },
+      storeList: []
+    };
+  },
+  created() {
+    this.getList();
+    this.getStoreList();
+  },
+  computed: {
+    headers: function() {
+      return { "X-Token": getToken() };
+    }
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    getList() {
+      this.listLoading = true;
+      fetchList(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            this.total = response.data.total;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    retPage() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+    handleDelete(id) {
+      this.$confirm("是否删除该记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        deleteById(id).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: "操作成功",
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    showDialog(id, edit) {
+      this.$refs.promotionFormRef.showDialog(id, edit);
+    },
+    handleDetail(id) {
+      console.log(id, "detail");
+    },
+    // changePromotionStatus(id, status) {
+    //   this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
+    //     confirmButtonText: "确定",
+    //     cancelButtonText: "取消",
+    //     type: "warning"
+    //   }).then(() => {
+    //     changeStatus(id).then(res => {
+    //       if (res.code === 200) {
+    //         this.$message({
+    //           message: "操作成功",
+    //           type: "success"
+    //         });
+    //         this.getList();
+    //       }
+    //     });
+    //   });
+    // },
+    handleLog(id) {
+      this.$refs.logListRef.handleOpen(id);
+    }
+  }
+};
+</script>
+
+<style scoped></style>

+ 556 - 0
src/views/oms/promotion/freeShipping/promotionForm copy.vue

@@ -0,0 +1,556 @@
+<template>
+  <el-dialog
+    v-loading="pageLoad"
+    element-loading-text="loading..."
+    :title="title"
+    top="0"
+    width="100%"
+    lock-scroll
+    custom-class="promotionform"
+    :close-on-click-modal="false"
+    :visible.sync="promotionFormVisible"
+    @open="handleOpenDialog"
+    @close="resetData"
+  >
+    <div class="dialog-body">
+      <el-form
+        ref="promotionFormRef"
+        :rules="baseRule"
+        :model="promotion"
+        label-width="auto"
+        size="medium"
+      >
+        <!-- 设置活动基本信息 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.setBasicEventInformation") }}</span>
+          </div>
+          <div class="info">
+            <!--促销名称-->
+            <el-form-item
+              :label="$t('label.promotionName') + ':'"
+              prop="promotionName"
+              style="width:418px"
+              required
+            >
+              <el-input
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              ></el-input>
+            </el-form-item>
+            <div class="item">
+              <!--促销开始时间-->
+              <el-form-item
+                :label="$t('label.promotionStartTime') + ':'"
+                prop="promotionStartTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionStartTime"
+                ></el-date-picker>
+              </el-form-item>
+
+              <!--促销失效时间-->
+              <el-form-item
+                :label="$t('label.promotionEndTime') + ':'"
+                prop="promotionEndTime"
+                required
+              >
+                <el-date-picker
+                  :disabled="edit"
+                  type="datetime"
+                  placeholder="选择日期"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  v-model="promotion.promotionEndTime"
+                ></el-date-picker>
+              </el-form-item>
+            </div>
+            <!--应用方式-->
+            <el-form-item
+              :label="$t('label.applicationMethod') + ':'"
+              prop="mutual"
+              required
+            >
+              <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                <div class="item row">
+                  <el-radio :label="true">{{ $t("label.discount") }}</el-radio>
+                  <el-input
+                    class="codeinput"
+                    v-model.trim="promotion.promotionName"
+                    :disabled="edit"
+                  />
+                  <el-radio :label="false">{{
+                    $t("label.autoDiscount")
+                  }}</el-radio>
+                </div>
+              </el-radio-group>
+            </el-form-item>
+          </div>
+        </div>
+        <!-- 折扣设置 -->
+        <div class="box">
+          <div class="title">
+            <span>{{ $t("label.discountSetting") }}</span>
+          </div>
+          <div class="info">
+            <div class="item">
+              <!--最低购买要求-->
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.promotionLevel') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio :label="true">{{ $t("label.order") }}</el-radio>
+                  <el-radio :label="false">{{ $t("label.product") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <div class="item">
+              <!--折扣内容-->
+              <el-form-item
+                :label="$t('label.discountValue') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <div class="item row">
+                    <el-radio :label="true">{{
+                      $t("label.discount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio :label="false">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+
+              <!--促销级别-->
+              <el-form-item
+                :label="$t('label.priority') + ':'"
+                prop="mutual"
+                required
+              >
+                <el-radio-group v-model="promotion.mutual" :disabled="edit">
+                  <el-radio
+                    v-for="(item, i) in $t('label.priorityValue')"
+                    :key="i"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio
+                  >
+                </el-radio-group>
+              </el-form-item>
+            </div>
+            <!--可叠加类型-->
+            <el-form-item
+              :label="$t('label.stackableTypes') + ':'"
+              prop="stackableType"
+              required
+            >
+              <el-checkbox-group
+                v-model="promotion.stackableType"
+                :disabled="edit"
+              >
+                <el-checkbox
+                  v-for="(item, i) in $t('label.stackableTypesValue')"
+                  :key="i"
+                  :label="item.value"
+                  >{{ item.label }}</el-checkbox
+                >
+              </el-checkbox-group>
+            </el-form-item>
+          </div>
+        </div>
+
+        <!-- 设置商品范围 -->
+        <div class="box productbox">
+          <div class="title">
+            <span>{{ $t("label.setProductRange") }}</span>
+          </div>
+          <div class="info">
+            <!-- 指定商品标签 -->
+            <el-form-item
+              :label="$t('label.product') + ':'"
+              prop="participateType"
+              required
+            >
+              <el-select
+                multiple
+                v-model="promotion.participateType"
+                @change="handleChangeParticipateType"
+                :disabled="edit"
+              >
+                <el-option
+                  :key="index"
+                  v-for="(item, index) in $t('label.participateTypeArr')"
+                  :label="item.label"
+                  :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item
+              :label="$t('label.specifyProductTag') + ':'"
+              prop="mutual"
+            >
+              <el-input
+                class="mininput"
+                v-model.trim="promotion.promotionName"
+                :disabled="edit"
+              />
+              <div class="skucon">
+                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
+              </div>
+            </el-form-item>
+          </div>
+        </div>
+      </el-form>
+    </div>
+
+    <template slot="footer">
+      <el-button
+        @click="
+          resetData();
+          promotionFormVisible = false;
+        "
+        >{{ $t("view.cancel") }}
+      </el-button>
+      <!-- 未审核时/审核驳回 状态可进行提交 -->
+      <el-button
+        type="primary"
+        @click="handleSaveOrUpdate"
+        v-if="promotion.promotionStatus !== 1"
+        :disabled="edit"
+        >{{ $t("view.confirm") }}
+      </el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import promotion from "@/views/oms/promotion/multiBuyDiscount/index.vue";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  components: {},
+  computed: {},
+  name: "multiBuyDiscountForm",
+  filters: {},
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      promotion: {
+        // 配置基本信息
+        id: "",
+        promotionName: "",
+        stackableType: [],
+        promotionInfo: "",
+        promotionStore: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: 1,
+        mutual: "",
+        isSuperposition: "",
+        participateWeight: 0,
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: ""
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      baseRule: {
+        // 促销配置
+        promotionName: [
+          {
+            required: true,
+            message: "请输入促销名称",
+            trigger: ["change", "blur"]
+          },
+          {
+            min: 2,
+            max: 50,
+            message: "长度在 2 到 50 个字符",
+            trigger: ["change", "blur"]
+          }
+        ]
+      },
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  mounted() {},
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+      }
+      this.title = id
+        ? i18n.t("title.updateTitle")
+        : i18n.t("title.createTitle");
+      this.promotionFormVisible = true;
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionInfo: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        promotionStatus: "",
+        rejectCause: "",
+        participateNum: "",
+        mutual: "",
+        participateWeight: "",
+        participateType: "",
+        conditionType: "",
+        conditionValue: "",
+        goodsRelation: "",
+        goodsScope: "",
+        giftRelation: "",
+        stackableType: []
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+  }
+  .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: 80vh;
+  overflow: auto;
+  .box {
+    border-bottom: 1px solid #d8d8d8;
+    padding-bottom: 20px;
+    margin-bottom: 42px;
+    .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;
+  //   }
+  // }
+  .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;
+  }
+  .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;
+        .el-input__inner {
+          width: 142px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 801 - 0
src/views/oms/promotion/freeShipping/promotionForm.vue

@@ -0,0 +1,801 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="pageLoad"
+      element-loading-text="loading..."
+      :title="title"
+      top="0"
+      width="100%"
+      lock-scroll
+      custom-class="promotionform"
+      :close-on-click-modal="false"
+      :visible.sync="promotionFormVisible"
+      @open="handleOpenDialog"
+      @close="resetData"
+    >
+      <div class="dialog-body">
+        <el-form
+          ref="promotionFormRef"
+          :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.promotionName"
+                  :disabled="edit"
+                ></el-input>
+              </el-form-item>
+              <div class="item row">
+                <!--促销开始时间-->
+                <el-form-item
+                  :label="$t('label.promotionStartTime') + ':'"
+                  prop="promotionStartTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionStartTime"
+                  ></el-date-picker>
+                </el-form-item>
+
+                <!--促销失效时间-->
+                <el-form-item
+                  :label="$t('label.promotionEndTime') + ':'"
+                  prop="promotionEndTime"
+                >
+                  <el-date-picker
+                    :disabled="edit"
+                    type="datetime"
+                    placeholder="选择日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    v-model="promotion.promotionEndTime"
+                  ></el-date-picker>
+                </el-form-item>
+              </div>
+              <!--应用方式-->
+              <el-form-item
+                :label="$t('label.applicationMethod') + ':'"
+                prop="type"
+              >
+                <el-radio-group v-model="promotion.type" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.discount") }}</el-radio>
+                    <el-input
+                      class="codeinput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                    <el-radio label="2">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 国家/地区 -->
+          <div class="box countries">
+            <div class="title">
+              <span>{{ $t("label.countries") }}</span>
+            </div>
+            <div class="info info-countries">
+              <el-form-item :label="$t('label.countries') + ':'">
+                <el-radio-group v-model="promotion.countries" :disabled="edit">
+                  <el-radio label="1">{{ $t("label.allCountries") }}</el-radio>
+
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.selectedCountries")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.countries === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+                <!-- <div class="item row">
+                  <el-input
+                    class="mininput"
+                    v-model.trim="promotion.minimumMoney"
+                    :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> -->
+              </el-form-item>
+              <el-form-item :label="$t('label.shippingRates') + ':'">
+                <div class="item row">
+                  <el-checkbox
+                    v-model.trim="promotion.minimumMoney"
+                    :disabled="edit"
+                    >{{ $t("label.shippingRatesValue") }}</el-checkbox
+                  >
+                  <el-input
+                    class="mininput"
+                    v-model.trim="promotion.productType"
+                    :disabled="edit"
+                  />
+                </div>
+              </el-form-item>
+              <!--折扣内容 商品-->
+              <!-- <el-form-item :label="$t('label.product') + ':'">
+                <div class="item product">
+                  <div class="item-box">
+                    <el-input
+                      class="mininput"
+                      v-model.trim="promotion.productType"
+                      :disabled="edit"
+                    />
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                    <el-input
+                      class="collectioninput"
+                      v-model.trim="promotion.productCollection"
+                      :disabled="edit"
+                    >
+                      <template slot="append"
+                        ><span
+                          @click="
+                            handleProductDialog(promotion.productCollection)
+                          "
+                          >查看商品明细</span
+                        ></template
+                      >
+                    </el-input>
+                  </div>
+                </div>
+              </el-form-item> -->
+            </div>
+            <!-- 最低购买要求 -->
+            <div class="title">
+              <span>{{ $t("label.minimumPurchaseRequirement") }}</span>
+            </div>
+            <div class="info info-mini">
+              <el-form-item
+                :label="$t('label.minimumPurchaseRequirement') + ':'"
+                prop="minimumPurchaseRequirement"
+              >
+                <el-radio-group
+                  v-model="promotion.minimumPurchaseRequirement"
+                  :disabled="edit"
+                >
+                  <el-radio label="1">{{
+                    $t("label.minimunPurchaseObj.noMinimun")
+                  }}</el-radio>
+
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.minimunPurchaseObj.minimunAmount")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="3">{{
+                      $t("label.minimunPurchaseObj.minimunQuantity")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.minimumPurchaseRequirement === '3'"
+                      class="mininput"
+                      v-model.trim="promotion.minimumMoney"
+                      :disabled="edit"
+                    />
+                  </div>
+                </el-radio-group>
+              </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.minimumMoney"
+                    :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 ProductList"
+                        :class="productKeys.includes(item) ? 'active' : ''"
+                        :key="i"
+                        >{{ item }},</span
+                      >
+                    </div>
+                  </div>
+                </div>
+              </el-form-item>
+              <el-form-item
+                :label="$t('label.discountPromotion') + ':'"
+                prop="discount"
+                class="discount"
+              >
+                <el-radio-group v-model="promotion.discount" :disabled="edit">
+                  <div class="item row">
+                    <el-radio label="1">{{ $t("label.percentage") }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '1'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <div class="item row">
+                    <el-radio label="2">{{
+                      $t("label.discountPerItem")
+                    }}</el-radio>
+                    <el-input
+                      v-show="promotion.discount === '2'"
+                      class="mininput"
+                      v-model.trim="promotion.promotionName"
+                      :disabled="edit"
+                    />
+                  </div>
+                  <el-radio label="3">{{ $t("label.free") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </div> -->
+            <!-- 每个订单使用次数 -->
+            <!-- <div class="title">
+              <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.maxNumberOfTimesUsedPerOrder")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+              </el-form-item>
+            </div> -->
+          </div>
+          <!-- 客户资格  折扣码才有-->
+          <div class="box" v-if="promotion.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.customerQualification") }}</span>
+            </div>
+            <div class="info">
+              <el-form-item prop="customerQualification" required>
+                <el-radio-group
+                  class="customerqualification"
+                  v-model="promotion.customerQualification"
+                  :disabled="edit"
+                >
+                  <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.type === '1'">
+            <div class="title">
+              <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.limitDiscountCount")
+                  }}</el-checkbox>
+                  <el-input
+                    class="mininput checkboxinput"
+                    v-model.trim="promotion.number"
+                    :disabled="edit"
+                  />
+                </div>
+                <div class="item row">
+                  <el-checkbox v-model="checked" :disabled="edit">{{
+                    $t("label.customerCount")
+                  }}</el-checkbox>
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 组合 自动折扣才有 -->
+          <div class="box" v-if="promotion.type === '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
+                    :label="$t('label.combinationList')[0].value"
+                    :disabled="edit"
+                    >{{ $t("label.combinationList")[0].label }}
+                  </el-checkbox>
+                  <el-checkbox
+                    :label="$t('label.combinationList')[1].value"
+                    :disabled="edit"
+                    >{{ $t("label.combinationList")[1].label }}
+                  </el-checkbox>
+                </el-checkbox-group>
+              </el-form-item>
+            </div>
+          </div>
+        </el-form>
+      </div>
+
+      <template slot="footer">
+        <el-button
+          @click="
+            resetData();
+            promotionFormVisible = false;
+          "
+          >{{ $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>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+import productCollection from "@/views/oms/promotion/freeShipping/components/productCollectionDetail";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  name: "multiBuyDiscountForm",
+  components: {
+    productCollection
+  },
+  computed: {
+    checked() {
+      return !!this.promotion.number;
+    }
+  },
+  data() {
+    return {
+      promotionFormVisible: false,
+      title: "",
+      productSku: "",
+      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",
+        discountValue: "1",
+        purchaseType: "",
+        productType: "",
+        discount: "",
+        number: 1,
+        combination: [],
+        minimumPurchaseRequirement: "1",
+        oncePerOrder: 1,
+        countries: "1"
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      pageLoad: false,
+      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+        return {
+          ...item,
+          disabled: false
+        };
+      })
+    };
+  },
+  methods: {
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit) {
+      this.edit = !edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        await this.getPromotionInfo();
+        this.title = this.edit
+          ? i18n.t("label.mutiPromotionDetailTitle")
+          : i18n.t("label.mutiPromotionUpdateTitle");
+      } else {
+        this.title = i18n.t("label.mutiPromotionCreateTitle");
+      }
+      this.promotionFormVisible = true;
+    },
+    // 款号搜索
+    handleProductSearch() {
+      this.productKeys = this.productSku.split(",");
+    },
+    handleProductDialog(id) {
+      this.$refs.productCollectionRef.showDialog(id);
+    },
+    resetData() {
+      this.promotion = {
+        id: "",
+        promotionName: "",
+        promotionStartTime: "",
+        promotionEndTime: "",
+        type: 1,
+        promotionStatus: "",
+        rejectCause: "",
+        priority: "",
+        participateType: "",
+        conditionType: "",
+        stackableType: [],
+        minimum: "1"
+      };
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      getById(this.promotion.id).then(res => {
+        // 促销配置信息
+        this.promotion = res.data;
+        this.pageLoad = false;
+      });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+          const data = {
+            ...this.promotion
+          };
+          if (!data.id) {
+            save(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          } else {
+            update(data).then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: "操作成功",
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            });
+          }
+        }
+      });
+    },
+    handleChangeParticipateType(e) {
+      this.conditionTypeArr.forEach(item => {
+        item.disabled = false;
+      });
+      this.promotion.conditionType = "";
+      this.promotion.conditionValue = "";
+      if (e === "gift_money" || e === "gift_qty") {
+        this.conditionTypeArr[2].disabled = true;
+      } else if (e === "gift_consumer") {
+        // gift_consumer
+        this.conditionTypeArr[0].disabled = true;
+        this.conditionTypeArr[1].disabled = true;
+        this.promotion.conditionType = this.conditionTypeArr[2].value;
+      }
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+    font-size: 12px;
+  }
+  .el-dialog__body {
+    padding: 30px 10px 30px 34px;
+  }
+  .el-dialog__headerbtn {
+    top: 14px;
+    right: 14px;
+    font-weight: bold;
+    .el-icon-close {
+      font-weight: bold;
+    }
+  }
+  .el-input {
+    width: 220px !important;
+  }
+}
+</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%;
+      }
+    }
+    &.countries {
+      .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;
+      }
+    }
+  }
+  // /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;
+  }
+  .info {
+    &.info-countries {
+      /deep/.el-radio-group {
+        .item {
+          margin-top: 20px;
+        }
+        .mininput {
+          margin-left: 20px;
+        }
+      }
+    }
+    &.info-mini {
+      .item {
+        margin-top: 20px;
+      }
+    }
+    .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 {
+        width: 142px !important;
+        margin-left: 10px;
+      }
+      .checkboxinput {
+        margin-left: 20px;
+      }
+      .productinput {
+        width: 340px !important;
+      }
+      .label {
+        margin-right: 12px;
+      }
+      &.product {
+        .mininput {
+          margin-right: 20px;
+        }
+        .collectioninput {
+          margin-right: 20px;
+          /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;
+          }
+        }
+      }
+    }
+    .countries {
+      .item {
+        /deep/.el-radio {
+          min-width: 135px;
+        }
+      }
+    }
+
+    .customerqualification {
+      .el-radio {
+        display: block;
+        margin-bottom: 30px;
+      }
+    }
+  }
+}
+</style>

+ 91 - 0
src/views/oms/promotion/freeShipping/promotionLogList.vue

@@ -0,0 +1,91 @@
+<template>
+  <div>
+    <el-dialog append-to-body width="355px" :visible.sync="dialogFormVisible">
+      <div class="box">
+        <p>
+          <a href="javascript:void(0)" @click="handleDetail"> 查看版本V2</a>
+          更新时间 2025-01-24
+        </p>
+      </div>
+      <template slot="footer">
+        <el-button @click="dialogFormVisible = false"
+          >{{ $t("tagsView.close") }}
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import ElContainer from "element-ui/packages/container/src/main";
+import { promotionLogs } from "@/api/oms/order/promotion";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    ElContainer
+  },
+  name: "promotionLogList",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      dialogFormVisible: false,
+      list: [],
+      listLoading: false,
+      listQuery: {}
+    };
+  },
+  created() {},
+  computed: {},
+  methods: {
+    handleOpen(id) {
+      this.listQuery.promotionId = id;
+      this.dialogFormVisible = true;
+      this.retPage();
+    },
+    getList() {
+      this.listLoading = true;
+      promotionLogs(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    handleDetail(t) {
+      let id = this.listQuery.promotionId;
+      this.$emit("show", id);
+    },
+    retPage() {
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.box {
+  max-height: 350px;
+  overflow-y: auto;
+  p {
+    margin-left: 23px;
+    color: #9f9f9f;
+    line-height: 24px;
+    a {
+      color: #ae8877;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

+ 504 - 0
src/views/oms/promotion/multiBuyDiscount/index.vue

@@ -0,0 +1,504 @@
+<template>
+  <div class="app-container">
+    <el-container>
+      <el-main>
+        <div class="filter-container">
+          <el-input
+            :placeholder="$t('label.promotionName')"
+            style="width: 200px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.title"
+            @keyup.enter.native="retPage"
+          />
+          <el-input
+            :placeholder="$t('label.minimumPurchaseRequirement')"
+            style="width: 220px;"
+            clearable
+            class="filter-item"
+            v-model="listQuery.requireValue"
+            @keyup.enter.native="retPage"
+          />
+          <el-select
+            v-model="listQuery.discountMethod"
+            clearable
+            class="filter-item"
+            style="width: 200px;"
+            :placeholder="$t('label.applicationMethod')"
+            @keyup.enter.native="retPage"
+          >
+            <el-option
+              :key="index"
+              v-for="(item, index) in $t('label.applicationMethodList')"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+          <el-button
+            v-waves
+            v-has="'promotion:list'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-search"
+            @click="retPage"
+            >{{ $t("view.search") }}
+          </el-button>
+          <el-button
+            v-waves
+            v-has="'promotion:update'"
+            class="filter-item"
+            type="primary"
+            icon="el-icon-circle-plus-outline"
+            @click="showDialog('', false)"
+            >{{ $t("view.create") }}
+          </el-button>
+        </div>
+        <el-table
+          v-loading="listLoading"
+          :key="tableKey"
+          :data="list"
+          stripe
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+        >
+          <el-table-column type="index" width="40"></el-table-column>
+
+          <el-table-column
+            :label="$t('label.promotionEventName')"
+            width="220"
+            show-overflow-tooltip
+            prop="title"
+          />
+          <el-table-column
+            :label="$t('label.promotionId')"
+            align="center"
+            width="220"
+            show-overflow-tooltip
+            prop="id"
+          />
+          <el-table-column
+            :label="$t('label.participateType')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ ruleTypeLabel(row.ruleType) }}</span>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column
+            :label="$t('label.promotionLevel')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.promotionStartTime }}</span>
+            </template>
+          </el-table-column> -->
+          <el-table-column
+            :label="$t('label.applicationMethod')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              <span>{{ applicationMethod(row.discountMethod) }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.minimumPurchaseRequirement')"
+            align="center"
+            width="160"
+          >
+            <template v-slot="{ row }">
+              <span>{{ purchaseRequire(row) }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            :label="$t('label.discountValue')"
+            align="center"
+            width="220"
+          >
+            <template v-slot="{ row }">
+              {{ discountVal(row) }}
+            </template>
+          </el-table-column>
+          <!-- <el-table-column
+            :label="$t('label.priority')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column> -->
+          <!-- <el-table-column
+            :label="$t('label.stackableType')"
+            align="center"
+            width="150"
+          >
+            <template v-slot="{ row }">
+              <span>{{ row.participateWeight }}</span>
+            </template>
+          </el-table-column> -->
+          <el-table-column
+            :label="$t('label.promotionStartTime')"
+            align="center"
+            prop="startTime"
+            width="220"
+          />
+
+          <el-table-column
+            :label="$t('label.promotionEndTime')"
+            align="center"
+            width="220"
+            prop="endTime"
+          />
+          <el-table-column
+            :label="$t('label.status')"
+            align="center"
+            width="120"
+            prop="status"
+          >
+            <template v-slot="{ row }">{{ statusVal(row.status) }}</template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.version')"
+            align="center"
+            width="120"
+          >
+            <template v-slot="{ row }">{{
+              row.version ? "V" + row.version : ""
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('label.operation')"
+            min-width="220"
+            align="center"
+            fixed="right"
+          >
+            <template v-slot="{ row }">
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.details')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:list'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-more"
+                  circle
+                  @click="showDialog(row.id, true, row.version)"
+                >
+                </el-button>
+              </el-tooltip> -->
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('label.version')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'priceRule:version'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-more"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                v-show="row.version"
+                class="item"
+                effect="dark"
+                :content="$t('view.edit')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'priceRule:edit'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-edit"
+                  circle
+                  @click="showDialog(row.id, false, row.version)"
+                >
+                </el-button>
+              </el-tooltip>
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.audit')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotion:check'"
+                  type="primary"
+                  size="mini"
+                  icon="el-icon-check"
+                  circle
+                  @click="handleCheck(row.id)"
+                >
+                </el-button>
+              </el-tooltip> -->
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('view.delete')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'priceRule:delete'"
+                  type="danger"
+                  circle
+                  size="mini"
+                  icon="el-icon-delete"
+                  @click="handleDelete(row.id)"
+                >
+                </el-button>
+              </el-tooltip>
+              <el-tooltip
+                class="item"
+                effect="dark"
+                :content="
+                  row.status === 1 ? $t('view.disable') : $t('view.enable')
+                "
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'priceRule:updateStatus'"
+                  :type="row.status === 1 ? 'danger' : 'primary'"
+                  circle
+                  size="mini"
+                  :icon="row.status ? 'el-icon-turn-off' : 'el-icon-open'"
+                  @click="changePromotionStatus(row.id, row.status)"
+                >
+                </el-button>
+              </el-tooltip>
+              <!-- <el-tooltip
+                class="item"
+                effect="dark"
+                :content="$t('title.operationLog')"
+                placement="top-start"
+              >
+                <el-button
+                  v-has="'promotionLog:list'"
+                  type="primary"
+                  circle
+                  size="mini"
+                  icon="el-icon-notebook-1"
+                  @click="handleLog(row.id)"
+                >
+                </el-button>
+              </el-tooltip> -->
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <swPage
+          v-if="total > 0"
+          key="2"
+          :listQuery="listQuery"
+          :total="total"
+          pos="btmRight"
+          @retPage="getList"
+        />
+      </el-main>
+    </el-container>
+
+    <promotion-form ref="promotionFormRef" @refresh-table="getList" />
+    <promotion-log-list
+      ref="logListRef"
+      @show="({ id, version }) => showDialog(id, true, version)"
+    />
+  </div>
+</template>
+
+<script>
+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 {
+  fetchList,
+  deleteMutiDiscount,
+  updateStatusMutiDiscount
+} from "@/api/oms/order/multiBuyDiscount";
+import { getToken } from "@/utils/auth";
+import i18n from "@/lang";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    SwPage,
+    ElContainer,
+    PromotionForm,
+    PromotionLogList
+  },
+  name: "multiBuyDiscount",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      activeName: "productIndex",
+      iconSize: "mini",
+      //右侧列表
+      tableKey: 0,
+      list: null,
+      total: null,
+      listLoading: false,
+      listQuery: {
+        discountMethod: null,
+        title: null,
+        requireValue: null,
+        page: 1,
+        limit: 10,
+        ruleType: 5
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  computed: {
+    headers: function() {
+      return { "X-Token": getToken() };
+    }
+  },
+  methods: {
+    // 折扣类型
+    applicationMethod(val) {
+      const data = i18n
+        .t("label.applicationMethodList")
+        .find(item => item.value === val);
+      return val && data ? data.label : "";
+    },
+    // 最低购买条件
+    purchaseRequire(row) {
+      let { purchaseRequire, requireValue } = row;
+      if (purchaseRequire === 2) {
+        return "$" + requireValue;
+      } else if (purchaseRequire === 3) {
+        return requireValue + i18n.t("label.item");
+      } else {
+        return i18n.t("label.noRequirement");
+      }
+    },
+    // 折扣内容
+    discountVal(row) {
+      let { valueType, numericValue } = row;
+      if (valueType === 1) {
+        return numericValue * 100 + "% off";
+      } else if (valueType === 2) {
+        return numericValue;
+      } else {
+        return i18n.t("label.free");
+      }
+    },
+    // 折扣类型
+    ruleTypeLabel(val) {
+      const obj = i18n.t("label.ruleTypeList").find(item => item.value === val);
+      return val && obj ? obj.label : "";
+    },
+    // 状态
+    statusVal(val) {
+      const data = i18n.t("label.statusList").find(item => item.value === val);
+      return val && data ? data.label : "";
+    },
+    getList() {
+      this.listLoading = true;
+      fetchList(this.listQuery)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data.list;
+            this.total = response.data.total;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    retPage() {
+      this.listQuery.page = 1;
+      this.getList();
+    },
+    handleDelete(id) {
+      this.$confirm(i18n.t("label.deleteNotice"), i18n.t("label.notice"), {
+        confirmButtonText: i18n.t("label.comfire"),
+        cancelButtonText: i18n.t("label.cancel"),
+        type: "warning"
+      }).then(() => {
+        deleteMutiDiscount({ id }).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: i18n.t("label.successVal"),
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    showDialog(id, edit, version) {
+      this.$refs.promotionFormRef.showDialog(id, edit, version);
+    },
+    handleCheck(id) {
+      this.$confirm("是否审核通过?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        checkPromotion({ id: id }).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: "审核成功",
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    changePromotionStatus(id, data) {
+      const status = data === 1 ? 2 : 1;
+      const query = { id, status };
+      this.$confirm(
+        data === 1
+          ? i18n.t("label.auditDisableNotice")
+          : i18n.t("label.auditEnableNotice"),
+        i18n.t("label.notice"),
+        {
+          confirmButtonText: i18n.t("label.comfire"),
+          cancelButtonText: i18n.t("label.cancel"),
+          type: "warning"
+        }
+      ).then(() => {
+        updateStatusMutiDiscount(query).then(res => {
+          if (res.code === 200) {
+            this.$message({
+              message: i18n.t("label.successVal"),
+              type: "success"
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    handleLog(id) {
+      this.$refs.logListRef.handleOpen(id);
+    }
+  }
+};
+</script>
+
+<style scoped></style>

+ 654 - 0
src/views/oms/promotion/multiBuyDiscount/promotionForm.vue

@@ -0,0 +1,654 @@
+<template>
+  <el-dialog
+    element-loading-text="loading..."
+    :title="title"
+    top="0"
+    width="100%"
+    lock-scroll
+    custom-class="promotionform"
+    :close-on-click-modal="false"
+    :visible.sync="promotionFormVisible"
+    @open="handleOpenDialog"
+    @close="resetData"
+  >
+    <div v-loading="pageLoad">
+      <div class="dialog-body">
+        <el-form
+          ref="promotionFormRef"
+          :model="promotion"
+          label-width="210px"
+          size="medium"
+        >
+          <!-- 设置活动基本信息 -->
+          <div class="box base">
+            <div class="title">
+              <span>{{ basicEventInformationTitle }}</span>
+            </div>
+            <div class="info">
+              <!--促销名称-->
+              <el-form-item
+                :label="$t('label.promotionName') + ':'"
+                prop="title"
+                required
+                label-width="150px"
+              >
+                <el-input
+                  v-model.trim="promotion.title"
+                  :disabled="edit"
+                ></el-input>
+              </el-form-item>
+              <div class="item row">
+                <!--促销开始时间-->
+                <el-form-item
+                  :label="$t('label.promotionStartTime') + ':'"
+                  prop="startTime"
+                  required
+                  label-width="150px"
+                >
+                  <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"
+                  required
+                >
+                  <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.applicationMethod') + ':'"
+                prop="discountMethod"
+                required
+                label-width="150px"
+              >
+                <el-radio-group
+                  v-model="promotion.discountMethod"
+                  :disabled="edit"
+                >
+                  <div class="item row">
+                    <el-radio :label="2">{{
+                      $t("label.autoDiscount")
+                    }}</el-radio>
+                  </div>
+                </el-radio-group>
+              </el-form-item>
+            </div>
+          </div>
+          <!-- 折扣设置 -->
+          <div class="box">
+            <div class="title">
+              <span>{{ discountSettingTitle }}</span>
+            </div>
+            <div class="info">
+              <div class="item">
+                <!--最低购买要求-->
+                <el-form-item
+                  :label="$t('label.minimumPurchaseRequirement') + ':'"
+                  prop="purchaseRequire"
+                  required
+                >
+                  <el-radio-group
+                    v-model="promotion.purchaseRequire"
+                    :disabled="edit"
+                    @change="$forceUpdate()"
+                    @input="radioChange(['miniAmount', 'quantity'])"
+                  >
+                    <div class="item row">
+                      <el-radio :label="3">{{
+                        $t("label.numberStr")
+                      }}</el-radio>
+                      <el-form-item
+                        v-if="promotion.purchaseRequire === 3"
+                        prop="quantity"
+                        required
+                      >
+                        <el-input
+                          class="mininput"
+                          v-model.number="promotion.quantity"
+                          :disabled="edit"
+                          @input="changeInput($event)"
+                        >
+                          <span slot="append">{{ $t("label.item") }}</span>
+                        </el-input>
+                      </el-form-item>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-form-item
+                        v-if="promotion.purchaseRequire === 2"
+                        prop="miniAmount"
+                        :rules="rules.miniAmount"
+                      >
+                        <el-input
+                          class="mininput"
+                          v-model.number="promotion.miniAmount"
+                          :disabled="edit"
+                          @input="changeInput($event)"
+                      /></el-form-item>
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+              <div class="item">
+                <!--折扣内容-->
+                <el-form-item
+                  :label="$t('label.discountValue') + ':'"
+                  prop="valueType"
+                  required
+                >
+                  <el-radio-group
+                    v-model="promotion.valueType"
+                    :disabled="edit"
+                    @change="$forceUpdate()"
+                    @input="radioChange(['discountNumber', 'discountMoney'])"
+                  >
+                    <div class="item row">
+                      <el-radio :label="1">{{
+                        $t("label.discountStr")
+                      }}</el-radio>
+                      <el-form-item
+                        v-if="promotion.valueType === 1"
+                        prop="discountNumber"
+                        :rules="rules.discountNumber"
+                      >
+                        <el-input
+                          class="mininput"
+                          v-model.number="promotion.discountNumber"
+                          :disabled="edit"
+                          @input="changeInput($event)"
+                        >
+                          <span slot="append"> % OFF </span>
+                        </el-input>
+                      </el-form-item>
+                      <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+                      <el-form-item
+                        v-if="promotion.valueType === 2"
+                        prop="discountMoney"
+                        :rules="rules.discountMoney"
+                      >
+                        <el-input
+                          class="mininput"
+                          v-model.number="promotion.discountMoney"
+                          :disabled="edit"
+                          @input="changeInput($event)"
+                        />
+                      </el-form-item>
+                      <!-- <el-radio :label="3">{{ $t("label.free") }}</el-radio> -->
+                    </div>
+                  </el-radio-group>
+                </el-form-item>
+              </div>
+            </div>
+          </div>
+
+          <!-- 设置商品范围 -->
+          <div class="box productbox">
+            <div class="title">
+              <span>{{ productRangeTitle }}</span>
+            </div>
+            <div class="info">
+              <!-- 指定商品标签 -->
+              <el-form-item
+                v-if="!edit"
+                :label="$t('label.product') + ':'"
+                prop="tags"
+                required
+                label-width="140px"
+              >
+                <el-checkbox class="productcheckbox" v-model="checked">{{
+                  $t("label.specifyProductTag")
+                }}</el-checkbox>
+                <el-select
+                  multiple
+                  v-model="promotion.tags"
+                  @change="handleChangeProductRange"
+                  :disabled="edit"
+                >
+                  <el-option
+                    :key="index"
+                    v-for="(item, index) in $t('label.participateTypeArr')"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </el-form-item>
+              <div class="item row search" v-else>
+                <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>
+              <el-form-item
+                :label="$t('label.specifyProductTag') + ':'"
+                v-for="(data, i) in tagLists"
+                :key="i"
+                label-width="140px"
+              >
+                <!-- <el-input class="mininput" :value="item.title" :disabled="edit" /> -->
+                <div class="skutitle" :class="edit ? 'disabled' : ''">
+                  {{ data.title }}{{ $t("label.productCollection") }}
+                  {{ $t("label.all") }}{{ data.spus.length
+                  }}{{ $t("label.itemProduct") }}
+                </div>
+                <div class="skucon" :class="edit ? 'disabled' : ''">
+                  <span
+                    v-for="(item, j) in data.spus"
+                    :class="productKeys.includes(item) ? 'active' : ''"
+                    :key="j"
+                    >{{ item }},</span
+                  >
+                </div>
+              </el-form-item>
+            </div>
+          </div>
+        </el-form>
+      </div>
+      <template slot="footer">
+        <el-button
+          @click="
+            resetData();
+            promotionFormVisible = false;
+          "
+          >{{ $t("view.cancel") }}
+        </el-button>
+        <!-- 未审核时/审核驳回 状态可进行提交 -->
+        <el-button
+          type="primary"
+          :loading="submitLoading"
+          @click="handleSaveOrUpdate"
+          :disabled="edit"
+          >{{ $t("view.confirm") }}
+        </el-button>
+      </template>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import {
+  fetchDetailByIdAndVersion,
+  updateMutiDiscount
+} from "@/api/oms/order/multiBuyDiscount";
+import i18n from "@/lang";
+
+export default {
+  inject: ["reload"],
+  directives: {
+    waves
+  },
+  name: "multiBuyDiscountForm",
+  computed: {
+    setBasicEventInformation() {}
+  },
+  data() {
+    return {
+      promotionFormVisible: false,
+      submitLoading: false,
+      title: "",
+      basicEventInformationTitle: "",
+      discountSettingTitle: "",
+      productRangeTitle: "",
+      productSku: null,
+      productKeys: [],
+      tagLists: [],
+      rules: {
+        quantity: [
+          {
+            required: true,
+            message: "quantity is the number"
+          }
+        ],
+        miniAmount: [
+          {
+            required: true,
+            message: "amount is require"
+          }
+        ],
+        discountNumber: [
+          {
+            required: true,
+            message: "discount is require"
+          }
+        ],
+        discountMoney: [
+          {
+            required: true,
+            message: "amount is require"
+          }
+        ]
+      },
+      promotion: {
+        // 配置基本信息
+        id: "",
+        version: null,
+        title: "",
+        startTime: "",
+        endTime: "",
+        discountMethod: 2,
+        purchaseRequire: null,
+        quantity: null,
+        miniAmount: null,
+        discountMoney: null,
+        discountNumber: null,
+        tags: []
+      },
+      edit: true,
+      storeList: [],
+      noDataText: "加载中",
+      pageLoad: false,
+      checked: true
+    };
+  },
+  methods: {
+    radioChange(key) {
+      this.$refs.promotionFormRef.clearValidate(key);
+    },
+    changeInput(e) {
+      this.$forceUpdate();
+    },
+    getStoreList() {
+      storeList().then(res => {
+        if (res.code === 200) {
+          this.storeList = res.data;
+        }
+      });
+    },
+    async showDialog(id, edit, version) {
+      this.edit = edit;
+      await this.getStoreList();
+      if (id) {
+        // 修改配置
+        this.promotion.id = id;
+        this.promotion.version = version;
+        await this.getPromotionInfo();
+        this.title = this.edit
+          ? i18n.t("label.mutiPromotionDetailTitle")
+          : i18n.t("label.mutiPromotionUpdateTitle");
+      } else {
+        this.title = i18n.t("label.mutiPromotionCreateTitle");
+      }
+      let str = this.promotion.id ? "Detail" : "";
+      this.basicEventInformationTitle = i18n.t(
+        "label.setBasicEventInformation" + str
+      );
+      this.discountSettingTitle = i18n.t("label.discountSetting" + str);
+      this.productRangeTitle = i18n.t("label.setProductRange" + str);
+      this.promotionFormVisible = true;
+    },
+    resetData() {
+      this.promotion = {
+        // 配置基本信息
+        id: "",
+        version: null,
+        title: "",
+        startTime: "",
+        endTime: "",
+        discountMethod: 2,
+        purchaseRequire: null,
+        quantity: null,
+        miniAmount: null,
+        discountMoney: null,
+        discountNumber: null,
+        tags: [],
+        originPriceRuleId: null
+      };
+      this.tagLists = [];
+    },
+    // 款号搜索
+    handleProductSearch() {
+      this.productKeys = this.productSku.split(",");
+    },
+    handleOpenDialog() {
+      this.resetData();
+      if (this.$refs.promotionFormRef) {
+        this.$refs.promotionFormRef.clearValidate();
+      }
+    },
+    getPromotionInfo() {
+      this.pageLoad = true;
+      let { id, version } = this.promotion;
+      fetchDetailByIdAndVersion({ id, version })
+        .then(res => {
+          // 促销配置信息
+          const { priceRule, productTags } = res.data;
+          this.promotion = { ...priceRule, productTags };
+          if (priceRule.valueType === 1) {
+            let number = priceRule.numericValue * 100;
+            this.promotion.discountNumber = number;
+          } else if (priceRule.valueType === 2) {
+            this.promotion.discountMoney = priceRule.numericValue;
+          }
+          if (priceRule.purchaseRequire === 3) {
+            this.promotion.quantity = priceRule.requireValue;
+          } else if (priceRule.purchaseRequire === 2) {
+            this.promotion.miniAmount = priceRule.requireValue;
+          }
+          this.promotion.tags = productTags.map(item => item.title);
+          this.tagLists = productTags.map(item => {
+            let data = [];
+            if (item.spu) {
+              data = item.spu.split(",");
+            }
+            item.spus = data;
+            return item;
+          });
+        })
+        .finally(() => {
+          this.pageLoad = false;
+        });
+    },
+    handleSaveOrUpdate() {
+      //创建商品
+      this.$refs["promotionFormRef"].validate(valid => {
+        //通用属性验证成功
+        if (valid) {
+          this.submitLoading = true;
+          let datas = {
+            id: this.promotion.originPriceRuleId,
+            title: this.promotion.title,
+            startAt: this.promotion.startTime,
+            endAt: this.promotion.endTime,
+            purchaseRequire: this.promotion.purchaseRequire,
+            valueType: this.promotion.valueType
+          };
+          if (this.promotion.purchaseRequire === 2) {
+            datas.requireValue = this.promotion.miniAmount;
+          } else if (this.promotion.purchaseRequire === 3) {
+            datas.requireValue = this.promotion.quantity;
+          }
+          if (this.promotion.valueType === 1) {
+            datas.numericValue = this.promotion.discountNumber / 100;
+          } else {
+            datas.numericValue = this.promotion.discountMoney;
+          }
+          datas.productTags = this.tagLists.map(item => ({
+            title: item.title,
+            spus: item.spus.join(",")
+          }));
+          updateMutiDiscount(datas)
+            .then(res => {
+              if (res.code === 200) {
+                this.$message({
+                  message: i18n.t("label.successVal"),
+                  type: "success"
+                });
+                this.$emit("refresh-table");
+                this.promotionFormVisible = false;
+              }
+            })
+            .finally(() => {
+              this.submitLoading = false;
+            });
+        }
+      });
+    },
+    handleChangeProductRange(e) {
+      console.log(e);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.promotionform {
+  width: 100%;
+  height: 100%;
+  position: fixed;
+  top: 0px;
+  left: 0px;
+  .el-dialog__header {
+    padding: 36px 21px 0px 34px;
+    .el-dialog__title {
+      font-size: 18px;
+      font-weight: bold;
+      color: #ae8877;
+      line-height: 22px;
+    }
+  }
+  .el-form-item__label {
+    font-weight: 400;
+    font-size: 12px;
+  }
+  .el-dialog__body {
+    padding: 30px 10px 30px 34px;
+  }
+  .el-dialog__headerbtn {
+    top: 14px;
+    right: 14px;
+    font-weight: bold;
+    .el-icon-close {
+      font-weight: bold;
+    }
+  }
+  .el-input {
+    width: 220px !important;
+  }
+}
+</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%;
+      }
+    }
+    .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;
+  }
+  .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;
+    }
+    .active {
+      color: #fd5959;
+    }
+  }
+  .productbox {
+    border-bottom: none;
+  }
+  .search {
+    margin-bottom: 20px;
+    .productinput {
+      width: 340px !important;
+      margin-right: 12px;
+    }
+  }
+  .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;
+        }
+      }
+    }
+  }
+}
+</style>

+ 94 - 0
src/views/oms/promotion/multiBuyDiscount/promotionLogList.vue

@@ -0,0 +1,94 @@
+<template>
+  <div>
+    <el-dialog append-to-body width="420px" :visible.sync="dialogFormVisible">
+      <div class="box" v-loading="listLoading" 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
+          >
+          {{ $t("label.updateTime") }} {{ data.updateTime }}
+        </p>
+      </div>
+      <template slot="footer">
+        <el-button @click="dialogFormVisible = false"
+          >{{ $t("tagsView.close") }}
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import ElContainer from "element-ui/packages/container/src/main";
+import { fetchVersions } from "@/api/oms/order/multiBuyDiscount";
+
+export default {
+  inject: ["reload"], //刷新
+  components: {
+    ElContainer
+  },
+  name: "promotionLogList",
+  directives: {
+    waves
+  },
+  data() {
+    return {
+      dialogFormVisible: false,
+      list: [],
+      listLoading: false,
+      listQuery: {}
+    };
+  },
+  created() {},
+  computed: {},
+  methods: {
+    handleOpen(id) {
+      this.listQuery.promotionId = id;
+      this.dialogFormVisible = true;
+      this.retPage();
+    },
+    getList() {
+      this.listLoading = true;
+      fetchVersions(this.listQuery.promotionId)
+        .then(response => {
+          if (response.code === 200) {
+            this.list = response.data;
+            setTimeout(() => {
+              this.listLoading = false;
+            }, 0.5 * 1000);
+          }
+        })
+        .catch(() => {
+          setTimeout(() => {
+            this.listLoading = false;
+          }, 0.5 * 1000);
+        });
+    },
+    handleDetail(data) {
+      const { version } = data;
+      let id = this.listQuery.promotionId;
+      this.$emit("show", { id, version });
+    },
+    retPage() {
+      this.getList();
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.box {
+  max-height: 350px;
+  overflow-y: auto;
+  p {
+    margin-left: 23px;
+    color: #9f9f9f;
+    line-height: 24px;
+    a {
+      color: #ae8877;
+      margin-right: 20px;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/oms/promotion/shopifyPromotion/promotionGoodsForm.vue → src/views/oms/promotion/multiBuyDiscount/promotionVersionForm.vue

@@ -47,7 +47,7 @@ export default {
   },
   components: {},
   computed: {},
-  name: "shopifyPromotionGoodsForm",
+  name: "multiBuyDiscountGoodsForm",
   filters: {},
   data() {
     return {

+ 54 - 23
src/views/oms/promotion/promotionLogList/components/promotionLogDetail.vue

@@ -4,47 +4,56 @@
       v-loading="pageLoad"
       element-loading-text="loading..."
       :title="title"
-      width="600px"
+      width="680px"
       top="10vh"
       :close-on-click-modal="false"
       :visible="visible"
       @close="handleCloseDialog"
     >
       <div class="dialog-body">
-        <el-form :model="params" label-width="100px">
-          <!--促销名称-->
-          <el-form-item :label="$t('shopifyPromotion.logType')">
-            <el-input v-model.trim="params.remark" :disabled="edit"></el-input>
+        <el-form :model="params" label-width="160px">
+          <el-form-item :label="$t('label.promotionName')">
+            <el-input v-model.trim="params.title" :disabled="edit"></el-input>
           </el-form-item>
-
-          <el-form-item :label="$t('shopifyPromotion.executionInfo')">
+          <el-form-item :label="$t('label.promotionId')">
+            <el-input v-model.trim="params.id" :disabled="edit"></el-input>
+          </el-form-item>
+          <el-form-item :label="$t('multiBuyDiscount.logType')">
+            <el-input v-model.trim="logType" :disabled="edit"></el-input>
+          </el-form-item>
+          <el-form-item
+            :label="$t('multiBuyDiscount.executionInfo')"
+            label-width="160px"
+          >
             <el-input
               type="textarea"
-              :rows="3"
-              v-model.trim="params.remark"
+              :rows="5"
+              v-model.trim="params.requestData"
               :disabled="edit"
             ></el-input>
           </el-form-item>
-
-          <el-form-item :label="$t('shopifyPromotion.resultInfo')">
+          <el-form-item :label="$t('multiBuyDiscount.resultInfo')">
             <el-input
               type="textarea"
               :rows="3"
-              v-model.trim="params.remark"
+              v-model.trim="params.responseData"
               :disabled="edit"
             ></el-input>
           </el-form-item>
-
-          <el-form-item :label="$t('shopifyPromotion.logStatus')">
-            <el-input v-model.trim="params.remark" :disabled="edit"></el-input>
+          <el-form-item :label="$t('multiBuyDiscount.logStatus')">
+            <el-input v-model.trim="logStatus" :disabled="edit"></el-input>
           </el-form-item>
-
-          <el-form-item :label="$t('shopifyPromotion.executionTime')">
-            <el-input v-model.trim="params.remark" :disabled="edit"></el-input>
+          <el-form-item :label="$t('multiBuyDiscount.operator')">
+            <el-input
+              v-model.trim="params.operator"
+              :disabled="edit"
+            ></el-input>
           </el-form-item>
-
-          <el-form-item :label="$t('shopifyPromotion.operator')">
-            <el-input v-model.trim="params.remark" :disabled="edit"></el-input>
+          <el-form-item :label="$t('multiBuyDiscount.executionTime')">
+            <el-input
+              v-model.trim="params.operateTime"
+              :disabled="edit"
+            ></el-input>
           </el-form-item>
         </el-form>
       </div>
@@ -64,6 +73,7 @@
 
 <script>
 import waves from "@/directive/waves"; // 水波纹指令
+import i18n from "@/lang";
 
 export default {
   inject: ["reload"], //刷新
@@ -83,9 +93,30 @@ export default {
       title: "",
       edit: true,
       noDataText: "加载中",
-      pageLoad: false
+      pageLoad: false,
+      logType: "",
+      logStatus: ""
     };
   },
+  watch: {
+    "params.id": {
+      handler: function() {
+        const { operateType, status } = this.params;
+        const type = i18n
+          .t("label.operateTypeList")
+          .find(item => item.value === operateType);
+        this.logType =
+          operateType && type.label
+            ? i18n.t("label.promotions") + type.label
+            : "";
+        const result = i18n
+          .t("label.resultStatusList")
+          .find(item => item.value === status);
+        this.logStatus = status && result ? result.label : "";
+      },
+      immediate: true // 代表在wacth里声明了firstName这个方法之后立即先去执行handler方法
+    }
+  },
   methods: {
     async showDialog(id, edit) {
       this.edit = !edit;
@@ -99,7 +130,7 @@ export default {
 
 <style scoped rel="stylesheet/scss" lang="scss">
 .dialog-body {
-  height: 65vh;
+  height: 68vh;
   overflow: auto;
 }
 </style>

+ 46 - 35
src/views/oms/promotion/promotionLogList/promotionLogList.vue → src/views/oms/promotion/promotionLogList/index.vue

@@ -6,7 +6,7 @@
         style="width: 200px;"
         clearable
         class="filter-item"
-        v-model="listQuery.keywords"
+        v-model="listQuery.title"
         @keyup.enter.native="handleFilter"
       />
       <el-button
@@ -31,17 +31,30 @@
       <el-table-column type="index" width="40"></el-table-column>
 
       <el-table-column
-        :label="$t('shopifyPromotion.logType')"
+        :label="$t('label.promotionName')"
+        align="center"
+        width="220"
+        visible-overflow-tooltip
+        prop="title"
+      />
+      <el-table-column
+        :label="$t('label.promotionId')"
+        align="center"
+        width="220"
+        prop="id"
+      />
+      <el-table-column
+        :label="$t('multiBuyDiscount.logType')"
         align="center"
         width="220"
         visible-overflow-tooltip
       >
         <template v-slot="{ row }">
-          <span>{{ row.userName }}</span>
+          <span>{{ logType(row.operateType) }}</span>
         </template>
       </el-table-column>
       <el-table-column
-        :label="$t('shopifyPromotion.executionInfo')"
+        :label="$t('multiBuyDiscount.executionInfo')"
         align="center"
         width="220"
       >
@@ -50,59 +63,56 @@
             placement="bottom-start"
             width="400"
             trigger="hover"
-            :content="row.remark"
+            :content="row.requestData"
           >
-            <span slot="reference" class="tooltip">{{ row.remark }}</span>
+            <span slot="reference" class="tooltip">{{ row.requestData }}</span>
           </el-popover>
         </template>
       </el-table-column>
 
-      <el-table-column :label="$t('shopifyPromotion.resultInfo')">
+      <el-table-column :label="$t('multiBuyDiscount.resultInfo')">
         <template v-slot="{ row }">
           <el-popover
             placement="bottom-start"
             width="400"
             trigger="hover"
-            :content="row.remark"
+            :content="row.responseData"
           >
-            <span slot="reference" class="tooltip">{{ row.remark }}</span>
+            <span slot="reference" class="tooltip">{{ row.responseData }}</span>
           </el-popover>
         </template>
       </el-table-column>
       <el-table-column
-        :label="$t('shopifyPromotion.logStatus')"
+        :label="$t('multiBuyDiscount.logStatus')"
         visible-overflow-tooltip
       >
         <template v-slot="{ row }">
-          <span>{{ row.remark }}</span>
+          <span>{{
+            $t("label.resultStatusList").find(item => item.value === row.status)
+              .label
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column
-        :label="$t('shopifyPromotion.executionTime')"
+        :label="$t('multiBuyDiscount.operator')"
         visible-overflow-tooltip
-      >
-        <template v-slot="{ row }">
-          <span>{{ row.remark }}</span>
-        </template>
-      </el-table-column>
+        prop="operator"
+      />
       <el-table-column
-        :label="$t('shopifyPromotion.operator')"
+        :label="$t('multiBuyDiscount.executionTime')"
         visible-overflow-tooltip
-      >
-        <template v-slot="{ row }">
-          <span>{{ row.remark }}</span>
-        </template>
-      </el-table-column>
+        prop="operateTime"
+      />
       <el-table-column
         :label="$t('label.operation')"
         align="center"
         fixed="right"
       >
-        <template slot-scope="scope">
+        <template v-slot="{ row }">
           <a
             class="active"
             href="javascript:void(0)"
-            @click="visibleDetailDialog(scope.row)"
+            @click="visibleDetailDialog(row)"
             >{{ $t("details") }}</a
           >
         </template>
@@ -124,8 +134,9 @@
 <script>
 import waves from "@/directive/waves"; // 水波纹指令
 import SwPage from "@/views/common/swPage.vue";
-import { promotionLogs } from "@/api/oms/order/promotion";
+import { fetchLogList } from "@/api/oms/order/promotionLog";
 import DetailDialog from "./components/promotionLogDetail.vue";
+import i18n from "@/lang";
 
 export default {
   inject: ["reload"], //刷新
@@ -133,7 +144,7 @@ export default {
     SwPage,
     DetailDialog
   },
-  name: "shopifyPromotionLogList",
+  name: "multiBuyDiscountLogList",
   directives: {
     waves
   },
@@ -144,8 +155,7 @@ export default {
       total: 0,
       listLoading: false,
       listQuery: {
-        upAndDown: null,
-        keywords: null,
+        title: null,
         page: 1,
         limit: 10
       },
@@ -159,14 +169,9 @@ export default {
     this.getList();
   },
   methods: {
-    handleOpen(id) {
-      this.listQuery.promotionId = id;
-      this.dialogFormVisible = true;
-      this.retPage();
-    },
     getList() {
       this.listLoading = true;
-      promotionLogs(this.listQuery)
+      fetchLogList(this.listQuery)
         .then(response => {
           if (response.code === 200) {
             this.list = response.data.list || arr;
@@ -182,6 +187,12 @@ export default {
           }, 0.5 * 1000);
         });
     },
+    logType(val) {
+      const data = i18n
+        .t("label.operateTypeList")
+        .find(item => item.value === val);
+      return val && data ? i18n.t("label.promotions") + data.label : "";
+    },
     handleFilter() {
       this.listQuery.page = 1;
       this.getList();

+ 0 - 699
src/views/oms/promotion/shopifyPromotion/index.vue

@@ -1,699 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-container>
-      <el-main>
-        <div class="filter-container">
-          <el-input
-            :placeholder="$t('label.promotionName')"
-            style="width: 200px;"
-            clearable
-            class="filter-item"
-            v-model="listQuery.promotionName"
-            @keyup.enter.native="retPage"
-          />
-          <el-input
-            :placeholder="$t('label.promotionInfo')"
-            style="width: 200px;"
-            clearable
-            class="filter-item"
-            v-model="listQuery.promotionInfo"
-            @keyup.enter.native="retPage"
-          />
-          <el-select
-            v-model="listQuery.promotionStore"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('label.promotionStoreName')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option
-              :key="index"
-              v-for="(item, index) in storeList"
-              :label="item.storeName"
-              :value="item.storeId"
-            />
-          </el-select>
-          <el-date-picker
-            v-model="listQuery.promotionStartTime"
-            type="datetime"
-            clearable
-            format="yyyy-MM-dd HH:mm:ss"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            class="filter-item"
-            :placeholder="$t('label.promotionStartTime')"
-          ></el-date-picker>
-          <el-date-picker
-            v-model="listQuery.promotionEndTime"
-            type="datetime"
-            clearable
-            format="yyyy-MM-dd HH:mm:ss"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            class="filter-item"
-            :placeholder="$t('label.promotionEndTime')"
-            default-time="23:59:59"
-          ></el-date-picker>
-          <el-select
-            v-model="listQuery.mutual"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('label.mutual')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option :label="$t('yes')" :value="1"></el-option>
-            <el-option :label="$t('no')" :value="0"></el-option>
-          </el-select>
-          <el-select
-            v-model="listQuery.promotionStatus"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('label.promotionStatus')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option
-              :key="index"
-              v-for="(item, index) in $t('label.promotionStatusArr')"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-          <el-select
-            v-model="listQuery.conditionType"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('label.conditionType')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option
-              :key="index"
-              v-for="(item, index) in $t('label.conditionTypeArr')"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-          <el-select
-            v-model="listQuery.participateType"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('label.participateType')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option
-              :key="index"
-              v-for="(item, index) in $t('label.participateTypeArr')"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-          <el-select
-            v-model="listQuery.status"
-            clearable
-            class="filter-item"
-            style="width: 200px;"
-            :placeholder="$t('status')"
-            @keyup.enter.native="retPage"
-          >
-            <el-option :label="$t('view.enable')" :value="1"></el-option>
-            <el-option :label="$t('view.disable')" :value="0"></el-option>
-          </el-select>
-
-          <el-button
-            v-waves
-            v-has="'promotion:list'"
-            class="filter-item"
-            type="primary"
-            icon="el-icon-search"
-            @click="retPage"
-            >{{ $t("view.search") }}
-          </el-button>
-
-          <el-button
-            v-waves
-            v-has="'promotion:update'"
-            class="filter-item"
-            type="primary"
-            icon="el-icon-circle-plus-outline"
-            @click="showDialog('', true)"
-            >{{ $t("view.create") }}
-          </el-button>
-        </div>
-        <el-table
-          v-loading="listLoading"
-          :key="tableKey"
-          :data="list"
-          stripe
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;"
-        >
-          <el-table-column type="index" width="40"></el-table-column>
-
-          <el-table-column
-            :label="$t('label.promotionName')"
-            width="220"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.promotionName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.promotionInfo')"
-            align="center"
-            width="220"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.promotionInfo }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.promotionStoreName')"
-            align="center"
-            width="220"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.storeName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.promotionStartTime')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.promotionStartTime }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.promotionEndTime')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.promotionEndTime }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.participateNum')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.participateNum }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.mutual')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span v-if="row.mutual">{{ $t("yes") }}</span>
-              <span v-else>{{ $t("no") }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.participateWeight')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.participateWeight }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.participateType')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{
-                $t("label.participateTypeArr").find(
-                  item => item.value === row.participateType
-                )
-                  ? $t("label.participateTypeArr").find(
-                      item => item.value === row.participateType
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.conditionType')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{
-                $t("label.conditionTypeArr").find(
-                  item => item.value === row.conditionType
-                )
-                  ? $t("label.conditionTypeArr").find(
-                      item => item.value === row.conditionType
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.conditionValue')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span v-if="row.participateType === 'gift_consumer'">{{
-                $t("label.conditionValueUserTypeArr").find(
-                  item => item.value === row.conditionValue
-                )
-                  ? $t("label.conditionValueUserTypeArr").find(
-                      item => item.value === row.conditionValue
-                    ).label
-                  : ""
-              }}</span>
-              <span v-else>{{ row.conditionValue }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.goodsRelation')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{
-                $t("label.goodsRelationArr").find(
-                  item => item.value === row.goodsRelation
-                )
-                  ? $t("label.goodsRelationArr").find(
-                      item => item.value === row.goodsRelation
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.goodsScope')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{
-                $t("label.goodsScopeArr").find(
-                  item => item.value === row.goodsScope
-                )
-                  ? $t("label.goodsScopeArr").find(
-                      item => item.value === row.goodsScope
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.giftRelation')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{
-                $t("label.giftRelationArr").find(
-                  item => item.value === row.giftRelation
-                )
-                  ? $t("label.giftRelationArr").find(
-                      item => item.value === row.giftRelation
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.promotionStatus')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <!--不支持{{ $t('label.promotionStatusArr').find(item => item.value === row.promotionStatus)?.lable || ''}} 写法-->
-              <span>{{
-                $t("label.promotionStatusArr").find(
-                  item => item.value === row.promotionStatus
-                )
-                  ? $t("label.promotionStatusArr").find(
-                      item => item.value === row.promotionStatus
-                    ).label
-                  : ""
-              }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.checkBy')"
-            align="center"
-            width="220"
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.checkBy }}</span>
-            </template>
-          </el-table-column>
-
-          <el-table-column :label="$t('status')" align="center" width="150">
-            <template v-slot="{ row }">
-              <el-tag :type="row.status ? 'primary' : 'danger'">{{
-                row.status ? $t("view.enable") : $t("view.disable")
-              }}</el-tag>
-            </template>
-          </el-table-column>
-
-          <el-table-column
-            :label="$t('label.operation')"
-            min-width="300"
-            align="center"
-            fixed="right"
-          >
-            <template v-slot="{ row }">
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('view.edit')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotion:update'"
-                  type="primary"
-                  size="mini"
-                  icon="el-icon-edit"
-                  circle
-                  @click="showDialog(row.id, true)"
-                >
-                </el-button>
-              </el-tooltip>
-
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('view.details')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotion:list'"
-                  type="primary"
-                  size="mini"
-                  icon="el-icon-more"
-                  circle
-                  @click="showDialog(row.id, false)"
-                >
-                </el-button>
-              </el-tooltip>
-
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('view.audit')"
-                placement="top-start"
-              >
-                <el-button
-                  v-if="row.promotionStatus === 0"
-                  v-has="'promotion:check'"
-                  type="primary"
-                  size="mini"
-                  icon="el-icon-check"
-                  circle
-                  @click="handleCheck(row.id)"
-                >
-                </el-button>
-              </el-tooltip>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('label.product')"
-                placement="top-start"
-              >
-                <el-button
-                  v-if="row.goodsScope === 'part'"
-                  v-has="'promotionOrderGoods:list'"
-                  type="primary"
-                  circle
-                  size="mini"
-                  icon="el-icon-shopping-bag-1"
-                  @click="handleGoodsList(row.id, row.promotionStatus)"
-                >
-                </el-button>
-              </el-tooltip>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('label.gift')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotionGift:list'"
-                  type="primary"
-                  circle
-                  size="mini"
-                  icon="el-icon-shopping-bag-2"
-                  @click="handleGiftList(row.id, row.promotionStatus)"
-                >
-                </el-button>
-              </el-tooltip>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('view.delete')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotion:delete'"
-                  type="danger"
-                  circle
-                  size="mini"
-                  icon="el-icon-delete"
-                  @click="handleDelete(row.id)"
-                >
-                </el-button>
-              </el-tooltip>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="row.status ? $t('view.disable') : $t('view.enable')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotion:status'"
-                  :type="row.status ? 'danger' : 'primary'"
-                  circle
-                  size="mini"
-                  :icon="row.status ? 'el-icon-turn-off' : 'el-icon-open'"
-                  @click="changePromotionStatus(row.id, row.status)"
-                >
-                </el-button>
-              </el-tooltip>
-              <el-tooltip
-                class="item"
-                effect="dark"
-                :content="$t('title.operationLog')"
-                placement="top-start"
-              >
-                <el-button
-                  v-has="'promotionLog:list'"
-                  type="primary"
-                  circle
-                  size="mini"
-                  icon="el-icon-notebook-1"
-                  @click="handleLog(row.id)"
-                >
-                </el-button>
-              </el-tooltip>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!-- 分页 -->
-        <swPage
-          v-if="total > 0"
-          key="2"
-          :listQuery="listQuery"
-          :total="total"
-          pos="btmRight"
-          @retPage="getList"
-        />
-      </el-main>
-    </el-container>
-
-    <promotion-form
-      ref="promotionFormRef"
-      @refresh-table="getList"
-    ></promotion-form>
-    <promotion-gift-list ref="giftListRef"></promotion-gift-list>
-    <promotion-goods-list ref="goodsListRef"></promotion-goods-list>
-    <promotion-log-list ref="logListRef"></promotion-log-list>
-  </div>
-</template>
-
-<script>
-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/shopifyPromotion/promotionForm.vue";
-import {
-  fetchList,
-  deleteById,
-  storeList,
-  checkPromotion,
-  changeStatus
-} from "@/api/oms/order/promotion";
-import { getToken } from "@/utils/auth";
-import Vue from "vue";
-
-export default {
-  inject: ["reload"], //刷新
-  components: {
-    SwPage,
-    ElContainer,
-    PromotionForm,
-    PromotionGiftList: Vue.component("PromotionGiftList", () =>
-      import("@/views/oms/promotion/shopifyPromotion/promotionGiftList.vue")
-    ),
-    PromotionGoodsList: Vue.component("PromotionGoodsList", () =>
-      import("@/views/oms/promotion/shopifyPromotion/promotionGoodsList.vue")
-    ),
-    PromotionLogList: Vue.component("PromotionLogList", () =>
-      import("@/views/oms/promotion/shopifyPromotion/promotionLogList.vue")
-    )
-  },
-  name: "shopifyPromotion",
-  directives: {
-    waves
-  },
-  data() {
-    return {
-      activeName: "productIndex",
-      iconSize: "mini",
-      //右侧列表
-      tableKey: 0,
-      list: null,
-      total: null,
-      listLoading: false,
-      listQuery: {
-        upAndDown: null,
-        keywords: null,
-        promotionName: null,
-        promotionInfo: null,
-        promotionStore: null,
-        promotionStatus: null,
-        mutual: null,
-        status: null,
-        page: 1,
-        limit: 10
-      },
-      storeList: []
-    };
-  },
-  created() {
-    this.getList();
-    this.getStoreList();
-  },
-  computed: {
-    headers: function() {
-      return { "X-Token": getToken() };
-    }
-  },
-  methods: {
-    getStoreList() {
-      storeList().then(res => {
-        if (res.code === 200) {
-          this.storeList = res.data;
-        }
-      });
-    },
-    getList() {
-      this.listLoading = true;
-      fetchList(this.listQuery)
-        .then(response => {
-          if (response.code === 200) {
-            this.list = response.data.list;
-            this.total = response.data.total;
-            setTimeout(() => {
-              this.listLoading = false;
-            }, 0.5 * 1000);
-          }
-        })
-        .catch(() => {
-          setTimeout(() => {
-            this.listLoading = false;
-          }, 0.5 * 1000);
-        });
-    },
-    retPage() {
-      this.listQuery.page = 1;
-      this.getList();
-    },
-    handleDelete(id) {
-      this.$confirm("是否删除该记录?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        deleteById(id).then(res => {
-          if (res.code === 200) {
-            this.$message({
-              message: "操作成功",
-              type: "success"
-            });
-            this.getList();
-          }
-        });
-      });
-    },
-    showDialog(id, edit) {
-      this.$refs.promotionFormRef.showDialog(id, edit);
-    },
-    handleCheck(id) {
-      this.$confirm("是否审核通过?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        checkPromotion({ id: id }).then(res => {
-          if (res.code === 200) {
-            this.$message({
-              message: "审核成功",
-              type: "success"
-            });
-            this.getList();
-          }
-        });
-      });
-    },
-    handleGiftList(id, status) {
-      this.$refs.giftListRef.handleOpen(id, status);
-    },
-    handleGoodsList(id, status) {
-      this.$refs.goodsListRef.handleOpen(id, status);
-    },
-    changePromotionStatus(id, status) {
-      this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        changeStatus(id).then(res => {
-          if (res.code === 200) {
-            this.$message({
-              message: "操作成功",
-              type: "success"
-            });
-            this.getList();
-          }
-        });
-      });
-    },
-    handleLog(id) {
-      this.$refs.logListRef.handleOpen(id);
-    }
-  }
-};
-</script>
-
-<style scoped></style>

+ 0 - 472
src/views/oms/promotion/shopifyPromotion/promotionForm.vue

@@ -1,472 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      v-loading="pageLoad"
-      element-loading-text="loading..."
-      :title="title"
-      top="10vh"
-      :close-on-click-modal="false"
-      :visible.sync="promotionFormVisible"
-      @open="handleOpenDialog"
-      @close="resetData"
-    >
-      <div class="dialog-body">
-        <el-form
-          ref="promotionFormRef"
-          :rules="baseRule"
-          :model="promotion"
-          label-width="auto"
-        >
-          <!--促销名称-->
-          <el-form-item
-            :label="$t('label.promotionName')"
-            prop="promotionName"
-            style="width:320px"
-            required
-          >
-            <el-input
-              v-model.trim="promotion.promotionName"
-              :disabled="edit"
-            ></el-input>
-          </el-form-item>
-
-          <!--促销描述-->
-          <el-form-item
-            :label="$t('label.promotionInfo')"
-            prop="promotionInfo"
-            style="width:320px"
-            required
-          >
-            <el-input
-              v-model.trim="promotion.promotionInfo"
-              :disabled="edit"
-            ></el-input>
-          </el-form-item>
-
-          <!--促销店铺-->
-          <el-form-item
-            :label="$t('label.promotionStoreName')"
-            prop="promotionStore"
-            required
-          >
-            <el-select v-model="promotion.promotionStore" :disabled="edit">
-              <el-option
-                :key="index"
-                v-for="(item, index) in storeList"
-                :label="item.storeName"
-                :value="item.storeId"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--促销开始时间-->
-          <el-form-item
-            :label="$t('label.promotionStartTime')"
-            prop="promotionStartTime"
-            required
-          >
-            <el-date-picker
-              :disabled="edit"
-              type="datetime"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd HH:mm:ss"
-              v-model="promotion.promotionStartTime"
-            ></el-date-picker>
-          </el-form-item>
-
-          <!--促销失效时间-->
-          <el-form-item
-            :label="$t('label.promotionEndTime')"
-            prop="promotionEndTime"
-            required
-          >
-            <el-date-picker
-              :disabled="edit"
-              type="datetime"
-              placeholder="选择日期"
-              value-format="yyyy-MM-dd HH:mm:ss"
-              v-model="promotion.promotionEndTime"
-            ></el-date-picker>
-          </el-form-item>
-
-          <!--每个用户限定参与次数-->
-          <el-form-item
-            :label="$t('label.participateNum')"
-            prop="participateNum"
-            required
-          >
-            <el-input-number
-              :disabled="edit"
-              v-model="promotion.participateNum"
-              :min="1"
-              controls-position="right"
-            ></el-input-number>
-          </el-form-item>
-
-          <!--是否互斥-->
-          <el-form-item :label="$t('label.mutual')" prop="mutual" required>
-            <el-radio-group v-model="promotion.mutual" :disabled="edit">
-              <el-radio :label="true">{{ $t("yes") }}</el-radio>
-              <el-radio :label="false">{{ $t("no") }}</el-radio>
-            </el-radio-group>
-          </el-form-item>
-
-          <!--是否可叠加,只有当互斥的时候才能选择-->
-          <el-form-item
-            v-if="this.promotion.mutual == true"
-            :label="$t('label.isSuperposition')"
-            prop="isSuperposition"
-            required
-          >
-            <el-radio-group v-model="promotion.isSuperposition">
-              <el-radio :label="true">{{ $t("yes") }}</el-radio>
-              <el-radio :label="false">{{ $t("no") }}</el-radio>
-            </el-radio-group>
-          </el-form-item>
-
-          <!--促销优先级-->
-          <el-form-item
-            :label="$t('label.participateWeight')"
-            prop="participateWeight"
-            required
-          >
-            <el-input-number
-              :disabled="edit"
-              v-model="promotion.participateWeight"
-              controls-position="right"
-            ></el-input-number>
-          </el-form-item>
-
-          <!--促销类型-->
-          <el-form-item
-            :label="$t('label.participateType')"
-            prop="participateType"
-            required
-          >
-            <el-select
-              v-model="promotion.participateType"
-              @change="handleChangeParticipateType"
-              :disabled="edit"
-            >
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.participateTypeArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--条件类型-->
-          <el-form-item
-            :label="$t('label.conditionType')"
-            prop="conditionType"
-            v-if="promotion.participateType !== 'gift_all'"
-            required
-          >
-            <el-select v-model="promotion.conditionType" :disabled="edit">
-              <el-option
-                :key="index"
-                v-for="(item, index) in conditionTypeArr"
-                :label="item.label"
-                :value="item.value"
-                :disabled="item.disabled"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--条件值-->
-          <el-form-item
-            :label="$t('label.conditionValue')"
-            prop="conditionValue"
-            v-if="
-              promotion.participateType !== '' &&
-                promotion.participateType !== 'gift_all'
-            "
-            required
-            :disabled="edit"
-          >
-            <el-input-number
-              v-if="promotion.participateType === 'gift_money'"
-              v-model="promotion.conditionValue"
-              :min="0"
-              :precision="4"
-              :step="1"
-              controls-position="right"
-              :disabled="edit"
-            />
-            <el-input-number
-              v-if="promotion.participateType === 'gift_qty'"
-              v-model="promotion.conditionValue"
-              controls-position="right"
-              :disabled="edit"
-            />
-            <el-select
-              v-if="promotion.participateType === 'gift_consumer'"
-              v-model="promotion.conditionValue"
-              :disabled="edit"
-            >
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.conditionValueUserTypeArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--参加活动的商品关系-->
-          <el-form-item
-            :label="$t('label.goodsRelation')"
-            prop="goodsRelation"
-            required
-          >
-            <el-select v-model="promotion.goodsRelation" :disabled="edit">
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.goodsRelationArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--参加活动的商品范围-->
-          <el-form-item
-            :label="$t('label.goodsScope')"
-            prop="goodsScope"
-            required
-          >
-            <el-select v-model="promotion.goodsScope" :disabled="edit">
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.goodsScopeArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--赠品关系-->
-          <el-form-item
-            :label="$t('label.giftRelation')"
-            prop="giftRelation"
-            required
-          >
-            <el-select v-model="promotion.giftRelation" :disabled="edit">
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.giftRelationArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-        </el-form>
-      </div>
-
-      <template slot="footer">
-        <el-button
-          @click="
-            resetData();
-            promotionFormVisible = false;
-          "
-          >{{ $t("view.cancel") }}
-        </el-button>
-        <!-- 未审核时/审核驳回 状态可进行提交 -->
-        <el-button
-          type="primary"
-          @click="handleSaveOrUpdate"
-          v-if="promotion.promotionStatus !== 1"
-          :disabled="edit"
-          >{{ $t("view.confirm") }}
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import { getById, save, storeList, update } from "@/api/oms/order/promotion";
-import i18n from "@/lang";
-import promotion from "@/views/oms/promotion/shopifyPromotion/index.vue";
-
-export default {
-  inject: ["reload"],
-  directives: {
-    waves
-  },
-  components: {},
-  computed: {},
-  name: "shopifyPromotionForm",
-  filters: {},
-  data() {
-    return {
-      promotionFormVisible: false,
-      title: "",
-      promotion: {
-        // 配置基本信息
-        id: "",
-        promotionName: "",
-        promotionInfo: "",
-        promotionStore: "",
-        promotionStartTime: "",
-        promotionEndTime: "",
-        promotionStatus: "",
-        rejectCause: "",
-        participateNum: 1,
-        mutual: "",
-        isSuperposition: "",
-        participateWeight: 0,
-        participateType: "",
-        conditionType: "",
-        conditionValue: "",
-        goodsRelation: "",
-        goodsScope: "",
-        giftRelation: ""
-      },
-      edit: true,
-      storeList: [],
-      noDataText: "加载中",
-      baseRule: {
-        // 促销配置
-        promotionName: [
-          {
-            required: true,
-            message: "请输入促销名称",
-            trigger: ["change", "blur"]
-          },
-          {
-            min: 2,
-            max: 50,
-            message: "长度在 2 到 50 个字符",
-            trigger: ["change", "blur"]
-          }
-        ]
-      },
-      pageLoad: false,
-      conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
-        return {
-          ...item,
-          disabled: false
-        };
-      })
-    };
-  },
-  mounted() {},
-  methods: {
-    getStoreList() {
-      storeList().then(res => {
-        if (res.code === 200) {
-          this.storeList = res.data;
-        }
-      });
-    },
-    async showDialog(id, edit) {
-      this.edit = !edit;
-      await this.getStoreList();
-      if (id) {
-        // 修改配置
-        this.promotion.id = id;
-        await this.getPromotionInfo();
-      }
-      this.title = id
-        ? i18n.t("title.updateTitle")
-        : i18n.t("title.createTitle");
-      this.promotionFormVisible = true;
-    },
-    resetData() {
-      this.promotion = {
-        id: "",
-        promotionName: "",
-        promotionInfo: "",
-        promotionStartTime: "",
-        promotionEndTime: "",
-        promotionStatus: "",
-        rejectCause: "",
-        participateNum: "",
-        mutual: "",
-        participateWeight: "",
-        participateType: "",
-        conditionType: "",
-        conditionValue: "",
-        goodsRelation: "",
-        goodsScope: "",
-        giftRelation: ""
-      };
-    },
-    handleOpenDialog() {
-      this.resetData();
-      if (this.$refs.promotionFormRef) {
-        this.$refs.promotionFormRef.clearValidate();
-      }
-    },
-    getPromotionInfo() {
-      this.pageLoad = true;
-      getById(this.promotion.id).then(res => {
-        // 促销配置信息
-        this.promotion = res.data;
-        this.pageLoad = false;
-      });
-    },
-    handleSaveOrUpdate() {
-      //创建商品
-      this.$refs["promotionFormRef"].validate(valid => {
-        //通用属性验证成功
-        if (valid) {
-          // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
-          const data = {
-            ...this.promotion
-          };
-          if (!data.id) {
-            save(data).then(res => {
-              if (res.code === 200) {
-                this.$message({
-                  message: "操作成功",
-                  type: "success"
-                });
-                this.$emit("refresh-table");
-                this.promotionFormVisible = false;
-              }
-            });
-          } else {
-            update(data).then(res => {
-              if (res.code === 200) {
-                this.$message({
-                  message: "操作成功",
-                  type: "success"
-                });
-                this.$emit("refresh-table");
-                this.promotionFormVisible = false;
-              }
-            });
-          }
-        }
-      });
-    },
-    handleChangeParticipateType(e) {
-      this.conditionTypeArr.forEach(item => {
-        item.disabled = false;
-      });
-      this.promotion.conditionType = "";
-      this.promotion.conditionValue = "";
-      if (e === "gift_money" || e === "gift_qty") {
-        this.conditionTypeArr[2].disabled = true;
-      } else if (e === "gift_consumer") {
-        // gift_consumer
-        this.conditionTypeArr[0].disabled = true;
-        this.conditionTypeArr[1].disabled = true;
-        this.promotion.conditionType = this.conditionTypeArr[2].value;
-      }
-    }
-  }
-};
-</script>
-
-<style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 60vh;
-  overflow: auto;
-}
-</style>

+ 0 - 246
src/views/oms/promotion/shopifyPromotion/promotionGiftForm.vue

@@ -1,246 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      v-loading="pageLoad"
-      element-loading-text="loading..."
-      :title="title"
-      top="10vh"
-      width="40%"
-      append-to-body
-      :close-on-click-modal="false"
-      v-if="promotionGiftFormVisible"
-      :visible.sync="promotionGiftFormVisible"
-      @open="handleOpenDialog"
-    >
-      <div class="dialog-body">
-        <el-form
-          ref="promotionGiftFormRef"
-          :rules="baseRule"
-          :model="promotionGift"
-          label-width="auto"
-        >
-          <!--Sku Code-->
-          <el-form-item :label="$t('label.giftSku')" prop="giftSku" required>
-            <el-input v-model.trim="promotionGift.giftSku"></el-input>
-          </el-form-item>
-
-          <!--单次赠送数量-->
-          <el-form-item :label="$t('label.giftNum')" prop="giftNum" required>
-            <el-input-number
-              controls-position="right"
-              :min="0"
-              v-model.trim="promotionGift.giftNum"
-            ></el-input-number>
-          </el-form-item>
-
-          <!--计划赠送的总数量-->
-          <el-form-item
-            :label="$t('label.giftAllNum')"
-            prop="giftAllNum"
-            required
-          >
-            <el-input-number
-              controls-position="right"
-              :min="0"
-              v-model.trim="promotionGift.giftAllNum"
-            ></el-input-number>
-          </el-form-item>
-
-          <!--赠品库存校验类型-->
-          <el-form-item
-            :label="$t('label.giftInventoryType')"
-            prop="giftInventoryType"
-            required
-          >
-            <el-select
-              v-model="promotionGift.giftInventoryType"
-              @change="handleChangeGiftInventoryType"
-            >
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.giftInventoryTypeArr')"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--赠品库存校验仓库编码-->
-          <el-form-item
-            :label="$t('label.giftInventoryWarehouseName')"
-            prop="giftInventoryWarehouseCode"
-            v-if="promotionGift.giftInventoryType === 0"
-            required
-          >
-            <el-select
-              v-model="promotionGift.giftInventoryWarehouseCode"
-              @change="handleChangeWarehouse"
-            >
-              <el-option
-                :key="index"
-                v-for="(item, index) in warehouseArr"
-                :label="item.warehouseName"
-                :value="item.warehouseCode"
-              />
-            </el-select>
-          </el-form-item>
-
-          <!--赠品优先级-->
-          <el-form-item
-            :label="$t('label.giftPriority')"
-            prop="giftPriority"
-            required
-          >
-            <el-input-number
-              controls-position="right"
-              v-model.trim="promotionGift.giftPriority"
-            ></el-input-number>
-          </el-form-item>
-        </el-form>
-      </div>
-
-      <template slot="footer">
-        <el-button @click="promotionGiftFormVisible = false"
-          >{{ $t("view.cancel") }}
-        </el-button>
-        <el-button type="primary" @click="handleSaveOrUpdate"
-          >{{ $t("view.confirm") }}
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import {
-  getById,
-  save,
-  update,
-  warehouseList
-} from "@/api/oms/order/promotionGift";
-import i18n from "@/lang";
-
-export default {
-  inject: ["reload"],
-  directives: {
-    waves
-  },
-  components: {},
-  computed: {},
-  name: "shopifyPromotionGiftForm",
-  filters: {},
-  data() {
-    return {
-      promotionGiftFormVisible: false,
-      title: "",
-      promotionGift: {
-        id: "",
-        promotionId: "",
-        giftSku: "",
-        giftNum: "",
-        giftAllNum: "",
-        giftInventoryType: "",
-        giftInventoryWarehouseCode: "",
-        giftInventoryWarehouseName: "",
-        giftPriority: ""
-      },
-      noDataText: "加载中",
-      baseRule: {},
-      pageLoad: false,
-      warehouseArr: []
-    };
-  },
-  mounted() {},
-  methods: {
-    initWarehouse() {
-      warehouseList().then(res => {
-        if (res.code === 200) {
-          this.warehouseArr = res.data;
-        }
-      });
-    },
-    showDialog(promotionId, id) {
-      this.initWarehouse();
-      if (id) {
-        this.promotionGift.id = id;
-        this.getPromotionGiftInfo();
-      } else {
-        this.promotionGift = {
-          id: "",
-          promotionId: promotionId,
-          giftSku: "",
-          giftNum: "",
-          giftAllNum: "",
-          giftInventoryType: "",
-          giftInventoryWarehouseCode: "",
-          giftInventoryWarehouseName: "",
-          giftPriority: ""
-        };
-      }
-      this.title = id
-        ? i18n.t("title.promotionGiftTitle")
-        : i18n.t("title.promotionGiftTitle");
-      this.promotionGiftFormVisible = true;
-    },
-    handleOpenDialog() {},
-    getPromotionGiftInfo() {
-      this.pageLoad = true;
-      getById(this.promotionGift.id).then(res => {
-        // 促销配置信息
-        this.promotionGift = res.data;
-        this.pageLoad = false;
-      });
-    },
-    handleChangeGiftInventoryType(e) {
-      if (e === 1) {
-        this.promotionGift.giftInventoryWarehouseCode = "";
-        this.promotionGift.giftInventoryWarehouseName = "";
-      }
-    },
-    handleChangeWarehouse(e) {
-      this.promotionGift.giftInventoryWarehouseName = this.warehouseArr.find(
-        item => item.warehouseCode === e
-      ).warehouseName;
-    },
-    handleSaveOrUpdate() {
-      //创建商品
-      this.$refs["promotionGiftFormRef"].validate(valid => {
-        //通用属性验证成功
-        if (valid) {
-          if (this.promotionGift.id) {
-            update(this.promotionGift).then(res => {
-              if (res.code === 200) {
-                this.$message({
-                  message: "操作成功",
-                  type: "success"
-                });
-                this.$emit("refresh-table");
-                this.promotionGiftFormVisible = false;
-              }
-            });
-          } else {
-            save(this.promotionGift).then(res => {
-              if (res.code === 200) {
-                this.$message({
-                  message: "操作成功",
-                  type: "success"
-                });
-                this.$emit("refresh-table");
-                this.promotionGiftFormVisible = false;
-              }
-            });
-          }
-        }
-      });
-    }
-  }
-};
-</script>
-
-<style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
-  height: 60vh;
-  overflow: auto;
-}
-</style>

+ 0 - 423
src/views/oms/promotion/shopifyPromotion/promotionGiftList.vue

@@ -1,423 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      :title="$t('title.promotionGiftTitle')"
-      fullscreen
-      :visible.sync="dialogFormVisible"
-    >
-      <el-container>
-        <el-main>
-          <div class="filter-container">
-            <el-input
-              v-model.trim="listQuery.giftSku"
-              clearable
-              class="filter-item"
-              style="width: 200px"
-              :placeholder="$t('label.giftSku')"
-              @keyup.enter.native="retPage"
-            ></el-input>
-            <el-select
-              v-model="listQuery.giftInventoryType"
-              clearable
-              class="filter-item"
-              style="width: 200px;"
-              :placeholder="$t('label.giftInventoryType')"
-              @keyup.enter.native="retPage"
-            >
-              <el-option
-                :key="index"
-                v-for="(item, index) in $t('label.giftInventoryTypeArr')"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-
-            <el-button
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-search"
-              @click="retPage"
-              >{{ $t("view.search") }}
-            </el-button>
-
-            <el-button
-              v-if="status !== 1"
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-circle-plus-outline"
-              @click="showDialog('')"
-              >{{ $t("view.create") }}
-            </el-button>
-
-            <el-button
-              v-if="status !== 1"
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-upload"
-              @click="handleUpload"
-            >
-              {{ $t("view.import") }}
-            </el-button>
-          </div>
-          <el-table
-            v-loading="listLoading"
-            :key="tableKey"
-            :data="list"
-            stripe
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-          >
-            <el-table-column type="index" width="40"></el-table-column>
-
-            <el-table-column :label="$t('label.giftSku')" align="center">
-              <template v-slot="{ row }">
-                <span>{{ row.giftSku }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftNum')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftNum }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftAllNum')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftAllNum }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftInventoryType')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{
-                  $t("label.giftInventoryTypeArr").find(
-                    item => item.value === row.giftInventoryType
-                  )
-                    ? $t("label.giftInventoryTypeArr").find(
-                        item => item.value === row.giftInventoryType
-                      ).label
-                    : ""
-                }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftInventoryWarehouseCode')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftInventoryWarehouseCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftInventoryWarehouseName')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftInventoryWarehouseName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              :label="$t('label.giftPriority')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftPriority }}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              :label="$t('label.giftCount')"
-              align="center"
-              width="220"
-            >
-              <template v-slot="{ row }">
-                <span>{{ row.giftCount }}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              v-if="status !== 1"
-              :label="$t('label.operation')"
-              min-width="150"
-              align="center"
-            >
-              <template v-slot="{ row }">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="$t('view.edit')"
-                  placement="top-start"
-                >
-                  <el-button
-                    v-has="'promotionGift:update'"
-                    type="primary"
-                    size="mini"
-                    icon="el-icon-edit"
-                    circle
-                    @click="showDialog(row.id)"
-                  >
-                  </el-button>
-                </el-tooltip>
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="$t('view.delete')"
-                  placement="top-start"
-                >
-                  <el-button
-                    v-has="'promotionGift:delete'"
-                    type="danger"
-                    circle
-                    size="mini"
-                    icon="el-icon-delete"
-                    @click="handleDelete(row.id)"
-                  >
-                  </el-button>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页 -->
-          <swPage
-            v-if="total > 0"
-            key="2"
-            :listQuery="listQuery"
-            :total="total"
-            pos="btmRight"
-            @retPage="getList"
-          />
-        </el-main>
-      </el-container>
-
-      <template slot="footer">
-        <div class="footer-class">
-          <el-button @click="dialogFormVisible = false"
-            >{{ $t("tagsView.close") }}
-          </el-button>
-        </div>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      v-loading="pageLoad"
-      :title="$t('title.promotionGiftImport')"
-      :visible.sync="uploadVisible"
-      width="38%"
-      :destroy-on-close="true"
-      :close-on-click-modal="false"
-    >
-      <el-form label-position="right" label-width="140px">
-        <el-form-item :label="$t('label.importTemplate')">
-          <el-button class="filter-item" @click="excelTemplate" type="primary">
-            {{ $t("view.downloadImportTemplate") }}
-          </el-button>
-        </el-form-item>
-
-        <el-form-item :label="$t('label.importData')">
-          <el-upload
-            ref="uploadRef"
-            :limit="1"
-            accept=".xlsx"
-            :headers="headers"
-            :action="uploadUrl"
-            :on-success="handleFileSuccess"
-            :auto-upload="false"
-            :data="uploadData"
-            drag
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">
-              {{ $t("view.uploadFile") }}<em>{{ $t("view.clickUp") }}</em>
-            </div>
-            <div class="el-upload__tip" slot="tip">
-              {{ $t("view.xlsxFormatOnly") }}
-            </div>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="uploadVisible = false"
-          >{{ $t("view.cancel") }}
-        </el-button>
-        <el-button type="primary" @click="submitUpload"
-          >{{ $t("view.confirm") }}
-        </el-button>
-      </div>
-    </el-dialog>
-
-    <promotion-gift-form
-      ref="promotionGiftFormRef"
-      @refresh-table="getList"
-    ></promotion-gift-form>
-  </div>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import SwPage from "@/views/common/swPage.vue";
-import ElContainer from "element-ui/packages/container/src/main";
-import promotionGiftForm from "@/views/oms/promotion/promotion/promotionGiftForm.vue";
-import { fetchList, deleteById } from "@/api/oms/order/promotionGift";
-import { getToken } from "@/utils/auth";
-
-export default {
-  inject: ["reload"], //刷新
-  components: {
-    SwPage,
-    ElContainer,
-    promotionGiftForm
-  },
-  name: "shopifyPromotionGiftList",
-  directives: {
-    waves
-  },
-  data() {
-    return {
-      dialogFormVisible: false,
-      tableKey: 0,
-      list: [],
-      total: 0,
-      listLoading: false,
-      listQuery: {
-        upAndDown: null,
-        keywords: null,
-        promotionId: null,
-        giftInventoryType: null,
-        giftSku: null,
-        page: 1,
-        limit: 10
-      },
-      pageLoad: false,
-      uploadVisible: false,
-      uploadUrl: process.env.VUE_APP_OMS_API + "/promotionGift/uploadExcel",
-      uploadData: {
-        promotionId: null
-      },
-      status: "" // 1 已审核通过
-    };
-  },
-  created() {},
-  computed: {
-    headers: function() {
-      return {
-        "X-Token": getToken()
-      };
-    }
-  },
-  methods: {
-    handleOpen(id, status) {
-      this.status = status;
-      this.listQuery.promotionId = id;
-      this.uploadData.promotionId = id;
-      this.dialogFormVisible = true;
-      this.retPage();
-    },
-    getList() {
-      this.listLoading = true;
-      fetchList(this.listQuery)
-        .then(response => {
-          if (response.code === 200) {
-            this.list = response.data.list;
-            this.total = response.data.total;
-            setTimeout(() => {
-              this.listLoading = false;
-            }, 0.5 * 1000);
-          }
-        })
-        .catch(() => {
-          setTimeout(() => {
-            this.listLoading = false;
-          }, 0.5 * 1000);
-        });
-    },
-    retPage() {
-      this.listQuery.page = 1;
-      this.getList();
-    },
-    handleDelete(id) {
-      this.$confirm("是否删除该记录?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        deleteById(id).then(res => {
-          if (res.code === 200) {
-            this.$message({
-              message: "操作成功",
-              type: "success"
-            });
-            this.getList();
-          }
-        });
-      });
-    },
-    showDialog(id) {
-      this.$refs.promotionGiftFormRef.showDialog(
-        this.listQuery.promotionId,
-        id
-      );
-    },
-    excelTemplate() {
-      window.location.href =
-        process.env.VUE_APP_OMS_API + "/promotionGift/excelTemplate";
-    },
-    handleUpload() {
-      this.uploadVisible = true;
-    },
-    submitUpload() {
-      this.$refs.uploadRef.submit();
-      this.pageLoad = true;
-    },
-    //文件上传成功返回
-    handleFileSuccess(response, file, fileList) {
-      this.pageLoad = false;
-      if (file.response.code === 200) {
-        this.$message({
-          message: "导入成功",
-          type: "success"
-        });
-        this.uploadVisible = false;
-        this.getList();
-      } else {
-        this.$message.error(file.response.msg);
-        //删除上传列表中,失败的文件
-        let index = 0;
-        for (const i in fileList) {
-          if (fileList[i] == file) {
-            index = i;
-            break;
-          }
-        }
-        //移出当前文件对象
-        fileList.splice(index, 1);
-      }
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss">
-.footer-class {
-  position: fixed;
-  bottom: 20px;
-  right: 20px;
-}
-</style>

+ 0 - 349
src/views/oms/promotion/shopifyPromotion/promotionGoodsList.vue

@@ -1,349 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      :title="$t('title.promotionGoodsTitle')"
-      fullscreen
-      :visible.sync="dialogFormVisible"
-    >
-      <el-container>
-        <el-main>
-          <div class="filter-container">
-            <el-input
-              v-model.trim="listQuery.name"
-              clearable
-              class="filter-item"
-              style="width: 200px;"
-              :placeholder="$t('label.skuName')"
-              @keyup.enter.native="retPage"
-            />
-            <el-input
-              v-model.trim="listQuery.skuCode"
-              clearable
-              class="filter-item"
-              style="width: 200px;"
-              :placeholder="$t('label.goodsSku')"
-              @keyup.enter.native="retPage"
-            />
-
-            <el-button
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-search"
-              @click="retPage"
-              >{{ $t("view.search") }}
-            </el-button>
-
-            <el-button
-              v-if="status !== 1"
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-circle-plus-outline"
-              @click="showDialog('')"
-              >{{ $t("view.create") }}
-            </el-button>
-
-            <el-button
-              v-if="status !== 1"
-              v-waves
-              class="filter-item"
-              type="primary"
-              icon="el-icon-upload"
-              @click="handleUpload"
-            >
-              {{ $t("view.import") }}
-            </el-button>
-          </div>
-          <el-table
-            v-loading="listLoading"
-            :key="tableKey"
-            :data="list"
-            stripe
-            border
-            fit
-            highlight-current-row
-            style="width: 100%;"
-          >
-            <el-table-column type="index" width="40"></el-table-column>
-
-            <el-table-column :label="$t('label.skuName')" show-overflow-tooltip>
-              <template v-slot="{ row }">
-                <span>{{ row.name }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :label="$t('label.goodsSku')" align="center">
-              <template v-slot="{ row }">
-                <span>{{ row.skuCode }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :label="$t('label.price')" align="center">
-              <template v-slot="{ row }">
-                <span>{{ row.price }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :label="$t('label.color')" align="center">
-              <template v-slot="{ row }">
-                <span>{{ row.colorName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column :label="$t('label.size')" align="center">
-              <template v-slot="{ row }">
-                <span>{{ row.sizes }}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              v-if="status !== 1"
-              :label="$t('label.operation')"
-              width="150"
-              align="center"
-            >
-              <template v-slot="{ row }">
-                <el-tooltip
-                  class="item"
-                  effect="dark"
-                  :content="$t('view.delete')"
-                  placement="top-start"
-                >
-                  <el-button
-                    v-has="'promotionGift:delete'"
-                    type="danger"
-                    circle
-                    size="mini"
-                    icon="el-icon-delete"
-                    @click="handleDelete(row.id)"
-                  >
-                  </el-button>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-          </el-table>
-          <!-- 分页 -->
-          <swPage
-            v-if="total > 0"
-            key="2"
-            :listQuery="listQuery"
-            :total="total"
-            pos="btmRight"
-            @retPage="getList"
-          />
-        </el-main>
-      </el-container>
-
-      <template slot="footer">
-        <div class="footer-class">
-          <el-button @click="dialogFormVisible = false"
-            >{{ $t("tagsView.close") }}
-          </el-button>
-        </div>
-      </template>
-    </el-dialog>
-
-    <el-dialog
-      v-loading="pageLoad"
-      :title="$t('title.promotionGoodsImport')"
-      :visible.sync="uploadVisible"
-      width="38%"
-      :destroy-on-close="true"
-      :close-on-click-modal="false"
-    >
-      <el-form label-position="right" label-width="140px">
-        <el-form-item :label="$t('label.importTemplate')">
-          <el-button class="filter-item" @click="excelTemplate" type="primary">
-            {{ $t("view.downloadImportTemplate") }}
-          </el-button>
-        </el-form-item>
-
-        <el-form-item :label="$t('label.importData')">
-          <el-upload
-            ref="uploadRef"
-            :limit="1"
-            accept=".xlsx"
-            :headers="headers"
-            :action="uploadUrl"
-            :on-success="handleFileSuccess"
-            :auto-upload="false"
-            :data="uploadData"
-            drag
-          >
-            <i class="el-icon-upload"></i>
-            <div class="el-upload__text">
-              {{ $t("view.uploadFile") }}<em>{{ $t("view.clickUp") }}</em>
-            </div>
-            <div class="el-upload__tip" slot="tip">
-              {{ $t("view.xlsxFormatOnly") }}
-            </div>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="uploadVisible = false">{{
-          $t("view.cancel")
-        }}</el-button>
-        <el-button type="primary" @click="submitUpload">{{
-          $t("view.confirm")
-        }}</el-button>
-      </div>
-    </el-dialog>
-
-    <promotion-goods-form
-      ref="promotionGoodsFormRef"
-      @refresh-table="getList"
-    ></promotion-goods-form>
-  </div>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import SwPage from "@/views/common/swPage.vue";
-import ElContainer from "element-ui/packages/container/src/main";
-import promotionGoodsForm from "@/views/oms/promotion/promotion/promotionGoodsForm.vue";
-import { fetchList, deleteById } from "@/api/oms/order/promotionGoods";
-import { getToken } from "@/utils/auth";
-
-export default {
-  inject: ["reload"], //刷新
-  components: {
-    SwPage,
-    ElContainer,
-    promotionGoodsForm
-  },
-  name: "shopifyPromotionGoodsList",
-  directives: {
-    waves
-  },
-  data() {
-    return {
-      dialogFormVisible: false,
-      tableKey: 0,
-      list: [],
-      total: 0,
-      listLoading: false,
-      listQuery: {
-        upAndDown: null,
-        keywords: null,
-        promotionId: null,
-        skuCode: null,
-        name: null,
-        page: 1,
-        limit: 10
-      },
-      pageLoad: false,
-      uploadVisible: false,
-      uploadUrl:
-        process.env.VUE_APP_OMS_API + "/promotionOrderGoods/uploadExcel",
-      uploadData: {
-        promotionId: null
-      },
-      status: "" // 1 已审核通过
-    };
-  },
-  created() {},
-  computed: {
-    headers: function() {
-      return {
-        "X-Token": getToken()
-      };
-    }
-  },
-  methods: {
-    handleOpen(id, status) {
-      this.status = status;
-      this.listQuery.promotionId = id;
-      this.uploadData.promotionId = id;
-      this.dialogFormVisible = true;
-      this.retPage();
-    },
-    getList() {
-      this.listLoading = true;
-      fetchList(this.listQuery)
-        .then(response => {
-          if (response.code === 200) {
-            this.list = response.data.list;
-            this.total = response.data.total;
-            setTimeout(() => {
-              this.listLoading = false;
-            }, 0.5 * 1000);
-          }
-        })
-        .catch(() => {
-          setTimeout(() => {
-            this.listLoading = false;
-          }, 0.5 * 1000);
-        });
-    },
-    retPage() {
-      this.listQuery.page = 1;
-      this.getList();
-    },
-    handleDelete(id) {
-      this.$confirm("是否删除该记录?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        deleteById(id).then(res => {
-          if (res.code === 200) {
-            this.$message({
-              message: "操作成功",
-              type: "success"
-            });
-            this.getList();
-          }
-        });
-      });
-    },
-    showDialog(id) {
-      this.$refs.promotionGoodsFormRef.showDialog(
-        this.listQuery.promotionId,
-        id
-      );
-    },
-    excelTemplate() {
-      window.location.href =
-        process.env.VUE_APP_OMS_API + "/promotionOrderGoods/excelTemplate";
-    },
-    handleUpload() {
-      this.uploadVisible = true;
-    },
-    submitUpload() {
-      this.$refs.uploadRef.submit();
-      this.pageLoad = true;
-    },
-    //文件上传成功返回
-    handleFileSuccess(response, file, fileList) {
-      this.pageLoad = false;
-      if (file.response.code === 200) {
-        this.$message({
-          message: "导入成功",
-          type: "success"
-        });
-        this.uploadVisible = false;
-        this.getList();
-      } else {
-        this.$message.error(file.response.msg);
-        //删除上传列表中,失败的文件
-        let index = 0;
-        for (const i in fileList) {
-          if (fileList[i] == file) {
-            index = i;
-            break;
-          }
-        }
-        //移出当前文件对象
-        fileList.splice(index, 1);
-      }
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss">
-.footer-class {
-  position: fixed;
-  bottom: 20px;
-  right: 20px;
-}
-</style>

+ 0 - 139
src/views/oms/promotion/shopifyPromotion/promotionLogList.vue

@@ -1,139 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      :title="$t('title.operationLog')"
-      append-to-body
-      top="5vh"
-      width="60%"
-      :visible.sync="dialogFormVisible"
-    >
-      <div style="height: 72vh; overflow: auto">
-        <el-table
-          v-loading="listLoading"
-          :key="tableKey"
-          :data="list"
-          stripe
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;"
-        >
-          <el-table-column type="index" width="40"></el-table-column>
-
-          <el-table-column
-            :label="$t('label.operator')"
-            align="center"
-            width="220"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.userName }}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            :label="$t('label.operationTime')"
-            align="center"
-            width="220"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.createTime }}</span>
-            </template>
-          </el-table-column>
-
-          <el-table-column
-            :label="$t('label.operationMethod')"
-            align="center"
-            show-overflow-tooltip
-          >
-            <template v-slot="{ row }">
-              <span>{{ row.remark }}</span>
-            </template>
-          </el-table-column>
-        </el-table>
-        <!-- 分页 -->
-        <swPage
-          v-if="total > 0"
-          key="2"
-          :listQuery="listQuery"
-          :total="total"
-          pos="btmRight"
-          @retPage="getList"
-        />
-      </div>
-
-      <template slot="footer">
-        <el-button @click="dialogFormVisible = false"
-          >{{ $t("tagsView.close") }}
-        </el-button>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import waves from "@/directive/waves"; // 水波纹指令
-import SwPage from "@/views/common/swPage.vue";
-import ElContainer from "element-ui/packages/container/src/main";
-import { promotionLogs } from "@/api/oms/order/promotion";
-
-export default {
-  inject: ["reload"], //刷新
-  components: {
-    SwPage,
-    ElContainer
-  },
-  name: "promotionLogList",
-  directives: {
-    waves
-  },
-  data() {
-    return {
-      dialogFormVisible: false,
-      tableKey: 0,
-      list: [],
-      total: 0,
-      listLoading: false,
-      listQuery: {
-        upAndDown: null,
-        keywords: null,
-        page: 1,
-        limit: 10
-      }
-    };
-  },
-  created() {},
-  computed: {},
-  methods: {
-    handleOpen(id) {
-      this.listQuery.promotionId = id;
-      this.dialogFormVisible = true;
-      this.retPage();
-    },
-    getList() {
-      this.listLoading = true;
-      promotionLogs(this.listQuery)
-        .then(response => {
-          if (response.code === 200) {
-            this.list = response.data.list;
-            this.total = response.data.total;
-            setTimeout(() => {
-              this.listLoading = false;
-            }, 0.5 * 1000);
-          }
-        })
-        .catch(() => {
-          setTimeout(() => {
-            this.listLoading = false;
-          }, 0.5 * 1000);
-        });
-    },
-    retPage() {
-      this.listQuery.page = 1;
-      this.getList();
-    }
-  }
-};
-</script>
-
-<style scoped lang="scss"></style>

+ 420 - 244
src/views/oms/refund/components/createRefundDialog.vue

@@ -1,7 +1,7 @@
 <template>
-  <div v-loading.fullscreen.lock="detailLoading">
+  <div class="dialog_container" v-loading.fullscreen.lock="detailLoading">
     <div class="head"></div>
-    <div class="app-container">
+    <div>
       <div class="filter-container">
         <el-input
           :placeholder="$t('place.onlineShopNumber')"
@@ -47,9 +47,7 @@
     </div>
     <div class="main" v-if="show">
       <div class="box" style="margin-top: 15px;">
-        <div class="item_title">
-          <span>{{ $t("view.shippingInfo") }}</span>
-        </div>
+        <div class="item_title">{{ $t("view.shippingInfo") }}</div>
         <div class="ptitle">
           <template>
             <el-descriptions
@@ -178,203 +176,217 @@
             this.listQuery.refundType
         "
       >
-        <div class="item_title">
-          <span>{{ $t("view.refundInfo") }}</span>
-        </div>
+        <div class="item_title">{{ $t("view.refundInfo") }}</div>
         <div class="ptitle">
           <el-form
+            label-position="left"
             ref="addRefundForm"
             :model="addRefundForm"
-            label-width="auto"
           >
-            <el-form-item :label="$t('currency')">
-              <el-input
-                disabled
-                v-model="addRefundForm.currency"
-                placeholder
-                class="normal-input"
-              ></el-input>
-            </el-form-item>
-            <el-form-item :label="$t('label.expectedRefundAmount')" required>
-              <el-input
-                v-model="addRefundForm.refundTotalAmount"
-                :disabled="true"
-              />
-            </el-form-item>
-
-            <el-form-item :label="$t('label.refundMethod')" required>
-              <el-radio-group v-model="addRefundForm.refundMethod">
-                <el-radio label="system">{{
-                  $t("view.systemRefund")
-                }}</el-radio>
-                <el-radio label="manual">{{
-                  $t("view.manualRefund")
-                }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item
-              v-if="addRefundForm.refundMethod == 'manual'"
-              :label="$t('label.accountType')"
-              required
-            >
-              <el-radio-group v-model="addRefundForm.refundAccountType">
-                <el-radio label="PayPal">PayPal</el-radio>
-                <!-- 银行卡暂时隐藏 -->
-                <!-- <el-radio label="bankCard">银行卡</el-radio> -->
-                <!-- <el-radio label="Gift Card">Gift Card</el-radio> -->
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item
-              :label="$t('label.receivingAccount')"
-              v-if="
-                addRefundForm.refundMethod == 'manual' &&
-                  addRefundForm.refundAccountType == 'PayPal'
-              "
-              required
-            >
-              <el-input
-                v-model="addRefundForm.refundAccount"
-                :placeholder="$t('place.pleaseFillIn')"
-                class="normal-input"
-              ></el-input>
-            </el-form-item>
-            <el-form-item :label="$t('label.taxRefund')">
-              <el-radio-group
-                v-model="addRefundForm.refundTaxAble"
-                @change="calculateRefundAmount"
-              >
-                <el-radio label="0">{{ $t("view.noTaxRefund") }}</el-radio>
-                <el-radio label="1">{{ $t("view.taxRefund") }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item
-              v-if="addRefundForm.refundTaxAble == 1"
-              :label="$t('label.taxRefundAmount')"
-            >
-              <el-input-number
-                v-model="addRefundForm.refundTaxAmount"
-                :min="0.0"
-                :step="0.01"
-                step-strictly
-                @change="calculateRefundAmount"
-              ></el-input-number>
-            </el-form-item>
-            <!-- 选择是否退运费-->
-            <el-form-item :label="$t('label.shippingFee')">
-              <el-radio-group
-                v-model="addRefundForm.refundPostage"
-                @change="calculateRefundAmount"
-              >
-                <el-radio label="0">{{ $t("view.noRefund") }}</el-radio>
-                <el-radio label="1">{{
-                  $t("view.refundShippingFee")
-                }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item
-              v-if="addRefundForm.refundPostage == 1"
-              :label="$t('label.returnShippingFeeAmount')"
-            >
-              <el-input-number
-                v-model="addRefundForm.refundPostageAmount"
-                :min="0.0"
-                :step="0.01"
-                step-strictly
-                @change="calculateRefundAmount"
-              ></el-input-number>
-            </el-form-item>
-
-            <el-form-item
-              v-if="this.queryRefundType == 3"
-              :label="$t('label.receivingReturnWarehouse')"
-            >
-              <el-select
-                :placeholder="$t('place.pleaseSelect')"
-                clearable
-                style="width: 200px;"
-                class="filter-item"
-                v-model="addRefundForm.warehouseCode"
-                @change="ShippingLabelOption"
-              >
-                <el-option
-                  v-for="item in warehouseItems"
-                  :key="item.key"
-                  :label="item.key"
-                  :value="item.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
+            <div class="row">
+              <div class="row-item">
+                <div class="row">
+                  <el-form-item class="inputleft" :label="$t('currency')">
+                    <el-input
+                      disabled
+                      v-model="addRefundForm.currency"
+                      placeholder
+                      class="normal-input"
+                    ></el-input>
+                  </el-form-item>
+                  <el-form-item
+                    :label="$t('label.expectedRefundAmount')"
+                    required
+                  >
+                    <el-input
+                      v-model="addRefundForm.refundTotalAmount"
+                      :disabled="true"
+                    />
+                  </el-form-item>
+                </div>
+                <el-form-item :label="$t('label.refundMethod')" required>
+                  <el-radio-group v-model="addRefundForm.refundMethod">
+                    <el-radio label="system">{{
+                      $t("view.systemRefund")
+                    }}</el-radio>
+                    <el-radio label="manual">{{
+                      $t("view.manualRefund")
+                    }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item
+                  v-if="addRefundForm.refundMethod == 'manual'"
+                  :label="$t('label.accountType')"
+                  required
+                >
+                  <el-radio-group v-model="addRefundForm.refundAccountType">
+                    <el-radio label="PayPal">PayPal</el-radio>
+                    <!-- 银行卡暂时隐藏 -->
+                    <!-- <el-radio label="bankCard">银行卡</el-radio> -->
+                    <!-- <el-radio label="Gift Card">Gift Card</el-radio> -->
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item
+                  :label="$t('label.receivingAccount')"
+                  v-if="
+                    addRefundForm.refundMethod == 'manual' &&
+                      addRefundForm.refundAccountType == 'PayPal'
+                  "
+                  required
+                >
+                  <el-input
+                    v-model="addRefundForm.refundAccount"
+                    :placeholder="$t('place.pleaseFillIn')"
+                    class="normal-input"
+                  ></el-input>
+                </el-form-item>
+                <el-form-item :label="$t('label.taxRefund')">
+                  <el-radio-group
+                    v-model="addRefundForm.refundTaxAble"
+                    @change="calculateRefundAmount"
+                  >
+                    <el-radio label="0">{{ $t("view.noTaxRefund") }}</el-radio>
+                    <el-radio label="1">{{ $t("view.taxRefund") }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item
+                  v-if="addRefundForm.refundTaxAble == 1"
+                  :label="$t('label.taxRefundAmount')"
+                >
+                  <el-input-number
+                    v-model="addRefundForm.refundTaxAmount"
+                    :min="0.0"
+                    :step="0.01"
+                    step-strictly
+                    @change="calculateRefundAmount"
+                  ></el-input-number>
+                </el-form-item>
+                <!-- 选择是否退运费-->
+                <el-form-item :label="$t('label.shippingFee')">
+                  <el-radio-group
+                    v-model="addRefundForm.refundPostage"
+                    @change="calculateRefundAmount"
+                  >
+                    <el-radio label="0">{{ $t("view.noRefund") }}</el-radio>
+                    <el-radio label="1">{{
+                      $t("view.refundShippingFee")
+                    }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <el-form-item
+                  v-if="addRefundForm.refundPostage == 1"
+                  :label="$t('label.returnShippingFeeAmount')"
+                >
+                  <el-input-number
+                    v-model="addRefundForm.refundPostageAmount"
+                    :min="0.0"
+                    :step="0.01"
+                    step-strictly
+                    @change="calculateRefundAmount"
+                  ></el-input-number>
+                </el-form-item>
 
-            <el-form-item
-              v-if="addRefundForm.warehouseCode=='PSJ-G001001' ||
-              addRefundForm.warehouseCode=='PSJ-G001003' ||
-              addRefundForm.warehouseCode=='PSJ-H0000024'||
-              addRefundForm.warehouseCode=='PSJ-H0000019'||
-              addRefundForm.warehouseCode=='PSJ-H0000011'||
-              addRefundForm.warehouseCode=='PSJ-G001004'"
-              label="ShippingLabel">
-              <el-radio-group
-                v-model="addRefundForm.slUseable"
-                @change="changeSlradio()"
-              >
-                <el-radio label="0" value="0">{{
-                  $t("view.notEnabled")
-                }}</el-radio>
-                <el-radio label="1" value="1">{{
-                  $t("view.enabled")
-                }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
+                <el-form-item
+                  v-if="this.queryRefundType == 3"
+                  :label="$t('label.receivingReturnWarehouse')"
+                >
+                  <el-select
+                    :placeholder="$t('place.pleaseSelect')"
+                    clearable
+                    style="width: 200px;"
+                    class="filter-item"
+                    v-model="addRefundForm.warehouseCode"
+                    @change="ShippingLabelOption"
+                  >
+                    <el-option
+                      v-for="item in warehouseItems"
+                      :key="item.key"
+                      :label="item.key"
+                      :value="item.value"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
 
-            <el-form-item
-              v-if="
-                this.queryRefundType == 3 && this.addRefundForm.slUseable == 0
-              "
-              :label="$t('label.returnLogisticsCompanyCode')"
-            >
-              <el-input
-                v-model="addRefundForm.shipmodeId"
-                :placeholder="$t('place.pleaseFillIn')"
-                class="normal-input"
-              ></el-input>
-            </el-form-item>
-            <el-form-item
-              v-if="
-                this.queryRefundType == 3 && this.addRefundForm.slUseable == 0
-              "
-              :label="$t('label.returnLogisticsNumber')"
-            >
-              <el-input
-                v-model="addRefundForm.shippingNo"
-                :placeholder="$t('place.pleaseFillIn')"
-                class="normal-input"
-              ></el-input>
-            </el-form-item>
+                <el-form-item
+                  v-if="
+                    addRefundForm.warehouseCode == 'PSJ-G001001' ||
+                      addRefundForm.warehouseCode == 'PSJ-G001003' ||
+                      addRefundForm.warehouseCode == 'PSJ-H0000024' ||
+                      addRefundForm.warehouseCode == 'PSJ-H0000019' ||
+                      addRefundForm.warehouseCode == 'PSJ-H0000011' ||
+                      addRefundForm.warehouseCode == 'PSJ-G001004'
+                  "
+                  label="ShippingLabel"
+                >
+                  <el-radio-group
+                    v-model="addRefundForm.slUseable"
+                    @change="changeSlradio()"
+                  >
+                    <el-radio label="0" value="0">{{
+                      $t("view.notEnabled")
+                    }}</el-radio>
+                    <el-radio label="1" value="1">{{
+                      $t("view.enabled")
+                    }}</el-radio>
+                  </el-radio-group>
+                </el-form-item>
 
-            <el-form-item :label="$t('label.afterSalesInstructions')">
-              <el-input
-                type="textarea"
-                :placeholder="$t('place.enterContent')"
-                v-model="addRefundForm.notes"
-                maxlength="150"
-                show-word-limit
-              >
-              </el-input>
-            </el-form-item>
+                <el-form-item
+                  v-if="
+                    this.queryRefundType == 3 &&
+                      this.addRefundForm.slUseable == 0
+                  "
+                  :label="$t('label.returnLogisticsCompanyCode')"
+                >
+                  <el-input
+                    v-model="addRefundForm.shipmodeId"
+                    :placeholder="$t('place.pleaseFillIn')"
+                    class="normal-input"
+                  ></el-input>
+                </el-form-item>
+                <el-form-item
+                  v-if="
+                    this.queryRefundType == 3 &&
+                      this.addRefundForm.slUseable == 0
+                  "
+                  :label="$t('label.returnLogisticsNumber')"
+                >
+                  <el-input
+                    v-model="addRefundForm.shippingNo"
+                    :placeholder="$t('place.pleaseFillIn')"
+                    class="normal-input"
+                  ></el-input>
+                </el-form-item>
+              </div>
+              <div class="row-item">
+                <el-form-item :label="$t('label.afterSalesInstructions')">
+                  <el-input
+                    type="textarea"
+                    class="afertextarea"
+                    :placeholder="$t('place.enterContent')"
+                    v-model="addRefundForm.notes"
+                    :rows="4"
+                    maxlength="150"
+                    show-word-limit
+                  >
+                  </el-input>
+                </el-form-item>
 
-            <el-form-item :label="$t('label.uploadVoucher')">
-              <el-upload
-                class="avatar-uploader"
-                :action="uploadPhotos"
-                :show-file-list="false"
-                :on-success="handleAvatarSuccess"
-                :before-upload="beforeAvatarUpload"
-                :headers="headers"
-              >
-                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-              </el-upload>
-            </el-form-item>
+                <el-form-item :label="$t('label.uploadVoucher')">
+                  <el-upload
+                    class="avatar-uploader"
+                    :action="uploadPhotos"
+                    :show-file-list="false"
+                    :on-success="handleAvatarSuccess"
+                    :before-upload="beforeAvatarUpload"
+                    :headers="headers"
+                  >
+                    <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                  </el-upload>
+                </el-form-item>
+              </div>
+            </div>
           </el-form>
         </div>
 
@@ -385,6 +397,7 @@
             <el-select
               v-if="this.multipleSelection && this.multipleSelection.length > 0"
               v-model="refundReasonAss"
+              style="width: 260px;"
               :placeholder="$t('place.selectCheckedRefundReasons')"
               clearable
               @change="chooseReason(refundReasonAss, reasonListAll)"
@@ -401,7 +414,7 @@
               v-if="otherReasonFlag == '1'"
               :placeholder="$t('place.enterReason')"
               clearable
-              style="width: 200px;"
+              style="width: 220px;"
               class="filter-item"
               v-model="refundOtherReasonAss"
               @change="writeReason(refundOtherReasonAss)"
@@ -409,6 +422,7 @@
           </div>
           <div>
             <el-table
+              class="itemtable"
               ref="multipleTable"
               @selection-change="handleSelectionChange"
               style="width: 100%;"
@@ -613,14 +627,26 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column width="55" :label="$t('label.flashPurchase')" align="center">
+              <el-table-column
+                width="55"
+                :label="$t('label.flashPurchase')"
+                align="center"
+              >
                 <template slot-scope="scope">
-                  <el-checkbox v-model="scope.row.flashPurchaseFlag == 1"></el-checkbox>
+                  <el-checkbox
+                    v-model="scope.row.flashPurchaseFlag == 1"
+                  ></el-checkbox>
                 </template>
               </el-table-column>
-              <el-table-column width="55" :label="$t('label.exchangePurchase')" align="center">
+              <el-table-column
+                width="55"
+                :label="$t('label.exchangePurchase')"
+                align="center"
+              >
                 <template slot-scope="scope">
-                  <el-checkbox v-model="scope.row.exchangePurchaseFlag == 1"></el-checkbox>
+                  <el-checkbox
+                    v-model="scope.row.exchangePurchaseFlag == 1"
+                  ></el-checkbox>
                 </template>
               </el-table-column>
 
@@ -664,23 +690,99 @@
                 </template>
               </el-table-column>
             </el-table>
-
-            <div class="box" style="width:50%;margin-top: 15px;float:left">
-              {{ $t("view.totalRefund") }}:{{
-                addRefundForm.refundTotalAmount
-              }}
-            </div>
-            <div class="box" style="width:50%; margin-top: 10px;float:left">
-              <el-button
-                :style="btnStyle"
-                type="primary"
-                @click="submit(this)"
-                v-loading="btnLoading"
-                >{{ $t("save") }}</el-button
+          </div>
+        </div>
+        <!-- 多件多折折扣重算 -->
+        <div class="box" v-has="'priceRule:list'">
+          <div class="item_title">
+            {{ $t("multipleDiscountInfo.multipleDiscountReCal") }}
+          </div>
+          <div>
+            <el-table
+              :key="tableKey"
+              :data="tableOrderDeatils"
+              row-key="id"
+              stripe
+              border
+              fit
+              highlight-current-row
+            >
+              <el-table-column type="index" width="40"></el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.OriginalDiscount')"
+                align="center"
+                prop="OriginalDiscount"
               >
-            </div>
+              </el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.OriginalMoneny')"
+                align="center"
+                prop="OriginalMoneny"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.OriginalMoneny }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.afterReturnDiscount')"
+                align="center"
+                prop="afterReturnDiscount"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.afterReturnDiscount }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.afterReturnMoney')"
+                align="center"
+                prop="afterReturnMoney"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.afterReturnMoney }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.returnMoney')"
+                align="center"
+                prop="returnMoney"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.returnMoney }}
+                </template>
+              </el-table-column>
+              <el-table-column
+                :label="$t('multipleDiscountInfo.needPayMoney')"
+                align="center"
+                prop="needPayMoney"
+              >
+                <template slot-scope="scope">
+                  {{ scope.row.needPayMoney }}
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </div>
+        <div class="box total_box">
+          <div class="item_title">
+            {{ $t("view.totalRefund") }}
+          </div>
+          <div class="item_box">
+            {{ $t("view.totalRefund") }}:{{ addRefundForm.refundTotalAmount }}
           </div>
         </div>
+        <div class="box btn_box">
+          <el-button
+            :style="btnStyle"
+            class="save_btn"
+            type="primary"
+            @click="submit(this)"
+            v-loading="btnLoading"
+            >{{ $t("save") }}</el-button
+          >
+          <el-button type="danger" class="backbtn" @click="back">{{
+            $t("back")
+          }}</el-button>
+        </div>
       </div>
     </div>
   </div>
@@ -700,7 +802,7 @@ import {
 import { BigNumber } from "bignumber.js";
 import { write } from "xlsx";
 
-import tableEdit from './tableEdit'
+import tableEdit from "./tableEdit";
 
 export default {
   name: "createRefundDialog",
@@ -774,7 +876,7 @@ export default {
       refundReasonAss: "",
       refundOtherReasonAss: "",
       otherReasonFlag: "",
-      tableKey: Math.random(),
+      tableKey: Math.random()
     };
   },
   created() {
@@ -910,7 +1012,7 @@ export default {
         .toFixed(2);
     },
     handleSelectionChange(val) {
-      console.log('handleSelectionChange',val)
+      console.log("handleSelectionChange", val);
       this.refundAmount = 0;
       this.multipleSelection = val;
       if (this.multipleSelection && this.multipleSelection.length > 0) {
@@ -956,8 +1058,9 @@ export default {
       );
       console.log(this.addRefundForm.refundTotalAmount, "总退款金额");
     },
+    // 重新计算退款的金额
+    reCalReturn() {},
     checkSelectable(row) {
-      console.log('----')
       if (row.refundQuantity > 0) {
         var refcount = dcmSub(row.oldQuantity, row.refundQuantity);
         //发生退款
@@ -1237,23 +1340,23 @@ export default {
     ShippingLabelOption() {
       this.addRefundForm.slUseable = "0";
 
-     if (
-       this.listQuery.refundType == 3 &&
-       this.queryRefundType == 3 &&
-       this.addressInfo&&
-       this.addressInfo.length>0&&
-       this.addressInfo[0].receiverCountryCode == "US" &&
-       (this.addRefundForm.warehouseCode == "PSJ-H0000024"
-       || this.addRefundForm.warehouseCode == "PSJ-H0000019"
-       || this.addRefundForm.warehouseCode == "PSJ-H0000011"
-       || this.addRefundForm.warehouseCode == "PSJ-G001001"
-       || this.addRefundForm.warehouseCode == "PSJ-G001003"
-       || this.addRefundForm.warehouseCode=='PSJ-G001004')
-     ) {
-       this.addRefundForm.slUseable = "1";
-     } else {
-       this.addRefundForm.slUseable = "0";
-     }
+      if (
+        this.listQuery.refundType == 3 &&
+        this.queryRefundType == 3 &&
+        this.addressInfo &&
+        this.addressInfo.length > 0 &&
+        this.addressInfo[0].receiverCountryCode == "US" &&
+        (this.addRefundForm.warehouseCode == "PSJ-H0000024" ||
+          this.addRefundForm.warehouseCode == "PSJ-H0000019" ||
+          this.addRefundForm.warehouseCode == "PSJ-H0000011" ||
+          this.addRefundForm.warehouseCode == "PSJ-G001001" ||
+          this.addRefundForm.warehouseCode == "PSJ-G001003" ||
+          this.addRefundForm.warehouseCode == "PSJ-G001004")
+      ) {
+        this.addRefundForm.slUseable = "1";
+      } else {
+        this.addRefundForm.slUseable = "0";
+      }
     },
     changeSlradio() {
       if (this.addRefundForm.slUseable == "0") {
@@ -1297,6 +1400,9 @@ export default {
         this.refundOtherReasonAss = "";
         this.otherReasonFlag = "";
       }
+    },
+    back() {
+      this.$emit("back");
     }
   }
 };
@@ -1304,9 +1410,7 @@ export default {
 
 <style lang="scss" scoped>
 .head {
-  padding: 0 20px;
-  height: 25px;
-  box-shadow: 0px 7px 6px -6px #f8eeee;
+  padding: 0px 20px;
   display: flex;
   justify-content: space-between;
   span:nth-child(1) {
@@ -1338,22 +1442,43 @@ export default {
 .avatar-uploader-icon {
   font-size: 28px;
   color: #8c939d;
-  width: 178px;
-  height: 178px;
-  line-height: 178px;
+  width: 82px;
+  height: 82px;
+  line-height: 82px;
   text-align: center;
+  border-radius: 3px;
+  border: 1px solid #dcdfe6;
+  margin-left: 49px;
 }
 .avatar {
   width: 178px;
   height: 178px;
   display: block;
 }
-
+.dialog_container {
+  position: relative;
+}
 .main {
   margin-top: 15px;
   .box {
-    text-align: center;
-    position: relative;
+    .item_title {
+      color: #606266;
+      font-size: 16px !important;
+      line-height: 16px;
+      position: relative;
+      padding-left: 8px !important;
+      &:before {
+        position: absolute;
+        left: 0px;
+        top: 13px;
+        content: "";
+        display: inline-block;
+        width: 3px;
+        height: 13px;
+        background: #ae8877;
+        border-radius: 0px 0px 0px 0px;
+      }
+    }
     .box_item {
       padding: 0 20px;
       display: flex;
@@ -1389,14 +1514,65 @@ export default {
 .ptitle {
   display: flex;
   justify-content: space-between;
-  margin: 20px;
+  margin: 20px 0px;
   color: #1f2d3d;
   text-align: left;
   font-weight: bold;
+  width: 100%;
+  /deep/.el-descriptions__title {
+    color: #606266;
+  }
+}
+.filter-container {
+  .filter-item {
+    margin-right: 11px;
+  }
 }
-
 .container {
   display: flex; /* 使用 Flexbox 布局 */
   justify-content: space-between; /* 将盒子平均分布在容器中 */
 }
+.row {
+  width: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  /deep/.el-form-item {
+    display: flex;
+  }
+  .inputleft {
+    margin-right: 42px;
+  }
+  .row-item {
+    margin-right: 10vw;
+    &:last-child {
+      margin-right: 0px;
+    }
+  }
+  .afertextarea {
+    width: 306px;
+  }
+}
+.el-table {
+  font-size: 12px;
+  margin: 20px 0px;
+}
+.itemtable {
+  /deep/.has-gutter {
+    .el-table__cell {
+      background: #f5f0ee;
+      padding: 0px;
+    }
+  }
+}
+.total_box {
+  margin-bottom: 20px;
+}
+.btn_box {
+  position: absolute;
+  right: 0px;
+  bottom: -24px;
+  .el-button {
+    padding: 10px 37px;
+  }
+}
 </style>

+ 5 - 6
src/views/oms/refund/refundCwList.vue

@@ -204,9 +204,9 @@
         align="center"
         prop="channelStatus"
       >
-          <template slot-scope="scope">
-            {{ scope.row.channelStatus | channelStatusFilter(that) }}
-          </template>
+        <template slot-scope="scope">
+          {{ scope.row.channelStatus | channelStatusFilter(that) }}
+        </template>
       </el-table-column>
       <el-table-column
         :label="$t('label.afterSalesType')"
@@ -306,7 +306,7 @@
       >
       </el-table-column>
 
-     <el-table-column
+      <el-table-column
         label="自动退款失败原因"
         width="150"
         align="center"
@@ -403,7 +403,7 @@
       :visible.sync="refundInfoVisible"
       v-if="refundInfoVisible"
       :direction="direction"
-      :size="dialogSize"
+      size="90%"
     >
       <refundInfoDialog
         @refresh="refresh"
@@ -591,7 +591,6 @@ export default {
   data() {
     return {
       that: this,
-      dialogSize: "40%",
       direction: "rtl",
       fileList: [],
       tableKey: 0,

+ 215 - 135
src/views/oms/refund/refundDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="detail">
     <!-- 收退货仓库信息-->
     <el-card class="box-card" v-if="refundInfo.refundType == '3'">
       <el-select
@@ -34,10 +34,13 @@
       v-if="refundInfo.status == 0"
       v-loading="btnLoading"
     >
-    <!-- TODO 暂时关闭SL -->
+      <!-- TODO 暂时关闭SL -->
       <el-form
-        v-if="refundInfo.refundType == '3' &&
-            this.isShopifyLabel == true && addressInfo.receiverCountryName == 'US'"
+        v-if="
+          refundInfo.refundType == '3' &&
+            this.isShopifyLabel == true &&
+            addressInfo.receiverCountryName == 'US'
+        "
         label-width="120px"
       >
         <el-form-item label="ShippingLabel">
@@ -103,7 +106,7 @@
         label-width="80px"
       >
         <el-form-item :label="$t('label.refundMethod')">
-          <el-radio-group v-model="refundInfo.refundMethod" >
+          <el-radio-group v-model="refundInfo.refundMethod">
             <el-radio label="system">{{ $t("view.systemRefund") }}</el-radio>
             <el-radio label="manual">{{ $t("view.manualRefund") }}</el-radio>
           </el-radio-group>
@@ -113,9 +116,7 @@
           v-if="refundInfo.refundMethod == 'manual'"
           :label="$t('label.accountType')"
         >
-          <el-radio-group
-            v-model="refundInfo.refundAccountType"
-          >
+          <el-radio-group v-model="refundInfo.refundAccountType">
             <el-radio label="PayPal">PayPal</el-radio>
             <el-radio label="bankCard">银行卡</el-radio>
             <el-radio label="Gift Card">Gift Card</el-radio>
@@ -217,6 +218,7 @@
       <el-descriptions
         :title="$t('title.basicInformation')"
         :colon="false"
+        :column="6"
         border
       >
         <el-descriptions-item :label="$t('label.refundOrderNumber')"
@@ -232,8 +234,8 @@
         <el-descriptions-item :label="$t('label.totalRefundAmount')">{{
           refundInfo.refundAmount
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('label.SLFee')" span="1">
-          {{ refundInfo.slFee || '0.00'}}
+        <el-descriptions-item :label="$t('label.SLFee')">
+          {{ refundInfo.slFee || "0.00" }}
         </el-descriptions-item>
         <el-descriptions-item :label="$t('label.onlineShopOrder')"
           >{{ refundInfo.ormorder }}
@@ -249,7 +251,7 @@
         <el-descriptions-item label="实际退款金额">{{
           refundInfo.actualRefundAmount
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('label.shopifyNumber')" span="2"
+        <el-descriptions-item :label="$t('label.shopifyNumber')"
           >{{ refundInfo.cutUser }}
           <i
             style="color:blue;"
@@ -263,30 +265,28 @@
           refundInfo.refundType | refundTypeFilter(that)
         }}</el-descriptions-item>
 
-        <!-- <el-descriptions-item label="退款原因(中文)" span="2">{{
+        <!-- <el-descriptions-item label="退款原因(中文)">{{
           refundInfo.reasonContentChinese
         }}</el-descriptions-item>
 
-        <el-descriptions-item label="退款原因(English)" span="1">{{
+        <el-descriptions-item label="退款原因(English)">{{
             refundInfo.reasonContentEnglish
           }}</el-descriptions-item>
 
         <el-descriptions-item
           v-if="refundInfo.otherReason"
           label="其他原因说明"
-          span="3">{{
+          >{{
             refundInfo.otherReason
         }}</el-descriptions-item> -->
         <el-descriptions-item
           :label="$t('label.receivingReturnWarehouse')"
-          span="1"
           v-if="refundInfo.warehouseName"
         >
           {{ refundInfo.warehouseName }}
         </el-descriptions-item>
         <el-descriptions-item
           :label="$t('label.warehouseReceivingStatus')"
-          span="1"
           v-if="refundInfo.warehouseName"
         >
           {{ refundInfo.warehouseReceivingStatus }}
@@ -309,49 +309,47 @@
             v-on:click="copy"
           ></i
         ></el-descriptions-item>
-        <el-descriptions-item
-          :label="$t('label.customerServiceNote')"
-          span="3"
-          >{{ refundInfo.notes }}</el-descriptions-item
-        >
-        <el-descriptions-item :label="$t('label.buyersNote')" span="1">{{
+        <el-descriptions-item :label="$t('label.buyersNote')">{{
           refundInfo.buyNotes
         }}</el-descriptions-item>
-        <el-descriptions-item
-          :label="$t('label.customerReturnCountry')"
-          span="2"
-          >{{ addressInfo.receiverCountryName }}</el-descriptions-item
-        >
+        <el-descriptions-item :label="$t('label.customerReturnCountry')">{{
+          addressInfo.receiverCountryName
+        }}</el-descriptions-item>
 
-        <el-descriptions-item :label="$t('label.refundMethod')" span="1">
+        <el-descriptions-item :label="$t('label.refundMethod')">
           {{ refundInfo.refundMethod | refundMethodFilter(that) }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.accountType')" span="2">
+        <el-descriptions-item :label="$t('label.accountType')">
           {{ refundInfo.refundAccountType | refundAccountTypeFilter(that) }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.refundAccount')" span="2">
+        <el-descriptions-item :label="$t('label.refundAccount')">
           {{ refundInfo.refundAccount }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.isSelfPickupOrder')" span="1">
-          <span v-if="refundInfo.isSelfPickupOrder === false">{{ $t("no") }}</span>
+        <el-descriptions-item :label="$t('label.isSelfPickupOrder')">
+          <span v-if="refundInfo.isSelfPickupOrder === false">{{
+            $t("no")
+          }}</span>
           <span v-else>{{ $t("yes") }}</span>
         </el-descriptions-item>
         <!-- TODO 暂时关闭SL -->
-         <el-descriptions-item :label="$t('label.openShippingLabel')" span="1">
-            {{ refundInfo.slUseable | SlstatusFilter }}
+        <el-descriptions-item :label="$t('label.openShippingLabel')">
+          {{ refundInfo.slUseable | SlstatusFilter }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.useShippingLabel')" span="2">
+        <el-descriptions-item :label="$t('label.useShippingLabel')">
           {{ refundInfo.slFlag | SlstatusFilter }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.shippingRefundAmount')" span="1">
-          {{refundInfo.refundPostageAmount}}
+        <el-descriptions-item :label="$t('label.shippingRefundAmount')">
+          {{ refundInfo.refundPostageAmount }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.sumGiftCardRefundAmount')" span="1">
-          {{refundInfo.sumGiftCardRefundAmount}}
+        <el-descriptions-item :label="$t('label.sumGiftCardRefundAmount')">
+          {{ refundInfo.sumGiftCardRefundAmount }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.sumAiGiftCardRefundAmount')" span="1">
-          {{refundInfo.sumAiGiftCardRefundAmount}}
+        <el-descriptions-item :label="$t('label.sumAiGiftCardRefundAmount')">
+          {{ refundInfo.sumAiGiftCardRefundAmount }}
         </el-descriptions-item>
+        <el-descriptions-item :label="$t('label.customerServiceNote')">{{
+          refundInfo.notes
+        }}</el-descriptions-item>
       </el-descriptions>
     </el-card>
 
@@ -365,10 +363,11 @@
         v-for="(item, index) in orderItemInfo"
         :key="index"
         :colon="false"
+        :column="6"
         :style="titleColor(item)"
         border
       >
-        <el-descriptions-item :label="$t('label.isNoHeadFlag')" span="1">
+        <el-descriptions-item :label="$t('label.isNoHeadFlag')">
           <span v-if="item.isHeadFlag == 1">
           </span>
@@ -376,14 +375,14 @@
           </span>
         </el-descriptions-item>
-        <el-descriptions-item  :label="$t('label.noHeadFlag')" span="2">
-          <span v-if="item.isHeadFlag == 1 ">
-            {{item.ordersIdS}}
+        <el-descriptions-item :label="$t('label.noHeadFlag')">
+          <span v-if="item.isHeadFlag == 1">
+            {{ item.ordersIdS }}
           </span>
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.uniqueCode')" span="3">{{
-            item.uniqueCode
-          }}</el-descriptions-item>
+        <el-descriptions-item :label="$t('label.uniqueCode')">{{
+          item.uniqueCode
+        }}</el-descriptions-item>
         <el-descriptions-item :label="$t('label.skuCode')"
           >{{ item.skuCode }}
           <i
@@ -394,7 +393,7 @@
             v-on:click="copy"
           ></i
         ></el-descriptions-item>
-        <el-descriptions-item :label="$t('label.shopifyNumber')" span="2"
+        <el-descriptions-item :label="$t('label.shopifyNumber')"
           >{{ item.orderOnId }}
           <i
             style="color:blue;"
@@ -407,18 +406,18 @@
         <el-descriptions-item :label="$t('label.orderStatus')"
           >{{ item.orderStatus | statusFilterStatus }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.orderItemStatus')" span="2"
+        <el-descriptions-item :label="$t('label.orderItemStatus')"
           >{{ item.itemStatus | statusFilterStatus }}
         </el-descriptions-item>
 
-        <el-descriptions-item :label="$t('label.exchangeGoods')" span="1">
+        <el-descriptions-item :label="$t('label.exchangeGoods')">
           {{ item.exchangeFlag === "1" ? $t("label.yes") : $t("label.no") }}
         </el-descriptions-item>
-        <el-descriptions-item :label="$t('label.originalSKU')" span="2">
+        <el-descriptions-item :label="$t('label.originalSKU')">
           {{ item.oldSku }}
         </el-descriptions-item>
 
-        <el-descriptions-item :label="$t('label.productName')" span="2">{{
+        <el-descriptions-item :label="$t('label.productName')">{{
           item.productName
         }}</el-descriptions-item>
         <el-descriptions-item
@@ -448,14 +447,14 @@
           item.discountFee
         }}</el-descriptions-item>
         <el-descriptions-item :label="$t('label.sellerDiscount')">{{
-            item.sellerDiscount
-          }}</el-descriptions-item>
+          item.sellerDiscount
+        }}</el-descriptions-item>
         <el-descriptions-item :label="$t('label.platformDiscount')">{{
-            item.platformDiscount
-          }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('label.loanAmount')" span="2">{{
-            item.loanAmount
-          }}</el-descriptions-item>
+          item.platformDiscount
+        }}</el-descriptions-item>
+        <el-descriptions-item :label="$t('label.loanAmount')">{{
+          item.loanAmount
+        }}</el-descriptions-item>
         <el-descriptions-item :label="$t('label.status')"
           >{{ item.returnStatus | statusFiltr2 }}
         </el-descriptions-item>
@@ -479,13 +478,46 @@
     <!--
     <el-divider><i class="el-icon-magic-stick"></i></el-divider>
 -->
+    <!-- 多件多折信息 -->
+    <el-card class="box-card" v-has="'priceRule:list'">
+      <el-descriptions
+        :column="6"
+        :title="$t('discountInfo')"
+        :colon="false"
+        border
+      >
+        <el-descriptions-item
+          :label="$t('multipleDiscountInfo.OriginalDiscount')"
+          >2件9折</el-descriptions-item
+        >
+        <el-descriptions-item
+          :label="$t('multipleDiscountInfo.OriginalMoneny')"
+          >{{ addressInfo.receiverState }}</el-descriptions-item
+        >
+        <el-descriptions-item
+          :label="$t('multipleDiscountInfo.afterReturnDiscount')"
+          >{{ addressInfo.receiverCity }}</el-descriptions-item
+        >
+        <el-descriptions-item
+          :label="$t('multipleDiscountInfo.afterReturnMoney')"
+          >{{ addressInfo.receiverCity }}</el-descriptions-item
+        >
+        <el-descriptions-item :label="$t('multipleDiscountInfo.returnMoney')">{{
+          addressInfo.receiverCity
+        }}</el-descriptions-item>
+        <el-descriptions-item
+          :label="$t('multipleDiscountInfo.needPayMoney')"
+          >{{ addressInfo.receiverCity }}</el-descriptions-item
+        >
+      </el-descriptions>
+    </el-card>
     <el-card class="box-card">
       <el-descriptions
         :title="$t('title.buyerInformation')"
         :colon="false"
         border
       >
-        <el-descriptions-item :label="$t('country')" span="3">{{
+        <el-descriptions-item :label="$t('country')">{{
           addressInfo.receiverCountryName
         }}</el-descriptions-item>
         <el-descriptions-item :label="$t('state')">{{
@@ -497,19 +529,19 @@
         <el-descriptions-item :label="$t('suburb')">{{
           addressInfo.receiverDistrict
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('street')" span="3">{{
+        <el-descriptions-item :label="$t('street')">{{
           addressInfo.receiverStreet
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('address')" span="3">{{
+        <el-descriptions-item :label="$t('address')">{{
           addressInfo.receiverAddress
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('dooeNo')" span="2">{{
+        <el-descriptions-item :label="$t('dooeNo')">{{
           addressInfo.receiverAddress2
         }}</el-descriptions-item>
         <el-descriptions-item :label="$t('recipient')">{{
           addressInfo.receiverName
         }}</el-descriptions-item>
-        <el-descriptions-item :label="$t('telephone')" span="3"
+        <el-descriptions-item :label="$t('telephone')"
           >{{ addressInfo.receiverPhone
           }}<i
             style="color:blue;"
@@ -520,7 +552,7 @@
             v-on:click="copy"
           ></i
         ></el-descriptions-item>
-        <el-descriptions-item :label="$t('moPhone')" span="3"
+        <el-descriptions-item :label="$t('moPhone')"
           >{{ addressInfo.receiverMobile
           }}<i
             style="color:blue;"
@@ -531,8 +563,8 @@
             v-on:click="copy"
           ></i
         ></el-descriptions-item>
-        <el-descriptions-item :label="$t('post')" span="3"
-        >{{ addressInfo.email
+        <el-descriptions-item :label="$t('post')"
+          >{{ addressInfo.email
           }}<i
             style="color:blue;"
             v-if="addressInfo.email"
@@ -541,8 +573,8 @@
             :copy-value="addressInfo.email"
             v-on:click="copy"
           ></i
-          ></el-descriptions-item>
-        <el-descriptions-item :label="$t('refundImg')" span="3">
+        ></el-descriptions-item>
+        <el-descriptions-item :label="$t('refundImg')">
           <el-image
             style="width: 40px; height: 40px"
             :src="refundInfo.annexPath"
@@ -624,6 +656,7 @@ export default {
       isShopifyLabel: false,
       activeName: "orderItemList",
       afterSaleStatusSuccess: global.afterSaleStatusSuccess,
+      discountInfo: [],
       refundInfo: {},
       orderItemInfo: {},
       addressInfo: {},
@@ -668,7 +701,7 @@ export default {
       });
       return value;
     },
-    refundTypeFilter(key,that) {
+    refundTypeFilter(key, that) {
       var value = "";
       global.afterSaleType.forEach(refundType => {
         if (refundType.value == key) {
@@ -679,7 +712,7 @@ export default {
     },
     statusFiltr2(key) {
       var value = "";
-      if(key != null){
+      if (key != null) {
         var keys = key.split(",");
         global.returnDeatilStatus.forEach(status => {
           for (var i = 0; i < keys.length; i++) {
@@ -693,7 +726,7 @@ export default {
     },
     inboundStatusFilter(key) {
       var value = "";
-      if(key != null){
+      if (key != null) {
         var keys = key.split(",");
         global.inboundStatus.forEach(type => {
           for (var i = 0; i < keys.length; i++) {
@@ -716,7 +749,7 @@ export default {
     },
     receiveTypeFilter(key) {
       var value = "";
-      if(key != null){
+      if (key != null) {
         var keys = key.split(",");
         global.receiveType.forEach(type => {
           for (var i = 0; i < keys.length; i++) {
@@ -735,7 +768,7 @@ export default {
       } else if (key == "0") {
         return "NO";
       }
-    },
+    }
   },
   created() {
     //获取退货详情信息
@@ -754,12 +787,14 @@ export default {
 
     //选择物流公司编码,带出地址
     handelChangeReturnWarehouse() {
-      if (this.selectedWarehouseCode !== "PSJ-H0000024"
-      && this.selectedWarehouseCode !== "PSJ-H0000019"
-      && this.selectedWarehouseCode !== "PSJ-H0000011"
-      && this.selectedWarehouseCode !== "PSJ-G001001"
-      && this.selectedWarehouseCode !== "PSJ-G001003"
-      && this.selectedWarehouseCode !== "PSJ-G001004") {
+      if (
+        this.selectedWarehouseCode !== "PSJ-H0000024" &&
+        this.selectedWarehouseCode !== "PSJ-H0000019" &&
+        this.selectedWarehouseCode !== "PSJ-H0000011" &&
+        this.selectedWarehouseCode !== "PSJ-G001001" &&
+        this.selectedWarehouseCode !== "PSJ-G001003" &&
+        this.selectedWarehouseCode !== "PSJ-G001004"
+      ) {
         this.slUseAble = "0";
         this.showSlChooseLabel = 0; //展示sl的选择标签
         // 触发预估运费查询,目前只有一个仓库使用,可暂时不添加查询逻辑,后续若多仓库支持,则需要增加实时查询预估运费逻辑
@@ -774,13 +809,16 @@ export default {
       this.returnWarehouseAddress = this.returnWcodeAndAddress[
         this.selectedWarehouseCode
       ];
-      this.checkPSJWarehouse(this.returnWarehouseAddress,  this.selectedWarehouseCode);
+      this.checkPSJWarehouse(
+        this.returnWarehouseAddress,
+        this.selectedWarehouseCode
+      );
     },
     //获取退货仓库列表
     getReturnWarehouseList() {
       this.wareHouses = [];
       this.returnWcodeAndAddress = {};
-      returnWarehouseList({'limit':1000}).then(res => {
+      returnWarehouseList({ limit: 1000 }).then(res => {
         if (200 == res.code) {
           if (res.data.list != null && res.data.list.length > 0) {
             res.data.list.forEach(item1 => {
@@ -821,7 +859,10 @@ export default {
             });
           }
           //展示sl的选择标签
-          this.checkPSJWarehouse(this.returnWarehouseAddress,  this.selectedWarehouseCode);
+          this.checkPSJWarehouse(
+            this.returnWarehouseAddress,
+            this.selectedWarehouseCode
+          );
           // TODO 暂时关闭SL
           // if (this.selectedWarehouseCode == "PSJ-H0000024") {
           //   this.slUseAble = "1";
@@ -854,24 +895,24 @@ export default {
           if (200 == res.code) {
             this.addressInfo = res.data;
             this.getReturnWarehouseList();
-            if(this.addressInfo.receiverCountryCode == 'GB'){
-              this.refundInfo.warehouseCode = 'PSJ-H0000044';
-              this.selectedWarehouseCode = 'PSJ-H0000044';
+            if (this.addressInfo.receiverCountryCode == "GB") {
+              this.refundInfo.warehouseCode = "PSJ-H0000044";
+              this.selectedWarehouseCode = "PSJ-H0000044";
             }
 
-            if(this.addressInfo.receiverCountryCode == 'JP'){
-              this.refundInfo.warehouseCode = 'JPNW01';
-              this.selectedWarehouseCode = 'JPNW01';
+            if (this.addressInfo.receiverCountryCode == "JP") {
+              this.refundInfo.warehouseCode = "JPNW01";
+              this.selectedWarehouseCode = "JPNW01";
             }
 
-            if(this.addressInfo.receiverCountryCode == 'TW'){
-              this.refundInfo.warehouseCode = 'G00886001';
-              this.selectedWarehouseCode = 'G00886001';
+            if (this.addressInfo.receiverCountryCode == "TW") {
+              this.refundInfo.warehouseCode = "G00886001";
+              this.selectedWarehouseCode = "G00886001";
             }
 
-            if(this.addressInfo.receiverCountryCode == 'HK'){
-              this.refundInfo.warehouseCode = 'HKW002';
-              this.selectedWarehouseCode = 'HKW002';
+            if (this.addressInfo.receiverCountryCode == "HK") {
+              this.refundInfo.warehouseCode = "HKW002";
+              this.selectedWarehouseCode = "HKW002";
             }
           }
         });
@@ -935,18 +976,24 @@ export default {
         });
     },
     // 审核是否是派速捷仓库 美国地址
-    checkPSJWarehouse(house, code){
+    checkPSJWarehouse(house, code) {
       let shu = house.split(" ");
-      if (this.addressInfo.receiverCountryCode == 'US' && (code == "PSJ-G001003" || code == "PSJ-G001001" || code == "PSJ-H0000024"
-      || code == "PSJ-H0000019" || code == "PSJ-H0000011" || code == "PSJ-G001004")){
+      if (
+        this.addressInfo.receiverCountryCode == "US" &&
+        (code == "PSJ-G001003" ||
+          code == "PSJ-G001001" ||
+          code == "PSJ-H0000024" ||
+          code == "PSJ-H0000019" ||
+          code == "PSJ-H0000011" ||
+          code == "PSJ-G001004")
+      ) {
         this.isShopifyLabel = true;
         this.refundInfo.warehouseCode = code;
         this.slUseAble = "1";
         this.getShippingLabelAmount(this.refundInfo);
-      }else{
+      } else {
         this.isShopifyLabel = false;
       }
-
     },
     //客服审核
     handleKfCheck(status) {
@@ -1034,28 +1081,36 @@ export default {
         .then(
           res => {
             if (200 === res.code) {
-              if(res.msg==="exist"){
-                this.refundPriority="gift";
-                this.$confirm("当前订单存在礼品卡支付,执行退款将优先退还礼品卡金额", "温馨提示", {
-                  confirmButtonText: "确认",
-                  cancelButtonText: "关闭",
-                  showCancelButton:false,
-                  cancelButtonClass: 'btnCancel',
-                  type: 'warning',
-                  showClose:false
-                })
-              }else if(res.msg==="none"){
-                this.refundPriority="";
-                this.$confirm("当前售后没有可退款的支付流水,请您选择手工退款方式", "温馨提示", {
-                  confirmButtonText: "确认",
-                  cancelButtonText: "关闭",
-                  showCancelButton:false,
-                  cancelButtonClass: 'btnCancel',
-                  type: 'warning',
-                  showClose:false
-                })
-              }else{
-                this.refundPriority="";
+              if (res.msg === "exist") {
+                this.refundPriority = "gift";
+                this.$confirm(
+                  "当前订单存在礼品卡支付,执行退款将优先退还礼品卡金额",
+                  "温馨提示",
+                  {
+                    confirmButtonText: "确认",
+                    cancelButtonText: "关闭",
+                    showCancelButton: false,
+                    cancelButtonClass: "btnCancel",
+                    type: "warning",
+                    showClose: false
+                  }
+                );
+              } else if (res.msg === "none") {
+                this.refundPriority = "";
+                this.$confirm(
+                  "当前售后没有可退款的支付流水,请您选择手工退款方式",
+                  "温馨提示",
+                  {
+                    confirmButtonText: "确认",
+                    cancelButtonText: "关闭",
+                    showCancelButton: false,
+                    cancelButtonClass: "btnCancel",
+                    type: "warning",
+                    showClose: false
+                  }
+                );
+              } else {
+                this.refundPriority = "";
               }
               this.$message({
                 message: "验证通过",
@@ -1100,16 +1155,41 @@ export default {
 </script>
 
 <style lang="scss">
-//.btnCancel{
-//  float: right;
-//  margin-left: 10px;
-//  color: #fff !important;
-//  background-color: #AE8877 !important;
-//  border-color: #AE8877 !important;
-//}
-//.btnCancel:hover, .btnCancel:focus {
-//  background: #bea092 !important;
-//  border-color: #bea092 !important;
-//  color: #fff !important;
-//}
+.detail {
+  .el-descriptions__title {
+    color: #606266;
+    font-size: 16px !important;
+    line-height: 16px;
+    position: relative;
+    padding-left: 8px !important;
+    &:before {
+      position: absolute;
+      left: 0px;
+      top: 0px;
+      content: "";
+      display: inline-block;
+      width: 3px;
+      height: 13px;
+      background: #ae8877;
+      border-radius: 0px 0px 0px 0px;
+    }
+  }
+  .box-card {
+    box-shadow: none;
+    border: none;
+  }
+  .el-descriptions {
+    margin-bottom: 40px;
+    &:last-child {
+      margin-bottom: 0px;
+    }
+  }
+  .el-descriptions__body {
+    width: 100%;
+    overflow: auto;
+  }
+  .el-descriptions__table {
+    table-layout: fixed;
+  }
+}
 </style>

+ 26 - 28
src/views/oms/refund/refundList.vue

@@ -355,9 +355,7 @@
         width="120"
       >
         <template slot-scope="scope">
-          {{
-            scope.row.autoRefund === "1" ? $t("label.yes") : $t("label.no")
-          }}
+          {{ scope.row.autoRefund === "1" ? $t("label.yes") : $t("label.no") }}
         </template>
       </el-table-column>
 
@@ -374,8 +372,6 @@
         </template>
       </el-table-column>
 
-
-
       <el-table-column
         :label="$t('label.applicationTime')"
         width="160"
@@ -622,7 +618,7 @@
       :visible.sync="refundInfoVisible"
       v-if="refundInfoVisible"
       :direction="direction"
-      :size="dialogSize"
+      size="90%"
     >
       <refundInfoDialog
         @refresh="refresh"
@@ -764,9 +760,7 @@
       v-if="orderRefundVisible"
       :visible.sync="orderRefundVisible"
     >
-      <orderRefundDialog
-        :refundId="currentRefundId"
-      ></orderRefundDialog>
+      <orderRefundDialog :refundId="currentRefundId"></orderRefundDialog>
       <el-button type="danger" style="float:right" @click="backTable">{{
         $t("back")
       }}</el-button>
@@ -778,9 +772,7 @@
       v-if="orderRefundNewVisible"
       :visible.sync="orderRefundNewVisible"
     >
-      <orderRefundNewDialog
-        :refundId="currentRefundId"
-      ></orderRefundNewDialog>
+      <orderRefundNewDialog :refundId="currentRefundId"></orderRefundNewDialog>
       <el-button type="danger" style="float:right" @click="backTable">{{
         $t("back")
       }}</el-button>
@@ -791,11 +783,9 @@
       :fullscreen="true"
       v-if="createRefundVisible"
       :visible.sync="createRefundVisible"
+      custom-class="dialog_container"
     >
-      <createRefundDialog></createRefundDialog>
-      <el-button type="danger" style="float:right" @click="backTable">{{
-        $t("back")
-      }}</el-button>
+      <createRefundDialog @back="backTable" />
     </el-dialog>
 
     <el-dialog
@@ -885,8 +875,9 @@
       :destroy-on-close="true"
       :visible.sync="cargoTrackVisible"
       width="40%"
-      v-loading="listLoading">
-      <cargoTrackDialog :refundNo='selectedRefundNo'></cargoTrackDialog>
+      v-loading="listLoading"
+    >
+      <cargoTrackDialog :refundNo="selectedRefundNo"></cargoTrackDialog>
     </el-dialog>
   </div>
 </template>
@@ -983,7 +974,6 @@ export default {
   data() {
     return {
       that: this,
-      dialogSize: "40%",
       direction: "rtl",
       fileList: [],
       tableKey: 0,
@@ -1017,8 +1007,8 @@ export default {
         refundNo: "",
         timeplacedLaggerThanEqual: null,
         timeplacedLessThanEqual: null,
-        sendEmailFlag:"",
-        signInStatus: null,
+        sendEmailFlag: "",
+        signInStatus: null
       },
       dialogFormUploadVisible: false,
       formLabelWidth: "120px",
@@ -1075,8 +1065,8 @@ export default {
         shipmodeId: "",
         shippingNo: ""
       },
-      cargoTrackVisible:false,
-      selectedRefundNo:'',
+      cargoTrackVisible: false,
+      selectedRefundNo: ""
     };
   },
   created() {
@@ -1099,7 +1089,7 @@ export default {
     }
   },
   methods: {
-    handleCargoTrack(e){
+    handleCargoTrack(e) {
       this.cargoTrackVisible = true;
       this.selectedRefundNo = e.refundNo;
     },
@@ -1529,12 +1519,20 @@ export default {
 };
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 .cell > span {
   white-space: nowrap !important;
 }
-.el-button+.el-button {
-    margin-left: 10px;
-    margin-top: 10px;
+.el-button + .el-button {
+  margin-left: 10px;
+  margin-top: 10px;
+}
+.dialog_container {
+  position: relative;
+}
+.backbtn {
+  position: absolute;
+  right: 40px;
+  bottom: 6px;
 }
 </style>

+ 30 - 6
vue.config.js

@@ -27,12 +27,36 @@ module.exports = {
     },
     public: "0.0.0.0:9527", //可以实现热部署
     proxy: {
-      "/": {
-        target: "https://testfoms.gloria.com.cn",
-        changeOrigin: true
+      [process.env.VUE_APP_OAUTH_API]: {
+        target: `http://localhost:19090/sso`,
+        changeOrigin: true,
+        // logLevel: 'debug', //打印日志
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_OAUTH_API]: ''
+        }
+      },
+      [process.env.VUE_APP_PIM_API]: {
+        target: `http://localhost:18080/pim`,
+        changeOrigin: true,
+        // logLevel: 'debug', //打印日志
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_PIM_API]: ''
+        }
+      },
+      [process.env.VUE_APP_OMS_API]: {
+        target: `http://localhost:18081/oms`,
+        changeOrigin: true,
+        // logLevel: 'debug', //打印日志
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_OMS_API]: ''
+        }
       }
+      // "/": {
+      //   target: "https://testfoms.gloria.com.cn",
+      //   changeOrigin: true
+      // },
       // [process.env.VUE_APP_OAUTH_API]: {
-      //   target: `http://localhost:19090/sso` ,
+      //   target: `http://10.41.3.65:19090/sso`,
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志
       //   pathRewrite: {
@@ -40,7 +64,7 @@ module.exports = {
       //   }
       // },
       // [process.env.VUE_APP_PIM_API]: {
-      //   target: `http://localhost:18080/pim`,
+      //   target: `http://10.41.3.65:18080/pim`,
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志
       //   pathRewrite: {
@@ -48,7 +72,7 @@ module.exports = {
       //   }
       // },
       // [process.env.VUE_APP_OMS_API]: {
-      //   target: `http://localhost:18081/oms`,
+      //   target: `http://10.41.3.65:18081/oms`,
       //   changeOrigin: true,
       //   // logLevel: 'debug', //打印日志
       //   pathRewrite: {