Commit 958ad0ea by 黑潮

update: 库存修改

parent 4ba45bb8
......@@ -15762,7 +15762,7 @@
color: #606266;
display: inline-block;
font-size: inherit;
height: 32px !important;
height: 32px;
line-height: 32px;
outline: none;
padding: 0 15px;
......@@ -58,7 +58,7 @@ export default {
// }
url = '/api-integral-mall/update-cash-cost';
} else if (this.editInfoModal.type === '库存') {
params.stock = this.editInfoModal.num;
params.stock = this.editInfoModal.num - this.editInfoModal.currentNum;
url = '/api-integral-mall/update-stock';
}
......
......@@ -215,7 +215,7 @@ export default {
if (this.intergralModal.type === 'cash') {
arrCash.push(this.intergralModal.tableSkuData[j][i].valueName);
} else if (this.intergralModal.type === 'stock') {
stock.push(this.intergralModal.tableSkuData[j][i].valueName);
stock.push(this.intergralModal.tableSkuData[j][i].valueName - this.intergralModal.tableSkuData[j][i].currentStock);
}
}
if (Number(i) === index1) {
......
......@@ -636,6 +636,7 @@ export default {
this.editInfoModal.costValue = item.costValue;
} else if (type === 3) {
this.editInfoModal.num = item.virtualStock;
this.editInfoModal.currentNum = item.virtualStock;
this.editInfoModal.type = '库存';
}
......
......@@ -706,6 +706,7 @@ export default {
this.couponForm.cashCost = res.data.result.cashCost;
//库存
this.couponForm.virtualStock = res.data.result.virtualStock;
this.currentStock = res.data.result.virtualStock;
this.couponForm.detailDescription = res.data.result.detailDescription; //图文详情
// if (res.data.result.searchParams) {
// this.searchParams = res.data.result.searchParams; //会员筛选
......@@ -1215,7 +1216,7 @@ export default {
integralCost: this.couponForm.integralCost, //积分费用
costValue: this.costValue, //礼品成本
cashCost: this.couponForm.cashCost, //现金
virtualStock: this.couponForm.virtualStock, //库存
virtualStock: this.couponForm.virtualStock - this.currentStock, //库存
gradeType: this.couponForm.gradeType,
memberGrade: this.couponForm.memberGrade.join(','), //适用会员
showStore: this.sendChildData.storeType, // 显示门店 0所有 1部分分类 2部分门店
......
......@@ -737,7 +737,8 @@ export default {
});
} else if (type === 'stock') {
tem.push({
valueName: list[i].stock //库存
valueName: list[i].stock, //库存
currentStock: list[i].stock
});
}
......
......@@ -89,7 +89,7 @@
<el-input size="small" v-model.trim="giftForm.cashCost" placeholder="请输入内容" @blur="limitCash"></el-input>
</td>
<td style="width:120px">
<el-input size="small" v-model.trim="giftForm.virtualStock" placeholder="请输入内容" :disabled="!giftType && stockDisabled" @blur="limitStock"></el-input>
<el-input size="small" v-model.trim="giftForm.virtualStock" placeholder="请输入内容" :disabled="!giftType || stockDisabled" @blur="limitStock"></el-input>
</td>
<td style="width:120px">
<el-input size="small" v-model.trim="giftForm.proCodeQuery" placeholder="请输入内容" @input="limintProCodeQuery" @blur="limitproCodeQueryType"></el-input>
......@@ -536,7 +536,7 @@ export default {
},
// sendChildData: {}, // 向子元素传递的对象
openFlag: false,
stockDisabled: true, //spu库存是否可输入
stockDisabled: false, //spu库存是否可输入
refash: false,
giftProStandardJson: [], //规格列表
isStdImg: false, //图片上传的状态
......@@ -1263,7 +1263,8 @@ export default {
valueName: res.data.result.skuJsonList[i].giftProSkuCash //现金
});
tem.push({
valueName: res.data.result.skuJsonList[i].stock //库存
valueName: res.data.result.skuJsonList[i].stock, //库存
currentStock: res.data.result.skuJsonList[i].stock
});
tem.push({
valueName: res.data.result.skuJsonList[i].giftProSkuStandCode //规格编码
......@@ -1752,7 +1753,7 @@ export default {
}
}
},
getSkuList(val) {
async getSkuList(val) {
console.log(val);
if (val.length === 1 && val[0].length === 0) {
this.submitSkuJson = [];
......@@ -1767,6 +1768,7 @@ export default {
this.setLadder();
}
this.submitLadderList = copy(this.list3);
await this.$nextTick();
if (this.giftProStandardJson.length > 0) {
if (this.skuList.length > 0) {
//spu库存是否可输入
......@@ -1820,7 +1822,7 @@ export default {
giftProSkuId: skuPrice[j][5] ? skuPrice[j][5].valueName : '',
giftProSkuIntegral: skuPrice[j][0] ? skuPrice[j][0].valueName : '', //积分
giftProSkuCash: skuPrice[j][1] ? skuPrice[j][1].valueName : '', //现金
stock: skuPrice[j][2] ? skuPrice[j][2].valueName : '', //库存
stock: skuPrice[j][2] ? skuPrice[j][2].valueName - skuPrice[j][2].currentStock : '', //库存
giftProSkuStandCode: skuPrice[j][3] ? skuPrice[j][3].valueName : '', //规格编码
giftProGiftCode: skuPrice[j][4] ? skuPrice[j][4].valueName : '', //条形码
giftPropValues: skuSta[j]
......
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