1175 lines
32 KiB
Vue
1175 lines
32 KiB
Vue
<template>
|
||
<!-- <div class="dirRepInfo">dirRepInfo</div> -->
|
||
<view class="page">
|
||
<view class="page-head">
|
||
<view class="title">{{ queryParams.baseYear }}直报数据</view>
|
||
<view class="text">
|
||
<text>准确及时更新经营主体直报信息,\n</text>
|
||
<text>获取农业扶持、点对点补贴、农业服务、技能培训等支持</text>
|
||
</view>
|
||
</view>
|
||
<view class="tip">
|
||
完成上一年直报中心必填字段的填写,才有资格进入主体认证审核流程哦。
|
||
<a>填报规则</a>
|
||
</view>
|
||
<view class="page-body">
|
||
<block v-for="(item, index) in listToFillOut" :key="index">
|
||
<view class="card" v-if="item.show === true">
|
||
<navigator class="card-title" url="#">
|
||
<navigator url="#" class="navigator-text">
|
||
<text v-if="item.required === true" class="required">*</text>
|
||
<text>{{ item.label }}</text>
|
||
</navigator>
|
||
<navigator v-if="datas[item.name] !== undefined && lists[item.name] !== undefined && haveEnterprise === true"
|
||
url="#" @click="more(item)" class="navigator-arrow">
|
||
<text> {{ "更多" }} </text>
|
||
</navigator>
|
||
</navigator>
|
||
<view class="card-body" v-if="datas[item.name] !== undefined && haveEnterprise === true">
|
||
<block v-for="(CItem, index) in childInfoList[item.name]" :key="index">
|
||
<view class="child-info-item" v-if="childInfoList[item.name].length > 0 &&
|
||
CItem.show !== undefined &&
|
||
CItem.show === true &&
|
||
datas[item.name][CItem.name] !== undefined &&
|
||
datas[item.name][CItem.name] !== null &&
|
||
datas[item.name][CItem.name] !== ''
|
||
">
|
||
<view class="label">
|
||
<text>{{ CItem.label }}</text>
|
||
</view>
|
||
<view class="residual_width_scroll">
|
||
<scroll-view scroll-x="true" class="baseInfoData data" v-if="CItem['dictType'] === undefined">
|
||
<text>{{ certificationValue(CItem.name,datas[item.name][CItem.name])}}</text>
|
||
</scroll-view>
|
||
<scroll-view scroll-x="true" class="baseInfoData data" v-else>
|
||
<template v-for="(dictItem, dictIndex) in dictLists[
|
||
CItem['dictType']
|
||
]">
|
||
<view :key="dictIndex" v-if="dictItem.value === datas[item.name][CItem.name]">
|
||
<text>
|
||
{{ dictItem.label }}
|
||
</text>
|
||
</view>
|
||
</template>
|
||
</scroll-view>
|
||
<text class="unit">
|
||
<text>{{ CItem.unit }}</text>
|
||
</text>
|
||
</view>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
<navigator class="card-create-info" @click="navigator(item), (userManipulate.do = '新增')" url="#" v-else>
|
||
<navigator url="#" class="navigator-text">
|
||
<text>+</text>
|
||
<text>新增信息</text>
|
||
</navigator>
|
||
</navigator>
|
||
</view>
|
||
</block>
|
||
</view>
|
||
<uni-popup ref="morePopup" background-color="#fff">
|
||
<view class="more-popup-view">
|
||
<button :plain="true" @click="navigator(selectedItem), (userManipulate.do = '修改')" style="border: 0px">
|
||
<text>{{ "修" + " " + "改" }}</text>
|
||
</button>
|
||
<button :plain="true" @click="handlerDel(), (userManipulate.do = '删除')" style="border: 0px">
|
||
<text>{{ "删" + " " + "除" }}</text>
|
||
</button>
|
||
<button :plain="true" style="border: 0px" @click="navigator(selectedItem, true), (userManipulate.do = '新增')">
|
||
<text>{{ "新增" + " " + selectedItem.label + " " + "信息" }}</text>
|
||
</button>
|
||
<button :plain="true" style="border: 0px" @click="openListPopup()">
|
||
<text>{{
|
||
"选择" + " " + "历史" + selectedItem.label + " " + "信息"
|
||
}}</text>
|
||
</button>
|
||
</view>
|
||
</uni-popup>
|
||
<uni-popup ref="listPopup" background-color="#fff">
|
||
<view class="list-popup-title">
|
||
<view class="title">
|
||
<text>{{
|
||
"选择" + " " + "历史" + selectedItem.label + " " + "信息"
|
||
}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="list-popup-view">
|
||
<scroll-view :scroll-x="true" :scroll-y="true">
|
||
<view class="table-head">
|
||
<uni-row class="table-row" :gutter="tableGutter">
|
||
<template v-for="(item, index) in childInfoList[selectedItem.name]">
|
||
<uni-col style="" :span="5" :key="index" v-if="item.thShow === true">
|
||
<scroll-view :scroll-x="true" class="table-col">
|
||
<text>{{ item.label }}</text>
|
||
</scroll-view>
|
||
<view class="unit" v-if="item.label !== item.unit && item.unit !== undefined">
|
||
<text>{{ item.unit }}</text>
|
||
</view>
|
||
</uni-col>
|
||
</template>
|
||
</uni-row>
|
||
</view>
|
||
<view class="table-body" v-if="lists[selectedItem.name] !== undefined">
|
||
<template v-for="(rowItem, rowIndex) in lists[selectedItem.name]">
|
||
<uni-row :key="rowIndex" :gutter="tableGutter" class="table-row"
|
||
@click.native="tableRowClick(rowItem, rowIndex)">
|
||
<template v-for="(colItem, colIndex) in childInfoList[
|
||
selectedItem.name
|
||
]">
|
||
<!-- <view class="table-col" :key="index"> -->
|
||
<uni-col :span="5" :key="colIndex" v-if="colItem.thShow === true">
|
||
<view class="table-col" v-if="colItem['dictType'] === undefined">
|
||
<scroll-view scroll-x="true" class="baseInfoData">
|
||
<text>{{ rowItem[colItem.name] }}</text>
|
||
</scroll-view>
|
||
</view>
|
||
<view class="table-col" v-else>
|
||
<scroll-view scroll-x="true" class="baseInfoData">
|
||
<template v-for="(dictItem, dictIndex) in dictLists[
|
||
colItem['dictType']
|
||
]">
|
||
<view :key="dictIndex" v-if="dictItem.value === rowItem[colItem.name]">
|
||
<text>
|
||
{{ dictItem.label }}
|
||
</text>
|
||
</view>
|
||
</template>
|
||
</scroll-view>
|
||
</view>
|
||
</uni-col>
|
||
</template>
|
||
</uni-row>
|
||
</template>
|
||
</view>
|
||
<view class="empty" v-else>{{ "暂无数据" }}</view>
|
||
</scroll-view>
|
||
</view>
|
||
</uni-popup>
|
||
</view>
|
||
</template>
|
||
|
||
<style lang="scss" scoped>
|
||
@import url("@/static/scss/form.scss");
|
||
|
||
.page-head {
|
||
height: 50vw;
|
||
position: relative;
|
||
background: url("../../../static/images/accounts/zZUkcR.jpg") no-repeat;
|
||
-moz-background-size: 100% 100%;
|
||
background-size: 180% auto;
|
||
background-position: 50% 10%;
|
||
color: white;
|
||
padding: 15% 25px;
|
||
}
|
||
|
||
.page-head::before {
|
||
content: "";
|
||
width: 100%;
|
||
height: 100%;
|
||
position: absolute;
|
||
backdrop-filter: blur(5px);
|
||
top: 0px;
|
||
left: 0px;
|
||
}
|
||
|
||
.page-body {
|
||
background-color: transparent;
|
||
padding: 0px;
|
||
border: 0px;
|
||
padding:0 10px;
|
||
}
|
||
|
||
.title {
|
||
position: relative;
|
||
font-size: 24px;
|
||
}
|
||
|
||
/* 提示 */
|
||
.tip {
|
||
color: #999;
|
||
margin: 15px;
|
||
font-size: 11px;
|
||
}
|
||
|
||
.item {
|
||
margin-top: 10px;
|
||
}
|
||
|
||
.text text {
|
||
position: relative;
|
||
font-size: 10.5px;
|
||
}
|
||
|
||
.card {
|
||
padding: 0px 5px 0px 5px;
|
||
margin-top: 20px;
|
||
background-color: white;
|
||
border-top: #eee 1px solid;
|
||
border-bottom: #eee 1px solid;
|
||
}
|
||
|
||
.card-title {
|
||
padding-top: 10px;
|
||
padding-bottom: 40px;
|
||
display: flex;
|
||
justify-content: space-evenly;
|
||
height: 30px;
|
||
line-height: 30px;
|
||
align-self: center;
|
||
}
|
||
|
||
.card-title::after {
|
||
content: "";
|
||
position: absolute;
|
||
border-bottom: 1px #dadada solid;
|
||
width: 100%;
|
||
margin-top: 40px;
|
||
}
|
||
|
||
.card-title .navigator-arrow {
|
||
color: green;
|
||
text-align: right;
|
||
margin-top: 16px;
|
||
}
|
||
|
||
.card-title .navigator-arrow::after {
|
||
right: 2px;
|
||
border-color: green;
|
||
margin-top: -6px;
|
||
}
|
||
|
||
.card-body {
|
||
padding: 5px;
|
||
padding-bottom: 10px;
|
||
}
|
||
|
||
.child-info-item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
|
||
.residual_width_scroll {
|
||
overflow: scroll;
|
||
|
||
.baseInfoData {
|
||
width: 100%;
|
||
text-align: right;
|
||
padding-top: 2px;
|
||
// font-size: 15px;
|
||
align-self: center;
|
||
white-space: nowrap;
|
||
overflow: scroll;
|
||
margin-left: 20px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.child-info-item>view {
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
.child-info-item .label {
|
||
color: #666;
|
||
}
|
||
|
||
.data {
|
||
text-align: right;
|
||
padding-top: 2px;
|
||
// font-size: 15px;
|
||
align-self: flex-end;
|
||
}
|
||
|
||
.unit {
|
||
color: #777;
|
||
float: right;
|
||
}
|
||
|
||
.card-create-info {
|
||
padding-top: 30px;
|
||
padding-bottom: 30px;
|
||
display: flex;
|
||
justify-content: center;
|
||
width: 100%;
|
||
}
|
||
|
||
.card-create-info .navigator-text {
|
||
padding: 7px 15px 10px 15px;
|
||
display: flex;
|
||
justify-content: center;
|
||
margin: auto;
|
||
border-radius: 8px;
|
||
border: 1px green solid;
|
||
color: green;
|
||
flex: none;
|
||
}
|
||
|
||
.list-popup-title {
|
||
width: 100%;
|
||
height: 10vw;
|
||
display: flex;
|
||
justify-content: space-around;
|
||
align-items: center;
|
||
|
||
.title {
|
||
font-size: 5vw;
|
||
}
|
||
}
|
||
|
||
.list-popup-view {
|
||
padding: 5vw 0px 5vw 0px;
|
||
// max-height: 50vw;
|
||
|
||
.empty {
|
||
width: 100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
color: #999;
|
||
}
|
||
|
||
scroll-view {
|
||
max-height: 40vw;
|
||
|
||
.table-row {
|
||
height: 7vw;
|
||
display: flex;
|
||
justify-content: space-around;
|
||
align-items: center;
|
||
|
||
.uni-col {
|
||
display: flex;
|
||
justify-content: center;
|
||
|
||
.unit {
|
||
display: flex;
|
||
// width: 100%;
|
||
}
|
||
}
|
||
|
||
.table-col {
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-align: center;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
</style>
|
||
|
||
<script>
|
||
import { listManagement, delManagement } from "@/api/enterprise/management";
|
||
import { selectUserEntity } from "@/api/enterprise/userEntity";
|
||
import {
|
||
listLandManagement,
|
||
delLandManagement,
|
||
} from "@/api/enterprise/landManagement";
|
||
import {
|
||
listBusinessItems,
|
||
delBusinessItems,
|
||
} from "@/api/enterprise/businessItems";
|
||
import {
|
||
listMainProductsSales,
|
||
delMainProductsSales,
|
||
} from "@/api/enterprise/mainProductsSales";
|
||
import { listSubsidy, delSubsidy } from "@/api/lef/subsidy";
|
||
|
||
export default {
|
||
props: {},
|
||
name: "dirRepInfo",
|
||
components: {},
|
||
computed: {},
|
||
methods: {
|
||
// 判断是否为认证证明字段,并且改变改字段的显示值
|
||
certificationValue(v1,items){
|
||
if(v1 == 'authenticationUrl'){
|
||
if( items !== ''){
|
||
return '是'
|
||
}else{
|
||
return '否'
|
||
}
|
||
}else{
|
||
return items
|
||
}
|
||
},
|
||
traverseLists() {
|
||
for (let item of this.listToFillOut) {
|
||
if (item.show === true) {
|
||
this.getList(item.name);
|
||
}
|
||
}
|
||
},
|
||
getList(name) {
|
||
const dataName = name;
|
||
this["get_" + dataName + "List"]();
|
||
},
|
||
async loadRecord() {
|
||
const REC_SHOW_K = this.recordShowKeys;
|
||
if (
|
||
JSON.stringify(REC_SHOW_K) !== "{}" &&
|
||
Object.keys(REC_SHOW_K).length !== 0
|
||
)
|
||
for (let recName in REC_SHOW_K) {
|
||
this.$set(
|
||
this.datas,
|
||
[recName],
|
||
this.lists[recName][REC_SHOW_K[recName].key]
|
||
);
|
||
switch (recName) {
|
||
case "subsidy":
|
||
this.$set(
|
||
this.datas.subsidy,
|
||
["id"],
|
||
this.datas.subsidy.subsidyId
|
||
);
|
||
break;
|
||
}
|
||
}
|
||
this.isLoadRecord = false;
|
||
},
|
||
tableRowClick(item, index) {
|
||
this.$refs.listPopup.close();
|
||
this.datas[this.selectedItem.name] = item;
|
||
this.recordShowKeys[this.selectedItem.name] = { key: index };
|
||
},
|
||
openListPopup() {
|
||
this.$refs.morePopup.close();
|
||
this.$refs.listPopup.open("bottom");
|
||
},
|
||
more(item) {
|
||
this.userManipulate.beBeing = item.name;
|
||
this.selectedItem = item;
|
||
this.getList(item.name);
|
||
this.$refs.morePopup.open("bottom");
|
||
},
|
||
getMsg(yes_no) {
|
||
if (yes_no === true) {
|
||
this.$modal.msgSuccess("新增成功");
|
||
} else if (yes_no === false) {
|
||
this.$modal.msgSuccess("修改成功");
|
||
}
|
||
},
|
||
async initializeDict() {
|
||
this.dictByType("sys_land_type");
|
||
this.dictByType("sys_management_type");
|
||
this.dictByType("sys_yes_no");
|
||
this.dictByType("subsidy_type");
|
||
},
|
||
dictByType(type) {
|
||
this.getDicts(type).then((response) => {
|
||
let dicts = [];
|
||
for (let dict of response.data) {
|
||
let element = {};
|
||
element["value"] = dict.dictValue;
|
||
element["text"] = dict.dictLabel;
|
||
element["label"] = dict.dictLabel;
|
||
dicts.push(element);
|
||
}
|
||
this.$set(this.dictLists, type, dicts);
|
||
});
|
||
},
|
||
async getEnterprise() {
|
||
selectUserEntity().then((response) => {
|
||
this.options = response.data;
|
||
if (response.data.length !== 0) {
|
||
this.haveEnterprise = true;
|
||
} else {
|
||
this.haveEnterprise = false;
|
||
}
|
||
});
|
||
},
|
||
confirmCreateEnterPrise() {
|
||
this.$modal.confirm("请先创建经营主体").then((res) => {
|
||
if (res === true) {
|
||
this.$tab.navigateTo("/pages/formPages/enterprise/baseInfo/index");
|
||
}
|
||
});
|
||
},
|
||
navigator(item, isNew) {
|
||
if (this.haveEnterprise === true) {
|
||
if (
|
||
this.datas[item.name] === undefined ||
|
||
(this.datas[item.name].id === undefined &&
|
||
this.datas[item.name].subsidyId === undefined) ||
|
||
isNew === true
|
||
) {
|
||
this.$tab
|
||
.navigateTo(
|
||
"/pages/formPages/" + item.package + "/" + item.page + "/index"
|
||
)
|
||
.then((res) => {
|
||
this.$refs.morePopup.close();
|
||
if (res[0] !== null) {
|
||
this.$modal.showToast("模块建设中~");
|
||
}
|
||
});
|
||
} else {
|
||
this.$tab
|
||
.navigateTo(
|
||
"/pages/formPages/" +
|
||
item.package +
|
||
"/" +
|
||
item.page +
|
||
"/index?id=" +
|
||
this.datas[item.name].id
|
||
)
|
||
.then((res) => {
|
||
this.$refs.morePopup.close();
|
||
if (res[0] !== null) {
|
||
this.$modal.showToast("模块建设中~");
|
||
}
|
||
});
|
||
}
|
||
} else if (
|
||
!this.$auth.hasRole("admin") &&
|
||
this.$auth.hasRole("enterprise")
|
||
) {
|
||
this.confirmCreateEnterPrise();
|
||
} else {
|
||
this.$modal.confirm("非主体用户无法拥有主体!").then(() => { });
|
||
}
|
||
},
|
||
setIsLoadRecord() {
|
||
this.isLoadRecord = false;
|
||
this.isLoadRecord = true;
|
||
},
|
||
async getDatas() {
|
||
this.loading = true;
|
||
listManagement(this.queryParams)
|
||
.then((response) => {
|
||
let list = response.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let managementList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.datas, ["management"], managementList[0]);
|
||
} else {
|
||
this.$set(this.datas, ["management"], undefined);
|
||
}
|
||
})
|
||
.catch((err) => {
|
||
// console.error(err);
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
listLandManagement(this.queryParams)
|
||
.then((response) => {
|
||
let list = response.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let landManagementList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.datas, ["landManagement"], landManagementList[0]);
|
||
} else {
|
||
this.$set(this.datas, ["landManagement"], undefined);
|
||
}
|
||
})
|
||
.catch((err) => {
|
||
// console.error(err);
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
listBusinessItems(this.queryParams)
|
||
.then((response) => {
|
||
let list = response.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let businessItemsList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.datas, ["businessItems"], businessItemsList[0]);
|
||
} else {
|
||
this.$set(this.datas, ["businessItems"], undefined);
|
||
}
|
||
})
|
||
.catch((err) => {
|
||
// console.error(err);
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
listMainProductsSales(this.queryParams)
|
||
.then((response) => {
|
||
let list = response.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let mainProductsSalesList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(
|
||
this.datas,
|
||
["mainProductsSales"],
|
||
mainProductsSalesList[0]
|
||
);
|
||
} else {
|
||
this.$set(this.datas, ["mainProductsSales"], undefined);
|
||
}
|
||
})
|
||
.catch((err) => {
|
||
// console.error(err);
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
listSubsidy(this.queryParams)
|
||
.then((response) => {
|
||
const resRows = response.rows;
|
||
let list = resRows[0].rows.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let subsidyList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.datas, ["subsidy"], subsidyList[0]);
|
||
this.$set(this.datas.subsidy, ["id"], this.datas.subsidy.subsidyId);
|
||
} else {
|
||
this.$set(this.datas, ["subsidy"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
handlerDel() {
|
||
this.$modal
|
||
.confirm(
|
||
"确认删除 " +
|
||
this.selectedItem.label +
|
||
" 内,ID为:" +
|
||
(this.datas[this.selectedItem.name].id !== undefined
|
||
? this.datas[this.selectedItem.name].id
|
||
: this.datas[this.selectedItem.name].subsidyId !== undefined
|
||
? this.datas[this.selectedItem.name].subsidyId
|
||
: "") +
|
||
" 的信息吗?"
|
||
)
|
||
.then((res) => {
|
||
if (res === true) {
|
||
this.delDataById();
|
||
}
|
||
})
|
||
.catch((err) => {
|
||
// console.error(err);
|
||
})
|
||
.then(this.$refs.morePopup.close());
|
||
},
|
||
delDataById() {
|
||
const data = this.datas[[this.selectedItem.name]];
|
||
const parentItem = this.selectedItem;
|
||
switch (parentItem.name) {
|
||
case "management":
|
||
delManagement(data.id).then(this.delSuccess);
|
||
break;
|
||
case "landManagement":
|
||
delLandManagement(data.id).then(this.delSuccess);
|
||
break;
|
||
case "businessItems":
|
||
delBusinessItems(data.id).then(this.delSuccess);
|
||
break;
|
||
case "mainProductsSales":
|
||
delMainProductsSales(data.id).then(this.delSuccess);
|
||
break;
|
||
case "subsidy":
|
||
delSubsidy(data.subsidyId).then(this.delSuccess);
|
||
break;
|
||
}
|
||
},
|
||
delSuccess() {
|
||
this.getDatas().then(() => {
|
||
this.$modal.msgSuccess("删除成功!");
|
||
});
|
||
},
|
||
get_managementList() {
|
||
this.loading = true;
|
||
listManagement(this.enterpriseQueryParams)
|
||
.then((responseSec) => {
|
||
let list = responseSec.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let managementList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.lists, ["management"], managementList);
|
||
} else {
|
||
this.$set(this.lists, ["management"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
get_landManagementList() {
|
||
this.loading = true;
|
||
listLandManagement(this.enterpriseQueryParams)
|
||
.then((responseSec) => {
|
||
let list = responseSec.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let landManagementList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.lists, ["landManagement"], landManagementList);
|
||
} else {
|
||
this.$set(this.lists, ["landManagement"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
get_businessItemsList() {
|
||
this.loading = true;
|
||
listBusinessItems(this.enterpriseQueryParams)
|
||
.then((responseSec) => {
|
||
let list = responseSec.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let businessItemsList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.lists, ["businessItems"], businessItemsList);
|
||
} else {
|
||
this.$set(this.lists, ["businessItems"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
get_mainProductsSalesList() {
|
||
this.loading = true;
|
||
listMainProductsSales(this.enterpriseQueryParams)
|
||
.then((responseSec) => {
|
||
let list = responseSec.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let mainProductsSalesList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.lists, ["mainProductsSales"], mainProductsSalesList);
|
||
} else {
|
||
this.$set(this.lists, ["mainProductsSales"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
get_subsidyList() {
|
||
this.loading = true;
|
||
listSubsidy({
|
||
beginTime: new Date().getFullYear() + "-01-01 00:00:01",
|
||
endTime: new Date().getFullYear() + 1 + "-01-01 00:00:00",
|
||
})
|
||
.then((responseSec) => {
|
||
const resRows = responseSec.rows;
|
||
let list = resRows[0].rows.rows;
|
||
if (list.length !== undefined && list.length !== 0) {
|
||
let subsidyList = list.sort((a, b) => b.id - a.id);
|
||
this.$set(this.lists, ["subsidy"], subsidyList);
|
||
} else {
|
||
this.$set(this.lists, ["subsidy"], undefined);
|
||
}
|
||
})
|
||
.then(() => {
|
||
this.setIsLoadRecord();
|
||
this.loading = false;
|
||
});
|
||
},
|
||
},
|
||
watch: {
|
||
haveEnterprise: {
|
||
handler: function (val, oldVal) {
|
||
if (this.haveEnterprise === true || val === true) {
|
||
this.getDatas();
|
||
}
|
||
},
|
||
deep: true,
|
||
},
|
||
isLoadRecord: {
|
||
handler: function (val, oldVal) {
|
||
if (
|
||
val === true &&
|
||
this.userManipulate.do !== "新增" &&
|
||
this.userManipulate.do !== "删除"
|
||
) {
|
||
this.loadRecord();
|
||
}
|
||
},
|
||
deep: true,
|
||
},
|
||
loading: {
|
||
handler: function (val, oldVal) {
|
||
if (val === true) {
|
||
this.$modal.loading("加载中,请耐心等待...");
|
||
} else {
|
||
this.$modal.closeLoading();
|
||
}
|
||
},
|
||
deep: true,
|
||
},
|
||
},
|
||
|
||
// 页面周期函数--监听页面加载
|
||
onLoad() {
|
||
this.getEnterprise();
|
||
this.initializeDict();
|
||
this.traverseLists();
|
||
},
|
||
// 页面周期函数--监听页面初次渲染完成
|
||
onReady() { },
|
||
// 页面周期函数--监听页面显示(not-nvue)
|
||
onShow() {
|
||
this.getEnterprise().then(() => {
|
||
if (this.haveEnterprise === true) {
|
||
this.getDatas();
|
||
}
|
||
});
|
||
},
|
||
// 页面周期函数--监听页面隐藏
|
||
onHide() { },
|
||
// 页面周期函数--监听页面卸载
|
||
onUnload() {
|
||
const that = this
|
||
return that.$listenOB.goBack()
|
||
},
|
||
// 页面处理函数--监听用户下拉动作
|
||
// onPullDownRefresh() { uni.stopPullDownRefresh(); },
|
||
// 页面处理函数--监听用户上拉触底
|
||
// onReachBottom() {},
|
||
// 页面处理函数--监听页面滚动(not-nvue)
|
||
// onPageScroll(event) {},
|
||
// 页面处理函数--用户点击右上角分享
|
||
// onShareAppMessage(options) {},
|
||
data() {
|
||
return {
|
||
loading: false,
|
||
isLoadRecord: false,
|
||
tableGutter: 0,
|
||
haveEnterprise: false,
|
||
datas: {},
|
||
recordShowKeys: {},
|
||
lists: {},
|
||
management: {},
|
||
selectedItem: {},
|
||
userManipulate: {
|
||
beBeing: "",
|
||
do: "",
|
||
},
|
||
dictLists: {
|
||
status_type: [
|
||
{ dictValue: "0", dictLabel: "未审核认证" },
|
||
{ dictValue: "1", dictLabel: "已认证" },
|
||
],
|
||
},
|
||
queryParams: {
|
||
baseYear: new Date().getFullYear(),
|
||
state: "0",
|
||
},
|
||
enterpriseQueryParams: {
|
||
state: "0",
|
||
},
|
||
/** 直报数据菜单 */
|
||
listToFillOut: [
|
||
{
|
||
id: "1",
|
||
label: "经营现状",
|
||
name: "management",
|
||
package: "enterprise",
|
||
page: "managementForm",
|
||
show: true,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "1",
|
||
label: "土地经营情况",
|
||
name: "landManagement",
|
||
package: "enterprise",
|
||
page: "landManagementForm",
|
||
show: true,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "1",
|
||
label: "经营项目记录",
|
||
name: "businessItems",
|
||
package: "enterprise",
|
||
page: "businessItemsForm",
|
||
show: true,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "1",
|
||
label: "主要产品销售记录",
|
||
name: "mainProductsSales",
|
||
package: "enterprise",
|
||
page: "mainProductsSalesForm",
|
||
show: true,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "2",
|
||
label: "农场基本信息(必填)",
|
||
name: "basicFarmInfo",
|
||
page: "basic-farm-info",
|
||
show: false,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "3",
|
||
label: "生产经营信息-种植(必填)",
|
||
name: "prodAndOperInfo",
|
||
page: "prod-and-oper-info",
|
||
show: false,
|
||
required: true,
|
||
},
|
||
{
|
||
id: "4",
|
||
label: "政府补贴",
|
||
// name: "govSub",
|
||
name: "subsidy",
|
||
package: "subsidy",
|
||
page: "subsidyForm",
|
||
// page: "gov-sub",
|
||
show: true,
|
||
},
|
||
{
|
||
id: "5",
|
||
label: "农机设备",
|
||
name: "agrMac",
|
||
page: "agr-mac",
|
||
show: false,
|
||
},
|
||
{
|
||
id: "6",
|
||
label: "保险信息",
|
||
name: "insurInfo",
|
||
page: "insur-info",
|
||
show: false,
|
||
},
|
||
{
|
||
id: "7",
|
||
label: "贷款信息",
|
||
name: "loanInfo",
|
||
page: "loan-info",
|
||
show: false,
|
||
},
|
||
{
|
||
id: "8",
|
||
label: "三品一标",
|
||
name: "agrProLabel",
|
||
page: "agr-pro-label",
|
||
show: false,
|
||
},
|
||
],
|
||
/** 展示信息字段列表 */
|
||
childInfoList: {
|
||
management: [
|
||
{
|
||
label: "年度",
|
||
unit: "年度",
|
||
name: "baseYear",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "年度生产经营总收入",
|
||
unit: "(万元)",
|
||
name: "totalIncome",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "年度生产经营支出",
|
||
unit: "(万元)",
|
||
name: "totalPay",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "年度成员人均纯收入",
|
||
unit: "(万元)",
|
||
name: "memberAvgIncome",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
],
|
||
landManagement: [
|
||
{
|
||
id: "100",
|
||
parentId: "1",
|
||
label: "土地总面积",
|
||
unit: "亩",
|
||
name: "landArea",
|
||
parentName: "landInfo",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
id: "101",
|
||
parentId: "1",
|
||
label: "自营土地面积",
|
||
unit: "亩",
|
||
name: "areaSelfLand",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
id: "102",
|
||
parentId: "1",
|
||
label: "流转来土地面积",
|
||
unit: "亩",
|
||
name: "transferLandArea",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
id: "103",
|
||
parentId: "1",
|
||
label: "其他方式承包面积",
|
||
unit: "亩",
|
||
name: "otherAreaLand",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
id: "104",
|
||
parentId: "1",
|
||
label: "流转土地平均租金",
|
||
unit: "元/亩/年",
|
||
name: "averRentLandTran",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
id: "105",
|
||
parentId: "1",
|
||
label: "农场经营全部地块数量",
|
||
unit: "块",
|
||
name: "totalNumOfPlots",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
id: "106",
|
||
parentId: "1",
|
||
label: "最大一块面积",
|
||
unit: "亩",
|
||
name: "maxArea",
|
||
parentName: "landInfo",
|
||
},
|
||
{
|
||
label: "经营土地类型",
|
||
name: "landType",
|
||
dictType: "sys_land_type",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "经营方式",
|
||
name: "managementType",
|
||
dictType: "sys_management_type",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "经营年限",
|
||
name: "managementYears",
|
||
unit: "(年)",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "到期时间",
|
||
name: "expireTime",
|
||
show: true,
|
||
},
|
||
{
|
||
label: "流转价格",
|
||
name: "circulationPrice",
|
||
unit: "(万元)",
|
||
show: true,
|
||
},
|
||
],
|
||
businessItems: [
|
||
{
|
||
label: "主营产品名称",
|
||
name: "mainProducts",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "计量单位",
|
||
name: "measureUnit",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "数量",
|
||
name: "quantity",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "是否注册商标",
|
||
name: "isRegistered",
|
||
dictType: "sys_yes_no",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "是否获得认证",
|
||
name: "isAuthentication",
|
||
dictType: "sys_yes_no",
|
||
show: true,
|
||
},
|
||
{
|
||
label: "认证证明",
|
||
name: "authenticationUrl",
|
||
show: true,
|
||
},
|
||
],
|
||
mainProductsSales: [
|
||
{
|
||
label: "产品名称",
|
||
name: "productName",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "销售地区",
|
||
name: "salePlace",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "销售渠道",
|
||
name: "saleChannel",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "本年销售量",
|
||
name: "yearSale",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "计量单位",
|
||
name: "measureUnit",
|
||
show: true,
|
||
},
|
||
{
|
||
label: "本年销售额",
|
||
name: "yearSalev",
|
||
show: true,
|
||
},
|
||
],
|
||
subsidy: [
|
||
{
|
||
label: "记账时间",
|
||
name: "time",
|
||
show: true,
|
||
thShow: true,
|
||
},
|
||
{
|
||
label: "补助类型",
|
||
name: "typeId",
|
||
show: true,
|
||
thShow: true,
|
||
dictType: "subsidy_type",
|
||
},
|
||
{
|
||
label: "金额",
|
||
name: "amoun",
|
||
show: true,
|
||
thShow: true,
|
||
unit: "元",
|
||
},
|
||
],
|
||
},
|
||
};
|
||
},
|
||
};
|
||
</script>
|