提交 eb30f55e authored 作者: huaxinzhu's avatar huaxinzhu

2.5bug修复

上级 e6d53d8b
...@@ -17,6 +17,7 @@ const user = { ...@@ -17,6 +17,7 @@ const user = {
// 2-审核中; // 2-审核中;
// 3-审核拒绝; // 3-审核拒绝;
applyState: -1, applyState: -1,
cateFee: 0,
}, },
mutations: { mutations: {
...@@ -43,6 +44,9 @@ const user = { ...@@ -43,6 +44,9 @@ const user = {
}, },
SET_APPLYSTATE: (state, applyState) => { SET_APPLYSTATE: (state, applyState) => {
state.applyState = applyState state.applyState = applyState
},
SET_CATEFEE: (state, cateFee) => {
state.cateFee = cateFee
} }
}, },
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</span> </span>
</div> </div>
<div style="width:380px;line-height: 24px;padding-top: 6px;"> <div style="width:380px;line-height: 24px;padding-top: 6px;">
<span class="tips-text">图片大小在2MB以内,支持png,jpg格式,最多可上传2</span></br> <span class="tips-text">图片大小在2MB以内,支持png,jpg格式,最多可上传1</span></br>
<span class="tips-text">请确保营业执照在有效期内</span> <span class="tips-text">请确保营业执照在有效期内</span>
</div> </div>
</div> </div>
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
idcard_number: [ idcard_number: [
{required: true, message: '法人证件号不能为空', trigger: 'blur'}, {required: true, message: '法人证件号不能为空', trigger: 'blur'},
{required: true, message: '法人证件号码格式有误', validator: checkIdCard,trigger: 'blur' } {required: true, message: '法人证件号码格式有误', validator: checkIdCard,trigger: 'blur' }
], ],
idcard_front: [{required: true, message: '请上传法人证件电子版图片',validator: idCardValidator}], idcard_front: [{required: true, message: '请上传法人证件电子版图片',validator: idCardValidator}],
license_expires_time: [{ validator:licenseTimeValidator,required: true,trigger: 'change' }], license_expires_time: [{ validator:licenseTimeValidator,required: true,trigger: 'change' }],
idcard_expires_time: [{ validator:idCardTimeValidator,required: true,trigger: 'change' }] idcard_expires_time: [{ validator:idCardTimeValidator,required: true,trigger: 'change' }]
......
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
deliver_area: '', // 发货地 deliver_area: '', // 发货地
unit: '', // 单位 unit: '', // 单位
goods_brand: '', // 品牌 goods_brand: '', // 品牌
brand_id: 0, // 品牌id brand_id: '', // 品牌id
web_url: '', // 外部链接 web_url: '', // 外部链接
out_goods_id: '', // 商品编码 out_goods_id: '', // 商品编码
imgs: [] // 商品图片 imgs: [] // 商品图片
...@@ -436,6 +436,8 @@ ...@@ -436,6 +436,8 @@
getByCategoryData(data).then(res=> { getByCategoryData(data).then(res=> {
if ( res.code == 1 ) { if ( res.code == 1 ) {
this.cateFee = res.data.service_fee_ratio this.cateFee = res.data.service_fee_ratio
this.$store.commit('SET_CATEFEE',this.cateFee);
console.log(444,this.cateFee);
} }
}); });
}, },
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
> >
<el-table-column align="center" prop="js_price" label="协议价"> <el-table-column align="center" prop="js_price" label="协议价">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input size="mini" style="width:90%" v-model="scope.row.js_price" placeholder="请输入协议价" @input="settleSLPrice(scope.row,scope.$index)"></el-input> <el-input size="mini" style="width:90%" v-model="scope.row.js_price" placeholder="请输入协议价" ></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="sl_price" label="结算价"> <el-table-column align="center" prop="sl_price" label="结算价">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span>--> <!-- <span class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span>-->
<span>{{ settleSLPriceFormatter(scope.row.sl_price) }}</span> <span>{{ settleSLPriceFormatter(scope.row.js_price) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="price" label="指导价"> <el-table-column align="center" prop="price" label="指导价">
...@@ -207,7 +207,7 @@ export default { ...@@ -207,7 +207,7 @@ export default {
], ],
singleSpecImgList: [], singleSpecImgList: [],
isViewPriceExp: false, isViewPriceExp: false,
fuck: '9' cateFee: 1,
} // return end } // return end
}, },
watch:{ watch:{
...@@ -218,9 +218,7 @@ export default { ...@@ -218,9 +218,7 @@ export default {
}, },
}, },
created() { created() {
// console.log("服务费率:"); this.cateFee = this.$store.state.user.cateFee;
this.fuck = 8;
}, },
mounted() { mounted() {
if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) { if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) {
...@@ -393,15 +391,30 @@ export default { ...@@ -393,15 +391,30 @@ export default {
/** 结算价格计算 */ /** 结算价格计算 */
settleSLPriceFormatter(jsPriceVal) { settleSLPriceFormatter(jsPriceVal) {
// debugger // debugger
let fuck = this.fuck; let slPriceNum = ""
let jsPriceNum = ''; if (jsPriceVal == 0) {
jsPriceNum = jsPriceVal * 10 + fuck jsPriceVal = 0
}
if (jsPriceVal == "") {
jsPriceVal = ''
}
if (jsPriceVal > 0 && this.cateFee > 0) {
// slPriceNum = (jsPriceVal * 10000 - this.cateFee)/10000
slPriceNum = (10000 - this.cateFee) * jsPriceVal /10000
}
return jsPriceNum return slPriceNum
}, },
settleSLPrice(row,index) { settleSLPrice(row,index) {
row.sl_price = row.js_price + 7 // debugger
this.$set(this.singleSpecTable,index,row) // let slPriceNum = '';
// if (row.js_price > 0) {
// row.sl_price = 0;
// row.sl_price = (10000 - this.cateFee) * row.js_price /10000
// this.$set(this.singleSpecTable,index,row)
// }
// row.sl_price = (row.js_price * 1000 - this.cateFee)/1000
//
} }
} // methods end } // methods end
......
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
// goods_brand // goods_brand
if (Array.isArray(brandOptions) && brandOptions.length > 0) { if (Array.isArray(brandOptions) && brandOptions.length > 0) {
for(let bi = 0; bi < brandOptions.length; bi++) { for(let bi = 0; bi < brandOptions.length; bi++) {
if( Number(spxxData.goods_id) === Number(brandOptions[bi].id) ) { if( Number(spxxData.brand_id) === Number(brandOptions[bi].id) ) {
spxxData.goods_brand = brandOptions[bi].brand_cn; spxxData.goods_brand = brandOptions[bi].brand_cn;
break; break;
} }
......
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
</el-card> </el-card>
<!-- 新增/修改/详情 --> <!-- 新增/修改/详情 -->
<el-dialog :title="brandTitle" :visible.sync="isOpen" width="70%" class="brandInf-add" center <el-dialog :title="brandTitle" :visible.sync="isOpen" width="70%" class="brandInf-add" center
:destroy-on-close="true" :close-on-click-modal="false" :before-close="handleCancel"> :close-on-click-modal="false" :before-close="handleCancel">
<el-form v-if="isOpen" :model="brandForm" :rules="brandRules" ref="brandForm" label-width="140px"> <el-form :model="brandForm" :rules="brandRules" ref="brandForm" label-width="140px">
<el-row v-if="indexBrandId != 0 && brandForm.status != 3"> <el-row v-if="indexBrandId != 0 && brandForm.status != 3">
<p class="brand-status-con"> <p class="brand-status-con">
<span v-if="brandForm.status == 1" class="color-spe-success"><i class="el-icon-success"></i></span> <span v-if="brandForm.status == 1" class="color-spe-success"><i class="el-icon-success"></i></span>
...@@ -552,8 +552,6 @@ ...@@ -552,8 +552,6 @@
getDetails(data).then(res => { getDetails(data).then(res => {
if(res.code == 1) { if(res.code == 1) {
this.isOpen = true; this.isOpen = true;
this.reset('brandForm')
this.brandTitle = '品牌信息详情'; this.brandTitle = '品牌信息详情';
this.brandForm = res.data; this.brandForm = res.data;
// 品牌审核状态 // 品牌审核状态
...@@ -647,7 +645,6 @@ ...@@ -647,7 +645,6 @@
}, },
/** 取消、关闭 新增,编辑 */ /** 取消、关闭 新增,编辑 */
handleCancel() { handleCancel() {
this.reset('brandForm')
this.isOpen = false; this.isOpen = false;
}, },
/** 提交審核 */ /** 提交審核 */
...@@ -729,20 +726,17 @@ ...@@ -729,20 +726,17 @@
addBrandData(brandsData).then(res => { addBrandData(brandsData).then(res => {
if(res.code == 1) { if(res.code == 1) {
this.$message({ message: '新增成功', type: 'success'}); this.$message({ message: '提交成功', type: 'success'});
this.getList(); this.getList();
this.isOpen = false; this.isOpen = false;
}else { }else {
this.$message({ type: 'error', message: res.message ? res.message : "新增失败"}); this.$message({ type: 'error', message: res.message ? res.message : "提交失败"});
} }
}); });
} }
// 修改 品牌 // 修改 品牌
if (this.indexBrandId != 0) { if (this.indexBrandId != 0) {
// 入参 格式处理
// brandsData.brands.push(data);
this.$confirm('确定要提交审核吗?提交审核后,品牌处于待审核状态,对应商品将做下架处理', '提示:', { this.$confirm('确定要提交审核吗?提交审核后,品牌处于待审核状态,对应商品将做下架处理', '提示:', {
type: 'warning', type: 'warning',
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -750,11 +744,11 @@ ...@@ -750,11 +744,11 @@
}).then(async() => { }).then(async() => {
let res = await upBrand(data) let res = await upBrand(data)
if ( res.code == 1 ) { if ( res.code == 1 ) {
this.$message({ message: '编辑成功', type: 'success'}); this.$message({ message: '提交成功', type: 'success'});
this.getList(); this.getList();
this.isOpen = false; this.isOpen = false;
}else { }else {
this.$message({ type: 'error', message: res.message ? res.message : "编辑失败"}); this.$message({ type: 'error', message: res.message ? res.message : "提交失败"});
} }
}).catch(() => {}); }).catch(() => {});
} }
...@@ -807,6 +801,8 @@ ...@@ -807,6 +801,8 @@
// 通用方法 // 通用方法
/** 重置 编辑 表单*/ /** 重置 编辑 表单*/
reset(formName){ reset(formName){
debugger
if (this.$refs[formName]) { if (this.$refs[formName]) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}else { }else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论