| @@ -0,0 +1,457 @@ | |||
| // pages/apply/index.js | |||
| import * as UTIL from '../../../utils/util.js'; | |||
| import * as API from '../../../utils/API.js'; | |||
| const app = getApp(); | |||
| Page({ | |||
| /** | |||
| * 页面的初始数据 | |||
| */ | |||
| data: { | |||
| isIPX: app.globalData.isIPX, | |||
| bookName:'', //付款单位 | |||
| formData:{ | |||
| accountType:'', //账户类型 | |||
| accountDate:'', //收入时间 | |||
| jieAmount:'', //收入金额 | |||
| accountName:'', //存入账户 | |||
| incomeType:'', //收入类型 | |||
| billNum:'', //单据编码 | |||
| accountSummary:'', //备注说明 | |||
| contractionId:'', //合同编码 | |||
| incomeExpensesType:1, //收支类别 | |||
| isBill:0 | |||
| }, | |||
| incomeTypeOptions:[], //收入类型选项 | |||
| incomeTypeText:'222', //收入类型显示文字 | |||
| contractionOptions:[], //付款人合同信息列表接口 | |||
| showHt:false, | |||
| payerText:'', //付款人 | |||
| sjPics:[], //收据图片列表数据 | |||
| fpPics:[], //发票图片列表数据 | |||
| qtPics:[], //其他图片列表数据 | |||
| //收入时间弹窗显隐 | |||
| srShow:false, | |||
| minDate: new Date(2021, 6, 1).getTime(), | |||
| maxDate: new Date(2023, 0, 31).getTime(), | |||
| crzhShow:false, | |||
| accountListOptions:[], //存入账户类型选项 | |||
| crlxShow:false, //收入类型弹窗显隐 | |||
| }, | |||
| onCancelcrlx(){ | |||
| this.setData({crlxShow:false,}) | |||
| }, | |||
| oncrlxShow(){ this.setData({crlxShow:true})}, | |||
| onCancelcrzh(){ | |||
| this.setData({crzhShow:false}) | |||
| }, | |||
| oncrzhShow(){ this.setData({crzhShow:true})}, | |||
| onConfirmcrzh(e){ | |||
| let data = e.detail.value; | |||
| this.setData({ | |||
| crzhShow:false, | |||
| 'formData.accountName':data.accountName, | |||
| 'formData.accountId':data.id, | |||
| 'formData.accountType':data.accountType | |||
| }) | |||
| }, | |||
| onsrDate(){ | |||
| this.setData({srShow:true}) | |||
| }, | |||
| onClose(){ this.setData({srShow:false})}, | |||
| onConfirm(e){ | |||
| let data = this.getNewDate(new Date(e.detail)); | |||
| this.setData({'formData.accountDate':data}) | |||
| this.setData({srShow:false}) | |||
| }, | |||
| closeBox(){ | |||
| this.setData({showHt:false}) | |||
| }, | |||
| 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 | |||
| }, | |||
| onConfirmContraction(value){ | |||
| let obj = value.detail.value; | |||
| this.setData({ | |||
| payerText:obj.name, | |||
| showHt:false, | |||
| 'formData.contractionId':obj.id, | |||
| contractionIdID:obj.code | |||
| }) | |||
| }, | |||
| selectContraction(){ | |||
| this.setData({showHt:true}) | |||
| }, | |||
| bindPickerChange (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| crlxShow:false, | |||
| 'formData.incomeType':obj.dictValue, | |||
| incomeTypeText:obj.dictLabel | |||
| }) | |||
| }, | |||
| inputChange(e){ | |||
| this.setData({ | |||
| [e.currentTarget.dataset.prop]: e.detail.value | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onShow: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onLoad: function (options) { | |||
| console.log(options); | |||
| var that = this; | |||
| //获取附件字典 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bookkeeping_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| this.setData({ | |||
| uploadOptions:res.data, | |||
| }) | |||
| let uploadList = res.data | |||
| let newList = [] | |||
| let _this = this | |||
| uploadList.map( res => { | |||
| let oData = { | |||
| tableId: id, | |||
| tableName: "t_contraction_info", //上传表 | |||
| bizPath: "contraction", | |||
| fileType: res.dictValue, //附件类型 1原始发票 2会议纪要 3会议照片 4 参会人员签字 | |||
| method:'GET' | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||
| success: (rr) => { | |||
| console.log(rr.rows); | |||
| 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}) | |||
| } | |||
| }) | |||
| }, | |||
| fail:(rr) =>{ | |||
| console.log(rr); | |||
| }, | |||
| complete:(rr) => { | |||
| console.log(rr); | |||
| } | |||
| }) | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //查询收入详情 | |||
| UTIL.httpRequest(API.URL_GET_FLOWGET + options.id , {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.incomeType == 2){ | |||
| UTIL.httpRequest(API.URL_GET_INFOGET + res.data.contractionId , {method:'GET'}, { | |||
| success: (res3) => { | |||
| that.setData({ | |||
| contractionIdID:res3.data.code, | |||
| payerText:res3.data.name, | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| //获取收入类型状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'income_type', {method:'GET'}, { | |||
| success: (res2) => { | |||
| if(res2.data.length>0){ | |||
| that.setData({ | |||
| incomeTypeOptions:res2.data, | |||
| }) | |||
| that.setData({ | |||
| formData:res.data, | |||
| contractionIdID:res.data.code, | |||
| incomeTypeText:UTIL.getTransform(res.data.incomeType,res2.data) | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| console.log(res); | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onReady: function () { | |||
| let that = this; | |||
| //获取收入单位 | |||
| UTIL.httpRequest(API.URL_GET_GETINFO, {method:'GET'}, { | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| this.setData({bookName:res.user.bookName}) | |||
| } | |||
| } | |||
| }) | |||
| // 获取合同信息列表 | |||
| UTIL.httpRequest(API.URL_GET_CONTRACTIONLIST , {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| contractionOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| //获取当前账套付款账户列表 | |||
| UTIL.httpRequest(API.URL_GET_ACCOUNTLIST , {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountListOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| deleteimg:function(e){ | |||
| let oData = e.currentTarget.dataset; | |||
| let file = this.data[oData.status]; | |||
| file.splice(oData.id,1) | |||
| this.setData({ | |||
| [oData.status]:file | |||
| }) | |||
| }, | |||
| back:function(){ | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| uploadSjPics: function (e) { //这里是选取图片的方法 | |||
| var that = this; | |||
| var detailPics = that.data.sjPics; | |||
| if (detailPics.length >= that.data.count) { | |||
| wx.showToast({ | |||
| title: '最多选择' + that.data.count + '张!', | |||
| }) | |||
| return; | |||
| } | |||
| wx.chooseImage({ | |||
| count: that.data.count, // 最多可以选择的图片张数,默认9 | |||
| sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 | |||
| sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 | |||
| success: function (res) { | |||
| let fileForm = that.data.sjPics | |||
| res.tempFilePaths.forEach(item => { | |||
| fileForm.push({ | |||
| file: item, | |||
| fileType:'1', | |||
| bizPath:'cashier', | |||
| tableName:'t_cashier_account_flow', | |||
| tableId:'' | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| sjPics:fileForm | |||
| }) | |||
| }, | |||
| }) | |||
| }, | |||
| uploadFpPics: function (e) { //这里是选取图片的方法 | |||
| var that = this; | |||
| var pics = []; | |||
| var detailPics = that.data.fpPics; | |||
| if (detailPics.length >= that.data.count) { | |||
| wx.showToast({ | |||
| title: '最多选择' + that.data.count + '张!', | |||
| }) | |||
| return; | |||
| } | |||
| wx.chooseImage({ | |||
| count: that.data.count, // 最多可以选择的图片张数,默认9 | |||
| sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 | |||
| sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 | |||
| success: function (res) { | |||
| let fileForm = that.data.fpPics | |||
| res.tempFilePaths.forEach(item => { | |||
| fileForm.push({ | |||
| file: item, | |||
| fileType:'2', | |||
| bizPath:'cashier', | |||
| tableName:'t_cashier_account_flow', | |||
| tableId:'' | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| fpPics:fileForm | |||
| }) | |||
| }, | |||
| }) | |||
| }, | |||
| uploadQtPics: function (e) { //这里是选取图片的方法 | |||
| var that = this; | |||
| var pics = []; | |||
| var detailPics = that.data.qtPics; | |||
| if (detailPics.length >= that.data.count) { | |||
| wx.showToast({ | |||
| title: '最多选择' + that.data.count + '张!', | |||
| }) | |||
| return; | |||
| } | |||
| wx.chooseImage({ | |||
| count: that.data.count, // 最多可以选择的图片张数,默认9 | |||
| sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 | |||
| sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 | |||
| success: function (res) { | |||
| let fileForm = that.data.qtPics | |||
| res.tempFilePaths.forEach(item => { | |||
| fileForm.push({ | |||
| file: item, | |||
| fileType:'3', | |||
| bizPath:'cashier', | |||
| tableName:'t_cashier_account_flow', | |||
| tableId:'' | |||
| }) | |||
| }) | |||
| that.setData({ | |||
| qtPics:fileForm | |||
| }) | |||
| }, | |||
| }) | |||
| }, | |||
| swichAccounting:function(e){ | |||
| let codeStr = e.currentTarget.dataset.code; | |||
| let formDataObj = this.data.formData; | |||
| if(formDataObj.jieAmount==''){ //收入金额 | |||
| UTIL.showToastNoneIcon('请填写收入金额!'); | |||
| return false; | |||
| }else if(formDataObj.accountName==''){ //存入账户 | |||
| UTIL.showToastNoneIcon('请选择存入账户!'); | |||
| return false; | |||
| }else if(formDataObj.billNum==''){ //单据编码 | |||
| UTIL.showToastNoneIcon('请输入单据编码!'); | |||
| return false; | |||
| }else if(formDataObj.accountSummary==''){ //备注说明 | |||
| UTIL.showToastNoneIcon('请输入备注说明!'); | |||
| return false; | |||
| }else if(formDataObj.incomeType == '2' && formDataObj.contractionId==''){ | |||
| UTIL.showToastNoneIcon('收入类型为发包收入,必须选择关联合同!'); | |||
| return false; | |||
| } | |||
| let data = this.data.formData; | |||
| data.method = "POST"; | |||
| data.checkedStatus = codeStr; | |||
| console.log(data); | |||
| UTIL.httpRequest(API.URL_POST_GERFLOWEDIT,data,{ | |||
| success: (res) => { | |||
| if(res.code == 200){ | |||
| let vouerId = res.data; | |||
| // let vouerId = 1; | |||
| let updataList = [...this.data.sjPics,...this.data.fpPics,...this.data.qtPics]; | |||
| for(let i=0; i<updataList.length; i++){ | |||
| let arrData=updataList[i]; | |||
| arrData.tableId = vouerId; | |||
| wx.uploadFile({ | |||
| url: API.URL_GET_UPLOAD, | |||
| filePath: arrData.file, | |||
| name: 'file', | |||
| header: { | |||
| "Content-Type": "multipart/form-data",//记得设置 | |||
| "chartset":"utf-8", | |||
| 'Authorization':'Bearer '+getApp().globalData.userInfo.token | |||
| }, | |||
| formData:arrData, | |||
| success (response){ | |||
| console.log(response); | |||
| }, | |||
| fail(res){ | |||
| console.log(response) | |||
| } | |||
| }) | |||
| } | |||
| wx.redirectTo({ | |||
| url: '/pages/index/index' | |||
| }) | |||
| }else{ | |||
| UTIL.showToastNoneIcon(res.msg); | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| onChange(event){ | |||
| this.setData({ | |||
| [event.currentTarget.dataset.value]: event.detail, | |||
| }) | |||
| }, | |||
| imgPreviewImage(e){ | |||
| let currentImgList = e.currentTarget.dataset; | |||
| //获取当前附件列表 | |||
| let currentStatus = this.data[currentImgList.status]; | |||
| //当前选中图片index | |||
| let currentIndex = currentImgList.id; | |||
| let imgList = [] | |||
| for(let i = 0; i<currentStatus.length; i++){ | |||
| imgList.push(currentStatus[i].file) | |||
| } | |||
| wx.previewImage({ | |||
| current: imgList[currentIndex], // 当前显示图片的http链接 | |||
| urls: imgList // 需要预览的图片http链接列表 | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload: function () { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh: function () { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom: function () { | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage: function () { | |||
| } | |||
| }) | |||
| @@ -0,0 +1,24 @@ | |||
| { | |||
| "navigationStyle": "custom", | |||
| "usingComponents": { | |||
| "van-row": "@vant/weapp/row/index", | |||
| "van-col": "@vant/weapp/col/index", | |||
| "van-cell": "@vant/weapp/cell/index", | |||
| "van-cell-group": "@vant/weapp/cell-group/index", | |||
| "van-tag": "@vant/weapp/tag/index", | |||
| "van-icon": "@vant/weapp/icon/index", | |||
| "van-steps": "@vant/weapp/steps/index", | |||
| "van-button": "@vant/weapp/button/index", | |||
| "van-radio": "@vant/weapp/radio/index", | |||
| "van-radio-group": "@vant/weapp/radio-group/index", | |||
| "van-field": "@vant/weapp/field/index", | |||
| "van-popup": "@vant/weapp/popup/index", | |||
| "van-picker": "@vant/weapp/picker/index", | |||
| "van-calendar": "@vant/weapp/calendar/index", | |||
| "van-dialog": "@vant/weapp/dialog/index", | |||
| "van-collapse": "@vant/weapp/collapse/index", | |||
| "van-collapse-item": "@vant/weapp/collapse-item/index" | |||
| } | |||
| } | |||
| @@ -0,0 +1,237 @@ | |||
| <!--pages/apply/index.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="top" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <image src="/image/apply/dress_icon.png" mode="widthFix"></image> | |||
| <view class="top-tit">收入单位</view> | |||
| <view class="top-title">{{bookName}}</view> | |||
| </view> | |||
| <text class="title">基础信息</text> | |||
| <view class="main-box table-box"> | |||
| <view class="flex-block"> | |||
| <text class="rules">收入时间</text> | |||
| <view class="wrap" bindtap="onsrDate" > | |||
| {{formData.accountDate}} | |||
| </view> | |||
| <van-calendar | |||
| show="{{ srShow }}" | |||
| min-date="{{ minDate }}" | |||
| max-date="{{ maxDate }}" | |||
| bind:close="onClose" | |||
| bind:confirm="onConfirm" | |||
| /> | |||
| </view> | |||
| <view class="flex-block"> | |||
| <text class="rules">收入金额</text> | |||
| <input class="wrap" data-prop="formData.jieAmount" type="number" value="{{formData.jieAmount}}" bindinput="inputChange" placeholder="请输入收入金额"/> | |||
| </view> | |||
| <view class="flex-block"><text class="rules">存入账户</text> | |||
| <!-- <input class="wrap" type="number" bindinput="inputChange" data-prop="formData.accountName" value="{{formData.accountName}}" placeholder="请输入存入账户"/> --> | |||
| <view bindtap="oncrzhShow" class="wrap"> | |||
| <text wx:if="{{formData.accountName==''}}" class="color-gray">请选择存入账户</text> | |||
| <text wx:else>{{formData.accountName}}</text> | |||
| </view> | |||
| <!-- custom-style="height: 20%;"--> | |||
| <van-popup | |||
| show="{{ crzhShow }}" | |||
| position="bottom" | |||
| bind:close="onCancelcrzh" | |||
| > | |||
| <van-picker columns="{{ accountListOptions }}" value-key="accountName" bind:cancel="onCancelcrzh" | |||
| show-toolbar="{{true}}" | |||
| bind:confirm="onConfirmcrzh"/> | |||
| </van-popup> | |||
| </view> | |||
| <view class="flex-block"> | |||
| <text class="rules">收入类型</text> | |||
| <view bindtap="oncrlxShow" class="wrap"> | |||
| <text wx:if="{{incomeTypeText==''}}" class="color-gray">请选择收入类型</text> | |||
| <text wx:else>{{incomeTypeText}}</text> | |||
| </view> | |||
| </view> | |||
| <van-popup | |||
| show="{{ crlxShow }}" | |||
| position="bottom" | |||
| bind:close="onCancelcrlx" | |||
| > | |||
| <van-picker | |||
| columns="{{ incomeTypeOptions }}" | |||
| value-key="dictLabel" | |||
| bind:cancel="onCancelcrlx" | |||
| show-toolbar="{{true}}" | |||
| bind:confirm="bindPickerChange"/> | |||
| <!-- <picker bindchange="bindPickerChange" class="wrap picker_wrap" | |||
| value="{{incomeTypeText}}" | |||
| range="{{incomeTypeOptions}}" | |||
| range-key="dictLabel"> | |||
| </picker> --> | |||
| </van-popup> | |||
| <view class="flex-block"><text class="rules">单据编码</text> <input class="wrap" type="number" bindinput="inputChange" data-prop="formData.billNum" value="{{formData.billNum}}" placeholder="请输入单据编码"/></view> | |||
| <view class="flex-block"><text class="rules">备注说明</text> <input class="wrap" type="number" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | |||
| </view> | |||
| <block wx:if="{{incomeType == 2}}"> | |||
| <view class="title"> | |||
| <text>关联合同</text> | |||
| </view> | |||
| <view class="main-box table-box"> | |||
| <view class="flex-block"> | |||
| <text class="rules {{formData.incomeType == '2' ?'':'no'}}">付款人{{}}</text> | |||
| <view class="wrap" bindtap="selectContraction"> | |||
| <text wx:if="{{payerText==''}}" class="color-gray">请选择付款人</text> | |||
| <text wx:else>{{payerText}}</text> | |||
| </view> | |||
| <van-popup show="{{showHt}}" round position="bottom" bind:close="closeBox" > | |||
| <van-picker | |||
| columns="{{contractionOptions}}" | |||
| show-toolbar | |||
| value-key="name" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmContraction" | |||
| /> | |||
| </van-popup> | |||
| </view> | |||
| <view class="flex-block"><text class="rules {{formData.incomeType == '2' ?'':'no'}}">合同编码</text> | |||
| <view class="wrap" bindtap="selectContraction"> | |||
| <text wx:if="{{contractionIdID==''}}" class="color-gray">请选择合同编码</text> | |||
| <text wx:else>{{contractionIdID}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </block> | |||
| <view class="main-box table-box" style="margin-top: 15px;"> | |||
| <van-cell> | |||
| <!-- <view slot="icon"> | |||
| <van-icon class-prefix="my-icon" name="extra" /> | |||
| </view> --> | |||
| <view slot="title"> | |||
| <view class="van-cell-text">附件<van-tag type="danger" style="margin-left: 10px;">可拍照</van-tag></view> | |||
| </view> | |||
| <view> | |||
| <view class="van-cell-text">总数<van-tag round color="#5CAE77" plain style="margin-left: 10px;"> {{form.transfers[index].fileNum?form.transfers[index].fileNum:0}}张 </van-tag></view> | |||
| </view> | |||
| </van-cell> | |||
| <view class="fj-box"> | |||
| <view class="fj-li"> | |||
| <view> | |||
| <text>收\n据</text> | |||
| </view> | |||
| <view class="img_box"> | |||
| <view class="img_list" wx:for="{{sjPics}}" wx:for-index="index" wx:key="index"> | |||
| <image class="img_li" src="{{item.file}}"bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{index}}'></image> | |||
| <van-icon name="/image/apply/img_delete.png" data-id="{{index}}" size="20px" data-status="sjPics" bindtap="deleteimg" /> | |||
| </view> | |||
| <view class="img_list"> | |||
| <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="uploadSjPics"></image> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class="fj-li"> | |||
| <view> | |||
| <text>发\n票</text> | |||
| </view> | |||
| <view class="img_box"> | |||
| <view class="img_list" wx:for="{{fpPics}}" wx:for-index="index" wx:key="index"> | |||
| <image class="img_li" src="{{item.file}}" data-status="fpPics" bindtap="imgPreviewImage" bindlongpress="bindlongpressimg" data-id='{{index}}'></image> | |||
| <van-icon name="/image/apply/img_delete.png" size="20px" data-id="{{index}}" data-status="fpPics" bindtap="deleteimg" /> | |||
| </view> | |||
| <view class="img_list"> | |||
| <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="uploadFpPics"></image> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view class="fj-li"> | |||
| <view> | |||
| <text>其\n他</text> | |||
| </view> | |||
| <view class="img_box"> | |||
| <view class="img_list" wx:for="{{qtPics}}" wx:for-index="index" wx:key="index"> | |||
| <image class="img_li" src="{{item.file}}" data-status="qtPics" bindtap="imgPreviewImage" bindlongpress="bindlongpressimg" data-id='{{index}}'></image> | |||
| <van-icon name="/image/apply/img_delete.png" size="20px" data-id="{{index}}" data-status="qtPics" bindtap="deleteimg" /> | |||
| </view> | |||
| <view class="img_list"> | |||
| <image class="img_li img_add" src="/image/apply/fj_upload.png" data-index="{{index}}" bindtap="uploadQtPics"></image> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <!-- <view style="margin:10px 0 5px;" class="flex-block"> | |||
| <text class="fjLable">收据</text> | |||
| <view class='content'> | |||
| <view class='img-box'> | |||
| <view class='img-list'> | |||
| <block wx:for="{{sjPics}}" wx:for-index="index" wx:key="index"> | |||
| <view class='img-item'> | |||
| <van-icon class="close-ico" data-id="{{index}}" name="/image/apply/img_delete.png" size="20px" data-status="sjPics" bindtap="deleteimg" /> | |||
| <image src='{{item.file}}' class="imagea" bindlongpress="bindlongpressimg" data-status="sjPics" bindtap="imgPreviewImage" data-id='{{index}}'></image> | |||
| </view> | |||
| </block> | |||
| <view class='chooseimg' bindtap='uploadSjPics'> | |||
| <view class="weui-uploader__input-box"></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view style="margin:10px 0 5px;" class="flex-block"> | |||
| <text class="fjLable">发票</text> | |||
| <view class='content'> | |||
| <view class='img-box'> | |||
| <view class='img-list'> | |||
| <block wx:for="{{fpPics}}" wx:for-index="index" wx:key="index"> | |||
| <view class='img-item'> | |||
| <van-icon class="close-ico" data-id="{{index}}" name="/image/apply/img_delete.png" size="20px" data-status="fpPics" bindtap="deleteimg" /> | |||
| <image src='{{item.file}}' data-status="fpPics" bindtap="imgPreviewImage" class="imagea" bindlongpress="bindlongpressimg" data-id='{{index}}'></image> | |||
| </view> | |||
| </block> | |||
| <view class='chooseimg' bindtap='uploadFpPics'> | |||
| <view class="weui-uploader__input-box"></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view style="margin:10px 0 5px;" class="flex-block"> | |||
| <text class="fjLable">其他</text> | |||
| <view class='content'> | |||
| <view class='img-box'> | |||
| <view class='img-list'> | |||
| <block wx:for="{{qtPics}}" wx:for-index="index" wx:key="index"> | |||
| <view class='img-item'> | |||
| <van-icon class="close-ico" name="/image/apply/img_delete.png" size="20px" data-id="{{index}}" data-status="qtPics" bindtap="deleteimg" /> | |||
| <image src='{{item.file}}' data-status="qtPics" bindtap="imgPreviewImage" class="imagea" bindlongpress="bindlongpressimg" data-id='{{index}}'></image> | |||
| </view> | |||
| </block> | |||
| <view class='chooseimg' bindtap='uploadQtPics'> | |||
| <view class="weui-uploader__input-box"></view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </view> --> | |||
| </view> | |||
| <view class="bottom"> | |||
| <!-- <view class="btn1" data-type="3" bindtap="goSubmit">提交复核</view> --> | |||
| <view class="btn1" data-code="1" bindtap="swichAccounting">暂存</view> | |||
| <view class="btn2" data-code="2" bindtap="swichAccounting">提交</view> | |||
| </view> | |||
| <!-- <view class="main-box table-box" style="margin-top: 30rpx;"> | |||
| <view class="btn flex-block"> | |||
| <button type="primary" data-code="1" bindtap="swichAccounting" plain="true">暂存</button> | |||
| <button type="primary" data-code="2" bindtap="swichAccounting">提交</button> | |||
| </view> | |||
| </view> --> | |||
| @@ -0,0 +1,292 @@ | |||
| /* pages/apply/index.wxss */ | |||
| .inComeUnit{ | |||
| border:1rpx solid #ddd; | |||
| width:90%; | |||
| margin:0 auto; | |||
| } | |||
| .top{ | |||
| display: flex; | |||
| width: 94%; | |||
| margin: 0 auto; | |||
| border-radius: 10rpx; | |||
| margin-top: 3vw; | |||
| overflow: hidden; | |||
| } | |||
| .top view{ | |||
| padding: 40rpx 15rpx; | |||
| align-items: center; | |||
| justify-content: center; | |||
| position: relative; | |||
| } | |||
| .top image{ | |||
| position: absolute; | |||
| width: 94%; | |||
| } | |||
| .top-title{ | |||
| flex: 1; | |||
| text-align: center; | |||
| } | |||
| .top-tit{ | |||
| color: #fff; | |||
| } | |||
| .rules:before{ | |||
| content:'*'; | |||
| color:red; | |||
| } | |||
| .rules.no::before{ | |||
| content:' '; | |||
| padding-left: 14rpx; | |||
| color:'#fff'; | |||
| } | |||
| .main-title{ | |||
| background-image: linear-gradient(to right, #2C8E68 , #B3DB62); | |||
| color: #ffffff; | |||
| font-size: 18rpx; | |||
| padding: 10rpx 0; | |||
| text-align: center; | |||
| } | |||
| .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); | |||
| } | |||
| .main-box block{ | |||
| float: right; | |||
| } | |||
| .main-box .color-gray{ | |||
| color: #888; | |||
| } | |||
| .title{ | |||
| padding: 10px calc(3% + 20px); | |||
| display: block; | |||
| } | |||
| .van-cell{ | |||
| padding-left: 0!important; | |||
| padding-right: 0!important; | |||
| padding-top: 0!important; | |||
| margin-bottom: 15px; | |||
| } | |||
| .table-box .flex-block{ | |||
| margin-bottom: 15px; | |||
| display: flex; | |||
| justify-content: space-between; | |||
| align-items: center; | |||
| } | |||
| .table-box .flex-block:last-child{ | |||
| margin-bottom: 0px; | |||
| } | |||
| .table-box .rules{ | |||
| width: 200rpx; | |||
| } | |||
| .table-box .picker_wrap{ | |||
| /* display: flex; | |||
| justify-content: flex-end; | |||
| align-items: center; */ | |||
| } | |||
| .table-box .picker{text-align: right;} | |||
| .table-box .wrap{flex:1; text-align: right;} | |||
| .fjLable{ | |||
| display: flex; | |||
| width:24px; | |||
| margin:25rpx 5rpx; | |||
| color:#fff; | |||
| background:#07c160; | |||
| text-align: center; | |||
| border-radius: 10rpx; | |||
| justify-content: center; /* 相对父元素水平居中 */ | |||
| align-items: center; | |||
| padding:25rpx 0; | |||
| } | |||
| .content { | |||
| width: 100%; | |||
| background-color: #fff; | |||
| } | |||
| .img-list { | |||
| display: flex; | |||
| display: -webkit-flex; | |||
| flex-direction: row; | |||
| justify-content: flex-start; | |||
| align-items: center; | |||
| flex-wrap: wrap; | |||
| } | |||
| .img-item { | |||
| width: 30%; | |||
| text-align: left; | |||
| margin-right: 3%; | |||
| margin-bottom: 10rpx; | |||
| position: relative; | |||
| } | |||
| .img-item .close-ico{ | |||
| position: absolute; | |||
| right: -10rpx; | |||
| top: -10rpx; | |||
| } | |||
| .img-item .imagea { | |||
| width: 160rpx; | |||
| height: 160rpx; | |||
| } | |||
| .submit-btn { | |||
| width: 100%; | |||
| background-color: #fff; | |||
| height: 80rpx; | |||
| text-align: center; | |||
| line-height: 80rpx; | |||
| font-size: 30rpx; | |||
| position: fixed; | |||
| bottom: 100rpx; | |||
| } | |||
| .chooseimg { | |||
| height: 160rpx; | |||
| background-color: #fff; | |||
| display: flex; | |||
| justify-content: center; /* 相对父元素水平居中 */ | |||
| align-items: center; | |||
| } | |||
| .weui-uploader__input-box { | |||
| float: left; | |||
| position: relative; | |||
| /* margin-right: 9rpx; | |||
| margin-bottom: 9rpx; */ | |||
| width: 120rpx; | |||
| height: 120rpx; | |||
| border: 1px solid #d9d9d9; | |||
| } | |||
| .weui-uploader__input-box:before { | |||
| width: 2px; | |||
| height: 39.5px; | |||
| } | |||
| .weui-uploader__input-box:after, .weui-uploader__input-box:before { | |||
| content: " "; | |||
| position: absolute; | |||
| top: 50%; | |||
| left: 50%; | |||
| -webkit-transform: translate(-50%, -50%); | |||
| transform: translate(-50%, -50%); | |||
| background-color: #d9d9d9; | |||
| } | |||
| .weui-uploader__input-box:after { | |||
| width: 39.5px; | |||
| height: 2px; | |||
| } | |||
| .weui-uploader__input-box:after, .weui-uploader__input-box:before { | |||
| content: " "; | |||
| position: absolute; | |||
| top: 50%; | |||
| left: 50%; | |||
| -webkit-transform: translate(-50%, -50%); | |||
| transform: translate(-50%, -50%); | |||
| background-color: #d9d9d9; | |||
| } | |||
| .tips { | |||
| color: #666; | |||
| font-size: 24rpx; | |||
| padding-bottom: 20rpx; | |||
| } | |||
| .img-box { | |||
| width: 92%; | |||
| margin: auto; | |||
| padding-top: 20rpx; | |||
| } | |||
| .btn button{ | |||
| line-height: 1.7; | |||
| padding-left:80rpx; | |||
| padding-right:80rpx; | |||
| border-radius: 30rpx; | |||
| } | |||
| .fj-box text{ | |||
| background-color: #5CAE77; | |||
| color: #ffffff; | |||
| text-align: center; | |||
| border-radius: 5px; | |||
| white-space:pre-wrap; | |||
| padding: 22px 8px; | |||
| display: block; | |||
| } | |||
| .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; | |||
| } | |||
| .img_box{ | |||
| position: relative; | |||
| width: 100%; | |||
| display: flex; | |||
| flex-wrap: wrap; | |||
| } | |||
| .img_box .img_list{ | |||
| width: 25%; | |||
| margin-left: 5%; | |||
| position: relative; | |||
| } | |||
| .img_box .img_list .van-icon{ | |||
| font-size: 20px; | |||
| position: absolute; | |||
| top: 0; | |||
| right: 0; | |||
| transform: translate(50%,-50%); | |||
| } | |||
| .img_box .img_list:nth-child(n+4){ | |||
| margin-top: 15px; | |||
| } | |||
| .bottom{ | |||
| width: 84%; | |||
| margin: 0 auto; | |||
| text-align: center; | |||
| margin-top: 50px; | |||
| margin-bottom: 50px; | |||
| display: flex; | |||
| } | |||
| .bottom view { | |||
| width: 47%; | |||
| margin: 0 auto; | |||
| border-radius: 30px; | |||
| display: inline-block; | |||
| } | |||
| .bottom .btn1{ | |||
| border: 1px solid #2C8E68; | |||
| padding: 8px 0px; | |||
| color: #2C8E68; | |||
| } | |||
| .bottom .btn2{ | |||
| border: 1px solid transparent; | |||
| padding: 8px 0px; | |||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||
| margin-left: 6%; | |||
| color: #fff; | |||
| } | |||
| .bottom .btn3{ | |||
| border: 1px solid transparent; | |||
| padding: 8px 0px; | |||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||
| color: #fff; | |||
| width: 100%; | |||
| } | |||