| @@ -30,7 +30,10 @@ | |||||
| "pages/project/project", | "pages/project/project", | ||||
| "pages/project/add/add", | "pages/project/add/add", | ||||
| "pages/contract/contract", | "pages/contract/contract", | ||||
| "pages/contract/add/add" | |||||
| "pages/contract/add/add", | |||||
| "pages/fixedAssets/fixedAssets", | |||||
| "pages/fixedAssets/add/add", | |||||
| "pages/finance/finance" | |||||
| ], | ], | ||||
| "window": { | "window": { | ||||
| "backgroundTextStyle": "light", | "backgroundTextStyle": "light", | ||||
| @@ -0,0 +1,131 @@ | |||||
| // pages/handle/liist.js | |||||
| import * as UTIL from '../../utils/util.js'; | |||||
| import * as API from '../../utils/API.js'; | |||||
| const app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| isIPX: app.globalData.isIPX, | |||||
| pageNums:1, | |||||
| scrollHeight:"", | |||||
| financeList:[], | |||||
| index:0, | |||||
| array:["收支明细公开"], | |||||
| userInfoObj:[], | |||||
| date: UTIL.formatDates(new Date), | |||||
| data:{} | |||||
| }, | |||||
| onConfirmReviewTime(e){ | |||||
| let data = e.detail.value; | |||||
| this.setData({ | |||||
| 'date':data, | |||||
| 'pageNums':1}); | |||||
| this.getList(); | |||||
| }, | |||||
| paging(){ | |||||
| this.setData({ | |||||
| pageNums:this.data.pageNums+1, | |||||
| }) | |||||
| this.getList(); | |||||
| }, | |||||
| getList:function(){ | |||||
| let params = { | |||||
| pageNum:this.data.pageNums, | |||||
| pageSize:10, | |||||
| startNY:this.data.date, | |||||
| all:false | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_FINANCIALLIST,params,{ | |||||
| success: (res) => { | |||||
| console.log(res); | |||||
| if(res.code == 200){ | |||||
| this.setData({'data':res.summary}) | |||||
| if(this.data.pageNums!=1&&this.data.financeList.length<res.total){ | |||||
| let lists = this.data.financeList.concat(res.rows) | |||||
| this.setData({financeList:lists}) | |||||
| }else if(this.data.pageNums==1){ | |||||
| this.setData({financeList:res.rows}) | |||||
| } | |||||
| }else{ | |||||
| UTIL.showToastNoneIcon(res.msg); | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad: function (options) { | |||||
| this.setData({ | |||||
| scrollHeight:wx.getSystemInfoSync().windowHeight | |||||
| }) | |||||
| this.getList() | |||||
| }, | |||||
| bindPickerChange:function(e){ | |||||
| this.setData({index:e.detail.value}); | |||||
| }, | |||||
| switchTab:function(e){ | |||||
| this.setData({ | |||||
| active:e.currentTarget.dataset.gid | |||||
| }) | |||||
| }, | |||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide: function () { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh: function () { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom: function () { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage: function () { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,5 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "van-empty": "@vant/weapp/empty/index" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,61 @@ | |||||
| <!--pages/handle/liist.wxml--> | |||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">财务公开</text> | |||||
| </view> | |||||
| <view class="work_plan" style="margin-top:{{isIPX?'85px':'75px'}};"> | |||||
| <view style="border:1px solid #ddd;background: #fff;border-radius: 30rpx;line-height: 60rpx;padding: 0 25rpx;"> | |||||
| <picker mode="date" value="{{date}}" start="{{ minDate }}" end="{{ maxDate }}" fields="month" bindchange="onConfirmReviewTime"> | |||||
| <view class="picker"> | |||||
| <image src="../../image/icon/calendar_icon.png" style="height:25rpx;width:25rpx;margin-right: 10rpx;"></image> | |||||
| {{date}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view style="border:1px solid #ddd;background: #fff;border-radius: 30rpx;line-height: 60rpx;padding: 0 25rpx;"> | |||||
| <picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}" > | |||||
| <view class="picker"> | |||||
| {{array[index]}} | |||||
| <image src="../../image/icon/triangle.png" style="height:25rpx;width:25rpx;margin-right: 10rpx;"></image> | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| </view> | |||||
| <view class="banner"> | |||||
| <view class="banner_tabs"> | |||||
| <view>上月结余</view> | |||||
| <view>¥{{data.syjc}}</view> | |||||
| </view> | |||||
| <view class="banner_tabs"> | |||||
| <view>支出</view> | |||||
| <view>¥{{data.dai}}</view> | |||||
| </view> | |||||
| <view class="banner_tabs"> | |||||
| <view>收入</view> | |||||
| <view>¥{{data.jie}}</view> | |||||
| </view> | |||||
| <view class="banner_tabs"> | |||||
| <view>本月结存</view> | |||||
| <view>¥{{data.byjc}}</view> | |||||
| </view> | |||||
| </view> | |||||
| <scroll-view scroll-y refresher-threshold="0" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||||
| <view class="workflow" wx:for-item="item" wx:for="{{financeList}}" wx:key="index" data-type="up" > | |||||
| <!--1--> | |||||
| <view class="workflow_list"> | |||||
| <view class="process_intro"> | |||||
| <view class="name">{{item.voucherSummary}}</view> | |||||
| <view class="amount" wx:if="{{item.jieAmount}}">¥+{{item.jieAmount?item.jieAmount:""}}</view> | |||||
| <view class="amounts" wx:if="{{item.daiAmount}}">¥-{{item.daiAmount?item.daiAmount:""}}</view> | |||||
| </view> | |||||
| <view class="process_pay"> | |||||
| <view class="describe"> | |||||
| <text class="textLimit">{{item.voucherWord?item.voucherWord:""}}-{{item.num?item.num:""}}</text> | |||||
| </view> | |||||
| <view class="time">{{item.bookDate?item.bookDate:""}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <van-empty wx:if="{{todoNum == 0}}" description="暂无待办数据" /> | |||||
| </scroll-view> | |||||
| @@ -0,0 +1,201 @@ | |||||
| /* pages/handle/liist.wxss */ | |||||
| .work_plan{ | |||||
| padding: 40rpx 32.5rpx 30rpx; | |||||
| display: flex; | |||||
| } | |||||
| .work_plan .menu_item{ | |||||
| height: 60rpx; | |||||
| width: 140rpx; | |||||
| background-color: #fff; | |||||
| box-shadow: 0rpx 0rpx 9rpx rgba(0,0,0,.2); | |||||
| border-radius: 60rpx; | |||||
| line-height: 60rpx; | |||||
| text-align: center; | |||||
| font-size: 32rpx; | |||||
| position: relative; | |||||
| margin-right: 16rpx; | |||||
| } | |||||
| .work_plan .menu_item.active{ | |||||
| background-color: #5bae78; | |||||
| color: #fff; | |||||
| } | |||||
| .work_plan .menu_item .remind{ | |||||
| height: 30rpx; | |||||
| background: #e90101; | |||||
| color: #fff; | |||||
| font-size: 26rpx; | |||||
| position: absolute; | |||||
| line-height: 30rpx; | |||||
| padding:0 10rpx; | |||||
| border-radius: 50%; | |||||
| top: -10rpx; | |||||
| right: -10rpx; | |||||
| } | |||||
| .work_plan .more{ | |||||
| flex: 1; | |||||
| text-align: center; | |||||
| line-height: 60rpx; | |||||
| font-size: 36rpx; | |||||
| color: #31936c; | |||||
| } | |||||
| .workflow{ | |||||
| padding: 10rpx 32.5rpx; | |||||
| } | |||||
| .workflow .workflow_list{ | |||||
| height: 150rpx; | |||||
| background-color: #fff; | |||||
| border-radius: 24rpx; | |||||
| box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); | |||||
| margin-bottom: 20rpx; | |||||
| padding:15rpx 25rpx 10rpx 35rpx; | |||||
| } | |||||
| .workflow .workflow_list .process_intro{ | |||||
| display: flex; | |||||
| height: 62rpx; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .process_intro .name{ | |||||
| width: 390rpx; | |||||
| font-size: 34rpx; | |||||
| margin-right: 30rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .process_intro .name .name_tit{ | |||||
| width: 290rpx; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| white-space: nowrap; | |||||
| } | |||||
| .agree{ | |||||
| background-color: rgba(92, 174, 119, 0.1); | |||||
| color:#5CAE77 ; | |||||
| text-align: center; | |||||
| float: right; | |||||
| padding: 2px 5px; | |||||
| border-radius: 5px; | |||||
| font-size: 12px; | |||||
| } | |||||
| .in{ | |||||
| background-color: rgba(245, 163, 39, 0.1); | |||||
| color:#F5A327 ; | |||||
| text-align: center; | |||||
| float: right; | |||||
| padding: 2px 5px; | |||||
| border-radius: 5px; | |||||
| font-size: 12px; | |||||
| } | |||||
| .disagree{ | |||||
| background-color: rgba(233, 0, 0, 0.1); | |||||
| color:#E90000 ; | |||||
| text-align: center; | |||||
| float: right; | |||||
| padding: 2px 5px; | |||||
| border-radius: 5px; | |||||
| font-size: 12px; | |||||
| } | |||||
| .workflow .process_intro .state{ | |||||
| width: 93rpx; | |||||
| height: 42rpx; | |||||
| background-color: #fbe3e3; | |||||
| color: #f31e1f; | |||||
| border-radius: 12rpx; | |||||
| text-align: center; | |||||
| line-height: 42rpx; | |||||
| } | |||||
| .workflow .time{ | |||||
| flex: 1; | |||||
| text-align: right; | |||||
| font-size: 32rpx; | |||||
| color: #9ea1aa; | |||||
| } | |||||
| .workflow .workflow_list .process_pay{ | |||||
| display: flex; | |||||
| height: 52rpx; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .workflow_list .process_pay .describe{ | |||||
| font-size: 30rpx; | |||||
| width: 330rpx; | |||||
| color: #3c9370; | |||||
| display: flex; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .workflow_list .process_pay .describe .amount_icon{ | |||||
| width: 32rpx; | |||||
| height: 32rpx; | |||||
| margin-right: 12rpx; | |||||
| } | |||||
| .workflow .workflow_list .amount{ | |||||
| font-size: 38rpx; | |||||
| flex: 1; | |||||
| text-align: right; | |||||
| color: #f31e1f; | |||||
| } | |||||
| .workflow .workflow_list .amounts{ | |||||
| font-size: 38rpx; | |||||
| flex: 1; | |||||
| text-align: right; | |||||
| color:#4caf50; | |||||
| } | |||||
| .workflow .workflow_list .process_pay .amount .unit{ | |||||
| font-size: 26rpx; | |||||
| } | |||||
| .work_plan{ | |||||
| padding: 40rpx 32.5rpx 30rpx; | |||||
| display: flex; | |||||
| justify-content:space-between; | |||||
| background-color: #FFF; | |||||
| } | |||||
| .work_plan .menu_item{ | |||||
| height: 60rpx; | |||||
| width: 180rpx; | |||||
| background-color: #fff; | |||||
| box-shadow: 0rpx 0rpx 9rpx rgba(0,0,0,.2); | |||||
| border-radius: 60rpx; | |||||
| line-height: 60rpx; | |||||
| text-align: center; | |||||
| font-size: 32rpx; | |||||
| position: relative; | |||||
| margin-right: 16rpx; | |||||
| padding:0 10rpx; | |||||
| display: inline-block; | |||||
| } | |||||
| .work_plan .menu_item.active{ | |||||
| background-color: #5bae78; | |||||
| color: #fff; | |||||
| } | |||||
| .remind{ | |||||
| height: 30rpx; | |||||
| background: #e90101; | |||||
| color: #fff; | |||||
| font-size: 26rpx; | |||||
| position: absolute; | |||||
| line-height: 30rpx; | |||||
| padding:0 10rpx; | |||||
| border-radius: 50%; | |||||
| top: -10rpx; | |||||
| right: -10rpx; | |||||
| } | |||||
| .textLimit{ | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| white-space: nowrap; | |||||
| } | |||||
| .banner { | |||||
| display: flex;background:#4caf50;color:#fff;text-align: center;margin:3%;border-radius: 20rpx;line-height: 50rpx; | |||||
| } | |||||
| .banner_tabs{ | |||||
| flex:1;padding:20rpx 0; | |||||
| } | |||||
| @@ -0,0 +1,539 @@ | |||||
| // pages/contract/add/add.js | |||||
| import * as UTIL from '../../../utils/util.js'; | |||||
| import * as API from '../../../utils/API.js'; | |||||
| const app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| isIPX: app.globalData.isIPX, | |||||
| id:null, | |||||
| form:{ | |||||
| reviewTime:'2022-01-01', | |||||
| buildingTime:'2022-01-01', | |||||
| startTime:'2022-01-01', | |||||
| endTime:'2022-01-01', | |||||
| biddingDate:'2022-01-01', | |||||
| fixedValue:'153:固定资产清理', | |||||
| fixedSubject:'152:累计折旧', | |||||
| depreciationSubject:'541005:管理费用-折旧及修理费', | |||||
| originalValue:0.00, | |||||
| quantity:0.00, | |||||
| netValue:0.00, | |||||
| residualsRate:1, | |||||
| netSalvage:0.00, | |||||
| expectedYears:1, | |||||
| depreciationYears:0, | |||||
| depreciationValue:0, | |||||
| }, | |||||
| assetTypeindex:'0', | |||||
| operationTypendex:'0', | |||||
| addTypeindex:'0', | |||||
| useTypeindex:'0', | |||||
| depreciationTypeindex:'0', | |||||
| assetStatusindex:'0', | |||||
| isFormAssetindex:'0', | |||||
| isMinindex:'0', | |||||
| unitindex:'0', | |||||
| showBiddingDate:false, | |||||
| minDate: new Date(2008, 5, 1).getTime(), | |||||
| maxDate: new Date(2040, 0, 31).getTime(), | |||||
| // 资产类别字典 | |||||
| assetTypeOptions: [], | |||||
| // 经营属性字典 | |||||
| operationTypeOptions: [], | |||||
| // 增加方式字典 | |||||
| addTypeOptions: [], | |||||
| // 使用情况字典 | |||||
| useTypeOptions: [], | |||||
| // 折旧方式字典 | |||||
| depreciationTypeOptions: [], | |||||
| // 资产状态字典 | |||||
| assetStatusOptions: [], | |||||
| // 系统是否字典 | |||||
| sysYesNoOptions: [], | |||||
| //单位字段 | |||||
| unitOptions:[], | |||||
| }, | |||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| openBox(even){ | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.name]:true | |||||
| }) | |||||
| }, | |||||
| onChange(event){ | |||||
| this.setData({ | |||||
| [event.currentTarget.dataset.formname]: event.detail, | |||||
| }) | |||||
| console.log(this.data.form); | |||||
| }, | |||||
| closeBox(even){ | |||||
| this.setData({ | |||||
| [even.currentTarget.dataset.name]:false | |||||
| }) | |||||
| }, | |||||
| onConfirmBuildTime(e){ | |||||
| let data = this.getNewDate(new Date(e.detail.value)); | |||||
| this.setData({'form.buildTime':data}); | |||||
| }, | |||||
| onConfirmOperationType (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.operationType':this.data.operationTypeOptions[obj].dictValue, | |||||
| 'operationTypeindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmAddType (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.addWay':this.data.addWayOptions[obj].dictValue, | |||||
| 'addWayindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmUseType (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.useType':this.data.useTypeOptions[obj].dictValue, | |||||
| 'useTypeindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmAssetStatus (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.assetStatus':this.data.assetStatusOptions[obj].dictValue, | |||||
| 'assetStatusindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmIsMin (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.isMin':this.data.isMinOptions[obj].dictValue, | |||||
| 'isMinindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmAssetType (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.assetType':this.data.assetTypeOptions[obj].dictValue, | |||||
| 'assetTypeindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmIsFormAsset (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.isFormAsset':this.data.isFormAssetOptions[obj].dictValue, | |||||
| 'isFormAssetindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmUnit (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.unit':this.data.unitOptions[obj].dictValue, | |||||
| 'unitindex':obj | |||||
| }) | |||||
| }, | |||||
| onConfirmDepreciationType (e) { | |||||
| let obj = e.detail.value; | |||||
| this.setData({ | |||||
| 'form.depreciationType':this.data.depreciationTypeOptions[obj].dictValue, | |||||
| 'depreciationTypeindex':obj | |||||
| }) | |||||
| }, | |||||
| getNewDate(date){ | |||||
| //date是传过来的时间戳,注意需为13位,10位需*1000 | |||||
| //也可以不传,获取的就是当前时间 | |||||
| var time = new Date(date); | |||||
| var year= time.getFullYear() //年 | |||||
| var month = ("0" + (time.getMonth() + 1)).slice(-2); //月 | |||||
| var day = ("0" + time.getDate()).slice(-2); //日 | |||||
| var mydate = year + "-" + month + "-" + day; | |||||
| return mydate | |||||
| }, | |||||
| goSubmit:function(){ | |||||
| if(this.data.form.code==''||this.data.form.code==null){ //合同编码 | |||||
| UTIL.showToastNoneIcon('请填写资产编码!'); | |||||
| return false; | |||||
| }else if(this.data.form.name==''||this.data.form.name==null){ //合同名称 | |||||
| UTIL.showToastNoneIcon('请输入资产名称!'); | |||||
| return false; | |||||
| }else if(this.data.form.assetType==''||this.data.form.assetType==null){ //甲方 | |||||
| UTIL.showToastNoneIcon('资产类别不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.operationType==''||this.data.form.operationType==null){ //乙方 | |||||
| UTIL.showToastNoneIcon('经营属性不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.addType == ''||this.data.form.addType==null){//收付款类型 | |||||
| UTIL.showToastNoneIcon('增加方式能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.buildTime == ''||this.data.form.buildTime==null){//合同来源 | |||||
| UTIL.showToastNoneIcon('构建时间不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.useType == ''||this.data.form.useType==null){//合同金额 | |||||
| UTIL.showToastNoneIcon('使用情况不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.assetStatus == ''||this.data.form.assetStatus==null){//签订日期 | |||||
| UTIL.showToastNoneIcon('资产状态不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.quantity == ''||this.data.form.quantity==null){//开始日期 | |||||
| UTIL.showToastNoneIcon('请输入数量、面积!'); | |||||
| return false; | |||||
| }else if(this.data.form.unit == ''||this.data.form.unit==null){//结束日期 | |||||
| UTIL.showToastNoneIcon('计量单位不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.originalValue == ''||this.data.form.originalValue==null){//单价 | |||||
| UTIL.showToastNoneIcon('原值不能为空!'); | |||||
| return false; | |||||
| }else if(this.data.form.depreciationType == ''||this.data.form.depreciationType==null){//已结款 | |||||
| UTIL.showToastNoneIcon('折旧方式不能为空!'); | |||||
| return false; | |||||
| }else{ | |||||
| if(this.data.form.id!=null&&this.data.form.id!=""){ | |||||
| let data = this.data.form; | |||||
| data.method = "POST"; | |||||
| UTIL.httpRequest(API.URL_POST_PERMANENTUPDATE,data,{ | |||||
| success: (res) => { | |||||
| if(res.code == 200){ | |||||
| UTIL.showToastNoneIcon('修改成功'); | |||||
| }else{ | |||||
| UTIL.showToastNoneIcon('修改失败'); | |||||
| } | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| let data = this.data.form; | |||||
| data.method = "POST"; | |||||
| UTIL.httpRequest(API.URL_POST_PERMANENTADD,data,{ | |||||
| success: (res) => { | |||||
| if(res.code == 200){ | |||||
| UTIL.showToastNoneIcon(res.msg); | |||||
| }else{ | |||||
| UTIL.showToastNoneIcon(res.msg); | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| bindNewInput: function (e) { | |||||
| this.setData({ | |||||
| [e.currentTarget.dataset.name]: e.detail.value | |||||
| }) | |||||
| console.log(e); | |||||
| if(e.currentTarget.dataset.name == 'form.originalValue' ){ | |||||
| this.setData({ | |||||
| 'form.netValue' : e.detail.value, | |||||
| 'form.netSalvage' : this.data.form.residualsRate*e.detail.value/100, | |||||
| 'form.perYearDepreciationValue' : (e.detail.value-(this.data.form.residualsRate*e.detail.value/100))/this.data.form.expectedYears | |||||
| }) | |||||
| if(e.currentTarget.dataset.name == 'form.residualsRate' ){ | |||||
| this.setData({ | |||||
| 'form.netSalvage' : this.data.form.originalValue*e.detail.value, | |||||
| }) | |||||
| } | |||||
| if(e.currentTarget.dataset.name == 'form.netSalvage' ){ | |||||
| this.setData({ | |||||
| 'form.perYearDepreciationValue' : (this.data.form.originalValue-e.detail.value)/this.data.form.expectedYears | |||||
| }) | |||||
| } | |||||
| if(e.currentTarget.dataset.name == 'form.expectedYears' ){ | |||||
| this.setData({ | |||||
| 'form.perYearDepreciationValue' : (this.data.form.originalValue-this.data.form.netSalvage)/e.detail.value | |||||
| }) | |||||
| } | |||||
| if(e.currentTarget.dataset.name == 'form.depreciationYears' ){ | |||||
| this.setData({ | |||||
| 'form.depreciationValue' : this.data.form.netSalvage*e.detail.value | |||||
| }) | |||||
| } | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad(options) { | |||||
| if(options.id!=null&&options.id!=""){ | |||||
| this.setData({id:options.id}) | |||||
| //获取收入合同状态 | |||||
| UTIL.httpRequest(API.URL_GET_PERMANENTDETAIL + this.data.id, {method:'GET'}, { | |||||
| success: (res) => { | |||||
| this.setData({'form':res.data}); | |||||
| console.log(res.data); | |||||
| let that = this; | |||||
| //获取资产类别 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| assetTypeOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.assetType){ | |||||
| that.setData({'assetTypeindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取经营属性 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'operation_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| operationTypeOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.operationType){ | |||||
| that.setData({'operationTypeindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取增加方式 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'add_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| addTypeOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.addType){ | |||||
| that.setData({'addTypeindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取使用情况 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'use_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| useTypeOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.useType){ | |||||
| that.setData({'useTypeindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取折旧方式 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'depreciation_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| depreciationTypeOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.depreciationType){ | |||||
| that.setData({'depreciationTypeindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取资产状态 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_status', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| assetStatusOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.assetStatus){ | |||||
| that.setData({'assetStatusindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取单位 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'fixed_assets_unit', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| unitOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.unit){ | |||||
| that.setData({'unitindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取系统是否 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'sys_yes_no', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| that.setData({ | |||||
| sysYesNoOptions:r.data, | |||||
| }) | |||||
| r.data.map((rr,ind) => { | |||||
| if(rr.dictValue == res.data.isMin){ | |||||
| that.setData({'isMinindex':ind}) | |||||
| } | |||||
| if(rr.dictValue == res.data.isFormAsset){ | |||||
| that.setData({'isFormAssetindex':ind}) | |||||
| } | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| let that = this; | |||||
| //获取资产类别 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| assetTypeOptions:res.data, | |||||
| 'form.assetType':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取经营属性 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'operation_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| operationTypeOptions:res.data, | |||||
| 'form.operationType':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取增加方式 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'add_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| addTypeOptions:res.data, | |||||
| 'form.addType':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取使用情况 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'use_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| useTypeOptions:res.data, | |||||
| 'form.useType':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取折旧方式 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'depreciation_type', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| depreciationTypeOptions:res.data, | |||||
| 'form.depreciationType':res.data[1].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取资产状态 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_status', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| assetStatusOptions:res.data, | |||||
| 'form.assetStatusOptions':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取单位 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'fixed_assets_unit', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| unitOptions:res.data, | |||||
| 'form.unit':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| //获取是否 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'sys_yes_no', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| that.setData({ | |||||
| sysYesNoOptions:res.data, | |||||
| 'form.isMin':res.data[0].dictValue, | |||||
| 'form.isFormAsset':res.data[0].dictValue | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload() { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage() { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,9 @@ | |||||
| { | |||||
| "navigationStyle": "custom", | |||||
| "usingComponents": { | |||||
| "van-field": "@vant/weapp/field/index", | |||||
| "van-popup": "@vant/weapp/popup/index", | |||||
| "van-picker": "@vant/weapp/picker/index", | |||||
| "van-calendar": "@vant/weapp/calendar/index" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,265 @@ | |||||
| <!--pages/contract/add/add.wxml--> | |||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back" referrer="no-referrer|origin|unsafe-url"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"":"新增"}}资产信息</text> | |||||
| </view> | |||||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <view style="margin-bottom:15px;"> | |||||
| <image src="../../../image/icon/fixed_contract_icon.png" referrer="no-referrer|origin|unsafe-url" style="width: 15px;height: 15px;margin-right: 10px;"></image> | |||||
| <text class="tit">基本信息</text> | |||||
| </view> | |||||
| <view class="table-boxs"> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 10rpx;">*</text>资产编码</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.code}}" bindinput="bindNewInput" data-name="form.code" placeholder="请输入资产编码" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 10rpx;">*</text>资产名称</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.name}}" bindinput="bindNewInput" data-name="form.name" placeholder="请输入资产名称" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>资产类别</view> | |||||
| <picker bindchange="onConfirmAssetType" value="{{assetTypeindex}}" range="{{assetTypeOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{assetTypeOptions[assetTypeindex].dictLabel?assetTypeOptions[assetTypeindex].dictLabel:"选择资产类别"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>经营属性</view> | |||||
| <picker bindchange="onConfirmOperationType" value="{{operationTypeindex}}" range="{{operationTypeOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{operationTypeOptions[operationTypeindex].dictLabel?operationTypeOptions[operationTypeindex].dictLabel:"选择经营属性"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>增加方式</view> | |||||
| <picker bindchange="onConfirmAddType" value="{{addTypeindex}}" range="{{addOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{addTypeOptions[addTypeindex].dictLabel?addTypeOptions[addTypeindex].dictLabel:"选择增加方式"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>构建时间</view> | |||||
| <picker mode="date" value="{{form.buildTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmBuildTime"> | |||||
| <view class="picker"> | |||||
| {{form.buildTime}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>坐落位置</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.location}}" bindinput="bindNewInput" data-name="form.location" placeholder="请输入坐落位置" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>规格型号</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.specification}}" bindinput="bindNewInput" data-name="form.specification" placeholder="请输入规格型号" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>供应商</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.supplier}}" bindinput="bindNewInput" data-name="form.supplier" placeholder="请输入供应商" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>使用情况</view> | |||||
| <picker bindchange="onConfirmUseType" value="{{useTypeindex}}" range="{{useTypeOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{useTypeOptions[useTypeindex].dictLabel?useTypeOptions[useTypeindex].dictLabel:"选择使用情况"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>资产状态</view> | |||||
| <picker bindchange="onConfirmAssetStatus" value="{{assetStatusindex}}" range="{{assetStatusOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{assetStatusOptions[assetStatusindex].dictLabel?assetStatusOptions[assetStatusindex].dictLabel:"选择资产状态"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>单元资产</view> | |||||
| <picker bindchange="onConfirmIsMin" value="{{isMinindex}}" range="{{sysYesNoOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{sysYesNoOptions[isMinindex].dictLabel?sysYesNoOptions[isMinindex].dictLabel:"选择单元资产"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>扶贫资产</view> | |||||
| <picker bindchange="onConfirmIsFormAsset" value="{{isFormAssetindex}}" range="{{sysYesNoOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{sysYesNoOptions[isFormAssetindex].dictLabel?sysYesNoOptions[isFormAssetindex].dictLabel:"选择扶贫资产"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="main-box table-box" style="margin-top:15px;"> | |||||
| <view style="margin-bottom:15px;"> | |||||
| <image src="../../../image/icon/target_icon.png" style="width: 15px;height: 15px;margin-right: 10px;" referrer="nor-referrer|origin|unsafe-url"></image> | |||||
| <text class="tit">资产数据</text> | |||||
| </view> | |||||
| <view class="table-boxs"> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>数量/面积</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.quantity}}" bindinput="bindNewInput" data-name="form.quantity" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>计量单位</view> | |||||
| <picker bindchange="onConfirmUnit" value="{{unitindex}}" range="{{unitOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{unitOptions[unitindex].dictLabel?unitOptions[unitindex].dictLabel:"选择计量单位"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>原值(元)</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.originalValue}}" bindinput="bindNewInput" data-name="form.originalValue" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>净值(元)</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.netValue}}" bindinput="bindNewInput" data-name="form.netValue" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>残值率 N%</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.residualsRate}}" bindinput="bindNewInput" data-name="form.residualsRate" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>净残值(元)</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.netSalvage}}" bindinput="bindNewInput" data-name="form.netSalvage" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>资产清理(元)</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.fixedValue}}" bindinput="bindNewInput" data-name="form.fixedValue" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>资产清理科目</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.fixedSubject}}" bindinput="bindNewInput" disabled="true" data-name="form.fixedSubject" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>折旧科目</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.depreciationSubject}}" bindinput="bindNewInput" data-name="form.depreciationSubject" disabled="true" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>折旧费用科目</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.depreciationFeeSubject}}" disabled="true" bindinput="bindNewInput" data-name="form.depreciationFeeSubject" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>备注</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.remark}}" bindinput="bindNewInput" data-name="form.remark" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="main-box table-box" style="margin-top:15px;"> | |||||
| <view style="margin-bottom:15px;"> | |||||
| <image src="../../../image/icon/target_icon.png" style="width: 15px;height: 15px;margin-right: 10px;" referrer="nor-referrer|origin|unsafe-url"></image> | |||||
| <text class="tit">折旧方式</text> | |||||
| </view> | |||||
| <view class="table-boxs"> | |||||
| <view class="section"> | |||||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>折旧方式</view> | |||||
| <picker bindchange="onConfirmDepreciationType" value="{{depreciationTypeindex}}" range="{{depreciationTypeOptions}}" range-key="{{'dictLabel'}}"> | |||||
| <view class="picker"> | |||||
| {{depreciationTypeOptions[depreciationTypeindex].dictLabel?depreciationTypeOptions[depreciationTypeindex].dictLabel:"选择折旧方式"}} | |||||
| </view> | |||||
| </picker> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>预计使用年数</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.expectedYears}}" bindinput="bindNewInput" data-name="form.expectedYears" type="digit" placeholder="(原值-净残值)/预计使用年数" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>每年折旧额:</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.perYearDepreciationValue}}" bindinput="bindNewInput" data-name="form.perYearDepreciationValue" type="digit" disabled="true" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>已折旧年数</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.depreciationYears}}" bindinput="bindNewInput" data-name="form.depreciationYears" type="digit" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| <view> | |||||
| <view> | |||||
| <text><text style="color:red;margin-right: 22rpx;"></text>累计折旧(元)</text> | |||||
| </view> | |||||
| <view> | |||||
| <input type="text" value="{{form.depreciationValue}}" bindinput="bindNewInput" data-name="form.depreciationValue" disabled="true" | |||||
| type="digit" style="text-align: right;margin-top: 20rpx;" /> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="bottom"> | |||||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||||
| </view> | |||||
| @@ -0,0 +1,69 @@ | |||||
| /* pages/payee/add/add.wxss */ | |||||
| .main-box{ | |||||
| background: #ffffff; | |||||
| padding: 20px; | |||||
| width: 94%; | |||||
| margin: 0 auto; | |||||
| border-radius: 10px; | |||||
| box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); | |||||
| } | |||||
| .table-box van-field van-cell .van-cell{ | |||||
| margin-bottom: 15px; | |||||
| } | |||||
| .table-box van-field:last-child van-cell .van-cell{ | |||||
| margin-bottom: 0px; | |||||
| } | |||||
| .van-cell{ | |||||
| padding: 0!important; | |||||
| margin-bottom: 15px; | |||||
| } | |||||
| .van-cell__value { | |||||
| display: flex; | |||||
| justify-content: flex-end; | |||||
| } | |||||
| .van-radio--horizontal { | |||||
| margin-right: 0!important; | |||||
| margin-left: var(--padding-sm,12px) | |||||
| } | |||||
| .van-cell--required:before { | |||||
| left: 0!important; | |||||
| } | |||||
| .van-field__label { | |||||
| padding-left: 10px; | |||||
| } | |||||
| .tit{ | |||||
| line-height: 20px; | |||||
| font-size: 16px; | |||||
| font-weight: bold; | |||||
| } | |||||
| .bottom{ | |||||
| width: 100%; | |||||
| margin: 0 auto; | |||||
| text-align: center; | |||||
| margin-top: 30px; | |||||
| margin-bottom: 30px; | |||||
| display: flex; | |||||
| } | |||||
| .bottom view { | |||||
| width: 47%; | |||||
| margin: 0 auto; | |||||
| border-radius: 30px; | |||||
| display: inline-block; | |||||
| } | |||||
| .bottom .btn2{ | |||||
| border: 1px solid transparent; | |||||
| padding: 8px 0px; | |||||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
| color: #fff; | |||||
| } | |||||
| .table-boxs>view{ | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| line-height: 80rpx; | |||||
| } | |||||
| .table-box text{ | |||||
| line-height: 80rpx; | |||||
| } | |||||
| @@ -0,0 +1,356 @@ | |||||
| // pages/bank/bank.js | |||||
| import * as UTIL from '../../utils/util.js'; | |||||
| import * as API from '../../utils/API.js'; | |||||
| let EVN_CONFIG = require('../../env/env'); | |||||
| const DISTRIBUTE_ENVIROMENT = 'IMGURL'; | |||||
| let { | |||||
| URL_PREFIX, | |||||
| } = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; | |||||
| const app = getApp(); | |||||
| Page({ | |||||
| /** | |||||
| * 页面的初始数据 | |||||
| */ | |||||
| data: { | |||||
| isIPX: app.globalData.isIPX, | |||||
| list:[], | |||||
| isLoading:false, | |||||
| pageNums:1, | |||||
| scrollHeight:"", | |||||
| name:"", | |||||
| showUpload:false, | |||||
| uploadOptions:[], | |||||
| fileList:[], | |||||
| showPopup:false, | |||||
| fileEvent:{}, | |||||
| itemId:"", | |||||
| assetTypeOptions:[] | |||||
| }, | |||||
| goAdd(){ | |||||
| wx.navigateTo({ | |||||
| url: 'add/add', | |||||
| }) | |||||
| }, | |||||
| back:function(){ | |||||
| wx.navigateBack({ | |||||
| delta: 1 | |||||
| }) | |||||
| }, | |||||
| assetTypeDict(val){ | |||||
| this.data.assetTypeOptions.map(res => { | |||||
| if(res.dictValue == val){ | |||||
| return res.dictLabel | |||||
| } | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面加载 | |||||
| */ | |||||
| onLoad(options) { | |||||
| var that = this; | |||||
| that.setData({ | |||||
| scrollHeight:wx.getSystemInfoSync().windowHeight | |||||
| }) | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面初次渲染完成 | |||||
| */ | |||||
| onReady() { | |||||
| //获取附件字典 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'common_attach', {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.data.length>0){ | |||||
| this.setData({ | |||||
| uploadOptions:res.data, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| this.getList(); | |||||
| }, | |||||
| getList:function(){ | |||||
| let params = { | |||||
| pageNum:this.data.pageNums, | |||||
| pageSize:10, | |||||
| name:this.data.name | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_PERMANENTLIST,params,{ | |||||
| success: (res) => { | |||||
| console.log(res); | |||||
| let _this = this | |||||
| if(res.code == 200){ | |||||
| if(this.data.pageNums!=1&&this.data.list.length<res.total){ | |||||
| let lists = this.data.list.concat(res.rows) | |||||
| //获取资产类别 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| let li = lists.map( res => { | |||||
| r.data.map(rr => { | |||||
| if(res.assetType == rr.dictValue){ | |||||
| res.assetType = rr.dictLabel | |||||
| } | |||||
| }) | |||||
| return res | |||||
| }) | |||||
| _this.setData({list:li}) | |||||
| }else{ | |||||
| _this.setData({list:lists}) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }else if(this.data.pageNums==1){ | |||||
| //获取资产类别 | |||||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'asset_type', {method:'GET'}, { | |||||
| success: (r) => { | |||||
| if(r.data.length>0){ | |||||
| let li = res.rows.map( ress => { | |||||
| r.data.map(rr => { | |||||
| if(ress.assetType == rr.dictValue){ | |||||
| ress.assetType = rr.dictLabel | |||||
| } | |||||
| }) | |||||
| return ress | |||||
| }) | |||||
| _this.setData({list:li}) | |||||
| }else{ | |||||
| _this.setData({list:res.rows}) | |||||
| } | |||||
| } | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| UTIL.showToastNoneIcon(res.msg); | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| paging(){ | |||||
| this.setData({ | |||||
| pageNums:this.data.pageNums+1, | |||||
| }) | |||||
| this.getList(); | |||||
| }, | |||||
| goSearch(e){ | |||||
| this.setData({name:e.detail}); | |||||
| this.setData({pageNums:1}); | |||||
| this.getList(); | |||||
| }, | |||||
| goUpdate(e){ | |||||
| wx.navigateTo({ | |||||
| url: '/pages/fixedAssets/add/add?id='+e.currentTarget.dataset.id, | |||||
| }) | |||||
| }, | |||||
| delete(e){ | |||||
| UTIL.httpRequest(API.URL_GET_PERMANENTDELETE + e.currentTarget.dataset.id, {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.code==200){ | |||||
| let new_list = this.data.list | |||||
| console.log(e.currentTarget.dataset.index); | |||||
| new_list.splice(e.currentTarget.dataset.index,1) | |||||
| this.setData({'list':new_list}) | |||||
| UTIL.showToastNoneIcon('删除成功!'); | |||||
| }else{ | |||||
| UTIL.showToastNoneIcon('删除失败!'); | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| upload(e){ | |||||
| this.setData({itemId:e.currentTarget.dataset.id}); | |||||
| this.asyncFun(e.currentTarget.dataset.id) | |||||
| }, | |||||
| asyncFun(id){ | |||||
| this.setData({"fileList":[]}) | |||||
| let uploadList = this.data.uploadOptions | |||||
| let newList = [] | |||||
| let _this = this | |||||
| uploadList.map( res => { | |||||
| let oData = { | |||||
| tableId: id, | |||||
| tableName: "t_asset_permanent", //上传表 | |||||
| bizPath: "asset", | |||||
| fileType: res.dictValue, //附件类型 1原始发票 2会议纪要 3会议照片 4 参会人员签字 | |||||
| method:'GET' | |||||
| } | |||||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||||
| success: (rr) => { | |||||
| if(rr.rows.length>0){ | |||||
| rr.rows.map((rrr,index) => { | |||||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||||
| if(index==rr.rows.length-1){ | |||||
| newList.push(Object.assign({},res,{"list":rr.rows})) | |||||
| _this.setData({"fileList":_this.data.fileList.concat(newList)}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| let newuploadList = uploadList | |||||
| newuploadList.map(rd => { | |||||
| rd.list = newList | |||||
| }) | |||||
| _this.setData({"fileList":newuploadList}); | |||||
| _this.setData({"showUpload":true}) | |||||
| } | |||||
| }, | |||||
| fail:(rr) =>{ | |||||
| console.log(rr); | |||||
| }, | |||||
| complete:(rr) => { | |||||
| console.log(rr); | |||||
| } | |||||
| }) | |||||
| }) | |||||
| }, | |||||
| closeBox(){ | |||||
| this.setData({"showUpload":false}) | |||||
| }, | |||||
| deleteImg(event){ | |||||
| this.setData({"fileEvent":event}) | |||||
| this.setData({"showPopup":true}); | |||||
| }, | |||||
| cancelTem:function(e){ | |||||
| this.setData({"fileEvent":"{}"}); | |||||
| this.setData({"showPopup":false}); | |||||
| }, | |||||
| confirmTem:function(e){ | |||||
| let event = this.data.fileEvent | |||||
| console.log(event); | |||||
| UTIL.httpRequest(API.URL_GET_GETFILEREMOVE+event.detail.file.id , {method:'GET'}, { | |||||
| success: (res) => { | |||||
| if(res.code==200){ | |||||
| let ll = this.data.fileList | |||||
| var jsonlist = ll[event.target.dataset.idx].list; | |||||
| jsonlist.splice(event.detail.index, 1) | |||||
| ll[event.target.dataset.idx].list = jsonlist | |||||
| this.setData({"fileList":ll}) | |||||
| this.setData({showPopup:false}); | |||||
| wx.showToast({ | |||||
| title: '删除成功!', | |||||
| icon: 'success', | |||||
| duration: 2000, | |||||
| }) | |||||
| } | |||||
| } | |||||
| }) | |||||
| }, | |||||
| uploadFile(uploadFile,event) { | |||||
| let _this = this | |||||
| return new Promise((resolve, reject) => { | |||||
| wx.uploadFile({ | |||||
| url: API.URL_GET_UPLOAD, | |||||
| filePath: uploadFile.file.file[0].url, | |||||
| name: 'file', | |||||
| header: { | |||||
| "Content-Type": "multipart/form-data",//记得设置 | |||||
| "chartset":"utf-8", | |||||
| 'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||||
| }, | |||||
| formData:uploadFile, | |||||
| success: (res) => { | |||||
| res.data = JSON.parse(res.data); | |||||
| if(res.statusCode == 200){ | |||||
| let files = _this.data.fileList | |||||
| let fName = res.data.fileUrl.split('/') | |||||
| let fLength = fName.length | |||||
| files[event.currentTarget.dataset.idx].list.push({ | |||||
| "fileName": fName[fLength-1], | |||||
| "fileType": "0", | |||||
| "fileUrl":res.data.fileUrl , | |||||
| "id": res.data.id, | |||||
| "tableId": 6, | |||||
| "url":URL_PREFIX+res.data.fileUrl | |||||
| }) | |||||
| _this.setData({"fileList":files}) | |||||
| wx.hideLoading() | |||||
| } | |||||
| }, | |||||
| fail: (err) => { | |||||
| //上传失败:修改pedding为reject | |||||
| reject(err) | |||||
| } | |||||
| }); | |||||
| }) | |||||
| }, | |||||
| afterRead(event) { | |||||
| let _this = this | |||||
| wx.showLoading({ | |||||
| title: '上传中...' | |||||
| }) | |||||
| let fileForm={ | |||||
| file: event.detail, | |||||
| fileType:event.currentTarget.dataset.idx, | |||||
| tableName: "t_asset_permanent", //上传表 | |||||
| bizPath: "asset", | |||||
| tableId:_this.data.itemId | |||||
| } | |||||
| this.uploadFile(fileForm,event) | |||||
| }, | |||||
| lookDown(file,detail){ | |||||
| // 获取指定字符串最后一次出现的位置,返回index | |||||
| var index1 = file.detail.url.lastIndexOf('.'); | |||||
| // substr(start, length) 抽取从start下标开始的length个字符,返回新的字符串; | |||||
| var style = file.detail.url.substr(index1 + 1) | |||||
| //判断图片类型,不需要下载,不做处理 | |||||
| if(style=='png'||style=='jpg'||style=='jpeg'||style=='bmp'||style=='gif'||style=='webp'||style=='psd'||style== 'svg'||style=='tiff'){ | |||||
| //判断非图片类型 | |||||
| }else{ | |||||
| wx.downloadFile({ | |||||
| url: file.detail.url, | |||||
| success(data){ | |||||
| wx.openDocument({ | |||||
| filePath: data.tempFilePath, | |||||
| fileType: style, | |||||
| showMenu:true, | |||||
| success(res){ | |||||
| } | |||||
| }) | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面显示 | |||||
| */ | |||||
| onShow() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面隐藏 | |||||
| */ | |||||
| onHide() { | |||||
| }, | |||||
| /** | |||||
| * 生命周期函数--监听页面卸载 | |||||
| */ | |||||
| onUnload() { | |||||
| }, | |||||
| /** | |||||
| * 页面相关事件处理函数--监听用户下拉动作 | |||||
| */ | |||||
| onPullDownRefresh() { | |||||
| }, | |||||
| /** | |||||
| * 页面上拉触底事件的处理函数 | |||||
| */ | |||||
| onReachBottom() { | |||||
| }, | |||||
| /** | |||||
| * 用户点击右上角分享 | |||||
| */ | |||||
| onShareAppMessage() { | |||||
| } | |||||
| }) | |||||
| @@ -0,0 +1,14 @@ | |||||
| { | |||||
| "usingComponents": { | |||||
| "van-checkbox": "@vant/weapp/checkbox/index", | |||||
| "van-checkbox-group": "@vant/weapp/checkbox-group/index", | |||||
| "van-cell": "@vant/weapp/cell/index", | |||||
| "van-cell-group": "@vant/weapp/cell-group/index", | |||||
| "van-search": "@vant/weapp/search/index", | |||||
| "van-radio": "@vant/weapp/radio/index", | |||||
| "van-radio-group": "@vant/weapp/radio-group/index", | |||||
| "van-swipe-cell": "@vant/weapp/swipe-cell/index", | |||||
| "van-action-sheet": "@vant/weapp/action-sheet/index", | |||||
| "van-upload": "@vant/weapp/uploader/index" | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,79 @@ | |||||
| <!--pages/bank/bank.wxml--> | |||||
| <view class="ns" style="height:{{isIPX?'88px':'64px'}};"> | |||||
| <image src="../../image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back" referrer="no-referrer|origin|unsafe-url"></image> | |||||
| <text style="top:{{isIPX?'54px':'30px'}};">固定资产</text> | |||||
| </view> | |||||
| <view class="search_box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||||
| <van-search | |||||
| value="{{ name }}" | |||||
| shape="round" | |||||
| background="transparent" | |||||
| placeholder="请输入搜索关键词" | |||||
| clearable | |||||
| bind:change="goSearch" | |||||
| /> | |||||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||||
| </view> | |||||
| <scroll-view scroll-y refresher-threshold="0" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{list}}" wx:key="index" wx:for-item="item" > | |||||
| <view class="li" bindtap="goUpdate" data-id="{{item.id}}"> | |||||
| <view class="tit_box"> | |||||
| <image src="/image/icon/fixedAssets_icon.png" style="width: 15px;height: 15px;margin-right: 10px;" referrer="no-referrer|origin|unsafe-url"></image> | |||||
| <text class="tit">{{item.name}}</text> | |||||
| <view style="flex:1;"> | |||||
| <text wx:if="{{item.useType=='1'}}" style="text-align: center;float:right;font-size:12px;background:rgb(235, 154, 4,0.2);color:rgb(235, 154, 4);width:50px;line-height: 20px;">自用</text> | |||||
| <text wx:if="{{item.useType=='2'}}" style="text-align: center;float:right;font-size:12px;background:rgb(235, 154, 4,0.2);color:rgb(235, 154, 4);width:50px;line-height: 20px;">闲置</text> | |||||
| <text wx:if="{{item.useType=='3'}}" style="text-align: center;float:right;font-size:12px;background:rgb(235, 154, 4,0.2);color:rgb(235, 154, 4);width:70px;line-height: 20px;">出租或出借</text> | |||||
| <text wx:if="{{item.useType=='4'}}" style="text-align: center;float:right;font-size:12px;background:rgb(235, 4, 4,0.2);color:rgb(235, 4, 4);width:50px;line-height: 20px;">其他</text> | |||||
| </view> | |||||
| </view> | |||||
| <view class="detail_box"> | |||||
| <view style="width: 55%;margin-left:5%;">{{item.code}}</view> | |||||
| <view style="width: 40%;"> | |||||
| {{item.assetType}} | |||||
| </view> | |||||
| </view> | |||||
| <view class="detail_box"> | |||||
| <view style="width: 60%;"> | |||||
| <image src="/image/icon/clock_icon.png" style="width: 15px;height: 15px;border-radius:5px;margin-right: 5px;"></image> | |||||
| <text>{{item.buildTime}}</text> | |||||
| </view> | |||||
| <view style="width: 40%;text-align: right;"> | |||||
| 原值: | |||||
| <text style="color:red">¥{{item.originalValue}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view slot="right" class="deleteBox"> | |||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"></image> | |||||
| </view> | |||||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||||
| <image src="../../image/apply/icon_add.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"></image> | |||||
| </view> | |||||
| </view> | |||||
| </van-swipe-cell> | |||||
| </scroll-view> | |||||
| <van-action-sheet show="{{showUpload}}" title="附件" bind:close="closeBox"> | |||||
| <scroll-view scroll-y="true" style="height: 600rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||||
| <view class="fj-box"> | |||||
| <view class="fj-li" wx:for="{{fileList}}" wx:key="index" wx:for-item="item" > | |||||
| <view> | |||||
| <text>{{item.dictLabel}}</text> | |||||
| </view> | |||||
| <view class="img_box"> | |||||
| <view class="img_li"> | |||||
| <van-upload file-list="{{ item.list }}" bind:after-read="afterRead" bind:delete="deleteImg" bind:click-preview="lookDown" multiple="{{true}}" data-idx="{{index}}"> | |||||
| </van-upload> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </scroll-view> | |||||
| </van-action-sheet> | |||||
| <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | |||||
| </modal> | |||||
| @@ -0,0 +1,272 @@ | |||||
| /* pages/bank/bank.wxss */ | |||||
| .van-search__content { | |||||
| border: 1px solid #5CAE77!important; | |||||
| background: #fff!important; | |||||
| } | |||||
| van-search { | |||||
| flex: 0.8; | |||||
| } | |||||
| .search_box{ | |||||
| display: flex; | |||||
| } | |||||
| .add_btn{ | |||||
| flex: 0.2; | |||||
| padding: var(--search-padding,10px 12px); | |||||
| padding-left: 0; | |||||
| } | |||||
| .add_btn text{ | |||||
| background-color: #62AD66; | |||||
| display: block; | |||||
| height: 100%; | |||||
| text-align: center; | |||||
| line-height: 36px; | |||||
| color: #fff; | |||||
| border-radius: 36px; | |||||
| box-shadow: 0px 5px 5px #ddd; | |||||
| } | |||||
| text{display: block;} | |||||
| .work_plan{ | |||||
| padding: 40rpx 32.5rpx 30rpx; | |||||
| display: flex; | |||||
| } | |||||
| .work_plan .menu_item{ | |||||
| background-color: #fff; | |||||
| box-shadow: 2px 5px 5px #ddd; | |||||
| border-radius: 60rpx; | |||||
| text-align: center; | |||||
| position: relative; | |||||
| margin-right: 20px; | |||||
| padding: 8px 10px; | |||||
| } | |||||
| .work_plan .menu_item.active{ | |||||
| background-color: #2C8E68; | |||||
| color: #fff; | |||||
| } | |||||
| .work_plan .menu_item .remind{ | |||||
| height: 30rpx; | |||||
| background: #e90101; | |||||
| color: #fff; | |||||
| font-size: 26rpx; | |||||
| position: absolute; | |||||
| line-height: 30rpx; | |||||
| padding:0 10rpx; | |||||
| border-radius: 25px; | |||||
| top: -10rpx; | |||||
| right: -10rpx; | |||||
| } | |||||
| .work_plan .more{ | |||||
| flex: 1; | |||||
| text-align: center; | |||||
| line-height: 60rpx; | |||||
| font-size: 36rpx; | |||||
| color: #31936c; | |||||
| } | |||||
| .deleteBox{ | |||||
| width: 130px; | |||||
| text-align: center; | |||||
| height: 100%; | |||||
| background: #F6F6F6; | |||||
| align-items: center; | |||||
| display: flex; | |||||
| } | |||||
| .workflow .workflow_list{ | |||||
| height: 150rpx; | |||||
| background-color: #fff; | |||||
| border-radius: 24rpx; | |||||
| box-shadow:0rpx 0rpx 10rpx rgba(0,0,0,.1); | |||||
| margin-bottom: 20rpx; | |||||
| padding:15rpx 25rpx 10rpx 35rpx; | |||||
| } | |||||
| .workflow .workflow_list .process_intro{ | |||||
| display: flex; | |||||
| height: 62rpx; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .process_intro .name{ | |||||
| width: 390rpx; | |||||
| font-size: 34rpx; | |||||
| margin-right: 30rpx; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| align-items: center; | |||||
| } | |||||
| .workflow .process_intro .name .name_tit{ | |||||
| width: 290rpx; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| white-space: nowrap; | |||||
| } | |||||
| .van-swipe-cell { | |||||
| width: 94%; | |||||
| background: #fff; | |||||
| border-radius: 10px; | |||||
| box-shadow: 2px 5px 5px #ddd; | |||||
| margin: 0 auto; | |||||
| margin-bottom: 15px; | |||||
| } | |||||
| .li{ | |||||
| width: 100%; | |||||
| padding: 14px; | |||||
| } | |||||
| .tit_box{ | |||||
| display: flex; | |||||
| } | |||||
| .detail_box{ | |||||
| margin-top: 10px; | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| } | |||||
| .li view text{ | |||||
| /* margin-top: 15px; */ | |||||
| } | |||||
| .li .detail_box view{ | |||||
| display: flex; | |||||
| align-items: center; | |||||
| } | |||||
| .li .detail_box view text{ | |||||
| color: #666666; | |||||
| font-size: 12px; | |||||
| } | |||||
| .li view text:nth-child(1){ | |||||
| margin-top: 0px; | |||||
| } | |||||
| .li .fksr{ | |||||
| display: flex; | |||||
| align-items: center; | |||||
| margin-top: 15px; | |||||
| color: #2C8E68; | |||||
| font-size: 16px; | |||||
| } | |||||
| .li .wtj{ | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: center; | |||||
| padding: 3px 8px; | |||||
| border-radius: 5px; | |||||
| font-size: 14px; | |||||
| } | |||||
| .no{ | |||||
| background-color:#fbe3e3; | |||||
| color: #e90000; | |||||
| } | |||||
| .white{ | |||||
| background-color:#feeadc; | |||||
| color: #fc9a55; | |||||
| } | |||||
| .yes{ | |||||
| background-color:#ddeee3; | |||||
| color: #5cae77; | |||||
| } | |||||
| .other{ | |||||
| background-color:#f0f1f6; | |||||
| color: #878787; | |||||
| } | |||||
| .li .tit{ | |||||
| font-size: 14px; | |||||
| color: #444444; | |||||
| line-height: 14px; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 1; | |||||
| word-break: break-all; | |||||
| overflow: hidden; | |||||
| } | |||||
| .li .fj_name{ | |||||
| font-size: 14px; | |||||
| color: #B3DB62; | |||||
| line-height: 25px; | |||||
| } | |||||
| .li .time{ | |||||
| font-size: 14px; | |||||
| color: #9B9CAA; | |||||
| } | |||||
| .li .money{ | |||||
| font-size: 18px; | |||||
| color: #5CAE77; | |||||
| } | |||||
| .van-checkbox__label { | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| width: 100%; | |||||
| } | |||||
| .van-checkbox__icon-wrap { | |||||
| border-radius: 5px; | |||||
| } | |||||
| .van-checkbox__icon { | |||||
| border-radius: 5px; | |||||
| border: 2px solid #2C8E68!important; | |||||
| background-color: rgba(44, 142, 104, 0.2); | |||||
| } | |||||
| .bottom{ | |||||
| width: 100%; | |||||
| margin: 0 auto; | |||||
| text-align: center; | |||||
| padding: 15px 0; | |||||
| display: flex; | |||||
| position: fixed; | |||||
| bottom: 0%; | |||||
| background: #fff; | |||||
| box-shadow: 0 0 5px #ddd; | |||||
| } | |||||
| .bottom view { | |||||
| width: 47%; | |||||
| margin: 0 auto; | |||||
| border-radius: 30px; | |||||
| display: inline-block; | |||||
| } | |||||
| .bottom .btn2{ | |||||
| border: 1px solid transparent; | |||||
| padding: 10px 0px; | |||||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||||
| color: #fff; | |||||
| } | |||||
| .downView{ | |||||
| display: flex; | |||||
| justify-content: center; | |||||
| align-items: center; | |||||
| padding: 0 20px; | |||||
| border: 1px solid #5CAE77; | |||||
| border-radius: 50px; | |||||
| background: #fff; | |||||
| margin-left: auto; | |||||
| } | |||||
| .downView image{ | |||||
| width: 10px; | |||||
| height: 8px; | |||||
| margin-left: 10px; | |||||
| } | |||||
| .fj-box text{ | |||||
| background-color: #5CAE77; | |||||
| color: #ffffff; | |||||
| text-align: center; | |||||
| border-radius: 5px; | |||||
| white-space:pre-wrap; | |||||
| padding: 5rpx 8rpx; | |||||
| width: 50rpx; | |||||
| margin: 0px 14px; | |||||
| font-size: 24rpx; | |||||
| } | |||||
| .fj-li{ | |||||
| margin-top: 20px; | |||||
| display: flex; | |||||
| /* flex-wrap: wrap; */ | |||||
| } | |||||
| .fj-li .img_li{ | |||||
| width: 100%; | |||||
| height: 18.5vw; | |||||
| } | |||||
| .fj-li .img_add{ | |||||
| overflow: hidden; | |||||
| } | |||||
| .van-icon-description{ | |||||
| font-size: 60px; | |||||
| } | |||||
| @@ -63,7 +63,7 @@ | |||||
| </view> | </view> | ||||
| <text class="desc">记账申请</text> | <text class="desc">记账申请</text> | ||||
| </view> | </view> | ||||
| <view class="tab_item" bindtap="showModal"> | |||||
| <view class="tab_item" data-url="/pages/finance/finance" bindtap="navigate"> | |||||
| <view class="icon"> | <view class="icon"> | ||||
| <image class="icon_img" src="../../image/index/nav_04.png" mode="aspectFit"></image> | <image class="icon_img" src="../../image/index/nav_04.png" mode="aspectFit"></image> | ||||
| </view> | </view> | ||||
| @@ -94,21 +94,13 @@ | |||||
| <text class="desc">工程项目</text> | <text class="desc">工程项目</text> | ||||
| </view> | </view> | ||||
| <view class="flex_block" data-url="/pages/contract/contract" bindtap="navigate"> | <view class="flex_block" data-url="/pages/contract/contract" bindtap="navigate"> | ||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_03.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">合同信息</text> | |||||
| </view> | |||||
| <view class="flex_block" bindtap="showModal"> | |||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_09.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">合同报送</text> | |||||
| </view> | |||||
| <view class="flex_block" bindtap="showModal"> | |||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_10.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">固资变动</text> | |||||
| </view> | |||||
| <view class="flex_block" bindtap="showModal"> | |||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_05.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">资源变动</text> | |||||
| </view> | |||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_03.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">合同信息</text> | |||||
| </view> | |||||
| <view class="flex_block" data-url="/pages/fixedAssets/fixedAssets" bindtap="navigate"> | |||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_10.png" mode="aspectFit"></image></view> | |||||
| <text class="desc">固定资产</text> | |||||
| </view> | |||||
| </block> | </block> | ||||
| <view class="flex_block" bindtap="openView"> | <view class="flex_block" bindtap="openView"> | ||||
| <view class="image"><image class="attribute" src="../../image/index/child_function_06.png" mode="aspectFit"></image></view> | <view class="image"><image class="attribute" src="../../image/index/child_function_06.png" mode="aspectFit"></image></view> | ||||
| @@ -239,6 +239,24 @@ const URL_GET_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | |||||
| //新增工程项目 | //新增工程项目 | ||||
| const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | ||||
| //固定资产列表 | |||||
| const URL_GET_PERMANENTLIST = `${URL_PREFIX}/asset/permanent/list/`; | |||||
| //固定资产删除 | |||||
| const URL_GET_PERMANENTDELETE = `${URL_PREFIX}/asset/permanent/remove/`; | |||||
| //查看资产详情 | |||||
| const URL_GET_PERMANENTDETAIL = `${URL_PREFIX}/asset/permanent/get/`; | |||||
| //添加资产 | |||||
| const URL_POST_PERMANENTADD = `${URL_PREFIX}/asset/permanent/add/`; | |||||
| //修改资产详情 | |||||
| const URL_POST_PERMANENTUPDATE = `${URL_PREFIX}/asset/permanent/edit/`; | |||||
| //财务公开 | |||||
| const URL_GET_FINANCIALLIST = `${URL_PREFIX}/finance/open/financialAmountPublicMonthList/`; | |||||
| /****************接口地址end****************/ | /****************接口地址end****************/ | ||||
| export { | export { | ||||
| @@ -331,5 +349,11 @@ export { | |||||
| URL_GET_CONTRACTDELETE, | URL_GET_CONTRACTDELETE, | ||||
| URL_GET_ATTACHMENTLIST, | URL_GET_ATTACHMENTLIST, | ||||
| URL_GET_MONEYORDERADD, | URL_GET_MONEYORDERADD, | ||||
| URL_GET_PROJECTADD | |||||
| URL_GET_PROJECTADD, | |||||
| URL_GET_PERMANENTLIST, | |||||
| URL_GET_PERMANENTDELETE, | |||||
| URL_GET_PERMANENTDETAIL, | |||||
| URL_POST_PERMANENTADD, | |||||
| URL_POST_PERMANENTUPDATE, | |||||
| URL_GET_FINANCIALLIST, | |||||
| } | } | ||||
| @@ -382,6 +382,25 @@ function formatDate(unixtime) { | |||||
| // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 | // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 | ||||
| return y + '-' + m + '-' + d; | return y + '-' + m + '-' + d; | ||||
| } | } | ||||
| /** | |||||
| * 获取当前年-月-日 | |||||
| */ | |||||
| function formatDates(unixtime) { | |||||
| var date = new Date(unixtime); | |||||
| var y = date.getFullYear(); | |||||
| var m = date.getMonth() + 1; | |||||
| m = m < 10 ? ('0' + m) : m; | |||||
| var d = date.getDate(); | |||||
| d = d < 10 ? ('0' + d) : d; | |||||
| var h = date.getHours(); | |||||
| h = h < 10 ? ('0' + h) : h; | |||||
| var minute = date.getMinutes(); | |||||
| var second = date.getSeconds(); | |||||
| minute = minute < 10 ? ('0' + minute) : minute; | |||||
| second = second < 10 ? ('0' + second) : second; | |||||
| // return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;//年月日时分秒 | |||||
| return y + '-' + m; | |||||
| } | |||||
| /** | /** | ||||
| * 将数字(整数)转为汉字 | * 将数字(整数)转为汉字 | ||||
| * @param num | * @param num | ||||
| @@ -444,6 +463,7 @@ export { | |||||
| isIPhoneX, | isIPhoneX, | ||||
| js_date_time, | js_date_time, | ||||
| formatDate, | formatDate, | ||||
| formatDates, | |||||
| convertToChinaNum, | convertToChinaNum, | ||||
| getTransform | getTransform | ||||
| } | } | ||||