You need to sign in or sign up before continuing.
Commit 31111210 by 萱草

update: 更新库存

parent d94ee870
......@@ -16,7 +16,7 @@
<span>库存</span>
<el-popover placement="top" trigger="click">
<div>
<el-select v-model="stockType" style="width:100px">
<el-select v-model="banthStockType" style="width:100px">
<el-option label="增加" :value="0"></el-option>
<el-option label="减少" :value="1"></el-option>
</el-select>
......@@ -32,11 +32,11 @@
</el-popover>
</template>
<template slot-scope="scope">
<el-select v-model="stockType" style="width:100px">
<el-select v-model="skuSellObj[scope.row.mapId].stockType" style="width:100px">
<el-option label="增加" :value="0"></el-option>
<el-option label="减少" :value="1"></el-option>
</el-select>
<dm-input-number v-model="stock" width="140" style="margin-left:-2px;" controls-position="right" @blur="changeSingleStock(skuSellObj[scope.row.mapId].giftSkuId, stock, stockType)" precision="2" :min="0" :max="999999.99"></dm-input-number>
<dm-input-number v-model="skuSellObj[scope.row.mapId].stageStock" width="140" style="margin-left:-2px;" controls-position="right" @blur="changeSingleStock(skuSellObj[scope.row.mapId].giftSkuId, skuSellObj[scope.row.mapId].stageStock, skuSellObj[scope.row.mapId].stockType)" precision="2" :min="0" :max="999999.99"></dm-input-number>
</template>
</el-table-column>
</el-table>
......@@ -90,6 +90,7 @@ export default {
// costChangeObj: [], // 用于存放批量修改后的数据
banthStock: '',
stockType: 0,
banthStockType: 0,
updateList: [],
textarea: '',
giftId: '',
......@@ -258,6 +259,8 @@ export default {
remainedStock: Object.keys(skuSellObjCopy).length > 0 ? skuSellObjCopy[item.mapId].remainedStock : '',
stockStatus: true,
giftSkuCostPriceStatus: true,
stockType: 0,
stageStock: ''
};
this.stockObj[item.mapId] = Object.keys(skuSellObjCopy).length > 0 ? skuSellObjCopy[item.mapId].stock : '';
} else {
......@@ -270,6 +273,8 @@ export default {
giftSkuCostPriceStatus: true,
giftSkuId: '',
remainedStock: '',
stockType: 0,
stageStock: ''
};
}
}
......@@ -313,7 +318,8 @@ export default {
this.stock = this.banthStock;
for(let item in this.skuSellObj){
this.skuSellObj[item].stock = this.banthStock;
this.updateList.push({ giftSkuId: this.skuSellObj[item].giftSkuId, stock: this.skuSellObj[item].stock, stockType: this.stockType });
this.skuSellObj[item].stockType = this.banthStockType;
this.updateList.push({ giftSkuId: this.skuSellObj[item].giftSkuId, stock: this.skuSellObj[item].stock, stockType: this.banthStockType });
}
console.log(this.updateList);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment