Commit b03d6c23 by damodmg

修改积分现金

parent cf7d21aa
<!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.f8395052755e865bbf73613a19c5ff33.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.bba3be9ee951e4fa0fe9.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.aa1201acd094f048ce5540976e40e1bb.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.ab43a2c0c6157e709345.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.
......@@ -53,10 +53,10 @@ export default {
url = '/api-integral-mall/update-integral-cost';
} else if (this.editInfoModal.type === '现金费用') {
params.cost = this.editInfoModal.num;
if (Number(this.editInfoModal.num) > Number(this.editInfoModal.costValue)) {
this.$message.error('现金费用不能大于礼品成本');
return false;
}
// if (Number(this.editInfoModal.num) > Number(this.editInfoModal.costValue)) {
// this.$message.error('现金费用不能大于礼品成本');
// return false;
// }
url = '/api-integral-mall/update-cash-cost';
} else if (this.editInfoModal.type === '库存') {
params.stock = this.editInfoModal.num;
......
......@@ -17,7 +17,7 @@
<el-form :model="couponForm" :rules="couponRules" ref="couponForm" label-width="100px" class="demo-ruleForm" label-position="right">
<div class="section-content">
<h3>选择卡券</h3>
<el-form-item label="选择卡券" required v-show="cardList.length === 0">
<el-form-item label="选择卡券" required v-show="mallProId === '-1'">
<el-button plain @click="showCard">添加卡券</el-button>
</el-form-item>
<el-form-item label="选择卡券" required v-show="cardList.length > 0">
......@@ -51,6 +51,9 @@
<el-form-item label="现金费用" prop="cashCost">
<el-input-number class="w-350" :precision="2" :min="0" v-model="couponForm.cashCost"></el-input-number>
</el-form-item>
<el-form-item label="礼品成本" prop="cashCost">
<el-input-number class="w-350" :precision="2" :min="0" v-model="costValue" :disabled="costValueStatus"></el-input-number>
</el-form-item>
<el-form-item label="库存" prop="virtualStock">
<el-input-number class="w-350" :precision="0" :min="0" v-model="couponForm.virtualStock"></el-input-number>
</el-form-item>
......@@ -215,6 +218,7 @@ export default {
mallProId: '',
coupCardId: '', //卡券id
costValue: '', //礼品成本
costValueStatus: true,
couponCardStock: '' //优惠券库存
};
},
......@@ -365,6 +369,7 @@ export default {
this.limitStock = val.couponStock;
this.proReferId = val.coupCardId;
this.couponForm.cardType = val.cardType;
this.costValue = val.costValue;
this.couponCardStock = val.couponStock;
this.couponForm.virtualStock = this.couponCardStock;
this.couponForm.proName = val.cardName;
......@@ -388,10 +393,10 @@ export default {
this.$message.error('请选择卡券');
return false;
}
if (Number(this.couponForm.cashCost) > Number(this.costValue)) {
this.$message.error('现金费用不能大于礼品成本 ');
return false;
}
// if (Number(this.couponForm.cashCost) > Number(this.costValue)) {
// this.$message.error('现金费用不能大于礼品成本 ');
// return false;
// }
if (Number(this.couponForm.virtualStock) > Number(this.couponCardStock)) {
this.$message.error('礼品库存不能大于卡券库存 ');
return false;
......@@ -405,6 +410,7 @@ export default {
proReferId: this.proReferId, //卡券id
cardType: this.couponForm.cardType,
integralCost: this.couponForm.integralCost, //积分费用
costValue: this.costValue, //礼品成本
cashCost: this.couponForm.cashCost, //现金
virtualStock: this.couponForm.virtualStock, //库存
memberGrade: this.couponForm.memberGrade.join(','), //适用会员
......
......@@ -691,7 +691,7 @@ export default {
}
/* 表格 */
.sku-table {
width: 884px;
width: 900px;
font-size: 14px;
color: #606266;
margin-bottom: 12px;
......
......@@ -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" :disabled="refundTypeStatus"></el-input-number>
<el-input-number class="w-350" :precision="2" :min="0" v-model="giftForm.costValue" :disabled="costValueStatus"></el-input-number>
</el-form-item>
</div>
<div class="section-content">
......@@ -184,7 +184,7 @@
</el-form-item>
<div class="section-content1" v-show="giftForm.changeType === 1">
<h3>选择卡券</h3>
<el-form-item label="选择卡券" required v-show="cardList.length === 0">
<el-form-item label="选择卡券" required v-show="mallProId === '-1'">
<el-button plain @click="showCard">添加卡券</el-button>
</el-form-item>
<el-form-item label="选择卡券" required v-show="cardList.length > 0">
......@@ -349,7 +349,8 @@ export default {
editChangeTypeStatus: false,
couponCostValue: 0, //兑换券成本
couponCardStock: 0 //兑换券库存
couponCardStock: 0, //兑换券库存
costValueStatus: false
// proReferId: ''
};
},
......@@ -492,7 +493,7 @@ export default {
} else {
this.giftForm.limitTimesStatus = true;
}
this.giftForm.limitTimes = res.data.result.limitTimes;
// 兑换日期
this.giftForm.exchangeDateType = res.data.result.exchangeDateType;
......@@ -557,7 +558,12 @@ export default {
this.isStdImg = false;
}
}
this.submitSkuJson = res.data.result.skuJsonList;
if (res.data.result.skuJsonList) {
this.submitSkuJson = res.data.result.skuJsonList;
} else {
this.submitSkuJson = [];
}
// 获取头部
this.skuHeaderList = [];
......@@ -946,10 +952,13 @@ export default {
this.cardList = [];
if (val) {
this.cardList.push(val);
this.costValueStatus = true;
// 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
......@@ -957,6 +966,7 @@ export default {
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;
this.giftForm.costValue = res.data.result.costValue;
} else {
this.$message.error(res.data.message);
}
......@@ -1044,12 +1054,12 @@ export default {
}
}
// 成本
if (this.giftForm.changeType === 1) {
if (Number(this.giftForm.costValue) > Number(this.couponCostValue)) {
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 = {
......@@ -1077,7 +1087,8 @@ export default {
cashCost: this.giftForm.cashCost, //现金
proCode: this.giftForm.proCode, //编码
proCodeQuery: this.giftForm.proCodeQuery, //条形码
costValue: this.giftForm.costValue, //礼品成本
costValue: this.giftForm.changeType === 1 ? this.couponCostValue : this.giftForm.costValue, //卡券礼品成本
// cashCost: this.giftForm.costValue, //礼品成本
virtualStock: this.giftForm.virtualStock, //库存
timeZones: '', //部分时段
proShowStatus: this.giftForm.proShowStatus, //显示状态
......
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