Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
welfare
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
达摩4.0重构
welfare
Commits
0b28df2b
Commit
0b28df2b
authored
Mar 02, 2021
by
chenxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 卡券ui
parent
122bcafc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
71 deletions
+122
-71
adjust-stock.vue
src/components/libs/adjust-stock.vue
+47
-49
switch-page.vue
src/components/libs/switch-page.vue
+6
-9
form.vue
src/views/card/card-package/form.vue
+1
-1
list.vue
src/views/card/card-package/list.vue
+59
-5
send-list.vue
src/views/card/card-package/send-list.vue
+1
-1
card-list.vue
src/views/card/gic-card/card-list.vue
+7
-5
import-code.vue
src/views/card/gic-card/module/import-code.vue
+1
-1
No files found.
src/components/libs/adjust-stock.vue
View file @
0b28df2b
<
template
>
<
template
>
<el-dialog
title=
"修改库存"
:visible
.
sync=
"show"
width=
"390px"
:before-close=
"close"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"show"
:width=
"width"
:before-close=
"close"
append-to-body
>
<div
v-loading=
"loading"
class=
"text-center"
>
<el-form
v-loading=
"loading"
ref=
"ruleForm"
:model=
"ruleForm"
:rules=
"rules"
label-width=
"120px"
>
<!--
<span
class=
"mr20"
>
库存数量:
</span><el-radio
v-model=
"calculate"
:label=
"true"
>
增加
</el-radio>
<el-form-item
prop=
"stock"
label=
"可占库存"
>
<el-radio
v-model=
"calculate"
:label=
"false"
>
减少
</el-radio>
-->
<el-select
v-model=
"ruleForm.type"
placeholder=
"请选择"
class=
"prepend-select w100"
>
<div
class=
"pt20"
>
<el-select
v-model=
"calculate"
placeholder=
"请选择"
style=
"width:90px;"
class=
"prepend-select"
>
<el-option
label=
"增加"
:value=
"1"
></el-option>
<el-option
label=
"增加"
:value=
"1"
></el-option>
<el-option
label=
"减少"
:value=
"2"
></el-option>
<el-option
label=
"减少"
:value=
"2"
></el-option>
</el-select>
</el-select>
<el-input-number
placeholder=
"请输入调整库存数"
controls-position=
"right"
:precision=
"0"
:min=
"0"
:max=
"max"
v-model=
"count"
class=
"w200 block-center insert-input"
size=
"small"
@
blur=
"checkCalc
"
></el-input-number>
<el-input-number
v-model=
"ruleForm.stock"
placeholder=
"请输入"
controls-position=
"right"
:precision=
"0"
:min=
"1"
:max=
"max"
class=
"w140 block-center insert-input"
size=
"small
"
></el-input-number>
</
div
>
</
el-form-item
>
<
div
class=
"mt20
"
>
<
el-form-item
prop=
"remark"
label=
"调整备注
"
>
<
span
class=
"mr20"
>
目标库存:
</span
>
<
el-input
type=
"textarea"
v-model=
"ruleForm.remark"
maxlength=
"240"
show-word-limit
class=
"w260"
placeholder=
""
:rows=
"4"
></el-input
>
<el-input-number
:disabled=
"true"
:precision=
"0"
controls-position=
"right"
:min=
"0"
:value=
"stock"
class=
"w200 inline-block"
size=
"small"
/
>
</el-form-item
>
</div
>
</el-form
>
<slot></slot>
<slot></slot>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
@
click=
"close"
>
取消
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"submit"
>
确认
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"submit"
>
确认
</el-button>
...
@@ -34,63 +31,64 @@ export default {
...
@@ -34,63 +31,64 @@ export default {
show
:
{
show
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
title
:
{
type
:
String
,
default
:
'调整库存'
},
width
:
{
type
:
String
,
default
:
'500px'
}
}
},
},
data
()
{
data
()
{
const
validateStock
=
(
rule
,
value
,
callback
)
=>
{
const
{
stock
}
=
this
.
ruleForm
;
if
(
stock
===
''
||
stock
==
undefined
)
{
callback
(
new
Error
(
'请输入库存值'
));
}
else
{
callback
();
}
};
return
{
return
{
ruleForm
:
{
stock
:
0
,
type
:
1
,
// int 1: 增加; 2: 减少
remark
:
''
},
rules
:
{
stock
:
{
required
:
true
,
validator
:
validateStock
,
trigger
:
'change'
},
remark
:
{
required
:
true
,
message
:
'请输入备注'
,
trigger
:
'change'
},
},
loading
:
false
,
loading
:
false
,
count
:
0
,
calculate
:
1
// int 1: 增加; 2: 减少
};
};
},
},
methods
:
{
methods
:
{
checkCalc
()
{
if
(
this
.
calculate
==
2
)
{
if
(
this
.
count
>
this
.
totalCount
)
{
this
.
count
=
this
.
totalCount
;
this
.
$tips
({
type
:
'warning'
,
message
:
'输入数量不能大于总数'
});
}
}
},
close
()
{
close
()
{
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
$emit
(
'update:show'
,
false
);
this
.
$emit
(
'update:show'
,
false
);
this
.
count
=
0
;
this
.
ruleForm
.
type
=
1
;
this
.
calculate
=
1
;
this
.
ruleForm
.
stock
=
0
;
this
.
ruleForm
.
remark
=
''
;
this
.
$refs
.
ruleForm
.
resetFields
();
},
},
submit
()
{
submit
()
{
if
(
this
.
calculate
==
2
)
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
this
.
count
>
this
.
totalCount
)
{
if
(
!
valid
)
{
this
.
count
=
this
.
totalCount
;
this
.
$tips
({
type
:
'warning'
,
message
:
'输入数量不能大于总数'
});
return
;
return
;
}
}
}
if
(
this
.
ruleForm
.
type
==
2
&&
this
.
totalCount
<
this
.
ruleForm
.
stock
)
{
if
(
this
.
count
<=
0
)
{
this
.
$tips
({
message
:
'调整目标值大于当前库存值'
,
type
:
'error'
});
this
.
$tips
({
type
:
'warning'
,
message
:
'调整值不正确'
});
return
;
return
;
}
}
le
t
params
=
{
cons
t
params
=
{
optType
:
this
.
calculate
||
1
,
// 是 int
1: 增加; 2: 减少
optType
:
this
.
ruleForm
.
type
,
//
1: 增加; 2: 减少
count
:
this
.
count
// 是 int
增加或者减少数量
count
:
this
.
ruleForm
.
stock
//
增加或者减少数量
};
};
this
.
$emit
(
'handleSubmit'
,
params
);
this
.
$emit
(
'handleSubmit'
,
params
);
});
}
}
},
},
computed
:
{
max
()
{
return
this
.
calculate
==
1
?
100000
:
this
.
totalCount
;
},
stock
()
{
const
num
=
this
.
calculate
==
1
?
parseInt
(
this
.
totalCount
)
+
parseInt
(
this
.
count
)
:
parseInt
(
this
.
totalCount
)
-
parseInt
(
this
.
count
);
return
num
;
},
},
watch
:
{
calculate
(
val
)
{
this
.
count
=
0
;
}
}
};
};
</
script
>
</
script
>
...
...
src/components/libs/switch-page.vue
View file @
0b28df2b
<
template
>
<
template
>
<el-popover
v-if=
"!(project == '' || project == 'index')"
placement=
"left-end"
width=
"143"
trigger=
"hover"
popper-class=
"sw-page-pop"
>
<el-popover
v-if=
"!(project == '' || project == 'index')"
placement=
"left-end"
width=
"143"
trigger=
"hover"
popper-class=
"sw-page-pop"
>
<div>
<div>
<ul
class=
"toggle"
v-for=
"(item, idx) in wfTypes"
:key=
"idx"
>
<ul
class=
"toggle"
>
<li
v-show=
"('w-' + project) != item.code"
>
<li
v-show=
"!project.includes('gift')"
>
<router-link
:to=
"item.target"
><img
:src=
"require(`@/assets/images/svg/$
{item.code}.svg`)" width="16" />
{{
item
.
title
}}
</router-link>
<router-link
to=
"/gift-manage/real-gift"
><img
:src=
"require(`@/assets/images/svg/w-real-gifts.svg`)"
width=
"16"
/>
礼品
</router-link>
</li>
<li
v-show=
"!project.includes('card')"
>
<router-link
to=
"/gic-card/list"
><img
:src=
"require(`@/assets/images/svg/w-gic-card.svg`)"
width=
"16"
/>
卡券
</router-link>
</li>
</li>
</ul>
</ul>
</div>
</div>
...
@@ -14,14 +17,8 @@
...
@@ -14,14 +17,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
wfTypes
}
from
'@/config/mapping/common'
;
export
default
{
export
default
{
name
:
'SwitchPage'
,
name
:
'SwitchPage'
,
data
()
{
return
{
wfTypes
};
},
computed
:
{
computed
:
{
project
()
{
project
()
{
return
this
.
$store
.
state
.
project
;
return
this
.
$store
.
state
.
project
;
...
...
src/views/card/card-package/form.vue
View file @
0b28df2b
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<div
class=
"imitation-table"
v-if=
"couponList.length"
style=
"width:100%;"
v-loading=
"cardLoading"
>
<div
class=
"imitation-table"
v-if=
"couponList.length"
style=
"width:100%;"
v-loading=
"cardLoading"
>
<el-row
class=
"thead"
>
<el-row
class=
"thead"
>
<el-col
:span=
"5"
>
卡券信息
</el-col>
<el-col
:span=
"5"
>
卡券信息
</el-col>
<el-col
:span=
"5"
>
有效期
</el-col>
<el-col
:span=
"5"
>
使用
有效期
</el-col>
<el-col
:span=
"4"
>
卡券包内剩余库存
</el-col>
<el-col
:span=
"4"
>
卡券包内剩余库存
</el-col>
<el-col
:span=
"4"
>
福利可占库存
</el-col>
<el-col
:span=
"4"
>
福利可占库存
</el-col>
<el-col
:span=
"3"
>
福利状态
</el-col>
<el-col
:span=
"3"
>
福利状态
</el-col>
...
...
src/views/card/card-package/list.vue
View file @
0b28df2b
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<p
:title=
"scope.row.remarkName"
class=
"fz12 gray-lighter ellipsis-100"
style=
"line-height:17px;"
>
<p
:title=
"scope.row.remarkName"
class=
"fz12 gray-lighter ellipsis-100"
style=
"line-height:17px;"
>
<el-popover
placement=
"top-start"
width=
"300"
trigger=
"hover"
open-delay=
"200"
:offset=
"-8"
>
<el-popover
placement=
"top-start"
width=
"300"
trigger=
"hover"
open-delay=
"200"
:offset=
"-8"
>
<div
class=
"gray01 fz14"
>
<div
class=
"gray01 fz14"
>
<p
style=
"margin-bottom:5px;"
>
卡券包
id
:
{{
scope
.
row
.
couponPackageId
}}
</p>
<p
style=
"margin-bottom:5px;"
>
卡券包
ID
:
{{
scope
.
row
.
couponPackageId
}}
</p>
<p>
更新时间:
{{
formatDateTimeByType
(
scope
.
row
.
updateTime
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</p>
<p>
更新时间:
{{
formatDateTimeByType
(
scope
.
row
.
updateTime
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</p>
</div>
</div>
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
></i>
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
></i>
...
@@ -121,17 +121,36 @@
...
@@ -121,17 +121,36 @@
<div
class=
"clearfix"
>
<div
class=
"clearfix"
>
<dm-pagination
class=
"fr mb0"
v-if=
"tableList.length"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<dm-pagination
class=
"fr mb0"
v-if=
"tableList.length"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
</div>
</div>
<adjust-stock
ref=
"adjust"
:show
.
sync=
"adjust.stock"
:total-count=
"adjust.remainedStock"
@
handleSubmit=
"adjustStockBack"
/>
<!-- 调整库存 -->
<adjust-stock
ref=
"adjust"
title=
"调整卡券包库存"
width=
"660px"
:show
.
sync=
"adjust.stock"
:total-count=
"adjust.remainedStock"
@
handleSubmit=
"adjustStockBack"
>
<!-- 调整库存 -->
<p
class=
"mt20 mb15 gray01"
>
卡券明细
</p>
<el-table
v-loading=
"tableCardPackageLoading"
:data=
"tableCardPackage"
style=
"width: 100%"
>
<el-table-column
prop=
"cardName"
label=
"卡券名称"
></el-table-column>
<el-table-column
prop=
"date"
label=
"使用有效期"
>
<
template
slot-scope=
"scope"
>
<span
v-html=
"effectiveDateFormate(scope.row)"
></span>
</
template
>
</el-table-column>
<el-table-column
prop=
"date"
label=
"领取限制"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
getLimit
}}
张/人
</
template
>
</el-table-column>
<el-table-column
prop=
"date"
label=
"卡券类型"
>
<
template
slot-scope=
"scope"
>
{{
cardType
[
scope
.
row
.
cardType
].
label
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"remainedStock"
label=
"当前可占库存"
></el-table-column>
</el-table>
</adjust-stock>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
cardType
}
from
'@/config/mapping/gic-card'
;
import
adjustStock
from
'@/components/libs/adjust-stock'
;
import
adjustStock
from
'@/components/libs/adjust-stock'
;
import
{
page
,
formate
}
from
'@/mixins/table.js'
;
import
{
page
,
formate
}
from
'@/mixins/table.js'
;
import
{
showConfirm
}
from
'@/utils/common'
;
import
{
showConfirm
}
from
'@/utils/common'
;
import
api
from
'@/api/card-package.js'
;
import
api
from
'@/api/card-package.js'
;
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
const
{
pageCouponPackage
,
deletePackage
,
updatePackageStock
}
=
api
;
const
{
pageCouponPackage
,
deletePackage
,
updatePackageStock
,
getPackageDetail
}
=
api
;
export
default
{
export
default
{
name
:
'CardPackageList'
,
name
:
'CardPackageList'
,
components
:
{
components
:
{
...
@@ -165,17 +184,44 @@ export default {
...
@@ -165,17 +184,44 @@ export default {
couponPackageId
:
''
,
couponPackageId
:
''
,
stock
:
false
,
stock
:
false
,
},
},
isOpen
:
false
tableCardPackageLoading
:
false
,
tableCardPackage
:
[],
// 调整卡券包库存展示的slot table list
isOpen
:
false
,
cardType
,
};
};
},
},
created
()
{
created
()
{
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'福利中心'
},
{
breadName
:
'GIC卡券包'
,
breadPath
:
'/card-package/list'
},
{
breadName
:
'卡券包列表'
}
]);
this
.
$emit
(
'updateBread'
,
[
{
breadName
:
'福利中心'
},
{
breadName
:
'GIC卡券包'
},
{
breadName
:
'卡券包列表'
}
]);
},
},
mounted
()
{
mounted
()
{
this
.
getTableList
();
this
.
getTableList
();
},
},
methods
:
{
methods
:
{
formatDateTimeByType
,
formatDateTimeByType
,
effectiveDateFormate
(
item
=
{})
{
const
{
cardEffectiveMode
,
startDate
,
expireDate
,
effectTimeMode
,
expireTimeCount
,
effectTimeCount
}
=
item
;
if
(
cardEffectiveMode
===
0
)
{
return
`<p>
${
formatDateTimeByType
(
startDate
,
'yyyy-MM-dd'
)}
~ </p><p>
${
formatDateTimeByType
(
expireDate
,
'yyyy-MM-dd'
)
}
</p>`
;
}
if
(
cardEffectiveMode
===
1
)
{
// 领取后第{{ info.effectTimeCount }}{{ info.effectTimeMode ? '月' : '天' }} - 第{{ info.expireTimeCount + info.effectTimeCount - 1 }}{{ info.effectTimeMode ? '月' : '天' }}
const
unit
=
effectTimeMode
?
'月'
:
'天'
;
let
pre
=
''
;
switch
(
effectTimeCount
)
{
case
1
:
pre
=
'当'
;
break
;
case
2
:
pre
=
'次'
;
break
;
default
:
pre
=
effectTimeCount
;
break
;
}
return
`<p>领取后
${
pre
}${
unit
}
生效,</p><p>有效天数
${
expireTimeCount
}${
unit
}
</p>`
;
}
return
'--'
;
},
changeSort
()
{
changeSort
()
{
this
.
sortType1
=
this
.
sortType1
===
''
?
'desc'
:
this
.
sortType1
===
'desc'
?
'asc'
:
''
;
this
.
sortType1
=
this
.
sortType1
===
''
?
'desc'
:
this
.
sortType1
===
'desc'
?
'asc'
:
''
;
this
.
listParams
.
sortOrder
=
this
.
sortType1
;
this
.
listParams
.
sortOrder
=
this
.
sortType1
;
...
@@ -233,6 +279,14 @@ export default {
...
@@ -233,6 +279,14 @@ export default {
this
.
adjust
.
stock
=
true
;
this
.
adjust
.
stock
=
true
;
this
.
adjust
.
remainedStock
=
remainedStock
;
this
.
adjust
.
remainedStock
=
remainedStock
;
this
.
adjust
.
couponPackageId
=
couponPackageId
;
this
.
adjust
.
couponPackageId
=
couponPackageId
;
this
.
tableCardPackageLoading
=
true
;
getPackageDetail
({
couponPackageId
:
couponPackageId
}).
then
(
res
=>
{
this
.
tableCardPackage
=
res
.
result
.
couponList
||
[];
console
.
log
(
this
.
tableCardPackage
);
this
.
tableCardPackageLoading
=
false
;
}).
catch
(()
=>
{
this
.
tableCardPackageLoading
=
false
;
});
},
},
// 请求修改库存
// 请求修改库存
adjustStockBack
(
params
)
{
adjustStockBack
(
params
)
{
...
...
src/views/card/card-package/send-list.vue
View file @
0b28df2b
...
@@ -124,7 +124,7 @@ export default {
...
@@ -124,7 +124,7 @@ export default {
},
},
changeTime
(
date
)
{
changeTime
(
date
)
{
if
(
new
Date
(
this
.
dateTime
[
1
]).
getTime
()
-
new
Date
(
this
.
dateTime
[
0
]).
getTime
()
>
7
*
24
*
60
*
60
*
1000
)
{
if
(
new
Date
(
this
.
dateTime
[
1
]).
getTime
()
-
new
Date
(
this
.
dateTime
[
0
]).
getTime
()
>
7
*
24
*
60
*
60
*
1000
)
{
this
.
$tips
({
message
:
'
领取
时间段范围不能超过7天'
,
type
:
'warning'
});
this
.
$tips
({
message
:
'时间段范围不能超过7天'
,
type
:
'warning'
});
this
.
dateTime
=
[
...
this
.
dateTimeCopy
];
this
.
dateTime
=
[
...
this
.
dateTimeCopy
];
return
;
return
;
}
}
...
...
src/views/card/gic-card/card-list.vue
View file @
0b28df2b
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<p
:title=
"scope.row.subTitle"
class=
"fz12 gray-lighter ellipsis-100"
style=
"line-height:17px;"
>
<p
:title=
"scope.row.subTitle"
class=
"fz12 gray-lighter ellipsis-100"
style=
"line-height:17px;"
>
<el-popover
placement=
"top-start"
width=
"300"
trigger=
"hover"
open-delay=
"200"
:offset=
"-8"
>
<el-popover
placement=
"top-start"
width=
"300"
trigger=
"hover"
open-delay=
"200"
:offset=
"-8"
>
<div
class=
"gray01 fz14"
>
<div
class=
"gray01 fz14"
>
<p
style=
"margin-bottom:5px;"
>
福利
id
:
{{
scope
.
row
.
couponId
}}
</p>
<p
style=
"margin-bottom:5px;"
>
福利
ID
:
{{
scope
.
row
.
couponId
}}
</p>
<p>
更新时间:
{{
formatDateTimeByType
(
scope
.
row
.
updateTime
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</p>
<p>
更新时间:
{{
formatDateTimeByType
(
scope
.
row
.
updateTime
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</p>
</div>
</div>
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
></i>
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
></i>
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"领券限制"
min-width=
"120"
>
<el-table-column
label=
"领券限制"
min-width=
"120"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
getLimit
}}
张
/
人
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
getLimit
}}
张
/
人
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"name"
label=
"卡券成本(元)"
min-width=
"130"
>
<el-table-column
prop=
"name"
label=
"卡券成本(元)"
min-width=
"130"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
cardType
==
0
||
scope
.
row
.
cardType
==
2
?
scope
.
row
.
costPrice
:
'--'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
cardType
==
0
||
scope
.
row
.
cardType
==
2
?
scope
.
row
.
costPrice
:
'--'
}}
</
template
>
...
@@ -95,8 +95,10 @@
...
@@ -95,8 +95,10 @@
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
style=
"position:relative;"
></i>
<i
class=
"el-icon-question cursor fz12 gray-lighter"
slot=
"reference"
style=
"position:relative;"
></i>
</el-popover>
</el-popover>
{{
scope
.
row
.
remainedStock
||
0
}}
{{
scope
.
row
.
remainedStock
||
0
}}
<el-button
v-if=
"[11, 12].includes(scope.row._status) && scope.row.customCodeFlag === 0"
@
click=
"preAdjustStock(scope.row)"
class=
"hover-btn"
icon=
"el-icon-edit-outline ml5"
type=
"text"
></el-button>
<!-- && scope.row.customCodeFlag == 0 -->
<el-button
v-if=
"[11, 12].includes(scope.row._status) && scope.row.customCodeFlag == 2"
class=
"hover-btn"
@
click=
"uploadCode(scope.row)"
icon=
"iconfont-market4 icon-shangchuan"
type=
"text"
></el-button>
<el-button
v-if=
"[1, 2].includes(scope.row._status)"
@
click=
"preAdjustStock(scope.row)"
class=
"hover-btn"
icon=
"el-icon-edit-outline ml5"
type=
"text"
></el-button>
<!-- && scope.row.customCodeFlag == 2 -->
<el-button
v-if=
"[1, 2].includes(scope.row._status)"
class=
"hover-btn ml5"
@
click=
"uploadCode(scope.row)"
icon=
"iconfont-market4 icon-shangchuan"
type=
"text"
></el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"卡券状态"
min-width=
"120"
>
<el-table-column
label=
"卡券状态"
min-width=
"120"
>
...
@@ -138,7 +140,7 @@
...
@@ -138,7 +140,7 @@
<div
class=
"clearfix"
>
<div
class=
"clearfix"
>
<dm-pagination
class=
"fr mb0"
v-if=
"tableList.length"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
<dm-pagination
class=
"fr mb0"
v-if=
"tableList.length"
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"listParams.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"listParams.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
</div>
</div>
<adjust-stock
ref=
"adjust"
:show
.
sync=
"adjustStock"
:total-count=
"currentCard.remainedStock"
@
handleSubmit=
"adjustStockBack"
/>
<!-- 调整库存 -->
<adjust-stock
ref=
"adjust"
title=
"调整可占用库存"
:show
.
sync=
"adjustStock"
:total-count=
"currentCard.remainedStock"
@
handleSubmit=
"adjustStockBack"
/>
<!-- 调整库存 -->
<sync-stock
:visible
.
sync=
"syncStock.visible"
:coupon-id=
"syncStock.couponId"
:type=
"1"
@
syncSuccess=
"getTableList"
/>
<!-- 同步库存 -->
<sync-stock
:visible
.
sync=
"syncStock.visible"
:coupon-id=
"syncStock.couponId"
:type=
"1"
@
syncSuccess=
"getTableList"
/>
<!-- 同步库存 -->
<import-code
:coupon-id=
"codeDialog.couponId"
ref=
"importCode"
:visible
.
sync=
"codeDialog.visible"
@
close=
"(len) => { if(len) { getTableList(); } }"
/>
<!-- 导入券码 -->
<import-code
:coupon-id=
"codeDialog.couponId"
ref=
"importCode"
:visible
.
sync=
"codeDialog.visible"
@
close=
"(len) => { if(len) { getTableList(); } }"
/>
<!-- 导入券码 -->
</div>
</div>
...
...
src/views/card/gic-card/module/import-code.vue
View file @
0b28df2b
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<el-button
:disabled=
"loading"
class=
"dashed upload"
icon=
"iconfont-market4 icon-shangchuan mr5"
>
{{
loading
?
'上传中'
:
'点击上传'
}}
</el-button>
<el-button
:disabled=
"loading"
class=
"dashed upload"
icon=
"iconfont-market4 icon-shangchuan mr5"
>
{{
loading
?
'上传中'
:
'点击上传'
}}
</el-button>
</el-upload>
</el-upload>
<el-button
type=
"text"
class=
"ml10"
@
click=
"downloadCouponCSV"
>
点击下载CSV模板
</el-button>
<el-button
type=
"text"
class=
"ml10"
@
click=
"downloadCouponCSV"
>
点击下载CSV模板
</el-button>
<
el-button
type=
"text"
class=
"ml10 hover-btn deep"
@
click=
"viewErrorList"
>
导入失败记录
</el-button
>
<
!--
<el-button
type=
"text"
class=
"ml10 hover-btn deep"
@
click=
"viewErrorList"
>
导入失败记录
</el-button>
--
>
<ul
class=
"file-list"
>
<ul
class=
"file-list"
>
<li
v-for=
"(f, idx) in fileList"
:key=
"idx"
>
<li
v-for=
"(f, idx) in fileList"
:key=
"idx"
>
<i
class=
"el-icon-document gray03 fl"
></i>
<i
class=
"el-icon-document gray03 fl"
></i>
...
...
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