@@ -1,4 +1,5 @@ | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import Cookies from "js-cookie"; | |||||
// 保险公司登录 | // 保险公司登录 | ||||
@@ -37,10 +38,33 @@ export function serviceList(query) { | |||||
}) | }) | ||||
} | } | ||||
//保险公司详情 | |||||
export function serviceGet(id) { | |||||
return request({ | |||||
url: '/depositm/financialService/get/'+id, | |||||
method: 'get', | |||||
}) | |||||
} | |||||
//保险公司修改 | |||||
export function serviceEdit(data) { | |||||
return request({ | |||||
url: '/depositm/financialService/edit', | |||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'post', | |||||
data:data | |||||
}) | |||||
} | |||||
//保险产品列表 | //保险产品列表 | ||||
export function productList(query) { | export function productList(query) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/list', | url: '/depositm/financialProduct/list', | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'get', | method: 'get', | ||||
params: query | params: query | ||||
}) | }) | ||||
@@ -50,6 +74,9 @@ export function productList(query) { | |||||
export function productGet(id) { | export function productGet(id) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/get/'+id, | url: '/depositm/financialProduct/get/'+id, | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'get', | method: 'get', | ||||
}) | }) | ||||
} | } | ||||
@@ -59,7 +86,10 @@ export function commonUpload(data) { | |||||
return request({ | return request({ | ||||
url: '/depositm/common/upload', | url: '/depositm/common/upload', | ||||
method: 'post', | method: 'post', | ||||
header: { "Content-Type": 'application/x-www-form-urlencoded' }, | |||||
headers: { | |||||
"Content-Type": 'application/x-www-form-urlencoded', | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
@@ -68,6 +98,9 @@ export function commonUpload(data) { | |||||
export function financialProductEdit(data) { | export function financialProductEdit(data) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/edit', | url: '/depositm/financialProduct/edit', | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'post', | method: 'post', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -77,6 +110,9 @@ export function financialProductEdit(data) { | |||||
export function financialProductAdd(data) { | export function financialProductAdd(data) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/add', | url: '/depositm/financialProduct/add', | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'post', | method: 'post', | ||||
data: data | data: data | ||||
}) | }) | ||||
@@ -86,6 +122,9 @@ export function financialProductAdd(data) { | |||||
export function productIn(id) { | export function productIn(id) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/productIn/'+id, | url: '/depositm/financialProduct/productIn/'+id, | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'post', | method: 'post', | ||||
}) | }) | ||||
} | } | ||||
@@ -94,6 +133,9 @@ export function productIn(id) { | |||||
export function productOut(id) { | export function productOut(id) { | ||||
return request({ | return request({ | ||||
url: '/depositm/financialProduct/productOut/'+id, | url: '/depositm/financialProduct/productOut/'+id, | ||||
headers: { | |||||
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||||
}, | |||||
method: 'post', | method: 'post', | ||||
}) | }) | ||||
} | } | ||||
@@ -107,6 +149,15 @@ export function detailList(query) { | |||||
}) | }) | ||||
} | } | ||||
//服务组织注册 | |||||
export function entityRegister(query) { | |||||
return request({ | |||||
url: '/depositm/entity/register', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//服务项目列表 | //服务项目列表 | ||||
export function supplyDemandList(query) { | export function supplyDemandList(query) { | ||||
return request({ | return request({ | ||||
@@ -151,6 +151,7 @@ const whiteList = [ | |||||
'/agriculturalTrusteeship/shopDetail',//保险列表详情 | '/agriculturalTrusteeship/shopDetail',//保险列表详情 | ||||
'/agriculturalTrusteeship/shopEdit',//保险列表详情 | '/agriculturalTrusteeship/shopEdit',//保险列表详情 | ||||
'/agriculturalTrusteeship/shopAdd',//保险列表首页 | '/agriculturalTrusteeship/shopAdd',//保险列表首页 | ||||
'/agriculturalTrusteeship/serviceEdit',//保险列表首页 | |||||
'/agriculturalTrusteeship/socializationIndex',//社会化服务组织待处理 | '/agriculturalTrusteeship/socializationIndex',//社会化服务组织待处理 | ||||
'/agriculturalTrusteeship/socializationProject',//社会化服务组织产品 | '/agriculturalTrusteeship/socializationProject',//社会化服务组织产品 | ||||
'/agriculturalTrusteeship/socializationProjectDetail',//社会化服务组织产品详情 | '/agriculturalTrusteeship/socializationProjectDetail',//社会化服务组织产品详情 | ||||
@@ -4681,6 +4681,15 @@ export const constantRoutes = [ | |||||
}, | }, | ||||
component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopList'], resolve) | component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/shopList'], resolve) | ||||
}, | }, | ||||
{ | |||||
path: '/agriculturalTrusteeship/serviceEdit', | |||||
name: 'agriculturalTrusteeshipServiceEdit', | |||||
meta: { | |||||
title: '编辑公司信息', | |||||
hidden: true, | |||||
}, | |||||
component: (resolve) => require(['@/views/agriculturalTrusteeship/shop/serviceEdit'], resolve) | |||||
}, | |||||
{ | { | ||||
path: '/agriculturalTrusteeship/shopDetail', | path: '/agriculturalTrusteeship/shopDetail', | ||||
name: 'agriculturalTrusteeshipShopDetail', | name: 'agriculturalTrusteeshipShopDetail', | ||||
@@ -21,7 +21,6 @@ service.interceptors.request.use(config => { | |||||
forbidClick: true, | forbidClick: true, | ||||
duration: 0 | duration: 0 | ||||
}); | }); | ||||
axios.defaults.headers['ACCESS-SESSION-ID'] = Cookies.get('ACCESS-SESSION-ID') | |||||
// 是否需要设置 token | // 是否需要设置 token | ||||
const isToken = (config.headers || {}).isToken === false | const isToken = (config.headers || {}).isToken === false | ||||
if (getToken() && !isToken) { | if (getToken() && !isToken) { | ||||
@@ -36,21 +36,21 @@ | |||||
</div> | </div> | ||||
<div class="nav"> | <div class="nav"> | ||||
<div class="nav_content" @click="loginType = 'bxjg',navDis = 'none',loginDis = 'block'"> | |||||
<div class="nav_content" @click="financialType = '2' ,loginType = 'bxjg',navDis = 'none',loginDis = 'block'"> | |||||
<div> | <div> | ||||
<p class="nav_name_03">保险机构登录</p> | <p class="nav_name_03">保险机构登录</p> | ||||
<p class="nav_text">登录可发布保险产品</p> | <p class="nav_text">登录可发布保险产品</p> | ||||
</div> | </div> | ||||
<i class="go"></i> | <i class="go"></i> | ||||
</div> | </div> | ||||
<div class="nav_content" style="padding:12.5PX 0;margin:12.5PX 0;border-top: 1px solid #D5D8DE;border-bottom: 1px solid #D5D8DE;" @click="loginType = 'dkjg',navDis = 'none',loginDis = 'block'"> | |||||
<div class="nav_content" style="padding:12.5PX 0;margin:12.5PX 0;border-top: 1px solid #D5D8DE;border-bottom: 1px solid #D5D8DE;" @click="financialType = '1' ,loginType = 'dkjg',navDis = 'none',loginDis = 'block'"> | |||||
<div> | <div> | ||||
<p class="nav_name_04">贷款机构登录</p> | <p class="nav_name_04">贷款机构登录</p> | ||||
<p class="nav_text">登录可发布贷款产品</p> | <p class="nav_text">登录可发布贷款产品</p> | ||||
</div> | </div> | ||||
<i class="go"></i> | <i class="go"></i> | ||||
</div> | </div> | ||||
<div class="nav_content" @click="loginType = 'ndjg',navDis = 'none',loginDis = 'block'"> | |||||
<div class="nav_content" @click="financialType = '3' ,loginType = 'ndjg',navDis = 'none',loginDis = 'block'"> | |||||
<div> | <div> | ||||
<p class="nav_name_05">农担机构登录</p> | <p class="nav_name_05">农担机构登录</p> | ||||
<p class="nav_text">登录可发布农担产品</p> | <p class="nav_text">登录可发布农担产品</p> | ||||
@@ -97,8 +97,8 @@ | |||||
</van-tab> | </van-tab> | ||||
<van-tab name="register" title="注册"> | <van-tab name="register" title="注册"> | ||||
<!--保险机构注册--> | <!--保险机构注册--> | ||||
<template> | |||||
<van-field v-model="serviceForm.financialType" center :border="false" placeholder="请输入机构名称" > | |||||
<template v-if="loginType == 'bxjg' || loginType == 'dkjg' || loginType == 'ndjg'"> | |||||
<van-field v-model="serviceForm.financialName" center :border="false" placeholder="请输入机构名称" > | |||||
<template #left-icon> | <template #left-icon> | ||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_01.png" alt=""> | <img src="../../../static/images/agriculturalTrusteeship/login/register_01.png" alt=""> | ||||
</template> | </template> | ||||
@@ -158,7 +158,97 @@ | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<van-uploader v-model="serviceForm.mainImg" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||||
<div style="height: 20PX"></div> | |||||
<van-uploader v-model="mainImgUploader" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||||
</template> | |||||
<template v-if="loginType == 'fwzz'"> | |||||
<van-field v-model="entityForm.entityName" center :border="false" placeholder="请输入主体名称" > | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_01.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
required | |||||
:rules="[{ required: true , message:'请选择产品类型'}]" | |||||
v-model="statisticsTypeId" | |||||
center | |||||
@click="showStatisticsTypeId = true" | |||||
:border="false" | |||||
right-icon="arrow-down" | |||||
placeholder="请选择主体类别"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_02.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-popup v-model="showStatisticsTypeId" position="bottom" get-container="body"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="statisticsTypeIdOptions" | |||||
@confirm="onConfirmStatisticsTypeId" | |||||
@cancel="showStatisticsTypeId = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field v-model="entityForm.industryClassificationType" center :border="false" placeholder="请选择生产种类" > | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_03.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.modelSocietyType" center :border="false" placeholder="请选择示范类型"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_04.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.entityAddress" center :border="false" placeholder="请输入主体地址" > | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_02.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.registerTime" center :border="false" placeholder="请选择成立时间" > | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_05.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.principalName" center :border="false" placeholder="请输入负责人姓名"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.tal" center :border="false" placeholder="请输入联系方式"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_07.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.username" center :border="false" placeholder="请输入账号"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.password" center :border="false" placeholder="请输入密码"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_08.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<van-field v-model="entityForm.passwordReal" center :border="false" placeholder="请确认密码"> | |||||
<template #left-icon> | |||||
<img src="../../../static/images/agriculturalTrusteeship/login/register_08.png" alt=""> | |||||
</template> | |||||
</van-field> | |||||
<div style="height: 20PX"></div> | |||||
<van-uploader v-model="mainImgUploader" :after-read="afterReadEvidenceEntityForm" :before-delete="deleteFileEvidenceEntityForm" /> | |||||
</template> | </template> | ||||
<p class="submit_btn" @click="goRegister">提交审核</p> | <p class="submit_btn" @click="goRegister">提交审核</p> | ||||
@@ -173,7 +263,7 @@ | |||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import {getCodeImg, getRegisterSmsCode, registerCheck, registerOn} from "@/api/login"; | import {getCodeImg, getRegisterSmsCode, registerCheck, registerOn} from "@/api/login"; | ||||
import {decrypt, encrypt} from "@/utils/jsencrypt"; | import {decrypt, encrypt} from "@/utils/jsencrypt"; | ||||
import {serviceLogin, entityLogin, commonUpload , serviceRegister} from "@/api/agriculturalTrusteeship"; | |||||
import {serviceLogin, entityLogin, commonUpload , serviceRegister , entityRegister} from "@/api/agriculturalTrusteeship"; | |||||
export default { | export default { | ||||
name: "agriculturalTrusteeshipLogin", | name: "agriculturalTrusteeshipLogin", | ||||
data() { | data() { | ||||
@@ -206,13 +296,29 @@ | |||||
navDis:'block', | navDis:'block', | ||||
loginDis:'none', | loginDis:'none', | ||||
loginType:'', | loginType:'', | ||||
serviceForm:{}//保险公司注册表单 | |||||
serviceForm:{ | |||||
mainImg:'' | |||||
},//保险公司注册表单 | |||||
entityForm:{},//服务组织注册表单 | |||||
mainImgArr:[], | |||||
mainImgArrEntity:[], | |||||
mainImgUploader:[], | |||||
financialType:'', | |||||
statisticsTypeIdOptions : [], | |||||
showStatisticsTypeId : false, | |||||
statisticsTypeId:'' | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDicts("financial_type").then(response => { | this.getDicts("financial_type").then(response => { | ||||
this.financialTypeOptions = response.data; | this.financialTypeOptions = response.data; | ||||
}); | }); | ||||
this.getDicts("newBusinessEntity_statistics_project").then(response => { | |||||
for (var i = 0; i < response.data.length; i++) { | |||||
this.statisticsTypeIdOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
} | |||||
}); | |||||
this.getCode(); | this.getCode(); | ||||
this.getCookie(); | this.getCookie(); | ||||
}, | }, | ||||
@@ -225,6 +331,7 @@ | |||||
this.formData.username = encrypt(this.username); | this.formData.username = encrypt(this.username); | ||||
this.formData.password = encrypt(this.password); | this.formData.password = encrypt(this.password); | ||||
this.formData.financialType = '2'; | |||||
serviceLogin(this.formData).then(response => { | serviceLogin(this.formData).then(response => { | ||||
Cookies.set("ACCESS-SESSION-ID", response.data.id); | Cookies.set("ACCESS-SESSION-ID", response.data.id); | ||||
Cookies.set("ServiceInformation", response.data); | Cookies.set("ServiceInformation", response.data); | ||||
@@ -479,13 +586,45 @@ | |||||
deleteFileEvidenceForm(file,detail) { | deleteFileEvidenceForm(file,detail) { | ||||
this.mainImgArr.splice(detail.index,1); | this.mainImgArr.splice(detail.index,1); | ||||
}, | }, | ||||
goRegister(){ | |||||
this.serviceForm.mainImg = this.mainImgArr.join(',') | |||||
console.log(this.serviceForm) | |||||
serviceRegister(this.serviceForm).then(res=>{ | |||||
afterReadEvidenceEntityForm(file){ | |||||
let params1 = new FormData(); | |||||
Cookies.set("ACCESS-SESSION-ID", '0'); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
// this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName); | |||||
console.log(r1) | |||||
Cookies.remove("ACCESS-SESSION-ID"); | |||||
this.mainImgArrEntity.push(r1.fileName) | |||||
}) | }) | ||||
}, | }, | ||||
deleteFileEvidenceEntityForm(file,detail) { | |||||
this.mainImgArrEntity.splice(detail.index,1); | |||||
}, | |||||
goRegister(){ | |||||
if (this.loginType == 'bxjg' || this.loginType == 'dkjg' || this.loginType == 'ndjg'){ | |||||
this.serviceForm.mainImg = this.mainImgArr.join(','); | |||||
this.serviceForm.username = encrypt(this.serviceForm.username); | |||||
this.serviceForm.password = encrypt(this.serviceForm.password); | |||||
this.serviceForm.financialType = this.financialType; | |||||
serviceRegister(this.serviceForm).then(res=>{ | |||||
this.$notify({ type: 'success', message: '注册成功' }); | |||||
this.active = 0; | |||||
}) | |||||
}else if(this.loginType = 'fwzz'){ | |||||
this.entityForm.mainImg = this.mainImgArrEntity.join(','); | |||||
this.entityForm.username = encrypt(this.entityForm.username); | |||||
this.entityForm.password = encrypt(this.entityForm.password); | |||||
entityRegister(this.entityForm).then(res=>{ | |||||
this.$notify({ type: 'success', message: '注册成功' }); | |||||
this.active = 0; | |||||
}) | |||||
} | |||||
}, | |||||
onConfirmStatisticsTypeId(data){ | |||||
this.entityForm.statisticsTypeId = data.value; | |||||
this.statisticsTypeId = data.text; | |||||
this.showStatisticsTypeId = false; | |||||
} | |||||
//methods结束处 | //methods结束处 | ||||
}, | }, | ||||
@@ -0,0 +1,151 @@ | |||||
<template> | |||||
<div class="home_wrapper"> | |||||
<!-- 头部开始 --> | |||||
<van-nav-bar | |||||
title="编辑保险公司信息" | |||||
fixed | |||||
placeholder | |||||
left-arrow | |||||
@click-left="onClickLeft" | |||||
/> | |||||
<!-- 头部结束 --> | |||||
<!-- 内容开始 --> | |||||
<div class="main"> | |||||
<van-field label="机构名称" v-model="serviceForm.financialName" input-align="right" placeholder="请输入机构名称" /> | |||||
<van-field label="联系人" v-model="serviceForm.linker" input-align="right" placeholder="请输入联系人" /> | |||||
<van-field label="地址" v-model="serviceForm.address" input-align="right" placeholder="请输入地址" /> | |||||
<van-field label="电话" v-model="serviceForm.phone" input-align="right" placeholder="请输入电话" /> | |||||
<van-field label="传真" v-model="serviceForm.fax" input-align="right" placeholder="请输入传真" /> | |||||
<van-field label="简要描述" v-model="serviceForm.description" input-align="right" placeholder="请输入简要描述" /> | |||||
<van-field label="图片" :border="false" input-align="right" readonly /> | |||||
<div style="padding: 0 4% 2vh;"> | |||||
<van-uploader v-model="serviceForm.mainImgList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||||
</div> | |||||
</div> | |||||
<div class="main_btn"> | |||||
<p @click="submitForm">提交审核</p> | |||||
</div> | |||||
<!-- 内容结束 --> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
import Cookies from "js-cookie"; | |||||
import {commonUpload, serviceEdit, serviceGet} from "@/api/agriculturalTrusteeship"; | |||||
export default { | |||||
name: "agriculturalTrusteeshipShopAdd", | |||||
data() { | |||||
return { | |||||
activeKey: 0, | |||||
active: 0, | |||||
loading: false, | |||||
finished: false, | |||||
center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | |||||
zoom: 15, //地图展示级别 | |||||
showDialog:false, | |||||
product:{ | |||||
releaseDate:this.format(new Date(),'yyyy-MM-dd') | |||||
}, | |||||
mainImgArr:[], | |||||
productTypeOptions:[], | |||||
showProductType:false, | |||||
productType:'', | |||||
serviceForm:{} | |||||
}; | |||||
}, | |||||
created() { | |||||
this.getDetail(); | |||||
}, | |||||
methods: { | |||||
getDetail(){ | |||||
serviceGet(Cookies.get('ACCESS-SESSION-ID')).then(response => { | |||||
if (response.data.mainImg){ | |||||
response.data.mainImgList = []; | |||||
var attachement = response.data.mainImg.split( "," ); | |||||
this.mainImgArr = response.data.mainImg.split( "," ); | |||||
attachement.forEach(responseAttach=>{ | |||||
response.data.mainImgList.push({ | |||||
url:'/api' + responseAttach, | |||||
isImage: true | |||||
}); | |||||
}) | |||||
} | |||||
this.serviceForm = response.data; | |||||
}); | |||||
}, | |||||
submitForm(){ | |||||
console.log(this.mainImgArr) | |||||
this.serviceForm.mainImg = this.mainImgArr.join(',') | |||||
serviceEdit(this.serviceForm).then((res) => { | |||||
if(res.code=="200"){ | |||||
this.$notify({ type: 'success', message: '提交成功' }); | |||||
setTimeout(function(){ | |||||
history.back(-1); | |||||
},2000) | |||||
} | |||||
}) | |||||
}, | |||||
afterReadEvidenceForm(file){ | |||||
let params1 = new FormData(); | |||||
params1.append("file", file.file); | |||||
commonUpload(params1).then((r1) => { | |||||
// this.tEnforceSamplingGoodsList[index].attachement.push(r1.fileName); | |||||
console.log(r1) | |||||
this.mainImgArr.push(r1.fileName) | |||||
}) | |||||
}, | |||||
deleteFileEvidenceForm(file,detail) { | |||||
this.mainImgArr.splice(detail.index,1); | |||||
this.serviceForm.mainImgList.splice(detail.index,1); | |||||
}, | |||||
onConfirmProductType(data){ | |||||
this.product.productType = data.text; | |||||
this.productType = data.text; | |||||
this.showProductType = false; | |||||
} | |||||
}, | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
.home_wrapper{ | |||||
background: #F6F6F6; | |||||
min-height: 100vh; | |||||
} | |||||
.main{ | |||||
width: 92%; | |||||
margin: 0 auto; | |||||
margin-top: 2vh; | |||||
border-radius: 10PX; | |||||
overflow: hidden; | |||||
background-color: #FFF; | |||||
} | |||||
.main_btn{ | |||||
display: flex; | |||||
justify-content: space-around; | |||||
padding: 4vh 0; | |||||
p{ | |||||
font-size: .4rem; | |||||
width: 35%; | |||||
text-align: center; | |||||
padding: 10PX 0; | |||||
border-radius: 5rem; | |||||
box-shadow: 0px 3PX 6PX 0px rgba(0,0,0,0.16); | |||||
&:nth-child(1){ | |||||
background: #334281; | |||||
color: #ffffff; | |||||
} | |||||
&:nth-child(2){ | |||||
background: #D1D5E4; | |||||
color: #334281; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@@ -73,7 +73,7 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDicts("financial_type").then(response => { | |||||
this.getDicts("product_type").then(response => { | |||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.productTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.productTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
} | } | ||||
@@ -106,7 +106,7 @@ | |||||
this.product.mainImgList.splice(detail.index,1); | this.product.mainImgList.splice(detail.index,1); | ||||
}, | }, | ||||
onConfirmProductType(data){ | onConfirmProductType(data){ | ||||
this.product.productType = data.text; | |||||
this.product.productType = data.value; | |||||
this.productType = data.text; | this.productType = data.text; | ||||
this.showProductType = false; | this.showProductType = false; | ||||
} | } | ||||
@@ -14,7 +14,27 @@ | |||||
<!-- 内容开始 --> | <!-- 内容开始 --> | ||||
<div class="main"> | <div class="main"> | ||||
<van-field label="产品名称" v-model="product.productName" input-align="right" placeholder="无" /> | <van-field label="产品名称" v-model="product.productName" input-align="right" placeholder="无" /> | ||||
<van-field label="产品类型" v-model="product.productType" input-align="right" placeholder="无" /> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
required | |||||
:rules="[{ required: true , message:'请选择产品类型'}]" | |||||
v-model="productType" | |||||
label="产品类型" | |||||
placeholder="请选择产品类型" | |||||
@click="showProductType = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
label-width="auto" | |||||
/> | |||||
<van-popup v-model="showProductType" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="productTypeOptions" | |||||
@confirm="onConfirmProductType" | |||||
@cancel="showProductType = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field label="简介" type="textarea" autosize v-model="product.productLink" input-align="right" placeholder="无" /> | <van-field label="简介" type="textarea" autosize v-model="product.productLink" input-align="right" placeholder="无" /> | ||||
<van-field label="图片" :border="false" input-align="right" readonly /> | <van-field label="图片" :border="false" input-align="right" readonly /> | ||||
<div style="padding: 0 4% 2vh;"> | <div style="padding: 0 4% 2vh;"> | ||||
@@ -43,15 +63,26 @@ | |||||
zoom: 15, //地图展示级别 | zoom: 15, //地图展示级别 | ||||
showDialog:false, | showDialog:false, | ||||
product:{}, | product:{}, | ||||
mainImgArr:[] | |||||
mainImgArr:[], | |||||
productTypeOptions:[], | |||||
productTypeOptions2:[], | |||||
productType:'', | |||||
showProductType:false | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDicts("product_type").then(response => { | |||||
for (var i = 0; i < response.data.length; i++) { | |||||
this.productTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||||
} | |||||
this.productTypeOptions2 = response.data; | |||||
}); | |||||
this.getDetail(); | this.getDetail(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
getDetail(){ | getDetail(){ | ||||
productGet(this.$route.query.id).then(response => { | productGet(this.$route.query.id).then(response => { | ||||
this.productType = response.data.productType; | |||||
if (response.data.mainImg){ | if (response.data.mainImg){ | ||||
response.data.mainImgList = []; | response.data.mainImgList = []; | ||||
var attachement = response.data.mainImg.split( "," ); | var attachement = response.data.mainImg.split( "," ); | ||||
@@ -92,6 +123,11 @@ | |||||
} | } | ||||
}) | }) | ||||
}, | }, | ||||
onConfirmProductType(data){ | |||||
this.product.productType = data.value; | |||||
this.productType = data.text; | |||||
this.showProductType = false; | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -17,35 +17,45 @@ | |||||
<p class="tt">公司信息</p> | <p class="tt">公司信息</p> | ||||
</template> | </template> | ||||
<template #right-icon> | <template #right-icon> | ||||
<img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_edit.png"> | |||||
<img src="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_edit.png" @click="$router.push({name:'agriculturalTrusteeshipServiceEdit'})"> | |||||
</template> | </template> | ||||
</van-cell> | </van-cell> | ||||
<van-field | <van-field | ||||
value="包有钱保险公司" | |||||
readonly | |||||
:value="serviceForm.financialName" | |||||
label="机构名称" | label="机构名称" | ||||
left-icon="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_com.png" | left-icon="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_com.png" | ||||
input-align="right" | input-align="right" | ||||
:border="false" | :border="false" | ||||
placeholder="显示图标" | |||||
/> | |||||
placeholder="机构名称" | |||||
> | |||||
<template #input> | |||||
<div class="serviceName"> | |||||
<span :class="{'active':serviceForm.auditStatus == '3'}">{{serviceForm.auditStatus == '1'?'待审核':serviceForm.auditStatus == '3'?'已通过':serviceForm.auditStatus == '2'?'驳回':''}}</span> | |||||
<p>{{serviceForm.financialName}}</p> | |||||
</div> | |||||
</template> | |||||
</van-field> | |||||
<van-field | <van-field | ||||
value="张菲菲" | |||||
readonly | |||||
:value="serviceForm.linker" | |||||
label="姓名" | label="姓名" | ||||
left-icon="../../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" | left-icon="../../../../static/images/agriculturalTrusteeship/login/login_icon_name.png" | ||||
input-align="right" | input-align="right" | ||||
:border="false" | :border="false" | ||||
placeholder="显示图标" | |||||
placeholder="姓名" | |||||
/> | /> | ||||
<van-field | <van-field | ||||
value="19855460315" | |||||
readonly | |||||
:value="serviceForm.phone" | |||||
label="联系方式" | label="联系方式" | ||||
left-icon="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_phone.png" | left-icon="../../../../static/images/agriculturalTrusteeship/insurance/shop_icon_phone.png" | ||||
input-align="right" | input-align="right" | ||||
:border="false" | :border="false" | ||||
placeholder="显示图标" | |||||
placeholder="联系方式" | |||||
/> | /> | ||||
</div> | </div> | ||||
@@ -66,7 +76,8 @@ | |||||
> | > | ||||
<!-- @load="onLoad"--> | <!-- @load="onLoad"--> | ||||
<div class="main_content_right_list" v-for="(item,index) in productListYes" :key="index"> | <div class="main_content_right_list" v-for="(item,index) in productListYes" :key="index"> | ||||
<img src="../../../../static/images/agriculturalTrusteeship/index/test.png" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})"> | |||||
<img v-if="item.mainImg" :src="item.mainImg" style="width: 25vw;height: 25vw;" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})"> | |||||
<img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;"> | |||||
<div class="main_content_right_list_content"> | <div class="main_content_right_list_content"> | ||||
<p class="tt" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})">{{item.productName}}</p> | <p class="tt" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})">{{item.productName}}</p> | ||||
<div class="tab"> | <div class="tab"> | ||||
@@ -91,7 +102,8 @@ | |||||
> | > | ||||
<!-- @load="onLoad"--> | <!-- @load="onLoad"--> | ||||
<div class="main_content_right_list" v-for="(item,index) in productListNo" :key="index"> | <div class="main_content_right_list" v-for="(item,index) in productListNo" :key="index"> | ||||
<img src="../../../../static/images/agriculturalTrusteeship/index/test.png" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})"> | |||||
<img v-if="item.mainImg" :src="item.mainImg" style="width: 25vw;height: 25vw;" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})"> | |||||
<img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 25vw;height: 25vw;"> | |||||
<div class="main_content_right_list_content"> | <div class="main_content_right_list_content"> | ||||
<p class="tt" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})">{{item.productName}}</p> | <p class="tt" @click="$router.push({name:'agriculturalTrusteeshipShopDetail',query:{id:item.id}})">{{item.productName}}</p> | ||||
<div class="tab"> | <div class="tab"> | ||||
@@ -114,7 +126,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||
import {productList , productOut , productIn} from "@/api/agriculturalTrusteeship"; | |||||
import {productList , productOut , productIn , serviceGet} from "@/api/agriculturalTrusteeship"; | |||||
export default { | export default { | ||||
name: "agriculturalTrusteeshipShopList", | name: "agriculturalTrusteeshipShopList", | ||||
data() { | data() { | ||||
@@ -130,16 +142,26 @@ | |||||
financialServiceId:Cookies.get('ACCESS-SESSION-ID'), | financialServiceId:Cookies.get('ACCESS-SESSION-ID'), | ||||
pageNum:1, | pageNum:1, | ||||
pageSize:'10' | pageSize:'10' | ||||
} | |||||
}, | |||||
serviceForm:{} | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.getDetail(); | |||||
}, | }, | ||||
methods: { | methods: { | ||||
getDetail(){ | |||||
serviceGet(Cookies.get('ACCESS-SESSION-ID')).then(response => { | |||||
this.serviceForm = response.data; | |||||
}); | |||||
}, | |||||
getList(){ | getList(){ | ||||
productList(this.query).then(response => { | productList(this.query).then(response => { | ||||
response.rows.map(res=>{ | response.rows.map(res=>{ | ||||
if (res.mainImg){ | |||||
let supplyMasterMap = res.mainImg.split( "," ) | |||||
res.mainImg = '/api'+supplyMasterMap[0] | |||||
} | |||||
if(res.sysYesNo == 'Y'){ | if(res.sysYesNo == 'Y'){ | ||||
this.productListYes.push(res); | this.productListYes.push(res); | ||||
} | } | ||||
@@ -203,6 +225,22 @@ | |||||
} | } | ||||
} | } | ||||
.serviceName{ | |||||
display: flex; | |||||
align-items: center; | |||||
span{ | |||||
background: #E8E8E8; | |||||
padding: 0 8PX; | |||||
border-radius: 5PX; | |||||
color: #7A7A7A; | |||||
margin-right: 5PX; | |||||
} | |||||
.active{ | |||||
background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4); | |||||
color: #ffffff; | |||||
} | |||||
} | |||||
.nav{ | .nav{ | ||||
background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4); | background-image: linear-gradient(to right , #6E93F3 , #7E89E9 , #54C6E4); | ||||
padding-bottom: 15PX; | padding-bottom: 15PX; | ||||
@@ -320,6 +358,7 @@ | |||||
display: flex; | display: flex; | ||||
flex-direction:column; | flex-direction:column; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
flex: 1; | |||||
.tt{ | .tt{ | ||||
color: #333333; | color: #333333; | ||||
font-size: .35rem; | font-size: .35rem; | ||||