Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
integral-mall
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
integralMall
integral-mall
Commits
efe197e1
Commit
efe197e1
authored
Sep 20, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 积分购现金权限
parent
b9c7e3d5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
327 additions
and
43 deletions
+327
-43
App.vue
src/App.vue
+5
-0
index.css
src/assets/theme/index.css
+2
-1
getSkuList.vue
src/components/getSkuList.vue
+45
-4
updataCash.vue
src/components/updataCash.vue
+45
-9
detail.vue
src/views/activities/flashSale/detail.vue
+18
-0
detail.vue
src/views/goods/coupon/detail.vue
+63
-2
addSku.vue
src/views/goods/gift/addSku.vue
+48
-11
detail.vue
src/views/goods/gift/detail.vue
+101
-16
No files found.
src/App.vue
View file @
efe197e1
...
@@ -23,6 +23,11 @@ export default {
...
@@ -23,6 +23,11 @@ export default {
request
.
get
(
'/api-auth/get-login-user-info'
).
then
(
res
=>
{
request
.
get
(
'/api-auth/get-login-user-info'
).
then
(
res
=>
{
if
(
res
.
data
.
errorCode
===
0
)
{
if
(
res
.
data
.
errorCode
===
0
)
{
this
.
userId
=
res
.
data
.
result
.
userId
;
this
.
userId
=
res
.
data
.
result
.
userId
;
const
limitCodeType
=
res
.
data
.
result
.
limitCodeList
;
if
(
limitCodeType
)
{
const
jifenquanxian
=
limitCodeType
.
indexOf
(
'integralCashPurchase'
)
!=
-
1
;
localStorage
.
setItem
(
'limitCodeType'
,
jifenquanxian
);
}
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
...
...
src/assets/theme/index.css
View file @
efe197e1
...
@@ -47126,7 +47126,8 @@
...
@@ -47126,7 +47126,8 @@
.el-popover
{
.el-popover
{
position
:
absolute
;
position
:
absolute
;
background
:
#fff
;
background
:
#fff
;
min-width
:
150px
;
/* min-width: 150px; */
min-width
:
auto
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#ebeef5
;
border
:
1px
solid
#ebeef5
;
padding
:
12px
;
padding
:
12px
;
src/components/getSkuList.vue
View file @
efe197e1
...
@@ -28,7 +28,23 @@
...
@@ -28,7 +28,23 @@
<td
:key=
"index3"
v-for=
"(item3, index3) in item2"
v-if=
"intergralModal.type === 'cash'"
>
<td
:key=
"index3"
v-for=
"(item3, index3) in item2"
v-if=
"intergralModal.type === 'cash'"
>
<span
v-if=
"item2.length - index3 > 2"
style=
"width:120px;display:inline-block"
>
{{
item3
.
valueName
}}
</span>
<span
v-if=
"item2.length - index3 > 2"
style=
"width:120px;display:inline-block"
>
{{
item3
.
valueName
}}
</span>
<p
v-else
>
<p
v-else
>
<el-input
v-model=
"item3.valueName"
placeholder=
"请输入内容"
@
blur=
"inputLimit(item3, index3, item2)"
/>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
v-model=
"item3.valueName"
placeholder=
"请输入内容"
:disabled=
"jifenquanxian && intergralModal.headerList[index3].proName == '现金'"
@
blur=
"inputLimit(item3, index3, item2)"
/>
</el-popover>
<el-input
v-else
v-model=
"item3.valueName"
placeholder=
"请输入内容"
@
blur=
"inputLimit(item3, index3, item2)"
/>
</p>
</p>
</td>
</td>
</tr>
</tr>
...
@@ -50,7 +66,23 @@
...
@@ -50,7 +66,23 @@
/>
/>
</p>
</p>
<p><el-input
v-model=
"giftProSkuIntegral"
placeholder=
"请输入内容"
@
blur=
"limitSkuIntegral"
/></p>
<p><el-input
v-model=
"giftProSkuIntegral"
placeholder=
"请输入内容"
@
blur=
"limitSkuIntegral"
/></p>
<p><el-input
v-model=
"giftProSkuCash"
placeholder=
"请输入内容"
@
blur=
"limitSkuCash"
/></p>
<p
>
<el-popover
placement=
"bottom"
trigger=
"hover"
v-if=
"jifenquanxian"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
v-model=
"giftProSkuCash"
placeholder=
"请输入内容"
@
blur=
"limitSkuCash"
:disabled=
"jifenquanxian"
/>
</el-popover>
<el-input
v-else
v-model=
"giftProSkuCash"
placeholder=
"请输入内容"
@
blur=
"limitSkuCash"
/>
</p>
</div>
</div>
</div>
</div>
<div
class=
"gift-spu"
v-if=
"intergralModal.type === 'stock' && intergralModal.tableSkuData.length === 0"
>
<div
class=
"gift-spu"
v-if=
"intergralModal.type === 'stock' && intergralModal.tableSkuData.length === 0"
>
...
@@ -80,6 +112,7 @@ export default {
...
@@ -80,6 +112,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
jifenquanxian
:
''
,
payload
:
[],
payload
:
[],
giftProSkuCode
:
''
,
giftProSkuCode
:
''
,
giftProSkuIntegral
:
''
,
giftProSkuIntegral
:
''
,
...
@@ -89,6 +122,7 @@ export default {
...
@@ -89,6 +122,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
if
(
this
.
intergralModal
.
type
===
'cash'
)
{
if
(
this
.
intergralModal
.
type
===
'cash'
)
{
this
.
title
=
'编辑积分费用或现金费用'
;
this
.
title
=
'编辑积分费用或现金费用'
;
}
else
if
(
this
.
intergralModal
.
type
===
'stock'
)
{
}
else
if
(
this
.
intergralModal
.
type
===
'stock'
)
{
...
@@ -101,6 +135,12 @@ export default {
...
@@ -101,6 +135,12 @@ export default {
this
.
virtualStock
=
this
.
intergralModal
.
virtualStock
;
// 库存
this
.
virtualStock
=
this
.
intergralModal
.
virtualStock
;
// 库存
this
.
currentStock
=
this
.
intergralModal
.
virtualStock
;
this
.
currentStock
=
this
.
intergralModal
.
virtualStock
;
},
},
// mounted () {
// setTimeout(_ => {
// this.jifenquanxian = localStorage.getItem('limitCodeType') == 'true';
// console.log(typeof this.jifenquanxian, ((!this.jifenquanxian) == false), 'this.jifenquanxian');
// }, 500);
// },
methods
:
{
methods
:
{
limitSkuCode
()
{
limitSkuCode
()
{
const
reg
=
/^
[
0-9a-zA-Z
\-]
+
?
$/
;
const
reg
=
/^
[
0-9a-zA-Z
\-]
+
?
$/
;
...
@@ -132,6 +172,7 @@ export default {
...
@@ -132,6 +172,7 @@ export default {
}
}
},
},
limitSkuCash
()
{
limitSkuCash
()
{
if
(
this
.
jifenquanxian
)
return
;
if
(
Number
(
this
.
giftProSkuCash
)
<
0
)
{
if
(
Number
(
this
.
giftProSkuCash
)
<
0
)
{
this
.
$message
.
error
(
'请输入大于0的数字'
);
this
.
$message
.
error
(
'请输入大于0的数字'
);
this
.
giftProSkuCash
=
''
;
this
.
giftProSkuCash
=
''
;
...
@@ -197,7 +238,7 @@ export default {
...
@@ -197,7 +238,7 @@ export default {
}
else
{
}
else
{
item2
.
valueName
=
Number
(
item2
.
valueName
).
toFixed
(
0
);
item2
.
valueName
=
Number
(
item2
.
valueName
).
toFixed
(
0
);
}
}
}
else
if
(
item1
.
length
-
index2
===
1
)
{
}
else
if
(
item1
.
length
-
index2
===
1
&&
!
this
.
jifenquanxian
)
{
// 现金
// 现金
// 现金
// 现金
if
(
Number
(
item2
.
valueName
<
0
))
{
if
(
Number
(
item2
.
valueName
<
0
))
{
...
@@ -367,7 +408,7 @@ export default {
...
@@ -367,7 +408,7 @@ export default {
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"less"
scoped
>
.spu-table
{
.spu-table
{
width
:
580px
;
width
:
580px
;
font-size
:
14px
;
font-size
:
14px
;
...
...
src/components/updataCash.vue
View file @
efe197e1
...
@@ -22,14 +22,32 @@
...
@@ -22,14 +22,32 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"cashCost"
label=
"现金"
>
<el-table-column
prop=
"cashCost"
label=
"现金"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input-number
<el-popover
v-model=
"scope.row.cashCost"
popper-class=
"noClass"
:precision=
"2"
v-if=
"jifenquanxian == true"
:min=
"0"
placement=
"bottom"
controls-position=
"right"
trigger=
"hover"
@
blur=
"handleIntegralCostTotal"
content=
"无积分购现金权限"
>
@
change=
"handleIntegralCostTotal"
<el-input-number
/>
slot=
"reference"
:disabled=
"jifenquanxian"
v-model=
"scope.row.cashCost"
:precision=
"2"
:min=
"0"
controls-position=
"right"
@
blur=
"handleIntegralCostTotal"
@
change=
"handleIntegralCostTotal"
/>
</el-popover>
<el-input-number
v-else
v-model=
"scope.row.cashCost"
:precision=
"2"
:min=
"0"
controls-position=
"right"
@
blur=
"handleIntegralCostTotal"
@
change=
"handleIntegralCostTotal"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -48,7 +66,23 @@
...
@@ -48,7 +66,23 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"cashCost"
label=
"现金"
>
<el-table-column
prop=
"cashCost"
label=
"现金"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-input-number
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input-number
slot=
"reference"
:disabled=
"jifenquanxian"
v-model=
"scope.row.cashCost"
:precision=
"2"
:min=
"0"
controls-position=
"right"
/>
</el-popover>
<el-input-number
v-else
:disabled=
"cardCostList.length > 1"
:disabled=
"cardCostList.length > 1"
v-model=
"scope.row.cashCost"
v-model=
"scope.row.cashCost"
:precision=
"2"
:precision=
"2"
...
@@ -84,12 +118,14 @@ export default {
...
@@ -84,12 +118,14 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
jifenquanxian
:
''
,
dialogVisible
:
true
,
dialogVisible
:
true
,
cardCostList
:
[],
cardCostList
:
[],
tableData
:
[],
tableData
:
[],
};
};
},
},
created
()
{
created
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
...
...
src/views/activities/flashSale/detail.vue
View file @
efe197e1
...
@@ -276,7 +276,23 @@
...
@@ -276,7 +276,23 @@
/>
/>
</div>
</div>
<div
v-if=
"!(row.giftType && row.children && row.children.length) && !isEdit"
class=
"mt10"
>
<div
v-if=
"!(row.giftType && row.children && row.children.length) && !isEdit"
class=
"mt10"
>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
v-model
.
trim=
"row.activityPrice"
:disabled=
"jifenquanxian"
placeholder=
"输入现金"
size=
"small"
class=
"w-110"
/>
</el-popover>
<el-input
<el-input
v-else
v-model
.
trim=
"row.activityPrice"
v-model
.
trim=
"row.activityPrice"
:disabled=
"!row.activityProStatus"
:disabled=
"!row.activityProStatus"
placeholder=
"输入现金"
placeholder=
"输入现金"
...
@@ -533,6 +549,7 @@ export default {
...
@@ -533,6 +549,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
jifenquanxian
:
''
,
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
// disabledDate 文档上:设置禁用状态,参数为当前日期,要求返回 Boolean
// disabledDate 文档上:设置禁用状态,参数为当前日期,要求返回 Boolean
...
@@ -625,6 +642,7 @@ export default {
...
@@ -625,6 +642,7 @@ export default {
},
},
},
},
created
()
{
created
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
// this.isEdit = this.$route.query.edit;
// this.isEdit = this.$route.query.edit;
this
.
isEdit
=
!!
this
.
$route
.
query
.
activityId
;
this
.
isEdit
=
!!
this
.
$route
.
query
.
activityId
;
this
.
activityId
=
this
.
$route
.
query
.
activityId
;
this
.
activityId
=
this
.
$route
.
query
.
activityId
;
...
...
src/views/goods/coupon/detail.vue
View file @
efe197e1
...
@@ -193,7 +193,25 @@
...
@@ -193,7 +193,25 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"现金费用"
>
<el-table-column
label=
"现金费用"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input-number
slot=
"reference"
:disabled=
"jifenquanxian"
v-model=
"scope.row.cashCost"
:precision=
"2"
:min=
"0"
controls-position=
"right"
@
blur=
"handleIntegralCostTotal"
@
change=
"handleIntegralCostTotal"
/>
</el-popover>
<el-input-number
<el-input-number
v-else
v-model=
"scope.row.cashCost"
v-model=
"scope.row.cashCost"
:precision=
"2"
:precision=
"2"
:min=
"0"
:min=
"0"
...
@@ -215,7 +233,23 @@
...
@@ -215,7 +233,23 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"现金费用"
prop=
"cashCost"
>
<el-form-item
label=
"现金费用"
prop=
"cashCost"
>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input-number
slot=
"reference"
class=
"w-350"
:disabled=
"jifenquanxian"
:precision=
"2"
:min=
"0"
v-model=
"couponForm.cashCost"
/>
</el-popover>
<el-input-number
<el-input-number
v-else
class=
"w-350"
class=
"w-350"
:disabled=
"cardCouponList.length > 1"
:disabled=
"cardCouponList.length > 1"
:precision=
"2"
:precision=
"2"
...
@@ -331,7 +365,24 @@
...
@@ -331,7 +365,24 @@
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
/>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"现金"
>
<el-form-item
label=
"现金"
>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
元
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
:disabled=
"jifenquanxian"
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
</el-popover>
<el-input
v-else
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
元
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-tab-pane>
</el-tab-pane>
...
@@ -582,6 +633,7 @@ export default {
...
@@ -582,6 +633,7 @@ export default {
}
}
};
};
return
{
return
{
jifenquanxian
:
''
,
addCardMax
:
15
,
// 添加卡券的上限数量
addCardMax
:
15
,
// 添加卡券的上限数量
ladder
:
[],
ladder
:
[],
isDifferentialPricing
:
''
,
isDifferentialPricing
:
''
,
...
@@ -719,6 +771,7 @@ export default {
...
@@ -719,6 +771,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
this
.
getOpenStatus
();
this
.
getOpenStatus
();
this
.
getUserId
();
this
.
getUserId
();
window
.
onbeforeunload
=
function
(
e
)
{
window
.
onbeforeunload
=
function
(
e
)
{
...
@@ -845,6 +898,10 @@ export default {
...
@@ -845,6 +898,10 @@ export default {
break
;
break
;
}
}
if
((
skuList
[
j
].
giftProSkuCash
===
''
||
skuList
[
j
].
giftProSkuCash
===
null
)
&&
skuList
[
j
].
giftProSkuIntegral
)
{
if
((
skuList
[
j
].
giftProSkuCash
===
''
||
skuList
[
j
].
giftProSkuCash
===
null
)
&&
skuList
[
j
].
giftProSkuIntegral
)
{
if
(
this
.
jifenquanxian
)
{
skuList
[
j
].
giftProSkuCash
=
0.00
;
return
;
}
this
.
isCorrect
=
false
;
this
.
isCorrect
=
false
;
this
.
$message
.
error
(
'已填入积分,则必填现金'
);
this
.
$message
.
error
(
'已填入积分,则必填现金'
);
break
;
break
;
...
@@ -1385,7 +1442,11 @@ export default {
...
@@ -1385,7 +1442,11 @@ export default {
}
}
if
(
this
.
cardCouponList
.
length
>
1
)
{
if
(
this
.
cardCouponList
.
length
>
1
)
{
for
(
const
item
of
this
.
cardCouponList
)
{
for
(
const
item
of
this
.
cardCouponList
)
{
if
(
item
.
cashCost
===
undefined
||
item
.
integralCost
===
undefined
)
{
if
(
item
.
integralCost
===
undefined
)
{
this
.
$message
.
error
(
'卡券积分不能为空'
);
return
false
;
}
if
(
item
.
cashCost
===
undefined
&&
!
this
.
jifenquanxian
)
{
this
.
$message
.
error
(
'卡券积分或现金不能为空'
);
this
.
$message
.
error
(
'卡券积分或现金不能为空'
);
return
false
;
return
false
;
}
}
...
...
src/views/goods/gift/addSku.vue
View file @
efe197e1
...
@@ -110,13 +110,30 @@
...
@@ -110,13 +110,30 @@
class=
"w-100 margin-right10 vertical-top"
class=
"w-100 margin-right10 vertical-top"
@
blur=
"limitIntergral(intergral)"
@
blur=
"limitIntergral(intergral)"
/>
/>
<el-input
<el-popover
v-model=
"cash"
popper-class=
"noClass"
placeholder=
"现金"
v-if=
"jifenquanxian"
size=
"small"
placement=
"bottom"
class=
"w-100 margin-right10 vertical-top"
trigger=
"hover"
@
blur=
"limitCash"
content=
"无积分购现金权限"
>
/>
<el-input
slot=
"reference"
:disabled=
"jifenquanxian"
v-model=
"cash"
placeholder=
"现金"
size=
"small"
class=
"w-100 margin-right10 vertical-top"
@
blur=
"limitCash"
/>
</el-popover>
<el-input
v-else
v-model=
"cash"
placeholder=
"现金"
size=
"small"
class=
"w-100 margin-right10 vertical-top"
@
blur=
"limitCash"
/>
<el-input
<el-input
v-model=
"stock"
v-model=
"stock"
placeholder=
"库存"
placeholder=
"库存"
...
@@ -176,11 +193,27 @@
...
@@ -176,11 +193,27 @@
<td
:key=
"index2"
style=
"width:120px"
v-if=
"item1.length - index2 > 1"
>
<td
:key=
"index2"
style=
"width:120px"
v-if=
"item1.length - index2 > 1"
>
<!--
{{
item1
[
7
]
}}
-->
<!--
{{
item1
[
7
]
}}
-->
<span
v-if=
"item1.length - index2
<
7
"
>
<span
v-if=
"item1.length - index2
<
7
"
>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
size=
"small"
v-model
.
trim=
"item2.valueName"
@
blur=
"skuInput(item1, item2, index1, index2)"
@
input=
"setSkuValueName"
:disabled=
"jifenquanxian && index2 == 2"
/>
</el-popover>
<el-input
<el-input
size=
"small"
size=
"small"
v-model
.
trim=
"item2.valueName"
v-model
.
trim=
"item2.valueName"
@
blur=
"skuInput(item1, item2, index1, index2)"
@
blur=
"skuInput(item1, item2, index1, index2)"
@
input=
"setSkuValueName"
@
input=
"setSkuValueName"
v-else
/>
/>
</span>
</span>
...
@@ -232,6 +265,7 @@ export default {
...
@@ -232,6 +265,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
jifenquanxian
:
''
,
// skuJson: [],
// skuJson: [],
standardList
:
[],
// 规格列表
standardList
:
[],
// 规格列表
standardValueList
:
[],
// 规格值列表
standardValueList
:
[],
// 规格值列表
...
@@ -240,7 +274,7 @@ export default {
...
@@ -240,7 +274,7 @@ export default {
uploadAction
:
window
.
location
.
origin
+
'/api-plug/upload-img?requestProject=intergral-mall'
,
uploadAction
:
window
.
location
.
origin
+
'/api-plug/upload-img?requestProject=intergral-mall'
,
// uploadAction: 'http://www.gicdev.com/api-plug/upload-img?requestProject=intergral-mall',
// uploadAction: 'http://www.gicdev.com/api-plug/upload-img?requestProject=intergral-mall',
intergral
:
''
,
intergral
:
''
,
cash
:
''
,
cash
:
0.00
,
stock
:
''
,
stock
:
''
,
code
:
''
,
code
:
''
,
barCode
:
''
,
barCode
:
''
,
...
@@ -256,6 +290,7 @@ export default {
...
@@ -256,6 +290,7 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
// this.skuList = copy(this.combine(copy(this.skuJson)));
// this.skuList = copy(this.combine(copy(this.skuJson)));
},
},
methods
:
{
methods
:
{
...
@@ -598,17 +633,18 @@ export default {
...
@@ -598,17 +633,18 @@ export default {
// 现金
// 现金
limitCash
()
{
limitCash
()
{
if
(
this
.
jifenquanxian
)
return
;
if
(
Number
(
this
.
cash
)
===
0
)
{
if
(
Number
(
this
.
cash
)
===
0
)
{
return
false
;
return
false
;
}
else
if
(
!
Number
(
this
.
cash
))
{
}
else
if
(
!
Number
(
this
.
cash
))
{
this
.
$message
.
error
(
'请输入数字类型'
);
this
.
$message
.
error
(
'请输入数字类型'
);
this
.
cash
=
''
;
this
.
cash
=
0.00
;
}
else
if
(
Number
(
this
.
cash
)
<
0
)
{
}
else
if
(
Number
(
this
.
cash
)
<
0
)
{
this
.
$message
.
error
(
'请输入大于0的数字'
);
this
.
$message
.
error
(
'请输入大于0的数字'
);
this
.
cash
=
''
;
this
.
cash
=
0.00
;
}
else
if
(
Number
(
this
.
cash
)
>
9999999
)
{
}
else
if
(
Number
(
this
.
cash
)
>
9999999
)
{
this
.
$message
.
error
(
'现金最大9999999'
);
this
.
$message
.
error
(
'现金最大9999999'
);
this
.
cash
=
''
;
this
.
cash
=
0.00
;
}
else
{
}
else
{
this
.
cash
=
Number
(
this
.
cash
).
toFixed
(
2
);
this
.
cash
=
Number
(
this
.
cash
).
toFixed
(
2
);
}
}
...
@@ -748,6 +784,7 @@ export default {
...
@@ -748,6 +784,7 @@ export default {
item2
.
valueName
=
Number
(
item2
.
valueName
).
toFixed
(
0
);
item2
.
valueName
=
Number
(
item2
.
valueName
).
toFixed
(
0
);
}
}
}
else
if
(
item1
.
length
-
index2
===
5
)
{
}
else
if
(
item1
.
length
-
index2
===
5
)
{
if
(
this
.
jifenquanxian
)
return
;
// 现金
// 现金
if
(
Number
(
item2
.
valueName
<
0
))
{
if
(
Number
(
item2
.
valueName
<
0
))
{
this
.
$message
.
error
(
'请输入大于0的数字'
);
this
.
$message
.
error
(
'请输入大于0的数字'
);
...
...
src/views/goods/gift/detail.vue
View file @
efe197e1
...
@@ -166,7 +166,23 @@
...
@@ -166,7 +166,23 @@
</td>
</td>
<td
style=
"width:120px"
>
<td
style=
"width:120px"
>
<!-- 现金 -->
<!-- 现金 -->
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
:disabled=
"jifenquanxian"
size=
"small"
v-model
.
trim=
"giftForm.cashCost"
placeholder=
"请输入内容"
@
blur=
"limitCash"
/>
</el-popover>
<el-input
<el-input
v-else
size=
"small"
size=
"small"
v-model
.
trim=
"giftForm.cashCost"
v-model
.
trim=
"giftForm.cashCost"
placeholder=
"请输入内容"
placeholder=
"请输入内容"
...
@@ -318,7 +334,23 @@
...
@@ -318,7 +334,23 @@
v-model=
"integral"
v-model=
"integral"
size=
"small"
size=
"small"
/>
/>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
:disabled=
"jifenquanxian"
class=
"w-100"
placeholder=
"请输入金额"
v-model=
"cash"
size=
"small"
/>
</el-popover>
<el-input
<el-input
v-else
class=
"w-100"
class=
"w-100"
placeholder=
"请输入金额"
placeholder=
"请输入金额"
v-model=
"cash"
v-model=
"cash"
...
@@ -342,7 +374,18 @@
...
@@ -342,7 +374,18 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"现金(元)"
>
<el-table-column
label=
"现金(元)"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuCash"
/>
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
size=
"small"
v-model
.
trim=
"row.giftProSkuCash"
:disabled=
"jifenquanxian"
/>
</el-popover>
<el-input
size=
"small"
v-model
.
trim=
"row.giftProSkuCash"
v-else
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -352,7 +395,22 @@
...
@@ -352,7 +395,22 @@
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
/>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuIntegral"
style=
"width:180px"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"现金"
>
<el-form-item
label=
"现金"
>
<el-input
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
元
<el-popover
popper-class=
"noClass"
v-if=
"jifenquanxian == true"
placement=
"bottom"
trigger=
"hover"
content=
"无积分购现金权限"
>
<el-input
slot=
"reference"
size=
"small"
:disabled=
"jifenquanxian"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
</el-popover>
<el-input
v-else
size=
"small"
v-model
.
trim=
"list3[index].skuList[0].giftProSkuCash"
style=
"width:180px"
/>
元
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-tab-pane>
</el-tab-pane>
...
@@ -735,6 +793,7 @@ export default {
...
@@ -735,6 +793,7 @@ export default {
}
}
};
};
return
{
return
{
jifenquanxian
:
''
,
ladder
:
[],
ladder
:
[],
isDifferentialPricing
:
''
,
isDifferentialPricing
:
''
,
ladderPriceList
:
[],
ladderPriceList
:
[],
...
@@ -750,7 +809,7 @@ export default {
...
@@ -750,7 +809,7 @@ export default {
combineList
:
[],
combineList
:
[],
isTable
:
true
,
// 判断有无sku
isTable
:
true
,
// 判断有无sku
integral
:
''
,
integral
:
''
,
cash
:
''
,
cash
:
0.00
,
list2
:
[],
list2
:
[],
ladderMemberGradeChange
:
[],
ladderMemberGradeChange
:
[],
getTime
:
getInputVal
.
getTime
,
getTime
:
getInputVal
.
getTime
,
...
@@ -786,7 +845,7 @@ export default {
...
@@ -786,7 +845,7 @@ export default {
marketPrice
:
''
,
// 市场价
marketPrice
:
''
,
// 市场价
proCode
:
''
,
// 编码
proCode
:
''
,
// 编码
integralCost
:
''
,
// 积分
integralCost
:
''
,
// 积分
cashCost
:
''
,
// 现金
cashCost
:
0.00
,
// 现金
virtualStock
:
''
,
// 库存
virtualStock
:
''
,
// 库存
proCodeQuery
:
''
,
// 条形码
proCodeQuery
:
''
,
// 条形码
ladder
:
[],
ladder
:
[],
...
@@ -916,6 +975,7 @@ export default {
...
@@ -916,6 +975,7 @@ export default {
},
},
},
},
mounted
()
{
mounted
()
{
this
.
jifenquanxian
=
localStorage
.
getItem
(
'limitCodeType'
)
==
'true'
;
this
.
getOpenStatus
();
this
.
getOpenStatus
();
this
.
getUserId
();
this
.
getUserId
();
this
.
getErpGoodsFlag
();
this
.
getErpGoodsFlag
();
...
@@ -1032,7 +1092,7 @@ export default {
...
@@ -1032,7 +1092,7 @@ export default {
submitSkuJsonTwo
.
push
({
submitSkuJsonTwo
.
push
({
giftProSkuId
:
''
,
giftProSkuId
:
''
,
giftProSkuIntegral
:
''
,
// 积分
giftProSkuIntegral
:
''
,
// 积分
giftProSkuCash
:
''
,
// 现金
giftProSkuCash
:
0.00
,
// 现金
stock
:
''
,
// 库存
stock
:
''
,
// 库存
giftProSkuStandCode
:
''
,
// 规格编码
giftProSkuStandCode
:
''
,
// 规格编码
giftProGiftCode
:
''
,
// 条形码
giftProGiftCode
:
''
,
// 条形码
...
@@ -1044,7 +1104,7 @@ export default {
...
@@ -1044,7 +1104,7 @@ export default {
// 目前
// 目前
this
.
ladderSkuList
.
forEach
(
item
=>
{
this
.
ladderSkuList
.
forEach
(
item
=>
{
item
.
giftProSkuIntegral
=
''
;
item
.
giftProSkuIntegral
=
''
;
item
.
giftProSkuCash
=
''
;
item
.
giftProSkuCash
=
0.00
;
});
});
for
(
let
i
=
0
;
i
<
this
.
list2
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
list2
.
length
;
i
++
)
{
this
.
list2
[
i
].
skuList
=
this
.
ladderSkuList
;
this
.
list2
[
i
].
skuList
=
this
.
ladderSkuList
;
...
@@ -1093,12 +1153,16 @@ export default {
...
@@ -1093,12 +1153,16 @@ export default {
const
skuList
=
this
.
list3
[
i
].
skuList
;
const
skuList
=
this
.
list3
[
i
].
skuList
;
if
(
this
.
isCorrect
)
{
if
(
this
.
isCorrect
)
{
for
(
let
j
=
0
;
j
<
skuList
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
skuList
.
length
;
j
++
)
{
if
(
skuList
[
j
].
giftProSkuCash
&&
(
skuList
[
j
].
giftProSkuIntegral
===
''
||
skuList
[
j
].
giftProSkuIntegral
===
null
))
{
if
(
skuList
[
j
].
giftProSkuCash
&&
(
skuList
[
j
].
giftProSkuIntegral
===
0
||
skuList
[
j
].
giftProSkuIntegral
===
null
))
{
this
.
isCorrect
=
false
;
this
.
isCorrect
=
false
;
this
.
$message
.
error
(
'已填入现金,则必填积分'
);
this
.
$message
.
error
(
'已填入现金,则必填积分'
);
break
;
break
;
}
}
if
((
skuList
[
j
].
giftProSkuCash
===
''
||
skuList
[
j
].
giftProSkuCash
===
null
)
&&
skuList
[
j
].
giftProSkuIntegral
)
{
if
((
skuList
[
j
].
giftProSkuCash
===
''
||
skuList
[
j
].
giftProSkuCash
===
null
)
&&
skuList
[
j
].
giftProSkuIntegral
)
{
if
(
this
.
jifenquanxian
)
{
skuList
[
j
].
giftProSkuCash
=
0.00
;
return
;
}
this
.
isCorrect
=
false
;
this
.
isCorrect
=
false
;
this
.
$message
.
error
(
'已填入积分,则必填现金'
);
this
.
$message
.
error
(
'已填入积分,则必填现金'
);
break
;
break
;
...
@@ -1128,7 +1192,7 @@ export default {
...
@@ -1128,7 +1192,7 @@ export default {
item
.
giftProSkuCash
=
this
.
cash
;
item
.
giftProSkuCash
=
this
.
cash
;
});
});
this
.
integral
=
''
;
this
.
integral
=
''
;
this
.
cash
=
''
;
this
.
cash
=
0.00
;
},
},
getOpenStatus
()
{
getOpenStatus
()
{
request
.
post
(
'/api-integral-mall/is-show-self'
).
then
(
res
=>
{
request
.
post
(
'/api-integral-mall/is-show-self'
).
then
(
res
=>
{
...
@@ -1611,18 +1675,19 @@ export default {
...
@@ -1611,18 +1675,19 @@ export default {
}
}
},
},
limitCash
()
{
limitCash
()
{
if
(
this
.
jifenquanxian
)
return
;
// 现金
// 现金
if
(
Number
(
this
.
giftForm
.
cashCost
)
<
0
)
{
if
(
Number
(
this
.
giftForm
.
cashCost
)
<
0
)
{
this
.
$message
.
error
(
'请输入大于等于0的数字'
);
this
.
$message
.
error
(
'请输入大于等于0的数字'
);
this
.
giftForm
.
cashCost
=
''
;
this
.
giftForm
.
cashCost
=
0.00
;
}
else
if
(
Number
(
this
.
giftForm
.
cashCost
)
===
0
)
{
//
} else if (Number(this.giftForm.cashCost) === 0) {
return
false
;
//
return false;
}
else
if
(
!
Number
(
this
.
giftForm
.
cashCost
))
{
}
else
if
(
!
Number
(
this
.
giftForm
.
cashCost
))
{
this
.
$message
.
error
(
'请输入数字类型'
);
this
.
$message
.
error
(
'请输入数字类型'
);
this
.
giftForm
.
cashCost
=
''
;
this
.
giftForm
.
cashCost
=
0.00
;
}
else
if
(
Number
(
this
.
giftForm
.
cashCost
)
>
9999999
)
{
}
else
if
(
Number
(
this
.
giftForm
.
cashCost
)
>
9999999
)
{
this
.
$message
.
error
(
'现金最大9999999'
);
this
.
$message
.
error
(
'现金最大9999999'
);
this
.
giftForm
.
cashCost
=
''
;
this
.
giftForm
.
cashCost
=
0.00
;
}
else
{
}
else
{
this
.
giftForm
.
cashCost
=
Number
(
this
.
giftForm
.
cashCost
).
toFixed
(
2
);
this
.
giftForm
.
cashCost
=
Number
(
this
.
giftForm
.
cashCost
).
toFixed
(
2
);
}
}
...
@@ -1997,7 +2062,7 @@ export default {
...
@@ -1997,7 +2062,7 @@ export default {
},
},
changeMinIntegral
(
val
)
{
changeMinIntegral
(
val
)
{
this
.
giftForm
.
integralCost
=
val
.
integralCost
||
''
;
this
.
giftForm
.
integralCost
=
val
.
integralCost
||
''
;
this
.
giftForm
.
cashCost
=
val
.
cashCost
||
''
;
this
.
giftForm
.
cashCost
=
val
.
cashCost
||
0.00
;
},
},
//处理sku
//处理sku
handleSku
()
{
handleSku
()
{
...
@@ -2035,7 +2100,7 @@ export default {
...
@@ -2035,7 +2100,7 @@ export default {
this
.
submitSkuJson
.
push
({
this
.
submitSkuJson
.
push
({
giftProSkuId
:
skuPrice
[
j
][
5
]
?
skuPrice
[
j
][
5
].
valueName
:
''
,
giftProSkuId
:
skuPrice
[
j
][
5
]
?
skuPrice
[
j
][
5
].
valueName
:
''
,
giftProSkuIntegral
:
skuPrice
[
j
][
0
]
?
skuPrice
[
j
][
0
].
valueName
:
''
,
//积分
giftProSkuIntegral
:
skuPrice
[
j
][
0
]
?
skuPrice
[
j
][
0
].
valueName
:
''
,
//积分
giftProSkuCash
:
skuPrice
[
j
][
1
]
?
skuPrice
[
j
][
1
].
valueName
:
''
,
//现金
giftProSkuCash
:
skuPrice
[
j
][
1
]
?
skuPrice
[
j
][
1
].
valueName
:
0.00
,
//现金
stock
:
this
.
isEdit
?
(
skuPrice
[
j
][
2
]
?
skuPrice
[
j
][
2
].
valueName
-
(
skuPrice
[
j
][
2
].
currentStock
||
0
)
:
''
)
:
skuPrice
[
j
][
2
]
?
skuPrice
[
j
][
2
].
valueName
:
''
,
//库存
stock
:
this
.
isEdit
?
(
skuPrice
[
j
][
2
]
?
skuPrice
[
j
][
2
].
valueName
-
(
skuPrice
[
j
][
2
].
currentStock
||
0
)
:
''
)
:
skuPrice
[
j
][
2
]
?
skuPrice
[
j
][
2
].
valueName
:
''
,
//库存
giftProSkuStandCode
:
skuPrice
[
j
][
3
]
?
skuPrice
[
j
][
3
].
valueName
:
''
,
//规格编码
giftProSkuStandCode
:
skuPrice
[
j
][
3
]
?
skuPrice
[
j
][
3
].
valueName
:
''
,
//规格编码
giftProGiftCode
:
skuPrice
[
j
][
4
]
?
skuPrice
[
j
][
4
].
valueName
:
''
,
//条形码
giftProGiftCode
:
skuPrice
[
j
][
4
]
?
skuPrice
[
j
][
4
].
valueName
:
''
,
//条形码
...
@@ -2167,7 +2232,7 @@ export default {
...
@@ -2167,7 +2232,7 @@ export default {
this
.
$message
.
error
(
'请填写库存'
);
this
.
$message
.
error
(
'请填写库存'
);
return
false
;
return
false
;
}
}
if
(
item
.
giftProSkuCash
===
''
)
{
if
(
(
item
.
giftProSkuCash
==
'0.00'
||
item
.
giftProSkuCash
===
0
)
&&
!
this
.
jifenquanxian
)
{
this
.
$message
.
error
(
'请填写现金'
);
this
.
$message
.
error
(
'请填写现金'
);
return
false
;
return
false
;
}
}
...
@@ -2196,6 +2261,9 @@ export default {
...
@@ -2196,6 +2261,9 @@ export default {
this
.
$message
.
error
(
'请填写礼品积分'
);
this
.
$message
.
error
(
'请填写礼品积分'
);
return
false
;
return
false
;
}
else
if
(
this
.
giftForm
.
cashCost
===
''
)
{
}
else
if
(
this
.
giftForm
.
cashCost
===
''
)
{
if
(
this
.
jifenquanxian
)
{
return
this
.
giftForm
.
cashCost
=
'0.00'
;
}
this
.
$message
.
error
(
'请填写礼品现金'
);
this
.
$message
.
error
(
'请填写礼品现金'
);
return
false
;
return
false
;
}
else
if
(
this
.
giftForm
.
virtualStock
===
''
)
{
}
else
if
(
this
.
giftForm
.
virtualStock
===
''
)
{
...
@@ -2257,6 +2325,23 @@ export default {
...
@@ -2257,6 +2325,23 @@ export default {
if
(
!
data
)
return
false
;
if
(
!
data
)
return
false
;
this
.
$refs
[
form
].
validate
(
valid
=>
{
this
.
$refs
[
form
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
submitLadderList
.
skuList
)
{
this
.
submitLadderList
.
skuList
.
map
(
item
=>
{
item
.
giftProSkuCash
==
0
?
'0.00'
:
item
.
giftProSkuCash
})
}
if
(
this
.
submitSkuJson
)
{
this
.
submitSkuJson
.
map
(
item
=>
{
console
.
log
(
item
.
giftProSkuCash
,
'giftProSkuCash'
);
if
(
item
.
giftProSkuCash
){
console
.
log
(
item
.
giftProSkuCash
,
'iiii'
);
}
else
{
console
.
log
(
item
.
giftProSkuCash
,
'ooo'
);
item
.
giftProSkuCash
=
'0.00'
}
})
}
console
.
log
(
this
.
submitSkuJson
,
'dfsdfd'
);
let
params
=
{
let
params
=
{
integralMallProId
:
this
.
isCopy
?
(
this
.
giftType
==
1
?
''
:
this
.
mallProId
):
this
.
mallProId
===
'-1'
?
''
:
this
.
mallProId
,
//礼品id 复制时 虚拟礼品拿到新id 实物礼品不传id
integralMallProId
:
this
.
isCopy
?
(
this
.
giftType
==
1
?
''
:
this
.
mallProId
):
this
.
mallProId
===
'-1'
?
''
:
this
.
mallProId
,
//礼品id 复制时 虚拟礼品拿到新id 实物礼品不传id
proType
:
this
.
giftForm
.
changeType
===
1
?
2
:
3
,
//发货方式是微信兑换券传2其他传3
proType
:
this
.
giftForm
.
changeType
===
1
?
2
:
3
,
//发货方式是微信兑换券传2其他传3
...
...
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