Commit b2d636e7 by damodmg

更新

parent e3aed42b
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.bb36cef6632052013f6fa4b929fd726a.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.fffc7f653627283f97cb.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.ec80d6cd8b91ade51bd110cf9f8e1974.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.18.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.02.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.2a66e15144de1c0f565b.js></script><script type=text/javascript src=./static/js/app.9e14d5cb0c2f61ac284d.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -276,7 +276,7 @@ export default {
integralCost: this.giftProSkuIntegral,
cashCost: this.giftProSkuCash,
virtualStock: this.intergralModal.type === 'stock' ? this.virtualStock : '',
skuJson: JSON.stringify(skuJson)
skuJson: skuJson ? JSON.stringify(skuJson) : ''
};
if (this.intergralModal.tableSkuData.length) {
//有规格
......
......@@ -214,7 +214,8 @@ export default {
validateTime,
mallProId: '',
coupCardId: '', //卡券id
costValue: '' //礼品成本
costValue: '', //礼品成本
couponCardStock: '' //优惠券库存
};
},
created() {
......@@ -337,6 +338,9 @@ export default {
if (res.data.errorCode === 0) {
this.cardList.push(res.data.result);
this.limitStock = Number(res.data.result.couponStock);
this.couponCardStock = res.data.result.couponStock;
this.couponForm.virtualStock = this.couponCardStock;
this.couponForm.proName = res.data.result.cardName;
} else {
this.$message.error(res.data.message);
}
......@@ -361,6 +365,9 @@ export default {
this.limitStock = val.couponStock;
this.proReferId = val.coupCardId;
this.couponForm.cardType = val.cardType;
this.couponCardStock = val.couponStock;
this.couponForm.virtualStock = this.couponCardStock;
this.couponForm.proName = val.cardName;
}
},
// 添加兑换时段
......@@ -385,9 +392,14 @@ export default {
this.$message.error('现金费用不能大于礼品成本 ');
return false;
}
if (Number(this.couponForm.virtualStock) > Number(this.couponCardStock)) {
this.$message.error('礼品库存不能大于卡券库存 ');
return false;
}
this.$refs[couponForm].validate(valid => {
if (valid) {
let params = {
proName: this.couponForm.proName,
integralMallProId: this.mallProId === '-1' ? '' : this.mallProId, //礼品id
proType: 1, //优惠券
proReferId: this.proReferId, //卡券id
......
......@@ -165,7 +165,7 @@ export default {
});
// console.log(this.isStdImg);
},
//删除规格
//删除规格
deleteSku(index) {
this.skuJson.splice(index, 1);
this.handleSku();
......@@ -294,37 +294,40 @@ export default {
list.push(item.valueList);
}
}
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
} else {
list = [];
}
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
list.push([
{
valueName: '',
valueId: ''
}
]);
this.skuList = copy(this.combine(copy(list)));
},
// 表格里面的图片上传成功
......
......@@ -93,7 +93,7 @@
</table>
</el-form-item>
<el-form-item label="礼品成本" prop="costValue">
<el-input-number class="w-350" :precision="2" :min="0" v-model="giftForm.costValue"></el-input-number>
<el-input-number class="w-350" :precision="2" :min="0" v-model="giftForm.costValue" :disabled="refundTypeStatus"></el-input-number>
</el-form-item>
</div>
<div class="section-content">
......@@ -346,7 +346,10 @@ export default {
disabledList: [],
selectedData: {},
cardList: [],
editChangeTypeStatus: false
editChangeTypeStatus: false,
couponCostValue: 0, //兑换券成本
couponCardStock: 0 //兑换券库存
// proReferId: ''
};
},
......@@ -382,6 +385,18 @@ export default {
request.post('/api-integral-mall/get-card', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.cardList.push(res.data.result);
this.couponCardStock = res.data.result.couponStock; //兑换券库存
let params = {
couponCardId: res.data.result.coupCardId,
proType: 1
};
request.post('/api-integral-mall/get-integral-mall-CashCost', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.couponCostValue = res.data.result.costValue;
} else {
this.$message.error(res.data.message);
}
});
// this.limitStock = Number(res.data.result.couponStock);
} else {
this.$message.error(res.data.message);
......@@ -544,7 +559,7 @@ export default {
this.isStdImg = false;
}
}
this.submitSkuJson = res.data.result.skuJson;
this.submitSkuJson = res.data.result.skuJsonList;
// 获取头部
this.skuHeaderList = [];
......@@ -848,23 +863,25 @@ export default {
// 获取规格列表
getStandradList(val) {
this.giftProStandardJson = val;
for (let i in this.giftProStandardJson) {
if (Number(i) === 0) {
this.giftProStandardJson[i].standardimg = this.IsAgreeUploadStatus ? 2 : 1;
} else {
this.giftProStandardJson[i].standardimg = 1;
if (this.giftProStandardJson.length) {
for (let i in this.giftProStandardJson) {
if (Number(i) === 0) {
this.giftProStandardJson[i].standardimg = this.IsAgreeUploadStatus ? 2 : 1;
} else {
this.giftProStandardJson[i].standardimg = 1;
}
}
this.skuHeaderList = [];
for (let item of this.giftProStandardJson) {
this.skuHeaderList.push({
propName: item.standardName,
propId: item.standardId
});
}
if (this.giftProStandardJson.length <= 0) {
this.stockDisabled = false;
this.giftForm.virtualStock = 0;
}
}
this.skuHeaderList = [];
for (let item of this.giftProStandardJson) {
this.skuHeaderList.push({
propName: item.standardName,
propId: item.standardId
});
}
if (this.giftProStandardJson.length <= 0) {
this.stockDisabled = false;
this.giftForm.virtualStock = 0;
}
},
getSkuList(val) {
......@@ -893,28 +910,32 @@ export default {
let outArr1;
let skuPrice = [];
let skuSta = [];
for (let i in skuArr) {
//先获取sku价格条码这些
outArr = copy(skuArr[i]); //得到固定的数据
outArr1 = outArr.splice(outArr.length - 5, 5);
for (let k in outArr) {
outArr[k].proName = this.skuHeaderList[k].propName;
outArr[k].proId = this.skuHeaderList[k].propId;
if (skuArr[0].length) {
for (let i in skuArr) {
//先获取sku价格条码这些
outArr = copy(skuArr[i]); //得到固定的数据
outArr1 = outArr.splice(outArr.length - 5, 5);
for (let k in outArr) {
outArr[k].proName = this.skuHeaderList[k].propName;
outArr[k].proId = this.skuHeaderList[k].propId;
}
skuSta.push(outArr);
skuPrice.push(outArr1);
}
skuSta.push(outArr);
skuPrice.push(outArr1);
}
this.submitSkuJson = [];
for (let j in skuArr) {
//数据的个数
this.submitSkuJson.push({
giftProSkuIntegral: skuPrice[j][0].valueName, //积分
giftProSkuCash: skuPrice[j][1].valueName, //现金
stock: skuPrice[j][2].valueName, //库存
giftProSkuStandCode: skuPrice[j][3].valueName, //规格编码
giftProGiftCode: skuPrice[j][4].valueName, //条形码
mallPropValues: skuSta[j]
});
if (skuArr[0].length) {
for (let j in skuArr) {
//数据的个数
this.submitSkuJson.push({
giftProSkuIntegral: skuPrice[j][0].valueName, //积分
giftProSkuCash: skuPrice[j][1].valueName, //现金
stock: skuPrice[j][2].valueName, //库存
giftProSkuStandCode: skuPrice[j][3].valueName, //规格编码
giftProGiftCode: skuPrice[j][4].valueName, //条形码
mallPropValues: skuSta[j]
});
}
}
},
// 显示卡券弹窗
......@@ -930,6 +951,18 @@ export default {
// this.limitStock = val.couponStock;
this.giftForm.proReferId = val.coupCardId;
this.giftForm.cardType = val.cardType;
this.couponCardStock = val.couponStock; //兑换券库存
let params = {
couponCardId: val.coupCardId,
proType: 1
};
request.post('/api-integral-mall/get-integral-mall-CashCost', qs.stringify(params)).then(res => {
if (res.data.errorCode === 0) {
this.couponCostValue = res.data.result.costValue;
} else {
this.$message.error(res.data.message);
}
});
}
},
// 保存
......@@ -947,10 +980,10 @@ export default {
}
//校验规格明细
if (this.submitSkuJson) {
if (this.submitSkuJson.length) {
for (let item of this.submitSkuJson) {
if (!item.stock) {
this.$message.error('请填写库存');
this.$message.error('请填写库存2');
return false;
}
if (!item.giftProSkuCash) {
......@@ -984,7 +1017,7 @@ export default {
this.$message.error('请填写礼品现金');
return false;
} else if (this.giftForm.virtualStock === '') {
this.$message.error('请填写礼品库存');
this.$message.error('请填写礼品库存1');
return false;
}
if (Number(this.giftForm.virtualStock) === 0) {
......@@ -997,7 +1030,20 @@ export default {
return false;
}
}
//库存不能大于兑换券库存
if (this.giftForm.changeType === 1) {
if (Number(this.giftForm.virtualStock) > Number(this.couponCardStock)) {
this.$message.error('礼品库存不能大于兑换券的库存');
return false;
}
}
// 成本
if (this.giftForm.changeType === 1) {
if (Number(this.giftForm.costValue) > Number(this.couponCostValue)) {
this.$message.error('礼品成本不能大于兑换券的成本');
return false;
}
}
this.$refs[form].validate(valid => {
if (valid) {
let params = {
......@@ -1035,7 +1081,7 @@ export default {
// proReferId: this.giftForm.changeType === 1 ? this.proReferId : '', //微信兑换券
refundType: this.giftForm.refundType, //售后
giftProStandardJson: this.giftProStandardJson ? JSON.stringify(this.giftProStandardJson) : '', //规格列表
skuJson: this.submitSkuJson ? JSON.stringify(this.submitSkuJson) : '' //sku数据
skuJson: this.submitSkuJson.length ? JSON.stringify(this.submitSkuJson) : '' //sku数据
};
// 门店分类
if (this.sendChildData.storeType === 1) {
......
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