| @@ -2,6 +2,14 @@ import request from '@/utils/request' | |||
| import Cookies from "js-cookie"; | |||
| // 查询部门下拉树结构 | |||
| export function treeselect() { | |||
| return request({ | |||
| url: '/depositm/dept/treeselect', | |||
| method: 'get' | |||
| }) | |||
| } | |||
| // 保险公司登录 | |||
| export function serviceLogin(data) { | |||
| return request({ | |||
| @@ -33,6 +41,9 @@ export function entityLogin(data) { | |||
| export function serviceList(query) { | |||
| return request({ | |||
| url: '/depositm/financialService/list', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -42,6 +53,9 @@ export function serviceList(query) { | |||
| export function serviceGet(id) { | |||
| return request({ | |||
| url: '/depositm/financialService/get/'+id, | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| }) | |||
| } | |||
| @@ -144,17 +158,20 @@ export function productOut(id) { | |||
| export function detailList(query) { | |||
| return request({ | |||
| url: '/depositm/entity/list', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| //服务组织注册 | |||
| export function entityRegister(query) { | |||
| export function entityRegister(data) { | |||
| return request({ | |||
| url: '/depositm/entity/register', | |||
| method: 'get', | |||
| params: query | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| } | |||
| @@ -162,6 +179,9 @@ export function entityRegister(query) { | |||
| export function supplyDemandList(query) { | |||
| return request({ | |||
| url: '/depositm/supplyDemand/list', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -171,6 +191,9 @@ export function supplyDemandList(query) { | |||
| export function productTypes(query) { | |||
| return request({ | |||
| url: '/depositm/supplyDemand/productTypes', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -180,6 +203,9 @@ export function productTypes(query) { | |||
| export function supplyDemandGet(id) { | |||
| return request({ | |||
| url: '/depositm/supplyDemand/get/'+id, | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| }) | |||
| } | |||
| @@ -188,6 +214,9 @@ export function supplyDemandGet(id) { | |||
| export function supplyDemandEdit(data) { | |||
| return request({ | |||
| url: '/depositm/supplyDemand/edit', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| @@ -197,6 +226,9 @@ export function supplyDemandEdit(data) { | |||
| export function supplyComment(data) { | |||
| return request({ | |||
| url: '/deposit/supplyorder/comment', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| @@ -206,6 +238,9 @@ export function supplyComment(data) { | |||
| export function supplyDemandProductOut(id) { | |||
| return request({ | |||
| url: '/depositm/supplyDemand/productOut/'+id, | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'post', | |||
| }) | |||
| } | |||
| @@ -214,7 +249,22 @@ export function supplyDemandProductOut(id) { | |||
| export function supplyDemandProductIn(id) { | |||
| return request({ | |||
| 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', | |||
| data:data | |||
| }) | |||
| } | |||
| @@ -223,6 +273,9 @@ export function supplyDemandProductIn(id) { | |||
| export function supplyorderReject(id) { | |||
| return request({ | |||
| url: '/depositm/supplyorder/reject/'+id, | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'post', | |||
| }) | |||
| } | |||
| @@ -231,6 +284,9 @@ export function supplyorderReject(id) { | |||
| export function supplyorderList(query) { | |||
| return request({ | |||
| url: '/depositm/supplyorder/list', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -240,6 +296,9 @@ export function supplyorderList(query) { | |||
| export function orderStatistics(query) { | |||
| return request({ | |||
| url: '/depositm/entity/orderStatistics', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -249,6 +308,9 @@ export function orderStatistics(query) { | |||
| export function supplyorderGet(id) { | |||
| return request({ | |||
| url: '/depositm/supplyorder/get/'+id, | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| }) | |||
| } | |||
| @@ -257,6 +319,9 @@ export function supplyorderGet(id) { | |||
| export function fwhtList(query) { | |||
| return request({ | |||
| url: '/geo/fwht/list', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| @@ -265,7 +330,10 @@ export function fwhtList(query) { | |||
| //下单 | |||
| export function placeOrder(data) { | |||
| return request({ | |||
| url: '/deposit/supplyorder/placeOrder', | |||
| url: '/entity/supplyorder/placeOrder', | |||
| headers: { | |||
| "ACCESS-SESSION-ID": Cookies.get('ACCESS-SESSION-ID') | |||
| }, | |||
| method: 'post', | |||
| data: data | |||
| }) | |||
| @@ -21,7 +21,7 @@ | |||
| <img src="../../../static/images/agriculturalTrusteeship/socialization/dialog_02.png" style="margin-right: 15PX" /> | |||
| </template> | |||
| <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> | |||
| </van-cell> | |||
| </div> | |||
| @@ -30,9 +30,33 @@ | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import {supplyDemandList} from "@/api/agriculturalTrusteeship"; | |||
| import Cookies from "js-cookie"; | |||
| export default { | |||
| name: "toolbar", | |||
| data() { | |||
| return { | |||
| supplyDemandListYes1:[], | |||
| query:{ | |||
| entityId:Cookies.get('ACCESS-SESSION-ID'), | |||
| productType:'' | |||
| }, | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList() | |||
| }, | |||
| methods:{ | |||
| getList(){ | |||
| supplyDemandList(this.query).then(response => { | |||
| response.rows.map(res=>{ | |||
| if(res.publishStatus == 2){ | |||
| this.supplyDemandListYes1.push(res); | |||
| } | |||
| }) | |||
| }); | |||
| }, | |||
| openDialog(){ | |||
| this.$parent.openDialog(false) | |||
| } | |||
| @@ -16,12 +16,12 @@ | |||
| <div class="main_content_right_list"> | |||
| <div class="main_content_right_list_header"> | |||
| <p class="on">商品信息</p> | |||
| <p>{{supplyDemand.productType}}</p> | |||
| <p>{{productType}}</p> | |||
| <p>服务</p> | |||
| </div> | |||
| <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"> | |||
| <p class="tt">{{supplyDemand.supplyDemandName}}</p> | |||
| <div class="tab"> | |||
| @@ -55,7 +55,7 @@ | |||
| required | |||
| :border="false" | |||
| :rules="[{ required: true , message:'请选择服务合同'}]" | |||
| v-model="fwht" | |||
| v-model="contractionName" | |||
| label="服务合同" | |||
| placeholder="请选择服务合同" | |||
| @click="showfwht = true" | |||
| @@ -67,12 +67,13 @@ | |||
| <van-picker | |||
| show-toolbar | |||
| :columns="fwhtOptions" | |||
| value-key="contractionName" | |||
| @confirm="onConfirmFwht" | |||
| @cancel="showfwht = false" | |||
| /> | |||
| </van-popup> | |||
| <!-- <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="请输入下单时间" />--> | |||
| @@ -128,6 +129,7 @@ | |||
| </template> | |||
| </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="请输入备注" /> | |||
| </div> | |||
| @@ -135,7 +137,7 @@ | |||
| <div class="main_btn"> | |||
| <p @click="placeOrder">下单</p> | |||
| <p>取消</p> | |||
| <p @click="onClickLeft">取消</p> | |||
| </div> | |||
| <!-- 内容结束 --> | |||
| </div> | |||
| @@ -161,7 +163,8 @@ | |||
| serviceAt:new Date(), | |||
| showServiceAt: false, | |||
| activeNames:[], | |||
| supplyDemand:{}, | |||
| supplyDemand:{ | |||
| }, | |||
| projectTypeOptions:[], | |||
| productList:[], | |||
| productList1:[], | |||
| @@ -171,15 +174,18 @@ | |||
| bodyTypeOptions:[], | |||
| fwhtOptions:[], | |||
| user:{}, | |||
| fwht:'' | |||
| fwht:'', | |||
| contractionName:'', | |||
| productType:'', | |||
| cropType:'' | |||
| }; | |||
| }, | |||
| created() { | |||
| fwhtList({deptId: this.$store.state.user.loginDeptId, contractionStatus: '1'}).then(response => { | |||
| this.fwhtOptions = response.rows; | |||
| }); | |||
| getInfo().then(response => { | |||
| this.user = response.user; | |||
| fwhtList({deptId: response.user.loginDeptId,bookId:'0', contractionStatus: '1'}).then(response => { | |||
| this.fwhtOptions = response.rows; | |||
| }); | |||
| }); | |||
| let query = { | |||
| parentId : '' | |||
| @@ -199,26 +205,30 @@ | |||
| } | |||
| this.bodyTypeOptions = response.data; | |||
| }); | |||
| this.getDicts("crop_type").then(response => { | |||
| this.cropTypeOptions = response.data; | |||
| }); | |||
| this.getDetail(); | |||
| }, | |||
| methods: { | |||
| getDetail(){ | |||
| supplyDemandGet(this.$route.query.id).then(response => { | |||
| 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){ | |||
| response.data.supplyMasterMapList = []; | |||
| 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; | |||
| }); | |||
| }, | |||
| 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){ | |||
| this.supplyDemand.orderAt = this.format(data,'yyyy-MM-dd'); | |||
| @@ -232,6 +242,12 @@ | |||
| this.showServiceAt = false; | |||
| }, | |||
| 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 => { | |||
| if(response.code=="200"){ | |||
| this.$notify({ type: 'success', message: '发布成功' }); | |||
| @@ -29,7 +29,7 @@ | |||
| <div class="main_content_right_list_content"> | |||
| <p class="tt">{{item.contractionName}}</p> | |||
| <div class="tab"> | |||
| <p>¥<span>{{item.realityServiceMoney}}</span>.00</p> | |||
| <p>¥<span>{{item.unitPrice}}</span>.00/{{item.unit}}</p> | |||
| </div> | |||
| <p class="name"> | |||
| <span>数量:{{item.serviceNum}}</span> | |||
| @@ -37,7 +37,7 @@ | |||
| </p> | |||
| </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.phonea" /> | |||
| </div> | |||
| @@ -52,7 +52,8 @@ | |||
| <script> | |||
| import Cookies from "js-cookie"; | |||
| 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 { | |||
| name: "agriculturalTrusteeshipIndex", | |||
| @@ -80,6 +81,7 @@ | |||
| startOrderAt :'', | |||
| endOrderAt :'', | |||
| orderStatus :'', | |||
| createBy:'' | |||
| }, | |||
| startOrderAt:this.format(new Date(),'yyyy年MM月'), | |||
| endOrderAt:this.format(new Date(),'yyyy年MM月'), | |||
| @@ -112,7 +114,7 @@ | |||
| if ( res.orderStatus == '1'){ | |||
| res.cropType = this.selectDictLabel(this.cropTypeOptions, res.cropType); | |||
| 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.supplyDemandList1.push(res); | |||
| @@ -3,7 +3,10 @@ | |||
| <!-- 头部开始 --> | |||
| <div class="header"> | |||
| <!-- @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"> | |||
| </div> | |||
| <div class="tit"> | |||
| @@ -193,17 +196,83 @@ | |||
| /> | |||
| </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> | |||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_03.png" alt=""> | |||
| </template> | |||
| </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> | |||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_04.png" alt=""> | |||
| </template> | |||
| </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="请输入主体地址" > | |||
| <template #left-icon> | |||
| @@ -211,11 +280,32 @@ | |||
| </template> | |||
| </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> | |||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_05.png" alt=""> | |||
| </template> | |||
| </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="请输入负责人姓名"> | |||
| <template #left-icon> | |||
| @@ -229,7 +319,7 @@ | |||
| </template> | |||
| </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> | |||
| <img src="../../../static/images/agriculturalTrusteeship/login/register_06.png" alt=""> | |||
| </template> | |||
| @@ -248,7 +338,7 @@ | |||
| </van-field> | |||
| <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> | |||
| <p class="submit_btn" @click="goRegister">提交审核</p> | |||
| @@ -263,7 +353,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 , entityRegister} from "@/api/agriculturalTrusteeship"; | |||
| import {serviceLogin, entityLogin, commonUpload , serviceRegister , entityRegister , treeselect} from "@/api/agriculturalTrusteeship"; | |||
| export default { | |||
| name: "agriculturalTrusteeshipLogin", | |||
| data() { | |||
| @@ -303,10 +393,28 @@ | |||
| mainImgArr:[], | |||
| mainImgArrEntity:[], | |||
| mainImgUploader:[], | |||
| mainImgUploader2:[], | |||
| financialType:'', | |||
| statisticsTypeIdOptions : [], | |||
| 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() { | |||
| @@ -318,6 +426,22 @@ | |||
| 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.getCookie(); | |||
| @@ -585,6 +709,7 @@ | |||
| }, | |||
| deleteFileEvidenceForm(file,detail) { | |||
| this.mainImgArr.splice(detail.index,1); | |||
| this.mainImgUploader.splice(detail.index,1); | |||
| }, | |||
| afterReadEvidenceEntityForm(file){ | |||
| let params1 = new FormData(); | |||
| @@ -599,6 +724,7 @@ | |||
| }, | |||
| deleteFileEvidenceEntityForm(file,detail) { | |||
| this.mainImgArrEntity.splice(detail.index,1); | |||
| this.mainImgUploader2.splice(detail.index,1); | |||
| }, | |||
| goRegister(){ | |||
| if (this.loginType == 'bxjg' || this.loginType == 'dkjg' || this.loginType == 'ndjg'){ | |||
| @@ -612,7 +738,7 @@ | |||
| }) | |||
| }else if(this.loginType = 'fwzz'){ | |||
| 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); | |||
| entityRegister(this.entityForm).then(res=>{ | |||
| this.$notify({ type: 'success', message: '注册成功' }); | |||
| @@ -624,7 +750,28 @@ | |||
| this.entityForm.statisticsTypeId = data.value; | |||
| this.statisticsTypeId = data.text; | |||
| 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结束处 | |||
| }, | |||
| @@ -17,14 +17,16 @@ | |||
| v-model="loading" | |||
| :finished="finished" | |||
| finished-text="没有更多了" | |||
| @load="getList" | |||
| > | |||
| <!-- @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"> | |||
| <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"> | |||
| <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> | |||
| @@ -38,6 +40,7 @@ | |||
| import Cookies from "js-cookie"; | |||
| import agr from "@/components/common/agr_footer"; | |||
| import dialogClose from "@/components/agriculturalTrusteeship/dialog"; | |||
| import {supplyDemandList} from "@/api/agriculturalTrusteeship"; | |||
| export default { | |||
| name: "agriculturalTrusteeshipIndex", | |||
| @@ -51,13 +54,40 @@ | |||
| active: 0, | |||
| loading: false, | |||
| finished: false, | |||
| showDialog:false | |||
| showDialog:false, | |||
| supplyDemandList:[], | |||
| supplyDemandListYes:[], | |||
| query:{ | |||
| entityId:Cookies.get('ACCESS-SESSION-ID'), | |||
| productType:'' | |||
| }, | |||
| }; | |||
| }, | |||
| created() { | |||
| }, | |||
| 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){ | |||
| this.showDialog = val | |||
| }, | |||
| @@ -3,7 +3,7 @@ | |||
| <!-- 头部开始 --> | |||
| <div class="header"> | |||
| <div class="header_left" @click="onClickLeft"> | |||
| <p>张三服务合作社</p> | |||
| <p>{{entityName}}</p> | |||
| </div> | |||
| <p class="header_right"> | |||
| <img src="../../../../static/images/agriculturalTrusteeship/socialization/socialization_icon_photo.png" /> | |||
| @@ -17,8 +17,8 @@ | |||
| <van-tab title="售卖中"> | |||
| <div class="search"> | |||
| <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 class="main_content"> | |||
| @@ -31,7 +31,7 @@ | |||
| <div class="main_content_right"> | |||
| <div class="main_content_right_header"> | |||
| <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-tabs> | |||
| @@ -48,7 +48,8 @@ | |||
| > | |||
| <!-- @load="onLoad"--> | |||
| <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"> | |||
| <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}})"> | |||
| @@ -68,41 +69,38 @@ | |||
| <van-tab title="已下架"> | |||
| <div class="search"> | |||
| <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 class="main_content"> | |||
| <div class="main_content_left"> | |||
| <van-sidebar v-model="activeKey"> | |||
| <van-sidebar v-model="activeKey2" @change="onChangeIn2"> | |||
| <van-sidebar-item title="全套服务" /> | |||
| <van-sidebar-item v-for="(item,index) in productList" :key="index" :title="item.dictName" /> | |||
| </van-sidebar> | |||
| </div> | |||
| <div class="main_content_right"> | |||
| <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-tabs> | |||
| </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> | |||
| <van-list | |||
| v-model="loading" | |||
| :finished="finished" | |||
| v-model="loading2" | |||
| :finished="finished2" | |||
| finished-text="没有更多了" | |||
| @load="getList" | |||
| @load="getList2" | |||
| > | |||
| <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"> | |||
| <p class="tt">{{item.entityName}}</p> | |||
| <div class="tab"> | |||
| @@ -150,9 +148,14 @@ | |||
| data() { | |||
| return { | |||
| activeKey: 0, | |||
| activeKey2: 0, | |||
| active: 0, | |||
| activePc: 0, | |||
| activePc2: 0, | |||
| loading: false, | |||
| finished: false, | |||
| loading2: false, | |||
| finished2: false, | |||
| showDialog:false, | |||
| // query:{ | |||
| // pageNum: 1 , | |||
| @@ -166,13 +169,22 @@ | |||
| productList:[], | |||
| productListChildren:[], | |||
| main_content_right_header_tit:'全套服务', | |||
| main_content_right_header_tit2:'全套服务', | |||
| query:{ | |||
| entityId:Cookies.get('ACCESS-SESSION-ID'), | |||
| productType:'' | |||
| } | |||
| }, | |||
| query2:{ | |||
| entityId:Cookies.get('ACCESS-SESSION-ID'), | |||
| productType:'' | |||
| }, | |||
| entityName:'', | |||
| searchInput:'', | |||
| searchInput2:'', | |||
| }; | |||
| }, | |||
| created() { | |||
| this.entityName = JSON.parse(Cookies.get("ServiceInformation")).entityName; | |||
| this.getDicts("publish_status").then(response => { | |||
| for (var i = 0; i < response.data.length; i++) { | |||
| this.productStatisticsOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | |||
| @@ -194,12 +206,13 @@ | |||
| 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 == 3){ | |||
| this.supplyDemandListYes.push(res); | |||
| } | |||
| if(res.publishStatus == 2){ | |||
| this.supplyDemandListNo.push(res); | |||
| } | |||
| this.supplyDemandList.push(res); | |||
| }) | |||
| 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){ | |||
| this.showDialog = val | |||
| }, | |||
| @@ -228,9 +262,12 @@ | |||
| }, | |||
| onChangeIn(val){ | |||
| this.supplyDemandListYes = []; | |||
| this.supplyDemandListNo = []; | |||
| this.supplyDemandList = []; | |||
| if (val == 0){ | |||
| this.main_content_right_header_tit = '全套服务'; | |||
| this.query.productType = ''; | |||
| console.log("aaaaa") | |||
| this.getList(); | |||
| return; | |||
| } | |||
| @@ -242,9 +279,68 @@ | |||
| } | |||
| productTypes(query1).then(response => { | |||
| this.productListChildren = response.data; | |||
| console.log("bbbbb") | |||
| 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> | |||
| @@ -67,6 +67,7 @@ | |||
| <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.unit" 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="请输入服务区域" /> | |||
| @@ -13,22 +13,69 @@ | |||
| <!-- 内容开始 --> | |||
| <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;"> | |||
| <van-uploader /> | |||
| <van-uploader v-model="supplyDemand.supplyMasterMapList" :after-read="afterReadEvidenceForm" :before-delete="deleteFileEvidenceForm" /> | |||
| </div> | |||
| </div> | |||
| @@ -40,14 +87,15 @@ | |||
| </div> | |||
| <div class="main_btn"> | |||
| <p>发布</p> | |||
| <p>存稿</p> | |||
| <p @click="submitForm('3')">发布</p> | |||
| <p @click="submitForm('2')">存稿</p> | |||
| </div> | |||
| <!-- 内容结束 --> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import Cookies from "js-cookie"; | |||
| import {commonUpload, productTypes, supplyDemandAdd} from "@/api/agriculturalTrusteeship"; | |||
| export default { | |||
| name: "agriculturalTrusteeshipSocializationRelease", | |||
| data() { | |||
| @@ -56,16 +104,91 @@ | |||
| active: 0, | |||
| loading: false, | |||
| finished: false, | |||
| showProductType: false, | |||
| showBodyType: false, | |||
| center: { lng: 122.089726, lat: 37.540728 }, //经纬度 | |||
| zoom: 15, //地图展示级别 | |||
| showDialog:false | |||
| showDialog:false, | |||
| supplyDemand:{}, | |||
| productType:'', | |||
| bodyType:'', | |||
| projectTypeOptions:[], | |||
| productList:[], | |||
| productList1:[], | |||
| demandTypeOptions:[], | |||
| productTypeOptions:[], | |||
| supplyMasterMapArr:[], | |||
| bodyTypeOptions:[], | |||
| fieldNames : { | |||
| text: 'dictName', | |||
| value: 'id', | |||
| children: 'children', | |||
| }, | |||
| }; | |||
| }, | |||
| 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: { | |||
| 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> | |||