提交 66755add authored 作者: huaxinzhu's avatar huaxinzhu

入驻优化;获取服务费率

上级 5b6ca0ad
...@@ -111,3 +111,12 @@ export function UploadImg(data) { ...@@ -111,3 +111,12 @@ export function UploadImg(data) {
data: data data: data
}) })
} }
// 根据类目 获取服务费
export function getByCategoryData(query) {
return request({
url: '/local/serviceFee/getByCategory',
method: 'get',
params: query
})
}
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
}) })
}, },
nextStep() { nextStep() {
// this.$router.push("/agreement");
this.$router.push("/fillMainInf"); this.$router.push("/fillMainInf");
}, },
} }
......
...@@ -23,16 +23,13 @@ ...@@ -23,16 +23,13 @@
<!-- <p>服务电话:4000-188-199</p>--> <!-- <p>服务电话:4000-188-199</p>-->
<p style="padding-top: 40px;"><el-button type="primary" @click="reSubmit">重新提交</el-button></p> <p style="padding-top: 40px;"><el-button type="primary" @click="reSubmit">重新提交</el-button></p>
</div> </div>
</div> </div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { getInfo } from '@/api/module/entry'; import { getInfo,getShopInf } from '@/api/module/entry';
export default { export default {
name: "ReviewFail", name: "ReviewFail",
data() { data() {
...@@ -41,6 +38,10 @@ ...@@ -41,6 +38,10 @@
} }
}, },
created() { created() {
if(this.$route.params.msg) {
this.msg = this.$route.params.msg;
}
/** 页面刷新,更新 客户审核状态 */
getInfo().then(res=> { getInfo().then(res=> {
if (res.code == 1 && res.data.user) { if (res.code == 1 && res.data.user) {
if (res.data.user.state == 1) { if (res.data.user.state == 1) {
...@@ -51,16 +52,16 @@ ...@@ -51,16 +52,16 @@
} }
if (res.data.user.state == 3) { if (res.data.user.state == 3) {
this.$router.push({path: '/reviewFail'}); this.$router.push({path: '/reviewFail'});
getShopInf().then(res=> {
if (res.code == 1 && res.data.Apply.content != '') {
this.msg = res.data.Apply.content;
}
});
} }
} else {
this.$router.push({path: '/reviewFail'});
} }
}); });
}, },
mounted() { mounted() {
if(this.$route.params.msg) {
this.msg = this.$route.params.msg;
}
/** 禁止 浏览器 后退 */ /** 禁止 浏览器 后退 */
history.pushState(null,null,document.URL); history.pushState(null,null,document.URL);
window.addEventListener('popstate', function () { window.addEventListener('popstate', function () {
......
...@@ -29,22 +29,26 @@ ...@@ -29,22 +29,26 @@
</template> </template>
<script> <script>
import { getInfo } from '@/api/module/entry';
export default { export default {
name: "ReviewSuccess", name: "ReviewSuccess",
data() { data() {
return {} return {}
}, },
created() { created() {
// 刷新当前页面,如果sys操作,审核通过,那么这个applyState状态值会变为 1,代表审核通过,可以直接跳转登录页面,审核拒绝,则 为3,跳转到失败页面 getInfo().then(res=> {
if (this.$store.state.user.applyState == 1) { if (res.code == 1 && res.data.user) {
this.$router.push({path: '/home/index'}); if (res.data.user.state == 1) {
} this.$router.push({path: '/home/index'});
if (this.$store.state.user.applyState == 2) { }
this.$router.push({path: '/reviewing'}); if (res.data.user.state == 2) {
} this.$router.push({path: '/reviewing'})
if (this.$store.state.user.applyState == 3) { }
this.$router.push({path: '/reviewFail'}); if (res.data.user.state == 3) {
} this.$router.push({path: '/reviewFail'});
}
}
});
}, },
mounted() { mounted() {
/** 禁止 浏览器 后退 */ /** 禁止 浏览器 后退 */
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
// 获取客户是否有审核信息 // 获取客户是否有审核信息
getShopInf().then(res => { getShopInf().then(res => {
if(res.code === 1) { if(res.code === 1) {
//debugger
switch(res.data.state) { switch(res.data.state) {
case 0: case 0:
switch(res.data.status){ switch(res.data.status){
...@@ -49,10 +48,7 @@ ...@@ -49,10 +48,7 @@
this.$router.push({path: '/process'}); this.$router.push({path: '/process'});
break; break;
case(1): case(1):
this.$router.push({path: '/fillBrandInf'}); this.$router.push({path: '/fillShopInf'});
break;
case(2):
this.$router.push({path: '/fillShopInf',});
break; break;
} }
break; break;
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</template> </template>
<script> <script>
import { NewGetCategory, GetFreight, UploadImg } from '@/api/module/goods' import { NewGetCategory, GetFreight, UploadImg, getByCategoryData } from '@/api/module/goods'
import { getBrandsInf } from '@/api/module/brand/brand' import { getBrandsInf } from '@/api/module/brand/brand'
import { getAreaList } from '@/api/module/retreat/address' import { getAreaList } from '@/api/module/retreat/address'
export default { export default {
...@@ -153,9 +153,6 @@ ...@@ -153,9 +153,6 @@
} }
} }
return { return {
//loading: false,
// categoryStr: '',
goodsInfoDataClone: {},
areaOptions: [], // 地址 省 areaOptions: [], // 地址 省
brandOptions: [], // 商品品牌 brandOptions: [], // 商品品牌
goodsInfoForm: { goodsInfoForm: {
...@@ -205,7 +202,7 @@ ...@@ -205,7 +202,7 @@
// checkStrictly: true // checkStrictly: true
}, },
fuckoptions: [], fuckoptions: [],
catefee: 0,
} // return end } // return end
}, },
components: {}, components: {},
...@@ -226,8 +223,6 @@ ...@@ -226,8 +223,6 @@
this.getSSQArea(); this.getSSQArea();
}, },
mounted() { mounted() {
//深拷贝一份最开始的数据,为初始化准备
//this.goodsInfoDataClone = this.deepClone(this.goodsinfodata);
if(this.goodsinfodata.goods_id) { if(this.goodsinfodata.goods_id) {
this.goodsInfoForm = this.goodsinfodata; this.goodsInfoForm = this.goodsinfodata;
if( this.goodsInfoForm.imgs.length > 0 ) { if( this.goodsInfoForm.imgs.length > 0 ) {
...@@ -241,6 +236,9 @@ ...@@ -241,6 +236,9 @@
this.goodsInfoForm.categoryStr = this.goodsinfodata.categoryStr; this.goodsInfoForm.categoryStr = this.goodsinfodata.categoryStr;
this.goodsInfoForm.categoryList = this.goodsinfodata.categoryList; this.goodsInfoForm.categoryList = this.goodsinfodata.categoryList;
} }
// 初始化 服务费率
this.getByCategoryFee(this.goodsInfoForm.categoryList)
}, },
methods: { methods: {
// 数据初始化 // 数据初始化
...@@ -280,7 +278,6 @@ ...@@ -280,7 +278,6 @@
this.SSQGoodsList = []; this.SSQGoodsList = [];
this.editGoodsTypeDialog = true; this.editGoodsTypeDialog = true;
this.SSQGoodsList = this.goodsInfoForm.categoryList this.SSQGoodsList = this.goodsInfoForm.categoryList
//console.log('点击修改类目数据:',this.SSQGoodsList);
}, },
getSSQArea(node, resolve) { getSSQArea(node, resolve) {
...@@ -301,6 +298,8 @@ ...@@ -301,6 +298,8 @@
this.goodsInfoForm.categoryStr = ssqLabelList[0] + '/' + ssqLabelList[1] + '/' + ssqLabelList[2]; this.goodsInfoForm.categoryStr = ssqLabelList[0] + '/' + ssqLabelList[1] + '/' + ssqLabelList[2];
this.editGoodsTypeDialog = false; this.editGoodsTypeDialog = false;
this.$message({type:'success',message:'修改成功'}); this.$message({type:'success',message:'修改成功'});
// 修改类目后更新 服务费率
this.getByCategoryFee(this.goodsInfoForm.categoryList)
}else { }else {
this.$message({type: 'warning',message: '请选择完整三级类目'}); this.$message({type: 'warning',message: '请选择完整三级类目'});
} }
...@@ -421,7 +420,26 @@ ...@@ -421,7 +420,26 @@
this.$router.push({path: '/system/shop/brand'}); this.$router.push({path: '/system/shop/brand'});
}, },
// 通用 方法 /** 根据类目 获取服务费率
* 传一级类目
* */
getByCategoryFee(cateList) {
let data = {
category_id: ''
}
this.cateFee = 0;
if (Array.isArray(cateList) && cateList.length > 0) {
data.category_id = cateList[0];
}
// console.log(8888,data);
getByCategoryData(data).then(res=> {
if ( res.code == 1 ) {
this.cateFee = res.data.service_fee_ratio
}
});
},
// 图片转换为 base64 // 图片转换为 base64
getBase64(file) { getBase64(file) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
...@@ -439,9 +457,6 @@ ...@@ -439,9 +457,6 @@
}; };
}); });
}, },
} // methods end } // methods end
} }
</script> </script>
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
</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 <span class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span>
class="sl-price-span-input">{{ scope.row.sl_price = scope.row.js_price ? scope.row.js_price : '' }}</span> <!-- <span>{{ settlePricecalc(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="指导价">
...@@ -217,7 +217,8 @@ export default { ...@@ -217,7 +217,8 @@ export default {
}, },
}, },
created() { created() {
//this.orgGoodsPam = this.parameterdata; // console.log("服务费率:");
}, },
mounted() { mounted() {
if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) { if(this.parameterdata.pamTableList && this.parameterdata.pamTableList.length > 0) {
...@@ -387,6 +388,13 @@ export default { ...@@ -387,6 +388,13 @@ export default {
}); });
}, },
/** 结算价格计算 */
settlePricecalc(jsPriceVal) {
let jsPriceNum = '';
return jsPriceNum
}
} // methods end } // methods end
} }
</script> </script>
......
...@@ -270,8 +270,10 @@ ...@@ -270,8 +270,10 @@
this.isShowGoodsDetails = false; this.isShowGoodsDetails = false;
} }
}, },
mounted() {}, mounted() {
},
methods: { methods: {
// 规格子组件,传给父组件的数据 // 规格子组件,传给父组件的数据
calcSpeTable(data) { calcSpeTable(data) {
//console.log('原始值',data); //console.log('原始值',data);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论