|
@@ -2,7 +2,7 @@
|
|
<div id="makeUpExam">
|
|
<div id="makeUpExam">
|
|
<el-form-item label="关联商品" prop="makeGoodsId">
|
|
<el-form-item label="关联商品" prop="makeGoodsId">
|
|
<div>
|
|
<div>
|
|
- <el-button @click="goToActiveGoods">选择商品</el-button>
|
|
|
|
|
|
+ <el-button @click="goToActiveGoods">选择商品</el-button><el-button type="danger" @click="clearAllGoods" v-if="listData.makeGoodsVoList && listData.makeGoodsVoList.length > 0">全部清空</el-button>
|
|
<ul>
|
|
<ul>
|
|
<li v-for="(item, index) in listData.makeGoodsVoList" :key="index">
|
|
<li v-for="(item, index) in listData.makeGoodsVoList" :key="index">
|
|
<span>{{ item.makeGoodsCode }} - {{ item.makeGoodsName }}</span>
|
|
<span>{{ item.makeGoodsCode }} - {{ item.makeGoodsName }}</span>
|
|
@@ -51,6 +51,9 @@ export default {
|
|
let ary = this.listData.makeGoodsVoList.concat(activeArray)
|
|
let ary = this.listData.makeGoodsVoList.concat(activeArray)
|
|
this.$set(this.listData,'makeGoodsVoList',ary)
|
|
this.$set(this.listData,'makeGoodsVoList',ary)
|
|
},
|
|
},
|
|
|
|
+ clearAllGoods() {
|
|
|
|
+ this.$set(this.listData,'makeGoodsVoList',[])
|
|
|
|
+ },
|
|
clearGoods(index) {
|
|
clearGoods(index) {
|
|
this.listData.makeGoodsVoList.splice(index,1)
|
|
this.listData.makeGoodsVoList.splice(index,1)
|
|
},
|
|
},
|