commit a7c88e15f38c6ac4ea4cb526e980ba76d4bab0e8 Author: cai <864601551@qq.com> Date: Wed May 14 17:29:19 2025 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14ea590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..fede84b --- /dev/null +++ b/README.en.md @@ -0,0 +1,36 @@ +# 阳光系统-小程序 + +#### Description +阳光新系统的小程序 + +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution + +1. Fork the repository +2. Create Feat_xxx branch +3. Commit your code +4. Create Pull Request + + +#### Gitee Feature + +1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md +2. Gitee blog [blog.gitee.com](https://blog.gitee.com) +3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) +4. The most valuable open source project [GVP](https://gitee.com/gvp) +5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) +6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md new file mode 100644 index 0000000..7374eb0 --- /dev/null +++ b/README.md @@ -0,0 +1,132 @@ +# 阳光系统-小程序 + +#### 介绍 +阳光新系统的小程序 + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + +#### 参与贡献 + +1. Fork 本仓库 +2. 新建 Feat_xxx 分支 +3. 提交代码 +4. 新建 Pull Request + + +#### 特技 + +1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) + + +### 登录角色判断userType +userType TRADER:代理商,TRADER_EMP:代理商员工,PLATFORM_EMP:平台,暂不用(SYS_EMP:系统工程师。PRO_EMP:项目工程师) +### 首页菜单权限字段 + * "新增信息登记"按钮 HYXCX_XZXXDJ_B + * 信息采集 HYXCX_XXCJ_T + * 1.信息登记 HYXCX_XXDJ_T + * 2.信息授权 HYXCX_XXSQ_T + * 3.开二类卡 HYXCX_KELK_T + * 4.农户合同 HYXCX_NHHT_T + * 勘测设计 HYXCX_KCSJ_T + * 1.电站初勘 HYXCX_DZCK_T + * 2.设计审核 HYXCX_SJSH_T + * 安装阶段 HYXCX_AZJD_T + * 1.物料下单 HYXCX_WLXD_T + * 2.电站安装 HYXCX_DZAZ_T + * 3.安装验收 HYXCX_AZYS_T + * 并网阶段 HYXCX_BWJD_T + * 1.电站并网 HYXCX_DZBW_T + * 2.合同签署 HYXCX_HTQS_T + * 3.并网验收 HYXCX_BWYS_T + * 4.项目存档 HYXCX_XMCD_T + * 5.项目查询 HYXCX_XMCX_T + * 6.电站整改 HYXCX_DZZG_T +### 按钮权限字段 +1. 信息登记: +查看:XXDJ_VIEW_B + +删除:XXDJ_DELETE_B +预审查询:XXDJ_YSCX_B + +2. 信息授权: +查看:XXSQ_VIEW_B +授权:XXSQ_AUTH_B +授权链接:XXSQ_AUTHLINK_B +查看:XXSQ_AUTHLINK_LOOK_B (查看授权书) + +3. 开二类卡: +查看:KELK_VIEW_B +开卡:KELK_ADD_B +重新开卡:KELK_READD_B +卡信息:KELK_INFO_B + +4. 电站初勘: +查看:DZCK_VIEW_B +勘测:DZCK_ADD_B +修改业主信息:DZCK_EDIT_B + +5. 农户合同: +查看:NHHT_VIEW_B +签约:NHHT_QY_B +共签:NHHT_GQ_B +重签:NHHT_CQ_B +NHHT_SCLJ_B 生成链接 +NHHT_YL_B 预览 +NHHT_HTLZ_B 合同落章 +NHHT_ZF_B 作废 + +6. 设计审核: +查看:SJSH_VIEW_B + +7. 物料下单: +查看:WLXD_VIEW_B +下单:WLXD_XD_B + +8. 电站安装: +查看:DZAZ_VIEW_B +安装:DZAZ_AZ_B +完工:DZAZ_WG_B + +9. 安装验收: +查看:AZYS_VIEW_B + +10. 电站并网: +查看:DZBW_VIEW_B +并网:DZBW_BW_B + +11. 合同签署: +查看:HTQS_VIEW_B +签署:HTQS_SIGN_B + +12. 并网验收: +查看:BWYS_VIEW_B + +13. 项目存档: +查看:XMCD_VIEW_B + +14. 项目查询: +查看:XMCX_VIEW_B + +15. 电站整改: +查看:DZZG_VIEW_B +发起:DZZG_ADD_B diff --git a/api/api.js b/api/api.js new file mode 100644 index 0000000..7416b73 --- /dev/null +++ b/api/api.js @@ -0,0 +1,947 @@ +/** + * 请求api + * @author + */ + +/** + * 注意 + * 注意 + * 注意 + * 注意 + * 注意 + * 注意 + * 注意 + * + * + * 发布正式版时将DEV设置为false + * + * + */ +const DEV = false +// const DEV = true + + +//打印日志开关 +const DEBUG = false; +// const DEBUG = true; + +// const API_BASE_URL = 'https://www.xingyuancrm.com/redsun-api/miniapp/cloud/a/'; //生产环境 +// const API_BASE_URL = 'http://192.168.2.44:8083/a/'; //冬青 +// const API_BASE_URL = 'http://192.168.2.8:8080/cloud_war_exploded/a/'; //洪雪 +// const API_BASE_URL = 'http://116.162.216.30:8082/cloud/a/'; //李宗平 +// const API_BASE_URL = 'http://192.168.2.185:8080/nenghui/a/'; //贺 +// const API_BASE_URL = 'http://192.168.2.28:8080/nenghui/a/'; //王文军 +// const API_BASE_URL = 'http://192.168.2.244:8080/nenghui/a/'; //倪 +// const API_BASE_URL = 'http://192.168.2.99:7380/nenghui/a/'; //黄赵 +// const API_BASE_URL = 'http://192.168.2.187:8088/nenghui/a/'; //王楠 +// const API_BASE_URL = 'http://192.168.2.223:8080/cloud_war_exploded/a/'; //程礼坤 + +// const API_MONIT_URL = 'http://192.168.2.8:8099/'; //洪雪-监控接口 +// const API_MONIT_URL = 'http://192.168.2.181:8099/'; //李宗平-监控接口 + + + + +//测试环境 +const API_BASE_URL = 'http://47.100.121.41:8089/nenghui_uat/a/'; //接口 +const IMG_BASE_URL = 'https://nhet-test.oss-cn-shanghai.aliyuncs.com/' //测试环境和生产环境 图片前缀 +// const API_MONIT_URL = 'https://www.nhhyy.com/nenghui-uat-api/'; //监控接口 + + +//线上 +// const API_BASE_URL = 'https://www.nhhyy.com/nhet/a/'; +// const IMG_BASE_URL = 'https://nhet.oss-cn-shanghai.aliyuncs.com/' //线上 图片前缀 +const API_MONIT_URL = 'https://www.nhhyy.com/monitor-api/'; //监控接口 + + + +// const IMG_BASE_URL = 'https://entry-imgs.oss-cn-beijing.aliyuncs.com/' //本地 +const WU_TU_PIAN_URL = "https://obs-hncs2.cucloud.cn/entry-imgs/prohibit_delete/wutupian.png"; //无图片显示 +const UP_MONIT_IMG = API_MONIT_URL + 'blade-resource/oss/endpoint/put-file?code=aliyun'; //监控上传图片路径,每个平台的code可能不同 +const IMG_MONIT_URL = ''; //监控图片,暂时不用 + + +/** + * + * base请求 + * @param {String} host 域名 + * @param {String} url 请求路径 + * @param {String} method 请求方法 GET/POST + * @param {Object} data 请求参数 {"key":"value"} + * @param {String} contentType + * + */ + +var requestWithHost = function requestWithHost(host, url, method, data, contentType, consoleText) { + var _url = host.length > 0 ? host : API_BASE_URL + url; + + var _header = { + 'Content-Type': contentType === '1' ? 'application/json' : 'application/x-www-form-urlencoded', + } + + return new Promise(function (resolve, reject) { + var result; + var bool; + wx.request({ + url: _url, + method: method, + data: data, + header: _header, + success: (res) => { + if (DEBUG) { + bool = true + result = res.data + } + resolve(res.data) + }, + fail: (res) => { + if (DEBUG) { + bool = false + result = res + } + resolve(res) + }, + + complete: () => { + if (DEBUG) { + console.log('\n') + console.log('start ---------------------------------------------------------------------- >>') + if (method.toUpperCase() == "GET") { + var params = '' + if (data) { + Object.keys(data).forEach(key => { + params = params ? `${params}&${key}=${data[key]}` : `?${key}=${data[key]}` + }); + } + console.log(`请求URL: ${method.toUpperCase()} ${_url + params}`) + } else { + console.log(`请求URL: ${method.toUpperCase()} ${_url} \n请求参数:\n${JSON.stringify(data,function (key,value) { + if (value === undefined) { + return 'undefined'; + } else if (value === null) { + return 'null' + } + return value; + },4)}`) + } + console.log(bool ? '回调参数:success' : '回调参数:fail', result) + console.log('<< ---------------------------------------------------------------------- end') + console.log('\n') + } + } + }) + }) +} + + +/** + * host:API_BASE_URL 的请求 + * @param {String} url 请求路径 + * @param {String} method 请求方法 GET/POST + * @param {Object} data 请求参数 {"key":"value"} + */ + +var request = function request(url, method, data, contentType, consoleText) { + return requestWithHost('', url, method, data, contentType, consoleText) +} + +module.exports = { + API_BASE_URL, + IMG_BASE_URL, + WU_TU_PIAN_URL, + DEV, + API_MONIT_URL, + IMG_MONIT_URL, + UP_MONIT_IMG, + /** + * + * post请求接口示例 + * + * @param {*} data + */ + postRequest: function postRequest(data) { + return request('/api/postRequest', 'post', data, "1"); + }, + + /** + * + * get请求接口示例 + * + * @param {*} data + */ + getRequest: function getRequest(data) { + return request('/api/getRequest', 'get', data); + }, + + /** + * + * 获取电站列表 + * + * @param {*} data + */ + ajaxForWaitOrder: function ajaxForWaitOrder(data) { + return request('main/projectManage/ajaxForWaitOrder', 'get', data); + }, + + /** + * + * 获取农户合同列表 + * + * @param {*} data + */ + ajaxForWaitOrder2: function ajaxForWaitOrder2(data) { + return request('main/projectManage/contractListDate', 'get', data); + }, + + + /** + * + * 获取电站整改数据 + * + * @param {*} data + */ + findRetrialPage: function findRetrialPage(data) { + return request('main/projectManage/findRetrialPage', 'get', data); + }, + + + + /** + * + * 获取产品编号 + * + * @param {*} data + */ + projectList: function projectList(data) { + return request('main/projectManage/projectList', 'get', data); + }, + + /** + * + * 获取自定义字段 + * + * @param {*} data + */ + getFormSet: function getFormSet(data) { + return request('main/projectManage/getFormSet', 'get', data); + }, + + /** + * + * 电站安装示例图 + * + * @param {*} data + */ + findTypeReferenceList: function findTypeReferenceList(data) { + return request('main/projectManage/findTypeReferenceList', 'get', data); + }, + + /** + * + * 电站安装示例图2 + * + * @param {*} data + */ + findTypeReferenceListNew: function findTypeReferenceListNew(data) { + return request('main/projectManage/findTypeReferenceListNew', 'get', data); + }, + + /** + * + * 获取组件、逆变器、并网箱列表 + * + * @param {*} data + */ + getElectricPlanAll: function getElectricPlanAll(data) { + return request('main/projectManage/getElectricPlanAll', 'get', data); + }, + + + + /** + * + * 获取方案类型和名称 + * + * @param {*} data + */ + findAllPlan: function findAllPlan(data) { + return request('main/projectManage/findAllPlan', 'get', data); + }, + + + login(data) { + return request('main/login/toLogin', 'get', data); + }, + + + sendMsg(data) { + return request('main/customer/sendMsg', 'get', data); + }, + + checkConfirmCode(data) { + return request('main/customer/checkConfirmCode', 'get', data); + }, + + /** + * + * 客户管理 + * + * @param {*} data + */ + saveOrEditCustomerEntry: function saveOrEditCustomerEntry(data) { + return request('main/projectManage/saveOrEditCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1"); + }, + + + /** + * + * 信息校验 + * + * @param {*} data + */ + lookCreditResult: function lookCreditResult(data) { + return request('main/projectManage/lookCreditResult', 'get', data); + }, + + + /** + * + * 获取电站详细 + * + * @param {*} data + */ + entryDetail: function entryDetail(data) { + return request('main/projectManage/entryDetail', 'get', data); + }, + + + /** + * + * 获取首页统计 + * + * @param {*} data + */ + getHomeStatistics: function getHomeStatistics(data) { + return request('main/projectManage/getHomeStatistics', 'get', data); + }, + + + /** + * + * 提交完工 + * + * @param {*} data + */ + install: function install(data) { + return request('main/projectManage/install?userId=' + data.userId, 'post', data.addReportReq, "1"); + }, + + + + /** + * + * 提交完工 + * + * @param {*} data + */ + installZc: function install(data) { + return request('main/projectManage/installZc?userId=' + data.userId, 'post', data.addReportReq, "1"); + }, + + + + + + /** + * + * 提交并网 + * + * @param {*} data + */ + accept: function accept(data) { + return request('main/projectManage/accept?userId=' + data.userId, 'post', data.addReportReq, "1"); + }, + + + + + /** + * + * 使用物料 + * + * @param {*} data + */ + usedMaterial: function usedMaterial(data) { + return request('main/projectManage/usedMaterial', 'get', data); + }, + + + + /** + * + * 获取使用物料列表 + * + * @param {*} data + */ + getUsedMaterialInfo: function getUsedMaterialInfo(data) { + return request('main/projectManage/getUsedMaterialInfo', 'get', data); + }, + + + /** + * + * 删除物料 + * + * @param {*} data + */ + deleteUsedRocerd: function deleteUsedRocerd(data) { + return request('main/projectManage/deleteUsedRecord', 'get', data); + }, + + + /** + * + * 查询安装组件信息 + * + * @param {*} data + */ + getActualCapacity: function getActualCapacity(data) { + return request('main/projectManage/getActualCapacity', 'get', data); + }, + + + /** + * + * 审核不通过 + * + * @param {*} data + */ + appletsFailed: function appletsFailed(data) { + return request('main/projectManage/appletsFailed', 'get', data); + }, + + /** + * + * 审核通过 + * + * @param {*} data + */ + appletsToExamine: function appletsToExamine(data) { + return request('main/projectManage/appletsToExamine?userId=' + data.userId, 'post', data.CustomerEntry, "1"); + }, + + + /** + * + * 获取变更类型 + * + * @param {*} data + */ + getRectificationList: function getRectificationList(data) { + return request('main/projectManage/getRectificationList', 'get', data); + }, + + + /** + * + * 审核电站整改 + * + * @param {*} data + */ + rectificationAudit: function rectificationAudit(data) { + return request('main/projectManage/rectificationAudit', 'get', data); + }, + + /** + * + * 邀请签约 + * + * @param {*} data + */ + askToContract: function askToContract(data) { + return request('main/projectManage/askToContract', 'get', data); + }, + + + /** + * + * 根据经纬度 获取 地址 + * + * @param {*} data + */ + getAddressByLonLat: function getAddressByLonLat(data) { + return request('main/address/getAddressByLonLat', 'get', data); + }, + + + + /** + * + * 根据地址 获取 经纬度 + * + * @param {*} data + */ + getAddressLonLat: function getAddressLonLat(data) { + return request('main/address/getAddressLonLat', 'get', data); + }, + + /** + * + * 获取仓库信息 + * + * @param {*} data + */ + getWarehouseList: function getWarehouseList(data) { + return request('main/projectManage/getWarehouseList', 'get', data); + }, + + /** + * + * 保存仓库信息 + * + * @param {*} data + */ + saveWarehouse: function saveWarehouse(data) { + return request('main/projectManage/saveWarehouse', 'get', data); + }, + + + /** + * + * 获取代理商下员工人数 + * + * @param {*} data + */ + etEmpCountByRole: function etEmpCountByRole(data) { + return request('main/projectManage/getEmpCountByRole', 'get', data); + }, + + + + /** + * + * 开卡 + * + * @param {*} data + */ + bankCardPage: function bankCardPage(data) { + return request('main/yueXiuBankCard/bankCardPage', 'get', data); + }, + + + /** + * + * 签约或重新签约 + * + * @param {*} data + */ + toContractPage: function toContractPage(data) { + return request('main/yueXiuContract/toContractPage', 'get', data); + }, + /** + * + * 华融签约或重新签约 + * + * @param {*} data + */ + huaRongContractPage: function toContractPage(data) { + return request('main/HuaRongContract/getContractSignUrl', 'get', data); + }, + + /** 上传合同 **/ + submitContract: function submitContract(data) { + return request('main/HuaRongContract/submitContract', 'post', data, "1"); + }, + /** 生成合同 **/ + getSignContractUrl: function getSignContractUrl(data) { + return request('main/GFContract/getSignContractUrl', 'get', data); + }, + /** 合同落章 **/ + doSealContract: function doSealContract(data) { + return request('main/GFContract/doSealContract', 'get', data); + }, + /** + * + * 授权 + * + * @param {*} data + */ + toAuthContrac: function toAuthContrac(data) { + return request('main/EsignAuth/toAuthContract', 'get', data); + }, + + /** + * + * 查看 + * + * @param {*} data + */ + getContractUrlToLook: function getContractUrlToLook(data) { + return request('main/yueXiuContract/getContractUrlToLook', 'get', data); + }, + /** 华融合同查看 **/ + getContractUrlToLookHr: function getContractUrlToLook(data) { + return request('main/HuaRongContract/getContractUrl', 'get', data); + }, + + /** + * + * 删除电站 + * + * @param {*} data + */ + deleteCustomerEntry: function deleteCustomerEntry(data) { + return request('main/projectManage/deleteCustomerEntry', 'get', data); + }, + + + + /** + * + * 获取所有省 + * + * @param {*} data + */ + getProvinceList: function getProvinceList(data) { + return request('main/redirect/getProvinceList', 'get', data); + }, + + /** + * + * 根据省查询市 + * + * @param {*} data + */ + getCitysByProId: function getCitysByProId(data) { + return request('main/redirect/getCitysByProId', 'get', data); + }, + /** + * + * 根据市查询区 + * + * @param {*} data + */ + getAreaByCityId: function getAreaByCityId(data) { + return request('main/redirect/getAreaByCityId', 'get', data); + }, + + /** + * + * 获取并网箱和支架列表 + * @param {*} data + */ + getMateriallist: function getMateriallist(data) { + return request('main/projectManage/getMateriallist', 'get', data); + }, + + + /** + * + * 使用并网箱和支架 + * @param {*} data + */ + usedMaterialOther: function usedMaterialOther(data) { + return request('main/projectManage/usedMaterialOther', 'post', data, "1"); + }, + + + + /** + * + * 获取签约状态 + * @param {*} data + */ + ecordClickSign: function ecordClickSign(data) { + return request('main/yueXiuContract/ecordClickSign', 'get', data); + }, + + + /** + * + * 获取电力公司 + * @param {*} data + */ + getProviceCodeList: function getProviceCodeList(data) { + return request('main/order/getProviceCodeList', 'get', data); + }, + /** + * + * 获取联行号列表数据 + * @param {*} data + */ + findLinkNumberList: function findLinkNumberList(data) { + return request('main/projectManage/findLinkNumberList', 'get', data); + }, + /** + * + * 获取客户管理预审查询结果 + * @param {*} data + */ + findResult: function findResult(data) { + // return request('/main/projectManage/findResult', 'get', data); + return request('/main/projectManage/findPreauditStatus', 'get', data); + }, + + /** + * + * 修改业主信息接口 + * @param {*} data + */ + editCustomerEntryBy: function editCustomerEntryBy(data) { + return request('/main/projectManage/editCustomerEntryBy?userId=' + data.userId, 'post', data.CustomerEntry,"1"); + }, + //并网验收通过或不通过 + twoMergeAcceptRefuse: function twoMergeAcceptRefuse(data) { + return request('/main/projectManage/twoMergeAcceptRefuse', 'get', data); + }, + //安装验收通过或不通过 + toNetAccept: function toNetAccept(data) { + return request('/main/projectManage/toNetAccept', 'get', data); + }, + //二类卡信息 + bankCardDetail: function bankCardDetail(data) { + return request('/main/yueXiuBankCard/bankCardDetail', 'get', data); + }, + //获取信息授权签约链接 + getEsignUrl: function getEsignUrl(data) { + return request('/main/EsignAuth/getEsignUrl', 'get', data); + }, + //获取小程序二维码 + createQrcode: function createQrcode(data) { + return request('/main/projectManage/createQrcode', 'get', data); + }, + //校验代理商员工角色登录权限字段接口 + checkTraderEmpAuth: function checkTraderEmpAuth(data) { + return request('/main/projectManage/checkTraderEmpAuth', 'get', data); + }, + //修改手机号,并重新发起授权合同 + resetMobileVsAuthPc: function resetMobileVsAuthPc(data) { + return request('/main/EsignAuth/resetMobileVsAuth', 'get', data); + }, + //列表tab统计 + customerManagementStatic: function customerManagementStatic(data) { + return request('/main/projectManage/customerManagementStatic', 'get', data); + }, + //查看信息授权书 + lookAuthBook: function lookAuthBook(data) { + return request('/main/projectManage/lookAuthBook', 'get', data); + }, + //档案表单保存接口 + saveArchives: function saveArchives(data) { + return request('/main/projectManage/saveArchives?userId=' + data.userId, 'post', data.CustomerEntry,"1"); + }, + //档案审核 + auditArchives: function auditArchives(data) { + return request('/main/projectManage/auditArchives', 'post', data,'1'); + }, + //派工 + dispatch: function dispatch(data) { + return request('/main/projectManage/dispatch', 'post', data,'1'); + }, + //经销商的已启用员工列表 + selectDispatchEngineer: function selectDispatchEngineer(data) { + return request('/main/projectManage/selectDispatchEngineer', 'get', data); + }, + //逆变器添加编码 + saveMaterialSN: function saveMaterialSN(data) { + return request('/main/projectManage/saveMaterialSN', 'post', data, '1'); + }, + //获取客户列表 + getTenantList: function getTenantList(data) { + return request('/main/projectManage/getTenantList', 'get', data); + }, + //客户详情 + getTenantDetail: function getTenantDetail(data) { + return request('/main/projectManage/getTenantDetail', 'get', data); + }, + //近三天发电量 + getDataInThreeDays: function getDataInThreeDays(data) { + return request('/main/projectManage/getDataInThreeDays', 'get', data); + }, + //待办 + getNeedToDealList: function getNeedToDealList(data) { + return request('/main/itemManagement/needToDeal/getNeedToDealList', 'get', data); + }, + //投资方 + getCapital: function getCapital(data) { + return request('/main/projectManage/getCapital', 'get', data); + }, + //接入逆变器--接入 + insertInterFace: function insertInterFace(data) { + return request('/main/projectManage/insertInterFace', 'get', data); + }, + //开二类卡--销卡 + cancelBankCard: function cancelBankCard(data) { + return request('/main/yueXiuBankCard/cancelBankCard', 'get', data); + }, + //项目信息--所属项目公司 + getCompany: function getCompany(data) { + return request('main/projectManage/getCompany', 'get',data); + }, + //代理商列表 + getTraderList: function getTraderList(data) { + return request('main/projectManage/getTraderList', 'get',data); + }, + //根据身份证号判断客户是否已存在 + isByIdCode: function isByIdCode(data) { + return request('main/projectManage/isByIdCode', 'get',data); + }, + //国网授权--导入接口 传值powerGenerationNo(发电户号) + addUserInfo: function addUserInfo(data) { + return request('main/stategrid/addUserInfo', 'get',data); + }, + //审批记录 + getOptList: function getOptList(data) { + return request('main/projectManage/getOptList', 'get',data); + }, + //勘测-提交设计 + surveyToDesign: function surveyToDesign(data) { + return request('main/projectManage/surveyToDesign?userId=' + data.userId, 'post', data.CustomerEntry, "1"); + }, + //电站初勘-撤回勘测 + backToSurvey: function backToSurvey(data) { + return request('main/projectManage/backToSurvey', 'post', data,'1'); + }, + //电站初勘-设计暂存、设计提交接口 + designCustomerEntry: function designCustomerEntry(data) { + return request('main/projectManage/designCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1"); + }, + //根据地址查询产品 + getProjectByArea: function getProjectByArea(data) { + return request('main/projectManage/getProjectByArea', 'get', data); + }, + //根据资方获取共签人信息 + getPartnerSet: function getPartnerSet(data) { + return request('main/yueXiuCommon/getPartnerSet', 'get', data); + }, + //获取指定字典 + getDictionaryList: function getDictionaryList(data) { + return request('main/projectManage/getDictionaryList', 'get', data); + }, + //获取全部表单设置 + getAllConditionList: function getAllConditionList(data) { + return request('main/projectManage/getAllConditionList', 'post', data); + }, + //获取所有字典 + getAllDictionarySelect: function getAllDictionarySelect(data) { + return request('main/projectManage/getAllDictionarySelect', 'get', data); + }, + //电站并网--国网授权 + mergeTmp: function mergeTmp(data) { + return request('main/projectManage/mergeTmp?userId=' + data.userId, 'post', data.addReportReq, "1"); + }, + // 设计自审暂存/保存 + updateCustomerEntry: function updateCustomerEntry(data) { + return request('main/projectManage/updateCustomerEntry?userId=' + data.userId, 'post', data.CustomerEntry, "1"); + }, + // 自审驳回 + auditBack: function auditBack(data) { + return request('main/projectManage/auditBack?userId=' + data.userId, 'post', data, "1"); + }, + // 安装自审驳回 + acceptZSRefuse: function acceptZSRefuse(data) { + return request('main/projectManage/acceptZSRefuse', 'get', data); + }, + // 安装自审通过 + acceptZS: function acceptZS(data) { + return request('main/projectManage/acceptZS', 'get', data); + }, + // 发起合同 + createContract: function createContract(data) { + return request('main/HuaRongContract/createContract', 'get', data); + }, + //校验条码是否存在系统 + checkMaterialCode: function checkMaterialCode(data) { + return request('main/projectManage/checkMaterialCode', 'get', data); + }, + //选择整村汇流-获取数据 + choseBoxGroupData: function choseBoxGroupData(data) { + return request('main/boxSet/choseBoxGroupData', 'get', data); + }, + //选择汇流组保存、或者新增保存 + saveOneOwner: function saveOneOwner(data) { + return request('main/boxSet/saveOneOwner', 'get', data); + }, + //质量验收列表 + qualityListData: function qualityListData(data) { + return request('main/quality/qualityListData', 'get', data); + }, + + //质量验收--派工人员 + getDispatchEmp: function getDispatchEmp(data) { + return request('main/quality/getDispatchEmp', 'get', data); + }, + + //质量验收--保存派工 + saveDispatch: function saveDispatch(data) { + return request('main/quality/saveDispatch', 'get', data); + }, + //质量验收--详情 + qualityDetailData: function qualityDetailData(data) { + return request('main/quality/qualityDetailData', 'get', data); + }, + //质量验收--添加抽检 + addSample: function addSample(data) { + return request('main/quality/addSample', 'get', data); + }, + //质量验收--无法验收 + canNotAcceptance: function canNotAcceptance(data) { + return request('main/quality/canNotAcceptance', 'get', data); + }, + //质量验收--无法验收的查看 + canNotAcceptanceDetail: function canNotAcceptanceDetail(data) { + return request('main/quality/canNotAcceptanceDetail', 'get', data); + }, + //质量验收--撤回 + cancelAccept: function cancelAccept(data) { + return request('main/quality/cancelAccept', 'get', data); + }, + //质量验收--验收页面的验收项+暂存的信息 + acceptItems: function acceptItems(data) { + return request('main/quality/acceptItems', 'get', data); + }, + //质量验收--定位排序 + listSorting: function listSorting(data) { + return request('main/quality/listSorting', 'get', data); + }, + //质量验收--保存验收结果 + saveAcceptItem: function saveAcceptItem(data) { + return request('main/quality/saveAcceptItem', 'post', data, '1'); + }, + //质量整改-列表 + getQualityRectificationList: function getQualityRectificationList(data) { + return request('main/quality/rectification/getQualityRectificationList', 'get', data); + }, + //质量整改-派工人员列表 + getDispatchEmpList: function getDispatchEmpList(data) { + return request('main/quality/rectification/getDispatchEmpList', 'get', data); + }, + //质量整改-派工 + saveDispatchEmp: function saveDispatchEmp(data) { + return request('main/quality/rectification/saveDispatchEmp', 'post', data,'1'); + }, + //质量整改-详情 + qualityRectificationDetail: function qualityRectificationDetail(data) { + return request('main/quality/rectification/qualityRectificationDetail', 'get', data); + }, + //质量整改-整改保存 + saveChangingQuality: function saveChangingQuality(data) { + return request('main/quality/rectification/saveChangingQuality', 'post', data,'1'); + }, + //质量整改-驳回/通过 + saveAcceptQuality: function saveAcceptQuality(data) { + return request('main/quality/rectification/saveAcceptQuality', 'post', data); + }, + //广发--根据屋顶类型获取相关数据 + getKcFormSet: function getKcFormSet(data) { + return request('main/GFCommon/getKcFormSet', 'get', data); + }, + //华融--提交预审 + batchAdmit: function batchAdmit(data) { + return request('main/projectManage/batchAdmit', 'get', data); + }, + //获取风雪压等级 + getPressureLevel: function getPressureLevel(data) { + return request('main/projectManage/getPressureLevel', 'get', data); + }, +} \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 0000000..e09706e --- /dev/null +++ b/app.js @@ -0,0 +1,15 @@ +const api = require('./api/api.js'); + +App({ + + onLaunch() { + + }, + globalData: { + userInfo: null, + imgUrl: api.IMG_BASE_URL, //图片地址 + url: api.API_BASE_URL, //接口地址 + monitUrl: api.API_MONIT_URL, //监控接口地址 + monitUpload: api.UP_MONIT_IMG, //监控上传图片路径 + }, +}) \ No newline at end of file diff --git a/app.json b/app.json new file mode 100644 index 0000000..f406130 --- /dev/null +++ b/app.json @@ -0,0 +1,170 @@ +{ + "pages": [ + "pages/startPage/startPage", + "pages/index/index", + "pages/mine/mine", + "pages/home/home", + "pages/forgotPassword/forgotPassword", + "pages/map/map", + "pages/pend/pend", + "pages/traderList/traderList", + "pages/appRecord/appRecord", + "pages/scanCode/scanCode" + ], + "subpackages": [ + { + "root": "home", + "name": "home", + "pages": [ + "pages/entryInfo/entryInfo", + "pages/dataScreening/dataScreening", + "pages/dataScreeningDetails/dataScreeningDetails", + "pages/viewSchema/viewSchema", + "pages/infoRegistration/infoRegistration", + "components/infor/infor", + "components/survey/survey", + "components/install/install", + "components/installHR/installHR", + "components/finish/finish", + "components/finishHR/finishHR", + "components/onGrid/onGrid", + "pages/entryInfoDetails/entryInfoDetails", + "pages/customDetails/customDetails", + "pages/install/install", + "pages/installHR/installHR", + "pages/completion/completion", + "pages/completionHR/completionHR", + "pages/bwForm/bwForm", + "pages/installOwn/installOwn", + "pages/entryInfoAudit/entryInfoAudit", + "pages/entryInfoAuditHR/entryInfoAuditHR", + "pages/acceptance/acceptance", + "pages/acceptanceBW/acceptanceBW", + "pages/acceptanceAZ/acceptanceAZ", + "pages/entryInfoBT/entryInfoBT", + "pages/surveyForm/surveyForm", + "pages/surveyFormHr/surveyFormHr", + "pages/filesForm/filesForm", + "pages/ownerForm/ownerForm", + "pages/bankCardDetail/bankCardDetail", + "pages/dispatch/dispatch", + "pages/webView/webView", + "pages/customList/customList", + "pages/3days/3days", + "pages/uploadContract/uploadContract", + "pages/installSelfAudit/installSelfAudit", + "pages/converge/converge" + ] + }, + { + "root": "mine", + "name": "mine", + "pages": [ + "pages/customerService/customerService", + "pages/contactUs/contactUs" + ] + }, + { + "root": "monitor", + "name": "monitor", + "pages": [ + "pages/home/home", + "pages/workOrder/order/order", + "pages/workOrder/backDetail/backDetail", + "pages/workOrder/orderDetail/orderDetail", + "pages/workOrder/orderDetail2/orderDetail2", + "pages/center/center", + "pages/station/station", + "pages/notice/notice", + "pages/noticeDetail/noticeDetail", + "pages/technicalData/technicalData", + "pages/technicaDetail/technicaDetail", + "pages/lookImg/lookImg", + "pages/settlement/settlement", + "pages/stationDetail/stationDetail", + "pages/deviceList/deviceList", + "pages/deviceDetail/deviceDetail", + "pages/materialApply/materialApply", + "pages/myMaterial/myMaterial", + "pages/addMaterial/addMaterial", + "pages/materialDetail/materialDetail", + "pages/materialUse/materialUse", + "pages/materialList/materialList" + ] + }, + { + "root": "other", + "name": "other", + "pages": [ + "pages/infoList/infoList", + "pages/dispatch/dispatch", + "pages/qualityAcceptList/qualityAcceptList", + "pages/qualityAcceptDetail/qualityAcceptDetail", + "pages/qualityAccept/qualityAccept", + "pages/unableAccept/unableAccept", + "pages/rectification/rectification", + "pages/rectifyForm/rectifyForm" + ] + } + ], + "preloadRule": { + "pages/home/home": { + "network": "all", + "packages": [ + "home" + ] + }, + "pages/mine/mine": { + "network": "all", + "packages": [ + "mine" + ] + } + }, + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "能辉新能源", + "navigationBarTextStyle": "black" + }, + "tabBar": { + "custom": true, + "selectedColor": "#0a6597", + "color": "#999999", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/home/home", + "text": "首页", + "iconPath": "/img/home.png", + "selectedIconPath": "/img/home-se.png" + }, + { + "pagePath": "pages/pend/pend", + "text": "待办", + "iconPath": "/img/pend.png", + "selectedIconPath": "/img/pend-se.png" + }, + { + "pagePath": "pages/mine/mine", + "text": "我的", + "iconPath": "/img/mine.png", + "selectedIconPath": "/img/mine-se.png" + } + ] + }, + "sitemapLocation": "sitemap.json", + "useExtendedLib": { + "weui": true + }, + "permission": { + "scope.userLocation": { + "desc": "你的位置信息将用于获取实时地理位置信息" + } + }, + "requiredPrivateInfos": [ + "getLocation" + ], + "lazyCodeLoading": "requiredComponents" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..2747089 --- /dev/null +++ b/app.wxss @@ -0,0 +1,1243 @@ +view { + box-sizing: border-box; word-break: break-word; +} + +.box { + padding-left: 20rpx; + padding-right: 20rpx; + width: 100%; +} + +.copy { + width: 24rpx; + height: 24rpx; + margin-left: 10rpx; +} + +.btm { + height: 120rpx; + background: #ffffff; + position: fixed; + bottom: 0; + left: 0; + z-index: 100; + width: 100vw; + display: flex; + justify-content: space-between; + padding: 0 30rpx; + align-items: center; +} + +.uploadImg { + height: 150rpx; + width: 150rpx; + border: 2rpx dashed #dddddd; + display: flex; + justify-content: center; + flex-direction: column; + font-size: 28rpx; + color: #dddddd; + align-items: center; +} + +.parallelogram { + width: 90rpx; + height: 28rpx; + text-align: center; + line-height: 28rpx; + position: relative; + margin-right: 10rpx; +} + +.parallelogram>view { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} + +.para { + background: #ff960f; + transform: skew(-10deg); + z-index: 1; +} + +.para1 { + background: #5e6488; + transform: skew(-10deg); + z-index: 1; +} + +.text { + font-size: 20rpx; + z-index: 100; + color: #ffffff; +} + +.top { + display: flex; + justify-content: space-between; + padding: 20rpx; + background: linear-gradient(#fef5e6, #ffffff); +} + +.headBox { + display: flex; + justify-content: flex-start; +} + +.head { + height: 104rpx; + width: 104rpx; + border-radius: 50%; + overflow: hidden; + flex-shrink: 0; +} + +.name { + font-size: 34rpx; + color: #333333; + font-weight: 500; + margin-left: 10rpx; + padding-top: 10rpx; + font-weight: 700; +} + +.id { + margin-left: 10rpx; + padding-top: 15rpx; +} + +.id image { + height: 26rpx; +} + +.inputBtn { + color: #ffffff; + font-size: 28rpx; + height: 56rpx; + display: flex; + justify-content: center; + align-items: center; + background: linear-gradient(#fe7c04, #ffa739); + width: 240rpx; + border-radius: 10rpx; + margin-top: 50rpx; +} + +.inputBtn image { + width: 28rpx; + height: 28rpx; + margin-right: 10rpx; +} + +.orderBox { + display: flex; + justify-content: space-between; + box-shadow: #f3f3f1 0px 0px 10px; + height: 140rpx; + border-radius: 20rpx; + padding: 40rpx 30rpx 10rpx; +} + +.orderBox image { + width: 40rpx; + height: 40rpx; +} + +.item { + display: flex; + flex-direction: column; + text-align: center; + align-items: center; +} + +.orderBox text { + color: #666666; + font-size: 24rpx; + line-height: 50rpx; +} + +.tabbar { + display: flex; + justify-content: flex-start; + height: 80rpx; + line-height: 74rpx; +} + +.tabbar>view { + min-width: 160rpx; + display: flex; + flex-direction: column; + text-align: center; + align-items: center; +} + +.tabbar text { + color: #676767; + font-size: 28rpx; +} + +.line { + width: 40rpx; + height: 6rpx; + background: #ffffff; + border-radius: 10rpx; +} + +.active text { + color: #333333; + font-size: 40rpx; +} + +.active .line { + background: #fe960f; +} + +.itemName { + height: 130rpx; + padding: 30rpx 20rpx 0; + display: flex; + justify-content: flex-start; +} + +.itemIcon { + height: 90rpx; + width: 90rpx; + border-radius: 50%; + overflow: hidden; + flex-shrink: 0; +} + +.itemIcon image { + width: 100%; + height: 100%; +} + +.itemNum { + width: calc(100% - 120rpx); +} + +.itemNum view { + color: #333333; + line-height: 45rpx; + padding-left: 20rpx; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.orderList { + padding: 20rpx; +} + +.detail { + padding: 20rpx; + background: #fafafa; + border-radius: 10rpx; + line-height: 50rpx; +} + +.detail image { + width: 26rpx; + height: 26rpx; + margin-right: 10rpx; + flex-shrink: 0; +} + +.detail view { + font-size: 26rpx; + white-space: nowrap; + color: #333333; +} + +.detail>view { + display: flex; + justify-content: flex-start; + +} + +.itemDetail { + display: flex; + justify-content: flex-start; + align-items: center; + /* white-space: nowrap; */ +} + +.detailAddr { + white-space: break-spaces; +} + +.operate { + display: flex; + justify-content: space-between; + margin-top: 20rpx; +} + +.sureBtn { + height: 60rpx; + padding: 0 20rpx; + background: #ff960f; + color: #ffffff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + border-radius: 10rpx; +} + +.operateLeft { + display: flex; + justify-content: flex-start; + align-items: center; +} + +.operate image { + width: 22rpx; + height: 24rpx; + margin-right: 10rpx; +} + +.operateItem { + display: flex; + justify-content: flex-start; + align-items: center; + color: #333333; + font-size: 24rpx; + margin: 0 15rpx; +} + +.checkbox { + display: flex; + justify-content: flex-start; + align-items: center; + margin-bottom: 15rpx; +} + +.detailNum { + color: #333333; + font-size: 28rpx; + font-weight: 600; +} + +.label { + padding: 20rpx; + background: #ffffff; + margin-bottom: 20rpx; + border-radius: 10rpx; +} + +radio .wx-radio-input { + border-radius: 50%; + /* 圆角 */ + width: 32rpx; + height: 32rpx; + border: 1rpx solid #0A6597; +} + +/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */ +radio .wx-radio-input.wx-radio-input-checked { + border: 1rpx solid #0A6597; + background: #0A6597; +} + +/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */ +radio .wx-radio-input.wx-radio-input-checked::before { + border-radius: 50%; + /* 圆角 */ + width: 32rpx; + /* 选中后对勾大小,不要超过背景的尺寸 */ + height: 32rpx; + /* 选中后对勾大小,不要超过背景的尺寸 */ + line-height: 32rpx; + text-align: center; + font-size: 30rpx; + /* 对勾大小 30rpx */ + color: #fff; + /* 对勾颜色 白色 */ + background: transparent; + transform: translate(-50%, -50%) scale(1); + -webkit-transform: translate(-50%, -50%) scale(1); +} + + +.loginBox { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: 1000; + background: #ffffff; +} + +.image-loginbj { + width: 750rpx; + height: 100vh; +} + +/* pages/denglu/denglu.wxss */ +.hander { + width: 100%; + height: 100%; +} + +.logo { + width: 410rpx; + height: 90rpx; + margin: 155rpx auto; +} + +image { + width: 100%; + height: 100%; +} + +.form { + width: 635rpx; + height: 220rpx; + margin: 0 auto; +} + +.inputBox { + width: 100%; + height: 90rpx; + display: flex; + justify-content: space-between; + padding-left: 27rpx; + align-items: center; + border: 1rpx solid #eeee; + border-radius: 20rpx; + margin-bottom: 40rpx; + background-color: white; +} + +.inputBox image { + width: 38rpx; + height: 38rpx; + +} + +.form input { + display: inline-block; + height: 100%; + font-size: 30rpx; + flex: 1; + padding-left: 20rpx; + color: #333333; +} + +button.login { + width: 600rpx !important; + height: 90rpx; + background: linear-gradient(270deg, + #00967b 0%, + #126594 100%); + margin-top: 110rpx; + color: #ffffff; + font-weight: normal; + padding: 0; + line-height: 90rpx; + font-size: 36rpx; + border-radius: 50rpx; +} + +button.cancel { + width: 635rpx !important; + height: 90rpx; + background-color: #eee; + margin-top: 40rpx; + color: #ffffff; + font-weight: normal; + padding: 0; + line-height: 90rpx; + font-size: 36rpx; + border-radius: 50rpx; +} + +.loginNow { + color: #fff; + text-align: center; + line-height: 100rpx; + font-size: 34rpx; + position: fixed; + bottom: 100rpx; + width: 370rpx; + height: 100rpx; + background-color: #126594; + border-radius: 52rpx; + left: 190rpx; +} + +.btnDefault { + height: 60rpx; + padding: 0 20rpx; + background: #ffffff; + color: #666666; + font-size: 28rpx; + border: 1rpx solid #f0f0f0; + text-align: center; + line-height: 60rpx; + border-radius: 10rpx; +} + +.btnBox { + display: flex; + justify-content: flex-end; +} + +.btnBox view { + margin-left: 20rpx; +} + +.btnBox .navBtn { + margin-left: 20rpx; +} + +.imgs { + display: flex; + justify-content: flex-start; + align-items: center; + padding-bottom: 10rpx; + padding-top: 10rpx; +} + +.red { + color: red; +} + +.applyTime { + font-size: 28rpx; + color: #999999; + line-height: 60rpx; + display: flex; + justify-content: flex-start; + align-items: center; +} + +.timeimage { + margin-right: 10rpx; +} + +.itemTop { + min-height: 120rpx; + background: linear-gradient(to right, #fef2e5, #ffffff); + display: flex; + flex-direction: column; + line-height: 40rpx; + justify-content: space-between; + padding: 20rpx; + border-radius: 10rpx; +} + +.itemTop1 { + min-height: 120rpx; + background: linear-gradient(to right, #e1e0e6, #ffffff); + display: flex; + flex-direction: column; + line-height: 40rpx; + justify-content: space-between; + padding: 20rpx; + border-radius: 10rpx; +} + +.proName { + display: flex; + justify-content: flex-start; + align-items: center; +} + +.jxs { + display: flex; + justify-content: space-between; + font-size: 24rpx; + color: #333333; +} + +.operateItem image { + width: 22rpx; + height: 24rpx; + margin-right: 10rpx; +} + +.mark { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 2000; + display: flex; + justify-content: center; + align-items: center; +} + +.chooseBox { + background: #ffffff; + width: 600rpx; + border-radius: 10rpx; + display: flex; + justify-content: space-between; + flex-direction: column; + align-items: center; + max-height: 90vh; + overflow-y: auto; + position: relative; +} + +.chooseTitle { + display: flex; + justify-content: center; + align-items: center; + height: 120rpx; + font-size: 30rpx; + color: #ff960f; +} + +.chooseTitle image { + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} + +.showBox { + max-height: calc(90vh - 210rpx); + overflow-y: auto; +} + +.textarea { + width: 530rpx; + min-height: 120rpx; + border: 1rpx solid #eeeeee; + border-radius: 10rpx; + font-size: 28rpx; + color: #333333; + padding: 20rpx; + margin-bottom: 30rpx; + box-sizing: border-box; +} + +.popBox { + display: flex; + justify-content: center; + align-items: center; + border-top: 1rpx solid #efefef; + width: 100%; +} + +.popBtn { + height: 90rpx; + line-height: 90rpx; + font-size: 30rpx; + color: #333333; + width: 50%; + text-align: center; +} + +.popBtn1 { + border-right: 1rpx solid #efefef; +} + +page { + background: #EEF2F7; +} + +.pt-120 { + padding-bottom: 120rpx; +} + +.box { + background: #ffffff; + padding: 0 30rpx; + margin-bottom: 10rpx; +} + +/* .title { + height: 100rpx; + line-height: 100rpx; + display: flex; + justify-content: space-between; + border-top: 1rpx solid #f6f6f6; + border-bottom: 1rpx solid #f6f6f6; +} */ + +.titleName { + display: flex; + align-items: center; + justify-content: flex-start; + color: #333333; + font-size: 32rpx; +} + +.titleName>view { + height: 30rpx; + background: #fdac2a; + width: 6rpx; + margin-right: 10rpx; +} + +.detail1>view { + min-height: 90rpx; + border-bottom: 1rpx solid #f6f6f6; + line-height: 90rpx; + display: flex; + justify-content: flex-start; + font-size: 28rpx; +} + +.label1 { + width: 240rpx; +} + +.label1~input { + flex: 1; + height: 90rpx; + font-size: 28rpx; +} + +.imgList { + overflow: hidden; +} + +.btm .btn1 { + background: #ff960f; + color: #ffffff; + font-weight: normal; + height: 80rpx; + font-size: 28rpx; + text-align: center; + line-height: 80rpx; + border-radius: 10rpx; + padding: 0; +} + +.btn5 { + background: #ff960f; + color: #ffffff; + font-weight: normal; + height: 60rpx; + font-size: 24rpx; + text-align: center; + line-height: 60rpx; + border-radius: 10rpx; + padding: 0; + margin-bottom: 20rpx; +} + +.label1~text { + font-family: Regular; + color: #666666; + flex: 1; + font-size: 28rpx; +} + +.label1~view { + font-family: Regular; + color: #666666; + flex: 1; +} + +.uploadImgBox { + display: flex; + justify-content: flex-start; + padding-bottom: 10rpx; +} + +.uploadImgBox>view { + width: 335rpx; +} + +.imgTip { + font-size: 24rpx; + line-height: 40rpx; + color: #666666; + margin-top: 10rpx; +} + +.imgTip>text { + color: red; +} + +.mt-10 { + margin-top: 20rpx; +} + +.lh-40 { + line-height: 40rpx; +} + +.imgTip.red { + color: red; +} + +.label1~.jg { + height: 46rpx; + width: 46rpx; + margin-top: 22rpx; + display: none; +} + +.not { + color: red; +} + +.red .jg, +.not~.jg { + display: inline-block; +} + +.jg { + height: 30rpx; + width: 30rpx; + margin-left: 5rpx; + display: none; + vertical-align: text-top; +} + +.img1 { + height: 150rpx; + width: 150rpx; + border-radius: 10rpx; + position: relative; + margin-right: 10rpx; +} + +.img1 image { + width: 100%; + height: 100%; +} + +.trans { + transform: rotateZ(-90deg); +} + +.removeImg { + width: 30rpx; + height: 30rpx; + background: red; + border-radius: 50%; + color: #ffffff; + font-size: 22rpx; + text-align: center; + line-height: 25rpx; + position: absolute; + top: -11rpx; + right: -11rpx; +} + +.search { + padding: 20rpx; + height: 90rpx; + line-height: 48rpx; + box-sizing: border-box; + background: #ffffff; +} + +.searchBox { + width: 100%; + height: 100%; + border-radius: 25rpx; + border: 1rpx solid #dddddd; + background: #fafbfc; + font-size: 24rpx; + color: #dddddd; + padding-left: 20rpx; +} + +/* 物料申请 */ +.dingdanPic { + width: 25rpx; + height: 30rpx; + margin-right: 10rpx; +} + +.materApplyItem { + height: 90rpx; + display: flex; + align-items: center; + margin-left: 30rpx; + padding-right: 30rpx; + border-bottom: 1px solid #e7e7e7; +} + +.materApplyItem:last-child { + border-bottom: none; +} + +.f32Bold { + font-size: 32rpx; + font-weight: 600; +} + +.materPickW { + width: 495rpx; + margin-left: 55rpx; + position: relative; + font-size: 28rpx; +} + +.materPickW:after { + content: ''; + position: absolute; + right: 0rpx; + top: 50%; + width: 20rpx; + height: 20rpx; + margin-top: -12rpx; + border-style: solid; + border-color: #a3a3a3; + border-width: 0 1rpx 1rpx 0; + transform: rotate(-45deg); +} + +.areaInput { + width: 495rpx; + margin-left: 55rpx; + font-size: 28rpx; +} + +.materApplyItem2 { + display: flex; + align-items: center; + margin-left: 30rpx; + padding: 30rpx 30rpx 30rpx 0; +} + +.materApplyItem3 { + display: flex; + justify-content: space-between; + align-items: center; + padding: 30rpx 20rpx 30rpx 30rpx; + border-bottom: 1px solid #e7e7e7; +} + +.addApplyBtn { + padding: 0 30rpx; + font-size: 24rpx; + color: #fff; + border-radius: 8rpx; + background: #ff960f; + height: 60rpx; + line-height: 60rpx; +} + +.materApplyItem3Left { + display: flex; + align-items: center; +} + +.materApplyItem4 { + display: flex; + align-items: center; + padding: 30rpx 20rpx; + border-bottom: 1px solid #e7e7e7; +} + +.matertextFirst { + display: inline-block; + width: 139rpx; + text-align: center; + word-break: break-word; +} + +.matertextTwo { + display: inline-block; + width: 97rpx; + text-align: center; +} + +.matertextThree { + display: inline-block; + width: 125rpx; + text-align: center; +} + +.matertextFour { + display: inline-block; + flex: 1; + text-align: center; +} + +.matertextFive { + display: inline-block; + width: 135rpx; + text-align: center; +} + +.applyItView view:nth-child(2n) { + background: #f5f5f5; +} + +.materAdSerch { + width: 690rpx; + height: 70rpx; + border-radius: 10rpx; + display: flex; + align-items: center; + background: #fff; + margin: 20rpx auto; +} + +.serchpicter { + width: 44rpx; + height: 44rpx; +} + +.serimgview { + width: 65rpx; + display: flex; + justify-content: center; +} + +.xuanzhongpic { + width: 28rpx; + height: 28rpx; + position: absolute; + bottom: 0; + right: 0; +} + +.materDetailItem { + display: flex; + font-size: 28rpx; + margin-left: 40rpx; + display: flex; + align-items: center; + border-bottom: 1px solid #e7e7e7; + padding: 30rpx 0; +} + +.materdeIleft { + display: inline-block; + width: 140rpx; + text-align: right; +} + +.materdeIRight { + display: inline-block; + width: 435rpx; + margin-left: 95rpx; +} + +.materDetailItem:last-child { + border-bottom: none; +} + +.materIrightImg { + width: 150rpx; + height: 150rpx; + border-radius: 10rpx; + margin-left: 95rpx; + display: block; + background: #eee; +} + +/* 公共样式 */ +.borderBottom { + border-bottom: 1px solid #e7e7e7; +} + +.maAddBtn { + display: flex; + bottom: 0; + width: 100%; + position: fixed; + z-index: 6; +} + +.chamxtxt { + width: 250rpx; + height: 100rpx; + background: #fff; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.AddSure { + background: #ff960f; + color: #fff; + height: 100rpx; + font-size: 30rpx; + display: flex; + align-items: center; + justify-content: center; + width: 500rpx; +} + +.color999 { + color: #999 +} + +.botomSub { + font-size: 30rpx; + width: 710rpx; + height: 89rpx; + background-color: #ff960f; + display: flex; + align-items: center; + justify-content: center; + border-radius: 10rpx; + position: fixed; + bottom: 20rpx; + left: 20rpx; + color: #fff; +} + +.comSubmit { + font-size: 30rpx; + width: 750rpx; + height: 100rpx; + background-color: #ff960f; + display: flex; + align-items: center; + justify-content: center; + position: fixed; + bottom: 0rpx; + left: 0rpx; + color: #fff; +} + +.lvcolor { + color: #339933; +} + +.redcolor { + color: #ff3333; +} + +.stared { + font-size: 30rpx; + color: #ff3333; +} + +.mt20 { + margin-top: 20rpx; +} + +.fs-30 { + font-size: 30rpx; +} + +.fs-28 { + font-size: 28rpx; +} + +.fs-26 { + font-size: 26rpx; +} + +.fs-24 { + font-size: 24rpx; +} + +.bg-fff { + background-color: #ffffff; +} + +.mr-30 { + margin-right: 30rpx; +} +.mr-10 { + margin-right: 10rpx; +} + +.ml-20 { + margin-left: 20rpx; +} + +.pb-20 { + padding-bottom: 20rpx; +} + +.pb-10 { + padding-bottom: 10rpx; +} + +.c-333 { + color: #333333; +} + +.lh-50 { + line-height: 50rpx; +} + +.color66 { + color: #666; +} +.txt-red{ color: #FF0000;} + +.weui-cell { + padding: 0; + min-height: 90rpx; + font-size: 28rpx; + flex: 1 +} + +.weui-cell::before { + left: 0; +} + +.weui-cells { + padding: 0; + margin: 0; +} +.content-title-flex { + flex: 1; +} + +.detail-tab{display: flex; justify-content: space-between; height: 90rpx; border-bottom: 1px solid #f0f0f0; color: #666666;} +.detail-tab>view{flex: 1; text-align: center; line-height: 82rpx; font-size: 28rpx; position: relative;} +.detail-tab>view.active{color: #333333; font-size: 32rpx;} +.detail-tab>view .actived{width: 60rpx; height: 6rpx; background-color: #0a6597; border-radius: 3rpx; margin: 0 auto;} + +.detail-sec-tab{display: flex; width: 600rpx; justify-content: space-between; height: 60rpx; line-height: 60rpx; border: solid 1px #cccccc; border-radius: 10rpx; margin: 20rpx auto; font-size: 28rpx;} +.detail-sec-tab>view{flex: 1; text-align: center;} +.detail-sec-tab>view.actived{ background-color: #0a6597; color: #FFF;} + +/** 文件上传样式 **/ +.txt-upload{flex: 1; color: blue; font-size: 24rpx; width: 100%;} +.txt-upload-list{ display: flex; justify-content: space-between; margin:4rpx 0 20rpx;} +.txt-upload-list text:first-child{flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.txt-upload-list text:last-child{width: 80rpx; margin-left: 20rpx;} + + +/** 监控 **/ +.lack {height: 100%; width: 100vw; display: flex; justify-content: center; padding-top: 10vh; box-sizing: border-box; background: url()center 100rpx/400rpx 518rpx no-repeat #f4f5f6;} +.f-r { float: right;} +.red { color: #f00;} +.green { color: #2096ff;} +.yellow { color: #f2993a;} +.blue { color: #2096ff;} +.font-666 { color: #666;} +.font-333 { color: #333;} +.font-999 { color: #999;} +.load { text-align: center; height: 60rpx; line-height: 60rpx; font-size: 24rpx; color: #999;} +.lack>image {width: 560rpx; height: 482rpx;} +.opt-right{ width: 44rpx; height: 44rpx; margin-left: 10rpx;} + +/*角标状态*/ +.content-list-type-txt3{ + height: 36rpx; + position: absolute; + right: 2rpx; + font-size: 22rpx; + color: #fff; + display: flex; + align-items: center; + opacity: 0.9; + letter-spacing:1px; + font-weight: 500; +} +.content-list-type-txt6{ + height: 36rpx; + position: absolute; + right: 0rpx; + font-size: 19rpx; + color: #fff; + display: flex; + align-items: center; + opacity: 0.9; +} \ No newline at end of file diff --git a/components/bankLink/bankLink.js b/components/bankLink/bankLink.js new file mode 100644 index 0000000..4d48c44 --- /dev/null +++ b/components/bankLink/bankLink.js @@ -0,0 +1,239 @@ +// components/region/region.js +const { + findLinkNumberList +} = require('../../api/api') +Component({ + /** + * 组件的属性列表 + */ + properties: { + showRegion: { + type:Boolean, + value:false + }, + provinceName: { + type:String, + value: '' + }, + cityName: { + type:String, + value: '' + }, + }, + + /** + * 组件的初始数据 + */ + data: { + capitalId: '', //资方 + bankName:'', //支行 + bankNamed: '',//总行 + bankNameList: [{ + id: 1, + name: '中国工商银行' + },{ + id: 2, + name: '中国农业银行' + },{ + id: 3, + name: '中国银行' + },{ + id: 4, + name: '中国建设银行' + },{ + id: 5, + name: '中国邮政储蓄银行' + },{ + id: 6, + name: '交通银行' + },{ + id: 7, + name: '中信银行' + },{ + id: 8, + name: '兴业银行' + },{ + id: 9, + name: '华夏银行' + },{ + id: 10, + name: '招商银行' + },{ + id: 11, + name: '民生银行' + },{ + id: 12, + name: '农村商业' + },{ + id: 13, + name: '其他' + }], //开户银行 + provinceList:[], + page: 1, + region: [], //开户地址 + customItem: '' + }, + ready(){ + this.setData({ + capitalId: wx.getStorageSync('capitalId') + }) + }, + + pageLifetimes: { + show: function () { + // 页面被展示 + // this._bindBankChange() + }, + }, + observers: { + 'cityName': function (cityName) { + if(cityName){ + var arr = this.data.region + arr[0] = this.data.provinceName + arr[1] = this.data.cityName + this.setData({ + region: arr, + }) + } + // console.log(333, this.data.provinceName) + } + }, + /** + * 组件的方法列表 + */ + methods: { + + /** + * + * 搜索 + * + * @param {*} e + */ + _bindBankChange: function (bankName) { + var that = this; + var page = that.data.page; + var list = that.data.provinceList; + if(this.data.capitalId =='04'){ + this.setData({ + region: [] + }) + } + findLinkNumberList({ + capitals: wx.getStorageSync('capitalId'), + bankName: this.data.bankName?this.data.bankName:'', //总行名称 + bankBranch: this.data.bankNamed?this.data.bankNamed:'', //支行名称 + province: this.data.region[0]?this.data.region[0]:'', + city: this.data.region[1]?this.data.region[1]:'', + page: page, + limit: 15 + }).then((res) => { + // var resData = res.map(itm=>itm.columns) + var resData = res.data + for (var i = 0; i < resData.length; i++) { + list.push(resData[i]) + } + this.setData({ + provinceList: list + }) + }) + }, + + /** + * + * 选择 + * + * @param {*} e + */ + _chooseBank(e) { + const id = e.currentTarget.dataset.id + const name = e.currentTarget.dataset.name + var data = { + id: id, + name: name, + } + this._closeBank(); + this.triggerEvent('chooseRegion', data); + }, + + /** + * + * 关闭弹框 + * + * @param {*} e + */ + _closeBank(e) { + this.setData({ + bankNamed: '', + // region: [], + bankName: "", + provinceList:[], + showRegion: false, + }) + }, + /** + * 搜索查询 + */ + onSearch(e){ + // console.log("执行",e.detail); + let bankName = e.detail; + if(bankName.length < 2){ + wx.showToast({ + title: '请输入至少2个字符', + icon: 'none', + duration: 2000 + }); + return; + }else{ + this.setData({ + page: 1, + provinceList: [], + bankName + }) + } + this._bindBankChange(); + }, + //清空搜索框 + onSearchClear(){ + this.setData({ + page: 1, + provinceList: [], + bankName: '' + }) + this._bindBankChange(); + }, + //开户银行选择 + bindBankList(e){ + this.setData({ + page: 1, + provinceList: [], + bankName_id: this.data.bankNameList[e.detail.value].id, + bankNamed: this.data.bankNameList[e.detail.value].name, + // bankNamed: this.data.bankNameList[e.detail.value].name == '其他' ? '' : this.data.bankNameList[e.detail.value].name, + }) + this._bindBankChange(); + }, + //开户地址 + bindRegionChange(e){ + // console.log('picker发送选择改变,携带值为', e.detail.value) + this.setData({ + page: 1, + provinceList: [], + region: e.detail.value + }) + this._bindBankChange(); + }, + more: function () { + this.data.page++; + this._bindBankChange() + }, + //清空 + emptyData(e){ + this.setData({ + page: 1, + provinceList: [], + region: [] + }) + this._bindBankChange(); + }, + } +}) \ No newline at end of file diff --git a/components/bankLink/bankLink.json b/components/bankLink/bankLink.json new file mode 100644 index 0000000..bd02c74 --- /dev/null +++ b/components/bankLink/bankLink.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "@vant/weapp/popup/index", + "van-search": "@vant/weapp/search/index", + "van-empty": "@vant/weapp/empty/index" + } +} \ No newline at end of file diff --git a/components/bankLink/bankLink.wxml b/components/bankLink/bankLink.wxml new file mode 100644 index 0000000..2583c8e --- /dev/null +++ b/components/bankLink/bankLink.wxml @@ -0,0 +1,50 @@ + + + + + + 请选择 + + + + + + + + {{bankNamed}} + + + 开户银行 + + + + + + + + {{region[0]}}{{region[1]}} + 开户地址 + X + + + + + + + + + {{item.bank_name}} + + + \ No newline at end of file diff --git a/components/bankLink/bankLink.wxss b/components/bankLink/bankLink.wxss new file mode 100644 index 0000000..2473fbf --- /dev/null +++ b/components/bankLink/bankLink.wxss @@ -0,0 +1,40 @@ +/* components/region/region.wxss */ +.content-province-title { + width: 100%; + height: 100rpx; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; + font-size: 30rpx; + border-bottom: 3rpx solid #f2f2f2; + position: relative; +} + +.content-province-title-left { + position: absolute; + left: 0; + margin-left: 30rpx; + width: 45rpx; + height: 45rpx; +} + +.content-province-sc { + width: 100%; + height: calc(100% - 300rpx); +} + +.content-province { + width: 100%; + height: 100rpx; + display: flex; + font-size: 26rpx; + align-items: center; + justify-content: center; + border-bottom: 3rpx solid #f2f2f2; +} +.tab-box{ display: flex; align-items: center; justify-content: space-between; height: 70rpx; border-bottom: 1px solid #f0f0f0;} +.tab-box>view{flex: 1; width: 50%; text-align: center; font-size: 24rpx; height: 70rpx; line-height: 70rpx; border-left: 1px solid #f0f0f0; font-weight: 800; } +.tab-box .picker view{white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} +.picker-box{position: relative;} +.picker-box .close{position: absolute; right: 0rpx; top: 0; color: #999; padding: 0 30rpx;} \ No newline at end of file diff --git a/components/region/region.js b/components/region/region.js new file mode 100644 index 0000000..047e8eb --- /dev/null +++ b/components/region/region.js @@ -0,0 +1,194 @@ +// components/region/region.js +const { + getProvinceList, + getCitysByProId, + getAreaByCityId, + getStreetByAreaId +} = require('../../api/api') +Component({ + /** + * 组件的属性列表 + */ + properties: { + showRegion: { + type:Boolean, + value:false + }, + traderId: { + type: String + } + }, + + /** + * 组件的初始数据 + */ + data: { + }, + pageLifetimes: { + show: function () { + // 页面被展示 + this._bindRegionChange() + }, + }, + /** + * 组件的方法列表 + */ + methods: { + + /** + * + * 选择用户地址 + * + * @param {*} e + */ + _bindRegionChange: function (e) { + getProvinceList({ + traderId: this.data.traderId, + }).then((res) => { + this.setData({ + provinceList: res + }) + }) + + this.setData({ + provinceShow: true + }) + }, + + /** + * + * 选择省查找市 + * + * @param {*} e + */ + _chooseProvince(e) { + const ProvinceID = e.currentTarget.dataset.id + const provinceName = e.currentTarget.dataset.name + const traderId = e.currentTarget.dataset.tid + this.setData({ + provinceShow: false, + cityShow: true, + backShow: true, + provinceName: provinceName, + }) + wx.showLoading({ + title: '加载中', + mask: true + }) + getCitysByProId({ + province: ProvinceID, + traderId: traderId?traderId:'', + }).then((res) => { + wx.hideLoading() + this.setData({ + cityList: res + }) + }) + }, + + + /** + * + * 选择市查找区 + * + * @param {*} e + */ + _chooseCity(e) { + const city = e.currentTarget.dataset.id + const cityName = e.currentTarget.dataset.name + const traderId = e.currentTarget.dataset.tid + this.setData({ + cityShow: false, + areaShow: true, + cityName: cityName + }) + wx.showLoading({ + title: '加载中', + mask: true + }) + getAreaByCityId({ + city: city, + traderId: traderId?traderId:'', + }).then((res) => { + wx.hideLoading() + this.setData({ + areaList: res + }) + }) + }, + + + /** + * + * 选择区 + * + * @param {*} e + */ + _chooseArea(e) { + const areaName = e.currentTarget.dataset.name + this.setData({ + showRegion: false, + }) + setTimeout(()=>{ + this.setData({ + provinceShow: true, + areaShow: false, + backShow: false, + areaName: areaName + }) + console.log("选择的省市区===》》》", this.data.provinceName, this.data.cityName, this.data.areaName) + var data = { + provinceName: this.data.provinceName, + cityName: this.data.cityName, + areaName: this.data.areaName, + } + this.triggerEvent('chooseRegion', data) + },200) + }, + + + + /** + * + * 市区后退 + * + * @param {*} e + */ + _backChooseRegion(e) { + if (this.data.cityShow) { + this.setData({ + cityShow: false, + provinceShow: true, + backShow: false, + }) + } else if (this.data.areaShow) { + this.setData({ + areaShow: false, + cityShow: true + }) + } + }, + + /** + * + * 关闭弹框 + * + * @param {*} e + */ + _closeRegion(e) { + this.setData({ + provinceName: "", + cityName: "", + areaName: "", + addressName: "", + provinceShow: true, + showRegion: false, + cityShow: false, + areaShow: false, + backShow: false, + }) + }, + + + } +}) \ No newline at end of file diff --git a/components/region/region.json b/components/region/region.json new file mode 100644 index 0000000..b94c3e8 --- /dev/null +++ b/components/region/region.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-popup": "@vant/weapp/popup/index" + } +} \ No newline at end of file diff --git a/components/region/region.wxml b/components/region/region.wxml new file mode 100644 index 0000000..6892a10 --- /dev/null +++ b/components/region/region.wxml @@ -0,0 +1,13 @@ + + + + + + 请选择地址 + + + {{item.columns.ProvinceName}} + {{item.columns.CityName}} + {{item.columns.DistrictName}} + + \ No newline at end of file diff --git a/components/region/region.wxss b/components/region/region.wxss new file mode 100644 index 0000000..e28b0d7 --- /dev/null +++ b/components/region/region.wxss @@ -0,0 +1,35 @@ +/* components/region/region.wxss */ +.content-province-title { + width: 100%; + height: 100rpx; + display: flex; + align-items: center; + justify-content: center; + font-weight: bold; + font-size: 30rpx; + border-bottom: 3rpx solid #f2f2f2; + position: relative; +} + +.content-province-title-left { + position: absolute; + left: 0; + margin-left: 30rpx; + width: 45rpx; + height: 45rpx; +} + +.content-province-sc { + width: 100%; + height: calc(100% - 100rpx); +} + +.content-province { + width: 100%; + height: 100rpx; + display: flex; + font-size: 26rpx; + align-items: center; + justify-content: center; + border-bottom: 3rpx solid #f2f2f2; +} \ No newline at end of file diff --git a/components/statusBar/statusBar.js b/components/statusBar/statusBar.js new file mode 100644 index 0000000..0969fcd --- /dev/null +++ b/components/statusBar/statusBar.js @@ -0,0 +1,69 @@ +// pages/components/statusBar/statusBar.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + showBackTop: Boolean, + title: String + }, + + /** + * 组件的初始数据 + */ + data: { + showBack: true + }, + + /** + * 组件的方法列表 + */ + methods: { + /** + * + *返回上一级 + * + * @param {*} e + */ + _backPage(e) { + wx.navigateBack() + }, + }, + + lifetimes: { + attached: function () { + wx.getSystemInfo({ + success: (res) => { + const isiOS = res.system.indexOf('iOS') > -1; + this.setData({ + navHeight: isiOS ? 44 : 48, + statusBarHeight: res.statusBarHeight, + windowHeight: res.windowHeight, + windowWidth: res.windowWidth, + }) + } + }) + // wx.getSystemInfo({ + // success: (res) => { + // const isiOS = res.system.indexOf('iOS') > -1; + // this.setData({ + // navHeight: isiOS ? 44 : 48, + // statusBarHeight: res.statusBarHeight, + // windowHeight: res.windowHeight, + // windowWidth: res.windowWidth, + // }) + // } + // }) + }, + }, + + pageLifetimes: { + show: function () { + if (getCurrentPages().length <= 1) { + this.setData({ + showBack: false + }) + } + }, + } +}) \ No newline at end of file diff --git a/components/statusBar/statusBar.json b/components/statusBar/statusBar.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/components/statusBar/statusBar.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/components/statusBar/statusBar.wxml b/components/statusBar/statusBar.wxml new file mode 100644 index 0000000..b3894f0 --- /dev/null +++ b/components/statusBar/statusBar.wxml @@ -0,0 +1,11 @@ + + + + + + + {{title}} + + + + diff --git a/components/statusBar/statusBar.wxss b/components/statusBar/statusBar.wxss new file mode 100644 index 0000000..e8960d3 --- /dev/null +++ b/components/statusBar/statusBar.wxss @@ -0,0 +1,47 @@ +/* pages/components/statusBar/statusBar.wxss */ +.diynavbar-content { + position: fixed; + top: 0; + z-index: 9999; +} + +.diynavbar { + display: flex; + align-items: flex-end; +} + +.diynavbar-none { + display: flex; + align-items: flex-end; + justify-content: center; +} + +.navBar-content { + width: 750rpx; + display: flex; + align-items: center; +} + +.navBar-search-container { + position: relative; + display: flex; + width: 100%; + flex-direction: row; + justify-content: center; + align-items: center; + margin-left: 20rpx; +} + + +.navBar-search-text { + font-size: 36rpx; + font-weight: bold; + color: #ffffff; +} + +.navBar-search-image { + position: absolute; + width: 65rpx; + height: 65rpx; + left: 0; +} \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js new file mode 100644 index 0000000..e64d3e1 --- /dev/null +++ b/custom-tab-bar/index.js @@ -0,0 +1,78 @@ +Component({ + data: { + selected: 0, + "selectedColor": "#0a6597", + "color": "#999999", + "borderStyle": "black", + "backgroundColor": "#ffffff", + navList: [] + }, + ready() { + if(wx.getStorageSync('userType') == 'PLATFORM_EMP'){//平台员工 + this.setData({ + navList: [{ + "pagePath": "/pages/home/home", + "text": "首页", + "iconPath": "/img/home.png", + "selectedIconPath": "/img/home-se.png" + }, + { + "pagePath": "/pages/pend/pend", + "text": "待办", + "iconPath": "/img/pend.png", + "selectedIconPath": "/img/pend-se.png" + }, + { + "pagePath": "/pages/mine/mine", + "text": "我的", + "iconPath": "/img/mine.png", + "selectedIconPath": "/img/mine-se.png" + }] + }); + }else if(wx.getStorageSync('userType') == 'SERVICE_PROV'){//服务商 + this.setData({ + navList: [{ + "pagePath": "/monitor/pages/home/home", + "text": "首页", + "iconPath": "/img/home.png", + "selectedIconPath": "/img/home-se.png" + }, + { + "pagePath": "/monitor/pages/workOrder/workOrder", + "text": "工单", + "iconPath": "/img/mine.png", + "selectedIconPath": "/img/mine-se.png" + }] + }); + }else{//代理商 + this.setData({ + navList: [{ + "pagePath": "/pages/home/home", + "text": "首页", + "iconPath": "/img/home.png", + "selectedIconPath": "/img/home-se.png" + }, + { + "pagePath": "/pages/mine/mine", + "text": "我的", + "iconPath": "/img/mine.png", + "selectedIconPath": "/img/mine-se.png" + }] + }); + } + }, + methods: { + switchTab(e) { + const data = e.currentTarget.dataset + const url = data.path + if(url =='/monitor/pages/home/home' || url =='/monitor/pages/workOrder/workOrder'){ + wx.navigateTo({ + url: url, //因为添加页面在分包中 因此只能使用wx.navigateTo跳转 + }) + }else{ + wx.switchTab({url}) + } + + } + } +}) \ No newline at end of file diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/custom-tab-bar/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml new file mode 100644 index 0000000..d733d7e --- /dev/null +++ b/custom-tab-bar/index.wxml @@ -0,0 +1,8 @@ + + + + + + {{item.text}} + + diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss new file mode 100644 index 0000000..7caca50 --- /dev/null +++ b/custom-tab-bar/index.wxss @@ -0,0 +1,40 @@ +.tab-bar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: white; + display: flex; + box-sizing: content-box; + height: 48px; + padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom); + +} + +.tab-bar-border { + background-color: rgba(0, 0, 0, 0.15); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 1px; + transform: scaleY(0.5); +} + +.tab-bar-item { + flex: 1; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.tab-bar-item image { + width: 27px; + height: 27px; +} + +.tab-bar-item view { + font-size: 10px; +} diff --git a/home/components/finish/finish.js b/home/components/finish/finish.js new file mode 100644 index 0000000..1a2e684 --- /dev/null +++ b/home/components/finish/finish.js @@ -0,0 +1,918 @@ +// home/components/finish/finish.js +const { + getFormSet,IMG_BASE_URL,WU_TU_PIAN_URL +} = require('../../../api/api') +Component({ + /** + * 组件的属性列表 + */ + properties: { + detailObj: Object, + detail: Object + }, + + /** + * 组件的初始数据 + */ + data: { + formSetObj:{}, + capture: ['album','camera'], + //安装 + photoTips: [ + { + sampleGraph: '', + showKey: 'safety_warning_img2', + must: '0', + status: '0', + key:'safetyWarningImg2', + num: 15, + title: '三级安全教育卡', + message: '' + },{ + sampleGraph: '', + showKey: 'kg_condition_files', + must: '0', + status: '0', + key:'kgConditionFiles', + num: 15, + min: 1, + title: '安全防护措施合照照片', + message: '' + }, + //华融 + { + sampleGraph: '', + showKey: 'other_imgs5', + must: '0', + status: '0', + key:'otherImgs5', + num: 15, + title: '水槽细节照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs6', + must: '0', + status: '0', + key:'otherImgs6', + num: 15, + title: '落水管照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs7', + must: '0', + status: '0', + key:'otherImgs7', + num: 15, + title: '假梁-斜梁方向', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs8', + must: '0', + status: '0', + key:'otherImgs8', + num: 15, + title: '并网箱逆变器防雨罩照片', + message: '' + }, + //广发资方 + { + sampleGraph: '', + showKey: 'safety_warning_img2_03', + must: '0', + status: '0', + key:'safetyWarningImg2', + num: 15, + title: '施工安全图-三级安全教育', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img3', + must: '0', + status: '0', + key:'safetyWarningImg3', + num: 15, + title: '施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋)', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img', + must: '0', + status: '0', + key:'safetyWarningImg', + num: 15, + title: '施工安全图-安全警示牌', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_disclose_doc_img', + must: '0', + status: '0', + key:'safetyDiscloseDocImg', + num: 15, + title: '施工安全图-安全技术交底书', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img10', + must: '0', + status: '0', + key:'zjImg10', + num: 15, + min: 3, + title: '基础安装-螺栓孔洞防水图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img11', + must: '0', + status: '0', + key:'zjImg11', + num: 15, + title: '基础安装-柱脚防水完工图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5_03', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '支架安装图-支架安装完成VR图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img8', + must: '0', + status: '0', + key:'zjImg8', + num: 15, + title: '支架安装图-支架方阵(东向西完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img9', + must: '0', + status: '0', + key:'zjImg9', + num: 15, + title: '支架安装图-支架方阵(北向南完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4_03', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架安装图-立柱东西间距、南北间距(带尺寸)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img12', + must: '0', + status: '0', + key:'zjImg12', + num: 15, + title: '支架安装图-斜梁悬挑(南)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img13', + must: '0', + status: '0', + key:'zjImg13', + num: 15, + title: '支架安装图-斜梁悬挑(北)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img14', + must: '0', + status: '0', + key:'zjImg14', + num: 15, + title: '支架安装图-檀条悬挑(东)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img15', + must: '0', + status: '0', + key:'zjImg15', + num: 15, + title: '支架安装图-檀条悬挑(西)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4_03', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '支架接地图-支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img3', + must: '0', + status: '0', + key:'componentImg3', + num: 15, + title: '组件航拍俯视照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img4', + must: '0', + status: '0', + key:'componentImg4', + num: 15, + title: '组件安装完成VR视图', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img1', + must: '0', + status: '0', + key:'bkImg1', + num: 15, + title: '边框接地图-边框与边框接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1_03', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '边框接地图-组件安装倾角', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img2', + must: '0', + status: '0', + key:'bkImg2', + num: 15, + title: '边框接地图-边框与支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img3', + must: '0', + status: '0', + key:'bkImg3', + num: 15, + title: '边框接地图-其他图片', + message: '' + },{ + sampleGraph: '', + showKey: 'yk_img1', + must: '0', + status: '0', + key:'ykImg1', + num: 15, + title: '压块或背压板照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs_03', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装图-整体外观及走线及采集器(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img_03', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器安装图-铭牌', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs_03', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zlc_img', + must: '0', + status: '0', + key:'nbqZlcImg', + num: 15, + title: '逆变器安装图-逆变器交流侧', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs_03', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '逆变器安装图-组串开路电压照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img_03', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱安装图-外观及走线(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img_03', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱安装图-并网箱内部全景', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_jd_img', + must: '0', + status: '0', + key:'bwJdImg', + num: 15, + title: '并网箱安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img_03', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆走向(屋顶、下墙)、线缆保护管(或桥架)敷设及固定照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs_03', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '电缆桥架内部电缆照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img8', + must: '0', + status: '0', + key:'jdImg8', + num: 15, + title: '接地极图-并网箱、逆变器安装接地极', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5_03', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '接地极图-支架接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img11', + must: '0', + status: '0', + key:'jdImg11', + num: 15, + title: '接地极图-支架接地电阻测量照片(远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img9', + must: '0', + status: '0', + key:'jdImg9', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img12', + must: '0', + status: '0', + key:'jdImg12', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻测量照片 (远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img10', + must: '0', + status: '0', + key:'jdImg10', + num: 15, + title: '接地极图-接地引下线警示做法', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img1', + must: '0', + status: '0', + key:'fsImg1', + num: 15, + title: '防水措施图-横竖向水槽', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img2', + must: '0', + status: '0', + key:'fsImg2', + num: 15, + title: '防水措施图-落水管走向及其固定', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img3', + must: '0', + status: '0', + key:'fsImg3', + num: 15, + title: '防水措施图-其他图片', + message: '' + },{ + sampleGraph: '', + showKey: 'water_mud_clamp_imgs', + must: '0', + status: '0', + key:'waterMudClampImgs', + num: 15, + title: '导水排泥夹照片', + message: '' + }, + //越秀 + { + sampleGraph: '', + showKey: 'dzjc1', + must: '1', + status: '0', + key:'dzjc1', + num: 15, + title: '电站基础-主屋', + message: '' + },{ + sampleGraph: '', + showKey: 'dzjc2', + must: '0', + status: '0', + key:'dzjc2', + num: 15, + title: '电站基础-副屋', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img1', + must: '0', + status: '0', + key:'zjImg1', + num: 15, + title: '支架正面照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img2', + must: '0', + status: '0', + key:'zjImg2', + num: 15, + title: '支架侧视图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img3', + must: '0', + status: '0', + key:'zjImg3', + num: 15, + title: '支架北侧照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架型号照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '航拍图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '组件倾角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img2', + must: '0', + status: '0', + key:'componentImg2', + num: 15, + title: '组件方位角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '屋顶线缆安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器组串接入照片', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱内部照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱逆变器整体照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dqsb_an_img_one', + must: '0', + status: '0', + key:'dqsbAnImgOne', + num: 15, + title: '逆变器注册截图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_plate_img', + must: '0', + status: '0', + key:'zjPlateImg', + num: 15, + title: '组件铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '开路电压图', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img1', + must: '0', + status: '0', + key:'jdImg1', + num: 15, + title: '组件与组件之间接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img2', + must: '0', + status: '0', + key:'jdImg2', + num: 15, + title: '组件与支架接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img3', + must: '0', + status: '0', + key:'jdImg3', + num: 15, + title: '支架与接地扁铁连接照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '接地扁铁下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '支架接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img6', + must: '0', + status: '0', + key:'jdImg6', + num: 15, + title: '电气接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_report', + must: '0', + status: '0', + key:'zjReport', + num:1, + title: '自检记录报告', + message: '' + },{ + sampleGraph: '', + showKey: 'other_files', + must: '0', + status: '0', + key:'otherFiles', + num:2, + title: '其它资料', + message: '' + },{ + sampleGraph: '', + showKey: 'supplement_video_url', + must: '0', + status: '0', + key:'supplementVideoUrl', + num:5, + title: '补充视频', + message: '' + }, + ], + // 安装 + photo: { + supplementVideoUrl: [], //补充视频 + contractUrl: [], //合同 + filingDocumentPhoto: [], //备案证 + otherImgs1: [], //银行印鉴留样 + otherImgs2: [], //法定代表人/负责人签字照 + otherImgs3: [], //正脸、持笔/持印、合同签署页同框 + otherImgs4: [], //签署完成照片 + //工程信息 + dzjc1: [], //电站基础-主屋照片 + dzjc2: [], //电站基础-副屋照片 + nbqPlateImg: [],//逆变器序列号照片,逆变器1铭牌照片 + txPlateImg: [],//逆变器通讯棒照片,通讯棒1铭牌照 + zjPlateImg: [],//组件铭牌照片 + zjSnImgs:[],//组件SN + zjImg1: [],//膨胀螺栓 + zjImg2: [],//基座安装固定 + zjImg3: [],//底座防水 + zjImg4: [],//支架基础距离房檐的距离 + zjImg5: [],//支架东向西拍摄 + zjImg6: [],//支架西向东拍摄--- + zjImg7: [],//支架南向北拍摄--- + zjImg8: [],//支架北向南拍摄--- + zjImg9: [],//支架角度---- + fixOtherImg: [], //线缆下墙照片 + componentImg1: [],//支架节点(斜支撑) + componentImg2: [],//支架距照片(南北) + componentImg3: [],//支架距照片(东西) + componentImg4: [],//防风加固,1-3张 + sizeMeasureImgs: [],//方管尺寸测量---,9张 + totalImgs: [],//并网箱、逆变器外部安装照片、接地引下线,逆变器、并网箱整体安装照片, 存在字段名逆变器和并网箱接地照 + bwInnerImg: [],//并网箱内部整体照片 + dcImgs: [], //逆变器安装照片 + nbqZbImg: [],//并网箱逆变器整体照片 + dqsbAnImgOne: [],//直流线缆保护 + dqsbAnImgTwo: [],//直流线缆固定 + zjJdImgs: [],//引下线与支架连接点、南北坡接地连接点,2张---- + groundResistanceImgs: [],//接地电阻,1-2张----- + zujianJdImg: [],//组件边框接地 + openWayVoltageImgs: [],//开路电压,1-6张----- + directionAirImg1: [],//东向西航拍---- + directionAirImg2: [],//西向东航拍---- + directionAirImg3: [],//南向北航拍---- + directionAirImg4: [],//北向南航拍---- + zjNearImg: [],//组件近景---- + zjAngleImg: [],//组件角度---- + zjItemImg: [],//檩条出组件照片---- + waterChannelImg: [],//水槽照片---- + mediumFixImg: [],//中压固定照片---- + safetyWarningImg: [],//安全警示牌---- + safetyDiscloseDocImg: [],//现场安全交底文件---- + discloseDocImg: [],//现场交底照片---- + recordDocImg: [],//记录表---- + jdImg1: [],//组件与组件之间接地照片 + jdImg2: [],//组件与支架接地照片 + jdImg3: [],//支架与接地扁铁连接照片 + jdImg4: [],//接地扁铁下墙照片 + jdImg5: [],//支架接地电阻照片 + jdImg6: [],//电气接地电阻照片 + zjReport:[],//自检记录报告 + otherFiles: [], //其他资料 + kgConditionFiles: [], //安全防护措施合照照片 + //广发 + safetyWarningImg2:[],//施工安全图-三级安全教育 + safetyWarningImg3:[],//施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋) + safetyWarningImg:[],// 施工安全图-安全警示牌 + safetyDiscloseDocImg:[],// 施工安全图-安全技术交底书 + zjImg10:[],// 基础安装-螺栓孔洞防水图 + zjImg11:[],// 基础安装-柱脚防水完工图 + zjImg8:[],// 支架安装图-支架方阵(东向西完工照) + zjImg9:[],// 支架安装图-支架方阵(北向南完工照) + zjImg12:[],// 支架安装图-斜梁悬挑(南) + zjImg13:[],// 支架安装图-斜梁悬挑(北) + zjImg14:[],// 支架安装图-檀条悬挑(东) + zjImg15:[],// 支架安装图-檀条悬挑(西) + componentImg3:[],// 组件航拍俯视照片 + componentImg4:[],// 组件安装完成VR视图 + bkImg1:[],// 边框接地图-边框与边框接地 + bkImg2:[],// 边框接地图-边框与支架接地 + bkImg3:[],// 边框接地图-其他图片 + ykImg1:[],// 压块或背压板照片 + nbqZlcImg:[],// 逆变器安装图-逆变器交流侧 + bwJdImg:[],// 并网箱安装图-接地情况 + jdImg8:[],// 接地极图-并网箱、逆变器安装接地极 + jdImg11:[],// 接地极图-支架接地电阻测量照片(远景) + jdImg9:[],// 接地极图-并网箱、逆变器安装接地电阻阻值(近景) + jdImg12:[],// 接地极图-并网箱、逆变器安装接地电阻测量照片 (远景) + jdImg10:[],// 接地极图-接地引下线警示做法 + fsImg1:[],// 防水措施图-横竖向水槽 + fsImg2:[],// 防水措施图-落水管走向及其固定 + fsImg3:[],// 防水措施图-其他图片 + waterMudClampImgs: [], //导水排泥夹照片 + //华融 + otherImgs5:[], //水槽细节照片 + otherImgs6:[], //落水管照片 + otherImgs7:[], //假梁-斜梁方向 + otherImgs8:[], //并网箱逆变器防雨罩照片 + }, + }, + ready(){ + this.getFormSet() + console.log('安装组件', this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + /** 获取自定义字段 */ + getFormSet() { + getFormSet({ + stage: '03', //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网 + partner: this.data.detail.management, + }).then((res) => { + let photoTips = this.data.photoTips; + let keyList = Object.keys(res.data.columns) + photoTips.forEach((item)=>{ + keyList.forEach((item3)=>{ + if(item.showKey === item3){ + item.status = res.data.columns[item3].status + item.must = res.data.columns[item3].mustFillFlag + } + }) + }) + let resp = this.data.detail + if (resp.contract_url) {//合同 + let contractUrl = resp.contract_url ? resp.contract_url .split(",") : []; + contractUrl.forEach(itm=>{ + this.data.photo.contractUrl.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.contractUrl`]:resp.contract_url ? this.data.photo.contractUrl: [], + }) + } + if (resp.filing_document_photo) {//备案证 + let filingDocumentPhoto = resp.filing_document_photo ? resp.filing_document_photo.split(",") : []; + filingDocumentPhoto.forEach(itm=>{ + this.data.photo.filingDocumentPhoto.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + // [`photo.filingDocumentPhoto[0].url`]:resp.filing_document_photo ? IMG_BASE_URL + resp.filing_document_photo : WU_TU_PIAN_URL,//备案证 + [`photo.filingDocumentPhoto`]: this.data.photo.filingDocumentPhoto, + }) + } + if (resp.report) { + for(let i in this.data.photo){ + if (resp.report[i]) { + let arr = resp.report[i].split(","),arr2=[]; + arr.forEach(itm=>{ + arr2.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.${i}`]: arr2, + }); + } + } + } + this.setData({ + formSetObj: res.data.columns, + photoTips + }) + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if (suffix == 'pdf') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + showMenu: true, + success: function (res) {} + }) + } + }) + } else { + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + } +}) \ No newline at end of file diff --git a/home/components/finish/finish.json b/home/components/finish/finish.json new file mode 100644 index 0000000..f227f84 --- /dev/null +++ b/home/components/finish/finish.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/finish/finish.wxml b/home/components/finish/finish.wxml new file mode 100644 index 0000000..3585654 --- /dev/null +++ b/home/components/finish/finish.wxml @@ -0,0 +1,153 @@ + + + + + + 项目备案代码 + + + + + + + + + 备案证(1-4张) + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + 银行印鉴留样(1-4张) + + + + + + + + + + + + + + 签约现场照片-法定代表人/负责人签字照(1-4张) + + + + + + + + + + + + + + 签约现场照片-正脸、持笔/持印、合同签署页同框(1-4张) + + + + + + + + + + + + + + 签署完成照片(1-4张) + + + + + + + + + + + + + + + + 合同 + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + 工程信息 + + + + + + + + + {{child.title}} + ({{child.min}}-{{child.num}}张) + (1-{{child.num}}张) + + + + + {{util.formartFileName(childs.name)}} + + + + + + + + + + + + + + + + + + + 完工备注 + {{detail.report.completeRemark}} + + + + \ No newline at end of file diff --git a/home/components/finish/finish.wxss b/home/components/finish/finish.wxss new file mode 100644 index 0000000..5d16aab --- /dev/null +++ b/home/components/finish/finish.wxss @@ -0,0 +1,7 @@ +/* home/components/finish/finish.wxss */ +@import "../../pages/completion/completion.wxss"; +/** 文件上传样式 **/ +.txt-upload{flex: 1; color: blue; font-size: 24rpx; width: 100%;} +.txt-upload-list{ display: flex; justify-content: space-between; margin:4rpx 0 20rpx;} +.txt-upload-list text:first-child{flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.txt-upload-list text:last-child{width: 80rpx; margin-left: 20rpx;} \ No newline at end of file diff --git a/home/components/finishHR/finishHR.js b/home/components/finishHR/finishHR.js new file mode 100644 index 0000000..eb71ba0 --- /dev/null +++ b/home/components/finishHR/finishHR.js @@ -0,0 +1,938 @@ +// home/components/finish/finish.js +const { + getFormSet,IMG_BASE_URL,WU_TU_PIAN_URL +} = require('../../../api/api') +Component({ + /** + * 组件的属性列表 + */ + properties: { + detailObj: Object, + detail: Object + }, + + /** + * 组件的初始数据 + */ + data: { + formSetObj:{}, + capture: ['album','camera'], + //安装 + photoTips: [ + // { + // sampleGraph: '', + // showKey: 'safety_warning_img2', + // must: '0', + // status: '0', + // key:'safetyWarningImg2', + // num: 15, + // title: '三级安全教育卡', + // message: '' + // },{ + // sampleGraph: '', + // showKey: 'kg_condition_files', + // must: '0', + // status: '0', + // key:'kgConditionFiles', + // num: 15, + // min: 1, + // title: '安全防护措施合照照片', + // message: '' + // }, + //华融 + { + sampleGraph: '', + showKey: 'other_imgs5', + must: '0', + status: '0', + key:'otherImgs5', + num: 15, + title: '水槽细节照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs6', + must: '0', + status: '0', + key:'otherImgs6', + num: 15, + title: '落水管照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs7', + must: '0', + status: '0', + key:'otherImgs7', + num: 15, + title: '假梁-斜梁方向', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs8', + must: '0', + status: '0', + key:'otherImgs8', + num: 15, + title: '并网箱逆变器防雨罩照片', + message: '' + }, + //广发资方 + { + sampleGraph: '', + showKey: 'safety_warning_img2_03', + must: '0', + status: '0', + key:'safetyWarningImg2', + num: 15, + title: '施工安全图-三级安全教育', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img3', + must: '0', + status: '0', + key:'safetyWarningImg3', + num: 15, + title: '施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋)', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img', + must: '0', + status: '0', + key:'safetyWarningImg', + num: 15, + title: '施工安全图-安全警示牌', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_disclose_doc_img', + must: '0', + status: '0', + key:'safetyDiscloseDocImg', + num: 15, + title: '施工安全图-安全技术交底书', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img10', + must: '0', + status: '0', + key:'zjImg10', + num: 15, + min: 3, + title: '基础安装-螺栓孔洞防水图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img11', + must: '0', + status: '0', + key:'zjImg11', + num: 15, + title: '基础安装-柱脚防水完工图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5_03', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '支架安装图-支架安装完成VR图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img8', + must: '0', + status: '0', + key:'zjImg8', + num: 15, + title: '支架安装图-支架方阵(东向西完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img9', + must: '0', + status: '0', + key:'zjImg9', + num: 15, + title: '支架安装图-支架方阵(北向南完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4_03', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架安装图-立柱东西间距、南北间距(带尺寸)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img12', + must: '0', + status: '0', + key:'zjImg12', + num: 15, + title: '支架安装图-斜梁悬挑(南)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img13', + must: '0', + status: '0', + key:'zjImg13', + num: 15, + title: '支架安装图-斜梁悬挑(北)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img14', + must: '0', + status: '0', + key:'zjImg14', + num: 15, + title: '支架安装图-檀条悬挑(东)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img15', + must: '0', + status: '0', + key:'zjImg15', + num: 15, + title: '支架安装图-檀条悬挑(西)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4_03', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '支架接地图-支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img3', + must: '0', + status: '0', + key:'componentImg3', + num: 15, + title: '组件航拍俯视照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img4', + must: '0', + status: '0', + key:'componentImg4', + num: 15, + title: '组件安装完成VR视图', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img1', + must: '0', + status: '0', + key:'bkImg1', + num: 15, + title: '边框接地图-边框与边框接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1_03', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '边框接地图-组件安装倾角', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img2', + must: '0', + status: '0', + key:'bkImg2', + num: 15, + title: '边框接地图-边框与支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img3', + must: '0', + status: '0', + key:'bkImg3', + num: 15, + title: '边框接地图-其他图片', + message: '' + },{ + sampleGraph: '', + showKey: 'yk_img1', + must: '0', + status: '0', + key:'ykImg1', + num: 15, + title: '压块或背压板照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs_03', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装图-整体外观及走线及采集器(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img_03', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器安装图-铭牌', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs_03', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zlc_img', + must: '0', + status: '0', + key:'nbqZlcImg', + num: 15, + title: '逆变器安装图-逆变器交流侧', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs_03', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '逆变器安装图-组串开路电压照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img_03', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱安装图-外观及走线(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img_03', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱安装图-并网箱内部全景', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_jd_img', + must: '0', + status: '0', + key:'bwJdImg', + num: 15, + title: '并网箱安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img_03', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆走向(屋顶、下墙)、线缆保护管(或桥架)敷设及固定照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs_03', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '电缆桥架内部电缆照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img8', + must: '0', + status: '0', + key:'jdImg8', + num: 15, + title: '接地极图-并网箱、逆变器安装接地极', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5_03', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '接地极图-支架接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img11', + must: '0', + status: '0', + key:'jdImg11', + num: 15, + title: '接地极图-支架接地电阻测量照片(远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img9', + must: '0', + status: '0', + key:'jdImg9', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img12', + must: '0', + status: '0', + key:'jdImg12', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻测量照片 (远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img10', + must: '0', + status: '0', + key:'jdImg10', + num: 15, + title: '接地极图-接地引下线警示做法', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img1', + must: '0', + status: '0', + key:'fsImg1', + num: 15, + title: '防水措施图-横竖向水槽', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img2', + must: '0', + status: '0', + key:'fsImg2', + num: 15, + title: '防水措施图-落水管走向及其固定', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img3', + must: '0', + status: '0', + key:'fsImg3', + num: 15, + title: '防水措施图-其他图片', + message: '' + }, + //越秀 + { + sampleGraph: '', + showKey: 'dzjc1', + must: '1', + status: '0', + key:'dzjc1', + num: 15, + title: '电站基础-主屋', + message: '' + },{ + sampleGraph: '', + showKey: 'dzjc2', + must: '0', + status: '0', + key:'dzjc2', + num: 15, + title: '电站基础-副屋', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img1', + must: '0', + status: '0', + key:'zjImg1', + num: 15, + title: '支架正面照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img2', + must: '0', + status: '0', + key:'zjImg2', + num: 15, + title: '支架侧视图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img3', + must: '0', + status: '0', + key:'zjImg3', + num: 15, + title: '支架北侧照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架型号照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '航拍图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '组件倾角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img2', + must: '0', + status: '0', + key:'componentImg2', + num: 15, + title: '组件方位角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '屋顶线缆安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器组串接入照片', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱内部照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱逆变器整体照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dqsb_an_img_one', + must: '0', + status: '0', + key:'dqsbAnImgOne', + num: 15, + title: '逆变器注册截图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_plate_img', + must: '0', + status: '0', + key:'zjPlateImg', + num: 15, + title: '组件铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '开路电压图', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img1', + must: '0', + status: '0', + key:'jdImg1', + num: 15, + title: '组件与组件之间接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img2', + must: '0', + status: '0', + key:'jdImg2', + num: 15, + title: '组件与支架接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img3', + must: '0', + status: '0', + key:'jdImg3', + num: 15, + title: '支架与接地扁铁连接照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '接地扁铁下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '支架接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img6', + must: '0', + status: '0', + key:'jdImg6', + num: 15, + title: '电气接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_report', + must: '0', + status: '0', + key:'zjReport', + num:1, + title: '自检记录报告', + message: '' + },{ + sampleGraph: '', + showKey: 'other_files', + must: '0', + status: '0', + key:'otherFiles', + num:2, + title: '其它资料', + message: '' + },{ + sampleGraph: '', + showKey: 'supplement_video_url', + must: '0', + status: '0', + key:'supplementVideoUrl', + num:5, + title: '补充视频', + message: '' + }, + ], + // 安装 + photo: { + supplementVideoUrl: [], //补充视频 + contractUrl: [], //合同 + filingDocumentPhoto: [], //备案证 + otherImgs1: [], //银行印鉴留样 + otherImgs2: [], //法定代表人/负责人签字照 + otherImgs3: [], //正脸、持笔/持印、合同签署页同框 + otherImgs4: [], //签署完成照片 + //工程信息 + dzjc1: [], //电站基础-主屋照片 + dzjc2: [], //电站基础-副屋照片 + nbqPlateImg: [],//逆变器序列号照片,逆变器1铭牌照片 + txPlateImg: [],//逆变器通讯棒照片,通讯棒1铭牌照 + zjPlateImg: [],//组件铭牌照片 + zjSnImgs:[],//组件SN + zjImg1: [],//膨胀螺栓 + zjImg2: [],//基座安装固定 + zjImg3: [],//底座防水 + zjImg4: [],//支架基础距离房檐的距离 + zjImg5: [],//支架东向西拍摄 + zjImg6: [],//支架西向东拍摄--- + zjImg7: [],//支架南向北拍摄--- + zjImg8: [],//支架北向南拍摄--- + zjImg9: [],//支架角度---- + fixOtherImg: [], //线缆下墙照片 + componentImg1: [],//支架节点(斜支撑) + componentImg2: [],//支架距照片(南北) + componentImg3: [],//支架距照片(东西) + componentImg4: [],//防风加固,1-3张 + sizeMeasureImgs: [],//方管尺寸测量---,9张 + totalImgs: [],//并网箱、逆变器外部安装照片、接地引下线,逆变器、并网箱整体安装照片, 存在字段名逆变器和并网箱接地照 + bwInnerImg: [],//并网箱内部整体照片 + dcImgs: [], //逆变器安装照片 + nbqZbImg: [],//并网箱逆变器整体照片 + dqsbAnImgOne: [],//直流线缆保护 + dqsbAnImgTwo: [],//直流线缆固定 + zjJdImgs: [],//引下线与支架连接点、南北坡接地连接点,2张---- + groundResistanceImgs: [],//接地电阻,1-2张----- + zujianJdImg: [],//组件边框接地 + openWayVoltageImgs: [],//开路电压,1-6张----- + directionAirImg1: [],//东向西航拍---- + directionAirImg2: [],//西向东航拍---- + directionAirImg3: [],//南向北航拍---- + directionAirImg4: [],//北向南航拍---- + zjNearImg: [],//组件近景---- + zjAngleImg: [],//组件角度---- + zjItemImg: [],//檩条出组件照片---- + waterChannelImg: [],//水槽照片---- + mediumFixImg: [],//中压固定照片---- + safetyWarningImg: [],//安全警示牌---- + safetyDiscloseDocImg: [],//现场安全交底文件---- + discloseDocImg: [],//现场交底照片---- + recordDocImg: [],//记录表---- + jdImg1: [],//组件与组件之间接地照片 + jdImg2: [],//组件与支架接地照片 + jdImg3: [],//支架与接地扁铁连接照片 + jdImg4: [],//接地扁铁下墙照片 + jdImg5: [],//支架接地电阻照片 + jdImg6: [],//电气接地电阻照片 + zjReport:[],//自检记录报告 + otherFiles: [], //其他资料 + kgConditionFiles: [], //安全防护措施合照照片 + //广发 + safetyWarningImg2:[],//施工安全图-三级安全教育 + safetyWarningImg3:[],//施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋) + safetyWarningImg:[],// 施工安全图-安全警示牌 + safetyDiscloseDocImg:[],// 施工安全图-安全技术交底书 + zjImg10:[],// 基础安装-螺栓孔洞防水图 + zjImg11:[],// 基础安装-柱脚防水完工图 + zjImg8:[],// 支架安装图-支架方阵(东向西完工照) + zjImg9:[],// 支架安装图-支架方阵(北向南完工照) + zjImg12:[],// 支架安装图-斜梁悬挑(南) + zjImg13:[],// 支架安装图-斜梁悬挑(北) + zjImg14:[],// 支架安装图-檀条悬挑(东) + zjImg15:[],// 支架安装图-檀条悬挑(西) + componentImg3:[],// 组件航拍俯视照片 + componentImg4:[],// 组件安装完成VR视图 + bkImg1:[],// 边框接地图-边框与边框接地 + bkImg2:[],// 边框接地图-边框与支架接地 + bkImg3:[],// 边框接地图-其他图片 + ykImg1:[],// 压块或背压板照片 + nbqZlcImg:[],// 逆变器安装图-逆变器交流侧 + bwJdImg:[],// 并网箱安装图-接地情况 + jdImg8:[],// 接地极图-并网箱、逆变器安装接地极 + jdImg11:[],// 接地极图-支架接地电阻测量照片(远景) + jdImg9:[],// 接地极图-并网箱、逆变器安装接地电阻阻值(近景) + jdImg12:[],// 接地极图-并网箱、逆变器安装接地电阻测量照片 (远景) + jdImg10:[],// 接地极图-接地引下线警示做法 + fsImg1:[],// 防水措施图-横竖向水槽 + fsImg2:[],// 防水措施图-落水管走向及其固定 + fsImg3:[],// 防水措施图-其他图片 + //华融 + otherImgs5:[], //水槽细节照片 + otherImgs6:[], //落水管照片 + otherImgs7:[], //假梁-斜梁方向 + otherImgs8:[], //并网箱逆变器防雨罩照片 + }, + multiPhoto: [], //图片 + remarkArr:[], //完工备注 + tabIndex: '0' + }, + ready(){ + this.getFormSet() + }, + + /** + * 组件的方法列表 + */ + methods: { + /** 获取自定义字段 */ + getFormSet() { + getFormSet({ + stage: '03', //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网 + partner: this.data.detail.management, + }).then((res) => { + let photoTips = this.data.photoTips; + let keyList = Object.keys(res.data.columns) + photoTips.forEach((item)=>{ + keyList.forEach((item3)=>{ + if(item.showKey === item3){ + item.status = res.data.columns[item3].status + item.must = res.data.columns[item3].mustFillFlag + } + }) + }) + let resp = this.data.detail + if (resp.contract_url) {//合同 + let contractUrl = resp.contract_url ? resp.contract_url .split(",") : []; + contractUrl.forEach(itm=>{ + this.data.photo.contractUrl.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.contractUrl`]:resp.contract_url ? this.data.photo.contractUrl: [], + }) + } + if (resp.filing_document_photo) {//备案证 + let filingDocumentPhoto = resp.filing_document_photo ? resp.filing_document_photo.split(",") : []; + filingDocumentPhoto.forEach(itm=>{ + this.data.photo.filingDocumentPhoto.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + // [`photo.filingDocumentPhoto[0].url`]:resp.filing_document_photo ? IMG_BASE_URL + resp.filing_document_photo : WU_TU_PIAN_URL,//备案证 + [`photo.filingDocumentPhoto`]: this.data.photo.filingDocumentPhoto, + }) + } + let multiPhoto = [] + resp.projectDetailList.forEach((item,index)=>{ + this.setData({ + [`remarkArr[${index}].completeRemark`]: item.acceptingReport.completeRemark, //完工备注 + [`photo.safetyWarningImg2`]: item.acceptingReport.safetyWarningImg2 ? item.acceptingReport.safetyWarningImg2.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //三级安全教育卡 + [`photo.kgConditionFiles`]: item.acceptingReport.kgConditionFiles ? item.acceptingReport.kgConditionFiles.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //安全防护措施合照照片 + }) + //图片 + let photo = {}; + if (item.acceptingReport) { + for(let key in this.data.photo){ + photo[key] = item.acceptingReport[key] ? item.acceptingReport[key].split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [] + } + } + multiPhoto.push(photo); + }) + this.setData({ + multiPhoto + }) + console.log('安装组件2', multiPhoto) + + // if (resp.report) { + // for(let i in this.data.photo){ + // if (resp.report[i]) { + // let arr = resp.report[i].split(","),arr2=[]; + // arr.forEach(itm=>{ + // arr2.push({ + // name:itm, + // url:IMG_BASE_URL + itm + // }); + // }); + // this.setData({ + // [`photo.${i}`]: arr2, + // }); + // } + // } + // } + this.setData({ + formSetObj: res.data.columns, + photoTips + }) + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if (suffix == 'pdf') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + showMenu: true, + success: function (res) {} + }) + } + }) + } else { + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + //tab切换 + changeTab(e){ + let index = e.currentTarget.dataset.index + this.setData({ + tabIndex: index + }) + } + } +}) \ No newline at end of file diff --git a/home/components/finishHR/finishHR.json b/home/components/finishHR/finishHR.json new file mode 100644 index 0000000..f227f84 --- /dev/null +++ b/home/components/finishHR/finishHR.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/finishHR/finishHR.wxml b/home/components/finishHR/finishHR.wxml new file mode 100644 index 0000000..a5129a8 --- /dev/null +++ b/home/components/finishHR/finishHR.wxml @@ -0,0 +1,182 @@ + + + + + + 项目备案代码 + + + + + + + + + 备案证(1-4张) + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + 银行印鉴留样(1-4张) + + + + + + + + + + + + + + 签约现场照片-法定代表人/负责人签字照(1-4张) + + + + + + + + + + + + + + 签约现场照片-正脸、持笔/持印、合同签署页同框(1-4张) + + + + + + + + + + + + + + 签署完成照片(1-4张) + + + + + + + + + + + + + + + + 合同 + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + 工程信息 + + + + + + * + * + 三级安全教育卡(1-15张) + + + + + + + + + + + + + + * + * + 安全防护措施合照照片(1-15张) + + + + + + + + + + + + + {{item.roofType}} + + + + + + + + + + + + {{child.title}} + ({{child.min}}-{{child.num}}张) + (1-{{child.num}}张) + + + + + {{util.formartFileName(childs.name)}} + + + + + + + + + + + + + + + + + + + 完工备注 + {{remarkArr[tabIndex].completeRemark}} + + + \ No newline at end of file diff --git a/home/components/finishHR/finishHR.wxss b/home/components/finishHR/finishHR.wxss new file mode 100644 index 0000000..60224d2 --- /dev/null +++ b/home/components/finishHR/finishHR.wxss @@ -0,0 +1,12 @@ +/* home/components/finish/finish.wxss */ +@import "../../pages/completion/completion.wxss"; +/** 文件上传样式 **/ +.txt-upload{flex: 1; color: blue; font-size: 24rpx; width: 100%;} +.txt-upload-list{ display: flex; justify-content: space-between; margin:4rpx 0 20rpx;} +.txt-upload-list text:first-child{flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.txt-upload-list text:last-child{width: 80rpx; margin-left: 20rpx;} + +.detail-tab{display: flex; justify-content: space-between; height: 90rpx; border-bottom: 1px solid #f0f0f0; color: #666666; position: sticky; top: 0; background: #FFF; z-index: 99; overflow: auto; background-color: #FFF;} +.detail-tab>view{flex: 1; text-align: center; line-height: 82rpx; font-size: 28rpx; position: relative; white-space: nowrap; word-break: break-all; margin: 0 20rpx;} +.detail-tab>view.active{color: #333333; font-size: 32rpx;} +.detail-tab>view .actived{width: 60rpx; height: 6rpx; background-color: #0a6597; border-radius: 3rpx; margin: 0 auto;} \ No newline at end of file diff --git a/home/components/infor/infor.js b/home/components/infor/infor.js new file mode 100644 index 0000000..1740b93 --- /dev/null +++ b/home/components/infor/infor.js @@ -0,0 +1,69 @@ +// home/components/infor/infor.js +const { + getPartnerSet,getAllConditionList +} = require('../../../api/api') +Component({ + /** + * 组件的属性列表 + */ + properties: { + // formSetObj: Object, + photo: Object, + detailObj: Object, + }, + + /** + * 组件的初始数据 + */ + data: { + isComplement: false + }, + ready(){ + this.setData({ + capitalId: wx.getStorageSync('capitalId') + }) + //当业主年龄大于65岁时,共签人信息必填,并且是开启overageFlag:是否开启超龄:1.开启 2.关闭 + this.getPartnerSet(this.data.detailObj.detail.management,()=>{ + if (this.data.detailObj.detail.overageFlag=='1' && this.data.detailObj.detail.age >= this.data.partnerSetObj.needSignerAge) { + this.setData({ + isComplement: true + }) + } + }) + this.getAllConditionList() + // console.log(1221, this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + /** + * + * 获取资方共签人 + * + * @param {*} e + */ + /*** 获取资方共签人 */ + getPartnerSet(partner, callback) { + getPartnerSet({ + partnerId: partner, + }).then((res) => { + this.setData({ + partnerSetObj: res.data + }) + if(callback) callback() + }) + }, + /** 获取自定义字段 */ + getAllConditionList() { + getAllConditionList({ //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网, 05:档案 + partner: this.data.detailObj.detail.management, + }).then((res) => { + this.setData({ + formSetObj: res.data + }) + }) + }, + } +}) \ No newline at end of file diff --git a/home/components/infor/infor.json b/home/components/infor/infor.json new file mode 100644 index 0000000..0922e68 --- /dev/null +++ b/home/components/infor/infor.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/infor/infor.wxml b/home/components/infor/infor.wxml new file mode 100644 index 0000000..921848f --- /dev/null +++ b/home/components/infor/infor.wxml @@ -0,0 +1,380 @@ + + + + 客户基本信息 + + + 客户类型 + 个人 + + + + + 身份证照片 + + + + + + + + + + + + 业主姓名 + {{detailObj.name}} + + + + + + 出生日期 + {{detailObj.detail.birthday_date}} + + + + + + 身份证生效日 + {{detailObj.detail.ic_validity_begin}} + + + + + + 身份证失效日 + {{detailObj.detail.ic_validity_end}} + + + + + + 性别 + {{detailObj.gender}} + + + + + + 年龄 + {{detailObj.age}} + + + + + + 身份证号 + {{detailObj.idCard}} + + + + + + 联系电话 + {{detailObj.phone}} + + + + + + 紧急联系人 + {{detailObj.detail.exigence_name}} + + + + + + 紧急联系电话 + {{detailObj.detail.exigence_phone}} + + + + + + + + + 客户基本信息 + + + 客户类型 + 单位 + + + + + 单位名称 + {{detailObj.name}} + + + + + + 统一社会信用代码 + {{detailObj.regno}} + + + + + + 营业执照 + + + + + + + + + 联系电话 + {{detailObj.phone}} + + + + + + + 负责人身份证 + + + + + + + + + + + + 负责人姓名 + {{detailObj.corp}} + + + + + + 证件号码 + {{detailObj.idCard}} + + + + + + 紧急联系人 + {{detailObj.detail.exigence_name}} + + + + + + 紧急联系电话 + {{detailObj.detail.exigence_phone}} + + + + + + + + 档案信息 + + + + 户口本复印件 + + + + + + + + + 房产证 + + + + + + + + + 信誉凭证 + + + + + + + + 银行账户名称 + {{detailObj.bankName }} + + + + + + 银行账号 + {{detailObj.bankCode}} + + + + + + 开户行 + {{detailObj.tssBankNumName }} + + + + + + 银行卡照片 + + + + + + + + + + 共签人身份证照片 + + + + + + + + + + + + 共签人名称 + {{detailObj.bpName}} + + + + + + 证件号码 + {{detailObj.bpIdCard}} + + + + + + 手机号 + {{detailObj.bpMobile}} + + + + + + 共签人与业主关系 + {{detailObj.bpRelation}} + + + + + + 共签人子女证明材料 + + + + + + + + + + + 档案信息 + + + + 村民代表大会决议书 + + + + + + + + + 村委议事章程 + + + + + + + + + 对公账户信息 + + + + + + + + + 产权证明-集体土地使用证 + + + + + + + + + 产权证明-不动产证书/查册证明/相关确权文件 + + + + + + + + + 银行账户名称 + {{detailObj.bankName }} + + + + + + 银行账号 + {{detailObj.bankCode}} + + + + + + 开户行 + {{detailObj.tssBankNumName }} + + + + + + 银行卡照片 + + + + + + \ No newline at end of file diff --git a/home/components/infor/infor.wxss b/home/components/infor/infor.wxss new file mode 100644 index 0000000..20a571f --- /dev/null +++ b/home/components/infor/infor.wxss @@ -0,0 +1,2 @@ +/* home/components/infor/infor.wxss */ +@import "../../pages/entryInfoDetails/entryInfoDetails"; \ No newline at end of file diff --git a/home/components/install/install.js b/home/components/install/install.js new file mode 100644 index 0000000..26ca880 --- /dev/null +++ b/home/components/install/install.js @@ -0,0 +1,34 @@ +// home/components/install/install.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + detailObj: Object, + cagesList: Array, + supportList: Array, + converterList: Array, + componentList: Array, + nbqList: Array, + zjMap: Object + }, + + /** + * 组件的初始数据 + */ + data: { + }, + ready(){ + this.setData({ + capitalId: this.data.detailObj.management + }) + // console.log(1212, this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) \ No newline at end of file diff --git a/home/components/install/install.json b/home/components/install/install.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/home/components/install/install.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/home/components/install/install.wxml b/home/components/install/install.wxml new file mode 100644 index 0000000..1f7ef06 --- /dev/null +++ b/home/components/install/install.wxml @@ -0,0 +1,150 @@ + + + + + + + + 并网箱 + + + + + + + 物料号 + {{item.code}} + + + 物料名称 + {{item.name}} + + + 物料规格 + {{item.spec}} + + + 使用数量 + {{item.amount}} + + + + + + + + + + 支架 + + + + + + + 物料号 + {{item.code}} + + + 物料名称 + {{item.name}} + + + 物料规格 + {{item.spec}} + + + + 使用数量 + {{item.amount}} + + + + + + + + + + + 逆变器({{pitem.materialModel}}|{{pitem.model}}+{{pitem.num}}台) + + + + + + + 物料品牌 + {{item.materialBrand}} + + + 物料规格 + {{item.spec}} + + + + + SN码 + + + + 验证码 + + + + 通讯棒SN码 + + + + + + + + + + + + + + 组件({{zjMap.materialModel}}|{{zjMap.model}}Wp+{{zjMap.num}}片) + + + + + + + + 物料规格 + {{item.spec}} + Wp + + + 物料条码 + + + {{index+1}}:{{itemList.barcode}} + + + + + + \ No newline at end of file diff --git a/home/components/install/install.wxss b/home/components/install/install.wxss new file mode 100644 index 0000000..0c069c4 --- /dev/null +++ b/home/components/install/install.wxss @@ -0,0 +1,2 @@ +/* home/components/install/install.wxss */ +@import "../../pages/install/install"; \ No newline at end of file diff --git a/home/components/installHR/installHR.js b/home/components/installHR/installHR.js new file mode 100644 index 0000000..90debb5 --- /dev/null +++ b/home/components/installHR/installHR.js @@ -0,0 +1,43 @@ +// home/components/install/install.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + detailObj: Object, + cagesList: Array, + supportList: Array, + converterList: Array, + componentList: Array, + productList: Array, + // nbqList: Array, + // zjMap: Object + }, + + /** + * 组件的初始数据 + */ + data: { + tabIndex: '0', + }, + ready(){ + this.setData({ + capitalId: this.data.detailObj.management, + projectList: this.data.detailObj.projectList, + }) + // console.log(1212, this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + //tab切换 + changeTab(e){ + let index = e.currentTarget.dataset.index + this.setData({ + tabIndex: index + }) + } + } +}) \ No newline at end of file diff --git a/home/components/installHR/installHR.json b/home/components/installHR/installHR.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/home/components/installHR/installHR.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/home/components/installHR/installHR.wxml b/home/components/installHR/installHR.wxml new file mode 100644 index 0000000..0136620 --- /dev/null +++ b/home/components/installHR/installHR.wxml @@ -0,0 +1,149 @@ + + + + + + {{item.roofType}} + + + + + + + + 并网箱 + + + + + + + 物料号 + {{item.code}} + + + 物料名称 + {{item.name}} + + + 物料规格 + {{item.spec}} + + + + 使用数量 + {{item.amount}} + + + + + + + + + + 支架 + + + + + + + 物料号 + {{item.code}} + + + 物料名称 + {{item.name}} + + + 物料规格 + {{item.spec}} + + + + 使用数量 + {{item.amount}} + + + + + + + + + + + 逆变器({{pitem.materialModel}}|{{pitem.model}}+{{pitem.num}}台) + + + + + + + 物料品牌 + {{item.materialBrand}} + + + 物料规格 + {{item.spec}} + + + + + SN码 + + + + 验证码 + + + + 通讯棒SN码 + + + + + + + + + + + + + + 组件({{productList[tabIndex].zjMap.materialModel}}|{{productList[tabIndex].zjMap.model}}Wp+{{productList[tabIndex].zjMap.num}}片) + + + + + + + 物料规格 + {{item.spec}} + Wp + + + 物料条码 + + + {{index+1}}:{{itemList.barcode}} + + + + + + \ No newline at end of file diff --git a/home/components/installHR/installHR.wxss b/home/components/installHR/installHR.wxss new file mode 100644 index 0000000..a34fd4d --- /dev/null +++ b/home/components/installHR/installHR.wxss @@ -0,0 +1,6 @@ +/* home/components/install/install.wxss */ +@import "../../pages/install/install"; +.detail-tab{display: flex; justify-content: space-between; height: 90rpx; border-bottom: 1px solid #f0f0f0; color: #666666; background-color: #FFF;} +.detail-tab>view{flex: 1; text-align: center; line-height: 82rpx; font-size: 28rpx; position: relative;} +.detail-tab>view.active{color: #333333; font-size: 32rpx;} +.detail-tab>view .actived{width: 60rpx; height: 6rpx; background-color: #0a6597; border-radius: 3rpx; margin: 0 auto;} \ No newline at end of file diff --git a/home/components/onGrid/onGrid.js b/home/components/onGrid/onGrid.js new file mode 100644 index 0000000..0f627c9 --- /dev/null +++ b/home/components/onGrid/onGrid.js @@ -0,0 +1,177 @@ +// home/components/onGrid/onGrid.js +const { + getFormSet,getProviceCodeList,IMG_BASE_URL +} = require('../../../api/api') +Component({ + + /** + * 组件的属性列表 + */ + properties: { + photo: Object, + detailObj: Object, + detail: Object, + }, + + /** + * 组件的初始数据 + */ + data: { + powerCompanyList:[], + contractFile: [], + contractVideoUrl: [], + otherAttachment: [], + }, + ready(){ + this.getProviceCodeList() + this.getFormSet() + }, + + /** + * 组件的方法列表 + */ + methods: { + /** 获取自定义字段 */ + getFormSet() { + getFormSet({ + stage: '04', //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网 + partner: this.data.detail.management, + }).then((res) => { + this.setData({ + formSetObj: res.data.columns + }) + let resp = this.data.detail + if (resp.contract) {//合同文件 + let contractUrl = resp.contract ? resp.contract.split(",") : []; + contractUrl.forEach(itm=>{ + this.data.contractFile.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + contractFile:resp.contract? this.data.contractFile: [], + }) + } + if (resp.contract_video_url) {//合同视频 + let contractVideoUrl = resp.contract_video_url ? resp.contract_video_url.split(",") : []; + contractVideoUrl.forEach(itm=>{ + this.data.contractVideoUrl.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + contractVideoUrl:resp.contract_video_url? this.data.contractVideoUrl: [], + }) + } + if (resp.other_attachment) {//补充资料 + let url = resp.other_attachment ? resp.other_attachment.split(",") : []; + url.forEach(itm=>{ + this.data.otherAttachment.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + otherAttachment:resp.other_attachment? this.data.otherAttachment: [], + }) + } + }) + }, + /** 选择电力公司 **/ + bindpowerCompanyList(e) { + this.setData({ + [`detail.powerCompanyName`]: this.data.powerCompanyList[e.detail.value].power_company, + [`detail.provinceCode`]: this.data.powerCompanyList[e.detail.value].code + }) + }, + /** 获取电力公司 **/ + getProviceCodeList(e) { + getProviceCodeList({}).then((res) => { + if (res.code == 200) { + let list = res.data.map(itm=>itm.columns); + this.setData({ + powerCompanyList: list + }) + } + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if (suffix == 'pdf') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + showMenu: true, + success: function (res) {} + }) + } + }) + } else { + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + //打开外链 + openWeb(e){ + wx.navigateTo({ + url: '../webView/webView', + success: function (res) { + // 通过eventChannel向被打开页面传送数据 + res.eventChannel.emit('acceptDataFromOpenerPage', { + data: e.currentTarget.dataset.path + }) + } + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if(suffix=='mp4'){// 开始预览多媒体内容 + wx.previewMedia({ + sources: [{ + url :IMG_BASE_URL + path, + type: 'video' + }], // 需要预览的资源列表 + }); + }else if(suffix != 'jpg' && suffix != 'png' && suffix != 'gif' && suffix != 'jpeg') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + fileType: suffix, + showMenu: true, + success: function (res) {} + }) + } + }) + }else{ + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + } +}) \ No newline at end of file diff --git a/home/components/onGrid/onGrid.json b/home/components/onGrid/onGrid.json new file mode 100644 index 0000000..0922e68 --- /dev/null +++ b/home/components/onGrid/onGrid.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/onGrid/onGrid.wxml b/home/components/onGrid/onGrid.wxml new file mode 100644 index 0000000..07a2559 --- /dev/null +++ b/home/components/onGrid/onGrid.wxml @@ -0,0 +1,282 @@ + + + + + + 并网机构 + + 国网 + 南网 + + + + + 购售电地址是否一致 + + + + + + + + + + + + + + 购售电地址 + + {{detail.electric_province}}{{detail.electric_city}}{{detail.electric_area}} + + + + + + + + + + + + + + + 发电户号 + + + + + + + 电表照片 + + + + + + + + + + + + 电表箱照片 + + + + + + + + + + + + 铜铝转换接头照片 + + + + + + + + + + + + + 南网营销系统档案截图(三户) + + + + + + + + + + + + 三天连续发电量监控系统截图 + + + + + + + + + + + + + 电力公司 + + {{detail.province_code_name}} + + + + + + + + 电力公司 + + {{detail.province_code_hand}} + + + + + + + 电厂编码 + + + + + + + 并网照片 + + + + + 近3天发电量 + + + + + + + + + + 补充信息 + + + + + + + + + + 补充信息2 + + + + + + + + + + + + + 购售电合同 + + + + {{util.formartFileName(child.name)}} + + + + + + + 购售电合同视频 + + + + + + + + + + + + 资方审查补充资料(1-10) + + + + {{util.formartFileName(child.name)}} + + + + + + + + + 并网调试报告 + 查看 + + + + + 保险名称 + {{detail.insuranceName}} + + + + 保险公司 + {{detail.insurance.insuranceCompany}} + + + + 第一受益人 + {{detail.insurance.firstBeneficiary}} + + + + 保险编号 + + + + + 投保金额 + + + + + 保险日期 + {{detail.insurance.insuranceDateFrom}} - {{detail.insurance.insuranceDateTo}} + + + + 保险单 + 查看 + + + + + + + + + + + + \ No newline at end of file diff --git a/home/components/onGrid/onGrid.wxss b/home/components/onGrid/onGrid.wxss new file mode 100644 index 0000000..3d36f57 --- /dev/null +++ b/home/components/onGrid/onGrid.wxss @@ -0,0 +1,7 @@ +/* home/components/onGrid/onGrid.wxss */ +@import "../../pages/bwForm/bwForm.wxss"; +/** 文件上传样式 **/ +.txt-upload{flex: 1; color: blue; font-size: 24rpx; width: 100%;} +.txt-upload-list{ display: flex; justify-content: space-between; margin:4rpx 0 20rpx;} +.txt-upload-list text:first-child{flex: 1; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.txt-upload-list text:last-child{width: 80rpx; margin-left: 20rpx;} \ No newline at end of file diff --git a/home/components/survey/survey.js b/home/components/survey/survey.js new file mode 100644 index 0000000..17c45e8 --- /dev/null +++ b/home/components/survey/survey.js @@ -0,0 +1,600 @@ +const { + getAllDictionarySelect, + IMG_BASE_URL, + WU_TU_PIAN_URL, + getAllConditionList, + findAllPlan,getKcFormSet +} = require('../../../api/api') +Component({ + properties: { + entryId: String, + childObj:Object, + }, + data: { + photo: { + flyImgs: [], //无人机航拍图 + roofPhotoOne:[],//安装区域整体照片 + roofPhotoTwo:[],//安装区域东南角照片 + roofPhotoThree:[],//安装区域西南角照片 + roofPhotoFour:[],//安装区域正南照片 + roofPhotoFive:[],//安装区域细节照片 + roofPhotoFacade:[],//房屋内部结构照片 + roofPhotoInterior:[],//房屋内部环境照片 + detailSupplementOne:[],//逆变器、配电箱预安装位置照片 + houseSupplementOne:[],//房屋其他障碍物照片 + surveyVideo:[],//踏勘补充证明视频 + surveyFiles:[],//踏勘记录表 + vrRoofOne: [], //房屋整体图 + vrRoofTwo: [], //房屋整体俯视图 + vrRoofThree: [], //房屋内部结构图 + vrRoofFour: [], //入户全景照片 + houseOutlinePhoto:[], //房屋轮廓照片 + designDrawings: [], //设计图纸 + dzImgs: [], //组合图 + }, + photoTips:[ + { + showKey: 'fly_imgs', + key:'flyImgs', + num:9, + minNum:3, + title: '无人机航拍图', + },{ + showKey: 'roof_photo_one', + key:'roofPhotoOne', + num:9, + minNum:2, + title: '安装区域整体照片', + },{ + showKey: 'roof_photo_two', + key:'roofPhotoTwo', + num:9, + minNum:1, + title: '安装区域东南角照片', + },{ + showKey: 'roof_photo_four', + key:'roofPhotoFour', + num:9, + minNum:1, + title: '安装区域正南照片', + },{ + showKey: 'roof_photo_three', + key:'roofPhotoThree', + num:9, + minNum:1, + title: '安装区域西南角照片', + },{ + showKey: 'roof_photo_five', + key:'roofPhotoFive', + num:9, + minNum:1, + title: '安装区域细节照片', + },{ + showKey: 'roof_photo_interior', + key:'roofPhotoInterior', + num:9, + minNum:2, + title: '房屋内部环境照片', + },{ + showKey: 'roof_photo_facade', + key:'roofPhotoFacade', + num:9, + minNum:2, + title: '房屋内部结构照片', + },{ + showKey: 'detail_supplement_one', + key:'detailSupplementOne', + num:9, + minNum:1, + title: '逆变器、配电箱预安装位置照片', + },{ + showKey: 'house_outline_photo', + key: 'houseOutlinePhoto', + num: 9, + minNum: 1, + title: '房屋轮廓照片', + },{ + showKey: 'house_supplement_one', + key:'houseSupplementOne', + num:9, + minNum:1, + title: '房屋其他障碍物照片', + },{ + showKey: 'survey_files', + key:'surveyFiles', + num:4, + title: '踏勘记录表', + },{ + showKey: 'roof_photo_one_03', + key: 'roofPhotoOne', + num: 9, + minNum: 2, + title: '房屋屋顶照片', + },{ + showKey: 'roof_photo_two_03', + key: 'roofPhotoTwo', + num: 9, + minNum: 1, + title: '房屋屋顶东侧图片', + },{ + showKey: 'roof_photo_three_03', + key: 'roofPhotoThree', + num: 9, + minNum: 1, + title: '房屋屋顶西侧图片', + },{ + showKey: 'roof_photo_four_03', + key: 'roofPhotoFour', + num: 9, + minNum: 1, + title: '房屋屋顶南侧图片', + },{ + showKey: 'fw_img3', + key: 'fwImg3', + num: 9, + minNum: 1, + title: '房屋屋顶东南侧图片', + },{ + showKey: 'fw_img4', + key: 'fwImg4', + num: 9, + minNum: 1, + title: '房屋屋顶西南侧图片', + },{ + showKey: 'fw_img5', + key: 'fwImg5', + num: 9, + minNum: 1, + title: '遮阴物与房屋距离、高度', + },{ + showKey: 'survey_video', + key: 'surveyVideo', + num: 8, + minNum: 1, + title: '踏勘补充证明视频', + },{ + showKey: 'house_ownership', + key: 'houseOwnership', + num: 8, + minNum: 1, + title: '房产证明', + },{ + showKey: 'survey_files_03', + key: 'surveyFiles', + num: 9, + minNum: 1, + title: '户用勘察记录表(附平面草图)', + },{ + showKey: 'fw_img1', + key: 'fwImg1', + num: 9, + minNum: 1, + title: '房屋整体图', + },{ + showKey: 'vr_roof_one', + key: 'vrRoofOne', + num: 9, + minNum: 1, + title: '房屋整体图(VR全景)', + },{ + showKey: 'vr_roof_two', + key: 'vrRoofTwo', + num: 9, + minNum: 1, + title: '房屋整体俯视图(无人机)', + },{ + showKey: 'vr_roof_three', + key: 'vrRoofThree', + num: 9, + minNum: 1, + title: '房屋内部结构图(VR)', + },{ + showKey: 'fw_img2', + key: 'fwImg2', + num: 9, + minNum: 1, + title: '房屋内部结构图', + },{ + showKey: 'vr_roof_four', + key: 'vrRoofFour', + num: 9, + minNum: 1, + title: '入户全景照片(VR)', + },{ + showKey: 'fly_imgs_04', + key: 'flyImgs', + num: 9, + minNum: 3, + title: '屋顶高空俯视照片', + },{ + showKey: 'roof_photo_two_04', + key: 'roofPhotoTwo', + num: 9, + minNum: 1, + title: '屋顶东南照片', + },{ + showKey: 'roof_photo_four_04', + key: 'roofPhotoFour', + num: 9, + minNum: 1, + title: '屋顶正南照片', + },{ + showKey: 'roof_photo_three_04', + key: 'roofPhotoThree', + num: 9, + minNum: 1, + title: '屋顶西南照片', + },{ + showKey: 'vr_roof_four_04', + key: 'vrRoofFour', + num: 9, + minNum: 1, + title: '入户全景照片', + },{ + showKey: 'survey_files_04', + key: 'surveyFiles', + num: 4, + title: '现场勘测表', + }], + formSetObj: {}, //自定义字段 + standardSolutionsList:[],//标准方案初始数量 + combinedSolutionsList:[],//组合方案初始数量 + planList:[],//方案 + gridType: '0', + gfRoofTypeList: [] + }, + ready(){ + this.findAllPlan(); + this.entryDetail(); + }, + methods:{ + /** 获取自定义字段 */ + getFormSet(partner) { + getAllConditionList({ + partner: partner, + }).then((res) => { + this.setData({ + formSetObj: res.data + }) + }) + if(partner == '03'){ + getKcFormSet().then((res) => { + if(res.data){ + this.setData({ + gfRoofTypeList: res.data, //广发--屋顶类型数据集合 + }) + } + }) + } + }, + //屋顶类型对应显示字段 + roofTypeToColumn(name){ + this.data.gfRoofTypeList.forEach(item=>{ + if(name == item.roofType){ + let selectRoofType = item.forms.map(itm=>{return itm.columns}); + let roofTypeAllColumn = {} + selectRoofType.forEach(item2=>{ + roofTypeAllColumn[item2.column_key] = { + status: 1, + must_fill_flag: item2.must_fill_flag + } + }) + // console.log(555, roofTypeAllColumn) + this.setData({ + roofTypeAllColumn + }) + } + }) + }, + /*** 获取字典 */ + getDictionaryList(partner, callback) { + getAllDictionarySelect({ + capitalId: partner, + }).then((res) => { + if(res.data){ + this.setData({ + angleAzimuthSel: res.data.angle_azimuth.map(item=>item.columns), //方位角 + }) + } + if(callback) callback(res.data) + }) + }, + /** 获取电站详情 **/ + entryDetail(e) { + let that = this + let res = JSON.parse(JSON.stringify(this.data.childObj)); + // 组件,逆变器,并网箱,支架 + var componentNum = 0; + var componentList = []; + var converterList = []; + var cagesList = []; + var zhijList = []; + if (res.componentList.length > 0) { + for (let i = 0; i < res.componentList.length; i++) { + const element = res.componentList[i]; + var OB = { + id: "", + num: "", //数量 + model: "", //名称 + addType: 0, + } + if (element.item_type == 3) { + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + OB.material_model = element.material_model; + componentNum = element.num * element.model + componentNum + componentList.push(OB) + } else if (element.item_type == 1) { + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + OB.material_model = element.material_model; + converterList.push(OB) + } else if (element.item_type == 2) { + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + cagesList.push(OB) + } else if (element.item_type == 4) { + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + zhijList.push(OB) + } + } + } + //保险购买情况 + if (res.insurance_flag == 1) { + this.setData({ + insuranceName: "控制投放及续保" + }) + } else if (res.insurance_flag == 2) { + this.setData({ + insuranceName: "控制投放" + }) + } else if (res.insurance_flag == 3) { + this.setData({ + insuranceName: "其他" + }) + } + + //方案信息-方案类型 + if (res.scheme_type == 1) {//标准方案 + this.setData({ + [`standardSolutionsList[0].id`]: res.scheme_id ? res.scheme_id : '', + [`standardSolutionsList[0].type`]: res.scheme_type_name ? res.scheme_type_name : '', + [`standardSolutionsList[0].typeId`]: res.scheme_type_id ? res.scheme_type_id : '', + [`standardSolutionsList[0].name`]: res.scheme_name ? res.scheme_name : "", + }) + } else if (res.scheme_type == 2) {//组合方案 + if (res.composePlanList.length > 0) { + var combinedSolutionsList = [] + for (let i = 0; i < res.composePlanList.length; i++) { + var combinedSolutionsListOB = {} + const element = res.composePlanList[i]; + if (i == 0) { + combinedSolutionsListOB.addType = 1; + } + combinedSolutionsListOB.code = element.code; + combinedSolutionsListOB.id = element.planId; + combinedSolutionsListOB.name = element.name; + combinedSolutionsListOB.type = element.planType; + combinedSolutionsListOB.planTypeId = element.planTypeId; + for (let i = 0; i < that.data.planList.length; i++) { + const planTypeObj = that.data.planList[i]; + + if (planTypeObj.allPlan.length > 0) { + for (let j = 0; j < planTypeObj.allPlan.length; j++) { + const plan = planTypeObj.allPlan[j]; + if (plan.id == element.planId) { + combinedSolutionsListOB.pickerIndex = i + } + } + } + } + combinedSolutionsList.push(combinedSolutionsListOB) + } + this.setData({ + combinedSolutionsList: combinedSolutionsList + }) + } + } + this.setData({ + detail: res, + id: res.id, //修改数据的时候传此ID + projectId: res.project_id, + tenant_type: res.tenant_type=='1' ? '个人' : '单位',//1.个人,2单位 + //业主信息参数 + name: res.tenant_name, + phone: res.mobile, + provinceName: res.province, + cityName: res.city, + areaName: res.area, + address: res.address, + //项目信息 + capitalId: res.zfId, //资方Id + capitalName: res.zfName, //资方 + projectName: res.projectName,//产品名称 + companyName: res.project_company_name,//项目公司 + filingName: res.filing_type=='1' ? '农户备案' : '项目公司备案',//备案类型 + leaseDate: res.leaseDate ? res.leaseDate : '',//预计投放日 + repaymentMethod: res.repayment_method,//划转方式 + //如果租金划转方式是二类卡,那么二类卡的信息 显示这个 + secCardName:res.secCardName ? res.secCardName : '',//二类卡账户名 + secCardNo:res.secCardNo ? res.secCardNo : '',//二类卡账号 + secBankNumber:res.secBankNumber ? res.secBankNumber : '',//二类卡联行号 + bankName: res.bank_name ? res.bank_name : '', //卡账号名称 + bankCode: res.bank_code ? res.bank_code : '', //卡账号 + tssBankNum: res.tss_bank_num ? res.tss_bank_num : '', //卡开户行 + longitude: res.longitude, //经度 + latitude: res.latitude, //纬度 + //房屋信息 + roofType: res.roof_type, + sealRoof:res.seal_roof,//是否封屋顶,1是,2.否 + completionYear:res.completion_year ? res.completion_year : '',//房屋建成年份 + slopeGradient:res.slope_gradient ? res.slope_gradient : '',//屋面坡度 + purlineInterval:res.purline_interval ? res.purline_interval : '',//檀条间距 + waterproof:res.waterproof ? res.waterproof : '',//屋顶防水情况 + sourcePollution:res.source_pollution ? res.source_pollution : '',//是否有污染源 + opsCondition:res.ops_condition ? res.ops_condition : '',//是否具备运维空间 + voltageClasses:res.voltage_classes ? res.voltage_classes : '',//并网电压等级 + transformerCapacity:res.transformer_capacity ? res.transformer_capacity : '',//变压器容量 + restrictFlag:res.restrict_flag ? res.restrict_flag : '',//是否符合变压器容量限制要求 + dipAngle:res.dip_angle ? res.dip_angle : '',//组件倾角 + roofArea: res.roof_area, //屋顶面积 + deg: res.distance,//配电箱至并网点距离 + height: res.building_height,//建筑高度 + azimuth: res.azimuth ? res.azimuth : 1,//方位角 + directionDeg: res.angle,//方位角 + ewLength: res.ew_length, //东西长 + nsWide: res.ns_wide, //南北宽 + + roofFaceThickness: res.roof_face_thickness,//屋面板厚度 + structureType: res.structure_type,//结构类型 + siteSlope: res.site_slope,//场地坡度 + groundType: res.ground_type,//地面类型 + geologicalCondition: res.geological_condition,//地质情况 + fenceHeight: res.fence_height,//围墙高度 + + //房屋信息-图片 + [`photo.flyImgs`]:res.fly_imgs ? res.fly_imgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//无人机航拍图 + [`photo.roofPhotoOne`]:res.roof_photo_one ? res.roof_photo_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域整体照片 + [`photo.roofPhotoTwo`]:res.roof_photo_two ? res.roof_photo_two.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域东南角照片 + [`photo.roofPhotoThree`]:res.roof_photo_three ? res.roof_photo_three.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域西南角照片 + [`photo.roofPhotoFour`]:res.roof_photo_four ? res.roof_photo_four.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域正南照片 + [`photo.roofPhotoFive`]:res.roof_photo_five ? res.roof_photo_five.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域细节照片 + [`photo.roofPhotoInterior`]:res.roof_photo_interior ? res.roof_photo_interior.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部环境照片 + [`photo.roofPhotoFacade`]:res.roof_photo_facade ? res.roof_photo_facade.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部结构照片 + [`photo.detailSupplementOne`]:res.detail_supplement_one ? res.detail_supplement_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//逆变器、配电箱预安装位置照片 + [`photo.houseSupplementOne`]:res.house_supplement_one ? res.house_supplement_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋其他障碍物照片 + [`photo.surveyVideo`]:res.survey_video ? res.survey_video.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//踏勘补充证明视频 + [`photo.houseOwnership`]:res.house_ownership ? res.house_ownership.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [],//房产证 + [`photo.surveyFiles`]:res.survey_files ? res.survey_files.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [],//踏勘记录表 + [`photo.vrRoofOne`]: res.vr_roof_one ? res.vr_roof_one.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体图(VR全景) + [`photo.vrRoofTwo`]: res.vr_roof_two ? res.vr_roof_two.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体俯视图(VR) + [`photo.vrRoofThree`]: res.vr_roof_three ? res.vr_roof_three.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图(VR) + [`photo.vrRoofFour`]: res.vr_roof_four ? res.vr_roof_four.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //入户全景照片(VR) + [`photo.houseOutlinePhoto`]: res.house_outline_photo ? res.house_outline_photo.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋轮廓照片 + //方案信息 + componentNum: (componentNum/1000).toFixed(3),//设计安装容量 + componentList: componentList,//组件 + converterList: converterList,//逆变器 + cagesList: cagesList,//并网箱 + zhijList: zhijList,//支架 + schemeType: res.scheme_type ? res.scheme_type : 1,//设计方案 + solutionRemark: res.scheme_remarks ? res.scheme_remarks : '',//方案备注 + [`photo.designDrawings`]: res.design_drawings ? res.design_drawings.split(",").map(itm => { + return { + name: itm, + url: IMG_BASE_URL + itm + } + }) : [], //设计图纸 + 'photo.zjpbImg': res.zjpb_img ? res.zjpb_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件排布图 + 'photo.zjzxImg': res.zjzx_img ? res.zjzx_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件接线图 + 'photo.zjcsImg': res.zjcs_img ? res.zjcs_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件支架图 + 'photo.zjhsImg': res.zjhs_img ? res.zjhs_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //电气图 + // [`photo.nbqwzImg[0].url`]: res.nbqwz_img ? IMG_BASE_URL + res.nbqwz_img : WU_TU_PIAN_URL, + // [`photo.pdxwzImg[0].url`]: res.pdxwz_img ? IMG_BASE_URL + res.pdxwz_img : WU_TU_PIAN_URL, + [`photo.dzImgs`]: res.dz_imgs ? res.dz_imgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//组合图 + //2024-9-4 广发 + 'photo.fwImg1': res.fw_img1 ? res.fw_img1.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋整体图 + 'photo.fwImg2': res.fw_img2 ? res.fw_img2.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图 + 'photo.fwImg3': res.fw_img3 ? res.fw_img3.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶东南侧图片 + 'photo.fwImg4': res.fw_img4 ? res.fw_img4.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶西南侧图片 + 'photo.fwImg5': res.fw_img5 ? res.fw_img5.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //遮阴物与房屋距离、高度 + }); + //并网方式处理 + if(res.recordBoxHistory){ + if(res.recordBoxHistory ==''){//并网方式没选择过,默认‘单户并网’ + this.setData({ + // gridType: '0',//并网方式 + boxTotalCount: '', //总数 + boxGroupNum: '', //编号 + boxGroupName: '', //名称 + }) + }else{ + this.setData({ + gridType: res.recordBoxHistory.type,//并网方式 + gridStatus: res.recordBoxHistory.status,//状态为1不能编辑 + boxTotalCount: res.recordBoxHistory.total_count, + boxGroupNum: res.recordBoxHistory.group_number, + boxGroupName: res.recordBoxHistory.group_name, + boxGroupId: res.recordBoxHistory.box_group_id, + }) + } + } + // console.log("photo",this.data.photo); + this.getFormSet(res.management) + //下拉字典 + this.getDictionaryList(res.management, (res2)=>{ + let angleList = res2.angle_azimuth.map(item=>item.columns) + if(res.azimuth){ + let azimuthName = angleList.find(itm => itm.dict_key === res.azimuth).dict_value; + this.setData({ + azimuthName + }) + } + }); + setTimeout(()=>{ + if(res.management == '03' && res.roof_type !=''){ + this.roofTypeToColumn(res.roof_type) + } + },500) + }, + /** 获取方案类型和方案名称 **/ + findAllPlan(e) { + let that = this + findAllPlan({ + + }).then((res) => { + for (let i = 0; i < res.length; i++) { + res[i].allPlan = JSON.parse(res[i].allPlan) + for (let j = 0; j < res[i].allPlan.length; j++) { + var element = res[i].allPlan[j].columns; + res[i].allPlan[j] = element + } + } + that.setData({ + planList: res, + }) + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if(suffix=='mp4'){// 开始预览多媒体内容 + wx.previewMedia({ + sources: [{ + url :IMG_BASE_URL + path, + type: 'video' + }], // 需要预览的资源列表 + }); + }else if(suffix != 'jpg' && suffix != 'png' && suffix != 'gif' && suffix != 'jpeg') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + fileType: suffix, + showMenu: true, + success: function (res) {} + }) + } + }) + }else{ + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + } +}) \ No newline at end of file diff --git a/home/components/survey/survey.json b/home/components/survey/survey.json new file mode 100644 index 0000000..f227f84 --- /dev/null +++ b/home/components/survey/survey.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/survey/survey.wxml b/home/components/survey/survey.wxml new file mode 100644 index 0000000..0556e80 --- /dev/null +++ b/home/components/survey/survey.wxml @@ -0,0 +1,795 @@ + + + + + + 投资方 + {{capitalName}} + + + + + + + + 安装地址 + + {{provinceName}}{{cityName}}{{areaName}} + + + {{address}} + + + + + + + * + 风压 + {{detail.wind_pressure}}kN/㎡ + + + + * + 雪压 + {{detail.snow_pressure}}kN/㎡ + + + + * + 风雪压等级 + {{detail.pressure_level}} + + + + + + 经纬度 + + {{longitude}},{{latitude}} + + + + + + + 产品名称 + {{projectName}} + + + + + + 项目公司 + {{companyName}} + + + + + + 备案类型 + {{filingName}} + + + + + + + 预计投放日 + {{leaseDate}} + + + + + + 划转方式 + + 二类卡 + + 其他 + + + + + + + 二类卡账户名 + {{secCardName}} + + + + 二类卡号 + {{secCardNo}} + + + + 联行号 + {{secBankNumber}} + + + + + + 房屋信息 + + + + + 屋顶类型 + {{roofType}} + + + + + + 是否封屋顶 + {{sealRoof==1?'是':'否'}} + + + + + + 建筑年限 + {{completionYear}} 年 + + + + + + 方位角 + {{azimuthName}} {{directionDeg}} 度 + + + + + + 建筑高度 + {{height}} 米 + + + + + + 东西长 + {{ewLength}} 米 + + + + + + 南北宽 + {{nsWide}} 米 + + + + + + 屋面板厚度 + {{roofFaceThickness}} mm + + + + + + 结构类型 + {{structureType}} + + + + + + 场地坡度 + {{siteSlope}} + + + + + + 地面类型 + {{groundType}} + + + + + + 地质情况 + {{geologicalCondition}} + + + + + + 围墙高度 + {{fenceHeight}} 米 + + + + + + 屋顶防水情况 + + 一般 + 良好 + + + + + + + 是否有污染源 + + + 没有 + + + + + + + 是否具备运维空间 + + 具备 + 不具备 + + + + + + + 并网电压等级 + {{voltageClasses}} V + + + + + + 倾角 + {{dipAngle}} 度 + + + + + + 屋顶面积 + {{roofArea}} m2 + + + + + + 变压器容量 + {{transformerCapacity}} kVA + + + + + + 是否符合变压器容量限制要求 + + 符合 + 不符合 + + + + + + + 配电箱至并网点距离 + {{deg}} 米 + + + + + + + + 并网方式 + + + + + + 本组电站个数 + + + + + 汇流组编号 + + + + + 汇流组名称 + + + + + + + + 屋顶类型 + {{roofType}} + + + + + + 是否封屋顶 + {{sealRoof==1?'是':'否'}} + + + + + + 房屋建成年份 + {{completionYear}} 年 + + + + + + 方位角 + {{azimuthName}} {{directionDeg}} 度 + + + + + + 建筑高度 + {{height}} 米 + + + + + + 东西长 + {{ewLength}} 米 + + + + + + 南北宽 + {{nsWide}} 米 + + + + + + + 屋面坡度 + {{slopeGradient}} 度 + + + + + + 檀条间距 + {{purlineInterval}} 米 + + + + + + + 屋顶防水情况 + + 一般 + 良好 + + + + + + + 是否有污染源 + + + 没有 + + + + + + + 是否具备运维空间 + + 具备 + 不具备 + + + + + + + 并网电压等级 + {{voltageClasses}} V + + + + + + 变压器容量 + {{transformerCapacity}} kVA + + + + + + 是否符合变压器容量限制要求 + + 符合 + 不符合 + + + + + + + 配电箱至并网点距离 + {{deg}} 米 + + + + + + 组件倾角 + {{dipAngle}} 度 + + + + + + 倾角 + {{dipAngle}} 度 + + + + + + 屋顶面积 + {{roofArea}} m2 + + + + + + + + + + {{item.title}}( + + {{item.minNum ? item.minNum : 1}} - {{item.num}} + {{item.num}} + + 最多{{item.num}} + 张) + + + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + + + + + + + + + + + 方案信息 + + + + + + + + + 方案类型 + {{item.type}} + + + + + 方案名称 + {{item.name}} + + + + + 参考图纸 + + {{drawing.name}} + + + + + + + + + + + + + + 设计图纸 + + + + {{util.formartFileName(child.name)}} + + + + + + + 设计CAD文件 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组件排布图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组串接线图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组件支架图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 一次接线图/电气图 + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + + 设计安装容量 + {{componentNum}} + kW + + + + + + + + 组件 + + {{item.model}} + Wp + + + + + + + 组件 + + {{item.material_model}} + Wp + + + + + + 组件数量 + + + + + + + + + + + 逆变器 + + {{item.model}} + + + + + + + + 逆变器 + + {{item.material_model}} + + + + + + + 逆变器数量 + + + + + + + + + + + 并网箱 + + {{item.model}} + + + + + + + 并网箱数量 + + + + + + + + + + + 支架 + + {{item.model}} + + + + + + + 支架数量 + + + + + + + + + 方案备注 + + + + \ No newline at end of file diff --git a/home/components/survey/survey.wxss b/home/components/survey/survey.wxss new file mode 100644 index 0000000..62060ae --- /dev/null +++ b/home/components/survey/survey.wxss @@ -0,0 +1 @@ +@import "/home/pages/entryInfoAudit/entryInfoAudit.wxss"; \ No newline at end of file diff --git a/home/components/surveyHR/surveyHR.js b/home/components/surveyHR/surveyHR.js new file mode 100644 index 0000000..6e8e334 --- /dev/null +++ b/home/components/surveyHR/surveyHR.js @@ -0,0 +1,701 @@ +const { + getAllDictionarySelect, + IMG_BASE_URL, + WU_TU_PIAN_URL, + getAllConditionList, + findAllPlan +} = require('../../../api/api') +Component({ + properties: { + entryId: String, + childObj:Object, + }, + data: { + photo: { + flyImgs: [], //无人机航拍图 + roofPhotoOne:[],//安装区域整体照片 + roofPhotoTwo:[],//安装区域东南角照片 + roofPhotoThree:[],//安装区域西南角照片 + roofPhotoFour:[],//安装区域正南照片 + roofPhotoFive:[],//安装区域细节照片 + roofPhotoFacade:[],//房屋内部结构照片 + roofPhotoInterior:[],//房屋内部环境照片 + detailSupplementOne:[],//逆变器、配电箱预安装位置照片 + houseSupplementOne:[],//房屋其他障碍物照片 + surveyVideo:[],//踏勘补充证明视频 + surveyFiles:[],//踏勘记录表 + vrRoofOne: [], //房屋整体图 + vrRoofTwo: [], //房屋整体俯视图 + vrRoofThree: [], //房屋内部结构图 + vrRoofFour: [], //入户全景照片 + houseOutlinePhoto:[], //房屋轮廓照片 + designDrawings: [], //设计图纸 + dzImgs: [], //组合图 + }, + photoTips:[ + { + showKey: 'fly_imgs', + key:'flyImgs', + num:9, + minNum:3, + title: '无人机航拍图', + },{ + showKey: 'roof_photo_one', + key:'roofPhotoOne', + num:9, + minNum:2, + title: '安装区域整体照片', + },{ + showKey: 'roof_photo_two', + key:'roofPhotoTwo', + num:9, + minNum:1, + title: '安装区域东南角照片', + },{ + showKey: 'roof_photo_four', + key:'roofPhotoFour', + num:9, + minNum:1, + title: '安装区域正南照片', + },{ + showKey: 'roof_photo_three', + key:'roofPhotoThree', + num:9, + minNum:1, + title: '安装区域西南角照片', + },{ + showKey: 'roof_photo_five', + key:'roofPhotoFive', + num:9, + minNum:1, + title: '安装区域细节照片', + },{ + showKey: 'roof_photo_interior', + key:'roofPhotoInterior', + num:9, + minNum:2, + title: '房屋内部环境照片', + },{ + showKey: 'roof_photo_facade', + key:'roofPhotoFacade', + num:9, + minNum:2, + title: '房屋内部结构照片', + },{ + showKey: 'detail_supplement_one', + key:'detailSupplementOne', + num:9, + minNum:1, + title: '逆变器、配电箱预安装位置照片', + },{ + showKey: 'house_outline_photo', + key: 'houseOutlinePhoto', + num: 9, + minNum: 1, + title: '房屋轮廓照片', + },{ + showKey: 'house_supplement_one', + key:'houseSupplementOne', + num:9, + minNum:1, + title: '房屋其他障碍物照片', + },{ + showKey: 'survey_files', + key:'surveyFiles', + num:4, + title: '踏勘记录表', + },{ + showKey: 'roof_photo_one_03', + key: 'roofPhotoOne', + num: 9, + minNum: 2, + title: '房屋屋顶照片', + },{ + showKey: 'roof_photo_two_03', + key: 'roofPhotoTwo', + num: 9, + minNum: 1, + title: '房屋屋顶东侧图片', + },{ + showKey: 'roof_photo_three_03', + key: 'roofPhotoThree', + num: 9, + minNum: 1, + title: '房屋屋顶西侧图片', + },{ + showKey: 'roof_photo_four_03', + key: 'roofPhotoFour', + num: 9, + minNum: 1, + title: '房屋屋顶南侧图片', + },{ + showKey: 'fw_img3', + key: 'fwImg3', + num: 9, + minNum: 1, + title: '房屋屋顶东南侧图片', + },{ + showKey: 'fw_img4', + key: 'fwImg4', + num: 9, + minNum: 1, + title: '房屋屋顶西南侧图片', + },{ + showKey: 'fw_img5', + key: 'fwImg5', + num: 9, + minNum: 1, + title: '遮阴物与房屋距离、高度', + },{ + showKey: 'survey_video', + key: 'surveyVideo', + num: 8, + minNum: 1, + title: '踏勘补充证明视频', + },{ + showKey: 'house_ownership', + key: 'houseOwnership', + num: 8, + minNum: 1, + title: '房产证明', + },{ + showKey: 'survey_files_03', + key: 'surveyFiles', + num: 9, + minNum: 1, + title: '户用勘察记录表(附平面草图)', + },{ + showKey: 'fw_img1', + key: 'fwImg1', + num: 9, + minNum: 1, + title: '房屋整体图', + },{ + showKey: 'vr_roof_one', + key: 'vrRoofOne', + num: 9, + minNum: 1, + title: '房屋整体图(VR全景)', + },{ + showKey: 'vr_roof_two', + key: 'vrRoofTwo', + num: 9, + minNum: 1, + title: '房屋整体俯视图(无人机)', + },{ + showKey: 'vr_roof_three', + key: 'vrRoofThree', + num: 9, + minNum: 1, + title: '房屋内部结构图(VR)', + },{ + showKey: 'fw_img2', + key: 'fwImg2', + num: 9, + minNum: 1, + title: '房屋内部结构图', + },{ + showKey: 'vr_roof_four', + key: 'vrRoofFour', + num: 9, + minNum: 1, + title: '入户全景照片(VR)', + },{ + showKey: 'fly_imgs_04', + key: 'flyImgs', + num: 9, + minNum: 3, + title: '屋顶高空俯视照片', + },{ + showKey: 'roof_photo_two_04', + key: 'roofPhotoTwo', + num: 9, + minNum: 1, + title: '屋顶东南照片', + },{ + showKey: 'roof_photo_four_04', + key: 'roofPhotoFour', + num: 9, + minNum: 1, + title: '屋顶正南照片', + },{ + showKey: 'roof_photo_three_04', + key: 'roofPhotoThree', + num: 9, + minNum: 1, + title: '屋顶西南照片', + },{ + showKey: 'vr_roof_four_04', + key: 'vrRoofFour', + num: 9, + minNum: 1, + title: '入户全景照片', + },{ + showKey: 'survey_files_04', + key: 'surveyFiles', + num: 4, + title: '现场勘测表', + }], + formSetObj: {}, //自定义字段 + standardSolutionsList:[],//标准方案初始数量 + combinedSolutionsList:[],//组合方案初始数量 + planList:[],//方案 + gridType: '0', + tabIndex: '0', + productList: [], + multiPhoto: [], //多产品图片 + // multiPhotoTips: [],//多产品图片 + multiScheme:[],//多产品方案 + multiComponentList:[],//多产品组件 + }, + ready(){ + this.findAllPlan(); + this.entryDetail(); + }, + methods:{ + /** 获取自定义字段 */ + getFormSet(partner) { + getAllConditionList({ + partner: partner, + }).then((res) => { + this.setData({ + formSetObj: res.data + }) + }) + }, + /*** 获取字典 */ + getDictionaryList(partner, callback) { + getAllDictionarySelect({ + capitalId: partner, + }).then((res) => { + if(res.data){ + this.setData({ + angleAzimuthSel: res.data.angle_azimuth.map(item=>item.columns), //方位角 + }) + } + if(callback) callback(res.data) + }) + }, + /** 获取电站详情 **/ + entryDetail(e) { + let that = this + let res = JSON.parse(JSON.stringify(this.data.childObj)); + //华融资方--多产品分开显示 + let productList = res.projectDetailList //产品集合 + let multiPhoto = [] + let multiScheme = [] + //拆分成多产品 + productList.forEach((item,index)=>{ + //多产品图片处理 + multiPhoto.push(this.data.photo) + multiScheme.push({ + standardSolutionsListIndex: 0, + standardSolutionsList: [{ + projectId: item.projectId, //产品ID + type: "", //方案类型 + name: "", //方案名称 + id: "", //方案ID + code: "", //方案编号 + drawing: "", //参考图纸 + }] + }) + // 添加图片 + this.setData({ + multiComponentList: this.data.multiComponentList, + multiScheme: this.data.multiScheme, + // multiScheme, //方案信息默认值 + [`multiPhoto[${index}].dipAngle`]:item.dipAngle,//组件倾角 + [`multiPhoto[${index}].zjpbImg`]: item.zjpbImg ? item.zjpbImg.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件排布图 + [`multiPhoto[${index}].zjzxImg`]: item.zjzxImg ? item.zjzxImg.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件接线图 + [`multiPhoto[${index}].zjcsImg`]: item.zjcsImg ? item.zjcsImg.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件支架图 + [`multiPhoto[${index}].zjhsImg`]: item.zjhsImg ? item.zjhsImg.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //电气图 + [`multiPhoto[${index}].dzImgs`]: item.dzImgs ? item.dzImgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//组合图 + //房屋信息 + [`multiPhoto[${index}].flyImgs`]:item.flyImgs ? item.flyImgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//无人机航拍图 + [`multiPhoto[${index}].roofPhotoOne`]:item.roofPhotoOne ? item.roofPhotoOne.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域整体照片 + [`multiPhoto[${index}].roofPhotoTwo`]:item.roofPhotoTwo ? item.roofPhotoTwo.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域东南角照片 + [`multiPhoto[${index}].roofPhotoThree`]:item.roofPhotoThree ? item.roofPhotoThree.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域西南角照片 + [`multiPhoto[${index}].roofPhotoFour`]:item.roofPhotoFour ? item.roofPhotoFour.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域正南照片 + [`multiPhoto[${index}].roofPhotoFive`]:item.roofPhotoFive ? item.roofPhotoFive.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域细节照片 + [`multiPhoto[${index}].roofPhotoInterior`]:item.roofPhotoInterior ? item.roofPhotoInterior.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部环境照片 + [`multiPhoto[${index}].roofPhotoFacade`]:item.roofPhotoFacade ? item.roofPhotoFacade.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部结构照片 + [`multiPhoto[${index}].detailSupplementOne`]:item.detailSupplementOne ? item.detailSupplementOne.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//逆变器、配电箱预安装位置照片 + [`multiPhoto[${index}].houseSupplementOne`]:item.houseSupplementOne ? item.houseSupplementOne.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋其他障碍物照片 + [`multiPhoto[${index}].surveyVideo`]:item.surveyVideo ? item.surveyVideo.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//踏勘补充证明视频 + [`multiPhoto[${index}].surveyFiles`]:item.surveyFiles ? item.surveyFiles.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [],//踏勘记录表 + [`multiPhoto[${index}].vrRoofOne`]: item.vrRoofOne ? item.vrRoofOne.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体图(VR全景) + [`multiPhoto[${index}].vrRoofTwo`]: item.vrRoofTwo ? item.vrRoofTwo.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体俯视图(VR) + [`multiPhoto[${index}].vrRoofThree`]: item.vrRoofThree ? item.vrRoofThree.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图(VR) + [`multiPhoto[${index}].vrRoofFour`]: item.vrRoofFour ? item.vrRoofFour.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //入户全景照片(VR) + [`multiPhoto[${index}].houseOutlinePhoto`]: item.houseOutlinePhoto ? item.houseOutlinePhoto.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋轮廓照片 + [`multiPhoto[${index}].fwImg1`]: item.fwImg1 ? item.fwImg1.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋整体图 + [`multiPhoto[${index}].fwImg2`]: item.fwImg2 ? item.fwImg2.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图 + [`multiPhoto[${index}].fwImg3`]: item.fwImg3 ? item.fwImg3.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶东南侧图片 + [`multiPhoto[${index}].fwImg4`]: item.fwImg4 ? item.fwImg4.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶西南侧图片 + [`multiPhoto[${index}].fwImg5`]: item.fwImg5 ? item.fwImg5.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //遮阴物与房屋距离、高度 + }); + + if(item.addEntryReqDesignDetails.length>0){ + this.setData({ + [`multiPhoto[${index}].designDrawings`]: item.addEntryReqDesignDetails[0].designDrawings ? item.addEntryReqDesignDetails[0].designDrawings.split(",").map(itm => {return {name: itm, url: IMG_BASE_URL + itm} }) : [], //设计图纸 + }) + }else{ + this.setData({ + [`multiPhoto[${index}].designDrawings`]: [], //设计图纸 + }) + } + + // 组件,逆变器,并网箱,支架 + if (item.componentList.length > 0) { + var componentList = []; + var converterList = []; + var cagesList = []; + var zhijList = []; + var componentNum = 0; + for (let i = 0; i < item.componentList.length; i++) { + const element = item.componentList[i]; + var OB = { + projectId: "", //产品ID + id: "", + num: "", //数量 + model: "", //名称 + addType: 0, + } + if (element.item_type == 3) { + OB.projectId = item.projectId; + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + OB.material_model = element.material_model; + componentNum = element.num * element.model + componentNum + componentList.push(OB) + } else if (element.item_type == 1) { + OB.projectId = item.projectId; + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + OB.material_model = element.material_model; + converterList.push(OB) + } else if (element.item_type == 2) { + OB.projectId = item.projectId; + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + cagesList.push(OB) + } else if (element.item_type == 4) { + OB.projectId = item.projectId; + OB.id = element.item_id; + OB.num = element.num; + OB.model = element.model; + zhijList.push(OB) + } + } + this.setData({ + [`multiComponentList[${index}].componentList`]: componentList, + [`multiComponentList[${index}].converterList`]: converterList, + [`multiComponentList[${index}].cagesList`]: cagesList, + [`multiComponentList[${index}].zhijList`]: zhijList, + [`multiComponentList[${index}].productZj`]:item.assemblySpecs ? Number(item.assemblySpecs) : 0,//产品默认的组件值 + [`multiComponentList[${index}].componentNum`]: (componentNum/1000).toFixed(3), + }) + // console.log(126666, this.data.multiComponentList) + }else{ + this.setData({ + [`multiComponentList[${index}].componentList`]: [{ + projectId: item.projectId, //产品ID + id: res.modeId ? res.modeId : '',//默认产品信息中的组件规格id + num: '', //数量 + model: res.modeId ? item.assemblySpecs : '', //名称,默认产品信息中的组件规格 + addType: 1, + }], //组件初始数量 + [`multiComponentList[${index}].converterList`]: [{ + projectId: item.projectId, //产品ID + id: "", + num: "", //数量 + model: "", //名称 + addType: 1, + }], //逆变器初始数量 + [`multiComponentList[${index}].cagesList`]: [{ + projectId: item.projectId, //产品ID + id: "", + num: "", //数量 + model: "", //名称 + addType: 1, + }], //并网箱初始数量 + [`multiComponentList[${index}].zhijList`]: [{ + projectId: item.projectId, //产品ID + id: "", + num: "", //数量 + model: "", //名称 + addType: 1, + }], //支架初始数量 + [`multiComponentList[${index}].productZj`]: item.assemblySpecs ? Number(item.assemblySpecs) : 0,//产品默认的组件值 + [`multiComponentList[${index}].componentNum`]: 0, + }) + } + //方案信息-方案类型 + if (res.scheme_type == 1) {//标准方案 + // this.setData({ + // [`standardSolutionsList[0].id`]: res.scheme_id ? res.scheme_id : '', + // [`standardSolutionsList[0].type`]: res.scheme_type_name ? res.scheme_type_name : '', + // [`standardSolutionsList[0].typeId`]: res.scheme_type_id ? res.scheme_type_id : '', + // [`standardSolutionsList[0].name`]: res.scheme_name ? res.scheme_name : "", + // }) + if(productList[index].addEntryReqDesignDetails.length){ + for (let i = 0; i < that.data.planList.length; i++) { + const element = that.data.planList[i]; + if (productList[index].addEntryReqDesignDetails[0].schemeTypeId && (productList[index].addEntryReqDesignDetails[0].schemeTypeId == element.id)) { + this.setData({ + [`multiScheme[${index}].standardSolutionsListIndex`]: i, + }) + } + } + this.setData({ + [`multiScheme[${index}].standardSolutionsList[0].projectId`]: productList[index].projectId, + [`multiScheme[${index}].standardSolutionsList[0].id`]: productList[index].addEntryReqDesignDetails[0].schemeId ? productList[index].addEntryReqDesignDetails[0].schemeId : '', + [`multiScheme[${index}].standardSolutionsList[0].type`]: productList[index].addEntryReqDesignDetails[0].schemeTypeName ? productList[index].addEntryReqDesignDetails[0].schemeTypeName : '', + [`multiScheme[${index}].standardSolutionsList[0].typeId`]: productList[index].addEntryReqDesignDetails[0].schemeTypeId ? productList[index].addEntryReqDesignDetails[0].schemeTypeId : '', + [`multiScheme[${index}].standardSolutionsList[0].name`]: productList[index].addEntryReqDesignDetails[0].schemeName ? productList[index].addEntryReqDesignDetails[0].schemeName : "", + }) + } + } else if (res.scheme_type == 2) {//组合方案 + if (res.composePlanList.length > 0) { + var combinedSolutionsList = [] + for (let i = 0; i < res.composePlanList.length; i++) { + var combinedSolutionsListOB = {} + const element = res.composePlanList[i]; + if (i == 0) { + combinedSolutionsListOB.addType = 1; + } + combinedSolutionsListOB.code = element.code; + combinedSolutionsListOB.id = element.planId; + combinedSolutionsListOB.name = element.name; + combinedSolutionsListOB.type = element.planType; + combinedSolutionsListOB.planTypeId = element.planTypeId; + for (let i = 0; i < that.data.planList.length; i++) { + const planTypeObj = that.data.planList[i]; + + if (planTypeObj.allPlan.length > 0) { + for (let j = 0; j < planTypeObj.allPlan.length; j++) { + const plan = planTypeObj.allPlan[j]; + if (plan.id == element.planId) { + combinedSolutionsListOB.pickerIndex = i + } + } + } + } + combinedSolutionsList.push(combinedSolutionsListOB) + } + this.setData({ + combinedSolutionsList: combinedSolutionsList + }) + } + } + }) + //保险购买情况 + if (res.insurance_flag == 1) { + this.setData({ + insuranceName: "控制投放及续保" + }) + } else if (res.insurance_flag == 2) { + this.setData({ + insuranceName: "控制投放" + }) + } else if (res.insurance_flag == 3) { + this.setData({ + insuranceName: "其他" + }) + } + this.setData({ + productList, + projectList: res.projectList, + multiComponentList: this.data.multiComponentList, + multiScheme: this.data.multiScheme, + id: res.id, //修改数据的时候传此ID + detail: res, + projectId: res.project_id, + tenant_type: res.tenant_type=='1' ? '个人' : '单位',//1.个人,2单位 + //业主信息参数 + name: res.tenant_name, + phone: res.mobile, + provinceName: res.province, + cityName: res.city, + areaName: res.area, + address: res.address, + //项目信息 + capitalName: res.zfName, //资方 + projectName: res.projectName,//产品名称 + companyName: res.project_company_name,//项目公司 + filingName: res.filing_type=='1' ? '农户备案' : '项目公司备案',//备案类型 + leaseDate: res.leaseDate ? res.leaseDate : '',//预计投放日 + repaymentMethod: res.repayment_method,//划转方式 + //如果租金划转方式是二类卡,那么二类卡的信息 显示这个 + secCardName:res.secCardName ? res.secCardName : '',//二类卡账户名 + secCardNo:res.secCardNo ? res.secCardNo : '',//二类卡账号 + secBankNumber:res.secBankNumber ? res.secBankNumber : '',//二类卡联行号 + bankName: res.bank_name ? res.bank_name : '', //卡账号名称 + bankCode: res.bank_code ? res.bank_code : '', //卡账号 + tssBankNum: res.tss_bank_num ? res.tss_bank_num : '', //卡开户行 + longitude: res.longitude, //经度 + latitude: res.latitude, //纬度 + //房屋信息 + roofType: res.roof_type, + sealRoof:res.seal_roof,//是否封屋顶,1是,2.否 + completionYear:res.completion_year ? res.completion_year : '',//房屋建成年份 + slopeGradient:res.slope_gradient ? res.slope_gradient : '',//屋面坡度 + purlineInterval:res.purline_interval ? res.purline_interval : '',//檀条间距 + waterproof:res.waterproof ? res.waterproof : '',//屋顶防水情况 + sourcePollution:res.source_pollution ? res.source_pollution : '',//是否有污染源 + opsCondition:res.ops_condition ? res.ops_condition : '',//是否具备运维空间 + voltageClasses:res.voltage_classes ? res.voltage_classes : '',//并网电压等级 + transformerCapacity:res.transformer_capacity ? res.transformer_capacity : '',//变压器容量 + restrictFlag:res.restrict_flag ? res.restrict_flag : '',//是否符合变压器容量限制要求 + dipAngle:res.dip_angle ? res.dip_angle : '',//组件倾角 + roofArea: res.roof_area, //屋顶面积 + deg: res.distance,//配电箱至并网点距离 + height: res.building_height,//建筑高度 + azimuth: res.azimuth ? res.azimuth : 1,//方位角 + directionDeg: res.angle,//方位角 + //房屋信息-图片 + // [`photo.flyImgs`]:res.fly_imgs ? res.fly_imgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//无人机航拍图 + // [`photo.roofPhotoOne`]:res.roof_photo_one ? res.roof_photo_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域整体照片 + // [`photo.roofPhotoTwo`]:res.roof_photo_two ? res.roof_photo_two.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域东南角照片 + // [`photo.roofPhotoThree`]:res.roof_photo_three ? res.roof_photo_three.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域西南角照片 + // [`photo.roofPhotoFour`]:res.roof_photo_four ? res.roof_photo_four.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域正南照片 + // [`photo.roofPhotoFive`]:res.roof_photo_five ? res.roof_photo_five.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//安装区域细节照片 + // [`photo.roofPhotoInterior`]:res.roof_photo_interior ? res.roof_photo_interior.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部环境照片 + // [`photo.roofPhotoFacade`]:res.roof_photo_facade ? res.roof_photo_facade.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋内部结构照片 + // [`photo.detailSupplementOne`]:res.detail_supplement_one ? res.detail_supplement_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//逆变器、配电箱预安装位置照片 + // [`photo.houseSupplementOne`]:res.house_supplement_one ? res.house_supplement_one.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//房屋其他障碍物照片 + // [`photo.surveyVideo`]:res.survey_video ? res.survey_video.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//踏勘补充证明视频 + // [`photo.houseOwnership`]:res.house_ownership ? res.house_ownership.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [],//房产证 + // [`photo.surveyFiles`]:res.survey_files ? res.survey_files.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [],//踏勘记录表 + // [`photo.vrRoofOne`]: res.vr_roof_one ? res.vr_roof_one.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体图(VR全景) + // [`photo.vrRoofTwo`]: res.vr_roof_two ? res.vr_roof_two.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋整体俯视图(VR) + // [`photo.vrRoofThree`]: res.vr_roof_three ? res.vr_roof_three.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图(VR) + // [`photo.vrRoofFour`]: res.vr_roof_four ? res.vr_roof_four.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //入户全景照片(VR) + // [`photo.houseOutlinePhoto`]: res.house_outline_photo ? res.house_outline_photo.split(",").map(itm => { return { name: itm, url: IMG_BASE_URL + itm}}) : [], //房屋轮廓照片 + //方案信息 + // componentNum: (componentNum/1000).toFixed(2),//设计安装容量 + // componentList: componentList,//组件 + // converterList: converterList,//逆变器 + // cagesList: cagesList,//并网箱 + // zhijList: zhijList,//支架 + schemeType: res.scheme_type ? res.scheme_type : 1,//设计方案 + solutionRemark: res.scheme_remarks ? res.scheme_remarks : '',//方案备注 + // [`photo.designDrawings`]: res.design_drawings ? res.design_drawings.split(",").map(itm => { + // return { + // name: itm, + // url: IMG_BASE_URL + itm + // } + // }) : [], //设计图纸 + // 'photo.zjpbImg': res.zjpb_img ? res.zjpb_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件排布图 + // 'photo.zjzxImg': res.zjzx_img ? res.zjzx_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件接线图 + // 'photo.zjcsImg': res.zjcs_img ? res.zjcs_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //组件支架图 + // 'photo.zjhsImg': res.zjhs_img ? res.zjhs_img.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //电气图 + // // [`photo.nbqwzImg[0].url`]: res.nbqwz_img ? IMG_BASE_URL + res.nbqwz_img : WU_TU_PIAN_URL, + // // [`photo.pdxwzImg[0].url`]: res.pdxwz_img ? IMG_BASE_URL + res.pdxwz_img : WU_TU_PIAN_URL, + // [`photo.dzImgs`]: res.dz_imgs ? res.dz_imgs.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}],//组合图 + // //2024-9-4 广发 + // 'photo.fwImg1': res.fw_img1 ? res.fw_img1.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋整体图 + // 'photo.fwImg2': res.fw_img2 ? res.fw_img2.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋内部结构图 + // 'photo.fwImg3': res.fw_img3 ? res.fw_img3.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶东南侧图片 + // 'photo.fwImg4': res.fw_img4 ? res.fw_img4.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //房屋屋顶西南侧图片 + // 'photo.fwImg5': res.fw_img5 ? res.fw_img5.split(",").map(itm => {return {name: itm,url: IMG_BASE_URL + itm}}) : [], //遮阴物与房屋距离、高度 + }); + //并网方式处理 + if(res.recordBoxHistory){ + if(res.recordBoxHistory ==''){//并网方式没选择过,默认‘单户并网’ + this.setData({ + // gridType: '0',//并网方式 + boxTotalCount: '', //总数 + boxGroupNum: '', //编号 + boxGroupName: '', //名称 + }) + }else{ + this.setData({ + gridType: res.recordBoxHistory.type,//并网方式 + gridStatus: res.recordBoxHistory.status,//状态为1不能编辑 + boxTotalCount: res.recordBoxHistory.total_count, + boxGroupNum: res.recordBoxHistory.group_number, + boxGroupName: res.recordBoxHistory.group_name, + boxGroupId: res.recordBoxHistory.box_group_id, + }) + } + } + // console.log("photo",this.data.photo); + this.getFormSet(res.management) + //下拉字典 + this.getDictionaryList(res.management, (res2)=>{ + let angleList = res2.angle_azimuth.map(item=>item.columns) + if(res.azimuth){ + let azimuthName = angleList.find(itm => itm.dict_key === res.azimuth).dict_value; + this.setData({ + azimuthName + }) + } + }); + }, + /** 获取方案类型和方案名称 **/ + findAllPlan(e) { + let that = this + findAllPlan({ + + }).then((res) => { + for (let i = 0; i < res.length; i++) { + res[i].allPlan = JSON.parse(res[i].allPlan) + for (let j = 0; j < res[i].allPlan.length; j++) { + var element = res[i].allPlan[j].columns; + res[i].allPlan[j] = element + } + } + that.setData({ + planList: res, + }) + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if(suffix=='mp4'){// 开始预览多媒体内容 + wx.previewMedia({ + sources: [{ + url :IMG_BASE_URL + path, + type: 'video' + }], // 需要预览的资源列表 + }); + }else if(suffix != 'jpg' && suffix != 'png' && suffix != 'gif' && suffix != 'jpeg') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + fileType: suffix, + showMenu: true, + success: function (res) {} + }) + } + }) + }else{ + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + //tab切换 + changeTab(e){ + let index = e.currentTarget.dataset.index + this.setData({ + tabIndex: index + }) + } + } +}) \ No newline at end of file diff --git a/home/components/surveyHR/surveyHR.json b/home/components/surveyHR/surveyHR.json new file mode 100644 index 0000000..f227f84 --- /dev/null +++ b/home/components/surveyHR/surveyHR.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/home/components/surveyHR/surveyHR.wxml b/home/components/surveyHR/surveyHR.wxml new file mode 100644 index 0000000..0ec8b06 --- /dev/null +++ b/home/components/surveyHR/surveyHR.wxml @@ -0,0 +1,618 @@ + + + + + + 投资方 + {{capitalName}} + + + + + + + + 安装地址 + + {{provinceName}}{{cityName}}{{areaName}} + + + {{address}} + + + + + + + 风压 + {{detail.wind_pressure}}kN/㎡ + + + + 雪压 + {{detail.snow_pressure}}kN/㎡ + + + + 风雪压等级 + {{detail.pressure_level}} + + + + + + 经纬度 + + {{longitude}},{{latitude}} + + + + + + + + 项目公司 + {{companyName}} + + + + + + 备案类型 + {{filingName}} + + + + + + + 预计投放日 + {{leaseDate}} + + + + + + 划转方式 + + 二类卡 + + 其他 + + + + + + + 二类卡账户名 + {{secCardName}} + + + + 二类卡号 + {{secCardNo}} + + + + 联行号 + {{secBankNumber}} + + + + + + 产品名称 + {{item.projectName}} + + + + 产品编号 + {{item.projectCode}} + + + + 屋顶类型 + {{item.roofType}} + + + + 租金支付周期 + 按月支付 + 按季支付 + 按年支付 + + + + + + 房屋信息 + + + + 并网方式 + + + + + + 本组电站个数 + + + + + + 汇流组编号 + + + + + 汇流组名称 + + + + + + + + + 是否封屋顶 + {{sealRoof==1?'是':'否'}} + + + + + + 房屋建成年份 + {{completionYear}} 年 + + + + + + 方位角 + {{azimuthName}} {{directionDeg}} 度 + + + + + + 建筑高度 + {{height}} 米 + + + + + + + 屋面坡度 + {{slopeGradient}} 度 + + + + + + 檀条间距 + {{purlineInterval}} 米 + + + + + + + 屋顶防水情况 + + 一般 + 良好 + + + + + + + 是否有污染源 + + + 没有 + + + + + + + 是否具备运维空间 + + 具备 + 不具备 + + + + + + + 并网电压等级 + {{voltageClasses}} V + + + + + + 变压器容量 + {{transformerCapacity}} kVA + + + + + + 是否符合变压器容量限制要求 + + 符合 + 不符合 + + + + + + + 配电箱至并网点距离 + {{deg}} 米 + + + + + + + 屋顶面积 + {{roofArea}} m2 + + + + + + + + + {{item.roofType}} + + + + + + + + + 组件倾角 + {{multiPhoto[tabIndex].dipAngle}} 度 + + + + + + 倾角 + {{multiPhoto[tabIndex].dipAngle}} 度 + + + + + + + {{item.title}}( + + {{item.minNum ? item.minNum : 1}} - {{item.num}} + {{item.num}} + + 最多{{item.num}} + 张) + + + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + + + + + + + + + + + 方案信息 + + + + + + 方案类型 + {{item.type}} + + + + + 方案名称 + {{item.name}} + + + + + 参考图纸 + + {{drawing.name}} + + + + + + + + + + + 设计图纸 + + + + {{util.formartFileName(child.name)}} + + + + + + + 设计CAD文件 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组件排布图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组串接线图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 组件支架图 + + + + {{util.formartFileName(child.name)}} + + + + + + + 一次接线图/电气图 + + + + {{util.formartFileName(child.name)}} + + + + + + + + + + + + + 设计安装容量 + {{multiComponentList[tabIndex].componentNum}} + kW + + + + + + + + 组件 + + {{item.model}} + Wp + + + + + + + 组件 + + {{item.material_model}} + Wp + + + + + + 组件数量 + + + + + + + + + + + 逆变器 + + {{item.model}} + + + + + + + + 逆变器 + + {{item.material_model}} + + + + + + + 逆变器数量 + + + + + + + + + + + 并网箱 + + {{item.model}} + + + + + + + 并网箱数量 + + + + + + + + + + + 支架 + + {{item.model}} + + + + + + + 支架数量 + + + + + + + + + 方案备注 + + + + \ No newline at end of file diff --git a/home/components/surveyHR/surveyHR.wxss b/home/components/surveyHR/surveyHR.wxss new file mode 100644 index 0000000..9980852 --- /dev/null +++ b/home/components/surveyHR/surveyHR.wxss @@ -0,0 +1,5 @@ +@import "/home/pages/entryInfoAuditHR/entryInfoAuditHR.wxss"; +.detail-tab{display: flex; justify-content: space-between; height: 90rpx; border-bottom: 1px solid #f0f0f0; color: #666666;} +.detail-tab>view{flex: 1; text-align: center; line-height: 82rpx; font-size: 28rpx; position: relative;} +.detail-tab>view.active{color: #333333; font-size: 32rpx;} +.detail-tab>view .actived{width: 60rpx; height: 6rpx; background-color: #0a6597; border-radius: 3rpx; margin: 0 auto;} \ No newline at end of file diff --git a/home/components/userInfo/userInfo.js b/home/components/userInfo/userInfo.js new file mode 100644 index 0000000..55a7ebf --- /dev/null +++ b/home/components/userInfo/userInfo.js @@ -0,0 +1,56 @@ +// home/components/userInfo/userInfo.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + detail: Object, + type: String, + recordShow:Boolean, + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + ready(){ + // console.log(1212, this.data) + }, + + /** + * 组件的方法列表 + */ + methods: { + /** 用户信息跳转 **/ + userFn(e){ + // console.log('用户信息跳转', e) + wx.navigateTo({ + url: '/home/pages/ownerForm/ownerForm?projectId=' + this.data.detail.entry_id + '&type='+this.data.type, + }) + }, + /** 拨打业主联系电话 **/ + phoneFn(e) { + const phone = e.currentTarget.dataset.phone; + if (!phone) { + wx.showToast({ + title: '暂无联系方式', + icon: 'none' + }) + return + } + wx.makePhoneCall({ + phoneNumber: phone, + }) + }, + //审批记录 + goRecord(e){ + wx.navigateTo({ + url: '/pages/appRecord/appRecord?entryId=' + this.data.detail.id + '&type='+this.data.type, + }) + } + + } +}) \ No newline at end of file diff --git a/home/components/userInfo/userInfo.json b/home/components/userInfo/userInfo.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/home/components/userInfo/userInfo.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/home/components/userInfo/userInfo.wxml b/home/components/userInfo/userInfo.wxml new file mode 100644 index 0000000..1807da1 --- /dev/null +++ b/home/components/userInfo/userInfo.wxml @@ -0,0 +1,42 @@ + + + + + {{detail.tenant_name}} + + 个人 + 单位 + + + + + 联系电话 + {{detail.mobile}} + + + 拨打 + + + + 身份证号 + {{detail.id_code}} + 审批记录 + + + 统一信用代码 + {{detail.regno}} + 审批记录 + + + + + 设计自审驳回 + 设计审核驳回 + 安装验收驳回 + 并网验收驳回 + {{detail.auditRemark}} + + \ No newline at end of file diff --git a/home/components/userInfo/userInfo.wxss b/home/components/userInfo/userInfo.wxss new file mode 100644 index 0000000..286451d --- /dev/null +++ b/home/components/userInfo/userInfo.wxss @@ -0,0 +1,4 @@ +/* home/components/userInfo/userInfo.wxss */ +@import "../../pages/completion/completion"; +.txt-red{ color: #FF0000;} +.record-btn{ border: 1px solid #0a6597; color: #0a6597; border-radius: 30rpx; padding: 5rpx 15rpx; font-size: 24rpx;} \ No newline at end of file diff --git a/home/img/addr.png b/home/img/addr.png new file mode 100644 index 0000000..ac20c70 Binary files /dev/null and b/home/img/addr.png differ diff --git a/home/img/arrow.png b/home/img/arrow.png new file mode 100644 index 0000000..6778f9a Binary files /dev/null and b/home/img/arrow.png differ diff --git a/home/img/attention.png b/home/img/attention.png new file mode 100644 index 0000000..dcbf01b Binary files /dev/null and b/home/img/attention.png differ diff --git a/home/img/bank-card-1.png b/home/img/bank-card-1.png new file mode 100644 index 0000000..7b2f884 Binary files /dev/null and b/home/img/bank-card-1.png differ diff --git a/home/img/canvas-date.png b/home/img/canvas-date.png new file mode 100644 index 0000000..b1bffb2 Binary files /dev/null and b/home/img/canvas-date.png differ diff --git a/home/img/canvas-location.png b/home/img/canvas-location.png new file mode 100644 index 0000000..1a5fbab Binary files /dev/null and b/home/img/canvas-location.png differ diff --git a/home/img/canvas-people.png b/home/img/canvas-people.png new file mode 100644 index 0000000..769c634 Binary files /dev/null and b/home/img/canvas-people.png differ diff --git a/home/img/content-function-acceptance-img.png b/home/img/content-function-acceptance-img.png new file mode 100644 index 0000000..c63aae1 Binary files /dev/null and b/home/img/content-function-acceptance-img.png differ diff --git a/home/img/content-function-phone-img.png b/home/img/content-function-phone-img.png new file mode 100644 index 0000000..573530c Binary files /dev/null and b/home/img/content-function-phone-img.png differ diff --git a/home/img/content-function-watch-img.png b/home/img/content-function-watch-img.png new file mode 100644 index 0000000..8d05707 Binary files /dev/null and b/home/img/content-function-watch-img.png differ diff --git a/home/img/content-list-info-address-img.png b/home/img/content-list-info-address-img.png new file mode 100644 index 0000000..a4b5da9 Binary files /dev/null and b/home/img/content-list-info-address-img.png differ diff --git a/home/img/content-list-info-top-deg-img.png b/home/img/content-list-info-top-deg-img.png new file mode 100644 index 0000000..26aa00c Binary files /dev/null and b/home/img/content-list-info-top-deg-img.png differ diff --git a/home/img/content-list-info-top-house-img.png b/home/img/content-list-info-top-house-img.png new file mode 100644 index 0000000..2081712 Binary files /dev/null and b/home/img/content-list-info-top-house-img.png differ diff --git a/home/img/content-list-info-top-name-img.png b/home/img/content-list-info-top-name-img.png new file mode 100644 index 0000000..1001943 Binary files /dev/null and b/home/img/content-list-info-top-name-img.png differ diff --git a/home/img/content-list-num-img.png b/home/img/content-list-num-img.png new file mode 100644 index 0000000..55f265b Binary files /dev/null and b/home/img/content-list-num-img.png differ diff --git a/home/img/content-list-type-1.png b/home/img/content-list-type-1.png new file mode 100644 index 0000000..e7a30c3 Binary files /dev/null and b/home/img/content-list-type-1.png differ diff --git a/home/img/content-list-type-10.png b/home/img/content-list-type-10.png new file mode 100644 index 0000000..a886876 Binary files /dev/null and b/home/img/content-list-type-10.png differ diff --git a/home/img/content-list-type-11.png b/home/img/content-list-type-11.png new file mode 100644 index 0000000..2739340 Binary files /dev/null and b/home/img/content-list-type-11.png differ diff --git a/home/img/content-list-type-12.png b/home/img/content-list-type-12.png new file mode 100644 index 0000000..b4133d0 Binary files /dev/null and b/home/img/content-list-type-12.png differ diff --git a/home/img/content-list-type-13.png b/home/img/content-list-type-13.png new file mode 100644 index 0000000..efd13f1 Binary files /dev/null and b/home/img/content-list-type-13.png differ diff --git a/home/img/content-list-type-14.png b/home/img/content-list-type-14.png new file mode 100644 index 0000000..a643279 Binary files /dev/null and b/home/img/content-list-type-14.png differ diff --git a/home/img/content-list-type-15.png b/home/img/content-list-type-15.png new file mode 100644 index 0000000..c653c89 Binary files /dev/null and b/home/img/content-list-type-15.png differ diff --git a/home/img/content-list-type-16.png b/home/img/content-list-type-16.png new file mode 100644 index 0000000..c38a141 Binary files /dev/null and b/home/img/content-list-type-16.png differ diff --git a/home/img/content-list-type-17.png b/home/img/content-list-type-17.png new file mode 100644 index 0000000..8e3ff22 Binary files /dev/null and b/home/img/content-list-type-17.png differ diff --git a/home/img/content-list-type-18.png b/home/img/content-list-type-18.png new file mode 100644 index 0000000..83ececc Binary files /dev/null and b/home/img/content-list-type-18.png differ diff --git a/home/img/content-list-type-19.png b/home/img/content-list-type-19.png new file mode 100644 index 0000000..2a62542 Binary files /dev/null and b/home/img/content-list-type-19.png differ diff --git a/home/img/content-list-type-2.png b/home/img/content-list-type-2.png new file mode 100644 index 0000000..94e640a Binary files /dev/null and b/home/img/content-list-type-2.png differ diff --git a/home/img/content-list-type-20.png b/home/img/content-list-type-20.png new file mode 100644 index 0000000..122f764 Binary files /dev/null and b/home/img/content-list-type-20.png differ diff --git a/home/img/content-list-type-21.png b/home/img/content-list-type-21.png new file mode 100644 index 0000000..dc9b660 Binary files /dev/null and b/home/img/content-list-type-21.png differ diff --git a/home/img/content-list-type-22.png b/home/img/content-list-type-22.png new file mode 100644 index 0000000..5722f3c Binary files /dev/null and b/home/img/content-list-type-22.png differ diff --git a/home/img/content-list-type-23.png b/home/img/content-list-type-23.png new file mode 100644 index 0000000..d10f697 Binary files /dev/null and b/home/img/content-list-type-23.png differ diff --git a/home/img/content-list-type-24.png b/home/img/content-list-type-24.png new file mode 100644 index 0000000..cb1a53e Binary files /dev/null and b/home/img/content-list-type-24.png differ diff --git a/home/img/content-list-type-25.png b/home/img/content-list-type-25.png new file mode 100644 index 0000000..8d1ad43 Binary files /dev/null and b/home/img/content-list-type-25.png differ diff --git a/home/img/content-list-type-26.png b/home/img/content-list-type-26.png new file mode 100644 index 0000000..f5c46e8 Binary files /dev/null and b/home/img/content-list-type-26.png differ diff --git a/home/img/content-list-type-27.png b/home/img/content-list-type-27.png new file mode 100644 index 0000000..787df6a Binary files /dev/null and b/home/img/content-list-type-27.png differ diff --git a/home/img/content-list-type-28.png b/home/img/content-list-type-28.png new file mode 100644 index 0000000..a7d03a1 Binary files /dev/null and b/home/img/content-list-type-28.png differ diff --git a/home/img/content-list-type-29.png b/home/img/content-list-type-29.png new file mode 100644 index 0000000..f63a6d1 Binary files /dev/null and b/home/img/content-list-type-29.png differ diff --git a/home/img/content-list-type-3.png b/home/img/content-list-type-3.png new file mode 100644 index 0000000..6e2c05e Binary files /dev/null and b/home/img/content-list-type-3.png differ diff --git a/home/img/content-list-type-30.png b/home/img/content-list-type-30.png new file mode 100644 index 0000000..3f40291 Binary files /dev/null and b/home/img/content-list-type-30.png differ diff --git a/home/img/content-list-type-31.png b/home/img/content-list-type-31.png new file mode 100644 index 0000000..64d6524 Binary files /dev/null and b/home/img/content-list-type-31.png differ diff --git a/home/img/content-list-type-32.png b/home/img/content-list-type-32.png new file mode 100644 index 0000000..843cc77 Binary files /dev/null and b/home/img/content-list-type-32.png differ diff --git a/home/img/content-list-type-33.png b/home/img/content-list-type-33.png new file mode 100644 index 0000000..a3ae8d8 Binary files /dev/null and b/home/img/content-list-type-33.png differ diff --git a/home/img/content-list-type-34.png b/home/img/content-list-type-34.png new file mode 100644 index 0000000..0bab82b Binary files /dev/null and b/home/img/content-list-type-34.png differ diff --git a/home/img/content-list-type-35.png b/home/img/content-list-type-35.png new file mode 100644 index 0000000..9ced12f Binary files /dev/null and b/home/img/content-list-type-35.png differ diff --git a/home/img/content-list-type-36.png b/home/img/content-list-type-36.png new file mode 100644 index 0000000..c3850c7 Binary files /dev/null and b/home/img/content-list-type-36.png differ diff --git a/home/img/content-list-type-37.png b/home/img/content-list-type-37.png new file mode 100644 index 0000000..99d2fb9 Binary files /dev/null and b/home/img/content-list-type-37.png differ diff --git a/home/img/content-list-type-38.png b/home/img/content-list-type-38.png new file mode 100644 index 0000000..0bab82b Binary files /dev/null and b/home/img/content-list-type-38.png differ diff --git a/home/img/content-list-type-39.png b/home/img/content-list-type-39.png new file mode 100644 index 0000000..ff5001e Binary files /dev/null and b/home/img/content-list-type-39.png differ diff --git a/home/img/content-list-type-4.png b/home/img/content-list-type-4.png new file mode 100644 index 0000000..9785766 Binary files /dev/null and b/home/img/content-list-type-4.png differ diff --git a/home/img/content-list-type-40.png b/home/img/content-list-type-40.png new file mode 100644 index 0000000..009f7e6 Binary files /dev/null and b/home/img/content-list-type-40.png differ diff --git a/home/img/content-list-type-42.png b/home/img/content-list-type-42.png new file mode 100644 index 0000000..0980b3c Binary files /dev/null and b/home/img/content-list-type-42.png differ diff --git a/home/img/content-list-type-43.png b/home/img/content-list-type-43.png new file mode 100644 index 0000000..75a9975 Binary files /dev/null and b/home/img/content-list-type-43.png differ diff --git a/home/img/content-list-type-44.png b/home/img/content-list-type-44.png new file mode 100644 index 0000000..ca279e9 Binary files /dev/null and b/home/img/content-list-type-44.png differ diff --git a/home/img/content-list-type-45.png b/home/img/content-list-type-45.png new file mode 100644 index 0000000..543824d Binary files /dev/null and b/home/img/content-list-type-45.png differ diff --git a/home/img/content-list-type-46.png b/home/img/content-list-type-46.png new file mode 100644 index 0000000..8f973a6 Binary files /dev/null and b/home/img/content-list-type-46.png differ diff --git a/home/img/content-list-type-5.png b/home/img/content-list-type-5.png new file mode 100644 index 0000000..4f8f5ec Binary files /dev/null and b/home/img/content-list-type-5.png differ diff --git a/home/img/content-list-type-6-.png b/home/img/content-list-type-6-.png new file mode 100644 index 0000000..e5fa3d1 Binary files /dev/null and b/home/img/content-list-type-6-.png differ diff --git a/home/img/content-list-type-6.png b/home/img/content-list-type-6.png new file mode 100644 index 0000000..cbda8f8 Binary files /dev/null and b/home/img/content-list-type-6.png differ diff --git a/home/img/content-list-type-7.png b/home/img/content-list-type-7.png new file mode 100644 index 0000000..67605e0 Binary files /dev/null and b/home/img/content-list-type-7.png differ diff --git a/home/img/content-list-type-8.png b/home/img/content-list-type-8.png new file mode 100644 index 0000000..a91c5bf Binary files /dev/null and b/home/img/content-list-type-8.png differ diff --git a/home/img/content-list-type-9.png b/home/img/content-list-type-9.png new file mode 100644 index 0000000..63fa4c9 Binary files /dev/null and b/home/img/content-list-type-9.png differ diff --git a/home/img/content-list-type-dfq.png b/home/img/content-list-type-dfq.png new file mode 100644 index 0000000..fd895ea Binary files /dev/null and b/home/img/content-list-type-dfq.png differ diff --git a/home/img/content-list-type-dgz.png b/home/img/content-list-type-dgz.png new file mode 100644 index 0000000..6b367ba Binary files /dev/null and b/home/img/content-list-type-dgz.png differ diff --git a/home/img/content-list-type-dsc.png b/home/img/content-list-type-dsc.png new file mode 100644 index 0000000..24a7bf3 Binary files /dev/null and b/home/img/content-list-type-dsc.png differ diff --git a/home/img/content-list-type-gwddr.png b/home/img/content-list-type-gwddr.png new file mode 100644 index 0000000..76f2ad8 Binary files /dev/null and b/home/img/content-list-type-gwddr.png differ diff --git a/home/img/content-list-type-gwdsq.png b/home/img/content-list-type-gwdsq.png new file mode 100644 index 0000000..48f801b Binary files /dev/null and b/home/img/content-list-type-gwdsq.png differ diff --git a/home/img/content-list-type-gzz.png b/home/img/content-list-type-gzz.png new file mode 100644 index 0000000..79531fd Binary files /dev/null and b/home/img/content-list-type-gzz.png differ diff --git a/home/img/content-list-type-qsz.png b/home/img/content-list-type-qsz.png new file mode 100644 index 0000000..a9f18bf Binary files /dev/null and b/home/img/content-list-type-qsz.png differ diff --git a/home/img/content-list-type-wsc.png b/home/img/content-list-type-wsc.png new file mode 100644 index 0000000..7ba8716 Binary files /dev/null and b/home/img/content-list-type-wsc.png differ diff --git a/home/img/content-list-type-ycx.png b/home/img/content-list-type-ycx.png new file mode 100644 index 0000000..f26790d Binary files /dev/null and b/home/img/content-list-type-ycx.png differ diff --git a/home/img/content-list-type-ygq.png b/home/img/content-list-type-ygq.png new file mode 100644 index 0000000..d7a2245 Binary files /dev/null and b/home/img/content-list-type-ygq.png differ diff --git a/home/img/content-list-type-yjq.png b/home/img/content-list-type-yjq.png new file mode 100644 index 0000000..849864c Binary files /dev/null and b/home/img/content-list-type-yjq.png differ diff --git a/home/img/content-list-type-ysc.png b/home/img/content-list-type-ysc.png new file mode 100644 index 0000000..f04cead Binary files /dev/null and b/home/img/content-list-type-ysc.png differ diff --git a/home/img/content-list-type-zf.png b/home/img/content-list-type-zf.png new file mode 100644 index 0000000..71b5958 Binary files /dev/null and b/home/img/content-list-type-zf.png differ diff --git a/home/img/content-list-type-zfshbh.png b/home/img/content-list-type-zfshbh.png new file mode 100644 index 0000000..92ea966 Binary files /dev/null and b/home/img/content-list-type-zfshbh.png differ diff --git a/home/img/copy.png b/home/img/copy.png new file mode 100644 index 0000000..6d6de3f Binary files /dev/null and b/home/img/copy.png differ diff --git a/home/img/delete.png b/home/img/delete.png new file mode 100644 index 0000000..1ab9a64 Binary files /dev/null and b/home/img/delete.png differ diff --git a/home/img/icon-filter.png b/home/img/icon-filter.png new file mode 100644 index 0000000..cceaad3 Binary files /dev/null and b/home/img/icon-filter.png differ diff --git a/home/img/icon-search-white.png b/home/img/icon-search-white.png new file mode 100644 index 0000000..101ecef Binary files /dev/null and b/home/img/icon-search-white.png differ diff --git a/home/img/id-card-0.png b/home/img/id-card-0.png new file mode 100644 index 0000000..eb14555 Binary files /dev/null and b/home/img/id-card-0.png differ diff --git a/home/img/id-card-1.png b/home/img/id-card-1.png new file mode 100644 index 0000000..537f45d Binary files /dev/null and b/home/img/id-card-1.png differ diff --git a/home/img/img-account.png b/home/img/img-account.png new file mode 100644 index 0000000..22e3c3c Binary files /dev/null and b/home/img/img-account.png differ diff --git a/home/img/img-add.png b/home/img/img-add.png new file mode 100644 index 0000000..378a143 Binary files /dev/null and b/home/img/img-add.png differ diff --git a/home/img/img-base.png b/home/img/img-base.png new file mode 100644 index 0000000..ddd073c Binary files /dev/null and b/home/img/img-base.png differ diff --git a/home/img/img-fly-1.png b/home/img/img-fly-1.png new file mode 100644 index 0000000..1cac01a Binary files /dev/null and b/home/img/img-fly-1.png differ diff --git a/home/img/img-fly-2.png b/home/img/img-fly-2.png new file mode 100644 index 0000000..f895a77 Binary files /dev/null and b/home/img/img-fly-2.png differ diff --git a/home/img/img-fwzm.png b/home/img/img-fwzm.png new file mode 100644 index 0000000..641abda Binary files /dev/null and b/home/img/img-fwzm.png differ diff --git a/home/img/img-houseCertificates.png b/home/img/img-houseCertificates.png new file mode 100644 index 0000000..7e53ff1 Binary files /dev/null and b/home/img/img-houseCertificates.png differ diff --git a/home/img/img-inside.png b/home/img/img-inside.png new file mode 100644 index 0000000..11dc047 Binary files /dev/null and b/home/img/img-inside.png differ diff --git a/home/img/img-nbqwzImg.png b/home/img/img-nbqwzImg.png new file mode 100644 index 0000000..fa9a580 Binary files /dev/null and b/home/img/img-nbqwzImg.png differ diff --git a/home/img/img-outward.png b/home/img/img-outward.png new file mode 100644 index 0000000..9ee10be Binary files /dev/null and b/home/img/img-outward.png differ diff --git a/home/img/img-pdxwzImg.png b/home/img/img-pdxwzImg.png new file mode 100644 index 0000000..980fffe Binary files /dev/null and b/home/img/img-pdxwzImg.png differ diff --git a/home/img/img-phone-1.png b/home/img/img-phone-1.png new file mode 100644 index 0000000..1dd026e Binary files /dev/null and b/home/img/img-phone-1.png differ diff --git a/home/img/img-phone-2.png b/home/img/img-phone-2.png new file mode 100644 index 0000000..80c6a34 Binary files /dev/null and b/home/img/img-phone-2.png differ diff --git a/home/img/img-phone-3.png b/home/img/img-phone-3.png new file mode 100644 index 0000000..856cb15 Binary files /dev/null and b/home/img/img-phone-3.png differ diff --git a/home/img/img-phone-4.png b/home/img/img-phone-4.png new file mode 100644 index 0000000..dc3025b Binary files /dev/null and b/home/img/img-phone-4.png differ diff --git a/home/img/img-record.png b/home/img/img-record.png new file mode 100644 index 0000000..77e710a Binary files /dev/null and b/home/img/img-record.png differ diff --git a/home/img/img-recordList.png b/home/img/img-recordList.png new file mode 100644 index 0000000..924420b Binary files /dev/null and b/home/img/img-recordList.png differ diff --git a/home/img/img-roof.png b/home/img/img-roof.png new file mode 100644 index 0000000..e907d02 Binary files /dev/null and b/home/img/img-roof.png differ diff --git a/home/img/img-roofVideo.png b/home/img/img-roofVideo.png new file mode 100644 index 0000000..e59315a Binary files /dev/null and b/home/img/img-roofVideo.png differ diff --git a/home/img/img-shxx1.png b/home/img/img-shxx1.png new file mode 100644 index 0000000..f5dfc31 Binary files /dev/null and b/home/img/img-shxx1.png differ diff --git a/home/img/img-shxx2.png b/home/img/img-shxx2.png new file mode 100644 index 0000000..f1cbb6e Binary files /dev/null and b/home/img/img-shxx2.png differ diff --git a/home/img/img-visa.png b/home/img/img-visa.png new file mode 100644 index 0000000..fdcaeea Binary files /dev/null and b/home/img/img-visa.png differ diff --git a/home/img/img-zaw.png b/home/img/img-zaw.png new file mode 100644 index 0000000..e44d40a Binary files /dev/null and b/home/img/img-zaw.png differ diff --git a/home/img/img-zjcsImg.png b/home/img/img-zjcsImg.png new file mode 100644 index 0000000..55e47f3 Binary files /dev/null and b/home/img/img-zjcsImg.png differ diff --git a/home/img/img-zjhsImg.png b/home/img/img-zjhsImg.png new file mode 100644 index 0000000..c5015b0 Binary files /dev/null and b/home/img/img-zjhsImg.png differ diff --git a/home/img/img-zjpbImg.png b/home/img/img-zjpbImg.png new file mode 100644 index 0000000..31a8186 Binary files /dev/null and b/home/img/img-zjpbImg.png differ diff --git a/home/img/img-zjzxImg.png b/home/img/img-zjzxImg.png new file mode 100644 index 0000000..ea41138 Binary files /dev/null and b/home/img/img-zjzxImg.png differ diff --git a/home/img/left.png b/home/img/left.png new file mode 100644 index 0000000..851c64e Binary files /dev/null and b/home/img/left.png differ diff --git a/home/img/local.png b/home/img/local.png new file mode 100644 index 0000000..9949231 Binary files /dev/null and b/home/img/local.png differ diff --git a/home/img/map-bg.png b/home/img/map-bg.png new file mode 100644 index 0000000..ea2bab9 Binary files /dev/null and b/home/img/map-bg.png differ diff --git a/home/img/navigation.png b/home/img/navigation.png new file mode 100644 index 0000000..dfba20a Binary files /dev/null and b/home/img/navigation.png differ diff --git a/home/img/scan-code.png b/home/img/scan-code.png new file mode 100644 index 0000000..033fd83 Binary files /dev/null and b/home/img/scan-code.png differ diff --git a/home/img/tel.png b/home/img/tel.png new file mode 100644 index 0000000..aae904d Binary files /dev/null and b/home/img/tel.png differ diff --git a/home/img/watermark.png b/home/img/watermark.png new file mode 100644 index 0000000..49a7e56 Binary files /dev/null and b/home/img/watermark.png differ diff --git a/home/pages/3days/3days.js b/home/pages/3days/3days.js new file mode 100644 index 0000000..79d3b15 --- /dev/null +++ b/home/pages/3days/3days.js @@ -0,0 +1,40 @@ +// home/pages/dispatch/dispatch.js +const { getDataInThreeDays } = require("../../../api/api"); +Page({ + data: { + listObj: {} + }, + onLoad(options) { + this.setData({ + entryId:options.id + }); + this.getList(); + }, + onShow() { + + }, + + /** 列表 **/ + getList(){ + getDataInThreeDays({ + id: this.data.entryId, + }).then(res=>{ + if(res.code==200){ + this.setData({ + listObj:res.data + }); + }else{ + wx.showToast({ + title: res.msg, + icon:'none' + }) + } + }); + }, + + + /** 返回 **/ + back(e) { + wx.navigateBack(); + }, +}) \ No newline at end of file diff --git a/home/pages/3days/3days.json b/home/pages/3days/3days.json new file mode 100644 index 0000000..6f563b5 --- /dev/null +++ b/home/pages/3days/3days.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "van-search": "@vant/weapp/search/index", + "van-radio": "@vant/weapp/radio/index", + "van-radio-group": "@vant/weapp/radio-group/index" + }, + "navigationBarTitleText": "近3天发电量" +} \ No newline at end of file diff --git a/home/pages/3days/3days.wxml b/home/pages/3days/3days.wxml new file mode 100644 index 0000000..22730ef --- /dev/null +++ b/home/pages/3days/3days.wxml @@ -0,0 +1,29 @@ +首次发电日期:{{listObj.firstGenerate}} + + + 日期/发电量 + 日期 + 发电量(KWh) + + + + 第一天 + {{listObj.firstDay}} + {{listObj.firstDayElectric}} + + + 第二天 + {{listObj.secondDay}} + {{listObj.secondDayElectric}} + + + 第三天 + {{listObj.thirdlyDay}} + {{listObj.thirdlyDayElectric}} + + + + + + 返回 + diff --git a/home/pages/3days/3days.wxss b/home/pages/3days/3days.wxss new file mode 100644 index 0000000..53761b9 --- /dev/null +++ b/home/pages/3days/3days.wxss @@ -0,0 +1,10 @@ + +.head-tit{font-size: 28rpx; padding: 20rpx;} +.footer{display: flex; align-items: center; position:fixed; left: 0; bottom: 0; right: 0; background-color: #fff; width: 100%;text-align: center; line-height: 80rpx; font-size: 30rpx; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);} +.footer .long{color: #fff; background-color: #0a6597;} + +.table-head{display: flex; align-items: center; text-align: center; font-size: 28rpx; font-weight: 600; background-color: #f0f0f0; line-height: 80rpx; border: 1px solid #CCC;} +.table-head view{flex: 1;} +.table-body .list{display: flex; align-items: center; text-align: center; font-size: 26rpx; background-color: #fff; padding: 30rpx 0; } +.table-body .list>view{flex: 1;} +.table-body .list:nth-child(2n + 1){background-color: #f6fafc;} \ No newline at end of file diff --git a/home/pages/acceptance/acceptance.js b/home/pages/acceptance/acceptance.js new file mode 100644 index 0000000..bf33d3e --- /dev/null +++ b/home/pages/acceptance/acceptance.js @@ -0,0 +1,630 @@ +// pages/acceptance/acceptance.js +const { + entryDetail, + IMG_BASE_URL, + getActualCapacity, + getProviceCodeList +} = require('../../../api/api') + +import Dialog from '@vant/weapp/dialog/dialog'; +Page({ + + /** + * 页面的初始数据 + */ + data: { + IMG_BASE_URL: IMG_BASE_URL, + noneImg: 'https://sky-energy.oss-cn-beijing.aliyuncs.com/prohibit_delete/wutupian.png', + // photoTips: { + // //安装 + // //1.设备信息照片 + // nbqPlateImg:{ + // title: '逆变器序列号照片', + // message: '照片清晰,可识别逆变器的序列号、规格型号、生产厂商等信息' + // }, + // txPlateImg:{ + // title: '逆变器通讯棒照片', + // message: '照片清晰,可识别通讯棒的序列号、二维码、LOGO' + // }, + // zjPlateImg:{ + // title: '组件铭牌照片', + // message: '照片清晰,可识别组件品牌、功率等级、性能参数' + // }, + // zjSnImgs:{ + // title: '组件SN', + // message: '1、上传组件包装箱A4 纸条码或组件边框SN最少2张;2、图片清晰可看清SN 号码。' + // }, + // //2.支架及组件安装照片 + // zjImg1:{ + // title: '膨胀螺栓', + // message: '膨胀螺丝大小不低于设计要求,阳光房膨胀螺丝M12*100' + // }, + // zjImg2:{ + // title: '基座安装固定', + // message: '1、膨胀螺丝必须使用大垫片固定;2、照片能够看出第二道防水。' + // }, + // zjImg3:{ + // title: '底座防水', + // message: '1、照片能够体现三道防水施工完成;2、整个底座均需涂刷防水;3、防水面积大于底座5cm以上。' + // }, + // zjImg4:{ + // title: '支架基础距离房檐的距离', + // message: '1、能够看清楚底座距离墙边的距离,不小于200mm;2、有女儿墙的测量外墙到立柱的距离;' + // }, + // zjImg5:{ + // title: '支架东向西拍摄', + // message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + // }, + // zjImg6:{ + // title: '支架西向东拍摄', + // message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + // }, + // zjImg7:{ + // title: '支架南向北拍摄', + // message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + // }, + // zjImg8:{ + // title: '支架北向南拍摄', + // message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + // }, + // zjImg9:{ + // title: '支架角度', + // message: '1、支架角度和图纸保持一致,按图施工;2、必须使用角度仪进行测量,不允许使用手机。' + // }, + // componentImg1:{ + // title: '支架节点(斜支撑)', + // message: '1、按图施工;2、焊接必须满焊;3、防腐防锈按要求施工。' + // }, + // componentImg2:{ + // title: '支架距照片(南北)', + // message: '1、间距尺寸符合图施工;2、能够看清立柱南北间距尺寸。' + // }, + // componentImg3:{ + // title: '支架距照片(东西)', + // message: '1、间距尺寸符合图施工;2、能够看清立柱东西间距尺寸。' + // }, + // componentImg4:{ + // title: '防风加固', + // message: '1、横拉杆和背拉杆施工按图施工。' + // }, + // sizeMeasureImgs:{ + // title: '方管尺寸测量', + // message: '1.三种方管尺寸均需测量(100*100/80*40/50*50)。' + // }, + // //3.电气设备安装照片 + // totalImgs:{ + // title: '并网箱、逆变器外部安装照片、接地引下线', + // message: '1、墙面安装底部高度不小于1.8米;2、建议安装高度2 米。3、方位角在150-300 之间必须安装遮阳棚。4、周边是否存在易燃易爆物品。' + // }, + // bwInnerImg:{ + // title: '并网箱内部整体照片', + // message: '1、线鼻是否压接;2、防火封堵完整;3、线缆线皮包扎。' + // }, + // dqsbAnImgOne:{ + // title: '直流线缆保护', + // message: '1、直流电缆穿管保护;2、管口需使用防火泥封堵。' + // }, + // dqsbAnImgTwo:{ + // title: '直流线缆固定', + // message: '1、直流电缆走线横平竖直;2、直流电缆绑住需使用包塑扎丝固定。' + // }, + // //4.接地系统照片 + // zjJdImgs:{ + // title: '引下线与支架连接点、南北坡接地连接点', + // message: '1、焊接倍数满足要求,建议10cm;2、焊接满焊;3、防腐防锈施工完成。' + // }, + // groundResistanceImgs:{ + // title: '接地电阻', + // message: '1、电气接地小于4Ω;2、支架接地小于10Ω;3、共用接地小于4Ω。' + // }, + // zujianJdImg:{ + // title: '组件边框接地', + // message: '1.组件边框接地可靠' + // }, + // //5.调试记录照片 + // openSayVoltageImgs:{ + // title: '开路电压', + // message: '1、组串号按图施工;2、需要测量每一路开路电压;3、开路电压测量时能够看清楚号码线管;4、第一张照片需附逆变器下MPPT插入照片。' + // }, + // //6.方阵安装完毕整体照片 + // directionAirImg1:{ + // title: '东向西航拍', + // message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + // }, + // directionAirImg2:{ + // title: '西向东航拍', + // message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + // }, + // directionAirImg3:{ + // title: '南向北航拍', + // message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + // }, + // directionAirImg4:{ + // title: '北向南航拍', + // message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + // }, + // zjNearImg:{ + // title: '组件近景', + // message: '1、无遮挡;2、无异物、无划伤' + // }, + // zjNngleImg:{ + // title: '组件角度', + // message: '1、组件角度和图纸一致。' + // }, + // zjItemImg:{ + // title: '檩条出组件照片', + // message: '1、檩条末端预留安全长度不小于6cm;2、照片需要测量尺寸。' + // }, + // waterChannelImg:{ + // title: '水槽照片', + // message: '1、水槽清晰可见。' + // }, + // mediumFixImg:{ + // title: '中压固定照片', + // message: '1、压块固定牢固跟图纸要求一致。' + // }, + // safetyWarningImg:{ + // title: '安全警示牌', + // message: '1、在上人位置悬挂安全警示牌。' + // }, + // safetyDiscloseDocImg:{ + // title: '现场安全交底文件', + // message: '1、现场交底记录必须现场签字;2、签字人数跟现场影像照片一致。3、交底人跟被交底人不允许为同一人。' + // }, + // discloseDocImg:{ + // title: '现场交底照片', + // message: '1、安全帽佩戴正确;2、帽带必须戴好;3、涉及高空作业人员佩戴安全带和防坠器、防滑鞋;4、反光背心穿戴整齐。' + // }, + // recordDocImg:{ + // title: '记录表', + // message: '1、是否全部认真检查,检查结果是否合格;2、结论是否手签,检查人签字等。' + // }, + // //并网 + // yxImg: { + // title: '电站运行信息', + // message: '监控后台逆变器连续三天的日发电量截图' + // }, + // gebImg: { + // title: '补充图片', + // message: '其他细节照片可根据需要自行增加' + // }, + // }, + + // 安装 + photoTips: [ + //安装 + { + title:'1.设备信息照片', + list:[{ + key:'nbqPlateImg', + num:1, + title: '逆变器序列号照片', + message: '1、铭牌清晰' + },{ + key:'txPlateImg', + num:1, + title: '逆变器通讯棒照片', + message: '1、清晰' + },{ + key:'zjPlateImg', + num:1, + title: '组件铭牌照片', + message: '1、组件铭牌内容清晰。' + },{ + key:'zjSnImgs', + num:4, + title: '组件SN', + message: '1、上传组件包装箱A4 纸条码或组件边框SN最少2张;2、图片清晰可看清SN 号码。' + }] + }, + { + title:'2.支架及组件安装照片', + list:[{ + key:'zjImg1', + num:1, + title: '膨胀螺栓', + message: '膨胀螺丝大小不低于设计要求,阳光房膨胀螺丝M12*100' + },{ + key:'zjImg2', + num:1, + title: '基座安装固定', + message: '1、膨胀螺丝必须使用大垫片固定;2、照片能够看出第二道防水。' + },{ + key:'zjImg3', + num:1, + title: '底座防水', + message: '1、照片能够体现三道防水施工完成;2、整个底座均需涂刷防水;3、防水面积大于底座5cm以上。' + },{ + key:'zjImg4', + num:1, + title: '支架基础距离房檐的距离', + message: '1、能够看清楚底座距离墙边的距离,不小于200mm;2、有女儿墙的测量外墙到立柱的距离;' + },{ + key:'zjImg5', + num:1, + title: '支架东向西拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg6', + num:1, + title: '支架西向东拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg7', + num:1, + title: '支架南向北拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg8', + num:1, + title: '支架北向南拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg9', + num:1, + title: '支架角度', + message: '1、支架角度和图纸保持一致,按图施工;2、必须使用角度仪进行测量,不允许使用手机。' + },{ + key:'componentImg1', + num:1, + title: '支架节点(斜支撑)', + message: '1、按图施工;2、焊接必须满焊;3、防腐防锈按要求施工。' + },{ + key:'componentImg2', + num:1, + title: '支架距照片(南北)', + message: '1、间距尺寸符合图施工;2、能够看清立柱南北间距尺寸。' + },{ + key:'componentImg3', + num:1, + title: '支架距照片(东西)', + message: '1、间距尺寸符合图施工;2、能够看清立柱东西间距尺寸。' + },{ + key:'componentImg4', + num:3, + title: '防风加固', + message: '1、横拉杆和背拉杆施工按图施工。' + },{ + key:'sizeMeasureImgs', + num:9, + title: '方管尺寸测量', + message: '1.三种方管尺寸均需测量(100*100/80*40/50*50)。' + }] + }, + { + title:'3.电气设备安装照片', + list:[{ + key:'totalImgs', + num:1, + title: '并网箱、逆变器外部安装照片、接地引下线', + message: '1、墙面安装底部高度不小于1.8米;2、建议安装高度2 米。3、方位角在150-300 之间必须安装遮阳棚。4、周边是否存在易燃易爆物品。' + },{ + key:'bwInnerImg', + num:1, + title: '并网箱内部整体照片', + message: '1、线鼻是否压接;2、防火封堵完整;3、线缆线皮包扎。' + },{ + key:'dqsbAnImgOne', + num:1, + title: '直流线缆保护', + message: '1、直流电缆穿管保护;2、管口需使用防火泥封堵。' + },{ + key:'dqsbAnImgTwo', + num:1, + title: '直流线缆固定', + message: '1、直流电缆走线横平竖直;2、直流电缆绑住需使用包塑扎丝固定。' + }], + }, + { + title:'4.接地系统照片', + list:[{ + key:'zujianJdImg', + num:1, + title: '组件边框接地', + message: '1.组件边框接地可靠' + },{ + key:'zjJdImgs', + num:2, + title: '引下线与支架连接点、南北坡接地连接点', + message: '1、焊接倍数满足要求,建议10cm;2、焊接满焊;3、防腐防锈施工完成。' + },{ + key:'groundResistanceImgs', + num:2, + title: '接地电阻', + message: '1、电气接地小于4Ω;2、支架接地小于10Ω;3、共用接地小于4Ω。' + }] + }, + { + title:'5.调试记录照片', + list:[{ + key:'openWayVoltageImgs', + num:6, + title: '开路电压', + message: '1、组串号按图施工;2、需要测量每一路开路电压;3、开路电压测量时能够看清楚号码线管;4、第一张照片需附逆变器下MPPT插入照片。' + }] + }, + { + title:'6.方阵安装完毕整体照片', + list:[{ + key:'directionAirImg1', + num:1, + title: '东向西航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg2', + num:1, + title: '西向东航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg3', + num:1, + title: '南向北航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg4', + num:1, + title: '北向南航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'zjNearImg', + num:1, + title: '组件近景', + message: '1、无遮挡;2、无异物、无划伤' + },{ + key:'zjAngleImg', + num:1, + title: '组件角度', + message: '1、组件角度和图纸一致。' + },{ + key:'zjItemImg', + num:1, + title: '檩条出组件照片', + message: '1、檩条末端预留安全长度不小于6cm;2、照片需要测量尺寸。' + },{ + key:'waterChannelImg', + num:1, + title: '水槽照片', + message: '1、水槽清晰可见。' + },{ + key:'mediumFixImg', + num:1, + title: '中压固定照片', + message: '1、压块固定牢固跟图纸要求一致。' + },{ + key:'safetyWarningImg', + num:1, + title: '安全警示牌', + message: '1、在上人位置悬挂安全警示牌。' + },{ + key:'safetyDiscloseDocImg', + num:1, + title: '现场安全交底文件', + message: '1、现场交底记录必须现场签字;2、签字人数跟现场影像照片一致。3、交底人跟被交底人不允许为同一人。' + },{ + key:'discloseDocImg', + num:1, + title: '现场交底照片', + message: '1、安全帽佩戴正确;2、帽带必须戴好;3、涉及高空作业人员佩戴安全带和防坠器、防滑鞋;4、反光背心穿戴整齐。' + },{ + key:'recordDocImg', + num:1, + title: '记录表', + message: '1、是否全部认真检查,检查结果是否合格;2、结论是否手签,检查人签字等。' + }] + }, + //并网 + { + title:'并网', + list:[{ + key:'yxImg', + num:1, + title:'电站运行信息', + message: '监控后台逆变器连续三天的日发电量截图' + },{ + key:'gebImg', + num:1, + title: '补充图片', + message: '其他细节照片可根据需要自行增加' + },{ + key:'gebImg2', + num:1, + title: '补充图片2', + message: '其他细节照片可根据需要自行增加' + }] + }, + ], + photo: { + //1.设备信息照片 + nbqPlateImg: [],//逆变器序列号照片,逆变器1铭牌照片 + txPlateImg: [],//逆变器通讯棒照片,通讯棒1铭牌照 + zjPlateImg: [],//组件铭牌照片 + zjSnImgs:[],//组件SN,1-4张---- + //2.支架及组件安装照片 + zjImg1: [],//膨胀螺栓 + zjImg2: [],//基座安装固定 + zjImg3: [],//底座防水 + zjImg4: [],//支架基础距离房檐的距离 + zjImg5: [],//支架东向西拍摄 + zjImg6: [],//支架西向东拍摄--- + zjImg7: [],//支架南向北拍摄--- + zjImg8: [],//支架北向南拍摄--- + zjImg9: [],//支架角度---- + componentImg1: [],//支架节点(斜支撑) + componentImg2: [],//支架距照片(南北) + componentImg3: [],//支架距照片(东西) + componentImg4: [],//防风加固,1-3张 + sizeMeasureImgs: [],//方管尺寸测量---,9张 + //3.电气设备安装照片 + totalImgs: [],//并网箱、逆变器外部安装照片、接地引下线,逆变器、并网箱整体安装照片, 存在字段名逆变器和并网箱接地照 + bwInnerImg: [],//并网箱内部整体照片 + dqsbAnImgOne: [],//直流线缆保护 + dqsbAnImgTwo: [],//直流线缆固定 + //4.接地系统照片 + zjJdImgs: [],//引下线与支架连接点、南北坡接地连接点,2张---- + groundResistanceImgs: [],//接地电阻,1-2张----- + zujianJdImg: [],//组件边框接地 + //5.调试记录照片 + openWayVoltageImgs: [],//开路电压,1-6张----- + //6.方阵安装完毕整体照片 + directionAirImg1: [],//东向西航拍---- + directionAirImg2: [],//西向东航拍---- + directionAirImg3: [],//南向北航拍---- + directionAirImg4: [],//北向南航拍---- + zjNearImg: [],//组件近景---- + zjAngleImg: [],//组件角度---- + zjItemImg: [],//檩条出组件照片---- + waterChannelImg: [],//水槽照片---- + mediumFixImg: [],//中压固定照片---- + safetyWarningImg: [],//安全警示牌---- + safetyDiscloseDocImg: [],//现场安全交底文件---- + discloseDocImg: [],//现场交底照片---- + recordDocImg: [],//记录表---- + }, + + }, + + onLoad(options) { + this.setData({ + entryId: options.projectId, + type: options.type, //0是安装,1是并网 + }) + this.entryDetail() + }, + /** + * + * 获取电站详情 + * + * @param {*} e + */ + entryDetail(e) { + entryDetail({ + userId: wx.getStorageSync('userId'), + entryId: this.data.entryId, + }).then((res) => { + this.setData({ + 'data.projectId': res.project_id, + 'data.projectCode': res.projectCode, + 'data.projectName': res.projectName, + 'data.powerStationCode': res.power_station_code, + 'data.name': res.tenant_name, + 'data.traderName': res.create_trader_name, + 'data.traderTel': res.traderTel, + 'data.phone': res.mobile, + 'data.idCard': res.id_code, + 'data.region': res.province + res.city + res.area + res.address, + 'data.scheme': res.scheme_type == 1 ? "标准方案" : "组合方案", + 'data.generatorNo': res.generator_no, //发电户号 + 'data.code': res.province_code, //发电户号 + //并网图片显示 + [`bwPhoto.gebImg[0].url`]: res.report.gebImg ? this.data.IMG_BASE_URL + res.report.gebImg : this.data.noneImg, + [`bwPhoto.gebImg2[0].url`]: res.report.gebImg2 ? this.data.IMG_BASE_URL + res.report.gebImg2 : this.data.noneImg, + [`bwPhoto.yxImg[0].url`]: res.report.yxImg ? this.data.IMG_BASE_URL + res.report.yxImg : this.data.noneImg, + 'data.bankName': res.bank_name,//开户银行 + 'data.bankCode': res.bank_code,//银行账号 + 'data.powerName': res.powerName,//项目名称 + 'data.zujBrand': res.map.zujBrand,//组件品牌 + }) + + + if (res.sn) { + var snList = res.sn.split(",") + this.setData({ + snList: snList + }) + } + + if (res.nbq_sn) { + var nbqSnList = res.nbq_sn.split(",") + this.setData({ + nbqSnList: nbqSnList, + }) + } + + + if (res.report) { + for(let i in this.data.photo){ + if(res.report[i]){ + let arr = res.report[i].split(","),arr2=[]; + arr.forEach(itm=>{ + arr2.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.${i}`]: arr2, + }); + }else{ + this.setData({ + [`photo.${i}`]: [{name:'',url:this.data.noneImg}], + }); + } + } + } + this.getActualCapacity() + // this.getProviceCodeList() + }) + }, + + + /** + * + * 获取电力公司 + * + * @param {*} e + */ + getProviceCodeList(e) { + getProviceCodeList({ + + }).then((res) => { + if (res.code == 200) { + res.data.forEach(element => { + const code = element.columns.code + if (code == this.data.data.code){ + this.setData({ + 'data.powerCompanyName':element.columns.power_company + }) + } + }); + } + }) + }, + + + + /** + * + * 查询安装组件信息 + * + * @param {*} e + */ + getActualCapacity(e) { + getActualCapacity({ + entryId: this.data.entryId, + }).then((res) => { + const data = JSON.parse(res.data) + this.setData({ + component: data.columns + }) + }) + }, + + /** + * + * 查看注意方案 + * + * @param {*} e + */ + viewNote(e) { + let title = e.currentTarget.dataset.tit; + let message = e.currentTarget.dataset.msg; + Dialog.alert({ + title: title, + message: message, + theme: 'round-button', + }).then(() => { + + }); + }, + +}) \ No newline at end of file diff --git a/home/pages/acceptance/acceptance.json b/home/pages/acceptance/acceptance.json new file mode 100644 index 0000000..875cc11 --- /dev/null +++ b/home/pages/acceptance/acceptance.json @@ -0,0 +1,7 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index", + "van-dialog": "@vant/weapp/dialog/index" + }, + "navigationBarTitleText": "验收报告" +} \ No newline at end of file diff --git a/home/pages/acceptance/acceptance.wxml b/home/pages/acceptance/acceptance.wxml new file mode 100644 index 0000000..a2772e8 --- /dev/null +++ b/home/pages/acceptance/acceptance.wxml @@ -0,0 +1,185 @@ + + + + 电站基本信息 + + + 产品编号 + {{data.projectCode}} + + + + + 产品名称 + {{data.projectName}} + + + + + 代理商名称 + {{data.traderName}} + + + + + + + 业主姓名 + {{data.name}} + + + + + 身份证号码 + {{data.idCard}} + + + + + 安装地址 + {{data.region}} + + + + + 联系电话 + {{data.phone}} + + + + + 安装方案 + {{data.scheme}} + + + + + 电站编码 + {{data.powerStationCode}} + + + + + + 发电户号 + {{data.generatorNo}} + + + + + + 项目名称 + {{data.powerName}} + + + + + 组件规格 + + {{component.spec}} + W + + + + + + 安装组件数量 + {{component.amount}} + + + + + 安装组件容量 + {{component.total}} + W + + + + + + 通讯棒SN码 + {{item}} + + + + + + + 逆变器SN码 + {{item}} + + + + + + + + 电站安装完成验收条款项 + + + + + {{item.title}} + + + + + + {{child.title}} + + + + + + + + + + + + + + 电站并网验收条款项 + + + + + 电站运行信息 + + + + + 运行信息 + + + + + + + + + 补充1 + + + + + + + + 补充2 + + + + + + + + + + + + \ No newline at end of file diff --git a/home/pages/acceptance/acceptance.wxss b/home/pages/acceptance/acceptance.wxss new file mode 100644 index 0000000..d9a90e6 --- /dev/null +++ b/home/pages/acceptance/acceptance.wxss @@ -0,0 +1,128 @@ +/* pages/acceptance/acceptance.wxss */ +.content { + margin-top: 20rpx; + padding-top: 1rpx; + padding-bottom: 1rpx; + width: 750rpx; + background-color: #ffffff; + font-size: 28rpx; +} + +.content-line { + width: 100%; + height: 2rpx; + background-color: #f2f2f2; +} + +.content-list { + display: flex; + align-items: center; + margin: 20rpx 20rpx 10rpx; +} + +.content-list-title { + width: 180rpx; + flex-shrink: 0; + margin-right: 20rpx; +} + +.content-title { + margin: 20rpx; + margin-left: 20rpx; + font-weight: bold; + font-size: 30rpx; +} + + +.content-red { + margin-right: 10rpx; + color: red; +} + +.content-attention-showText { + display: flex; +} + +.content-attention { + width: 44rpx; + height: 44rpx; + flex-shrink: 0; + transform: translate(0,-8rpx); +} + +.content-attention-text { + font-size: 24rpx; + display: flex; + padding: 10rpx 0rpx 8rpx 0rpx; + align-items: flex-start; + line-height: 30rpx; +} + +.content-fontstyle { + font-weight: bold; +} + +.content-img-box { + display: flex; + flex-wrap: wrap; + align-items: stretch; + margin: 0 20rpx 20rpx; +} + +.content-img-name { + display: flex; + flex-direction: column; + align-items: flex-start; + width: calc(33.33% - 20rpx); + justify-content: space-between; + margin: 0 10rpx; +} +.content-img-name.w-100{ + width: 100%; + align-items: flex-start; +} + +.content-img { + width: 150rpx; + height: 150rpx; + display: inline-block; +} +.content-img-name.w-100 .van-uploader__preview { + /* margin: 0 16rpx 16rpx !important; */ + margin-right: 88rpx !important; +} +.content-img-name.w-100 .van-uploader__preview:nth-child(3n) { + margin-right: 0 !important; +} +.content-img-box .content-line + .content-line { + display: none; +} + +.buttom-margin { + width: 750rpx; + height: 200rpx; +} + + +.from-submit-buttom { + position: fixed; + bottom: 0; + display: flex; + flex-direction: row; + width: 750rpx; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + background-color: #fff; + z-index: 10; +} + + +.from-submit-buttom-confirm { + width: 100%; + height: 80rpx; + background-color: #0A6597; + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/home/pages/acceptanceAZ/acceptanceAZ.js b/home/pages/acceptanceAZ/acceptanceAZ.js new file mode 100644 index 0000000..358f6e2 --- /dev/null +++ b/home/pages/acceptanceAZ/acceptanceAZ.js @@ -0,0 +1,234 @@ +// pages/acceptance/acceptance.js +const { + entryDetail, + IMG_BASE_URL, + WU_TU_PIAN_URL, + toNetAccept, + getUsedMaterialInfo +} = require('../../../api/api') +Page({ + data: { + tabIndex:'0', + childObj:{},//子组件详情数据 + checked:false,//物料安装完成状态是否安装已完成 + otherFiles: [], //其他资料 + }, + onLoad(options) { + this.setData({ + entryId: options.projectId, + type: options.type, + }); + this.entryDetail() + }, + /** 获取电站详情 **/ + entryDetail(e) { + entryDetail({ + userId: wx.getStorageSync('userId'), + entryId: this.data.entryId, + }).then((res) => { + this.setData({ + detail: res, + id: res.id, //修改数据的时候传此ID + projectId: res.project_id, + tenant_type: res.tenant_type=='1' ? '个人' : '单位',//1.个人,2单位 + //业主信息参数 + name: res.tenant_name, + phone: res.mobile, + idCard: res.id_code, + regno: res.regno, + provinceName: res.province, + cityName: res.city, + areaName: res.area, + address: res.address, + childObj:res,//子组件详情数据 + /*********/ + [`photo.filingDocumentPhoto[0].url`]:res.filing_document_photo ? IMG_BASE_URL + res.filing_document_photo : WU_TU_PIAN_URL,//备案证 + otherFiles: res.report && res.report.otherFiles?res.report.otherFiles.split(","):[] + }); + const detailObj = JSON.parse(JSON.stringify(this.data)) + this.setData({ + detailObj, + }); + if(res.management == '04'){//华融 + if (res.projectDetailList[0].componentList.length > 0) { + this.getUsedMaterialInfo() + } + }else{ + if (res.componentList.length > 0) { + this.getUsedMaterialInfo() + } + } + }) + }, + /** 业主信息 **/ + userFn(e){ + wx.navigateTo({ + url: '/home/pages/ownerForm/ownerForm?projectId=' + this.data.entryId, + }) + }, + /** 拨打业主联系电话 **/ + phoneFn(e) { + const phone = e.currentTarget.dataset.phone; + if (!phone) { + wx.showToast({ + title: '暂无联系方式', + icon: 'none' + }) + return + } + wx.makePhoneCall({ + phoneNumber: phone, + }) + }, + /** tab切换 **/ + tabChange(e){ + let index = e.currentTarget.dataset.index; + this.setData({ + tabIndex:index + }); + }, + /** 物料安装完成状态勾选 **/ + onChange(event) { + this.setData({ + checked: event.detail, + }); + }, + /** + * 提交 + */ + passFn(e) { + let type = e.currentTarget.dataset.type, txt = ''; + if(type == '2'){ + if (!this.data.fixConclusionSh) { + wx.showToast({ + title: '请输入不通过验收意见', + icon: 'none' + }) + return + } + txt = '不通过成功'; + }else{ + if(!this.data.checked){ + wx.showToast({ + title: '请先勾选物料安装完成状态', + icon: 'none' + }) + return + } + txt = '通过成功'; + } + // console.log("执行5", this.data.fixConclusionSh); + // return + wx.showLoading({ + title: "提交中", + mask: true + }); + toNetAccept({ + id: this.data.entryId, + type:type,//1.通过 2.驳回 + fixConclusionSh: this.data.fixConclusionSh ? this.data.fixConclusionSh : "", + materialFixFlag : this.data.checked ? '1' : '0',//物料安装完成状态:0.未完成 1.已完成 + userId: wx.getStorageSync('userId') + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + wx.showToast({ + title: txt, + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + title: res.msg || res.errMsg, + icon: 'none', + }) + } + }) + }, + /** 获取使用物料列表 **/ + getUsedMaterialInfo(e) { + getUsedMaterialInfo({ + entryId: this.data.entryId, + }).then((res) => { + var componentList = []; //组件 + var converterList = []; //逆变器 + var cagesList = []; //并网箱 + var supportList = []; //支架 + if (res.code == 200) { + //华融安装多产品 + if(res.data.projectSettingList){ + this.setData({ + productList: JSON.parse(res.data.projectSettingList) + }) + } + res.data.materialEntryList = JSON.parse(res.data.materialEntryList) + if (res.data.materialEntryList.length > 0) { + res.data.materialEntryList.forEach(element => { + if (element.type == "组件") { + componentList.push(element) + } else if (element.type == "逆变器") { + converterList.push(element) + } else if (element.type == "并网箱") { + cagesList.push(element) + } else if (element.type == "支架") { + supportList.push(element) + } + }); + + var list = []; + componentList.forEach(element => { + var pos = list.findIndex((res) => { + return res.materialId == element.materialId && res.projectId == element.projectId + }) + if (pos == -1) { + element.itemList = [JSON.parse(JSON.stringify(element))] + list.push(element) + } else { + list[pos].itemList.push(element) + } + }); + + var list1 = []; + converterList.forEach(element => { + var pos = list1.findIndex((res) => { + return res.materialId == element.materialId && res.projectId == element.projectId + }) + if (pos == -1) { + element.itemList = [JSON.parse(JSON.stringify(element))] + list1.push(element) + } else { + list1[pos].itemList.push(element) + } + }); + + this.setData({ + componentList: list, + converterList: list1, + cagesList: cagesList, + supportList: supportList, + nbqList: res.data.nbqMap?JSON.parse(res.data.nbqMap):[], + zjMap: res.data.zjMap?JSON.parse(res.data.zjMap):'' + // nbqList: JSON.parse(res.data.nbqMap), + // zjMap: JSON.parse(res.data.zjMap) + }) + } else { + this.setData({ + componentList: [], + converterList: [], + cagesList: [], + supportList: [], + nbqList: res.data.nbqMap?JSON.parse(res.data.nbqMap):[], + zjMap: res.data.zjMap?JSON.parse(res.data.zjMap):'' + // nbqList: JSON.parse(res.data.nbqMap), + // zjMap: JSON.parse(res.data.zjMap) + }) + } + + } + }) + }, +}) \ No newline at end of file diff --git a/home/pages/acceptanceAZ/acceptanceAZ.json b/home/pages/acceptanceAZ/acceptanceAZ.json new file mode 100644 index 0000000..e6f5dd8 --- /dev/null +++ b/home/pages/acceptanceAZ/acceptanceAZ.json @@ -0,0 +1,14 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index", + "van-dialog": "@vant/weapp/dialog/index", + "van-checkbox": "@vant/weapp/checkbox/index", + "finish": "/home/components/finish/finish", + "finishHR": "/home/components/finishHR/finishHR", + "install": "/home/components/install/install", + "installHR": "/home/components/installHR/installHR", + "survey": "/home/components/survey/survey", + "userInfo": "../../components/userInfo/userInfo" + }, + "navigationBarTitleText": "安装验收" +} \ No newline at end of file diff --git a/home/pages/acceptanceAZ/acceptanceAZ.wxml b/home/pages/acceptanceAZ/acceptanceAZ.wxml new file mode 100644 index 0000000..27c70e9 --- /dev/null +++ b/home/pages/acceptanceAZ/acceptanceAZ.wxml @@ -0,0 +1,56 @@ + + + + + + + + + + 完工信息 + + + + 安装信息 + + + + + + + + + + + + + + 物料安装完成状态 + 安装已完成 + + + + 验收意见 + + + + + + + + + 不通过 + 通过 + + + \ No newline at end of file diff --git a/home/pages/acceptanceAZ/acceptanceAZ.wxss b/home/pages/acceptanceAZ/acceptanceAZ.wxss new file mode 100644 index 0000000..4be7e82 --- /dev/null +++ b/home/pages/acceptanceAZ/acceptanceAZ.wxss @@ -0,0 +1,33 @@ +@import "/home/pages/entryInfoAudit/entryInfoAudit.wxss"; +.content-tab { + width: 750rpx; + height: 90rpx; + display: flex; + flex-direction: row; + background-color: #ffffff; + margin-bottom: 1px; +} +.content-tab-item { + flex: 1; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 28rpx; + color: #666; + position: relative; +} +.content-tab-item-select { + color: #333; + font-size: 32rpx; + font-weight: bold; +} +.content-tab-item-select-tab { + position: absolute; + bottom: 0; + width: 60rpx; + height: 6rpx; + background-color: #0a6597; + border-radius: 3rpx; +} \ No newline at end of file diff --git a/home/pages/acceptanceBW/acceptanceBW.js b/home/pages/acceptanceBW/acceptanceBW.js new file mode 100644 index 0000000..40debd6 --- /dev/null +++ b/home/pages/acceptanceBW/acceptanceBW.js @@ -0,0 +1,616 @@ +// pages/acceptance/acceptance.js +const { + entryDetail, + IMG_BASE_URL, + API_BASE_URL, + WU_TU_PIAN_URL, + getActualCapacity, + twoMergeAcceptRefuse, + toNetAccept +} = require('../../../api/api') + +import Dialog from '@vant/weapp/dialog/dialog'; +Page({ + + /** + * 页面的初始数据 + */ + data: { + IMG_BASE_URL: IMG_BASE_URL, + API_BASE_URL: API_BASE_URL, + noneImg: 'https://sky-energy.oss-cn-beijing.aliyuncs.com/prohibit_delete/wutupian.png', + photoList: [],//图片集合 + powerCapacityUrl: [], //3天发电量 + gridCheck: false, + photoTips: [ + //安装 + { + title:'1.设备信息照片', + list:[{ + key:'nbqPlateImg', + num:1, + title: '逆变器序列号照片', + message: '1、铭牌清晰' + },{ + key:'txPlateImg', + num:1, + title: '逆变器通讯棒照片', + message: '1、清晰' + },{ + key:'zjPlateImg', + num:1, + title: '组件铭牌照片', + message: '1、组件铭牌内容清晰。' + },{ + key:'zjSnImgs', + num:4, + title: '组件SN', + message: '1、上传组件包装箱A4 纸条码或组件边框SN最少2张;2、图片清晰可看清SN 号码。' + }] + }, + { + title:'2.支架及组件安装照片', + list:[{ + key:'zjImg1', + num:1, + title: '膨胀螺栓', + message: '膨胀螺丝大小不低于设计要求,阳光房膨胀螺丝M12*100' + },{ + key:'zjImg2', + num:1, + title: '基座安装固定', + message: '1、膨胀螺丝必须使用大垫片固定;2、照片能够看出第二道防水。' + },{ + key:'zjImg3', + num:1, + title: '底座防水', + message: '1、照片能够体现三道防水施工完成;2、整个底座均需涂刷防水;3、防水面积大于底座5cm以上。' + },{ + key:'zjImg4', + num:1, + title: '支架基础距离房檐的距离', + message: '1、能够看清楚底座距离墙边的距离,不小于200mm;2、有女儿墙的测量外墙到立柱的距离;' + },{ + key:'zjImg5', + num:1, + title: '支架东向西拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg6', + num:1, + title: '支架西向东拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg7', + num:1, + title: '支架南向北拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg8', + num:1, + title: '支架北向南拍摄', + message: '1、支架按图施工;2、支架焊接必须满焊;3、支架防腐防锈施工完成。' + },{ + key:'zjImg9', + num:1, + title: '支架角度', + message: '1、支架角度和图纸保持一致,按图施工;2、必须使用角度仪进行测量,不允许使用手机。' + },{ + key:'componentImg1', + num:1, + title: '支架节点(斜支撑)', + message: '1、按图施工;2、焊接必须满焊;3、防腐防锈按要求施工。' + },{ + key:'componentImg2', + num:1, + title: '支架距照片(南北)', + message: '1、间距尺寸符合图施工;2、能够看清立柱南北间距尺寸。' + },{ + key:'componentImg3', + num:1, + title: '支架距照片(东西)', + message: '1、间距尺寸符合图施工;2、能够看清立柱东西间距尺寸。' + },{ + key:'componentImg4', + num:3, + title: '防风加固', + message: '1、横拉杆和背拉杆施工按图施工。' + },{ + key:'sizeMeasureImgs', + num:9, + title: '方管尺寸测量', + message: '1.三种方管尺寸均需测量(100*100/80*40/50*50)。' + }] + }, + { + title:'3.电气设备安装照片', + list:[{ + key:'totalImgs', + num:1, + title: '并网箱、逆变器外部安装照片、接地引下线', + message: '1、墙面安装底部高度不小于1.8米;2、建议安装高度2 米。3、方位角在150-300 之间必须安装遮阳棚。4、周边是否存在易燃易爆物品。' + },{ + key:'bwInnerImg', + num:1, + title: '并网箱内部整体照片', + message: '1、线鼻是否压接;2、防火封堵完整;3、线缆线皮包扎。' + },{ + key:'dqsbAnImgOne', + num:1, + title: '直流线缆保护', + message: '1、直流电缆穿管保护;2、管口需使用防火泥封堵。' + },{ + key:'dqsbAnImgTwo', + num:1, + title: '直流线缆固定', + message: '1、直流电缆走线横平竖直;2、直流电缆绑住需使用包塑扎丝固定。' + }], + }, + { + title:'4.接地系统照片', + list:[{ + key:'zujianJdImg', + num:1, + title: '组件边框接地', + message: '1.组件边框接地可靠' + },{ + key:'zjJdImgs', + num:2, + title: '引下线与支架连接点、南北坡接地连接点', + message: '1、焊接倍数满足要求,建议10cm;2、焊接满焊;3、防腐防锈施工完成。' + },{ + key:'groundResistanceImgs', + num:2, + title: '接地电阻', + message: '1、电气接地小于4Ω;2、支架接地小于10Ω;3、共用接地小于4Ω。' + }] + }, + { + title:'5.调试记录照片', + list:[{ + key:'openWayVoltageImgs', + num:6, + title: '开路电压', + message: '1、组串号按图施工;2、需要测量每一路开路电压;3、开路电压测量时能够看清楚号码线管;4、第一张照片需附逆变器下MPPT插入照片。' + }] + }, + { + title:'6.方阵安装完毕整体照片', + list:[{ + key:'directionAirImg1', + num:1, + title: '东向西航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg2', + num:1, + title: '西向东航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg3', + num:1, + title: '南向北航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'directionAirImg4', + num:1, + title: '北向南航拍', + message: '1、无遮挡;2、组件无污染或破损;3、组件边框距离檩条端头不少于6cm。' + },{ + key:'zjNearImg', + num:1, + title: '组件近景', + message: '1、无遮挡;2、无异物、无划伤' + },{ + key:'zjAngleImg', + num:1, + title: '组件角度', + message: '1、组件角度和图纸一致。' + },{ + key:'zjItemImg', + num:1, + title: '檩条出组件照片', + message: '1、檩条末端预留安全长度不小于6cm;2、照片需要测量尺寸。' + },{ + key:'waterChannelImg', + num:1, + title: '水槽照片', + message: '1、水槽清晰可见。' + },{ + key:'mediumFixImg', + num:1, + title: '中压固定照片', + message: '1、压块固定牢固跟图纸要求一致。' + },{ + key:'safetyWarningImg', + num:1, + title: '安全警示牌', + message: '1、在上人位置悬挂安全警示牌。' + },{ + key:'safetyDiscloseDocImg', + num:1, + title: '现场安全交底文件', + message: '1、现场交底记录必须现场签字;2、签字人数跟现场影像照片一致。3、交底人跟被交底人不允许为同一人。' + },{ + key:'discloseDocImg', + num:1, + title: '现场交底照片', + message: '1、安全帽佩戴正确;2、帽带必须戴好;3、涉及高空作业人员佩戴安全带和防坠器、防滑鞋;4、反光背心穿戴整齐。' + },{ + key:'recordDocImg', + num:1, + title: '记录表', + message: '1、是否全部认真检查,检查结果是否合格;2、结论是否手签,检查人签字等。' + }] + }, + //并网 + { + title:'并网', + list:[{ + key:'yxImg', + num:1, + title:'电站运行信息', + message: '监控后台逆变器连续三天的日发电量截图' + },{ + key:'gebImg', + num:1, + title: '补充图片', + message: '其他细节照片可根据需要自行增加' + }] + }, + ], + // 安装 + photo: { + //1.设备信息照片 + nbqPlateImg: [],//逆变器序列号照片,逆变器1铭牌照片 + txPlateImg: [],//逆变器通讯棒照片,通讯棒1铭牌照 + zjPlateImg: [],//组件铭牌照片 + zjSnImgs:[],//组件SN,1-4张---- + //2.支架及组件安装照片 + zjImg1: [],//膨胀螺栓 + zjImg2: [],//基座安装固定 + zjImg3: [],//底座防水 + zjImg4: [],//支架基础距离房檐的距离 + zjImg5: [],//支架东向西拍摄 + zjImg6: [],//支架西向东拍摄--- + zjImg7: [],//支架南向北拍摄--- + zjImg8: [],//支架北向南拍摄--- + zjImg9: [],//支架角度---- + componentImg1: [],//支架节点(斜支撑) + componentImg2: [],//支架距照片(南北) + componentImg3: [],//支架距照片(东西) + componentImg4: [],//防风加固,1-3张 + sizeMeasureImgs: [],//方管尺寸测量---,9张 + //3.电气设备安装照片 + totalImgs: [],//并网箱、逆变器外部安装照片、接地引下线,逆变器、并网箱整体安装照片, 存在字段名逆变器和并网箱接地照 + bwInnerImg: [],//并网箱内部整体照片 + dqsbAnImgOne: [],//直流线缆保护 + dqsbAnImgTwo: [],//直流线缆固定 + //4.接地系统照片 + zjJdImgs: [],//引下线与支架连接点、南北坡接地连接点,2张---- + groundResistanceImgs: [],//接地电阻,1-2张----- + zujianJdImg: [],//组件边框接地 + //5.调试记录照片 + openWayVoltageImgs: [],//开路电压,1-6张----- + //6.方阵安装完毕整体照片 + directionAirImg1: [],//东向西航拍---- + directionAirImg2: [],//西向东航拍---- + directionAirImg3: [],//南向北航拍---- + directionAirImg4: [],//北向南航拍---- + zjNearImg: [],//组件近景---- + zjAngleImg: [],//组件角度---- + zjItemImg: [],//檩条出组件照片---- + waterChannelImg: [],//水槽照片---- + mediumFixImg: [],//中压固定照片---- + safetyWarningImg: [],//安全警示牌---- + safetyDiscloseDocImg: [],//现场安全交底文件---- + discloseDocImg: [],//现场交底照片---- + recordDocImg: [],//记录表---- + }, + }, + + onLoad(options) { + this.setData({ + entryId: options.projectId, + status: options.status, //5是安装,7是并网 + }); + wx.setNavigationBarTitle({ + title: options.status == '5' ? '安装验收' : '并网验收', + }) + this.entryDetail() + }, + + + + /** + * + * 获取电站详情 + * + * @param {*} e + */ + entryDetail(e) { + entryDetail({ + userId: wx.getStorageSync('userId'), + entryId: this.data.entryId, + }).then((res) => { + this.setData({ + detail: res, + 'data.projectId': res.project_id, + 'data.projectCode': res.projectCode, + 'data.projectName': res.projectName, + 'data.powerStationCode': res.power_station_code, + 'data.name': res.tenant_name, + 'data.traderName': res.create_trader_name, + 'data.traderTel': res.traderTel, + 'data.phone': res.mobile, + 'data.idCard': res.id_code, + 'data.region': res.province + res.city + res.area + res.address, + 'data.scheme': res.scheme_type == 1 ? "标准方案" : "组合方案", + 'data.generatorNo': res.generator_no, //发电户号 + 'data.provinceCodeName': res.province_code_name, //电力公司 + 'data.code': res.province_code, //发电户号 + 'data.bankName': res.bank_name,//开户银行 + 'data.bankCode': res.bank_code,//银行账号 + 'data.powerName': res.powerName,//项目名称 + 'data.zujBrand': res.map.zujBrand,//组件品牌 + }); + if(res.report){ + this.setData({ + //并网图片显示 + // [`bwPhoto.gebImg[0].url`]: res.report.gebImg ? this.data.IMG_BASE_URL + res.report.gebImg : this.data.noneImg, + // [`bwPhoto.yxImg[0].url`]: res.report.yxImg ? this.data.IMG_BASE_URL + res.report.yxImg : this.data.noneImg, + [`photo.dbImgs[0].url`]:res.report.dbImgs ? IMG_BASE_URL + res.report.dbImgs : WU_TU_PIAN_URL,//电表图片 + [`photo.yxImg[0].url`]:res.report.yxImg ? IMG_BASE_URL + res.report.yxImg : WU_TU_PIAN_URL,//电站运行信息 + [`photo.gebImg[0].url`]:res.report.gebImg ? IMG_BASE_URL + res.report.gebImg2 : WU_TU_PIAN_URL,//补充信息 + [`photo.gebImg2[0].url`]:res.report.gebImg2 ? IMG_BASE_URL + res.report.gebImg2 : WU_TU_PIAN_URL,//补充信息2 + }) + } + + + // if (res.sn) { + // var snList = res.sn.split(",") + // this.setData({ + // snList: snList + // }) + // } + + // if (res.nbq_sn) { + // var nbqSnList = res.nbq_sn.split(",") + // this.setData({ + // nbqSnList: nbqSnList, + // }) + // } + + if (res.report) { + for(let i in this.data.photo){ + if(res.report[i]){ + let arr = res.report[i].split(","),arr2=[]; + arr.forEach(itm=>{ + arr2.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.${i}`]: arr2, + }); + }else{ + this.setData({ + [`photo.${i}`]: [{name:'',url:this.data.noneImg}], + }); + } + } + } + //重新赋值,传给子组件 + const photoList = JSON.parse(JSON.stringify(this.data.photo)) + this.setData({ + photoList + }) + // this.getActualCapacity() + // this.getProviceCodeList() + }) + }, + + /** + * + * 查询安装组件信息 + * + * @param {*} e + */ + getActualCapacity(e) { + getActualCapacity({ + entryId: this.data.entryId, + }).then((res) => { + const data = JSON.parse(res.data) + this.setData({ + component: data.columns + }) + }) + }, + + /** + * + * 查看注意方案 + * + * @param {*} e + */ + viewNote(e) { + const type = e.currentTarget.dataset.type + let title = this.data.photoTips[type].title + let message = this.data.photoTips[type].message + + Dialog.alert({ + title: title, + message: message, + theme: 'round-button', + }).then(() => { + + }); + }, + /** + * 提交 + */ + passFn(e) { + let type = e.currentTarget.dataset.type, txt = '', status = this.data.status; + if(type == '2'){ + //并网 + if (!this.data.fixConclusion) { + wx.showToast({ + title: '请输入不通过验收意见', + icon: 'none' + }) + return + } + //安装 + // if (!this.data.fixConclusionSh && status == '5') { + // wx.showToast({ + // title: '请输入不通过审核意见', + // icon: 'none' + // }) + // return + // } + txt = '不通过成功'; + }else{ + // if (this.data.powerCapacityUrl.length == 0) { + // wx.showToast({ + // title: '请上传近3天发电量', + // icon: 'none' + // }) + // return + // } + if (!this.data.gridCheck) { + wx.showToast({ + title: '审核通过需物料并网完成', + icon: 'none' + }) + return + } + txt = '通过成功'; + } + // console.log("执行7", this.data.fixConclusion); + // console.log("执行5", this.data.fixConclusionSh); + // return + wx.showLoading({ + title: "提交中" + }); + // if(status == '7'){ + twoMergeAcceptRefuse({ + id: this.data.entryId, + type:type,//1.通过 2.驳回 + fixConclusion: this.data.fixConclusion ? this.data.fixConclusion : "", + powerCapacityUrl: this.data.powerCapacityUrl.length>0?this.data.powerCapacityUrl[0].url:'', + materialMergeFlag: this.data.gridCheck?'1':'0', + userId: wx.getStorageSync('userId') + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + wx.showToast({ + title: txt, + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + icon: 'none', + title: res.msg || res.errMsg, + }) + } + }) + //}else if(status == '5'){ + // toNetAccept({ + // id: this.data.entryId, + // type:type,//1.通过 2.驳回 + // fixConclusionSh: this.data.fixConclusionSh ? this.data.fixConclusionSh : "", + // userId: wx.getStorageSync('userId') + // }).then((res) => { + // wx.hideLoading() + // if (res.code == 200) { + // wx.showToast({ + // title: txt, + // icon: 'none', + // success: function () { + // setTimeout(function () { + // wx.navigateBack() + // }, 1500) + // } + // }) + // } else { + // wx.showToast({ + // title: res.msg || res.errMsg, + // icon: res.code + // }) + // } + // }) + // } + }, + /** + * + * 上传图片 + * + * @param {*} e + */ + afteruploadPhotoRead(e) { + const type = e.currentTarget.dataset.type + const name = e.currentTarget.dataset.name + const { + file + } = e.detail; + const img = file.url; + wx.showLoading({ + title: '上传中', + }) + var that = this + wx.uploadFile({ + url: that.data.API_BASE_URL + 'common/weChat/uploadImage', + filePath: file.url, + name: 'file', + complete: function (res) { + console.log("上传图片", res) + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none', + }) + var item = { + url: "", + name: "", + } + item.url = img; + item.name = res.data; + that.data.powerCapacityUrl.push(item) + that.setData({ + powerCapacityUrl: that.data.powerCapacityUrl + }) + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + /** 删除图片 **/ + deleteImg(e) { + this.setData({ + powerCapacityUrl: [] + }) + }, + //并网已完成 + onChangeGrid(e){ + this.setData({ + gridCheck: e.detail, + }); + }, + //查看发电量 + goLink(){ + wx.navigateTo({ + url: '/home/pages/3days/3days?id=' + this.data.detail.entry_id + }) + } +}) \ No newline at end of file diff --git a/home/pages/acceptanceBW/acceptanceBW.json b/home/pages/acceptanceBW/acceptanceBW.json new file mode 100644 index 0000000..324b339 --- /dev/null +++ b/home/pages/acceptanceBW/acceptanceBW.json @@ -0,0 +1,13 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index", + "van-dialog": "@vant/weapp/dialog/index", + "finish": "/home/components/finish/finish", + "install": "/home/components/install/install", + "survey": "/home/components/survey/survey", + "userInfo": "/home/components/userInfo/userInfo", + "onGrid": "/home/components/onGrid/onGrid", + "van-checkbox": "@vant/weapp/checkbox/index" + }, + "navigationBarTitleText": "并网验收" +} \ No newline at end of file diff --git a/home/pages/acceptanceBW/acceptanceBW.wxml b/home/pages/acceptanceBW/acceptanceBW.wxml new file mode 100644 index 0000000..5df6028 --- /dev/null +++ b/home/pages/acceptanceBW/acceptanceBW.wxml @@ -0,0 +1,43 @@ + + + + 并网信息 + + + + + + + + + + + 物料并网完成状态 + + 并网已完成 + + + + + 验收意见 + + + + + + + + + + 不通过 + 通过 + + + \ No newline at end of file diff --git a/home/pages/acceptanceBW/acceptanceBW.wxss b/home/pages/acceptanceBW/acceptanceBW.wxss new file mode 100644 index 0000000..a590776 --- /dev/null +++ b/home/pages/acceptanceBW/acceptanceBW.wxss @@ -0,0 +1,43 @@ +/* home/pages/acceptanceBW/acceptanceBW.wxss */ +@import "/home/pages/acceptance/acceptance.wxss"; + +.content-address { + display: flex; + flex-direction: column; + flex: 1; +} +.content-picker { + display: flex; + flex-direction: row; +} +.content-img-right { + width: 50rpx; + height: 50rpx; +} +.content-text { + flex: 1; +} + +.content-text-gray { + color: gray; +} + +.from-submit-buttom-cancle { + width: 250rpx; + height: 80rpx; + background-color: #ffffff; + display: flex; + align-items: center; + justify-content: center; +} + +.from-submit-buttom-confirm { + width: 500rpx; + height: 80rpx; + background-color: #0a6597; + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; +} +.txt-blue{ color: blue;} \ No newline at end of file diff --git a/home/pages/bankCardDetail/bankCardDetail.js b/home/pages/bankCardDetail/bankCardDetail.js new file mode 100644 index 0000000..dd499c3 --- /dev/null +++ b/home/pages/bankCardDetail/bankCardDetail.js @@ -0,0 +1,83 @@ +// home/pages/bankCardDetail/bankCardDetail.js +const { + bankCardDetail, + IMG_BASE_URL, + WU_TU_PIAN_URL, +} = require('../../../api/api') +Page({ + data: { + detail:{}, + backF:"https://nhet.oss-cn-shanghai.aliyuncs.com/static/img/bank_card_front.png", + backB:"https://nhet.oss-cn-shanghai.aliyuncs.com/static/img/bank_card_back.png", + }, + onLoad(options) { + this.data.idCard = options.idCard; + this.data.managementType = options.managementType; + this.initData(); + }, + //详情数据 + initData(){ + bankCardDetail({ + idCard: this.data.idCard, + managementType: this.data.managementType, + partnerId: wx.getStorageSync('capitalId') + }).then(res=>{ + this.setData({ + detail:res.data, + code1:res.data.accountCode.slice(0,4), + code2:res.data.accountCode.slice(4,8), + code3:res.data.accountCode.slice(8,12), + code4:res.data.accountCode.slice(12,16), + code5:res.data.accountCode.slice(16), + }); + }); + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/home/pages/bankCardDetail/bankCardDetail.json b/home/pages/bankCardDetail/bankCardDetail.json new file mode 100644 index 0000000..ba94837 --- /dev/null +++ b/home/pages/bankCardDetail/bankCardDetail.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "van-image": "@vant/weapp/image/index" + }, + "navigationBarTitleText": "二类卡信息" +} \ No newline at end of file diff --git a/home/pages/bankCardDetail/bankCardDetail.wxml b/home/pages/bankCardDetail/bankCardDetail.wxml new file mode 100644 index 0000000..26909ed --- /dev/null +++ b/home/pages/bankCardDetail/bankCardDetail.wxml @@ -0,0 +1,41 @@ + + + + 姓名 + {{detail.name}} + + + + 身份证号 + {{detail.idCode}} + + + + 开户行 + {{detail.bankName }} + + + + 开户联行号 + {{detail.tssBankNum }} + + + + 卡号 + {{detail.accountCode }} + + + + + + + {{code1}} + {{code2}} + {{code3}} + {{code4}} + {{code5}} + + + + + \ No newline at end of file diff --git a/home/pages/bankCardDetail/bankCardDetail.wxss b/home/pages/bankCardDetail/bankCardDetail.wxss new file mode 100644 index 0000000..f15df82 --- /dev/null +++ b/home/pages/bankCardDetail/bankCardDetail.wxss @@ -0,0 +1,6 @@ +/* home/pages/bankCardDetail/bankCardDetail.wxss */ +@import "/home/pages/entryInfoDetails/entryInfoDetails.wxss"; +.bank-img{padding: 40rpx 0; text-align: center;} +.bankF{position:relative;} +.bankF .code{position: absolute; top: 45%; left: 50%; transform: translate(-50%,0); font-size: 38rpx; color: #000; font-weight: 600; word-break: initial;} +.bankF .code text{margin: 0 8rpx;} \ No newline at end of file diff --git a/home/pages/bwForm/bwForm.js b/home/pages/bwForm/bwForm.js new file mode 100644 index 0000000..0e2dfac --- /dev/null +++ b/home/pages/bwForm/bwForm.js @@ -0,0 +1,724 @@ +const { + API_BASE_URL, + IMG_BASE_URL, + entryDetail, + getProviceCodeList, + accept,getFormSet,addUserInfo,mergeTmp +} = require('../../../api/api') +import Dialog from '@vant/weapp/dialog/dialog'; +const SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g +const camelCase = function (name) { + // - 是 match,separator 是 p1,letter 是 p2 + return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) { + return offset ? letter.toUpperCase() : letter + }) +} +function dateStr (date){ + let year = date.slice(0,4); + let month = date.slice(4,6); + let day = date.slice(6); + return year+'/'+month+'/'+day; +} +Page({ + data: { + projectId:'',//电站id + detail:{},//详情信息 + params:{ + bwInstitution: '0', //0是国网,1是南网 + powerPlantCode: '', //电厂编码 + addressConsistent: 'Y', // 购售电地址是否一致 Y:是、N:否 + province: "", //省 + city: "", //市 + area: "", //区 + address: "", //详细地址 + generatorNo:'',//发电户号 + powerCompanyName:'',//国网电力公司名称 + provinceCodeHand:'',//南网电力公司名称 + provinceCode:'',//电力公司编码 + yxImg:[],//电站运行信息照片 + gebImg:[],//补充照片 + gebImg2: [],//补充照片2 + dbImgs: [],//电表图片 + dbxImgs: [],//电表箱图片 + tlzhjkImgs: [], //铜铝转换接头照片 + powerCapacityUrl: [], //3日发电量 + archivesImg: [], //三户档案截图 + contractFile: [],//购售电合同 + contractVideoUrl: [], //购售电合同视频 + otherAttachment: [],//资方审查补充资料 + "insurance": { + // "id": '',//保险单id + // "entryId": '',//电站id + "insuranceTypeName":'财产险', + "insuranceType": "1",//目前只支持财产险 + // "insuranceDateFrom": '',//保险开始日期 + // "insuranceDateTo": '',//保险结束日期 + // "insuranceCompany": '',//保险公司 + // "insuranceNumber": '',//保险编号 + // "insuranceAmount": '',//保险金额 + // "firstBeneficiary": '',//第一受益人 + // "insurancePolicy": '',//保险单 + "bwtsFile":'',//并网调试报告 + },//保险 + },//提交参数 + showRegion:false,//省市区对话框 + powerCompanyList:[],//电力公司列表 + insuranceTypeList:[{ + name:'财产险', + value:'1' + }],//保险类型列表 + dateShow:false,//日期区间对话框 + formSetObj: {},//自定义字段 + }, + async onLoad(options) { + this.setData({ + projectId:options.projectId + }); + await this.getProviceCodeList(); + this.initData(); + }, + onReady() { + + }, + onShow() { + + }, + /** 获取自定义字段 */ + getFormSet(partner) { + getFormSet({ + stage: '04', //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网 + partner: partner, + }).then((res) => { + this.setData({ + formSetObj: res.data.columns + }) + }) + }, + /** 数据 **/ + initData(){ + wx.showLoading({ + title: "加载中" + }); + entryDetail({ + userId: wx.getStorageSync('userId'), + entryId: this.data.projectId + }).then(res=>{ + let obj = {}; + for(let i in res){ + let j = camelCase(i); + obj[j]=res[i]; + } + if(res.insurance){ + for(let i in res.insurance){ + let j = camelCase(i); + obj.insurance[j]=res.insurance[i]; + } + } + // console.log("执行",obj); + wx.hideLoading(); + for(let i in this.data.params){ + if(obj[i]){ + if(i=='insurance'){ + continue; + } + if(obj.addressConsistent=='Y'&&(i=='province'||i=='city'||i=='area'||i=='address')){ + this.data.params[i]=''; + continue; + } + this.data.params[i]=obj[i]; + } + } + for(let i in this.data.params.insurance){ + if(obj.insurance&&obj.insurance[i]){ + this.data.params.insurance[i]=obj.insurance[i]; + } + } + if(this.data.powerCompanyList.find(itm=>itm.code==this.data.params.provinceCode)){ + this.data.params.powerCompanyName=this.data.powerCompanyList.find(itm=>itm.code==this.data.params.provinceCode).power_company; + } + if(this.data.params.insurance){ + // this.data.params.insurance.insuranceTypeName=this.data.insuranceTypeList.find(itm=>itm.value==this.data.params.insurance.insuranceType).name; + // this.data.params.insurance.insuranceDateFrom=dateStr(this.data.params.insurance.insuranceDateFrom); + // this.data.params.insurance.insuranceDateTo=dateStr(this.data.params.insurance.insuranceDateTo); + } + if (res.report) { + if (res.report.gebImg) { + this.setData({ + [`params.gebImg[0].name`]: res.report.gebImg, + [`params.gebImg[0].url`]: IMG_BASE_URL + res.report.gebImg, + }) + } + if (res.report.gebImg2) { + this.setData({ + [`params.gebImg2[0].name`]: res.report.gebImg2, + [`params.gebImg2[0].url`]: IMG_BASE_URL + res.report.gebImg2, + }) + } + if (res.report.dbImgs) { + this.setData({ + [`params.dbImgs[0].name`]: res.report.dbImgs, + [`params.dbImgs[0].url`]: IMG_BASE_URL + res.report.dbImgs, + }) + } + if (res.report.dbxImgs) { + this.setData({ + [`params.dbxImgs[0].name`]: res.report.dbxImgs, + [`params.dbxImgs[0].url`]: IMG_BASE_URL + res.report.dbxImgs, + }) + } + if (res.report.tlzhjkImgs) { + this.setData({ + [`params.tlzhjkImgs[0].name`]: res.report.tlzhjkImgs, + [`params.tlzhjkImgs[0].url`]: IMG_BASE_URL + res.report.tlzhjkImgs, + }) + } + if (res.report.archivesImg) { + this.setData({ + [`params.archivesImg[0].name`]: res.report.archivesImg, + [`params.archivesImg[0].url`]: IMG_BASE_URL + res.report.archivesImg, + }) + } + if (res.report.powerCapacityUrl) { + this.setData({ + [`params.powerCapacityUrl[0].name`]: res.report.powerCapacityUrl, + [`params.powerCapacityUrl[0].url`]: IMG_BASE_URL + res.report.powerCapacityUrl, + }) + } + if (res.report.yxImg) { + this.setData({ + [`params.yxImg[0].name`]: res.report.yxImg, + [`params.yxImg[0].url`]: IMG_BASE_URL + res.report.yxImg, + }) + } + } + if (res.contract) {//合同文件 + this.setData({ + [`params.contractFile`]:res.contract ? res.contract.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}], + }) + } + if (res.other_attachment) {//补充资料 + this.setData({ + [`params.otherAttachment`]:res.other_attachment ? res.other_attachment.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}], + }) + } + if (res.contract_video_url) {//合同视频 + this.setData({ + [`params.contractVideoUrl`]:res.contract_video_url ? res.contract_video_url.split(",").map(itm=>{return {name:itm, url:IMG_BASE_URL + itm}}) : [{url:WU_TU_PIAN_URL}], + }) + } + this.data.params.province = res.electric_province + this.data.params.city = res.electric_city + this.data.params.area = res.electric_area + this.data.params.address = res.electric_address + this.data.params.bwInstitution = res.grid_institution + this.setData({ + detail:res, + params:this.data.params, + address:this.data.params.address, + generatorNo:this.data.params.generatorNo, + provinceCodeHand:this.data.params.provinceCodeHand, + powerPlantCode:this.data.params.powerPlantCode, + insuranceCompany:this.data.params.insurance.insuranceCompany, + firstBeneficiary:this.data.params.insurance.firstBeneficiary, + insuranceNumber:this.data.params.insurance.insuranceNumber, + insuranceAmount:this.data.params.insurance.insuranceAmount, + }); + this.getFormSet(res.management) + }); + }, + /** 获取电力公司 **/ + getProviceCodeList(e) { + getProviceCodeList({}).then((res) => { + if (res.code == 200) { + let list = res.data.map(itm=>itm.columns); + this.setData({ + powerCompanyList: list + }) + } + }) + }, + /** 业主信息 **/ + userFn(e){ + wx.navigateTo({ + url: '/home/pages/ownerForm/ownerForm?projectId=' + this.data.projectId + '&type=16', + }) + }, + /** 购售电地址是否一致 **/ + radioChangeAddress(e) { + this.setData({ + [`params.addressConsistent`]: e.detail.value, + [`params.province`]: '', + [`params.city`]: '', + [`params.area`]: '', + [`params.address`]: "" + }) + }, + /** 并网机构 **/ + radioChangeType(e) { + this.setData({ + [`params.bwInstitution`]: e.detail.value, + }) + }, + /** 打开省市区弹框 **/ + bindRegionChange(e) { + this.setData({ + showRegion: true + }) + }, + /** 选择的地址 **/ + chooseRegion(e) { + this.setData({ + [`params.province`]: e.detail.provinceName, + [`params.city`]: e.detail.cityName, + [`params.area`]: e.detail.areaName, + [`params.address`]: "" + }); + }, + /** 选择电力公司 **/ + bindpowerCompanyList(e) { + this.setData({ + [`params.powerCompanyName`]: this.data.powerCompanyList[e.detail.value].power_company, + [`params.provinceCode`]: this.data.powerCompanyList[e.detail.value].code + }) + }, + /** 查看图片注意方案 **/ + viewNote(e) { + let title = e.currentTarget.dataset.tit; + let message = e.currentTarget.dataset.msg; + Dialog.alert({ + title: title, + message: message, + theme: 'round-button', + }).then(() => { }); + }, + /** 上传图片 **/ + afteruploadPhotoRead(e) { + const { + file + } = e.detail; + const img = file.url; + wx.showLoading({ + title: '上传中', + }) + var that = this + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', + filePath: file.url, + name: 'file', + complete: function (res) { + // console.log("上传图片", res) + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none', + }) + var item = { + url: "", + name: "", + } + let type = e.currentTarget.dataset.type + item.url = img; + item.name = res.data; + that.data.params[type].push(item) + that.setData({ + [`params.${type}`]: that.data.params[type] + }) + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + /** 删除图片 **/ + deleteImg(e) { + // console.log("删除图片事件", e) + let index= e.detail.index; + let type = e.currentTarget.dataset.type + this.data.params[type].splice(index, 1); + this.setData({ + [`params.${type}`]: index > 0 ? this.data.params[type] : [] + }); + }, + /** 上传多张图片递归 **/ + afteruploadPhotoReadS(e, file, count, type) { + let ob = { + name: '', + url: '', + } + const name = e.currentTarget.dataset.name + wx.showLoading({ + title: '加载第' + (count + 1) + '张照片中', + mask: true, + }) + const element = file[count]; + var that = this; + var url = '' + if(type =='file'){ + //获取文件后缀 + let suffix = element.path.substring(element.path.lastIndexOf('.') + 1) + if (suffix.search(/jpg|png|jpeg|pdf/) == -1) { + wx.showToast({ + title: '只能上传jpg、png、jpeg、pdf文件', + icon: 'none' + }) + return + } + url = API_BASE_URL + 'common/uploadFile_Name?fileName='+ element.name + }else{ + url = API_BASE_URL + 'common/weChat/uploadImage' + } + wx.uploadFile({ + url: url, + filePath: type =='file'?element.path:element.tempFilePath, + name: 'file', + success(res) { + wx.hideLoading() + if (res.statusCode == 200) { + console.log(989898988, res) + count = count + 1; + // ob.name = res.data + ob.name = type =='file'?JSON.parse(res.data).path: res.data, + ob.url = type =='file'?JSON.parse(res.data).path:element.tempFilePath + that.data.params[name].push(ob); + that.setData({ + [`params.${name}`]: that.data.params[name] + }) + if (count == file.length) { + wx.showToast({ + title: '选择成功', + icon: 'none' + }) + } else { + that.afteruploadPhotoReadS(e, file, count, type) + } + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + /** 文件或图片上传选择-对话框 **/ + selectUplosd(e){ + var that = this; + let name = e.currentTarget.dataset.name; + let maxCount = e.currentTarget.dataset.count; + wx.showActionSheet({ + itemList: ['文件', '图片'], + success: function (res) { + if (!res.cancel) { + if (res.tapIndex == 0) {//文件 + that.upload(e, name); + } else if (res.tapIndex == 1) {//图片 + // console.log(6666666, maxCount) + wx.chooseMedia({ + count: Math.min(maxCount, 9), + mediaType: ['image','video'], + sourceType: ['album'], + success: function (rep) { + // console.log(98989, rep) + if (Array.isArray(rep.tempFiles)) { //多张 + var count = 0; + that.afteruploadPhotoReadS(e, rep.tempFiles, count) + return + } + wx.showLoading({ + title: '选择中', + }) + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', + filePath: rep.tempFiles[0].tempFilePath, + name: 'file', + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none', + }) + var item = { + url: "", + name: "", + } + item.url = rep.tempFiles[0].tempFilePath; + item.name = res.data; + that.data.params[name].push(item) + that.setData({ + [`params.${name}`]: that.data.params[name] + }) + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + fail: function(){}, + }); + } + } + } + }); + }, + /** 上传pdf或图片 **/ + upload(e) { + var that = this; + let params = e.currentTarget.dataset.params; + let name = e.currentTarget.dataset.name; + wx.chooseMessageFile({ + count: 1, + type: 'all', + success(res) { + //获取文件后缀 + // let suffix = res.tempFiles[0].path.substring(res.tempFiles[0].path.lastIndexOf('.') + 1) + // if (suffix.search(/jpg|png|jpeg|pdf|dwg/) == -1) { + // wx.showToast({ + // title: '只能上传jpg|png|jpeg|pdf|dwg文件或图片', + // icon: 'none' + // }) + // return + // } else { + wx.showLoading({ + title: '选择中', + }) + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', + filePath: res.tempFiles[0].path, + name: 'file', + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none' + }) + // let data = JSON.parse(res.data) + if(name =='contractFile' || name =='otherAttachment'){ + that.data.params[name].push({ + name: res.data, + url: IMG_BASE_URL + res.data + }); + that.setData({ + [`params.${name}`]: that.data.params[name] + }) + }else{ + that.setData({ + [`${params}`]: res.data + }) + } + } else { + wx.showToast({ + title: '选择失败', + icon: 'none' + }) + } + } + }) + // } + } + }) + }, + /** 选择保险类型 **/ + bindinsuranceTypeList(e){ + this.setData({ + [`params.insurance.insuranceTypeName`]: this.data.insuranceTypeList[e.detail.value].name, + [`params.insurance.insuranceType`]: this.data.insuranceTypeList[e.detail.value].value + }) + }, + /** 选择保险日期 **/ + dateFn(){ + this.setData({ dateShow: !this.data.dateShow }); + }, + /** 日期格式 **/ + formatDate(date) { + date = new Date(date); + const year = date.getFullYear() + const month = (date.getMonth() + 1) >9 ? (date.getMonth()+1) : '0'+(date.getMonth()+1) + const day = date.getDate() >9 ? date.getDate() : '0'+date.getDate() + return year+'/'+month+'/'+day; + }, + /** 确认选择日期区间 **/ + dateConfirm(e){ + const [start, end] = e.detail; + this.setData({ + [`params.insurance.insuranceDateFrom`]:this.formatDate(start), + [`params.insurance.insuranceDateTo`]:this.formatDate(end), + dateShow: false, + }); + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if(suffix=='mp4'){// 开始预览多媒体内容 + wx.previewMedia({ + sources: [{ + url :IMG_BASE_URL + path, + type: 'video' + }], // 需要预览的资源列表 + }); + }else if(suffix != 'jpg' && suffix != 'png' && suffix != 'gif' && suffix != 'jpeg') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + fileType: suffix, + showMenu: true, + success: function (res) {} + }) + } + }) + }else{ + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, + /** 提交表单 **/ + submitFrom(e){ + let type = e.currentTarget.dataset.type + let params = JSON.parse(JSON.stringify(this.data.params)); + for(let i in params){ + if(this.data[i]){ + params[i]=this.data[i]; + } + } + for(let i in params.insurance){ + if(this.data[i]){ + params.insurance[i]=this.data[i]; + } + } + let checkParams={...JSON.parse(JSON.stringify(params)),...JSON.parse(JSON.stringify(params.insurance))}; + console.log("checkParams",checkParams); + for(let i in checkParams){ + //购售地址一致时不需要填写地址信息 + if(params.addressConsistent=='Y' && (i=='province' || i=='city' || i=='area' || i=='address')){ + continue; + } + //并网照片 + // if(i=='gebImg'){ + // if(!params[i].length){ + // wx.showToast({ + // title: '请填写完表单必填项信息', + // icon: 'none' + // }); + // return + // } + // } + // if(!checkParams[i]){ + // wx.showToast({ + // title: '请填写完表单必填项信息', + // icon: 'none' + // }) + // return + // } + } + params.application= { + "entryId":this.data.projectId,//电站id + "resultType": 1,//提交 + "insurance":params.insurance,//保险 + } + params.entryId = this.data.projectId,//电站id + params.gebImg = params.gebImg.length>0?params.gebImg[0].name:''; + params.gebImg2 = params.gebImg2.length>0?params.gebImg2[0].name:''; + params.dbImgs = params.dbImgs.length>0?params.dbImgs[0].name:''; + params.dbxImgs = params.dbxImgs.length>0?params.dbxImgs[0].name:''; + params.tlzhjkImgs = params.tlzhjkImgs.length>0?params.tlzhjkImgs[0].name:''; + params.archivesImg = params.archivesImg.length>0?params.archivesImg[0].name:''; + params.powerCapacityUrl = params.powerCapacityUrl.length>0?params.powerCapacityUrl[0].name:''; + params.yxImg = params.yxImg.length>0?params.yxImg[0].name:''; + + params.contractFile = params.contractFile.length>0?params.contractFile.map(itm=>itm.name).join(","):'';//合同文件 + params.contractVideoUrl = params.contractVideoUrl.length>0?params.contractVideoUrl.map(itm=>itm.name).join(","):'';//合同视频 + params.otherAttachment = params.otherAttachment.length>0?params.otherAttachment.map(itm=>itm.name).join(","):'';//补充资料 + //地址处理 + params.electric_province = this.data.params.province; + params.electric_city = this.data.params.city; + params.electric_area = this.data.params.area; + params.electric_address = this.data.params.address; + + params.generatorNo = this.data.generatorNo; + params.powerPlantCode = this.data.powerPlantCode; + params.provinceCodeHand = this.data.provinceCodeHand; + params.isEmpower = 0; //是否国网授权 0:是 1:否 + + // params.insurance.insuranceDateFrom=params.insurance.insuranceDateFrom.split("/").join(""); + // params.insurance.insuranceDateTo=params.insurance.insuranceDateTo.split("/").join(""); + console.log("params",params); + // return; + if(type == '1'){//提交验收 + accept({ + userId: wx.getStorageSync('userId'), + addReportReq: params + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + // this.bindImport(this.data.detail.generator_no); //国网授权 + wx.showToast({ + title: '提交成功', + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + title: res.errMsg || res.msg, + icon: 'none' + }) + } + }); + }else{//国网授权 + mergeTmp({ + userId: wx.getStorageSync('userId'), + addReportReq: params + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + wx.showToast({ + title: '提交成功', + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + title: res.errMsg || res.msg, + icon: 'none' + }) + } + }); + } + }, + /** 国网授权 **/ + bindImport(powerid) { + addUserInfo({ + powerGenerationNo: powerid + }).then((resApi) => { + if (resApi.code == 200) { + console.log("授权成功") + } + }) + }, +}) \ No newline at end of file diff --git a/home/pages/bwForm/bwForm.json b/home/pages/bwForm/bwForm.json new file mode 100644 index 0000000..5162006 --- /dev/null +++ b/home/pages/bwForm/bwForm.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index", + "van-dialog": "@vant/weapp/dialog/index", + "van-calendar": "@vant/weapp/calendar/index", + "region":"../../../components/region/region", + "userInfo": "../../components/userInfo/userInfo" + }, + "navigationBarTitleText": "电站并网" +} \ No newline at end of file diff --git a/home/pages/bwForm/bwForm.wxml b/home/pages/bwForm/bwForm.wxml new file mode 100644 index 0000000..c54f91b --- /dev/null +++ b/home/pages/bwForm/bwForm.wxml @@ -0,0 +1,345 @@ + + + + + + + 电站编码 + {{detail.power_station_code}} + + + + 工程负责人 + {{detail.engineer_name}} + + + + 派工时间 + {{detail.dispatch_time}} + + + + 完工时间 + {{detail.install_time}} + + + + + + 并网信息 + + + * + 并网机构 + + + + + + * + * + 购售电地址是否一致 + + + + + + + + + + + * + * + 购售电地址 + + {{params.province}}{{params.city}}{{params.area}} + + + 请选择地址 + + + + + + * + + + + + + + + + + * + * + 发电户号 + + + + + + + * + * + 电表照片 + + + + + + + + + + + + * + * + 电表箱照片 + + + + + + + + + + + + * + * + 铜铝转换接头照片 + + + + + + + + + + + + + + * + * + 南网营销系统档案截图(三户) + + + + + + + + + + + + * + * + 三天连续发电量监控系统截图 + + + + + + + + + + + + + + + + * + * + 电力公司 + + {{params.powerCompanyName}} + + + 请选择电力公司 + + + + + + + + + + + + * + * + 电力公司 + + + + + + + * + * + 电厂编码 + + + + + + + * + 并网照片 + + + + + * + 近3天发电量 + + + + + + + + + + * + 补充信息 + + + + + + + + + + + 补充信息2 + + + + + + + + + + + + + * + * + 购售电合同 + 上传 + + + + + {{util.formartFileName(child.name)}} + 删除 + + + + + + + * + * + 购售电合同视频 + + + + + + + + + + + + * + * + 并网调试报告 + {{params.insurance.bwtsFile?"已上传,点击可重新上传":"上传"}} + + + + + + * + * + 资方审查补充资料(1-10) + 上传 + + + + {{util.formartFileName(child.name)}} + 删除 + + + + + + + + + + + + + + + + 提交国网授权 + 提交验收 + + + + + + + + + \ No newline at end of file diff --git a/home/pages/bwForm/bwForm.wxss b/home/pages/bwForm/bwForm.wxss new file mode 100644 index 0000000..adeb6b5 --- /dev/null +++ b/home/pages/bwForm/bwForm.wxss @@ -0,0 +1,81 @@ +@import "/home/pages/entryInfoBT/entryInfoBT.wxss"; +.content-title-item{width: 168rpx;} +.user-box{ + background-color: #fffdfc; + border-radius: 20rpx; + border: solid 2rpx #0a6597; + padding: 4rpx 30rpx; + margin: 20rpx; +} +.user-list{ + display: flex; + align-items: center; + margin: 26rpx 0; +} +.user-list .bt{ + font-size: 28rpx; + width: 170rpx; +} +.user-list .bd{ + flex: 1; +} +.user-list .tag{ + display: inline-block; + height: 48rpx; + background-color: #0a6597; + border-radius: 10rpx; + font-size: 24rpx; + color: #fff; + line-height: 48rpx; + text-align: center; + padding: 0 20rpx; +} +.user-list .tel{ + font-size: 26rpx; + color: #333; +} +.user-list .tel image{ + width: 23rpx; + height: 30rpx; + vertical-align: middle; +} +.content-inputs{ + margin-left: 187rpx; +} +.content-img-box { + display: flex; + flex-wrap: wrap; + align-items: stretch; +} +.content-img-name { + display: flex; + flex-direction: column; + align-items: flex-start; + /* width: calc(50% - 10rpx); */ + justify-content: space-between; + margin:0 7rpx 0 0; +} +.content-attention-text { + font-size: 24rpx; + display: flex; + padding: 10rpx 0rpx 0rpx 0rpx; + align-items: flex-start; + line-height: 30rpx; +} +.content-red { + margin-right: 10rpx; + color: red; +} +.content-attention-showText { + display: flex; +} +.content-attention { + width: 44rpx; + height: 44rpx; + flex-shrink: 0; + transform: translate(0,-8rpx); +} + +.content-img-name .van-uploader__upload { + margin-right: 6rpx !important; +} \ No newline at end of file diff --git a/home/pages/completion/completion.js b/home/pages/completion/completion.js new file mode 100644 index 0000000..54d95cb --- /dev/null +++ b/home/pages/completion/completion.js @@ -0,0 +1,1891 @@ +// pages/completion/completion.js +const { + entryDetail, + API_BASE_URL, + install, + getActualCapacity, + accept, + IMG_BASE_URL, + installZc, + DEV, + getProviceCodeList, + createQrcode,getFormSet,findTypeReferenceListNew +} = require('../../../api/api') +const utilAddWatermark = require('../../../utils/addWatermark') +const utilGetLocation = require('../../../utils/getLocation') +import Dialog from '@vant/weapp/dialog/dialog'; +Page({ + data: { + IMG_BASE_URL: IMG_BASE_URL, + capture: ['album','camera'], + canvasHeight: 0, + canvasWidth: 0, + changeAddressType: 1, //默认购售电地址一致 + DEV: DEV, + DEVACCOUNT: wx.getStorageSync('loginName'), + completeEnable: false, //完工按钮是否可以点击,默认false不可点击 + //安装 + photoTips: [ + { + sampleGraph: '', + showKey: 'safety_warning_img2', + must: '0', + status: '0', + key:'safetyWarningImg2', + num: 15, + title: '三级安全教育卡', + message: '' + },{ + sampleGraph: '', + showKey: 'kg_condition_files', + must: '0', + status: '0', + key:'kgConditionFiles', + num: 15, + min: 1, + title: '安全防护措施合照照片', + message: '' + }, + //华融 + { + sampleGraph: '', + showKey: 'other_imgs5', + must: '0', + status: '0', + key:'otherImgs5', + num: 15, + title: '水槽细节照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs6', + must: '0', + status: '0', + key:'otherImgs6', + num: 15, + title: '落水管照片', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs7', + must: '0', + status: '0', + key:'otherImgs7', + num: 15, + title: '假梁-斜梁方向', + message: '' + },{ + sampleGraph: '', + showKey: 'other_imgs8', + must: '0', + status: '0', + key:'otherImgs8', + num: 15, + title: '并网箱逆变器防雨罩照片', + message: '' + }, + //广发 + { + sampleGraph: '', + showKey: 'safety_warning_img2_03', + must: '0', + status: '0', + key:'safetyWarningImg2', + num: 15, + title: '施工安全图-三级安全教育', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img3', + must: '0', + status: '0', + key:'safetyWarningImg3', + num: 15, + title: '施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋)', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_warning_img', + must: '0', + status: '0', + key:'safetyWarningImg', + num: 15, + title: '施工安全图-安全警示牌', + message: '' + },{ + sampleGraph: '', + showKey: 'safety_disclose_doc_img', + must: '0', + status: '0', + key:'safetyDiscloseDocImg', + num: 15, + title: '施工安全图-安全技术交底书', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img10', + must: '0', + status: '0', + key:'zjImg10', + num: 9, + min: 3, + title: '基础安装-螺栓孔洞防水图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img11', + must: '0', + status: '0', + key:'zjImg11', + num: 15, + title: '基础安装-柱脚防水完工图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5_03', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '支架安装图-支架安装完成VR图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img8', + must: '0', + status: '0', + key:'zjImg8', + num: 15, + title: '支架安装图-支架方阵(东向西完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img9', + must: '0', + status: '0', + key:'zjImg9', + num: 15, + title: '支架安装图-支架方阵(北向南完工照)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4_03', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架安装图-立柱东西间距、南北间距(带尺寸)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img12', + must: '0', + status: '0', + key:'zjImg12', + num: 15, + title: '支架安装图-斜梁悬挑(南)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img13', + must: '0', + status: '0', + key:'zjImg13', + num: 15, + title: '支架安装图-斜梁悬挑(北)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img14', + must: '0', + status: '0', + key:'zjImg14', + num: 15, + title: '支架安装图-檀条悬挑(东)', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img15', + must: '0', + status: '0', + key:'zjImg15', + num: 15, + title: '支架安装图-檀条悬挑(西)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4_03', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '支架接地图-支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img3', + must: '0', + status: '0', + key:'componentImg3', + num: 15, + title: '组件航拍俯视照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img4', + must: '0', + status: '0', + key:'componentImg4', + num: 15, + title: '组件安装完成VR视图', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img1', + must: '0', + status: '0', + key:'bkImg1', + num: 15, + title: '边框接地图-边框与边框接地', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1_03', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '边框接地图-组件安装倾角', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img2', + must: '0', + status: '0', + key:'bkImg2', + num: 15, + title: '边框接地图-边框与支架接地', + message: '' + },{ + sampleGraph: '', + showKey: 'bk_img3', + must: '0', + status: '0', + key:'bkImg3', + num: 15, + title: '边框接地图-其他图片', + message: '' + },{ + sampleGraph: '', + showKey: 'yk_img1', + must: '0', + status: '0', + key:'ykImg1', + num: 15, + title: '压块或背压板照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs_03', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装图-整体外观及走线及采集器(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img_03', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器安装图-铭牌', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs_03', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zlc_img', + must: '0', + status: '0', + key:'nbqZlcImg', + num: 15, + title: '逆变器安装图-逆变器交流侧', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs_03', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '逆变器安装图-组串开路电压照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img_03', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱安装图-外观及走线(离地高度)', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img_03', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱安装图-并网箱内部全景', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_jd_img', + must: '0', + status: '0', + key:'bwJdImg', + num: 15, + title: '并网箱安装图-接地情况', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img_03', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆走向(屋顶、下墙)、线缆保护管(或桥架)敷设及固定照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs_03', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '电缆桥架内部电缆照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img8', + must: '0', + status: '0', + key:'jdImg8', + num: 15, + title: '接地极图-并网箱、逆变器安装接地极', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5_03', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '接地极图-支架接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img11', + must: '0', + status: '0', + key:'jdImg11', + num: 15, + title: '接地极图-支架接地电阻测量照片(远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img9', + must: '0', + status: '0', + key:'jdImg9', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻阻值(近景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img12', + must: '0', + status: '0', + key:'jdImg12', + num: 15, + title: '接地极图-并网箱、逆变器安装接地电阻测量照片 (远景)', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img10', + must: '0', + status: '0', + key:'jdImg10', + num: 15, + title: '接地极图-接地引下线警示做法', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img1', + must: '0', + status: '0', + key:'fsImg1', + num: 15, + title: '防水措施图-横竖向水槽', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img2', + must: '0', + status: '0', + key:'fsImg2', + num: 15, + title: '防水措施图-落水管走向及其固定', + message: '' + },{ + sampleGraph: '', + showKey: 'fs_img3', + must: '0', + status: '0', + key:'fsImg3', + num: 15, + title: '防水措施图-其他图片', + message: '' + },{ + sampleGraph: '', + showKey: 'water_mud_clamp_imgs', + must: '0', + status: '0', + key:'waterMudClampImgs', + num: 15, + title: '导水排泥夹照片', + message: '' + }, + //越秀 + { + sampleGraph: '', + showKey: 'dzjc1', + must: '0', + status: '0', + key:'dzjc1', + num: 15, + title: '电站基础-主屋', + message: '' + },{ + sampleGraph: '', + showKey: 'dzjc2', + must: '0', + status: '0', + key:'dzjc2', + num: 15, + title: '电站基础-副屋', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img1', + must: '0', + status: '0', + key:'zjImg1', + num: 15, + title: '支架正面照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img2', + must: '0', + status: '0', + key:'zjImg2', + num: 15, + title: '支架侧视图', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img3', + must: '0', + status: '0', + key:'zjImg3', + num: 15, + title: '支架北侧照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img4', + must: '0', + status: '0', + key:'zjImg4', + num: 15, + title: '支架型号照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_img5', + must: '0', + status: '0', + key:'zjImg5', + num: 15, + title: '航拍图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img1', + must: '0', + status: '0', + key:'componentImg1', + num: 15, + title: '组件倾角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'component_img2', + must: '0', + status: '0', + key:'componentImg2', + num: 15, + title: '组件方位角照片', + message: '' + },{ + sampleGraph: '', + showKey: 'size_measure_imgs', + must: '0', + status: '0', + key:'sizeMeasureImgs', + num: 15, + title: '屋顶线缆安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'fix_other_img', + must: '0', + status: '0', + key:'fixOtherImg', + num: 15, + title: '线缆下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'total_imgs', + must: '0', + status: '0', + key:'totalImgs', + num: 15, + title: '逆变器组串接入照片', + message: '' + },{ + sampleGraph: '', + showKey: 'bw_inner_img', + must: '0', + status: '0', + key:'bwInnerImg', + num: 15, + title: '并网箱内部照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dc_imgs', + must: '0', + status: '0', + key:'dcImgs', + num: 15, + title: '逆变器安装照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_zb_img', + must: '0', + status: '0', + key:'nbqZbImg', + num: 15, + title: '并网箱逆变器整体照片', + message: '' + },{ + sampleGraph: '', + showKey: 'dqsb_an_img_one', + must: '0', + status: '0', + key:'dqsbAnImgOne', + num: 15, + title: '逆变器注册截图照片', + message: '' + },{ + sampleGraph: '', + showKey: 'nbq_plate_img', + must: '0', + status: '0', + key:'nbqPlateImg', + num: 15, + title: '逆变器铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_plate_img', + must: '0', + status: '0', + key:'zjPlateImg', + num: 15, + title: '组件铭牌照片', + message: '' + },{ + sampleGraph: '', + showKey: 'open_way_voltage_imgs', + must: '0', + status: '0', + key:'openWayVoltageImgs', + num: 15, + title: '开路电压图', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img1', + must: '0', + status: '0', + key:'jdImg1', + num: 15, + title: '组件与组件之间接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img2', + must: '0', + status: '0', + key:'jdImg2', + num: 15, + title: '组件与支架接地照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img3', + must: '0', + status: '0', + key:'jdImg3', + num: 15, + title: '支架与接地扁铁连接照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img4', + must: '0', + status: '0', + key:'jdImg4', + num: 15, + title: '接地扁铁下墙照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img5', + must: '0', + status: '0', + key:'jdImg5', + num: 15, + title: '支架接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'jd_img6', + must: '0', + status: '0', + key:'jdImg6', + num: 15, + title: '电气接地电阻照片', + message: '' + },{ + sampleGraph: '', + showKey: 'zj_report', + must: '0', + status: '0', + key:'zjReport', + num:1, + title: '自检记录报告', + message: '' + },{ + sampleGraph: '', + showKey: 'other_files', + must: '0', + status: '0', + key:'otherFiles', + num:2, + title: '其它资料', + message: '' + },{ + sampleGraph: '', + showKey: 'supplement_video_url', + must: '0', + status: '0', + key:'supplementVideoUrl', + num:5, + title: '补充视频', + message: '' + }, + ], + data: { + name: "" + }, + tipShow: false, + tipTitle: '',//示例标题 + tipMsg: '',//示例内容 + sampleGraph: '', //示例图片 + // 安装 + photo: { + contractUrl: [], //合同 + filingDocumentPhoto: [], //备案证 + otherImgs1: [], //银行印鉴留样 + otherImgs2: [], //法定代表人/负责人签字照 + otherImgs3: [], //正脸、持笔/持印、合同签署页同框 + otherImgs4: [], //签署完成照片 + //工程信息 + dzjc1: [], //电站基础-主屋照片 + dzjc2: [], //电站基础-副屋照片 + nbqPlateImg: [],//逆变器序列号照片,逆变器1铭牌照片 + txPlateImg: [],//逆变器通讯棒照片,通讯棒1铭牌照 + zjPlateImg: [],//组件铭牌照片 + zjSnImgs:[],//组件SN + zjImg1: [],//膨胀螺栓 + zjImg2: [],//基座安装固定 + zjImg3: [],//底座防水 + zjImg4: [],//支架基础距离房檐的距离 + zjImg5: [],//支架东向西拍摄 + zjImg6: [],//支架西向东拍摄--- + zjImg7: [],//支架南向北拍摄--- + zjImg8: [],//支架北向南拍摄--- + zjImg9: [],//支架角度---- + fixOtherImg: [], //线缆下墙照片 + componentImg1: [],//支架节点(斜支撑) + componentImg2: [],//支架距照片(南北) + componentImg3: [],//支架距照片(东西) + componentImg4: [],//防风加固,1-3张 + sizeMeasureImgs: [],//方管尺寸测量---,9张 + totalImgs: [],//并网箱、逆变器外部安装照片、接地引下线,逆变器、并网箱整体安装照片, 存在字段名逆变器和并网箱接地照 + bwInnerImg: [],//并网箱内部整体照片 + dcImgs: [], //逆变器安装照片 + nbqZbImg: [],//并网箱逆变器整体照片 + dqsbAnImgOne: [],//直流线缆保护 + dqsbAnImgTwo: [],//直流线缆固定 + zjJdImgs: [],//引下线与支架连接点、南北坡接地连接点,2张---- + groundResistanceImgs: [],//接地电阻,1-2张----- + zujianJdImg: [],//组件边框接地 + openWayVoltageImgs: [],//开路电压,1-6张----- + directionAirImg1: [],//东向西航拍---- + directionAirImg2: [],//西向东航拍---- + directionAirImg3: [],//南向北航拍---- + directionAirImg4: [],//北向南航拍---- + zjNearImg: [],//组件近景---- + zjAngleImg: [],//组件角度---- + zjItemImg: [],//檩条出组件照片---- + waterChannelImg: [],//水槽照片---- + mediumFixImg: [],//中压固定照片---- + safetyWarningImg: [],//安全警示牌---- + safetyDiscloseDocImg: [],//现场安全交底文件---- + discloseDocImg: [],//现场交底照片---- + recordDocImg: [],//记录表---- + jdImg1: [],//组件与组件之间接地照片 + jdImg2: [],//组件与支架接地照片 + jdImg3: [],//支架与接地扁铁连接照片 + jdImg4: [],//接地扁铁下墙照片 + jdImg5: [],//支架接地电阻照片 + jdImg6: [],//电气接地电阻照片 + zjReport:[],//自检记录报告 + otherFiles: [], //其他资料 + supplementVideoUrl: [], //补充视频 + kgConditionFiles: [], //安全防护措施合照照片 + //广发 + safetyWarningImg2:[],//施工安全图-三级安全教育 + safetyWarningImg3:[],//施工安全图-开工前站班会(施工安全用品:安全帽、安全绳、反光衣、工作鞋) + safetyWarningImg:[],// 施工安全图-安全警示牌 + safetyDiscloseDocImg:[],// 施工安全图-安全技术交底书 + zjImg10:[],// 基础安装-螺栓孔洞防水图 + zjImg11:[],// 基础安装-柱脚防水完工图 + zjImg8:[],// 支架安装图-支架方阵(东向西完工照) + zjImg9:[],// 支架安装图-支架方阵(北向南完工照) + zjImg12:[],// 支架安装图-斜梁悬挑(南) + zjImg13:[],// 支架安装图-斜梁悬挑(北) + zjImg14:[],// 支架安装图-檀条悬挑(东) + zjImg15:[],// 支架安装图-檀条悬挑(西) + componentImg3:[],// 组件航拍俯视照片 + componentImg4:[],// 组件安装完成VR视图 + bkImg1:[],// 边框接地图-边框与边框接地 + bkImg2:[],// 边框接地图-边框与支架接地 + bkImg3:[],// 边框接地图-其他图片 + ykImg1:[],// 压块或背压板照片 + nbqZlcImg:[],// 逆变器安装图-逆变器交流侧 + bwJdImg:[],// 并网箱安装图-接地情况 + jdImg8:[],// 接地极图-并网箱、逆变器安装接地极 + jdImg11:[],// 接地极图-支架接地电阻测量照片(远景) + jdImg9:[],// 接地极图-并网箱、逆变器安装接地电阻阻值(近景) + jdImg12:[],// 接地极图-并网箱、逆变器安装接地电阻测量照片 (远景) + jdImg10:[],// 接地极图-接地引下线警示做法 + fsImg1:[],// 防水措施图-横竖向水槽 + fsImg2:[],// 防水措施图-落水管走向及其固定 + fsImg3:[],// 防水措施图-其他图片 + waterMudClampImgs: [], //导水排泥夹照片 + //华融 + otherImgs5:[], //水槽细节照片 + otherImgs6:[], //落水管照片 + otherImgs7:[], //假梁-斜梁方向 + otherImgs8:[], //并网箱逆变器防雨罩照片 + }, + + // 并网 + bwPhoto: { + yxImg: [], + gebImg: [], + }, + detail: {}, + formSetObj: {},//自定义字段 + sampleGraphArr:[],//示例图片 + filingDocumentCode: '', //项目备案代码 + completeRemark: '',//完工备注 + }, + onLoad(options) { + this.setData({ + entryId: options.projectId, + type: options.type, //0是安装,1是并网 + }) + wx.setNavigationBarTitle({ + title: options.type == 0 ? "电站安装" : "电站并网", + }) + this.entryDetail() + if (options.type == 1) { + this.getProviceCodeList() + } + }, + onReady() { + const query = wx.createSelectorQuery() + query.select('#Canvas') + .fields({ + node: true, + size: true + }) + .exec((res) => { + const canvas = res[0].node + this.setData({ + canvas, + }) + }) + }, + /** 获取自定义字段 */ + getFormSet(partner) { + getFormSet({ + stage: '03', //01:信息登记,02:踏勘设计,03:电站安装,04:电站并网 + partner: partner, + }).then((res) => { + let photoTips = this.data.photoTips; + let keyList = Object.keys(res.data.columns) + photoTips.forEach((item)=>{ + //示例图处理 + this.data.sampleGraphArr.forEach(item2=>{ + if(item2.itemCode === item.showKey){ + item.sampleGraph = item2.list?item2.list:[] + } + }) + keyList.forEach((item3)=>{ + if(item.showKey === item3){ + item.status = res.data.columns[item3].status + item.must = res.data.columns[item3].mustFillFlag + } + }) + }) + // console.log(111, photoTips) + this.setData({ + formSetObj: res.data.columns, + photoTips + }) + }) + }, + /** 获取示例图 */ + getTipImg(typeId,callback){ + findTypeReferenceListNew({ + typeId: typeId, + }).then((res) => { + console.log('获取示例图', res) + if(res.data){ + this.setData({ + sampleGraphArr: res.data, + }) + } + callback() + }) + }, + //示图图片放大 + viewPic(e){ + wx.previewImage({ + current: e.currentTarget.dataset.item, // 当前显示图片的 http 链接 + urls: [e.currentTarget.dataset.item] // 需要预览的图片 http 链接列表 + }) + }, + /** 用户信息 **/ + userFn(e){ + wx.navigateTo({ + url: '/home/pages/ownerForm/ownerForm?projectId=' + this.data.detail.entry_id + '&type=8', + }) + }, + /** 获取电站详情 **/ + entryDetail(e) { + wx.showLoading({ + title: '加载中', + }) + entryDetail({ + userId: wx.getStorageSync('userId'), + entryId: this.data.entryId, + }).then((res) => { + // this.getActualCapacity() + this.setData({ + detail: res, + 'data.projectId': res.project_id, + // 'data.projectCode': res.projectCode, + // 'data.projectName': res.projectName, + 'data.powerStationCode': res.power_station_code, + 'data.name': res.tenant_name, + 'data.traderName': res.create_trader_name, + // 'data.traderTel': res.traderTel, + 'data.phone': res.mobile, + 'data.idCard': res.id_code, + 'data.region': res.province + res.city + res.area + res.address, + // province: res.province, + // 'data.scheme': res.scheme_type == 1 ? "标准方案" : "组合方案", + // 'data.repaymentMethod': res.repayment_method, //划转方式 + generatorNo: res.generator_no, //发电户号 + filingDocumentCode: res.filing_document_code, //备案证 + }) + + if (res.sn) { + var snList = res.sn.split(",") + this.setData({ + snList: snList, + }) + } + + if (res.nbq_sn) { + var nbqSnList = res.nbq_sn.split(",") + this.setData({ + nbqSnList: nbqSnList, + }) + } + + if (this.data.type == 1) { //并网 + // if (res.report) { + // if (res.report.gebImg) { + // this.setData({ + // [`bwPhoto.gebImg[0].name`]: res.report.gebImg, + // [`bwPhoto.gebImg[0].url`]: IMG_BASE_URL + res.report.gebImg, + // }) + // } + // if (res.report.yxImg) { + // this.setData({ + // [`bwPhoto.yxImg[0].name`]: res.report.yxImg, + // [`bwPhoto.yxImg[0].url`]: IMG_BASE_URL + res.report.yxImg, + // }) + // } + // } + } else if (this.data.type == 0) { //完工 + if (res.contract_url) {//合同 + let contractUrl = res.contract_url ? res.contract_url .split(",") : []; + contractUrl.forEach(itm=>{ + this.data.photo.contractUrl.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.contractUrl`]:res.contract_url ? this.data.photo.contractUrl: [], + }) + } + if (res.filing_document_photo) {//备案证 + let filingDocumentPhoto = res.filing_document_photo ? res.filing_document_photo.split(",") : []; + filingDocumentPhoto.forEach(itm=>{ + this.data.photo.filingDocumentPhoto.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.filingDocumentPhoto`]:res.filing_document_photo ? this.data.photo.filingDocumentPhoto: [], + }) + } + if (res.report) { + for(let i in this.data.photo){ + if (res.report[i]) { + let arr = res.report[i].split(","),arr2=[]; + arr.forEach(itm=>{ + arr2.push({ + name:itm, + url:IMG_BASE_URL + itm + }); + }); + this.setData({ + [`photo.${i}`]: arr2, + }); + } + } + this.setData({ + completeRemark: res.report.completeRemark, //完工备注 + }) + } + this.getTipImg(res.scheme_type_id,()=>{ + this.getFormSet(res.management) + }) + // }else{ + // this.getFormSet(res.management) + // } + + setTimeout(res=> { + wx.hideLoading() + this.checkCompleteEnable() + }, 500) + } + }) + }, + /** 获取电力公司 **/ + getProviceCodeList(e) { + getProviceCodeList({}).then((res) => { + if (res.code == 200) { + var list = [] + for (let i = 0; i < res.data.length; i++) { + const element = res.data[i]; + list.push(element.columns) + } + setTimeout((res) => { + for (let j = 0; j < list.length; j++) { + const element = list[j]; + if (element.name == this.data.province) { + this.setData({ + powerCompanyName: element.power_company, + powerCompanyCode: element.code + }) + } + } + }, 500) + this.setData({ + powerCompanyList: list + }) + } + }) + }, + /** 查询安装组件信息 **/ + getActualCapacity(e) { + getActualCapacity({ + entryId: this.data.entryId, + }).then((res) => { + const data = JSON.parse(res.data) + var list = []; + for (let i = 0; i < data.columns.nbqTotal; i++) { + var item = ""; + list.push(item) + } + + var npdlist = []; + for (let i = 0; i < data.columns.nbqTotal; i++) { + var item = ""; + npdlist.push(item) + } + + if (this.data.snList) { + for (let i = 0; i < this.data.snList.length; i++) { + for (let j = 0; j < list.length; j++) { + if (i == j) { + list[j] = this.data.snList[i]; + } + } + } + } + + this.setData({ + nbqTotal: list + }) + + if (this.data.nbqSnList) { + for (let i = 0; i < this.data.nbqSnList.length; i++) { + for (let j = 0; j < npdlist.length; j++) { + if (i == j) { + npdlist[j] = this.data.nbqSnList[i]; + } + } + } + } + + this.setData({ + nbqSnTotal: npdlist + }) + + + this.setData({ + component: data.columns + }) + + }) + }, + /** 选择电力公司 **/ + bindpowerCompanyList(e) { + this.setData({ + powerCompanyName: this.data.powerCompanyList[e.detail.value].power_company, + powerCompanyCode: this.data.powerCompanyList[e.detail.value].code + }) + }, + /** 判断方位角方向 **/ + getDirection:function(rotate){ + // 计算应偏移度数 + let that = this; + var area = parseInt(rotate/90) + var detailArea = rotate%90 + if(area==0){ + that.setData({ + areaTT:"西偏北", + detailAreaTT: 90-detailArea + }) + }else if(area==1){ + that.setData({ + areaTT: "西偏南", + detailAreaTT: detailArea + }) + } else if (area == 2) { + that.setData({ + areaTT: "东偏南", + detailAreaTT: 90-detailArea + }) + }else{ + that.setData({ + areaTT: "东偏北", + detailAreaTT: detailArea + }) + } + return that.data.areaTT + that.data.detailAreaTT; + }, + /** 上传图片之前 **/ + beforeRead(e){ + const { callback } = e.detail; + console.log("上传前",e); + // callback(true); + // return + if (this.data.type == 0) { + let that = this; + wx.getSystemInfoAsync({ + success (rep) { + if(rep.platform == 'devtools'){ + callback(true); + }else{ + //指南针监听,手机拍摄 + wx.onCompassChange(function(res){ + console.log("指针",res); + var rotate = 360 - res.direction.toFixed(0) + let direction = that.getDirection(rotate) + '°'; + that.setData({ + direction: direction + }); + setTimeout(()=>{ + wx.stopCompass(); + },100); + callback(true); + }); + } + } + }); + }else{ + callback(true); + } + }, + /** 上传图片 **/ + afteruploadPhotoRead(e) { + let fileArr = [], choseType + if (Array.isArray(e.detail.file)) { //多张 + fileArr = e.detail.file.map(item=>item.url);//图片集 + }else{ + fileArr.push(e.detail.file.url) + } + // const fileArr = e.detail.file.map(item=>item.url);//图片集 + console.log('上传图片', e, fileArr) + wx.showLoading({ + title: '上传中', + }) + var that = this + const uploadMultiple = (index) => { + if (index >= fileArr.length) { + // 所有文件上传完毕 + wx.showToast({ + title: '上传完成', + icon: 'success', + duration: 2000 + }); + return; + } + if (Array.isArray(e.detail.file)) { //多张 + choseType = e.detail.file[index].choseType || undefined;//camera相机 album相册 + }else{ + choseType = e.detail.file.choseType || undefined;//camera相机 album相册 + } + if ((e.currentTarget.dataset.name !=='filingDocumentPhoto' && e.currentTarget.dataset.name !=='otherImgs1' && e.currentTarget.dataset.name !=='otherImgs2' && e.currentTarget.dataset.name !=='otherImgs3' && e.currentTarget.dataset.name !=='otherImgs4') && choseType == 'camera') { //加水印 + this.getLocation(e) + return + } + const filePath = fileArr[index]; + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', // 你的上传API地址 + filePath: filePath, + name: 'file', // 这里根据API的要求来定义 + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none', + }) + var item = { + url: "", + name: "", + } + let type = e.currentTarget.dataset.type + item.url = filePath; + item.name = res.data; + that.data.photo[type].push(item) + that.setData({ + [`photo.${type}`]: that.data.photo[type] + }) + that.checkCompleteEnable() + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + uploadMultiple(index + 1); + } + }); + }; + uploadMultiple(0); //执行上传 + }, + + /** 删除图片 **/ + deleteImg(e) { + console.log("删除图片事件", e) + let index= e.detail.index; + if (e.currentTarget.dataset.typepage) { + let type = e.currentTarget.dataset.type + this.setData({ + [`bwPhoto.${type}`]: [] + }) + } else { + let type = e.currentTarget.dataset.type + const index = (type != 'filingDocumentPhoto') ? e.detail.index : e.currentTarget.dataset.index //删除图片的下标 + this.data.photo[type].splice(index, 1); + this.setData({ + // [`photo.${type}`]: index > 0 ? this.data.photo[type] : [], + [`photo.${type}`]: this.data.photo[type] + }) + this.checkCompleteEnable() + } + }, + /** 删除文件 **/ + deleteImg2(e) { + // console.log("删除事件2", e) + let index= e.currentTarget.dataset.index; + let name= e.currentTarget.dataset.name; + this.data.photo[name].splice(index, 1); + this.setData({ + [`photo.${name}`]: this.data.photo[name] + // otherFiles: index > -1 ? this.data.otherFiles : [] + }) + this.checkCompleteEnable() + }, + /** 提交验收报告 **/ + submitFrom(e) { + var data; + wx.showLoading({ + title: "提交中" + }) + if (this.data.type == 0) { //完工 + //用户类型是单位 + if(this.data.detail.tenant_type=='2'){ + if (this.data.filingDocumentCode ==null || this.data.filingDocumentCode =='') { + wx.showToast({ + title: '请输入项目备案代码', + icon: 'none' + }) + return + } + if (!this.data.photo.filingDocumentPhoto.length > 0) { + wx.showToast({ + title: '请上传备案证', + icon: 'none' + }) + return + }else if (!this.data.photo.otherImgs1.length > 0 && this.data.formSetObj.other_imgs1.mustFillFlag =='1') { + wx.showToast({ + title: '请上传银行印鉴留样', + icon: 'none' + }) + return + }else if(!this.data.photo.otherImgs2.length > 0 && this.data.formSetObj.other_imgs2.mustFillFlag =='1') { + wx.showToast({ + title: '请上传签约现场照片-法定代表人/负责人签字照', + icon: 'none' + }) + return + }else if(!this.data.photo.otherImgs3.length > 0 && this.data.formSetObj.other_imgs3.mustFillFlag =='1') { + wx.showToast({ + title: '请上传签约现场照片-正脸、持笔/持印、合同签署页同框', + icon: 'none' + }) + return + }else if(!this.data.photo.otherImgs4.length > 0 && this.data.formSetObj.other_imgs4.mustFillFlag =='1') { + wx.showToast({ + title: '请上传签署完成照片', + icon: 'none' + }) + return + }else if(this.data.completeRemark == '' && this.data.formSetObj.complete_remark.mustFillFlag =='1') { + wx.showToast({ + title: '完工备注不能为空', + icon: 'none' + }) + return + } + } + data = { + entryId: this.data.entryId, + filingDocumentCode: this.data.filingDocumentCode, + completeRemark: this.data.completeRemark, + // otherFiles: this.data.otherFiles.join(',') + } + //图片 + for(let i in this.data.photo){ + data[i] = this.data.photo[i].length>0 ? this.data.photo[i].map(itm=>itm.name).join(",") : ""; + } + console.log("提交",data); + // return; + install({ + userId: wx.getStorageSync('userId'), + addReportReq: data + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + wx.showToast({ + title: '完工成功', + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + title: res.errMsg || res.msg, + icon: 'none' + }) + } + }) + } + }, + /** 暂存 **/ + cacheFrom(e) { + wx.showLoading({ + title: '暂存中', + }) + var data; + data = { + entryId: this.data.entryId, + filingDocumentCode: this.data.filingDocumentCode, + completeRemark: this.data.completeRemark, + // otherFiles: this.data.otherFiles.join(',') + } + //图片 + for(let i in this.data.photo){ + data[i] = this.data.photo[i].length>0 ? this.data.photo[i].map(itm=>itm.name).join(",") : ""; + } + installZc({ + userId: wx.getStorageSync('userId'), + addReportReq: data + }).then((res) => { + wx.hideLoading() + if (res.code == 200) { + wx.showToast({ + title: '暂存成功', + icon: 'none', + success: function () { + setTimeout(function () { + wx.navigateBack() + }, 1500) + } + }) + } else { + wx.showToast({ + title: res.errMsg || res.msg, + icon: 'none' + }) + } + }) + }, + /** 查看注意方案 **/ + viewNote(e) { + let title = e.currentTarget.dataset.tit; + let message = e.currentTarget.dataset.msg; + Dialog.alert({ + title: title, + message: message, + theme: 'round-button', + }).then(() => { }); + }, + /** 输入sn码 **/ + snEntry(e) { + this.setData({ + [`snList[${e.currentTarget.dataset.index}]`]: e.detail.value, + }) + + this.checkCompleteEnable() + }, + /** 逆变器输入sn码 **/ + nbqSnEntry(e) { + this.setData({ + [`nbqSnList[${e.currentTarget.dataset.index}]`]: e.detail.value, + }) + + this.checkCompleteEnable() + }, + /** 扫码 **/ + scanCode(e) { + const type = e.currentTarget.dataset.type; + const index = e.currentTarget.dataset.index; + const that = this + wx.scanCode({ + onlyFromCamera: true, + success(res) { + console.log("扫码结果", res) + if (type == 0) { + that.setData({ + [`snList[${index}]`]: res.result, + [`nbqTotal[${index}]`]: res.result, + }) + } else if (type == 1) { + that.setData({ + [`nbqSnList[${index}]`]: res.result, + [`nbqSnTotal[${index}]`]: res.result, + }) + } + that.checkCompleteEnable() + }, + fail(res) { + wx.showToast({ + title: '扫码失败', + icon: 'none' + }) + } + }) + + + }, + /** 校验完工必填项是否选择或填写完毕 **/ + checkCompleteEnable(e) { + if (this.data.snList && this.data.snList.length > 0) { + for (let i = 0; i < this.data.snList.length; i++) { + const element = this.data.snList[i]; + if (!element) { + this.setData({ + completeEnable: false + }) + return + } + } + } + + if (this.data.nbqSnList && this.data.nbqSnList.length > 0) { + for (let i = 0; i < this.data.nbqSnList.length; i++) { + const element = this.data.nbqSnList[i]; + if (!element) { + this.setData({ + completeEnable: false + }) + return + } + } + } + try{ + for (let i in this.data.photo) { + this.data.photoTips.forEach(item=>{ + if((i == item.key) && (item.must == '1')){ + if (this.data.photo[i].length == 0 ) { + // console.log(12121, item.key, i) + this.setData({ + completeEnable: false + }) + throw Error() + } + } + }) + } + // if(this.data.formSetObj.other_files.status=='1' && this.data.formSetObj.other_files.mustFillFlag=='1'){ + // if(this.data.otherFiles.length == 0){ + // this.setData({ + // completeEnable: false + // }) + // return + // } + // } + this.setData({ + completeEnable: true + }) + }catch(e) { + console.log(e) + } + }, + /** 获取用户当前地理位置后为照片添加水印 **/ + getLocation(e) { + if (this.data.customerAddress) { //有地址直接绘制图片 + this.chooseImages(e) + return + } + + utilGetLocation.getLocationAddress().then((res) => { + res.res.data = res.res.data.slice(res.res.data.lastIndexOf('省') + 1) + this.setData({ + customerAddress: res.res.data, + canvasLongitude: res.resLocation.longitude, + canvasLatitude: res.resLocation.latitude, + }); + //获取小程序二维码 + let lonLat = res.resLocation.longitude + ',' + res.resLocation.latitude; + createQrcode({ + content:lonLat + }).then(ret=>{ + // let codeImg ="data:image/png;base64," + ret; + let codeImg =IMG_BASE_URL + ret; + this.setData({ + imageCodeImg:codeImg + }); + // console.log("codeImg",codeImg); + this.chooseImages(e) + }); + }) + }, + /** + * @param {*} e 图片携带信息 + * @param {*} customerAddress 实时地理位置信息 + * @param {*} canvasLongitude 实时地理位置经度 + * @param {*} canvasLatitude 实时地理位置纬度 + */ + async chooseImages(e) { + const photoName = e.currentTarget.dataset.type; //图片名称 + const tempFilePath = e.detail.file[0].url //图片路径 + const canvasWidth = wx.getSystemInfoSync().screenWidth; + // 获取图片信息 + await wx.getImageInfo({ + src: tempFilePath, + }).then(async res => { + let watermarkScale = res.width / canvasWidth; + this.setData({ + canvasHeight: Math.round(res.height / watermarkScale), + canvasWidth: canvasWidth, + }); + await utilAddWatermark.addWatermark(tempFilePath, photoName, this.data).then((res) => { + this.data.photo[photoName].push(res) + this.setData({ + [`photo.${photoName}`]: this.data.photo[photoName] + }) + this.checkCompleteEnable() + }) + + }) + }, + /** 购售电地址是否一致 **/ + radioChangeAddress(e) { + this.setData({ + changeAddressType: e.detail.value + }) + }, + /** 打开省市区弹框 **/ + bindRegionChange(e) { + this.setData({ + showRegion: true + }) + }, + /** 选择的地址 **/ + chooseRegion(e) { + this.setData({ + provinceName: e.detail.provinceName, + cityName: e.detail.cityName, + areaName: e.detail.areaName, + address: "" + }) + }, + /** 拨打业主联系电话 **/ + phoneFn(e) { + const phone = e.currentTarget.dataset.phone; + if (!phone) { + wx.showToast({ + title: '暂无联系方式', + icon: 'none' + }) + return + } + wx.makePhoneCall({ + phoneNumber: phone, + }) + }, + /** 填充所有图片 **/ + imageAll(e) { + var that = this + wx.showModal({ + title: '提示', + content: '确定选取图片后填充完工所有图片?', + complete: (res) => { + if (res.confirm) { + wx.chooseMedia({ + count: 1, + mediaType: ['image'], + success(resImage) { + wx.showLoading({ + title: '选择中', + }) + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', + filePath: resImage.tempFiles[0].tempFilePath, + name: 'file', + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + for (let i in that.data.photo) { + let arr=[]; + arr.push({ + name:res.data, + url:IMG_BASE_URL + res.data + }); + that.setData({ + [`photo.${i}`]: arr, + }) + } + wx.showToast({ + title: '填充成功', + icon: 'none' + }) + that.checkCompleteEnable() + } else { + wx.showToast({ + title: '填充失败', + icon: 'none' + }) + } + } + }) + } + }) + } + } + }) + }, + /** 文件或图片上传选择-对话框 **/ + selectUplosd(e){ + var that = this; + let name = e.currentTarget.dataset.name; + let maxcount = e.currentTarget.dataset.maxcount; + wx.showActionSheet({ + itemList: ['文件', '图片'], + success: function (res) { + if (!res.cancel) { + if (res.tapIndex == 0) {//文件 + that.upload(e, name); + } else if (res.tapIndex == 1) {//图片 + wx.chooseMedia({ + count: maxcount - that.data.photo[name].length, + mediaType: ['image'], + sourceType: ['album'], + success: function (rep) { + if (Array.isArray(rep.tempFiles)) { //多张 + var count = 0; + that.afteruploadPhotoReadFile(e, rep.tempFiles, count) + return + } + wx.showLoading({ + title: '选择中', + }) + wx.uploadFile({ + url: API_BASE_URL + 'common/weChat/uploadImage', + filePath: rep.tempFiles[0].tempFilePath, + name: 'file', + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none', + }) + if(name){ + var item = { + url: "", + name: "", + } + item.url = rep.tempFiles[0].tempFilePath; + item.name = res.data; + that.data.photo[name].push(item) + that.setData({ + [`photo.${name}`]: that.data.photo[name] + }) + } + that.checkCompleteEnable() + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + fail: function(){}, + }); + } + } + } + }); + }, + /** 上传pdf或图片 **/ + upload(e,name) { + var that = this; + let maxcount = e.currentTarget.dataset.maxcount; + wx.chooseMessageFile({ + count: maxcount - this.data.photo[name].length, + type: 'all', + success(res) { + if (Array.isArray(res.tempFiles)) { //多张 + var count = 0; + that.afteruploadPhotoReadFile(e, res.tempFiles, count, 'file') + return + } + //获取文件后缀 + let suffix = res.tempFiles[0].path.substring(res.tempFiles[0].path.lastIndexOf('.') + 1) + if (suffix.search(/jpg|png|jpeg|pdf/) == -1) { + wx.showToast({ + title: '只能上传jpg、png、jpeg、pdf文件', + icon: 'none' + }) + return + } else { + wx.showLoading({ + title: '选择中', + }) + wx.uploadFile({ + url: API_BASE_URL + 'common/uploadFile_Name?fileName='+res.tempFiles[0].name, + filePath: res.tempFiles[0].path, + name: 'file', + complete: function (res) { + wx.hideLoading() + if (res.statusCode == 200) { + wx.showToast({ + title: '选择成功', + icon: 'none' + }) + if(name){ + that.data.photo[name].push({ + name: JSON.parse(res.data).path, + url: IMG_BASE_URL + JSON.parse(res.data).path + }); + that.setData({ + [`photo.${name}`]: that.data.photo[name] + }) + }else{ + // otherFiles.push(JSON.parse(res.data).path) + // that.setData({ + // otherFiles + // }) + // that.checkCompleteEnable() + } + } else { + wx.showToast({ + title: '选择失败', + icon: 'none' + }) + } + } + }) + } + } + }) + }, + /** 文件上传多张递归 **/ + afteruploadPhotoReadFile(e, file, count, type) { + let ob = { + name: '', + url: '', + } + const name = e.currentTarget.dataset.name + wx.showLoading({ + title: '加载第' + (count + 1) + '张照片中', + mask: true, + }) + const element = file[count]; + var that = this; + var url = '' + if(type =='file'){ + //获取文件后缀 + let suffix = element.path.substring(element.path.lastIndexOf('.') + 1) + if (suffix.search(/jpg|png|jpeg|pdf/) == -1) { + wx.showToast({ + title: '只能上传jpg、png、jpeg、pdf文件', + icon: 'none' + }) + return + } + url = API_BASE_URL + 'common/uploadFile_Name?fileName='+ element.name + }else{ + url = API_BASE_URL + 'common/weChat/uploadImage' + } + wx.uploadFile({ + url: url, + filePath: type =='file'?element.path:element.tempFilePath, + name: 'file', + success(res) { + wx.hideLoading() + if (res.statusCode == 200) { + count = count + 1; + ob.name = type =='file'?JSON.parse(res.data).path: res.data, + ob.url = type =='file'?JSON.parse(res.data).path:element.tempFilePath + that.data.photo[name].push(ob); + that.setData({ + [`photo.${name}`]: that.data.photo[name] + }) + if (count == file.length) { + wx.showToast({ + title: '选择成功', + icon: 'none' + }) + that.checkCompleteEnable() + } else { + that.afteruploadPhotoReadFile(e, file, count, type) + } + } else { + wx.showToast({ + title: '选择失败', + icon: 'error' + }) + } + } + }) + }, + //打开pdf文件或者大图查看图片 + openDocument(res) { + let path = res.currentTarget.dataset.path + if (path) { + let suffix = path.substring(path.lastIndexOf('.') + 1) //获取文件后缀 + if (suffix == 'pdf') { + wx.showLoading({ + title: '加载中', + }) + wx.downloadFile({ + url: IMG_BASE_URL + path, + complete: function (res) { + wx.hideLoading() + const filePath = res.tempFilePath + wx.openDocument({ + filePath: filePath, + showMenu: true, + success: function (res) {} + }) + } + }) + } else { + wx.previewImage({ + urls: [IMG_BASE_URL + path] // 需要预览的图片http链接列表 + }) + } + } + }, +}) \ No newline at end of file diff --git a/home/pages/completion/completion.json b/home/pages/completion/completion.json new file mode 100644 index 0000000..7fb6aac --- /dev/null +++ b/home/pages/completion/completion.json @@ -0,0 +1,9 @@ +{ + "usingComponents": { + "van-uploader": "@vant/weapp/uploader/index", + "van-dialog": "@vant/weapp/dialog/index", + "region":"../../../components/region/region", + "userInfo": "../../components/userInfo/userInfo" + }, + "navigationBarTitleText": "电站完工" +} \ No newline at end of file diff --git a/home/pages/completion/completion.wxml b/home/pages/completion/completion.wxml new file mode 100644 index 0000000..c77df59 --- /dev/null +++ b/home/pages/completion/completion.wxml @@ -0,0 +1,195 @@ + + + + + + + + + * + * + 项目备案代码 + + + + + + + + + * + * + 备案证(1-4张) + + + + {{util.formartFileName(child.name)}} + 删除 + + 上传 + + + + + + + + + + + * + * + 银行印鉴留样(1-4张) + + + + + + + + + + + + + + * + * + 签约现场照片-法定代表人/负责人签字照(1-4张) + + + + + + + + + + + + + + * + * + 签约现场照片-正脸、持笔/持印、合同签署页同框(1-4张) + + + + + + + + + + + + + + * + * + 签署完成照片(1-4张) + + + + + + + + + + + + + + + + * + 合同 + + + + {{util.formartFileName(child.name)}} + 删除 + + 上传 + + + + + + + + + 工程信息 + + + + + + + + + * + {{child.title}} + + ({{child.min}}-{{child.num}}张) + (1-{{child.num}}张) + + + + + + + 示例图 + {{item.imgsDesc}} + + + + + {{util.formartFileName(childs.name)}} + 删除 + + 上传 + + + + + + + + + + + + + + + + + * + 完工备注 + + + + + + + 取消 + 保存 + \ No newline at end of file diff --git a/monitor/pages/addMaterial/addMaterial.wxss b/monitor/pages/addMaterial/addMaterial.wxss new file mode 100644 index 0000000..8e8234b --- /dev/null +++ b/monitor/pages/addMaterial/addMaterial.wxss @@ -0,0 +1,24 @@ +.allOrder{height: calc(100vh - 100rpx); overflow: auto;} +.list {background: #fff; margin-top: 20rpx; padding: 10rpx 0; font-size: 28rpx;} +.list>view {padding: 20rpx; overflow: hidden; } +.list>view:last-of-type { border-bottom: none;} +.title { width: 170rpx; float: left; color: #333; text-align: right} + + +button::after { border: none;} +.guo { background: #FFF; color: #333;} +.ju { background: #f66;} +.jie,.pai,.zhuan,.sure { background: #0A6597;} + + +.operate {display: flex; justify-content: space-between; color: #fff; width: 100%; position: fixed; bottom: 0; padding-bottom: constant(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);} +.operate>view { flex: 1; text-align: center; height: 90rpx; font-size: 30rpx; line-height: 90rpx;} + +.title-big-two>view>.fkjl{width: 23rpx; height: 22rpx;} +.rj {border: solid #aaa; border-width: 0 2rpx 2rpx 0; display: inline-block; padding: 10rpx; transform: rotate(-45deg); -webkit-transform: rotate(-45deg);} +.detail-list { flex: 1; color: #333; display: flex; align-items: center; } +.detail-list picker{width: 90%;} +.detail-list input{ width: 100%;} +.picker{width: 90%; height: 45rpx;} + +.gray{color: #CCC;} diff --git a/monitor/pages/center/center.js b/monitor/pages/center/center.js new file mode 100644 index 0000000..164c0b2 --- /dev/null +++ b/monitor/pages/center/center.js @@ -0,0 +1,56 @@ +const app = getApp(), +Api = require("../../../utils/util.js"); +Page({ + data: { + }, + onLoad: function(){ + + }, + onShow: function () { + var that = this; + this.setData({ + url: app.globalData.url, + userId: wx.getStorageSync('userId'), + name: wx.getStorageSync('name'), + }) + + }, + + + //我的结算 + settlement(e){ + wx.navigateTo({ + url: '/monitor/pages/settlement/settlement', + }) + }, + + //通知公告 + notice: function () { + wx.navigateTo({ + url: '/monitor/pages/notice/notice', + }) + }, + + //技术资料 + technicalData: function () { + wx.navigateTo({ + url: '/monitor/pages/technicalData/technicalData', + }) + }, + + exit: function () { + wx.showModal({ + content: '确定退出登录吗?', + success(res) { + if (res.cancel) {} else if (res.confirm) { + Api.req('oauth/miniapp/logout', {}, 'get').then((res) => { + wx.clearStorage() + wx.reLaunch({ + url: '/pages/index/index', + }) + }) + } + } + }) + }, +}) \ No newline at end of file diff --git a/monitor/pages/center/center.json b/monitor/pages/center/center.json new file mode 100644 index 0000000..4ae5a70 --- /dev/null +++ b/monitor/pages/center/center.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "tabBar": "../components/tabBar/tabBar", + "statusBar": "/components/statusBar/statusBar" + }, + "navigationStyle": "custom", + "navigationBarTitleText": "个人中心" +} \ No newline at end of file diff --git a/monitor/pages/center/center.wxml b/monitor/pages/center/center.wxml new file mode 100644 index 0000000..0f617be --- /dev/null +++ b/monitor/pages/center/center.wxml @@ -0,0 +1,39 @@ + + + + + + + + + {{name}} + + + + + + + 通知公告 + + + + + 技术资料 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/monitor/pages/center/center.wxss b/monitor/pages/center/center.wxss new file mode 100644 index 0000000..b06234b --- /dev/null +++ b/monitor/pages/center/center.wxss @@ -0,0 +1,38 @@ +page { + background: #efefef; +} +.top-bg{width: 100%; height: 550rpx; position: relative; z-index: -1;} +.head { height: 100rpx; width: 100rpx; background: #fff; border-radius: 50%; text-align: center;} +.head>image { width: 100%; height: 100%;} +.userinfo { display: flex; margin: 0 0 60rpx 45rpx; align-items: center;} +.type { color: #333; font-size: 34rpx; margin-left: 20rpx;} +.my-content{ margin-top: -320rpx;} + +.nav-link{background: #fff; margin: 30rpx; border-radius: 30rpx;} +.look { line-height: 100rpx; font-size: 30rpx; color: #333; padding: 0 40rpx; overflow: hidden; position: relative;} +.look image { width: 36rpx; height: 36rpx; float: left; margin-right: 20rpx; margin-top: 32rpx;} +.bt-b {border-bottom: 1rpx solid #efefef;} +.rj { + border: solid #aaa; + border-width: 0 2rpx 2rpx 0; + display: inline-block; + padding: 10rpx; + transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + float: right; + margin-top: 35rpx; +} +.bt-btn-box{ + position: absolute; + bottom: 200rpx; margin-left: 35rpx; +} +.btn { + width: 690rpx; + height: 90rpx; + /* background: linear-gradient(to left, #00967b, #005df2); */ + background-image: linear-gradient(270deg, #00967b 0%, #0a6597 100%); + color: #fff; + font-size: 30rpx; + line-height: 90rpx; + border-radius: 50rpx; +} \ No newline at end of file diff --git a/monitor/pages/components/baseInfo/baseInfo.js b/monitor/pages/components/baseInfo/baseInfo.js new file mode 100644 index 0000000..03079ef --- /dev/null +++ b/monitor/pages/components/baseInfo/baseInfo.js @@ -0,0 +1,41 @@ +// monitor/pages/components/baseInfo/baseInfo.js +const app = getApp() +Component({ + + /** + * 组件的属性列表 + */ + properties: { + basic: Object, + }, + + /** + * 组件的初始数据 + */ + data: { + imgUrl: app.globalData.imgUrl + }, + + /** + * 组件的方法列表 + */ + methods: { + //设备列表 + goDevice(){ + wx.navigateTo({ + url: '../../deviceList/deviceList?id=' + this.data.basic.entryId, + }) + }, + //查看图片 + bigImg(e) { + let photo_arr = new Array(); + let current = this.data.imgUrl + e.currentTarget.dataset.url; + photo_arr.push(current); + wx.previewImage({ + current: current, // 当前显示图片的https链接 + urls: photo_arr, // 需要预览的图片https链接列表 + }) + }, + + } +}) \ No newline at end of file diff --git a/monitor/pages/components/baseInfo/baseInfo.json b/monitor/pages/components/baseInfo/baseInfo.json new file mode 100644 index 0000000..6913026 --- /dev/null +++ b/monitor/pages/components/baseInfo/baseInfo.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-steps": "@vant/weapp/steps/index" + } +} \ No newline at end of file diff --git a/monitor/pages/components/baseInfo/baseInfo.wxml b/monitor/pages/components/baseInfo/baseInfo.wxml new file mode 100644 index 0000000..5a7af18 --- /dev/null +++ b/monitor/pages/components/baseInfo/baseInfo.wxml @@ -0,0 +1,113 @@ + + + + 工单信息 + + 工单编号: + {{basic.number}} + + + 信息来源: + 自建 + 监控转运维 + 其他 + 故障转运维 + 低效转运维 + + + + 用户信息 + + 用户姓名: + {{basic.customerName}} + + + 联系方式: + {{basic.customerMobile}} + + + 用户地址: + {{basic.province}}{{basic.city}}{{basic.area}}{{basic.customerAddress}} + + + + + + 电站信息 + 查看设备信息 + + + 电站编码: + {{basic.powerStationCode}} + + + 设备类型: + {{basic.applianceCategory}} + + + 设备品牌: + {{basic.applianceBrand}} + + + 设备型号: + {{basic.applianceModel}} + + + 保修类型: + {{basic.warrantyType=='1'?'保内':'保外'}} + + + + 服务类型: + + {{basic.serviceTypeName}} + + + + + 服务措施: + {{basic.serviceMeasures}} + + + 投运时间: + {{basic.putIntoTime}} + + + 报修时间: + {{basic.repairTime}} + + + 预约日期: + {{basic.promiseTime}} + + + 故障描述: + {{basic.remarks}} + + + 故障图片: + + + + + + + + + + + + \ No newline at end of file diff --git a/monitor/pages/components/baseInfo/baseInfo.wxss b/monitor/pages/components/baseInfo/baseInfo.wxss new file mode 100644 index 0000000..01b8bdc --- /dev/null +++ b/monitor/pages/components/baseInfo/baseInfo.wxss @@ -0,0 +1,2 @@ +/* monitor/pages/components/baseInfo/baseInfo.wxss */ +@import "../../workOrder/orderDetail/orderDetail.wxss"; \ No newline at end of file diff --git a/monitor/pages/components/feedBackRecord/feedBackRecord.js b/monitor/pages/components/feedBackRecord/feedBackRecord.js new file mode 100644 index 0000000..58aef40 --- /dev/null +++ b/monitor/pages/components/feedBackRecord/feedBackRecord.js @@ -0,0 +1,77 @@ +// monitor/pages/components/feedBackRecord/feedBackRecord.js +const app = getApp(), + Api = require("../../../../utils/util.js"); +Component({ + + /** + * 组件的属性列表 + */ + properties: { + basic: Object, + tabType: String + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + pageLifetimes: { + show: function () { + // 页面被展示 + this.getList() + }, + }, + observers: { + 'tabType': function (tabType) { + if(tabType){ + this.getList() + this.setData({ + imgUrl: app.globalData.imgUrl + }) + } + } + }, + + /** + * 组件的方法列表 + */ + methods: { + getList(){ + var that = this + wx.showLoading({ + title: '加载中...', + }) + Api.req('sf/operationOrderFeedback/listFeedback', { + orderId: this.data.basic.id + }, 'get') + .then(res => { + wx.hideLoading() + if(res.code == 200){ + for (var i = 0; i < res.data.length; i++) { + if (res.data[i].feedbackImg) { + res.data[i].feedbackImg = res.data[i].feedbackImg.split(',') + } else { + res.data[i].feedbackImg = [] + } + } + that.setData({ + back: res.data, + }) + } + }) + }, + //查看图片 + bigImg(e) { + let photo_arr = new Array(); + let current = this.data.imgUrl + e.currentTarget.dataset.url; + photo_arr.push(current); + wx.previewImage({ + current: current, // 当前显示图片的https链接 + urls: photo_arr, // 需要预览的图片https链接列表 + }) + }, + } +}) \ No newline at end of file diff --git a/monitor/pages/components/feedBackRecord/feedBackRecord.json b/monitor/pages/components/feedBackRecord/feedBackRecord.json new file mode 100644 index 0000000..6913026 --- /dev/null +++ b/monitor/pages/components/feedBackRecord/feedBackRecord.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "van-steps": "@vant/weapp/steps/index" + } +} \ No newline at end of file diff --git a/monitor/pages/components/feedBackRecord/feedBackRecord.wxml b/monitor/pages/components/feedBackRecord/feedBackRecord.wxml new file mode 100644 index 0000000..df366c0 --- /dev/null +++ b/monitor/pages/components/feedBackRecord/feedBackRecord.wxml @@ -0,0 +1,12 @@ + + + {{item.feedback}} + {{item.feedbackTime}} + + + + + + + + \ No newline at end of file diff --git a/monitor/pages/components/feedBackRecord/feedBackRecord.wxss b/monitor/pages/components/feedBackRecord/feedBackRecord.wxss new file mode 100644 index 0000000..4ea9173 --- /dev/null +++ b/monitor/pages/components/feedBackRecord/feedBackRecord.wxss @@ -0,0 +1,5 @@ +/* monitor/pages/components/feedBackRecord/feedBackRecord.wxss */ +.back{font-size: 28rpx; width: 720rpx; margin: 20rpx auto; background-color: #FFF; padding: 20rpx; border-radius: 20rpx;} +.back-time{color: #999; font-size: 24rpx; margin-bottom: 10rpx;} +.photo{width: 100rpx; height: 100rpx; display: inline; margin-right: 20rpx;} +.img image{width: 100rpx; height: 100rpx; border-radius: 10rpx;} \ No newline at end of file diff --git a/monitor/pages/components/tabBar/tabBar.js b/monitor/pages/components/tabBar/tabBar.js new file mode 100644 index 0000000..84e868e --- /dev/null +++ b/monitor/pages/components/tabBar/tabBar.js @@ -0,0 +1,45 @@ +// monitor/pages/components/tabBar/tabBar.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + url: String, + active: { + type:Number, + value:0 + } + }, + + /** + * 组件的初始数据 + */ + data: { + // active: 0 + }, + + /** + * 组件的方法列表 + */ + methods: { + onChange(e){ + this.setData({ active: e.detail }); + if (e.detail == '0') {//首页 + wx.reLaunch({ + url: '/monitor/pages/home/home', + }) + }else if(e.detail == '1'){//电站 + wx.reLaunch({ + url: '/monitor/pages/station/station', + }) + }else if(e.detail == '2'){//我的 + wx.reLaunch({ + url: '/monitor/pages/center/center', + }) + } + + } + + } +}) \ No newline at end of file diff --git a/monitor/pages/components/tabBar/tabBar.json b/monitor/pages/components/tabBar/tabBar.json new file mode 100644 index 0000000..21164f6 --- /dev/null +++ b/monitor/pages/components/tabBar/tabBar.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "van-tabbar": "@vant/weapp/tabbar/index", + "van-tabbar-item": "@vant/weapp/tabbar-item/index" + } +} \ No newline at end of file diff --git a/monitor/pages/components/tabBar/tabBar.wxml b/monitor/pages/components/tabBar/tabBar.wxml new file mode 100644 index 0000000..1ed2eaa --- /dev/null +++ b/monitor/pages/components/tabBar/tabBar.wxml @@ -0,0 +1,6 @@ + + + 首页 + 工单电站 + 个人中心 + \ No newline at end of file diff --git a/monitor/pages/components/tabBar/tabBar.wxss b/monitor/pages/components/tabBar/tabBar.wxss new file mode 100644 index 0000000..5a7a975 --- /dev/null +++ b/monitor/pages/components/tabBar/tabBar.wxss @@ -0,0 +1 @@ +/* monitor/pages/components/tabBar/tabBar.wxss */ \ No newline at end of file diff --git a/monitor/pages/components/timePicker/timePicker.js b/monitor/pages/components/timePicker/timePicker.js new file mode 100644 index 0000000..61549c3 --- /dev/null +++ b/monitor/pages/components/timePicker/timePicker.js @@ -0,0 +1,566 @@ + +Component({ + /** + * 组件的属性列表 + */ + properties: { + isTabar:Boolean, + pickerShow: { + type: Boolean, + observer:function(val){ //弹出动画 + // console.log(this.data); + if(val){ + let animation = wx.createAnimation({ + duration: 500, + timingFunction: "ease" + }); + let animationOpacity = wx.createAnimation({ + duration: 500, + timingFunction: "ease" + }); + setTimeout(() => { + // animation.bottom(0).step(); + animationOpacity.opacity(0.5).step(); + this.setData({ + animationOpacity: animationOpacity.export(), + animationData: animation.export() + }) + }, 0); + }else{ + let animation = wx.createAnimation({ + duration: 100, + timingFunction: "ease" + }); + let animationOpacity = wx.createAnimation({ + duration: 500, + timingFunction: "ease" + }); + // animation.bottom(-320).step(); + animationOpacity.opacity(0).step(); + this.setData({ + animationOpacity: animationOpacity.export(), + animationData: animation.export() + }); + } + + // 在picker滚动未停止前点确定,会使startValue数组各项归零,发生错误,这里判断并重新初始化 + // 微信新增了picker滚动的回调函数,已进行兼容 + if(this.data.startValue&&this.data.endValue){ + let s = 0, e = 0; + let conf = this.data.config; + + this.data.startValue.map(val => { + if (val == 0) { + s++ + } + }) + this.data.endValue.map(val => { + if (val == 0) { + e++; + } + }); + let tmp={ + hour:4, + minute:5, + second:6 + } + let n = tmp[conf.column]; + if (s>=n || e>=n) { + this.initPick(); + this.setData({ + startValue: this.data.startValue, + endValue: this.data.endValue, + }); + } + } + + + } + }, + config: Object + }, + + /** + * 组件的初始数据 + */ + data: { + // pickerShow:true + // limitStartTime: new Date().getTime()-1000*60*60*24*30, + // limitEndTime: new Date().getTime(), + // yearStart:2000, + // yearEnd:2100 + }, + detached: function() { + // console.log("dele"); + }, + attached: function() {}, + ready: function() { + this.readConfig(); + this.initPick(this.data.config || null); + this.setData({ + startValue: this.data.startValue, + endValue: this.data.endValue, + }); + + + + + }, + /** + * 组件的方法列表 + */ + methods: { + //读取配置项 + readConfig() { + let limitEndTime = new Date().getTime(); + let limitStartTime = new Date().getTime() - 1000 * 60 * 60 * 24 * 30; + if (this.data.config) { + let conf = this.data.config; + + if (typeof conf.dateLimit == "number") { + limitStartTime = + new Date().getTime() - 1000 * 60 * 60 * 24 * conf.dateLimit; + } + if(conf.limitStartTime){ + + limitStartTime = new Date(conf.limitStartTime.replace(/-/g,'/')).getTime(); + } + + if (conf.limitEndTime) { + limitEndTime = new Date(conf.limitEndTime.replace(/-/g, '/')).getTime(); + } + + this.setData({ + yearStart: conf.yearStart || 2000, + yearEnd: conf.yearEnd || 2100, + endDate: conf.endDate || false, + dateLimit: conf.dateLimit || false, + hourColumn: + conf.column == "hour" || + conf.column == "minute" || + conf.column == "second", + minColumn: conf.column == "minute" || conf.column == "second", + secColumn: conf.column == "second" + }); + } + + let limitStartTimeArr = formatTime(limitStartTime); + let limitEndTimeArr = formatTime(limitEndTime); + + this.setData({ + limitStartTime, + limitStartTimeArr, + limitEndTime, + limitEndTimeArr + }); + }, + preventD:function(){ + + }, + //滚动开始 + handlePickStart:function(e){ + this.setData({ + isPicking:true + }) + }, + //滚动结束 + handlePickEnd:function(e){ + this.setData({ + isPicking:false + }) + }, + onConfirm: function() { + //滚动未结束时不能确认 + if(this.data.isPicking){return} + let startTime = new Date(this.data.startPickTime.replace(/-/g, "/")); + let endTime = new Date(this.data.endPickTime.replace(/-/g, "/")); + if (startTime <= endTime || !this.data.endDate) { + this.setData({ + startTime, + endTime + }); + let startArr = formatTime(startTime).arr; + let endArr = formatTime(endTime).arr; + let format0 = function(num){ + return num<10?'0'+num:num + } + + let startTimeBack = + startArr[0] + + "-" + + format0(startArr[1]) + + "-" + + format0(startArr[2]) + + " " + + (this.data.hourColumn ? format0(startArr[3]) : "00") + + ":" + + (this.data.minColumn ? format0(startArr[4]) : "00") + + ":" + + (this.data.secColumn ? format0(startArr[5]) : "00"); + + let endTimeBack = + endArr[0] + + "-" + + format0(endArr[1]) + + "-" + + format0(endArr[2]) + + " " + + (this.data.hourColumn ? format0(endArr[3]) : "00") + + ":" + + (this.data.minColumn ? format0(endArr[4]) : "00") + + ":" + + (this.data.secColumn ? format0(endArr[5]) : "00"); + + let time = { + startTime: startTimeBack, + endTime: endTimeBack + }; + + //触发自定义事件 + this.triggerEvent("setPickerTime", time); + this.triggerEvent("hidePicker", {}); + } else { + wx.showToast({ + icon: "none", + title: "时间不合理" + }); + } + }, + hideModal: function() { + + this.triggerEvent("hidePicker", {}); + }, + changeStartDateTime: function(e) { + let val = e.detail.value; + + this.compareTime(val, "start"); + }, + + changeEndDateTime: function(e) { + let val = e.detail.value; + this.compareTime(val, "end"); + }, + //比较时间是否在范围内 + compareTime(val, type) { + let h = val[3] ? this.data.HourList[val[3]] : "00"; + let m = val[4] ? this.data.MinuteList[val[4]] : "00"; + let s = val[5] ? this.data.SecondList[val[5]] : "00"; + let time = + this.data.YearList[val[0]] + + "-" + + this.data.MonthList[val[1]] + + "-" + + this.data.DayList[val[2]] + + " " + + h + + ":" + + m + + ":" + + s; + + let start = this.data.limitStartTime; + let end = this.data.limitEndTime; + let timeNum = new Date(time.replace(/-/g, '/')).getTime(); + let year, month, day, hour, min, sec, limitDate; + let tempArr = [] + + if (!this.data.dateLimit){ + limitDate = [ + this.data.YearList[val[0]], + this.data.MonthList[val[1]], + this.data.DayList[val[2]], + this.data.HourList[val[3]], + this.data.MinuteList[val[4]], + this.data.SecondList[val[5]]] + } else if (type == "start" && timeNum > new Date(this.data.endPickTime.replace(/-/g, '/')) && this.data.config.endDate) { + limitDate = formatTime(this.data.endPickTime).arr; + + } else if (type == "end" && timeNum < new Date(this.data.startPickTime.replace(/-/g, '/'))) { + limitDate = formatTime(this.data.startPickTime).arr; + + } else if (timeNum < start) { + limitDate = this.data.limitStartTimeArr.arr; + + } else if (timeNum > end) { + limitDate = this.data.limitEndTimeArr.arr; + + } else { + limitDate = [ + this.data.YearList[val[0]], + this.data.MonthList[val[1]], + this.data.DayList[val[2]], + this.data.HourList[val[3]], + this.data.MinuteList[val[4]], + this.data.SecondList[val[5]] + ] + + } + + year = limitDate[0]; + month = limitDate[1]; + day = limitDate[2]; + hour = limitDate[3]; + min = limitDate[4]; + sec = limitDate[5]; + + if (type == "start") { + this.setStartDate(year, month, day, hour, min, sec); + } else if (type == "end") { + this.setEndDate(year, month, day, hour, min, sec); + } + }, + getDays: function(year, month) { + let daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + if (month === 2) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0 + ? 29 + : 28; + } else { + return daysInMonth[month - 1]; + } + }, + initPick: function(initData) { + const date = initData.initStartTime ? new Date(initData.initStartTime.replace(/-/g, '/')): new Date(); + const endDate = initData.initEndTime ? new Date(initData.initEndTime.replace(/-/g, '/')) : new Date(); + // const startDate = new Date(date.getTime() - 1000 * 60 * 60 * 24); + const startDate = date; + const startYear = date.getFullYear(); + const startMonth = date.getMonth() + 1; + const startDay = date.getDate(); + const startHour = date.getHours(); + const startMinute = date.getMinutes(); + const startSecond = date.getSeconds(); + + const endYear = endDate.getFullYear(); + const endMonth = endDate.getMonth() + 1; + const endDay = endDate.getDate(); + const endHour = endDate.getHours(); + const endMinute = endDate.getMinutes(); + const endSecond = endDate.getSeconds(); + + let YearList = []; + let MonthList = []; + let DayList = []; + let HourList = []; + let MinuteList = []; + let SecondList = []; + + //设置年份列表 + for (let i = this.data.yearStart; i <= this.data.yearEnd; i++) { + YearList.push(i); + } + + // 设置月份列表 + for (let i = 1; i <= 12; i++) { + MonthList.push(i); + } + // 设置日期列表 + for (let i = 1; i <= 31; i++) { + DayList.push(i); + } + // 设置时列表 + for (let i = 0; i <= 23; i++) { + if (0 <= i && i < 10) { + i = "0" + i; + } + HourList.push(i); + } + // 分|秒 + for (let i = 0; i <= 59; i++) { + if (0 <= i && i < 10) { + i = "0" + i; + } + MinuteList.push(i); + SecondList.push(i); + } + + this.setData({ + YearList, + MonthList, + DayList, + HourList, + MinuteList, + SecondList + }); + + this.setStartDate(startYear, startMonth, startDay, startHour, startMinute, startSecond); + this.setEndDate(endYear, endMonth, endDay, endHour, endMinute, endSecond); + + //!!! + // setTimeout(() => { + // this.setStartDate(nowYear, nowMonth, nowDay, nowHour, nowMinute) + // this.setEndDate(nowYear, nowMonth, nowDay, nowHour, nowMinute) + // }, 0); + }, + setPickerDateArr(type, year, month, day, hour, minute, second) { + let yearIdx = 0; + let monthIdx = 0; + let dayIdx = 0; + let hourIdx = 0; + let minuteIdx = 0; + let secondIdx = 0; + + this.data.YearList.map((v, idx) => { + if (parseInt(v) === year) { + yearIdx = idx; + } + }); + + this.data.MonthList.map((v, idx) => { + if (parseInt(v) === month) { + monthIdx = idx; + } + }); + + // 重新设置日期列表 + let DayList = []; + for (let i = 1; i <= this.getDays(year, month); i++) { + DayList.push(i); + } + + DayList.map((v, idx) => { + if (parseInt(v) === day) { + dayIdx = idx; + } + }); + if (type == "start") { + this.setData({ startDayList: DayList }); + } else if (type == "end") { + this.setData({ endDayList: DayList }); + } + + this.data.HourList.map((v, idx) => { + if (parseInt(v) === parseInt(hour)) { + hourIdx = idx; + } + }); + + this.data.MinuteList.map((v, idx) => { + if (parseInt(v) === parseInt(minute)) { + minuteIdx = idx; + } + }); + this.data.SecondList.map((v, idx) => { + if (parseInt(v) === parseInt(second)) { + secondIdx = idx; + } + }); + + return { + yearIdx, + monthIdx, + dayIdx, + hourIdx, + minuteIdx, + secondIdx + }; + }, + setStartDate: function(year, month, day, hour, minute, second) { + let pickerDateArr = this.setPickerDateArr( + "start", + year, + month, + day, + hour, + minute, + second + ); + this.setData({ + startYearList: this.data.YearList, + startMonthList: this.data.MonthList, + // startDayList: this.data.DayList, + startHourList: this.data.HourList, + startMinuteList: this.data.MinuteList, + startSecondList: this.data.SecondList, + startValue: [ + pickerDateArr.yearIdx, + pickerDateArr.monthIdx, + pickerDateArr.dayIdx, + pickerDateArr.hourIdx, + pickerDateArr.minuteIdx, + pickerDateArr.secondIdx + ], + startPickTime: + this.data.YearList[pickerDateArr.yearIdx] + + "-" + + this.data.MonthList[pickerDateArr.monthIdx] + + "-" + + this.data.DayList[pickerDateArr.dayIdx] + + " " + + this.data.HourList[pickerDateArr.hourIdx] + + ":" + + this.data.MinuteList[pickerDateArr.minuteIdx] + + ":" + + this.data.SecondList[pickerDateArr.secondIdx] + }); + }, + setEndDate: function(year, month, day, hour, minute, second) { + let pickerDateArr = this.setPickerDateArr( + "end", + year, + month, + day, + hour, + minute, + second + ); + + this.setData({ + endYearList: this.data.YearList, + endMonthList: this.data.MonthList, + // endDayList: this.data.DayList, + endHourList: this.data.HourList, + endMinuteList: this.data.MinuteList, + endSecondList: this.data.SecondList, + endValue: [ + pickerDateArr.yearIdx, + pickerDateArr.monthIdx, + pickerDateArr.dayIdx, + pickerDateArr.hourIdx, + pickerDateArr.minuteIdx, + pickerDateArr.secondIdx + ], + endPickTime: + this.data.YearList[pickerDateArr.yearIdx] + + "-" + + this.data.MonthList[pickerDateArr.monthIdx] + + "-" + + this.data.DayList[pickerDateArr.dayIdx] + + " " + + this.data.HourList[pickerDateArr.hourIdx] + + ":" + + this.data.MinuteList[pickerDateArr.minuteIdx] + + ":" + + this.data.SecondList[pickerDateArr.secondIdx] + }); + }, + } +}); + + +function formatTime(date) { + + if (typeof date == 'string' || 'number') { + try { + date = date.replace(/-/g, '/')//兼容ios + } catch (error) { + } + date = new Date(date) + } + + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return { + str: [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':'), + arr: [year, month, day, hour, minute, second] + } +} +function formatNumber(n) { + n = n.toString() + return n[1] ? n : '0' + n +} diff --git a/monitor/pages/components/timePicker/timePicker.json b/monitor/pages/components/timePicker/timePicker.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/monitor/pages/components/timePicker/timePicker.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/monitor/pages/components/timePicker/timePicker.wxml b/monitor/pages/components/timePicker/timePicker.wxml new file mode 100644 index 0000000..c09d85f --- /dev/null +++ b/monitor/pages/components/timePicker/timePicker.wxml @@ -0,0 +1,68 @@ + + +