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

2.5bug修复

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