物流优化

This commit is contained in:
zmj 2023-11-07 18:55:04 +08:00
parent 73aa7f8c19
commit 4192e6cbfd
8 changed files with 1495 additions and 569 deletions

View File

@ -65,3 +65,14 @@ export const marketTask10Commit = (data) => oahttp.post('/task/commit_town_task_
* 任务:提交村公司任务-信息平台铺设任务接口 * 任务:提交村公司任务-信息平台铺设任务接口
*/ */
export const villageTask6Commit = (data) => oahttp.post('/task/commit_village_task_type_6', data) export const villageTask6Commit = (data) => oahttp.post('/task/commit_village_task_type_6', data)
/**
* 任务:提交村镇公司收集任务列表
*/
export const townMasterTask3List = (data) => oahttp.get('/task/service_task_detail', data)
/**
* 任务:提交村镇公司收集任务提交
*/
export const townMasterTask3Commit = (data) => oahttp.post('/task/commit_town_master_task_type_3', data)

View File

@ -1,30 +1,30 @@
<template> <template>
<view class="c_task_item" @click="clickTask"> <view class="c_task_item" @click="clickTask">
<view class="personnel_list"> <view class="personnel_list">
<view class="cards"> <view class="cards">
<view class="cards_head"> <view class="cards_head">
<view style="font-size: 32rpx; display: flex;padding-right: 16rpx;"> <view style="font-size: 32rpx; display: flex;padding-right: 16rpx;">
<view style="flex-shrink: 0;margin-right: 10rpx;">任务名称: </view> <view style="flex-shrink: 0;margin-right: 10rpx;">任务名称: </view>
<view>{{ datas.title }}</view> <view>{{ datas.title }}</view>
</view> </view>
<view style="flex-shrink: 0;">点击查看</view> <view style="flex-shrink: 0;">点击查看</view>
</view> </view>
<view class="cards_content"> <view class="cards_content">
<view class="right" style="width: 100%"> <view class="right" style="width: 100%">
<view class="" style="display: flex"> <view class="" style="display: flex">
<view>任务状态 :</view> <view>任务状态 :</view>
<view class="text" style="color: #ff7c32"> <view class="text" style="color: #ff7c32">
<text v-if="datas.status == 3" style="color: #488f00">已完成</text> <text v-if="datas.status == 3" style="color: #488f00">已完成</text>
<text v-else-if="datas.status == 5" style="color: #ccc">已关闭</text> <text v-else-if="datas.status == 5" style="color: #ccc">已关闭</text>
<block v-else-if=" <block v-else-if="
datas.type == 31 || datas.type == 31 ||
datas.type == 32 || datas.type == 32 ||
datas.type == 33 || datas.type == 33 ||
datas.type == 34 || datas.type == 34 ||
datas.type == 35 datas.type == 35
"> ">
<block v-if="datas.extend && datas.extend.informationg"> <block v-if="datas.extend && datas.extend.informationg">
{{ {{
(datas.extend.informationg.update (datas.extend.informationg.update
? datas.extend.informationg.update ? datas.extend.informationg.update
: 0) + : 0) +
@ -33,13 +33,13 @@
? datas.extend.informationg.count ? datas.extend.informationg.count
: 0) : 0)
}} }}
</block> </block>
<block v-else-if=" <block v-else-if="
datas.extend && datas.extend &&
datas.extend.transaction && datas.extend.transaction &&
datas.extend.transaction.arr datas.extend.transaction.arr
"> ">
{{ {{
(datas.extend.transaction.arr.transaction_pool (datas.extend.transaction.arr.transaction_pool
? datas.extend.transaction.arr.transaction_pool ? datas.extend.transaction.arr.transaction_pool
: 0) + : 0) +
@ -49,339 +49,351 @@
: 0) + : 0) +
"元" "元"
}} }}
<!-- <text style="color: #488F00;margin-left: 26rpx;">{{(datas.extend.transaction.arr.transaction_pool?datas.extend.transaction.arr.transaction_pool:1)+'元'}}</text> --> <!-- <text style="color: #488F00;margin-left: 26rpx;">{{(datas.extend.transaction.arr.transaction_pool?datas.extend.transaction.arr.transaction_pool:1)+'元'}}</text> -->
</block> </block>
<block v-else-if="datas.extend && datas.extend.update"> <block v-else-if="datas.extend && datas.extend.update">
<text v-if=" <text v-if="
(datas.extend.update.transfer && (datas.extend.update.transfer &&
datas.extend.update.transfer.lnglat[0]) || datas.extend.update.transfer.lnglat[0]) ||
datas.status == 3 datas.status == 3
" style="color: #488f00">抵达终点</text> " style="color: #488f00">抵达终点</text>
<text v-else-if=" <text v-else-if="
datas.extend.update.terminus && datas.extend.update.terminus &&
datas.extend.update.terminus.lnglat[0] datas.extend.update.terminus.lnglat[0]
">抵达中转点</text> ">抵达中转点</text>
<text v-else>进行中</text> <text v-else>进行中</text>
</block> </block>
<block v-else>进行中</block> <block v-else>进行中</block>
</block> </block>
<block <block v-else-if="townService(datas.type)">
v-else-if="townService(datas.type)"> <block v-if="datas.type == 44">
<block v-if="datas.type == 44"> {{extend.total-extend.not_done_count||0}}/{{extend.total||0}}
{{extend.total-extend.not_done_count||0}}/{{extend.total||0}} </block>
</block> <block v-else-if="datas.type == 45">
<block v-else-if="datas.type == 45"> {{extend.done_count||0}}/{{extend.total||0}}
{{extend.done_count||0}}/{{extend.total||0}} </block>
</block> <block v-else>进行中</block>
<block v-else>进行中</block> </block>
</block> <block v-else>进行中</block>
<block v-else>进行中</block> </view>
</view> </view>
</view> <view style="
<view style="
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
"> ">
<view> <view>
<text>完成时间 :</text> <text>完成时间 :</text>
<text>{{ datas.end_time }}</text> <text>{{ datas.end_time }}</text>
</view> </view>
<text v-if="datas.status == 2 || datas.status == 1" style="background-color: #ff7c32" <text v-if="datas.status == 2 || datas.status == 1" style="background-color: #ff7c32"
class="status">进行中</text> class="status">进行中</text>
<text v-if="datas.status == 3" style="background-color: #488f00" class="status">已完成</text> <text v-if="datas.status == 3" style="background-color: #488f00" class="status">已完成</text>
<text v-if="datas.status == 5" style="background-color: #ccc" class="status">已关闭</text> <text v-if="datas.status == 5" style="background-color: #ccc" class="status">已关闭</text>
</view> </view>
<view class=""> <view class="">
<text>任务金额 :</text> <text>任务金额 :</text>
<text> {{ datas.money + "元" || "0.00" }} </text> <text> {{ datas.money + "元" || "0.00" }} </text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
Toast Toast
} from '../../libs/uniApi'; } from '../../libs/uniApi';
export default { export default {
name: "task", name: "task",
props: { props: {
datas: { datas: {
type: Object, type: Object,
default: function() { default: function() {
return {} return {}
} }
} }
}, },
data() { data() {
return { return {
extend: {}, extend: {},
// : ,, // : ,,
taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'], taskRoleTypeList: ['town_task_type', 'town_task_type_marketing_director', 'town_task_type_master'],
townServiceList: [44,45,46,47,48,49,50], // townServiceList: [44, 45, 46, 47, 48, 49, 50], //
navToTownServiceList: [44,45,46,48,49,50], // /subpkg/townTask/townTask 0 navToTownServiceList: [44, 45, 46, 48, 49, 50], // /subpkg/townTask/townTask 0
navToTownMarketList: [51,52,53,54,55,57,58,59], // /subpkg/townTask/townTask 1 navToTownMarketList: [51, 52, 53, 54, 55, 57, 58, 59], // /subpkg/townTask/townTask 1
navToVillageList: [62,63,64,65,66,68] // /subpkg/townTask/townTask 1 navToVillageList: [62, 63, 64, 65, 66, 68] // /subpkg/townTask/townTask 1
}; };
}, },
mounted() { mounted() {
this.$props.datas.extend ? this.extend = this.$props.datas.extend : null; this.$props.datas.extend ? this.extend = this.$props.datas.extend : null;
}, },
methods: { methods: {
navTo(url) { navTo(url) {
if (url) { if (url) {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
mask: true mask: true
}); });
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
success() { success() {
uni.hideLoading() uni.hideLoading()
} }
}) })
} else Toast('暂未开放') } else Toast('暂未开放')
}, },
clickTask() { clickTask() {
if (this.isTimeInRange()) return Toast('任务正在结算中'); if (this.isTimeInRange()) return Toast('任务正在结算中');
// if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) { // if ((this.$props.datas.type != 31) && this.$props.datas.status !== 2 && this.$props.datas.status !== 1) {
// return this.$props.datas.status == 3 ? Toast('!') : Toast('!'); // return this.$props.datas.status == 3 ? Toast('!') : Toast('!');
// } // }
if(this.navToTownServiceList.includes(this.$props.datas.type)) if (this.navToTownServiceList.includes(this.$props.datas.type))
return this.navTo(`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[0]}`); return this.navTo(
if(this.navToTownMarketList.includes(this.$props.datas.type)) `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[0]}`
return this.navTo(`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`); );
if(this.navToVillageList.includes(this.$props.datas.type)) if (this.navToTownMarketList.includes(this.$props.datas.type))
return this.navTo(`/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`); return this.navTo(
switch (this.$props.datas.type) { `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
case 31: );
if (this.$store.state.app.userInfo.admin_id) this.navTo( if (this.navToVillageList.includes(this.$props.datas.type))
`/subpkg/captain/captain?task_id=${this.$props.datas?.id}`); return this.navTo(
else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`); `/subpkg/townTask/townTask?task_id=${this.$props.datas?.id}&type_value=${this.taskRoleTypeList[1]}`
break; );
case 32: switch (this.$props.datas.type) {
this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`); case 31:
break; if (this.$store.state.app.userInfo.admin_id) this.navTo(
case 33: `/subpkg/captain/captain?task_id=${this.$props.datas?.id}`);
let is_show = true; else this.navTo(`/subpkg/archives/archives?task_id=${this.$props.datas?.id}`);
if (uni.$u.timeFormat(Date.now(), 'yyyy-mm-dd') != this.$props.datas?.end_time) is_show = false; break;
this.navTo(`/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}&is_show=${is_show}`); case 32:
break; this.navTo(`/subpkg/property/vehicle?task_id=${this.$props.datas?.id}`);
case 34: break;
this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`); case 33:
break; let is_show = true;
case 35: if (uni.$u.timeFormat(Date.now(), 'yyyy-mm-dd') != this.$props.datas?.end_time) is_show = false;
this.navTo(`/subpkg/buyShare/buyShare?task_id=${this.$props.datas?.id}`); this.navTo(
break; `/subpkg/blockTransaction/blockTransaction?task_id=${this.$props.datas?.id}&is_show=${is_show}`
case 47: );
this.navTo(`/subpkg/townTask/serviceTask4?task_id=${this.$props.datas?.id}`); break;
break; case 34:
case 60: this.navTo(`/subpkg/otherTask/otherTask?task_id=${this.$props.datas?.id}`);
this.navTo(`/subpkg/townTask/marketTask10?task_id=${this.$props.datas?.id}&stage=${this.$props.datas?.stage}`); break;
break; case 35:
case 67: this.navTo(`/subpkg/buyShare/buyShare?task_id=${this.$props.datas?.id}`);
this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`); break;
break; case 47:
case 69: this.navTo(`/subpkg/townTask/serviceTask4?task_id=${this.$props.datas?.id}`);
this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`); break;
break; case 60:
default: this.navTo(
this.navTo(''); `/subpkg/townTask/marketTask10?task_id=${this.$props.datas?.id}&stage=${this.$props.datas?.stage}`
break; );
} break;
}, case 67:
// this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
townService(type){ break;
return this.townServiceList.includes(type); case 69:
}, this.navTo(`/subpkg/townTask/villageTask6?task_id=${this.$props.datas?.id}`);
isTimeInRange() { break;
const now = new Date(); case 76:
const startTime = new Date(now.getTime()); this.navTo(`/subpkg/townTask/gatherRecords?task_id=${this.$props.datas?.id}`);
const endTime = new Date(now.getTime()); break;
default:
this.navTo('');
break;
}
},
//
townService(type) {
return this.townServiceList.includes(type);
},
isTimeInRange() {
const now = new Date();
const startTime = new Date(now.getTime());
const endTime = new Date(now.getTime());
// 22:55:00 // 22:55:00
startTime.setHours(22); startTime.setHours(22);
startTime.setMinutes(55); startTime.setMinutes(55);
startTime.setSeconds(0); startTime.setSeconds(0);
// 23:59:59 // 23:59:59
endTime.setHours(23); endTime.setHours(23);
endTime.setMinutes(59); endTime.setMinutes(59);
endTime.setSeconds(59); endTime.setSeconds(59);
// //
return now >= startTime && now <= endTime; return now >= startTime && now <= endTime;
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.c_task_item { .c_task_item {
margin: 0 auto; margin: 0 auto;
// margin-bottom: 28rpx; // margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
// background: #FFFFFF; // background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 39rpx; line-height: 39rpx;
.text { .text {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 39rpx; line-height: 39rpx;
margin-left: 18rpx; margin-left: 18rpx;
} }
.top { .top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 28rpx; padding: 28rpx;
border-bottom: 1rpx solid #f5f5f5ff; border-bottom: 1rpx solid #f5f5f5ff;
.left { .left {
display: flex; display: flex;
justify-content: left; justify-content: left;
align-items: center; align-items: center;
} }
.right { .right {
.icon { .icon {
width: 43rpx; width: 43rpx;
height: 43rpx; height: 43rpx;
} }
} }
} }
.bottom { .bottom {
padding: 28rpx; padding: 28rpx;
display: flex; display: flex;
.b_left { .b_left {
width: 103.39rpx; width: 103.39rpx;
height: 94.63rpx; height: 94.63rpx;
margin-right: 18rpx; margin-right: 18rpx;
} }
.b_right { .b_right {
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
flex-direction: column; flex-direction: column;
.item { .item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
// margin: 18rpx 28rpx 0 28rpx; // margin: 18rpx 28rpx 0 28rpx;
// &:last-child { // &:last-child {
// padding-bottom: 18rpx; // padding-bottom: 18rpx;
// } // }
.left { .left {
display: flex; display: flex;
} }
.right { .right {
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
color: #3274f9; color: #3274f9;
line-height: 39rpx; line-height: 39rpx;
.price { .price {
font-size: 25rpx; font-size: 25rpx;
} }
} }
} }
} }
} }
} }
.personnel_list { .personnel_list {
// padding: 28rpx 0; // padding: 28rpx 0;
padding-bottom: 28rpx; padding-bottom: 28rpx;
.cards { .cards {
margin: 0 auto; margin: 0 auto;
// margin-bottom: 28rpx; // margin-bottom: 28rpx;
width: 694rpx; width: 694rpx;
background: #ffffff; background: #ffffff;
border-radius: 30rpx; border-radius: 30rpx;
opacity: 1; opacity: 1;
overflow: hidden; overflow: hidden;
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6); // box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.cards_head { .cards_head {
padding: 28rpx; padding: 28rpx;
background-color: $theme-oa-color; background-color: $theme-oa-color;
color: white; color: white;
min-height: 100rpx; min-height: 100rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.cards_content { .cards_content {
padding: 28rpx; padding: 28rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
text-align: center; text-align: center;
// padding: 15rpx 25rpx; // padding: 15rpx 25rpx;
padding-top: 20rpx; padding-top: 20rpx;
width: 160rpx; width: 160rpx;
background-color: $theme-oa-color; background-color: $theme-oa-color;
color: white; color: white;
border-radius: 40rpx; border-radius: 40rpx;
.cir { .cir {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
background-color: #ffffff; background-color: #ffffff;
margin-left: 25rpx; margin-left: 25rpx;
border-radius: 120rpx; border-radius: 120rpx;
position: relative; position: relative;
} }
} }
.right { .right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
view { view {
text:nth-child(2) { text:nth-child(2) {
margin-left: 20rpx; margin-left: 20rpx;
} }
.status { .status {
display: inline-block; display: inline-block;
float: right; float: right;
color: white; color: white;
text-align: center; text-align: center;
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
} }
} }
} }
} }
.u_avatar { .u_avatar {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }
} }
</style> </style>

View File

@ -886,6 +886,24 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, {
"path": "townTask/townGather",
"style": {
"navigationBarTitleText": "养殖信息收集",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, {
"path": "townTask/gatherRecords",
"style": {
"navigationBarTitleText": "养殖信息收集",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
}, { }, {
"path": "complaint/complaint", "path": "complaint/complaint",
"style": { "style": {

View File

@ -62,12 +62,16 @@
通知时间:&nbsp;&nbsp;{{goodsDetil.logistics.create_time}} 通知时间:&nbsp;&nbsp;{{goodsDetil.logistics.create_time}}
</view> </view>
<view class="pro_list"> <view class="pro_list">
<text>
商品信息
</text>
<view class="goods"> <view class="goods">
<view class="goods_tit" v-for="(item,index) in goodsDetil.product"> <text>
<text style="flex: 8;">{{item.goods_name}}</text> 商品信息
</text>
<view class="goods-tit" style="align-items: center;"
v-for="(item,index) in goodsDetil.product" :key="index">
<text style="flex: 6;">{{item.goods_name}}</text>
<u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx"
height="100rpx" @click="click"></u--image>
<text style="flex: 2;">X{{item.product_num}}{{item.goods_unit}}</text> <text style="flex: 2;">X{{item.product_num}}{{item.goods_unit}}</text>
</view> </view>
</view> </view>
@ -78,6 +82,8 @@
<text>请详细核对订单信息</text> <text>请详细核对订单信息</text>
<text style="color: #0122C7;">共计{{goodsDetil.product_count}}件商品</text> <text style="color: #0122C7;">共计{{goodsDetil.product_count}}件商品</text>
</view> </view>
</view>
<view class="">
</view> </view>
@ -443,9 +449,10 @@
flex: 8; flex: 8;
margin: 0; margin: 0;
.goods_tit { .goods-tit {
margin: 0; margin: 0;
display: flex; display: flex;
justify-content: space-around;
} }

View File

@ -79,6 +79,9 @@
<view> <view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product"> <view class="goods_tit" v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text> <text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<!-- <u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx"
height="100rpx" @click="click"></u--image> -->
<text>X{{item.product_num}}{{item.goods_unit}}</text> <text>X{{item.product_num}}{{item.goods_unit}}</text>
</view> </view>
</view> </view>
@ -204,12 +207,16 @@
</view> </view>
<view class="pro_list"> <view class="pro_list">
<text style="color: #999;width: 15vw;">
商品信息
</text>
<view> <view>
<view class="goods_tit" v-for="(item,index) in goodsDetil.product"> <text style="color: #999;width: 15vw;">
商品信息
</text>
<view class="goods_tit" style="align-items: center;"
v-for="(item,index) in goodsDetil.product">
<text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text> <text style="width: 60vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx"
height="100rpx" @click="click"></u--image>
<text>X{{item.product_num}}{{item.goods_unit}}</text> <text>X{{item.product_num}}{{item.goods_unit}}</text>
</view> </view>
</view> </view>

View File

@ -1,259 +1,276 @@
<template> <template>
<view class=""> <view class="">
<view class="info"> <view class="info">
<view class="bg"></view> <view class="bg"></view>
<view class="card"> <view class="card">
<view class="title">充值信息</view> <view class="title">充值信息</view>
<view class="item"> <view class="item">
<text>充值账户</text> <text>充值账户</text>
<text>{{$store.state.app.userInfo.company.company_name||''}}</text> <text>{{$store.state.app.userInfo.company.company_name||''}}</text>
</view> </view>
<u-line style="margin: 20rpx 0;"></u-line> <u-line style="margin: 20rpx 0;"></u-line>
<view class="item"> <view class="item">
<text>收款公司</text> <text>收款公司</text>
<text>{{partyA.company_name}}</text> <text>{{partyA.company_name}}</text>
</view> </view>
<view class="item" @click="copyPhone(partyA.qualification.corporate_account, '对公账号')"> <view class="item" @click="copyPhone(partyA.qualification.corporate_account, '对公账号')">
<text>对公账号</text> <text>对公账号</text>
<text>{{partyA.qualification.corporate_account||'暂无信息'}}</text> <text>{{partyA.qualification.corporate_account||'暂无信息'}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="deposit-list"> <view class="deposit-list" style="padding-top: 30px;">
<view class="card" v-for="(item, index) in list"> <view class="card" v-for="(item, index) in list">
<view class="item"><view>创建时间:</view><view class="text">{{item.create_time}}</view></view> <view class="item">
<view class="item"><view>充值金额:</view><view class="text green">{{item.deposit}}</view></view> <view>创建时间:</view>
<view class="item" @click="previewVoucher(item.voucher)"><view>充值凭证:</view><view class="text blue">查看凭证</view></view> <view class="text" style="color: red;">{{item.create_time}}</view>
</view> </view>
</view> <view class="item">
<u-empty v-if="list.length==0&&loadConfig.status=='nomore'" icon="/static/img/empty/data.png" text="没有数据"></u-empty> <view>充值金额:</view>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText" <view class="text " style="color: red;">{{item.deposit}}</view>
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" /> </view>
</view> <view class="item" @click="previewVoucher(item.voucher)">
<view>充值凭证:</view>
<view class="text blue">查看凭证</view>
</view>
</view>
</view>
<u-empty v-if="list.length==0&&loadConfig.status=='nomore'" icon="/static/img/empty/data.png"
text="没有数据"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template> </template>
<script> <script>
import { Toast } from '@/libs/uniApi.js' import {
import { getPartyACompany, getDepositRechargeTransferVoucherList } from "@/api/company.js" Toast
export default { } from '@/libs/uniApi.js'
data() { import {
return { getPartyACompany,
partyA: { getDepositRechargeTransferVoucherList
id:"", } from "@/api/company.js"
company_name:"", export default {
qualification:{ data() {
corporate_account: "" return {
} partyA: {
}, id: "",
list: [], company_name: "",
loadConfig: { qualification: {
page: 1, corporate_account: ""
limit: 15, }
lastpage: '', },
loadingText: '努力加载中', list: [],
loadmoreText: '轻轻上拉', loadConfig: {
nomoreText: '我也是有底线的~~', page: 1,
status: 'loadmore' limit: 15,
}, lastpage: '',
} loadingText: '努力加载中',
}, loadmoreText: '轻轻上拉',
// nomoreText: '我也是有底线的~~',
onNavigationBarButtonTap(res){ status: 'loadmore'
if (res.index === 0) { },
uni.navigateTo({ }
url: '/subpkg/topUpList/topUpList' },
}) //
} onNavigationBarButtonTap(res) {
}, if (res.index === 0) {
onLoad(options) { uni.navigateTo({
this.loadPartyACompany(); url: '/subpkg/topUpList/topUpList'
this.initLoad(); })
}, }
onReachBottom() { },
this.loadList() onLoad(options) {
}, this.loadPartyACompany();
methods: { this.initLoad();
async loadPartyACompany(){ },
let res = await getPartyACompany(); onReachBottom() {
if(res.data.qualification){ this.loadList()
try{ },
res.data.qualification = JSON.parse(res.data.qualification); methods: {
}catch(e){ async loadPartyACompany() {
console.log(e); let res = await getPartyACompany();
} if (res.data.qualification) {
} try {
this.partyA = res.data; res.data.qualification = JSON.parse(res.data.qualification);
if(!this.partyA.qualification.corporate_account)this.partyA.qualification.corporate_account=""; } catch (e) {
}, console.log(e);
async initLoad() { }
this.loadConfig.page = 1; }
this.loadConfig.status = "loadmore"; this.partyA = res.data;
this.list = []; if (!this.partyA.qualification.corporate_account) this.partyA.qualification.corporate_account = "";
await this.loadList(); },
}, async initLoad() {
async loadList(){ this.loadConfig.page = 1;
if (this.loadConfig.status == "nomore") return; this.loadConfig.status = "loadmore";
this.loadConfig.status = "loading"; this.list = [];
let res = await getDepositRechargeTransferVoucherList({ await this.loadList();
page: this.loadConfig.page, },
limit: this.loadConfig.limit async loadList() {
}) if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loadmore" this.loadConfig.status = "loading";
if (res.data.data.length < this.loadConfig.limit) { let res = await getDepositRechargeTransferVoucherList({
this.loadConfig.status = "nomore" page: this.loadConfig.page,
} else { limit: this.loadConfig.limit
this.loadConfig.page++; })
} this.loadConfig.status = "loadmore"
this.list = [...this.list, ...res.data?.data] if (res.data.data.length < this.loadConfig.limit) {
}, this.loadConfig.status = "nomore"
previewVoucher(str=""){ } else {
if(str.substring(str.length-4, str.length)=='.pdf'){ // PDFPDF this.loadConfig.page++;
uni.navigateTo({ }
url: `/subpkg/pdfView/pdfView?url=${str}` this.list = [...this.list, ...res.data?.data]
}) },
}else { previewVoucher(str = "") {
uni.previewImage({ if (str.substring(str.length - 4, str.length) == '.pdf') { // PDFPDF
urls: [str], uni.navigateTo({
longPressActions: { url: `/subpkg/pdfView/pdfView?url=${str}`
itemList: ['保存图片'], })
success: function(data) { } else {
if (data.tapIndex === 0) { uni.previewImage({
uni.saveImageToPhotosAlbum({ urls: [str],
filePath: url, longPressActions: {
success: function() { itemList: ['保存图片'],
uni.showToast({ success: function(data) {
title: '保存成功', if (data.tapIndex === 0) {
icon: 'success' uni.saveImageToPhotosAlbum({
}) filePath: url,
}, success: function() {
fail: function() { uni.showToast({
uni.showToast({ title: '保存成功',
title: '保存失败', icon: 'success'
icon: 'none' })
}) },
} fail: function() {
}) uni.showToast({
} title: '保存失败',
} icon: 'none'
} })
}) }
} })
}, }
copyPhone(str = "", type = "号码") { }
if (str) uni.setClipboardData({ }
data: str + "", })
success: (e) => { }
Toast(type + '已复制') },
}, copyPhone(str = "", type = "号码") {
fail: (e) => { if (str) uni.setClipboardData({
Toast('复制失败') data: str + "",
} success: (e) => {
}) Toast(type + '已复制')
} },
}, fail: (e) => {
onPullDownRefresh() { Toast('复制失败')
this.initLoad().then(()=>{ }
setTimeout(()=>{ })
uni.stopPullDownRefresh() }
}, 500) },
}) onPullDownRefresh() {
} this.initLoad().then(() => {
} setTimeout(() => {
uni.stopPullDownRefresh()
}, 500)
})
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background-color: #fff; background-color: #fff;
} }
.info { .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: relative; position: relative;
height: 350rpx; height: 350rpx;
.bg { .bg {
background-color: $theme-oa-color; background-color: $theme-oa-color;
height: 200rpx; height: 200rpx;
width: 100vw; width: 100vw;
border-radius: 0rpx 0rpx 28rpx 28rpx; border-radius: 0rpx 0rpx 28rpx 28rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
} }
.card { .card {
width: 694rpx; width: 694rpx;
min-height: 180rpx; min-height: 180rpx;
background: #FFFFFF; background: #FFFFFF;
margin-top: 38.55rpx; margin-top: 38.55rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1); box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx; border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1; opacity: 1;
padding: 31.5rpx 28rpx; padding: 31.5rpx 28rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
position: absolute; position: absolute;
top: 0; top: 0;
.title { .title {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
padding-bottom: 10rpx; padding-bottom: 10rpx;
} }
.item { .item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
text:nth-child(1){
flex-shrink: 0;
margin-right: 18rpx;
}
}
}
}
.deposit-list{ text:nth-child(1) {
display: flex; flex-shrink: 0;
flex-direction: column; margin-right: 18rpx;
align-items: center; }
.card { }
width: 694rpx; }
min-height: 180rpx; }
background: #FFFFFF;
margin-bottom: 28rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.item{ .deposit-list {
font-size: 28rpx; display: flex;
display: flex; flex-direction: column;
justify-content: left; align-items: center;
.text{ .card {
margin-left: 12rpx; width: 694rpx;
color: #999; min-height: 180rpx;
} background: #FFFFFF;
margin-bottom: 28rpx;
box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(50, 116, 249, 0.1);
border-radius: 14rpx 14rpx 14rpx 14rpx;
opacity: 1;
padding: 31.5rpx 28rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.green{ .item {
color: #4cd964; font-size: 28rpx;
} display: flex;
justify-content: left;
.blue{ .text {
color: #0122c7; margin-left: 12rpx;
} color: #999;
} }
}
} .green {
color: #4cd964;
}
.blue {
color: #0122c7;
}
}
}
}
</style> </style>

View File

@ -0,0 +1,216 @@
<template>
<view class="personnel_list">
<u-tabs style="background-color: #fff;" :list="tabLists" @click="changeTypeCurrent" lineColor='#0022C7'
lineWidth='40' inactiveStyle='color:#0022C7' activeStyle="color:#0022C7"></u-tabs>
<view class="" style="height: 20rpx;">
</view>
<view class="card" v-for="(item,index) in gatherList" :key="index" v-show="page==1"
@click="navgo(`/subpkg/townTask/townGather?type=plant&task_id=${task_id}&index=${index}`)">
<view class="card_head">
<view class="">
养植信息
</view>
<view class="">
点击查看
</view>
</view>
<view class="card_content" @click="navgo(`/subpkg/townTask/townGather?type=supply&task_id=${task_id}`)">
<view class="" style="margin-bottom: 20rpx;">
法人姓名: {{item.planting[0].entityName}}
</view>
<view class="">
联系电话: {{item.planting[0].phone}}
</view>
</view>
</view>
<view class="card" v-for="(item,index) in gatherList" :key="index" v-show="page==2">
<view class="card_head">
<view class="">
批发商信息
</view>
<view class="">
点击查看
</view>
</view>
<view class="card_content">
<view class="" style="margin-bottom: 20rpx;">
店主姓名: {{item.supply[0].storeName}}
</view>
<view class="">
联系电话: {{item.supply[0].shopkeeperPhone}}
</view>
</view>
</view>
<u-popup :show="show" @close="close" :round="10" mode="center" @open="open">
<view style="padding: 20rpx;">
<u-button type="primary" @click="navgo(`/subpkg/townTask/townGather?type=plant&task_id=${task_id}`)"
style="margin-bottom: 20rpx;" color="#0122C7" text="养殖基地信息"></u-button>
<u-button type="primary" @click="navgo(`/subpkg/townTask/townGather?type=supply&task_id=${task_id}`)"
text="批发商信息" color="#0122C7"></u-button>
</view>
</u-popup>
<mybtn text="新建信息收集" @click="show=true">
</mybtn>
</view>
</template>
<script>
import mybtn from "@/components/mybtn/mybtn.vue"
import {
townMasterTask3List
} from "@/api/task.js"
export default {
data() {
return {
show: false,
gatherList: [],
page: 1,
task_id: "",
tabLists: [{
name: '镇种养殖基地信息收集表',
id: 1
}, {
name: '镇批发商信息收集表',
id: 2
}, ],
}
},
onLoad(option) {
this.task_id = option.task_id
townMasterTask3List({
id: option.task_id
}).then(res => {
this.gatherList = res.data.template_info.extend.purchase_sales_info
})
// townTask3List()
},
methods: {
open() {
this.show = true
},
close() {
this.show = false
},
navgo(url) {
uni.navigateTo({
url
})
},
changeTypeCurrent(e) {
this.page = e.id
// if(e.)
console.log(e.id)
}
}
}
</script>
<style lang="scss">
.new_btn {
position: fixed;
bottom: 28rpx;
left: 50%;
transform: translate(-50%);
margin-top: 32rpx;
// margin-bottom: 40rpx;
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.personnel_list {
margin-bottom: 130rpx;
.card {
margin: 0 auto;
margin-bottom: 28rpx;
width: 694rpx;
background: #ffffff;
border-radius: 30rpx;
opacity: 1;
overflow: hidden;
// box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
.card_head {
padding: 28rpx;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.card_content {
padding: 28rpx;
.left {
text-align: center;
// padding: 15rpx 25rpx;
padding-top: 20rpx;
width: 160rpx;
// background-color: $theme-oa-color;
color: white;
// border-radius: 40rpx;
.cir {
width: 120rpx;
height: 120rpx;
background-color: #ffffff;
margin-left: 25rpx;
// border-radius: 120rpx;
position: relative;
}
}
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
view {
text:nth-child(2) {
margin-left: 20rpx;
}
}
}
}
.u_avatar {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
</style>

View File

@ -0,0 +1,638 @@
<template>
<view class="content">
<view class="tit">
<text v-if="page">养殖信息</text>
<text v-else>镇批发商信息收集表</text>
</view>
<!-- 镇种养殖基地信息收集表 -->
<view class="card" v-if="page">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="breedingForm">
<u-form-item labelWidth="auto" label="法人姓名" required prop="entityName" borderBottom>
<u--input :readonly="readonly" v-model="formData.entityName" placeholder="请输入法人姓名"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="联系方式" required prop="phone" borderBottom>
<u--input :readonly="readonly" v-model="formData.phone" placeholder="请输入联系方式"
type="number"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="员工人数" borderBottom>
<u--input :readonly="readonly" v-model="formData.employee" placeholder="请输入员工人数"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="耕地总面积" borderBottom>
<u--input :readonly="readonly" v-model="formData.arableLand" placeholder="请输入员工人数"></u--input>
</u-form-item>
<view class="">
<u-form-item labelWidth="auto" labelPosition="top" label="土地规划" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.breeding_company" style="margin: 16rpx;">
<view class="" style="display: flex;justify-content: space-between;flex-wrap: wrap;">
<u-radio :customStyle="{marginRight: '16px',overflow: 'auto',marginBottom:'16rpx'}"
v-for="(item, index) in [{value:'0',label:'自己种'},{value:'1',label:'出租'},{value:'2',label:'代种养'},{value:'3',label:'租更多地扩大种殖'}]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</view>
</u-radio-group>
</u-form-item>
</view>
<u-form-item labelWidth="auto" label="有无养殖培训" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.breeding_training" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="现代化程度(%)" borderBottom>
<u--input :readonly="readonly" v-model="formData.modernization" placeholder="请输入现代化程度(%)"
type="number" maxlength="3"></u--input>
</u-form-item>
<picker :range="breedingTypeList" range-key="name" :disabled="readonly" mode="selector"
@change="changeBreeding">
<u-form-item labelWidth="auto" label="种养殖类型" borderBottom>
<u--input :value="breedingName" style="pointer-events: none;" placeholder="请选择养殖类型" disabled
disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</picker>
<u-form-item labelWidth="auto" label="面积" borderBottom>
<u--input :readonly="readonly" v-model="formData.area" placeholder="请输入面积"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="农资农具使用情况" borderBottom>
<u--input :readonly="readonly" v-model="formData.farm_tools" placeholder="请输入面积"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="是否生态养殖" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.ecological_farming" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_begin_time'">
<u-form-item labelWidth="auto" label="种植开始时间" borderBottom>
<u--input :value="formData.breeding_begin_time" style="pointer-events: none;"
placeholder="请选择养殖开始时间" disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'breeding_time'">
<u-form-item labelWidth="auto" label="成熟时间" borderBottom>
<u--input :value="formData.breeding_time" style="pointer-events: none;" placeholder="请选择养殖开始时间"
disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</picker>
<picker mode="date" @change="changeDate" :disabled="readonly" :data-value="'mature_time'">
<u-form-item labelWidth="auto" label="上市时间" borderBottom>
<u--input :value="formData.mature_time" style="pointer-events: none;" placeholder="请选择上市时间"
disabled disabledColor="#fff"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
</picker>
<u-form-item labelWidth="auto" label="产量(斤)" borderBottom>
<u--input :readonly="readonly" v-model="formData.yield" placeholder="请输入产量(斤)"
type="number"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="预售卖价格(元/500g)" borderBottom>
<u--input :readonly="readonly" v-model="formData.pre_price" placeholder="请输入预售卖价格"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="预计收益(元)" borderBottom>
<u--input :readonly="readonly" v-model="formData.estimated_income" placeholder="请输入预计收益(元)"
type="number"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="销售渠道" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.salesChannels" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'自销'},{value:'0',label:'定点'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无加工仓储" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.processing_storage" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无宣传推广" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.promote" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无运输" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.transportation" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="是否有扩大经营需求" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.isExpandOperations" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'是'},{value:'0',label:'否'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="种养殖述求" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.request" autoHeight placeholder="请输入您的述求"
border="surround" count></u--textarea>
</u-form-item>
<u-form-item labelWidth="auto" label="是否有政策补贴" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.isPolicySubsidies" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无公益拍卖品" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.isLots" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无需求的公益拍卖品" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData.isNeedLots" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="家庭情况说明" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.family" autoHeight placeholder="请输入"
border="surround" count></u--textarea>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="家庭总述求" borderBottom>
<u--textarea :disabled="readonly" v-model="formData.familyNotes" autoHeight placeholder="请输入"
border="surround" count></u--textarea>
</u-form-item>
<u-button type="primary" text="提交" @click="confirm1" color="#0122C7"></u-button>
</u--form>
</view>
<!-- 镇批发商信息收集表 -->
<view class="card" v-show='!page'>
<u--form labelPosition="left" :model="formData1" :rules="rules1" ref="breedingForm1">
<u-form-item labelWidth="auto" label="店铺名称" required prop="storeName" borderBottom>
<u--input :readonly="readonly" v-model="formData1.storeName" placeholder="请输入店铺名称"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="经营类型" required prop="type" borderBottom>
<u--input :readonly="readonly" v-model="formData1.type" placeholder="请输入经营类型"
type="number"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="店主姓名" required prop="shopkeeperName" borderBottom>
<u--input :readonly="readonly" v-model="formData1.shopkeeperName" placeholder="请输入店主姓名"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="店主性别" required prop="arableLand" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.shopkeeperSex" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'男'},{value:'0',label:'女'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店主年龄" required prop="shopkeeperAge" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.shopkeeperAge"
placeholder="请输入店主姓名"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="联系方式" required prop="shopkeeperPhone" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.shopkeeperPhone"
placeholder="请输入联系方式"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺地址" borderBottom>
<u--input :readonly="readonly" v-model="formData1.address" placeholder="请输入地址"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="面积" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.area"
placeholder="请输入地址"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="经营年限" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.storeAge"
placeholder="请输入经营年限"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="人数" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.Number"
placeholder="请输入人数"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺规模" required prop="storeScale" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.storeScale" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'0',label:'批发'},{value:'1',label:'零售'},{value:'2',label:'独家经营'}]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺规模排名" required prop="storeRanking" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.storeRanking" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'0',label:'前3'},{value:'1',label:'居中'},{value:'2',label:'小规模'}]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺影响力" required prop="Influence" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.Influence" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'0',label:'大'},{value:'1',label:'中'},{value:'2',label:'小'}]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="店铺年营收" required prop="revenue" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.revenue" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px',}"
v-for="(item, index) in [{value:'0',label:'10万以下'},{value:'1',label:'10-30万'},{value:'2',label:'30万以上'}]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺产权" required prop="propertyRights" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.propertyRights" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'0',label:'自有'},{value:'1',label:'租赁'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺归属" required prop="ascription" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.ascription" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px',}"
v-for="(item, index) in [{value:'0',label:'私有'},{value:'1',label:'合伙'},{value:'2',label:'加盟'},{value:'3',label:'国有'},]"
:key="index" :label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="店铺进货渠道" borderBottom>
<u--input :readonly="readonly" type='number' v-model="formData1.incomingChannels"
placeholder="请输入进货渠道"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="有无仓储" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.isWarehousing" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无冻库" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.isColdStorage" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无入驻其他平台" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.isSettled" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="现代文化程度" borderBottom>
<u--input :readonly="readonly" v-model="formData1.Education" placeholder="请输入文化程度"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" label="有无宣传推广" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.isPublicize" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="有无运输" borderBottom>
<u-radio-group :disabled="readonly" v-model="formData1.isTransport" style="margin: 16rpx;">
<u-radio :customStyle="{marginRight: '16px'}"
v-for="(item, index) in [{value:'1',label:'有'},{value:'0',label:'无'}]" :key="index"
:label="item.label" :name="item.value">
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item labelWidth="auto" label="主要供给明细" borderBottom>
<u--input :readonly="readonly" v-model="formData1.supply" placeholder="请输入供给明细"></u--input>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="店铺述求" required prop="notes" borderBottom>
<u--textarea :disabled="readonly" v-model="formData1.notes" autoHeight placeholder="请输入"
border="surround" count></u--textarea>
</u-form-item>
<u-form-item labelWidth="auto" labelPosition="top" label="综合描述与分析" required prop="description"
borderBottom>
<u--textarea :disabled="readonly" v-model="formData1.description" autoHeight placeholder="请输入"
border="surround" count></u--textarea>
</u-form-item>
<view class="" style="height: 20rpx;">
</view>
<u-button type="primary" text="提交" @click="confirm" color="#0122C7"></u-button>
</u--form>
</view>
</view>
</template>
<script>
import {
townMasterTask3Commit,
townMasterTask3List
} from "@/api/task.js"
export default {
props: {
datas: {
type: Object,
default: null
},
update_time: {
type: String,
default: null
}
},
data() {
return {
page: 1,
taskId: "",
readonly: false,
landPlanList: ['自己养', '出租', '代养', '租更多地扩大养殖'],
breedingTypeList: [{
id: 1,
name: "水产"
},
{
id: 2,
name: "禽类"
},
{
id: 3,
name: "大型动物"
},
],
formData: {
"entityName": "",
phone: "",
employee: "",
arableLand: "",
"breeding_training": 1, //
"breeding_type": "", //
"area": "", //
breeding_begin_time: "",
"breeding_time": "", //
"mature_time": "", //
"yield": "", //
salesChannels: "",
isExpandOperations: "", //
request: "", //
isPolicySubsidies: "", //
isLots: "", //
isNeedLots: "", //
family: "",
familyNotes: "",
"farm_tools": "", //使
"ecological_farming": "", //
"modernization": "", //
"processing_storage": "", //
"promote": "", //广
"transportation": "", //
},
formData1: {
storeName: "",
type: "",
shopkeeperName: "",
shopkeeperSex: "",
shopkeeperAge: "",
shopkeeperPhone: "",
address: "",
area: "",
storeAge: "",
Number: "",
storeScale: "",
storeRanking: "",
Influence: "",
revenue: "",
propertyRights: "",
ascription: "",
incomingChannels: "",
isWarehousing: "",
isColdStorage: "",
isSettled: "",
Education: "",
isPublicize: "",
isTransport: "",
supply: "",
notes: "",
description: ""
},
rules: {
},
rules1: {
}
}
},
onLoad(option) {
if (option.type == 'supply') this.page = 0
if (option.index) {
townMasterTask3List({
id: option.task_id
}).then(res => {
this.formData = res.data.template_info.extend.purchase_sales_info[option[index]].planting[0]
this.formData1 = res.data.template_info.extend.purchase_sales_info[option[index]].supply[0]
console.log(res.data.template_info.extend.purchase_sales_info[0].supply[0])
})
}
// }
this.taskId = option.task_id
},
created() {
this.initRules();
// if (this.$props.readonly && this.$props.datas) {
// this.formData = this.$props.datas;
// let keys = Object.keys(this.formData);
// keys.forEach(item => {
// if (!isNaN(this.formData[item]) && this.formData[item] != '' && this.formData[item] != null &&
// this
// .formData[item] != undefined) {
// parseFloat(this.formData[item]) != 'NaN' ? this.formData[item] = parseFloat(this.formData[
// item]) : null;
// }
// })
// }
},
computed: {
breedingName() {
return this.breedingTypeList.find((item) => item.id == this.formData.breeding_type)?.name;
}
},
methods: {
//
initRules() {
let arr = Object.keys(this.formData);
let arr1 = Object.keys(this.formData1);
let white = ['demand', 'policy_subsidies'];
arr = arr.filter(item => {
return !white.includes(item);
})
arr1 = arr1.filter(item => {
return !white.includes(item);
})
arr.forEach(key => {
this.rules[key] = {
validator: (rule, value, callback) => {
this.$refs.breedingForm.clearValidate(rule.field);
value.trim() !== '' ? callback() : callback('不能为空');
},
trigger: ['change', 'blur']
}
})
arr1.forEach(key => {
this.rules1[key] = {
validator: (rule, value, callback) => {
this.$refs.breedingForm1.clearValidate(rule.field);
value.trim() !== '' ? callback() : callback('不能为空');
},
trigger: ['change', 'blur']
}
})
},
//
async validate() {
return await this.$refs.breedingForm.validate();
},
async validate1() {
return await this.$refs.breedingForm1.validate();
},
//
changeBreeding(e) {
// let index = e.currentTarget.dataset.index;
this.formData.breeding_type = this.breedingTypeList[e.detail.value].id;
},
//
changeDate(e) {
let data = e.currentTarget.dataset;
this.formData[data.value] = e.detail.value;
},
async commit() {
await townMasterTask3Commit({
id: Number(this.taskId),
purchase_sales_info: {
planting: [{
...this.formData
}],
supply: [{
...this.formData1
}]
}
})
setTimeout(() => {
uni.navigateBack()
}, 1000)
},
async nextFormFn() {
await this.validate()
this.page = 0
},
async confirm1() {
await this.validate()
this.commit()
},
async confirm() {
await this.validate1()
this.commit()
}
},
}
</script>
<style lang="scss">
.card {
background-color: #fff;
margin: 28rpx;
padding: 28rpx;
margin-top: 0;
padding-top: 0;
border-radius: 0 0 14rpx 14rpx;
}
.tit {
margin: 28rpx 28rpx 0 28rpx;
padding: 28rpx 28rpx 0 28rpx;
border-radius: 14rpx 14rpx 0 0;
background-color: $theme-oa-color;
color: white;
height: 100rpx;
display: flex;
justify-content: space-between;
}
.title {
font-weight: 500;
font-size: 34rpx;
&::before {
width: 8rpx;
height: 26rpx;
border-radius: 4rpx;
background-color: #0122c7;
content: "";
display: inline-block;
margin-right: 8rpx;
}
}
.delete {
margin: 22rpx 0;
// margin-bottom: 40rpx;
width: 100%;
height: 64rpx;
line-height: 64rpx;
background: #f56c6c;
border-radius: 14rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
}
.plus {
margin: 22rpx 0;
// margin-bottom: 40rpx;
width: 100%;
height: 64rpx;
line-height: 64rpx;
background: $theme-oa-color;
border-radius: 14rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
}
</style>