Commit 8d94f76a by 李伟康

修复BUG

1 parent 0b159100
......@@ -604,13 +604,13 @@ export default {
},
showConfig (row, index, type = 0) {
row.oilList ||= []
row.couponList ||= []
this.configParams = {
show: true,
row,
type,
index
index,
oilList: JSON.parse(JSON.stringify(row.oilList || [])),
couponList: JSON.parse(JSON.stringify(row.couponList || [])),
}
},
setRowTotal (row, index) {
......
......@@ -35,7 +35,7 @@
<el-input-number
size="small"
:min="1"
:max="10"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'oilCouponId')"
......@@ -112,8 +112,10 @@ export default {
this.$apis.points.getOilCouponList(params).then(res => {
this.loading = false
res.list.map(e => {
let maxStock = e.stock - e.usedStock
e.amount = 1
e.oilCouponId = e.id
e.maxStock = maxStock > 10 ? 10 : maxStock
})
// 重置分页组件
this.serviceList = res.list
......
......@@ -4,7 +4,6 @@
class="points-panel"
bigTitle="选择"
okText="提交"
:before-close="handleGiftClose"
@onCancel="handleGiftClose"
@onOk="handleConfirm"
:visible.sync="configParams.show"
......@@ -19,13 +18,13 @@
v-show="currentComponent == 'gas'"
ref="gasRef"
:merchantId="merchantId"
:selectedGasList="configParams.row.oilList || []"
:selectedGasList="configParams.oilList"
/>
<service
v-show="currentComponent == 'service'"
ref="serviceRef"
:merchantId="merchantId"
:selectedServiceList="configParams.row.couponList || []"
:selectedServiceList="configParams.couponList"
/>
</div>
</template>
......
......@@ -74,7 +74,7 @@
<el-input-number
size="small"
:min="1"
:max="10"
:max="scope.scope.maxStock"
:step="1"
v-model="scope.scope.amount"
@change="changeAmount(...arguments,scope.scope,'couponId')"
......@@ -185,8 +185,10 @@ export default {
this.$apis.points.getghDirectionalGiftListApi(params).then(res => {
this.loading = false
res.list.map(e => {
let maxStock = e.residueAmount
e.amount = 1
e.couponId = e.id
e.maxStock = maxStock > 10 ? 10 : maxStock
})
// 重置分页组件
this.serviceList = res.list
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!