Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
4c7a1f5f
Commit
4c7a1f5f
authored
Aug 31, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 奥莱抵金券
parent
a35cdd77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
18 deletions
+32
-18
cardApi.js
src/service/api/cardApi.js
+1
-0
form.js
src/views/card/form.js
+30
-17
form.vue
src/views/card/form.vue
+1
-1
No files found.
src/service/api/cardApi.js
View file @
4c7a1f5f
...
@@ -209,6 +209,7 @@ export const addStore = params => requests(PREFIX + 'save-write-off-store', para
...
@@ -209,6 +209,7 @@ export const addStore = params => requests(PREFIX + 'save-write-off-store', para
export
const
setStraff
=
params
=>
requests
(
PREFIX
+
'save-write-off-staff'
,
params
);
export
const
setStraff
=
params
=>
requests
(
PREFIX
+
'save-write-off-staff'
,
params
);
// 查询手机号是否重复
// 查询手机号是否重复
export
const
searchRePhone
=
params
=>
requests
(
PREFIX
+
'check-write-off-staff'
,
params
);
export
const
searchRePhone
=
params
=>
requests
(
PREFIX
+
'check-write-off-staff'
,
params
);
export
const
getStoreByCode
=
params
=>
requests
(
'/api-plug/query-store-by-code-name-new'
,
params
);
export
const
getStoreWidgetStore
=
params
=>
requests
(
'/api-plug/get-store-widget-store'
,
params
);
export
const
getStoreWidgetStore
=
params
=>
requests
(
'/api-plug/get-store-widget-store'
,
params
);
export
const
importCostStore
=
params
=>
requests
(
'/api-marketing/import-cost-store'
,
params
,
true
);
export
const
importCostStore
=
params
=>
requests
(
'/api-marketing/import-cost-store'
,
params
,
true
);
...
...
src/views/card/form.js
View file @
4c7a1f5f
...
@@ -9,7 +9,7 @@ import sendPreview from './partials/send-preview';
...
@@ -9,7 +9,7 @@ import sendPreview from './partials/send-preview';
import
{
formatDateTimeByType
,
deepClone
,
getTimesByReq
}
from
'@/utils/index.js'
;
import
{
formatDateTimeByType
,
deepClone
,
getTimesByReq
}
from
'@/utils/index.js'
;
import
xxSysp_mix
from
'@/mixins/selector.js'
;
// 商品选择器方法
import
xxSysp_mix
from
'@/mixins/selector.js'
;
// 商品选择器方法
import
{
listEntepriseWeimobShop
,
listEntepriseWeimobCoupon
}
from
'@/service/api/commonApi.js'
;
import
{
listEntepriseWeimobShop
,
listEntepriseWeimobCoupon
}
from
'@/service/api/commonApi.js'
;
import
{
getCardDetail
,
saveUpdateCard
,
copyCardDetailService
,
getCardManualSetting
,
getCategoryList
,
getPropertyList
,
getLatestReptileTime
,
getPropertyValueList
,
getWeimobCouponBindCount
,
getCardEffectiveMode
,
getStoreWidgetStore
,
importCostStore
}
from
'@/service/api/cardApi.js'
;
import
{
getCardDetail
,
saveUpdateCard
,
copyCardDetailService
,
getCardManualSetting
,
getCategoryList
,
getPropertyList
,
getLatestReptileTime
,
getPropertyValueList
,
getWeimobCouponBindCount
,
getCardEffectiveMode
,
getStoreWidgetStore
,
getStoreByCode
,
importCostStore
}
from
'@/service/api/cardApi.js'
;
import
dmGoodsInput
from
'@/components/goods-input/index.vue'
;
import
dmGoodsInput
from
'@/components/goods-input/index.vue'
;
import
{
getLinkResourceStatus
}
from
'@/service/api/ecmApi.js'
;
import
{
getLinkResourceStatus
}
from
'@/service/api/ecmApi.js'
;
import
{
RecycleScroller
}
from
'vue-virtual-scroller'
;
import
{
RecycleScroller
}
from
'vue-virtual-scroller'
;
...
@@ -445,23 +445,36 @@ export default {
...
@@ -445,23 +445,36 @@ export default {
}
}
},
},
onStoreChange
(
id
)
{
onStoreChange
(
id
)
{
getStoreWidgetStore
({
key
:
id
,
pageSize
:
99999
,
currentPage
:
1
}).
then
(
res
=>
{
if
(
this
.
storeMode
==
0
)
{
const
{
result
,
errorCode
}
=
res
||
{};
getStoreByCode
({
key
:
this
.
storeUuid
,
isClique
:
0
,
pageSize
:
99999
,
currentPage
:
1
}).
then
(
res
=>
{
if
(
errorCode
==
0
&&
Array
.
isArray
(
result
.
result
))
{
const
{
result
,
errorCode
}
=
res
||
{};
this
.
selectedStoreList
=
result
.
result
.
map
(
el
=>
{
if
(
errorCode
==
0
&&
Array
.
isArray
(
result
.
result
))
{
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
this
.
selectedStoreList
=
result
.
result
.
map
(
el
=>
{
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
undefined
,
costValue
:
0
};
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
});
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
undefined
,
costValue
:
0
};
if
(
this
.
isEdit
)
{
});
// 编辑卡券通过门店选择器添加门店时,需要先过滤掉已经选中的门店,再与form.costStoreList合并
this
.
selectedStoreList
=
this
.
selectedStoreList
.
filter
(
el
=>
this
.
form
.
costStoreList
.
every
(
item
=>
item
.
storeId
!=
el
.
storeId
));
this
.
originStoreList
=
[...
this
.
selectedStoreList
,
...
this
.
form
.
costStoreList
];
}
else
if
(
this
.
isAdd
||
this
.
isCopy
)
{
// 新建卡券时直接覆盖
this
.
originStoreList
=
this
.
selectedStoreList
;
}
}
}
this
.
originStoreList
=
this
.
selectedStoreList
;
});
});
}
else
{
getStoreWidgetStore
({
key
:
id
,
pageSize
:
99999
,
currentPage
:
1
}).
then
(
res
=>
{
const
{
result
,
errorCode
}
=
res
||
{};
if
(
errorCode
==
0
&&
Array
.
isArray
(
result
.
result
))
{
this
.
selectedStoreList
=
result
.
result
.
map
(
el
=>
{
const
{
storeId
,
storeCode
,
storeName
}
=
el
;
return
{
storeId
,
storeCode
,
storeName
,
costValueProportion
:
undefined
,
costValue
:
0
};
});
if
(
this
.
isEdit
)
{
// 编辑卡券通过门店选择器添加门店时,需要先过滤掉已经选中的门店,再与form.costStoreList合并
this
.
selectedStoreList
=
this
.
selectedStoreList
.
filter
(
el
=>
this
.
form
.
costStoreList
.
every
(
item
=>
item
.
storeId
!=
el
.
storeId
));
this
.
originStoreList
=
[...
this
.
selectedStoreList
,
...
this
.
form
.
costStoreList
];
}
else
if
(
this
.
isAdd
||
this
.
isCopy
)
{
// 新建卡券时直接覆盖
this
.
originStoreList
=
this
.
selectedStoreList
;
}
}
});
}
},
},
onSortStore
(
sortType
)
{
onSortStore
(
sortType
)
{
this
.
sortType
=
sortType
;
this
.
sortType
=
sortType
;
...
...
src/views/card/form.vue
View file @
4c7a1f5f
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
<i
class=
"iconfont icon-QuestionCircleOutlined"
></i>
<i
class=
"iconfont icon-QuestionCircleOutlined"
></i>
</el-tooltip>
</el-tooltip>
</div>
</div>
<dm-store-selector
:uuid
.
sync=
"storeUuid"
:options=
"[5]"
:store-type-disabled=
"isEdit && form.costValueType == 0"
@
optionsChange=
"onOptionsChange"
@
store-change=
"onStoreChange"
></dm-store-selector>
<dm-store-selector
:uuid
.
sync=
"storeUuid"
:
default-all=
"false"
:
options=
"[5]"
:store-type-disabled=
"isEdit && form.costValueType == 0"
@
optionsChange=
"onOptionsChange"
@
store-change=
"onStoreChange"
></dm-store-selector>
<div
v-if=
"form.costValueProportionFlag == 1"
class=
"cost-box"
>
<div
v-if=
"form.costValueProportionFlag == 1"
class=
"cost-box"
>
<div
v-if=
"form.costValueType == 0"
class=
"fixed-cost"
>
<div
v-if=
"form.costValueType == 0"
class=
"fixed-cost"
>
<el-form-item
label=
"成本比例"
prop=
"costValueProportion"
label-width=
"85px"
><el-input-number
v-model=
"form.costValueProportion"
:disabled=
"isEdit || isInfo"
:min=
"0"
:max=
"100"
:precision=
"0"
:controls=
"false"
style=
"margin-right: 10px; width: 130px"
placeholder=
"请输入成本比例"
></el-input-number>
%
</el-form-item>
<el-form-item
label=
"成本比例"
prop=
"costValueProportion"
label-width=
"85px"
><el-input-number
v-model=
"form.costValueProportion"
:disabled=
"isEdit || isInfo"
:min=
"0"
:max=
"100"
:precision=
"0"
:controls=
"false"
style=
"margin-right: 10px; width: 130px"
placeholder=
"请输入成本比例"
></el-input-number>
%
</el-form-item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment