Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b63b594
authored
Dec 31, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
合并
2 parents
a2630953
78b89ce4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
185 additions
and
84 deletions
src/components/glsx-dialog/index.vue
src/views/couponManage/editCashCoupon.vue
src/views/customerTransform/addCustomer.vue
src/views/customerTransform/components/basicInfo.vue
src/views/customerTransform/components/selectEmp.vue
src/views/customerTransform/components/selectMembers.vue
src/views/customerTransform/components/tag-textarea.vue
src/views/customerTransform/components/welcomeWords.vue
src/views/homeSet/index.vue
src/views/seckillActivity/editActivity.vue
src/components/glsx-dialog/index.vue
View file @
4b63b59
...
...
@@ -10,7 +10,6 @@
:close-on-click-modal=
"false"
:modal-append-to-body=
"false"
:width=
"width"
class=
"app-dialog"
>
<el-scrollbar
v-if=
"hasScroll"
>
<span
slot=
"title"
>
...
...
src/views/couponManage/editCashCoupon.vue
View file @
4b63b59
...
...
@@ -7,17 +7,24 @@
<div
class=
"card_one"
>
<div>
<span
class=
"cname"
>
{{
editForm
.
couponName
}}
</span>
<span
class=
"ctype"
><span
class=
"ctypeName"
>
代金券
</span></span>
<span
class=
"ctype"
>
<span
class=
"ctypeName"
>
代金券
</span>
</span>
</div>
<div
class=
"ctime"
>
<span
class=
"ctime_name"
>
有效期:
</span>
<span
class=
"ctime_content"
v-if=
"editForm.effectiveType == 3"
>
无限制
</span>
<span
class=
"ctime_content"
v-if=
"editForm.effectiveType == 1"
>
{{
editForm
.
effectiveDays
}}
天
</span>
<span
class=
"ctime_content"
v-if=
"editForm.effectiveType == 1"
>
{{
editForm
.
effectiveDays
}}
天
</span>
<span
class=
"ctime_content"
v-if=
"editForm.effectiveType == 2"
>
{{
couponTime
}}
</span>
</div>
<div
class=
"ctime"
>
<span
class=
"ctime_name"
>
使用限制:
</span>
<span
class=
"ctime_content"
>
{{
editForm
.
useBarriers
==
1
?
'无限制'
:
'满'
+
editForm
.
full
+
'可用'
}}
</span>
<span
class=
"ctime_content"
>
{{
editForm
.
useBarriers
==
1
?
'无限制'
:
'满'
+
editForm
.
full
+
'可用'
}}
</span>
</div>
</div>
<div
class=
"card_two"
>
...
...
@@ -26,7 +33,17 @@
</div>
</div>
<p
class=
"edit-title"
>
{{
title
}}
代金券
</p>
<glsx-combi-form
class=
"edit-form-container"
style=
"min-height: 570px;"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
style=
"min-height: 570px;"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<template
slot=
"useChannelHtml"
>
<el-radio
v-model=
"editForm.useChannel"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
线上商品
</el-radio>
<el-radio
v-model=
"editForm.useChannel"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
到店核销
</el-radio>
...
...
@@ -34,34 +51,68 @@
<
template
slot=
"effectiveHtml"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"3"
:disabled=
"apear != 'couponAdd'"
>
无有效期
</el-radio>
<br
/>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px;display: block;"
>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px;display: block;"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"daterange"
style=
"width:295px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"daterange"
style=
"width:295px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
领取后
<el-input
v-model=
"editForm.effectiveDays"
style=
"width:100px;margin-left:5px;margin-right:5px"
:disabled=
"apear != 'couponAdd' || editForm.effectiveType != 1"
/>
天内有效
<el-input
v-model=
"editForm.effectiveDays"
style=
"width:100px;margin-left:5px;margin-right:5px"
:disabled=
"apear != 'couponAdd' || editForm.effectiveType != 1"
/>
天内有效
</el-radio>
</el-form-item>
</
template
>
<
template
slot=
"useBarriersHtml"
>
<el-radio
v-model=
"editForm.useBarriers"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
无限制
</el-radio>
<el-form-item
prop=
"full"
ref=
"full"
>
<el-radio
v-model=
"editForm.useBarriers"
label=
"2"
:disabled=
"apear != 'couponAdd' || editForm.useChannel == 2"
>
<el-radio
v-model=
"editForm.useBarriers"
label=
"2"
:disabled=
"apear != 'couponAdd' || editForm.useChannel == 2"
>
订单满
<el-input
v-model=
"editForm.full"
placeholder=
"输入金额(元)"
style=
"width: 110px;margin-left:5px;margin-right:5px"
:disabled=
"apear != 'couponAdd' || editForm.useBarriers != 2"
/>
元可用
<el-input
v-model=
"editForm.full"
placeholder=
"输入金额(元)"
style=
"width: 110px;margin-left:5px;margin-right:5px"
:disabled=
"apear != 'couponAdd' || editForm.useBarriers != 2"
/>
元可用
</el-radio>
</el-form-item>
</
template
>
<
template
slot=
"denominationHtml"
>
<el-input
v-model=
"editForm.denomination"
style=
"width: 150px"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
>
<el-input
v-model=
"editForm.denomination"
style=
"width: 150px"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
>
<span
slot=
"append"
>
元
</span>
</el-input>
<span
style=
"color:red;margin-left:15px"
v-if=
"priceFlag"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
<span
style=
"color:red;margin-left:15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
</
template
>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<
template
slot=
"goodsHtml"
>
...
...
@@ -74,7 +125,13 @@
<!-- 新增时并且为指定商品时显示,编辑或者查看时也显示 -->
<div
slot=
"proTable"
class=
"select-pro"
>
<!-- <div style="height:70px" v-if="editForm.goodsRefList.length"></div> -->
<GLTable
v-show=
"editForm.goodsRefList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.goodsRefList"
style=
"padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;"
>
<GLTable
v-show=
"editForm.goodsRefList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.goodsRefList"
style=
"padding-left:10px;margin-right:340px;max-height:350px;overflow:auto;"
>
<
template
slot=
"goodsImage"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.goodsImage"
/>
</
template
>
...
...
@@ -84,7 +141,14 @@
</GLTable>
</div>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" />
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }"
maxlength="200"
:disabled="apear == 'couponSee'"
/>
</
template
>
</glsx-combi-form>
</div>
...
...
@@ -93,7 +157,14 @@
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
<select-muti-pro-forcoupon-dialog
v-if=
"isMutiSelectVisible"
:isMutiSelectVisible=
"isMutiSelectVisible"
:searchForm=
"searchProForm"
:selectedProList=
"selectedProList"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-muti-pro-forcoupon-dialog>
<select-muti-pro-forcoupon-dialog
v-if=
"isMutiSelectVisible"
:isMutiSelectVisible=
"isMutiSelectVisible"
:searchForm=
"searchProForm"
:selectedProList=
"selectedProList"
@
handleMutiSelectConfirm=
"handleMutiSelectConfirm"
@
handleMutiSelectClose=
"handleMutiSelectClose"
></select-muti-pro-forcoupon-dialog>
</div>
</template>
...
...
@@ -473,7 +544,7 @@ export default {
})
}
this
.
tableParams
.
tableOption
=
false
//去掉操作栏
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
...
...
@@ -573,7 +644,7 @@ export default {
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
priceFlag
)
{
if
(
this
.
priceFlag
&&
this
.
editForm
.
useChannel
==
1
)
{
//存在零售价低于代金券的商品
return
}
...
...
@@ -614,12 +685,13 @@ export default {
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{})
.
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{})
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
}
...
...
src/views/customerTransform/addCustomer.vue
View file @
4b63b59
...
...
@@ -417,6 +417,13 @@ export default {
if
(
v
)
{
const
params
=
this
.
getSiftMembers
()
params
.
type
=
1
if
(
this
.
basicForm
.
condition
.
chat
.
length
>
100
)
{
this
.
$message
({
type
:
'error'
,
message
:
'所在群聊不可超过100个'
})
return
false
}
// params.attachmentList = this.basicForm.attachmentList
params
.
sendType
=
this
.
basicForm
.
sendType
const
previewList
=
this
.
$common
?
this
.
$common
.
utils
.
deepClone
(
this
.
$refs
.
welcome
.
previewList
)
:
this
.
$refs
.
welcome
.
previewList
...
...
@@ -535,7 +542,7 @@ export default {
let
s
=
list
[
str
.
split
(
'.'
)[
0
]]
return
`[
${
s
}
]`
})
item
.
attContent
=
replaceImg
item
.
attContent
=
replaceImg
.
substring
(
0
,
600
)
// item.attContent = item.attContent.replaceAll('@昵称', '[@昵称]')
}
else
if
(
item
.
attType
==
7
)
{
item
.
attContent
=
JSON
.
stringify
(
item
.
attContent
)
...
...
src/views/customerTransform/components/basicInfo.vue
View file @
4b63b59
...
...
@@ -80,10 +80,10 @@
class=
"el-tag-item"
:key=
"index"
>
<el-tag
v-if=
"index
<
3
"
type=
"info
"
>
{{
item
}}
</el-tag>
<el-tag
v-if=
"index
<
2
"
type=
"info"
class=
"hidden-tag
"
>
{{
item
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.chatName.split(',').length >
3 && index == 3
"
v-if=
"basicInfo.condition.chatName.split(',').length >
2 && index == 2
"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
chatName
.
split
(
','
).
length
}}
)
</span>
...
...
@@ -106,10 +106,10 @@
class=
"el-tag-item"
:key=
"idx"
>
<el-tag
v-if=
"idx
<
3
"
type=
"info
"
>
{{
itm
}}
</el-tag>
<el-tag
v-if=
"idx
<
2
"
type=
"info"
class=
"hidden-tag
"
>
{{
itm
}}
</el-tag>
<el-tag
type=
"info"
v-if=
"basicInfo.condition.tagName.split(',').length >
3 && idx == 3
"
v-if=
"basicInfo.condition.tagName.split(',').length >
2 && idx == 2
"
>
<el-popover
placement=
"top"
width=
"300"
trigger=
"hover"
>
<span
slot=
"reference"
>
...(
{{
basicInfo
.
condition
.
tagName
.
split
(
','
).
length
}}
)
</span>
...
...
@@ -221,9 +221,9 @@ export default {
// this.basicInfo.sendTime = dayjs(this.basicInfo.sendTime).format('YYYY-MM-DD HH:mm:ss')
const
previewList
=
res
.
attachmentList
.
map
(
item
=>
{
if
(
item
.
attType
==
7
&&
item
.
attContent
)
item
.
attContent
=
JSON
.
parse
(
item
.
attContent
)
if
(
item
.
attType
==
1
)
{
item
.
attContent
=
item
.
attContent
.
replaceAll
(
'[@昵称]'
,
'@昵称'
)
}
//
if (item.attType == 1) {
//
item.attContent = item.attContent.replaceAll('[@昵称]', '@昵称')
//
}
return
item
})
this
.
eventBus
.
$emit
(
'update'
,
previewList
)
...
...
@@ -324,6 +324,7 @@ export default {
line-height
:
40px
;
background
:
#f7f7f7
;
border
:
1px
solid
#d8d8d8
;
min-width
:
327px
;
.name
{
display
:
inline-block
;
...
...
@@ -379,4 +380,14 @@ export default {
.el-popover
.el-tag
{
margin-bottom
:
6px
;
}
.el-tag-item
{
display
:
inline-flex
;
align-items
:
center
;
}
.hidden-tag
{
max-width
:
82px
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
</
style
>
src/views/customerTransform/components/selectEmp.vue
View file @
4b63b59
...
...
@@ -86,12 +86,16 @@ export default {
this
.
$apis
.
customerTransform
.
listDepartmentTree
(
params
).
then
(
res
=>
{
this
.
listTree
=
res
this
.
loading
=
false
this
.
listTree
[
0
].
entmicroStaffResponses
=
this
.
getEmployee
(
this
.
listTree
)
this
.
currentArr
=
this
.
$common
.
utils
.
deepClone
(
this
.
listTree
[
0
].
entmicroStaffResponses
)
this
.
selectData
.
forEach
(
i
=>
{
const
row
=
this
.
getEmployee
(
this
.
listTree
).
find
(
j
=>
j
.
id
==
i
.
staffId
)
this
.
clearSelect
(
row
)
})
if
(
this
.
listTree
.
length
)
{
this
.
listTree
[
0
].
entmicroStaffResponses
=
this
.
getEmployee
(
this
.
listTree
)
this
.
currentArr
=
this
.
$common
.
utils
.
deepClone
(
this
.
listTree
[
0
].
entmicroStaffResponses
)
}
if
(
this
.
selectData
&&
this
.
selectData
.
length
)
{
this
.
selectData
.
forEach
(
i
=>
{
const
row
=
this
.
getEmployee
(
this
.
listTree
).
find
(
j
=>
j
.
id
==
i
.
staffId
)
this
.
clearSelect
(
row
)
})
}
this
.
$nextTick
(()
=>
{
document
.
getElementsByClassName
(
'el-tree-node__expand-icon'
)[
0
].
click
()
document
.
getElementsByClassName
(
'el-tree-node__content'
)[
0
].
click
()
...
...
@@ -114,7 +118,10 @@ export default {
d
.
forEach
(
i
=>
{
if
(
i
.
entmicroStaffResponses
)
{
i
.
entmicroStaffResponses
.
forEach
(
j
=>
{
arr
.
push
(
j
)
const
flag
=
arr
.
find
(
m
=>
m
.
id
==
j
.
id
)
if
(
!
flag
)
{
arr
.
push
(
j
)
}
})
}
if
(
i
.
children
)
{
...
...
src/views/customerTransform/components/selectMembers.vue
View file @
4b63b59
<
template
>
<div
class=
"drawer-sale-panel"
>
<el-form
label-width=
"100px"
:model=
"addForm"
>
<el-form
label-width=
"100px"
:model=
"addForm"
@
submit
.
native
.
prevent
>
<el-form-item
label=
"请选择成员"
>
<div
class=
"sale-select"
>
<div
class=
"el-input-tag input-tag-wrapper"
@
click=
"foucusTagInput"
>
...
...
@@ -23,6 +23,7 @@
placeholder=
"选择员工"
@
input=
"inputTag"
style=
"outline: none; border: none"
@
keyup
.
enter
.
native=
"searchEmp"
></el-input>
</div>
<div>
...
...
@@ -88,6 +89,7 @@ export default {
},
//查询
searchEmp
()
{
console
.
log
(
1111
)
this
.
$refs
.
selectEmpTabel
.
searchTable
(
this
.
newTag
)
},
onSubmit
()
{
...
...
src/views/customerTransform/components/tag-textarea.vue
View file @
4b63b59
...
...
@@ -188,6 +188,7 @@ export default {
// 创建a标签
let
node
=
document
.
createElement
(
'img'
)
node
.
src
=
url
// node.setAttribute('ondragstart', 'return false;')
this
.
insertNode
(
node
)
},
onFocus
()
{
...
...
@@ -206,6 +207,7 @@ export default {
document
.
querySelector
(
'.w-textarea_input'
).
focus
()
setTimeout
(()
=>
{
this
.
insertNodeFirst
(
node
)
document
.
querySelector
(
'.w-textarea_input'
).
blur
()
},
100
)
}
},
...
...
@@ -557,6 +559,9 @@ export default {
img
{
width
:
24px
;
height
:
24px
;
-webkit-user-select
:
none
;
cursor
:
default
;
pointer-events
:
none
;
}
.active
{
background
:
#dcdfe6
;
...
...
src/views/customerTransform/components/welcomeWords.vue
View file @
4b63b59
...
...
@@ -88,7 +88,8 @@
<div
class=
"tips-text"
>
<img
src=
"@/assets/guestCustom/tips.png"
class=
"tips-icon"
alt
/>
<span
@
click=
"selectEmotion"
>
如在企业微信管理后台已为所选员工设置了欢迎语,则此处设置的将不生效。
</span>
<span
v-if=
"form == 'customer'"
>
每位客户每天可接收1条群发消息,超过接收上限的客户将无法再收到群发消息。
</span>
<span
v-if=
"form == 'customerGroup'"
>
每个客户群每天可接收1条群发消息,超过接收上限的客户群将无法再收到群发消息。
</span>
</div>
</div>
<ActivityModel
ref=
"activity"
@
selectActivity=
"selectActivity"
></ActivityModel>
...
...
@@ -116,7 +117,7 @@ export default {
Emotion
,
wTextarea
},
props
:
{
eventBus
:
Object
,
btnList
:
Array
},
props
:
{
eventBus
:
Object
,
btnList
:
Array
,
form
:
String
},
data
()
{
return
{
loading
:
false
,
...
...
@@ -454,7 +455,8 @@ export default {
this
.
previewList
=
val
this
.
eventBus
.
$emit
(
'update'
,
this
.
previewList
)
const
obj
=
val
.
find
(
item
=>
item
.
attType
==
1
)
let
attContent
=
obj
.
attContent
.
replaceAll
(
'[@昵称]'
,
'<wise id="1">@昵称</wise>'
)
// let attContent = obj.attContent.replaceAll('[@昵称]', '<wise id="1">@昵称</wise>')
let
attContent
=
obj
.
attContent
const
htm
=
attContent
.
replace
(
/
\[[\u
4E00-
\u
9FA5
]{1,3}
]/gi
,
function
(
res
)
{
let
word
=
res
.
replace
(
/
\[
|
\]
/gi
,
''
)
const
list
=
[
...
...
@@ -739,7 +741,7 @@ export default {
justify-self
:
center
;
color
:
#000
;
font-size
:
14px
;
padding
:
13px
16px
;
padding
:
0
16px
;
margin-top
:
10px
;
background-color
:
rgba
(
230
,
233
,
255
,
0.49
);
border
:
1px
solid
rgba
(
88
,
80
,
255
,
0.49
);
...
...
src/views/homeSet/index.vue
View file @
4b63b59
...
...
@@ -102,7 +102,8 @@
<p
class=
"edit-tips"
>
建议尺寸660*270px,大小10M以内
</p>
</div>
<
template
slot=
"customerServerSuffix"
slot-scope=
"scope"
>
<el-button
v-show=
"!scope.scope.optionList.length"
type=
"text"
@
click=
"handleNoServer"
>
请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员
</el-button>
<el-button
v-show=
"!scope.scope.optionList.length"
type=
"text"
></el-button>
<p
style=
"color: #5850ff;"
@
click=
"handleNoServer"
>
请在首页-跟进专员模块里添加类型为“在线客服”的跟进专员
</p>
</
template
>
<!-- <div slot="serviceTable" :style="{ 'margin-left': labelWidth, width: `calc(100% - ${labelWidth} )` }">
<GLTable v-show="editForm.customerServerUserId" :hasPage="false" :tableParams="tableParams" :tableData="customerServerList"></GLTable>
...
...
src/views/seckillActivity/editActivity.vue
View file @
4b63b59
...
...
@@ -43,21 +43,12 @@
<td
:style=
"{ width: specsWidth }"
v-for=
"(n, idx) in item.specsValueList"
:key=
"idx"
>
{{ n }}
</td>
<td
:style=
"{ width: specsWidth }"
>
{{ item.retailPrice }}元
</td>
<td
:style=
"{ width: specsWidth }"
>
{{ item.stock }}件
</td>
<!-- <td :style="{ width: specsWidth }">
<el-input :disabled="isDisabled" :class="{ 'border-red': (!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted }" placeholder="零售价" v-model="item.retailPrice" @input.native="e => handleInput(e, index)">
<el-popover v-show="(!(item.retailPrice + '') || +item.supplyPrice > +item.retailPrice) && submitted" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="!(item.retailPrice + '') ? '零售价是必填项' : '零售价要大于供货价'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td> -->
<td
:style=
"{ width: specsWidth }"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"秒杀价"
style=
"width:90%"
v-model=
"item.activityPrice"
@
input=
"item.activityPrice = activityPrice_input($event, item.retailPrice)"
>
<!-- <span slot="append">元</span> -->
</el-input>
</td>
<td
:style=
"{ width: specsWidth }"
>
<el-input
:disabled=
"isDisabled"
placeholder=
"活动库存"
style=
"width:90%"
v-model=
"item.goodsStock"
@
input=
"item.goodsStock = goodsStock_input($event, item.stock)"
>
<!-- <span slot="append">件</span> -->
</el-input>
</td>
</tr>
...
...
@@ -72,7 +63,7 @@
<el-button
v-if=
"apear != 'see'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear == 'see'"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
<select-single-pro-dialog
v-if=
"isSingleSelectVisible"
:isSingleSelectVisible=
"isSingleSelectVisible"
:selectedProInfo=
"selectedProInfo"
@
handleSingleSelectConfirm=
"handleSingleSelectConfirm"
@
handleSingleSelectClose=
"handleSingleSelectClose"
></select-single-pro-dialog>
<select-single-pro-dialog
v-if=
"isSingleSelectVisible"
:isSingleSelectVisible=
"isSingleSelectVisible"
:selectedProInfo=
"selectedProInfo"
@
handleSingleSelectConfirm=
"handleSingleSelectConfirm"
@
handleSingleSelectClose=
"handleSingleSelectClose
(true)
"
></select-single-pro-dialog>
</div>
</template>
...
...
@@ -102,6 +93,7 @@ export default {
addOrEdit
:
1
,
id
:
''
},
editStatus
:
false
,
/* eslint-disable */
reg
:
{
priceReg
:
/^
\d[\d\.]
*$/
,
...
...
@@ -213,7 +205,6 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
params
// this.title = this.titleObj[this.routeInfo.addOrEdit]
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
var
id
=
this
.
routeInfo
.
id
var
addOrEdit
=
this
.
routeInfo
.
addOrEdit
...
...
@@ -236,6 +227,12 @@ export default {
},
watch
:
{
editForm
:
{
handler
(
val
)
{
this
.
editStatus
=
true
},
deep
:
true
},
'editForm.activityPrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
activityPrice
=
limitPrice
(
newValue
,
oldValue
,
5
,
2
,
0
,
(
this
.
selectedProInfo
.
retailPrice
/
100
).
toFixed
(
2
))
},
...
...
@@ -247,10 +244,6 @@ export default {
methods
:
{
limitPriceForInput
(
val
,
intergerDigit
,
pointDigit
,
minValue
,
maxValue
,
regRule
)
{
var
_regRule
=
regRule
||
'priceReg'
// if (val && (minValue && (val < minValue)) || (maxValue && (val > maxValue))) {
// console.log('aaa');
// return maxValue ? maxValue : (minValue?minValue:'')
// }
if
(
val
&&
this
.
reg
[
_regRule
].
test
(
val
+
''
))
{
maxValue
=
typeof
maxValue
==
'string'
?
parseFloat
(
maxValue
)
:
maxValue
minValue
=
typeof
minValue
==
'string'
?
parseFloat
(
minValue
)
:
minValue
...
...
@@ -283,41 +276,26 @@ export default {
this
.
handleSingleSelectClose
()
},
handleSingleSelectConfirm
(
selectedProInfo
)
{
// this.editForm.goodsId = selectedProInfo.id
// this.editForm.goodsName = selectedProInfo.goodsName
// this.editForm.goodsImage = selectedProInfo.goodsImage
this
.
editForm
.
activityPrice
=
''
this
.
editForm
.
goodsStock
=
''
this
.
handleSingleSelectClose
()
if
(
selectedProInfo
)
{
this
.
editForm
.
goodsId
=
selectedProInfo
.
id
this
.
getGoodInfo
(
selectedProInfo
.
id
)
}
},
handleSingleSelectClose
()
{
handleSingleSelectClose
(
isCancel
=
false
)
{
if
(
isCancel
)
{
this
.
getGoodInfo
(
this
.
selectedProInfo
.
id
)
}
this
.
isSingleSelectVisible
=
!
this
.
isSingleSelectVisible
},
getGoodInfo
(
id
)
{
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
id
}).
then
(
res
=>
{
// this.editForm = {
// ...res,
// retailPrice: '',
// supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : ''
// }
// // 规格
// if (this.editForm.specificationList.length) {
// this.specificationDetailList = this.$common.utils.deepClone(this.editForm.specificationList)
// this.recoverySpec()
// // this.findSpeceMin()
// } else {
// // 零售价
// this.editForm.retailPrice = (res.retailPrice / 100).toFixed(2)
// }
// this.mainImgUrl = this.editForm.goodsDetailImageList[0].content
// this.moveNum = this.editForm.goodsDetailImageList.length > 4 ? this.editForm.goodsDetailImageList.length - 4 : 0
this
.
selectedProInfo
=
this
.
$common
.
utils
.
deepClone
(
res
)
if
(
this
.
selectedProInfo
.
specificationDetailList
.
length
)
{
this
.
editFormData
[
5
].
isHide
=
false
// this.specificationDetailList = this.$common.utils.deepClone(res.specificationList)
this
.
specificationDetailList
=
this
.
selectedProInfo
.
specificationList
this
.
recoverySpec
()
}
else
{
...
...
@@ -380,7 +358,6 @@ export default {
item
.
retailPrice
=
(
temp
.
retailPrice
/
100
).
toFixed
(
2
)
item
.
stock
=
temp
.
stock
item
.
specificationKey
=
temp
.
specificationKey
// item.supplyPrice = this.editForm.supplyPrice
break
}
}
...
...
@@ -397,7 +374,7 @@ export default {
}
})
}
// console.log(this.nameToValSpecsList)
;
// console.log(this.nameToValSpecsList)
},
setLocaleCompare
(
params
)
{
let
keys
=
[]
...
...
@@ -435,11 +412,15 @@ export default {
form
.
activityImg
=
info
.
activityImg
form
.
promotion
=
info
.
promotion
form
.
activityTime
=
[
info
.
startTime
,
info
.
endTime
]
form
.
goodsId
=
info
.
goodsId
this
.
getGoodInfo
(
info
.
goodsId
)
if
(
info
.
activityPrice
!=
null
&&
info
.
goodsStock
!=
null
)
{
form
.
activityPrice
=
(
info
.
activityPrice
/
100
).
toFixed
(
2
)
form
.
goodsStock
=
info
.
goodsStock
}
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
})
})
},
...
...
@@ -532,16 +513,30 @@ export default {
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleCancel
()
this
.
cancelJump
()
}
})
}
})
},
handleCancel
()
{
cancelJump
()
{
this
.
$router
.
push
({
path
:
'/seckillActivity/index'
})
},
handleCancel
()
{
if
(
this
.
editStatus
)
{
this
.
$confirm
(
'当前有内容信息未保存,是否继续返回?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
cancelJump
()
})
.
catch
(()
=>
{})
}
else
{
this
.
cancelJump
()
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment