Browse Source

企业填报增加编辑功能;

release
ZhaoTongYao 4 years ago
parent
commit
b51aec5db8
  1. 2
      pages/toRegister/toRegister.js
  2. 58
      subpages/oneKeyService/pages/companyInformation/companyInformation.js
  3. 2
      subpages/oneKeyService/pages/companyInformation/companyInformation.wxml
  4. 16
      subpages/oneKeyService/pages/companyInformationList/companyInformationList.js
  5. 11
      subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml
  6. 22
      subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxss

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// }
// })
let that = this
const versionNum = "1.7.19"
const versionNum = "1.7.20"
api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data)
let state = res.data ? res.data.scanFlag : '1'

58
subpages/oneKeyService/pages/companyInformation/companyInformation.js

@ -66,6 +66,13 @@ Page({
this.getGridTree()
this.getYearsList()
this.getFullDictInfo()
if (options.id) {
this.setData({
'dataForm.id': options.id
}, () => {
this.getEnterpriseReportDetail()
})
}
},
getGridTree () {
api.getGridTree().then(res => {
@ -129,6 +136,57 @@ Page({
console.log(err)
})
},
// 获取详情
getEnterpriseReportDetail () {
api.getEnterpriseReportDetail(this.data.dataForm.id).then(res => {
this.setData({
'dataForm.gridId': res.data.gridId,
'dataForm.year': res.data.year,
'dataForm.quarter': this.getQuarterValue(res.data.quarter),
'dataForm.enterpriseName': res.data.enterpriseName,
'dataForm.legalPerson': res.data.legalPerson,
'dataForm.concat': res.data.concat,
'dataForm.enterpriseStatus': this.getEnterpriseStatusValue(res.data.enterpriseStatus),
'dataForm.enterpriseIncome': res.data.enterpriseIncome,
'dataForm.enterprisePeopleNum': res.data.enterprisePeopleNum,
'dataForm.question': res.data.question,
// 网格
treeVlaue: res.data.allDeptIds.split(','),
'treeChoosedValue.title': res.data.allDeptNames.replace(/-/g, '/'),
treeId: res.data.gridId,
// 年份
yearValue: [res.data.year],
'yearChoosedValue.label': res.data.year + '年',
'yearChoosedValue.value': res.data.year,
// 季度
quarterValue: [this.getQuarterValue(res.data.quarter)],
'quarterChoosedValue.label': res.data.quarter,
// 'quarterChoosedValue.value': e.detail.value[0],
// 公司状态
companyValue: [this.getEnterpriseStatusValue(res.data.enterpriseStatus)],
'companyChoosedValue.label': res.data.enterpriseStatus,
// 'companyChoosedValue.value': e.detail.value[0],
})
})
},
getQuarterValue (quarter) {
let quarterValue = ''
this.data.quarterList.forEach(item => {
if (item.label == quarter) {
quarterValue = item.value
}
})
return quarterValue
},
getEnterpriseStatusValue (enterpriseStatus) {
let companyValue = ''
this.data.companyList.forEach(item => {
if (item.label == enterpriseStatus) {
companyValue = item.value
}
})
return companyValue
},
// 选择所属网格
chooseTreeId(e) {
this.setData({

2
subpages/oneKeyService/pages/companyInformation/companyInformation.wxml

@ -1,7 +1,7 @@
<!--subpages/heart/pages/myApply/myApply.wxml-->
<view class="apply">
<view class="apply-list">
<view class="apply-img" bindtap="toApplyList">
<view class="apply-img" bindtap="toApplyList" wx:if="{{!dataForm.id}}">
<image src="../../images/shangbaojilu.png" />
</view>
<view class="apply-item">

16
subpages/oneKeyService/pages/companyInformationList/companyInformationList.js

@ -19,9 +19,15 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.getEnterpriseReportList()
},
onShow () {
this.setData({
enterpriselist: [],
pageIndex: 1
})
this.getEnterpriseReportList()
},
/**
* 页面上拉触底事件的处理函数
*/
@ -65,11 +71,17 @@ Page({
console.log(err)
})
},
//跳转到信息详情
// 跳转到信息详情
toApplyDetail (e) {
console.log('跳转详情', e.currentTarget.dataset.id)
wx.navigateTo({
url: `/subpages/oneKeyService/pages/companyInformationDetail/companyInformationDetail?id=${e.currentTarget.dataset.id}`
})
},
// 跳转编辑
toApply (e) {
wx.navigateTo({
url: `/subpages/oneKeyService/pages/companyInformation/companyInformation?id=${e.currentTarget.dataset.id}`
})
}
})

11
subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml

@ -1,11 +1,18 @@
<view class="my-apply">
<view class="apply-list">
<view class="apply-item" data-id="{{item.id}}" bindtap="toApplyDetail" wx:for="{{enterpriselist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="apply-item" wx:for="{{enterpriselist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-title">{{item.enterpriseName}}</view>
<view class="line"></view>
<view class="item-time">所属年度:{{item.year}}</view>
<view class="item-time">所属季度:{{item.quarter}}</view>
<view class="item-time">提交时间:{{item.createdTime}}</view>
<view class="footer">
<view class="item-time">提交时间:{{item.createdTime}}</view>
<view class="func-box">
<view data-id="{{item.id}}" bindtap="toApply">编辑</view>
<view data-id="{{item.id}}" bindtap="toApplyDetail">查看</view>
</view>
</view>
<!-- <view class="item-state">审核状态:<text class="state-{{item.actStatus}}">{{item.actStatus == '0' ? '待审核' : (item.actStatus == '1' ? '通过' : '未通过')}}</text></view> -->
</view>
</view>

22
subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxss

@ -76,4 +76,26 @@ page {
}
.apply-list .apply-item .item-state .state-2 {
color: #D80000;
}
.apply-list .footer {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.apply-list .footer .func-box {
width: 180rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.apply-list .footer .func-box view:nth-child(1) {
width: 50%;
text-align: center;
color: #FB9F00;
}
.apply-list .footer .func-box view:nth-child(2) {
width: 50%;
text-align: center;
color: #28C896;
}
Loading…
Cancel
Save