@@ -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
@@ -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",
@@ -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) {
+ url: `/priceRule/version/${id}`,
+// 获取详情
+export function fetchDetailByIdAndVersion(query) {
+ const { id, version } = query
+ url: `/priceRule/detail/${id}/${version}`,
+// 新增&编辑多件多折
+export function updateMutiDiscount(data) {
+ url: "/priceRule/editMultiplePieceDiscount",
+ method: "post",
+ data
+// 删除折扣
+export function deleteMutiDiscount(query) {
+ url: "/priceRule/delete",
+ method: "delete",
+// 启用禁用折扣
+export function updateStatusMutiDiscount(query) {
+ url: "/priceRule/updateStatus",
@@ -0,0 +1,9 @@
+// 日志列表
+export function fetchLogList(query) {
+ url: "/priceRuleLog/list",
@@ -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",
}
};
@@ -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",
+ label: "Disable",
+ }],
+ applicationMethodList: [
+ label: "Discount code",
+ },
+ label: "Automatic discount",
+ 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',
+ label: 'Edit',
+ label: 'Delete',
+ resultStatusList: [
+ label: 'Success',
+ label: 'Fail',
+ successful: 'success',
+ fail: 'fail',
+ ruleTypeList: [
+ label: "Amount Off Order",
+ label: "Amount Off Products",
+ label: "Buy X Get Y",
+ 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",
+ label: "Specific customer segments",
+ label: "Specific customers",
+ 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",
@@ -186,7 +186,7 @@ export default {
promotionMessage: "Información promocional",
targetType: "Tipo de aplicación promocional",
useType: "Tipo de uso",
@@ -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",
@@ -402,7 +402,7 @@ export default {
promotionMessage: "プロモーション情報",
targetType: "プロモーションアプリケーションの種類",
useType: "使用タイプ",
@@ -417,9 +417,13 @@ export default {
operator: "オペレーター"
- OriginalDiscount: "元の注文に割引が適用されます",
+ multipleDiscountReCal: "複数の商品 複数の割引の再計算",
+ payMoneny: "注文支払金額",
+ multipleDiscount: "ピースが増えれば、折り目も増える",
+ OriginalDiscount: "初回注文の複数割引に関する情報",
OriginalMoneny: "元の注文の支払い金額",
- afterReturnDiscount: "満足のいく割引後の払い戻し",
+ afterReturnDiscount: "返金後の複数商品に対する複数割引に関する情報",
+ afterReturnMoney: "返金後の注文金額",
returnMoney: "返金金額",
needPayMoney: "顧客が支払う追加金額",
@@ -258,6 +258,18 @@ export default {
specificProductsDisplay: "特定の製品の表示",
regionDetails: "地域の詳細",
priority: "優先順位",
+ label: "高い",
+ label: "真ん中",
+ label: "低い",
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: 'プロモーション',
+ label: '追加した',
+ label: '改訂',
+ label: '消去',
+ label: '成功',
+ label: '失敗',
+ label: "有効にする",
+ label: "無効にする",
+ label: "割引コード",
+ label: "自動割引",
+ minimumPurchaseRequirement: '最低購入要件',
+ promotionId: 'プロモーションId',
+ promotionLevel: '昇進レベル',
+ 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: "以下の割引と併用可能",
+ label: "製品割引",
+ label: "注文割引",
+ label: "配送割引",
+ label: "すべてのお客様",
+ label: "特定の顧客セグメント",
+ label: "特定の顧客",
+ label: "製品の割引",
+ label: "送料割引",
label: "購入して無料で入手",
@@ -588,5 +734,48 @@ export default {
label: "不良品",
+ noMinimun: "最低要件なし",
+ minimunAmount: "最低購入金額($)",
+ minimunQuantity: "商品の最小数量",
+ label: "製品価格の値下げ",
+ label: "注文価格の値下げ",
+ label: "X を購入して Y をゲット",
+ label: "送料無料",
+ label: "複数のピース、複数のバックル",
+ oncePerOrder: '注文ごとに1回',
+ openShippingLabel: "shippingLabelを有効にするかどうか",
+ useShippingLabel: "配送を有効にするかどうか",
+ sumGiftCardRefundAmount: "ギフトカードの返金額",
+ sumAiGiftCardRefundAmount: "購入タイプ ギフトカード 返金額",
+ isSelfPickupOrder: "注文品を受け取るかどうか",
+ sellerDiscount: "加盟店割引",
+ platformDiscount: "プラットフォーム割引",
+ SLFee: "配送ラベル配送",
+ flashPurchase: "フラッシュセール",
+ exchangePurchase: "交換",
+ countries: '国',
+ selectedCountries: '特定の国',
+ allCountries: 'すべての国',
+ shippingRates: '貨物',
+ shippingRatesValue: '一定額を超える送料を除外する',
@@ -503,7 +503,7 @@ export default {
fixedHeader: "固定 Header",
sidebarLogo: "侧边栏 Logo"
promotionMessage: "促销信息",
targetType: "促销应用类型",
useType: "使用类型",
@@ -518,10 +518,14 @@ export default {
operator: "操作人"
- OriginalDiscount: "原单满足折扣",
+ multipleDiscountReCal: "多件多折折扣重算",
+ payMoneny: "订单支付金额",
+ multipleDiscount: "多件多折",
+ OriginalDiscount: "原单多件多折信息",
OriginalMoneny: "原单支付金额",
- afterReturnDiscount: "退款后满足折扣",
+ afterReturnDiscount: "退款后多件多折信息",
+ afterReturnMoney: "退款后订单金额",
returnMoney: "应退款金额",
- needPayMoney: "顾客额外支付金额",
+ needPayMoney: "顾客需补差价",
@@ -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: "优先级",
+ label: "高",
+ label: "中",
+ label: "低",
+ 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: '件商品',
+ label: "折扣码",
+ label: "自动折扣",
+ minimumPurchaseRequirement: '最低购买要求',
+ promotionId: '促销id',
+ promotionLevel: '促销级别',
+ discountValue: "折扣内容",
+ version: "版本",
+ setBasicEventInformation: "设置活动基本信息",
+ discountSetting: "折扣设置",
+ setProductRange: "设置商品范围",
+ setBasicEventInformationDetail: "活动基本信息",
+ discountSettingDetail: "折扣信息",
+ setProductRangeDetail: "商品范围",
+ discount: '折扣码',
+ autoDiscount: "自动促销",
+ order: "订单",
+ 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: '客户资格',
+ combination: '组合',
+ combinationLable: "可与以下折扣组合",
+ viewVersion: '查看版本',
+ updateTime: '更新时间',
+ label: "产品折扣",
+ label: "订单折扣",
+ label: "运费折扣",
+ deleteNotice: '是否删除该记录',
+ notice: '提示',
+ comfire: '确认',
+ cancel: '取消',
+ successVal: '操作成功',
+ label: '失败',
+ promotions: '促销',
+ label: '新增',
+ label: '修改',
+ label: '删除',
+ auditDisableNotice: '确认禁用吗?',
+ auditEnableNotice: '确认启用吗?',
+ label: "启用",
+ label: "禁用",
+ label: "全部客户",
+ label: "特定客户细分",
+ label: "特定客户",
label: "买就送",
@@ -565,7 +712,12 @@ export default {
],
+ noMinimun: "无最低要求",
+ minimunAmount: "最低购买金额 ($)",
+ minimunQuantity: "最低商品数量",
+ oncePerOrder: '每个订单一次',
// 促销赠品
giftSku: "Sku Code",
giftNum: "单次赠送数量",
@@ -639,5 +791,32 @@ export default {
+ label: "订单降价金额",
+ label: "产品降价金额",
+ label: "买X得Y",
+ label: "免运费",
+ label: "多件多折",
+ countries: '国家/地区',
+ selectedCountries: '特定国家/地区',
+ allCountries: '所有国家/地区',
+ shippingRates: '运费',
+ shippingRatesValue: '排除超过特定金额的运费',
@@ -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",
+ 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: "促销日志" }
]
@@ -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 {
- 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 {
- padding: 0 10px;
- text-align: center;
+.status-col {
+ padding: 0 10px;
+ text-align: center;
- //暂时性解决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 {
- width: 100%;
- .el-upload-dragger {
- height: 200px;
+//element ui upload
+.upload-container {
+ .el-upload {
+ width: 100%;
+ .el-upload-dragger {
+ 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;
+ .el-icon-close {
@@ -418,11 +418,12 @@
<!-- 多件多件信息 -->
<el-table-column
+ v-has="'priceRule:list'"
:label="$t('discountInfo')"
min-width="200"
align="center"
prop="discountInfo"
- ></el-table-column>
+ />
:label="$t('sellerDiscount')"
@@ -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>
- :label="$t('multipleDiscountInfo.OriginalDiscount')"
+ :label="$t('discountInfo')"
width="300"
prop="payId"
- >
- </el-table-column>
- :label="$t('multipleDiscountInfo.OriginalMoneny')"
+ :label="$t('multipleDiscountInfo.payMoneny')"
prop="authorization"
- <el-table-column
- :label="$t('multipleDiscountInfo.afterReturnDiscount')"
- width="300"
- align="center"
- prop="giftCardAmount"
- :label="$t('multipleDiscountInfo.returnMoney')"
- prop="currency"
- :label="$t('multipleDiscountInfo.needPayMoney')"
- prop="payMethod"
</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() {
//分页
@@ -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>
<promotionInfoTab :orderInfo="orderInfo"></promotionInfoTab>
@@ -149,11 +149,7 @@
</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">
- <discountInfoTab
- :orderGiftCards="orderGiftCards"
- ></discountInfoTab>
+ <discountInfoTab :datas="orderGiftCards"></discountInfoTab>
@@ -480,7 +474,7 @@ export default {
.el-dialog__header {
padding: 36px 21px 0px 28px;
.el-dialog__title {
- font-size: 19px;
font-weight: bold;
color: #ae8877;
line-height: 22px;
@@ -198,7 +198,12 @@
</el-table-column>
<!-- 多件多折 -->
- <el-table-column width="55" label="多件多折" align="center">
+ <el-table-column
+ width="55"
+ :label="$t('multipleDiscountInfo.multipleDiscount')"
+ align="center"
+ >
<template slot-scope="scope">
<el-checkbox v-model="scope.row.manyfoldFlag == 1"></el-checkbox>
@@ -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 :label="$t('shopifyPromotion.useType')">{{
+ <el-descriptions-item :label="$t('multiBuyDiscount.useType')">{{
orderInfo.orderType | orderTypeFilter
</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 :label="$t('shopifyPromotion.paySet')">{{
+ <el-descriptions-item :label="$t('multiBuyDiscount.paySet')">{{
orderInfo.payTime
- <el-descriptions-item :label="$t('shopifyPromotion.amountSet')">{{
+ <el-descriptions-item :label="$t('multiBuyDiscount.amountSet')">{{
orderInfo.currency
@@ -440,32 +440,32 @@
prop="sellerDiscount"
:label="$t('platformDiscount')"
prop="platformDiscount"
:label="$t('loanAmount')"
prop="loanAmount"
<el-table-column :label="$t('opt')" align="left" fixed="right" width="50">
@@ -850,7 +850,7 @@ export default {
<style>
.orderDetailDialog .el-dialog__title {
font-size: 14px;
- font-weight:bold;
@@ -448,6 +448,7 @@
@@ -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>
+ 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
+ </el-dialog>
+</template>
+<script>
+import waves from "@/directive/waves"; // 水波纹指令
+import { getById, save, storeList, update } from "@/api/oms/order/promotion";
+import i18n from "@/lang";
+ inject: ["reload"],
+ directives: {
+ waves
+ name: "productCollection",
+ data() {
+ return {
+ promotionFormVisible: false,
+ productSku: "",
+ productCollection: "买5送1商品集合 共1322件商品",
+ productKeys: [],
+ ProductList: [
+ "121J0B04B",
+ "124C2B014",
+ "132J0B06V",
+ "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 = {
+ rejectCause: "",
+ 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 {
+</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;
@@ -0,0 +1,425 @@
+ <div class="app-container">
+ <el-container>
+ <el-main>
+ <div class="filter-container">
+ :placeholder="$t('label.promotionName')"
+ style="width: 200px;"
+ clearable
+ class="filter-item"
+ v-model="listQuery.promotionName"
+ @keyup.enter.native="retPage"
+ :placeholder="$t('label.minimumPurchaseRequirement')"
+ v-model="listQuery.minimumPurchaseRequirement"
+ <el-select
+ v-model="listQuery.applicationMethod"
+ :placeholder="$t('label.applicationMethod')"
+ <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'"
+ type="primary"
+ icon="el-icon-search"
+ @click="retPage"
+ <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>
+ :label="$t('label.promotionEventName')"
+ width="220"
+ show-overflow-tooltip
+ <template v-slot="{ row }">
+ <span>{{ row.promotionName }}</span>
+ </template>
+ </el-table-column>
+ :label="$t('label.promotionId')"
+ <span>{{ row.promotionInfo }}</span>
+ :label="$t('label.participateType')"
+ <span>{{
+ $t("label.participateTypeArr").find(
+ item => item.value === row.participateType
+ )
+ ? $t("label.participateTypeArr").find(
+ ).label
+ : ""
+ :label="$t('label.promotionLevel')"
+ <span>{{ row.promotionStartTime }}</span>
+ :label="$t('label.applicationMethod')"
+ <span>{{ row.participateNum }}</span>
+ :label="$t('label.minimumPurchaseRequirement')"
+ width="160"
+ <span>{{ row.participateWeight }}</span>
+ :label="$t('label.discountValue')"
+ $t("label.conditionTypeArr").find(
+ item => item.value === row.conditionType
+ ? $t("label.conditionTypeArr").find(
+ :label="$t('label.priority')"
+ width="120"
+ :label="$t('label.stackableType')"
+ width="150"
+ :label="$t('label.promotionStartTime')"
+ :label="$t('label.promotionEndTime')"
+ <span>{{ row.promotionEndTime }}</span>
+ :label="$t('label.version')"
+ :label="$t('label.operation')"
+ min-width="180"
+ fixed="right"
+ <!-- <el-tooltip
+ class="item"
+ effect="dark"
+ :content="$t('view.edit')"
+ placement="top-start"
+ v-has="'promotion:update'"
+ size="mini"
+ icon="el-icon-edit"
+ circle
+ @click="showDialog(row.id, false)"
+ </el-tooltip> -->
+ <el-tooltip
+ :content="$t('view.details')"
+ icon="el-icon-more"
+ @click="showDialog(row.id, true)"
+ </el-tooltip>
+ :content="$t('view.delete')"
+ v-has="'promotion:delete'"
+ type="danger"
+ icon="el-icon-delete"
+ @click="handleDelete(row.id)"
+ :content="$t('label.version')"
+ v-has="'promotion:status'"
+ icon="el-icon-notebook-1"
+ @click="handleLog(row.id)"
+ :content="$t('title.operationLog')"
+ v-has="'promotionLog:list'"
+ </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)" />
+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";
+ inject: ["reload"], //刷新
+ components: {
+ SwPage,
+ ElContainer,
+ PromotionForm,
+ PromotionLogList
+ 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() };
+ 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(() => {
+ retPage() {
+ this.listQuery.page = 1;
+ handleDelete(id) {
+ this.$confirm("是否删除该记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ deleteById(id).then(res => {
+ this.$message({
+ message: "操作成功",
+ type: "success"
+ 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);
+<style scoped></style>
@@ -0,0 +1,556 @@
+ :title="title"
+ top="0"
+ width="100%"
+ custom-class="promotionform"
+ <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 class="info">
+ <!--促销名称-->
+ <el-form-item
+ :label="$t('label.promotionName') + ':'"
+ prop="promotionName"
+ style="width:418px"
+ required
+ v-model.trim="promotion.promotionName"
+ :disabled="edit"
+ ></el-input>
+ </el-form-item>
+ <div class="item">
+ <!--促销开始时间-->
+ :label="$t('label.promotionStartTime') + ':'"
+ prop="promotionStartTime"
+ <el-date-picker
+ type="datetime"
+ placeholder="选择日期"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ v-model="promotion.promotionStartTime"
+ ></el-date-picker>
+ <!--促销失效时间-->
+ :label="$t('label.promotionEndTime') + ':'"
+ prop="promotionEndTime"
+ v-model="promotion.promotionEndTime"
+ <!--应用方式-->
+ :label="$t('label.applicationMethod') + ':'"
+ prop="mutual"
+ <el-radio-group v-model="promotion.mutual" :disabled="edit">
+ <div class="item row">
+ <el-radio :label="true">{{ $t("label.discount") }}</el-radio>
+ class="codeinput"
+ <el-radio :label="false">{{
+ $t("label.autoDiscount")
+ }}</el-radio>
+ </el-radio-group>
+ <!-- 折扣设置 -->
+ <span>{{ $t("label.discountSetting") }}</span>
+ <!--最低购买要求-->
+ :label="$t('label.minimumPurchaseRequirement') + ':'"
+ <el-radio :label="true">{{
+ $t("label.discount")
+ <!--促销级别-->
+ :label="$t('label.promotionLevel') + ':'"
+ <el-radio :label="true">{{ $t("label.order") }}</el-radio>
+ <el-radio :label="false">{{ $t("label.product") }}</el-radio>
+ <!--折扣内容-->
+ :label="$t('label.discountValue') + ':'"
+ :label="$t('label.priority') + ':'"
+ <el-radio
+ v-for="(item, i) in $t('label.priorityValue')"
+ :label="item.value"
+ >{{ item.label }}</el-radio
+ <!--可叠加类型-->
+ :label="$t('label.stackableTypes') + ':'"
+ prop="stackableType"
+ <el-checkbox-group
+ v-model="promotion.stackableType"
+ <el-checkbox
+ v-for="(item, i) in $t('label.stackableTypesValue')"
+ >{{ item.label }}</el-checkbox
+ </el-checkbox-group>
+ <!-- 设置商品范围 -->
+ <div class="box productbox">
+ <span>{{ $t("label.setProductRange") }}</span>
+ <!-- 指定商品标签 -->
+ :label="$t('label.product') + ':'"
+ prop="participateType"
+ multiple
+ v-model="promotion.participateType"
+ @change="handleChangeParticipateType"
+ v-for="(item, index) in $t('label.participateTypeArr')"
+ :label="item.label"
+ :value="item.value"
+ :label="$t('label.specifyProductTag') + ':'"
+ 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
+ </el-form>
+ <template slot="footer">
+ @click="
+ resetData();
+ promotionFormVisible = false;
+ "
+ >{{ $t("view.cancel") }}
+ <!-- 未审核时/审核驳回 状态可进行提交 -->
+ @click="handleSaveOrUpdate"
+ v-if="promotion.promotionStatus !== 1"
+ >{{ $t("view.confirm") }}
+import promotion from "@/views/oms/promotion/multiBuyDiscount/index.vue";
+ components: {},
+ computed: {},
+ name: "multiBuyDiscountForm",
+ filters: {},
+ title: "",
+ promotionInfo: "",
+ promotionStore: "",
+ participateNum: 1,
+ mutual: "",
+ isSuperposition: "",
+ participateWeight: 0,
+ conditionValue: "",
+ goodsRelation: "",
+ goodsScope: "",
+ giftRelation: ""
+ edit: true,
+ baseRule: {
+ // 促销配置
+ promotionName: [
+ required: true,
+ message: "请输入促销名称",
+ trigger: ["change", "blur"]
+ min: 2,
+ max: 50,
+ message: "长度在 2 到 50 个字符",
+ ]
+ pageLoad: false,
+ conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
+ ...item,
+ disabled: false
+ mounted() {},
+ async showDialog(id, edit) {
+ this.edit = !edit;
+ await this.getStoreList();
+ this.title = id
+ ? i18n.t("title.updateTitle")
+ : i18n.t("title.createTitle");
+ participateNum: "",
+ participateWeight: "",
+ giftRelation: "",
+ stackableType: []
+ if (this.$refs.promotionFormRef) {
+ this.$refs.promotionFormRef.clearValidate();
+ handleSaveOrUpdate() {
+ //创建商品
+ this.$refs["promotionFormRef"].validate(valid => {
+ //通用属性验证成功
+ if (valid) {
+ // 如果需要在促销类型买就送的情况下将条件类型和条件值改为 "0" 则可在此修改 暂时默认为空字符
+ const data = {
+ ...this.promotion
+ if (!data.id) {
+ save(data).then(res => {
+ this.$emit("refresh-table");
+ this.promotionFormVisible = false;
+ } else {
+ update(data).then(res => {
+ 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;
+.promotionform {
+ height: 100%;
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ .el-dialog__header {
+ padding: 36px 21px 0px 34px;
+ .el-form-item__label {
+ font-weight: 400;
+ .box {
+ border-bottom: 1px solid #d8d8d8;
+ padding-bottom: 20px;
+ margin-bottom: 42px;
+ .title {
+ color: #606266;
+ font-size: 16px;
+ padding-left: 6px;
+ margin-bottom: 23px;
+ &:before {
+ position: absolute;
+ 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;
+ height: 139px;
+ .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;
+ margin-right: 30px;
+ .el-input__inner {
+ width: 142px;
@@ -0,0 +1,760 @@
+ <div>
+ label-width="210px"
+ <!-- 活动基本信息 -->
+ <div class="box base">
+ <span>{{ $t("label.setBasicEventInformationDetail") }}</span>
+ prop="type"
+ <el-radio-group v-model="promotion.type" :disabled="edit">
+ <el-radio label="1">{{ $t("label.discount") }}</el-radio>
+ <el-radio label="2">{{
+ <div class="box discount">
+ <!-- 折扣内容 -->
+ <span>{{ $t("label.discountValue") }}</span>
+ <!--折扣内容 数量&金额-->
+ <el-form-item :label="$t('label.discountValue') + ':'">
+ v-model.trim="promotion.minimumMoney"
+ <!-- <div class="item-box">
+ <span class="label">{{ $t("label.buyType") }}</span>
+ v-model.trim="promotion.purchaseType"
+ </div> -->
+ <!--折扣内容 商品-->
+ <!-- <el-form-item :label="$t('label.product') + ':'">
+ <div class="item product">
+ <div class="item-box">
+ v-model.trim="promotion.productType"
+ class="collectioninput"
+ v-model.trim="promotion.productCollection"
+ <template slot="append"
+ ><span
+ handleProductDialog(promotion.productCollection)
+ >查看商品明细</span
+ ></template
+ </el-input>
+ </el-form-item> -->
+ <!-- 最低购买要求 -->
+ <span>{{ $t("label.minimumPurchaseRequirement") }}</span>
+ <div class="info info-mini">
+ prop="minimumPurchaseRequirement"
+ <el-radio-group
+ v-model="promotion.minimumPurchaseRequirement"
+ <el-radio label="1">{{
+ $t("label.minimunPurchaseObj.noMinimun")
+ $t("label.minimunPurchaseObj.minimunAmount")
+ v-show="promotion.minimumPurchaseRequirement === '2'"
+ <el-radio label="3">{{
+ $t("label.minimunPurchaseObj.minimunQuantity")
+ v-show="promotion.minimumPurchaseRequirement === '3'"
+ <!-- 客户获得条件 -->
+ <!-- <div class="title">
+ <span>{{ $t("label.customerGetConditions") }}</span>
+ <span class="label">{{ $t("label.numberStr") }}</span>
+ <span class="label">{{ $t("label.product") }}</span>
+ @click="handleProductSearch"
+ :label="$t('label.discountPromotion') + ':'"
+ prop="discount"
+ class="discount"
+ <el-radio-group v-model="promotion.discount" :disabled="edit">
+ <el-radio label="1">{{ $t("label.percentage") }}</el-radio>
+ v-show="promotion.discount === '1'"
+ $t("label.discountPerItem")
+ v-show="promotion.discount === '2'"
+ <el-radio label="3">{{ $t("label.free") }}</el-radio>
+ <!-- 每个订单使用次数 -->
+ <span>{{ $t("label.numberOfTimesUsedPerOrder") }}</span>
+ <el-form-item>
+ <el-checkbox v-model="checked" :disabled="edit">{{
+ $t("label.maxNumberOfTimesUsedPerOrder")
+ }}</el-checkbox>
+ class="mininput checkboxinput"
+ v-model.trim="promotion.number"
+ <!-- 客户资格 折扣码才有-->
+ <div class="box" v-if="promotion.type === '1'">
+ <span>{{ $t("label.customerQualification") }}</span>
+ <el-form-item prop="customerQualification" required>
+ class="customerqualification"
+ v-model="promotion.customerQualification"
+ v-for="(item, i) in $t('label.customerQualificationList')"
+ <!-- 最大折扣使用次数 折扣码才有-->
+ <span>{{ $t("label.maximumNumberOfDiscounts") }}</span>
+ $t("label.limitDiscountCount")
+ $t("label.customerCount")
+ <!-- 组合 自动折扣才有 -->
+ <div class="box" v-if="promotion.type === '2'">
+ <span>{{ $t("label.combination") }}</span>
+ <el-form-item :label="$t('label.combinationLable') + ':'">
+ <el-checkbox-group v-model="promotion.combination">
+ v-for="(item, i) in $t('label.combinationList')"
+ >{{ item.label }}
+ </el-checkbox>
+ <el-button type="primary" @click="handleSaveOrUpdate" :disabled="edit"
+ <product-collection ref="productCollectionRef" />
+import productCollection from "@/views/oms/promotion/amountOffOrder/components/productCollectionDetail";
+ productCollection
+ checked() {
+ return !!this.promotion.number;
+ discountValue: "1",
+ productType: "",
+ combination: [],
+ minimumPurchaseRequirement: "1",
+ oncePerOrder: 1
+ this.title = this.edit
+ ? i18n.t("label.mutiPromotionDetailTitle")
+ : i18n.t("label.mutiPromotionUpdateTitle");
+ this.title = i18n.t("label.mutiPromotionCreateTitle");
+ handleProductDialog(id) {
+ this.$refs.productCollectionRef.showDialog(id);
+ .el-input {
+ width: 220px !important;
+ &.base {
+ width: 25%;
+ &.discount {
+ margin-bottom: 60px;
+ &.info-mini {
+ margin-top: 20px;
+ width: 142px !important;
+ .checkboxinput {
+ margin-left: 20px;
+ .label {
+ margin-right: 12px;
+ &.product {
+ margin-right: 20px;
+ .collectioninput {
+ /deep/.el-input-group__append {
+ border-left: none;
+ padding: 0px 5px;
+ span {
+ cursor: pointer;
+ /deep/.el-input__inner {
+ border-right: none;
+ .discount {
+ margin-bottom: 20px;
+ /deep/.el-radio {
+ min-width: 135px;
+ .customerqualification {
+ .el-radio {
+ margin-bottom: 30px;
@@ -0,0 +1,91 @@
+ <el-dialog append-to-body width="355px" :visible.sync="dialogFormVisible">
+ <p>
+ <a href="javascript:void(0)" @click="handleDetail"> 查看版本V2</a>
+ 更新时间 2025-01-24
+ </p>
+ <el-button @click="dialogFormVisible = false"
+ >{{ $t("tagsView.close") }}
+import { promotionLogs } from "@/api/oms/order/promotion";
+ ElContainer
+ dialogFormVisible: false,
+ list: [],
+ listQuery: {}
+ created() {},
+ handleOpen(id) {
+ this.listQuery.promotionId = id;
+ this.dialogFormVisible = true;
+ this.retPage();
+ promotionLogs(this.listQuery)
+ handleDetail(t) {
+ let id = this.listQuery.promotionId;
+ this.$emit("show", id);
+<style scoped lang="scss">
+.box {
+ max-height: 350px;
+ p {
+ margin-left: 23px;
+ color: #9f9f9f;
+ line-height: 24px;
+import PromotionForm from "@/views/oms/promotion/amountOffProducts/promotionForm.vue";
+import PromotionLogList from "@/views/oms/promotion/amountOffProducts/promotionLogList.vue";
@@ -0,0 +1,770 @@
+ v-model="promotion.oncePerOrder"
+ >{{ $t("label.oncePerOrder") }}</el-checkbox
+ <el-form-item :label="$t('label.product') + ':'">
+import productCollection from "@/views/oms/promotion/buyXGetYDiscount/components/productCollectionDetail";
+ discountContentValue() {
+ return this.promotion.minimum === "2"
+ ? i18n.t("label.money")
+ : i18n.t("label.numberStr");
@@ -0,0 +1,359 @@
+ v-model="listQuery.title"
+ style="width: 220px;"
+ v-model="listQuery.requireValue"
+ v-model="listQuery.discountMethod"
+ v-for="(item, index) in $t('label.applicationMethodList')"
+ icon="el-icon-circle-plus-outline"
+ @click="showDialog('', false)"
+ >{{ $t("view.create") }}
+ prop="title"
+ prop="id"
+ <span>{{ ruleTypeLabel(row.ruleType) }}</span>
+ <span>{{ applicationMethod(row.discountMethod) }}</span>
+ <span>{{ purchaseRequire(row) }}</span>
+ {{ discountVal(row) }}
+ prop="startTime"
+ prop="endTime"
+ :label="$t('label.status')"
+ prop="status"
+ <template v-slot="{ row }">{{ statusVal(row.status) }}</template>
+ <template v-slot="{ row }">{{
+ row.version ? "V" + row.version : ""
+ }}</template>
+ v-has="'priceRule:version'"
+ <promotion-log-list
+ ref="logListRef"
+ @show="({ id, version }) => showDialog(id, true, version)"
+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";
+ discountMethod: null,
+ title: null,
+ requireValue: null,
+ limit: 10,
+ ruleType: 3
+ // 折扣类型
+ 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");
+ return i18n.t("label.noRequirement");
+ // 折扣内容
+ discountVal(row) {
+ let { valueType, numericValue } = row;
+ if (valueType === 1) {
+ return numericValue * 100 + "% off";
+ } else if (valueType === 2) {
+ return numericValue;
+ 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);
@@ -0,0 +1,732 @@
+ <!-- 客户购买条件 -->
+ <span>{{ $t("label.customerPurchaseConditions") }}</span>
+ prop="minimum"
+ <el-radio-group v-model="promotion.minimum" :disabled="edit">
+ <el-radio label="1">{{ $t("label.numberStr") }}</el-radio>
+ <el-radio label="2">{{ $t("label.money") }}</el-radio>
+ <span class="label">{{ discountContentValue }}</span>
+ <!--折扣额-->
+ this.edit = edit;
+ margin-top: 26px;
+import PromotionForm from "@/views/oms/promotion/freeShipping/promotionForm.vue";
+import PromotionLogList from "@/views/oms/promotion/freeShipping/promotionLogList.vue";
@@ -0,0 +1,801 @@
+ <!-- 国家/地区 -->
+ <div class="box countries">
+ <span>{{ $t("label.countries") }}</span>
+ <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>
+ $t("label.selectedCountries")
+ v-show="promotion.countries === '2'"
+ <!-- <div class="item row">
+ <el-form-item :label="$t('label.shippingRates') + ':'">
+ >{{ $t("label.shippingRatesValue") }}</el-checkbox
+ :label="$t('label.combinationList')[0].value"
+ >{{ $t("label.combinationList")[0].label }}
+ :label="$t('label.combinationList')[1].value"
+ >{{ $t("label.combinationList")[1].label }}
+import productCollection from "@/views/oms/promotion/freeShipping/components/productCollectionDetail";
+ oncePerOrder: 1,
+ countries: "1"
+ &.countries {
+ &.info-countries {
+ /deep/.el-radio-group {
+ margin-left: 10px;
+ .countries {
@@ -0,0 +1,504 @@
+ <!-- <el-table-column
+ </el-table-column> -->
+ min-width="220"
+ @click="showDialog(row.id, true, row.version)"
+ v-show="row.version"
+ v-has="'priceRule:edit'"
+ @click="showDialog(row.id, false, row.version)"
+ :content="$t('view.audit')"
+ v-has="'promotion:check'"
+ icon="el-icon-check"
+ @click="handleCheck(row.id)"
+ v-has="'priceRule:delete'"
+ :content="
+ row.status === 1 ? $t('view.disable') : $t('view.enable')
+ v-has="'priceRule:updateStatus'"
+ :type="row.status === 1 ? 'danger' : 'primary'"
+ :icon="row.status ? 'el-icon-turn-off' : 'el-icon-open'"
+ @click="changePromotionStatus(row.id, row.status)"
+import PromotionForm from "@/views/oms/promotion/multiBuyDiscount/promotionForm.vue";
+import PromotionLogList from "@/views/oms/promotion/multiBuyDiscount/promotionLogList.vue";
+ deleteMutiDiscount,
+ updateStatusMutiDiscount
+} from "@/api/oms/order/multiBuyDiscount";
+ ruleType: 5
+ this.$confirm(i18n.t("label.deleteNotice"), i18n.t("label.notice"), {
+ confirmButtonText: i18n.t("label.comfire"),
+ cancelButtonText: i18n.t("label.cancel"),
+ deleteMutiDiscount({ id }).then(res => {
+ message: i18n.t("label.successVal"),
+ showDialog(id, edit, version) {
+ this.$refs.promotionFormRef.showDialog(id, edit, version);
+ handleCheck(id) {
+ this.$confirm("是否审核通过?", "提示", {
+ checkPromotion({ id: id }).then(res => {
+ message: "审核成功",
+ 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"),
+ ).then(() => {
+ updateStatusMutiDiscount(query).then(res => {
@@ -0,0 +1,654 @@
+ <div v-loading="pageLoad">
+ <span>{{ basicEventInformationTitle }}</span>
+ label-width="150px"
+ v-model.trim="promotion.title"
+ v-model="promotion.startTime"
+ v-model="promotion.endTime"
+ prop="discountMethod"
+ v-model="promotion.discountMethod"
+ <el-radio :label="2">{{
+ <span>{{ discountSettingTitle }}</span>
+ prop="purchaseRequire"
+ v-model="promotion.purchaseRequire"
+ @change="$forceUpdate()"
+ @input="radioChange(['miniAmount', 'quantity'])"
+ <el-radio :label="3">{{
+ $t("label.numberStr")
+ v-if="promotion.purchaseRequire === 3"
+ prop="quantity"
+ v-model.number="promotion.quantity"
+ @input="changeInput($event)"
+ <span slot="append">{{ $t("label.item") }}</span>
+ <el-radio :label="2">{{ $t("label.money") }}</el-radio>
+ v-if="promotion.purchaseRequire === 2"
+ prop="miniAmount"
+ :rules="rules.miniAmount"
+ v-model.number="promotion.miniAmount"
+ /></el-form-item>
+ prop="valueType"
+ v-model="promotion.valueType"
+ @input="radioChange(['discountNumber', 'discountMoney'])"
+ <el-radio :label="1">{{
+ $t("label.discountStr")
+ v-if="promotion.valueType === 1"
+ prop="discountNumber"
+ :rules="rules.discountNumber"
+ v-model.number="promotion.discountNumber"
+ <span slot="append"> % OFF </span>
+ v-if="promotion.valueType === 2"
+ prop="discountMoney"
+ :rules="rules.discountMoney"
+ v-model.number="promotion.discountMoney"
+ <!-- <el-radio :label="3">{{ $t("label.free") }}</el-radio> -->
+ <span>{{ productRangeTitle }}</span>
+ v-if="!edit"
+ prop="tags"
+ label-width="140px"
+ <el-checkbox class="productcheckbox" v-model="checked">{{
+ $t("label.specifyProductTag")
+ v-model="promotion.tags"
+ @change="handleChangeProductRange"
+ <div class="item row search" v-else>
+ v-for="(data, i) in tagLists"
+ <!-- <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 class="skucon" :class="edit ? 'disabled' : ''">
+ v-for="(item, j) in data.spus"
+ :key="j"
+ :loading="submitLoading"
+ fetchDetailByIdAndVersion,
+ updateMutiDiscount
+ setBasicEventInformation() {}
+ submitLoading: false,
+ basicEventInformationTitle: "",
+ discountSettingTitle: "",
+ productRangeTitle: "",
+ productSku: null,
+ tagLists: [],
+ rules: {
+ quantity: [
+ message: "quantity is the number"
+ miniAmount: [
+ message: "amount is require"
+ discountNumber: [
+ message: "discount is require"
+ discountMoney: [
+ version: null,
+ startTime: "",
+ endTime: "",
+ discountMethod: 2,
+ purchaseRequire: null,
+ quantity: null,
+ miniAmount: null,
+ discountMoney: null,
+ discountNumber: null,
+ tags: []
+ checked: true
+ radioChange(key) {
+ this.$refs.promotionFormRef.clearValidate(key);
+ changeInput(e) {
+ this.$forceUpdate();
+ async showDialog(id, edit, version) {
+ this.promotion.version = version;
+ 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);
+ tags: [],
+ originPriceRuleId: null
+ this.tagLists = [];
+ 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.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;
+ datas.numericValue = this.promotion.discountMoney;
+ datas.productTags = this.tagLists.map(item => ({
+ title: item.title,
+ spus: item.spus.join(",")
+ }));
+ updateMutiDiscount(datas)
+ this.submitLoading = false;
+ handleChangeProductRange(e) {
+ console.log(e);
+ .productcheckbox {
+ margin-right: 10px;
+ .skutitle {
+ min-width: 300px;
+ max-width: 400px;
+ min-height: 36px;
+ line-height: 36px;
+ border-radius: 3px;
+ padding: 0px 7px;
+ &.disabled {
+ color: #c0c4cc;
+ .search {
@@ -0,0 +1,94 @@
+ <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 }}
+import { fetchVersions } from "@/api/oms/order/multiBuyDiscount";
+ fetchVersions(this.listQuery.promotionId)
+ this.list = response.data;
+ handleDetail(data) {
+ const { version } = data;
+ this.$emit("show", { id, version });
@@ -47,7 +47,7 @@ export default {
components: {},
computed: {},
- name: "shopifyPromotionGoodsForm",
+ name: "multiBuyDiscountGoodsForm",
filters: {},
@@ -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 :label="$t('multiBuyDiscount.logType')">
+ <el-input v-model.trim="logType" :disabled="edit"></el-input>
+ :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 :label="$t('shopifyPromotion.resultInfo')">
+ <el-form-item :label="$t('multiBuyDiscount.resultInfo')">
:rows="3"
+ v-model.trim="params.responseData"
- <el-form-item :label="$t('shopifyPromotion.logStatus')">
+ <el-form-item :label="$t('multiBuyDiscount.logStatus')">
+ <el-input v-model.trim="logStatus" :disabled="edit"></el-input>
- <el-form-item :label="$t('shopifyPromotion.executionTime')">
+ <el-form-item :label="$t('multiBuyDiscount.operator')">
+ v-model.trim="params.operator"
- <el-form-item :label="$t('shopifyPromotion.operator')">
+ <el-form-item :label="$t('multiBuyDiscount.executionTime')">
+ v-model.trim="params.operateTime"
</el-form>
@@ -64,6 +73,7 @@
<script>
import waves from "@/directive/waves"; // 水波纹指令
inject: ["reload"], //刷新
@@ -83,9 +93,30 @@ export default {
title: "",
edit: true,
noDataText: "加载中",
- 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方法
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>
@@ -6,7 +6,7 @@
style="width: 200px;"
clearable
class="filter-item"
- v-model="listQuery.keywords"
@keyup.enter.native="handleFilter"
/>
<el-button
@@ -31,17 +31,30 @@
<el-table-column type="index" width="40"></el-table-column>
- :label="$t('shopifyPromotion.logType')"
+ :label="$t('label.promotionName')"
+ visible-overflow-tooltip
+ :label="$t('multiBuyDiscount.logType')"
width="220"
visible-overflow-tooltip
<template v-slot="{ row }">
- <span>{{ row.userName }}</span>
+ <span>{{ logType(row.operateType) }}</span>
- :label="$t('shopifyPromotion.executionInfo')"
@@ -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>
- <el-table-column :label="$t('shopifyPromotion.resultInfo')">
+ <el-table-column :label="$t('multiBuyDiscount.resultInfo')">
<el-popover
+ :content="row.responseData"
+ <span slot="reference" class="tooltip">{{ row.responseData }}</span>
- :label="$t('shopifyPromotion.logStatus')"
+ :label="$t('multiBuyDiscount.logStatus')"
- <span>{{ row.remark }}</span>
+ $t("label.resultStatusList").find(item => item.value === row.status)
+ .label
- :label="$t('shopifyPromotion.executionTime')"
+ :label="$t('multiBuyDiscount.operator')"
- <template v-slot="{ row }">
- </template>
+ prop="operator"
- :label="$t('shopifyPromotion.operator')"
+ :label="$t('multiBuyDiscount.executionTime')"
+ prop="operateTime"
:label="$t('label.operation')"
fixed="right"
- <template slot-scope="scope">
<a
class="active"
href="javascript:void(0)"
- @click="visibleDetailDialog(scope.row)"
+ @click="visibleDetailDialog(row)"
>{{ $t("details") }}</a
@@ -124,8 +134,9 @@
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";
@@ -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,
page: 1,
limit: 10
@@ -159,14 +169,9 @@ export default {
this.getList();
- 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) {
+ return val && data ? i18n.t("label.promotions") + data.label : "";
handleFilter() {
this.listQuery.page = 1;
@@ -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"
- />
- :placeholder="$t('label.promotionInfo')"
- v-model="listQuery.promotionInfo"
- <el-select
- v-model="listQuery.promotionStore"
- :placeholder="$t('label.promotionStoreName')"
- <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"
- format="yyyy-MM-dd HH:mm:ss"
- value-format="yyyy-MM-dd HH:mm:ss"
- :placeholder="$t('label.promotionStartTime')"
- ></el-date-picker>
- v-model="listQuery.promotionEndTime"
- :placeholder="$t('label.promotionEndTime')"
- default-time="23:59:59"
- v-model="listQuery.mutual"
- :placeholder="$t('label.mutual')"
- <el-option :label="$t('yes')" :value="1"></el-option>
- <el-option :label="$t('no')" :value="0"></el-option>
- v-model="listQuery.promotionStatus"
- :placeholder="$t('label.promotionStatus')"
- v-for="(item, index) in $t('label.promotionStatusArr')"
- :label="item.label"
- :value="item.value"
- ></el-option>
- v-model="listQuery.conditionType"
- :placeholder="$t('label.conditionType')"
- v-for="(item, index) in $t('label.conditionTypeArr')"
- v-model="listQuery.participateType"
- :placeholder="$t('label.participateType')"
- v-for="(item, index) in $t('label.participateTypeArr')"
- v-model="listQuery.status"
- :placeholder="$t('status')"
- <el-option :label="$t('view.enable')" :value="1"></el-option>
- <el-option :label="$t('view.disable')" :value="0"></el-option>
- <el-button
- v-waves
- v-has="'promotion:list'"
- type="primary"
- icon="el-icon-search"
- @click="retPage"
- >{{ $t("view.search") }}
- </el-button>
- v-has="'promotion:update'"
- icon="el-icon-circle-plus-outline"
- @click="showDialog('', true)"
- >{{ $t("view.create") }}
- </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>
- :label="$t('label.promotionName')"
- width="220"
- show-overflow-tooltip
- <span>{{ row.promotionName }}</span>
- :label="$t('label.promotionInfo')"
- <span>{{ row.promotionInfo }}</span>
- :label="$t('label.promotionStoreName')"
- <span>{{ row.storeName }}</span>
- :label="$t('label.promotionStartTime')"
- <span>{{ row.promotionStartTime }}</span>
- :label="$t('label.promotionEndTime')"
- <span>{{ row.promotionEndTime }}</span>
- :label="$t('label.participateNum')"
- <span>{{ row.participateNum }}</span>
- :label="$t('label.mutual')"
- <span v-if="row.mutual">{{ $t("yes") }}</span>
- <span v-else>{{ $t("no") }}</span>
- :label="$t('label.participateWeight')"
- <span>{{ row.participateWeight }}</span>
- :label="$t('label.participateType')"
- <span>{{
- $t("label.participateTypeArr").find(
- item => item.value === row.participateType
- )
- ? $t("label.participateTypeArr").find(
- ).label
- : ""
- }}</span>
- :label="$t('label.conditionType')"
- $t("label.conditionTypeArr").find(
- item => item.value === row.conditionType
- ? $t("label.conditionTypeArr").find(
- :label="$t('label.conditionValue')"
- <span v-if="row.participateType === 'gift_consumer'">{{
- $t("label.conditionValueUserTypeArr").find(
- item => item.value === row.conditionValue
- ? $t("label.conditionValueUserTypeArr").find(
- <span v-else>{{ row.conditionValue }}</span>
- :label="$t('label.goodsRelation')"
- $t("label.goodsRelationArr").find(
- item => item.value === row.goodsRelation
- ? $t("label.goodsRelationArr").find(
- :label="$t('label.goodsScope')"
- $t("label.goodsScopeArr").find(
- item => item.value === row.goodsScope
- ? $t("label.goodsScopeArr").find(
- :label="$t('label.giftRelation')"
- $t("label.giftRelationArr").find(
- item => item.value === row.giftRelation
- ? $t("label.giftRelationArr").find(
- :label="$t('label.promotionStatus')"
- <!--不支持{{ $t('label.promotionStatusArr').find(item => item.value === row.promotionStatus)?.lable || ''}} 写法-->
- $t("label.promotionStatusArr").find(
- item => item.value === row.promotionStatus
- ? $t("label.promotionStatusArr").find(
- :label="$t('label.checkBy')"
- <span>{{ row.checkBy }}</span>
- <el-table-column :label="$t('status')" align="center" width="150">
- <el-tag :type="row.status ? 'primary' : 'danger'">{{
- row.status ? $t("view.enable") : $t("view.disable")
- }}</el-tag>
- :label="$t('label.operation')"
- min-width="300"
- fixed="right"
- <el-tooltip
- class="item"
- effect="dark"
- :content="$t('view.edit')"
- placement="top-start"
- size="mini"
- icon="el-icon-edit"
- circle
- @click="showDialog(row.id, true)"
- </el-tooltip>
- :content="$t('view.details')"
- icon="el-icon-more"
- @click="showDialog(row.id, false)"
- :content="$t('view.audit')"
- v-if="row.promotionStatus === 0"
- v-has="'promotion:check'"
- icon="el-icon-check"
- @click="handleCheck(row.id)"
- :content="$t('label.product')"
- v-if="row.goodsScope === 'part'"
- v-has="'promotionOrderGoods:list'"
- icon="el-icon-shopping-bag-1"
- @click="handleGoodsList(row.id, row.promotionStatus)"
- :content="$t('label.gift')"
- v-has="'promotionGift:list'"
- icon="el-icon-shopping-bag-2"
- @click="handleGiftList(row.id, row.promotionStatus)"
- :content="$t('view.delete')"
- v-has="'promotion:delete'"
- type="danger"
- icon="el-icon-delete"
- @click="handleDelete(row.id)"
- :content="row.status ? $t('view.disable') : $t('view.enable')"
- v-has="'promotion:status'"
- :type="row.status ? 'danger' : 'primary'"
- :icon="row.status ? 'el-icon-turn-off' : 'el-icon-open'"
- @click="changePromotionStatus(row.id, row.status)"
- :content="$t('title.operationLog')"
- v-has="'promotionLog:list'"
- icon="el-icon-notebook-1"
- @click="handleLog(row.id)"
- </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>
-</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: {
- 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(() => {
- retPage() {
- this.listQuery.page = 1;
- handleDelete(id) {
- this.$confirm("是否删除该记录?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- deleteById(id).then(res => {
- this.$message({
- message: "操作成功",
- type: "success"
- showDialog(id, edit) {
- this.$refs.promotionFormRef.showDialog(id, edit);
- handleCheck(id) {
- this.$confirm("是否审核通过?", "提示", {
- checkPromotion({ id: id }).then(res => {
- message: "审核成功",
- handleGiftList(id, status) {
- this.$refs.giftListRef.handleOpen(id, status);
- handleGoodsList(id, status) {
- this.$refs.goodsListRef.handleOpen(id, status);
- changePromotionStatus(id, status) {
- this.$confirm(status ? "是否确认禁用?" : "是否确认启用?", "提示", {
- changeStatus(id).then(res => {
- handleLog(id) {
- this.$refs.logListRef.handleOpen(id);
-};
-</script>
-<style scoped></style>
@@ -1,472 +0,0 @@
- <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
- :rules="baseRule"
- :model="promotion"
- label-width="auto"
- <el-form-item
- prop="promotionName"
- style="width:320px"
- required
- v-model.trim="promotion.promotionName"
- :disabled="edit"
- ></el-input>
- </el-form-item>
- <!--促销描述-->
- prop="promotionInfo"
- v-model.trim="promotion.promotionInfo"
- <!--促销店铺-->
- prop="promotionStore"
- <el-select v-model="promotion.promotionStore" :disabled="edit">
- <!--促销开始时间-->
- prop="promotionStartTime"
- placeholder="选择日期"
- v-model="promotion.promotionStartTime"
- <!--促销失效时间-->
- prop="promotionEndTime"
- v-model="promotion.promotionEndTime"
- <!--每个用户限定参与次数-->
- prop="participateNum"
- <el-input-number
- v-model="promotion.participateNum"
- :min="1"
- controls-position="right"
- ></el-input-number>
- <!--是否互斥-->
- <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>
- <!--是否可叠加,只有当互斥的时候才能选择-->
- v-if="this.promotion.mutual == true"
- :label="$t('label.isSuperposition')"
- prop="isSuperposition"
- <el-radio-group v-model="promotion.isSuperposition">
- <!--促销优先级-->
- prop="participateWeight"
- v-model="promotion.participateWeight"
- <!--促销类型-->
- prop="participateType"
- v-model="promotion.participateType"
- @change="handleChangeParticipateType"
- <!--条件类型-->
- prop="conditionType"
- v-if="promotion.participateType !== 'gift_all'"
- <el-select v-model="promotion.conditionType" :disabled="edit">
- v-for="(item, index) in conditionTypeArr"
- :disabled="item.disabled"
- <!--条件值-->
- prop="conditionValue"
- v-if="
- promotion.participateType !== '' &&
- promotion.participateType !== 'gift_all'
- "
- v-if="promotion.participateType === 'gift_money'"
- v-model="promotion.conditionValue"
- :min="0"
- :precision="4"
- :step="1"
- v-if="promotion.participateType === 'gift_qty'"
- v-if="promotion.participateType === 'gift_consumer'"
- v-for="(item, index) in $t('label.conditionValueUserTypeArr')"
- <!--参加活动的商品关系-->
- prop="goodsRelation"
- <el-select v-model="promotion.goodsRelation" :disabled="edit">
- v-for="(item, index) in $t('label.goodsRelationArr')"
- <!--参加活动的商品范围-->
- prop="goodsScope"
- <el-select v-model="promotion.goodsScope" :disabled="edit">
- v-for="(item, index) in $t('label.goodsScopeArr')"
- <!--赠品关系-->
- prop="giftRelation"
- <el-select v-model="promotion.giftRelation" :disabled="edit">
- v-for="(item, index) in $t('label.giftRelationArr')"
- </el-form>
- <template slot="footer">
- @click="
- resetData();
- promotionFormVisible = false;
- >{{ $t("view.cancel") }}
- <!-- 未审核时/审核驳回 状态可进行提交 -->
- @click="handleSaveOrUpdate"
- v-if="promotion.promotionStatus !== 1"
- >{{ $t("view.confirm") }}
- </el-dialog>
-import { getById, save, storeList, update } from "@/api/oms/order/promotion";
-import i18n from "@/lang";
-import promotion from "@/views/oms/promotion/shopifyPromotion/index.vue";
- inject: ["reload"],
- components: {},
- computed: {},
- name: "shopifyPromotionForm",
- filters: {},
- 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 个字符",
- pageLoad: false,
- conditionTypeArr: i18n.t("label.conditionTypeArr").map(item => {
- ...item,
- disabled: false
- mounted() {},
- 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 = {
- participateNum: "",
- participateWeight: "",
- 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 => {
- this.$emit("refresh-table");
- this.promotionFormVisible = false;
- } else {
- update(data).then(res => {
- 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;
-<style scoped rel="stylesheet/scss" lang="scss">
-.dialog-body {
- height: 60vh;
- overflow: auto;
-}
-</style>
@@ -1,246 +0,0 @@
- width="40%"
- append-to-body
- v-if="promotionGiftFormVisible"
- :visible.sync="promotionGiftFormVisible"
- ref="promotionGiftFormRef"
- :model="promotionGift"
- <!--Sku Code-->
- <el-form-item :label="$t('label.giftSku')" prop="giftSku" required>
- <el-input v-model.trim="promotionGift.giftSku"></el-input>
- <!--单次赠送数量-->
- <el-form-item :label="$t('label.giftNum')" prop="giftNum" required>
- v-model.trim="promotionGift.giftNum"
- <!--计划赠送的总数量-->
- :label="$t('label.giftAllNum')"
- prop="giftAllNum"
- v-model.trim="promotionGift.giftAllNum"
- <!--赠品库存校验类型-->
- :label="$t('label.giftInventoryType')"
- prop="giftInventoryType"
- v-model="promotionGift.giftInventoryType"
- @change="handleChangeGiftInventoryType"
- v-for="(item, index) in $t('label.giftInventoryTypeArr')"
- <!--赠品库存校验仓库编码-->
- :label="$t('label.giftInventoryWarehouseName')"
- prop="giftInventoryWarehouseCode"
- v-if="promotionGift.giftInventoryType === 0"
- v-model="promotionGift.giftInventoryWarehouseCode"
- @change="handleChangeWarehouse"
- v-for="(item, index) in warehouseArr"
- :label="item.warehouseName"
- :value="item.warehouseCode"
- <!--赠品优先级-->
- :label="$t('label.giftPriority')"
- prop="giftPriority"
- v-model.trim="promotionGift.giftPriority"
- <el-button @click="promotionGiftFormVisible = false"
- <el-button type="primary" @click="handleSaveOrUpdate"
- getById,
- save,
- update,
- warehouseList
-} from "@/api/oms/order/promotionGift";
- name: "shopifyPromotionGiftForm",
- promotionGiftFormVisible: false,
- promotionGift: {
- promotionId: "",
- giftSku: "",
- giftNum: "",
- giftAllNum: "",
- giftInventoryType: "",
- giftInventoryWarehouseCode: "",
- giftInventoryWarehouseName: "",
- giftPriority: ""
- baseRule: {},
- warehouseArr: []
- initWarehouse() {
- warehouseList().then(res => {
- this.warehouseArr = res.data;
- showDialog(promotionId, id) {
- this.initWarehouse();
- this.promotionGift.id = id;
- this.getPromotionGiftInfo();
- this.promotionGift = {
- promotionId: promotionId,
- ? i18n.t("title.promotionGiftTitle")
- : i18n.t("title.promotionGiftTitle");
- this.promotionGiftFormVisible = true;
- handleOpenDialog() {},
- getPromotionGiftInfo() {
- getById(this.promotionGift.id).then(res => {
- this.promotionGift = res.data;
- handleChangeGiftInventoryType(e) {
- if (e === 1) {
- this.promotionGift.giftInventoryWarehouseCode = "";
- this.promotionGift.giftInventoryWarehouseName = "";
- handleChangeWarehouse(e) {
- this.promotionGift.giftInventoryWarehouseName = this.warehouseArr.find(
- item => item.warehouseCode === e
- ).warehouseName;
- this.$refs["promotionGiftFormRef"].validate(valid => {
- if (this.promotionGift.id) {
- update(this.promotionGift).then(res => {
- this.promotionGiftFormVisible = false;
- save(this.promotionGift).then(res => {
@@ -1,423 +0,0 @@
- :title="$t('title.promotionGiftTitle')"
- fullscreen
- :visible.sync="dialogFormVisible"
- v-model.trim="listQuery.giftSku"
- style="width: 200px"
- :placeholder="$t('label.giftSku')"
- v-model="listQuery.giftInventoryType"
- :placeholder="$t('label.giftInventoryType')"
- v-if="status !== 1"
- @click="showDialog('')"
- icon="el-icon-upload"
- @click="handleUpload"
- {{ $t("view.import") }}
- <el-table-column :label="$t('label.giftSku')" align="center">
- <span>{{ row.giftSku }}</span>
- :label="$t('label.giftNum')"
- <span>{{ row.giftNum }}</span>
- <span>{{ row.giftAllNum }}</span>
- $t("label.giftInventoryTypeArr").find(
- item => item.value === row.giftInventoryType
- ? $t("label.giftInventoryTypeArr").find(
- :label="$t('label.giftInventoryWarehouseCode')"
- <span>{{ row.giftInventoryWarehouseCode }}</span>
- <span>{{ row.giftInventoryWarehouseName }}</span>
- <span>{{ row.giftPriority }}</span>
- :label="$t('label.giftCount')"
- <span>{{ row.giftCount }}</span>
- min-width="150"
- v-has="'promotionGift:update'"
- @click="showDialog(row.id)"
- v-has="'promotionGift:delete'"
- <div class="footer-class">
- <el-button @click="dialogFormVisible = false"
- >{{ $t("tagsView.close") }}
- :title="$t('title.promotionGiftImport')"
- :visible.sync="uploadVisible"
- width="38%"
- :destroy-on-close="true"
- <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-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 class="el-upload__tip" slot="tip">
- {{ $t("view.xlsxFormatOnly") }}
- </el-upload>
- <div slot="footer" class="dialog-footer">
- <el-button @click="uploadVisible = false"
- <el-button type="primary" @click="submitUpload"
- <promotion-gift-form
- ></promotion-gift-form>
-import promotionGiftForm from "@/views/oms/promotion/promotion/promotionGiftForm.vue";
-import { fetchList, deleteById } from "@/api/oms/order/promotionGift";
- promotionGiftForm
- name: "shopifyPromotionGiftList",
- dialogFormVisible: false,
- list: [],
- total: 0,
- promotionId: null,
- giftInventoryType: null,
- giftSku: null,
- uploadVisible: false,
- uploadUrl: process.env.VUE_APP_OMS_API + "/promotionGift/uploadExcel",
- uploadData: {
- promotionId: null
- status: "" // 1 已审核通过
- created() {},
- "X-Token": getToken()
- handleOpen(id, status) {
- this.status = status;
- this.uploadData.promotionId = id;
- 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();
- //文件上传成功返回
- handleFileSuccess(response, file, fileList) {
- if (file.response.code === 200) {
- message: "导入成功",
- this.uploadVisible = false;
- 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);
-<style scoped lang="scss">
-.footer-class {
- position: fixed;
- bottom: 20px;
- right: 20px;
@@ -1,349 +0,0 @@
- :title="$t('title.promotionGoodsTitle')"
- v-model.trim="listQuery.name"
- :placeholder="$t('label.skuName')"
- v-model.trim="listQuery.skuCode"
- :placeholder="$t('label.goodsSku')"
- <el-table-column :label="$t('label.skuName')" show-overflow-tooltip>
- <span>{{ row.name }}</span>
- <el-table-column :label="$t('label.goodsSku')" align="center">
- <span>{{ row.skuCode }}</span>
- <el-table-column :label="$t('label.price')" align="center">
- <span>{{ row.price }}</span>
- <el-table-column :label="$t('label.color')" align="center">
- <span>{{ row.colorName }}</span>
- <el-table-column :label="$t('label.size')" align="center">
- <span>{{ row.sizes }}</span>
- width="150"
- :title="$t('title.promotionGoodsImport')"
- <el-button @click="uploadVisible = false">{{
- $t("view.cancel")
- }}</el-button>
- <el-button type="primary" @click="submitUpload">{{
- $t("view.confirm")
- <promotion-goods-form
- ref="promotionGoodsFormRef"
- ></promotion-goods-form>
-import promotionGoodsForm from "@/views/oms/promotion/promotion/promotionGoodsForm.vue";
-import { fetchList, deleteById } from "@/api/oms/order/promotionGoods";
- promotionGoodsForm
- name: "shopifyPromotionGoodsList",
- skuCode: null,
- name: null,
- uploadUrl:
- process.env.VUE_APP_OMS_API + "/promotionOrderGoods/uploadExcel",
- this.$refs.promotionGoodsFormRef.showDialog(
- process.env.VUE_APP_OMS_API + "/promotionOrderGoods/excelTemplate";
@@ -1,139 +0,0 @@
- :title="$t('title.operationLog')"
- top="5vh"
- width="60%"
- <div style="height: 72vh; overflow: auto">
- :label="$t('label.operator')"
- :label="$t('label.operationTime')"
- <span>{{ row.createTime }}</span>
- :label="$t('label.operationMethod')"
- ElContainer
- name: "promotionLogList",
-<style scoped lang="scss"></style>
@@ -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="filter-container">
:placeholder="$t('place.onlineShopNumber')"
@@ -47,9 +47,7 @@
<div class="main" v-if="show">
<div class="box" style="margin-top: 15px;">
- <div class="item_title">
- <span>{{ $t("view.shippingInfo") }}</span>
+ <div class="item_title">{{ $t("view.shippingInfo") }}</div>
<el-descriptions
@@ -178,203 +176,217 @@
this.listQuery.refundType
"
- <span>{{ $t("view.refundInfo") }}</span>
+ <div class="item_title">{{ $t("view.refundInfo") }}</div>
<el-form
+ label-position="left"
ref="addRefundForm"
:model="addRefundForm"
- <el-form-item :label="$t('currency')">
- disabled
- v-model="addRefundForm.currency"
- placeholder
- class="normal-input"
- <el-form-item :label="$t('label.expectedRefundAmount')" required>
- v-model="addRefundForm.refundTotalAmount"
- :disabled="true"
- <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")
- v-if="addRefundForm.refundMethod == 'manual'"
- :label="$t('label.accountType')"
- <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> -->
- :label="$t('label.receivingAccount')"
- addRefundForm.refundMethod == 'manual' &&
- addRefundForm.refundAccountType == 'PayPal'
- v-model="addRefundForm.refundAccount"
- :placeholder="$t('place.pleaseFillIn')"
- <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>
- v-if="addRefundForm.refundTaxAble == 1"
- :label="$t('label.taxRefundAmount')"
- v-model="addRefundForm.refundTaxAmount"
- :min="0.0"
- :step="0.01"
- step-strictly
- <!-- 选择是否退运费-->
- <el-form-item :label="$t('label.shippingFee')">
- v-model="addRefundForm.refundPostage"
- <el-radio label="0">{{ $t("view.noRefund") }}</el-radio>
- <el-radio label="1">{{
- $t("view.refundShippingFee")
- v-if="addRefundForm.refundPostage == 1"
- :label="$t('label.returnShippingFeeAmount')"
- v-model="addRefundForm.refundPostageAmount"
- v-if="this.queryRefundType == 3"
- :label="$t('label.receivingReturnWarehouse')"
- :placeholder="$t('place.pleaseSelect')"
- v-model="addRefundForm.warehouseCode"
- @change="ShippingLabelOption"
- v-for="item in warehouseItems"
- :key="item.key"
- :label="item.key"
+ <div class="row">
+ <div class="row-item">
+ <el-form-item class="inputleft" :label="$t('currency')">
+ disabled
+ v-model="addRefundForm.currency"
+ placeholder
+ class="normal-input"
+ :label="$t('label.expectedRefundAmount')"
+ v-model="addRefundForm.refundTotalAmount"
+ <el-form-item :label="$t('label.refundMethod')" required>
+ <el-radio-group v-model="addRefundForm.refundMethod">
+ <el-radio label="system">{{
+ $t("view.systemRefund")
+ <el-radio label="manual">{{
+ $t("view.manualRefund")
+ v-if="addRefundForm.refundMethod == 'manual'"
+ :label="$t('label.accountType')"
+ <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> -->
+ :label="$t('label.receivingAccount')"
+ v-if="
+ addRefundForm.refundMethod == 'manual' &&
+ addRefundForm.refundAccountType == 'PayPal'
+ v-model="addRefundForm.refundAccount"
+ :placeholder="$t('place.pleaseFillIn')"
+ <el-form-item :label="$t('label.taxRefund')">
+ v-model="addRefundForm.refundTaxAble"
+ @change="calculateRefundAmount"
+ <el-radio label="0">{{ $t("view.noTaxRefund") }}</el-radio>
+ <el-radio label="1">{{ $t("view.taxRefund") }}</el-radio>
+ v-if="addRefundForm.refundTaxAble == 1"
+ :label="$t('label.taxRefundAmount')"
+ <el-input-number
+ v-model="addRefundForm.refundTaxAmount"
+ :min="0.0"
+ :step="0.01"
+ step-strictly
+ ></el-input-number>
+ <!-- 选择是否退运费-->
+ <el-form-item :label="$t('label.shippingFee')">
+ v-model="addRefundForm.refundPostage"
+ <el-radio label="0">{{ $t("view.noRefund") }}</el-radio>
+ $t("view.refundShippingFee")
+ v-if="addRefundForm.refundPostage == 1"
+ :label="$t('label.returnShippingFeeAmount')"
+ v-model="addRefundForm.refundPostageAmount"
- 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">
- v-model="addRefundForm.slUseable"
- @change="changeSlradio()"
- <el-radio label="0" value="0">{{
- $t("view.notEnabled")
- <el-radio label="1" value="1">{{
- $t("view.enabled")
+ v-if="this.queryRefundType == 3"
+ :label="$t('label.receivingReturnWarehouse')"
+ :placeholder="$t('place.pleaseSelect')"
+ v-model="addRefundForm.warehouseCode"
+ @change="ShippingLabelOption"
+ v-for="item in warehouseItems"
+ :key="item.key"
+ :label="item.key"
+ ></el-option>
- this.queryRefundType == 3 && this.addRefundForm.slUseable == 0
- :label="$t('label.returnLogisticsCompanyCode')"
- v-model="addRefundForm.shipmodeId"
- :label="$t('label.returnLogisticsNumber')"
- v-model="addRefundForm.shippingNo"
+ 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"
+ v-model="addRefundForm.slUseable"
+ @change="changeSlradio()"
+ <el-radio label="0" value="0">{{
+ $t("view.notEnabled")
+ <el-radio label="1" value="1">{{
+ $t("view.enabled")
- <el-form-item :label="$t('label.afterSalesInstructions')">
- type="textarea"
- :placeholder="$t('place.enterContent')"
- v-model="addRefundForm.notes"
- maxlength="150"
- show-word-limit
- </el-input>
+ this.queryRefundType == 3 &&
+ this.addRefundForm.slUseable == 0
+ :label="$t('label.returnLogisticsCompanyCode')"
+ v-model="addRefundForm.shipmodeId"
+ :label="$t('label.returnLogisticsNumber')"
+ v-model="addRefundForm.shippingNo"
+ <el-form-item :label="$t('label.afterSalesInstructions')">
+ type="textarea"
+ class="afertextarea"
+ :placeholder="$t('place.enterContent')"
+ v-model="addRefundForm.notes"
+ :rows="4"
+ maxlength="150"
+ show-word-limit
- <el-form-item :label="$t('label.uploadVoucher')">
- class="avatar-uploader"
- :action="uploadPhotos"
- :show-file-list="false"
- :on-success="handleAvatarSuccess"
- :before-upload="beforeAvatarUpload"
- <img v-if="imageUrl" :src="imageUrl" class="avatar" />
- <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+ <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>
@@ -385,6 +397,7 @@
<el-select
v-if="this.multipleSelection && this.multipleSelection.length > 0"
v-model="refundReasonAss"
+ style="width: 260px;"
:placeholder="$t('place.selectCheckedRefundReasons')"
@change="chooseReason(refundReasonAss, reasonListAll)"
@@ -401,7 +414,7 @@
v-if="otherReasonFlag == '1'"
:placeholder="$t('place.enterReason')"
v-model="refundOtherReasonAss"
@change="writeReason(refundOtherReasonAss)"
@@ -409,6 +422,7 @@
<div>
<el-table
+ class="itemtable"
@selection-change="handleSelectionChange"
style="width: 100%;"
@@ -613,14 +627,26 @@
- <el-table-column width="55" :label="$t('label.flashPurchase')" align="center">
+ :label="$t('label.flashPurchase')"
- <el-checkbox v-model="scope.row.flashPurchaseFlag == 1"></el-checkbox>
+ v-model="scope.row.flashPurchaseFlag == 1"
+ ></el-checkbox>
- <el-table-column width="55" :label="$t('label.exchangePurchase')" align="center">
+ :label="$t('label.exchangePurchase')"
- <el-checkbox v-model="scope.row.exchangePurchaseFlag == 1"></el-checkbox>
+ v-model="scope.row.exchangePurchaseFlag == 1"
@@ -664,23 +690,99 @@
- <div class="box" style="width:50%;margin-top: 15px;float:left">
- {{ $t("view.totalRefund") }}:{{
- addRefundForm.refundTotalAmount
- }}
- <div class="box" style="width:50%; margin-top: 10px;float:left">
- :style="btnStyle"
- @click="submit(this)"
- v-loading="btnLoading"
- >{{ $t("save") }}</el-button
+ <!-- 多件多折折扣重算 -->
+ <div class="box" v-has="'priceRule:list'">
+ <div class="item_title">
+ {{ $t("multipleDiscountInfo.multipleDiscountReCal") }}
+ :data="tableOrderDeatils"
+ row-key="id"
+ :label="$t('multipleDiscountInfo.OriginalDiscount')"
+ prop="OriginalDiscount"
+ :label="$t('multipleDiscountInfo.OriginalMoneny')"
+ prop="OriginalMoneny"
+ <template slot-scope="scope">
+ {{ scope.row.OriginalMoneny }}
+ :label="$t('multipleDiscountInfo.afterReturnDiscount')"
+ prop="afterReturnDiscount"
+ {{ scope.row.afterReturnDiscount }}
+ :label="$t('multipleDiscountInfo.afterReturnMoney')"
+ prop="afterReturnMoney"
+ {{ scope.row.afterReturnMoney }}
+ :label="$t('multipleDiscountInfo.returnMoney')"
+ prop="returnMoney"
+ {{ scope.row.returnMoney }}
+ :label="$t('multipleDiscountInfo.needPayMoney')"
+ prop="needPayMoney"
+ {{ scope.row.needPayMoney }}
+ <div class="box total_box">
+ {{ $t("view.totalRefund") }}
+ <div class="item_box">
+ {{ $t("view.totalRefund") }}:{{ addRefundForm.refundTotalAmount }}
+ <div class="box btn_box">
+ :style="btnStyle"
+ class="save_btn"
+ @click="submit(this)"
+ v-loading="btnLoading"
+ >{{ $t("save") }}</el-button
+ <el-button type="danger" class="backbtn" @click="back">{{
+ $t("back")
+ }}</el-button>
@@ -700,7 +802,7 @@ import {
import { BigNumber } from "bignumber.js";
import { write } from "xlsx";
-import tableEdit from './tableEdit'
+import tableEdit from "./tableEdit";
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";
- this.addRefundForm.slUseable = "0";
+ if (
+ this.listQuery.refundType == 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";
+ 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;
+ margin-left: 49px;
.avatar {
width: 178px;
height: 178px;
display: block;
+.dialog_container {
.main {
margin-top: 15px;
.box {
+ .item_title {
+ font-size: 16px !important;
+ padding-left: 8px !important;
+ top: 13px;
.box_item {
padding: 0 20px;
@@ -1389,14 +1514,65 @@ export default {
.ptitle {
- margin: 20px;
+ margin: 20px 0px;
color: #1f2d3d;
text-align: left;
+ /deep/.el-descriptions__title {
+.filter-container {
+ .filter-item {
+ margin-right: 11px;
.container {
display: flex; /* 使用 Flexbox 布局 */
justify-content: space-between; /* 将盒子平均分布在容器中 */
+.row {
+ /deep/.el-form-item {
+ .inputleft {
+ margin-right: 42px;
+ .row-item {
+ margin-right: 10vw;
+ &:last-child {
+ .afertextarea {
+ width: 306px;
+.el-table {
+.itemtable {
+ /deep/.has-gutter {
+ .el-table__cell {
+ background: #f5f0ee;
+ padding: 0px;
+.total_box {
+.btn_box {
+ right: 0px;
+ bottom: -24px;
+ .el-button {
+ padding: 10px 37px;
@@ -204,9 +204,9 @@
prop="channelStatus"
- {{ scope.row.channelStatus | channelStatusFilter(that) }}
+ {{ scope.row.channelStatus | channelStatusFilter(that) }}
:label="$t('label.afterSalesType')"
@@ -306,7 +306,7 @@
label="自动退款失败原因"
width="150"
@@ -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 {
that: this,
- dialogSize: "40%",
direction: "rtl",
fileList: [],
tableKey: 0,
@@ -1,5 +1,5 @@
+ <div class="detail">
<!-- 收退货仓库信息-->
<el-card class="box-card" v-if="refundInfo.refundType == '3'">
@@ -34,10 +34,13 @@
v-if="refundInfo.status == 0"
v-loading="btnLoading"
- <!-- TODO 暂时关闭SL -->
+ <!-- TODO 暂时关闭SL -->
- v-if="refundInfo.refundType == '3' &&
- this.isShopifyLabel == true && addressInfo.receiverCountryName == 'US'"
+ 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')"
- 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 @@
:title="$t('title.basicInformation')"
:colon="false"
+ :column="6"
<el-descriptions-item :label="$t('label.refundOrderNumber')"
@@ -232,8 +234,8 @@
<el-descriptions-item :label="$t('label.totalRefundAmount')">{{
refundInfo.refundAmount
- <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 :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 label="退款原因(中文)" span="2">{{
+ <!-- <el-descriptions-item label="退款原因(中文)">{{
refundInfo.reasonContentChinese
- <el-descriptions-item label="退款原因(English)" span="1">{{
+ <el-descriptions-item label="退款原因(English)">{{
refundInfo.reasonContentEnglish
<el-descriptions-item
v-if="refundInfo.otherReason"
label="其他原因说明"
- span="3">{{
+ >{{
refundInfo.otherReason
}}</el-descriptions-item> -->
:label="$t('label.receivingReturnWarehouse')"
- span="1"
v-if="refundInfo.warehouseName"
{{ refundInfo.warehouseName }}
:label="$t('label.warehouseReceivingStatus')"
{{ 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
- :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 :label="$t('label.accountType')" span="2">
+ <el-descriptions-item :label="$t('label.accountType')">
{{ refundInfo.refundAccountType | refundAccountTypeFilter(that) }}
- <el-descriptions-item :label="$t('label.refundAccount')" span="2">
+ <el-descriptions-item :label="$t('label.refundAccount')">
{{ refundInfo.refundAccount }}
- <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 v-else>{{ $t("yes") }}</span>
<!-- 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 :label="$t('label.useShippingLabel')" span="2">
+ <el-descriptions-item :label="$t('label.useShippingLabel')">
{{ refundInfo.slFlag | SlstatusFilter }}
- <el-descriptions-item :label="$t('label.shippingRefundAmount')" span="1">
- {{refundInfo.refundPostageAmount}}
+ <el-descriptions-item :label="$t('label.shippingRefundAmount')">
+ {{ refundInfo.refundPostageAmount }}
- <el-descriptions-item :label="$t('label.sumGiftCardRefundAmount')" span="1">
- {{refundInfo.sumGiftCardRefundAmount}}
+ <el-descriptions-item :label="$t('label.sumGiftCardRefundAmount')">
+ {{ refundInfo.sumGiftCardRefundAmount }}
- <el-descriptions-item :label="$t('label.sumAiGiftCardRefundAmount')" span="1">
- {{refundInfo.sumAiGiftCardRefundAmount}}
+ <el-descriptions-item :label="$t('label.sumAiGiftCardRefundAmount')">
+ {{ refundInfo.sumAiGiftCardRefundAmount }}
+ <el-descriptions-item :label="$t('label.customerServiceNote')">{{
+ refundInfo.notes
</el-card>
@@ -365,10 +363,11 @@
v-for="(item, index) in orderItemInfo"
:key="index"
:style="titleColor(item)"
- <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 @@
否
- <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 }}
- <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 :label="$t('label.skuCode')"
>{{ item.skuCode }}
@@ -394,7 +393,7 @@
>{{ item.orderOnId }}
@@ -407,18 +406,18 @@
<el-descriptions-item :label="$t('label.orderStatus')"
>{{ item.orderStatus | statusFilterStatus }}
- <el-descriptions-item :label="$t('label.orderItemStatus')" span="2"
+ <el-descriptions-item :label="$t('label.orderItemStatus')"
>{{ item.itemStatus | statusFilterStatus }}
- <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 :label="$t('label.originalSKU')" span="2">
+ <el-descriptions-item :label="$t('label.originalSKU')">
{{ item.oldSku }}
- <el-descriptions-item :label="$t('label.productName')" span="2">{{
+ <el-descriptions-item :label="$t('label.productName')">{{
item.productName
@@ -448,14 +447,14 @@
item.discountFee
<el-descriptions-item :label="$t('label.sellerDiscount')">{{
- item.sellerDiscount
+ item.sellerDiscount
<el-descriptions-item :label="$t('label.platformDiscount')">{{
- item.platformDiscount
- <el-descriptions-item :label="$t('label.loanAmount')" span="2">{{
- item.loanAmount
+ item.platformDiscount
+ <el-descriptions-item :label="$t('label.loanAmount')">{{
+ item.loanAmount
<el-descriptions-item :label="$t('label.status')"
>{{ item.returnStatus | statusFiltr2 }}
@@ -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
+ :title="$t('discountInfo')"
+ :colon="false"
+ <el-descriptions-item
+ >2件9折</el-descriptions-item
+ >{{ addressInfo.receiverState }}</el-descriptions-item
+ >{{ addressInfo.receiverCity }}</el-descriptions-item
+ <el-descriptions-item :label="$t('multipleDiscountInfo.returnMoney')">{{
+ addressInfo.receiverCity
+ </el-descriptions>
+ </el-card>
<el-card class="box-card">
:title="$t('title.buyerInformation')"
- <el-descriptions-item :label="$t('country')" span="3">{{
+ <el-descriptions-item :label="$t('country')">{{
addressInfo.receiverCountryName
<el-descriptions-item :label="$t('state')">{{
@@ -497,19 +529,19 @@
<el-descriptions-item :label="$t('suburb')">{{
addressInfo.receiverDistrict
- <el-descriptions-item :label="$t('street')" span="3">{{
+ <el-descriptions-item :label="$t('street')">{{
addressInfo.receiverStreet
- <el-descriptions-item :label="$t('address')" span="3">{{
+ <el-descriptions-item :label="$t('address')">{{
addressInfo.receiverAddress
- <el-descriptions-item :label="$t('dooeNo')" span="2">{{
+ <el-descriptions-item :label="$t('dooeNo')">{{
addressInfo.receiverAddress2
<el-descriptions-item :label="$t('recipient')">{{
addressInfo.receiverName
- <el-descriptions-item :label="$t('telephone')" span="3"
+ <el-descriptions-item :label="$t('telephone')"
>{{ addressInfo.receiverPhone
}}<i
@@ -520,7 +552,7 @@
- <el-descriptions-item :label="$t('moPhone')" span="3"
+ <el-descriptions-item :label="$t('moPhone')"
>{{ addressInfo.receiverMobile
@@ -531,8 +563,8 @@
- <el-descriptions-item :label="$t('post')" span="3"
- >{{ addressInfo.email
+ <el-descriptions-item :label="$t('post')"
+ >{{ addressInfo.email
v-if="addressInfo.email"
@@ -541,8 +573,8 @@
:copy-value="addressInfo.email"
- ></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) {
- 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) {
global.inboundStatus.forEach(type => {
@@ -716,7 +749,7 @@ export default {
receiveTypeFilter(key) {
global.receiveType.forEach(type => {
@@ -735,7 +768,7 @@ export default {
} else if (key == "0") {
return "NO";
//获取退货详情信息
@@ -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") {
+ 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的选择标签
// TODO 暂时关闭SL
// if (this.selectedWarehouseCode == "PSJ-H0000024") {
// this.slUseAble = "1";
@@ -854,24 +895,24 @@ export default {
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")){
+ 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{
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("当前售后没有可退款的支付流水,请您选择手工退款方式", "温馨提示", {
+ if (res.msg === "exist") {
+ this.refundPriority = "gift";
+ "当前订单存在礼品卡支付,执行退款将优先退还礼品卡金额",
+ "温馨提示",
+ confirmButtonText: "确认",
+ cancelButtonText: "关闭",
+ showCancelButton: false,
+ cancelButtonClass: "btnCancel",
+ type: "warning",
+ showClose: false
+ } else if (res.msg === "none") {
+ 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;
+.detail {
+ .el-descriptions__title {
+ .box-card {
+ box-shadow: none;
+ .el-descriptions {
+ margin-bottom: 40px;
+ margin-bottom: 0px;
+ .el-descriptions__body {
+ .el-descriptions__table {
+ table-layout: fixed;
@@ -355,9 +355,7 @@
width="120"
- {{
- scope.row.autoRefund === "1" ? $t("label.yes") : $t("label.no")
+ {{ scope.row.autoRefund === "1" ? $t("label.yes") : $t("label.no") }}
@@ -374,8 +372,6 @@
:label="$t('label.applicationTime')"
width="160"
@@ -622,7 +618,7 @@
@@ -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
- ></orderRefundNewDialog>
+ <orderRefundNewDialog :refundId="currentRefundId"></orderRefundNewDialog>
@@ -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")
+ <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>
+ <cargoTrackDialog :refundNo="selectedRefundNo"></cargoTrackDialog>
@@ -983,7 +974,6 @@ export default {
@@ -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: ""
@@ -1099,7 +1089,7 @@ export default {
- handleCargoTrack(e){
+ handleCargoTrack(e) {
this.cargoTrackVisible = true;
this.selectedRefundNo = e.refundNo;
@@ -1529,12 +1519,20 @@ export default {
-<style scoped>
.cell > span {
white-space: nowrap !important;
-.el-button+.el-button {
- margin-left: 10px;
- margin-top: 10px;
+.el-button + .el-button {
+ margin-top: 10px;
+.backbtn {
+ right: 40px;
+ bottom: 6px;
@@ -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`,
+ ['^' + process.env.VUE_APP_PIM_API]: ''
+ [process.env.VUE_APP_OMS_API]: {
+ target: `http://localhost:18081/oms`,
+ ['^' + 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`,
@@ -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`,