From 1a6a8066a6f232d26e90c15e6900677b41f346eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com>
Date: Wed, 14 Dec 2022 17:29:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=89=98=E7=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/agriculturalTrusteeship/index.js | 53 +++++-
src/permission.js | 1 +
src/router/index.js | 9 +
src/utils/request.js | 1 -
src/views/agriculturalTrusteeship/login.vue | 165 ++++++++++++++++--
.../shop/serviceEdit.vue | 151 ++++++++++++++++
.../agriculturalTrusteeship/shop/shopAdd.vue | 4 +-
.../agriculturalTrusteeship/shop/shopEdit.vue | 40 ++++-
.../agriculturalTrusteeship/shop/shopList.vue | 65 +++++--
9 files changed, 457 insertions(+), 32 deletions(-)
create mode 100644 src/views/agriculturalTrusteeship/shop/serviceEdit.vue
diff --git a/src/api/agriculturalTrusteeship/index.js b/src/api/agriculturalTrusteeship/index.js
index 88ad8d80..f86344b7 100644
--- a/src/api/agriculturalTrusteeship/index.js
+++ b/src/api/agriculturalTrusteeship/index.js
@@ -1,4 +1,5 @@
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) {
return request({
url: '/depositm/financialProduct/list',
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
method: 'get',
params: query
})
@@ -50,6 +74,9 @@ export function productList(query) {
export function productGet(id) {
return request({
url: '/depositm/financialProduct/get/'+id,
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
method: 'get',
})
}
@@ -59,7 +86,10 @@ export function commonUpload(data) {
return request({
url: '/depositm/common/upload',
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
})
}
@@ -68,6 +98,9 @@ export function commonUpload(data) {
export function financialProductEdit(data) {
return request({
url: '/depositm/financialProduct/edit',
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
method: 'post',
data: data
})
@@ -77,6 +110,9 @@ export function financialProductEdit(data) {
export function financialProductAdd(data) {
return request({
url: '/depositm/financialProduct/add',
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
method: 'post',
data: data
})
@@ -86,6 +122,9 @@ export function financialProductAdd(data) {
export function productIn(id) {
return request({
url: '/depositm/financialProduct/productIn/'+id,
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
method: 'post',
})
}
@@ -94,6 +133,9 @@ export function productIn(id) {
export function productOut(id) {
return request({
url: '/depositm/financialProduct/productOut/'+id,
+ headers: {
+ "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
+ },
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) {
return request({
diff --git a/src/permission.js b/src/permission.js
index a1bd64ed..16218d55 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -151,6 +151,7 @@ const whiteList = [
'/agriculturalTrusteeship/shopDetail',//保险列表详情
'/agriculturalTrusteeship/shopEdit',//保险列表详情
'/agriculturalTrusteeship/shopAdd',//保险列表首页
+ '/agriculturalTrusteeship/serviceEdit',//保险列表首页
'/agriculturalTrusteeship/socializationIndex',//社会化服务组织待处理
'/agriculturalTrusteeship/socializationProject',//社会化服务组织产品
'/agriculturalTrusteeship/socializationProjectDetail',//社会化服务组织产品详情
diff --git a/src/router/index.js b/src/router/index.js
index 765f803d..2bf7f509 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -4681,6 +4681,15 @@ export const constantRoutes = [
},
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',
name: 'agriculturalTrusteeshipShopDetail',
diff --git a/src/utils/request.js b/src/utils/request.js
index 4bd46490..593730ee 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -21,7 +21,6 @@ service.interceptors.request.use(config => {
forbidClick: true,
duration: 0
});
- axios.defaults.headers['ACCESS-SESSION-ID'] = Cookies.get('ACCESS-SESSION-ID')
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
if (getToken() && !isToken) {
diff --git a/src/views/agriculturalTrusteeship/login.vue b/src/views/agriculturalTrusteeship/login.vue
index c8492bad..68350769 100644
--- a/src/views/agriculturalTrusteeship/login.vue
+++ b/src/views/agriculturalTrusteeship/login.vue
@@ -36,21 +36,21 @@
-
+
-
+
-
+
农担机构登录
登录可发布农担产品
@@ -97,8 +97,8 @@
-
-
+
+
@@ -158,7 +158,97 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
提交审核
@@ -173,7 +263,7 @@
import Cookies from "js-cookie";
import {getCodeImg, getRegisterSmsCode, registerCheck, registerOn} from "@/api/login";
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 {
name: "agriculturalTrusteeshipLogin",
data() {
@@ -206,13 +296,29 @@
navDis:'block',
loginDis:'none',
loginType:'',
- serviceForm:{}//保险公司注册表单
+ serviceForm:{
+ mainImg:''
+ },//保险公司注册表单
+ entityForm:{},//服务组织注册表单
+ mainImgArr:[],
+ mainImgArrEntity:[],
+ mainImgUploader:[],
+ financialType:'',
+ statisticsTypeIdOptions : [],
+ showStatisticsTypeId : false,
+ statisticsTypeId:''
};
},
created() {
this.getDicts("financial_type").then(response => {
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.getCookie();
},
@@ -225,6 +331,7 @@
this.formData.username = encrypt(this.username);
this.formData.password = encrypt(this.password);
+ this.formData.financialType = '2';
serviceLogin(this.formData).then(response => {
Cookies.set("ACCESS-SESSION-ID", response.data.id);
Cookies.set("ServiceInformation", response.data);
@@ -479,13 +586,45 @@
deleteFileEvidenceForm(file,detail) {
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结束处
},
diff --git a/src/views/agriculturalTrusteeship/shop/serviceEdit.vue b/src/views/agriculturalTrusteeship/shop/serviceEdit.vue
new file mode 100644
index 00000000..ec6ecb06
--- /dev/null
+++ b/src/views/agriculturalTrusteeship/shop/serviceEdit.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/agriculturalTrusteeship/shop/shopAdd.vue b/src/views/agriculturalTrusteeship/shop/shopAdd.vue
index 9b8f34e9..794c3c61 100644
--- a/src/views/agriculturalTrusteeship/shop/shopAdd.vue
+++ b/src/views/agriculturalTrusteeship/shop/shopAdd.vue
@@ -73,7 +73,7 @@
};
},
created() {
- this.getDicts("financial_type").then(response => {
+ 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});
}
@@ -106,7 +106,7 @@
this.product.mainImgList.splice(detail.index,1);
},
onConfirmProductType(data){
- this.product.productType = data.text;
+ this.product.productType = data.value;
this.productType = data.text;
this.showProductType = false;
}
diff --git a/src/views/agriculturalTrusteeship/shop/shopEdit.vue b/src/views/agriculturalTrusteeship/shop/shopEdit.vue
index 6540da40..2a7ebc0e 100644
--- a/src/views/agriculturalTrusteeship/shop/shopEdit.vue
+++ b/src/views/agriculturalTrusteeship/shop/shopEdit.vue
@@ -14,7 +14,27 @@
-
+
+
+
+
@@ -43,15 +63,26 @@
zoom: 15, //地图展示级别
showDialog:false,
product:{},
- mainImgArr:[]
+ mainImgArr:[],
+ productTypeOptions:[],
+ productTypeOptions2:[],
+ productType:'',
+ showProductType:false
};
},
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();
},
methods: {
getDetail(){
productGet(this.$route.query.id).then(response => {
+ this.productType = response.data.productType;
if (response.data.mainImg){
response.data.mainImgList = [];
var attachement = response.data.mainImg.split( "," );
@@ -92,6 +123,11 @@
}
})
},
+ onConfirmProductType(data){
+ this.product.productType = data.value;
+ this.productType = data.text;
+ this.showProductType = false;
+ }
},
}
diff --git a/src/views/agriculturalTrusteeship/shop/shopList.vue b/src/views/agriculturalTrusteeship/shop/shopList.vue
index ce7c8f42..828e3d67 100644
--- a/src/views/agriculturalTrusteeship/shop/shopList.vue
+++ b/src/views/agriculturalTrusteeship/shop/shopList.vue
@@ -17,35 +17,45 @@
公司信息
-
+
+ placeholder="机构名称"
+ >
+
+
+
{{serviceForm.auditStatus == '1'?'待审核':serviceForm.auditStatus == '3'?'已通过':serviceForm.auditStatus == '2'?'驳回':''}}
+
{{serviceForm.financialName}}
+
+
+
@@ -66,7 +76,8 @@
>
-

+
![]()
+
{{item.productName}}
@@ -91,7 +102,8 @@
>
-

+
![]()
+
{{item.productName}}
@@ -114,7 +126,7 @@