|
@@ -61,15 +61,16 @@
|
|
|
<div class="text2" v-if="item.number">编号:{{ item.number }}</div>
|
|
<div class="text2" v-if="item.number">编号:{{ item.number }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div @click.stop="" v-if="item.collections">
|
|
|
|
|
|
|
+ <div class="num-right" @click.stop="" v-if="item.collections">
|
|
|
<van-stepper
|
|
<van-stepper
|
|
|
v-model="item.num"
|
|
v-model="item.num"
|
|
|
:name="item.id"
|
|
:name="item.id"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
- :max="getMax(item.collections.length)"
|
|
|
|
|
|
|
+ :max="item.collections.length"
|
|
|
@change="changeStepper"
|
|
@change="changeStepper"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <div class="num-text">共{{ item.collections.length }}个</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -158,6 +159,20 @@ export default {
|
|
|
console.log(_map);
|
|
console.log(_map);
|
|
|
|
|
|
|
|
return [..._map.values()];
|
|
return [..._map.values()];
|
|
|
|
|
+ },
|
|
|
|
|
+ numList() {
|
|
|
|
|
+ let chooseIds = [...this.chooseIds];
|
|
|
|
|
+ let collections = [...this.collections];
|
|
|
|
|
+ let nums = [];
|
|
|
|
|
+ chooseIds.forEach(item => {
|
|
|
|
|
+ let info = collections.find(coll => {
|
|
|
|
|
+ return coll.id === item;
|
|
|
|
|
+ });
|
|
|
|
|
+ if (info) {
|
|
|
|
|
+ nums.push(`${info.id}_${info.num || 1}`);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return nums;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -197,7 +212,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
let chooseIds = [...this.chooseIds];
|
|
let chooseIds = [...this.chooseIds];
|
|
|
let choose = chooseIds.filter(item => {
|
|
let choose = chooseIds.filter(item => {
|
|
|
- return _collections.includes(item);
|
|
|
|
|
|
|
+ return collections.includes(item);
|
|
|
});
|
|
});
|
|
|
let index = chooseIds.indexOf(detail.name);
|
|
let index = chooseIds.indexOf(detail.name);
|
|
|
if (value > choose.length && this.chooseIds.length === this.needChoose && this.needChoose !== 0) {
|
|
if (value > choose.length && this.chooseIds.length === this.needChoose && this.needChoose !== 0) {
|
|
@@ -296,7 +311,8 @@ export default {
|
|
|
path: '/activitySubmit',
|
|
path: '/activitySubmit',
|
|
|
query: {
|
|
query: {
|
|
|
assets: this.chooseIds.join(','),
|
|
assets: this.chooseIds.join(','),
|
|
|
- activityId: this.activityId
|
|
|
|
|
|
|
+ activityId: this.activityId,
|
|
|
|
|
+ numList: this.numList.join(',')
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -427,4 +443,13 @@ export default {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
padding: 10px;
|
|
padding: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
+.num-right {
|
|
|
|
|
+ .flex-col();
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .num-text {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+ color: @text3;
|
|
|
|
|
+ margin-top: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|