This commit is contained in:
2025-06-19 17:33:18 +08:00
commit f8f31dc4d9
437 changed files with 103080 additions and 0 deletions
@@ -0,0 +1,6 @@
{
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index"
},
"navigationBarTitleText": "财务测算"
}
@@ -0,0 +1,251 @@
/* pages/violationReporting/violationReporting.wxss */
page {
background-color: #EFF1F4;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-align {
display: flex;
align-items: center;
}
.flex-end {
display: flex;
align-items: center;
justify-content: flex-end;
}
.box {
background-color: #ffffff;
font-size: 28rpx;
padding: 28rpx 20rpx 0 20rpx;
&:not(:first-child) {
margin-top: 16rpx;
}
.row {
.left {
color: #333F53;
font-weight: bold;
.bg {
width: 8rpx;
height: 44rpx;
background: linear-gradient(180deg, #4E87FC 0%, #38B1FE 100%);
border-radius: 4rpx;
margin-right: 16rpx;
}
}
.right {
color: #2E3A4F;
.btn {
display: flex;
align-items: center;
image {
margin-right: 4px;
width: 20px;
height: 20px;
}
}
}
}
.info-item {
padding: 8px 20rpx;
background-color: #fff;
.left {
color: #2F3B50;
width: 50%;
.label {
color: #858CA0;
}
}
.right {
width: 50%;
text-align: right;
}
}
.total-item {
background-color: transparent;
padding: 8px 0px 0px;
}
}
.pdb_20 {
padding-bottom: 20rpx;
}
.container {
height: calc(100vh - 100px);
overflow-y: auto;
}
.operateBtn {
width: 100%;
padding: 16px 12px 30px;
background: #fff;
box-sizing: border-box;
border-radius: 8px 8px 0 0;
box-shadow: 0px -2px 12px 0px rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 0;
left: 0;
.submitBtn {
height: 80rpx;
background: linear-gradient(90deg, #3B7CFC 0%, #548BFC 100%);
border-radius: 16rpx;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
}
.cancelBtn {
height: 80rpx;
border-radius: 16rpx;
border: 1px solid #D6D6D6;
line-height: 80rpx;
text-align: center;
}
.button-list {
display: flex;
justify-content: space-between;
}
}
.vehicleCostList {
width: calc (100% - 40rpx);
background: #ECEFF5;
border-radius: 4px;
padding: 20rpx;
margin-top: 8px;
}
.title {
background-color: #F8F9FB;
padding: 8px 20rpx;
border-radius: 4px 4px 0px 0px;
border: 1px solid #E6EAF2;
font-weight: bold;
text-align: center;
}
.title2 {
padding: 8px 0px 10px;
}
.border-bottom {
border-bottom: 2rpx solid #E6EAF2;
}
.total {
font-size: 20px;
font-weight: bold;
color: #4381FC;
margin-right: 8px;
}
.top {
height: 240px;
.top-bg {
width: 100%;
position: relative;
image {
position: absolute;
width: 100%;
}
.second {
top: 10px;
}
}
.content {
position: relative;
top: 6px;
z-index: 10;
padding: 20px 20px;
.content-top {
display: flex;
justify-content: space-between;
align-items: center;
.val {
font-size: 26px;
font-weight: bold;
color: #4381FC;
}
}
.content-middle {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.item {
width: calc((100% - 20px) / 3);
height: 72px;
background: #ECEFF5;
border-radius: 8px;
margin-top: 6px;
text-align: center;
.val-container {
position: relative;
width: 100%;
height: 34px;
}
.val {
width: 100%;
max-height: 100%;
font-size: 20px;
font-weight: bold;
color: #4381FC;
overflow-wrap: break-word;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.label {
display: flex;
align-items: center;
justify-content: center;
line-height: 1.1;
}
.over9 {
font-size: 16px;
}
.over12 {
font-size: 14px;
}
.over14 {
font-size: 13px;
}
}
}
}
}
@@ -0,0 +1,213 @@
import Dialog from '@vant/weapp/dialog/dialog';
import { deleteAction, postAction } from '../../../api/base';
Page({
/**
* 页面的初始数据
*/
data: {
type: '', // add 测算 check 详情
issubmit: false,
// 展开/收起
showBox: {
base: true, // 基本信息
vehicle: true, // 车型信息
result: true, // 测试机构
rentalIncome: true, // 租金收入
manageCostList: true, // 管理、运维、保险费用
incomeAndTax: true, // 收入与税金表
costAndProfitList: true, // 成本与利润表
showBoxChild: {}
},
dataInfo: {} as any, // 数据
showList: {
// 基本信息
baseInfo: [
{ label: '所属项目', prop: 'projectId' },
{ label: '租赁年限', prop: 'yearLimit', append: '年' },
{ label: '融资比例', prop: 'financingRatio', append: '%' },
{ label: '融资利率', prop: 'financingRate', append: '%' },
{ label: '管理分担费用', prop: 'overheadSharing', append: '%' }
],
// 车型信息
vehicleInfo: [
{ label: '车型', prop: 'vehicleType' },
{ label: '单价', prop: 'unitPrice', append: '万元' },
{ label: '上牌费用/购置税', prop: 'purchaseTax', append: '万元' },
{ label: '保险', prop: 'insurance', append: '万元' },
{ label: '维修及易损件(台/年)', prop: 'repair', append: '万元' },
{ label: '保养', prop: 'upkeep', append: '万元' },
{ label: '年审', prop: 'annualAudit', append: '万元' }
],
// 测试结果
result: [
{ label: '购车成本回收期', prop: 'carCostRecovery', append: '年' },
{ label: '融资成本', prop: 'financingCost', append: '万元' },
{ label: '内部收益率', prop: 'internalRate', append: '%' },
{ label: '实缴增值税及附加', prop: 'vatAndAdditional', append: '万元' },
{ label: '所得税', prop: 'incomeTax', append: '万元' },
{ label: '净利润', prop: 'netProfit', append: '万元' },
{ label: '残值', prop: 'salvageValue', append: '万元' }
],
// 固定模板 一至八年
yearList: [
{ label: '第一年', prop: 'oneYear', append: '万元' },
{ label: '第二年', prop: 'twoYear', append: '万元' },
{ label: '第三年', prop: 'threeYear', append: '万元' },
{ label: '第四年', prop: 'fourYear', append: '万元' },
{ label: '第五年', prop: 'fiveYear', append: '万元' },
{ label: '第六年', prop: 'sixYear', append: '万元' },
{ label: '第七年', prop: 'sevenYear', append: '万元' },
{ label: '第八年', prop: 'eightYear', append: '万元' }
]
}
},
// 展示和收起
showBoxInf(e: any) {
let data: any = { ...this.data };
let { fieldname, type, index } = e.currentTarget.dataset;
if (type) {
data.showBox.showBoxChild[fieldname][index] =
!data.showBox.showBoxChild[fieldname][index];
} else data.showBox[fieldname] = !data.showBox[fieldname];
this.setData(data);
},
// 删除
delete() {
Dialog.confirm({
title: '',
message: '是否确认删除当前项?'
})
.then(() => {
deleteAction('api/finance/calculate/delete', {
id: this.data.dataInfo.id
})
.then((res: any) => {
if (res.success) {
wx.showToast({
title: '删除成功',
icon: 'success'
});
setTimeout(() => {
wx.navigateBack({
delta: 1
});
}, 1000);
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
})
.catch((err: any) => {
console.log(err);
});
})
.catch(() => {});
},
// 上一步
goback() {
wx.navigateBack();
},
// 提交
submit() {
if (this.data.issubmit) return;
this.setData({
issubmit: true
});
wx.showLoading({
title: '加载中'
});
postAction('api/finance/calculate/add', this.data.dataInfo)
.then((res: any) => {
if (res.success) {
wx.showToast({
title: '提交成功',
icon: 'none'
});
setTimeout(() => {
wx.navigateBack({
delta: 2
});
}, 1000);
} else {
wx.showToast({
title: res.message,
icon: 'none'
});
}
this.setData({
issubmit: false
});
wx.hideLoading();
})
.catch(err => {
console.log(err);
this.setData({
issubmit: false
});
wx.hideLoading();
});
},
// 获取数据
getInf() {
let { info, type } = wx.getStorageSync('costEstimationData');
let list = {
manageCostList: [],
incomeAndTax: [],
costAndProfitList: []
} as any;
let keys = Object.keys(list);
keys.forEach((item: any) => {
for (let index = 0; index < info.calculateObject[item].length; index++) {
list[item].push(true);
}
});
this.setData({
dataInfo: info,
['showBox.showBoxChild']: list,
type: type
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad() {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getInf();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
});
@@ -0,0 +1,407 @@
<wxs module="test" src="./costEstimationDetail.wxs"></wxs>
<view>
<view class="container">
<view class="box {{showBox.base ? '' : 'pdb_20'}}" wx:if="{{type == 'check'}}">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>基本信息</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.base}}" data-fieldName="base" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.base}}" data-fieldName="base" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.base}}">
<view class="info-item" wx:for="{{showList.baseInfo}}" wx:for-item="item" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{item.label}}</view>
</view>
<view class="right">
<view>{{(dataInfo[item.prop] !== '' && dataInfo[item.prop] !== null) ? dataInfo[item.prop] : '/'}}
{{ (dataInfo[item.prop] !== '' && dataInfo[item.prop] !== null) && item.append ? item.append : ''}}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box pdb_20" wx:if="{{type == 'check'}}">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>车型信息</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.vehicle}}" data-fieldName="vehicle" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.vehicle}}" data-fieldName="vehicle" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.vehicle}}">
<view class="vehicleCostList" wx:for="{{dataInfo.vehicleCostList}}" wx:for-item="item" wx:for-index="index">
<view>
<view class="info-item border-bottom" wx:for="{{showList.vehicleInfo}}" wx:for-item="el" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{el.label}}</view>
</view>
<view class="right">
<view>{{(item[el.prop] !== '' && item[el.prop] !== null) ? item[el.prop] : '/'}}
{{ (item[el.prop] !== '' && item[el.prop] !== '') && el.append ? el.append : ''}}
</view>
</view>
</view>
</view>
</view>
<view style="margin-top: 8px;">
<view class="title">租赁费用(万元/月/台)</view>
<view class="info-item" style="border-bottom: 2rpx solid #E6EAF2;" wx:for="{{showList.yearList}}" wx:for-item="el" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{el.label}}</view>
</view>
<view class="right">
<view>{{(item[el.prop] !== '' && item[el.prop] !== null) ? item[el.prop] : '/'}}{{ (item[el.prop] !== '' && item[el.prop] !== null) && el.append ? el.append : ''}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{type == 'add'}}" class="top">
<view class="top-bg">
<image class="first" src="../../../images/bg_page_blue.png" mode="" />
<image class="second" src="../../../images/top-bg.png" mode="" />
</view>
<view class="content">
<view class="content-top">
<view class="label">净利润(万元)</view>
<view class="val">{{dataInfo.calculateObject.result[0].netProfit}}</view>
</view>
<view class="content-middle">
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].carCostRecovery)}}">{{dataInfo.calculateObject.result[0].carCostRecovery}}</view>
</view>
<view class="label">购车成本回收期(年)</view>
</view>
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].financingCost)}}">{{dataInfo.calculateObject.result[0].financingCost}}</view>
</view>
<view class="label">融资成本(万元)</view>
</view>
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].internalRate)}}">{{dataInfo.calculateObject.result[0].internalRate !== null ? dataInfo.calculateObject.result[0].internalRate : '/'}}</view>
</view>
<view class="label">内部收益率(%</view>
</view>
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].vatAndAdditional)}}">{{dataInfo.calculateObject.result[0].vatAndAdditional}}</view>
</view>
<view class="label">实缴增值税及附加(万元)</view>
</view>
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].incomeTax)}}">{{dataInfo.calculateObject.result[0].incomeTax}}</view>
</view>
<view class="label">所得税(万元)</view>
</view>
<view class="item">
<view class="val-container">
<view class="val {{test.numberLength(dataInfo.calculateObject.result[0].salvageValue)}}">{{dataInfo.calculateObject.result[0].salvageValue}}</view>
</view>
<view class="label">残值(万元)</view>
</view>
</view>
</view>
</view>
<view class="box {{showBox.result ? '' : 'pdb_20'}}" wx:if="{{type == 'check'}}">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>测算结果</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.result}}" data-fieldName="result" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.result}}" data-fieldName="result" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.result}}">
<view class="info-item" wx:for="{{showList.result}}" wx:for-item="item" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{item.label}}</view>
</view>
<view class="right">
<view>{{(dataInfo.calculateObject.result[0][item.prop] !== '' && dataInfo.calculateObject.result[0][item.prop] !== null) ? dataInfo.calculateObject.result[0][item.prop] : '/'}}
{{ (dataInfo.calculateObject.result[0][item.prop] !== '' || dataInfo.calculateObject.result[0][item.prop] !== null) && item.append ? item.append : ''}}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box {{showBox.rentalIncome ? '' : 'pdb_20'}}">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>租金收入</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.rentalIncome}}" data-fieldName="rentalIncome" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.rentalIncome}}" data-fieldName="rentalIncome" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.rentalIncome}}">
<view wx:for="{{dataInfo.calculateObject.rentalIncome}}" wx:for-item="el" wx:for-index="idx">
<view class="info-item border-bottom" wx:for="{{showList.yearList}}" wx:for-item="item" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{item.label}}</view>
</view>
<view class="right">
<view>{{(el[item.prop] !== '' && el[item.prop] !== null) ? el[item.prop] : '/'}}
{{ (el[item.prop] !== '' || el[item.prop] !== null) && item.append ? item.append : ''}}
</view>
</view>
</view>
</view>
<view class="info-item">
<view class="flex-between">
<view class="left flex-align">
<view class="label" style="font-weight: bold;">合计</view>
</view>
<view class="right flex-end ">
<view class="total">{{(el.total !== '' && el.total !== null) ? el.total : '/'}}</view>
<view>万元</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box pdb_20">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>管理、运维、保险费用</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.manageCostList}}" data-fieldName="manageCostList" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.manageCostList}}" data-fieldName="manageCostList" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.manageCostList}}">
<view class="vehicleCostList" wx:for="{{dataInfo.calculateObject.manageCostList}}" wx:for-item="item" wx:for-index="index">
<view>
<view class="row flex-between title2">
<view class="left flex-align">
<view>{{item.itemName}}</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.showBoxChild.manageCostList[index]}}" data-type="showBoxChild" data-fieldName="manageCostList" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.showBoxChild.manageCostList[index]}}" data-type="showBoxChild" data-fieldName="manageCostList" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.showBoxChild.manageCostList[index]}}">
<view class="info-item" style="border-bottom: 2rpx solid #E6EAF2;" wx:for="{{showList.yearList}}" wx:for-item="el" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{el.label}}</view>
</view>
<view class="right">
<view>{{(item[el.prop] !== '' && item[el.prop] !== null) ? item[el.prop] : '/'}}{{ (item[el.prop] !== '' && item[el.prop] !== null) && el.append ? el.append : ''}}</view>
</view>
</view>
</view>
</view>
<view class="total-item">
<view class="flex-between">
<view class="left flex-align">
<view class="label" style="font-weight: bold;">合计</view>
</view>
<view class="right flex-end ">
<view class="total">{{(item.total !== '' && item.total !== null) ? item.total : '/'}}</view>
<view>万元</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box pdb_20">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>收入与税金表</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.incomeAndTax}}" data-fieldName="incomeAndTax" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.incomeAndTax}}" data-fieldName="incomeAndTax" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.incomeAndTax}}">
<view class="vehicleCostList" wx:for="{{dataInfo.calculateObject.incomeAndTax}}" wx:for-item="item" wx:for-index="index">
<view>
<view class="row flex-between title2">
<view class="left flex-align">
<view>{{item.itemName}}</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.showBoxChild.incomeAndTax[index]}}" data-type="showBoxChild" data-fieldName="incomeAndTax" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.showBoxChild.incomeAndTax[index]}}" data-type="showBoxChild" data-fieldName="incomeAndTax" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.showBoxChild.incomeAndTax[index]}}">
<view class="info-item" style="border-bottom: 2rpx solid #E6EAF2;" wx:for="{{showList.yearList}}" wx:for-item="el" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{el.label}}</view>
</view>
<view class="right">
<view>{{(item[el.prop] !== '' && item[el.prop] !== null) ? item[el.prop] : '/'}}{{ (item[el.prop] !== '' && item[el.prop] !== null) && el.append ? el.append : ''}}</view>
</view>
</view>
</view>
</view>
<view class="total-item">
<view class="flex-between">
<view class="left flex-align">
<view class="label" style="font-weight: bold;">合计</view>
</view>
<view class="right flex-end ">
<view class="total">{{(item.total !== '' && item.total !== null) ? item.total : '/'}}</view>
<view>万元</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="box pdb_20">
<view class="row flex-between">
<view class="left flex-align">
<view class="bg"></view>
<view>成本与利润表</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.costAndProfitList}}" data-fieldName="costAndProfitList" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.costAndProfitList}}" data-fieldName="costAndProfitList" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.costAndProfitList}}">
<view class="vehicleCostList" wx:for="{{dataInfo.calculateObject.costAndProfitList}}" wx:for-item="item" wx:for-index="index">
<view>
<view class="row flex-between title2">
<view class="left flex-align">
<view>{{item.itemName}}</view>
</view>
<view class="right">
<view class="btn" wx:if="{{showBox.showBoxChild.costAndProfitList[index]}}" data-type="showBoxChild" data-fieldName="costAndProfitList" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_up.png" mode="" />
<view class="val">收起</view>
</view>
<view class="btn" wx:if="{{!showBox.showBoxChild.costAndProfitList[index]}}" data-type="showBoxChild" data-fieldName="costAndProfitList" data-index="{{index}}" catch:tap="showBoxInf">
<image src="../../../images/icon_down.png" mode="" />
<view class="val">展开</view>
</view>
</view>
</view>
<view wx:if="{{showBox.showBoxChild.costAndProfitList[index]}}">
<view class="info-item" style="border-bottom: 2rpx solid #E6EAF2;" wx:for="{{showList.yearList}}" wx:for-item="el" wx:for-index="index">
<view class="flex-between">
<view class="left flex-align">
<view class="label">{{el.label}}</view>
</view>
<view class="right">
<view>{{(item[el.prop] !== '' && item[el.prop] !== null) ? item[el.prop] : '/'}}{{ (item[el.prop] !== '' && item[el.prop] !== null) && el.append ? el.append : ''}}</view>
</view>
</view>
</view>
</view>
<view class="total-item">
<view class="flex-between">
<view class="left flex-align">
<view class="label" style="font-weight: bold;">合计</view>
</view>
<view class="right flex-end ">
<view class="total">{{(item.total !== '' && item.total !== null) ? item.total : '/'}}</view>
<view>万元</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="operateBtn">
<view catchtap="delete" class="cancelBtn" wx:if="{{type == 'check'}}">删除</view>
<view class="button-list" wx:if="{{type == 'add'}}">
<view class="cancelBtn" style="width: 49%;" catchtap="goback">上一步</view>
<view class="submitBtn" style="width: 49%;" catchtap="submit">提交</view>
</view>
</view>
<van-dialog id="van-dialog" />
</view>
@@ -0,0 +1,22 @@
var obj = {
numberLength: function (value) {
if(value) {
var num = (value + '').length
if(num > 9 && num <= 12) {
return 'over9'
}
if(num > 12 && num <= 14) {
return 'over12'
}
if(num > 14) {
return 'over14'
}
else return ''
}
return ''
},
}
module.exports = {
numberLength: obj.numberLength
}