This commit is contained in:
cun-nan 2024-03-16 15:06:07 +08:00
parent 415b1e7ca2
commit 7ca8ad05c5

View File

@ -181,6 +181,7 @@
:label="dict.name"
:value="dict.id">
</el-option>
<!-- <el-option :value="form.giftId" label="已售罄" v-if="!goodsList.includes(form.giftId)">已售罄</el-option>-->
</el-select>
</el-form-item>
<el-form-item label="商品数量" prop="productCount" v-if="form.type==0">
@ -337,13 +338,14 @@ export default {
},
methods: {
change(e){
console.log(e)
// console.log(e)
this.form.giftId = e
getLJGoods(e).then(res => {
this.form.productCount = res.data.stock
this.stock = res.data.stock
this.$forceUpdate()
console.log(res.data.stock,111,this.form.productCount)
this.form.giftName = res.data.name
this.$forceUpdate()
// console.log(res.data.stock,111,this.form.productCount)
})
},
goodsStock(val){
@ -442,6 +444,11 @@ export default {
this.reset()
exchangeInfo(row.id).then(res => {
this.form = res.data
if (res.data.giftId) {
getLJGoods(res.data.giftId).then(resp => {
this.stock = resp.data.stock
})
}
})
// this.form = row
this.open = true