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