diff --git a/pages/toRegister/toRegister.js b/pages/toRegister/toRegister.js index ae6e78f..f1efd37 100644 --- a/pages/toRegister/toRegister.js +++ b/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' diff --git a/subpages/oneKeyService/pages/companyInformation/companyInformation.js b/subpages/oneKeyService/pages/companyInformation/companyInformation.js index a228500..f9769b7 100644 --- a/subpages/oneKeyService/pages/companyInformation/companyInformation.js +++ b/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({ diff --git a/subpages/oneKeyService/pages/companyInformation/companyInformation.wxml b/subpages/oneKeyService/pages/companyInformation/companyInformation.wxml index c6da75f..a6b4683 100644 --- a/subpages/oneKeyService/pages/companyInformation/companyInformation.wxml +++ b/subpages/oneKeyService/pages/companyInformation/companyInformation.wxml @@ -1,7 +1,7 @@ - + diff --git a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.js b/subpages/oneKeyService/pages/companyInformationList/companyInformationList.js index d37f3ba..8497ee8 100644 --- a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.js +++ b/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}` + }) } }) \ No newline at end of file diff --git a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml b/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml index f0d8e16..7f24ad3 100644 --- a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml +++ b/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxml @@ -1,11 +1,18 @@ - + {{item.enterpriseName}} 所属年度:{{item.year}} 所属季度:{{item.quarter}} - 提交时间:{{item.createdTime}} + + 提交时间:{{item.createdTime}} + + 编辑 + 查看 + + + diff --git a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxss b/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxss index 205aa8e..7585c30 100644 --- a/subpages/oneKeyService/pages/companyInformationList/companyInformationList.wxss +++ b/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; } \ No newline at end of file