liudan 10 months ago
parent 70e25bce46
commit 889bb0d3ab
  1. 4
      view/admin/src/api/merchant.js
  2. 89
      view/admin/src/views/merchant/list/index.vue
  3. 45
      view/mer/src/views/systemForm/setSystem/modifyStoreInfo.vue

@ -336,3 +336,7 @@ export function splitAccountMark(id) {
export function marginDeductionForm(id) {
return request.get(`margin/set/${id}/form`)
}
// 商户资金详情
export function getAssetMerchant(id) {
return request.get(`system/merchant/info`,id)
}

@ -195,7 +195,7 @@
type="text"
size="small"
@click="handleTimes(scope.row.mer_id)"
@click="getMerchantDetails(scope.row.mer_id)"
>详情</el-button>
<!-- <el-button
v-if="tableFrom.status === '1'"
@ -218,17 +218,17 @@
/>
</div>
</el-card>
<el-dialog title="商户详情" :visible.sync="dialogVisible" width="80%">
<el-dialog title="商户详情" :visible.sync="dialogVisible" width="30%">
<el-tabs v-model="activeName">
<el-tab-pane label="基本信息" name="first">
<el-descriptions class="margin-top" :column="12" direction="vertical">
<el-descriptions-item label="商户名称">kooriookami</el-descriptions-item>
<el-descriptions-item label="商户负责人手机号">18100000000</el-descriptions-item>
<el-descriptions-item label="商户分类">苏州市</el-descriptions-item>
<el-descriptions-item label="商户类别">苏州市</el-descriptions-item>
<el-descriptions-item label="商户负责人姓名">苏州市</el-descriptions-item>
<el-descriptions-item label="商户入驻时间">苏州市</el-descriptions-item>
<el-descriptions-item label="是否开启商户">
<el-descriptions class="margin-top" :column="1">
<el-descriptions-item label="商户名称">{{merchantInfo.mer_name}}</el-descriptions-item>
<el-descriptions-item label="商户负责人手机号">{{merchantInfo.mer_phone}}</el-descriptions-item>
<el-descriptions-item label="商户分类">{{getLabel(merchantInfo.category_id,'fenlei')}}</el-descriptions-item>
<el-descriptions-item label="商户类别">{{merchantInfo.type_id==1?'自营':'非自营'}}</el-descriptions-item>
<el-descriptions-item label="商户负责人姓名">{{merchantInfo.real_name}}</el-descriptions-item>
<el-descriptions-item label="商户入驻时间">{{merchantInfo.create_time}}</el-descriptions-item>
<!-- <el-descriptions-item label="是否开启商户">
<div>
<el-switch
v-model="isUse"
@ -237,17 +237,28 @@
</el-switch>
<span>开启,店铺即可展示在移动端</span>
</div>
</el-descriptions-item>
</el-descriptions-item> -->
</el-descriptions>
<!-- <el-button type="primary">提交</el-button> -->
</el-tab-pane>
<el-tab-pane label="商家账户信息" name="second">
<el-descriptions class="margin-top" :column="1">
<el-descriptions-item label="商户总收入">{{assetsMerchant.total}}</el-descriptions-item>
<el-descriptions-item label="商户当前余额">{{assetsMerchant.mer_money}}</el-descriptions-item>
<el-descriptions-item label="商户当前冻结金额">{{assetsMerchant.frozen_money}}</el-descriptions-item>
<el-descriptions-item label="商户当前冻结福利积分">{{assetsMerchant.welfare_frozen}}</el-descriptions-item>
<el-descriptions-item label="商户当前可提现总金额">{{assetsMerchant.available_money}}</el-descriptions-item>
<el-descriptions-item label="商户可提现福利积分部分">{{assetsMerchant.welfare}}</el-descriptions-item>
<el-descriptions-item label="商户退款支出">{{assetsMerchant.refund_money}}</el-descriptions-item>
</el-descriptions>
<el-button type="primary">提交</el-button>
</el-tab-pane>
<el-tab-pane label="商家账户信息" name="second">配置管理</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false">关闭</el-button>
</span>
</el-dialog>
</div>
@ -274,7 +285,7 @@ import {
merchantCountApi,
merchantIsCloseApi,
getstoreTypeApi,
getMerCateApi, marginDeductionForm
getMerCateApi, marginDeductionForm,getAssetMerchant
} from "@/api/merchant";
import { fromList } from "@/libs/constants.js";
@ -322,6 +333,23 @@ export default {
dialogVisible:false,
activeName:'first',
isUse:true,
assetsMerchant:{
"total":0, //
"mer_money":0,//
"frozen_money":0,//
"refund_money":0,// 退
"available_money":0,//
"welfare":0, //
"welfare_frozen":0//
},
merchantInfo:{
mer_name:'',
mer_phone:'',
category_id:null,
type_id:null,
real_name:null,
create_time:'',
}
};
},
mounted() {
@ -331,6 +359,35 @@ export default {
this.getList("");
},
methods: {
getLabel(val,name){
if(name=='fenlei'){
let arr = this.merCateList.filter(item=>{
return val==item.value
})
if(arr.length>0){
return arr[0].label
}
}
},
getMerchantDetails(id){
console.log(id)
getAssetMerchant({id:id}).then(res => {
Object.keys(res.data.assets).forEach(item=>{
this.assetsMerchant[item] = res.data.assets[item]
})
Object.keys(this.merchantInfo).forEach(i=>{
this.merchantInfo[i] = res.data[i]
})
this.dialogVisible = true;
})
.catch(res => {
this.$message.error(res.message);
});
},
onLogo(id) {
merchantLoginApi(id)
.then(res => {

@ -135,6 +135,22 @@
<div class="trip">建议尺寸710*134px或710*460px(请根据平台要求选择尺寸此图如未上传默认展示店铺背景图)</div>
</div>
</el-form-item>
<el-form-item class="form-item" label="店铺相册:">
<div class="upLoadPicBox_qualification">
<div v-for="(item, index) in merPicList" :key="index" class="uploadpicBox_list">
<div class="uploadpicBox_list_image">
<el-image ref="elImage" :src="item.url" :preview-src-list="[item.url]" />
</div>
<div class="uploadpicBox_list_method">
<i class="el-icon-delete" @click="delPicList(index)" />
<i class="el-icon-view" @click="viewImage(item, index)" />
</div>
</div>
<el-upload :action="fileUrl" :show-file-list="false" list-type="picture-card" multiple :headers="myHeaders" :on-success="setQualificationsPicList" :before-upload="beforeUploadPic">
<i class="el-icon-plus" />
</el-upload>
</div>
</el-form-item>
<el-form-item class="form-item" label="店铺资质:" :prop="merData.sys_bases_status == 1 ? 'uploadedqualifications' : ''">
<div class="upLoadPicBox_qualification">
<div v-for="(item, index) in uploadedQualifications" :key="index" class="uploadpicBox_list">
@ -509,6 +525,7 @@ export default {
mer_take_status: 0 }, //
myHeaders: { 'X-Token': getToken() },
uploadedQualifications: [], //
merPicList:[],//
mapKey: '', // key
address: '',
key: '',
@ -648,6 +665,13 @@ export default {
} else {
that.uploadedQualifications = []
}
if (res.data.mer_pics instanceof Array) {
res.data.mer_pics.forEach((item) => {
that.merPicList.push({ url: item })
})
} else {
that.merPicList = []
}
if(that.merData.is_margin == 1)(this.getCode())
})
},
@ -663,6 +687,7 @@ export default {
})
reqData.type = this.infoType
reqData.mer_certificate = this.uploadedQualifications.map(item => item.response ? item.response.data.src : item.url)
reqData.mer_pics = this.merPicList.map(item => item.response ? item.response.data.src : item.url)
const location = this.merData.mer_take_location
? [
this.merData.mer_take_location.split(',')[0],
@ -797,6 +822,10 @@ export default {
deldetQualificationsList(index) {
this.uploadedQualifications.splice(index, 1)
},
delPicList(index) {
this.merPicList.splice(index, 1)
},
//
beforeUploadQualification() {
if (this.uploadedQualifications.length >= 5) {
@ -806,6 +835,14 @@ export default {
return true
}
},
beforeUploadPic() {
if (this.merPicList.length >= 5) {
this.$message.error('上传文件最大数量为5张, 上传失败!')
return false
} else {
return true
}
},
//
setQualificationsList(response) {
if (response.status === 200) {
@ -814,6 +851,14 @@ export default {
this.$message.error(response.message)
}
},
//
setQualificationsPicList(response) {
if (response.status === 200) {
this.merPicList.push({ url: response.data.src })
} else {
this.$message.error(response.message)
}
},
//
viewImage(item, index) {
this.$refs.elImage[index].clickHandler()

Loading…
Cancel
Save