|
|
@@ -34,6 +34,7 @@
|
|
|
<div class="card-box" @scroll="backScrollEvent">
|
|
|
<div class="create-card-lib" v-for="(cardItem, index) in cardLibItemList" :key="index">
|
|
|
<div :style="(mode === 'choose' && cardItem.isSelected? divLightStyle : {border: '3px solid #fff'})" @click="mode==='choose'? cardItemSelect(cardItem) : (mode==='check'? cardItemCheck(cardItem): '')">
|
|
|
+ <span class="item-num" v-if="cardItem.no && searchForm.seriesId !== null && searchForm.personId != null">{{ cardItem.no }}</span>
|
|
|
<el-row :gutter="12">
|
|
|
<div style="padding: 1px; text-align: center">
|
|
|
<span>{{cardItem.seriesName}}</span>
|
|
|
@@ -110,7 +111,7 @@ export default {
|
|
|
page: {
|
|
|
total: 0, // 总页数
|
|
|
currentPage: 1, // 当前页数
|
|
|
- pageSize: 50 // 每页显示多少条
|
|
|
+ pageSize: 500 // 每页显示多少条
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
@@ -133,7 +134,7 @@ export default {
|
|
|
this.$message.error("必须是大于0")
|
|
|
}
|
|
|
this.cardLibItemList.forEach(item=> item.cardCount = this.batchNum)
|
|
|
- let cardItem = {userPurchaseId: this.dataForm.userPurchaseId, cardCount: this.batchNum}
|
|
|
+ let cardItem = {userPurchaseId: this.dataForm.userPurchaseId, cardCount: this.batchNum, seriesId: this.searchForm.seriesId, personId: this.searchForm.personId}
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl('/card/cardUserPurchaseItem/updateBatch'),
|
|
|
method: 'post',
|
|
|
@@ -172,7 +173,7 @@ export default {
|
|
|
},
|
|
|
getUserPurchaseStat(){
|
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl('/card/cardUserPurchase/stat/' + this.dataForm.userPurchaseId),
|
|
|
+ url: this.$http.adornUrl('/card/cardUserPurchase//stat'),
|
|
|
method: 'get'
|
|
|
}).then(({data}) => {
|
|
|
this.stat = '统计情况:已选' + '团队组合数:' + data.seriesNum + '个, 成员人数:' + data.personNum + '个,图片款数:' + data.cardNum + '款,定制总张数:' + data.cardCount + '张'
|
|
|
@@ -211,6 +212,14 @@ export default {
|
|
|
this.cardLibItemList.push(...data.records)
|
|
|
}else{
|
|
|
this.cardLibItemList = data.records
|
|
|
+ if(this.searchForm.seriesId && this.searchForm.personId){
|
|
|
+ let _this = this
|
|
|
+ this.cardLibItemList = data.records
|
|
|
+ this.cardLibItemList.forEach((item, index) => {
|
|
|
+ item.no = _this.cardLibItemList.length - index
|
|
|
+ _this.$set(_this.cardLibItemList, index, item)
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -246,6 +255,13 @@ export default {
|
|
|
this.$delete(this.cardLibItemList, index);
|
|
|
this.$message.success("删除成功");
|
|
|
this.getUserPurchaseStat()
|
|
|
+ if(this.searchForm.seriesId && this.searchForm.personId){
|
|
|
+ let _this = this
|
|
|
+ this.cardLibItemList.forEach((item, index) => {
|
|
|
+ item.no = _this.cardLibItemList.length - index
|
|
|
+ _this.$set(_this.cardLibItemList, index, item)
|
|
|
+ })
|
|
|
+ }
|
|
|
}else{
|
|
|
this.$message.error("删除失败");
|
|
|
}
|
|
|
@@ -316,7 +332,23 @@ export default {
|
|
|
.create-card-lib {
|
|
|
border: 2px solid pink;
|
|
|
display: inline-block;
|
|
|
- margin-right: 15px
|
|
|
+ margin-right: 15px;
|
|
|
+ .item-num {
|
|
|
+ display: flex;
|
|
|
+ position: relative;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ float: left;
|
|
|
+ left:1px;
|
|
|
+ top:0px;
|
|
|
+ font-size: 16px;
|
|
|
+ text-align: center;
|
|
|
+ color: white;
|
|
|
+ background-color: red;
|
|
|
+ border-radius: 100%;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ }
|
|
|
}
|
|
|
.card-box {
|
|
|
margin-top: 10px;
|