Quellcode durchsuchen

大托管

wulanhaote
庞东旭 vor 2 Jahren
Ursprung
Commit
bc2401c86b
9 geänderte Dateien mit 593 neuen und 86 gelöschten Zeilen
  1. +72
    -4
      src/api/agriculturalTrusteeship/index.js
  2. +25
    -1
      src/components/agriculturalTrusteeship/dialog.vue
  3. +34
    -18
      src/views/agriculturalTrusteeship/buyer/placeOrder.vue
  4. +6
    -4
      src/views/agriculturalTrusteeship/buyer/waitBill.vue
  5. +157
    -10
      src/views/agriculturalTrusteeship/login.vue
  6. +35
    -5
      src/views/agriculturalTrusteeship/socialization/draft.vue
  7. +120
    -24
      src/views/agriculturalTrusteeship/socialization/project.vue
  8. +1
    -0
      src/views/agriculturalTrusteeship/socialization/projectEdit.vue
  9. +143
    -20
      src/views/agriculturalTrusteeship/socialization/release.vue

+ 72
- 4
src/api/agriculturalTrusteeship/index.js Datei anzeigen

@@ -2,6 +2,14 @@ import request from '@/utils/request'
import Cookies from "js-cookie"; import Cookies from "js-cookie";




// 查询部门下拉树结构
export function treeselect() {
return request({
url: '/depositm/dept/treeselect',
method: 'get'
})
}

// 保险公司登录 // 保险公司登录
export function serviceLogin(data) { export function serviceLogin(data) {
return request({ return request({
@@ -33,6 +41,9 @@ export function entityLogin(data) {
export function serviceList(query) { export function serviceList(query) {
return request({ return request({
url: '/depositm/financialService/list', url: '/depositm/financialService/list',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -42,6 +53,9 @@ export function serviceList(query) {
export function serviceGet(id) { export function serviceGet(id) {
return request({ return request({
url: '/depositm/financialService/get/'+id, url: '/depositm/financialService/get/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
}) })
} }
@@ -144,17 +158,20 @@ export function productOut(id) {
export function detailList(query) { export function detailList(query) {
return request({ return request({
url: '/depositm/entity/list', url: '/depositm/entity/list',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
} }


//服务组织注册 //服务组织注册
export function entityRegister(query) {
export function entityRegister(data) {
return request({ return request({
url: '/depositm/entity/register', url: '/depositm/entity/register',
method: 'get',
params: query
method: 'post',
data: data
}) })
} }


@@ -162,6 +179,9 @@ export function entityRegister(query) {
export function supplyDemandList(query) { export function supplyDemandList(query) {
return request({ return request({
url: '/depositm/supplyDemand/list', url: '/depositm/supplyDemand/list',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -171,6 +191,9 @@ export function supplyDemandList(query) {
export function productTypes(query) { export function productTypes(query) {
return request({ return request({
url: '/depositm/supplyDemand/productTypes', url: '/depositm/supplyDemand/productTypes',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -180,6 +203,9 @@ export function productTypes(query) {
export function supplyDemandGet(id) { export function supplyDemandGet(id) {
return request({ return request({
url: '/depositm/supplyDemand/get/'+id, url: '/depositm/supplyDemand/get/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
}) })
} }
@@ -188,6 +214,9 @@ export function supplyDemandGet(id) {
export function supplyDemandEdit(data) { export function supplyDemandEdit(data) {
return request({ return request({
url: '/depositm/supplyDemand/edit', url: '/depositm/supplyDemand/edit',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
data: data data: data
}) })
@@ -197,6 +226,9 @@ export function supplyDemandEdit(data) {
export function supplyComment(data) { export function supplyComment(data) {
return request({ return request({
url: '/deposit/supplyorder/comment', url: '/deposit/supplyorder/comment',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
data: data data: data
}) })
@@ -206,6 +238,9 @@ export function supplyComment(data) {
export function supplyDemandProductOut(id) { export function supplyDemandProductOut(id) {
return request({ return request({
url: '/depositm/supplyDemand/productOut/'+id, url: '/depositm/supplyDemand/productOut/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
}) })
} }
@@ -214,7 +249,22 @@ export function supplyDemandProductOut(id) {
export function supplyDemandProductIn(id) { export function supplyDemandProductIn(id) {
return request({ return request({
url: '/depositm/supplyDemand/productIn/'+id, url: '/depositm/supplyDemand/productIn/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post',
})
}

// 服务项目新增
export function supplyDemandAdd(data) {
return request({
url: '/depositm/supplyDemand/add',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
data:data
}) })
} }


@@ -223,6 +273,9 @@ export function supplyDemandProductIn(id) {
export function supplyorderReject(id) { export function supplyorderReject(id) {
return request({ return request({
url: '/depositm/supplyorder/reject/'+id, url: '/depositm/supplyorder/reject/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
}) })
} }
@@ -231,6 +284,9 @@ export function supplyorderReject(id) {
export function supplyorderList(query) { export function supplyorderList(query) {
return request({ return request({
url: '/depositm/supplyorder/list', url: '/depositm/supplyorder/list',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -240,6 +296,9 @@ export function supplyorderList(query) {
export function orderStatistics(query) { export function orderStatistics(query) {
return request({ return request({
url: '/depositm/entity/orderStatistics', url: '/depositm/entity/orderStatistics',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -249,6 +308,9 @@ export function orderStatistics(query) {
export function supplyorderGet(id) { export function supplyorderGet(id) {
return request({ return request({
url: '/depositm/supplyorder/get/'+id, url: '/depositm/supplyorder/get/'+id,
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
}) })
} }
@@ -257,6 +319,9 @@ export function supplyorderGet(id) {
export function fwhtList(query) { export function fwhtList(query) {
return request({ return request({
url: '/geo/fwht/list', url: '/geo/fwht/list',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'get', method: 'get',
params: query params: query
}) })
@@ -265,7 +330,10 @@ export function fwhtList(query) {
//下单 //下单
export function placeOrder(data) { export function placeOrder(data) {
return request({ return request({
url: '/deposit/supplyorder/placeOrder',
url: '/entity/supplyorder/placeOrder',
headers: {
"ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID')
},
method: 'post', method: 'post',
data: data data: data
}) })


+ 25
- 1
src/components/agriculturalTrusteeship/dialog.vue Datei anzeigen

@@ -21,7 +21,7 @@
<img src="../../../static/images/agriculturalTrusteeship/socialization/dialog_02.png" style="margin-right: 15PX" /> <img src="../../../static/images/agriculturalTrusteeship/socialization/dialog_02.png" style="margin-right: 15PX" />
</template> </template>
<template #default> <template #default>
<p style="background: #FBE6D9;color: #FF5D00;display: inline-block;padding: 0 5PX;border-radius: 5PX;">12</p>
<p style="background: #FBE6D9;color: #FF5D00;display: inline-block;padding: 0 5PX;border-radius: 5PX;">{{supplyDemandListYes1.length}}</p>
</template> </template>
</van-cell> </van-cell>
</div> </div>
@@ -30,9 +30,33 @@
</div> </div>
</template> </template>
<script> <script>
import {supplyDemandList} from "@/api/agriculturalTrusteeship";
import Cookies from "js-cookie";

export default { export default {
name: "toolbar", name: "toolbar",
data() {
return {
supplyDemandListYes1:[],
query:{
entityId:Cookies.get('ACCESS-SESSION-ID'),
productType:''
},
};
},
created() {
this.getList()
},
methods:{ methods:{
getList(){
supplyDemandList(this.query).then(response => {
response.rows.map(res=>{
if(res.publishStatus == 2){
this.supplyDemandListYes1.push(res);
}
})
});
},
openDialog(){ openDialog(){
this.$parent.openDialog(false) this.$parent.openDialog(false)
} }


+ 34
- 18
src/views/agriculturalTrusteeship/buyer/placeOrder.vue Datei anzeigen

@@ -16,12 +16,12 @@
<div class="main_content_right_list"> <div class="main_content_right_list">
<div class="main_content_right_list_header"> <div class="main_content_right_list_header">
<p class="on">商品信息</p> <p class="on">商品信息</p>
<p>{{supplyDemand.productType}}</p>
<p>{{productType}}</p>
<p>服务</p> <p>服务</p>
</div> </div>


<div class="main_content_right_list_center"> <div class="main_content_right_list_center">
<img :src="supplyDemand.supplyMasterMapList[0]" style="width: 25vw;height: 25vw;">
<img :src="supplyDemand.supplyMasterMap" style="width: 25vw;height: 25vw;">
<div class="main_content_right_list_content"> <div class="main_content_right_list_content">
<p class="tt">{{supplyDemand.supplyDemandName}}</p> <p class="tt">{{supplyDemand.supplyDemandName}}</p>
<div class="tab"> <div class="tab">
@@ -55,7 +55,7 @@
required required
:border="false" :border="false"
:rules="[{ required: true , message:'请选择服务合同'}]" :rules="[{ required: true , message:'请选择服务合同'}]"
v-model="fwht"
v-model="contractionName"
label="服务合同" label="服务合同"
placeholder="请选择服务合同" placeholder="请选择服务合同"
@click="showfwht = true" @click="showfwht = true"
@@ -67,12 +67,13 @@
<van-picker <van-picker
show-toolbar show-toolbar
:columns="fwhtOptions" :columns="fwhtOptions"
value-key="contractionName"
@confirm="onConfirmFwht" @confirm="onConfirmFwht"
@cancel="showfwht = false" @cancel="showfwht = false"
/> />
</van-popup> </van-popup>
<!-- <van-field label="服务合同" v-model="supplyDemand.fwhtId" :border="false" input-align="right" placeholder="请输入服务合同" />--> <!-- <van-field label="服务合同" v-model="supplyDemand.fwhtId" :border="false" input-align="right" placeholder="请输入服务合同" />-->
<van-field readonly label="服务作物" v-model="supplyDemand.cropType" :border="false" input-align="right" placeholder="服务作物" />
<van-field readonly label="服务作物" v-model="cropType" :border="false" input-align="right" placeholder="服务作物" />


<!-- <van-field label="下单时间" v-model="supplyDemand.orderAt" :border="false" input-align="right" placeholder="请输入下单时间" />--> <!-- <van-field label="下单时间" v-model="supplyDemand.orderAt" :border="false" input-align="right" placeholder="请输入下单时间" />-->


@@ -128,6 +129,7 @@
</template> </template>
</van-field> </van-field>


<van-field label="数量单位" v-model="supplyDemand.numUnit" :border="false" input-align="right" placeholder="请输入数量单位" />
<van-field label="备注" v-model="supplyDemand.serviceRemark" :border="false" input-align="right" placeholder="请输入备注" /> <van-field label="备注" v-model="supplyDemand.serviceRemark" :border="false" input-align="right" placeholder="请输入备注" />
</div> </div>


@@ -135,7 +137,7 @@


<div class="main_btn"> <div class="main_btn">
<p @click="placeOrder">下单</p> <p @click="placeOrder">下单</p>
<p>取消</p>
<p @click="onClickLeft">取消</p>
</div> </div>
<!-- 内容结束 --> <!-- 内容结束 -->
</div> </div>
@@ -161,7 +163,8 @@
serviceAt:new Date(), serviceAt:new Date(),
showServiceAt: false, showServiceAt: false,
activeNames:[], activeNames:[],
supplyDemand:{},
supplyDemand:{
},
projectTypeOptions:[], projectTypeOptions:[],
productList:[], productList:[],
productList1:[], productList1:[],
@@ -171,15 +174,18 @@
bodyTypeOptions:[], bodyTypeOptions:[],
fwhtOptions:[], fwhtOptions:[],
user:{}, user:{},
fwht:''
fwht:'',
contractionName:'',
productType:'',
cropType:''
}; };
}, },
created() { created() {
fwhtList({deptId: this.$store.state.user.loginDeptId, contractionStatus: '1'}).then(response => {
this.fwhtOptions = response.rows;
});
getInfo().then(response => { getInfo().then(response => {
this.user = response.user; this.user = response.user;
fwhtList({deptId: response.user.loginDeptId,bookId:'0', contractionStatus: '1'}).then(response => {
this.fwhtOptions = response.rows;
});
}); });
let query = { let query = {
parentId : '' parentId : ''
@@ -199,26 +205,30 @@
} }
this.bodyTypeOptions = response.data; this.bodyTypeOptions = response.data;
}); });
this.getDicts("crop_type").then(response => {
this.cropTypeOptions = response.data;
});
this.getDetail(); this.getDetail();
}, },
methods: { methods: {
getDetail(){ getDetail(){
supplyDemandGet(this.$route.query.id).then(response => { supplyDemandGet(this.$route.query.id).then(response => {
response.data.bodyType = this.selectDictLabel(this.bodyTypeOptions, response.data.bodyType); response.data.bodyType = this.selectDictLabel(this.bodyTypeOptions, response.data.bodyType);
response.data.productType = this.productList1.filter(function (e) { return e.id == response.data.productType; })[0].dictName;
this.productType = this.productList1.filter(function (e) { return e.id == response.data.productType; })[0].dictName;
if (response.data.supplyMasterMap){ if (response.data.supplyMasterMap){
response.data.supplyMasterMapList = [];
var attachement = response.data.supplyMasterMap.split( "," ); var attachement = response.data.supplyMasterMap.split( "," );
this.supplyMasterMapArr = response.data.supplyMasterMap.split( "," );
attachement.forEach(responseAttach=>{
response.data.supplyMasterMapList.push('/api' + responseAttach);
})
response.data.supplyMasterMap = '/api' + attachement[0];
} }
response.data.serviceNum = 1;
this.supplyDemand = response.data; this.supplyDemand = response.data;
}); });
}, },
onConfirmFwht(){

onConfirmFwht(val){
this.contractionName = val.contractionName;
this.supplyDemand.fwhtId = val.id;
this.cropType = this.selectDictLabel(this.cropTypeOptions, val.cropType);
this.supplyDemand.cropType = val.cropType;
this.showfwht = false;
}, },
onConfirmOrderAt(data){ onConfirmOrderAt(data){
this.supplyDemand.orderAt = this.format(data,'yyyy-MM-dd'); this.supplyDemand.orderAt = this.format(data,'yyyy-MM-dd');
@@ -232,6 +242,12 @@
this.showServiceAt = false; this.showServiceAt = false;
}, },
placeOrder(){ placeOrder(){
console.log(this.supplyDemand)
this.supplyDemand.demandId = this.$route.query.id;
this.supplyDemand.id = '';
this.supplyDemand.linkera = this.user.nickName
this.supplyDemand.phonea = this.user.phonenumber
this.supplyDemand.serviceAddress = this.user.deptName
placeOrder(this.supplyDemand).then(response => { placeOrder(this.supplyDemand).then(response => {
if(response.code=="200"){ if(response.code=="200"){
this.$notify({ type: 'success', message: '发布成功' }); this.$notify({ type: 'success', message: '发布成功' });


+ 6
- 4
src/views/agriculturalTrusteeship/buyer/waitBill.vue Datei anzeigen

@@ -29,7 +29,7 @@
<div class="main_content_right_list_content"> <div class="main_content_right_list_content">
<p class="tt">{{item.contractionName}}</p> <p class="tt">{{item.contractionName}}</p>
<div class="tab"> <div class="tab">
<p>¥<span>{{item.realityServiceMoney}}</span>.00</p>
<p>¥<span>{{item.unitPrice}}</span>.00/{{item.unit}}</p>
</div> </div>
<p class="name"> <p class="name">
<span>数量:{{item.serviceNum}}</span> <span>数量:{{item.serviceNum}}</span>
@@ -37,7 +37,7 @@
</p> </p>
</div> </div>
</div> </div>
<van-cell title="方名称" :border="false" :value="item.bookName" />
<van-cell title="方名称" :border="false" :value="item.bookName" />
<van-cell title="联系人" :border="false" :value="item.linkera" /> <van-cell title="联系人" :border="false" :value="item.linkera" />
<van-cell title="联系电话" :border="false" :value="item.phonea" /> <van-cell title="联系电话" :border="false" :value="item.phonea" />
</div> </div>
@@ -52,7 +52,8 @@
<script> <script>
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import buyer from "@/components/common/buyer_footer"; import buyer from "@/components/common/buyer_footer";
import {productTypes, supplyorderList} from "@/api/agriculturalTrusteeship";
import {fwhtList, productTypes, supplyorderList} from "@/api/agriculturalTrusteeship";
import {getInfo} from "@/api/login";


export default { export default {
name: "agriculturalTrusteeshipIndex", name: "agriculturalTrusteeshipIndex",
@@ -80,6 +81,7 @@
startOrderAt :'', startOrderAt :'',
endOrderAt :'', endOrderAt :'',
orderStatus :'', orderStatus :'',
createBy:''
}, },
startOrderAt:this.format(new Date(),'yyyy年MM月'), startOrderAt:this.format(new Date(),'yyyy年MM月'),
endOrderAt:this.format(new Date(),'yyyy年MM月'), endOrderAt:this.format(new Date(),'yyyy年MM月'),
@@ -112,7 +114,7 @@
if ( res.orderStatus == '1'){ if ( res.orderStatus == '1'){
res.cropType = this.selectDictLabel(this.cropTypeOptions, res.cropType); res.cropType = this.selectDictLabel(this.cropTypeOptions, res.cropType);
res.orderStatus = this.selectDictLabel(this.orderStatusOptions, res.orderStatus); res.orderStatus = this.selectDictLabel(this.orderStatusOptions, res.orderStatus);
res.productType = this.productList.filter(function (e) { return e.id == res.productType; })[0].dictName;
// res.productType = this.productList.filter(function (e) { return e.id == res.productType; })[0].dictName;
this.supplyDemandList.push(res); this.supplyDemandList.push(res);
} }
this.supplyDemandList1.push(res); this.supplyDemandList1.push(res);


+ 157
- 10
src/views/agriculturalTrusteeship/login.vue Datei anzeigen

@@ -3,7 +3,10 @@
<!-- 头部开始 --> <!-- 头部开始 -->
<div class="header"> <div class="header">
<!-- @click="onClickLeft"--> <!-- @click="onClickLeft"-->
<div class="header_left" @click="navDis = 'block',loginDis = 'none'">
<div class="header_left" v-if="navDis == 'none'" @click="navDis = 'block',loginDis = 'none'">
<img src="../../../static/images/agriculturalTrusteeship/return.png">
</div>
<div class="header_left" v-if="navDis == 'block'" @click="$router.push({ path: '/agriculturalTrusteeship/index' })">
<img src="../../../static/images/agriculturalTrusteeship/return.png"> <img src="../../../static/images/agriculturalTrusteeship/return.png">
</div> </div>
<div class="tit"> <div class="tit">
@@ -193,17 +196,83 @@
/> />
</van-popup> </van-popup>


<van-field v-model="entityForm.industryClassificationType" center :border="false" placeholder="请选择生产种类" >
<van-field
readonly
clickable
required
:rules="[{ required: true , message:'请选择生产种类'}]"
v-model="industryClassificationType"
center
@click="showIndustryClassificationType = true"
:border="false"
right-icon="arrow-down"
placeholder="请选择生产种类"
>
<template #left-icon> <template #left-icon>
<img src="../../../static/images/agriculturalTrusteeship/login/register_03.png" alt=""> <img src="../../../static/images/agriculturalTrusteeship/login/register_03.png" alt="">
</template> </template>
</van-field> </van-field>
<van-popup v-model="showIndustryClassificationType" position="bottom" get-container="body">
<van-picker
show-toolbar
:columns="industryClassificationTypeOptions"
@confirm="onConfirmIndustryClassificationType"
@cancel="showIndustryClassificationType = false"
/>
</van-popup>


<van-field v-model="entityForm.modelSocietyType" center :border="false" placeholder="请选择示范类型">
<van-field
readonly
clickable
required
:rules="[{ required: true , message:'请选择示范类型'}]"
v-model="modelSocietyType"
center
@click="showModelSocietyType = true"
:border="false"
right-icon="arrow-down"
placeholder="请选择示范类型"
>
<template #left-icon> <template #left-icon>
<img src="../../../static/images/agriculturalTrusteeship/login/register_04.png" alt=""> <img src="../../../static/images/agriculturalTrusteeship/login/register_04.png" alt="">
</template> </template>
</van-field> </van-field>
<van-popup v-model="showModelSocietyType" position="bottom" get-container="body">
<van-picker
show-toolbar
:columns="modelSocietyTypeOptions"
@confirm="onConfirmModelSocietyType"
@cancel="showModelSocietyType = false"
/>
</van-popup>

<van-field
readonly
clickable
required
:rules="[{ required: true , message:'请选择案件属地' }]"
v-model="deptName"
placeholder="请选择主体属地"
@click="showDeptId = true"
right-icon="arrow-down"
:border="false"
label-width="auto"
>
<template #left-icon>
<img src="../../../static/images/agriculturalTrusteeship/login/register_02.png" alt="">
</template>
</van-field>
<van-popup v-model="showDeptId" position="bottom" get-container="body">
<van-cascader
v-model="villageValue"
title="请选择主体属地"
:options="deptOptions"
@close="showDeptId = false"
@finish="onConfirmDept"
active-color="#1989fa"
:field-names="hcAreaInfoFieldName"
/>
</van-popup>


<van-field v-model="entityForm.entityAddress" center :border="false" placeholder="请输入主体地址" > <van-field v-model="entityForm.entityAddress" center :border="false" placeholder="请输入主体地址" >
<template #left-icon> <template #left-icon>
@@ -211,11 +280,32 @@
</template> </template>
</van-field> </van-field>


<van-field v-model="entityForm.registerTime" center :border="false" placeholder="请选择成立时间" >
<van-field
readonly
clickable
required
:rules="[{ required: true , message:'请选择成立时间'}]"
v-model="entityForm.registerTime"
center
@click="showRegisterTime = true"
:border="false"
right-icon="arrow-down"
placeholder="请选择成立时间"
>
<template #left-icon> <template #left-icon>
<img src="../../../static/images/agriculturalTrusteeship/login/register_05.png" alt=""> <img src="../../../static/images/agriculturalTrusteeship/login/register_05.png" alt="">
</template> </template>
</van-field> </van-field>
<van-popup v-model="showRegisterTime" position="bottom" get-container="body">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
show-toolbar
@confirm="onConfirmRegisterTime"
@cancel="showRegisterTime = false"
/>
</van-popup>


<van-field v-model="entityForm.principalName" center :border="false" placeholder="请输入负责人姓名"> <van-field v-model="entityForm.principalName" center :border="false" placeholder="请输入负责人姓名">
<template #left-icon> <template #left-icon>
@@ -229,7 +319,7 @@
</template> </template>
</van-field> </van-field>


<van-field v-model="entityForm.username" center :border="false" placeholder="请输入账号">
<van-field v-model="entityForm.userName" center :border="false" placeholder="请输入账号">
<template #left-icon> <template #left-icon>
<img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt=""> <img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt="">
</template> </template>
@@ -248,7 +338,7 @@
</van-field> </van-field>


<div style="height: 20PX"></div> <div style="height: 20PX"></div>
<van-uploader v-model="mainImgUploader" :after-read="afterReadEvidenceEntityForm" :before-delete="deleteFileEvidenceEntityForm" />
<van-uploader v-model="mainImgUploader2" :after-read="afterReadEvidenceEntityForm" :before-delete="deleteFileEvidenceEntityForm" />


</template> </template>
<p class="submit_btn" @click="goRegister">提交审核</p> <p class="submit_btn" @click="goRegister">提交审核</p>
@@ -263,7 +353,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 , entityRegister} from "@/api/agriculturalTrusteeship";
import {serviceLogin, entityLogin, commonUpload , serviceRegister , entityRegister , treeselect} from "@/api/agriculturalTrusteeship";
export default { export default {
name: "agriculturalTrusteeshipLogin", name: "agriculturalTrusteeshipLogin",
data() { data() {
@@ -303,10 +393,28 @@
mainImgArr:[], mainImgArr:[],
mainImgArrEntity:[], mainImgArrEntity:[],
mainImgUploader:[], mainImgUploader:[],
mainImgUploader2:[],
financialType:'', financialType:'',
statisticsTypeIdOptions : [], statisticsTypeIdOptions : [],
showStatisticsTypeId : false, showStatisticsTypeId : false,
statisticsTypeId:''
statisticsTypeId:'',
industryClassificationType:'',
showIndustryClassificationType: false,
industryClassificationTypeOptions: [],
modelSocietyType:'',
showModelSocietyType: false,
modelSocietyTypeOptions: [],
showRegisterTime :false,
currentDate:new Date(),
deptOptions:[],
deptName:'',
showDeptId:false,
villageValue : '',
hcAreaInfoFieldName: {
text: "label",
value: "value",
children: "children",
},
}; };
}, },
created() { created() {
@@ -318,6 +426,22 @@
this.statisticsTypeIdOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); this.statisticsTypeIdOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
} }
}); });
this.getDicts("Industrial_classification_type").then(response => {
for (var i = 0; i < response.data.length; i++) {
this.industryClassificationTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
}
});
this.getDicts("model_society_type").then(response => {
for (var i = 0; i < response.data.length; i++) {
this.modelSocietyTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
}
});

treeselect().then(res=>{
if (res.code == 200) {
this.deptOptions = res.data;
}
})


this.getCode(); this.getCode();
this.getCookie(); this.getCookie();
@@ -585,6 +709,7 @@
}, },
deleteFileEvidenceForm(file,detail) { deleteFileEvidenceForm(file,detail) {
this.mainImgArr.splice(detail.index,1); this.mainImgArr.splice(detail.index,1);
this.mainImgUploader.splice(detail.index,1);
}, },
afterReadEvidenceEntityForm(file){ afterReadEvidenceEntityForm(file){
let params1 = new FormData(); let params1 = new FormData();
@@ -599,6 +724,7 @@
}, },
deleteFileEvidenceEntityForm(file,detail) { deleteFileEvidenceEntityForm(file,detail) {
this.mainImgArrEntity.splice(detail.index,1); this.mainImgArrEntity.splice(detail.index,1);
this.mainImgUploader2.splice(detail.index,1);
}, },
goRegister(){ goRegister(){
if (this.loginType == 'bxjg' || this.loginType == 'dkjg' || this.loginType == 'ndjg'){ if (this.loginType == 'bxjg' || this.loginType == 'dkjg' || this.loginType == 'ndjg'){
@@ -612,7 +738,7 @@
}) })
}else if(this.loginType = 'fwzz'){ }else if(this.loginType = 'fwzz'){
this.entityForm.mainImg = this.mainImgArrEntity.join(','); this.entityForm.mainImg = this.mainImgArrEntity.join(',');
this.entityForm.username = encrypt(this.entityForm.username);
this.entityForm.userName = encrypt(this.entityForm.userName);
this.entityForm.password = encrypt(this.entityForm.password); this.entityForm.password = encrypt(this.entityForm.password);
entityRegister(this.entityForm).then(res=>{ entityRegister(this.entityForm).then(res=>{
this.$notify({ type: 'success', message: '注册成功' }); this.$notify({ type: 'success', message: '注册成功' });
@@ -624,7 +750,28 @@
this.entityForm.statisticsTypeId = data.value; this.entityForm.statisticsTypeId = data.value;
this.statisticsTypeId = data.text; this.statisticsTypeId = data.text;
this.showStatisticsTypeId = false; this.showStatisticsTypeId = false;
}
},
onConfirmIndustryClassificationType(data){
this.entityForm.industryClassificationType = data.value;
this.industryClassificationType = data.text;
this.showIndustryClassificationType = false;
},
onConfirmModelSocietyType(data){
this.entityForm.modelSocietyType = data.value;
this.modelSocietyType = data.text;
this.showModelSocietyType = false;
},
onConfirmRegisterTime(data){
this.currentDate = data ;
this.entityForm.registerTime = this.format(data,'yyyy-MM-dd')
this.showRegisterTime = false;
},
//选择案件属地
onConfirmDept({ selectedOptions }){
this.entityForm.deptId = selectedOptions[selectedOptions.length-1].value;
this.deptName = selectedOptions[selectedOptions.length-1].label;
this.showDeptId = false
},


//methods结束处 //methods结束处
}, },


+ 35
- 5
src/views/agriculturalTrusteeship/socialization/draft.vue Datei anzeigen

@@ -17,14 +17,16 @@
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" finished-text="没有更多了"
@load="getList"
> >
<!-- @load="onLoad"--> <!-- @load="onLoad"-->
<div class="main_content_right_list" v-for="item in 10" :key="item" @click="$router.push({name:'agriculturalTrusteeshipSocializationDraftEdit'})">
<div class="main_content_right_list" v-for="(item,index) in supplyDemandListYes" :key="index" @click="$router.push({name:'agriculturalTrusteeshipSocializationProjectEdit',query:{id:item.id}})">
<div class="main_content_right_list_center"> <div class="main_content_right_list_center">
<img src="../../../../static/images/agriculturalTrusteeship/index/test.png" width="80">
<img v-if="item.supplyMasterMap" :src="item.supplyMasterMap" style="width: 18vw;height: 18vw;">
<img v-else src="../../../../static/images/agriculturalTrusteeship/zwtp.png" style="width: 18vw;height: 18vw;">
<div class="main_content_right_list_content"> <div class="main_content_right_list_content">
<p class="tt">如果只有一行就空着啊啊啊啊啊啊啊啊啊啊啊啊</p>
<p class="name">2022.03.15</p>
<p class="tt">{{item.supplyDemandName}}</p>
<p class="name">{{item.createTime.substr(0,10)}}</p>
</div> </div>
</div> </div>
</div> </div>
@@ -38,6 +40,7 @@
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import agr from "@/components/common/agr_footer"; import agr from "@/components/common/agr_footer";
import dialogClose from "@/components/agriculturalTrusteeship/dialog"; import dialogClose from "@/components/agriculturalTrusteeship/dialog";
import {supplyDemandList} from "@/api/agriculturalTrusteeship";


export default { export default {
name: "agriculturalTrusteeshipIndex", name: "agriculturalTrusteeshipIndex",
@@ -51,13 +54,40 @@
active: 0, active: 0,
loading: false, loading: false,
finished: false, finished: false,
showDialog:false
showDialog:false,
supplyDemandList:[],
supplyDemandListYes:[],
query:{
entityId:Cookies.get('ACCESS-SESSION-ID'),
productType:''
},
}; };
}, },
created() { created() {


}, },
methods: { methods: {
getList(){
supplyDemandList(this.query).then(response => {
response.rows.map(res=>{
if (res.supplyMasterMap){
let supplyMasterMap = res.supplyMasterMap.split( "," )
res.supplyMasterMap = '/api'+supplyMasterMap[0]
}
if(res.publishStatus == 2){
this.supplyDemandListYes.push(res);
}
this.supplyDemandList.push(res);
})
if(this.supplyDemandList.length >= response.total){
this.finished = true;
return;
}else{
this.loading = false;
this.query.pageNum += 1 ;
}
});
},
openDialog(val){ openDialog(val){
this.showDialog = val this.showDialog = val
}, },


+ 120
- 24
src/views/agriculturalTrusteeship/socialization/project.vue Datei anzeigen

@@ -3,7 +3,7 @@
<!-- 头部开始 --> <!-- 头部开始 -->
<div class="header"> <div class="header">
<div class="header_left" @click="onClickLeft"> <div class="header_left" @click="onClickLeft">
<p>张三服务合作社</p>
<p>{{entityName}}</p>
</div> </div>
<p class="header_right"> <p class="header_right">
<img src="../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_photo.png" /> <img src="../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_photo.png" />
@@ -17,8 +17,8 @@
<van-tab title="售卖中"> <van-tab title="售卖中">
<div class="search"> <div class="search">
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" /> <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
<input type="text" placeholder="输入需求进行搜索" />
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" />
<input type="text" placeholder="输入需求进行搜索" v-model="searchInput" />
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearch" />
</div> </div>


<div class="main_content"> <div class="main_content">
@@ -31,7 +31,7 @@
<div class="main_content_right"> <div class="main_content_right">
<div class="main_content_right_header"> <div class="main_content_right_header">
<p class="main_content_right_header_tit">{{main_content_right_header_tit}}</p> <p class="main_content_right_header_tit">{{main_content_right_header_tit}}</p>
<van-tabs v-model="active" animated>
<van-tabs v-model="activePc" animated @change="orderByChange">
<van-tab title="评分排序"></van-tab> <van-tab title="评分排序"></van-tab>
<van-tab title="销量排序"></van-tab> <van-tab title="销量排序"></van-tab>
</van-tabs> </van-tabs>
@@ -48,7 +48,8 @@
> >
<!-- @load="onLoad"--> <!-- @load="onLoad"-->
<div class="main_content_right_list" v-for="(item,index) in supplyDemandListYes" :key="index"> <div class="main_content_right_list" v-for="(item,index) in supplyDemandListYes" :key="index">
<img src="../../../../static/images/agriculturalTrusteeship/index/test.png" @click="$router.push({name:'agriculturalTrusteeshipSocializationProjectDetail',query:{id:item.id}})">
<img v-if="item.supplyMasterMap" :src="item.supplyMasterMap" style="width: 25vw;height: 25vw;">
<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:'agriculturalTrusteeshipSocializationProjectDetail',query:{id:item.id}})">{{item.supplyDemandName}}</p> <p class="tt" @click="$router.push({name:'agriculturalTrusteeshipSocializationProjectDetail',query:{id:item.id}})">{{item.supplyDemandName}}</p>
<div class="tab" @click="$router.push({name:'agriculturalTrusteeshipSocializationProjectDetail',query:{id:item.id}})"> <div class="tab" @click="$router.push({name:'agriculturalTrusteeshipSocializationProjectDetail',query:{id:item.id}})">
@@ -68,41 +69,38 @@
<van-tab title="已下架"> <van-tab title="已下架">
<div class="search"> <div class="search">
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" /> <img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_01.png" />
<input type="text" placeholder="输入需求进行搜索" />
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" />
<input type="text" placeholder="输入需求进行搜索" v-model="searchInput2" />
<img src="../../../../static/images/agriculturalTrusteeship/index/search_icon_02.png" @click="goSearch2" />
</div> </div>


<div class="main_content"> <div class="main_content">
<div class="main_content_left"> <div class="main_content_left">
<van-sidebar v-model="activeKey">
<van-sidebar v-model="activeKey2" @change="onChangeIn2">
<van-sidebar-item title="全套服务" /> <van-sidebar-item title="全套服务" />
<van-sidebar-item v-for="(item,index) in productList" :key="index" :title="item.dictName" /> <van-sidebar-item v-for="(item,index) in productList" :key="index" :title="item.dictName" />
</van-sidebar> </van-sidebar>
</div> </div>
<div class="main_content_right"> <div class="main_content_right">
<div class="main_content_right_header"> <div class="main_content_right_header">
<p class="main_content_right_header_tit">灌溉</p>
<van-tabs v-model="active" animated>
<p class="main_content_right_header_tit">{{main_content_right_header_tit2}}</p>
<van-tabs v-model="activePc2" animated @change="orderByChange2">
<van-tab title="评分排序"></van-tab> <van-tab title="评分排序"></van-tab>
<van-tab title="销量排序"></van-tab> <van-tab title="销量排序"></van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div class="main_content_right_nav">
<p>服务</p>
<p>服务</p>
<p>服务</p>
<p>服务</p>
<p>服务</p>
<div class="main_content_right_nav" v-if="activeKey!=0">
<p v-for="(item,index) in productListChildren" :key="index">{{item.dictName}}</p>
</div> </div>


<van-list <van-list
v-model="loading"
:finished="finished"
v-model="loading2"
:finished="finished2"
finished-text="没有更多了" finished-text="没有更多了"
@load="getList"
@load="getList2"
> >
<div class="main_content_right_list" v-for="(item,index) in supplyDemandListNo" :key="index"> <div class="main_content_right_list" v-for="(item,index) in supplyDemandListNo" :key="index">
<img src="../../../../static/images/agriculturalTrusteeship/index/test.png">
<img v-if="item.supplyMasterMap" :src="item.supplyMasterMap" style="width: 25vw;height: 25vw;">
<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">{{item.entityName}}</p> <p class="tt">{{item.entityName}}</p>
<div class="tab"> <div class="tab">
@@ -150,9 +148,14 @@
data() { data() {
return { return {
activeKey: 0, activeKey: 0,
activeKey2: 0,
active: 0, active: 0,
activePc: 0,
activePc2: 0,
loading: false, loading: false,
finished: false, finished: false,
loading2: false,
finished2: false,
showDialog:false, showDialog:false,
// query:{ // query:{
// pageNum: 1 , // pageNum: 1 ,
@@ -166,13 +169,22 @@
productList:[], productList:[],
productListChildren:[], productListChildren:[],
main_content_right_header_tit:'全套服务', main_content_right_header_tit:'全套服务',
main_content_right_header_tit2:'全套服务',
query:{ query:{
entityId:Cookies.get('ACCESS-SESSION-ID'), entityId:Cookies.get('ACCESS-SESSION-ID'),
productType:'' productType:''
}
},
query2:{
entityId:Cookies.get('ACCESS-SESSION-ID'),
productType:''
},
entityName:'',
searchInput:'',
searchInput2:'',
}; };
}, },
created() { created() {
this.entityName = JSON.parse(Cookies.get("ServiceInformation")).entityName;
this.getDicts("publish_status").then(response => { this.getDicts("publish_status").then(response => {
for (var i = 0; i < response.data.length; i++) { for (var i = 0; i < response.data.length; i++) {
this.productStatisticsOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); this.productStatisticsOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
@@ -194,12 +206,13 @@
getList(){ getList(){
supplyDemandList(this.query).then(response => { supplyDemandList(this.query).then(response => {
response.rows.map(res=>{ response.rows.map(res=>{
if (res.supplyMasterMap){
let supplyMasterMap = res.supplyMasterMap.split( "," )
res.supplyMasterMap = '/api'+supplyMasterMap[0]
}
if(res.publishStatus == 3){ if(res.publishStatus == 3){
this.supplyDemandListYes.push(res); this.supplyDemandListYes.push(res);
} }
if(res.publishStatus == 2){
this.supplyDemandListNo.push(res);
}
this.supplyDemandList.push(res); this.supplyDemandList.push(res);
}) })
if(this.supplyDemandList.length >= response.total){ if(this.supplyDemandList.length >= response.total){
@@ -211,6 +224,27 @@
} }
}); });
}, },
getList2(){
supplyDemandList(this.query2).then(response => {
response.rows.map(res=>{
if (res.supplyMasterMap){
let supplyMasterMap = res.supplyMasterMap.split( "," )
res.supplyMasterMap = '/api'+supplyMasterMap[0]
}
if(res.publishStatus == 1){
this.supplyDemandListNo.push(res);
}
this.supplyDemandList.push(res);
})
if(this.supplyDemandList.length >= response.total){
this.finished2 = true;
return;
}else{
this.loading2 = false;
this.query2.pageNum += 1;
}
});
},
openDialog(val){ openDialog(val){
this.showDialog = val this.showDialog = val
}, },
@@ -228,9 +262,12 @@
}, },
onChangeIn(val){ onChangeIn(val){
this.supplyDemandListYes = []; this.supplyDemandListYes = [];
this.supplyDemandListNo = [];
this.supplyDemandList = [];
if (val == 0){ if (val == 0){
this.main_content_right_header_tit = '全套服务'; this.main_content_right_header_tit = '全套服务';
this.query.productType = ''; this.query.productType = '';
console.log("aaaaa")
this.getList(); this.getList();
return; return;
} }
@@ -242,9 +279,68 @@
} }
productTypes(query1).then(response => { productTypes(query1).then(response => {
this.productListChildren = response.data; this.productListChildren = response.data;
console.log("bbbbb")
this.getList(); this.getList();
}); });
}, },
onChangeIn2(val){
this.supplyDemandListNo = [];
this.supplyDemandList = [];
if (val == 0){
this.main_content_right_header_tit2 = '全套服务';
this.query2.productType = '';
console.log("ccccc")
this.getList2();
return;
}
this.query2.productType = this.productList[val-1].id;
let parentId = this.productList[val-1].id;
this.main_content_right_header_tit2 = this.productList[val-1].dictName
let query1 = {
parentId : parentId
}
productTypes(query1).then(response => {
this.productListChildren = response.data;
console.log("ddddd")
this.getList2();
});
},
orderByChange(){
if (this.activePc == 0){
this.query.orderByColumn = 'order_score'
}
if (this.activePc == 1){
this.query.orderByColumn = 'order_num'
}
this.supplyDemandListYes = [];
this.supplyDemandList = [];
this.getList();
},
orderByChange2(){
if (this.activePc2 == 0){
this.query2.orderByColumn = 'order_score'
}
if (this.activePc2 == 1){
this.query2.orderByColumn = 'order_num'
}
this.supplyDemandListNo = [];
this.supplyDemandList = [];
this.getList2();
},

goSearch(){
this.supplyDemandListYes = [];
this.supplyDemandList = [];
this.query.supplyDemandName = this.searchInput;
this.getList();
},

goSearch2(){
this.supplyDemandListNo = [];
this.supplyDemandList = [];
this.query2.supplyDemandName = this.searchInput;
this.getList();
},
}, },
} }
</script> </script>


+ 1
- 0
src/views/agriculturalTrusteeship/socialization/projectEdit.vue Datei anzeigen

@@ -67,6 +67,7 @@


<van-field label="单价" v-model="supplyDemand.unitPrice" input-align="right" placeholder="请输入单价" /> <van-field label="单价" v-model="supplyDemand.unitPrice" input-align="right" placeholder="请输入单价" />
<van-field label="数量" v-model="supplyDemand.number" input-align="right" placeholder="请输入数量" /> <van-field label="数量" v-model="supplyDemand.number" input-align="right" placeholder="请输入数量" />
<van-field label="单位" v-model="supplyDemand.unit" input-align="right" placeholder="请输入单位" />
<van-field label="联系电话" v-model="supplyDemand.supplyDemandTal" input-align="right" placeholder="请输入联系电话" /> <van-field label="联系电话" v-model="supplyDemand.supplyDemandTal" input-align="right" placeholder="请输入联系电话" />
<van-field label="联系人" v-model="supplyDemand.linker" input-align="right" placeholder="请输入联系人" /> <van-field label="联系人" v-model="supplyDemand.linker" input-align="right" placeholder="请输入联系人" />
<van-field label="服务区域" v-model="supplyDemand.serviceDeptName" input-align="right" placeholder="请输入服务区域" /> <van-field label="服务区域" v-model="supplyDemand.serviceDeptName" input-align="right" placeholder="请输入服务区域" />


+ 143
- 20
src/views/agriculturalTrusteeship/socialization/release.vue Datei anzeigen

@@ -13,22 +13,69 @@


<!-- 内容开始 --> <!-- 内容开始 -->
<div class="main"> <div class="main">
<van-field label="产品名称" input-align="right" placeholder="请输入产品名称" />
<van-field label="产品类型" input-align="right" placeholder="请输入产品类型" />
<van-field label="二级分类" input-align="right" placeholder="请输入二级分类" />
<van-field label="产品规格" input-align="right" placeholder="请输入产品规格" />
<van-field label="所属主体" input-align="right" placeholder="请输入所属主体" />
<van-field label="单价" input-align="right" placeholder="请输入单价" />
<van-field label="数量" input-align="right" placeholder="请输入数量" />
<van-field label="联系电话" input-align="right" placeholder="请输入联系电话" />
<van-field label="联系人" input-align="right" placeholder="请输入联系人" />
<van-field label="服务区域" input-align="right" placeholder="请输入服务区域" />
<van-field label="地址" input-align="right" placeholder="请输入地址" />
<van-field label="简介" input-align="right" placeholder="请输入简介" />
<van-field label="详情" input-align="right" placeholder="请输入详情" />
<van-field label="图片" :border="false" input-align="right" placeholder="请输入图片" />
<van-field label="产品名称" v-model="supplyDemand.supplyDemandName" input-align="right" placeholder="请输入产品名称" />
<!-- <van-field label="产品类型" v-model="supplyDemand.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" round position="bottom">
<!-- v-model="cascaderValue"-->
<van-cascader
title="请选择产品类型"
:options="productList"
@close="showProductType = false"
@finish="onConfirmProductType"
:field-names="fieldNames"
/>
</van-popup>

<!-- <van-field label="二级分类" v-model="supplyDemand.supplyDemandType" input-align="right" placeholder="请输入二级分类" />-->
<van-field label="产品规格" v-model="supplyDemand.specification" input-align="right" placeholder="请输入产品规格" />
<!-- <van-field label="所属主体" v-model="supplyDemand.bodyType" input-align="right" placeholder="请输入所属主体" />-->
<van-field
readonly
clickable
required
:rules="[{ required: true , message:'请选择所属主体'}]"
v-model="bodyType"
label="所属主体"
placeholder="请选择所属主体"
@click="showBodyType = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
/>
<van-popup v-model="showBodyType" position="bottom">
<van-picker
show-toolbar
:columns="projectTypeOptions"
@confirm="onConfirmProjectType"
@cancel="showBodyType = false"
/>
</van-popup>

<van-field label="单价" v-model="supplyDemand.unitPrice" input-align="right" placeholder="请输入单价" />
<van-field label="数量" v-model="supplyDemand.number" input-align="right" placeholder="请输入数量" />
<van-field label="联系电话" v-model="supplyDemand.supplyDemandTal" input-align="right" placeholder="请输入联系电话" />
<van-field label="联系人" v-model="supplyDemand.linker" input-align="right" placeholder="请输入联系人" />
<van-field label="服务区域" v-model="supplyDemand.serviceDeptName" input-align="right" placeholder="请输入服务区域" />
<van-field label="地址" v-model="supplyDemand.address" input-align="right" placeholder="请输入地址" />
<van-field label="简介" v-model="supplyDemand.introduction" input-align="right" placeholder="请输入简介" />
<van-field label="详情" v-model="supplyDemand.particulars" input-align="right" placeholder="请输入详情" />
<van-field label="图片" :border="false" input-align="right" readonly />
<div style="padding: 0 4% 2vh;"> <div style="padding: 0 4% 2vh;">
<van-uploader />
<van-uploader v-model="supplyDemand.supplyMasterMapList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" />
</div> </div>
</div> </div>


@@ -40,14 +87,15 @@
</div> </div>


<div class="main_btn"> <div class="main_btn">
<p>发布</p>
<p>存稿</p>
<p @click="submitForm('3')">发布</p>
<p @click="submitForm('2')">存稿</p>
</div> </div>
<!-- 内容结束 --> <!-- 内容结束 -->
</div> </div>
</template> </template>
<script> <script>
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import {commonUpload, productTypes, supplyDemandAdd} from "@/api/agriculturalTrusteeship";
export default { export default {
name: "agriculturalTrusteeshipSocializationRelease", name: "agriculturalTrusteeshipSocializationRelease",
data() { data() {
@@ -56,16 +104,91 @@
active: 0, active: 0,
loading: false, loading: false,
finished: false, finished: false,
showProductType: false,
showBodyType: false,
center: { lng: 122.089726, lat: 37.540728 }, //经纬度 center: { lng: 122.089726, lat: 37.540728 }, //经纬度
zoom: 15, //地图展示级别 zoom: 15, //地图展示级别
showDialog:false
showDialog:false,
supplyDemand:{},
productType:'',
bodyType:'',
projectTypeOptions:[],
productList:[],
productList1:[],
demandTypeOptions:[],
productTypeOptions:[],
supplyMasterMapArr:[],
bodyTypeOptions:[],
fieldNames : {
text: 'dictName',
value: 'id',
children: 'children',
},
}; };
}, },
created() { created() {

let query = {
parentId : ''
}
let query1 = {
tree : true
}
productTypes(query).then(response => {
this.productList = response.data;
});
productTypes(query1).then(response => {
this.productList1 = response.data;
});
this.getDicts("newBusinessEntity_statistics_project").then(response => {
for (var i = 0; i < response.data.length; i++) {
this.projectTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
}
this.bodyTypeOptions = response.data;
});
this.getDicts("publish_status").then(response => {
for (var i = 0; i < response.data.length; i++) {
this.projectTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
}
this.bodyTypeOptions = response.data;
});
}, },
methods: { methods: {

onConfirmProductType({ selectedOptions }){
this.supplyDemand.productType = selectedOptions[selectedOptions.length-1].id;
this.productType = selectedOptions.map((option) => option.dictName).join('/');
this.showProductType = false;
},
onConfirmProjectType(data){
this.supplyDemand.bodyType = data.value;
this.bodyType = data.text;
this.showBodyType = false;
},
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.supplyMasterMapArr.push(r1.fileName)
})
},
deleteFileEvidenceForm(file,detail) {
this.supplyMasterMapArr.splice(detail.index,1);
this.supplyDemand.supplyMasterMapList.splice(detail.index,1);
},
submitForm(publishStatus){
this.supplyDemand.supplyMasterMap = this.supplyMasterMapArr.join(',')
this.supplyDemand.supplyDemandType = '1';
this.supplyDemand.publishStatus = publishStatus;
supplyDemandAdd(this.supplyDemand).then((res) => {
if(res.code=="200"){
this.$notify({ type: 'success', message: '发布成功' });
setTimeout(function(){
history.back(-1);
},2000)
}
})
},
}, },
} }
</script> </script>


Laden…
Abbrechen
Speichern