| @@ -22,11 +22,15 @@ | |||
| "pages/drawee/drawee", | |||
| "pages/drawee/add/add", | |||
| "pages/Bookkeeping/update/update", | |||
| "pages/Bookkeeping/updateZC/update", | |||
| "pages/bank/bank", | |||
| "pages/bank/add/add", | |||
| "pages/bankDraft/bankDraft", | |||
| "pages/bankDraft/add/add", | |||
| "pages/project/project" | |||
| "pages/project/project", | |||
| "pages/project/add/add", | |||
| "pages/contract/contract", | |||
| "pages/contract/add/add" | |||
| ], | |||
| "window": { | |||
| "backgroundTextStyle": "light", | |||
| @@ -22,7 +22,72 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'checked_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| capitalExpenditureTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'income_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| incomeTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'capital_expenditure_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| expenditureTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| //收入事项 | |||
| let data = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| accountType:'', | |||
| checkedStatus:'1', | |||
| incomeExpensesType:'1', | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| let list = res.rows; | |||
| for (let i = 0; i < list.length; i++) { | |||
| const element = list[i]; | |||
| list[i].checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| list[i].incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||
| } | |||
| this.setData({ | |||
| flowListSR:list, | |||
| flowListSRNum:res.total | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| //支出事项 | |||
| let data2 = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| accountType:'', | |||
| checkedStatus:'1', | |||
| incomeExpensesType:'2', | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| let list = res.rows; | |||
| this.setData({ | |||
| flowListZCNum:res.total | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| onChange(event) { | |||
| this.setData({result:event.detail}) | |||
| @@ -48,8 +113,8 @@ Page({ | |||
| let list = res.rows; | |||
| for (let i = 0; i < list.length; i++) { | |||
| const element = list[i]; | |||
| element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| element.incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||
| list[i].checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| list[i].incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||
| } | |||
| this.setData({ | |||
| flowListSR:list, | |||
| @@ -72,7 +137,8 @@ Page({ | |||
| let list = res.rows; | |||
| for (let i = 0; i < list.length; i++) { | |||
| const element = list[i]; | |||
| element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| list[i].checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| list[i].expenditureTypeText = UTIL.getTransform(element.expenditureType,that.data.expenditureTypeOptions); | |||
| } | |||
| this.setData({ | |||
| flowListZC:list, | |||
| @@ -100,70 +166,7 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'checked_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| capitalExpenditureTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'income_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| incomeTypeOptions:res.data, | |||
| }) | |||
| } | |||
| }) | |||
| //收入事项 | |||
| let data = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| accountType:'', | |||
| checkedStatus:'1', | |||
| incomeExpensesType:'1', | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data ,{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| let list = res.rows; | |||
| for (let i = 0; i < list.length; i++) { | |||
| const element = list[i]; | |||
| element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| element.incomeTypeText = UTIL.getTransform(element.incomeType,that.data.incomeTypeOptions); | |||
| } | |||
| this.setData({ | |||
| flowListSR:list, | |||
| flowListSRNum:res.total | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| //支出事项 | |||
| let data2 = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| accountType:'', | |||
| checkedStatus:'1', | |||
| incomeExpensesType:'2', | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_GETFLOWLIST,data2 ,{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| let list = res.rows; | |||
| for (let i = 0; i < list.length; i++) { | |||
| const element = list[i]; | |||
| element.checkedStatusText = UTIL.getTransform(element.checkedStatus,that.data.capitalExpenditureTypeOptions); | |||
| } | |||
| this.setData({ | |||
| flowListZC:list, | |||
| flowListZCNum:res.total | |||
| }); | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| openPopup(even){ | |||
| @@ -178,7 +181,6 @@ Page({ | |||
| checkedStatus: event.detail.value.dictValue, | |||
| checkedStatusText: event.detail.value.dictLabel, | |||
| }); | |||
| if(that.data.showGroup){ | |||
| let data = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| @@ -202,7 +204,6 @@ Page({ | |||
| } | |||
| } | |||
| }) | |||
| }else{ | |||
| let data2 = { | |||
| pageNum:'1', | |||
| pageSize:'999', | |||
| @@ -225,7 +226,6 @@ Page({ | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }, | |||
| closeBox(even){ | |||
| @@ -264,6 +264,11 @@ Page({ | |||
| url: '/pages/Bookkeeping/update/update?id='+event.currentTarget.dataset.id, | |||
| }) | |||
| }, | |||
| goUpdateZC(event){ | |||
| wx.navigateTo({ | |||
| url: '/pages/Bookkeeping/updateZC/update?id='+event.currentTarget.dataset.id, | |||
| }) | |||
| }, | |||
| delete(e){ | |||
| console.log(e); | |||
| var that = this; | |||
| @@ -24,10 +24,10 @@ | |||
| </van-popup> | |||
| </view> | |||
| <van-checkbox-group wx:if="{{showGroup}}" value="{{ result }}" bind:change="onChange"> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{flowListSR}}" wx:key="index"> | |||
| <view class="li" data-id="{{item.id}}" bindtap="goUpdate"> | |||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{flowListSR}}" wx:key="index"> | |||
| <view class="li" data-id="{{item.id}}"> | |||
| <van-checkbox name="{{item.id}}" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||
| <view style="width: 40%;"> | |||
| <view style="width: 35%;"> | |||
| <text class="tit">{{item.accountSummary}}</text> | |||
| <view class="fksr"> | |||
| <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||
| @@ -38,7 +38,7 @@ | |||
| <text class="fj_name">附件{{item.enclosureCount}}</text> | |||
| <text class="time">{{item.accountDate}}</text> | |||
| </view> | |||
| <view style="width: 25%;"> | |||
| <view style="width: 30%;"> | |||
| <view class="wtj {{item.checkedStatusText == '未提交' ? 'no':item.checkedStatusText == '待审核' ? 'white':item.checkedStatusText == '已审核' ? 'yes':item.checkedStatusText == '已挂起' ? 'other':''}}"> | |||
| <image src="{{item.checkedStatusText == '未提交' ? '/image/icon/icon_no.png':item.checkedStatusText == '待审核' ? '/image/icon/icon_white.png':item.checkedStatusText == '已审核' ? '/image/icon/icon_yes.png':item.checkedStatusText == '已挂起' ? '/image/icon/icon_other.png':''}}" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||
| {{item.checkedStatusText}} | |||
| @@ -47,40 +47,50 @@ | |||
| </view> | |||
| </van-checkbox> | |||
| </view> | |||
| <view slot="right" class="deleteBox"> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;"> | |||
| <view slot="right" class="deleteBox" wx:if="{{item.checkedStatusText != '已审核'}}"> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;"> | |||
| <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> | |||
| <image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdate"></image> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| </van-checkbox-group> | |||
| <van-checkbox-group wx:if="{{!showGroup}}" value="{{ result2 }}" bind:change="onChange2"> | |||
| <view class="li" wx:for="{{flowListZC}}" wx:key="index"> | |||
| <van-checkbox name="1" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||
| <view style="width: 40%;"> | |||
| <text class="tit">{{item.accountSummary}}</text> | |||
| <view class="fksr"> | |||
| <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||
| 现金支出 | |||
| </view> | |||
| </view> | |||
| <view> | |||
| <text class="fj_name">附件9</text> | |||
| <text class="time">{{item.incomeDate}}</text> | |||
| </view> | |||
| <view> | |||
| <view class="wtj"> | |||
| <image src="/image/icon/stop.png" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||
| 未提交 | |||
| </view> | |||
| <text class="money">¥{{item.jieAmount}}</text> | |||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{flowListZC}}" wx:key="index"> | |||
| <view class="li" data-id="{{item.id}}"> | |||
| <van-checkbox name="{{item.id}}" shape="square" checked-color="#2C8E68" style="width: 100%;"> | |||
| <view style="width: 35%;"> | |||
| <text class="tit">{{item.accountSummary}}</text> | |||
| <view class="fksr"> | |||
| <image src="/image/icon/inCome.png" style="width: 16px;height: 14px;margin-right: 5px;"></image> | |||
| {{item.expenditureTypeText}} | |||
| </view> | |||
| </view> | |||
| <view> | |||
| <text class="fj_name">附件{{item.enclosureCount}}</text> | |||
| <text class="time">{{item.accountDate}}</text> | |||
| </view> | |||
| <view style="width: 30%;"> | |||
| <view class="wtj {{item.checkedStatusText == '未提交' ? 'no':item.checkedStatusText == '待审核' ? 'white':item.checkedStatusText == '已审核' ? 'yes':item.checkedStatusText == '已挂起' ? 'other':''}}"> | |||
| <image src="{{item.checkedStatusText == '未提交' ? '/image/icon/icon_no.png':item.checkedStatusText == '待审核' ? '/image/icon/icon_white.png':item.checkedStatusText == '已审核' ? '/image/icon/icon_yes.png':item.checkedStatusText == '已挂起' ? '/image/icon/icon_other.png':''}}" style="width: 12px;height: 12px;margin-right: 5px;"></image> | |||
| {{item.checkedStatusText}} | |||
| </view> | |||
| <text class="money">¥{{item.daiAmount}}</text> | |||
| </view> | |||
| </van-checkbox> | |||
| </view> | |||
| <view slot="right" class="deleteBox" wx:if="{{item.checkedStatusText != '已审核'}}"> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;justify-content: space-evenly;"> | |||
| <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> | |||
| <image src="../../image/icon/icon_xg.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="goUpdateZC"></image> | |||
| </view> | |||
| </van-checkbox> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| </van-checkbox-group> | |||
| <van-empty wx:if="{{flowListSRNum == 0 && showGroup}}" description="暂无收入事项数据" /> | |||
| <van-empty wx:if="{{flowListZCNum == 0 && !showGroup}}" description="暂无支出事项数据" /> | |||
| @@ -39,7 +39,7 @@ text{display: block;} | |||
| color: #31936c; | |||
| } | |||
| .deleteBox{ | |||
| width: 65px; | |||
| width: 130px; | |||
| text-align: center; | |||
| height: 100%; | |||
| background: #F6F6F6; | |||
| @@ -99,7 +99,7 @@ text{display: block;} | |||
| align-items: center; | |||
| margin-top: 15px; | |||
| color: #2C8E68; | |||
| font-size: 16px; | |||
| /* font-size: 16px; */ | |||
| } | |||
| .li .wtj{ | |||
| display: flex; | |||
| @@ -107,7 +107,6 @@ text{display: block;} | |||
| justify-content: center; | |||
| padding: 3px 8px; | |||
| border-radius: 5px; | |||
| font-size: 14px; | |||
| } | |||
| .no{ | |||
| background-color:#fbe3e3; | |||
| @@ -141,12 +140,13 @@ text{display: block;} | |||
| line-height: 25px; | |||
| } | |||
| .li .time{ | |||
| font-size: 14px; | |||
| /* font-size: 14px; */ | |||
| color: #9B9CAA; | |||
| } | |||
| .li .money{ | |||
| font-size: 18px; | |||
| color: #5CAE77; | |||
| text-align: right; | |||
| } | |||
| .van-checkbox__label { | |||
| display: flex; | |||
| @@ -0,0 +1,400 @@ | |||
| // 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.expenditureType':obj.dictValue, | |||
| expenditureTypeText: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_FLOWGET + options.id , {method:'GET'}, { | |||
| success: (res) => { | |||
| //获取收入类型状态expenditureTypeText | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'capital_expenditure_type', {method:'GET'}, { | |||
| success: (res2) => { | |||
| if(res2.data.length>0){ | |||
| that.setData({ | |||
| expenditureTypeOptions:res2.data, | |||
| }) | |||
| that.setData({ | |||
| formData:res.data, | |||
| contractionIdID:res.data.code, | |||
| expenditureTypeText:UTIL.getTransform(res.data.expenditureType,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; | |||
| } | |||
| 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.daiAmount}}" 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="{{expenditureTypeText==''}}" class="color-gray">请选择支出类型</text> | |||
| <text wx:else>{{expenditureTypeText}}</text> | |||
| </view> | |||
| </view> | |||
| <van-popup | |||
| show="{{ crlxShow }}" | |||
| position="bottom" | |||
| bind:close="onCancelcrlx" | |||
| > | |||
| <van-picker | |||
| columns="{{ expenditureTypeOptions }}" | |||
| 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%; | |||
| } | |||
| @@ -9,6 +9,14 @@ Page({ | |||
| */ | |||
| data: { | |||
| isIPX: app.globalData.isIPX, | |||
| showBankType:false, | |||
| form:{ | |||
| sheng: "", //省 必填 | |||
| shi: "", //市 必填 | |||
| bankType: "", //所属银行 必填 | |||
| bankDeposit: "", //开户行 必填 | |||
| payeePaymentLines: "", //联行号 //必填 | |||
| } | |||
| }, | |||
| /** | |||
| @@ -29,9 +37,81 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| var that = this; | |||
| //所属银行 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| bankTypeOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| }, | |||
| openBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:true | |||
| }) | |||
| }, | |||
| closeBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:false | |||
| }) | |||
| }, | |||
| onConfirm(even){ | |||
| console.log(even); | |||
| var that = this ; | |||
| if(even.currentTarget.dataset.name == "showBankType"){ | |||
| // 付款方式类型字典查询 | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET',bankType:even.detail.value.dictValue,status:'0'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| depositOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| this.setData({ | |||
| [even.currentTarget.dataset.value]:even.detail.value.dictValue, | |||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.dictLabel, | |||
| [even.currentTarget.dataset.name]:false, | |||
| }) | |||
| }, | |||
| onConfirmDeposit(even){ | |||
| console.log(even); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.value]:even.detail.value.bankDeposit, | |||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.bankDeposit, | |||
| [even.currentTarget.dataset.name]:false, | |||
| ["form.payeePaymentLines"]:even.detail.value.payeePaymentLines | |||
| }) | |||
| }, | |||
| onChange(even){ | |||
| console.log(even); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.formname]:even.detail | |||
| }) | |||
| }, | |||
| goSubmit(){ | |||
| console.log(this.data.form); | |||
| var that = this; | |||
| that.data.form.method = 'POST'; | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITADD, that.data.form, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "提交成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| @@ -5,9 +5,19 @@ | |||
| </view> | |||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <van-field label="省" value="{{ form.payee }}" placeholder="请输入省" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="市" value="{{ form.payeeAccount }}" placeholder="请输入市" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeeAccount"/> | |||
| <van-field label="省" value="{{ form.sheng }}" placeholder="请输入省" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.sheng"/> | |||
| <van-field label="市" value="{{ form.shi }}" placeholder="请输入市" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.shi"/> | |||
| <van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | |||
| <van-picker | |||
| columns="{{bankTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirm" | |||
| data-name="showBankType" | |||
| data-value="form.bankType" | |||
| /> | |||
| </van-popup> | |||
| <van-field readonly label="所属银行" value="{{ form.bankTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showBankType"/> | |||
| <van-popup show="{{showDeposit}}" round position="bottom" bind:close="closeBox" data-name="showDeposit"> | |||
| <van-picker | |||
| @@ -9,6 +9,8 @@ Page({ | |||
| */ | |||
| data: { | |||
| isIPX: app.globalData.isIPX, | |||
| depositList:[], | |||
| bankTypeOptions:[] | |||
| }, | |||
| goAdd(){ | |||
| wx.navigateTo({ | |||
| @@ -38,7 +40,31 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| var that = this; | |||
| //所属银行 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| bankTypeOptions:res.data | |||
| }); | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET'},{ | |||
| success: (response) => { | |||
| if (response.code == API.SUCCESS_CODE) { | |||
| for (let i = 0; i < response.rows.length; i++) { | |||
| response.rows[i].bankTypeText = UTIL.getTransform(response.rows[i].bankType,res.data); | |||
| response.rows[i].payeePaymentLines = response.rows[i].payeePaymentLines.substr(0,4)+'****' | |||
| } | |||
| that.setData({ | |||
| depositList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -16,19 +16,19 @@ | |||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||
| </view> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow"> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{depositList}}" wx:key="index"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <view class="tit_box"> | |||
| <image src="/image/apply/ICBC.png" style="width: 25px;height: 25px;"></image> | |||
| <text class="tit">威海农商行临港区支行</text> | |||
| <image src="/image/apply/{{iOf.indexOf(item.bankTypeText,'中国银行') > -1 ? 'ICBC':iOf.indexOf(item.bankTypeText,'农商行') > -1 ? 'RCB':iOf.indexOf(item.bankTypeText,'农业银行') > -1 ? 'ABC':iOf.indexOf(item.bankTypeText,'建设银行') > -1 ? 'CCB':'QT'}}.png" style="width: 25px;height: 25px;"></image> | |||
| <text class="tit">{{item.bankDeposit}}</text> | |||
| </view> | |||
| <view class="detail_box"> | |||
| <view style="width: 35%;">农商行(山东省)</view> | |||
| <view style="width: 35%;">{{item.bankTypeText}}</view> | |||
| <view style="width: 30%;display: flex;justify-content: center;"> | |||
| <image src="/image/icon/dress.png" style="width: 9px;height: 12px;margin-right: 5px;"></image> | |||
| <text>山东威海</text> | |||
| <text>{{item.sheng+item.shi}}</text> | |||
| </view> | |||
| <view><text>联行号:2570******</text></view> | |||
| <view><text>联行号:{{item.payeePaymentLines}}</text></view> | |||
| </view> | |||
| </view> | |||
| <view slot="right" class="deleteBox"> | |||
| @@ -37,24 +37,10 @@ | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <view class="tit_box"> | |||
| <image src="/image/apply/ICBC.png" style="width: 25px;height: 25px;"></image> | |||
| <text class="tit">威海农商行临港区支行</text> | |||
| </view> | |||
| <view class="detail_box"> | |||
| <view style="width: 35%;">中国建设银行</view> | |||
| <view style="width: 30%;display: flex;justify-content: center;"> | |||
| <image src="/image/icon/dress.png" style="width: 9px;height: 12px;margin-right: 5px;"></image> | |||
| <text>山东威海</text> | |||
| </view> | |||
| <view><text>联行号:2570******</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> | |||
| </van-swipe-cell> | |||
| <wxs module="iOf"> | |||
| var indexOf = function(name,value){ | |||
| return name.indexOf(value); | |||
| } | |||
| module.exports.indexOf = indexOf; | |||
| </wxs> | |||
| @@ -9,6 +9,19 @@ Page({ | |||
| */ | |||
| data: { | |||
| isIPX: app.globalData.isIPX, | |||
| showOrderType:false, | |||
| showOrderStatus:false, | |||
| form:{ | |||
| orderNum: "", //汇票号码 必填 | |||
| orderType: "", //汇票类型 必填 | |||
| orderAmount: "",//汇票金额 必填 | |||
| billPayUnit: "", //付票单位 必填 | |||
| billReceiveUnit: "", // 收票单位 必填 | |||
| startTime: "", //开票日期 必填 | |||
| endTime: "", //到期日期 必填 | |||
| orderStatus: "", //汇票状态 必填 1在库 2转付中 3转付 4承兑 | |||
| remark: "", | |||
| } | |||
| }, | |||
| /** | |||
| @@ -29,9 +42,91 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| //汇票类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| orderTypeOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| //汇票状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| orderStatusOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| }, | |||
| openBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:true | |||
| }) | |||
| }, | |||
| onChange(event){ | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.value]: event.detail, | |||
| }) | |||
| }, | |||
| closeBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:false | |||
| }) | |||
| }, | |||
| onConfirmOrderType(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.dictValue, | |||
| [event.currentTarget.dataset.value+'Text']: event.detail.value.dictLabel, | |||
| }); | |||
| }, | |||
| goSubmit(){ | |||
| //三、 新增银行汇票 | |||
| var that = this; | |||
| that.data.form.method = 'POST'; | |||
| UTIL.httpRequest(API.URL_GET_MONEYORDERADD, that.data.form , { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: '保存成功', | |||
| icon: 'success', | |||
| duration: 2000, | |||
| complete(){ | |||
| setTimeout(function(){ | |||
| that.back(); | |||
| },2000) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| onConfirmTime(event){ | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: UTIL.formatDate(event.detail), | |||
| }); | |||
| }, | |||
| openBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:true | |||
| }) | |||
| }, | |||
| closeBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:false | |||
| }) | |||
| }, | |||
| back:function(){ | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| @@ -5,27 +5,46 @@ | |||
| </view> | |||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <van-field label="汇票号码" value="{{ form.payee }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="汇票类型" value="{{ form.payeeAccount }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeeAccount"/> | |||
| <van-field label="汇票号码" value="{{ form.orderNum }}" placeholder="汇票号码" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderNum"/> | |||
| <van-field readonly label="出票金额" value="{{ form.bankTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showBankType"/> | |||
| <van-popup show="{{showDeposit}}" round position="bottom" bind:close="closeBox" data-name="showDeposit"> | |||
| <van-popup show="{{showOrderType}}" round position="bottom" bind:close="closeBox" data-name="showOrderType"> | |||
| <van-picker | |||
| columns="{{depositOptions}}" | |||
| columns="{{orderTypeOptions}}" | |||
| show-toolbar | |||
| value-key="bankDeposit" | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmDeposit" | |||
| data-name="showDeposit" | |||
| data-value="form.bankDeposit" | |||
| bind:confirm="onConfirmOrderType" | |||
| data-name="showOrderType" | |||
| data-value="form.orderType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="付款单位" value="{{ form.bankDepositText }}" placeholder="付款单位" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | |||
| <van-field label="收票单位" value="{{ form.payeePaymentLines }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| <van-field label="开票日期" value="{{ form.payeePaymentLines }}" placeholder="开票日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| <van-field label="到期日期" value="{{ form.payeePaymentLines }}" placeholder="到期日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| <van-field label="汇票状态" value="{{ form.payeePaymentLines }}" placeholder="汇票状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| <van-field label="备注" value="{{ form.payeePaymentLines }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| <van-field label="汇票类型" value="{{ form.orderTypeText }}" placeholder="汇票类型" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderType" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderType"/> | |||
| <van-field label="出票金额" value="{{ form.orderAmount }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderAmount"/> | |||
| <van-field label="付票单位" value="{{ form.billPayUnit }}" placeholder="付票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billPayUnit" /> | |||
| <van-field label="收票单位" value="{{ form.billReceiveUnit }}" placeholder="收票单位" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.billReceiveUnit"/> | |||
| <van-field readonly label="开票日期" value="{{ form.startTime }}" placeholder="开票日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.startTime" bindtap="openBox" data-name="showStartTime"/> | |||
| <van-calendar show="{{ showStartTime }}" bind:close="closeBox" data-name="showStartTime" bind:confirm="onConfirmTime" data-value="form.startTime" show-confirm="{{ false }}" /> | |||
| <van-field readonly label="到期日期" value="{{ form.endTime }}" placeholder="到期日期" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.endTime" bindtap="openBox" data-name="showEndTime"/> | |||
| <van-calendar show="{{ showEndTime }}" bind:close="closeBox" data-name="showEndTime" bind:confirm="onConfirmTime" data-value="form.endTime" show-confirm="{{ false }}" /> | |||
| <van-popup show="{{showOrderStatus}}" round position="bottom" bind:close="closeBox" data-name="showOrderStatus"> | |||
| <van-picker | |||
| columns="{{orderStatusOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmOrderType" | |||
| data-name="showOrderStatus" | |||
| data-value="form.orderStatus" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="汇票状态" value="{{ form.orderStatusText }}" placeholder="汇票状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.orderStatus" is-link arrow-direction ="down" bindtap="openBox" data-name="showOrderStatus"/> | |||
| <van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.remark"/> | |||
| </view> | |||
| <view class="bottom"> | |||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||
| @@ -10,17 +10,20 @@ Page({ | |||
| data: { | |||
| isIPX: app.globalData.isIPX, | |||
| option1: [ | |||
| { text: '汇票类型', value: 0 }, | |||
| { text: '银行承兑', value: 1 }, | |||
| { text: '商业承兑', value: 2 }, | |||
| { text: '汇票类型', value: '' }, | |||
| { text: '银行承兑', value: '1' }, | |||
| { text: '商业承兑', value: '2' }, | |||
| ], | |||
| option2: [ | |||
| { text: '汇票状态', value: 'a' }, | |||
| { text: '好评排序', value: 'b' }, | |||
| { text: '销量排序', value: 'c' }, | |||
| { text: '汇票状态', value: '' }, | |||
| { text: '在库', value: '1' }, | |||
| { text: '转付中', value: '2' }, | |||
| { text: '转付', value: '3' }, | |||
| { text: '承兑', value: '4' }, | |||
| ], | |||
| value1: 0, | |||
| value2: 'a', | |||
| value1: '', | |||
| value2: '', | |||
| moneyorderList:[] | |||
| }, | |||
| /** | |||
| @@ -50,6 +53,88 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| orderTypeOptions:res.data | |||
| }); | |||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET'},{ | |||
| success: (response) => { | |||
| if (response.code == API.SUCCESS_CODE) { | |||
| for (let i = 0; i < response.rows.length; i++) { | |||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | |||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||
| } | |||
| that.setData({ | |||
| moneyorderList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| changeTab(e){ | |||
| var that = this ; | |||
| that.setData({value1:e.detail}) | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET',orderType:that.data.value1,orderStatus:that.data.value2},{ | |||
| success: (response) => { | |||
| if (response.code == API.SUCCESS_CODE) { | |||
| for (let i = 0; i < response.rows.length; i++) { | |||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | |||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||
| } | |||
| that.setData({ | |||
| moneyorderList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| changeTab2(e){ | |||
| var that = this ; | |||
| that.setData({value2:e.detail}) | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| UTIL.httpRequest(API.URL_GET_GETMONEYORDERLIST, {method:'GET',orderType:that.data.value1,orderStatus:that.data.value2},{ | |||
| success: (response) => { | |||
| if (response.code == API.SUCCESS_CODE) { | |||
| for (let i = 0; i < response.rows.length; i++) { | |||
| response.rows[i].orderTypeText = UTIL.getTransform(response.rows[i].orderType,res.data); | |||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||
| response.rows[i].orderAmount = parseFloat(response.rows[i].orderAmount).toFixed(2); | |||
| } | |||
| that.setData({ | |||
| moneyorderList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| @@ -16,41 +16,42 @@ | |||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||
| </view> | |||
| <van-dropdown-menu active-color="#5CAE77"> | |||
| <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" /> | |||
| <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" /> | |||
| <van-dropdown-menu active-color="#5CAE77" bind:change="changeTab"> | |||
| <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bind:change="changeTab" /> | |||
| <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | |||
| </van-dropdown-menu> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow"> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{moneyorderList}}" wx:key="index"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <view class="tit_box"> | |||
| <view class="tit_box_left"> | |||
| <van-tag plain type="danger" color="#FC9A55" style="margin-right:10px;">汇票号</van-tag> | |||
| <text class="tit">3564353245345</text> | |||
| <text class="tit">{{item.orderNum}}</text> | |||
| </view> | |||
| <view class="tit_type"> | |||
| <text>商业承兑</text> | |||
| <text>{{item.orderTypeText}}</text> | |||
| </view> | |||
| </view> | |||
| <view class="detail_box"> | |||
| <view class="detail_box_left"> | |||
| <text class="fkmc">家家悦\n集团体育基地店</text> | |||
| <text class="fkmc">{{item.billPayUnit}}</text> | |||
| <text class="fkdw">付票单位</text> | |||
| </view> | |||
| <view class="detail_box_center"> | |||
| <text class="detail_box_money">¥5000.00</text> | |||
| <image src="/image/icon/icon_zfz.png" style="width:40px;" mode="widthFix"></image> | |||
| <text class="detail_box_money">¥{{item.orderAmount}}</text> | |||
| <image src="/image/icon/{{item.orderStatus == 1 ? 'zk' : item.orderStatus == 2 ? 'zfz' : item.orderStatus == 3 ? 'zf' : item.orderStatus == 4 ? 'cd' : ''}}.png" style="width:38px;" mode="widthFix"></image> | |||
| <text style="color: {{item.orderStatus == 1 ? '#FC9A55' : item.orderStatus == 2 ? '#5CAE77' : item.orderStatus == 3 ? '#E90000' : item.orderStatus == 4 ? '#878787' : ''}};font-size: 12px;">{{item.orderStatus == 1 ? '在库' : item.orderStatus == 2 ? '转付中' : item.orderStatus == 3 ? '转付' : item.orderStatus == 4 ? '承兑' : ''}}</text> | |||
| </view> | |||
| <view class="detail_box_right"> | |||
| <text class="fkmc">张村\n经济合作社</text> | |||
| <text class="fkmc">{{item.billReceiveUnit}}</text> | |||
| <text class="skdw">收票单位</text> | |||
| </view> | |||
| </view> | |||
| <view class="detail_time"> | |||
| <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | |||
| <text>2021.09.01-2022.08.31</text> | |||
| <text>{{item.startTime}} - {{item.endTime}}</text> | |||
| </view> | |||
| </view> | |||
| <view slot="right" class="deleteBox"> | |||
| @@ -146,6 +146,9 @@ text{display: block;} | |||
| margin-left: 5px; | |||
| color: #878787; | |||
| } | |||
| .li .detail_box_left{ | |||
| width: 30%; | |||
| } | |||
| .li .detail_box_left text{ | |||
| text-align: center; | |||
| } | |||
| @@ -158,9 +161,10 @@ text{display: block;} | |||
| color: #666666; | |||
| font-size: 12px; | |||
| text-align: center; | |||
| width: 40%; | |||
| } | |||
| .li .detail_box_right{ | |||
| width: 30%; | |||
| } | |||
| .li .detail_box_right text{ | |||
| text-align: center; | |||
| @@ -0,0 +1,476 @@ | |||
| // 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', | |||
| }, | |||
| assetTypeindex:'0', | |||
| settleTypeindex:'0', | |||
| collectionPayindex:'0', | |||
| contractionSourceindex:'0', | |||
| contractionStatusindex:'0', | |||
| biddingWayindex:'0', | |||
| biddingTypeindex:'0', | |||
| showBiddingDate:false, | |||
| minDate: new Date(2008, 5, 1).getTime(), | |||
| maxDate: new Date(2040, 0, 31).getTime(), | |||
| // 合同类型字典 | |||
| assetTypeOptions: [], | |||
| // 结款方式字典 | |||
| settleTypeOptions: [], | |||
| // 收付款类型字典 | |||
| collectionPayOptions: [], | |||
| // 合同来源字典 | |||
| contractionSourceOptions: [], | |||
| // 合同状态字典 | |||
| contractionStatusOptions: [], | |||
| // 招标方式字典 | |||
| biddingWayOptions: [], | |||
| // 招标类型字典 | |||
| biddingTypeOptions: [], | |||
| }, | |||
| 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 | |||
| }) | |||
| }, | |||
| onConfirmBiddingDate(e){ | |||
| let data = this.getNewDate(new Date(e.detail.value)); | |||
| this.setData({'form.biddingDate':data}); | |||
| }, | |||
| onConfirmReviewTime(e){ | |||
| let data = this.getNewDate(new Date(e.detail.value)); | |||
| this.setData({'form.reviewTime':data}); | |||
| }, | |||
| onConfirmBuildingTime(e){ | |||
| let data = this.getNewDate(new Date(e.detail.value)); | |||
| this.setData({'form.buildingTime':data}); | |||
| }, | |||
| onConfirmStartTime(e){ | |||
| let data = this.getNewDate(new Date(e.detail.value)); | |||
| this.setData({'form.startTime':data}); | |||
| }, | |||
| onConfirmEndTime(e){ | |||
| let data = this.getNewDate(new Date(e.detail.value)); | |||
| this.setData({'form.endTime':data}); | |||
| }, | |||
| onConfirmbiddingType (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.biddingType':this.data.biddingTypeOptions[obj].dictValue, | |||
| 'biddingTypeindex':obj | |||
| }) | |||
| }, | |||
| onConfirmShowBiddingWay (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.biddingWay':this.data.biddingWayOptions[obj].dictValue, | |||
| 'biddingWayindex':obj | |||
| }) | |||
| }, | |||
| onConfirmSettleType (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.settleType':this.data.settleTypeOptions[obj].dictValue, | |||
| 'settleTypeindex':obj | |||
| }) | |||
| }, | |||
| onConfirmCollectionPay (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.collectionPay':this.data.collectionPayOptions[obj].dictValue, | |||
| 'collectionPayindex':obj | |||
| }) | |||
| }, | |||
| onConfirmContractionSource (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.contractionSource':this.data.contractionSourceOptions[obj].dictValue, | |||
| 'contractionSourceindex':obj | |||
| }) | |||
| }, | |||
| onConfirmAssetType (e) { | |||
| console.log(e); | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.assetType':this.data.assetTypeOptions[obj].dictValue, | |||
| 'assetTypeindex':obj | |||
| }) | |||
| }, | |||
| onConfirmContractionStatus (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.contractionStatus':this.data.contractionStatusOptions[obj].dictValue, | |||
| 'contractionStatusindex':obj | |||
| }) | |||
| }, | |||
| onConfirmBiddingWay (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| 'form.biddingWay':this.data.biddingWayOptions[obj].dictValue, | |||
| 'biddingWayindex':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.firstParty==''||this.data.form.firstParty==null){ //甲方 | |||
| UTIL.showToastNoneIcon('请输入单据编码!'); | |||
| return false; | |||
| }else if(this.data.form.secondParty==''||this.data.form.secondParty==null){ //乙方 | |||
| UTIL.showToastNoneIcon('请输入备注说明!'); | |||
| return false; | |||
| }else if(this.data.form.collectionPay == ''||this.data.form.collectionPay==null){//收付款类型 | |||
| UTIL.showToastNoneIcon('收付款类型不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.contractionSource == ''||this.data.form.contractionSource==null){//合同来源 | |||
| UTIL.showToastNoneIcon('合同来源不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.totalAmount == ''||this.data.form.totalAmount==null){//合同金额 | |||
| UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.buildingTime == ''||this.data.form.buildingTime==null){//签订日期 | |||
| UTIL.showToastNoneIcon('合同金额不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.startTime == ''||this.data.form.startTime==null){//开始日期 | |||
| UTIL.showToastNoneIcon('开始日期不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.endTime == ''||this.data.form.endTime==null){//结束日期 | |||
| UTIL.showToastNoneIcon('结束日期不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.price == ''||this.data.form.price==null){//单价 | |||
| UTIL.showToastNoneIcon('单价不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.receivedAmount == ''||this.data.form.receivedAmount==null){//已结款 | |||
| UTIL.showToastNoneIcon('已结款不能为空!'); | |||
| return false; | |||
| }else if(this.data.form.contractionStatus == ''||this.data.form.contractionStatus==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_CONTRACTUPDATE,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_CONTRACTADD,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 | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| if(options.id!=null&&options.id!=""){ | |||
| this.setData({id:options.id}) | |||
| //获取收入合同状态 | |||
| UTIL.httpRequest(API.URL_GET_CONTRACTDETAIL + this.data.id, {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({'form':res.data}); | |||
| let that = this; | |||
| //获取收入合同状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'type_of_contract', {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 + 'contraction_source', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| that.setData({ | |||
| contractionSourceOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.contractionSource){ | |||
| that.setData({'contractionSourceindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入收付款类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'collection_pay', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| that.setData({ | |||
| collectionPayOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.collectionPay){ | |||
| that.setData({'collectionPayindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入结款方式 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'settle_type', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| that.setData({ | |||
| settleTypeOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.settleType){ | |||
| that.setData({'settleTypeindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入合同状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'contraction_status', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| that.setData({ | |||
| contractionStatusOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.contractionStatus){ | |||
| that.setData({'contractionStatusindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入招标方式 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_way', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| that.setData({ | |||
| biddingWayOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.biddingWay){ | |||
| that.setData({'biddingWayindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入招标类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_types', {method:'GET'}, { | |||
| success: (r) => { | |||
| if(r.data.length>0){ | |||
| console.log(res.data,r.data); | |||
| that.setData({ | |||
| biddingTypeOptions:r.data, | |||
| }) | |||
| r.data.map((rr,ind) => { | |||
| if(rr.dictValue == res.data.biddingType){ | |||
| that.setData({'biddingTypeindex':ind}) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }else{ | |||
| let that = this; | |||
| //获取收入合同状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'type_of_contract', {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 + 'contraction_source', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| contractionSourceOptions:res.data, | |||
| 'form.contractionSource':res.data[0].dictValue | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入收付款类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'collection_pay', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| collectionPayOptions:res.data, | |||
| 'form.collectionPay':res.data[0].dictValue | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入结款方式 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'settle_type', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| settleTypeOptions:res.data, | |||
| 'form.settleType':res.data[0].dictValue | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入合同状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'contraction_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| contractionStatusOptions:res.data, | |||
| 'form.contractionStatus':res.data[1].dictValue | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入招标方式 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_way', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| biddingWayOptions:res.data, | |||
| 'form.biddingWay':res.data[0].dictValue | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| //获取收入招标类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bidding_types', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| that.setData({ | |||
| biddingTypeOptions:res.data, | |||
| 'form.biddingType':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,296 @@ | |||
| <!--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/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="onConfirmContractionSource" value="{{contractionSourceindex}}" range="{{contractionSourceOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{contractionSourceOptions[contractionSourceindex].dictLabel?contractionSourceOptions[contractionSourceindex].dictLabel:"选择合同来源"}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view> | |||
| <view> | |||
| <text><text style="color:red;margin-right: 10rpx;">*</text>甲方名称</text> | |||
| </view> | |||
| <view> | |||
| <input type="text" value="{{form.firstParty}}" bindinput="bindNewInput" data-name="form.firstParty" 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.firstPartyDirector}}" bindinput="bindNewInput" data-name="form.firstPartyDirector" 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.firstPartyPhone}}" bindinput="bindNewInput" data-name="form.firstPartyPhone" 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.secondParty}}" bindinput="bindNewInput" data-name="form.secondParty" 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.secondPartyDirector}}" bindinput="bindNewInput" data-name="form.secondPartyDirector" 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.secondPartyPhone}}" bindinput="bindNewInput" data-name="form.secondPartyPhone" 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="onConfirmCollectionPay" value="{{collectionPayindex}}" range="{{collectionPayOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{collectionPayOptions[collectionPayindex].dictLabel?collectionPayOptions[collectionPayindex].dictLabel:"选择首付款类型"}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class="section"> | |||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>结款方式</view> | |||
| <picker bindchange="onConfirmSettleType" value="{{settleTypeindex}}" range="{{settleTypeOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{settleTypeOptions[settleTypeindex].dictLabel?settleTypeOptions[settleTypeindex].dictLabel:"选择结款方式"}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view> | |||
| <view> | |||
| <text><text style="color:red;margin-right: 10rpx;">*</text>合同金额</text> | |||
| </view> | |||
| <view> | |||
| <input type="text" value="{{form.totalAmount}}" bindinput="bindNewInput" data-name="form.totalAmount" 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.num}}" bindinput="bindNewInput" data-name="form.num" 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.unit}}" bindinput="bindNewInput" data-name="form.unit" 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.price}}" bindinput="bindNewInput" data-name="form.price" 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.receivedAmount}}" bindinput="bindNewInput" data-name="form.receivedAmount" 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.settledAmount}}" bindinput="bindNewInput" data-name="form.settledAmount" 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 mode="date" value="{{form.buildingTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmBuildingTime"> | |||
| <view class="picker"> | |||
| {{form.buildingTime}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class="section"> | |||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>开始日期</view> | |||
| <picker mode="date" value="{{form.startTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmStartTime"> | |||
| <view class="picker"> | |||
| {{form.startTime}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class="section"> | |||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>结束日期</view> | |||
| <picker mode="date" value="{{form.endTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmEndTime"> | |||
| <view class="picker"> | |||
| {{form.endTime}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class="section"> | |||
| <view class="section__title"><text style="color:red;margin-right: 10rpx;">*</text>合同状态</view> | |||
| <picker bindchange="onConfirmContractionStatus" value="{{contractionStatusindex}}" range="{{contractionStatusOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{contractionStatusOptions[contractionStatusindex].dictLabel?contractionStatusOptions[contractionStatusindex].dictLabel:"选择合同状态"}} | |||
| </view> | |||
| </picker> | |||
| </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" placeholder="备注" 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="onConfirmBiddingWay" value="{{biddingWayindex}}" range="{{biddingWayOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{biddingWayOptions[biddingWayindex].dictLabel?biddingWayOptions[biddingWayindex].dictLabel:"选择招标方式"}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view> | |||
| <view> | |||
| <text><text style="color:red;margin-right: 22rpx;"></text>项目编号</text> | |||
| </view> | |||
| <view> | |||
| <input type="text" value="{{form.itemId}}" bindinput="bindNewInput" data-name="form.itemId" 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.itemName}}" bindinput="bindNewInput" data-name="form.itemName" 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.handleName}}" bindinput="bindNewInput" data-name="form.handleName" 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.budget}}" bindinput="bindNewInput" data-name="form.budget" 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 mode="date" value="{{form.biddingDate}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmBiddingDate"> | |||
| <view class="picker"> | |||
| {{form.biddingDate}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view class="section"> | |||
| <view class="section__title"><text style="color:red;margin-right: 22rpx;"></text>招标类型</view> | |||
| <picker bindchange="onConfirmbiddingType" value="{{biddingTypeindex}}" range="{{biddingTypeOptions}}" range-key="{{'dictLabel'}}"> | |||
| <view class="picker"> | |||
| {{biddingTypeOptions[biddingTypeindex].dictLabel?biddingTypeOptions[biddingTypeindex].dictLabel:"选择招标方式"}} | |||
| </view> | |||
| </picker> | |||
| </view> | |||
| <view> | |||
| <view> | |||
| <text><text style="color:red;margin-right: 22rpx;"></text>中标单位</text> | |||
| </view> | |||
| <view> | |||
| <input type="text" value="{{form.winBiddingCompany}}" bindinput="bindNewInput" data-name="form.winBiddingCompany" 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.winBiddingPrice}}" bindinput="bindNewInput" data-name="form.nawinBiddingPriceme" 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.reviewer}}" bindinput="bindNewInput" data-name="form.reviewer" 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 mode="date" value="{{form.reviewTime}}" start="{{ minDate }}" end="{{ maxDate }}" bindchange="onConfirmReviewTime"> | |||
| <view class="picker"> | |||
| {{form.reviewTime}} | |||
| </view> | |||
| </picker> | |||
| </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,304 @@ | |||
| // 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:"" | |||
| }, | |||
| goAdd(){ | |||
| wx.navigateTo({ | |||
| url: 'add/add', | |||
| }) | |||
| }, | |||
| back:function(){ | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| var that = this; | |||
| that.setData({ | |||
| scrollHeight:wx.getSystemInfoSync().windowHeight | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady() { | |||
| this.getList(); | |||
| //获取附件字典 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'common_attach', {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.length>0){ | |||
| this.setData({ | |||
| uploadOptions:res.data, | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| getList:function(){ | |||
| let params = { | |||
| pageNum:this.data.pageNums, | |||
| pageSize:10, | |||
| name:this.data.name | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_CONTRACTLIST,params,{ | |||
| success: (res) => { | |||
| console.log(res); | |||
| if(res.code == 200){ | |||
| if(this.data.pageNums!=1&&this.data.list.length<=res.total){ | |||
| let lists = this.data.list.concat(res.rows) | |||
| this.setData({list:lists}) | |||
| }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.getList(); | |||
| }, | |||
| goUpdate(e){ | |||
| wx.navigateTo({ | |||
| url: '/pages/contract/add/add?id='+e.currentTarget.dataset.id, | |||
| }) | |||
| }, | |||
| delete(e){ | |||
| UTIL.httpRequest(API.URL_GET_CONTRACTDELETE + 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) | |||
| this.setData({"fileList":[]}) | |||
| }, | |||
| asyncFun(id){ | |||
| let uploadList = this.data.uploadOptions | |||
| 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); | |||
| } | |||
| }) | |||
| }) | |||
| }, | |||
| 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_contraction_info", //上传表 | |||
| bizPath: "contraction", //上传目录 | |||
| 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,85 @@ | |||
| <!--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/contract_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.contractionStatus=='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.contractionStatus=='2'}}" 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> | |||
| <text> | |||
| {{item.code}} | |||
| </text> | |||
| </view> | |||
| <view class="detail_box"> | |||
| <view style="width: 50%;"> | |||
| <image src="/image/icon/jia_icon.png" style="width: 15px;height: 15px;border-radius:5px;margin-right: 5px;"></image> | |||
| <text>{{item.firstParty}}</text> | |||
| </view> | |||
| <view style="width: 50%;"> | |||
| <image src="/image/icon/yi_icon.png" style="width: 15px;height: 15px;border-radius:5px;margin-right: 5px;"></image> | |||
| <text>{{item.secondParty}}</text> | |||
| </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.startTime}}-{{item.endTime}}</text> | |||
| </view> | |||
| <view style="width: 40%;text-align: right;"> | |||
| 合同金额: | |||
| <text style="color:red">¥{{item.totalAmount}}</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,269 @@ | |||
| /* 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: 22px 8px; | |||
| } | |||
| .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; | |||
| } | |||
| @@ -14,11 +14,12 @@ Page({ | |||
| payeeAccount:'', | |||
| bankType:'', | |||
| bankDeposit:'', | |||
| accountType:'2', | |||
| accountType:'', | |||
| payeeType:'1', | |||
| payeeTypeText:'收款方', | |||
| payeePaymentLines:'', | |||
| status:'0', | |||
| villageAccountType: "2", | |||
| }, | |||
| showBankType:false, | |||
| showAccountType:false, | |||
| @@ -58,7 +59,7 @@ Page({ | |||
| } | |||
| }) | |||
| // 付款方式类型字典查询 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'account_type', {method:'GET'}, { | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'account_type_cashier', {method:'GET'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| accountTypeOptions:res.data, | |||
| @@ -96,19 +97,86 @@ Page({ | |||
| [even.currentTarget.dataset.name]:true | |||
| }) | |||
| }, | |||
| onConfirm(even){ | |||
| accountTypeChange(even){ | |||
| console.log(even); | |||
| var that = this ; | |||
| if(even.currentTarget.dataset.name == "showBankType"){ | |||
| // 付款方式类型字典查询 | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, {method:'GET',bankType:even.detail.value.dictValue,status:'0'}, { | |||
| success: (res) => { | |||
| that.setData({ | |||
| depositOptions:res.rows, | |||
| }) | |||
| } | |||
| }) | |||
| if (even.detail.value.dictValue == 102) { | |||
| that.setData({bankNameState : false}); | |||
| } else { | |||
| that.setData({bankNameState : true}); | |||
| } | |||
| this.setData({ | |||
| [even.currentTarget.dataset.value]:even.detail.value.dictValue, | |||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.dictLabel, | |||
| [even.currentTarget.dataset.name]:false, | |||
| }) | |||
| }, | |||
| //银行类型选择 | |||
| bankTypeChange(even) { | |||
| var that = this ; | |||
| if(even.detail.value.dictValue == '1' || even.detail.value.dictValue == '2'){ | |||
| that.setData({nongshanghangShow : true}); | |||
| that.villageAccountTypeChange(that.data.form.villageAccountType); | |||
| }else{ | |||
| that.setData({ | |||
| nongshanghangShow : true, | |||
| nongshanghangShow1 : true, | |||
| nongshanghangaccountNoShow : true, | |||
| }); | |||
| } | |||
| if(even.detail.value.dictValue == '3'){ | |||
| that.setData({ | |||
| nonghangShow : true, | |||
| }); | |||
| }else{ | |||
| that.setData({ | |||
| nonghangShow : false, | |||
| }); | |||
| } | |||
| if(even.detail.value.dictValue == '4'){ | |||
| that.setData({ | |||
| jianhangShow : true, | |||
| }); | |||
| }else{ | |||
| that.setData({ | |||
| jianhangShow : false, | |||
| }); | |||
| } | |||
| that.setData({ | |||
| isManagementControlTypeVisible : even.detail.value.dictValue == '2' && that.data.form.villageAccountType == '3' ? 1 : 0,// 农商行(山东省) && 多级账簿 | |||
| [even.currentTarget.dataset.value]:even.detail.value.dictValue, | |||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.dictLabel, | |||
| [even.currentTarget.dataset.name]:false, | |||
| }); | |||
| }, | |||
| //账户分类选择 | |||
| villageAccountTypeChange(val) { | |||
| var that = this; | |||
| this.data.form.accountNo = ""; | |||
| if(val == '1'){ | |||
| that.setData({ | |||
| nongshanghangaccountNoShow : false, | |||
| nongshanghangShow1 : true, | |||
| }); | |||
| }else if(val == '2') { | |||
| that.setData({ | |||
| nongshanghangaccountNoShow : false, | |||
| nongshanghangShow1 : false, | |||
| }); | |||
| }else{ | |||
| that.setData({ | |||
| nongshanghangaccountNoShow : true, | |||
| nongshanghangShow1 : true, | |||
| }); | |||
| } | |||
| that.setData({ | |||
| isManagementControlTypeVisible : that.data.form.bankType == '2' && val == '3' ? 1 : 0, | |||
| }); | |||
| }, | |||
| onConfirm(even){ | |||
| console.log(even); | |||
| var that = this ; | |||
| this.setData({ | |||
| [even.currentTarget.dataset.value]:even.detail.value.dictValue, | |||
| [even.currentTarget.dataset.value+"Text"]:even.detail.value.dictLabel, | |||
| @@ -3,23 +3,53 @@ | |||
| <text style="top:{{isIPX?'54px':'30px'}};">新增付款方</text> | |||
| </view> | |||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <van-field label="账户类型" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="所属银行" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="账户分类" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="所属镇账户" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="账簿号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="管控类型" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="客户编号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-popup show="{{showAccountType}}" round position="bottom" bind:close="closeBox" data-name="showAccountType"> | |||
| <van-picker | |||
| columns="{{accountTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="accountTypeChange" | |||
| data-name="showAccountType" | |||
| data-value="form.accountType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="账户类型" value="{{ form.accountTypeText }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showAccountType"/> | |||
| <van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | |||
| <van-picker | |||
| columns="{{bankTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="bankTypeChange" | |||
| data-name="showBankType" | |||
| data-value="form.bankType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="所属银行" wx:if="{{form.accountType == '102'}}" value="{{ form.bankType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" data-name="showBankType" bindtap="openBox"/> | |||
| <van-field label="账户分类" wx:if="{{nongshanghangShow&&!bankNameState}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="用途类型" wx:if="{{form.accountType == '102'}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="所属镇账户" wx:if="{{nongshanghangShow1&&!bankNameState}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="账簿号" wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="管控类型" wx:if="{{isManagementControlTypeVisible&&!bankNameState}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="中心账套" wx:if="{{isManagementControlTypeVisible&&!bankNameState&&isMultiBookAndCentralBook}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="会计科目" wx:if="{{isManagementControlTypeVisible&&!bankNameState&&isMultiBookAndCentralBook}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="客户编号" wx:if="{{form.bankType == '2'&&!bankNameState}}" value="{{ form.villageAccountType }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="账户名称" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="银行账号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="开户银行" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="联行号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="银行账号" wx:if="{{!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="开户银行" wx:if="{{!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="联行号" wx:if="{{!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="关联科目" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="开户银行地址" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="支付口令" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field readonly label="账户类别" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <van-field label="开户银行地址" wx:if="{{!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="支付口令" wx:if="{{!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field readonly wx:if="{{!bankNameState}}" label="账户类别" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view slot="input"> | |||
| <van-radio-group | |||
| value="{{ form.accountType }}" | |||
| @@ -33,10 +63,11 @@ | |||
| </view> | |||
| </van-field> | |||
| <van-field label="初始余额" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="手机号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="内部账号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="内部户名" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="账簿号" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="手机号" wx:if="{{jianhangShow&&!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="合约账号" wx:if="{{nonghangShow&&!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="合约户名" wx:if="{{nonghangShow&&!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="账簿号" wx:if="{{nonghangShow&&!bankNameState}}" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field readonly label="是否停用" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view slot="input"> | |||
| <van-radio-group | |||
| @@ -50,91 +81,10 @@ | |||
| </van-radio-group> | |||
| </view> | |||
| </van-field> | |||
| </view> | |||
| <van-popup show="{{showBankType}}" round position="bottom" bind:close="closeBox" data-name="showBankType"> | |||
| <van-picker | |||
| columns="{{bankTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirm" | |||
| data-name="showBankType" | |||
| data-value="form.bankType" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="收款方" value="{{ form.payee }}" placeholder="请输入收款方" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee"/> | |||
| <van-field label="收款账号" value="{{ form.payeeAccount }}" placeholder="请输入收款账号" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeeAccount"/> | |||
| <van-popup show="{{showPayeeType}}" round position="bottom" bind:close="closeBox" data-name="showPayeeType"> | |||
| <van-picker | |||
| columns="{{payeeTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirm" | |||
| data-name="showPayeeType" | |||
| data-value="form.payeeType" | |||
| /> | |||
| </van-popup> | |||
| <van-field readonly label="收款人类型" value="{{ form.payeeTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showPayeeType" /> | |||
| <van-popup show="{{showAccountType}}" round position="bottom" bind:close="closeBox" data-name="showAccountType"> | |||
| <van-picker | |||
| columns="{{accountTypeOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirm" | |||
| data-name="showAccountType" | |||
| data-value="form.accountType" | |||
| /> | |||
| </van-popup> | |||
| <van-field readonly label="账户类型" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view slot="input"> | |||
| <van-radio-group | |||
| value="{{ form.accountType }}" | |||
| bind:change="onChange" | |||
| direction="horizontal" | |||
| data-value="form.accountType" | |||
| > | |||
| <van-radio name="1" checked-color="#2C8E68">公户</van-radio> | |||
| <van-radio name="2" checked-color="#2C8E68">私户</van-radio> | |||
| </van-radio-group> | |||
| </view> | |||
| </van-field> | |||
| <!-- <van-field readonly label="账户类型" value="{{ form.accountTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showAccountType"/> --> | |||
| <van-field readonly label="所属银行" value="{{ form.bankTypeText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showBankType"/> | |||
| <van-popup show="{{showDeposit}}" round position="bottom" bind:close="closeBox" data-name="showDeposit"> | |||
| <van-picker | |||
| columns="{{depositOptions}}" | |||
| show-toolbar | |||
| value-key="bankDeposit" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmDeposit" | |||
| data-name="showDeposit" | |||
| data-value="form.bankDeposit" | |||
| /> | |||
| </van-popup> | |||
| <van-field readonly label="开户行" value="{{ form.bankDepositText }}" placeholder="请选择" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showDeposit" /> | |||
| <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| </view> | |||
| <view class="main-box table-box"> | |||
| <van-field readonly label="账簿是否限额" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view class="main-box table-box" wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}"> | |||
| <van-field readonly wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" label="账簿是否限额" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view slot="input"> | |||
| <van-radio-group | |||
| value="{{ form.accountType }}" | |||
| @@ -147,8 +97,8 @@ | |||
| </van-radio-group> | |||
| </view> | |||
| </van-field> | |||
| <van-field label="单笔交易限额" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field readonly label="账簿是否透支" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <van-field wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" label="单笔交易限额" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" readonly label="账簿是否透支" value="{{ form.accountType }}" border="{{ false }}" input-align="right" required> | |||
| <view slot="input"> | |||
| <van-radio-group | |||
| value="{{ form.accountType }}" | |||
| @@ -161,8 +111,8 @@ | |||
| </van-radio-group> | |||
| </view> | |||
| </van-field> | |||
| <van-field label="透支类型" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field label="透支额度" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" label="透支类型" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| <van-field wx:if="{{nongshanghangaccountNoShow&&!bankNameState}}" label="透支额度" value="{{ form.payee }}" placeholder=" " border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payee" is-link arrow-direction ="down"/> | |||
| </view> | |||
| <!-- <view class="bottom"> | |||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||
| @@ -57,4 +57,7 @@ | |||
| padding: 8px 0px; | |||
| background-image: linear-gradient(to right, #2C8E68, #5CAE77); | |||
| color: #fff; | |||
| } | |||
| .van-field__label { | |||
| width: max-content; | |||
| } | |||
| @@ -110,18 +110,6 @@ Page({ | |||
| this.setData({ | |||
| ["formData.accountDate"]:this.getNewDate(new Date()) | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onLoad: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onReady: function () { | |||
| let that = this; | |||
| //获取收入单位 | |||
| @@ -162,6 +150,19 @@ Page({ | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onLoad: function () { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onReady: function () { | |||
| }, | |||
| deleteimg:function(e){ | |||
| @@ -1,24 +1,12 @@ | |||
| { | |||
| "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" | |||
| "van-calendar": "@vant/weapp/calendar/index" | |||
| } | |||
| } | |||
| @@ -78,6 +78,7 @@ | |||
| <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> | |||
| @@ -107,7 +108,7 @@ | |||
| </view> | |||
| </view> | |||
| </block> | |||
| <view class="main-box table-box" style="margin-top: 15px;"> | |||
| <van-cell> | |||
| <!-- <view slot="icon"> | |||
| @@ -93,7 +93,7 @@ | |||
| <view class="image"><image class="attribute" src="../../image/index/child_function_08.png" mode="aspectFit"></image></view> | |||
| <text class="desc">工程项目</text> | |||
| </view> | |||
| <view class="flex_block" bindtap="showModal"> | |||
| <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> | |||
| @@ -0,0 +1,125 @@ | |||
| // pages/project/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, | |||
| showStartTime:false, | |||
| showEndTime:false, | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_projcet_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| ynProjcetStatusOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| }, | |||
| back:function(){ | |||
| wx.navigateBack({ | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| closeBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:false | |||
| }) | |||
| }, | |||
| openBox(even){ | |||
| console.log(even.currentTarget.dataset.name); | |||
| this.setData({ | |||
| [even.currentTarget.dataset.name]:true | |||
| }) | |||
| }, | |||
| onConfirmTime(event){ | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: UTIL.formatDate(event.detail), | |||
| }); | |||
| }, | |||
| onConfirmYn(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.dictValue, | |||
| [event.currentTarget.dataset.value+'Text']: event.detail.value.dictLabel, | |||
| }); | |||
| }, | |||
| goSubmit(){ | |||
| var that = this ; | |||
| let data = that.data.form; | |||
| data.method = 'POST'; | |||
| UTIL.httpRequest(API.URL_GET_PROJECTADD, data, { | |||
| success: (res) => { | |||
| } | |||
| }) | |||
| }, | |||
| onChange(event){ | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.value]: event.detail, | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面初次渲染完成 | |||
| */ | |||
| onReady() { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| onHide() { | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面卸载 | |||
| */ | |||
| onUnload() { | |||
| }, | |||
| /** | |||
| * 页面相关事件处理函数--监听用户下拉动作 | |||
| */ | |||
| onPullDownRefresh() { | |||
| }, | |||
| /** | |||
| * 页面上拉触底事件的处理函数 | |||
| */ | |||
| onReachBottom() { | |||
| }, | |||
| /** | |||
| * 用户点击右上角分享 | |||
| */ | |||
| onShareAppMessage() { | |||
| } | |||
| }) | |||
| @@ -0,0 +1,19 @@ | |||
| { | |||
| "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" | |||
| } | |||
| } | |||
| @@ -0,0 +1,37 @@ | |||
| <!--pages/payee/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"></image> | |||
| <text style="top:{{isIPX?'54px':'30px'}};">新增工程项目</text> | |||
| </view> | |||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| <van-field label="项目名称" value="{{ form.projectName }}" placeholder="项目名称" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectName"/> | |||
| <van-field label="合同承建方" value="{{ form.projectContractor }}" placeholder="合同承建方" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectContractor"/> | |||
| <van-field readonly label="开工日期" value="{{ form.startTime }}" placeholder="开工日期" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showStartTime"/> | |||
| <van-calendar show="{{ showStartTime }}" bind:close="closeBox" data-name="showStartTime" bind:confirm="onConfirmTime" data-value="form.startTime" show-confirm="{{ false }}" /> | |||
| <van-field label="竣工日期" value="{{ form.endTime }}" placeholder="竣工日期" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction ="down" bindtap="openBox" data-name="showEndTime" /> | |||
| <van-calendar show="{{ showEndTime }}" bind:close="closeBox" data-name="showEndTime" bind:confirm="onConfirmTime" data-value="form.endTime" show-confirm="{{ false }}" /> | |||
| <van-field label="合共价款(元)" value="{{ form.projectAmount }}" placeholder="合共价款(元)" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectAmount"/> | |||
| <van-popup show="{{showYnProjcetStatus}}" round position="bottom" bind:close="closeBox" data-name="showYnProjcetStatus"> | |||
| <van-picker | |||
| columns="{{ynProjcetStatusOptions}}" | |||
| show-toolbar | |||
| value-key="dictLabel" | |||
| bind:cancel="closeBox" | |||
| bind:confirm="onConfirmYn" | |||
| data-name="showYnProjcetStatus" | |||
| data-value="form.ynProjcetStatus" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="工程状态" value="{{ form.ynProjcetStatusText }}" placeholder="工程状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.ynProjcetStatus" is-link arrow-direction ="down" bindtap="openBox" data-name="showYnProjcetStatus"/> | |||
| <van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.remark"/> | |||
| </view> | |||
| <view class="bottom"> | |||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||
| </view> | |||
| @@ -0,0 +1,62 @@ | |||
| /* 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; | |||
| } | |||
| .bottom{ | |||
| width: 100%; | |||
| margin: 0 auto; | |||
| text-align: center; | |||
| margin-top: 30px; | |||
| margin-bottom: 30px; | |||
| display: flex; | |||
| position: absolute; | |||
| bottom: 10%; | |||
| } | |||
| .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; | |||
| } | |||
| .van-field__label { | |||
| width: max-content; | |||
| } | |||
| @@ -38,7 +38,31 @@ Page({ | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| onShow() { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_projcet_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| ynProjcetStatusOptions:res.data | |||
| }); | |||
| UTIL.httpRequest(API.URL_GET_GETPROJECTLIST, {method:'GET'},{ | |||
| success: (response) => { | |||
| if (response.code == API.SUCCESS_CODE) { | |||
| for (let i = 0; i < response.rows.length; i++) { | |||
| response.rows[i].ynProjcetStatusText = UTIL.getTransform(response.rows[i].ynProjcetStatus,res.data); | |||
| response.rows[i].startTime = response.rows[i].startTime.replace(/-/g,"."); | |||
| response.rows[i].endTime = response.rows[i].endTime.replace(/-/g,"."); | |||
| response.rows[i].projectAmount = parseFloat(response.rows[i].projectAmount).toFixed(2); | |||
| } | |||
| that.setData({ | |||
| projectList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -1,7 +1,7 @@ | |||
| <!--pages/project/project.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> | |||
| <text style="top:{{isIPX?'54px':'30px'}};">工程项目</text> | |||
| </view> | |||
| <view class="search_box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| @@ -16,36 +16,31 @@ | |||
| <view class="add_btn" bindtap="goAdd"><text>新增</text></view> | |||
| </view> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow"> | |||
| <van-swipe-cell right-width="{{ 65 }}" class="workflow" wx:for="{{projectList}}" wx:key="index"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <view class="tit_box"> | |||
| <view class="tit_box_left"> | |||
| <van-tag plain type="danger" color="#FC9A55" style="margin-right:10px;">汇票号</van-tag> | |||
| <text class="tit">3564353245345</text> | |||
| <image src="/image/icon/icon_gc.png" style="width: 17px; height: 15px;"></image> | |||
| <text class="tit">{{item.projectName}}</text> | |||
| </view> | |||
| <view class="tit_type"> | |||
| <text>商业承兑</text> | |||
| <text>{{item.ynProjcetStatusText}}</text> | |||
| </view> | |||
| </view> | |||
| <view class="detail_box"> | |||
| <view class="detail_box_left"> | |||
| <text class="fkmc">家家悦\n集团体育基地店</text> | |||
| <text class="fkdw">付票单位</text> | |||
| </view> | |||
| <view class="detail_box_center"> | |||
| <text class="detail_box_money">¥5000.00</text> | |||
| <image src="/image/icon/icon_zfz.png" style="width:40px;" mode="widthFix"></image> | |||
| </view> | |||
| <view class="detail_box_right"> | |||
| <text class="fkmc">张村\n经济合作社</text> | |||
| <text class="skdw">收票单位</text> | |||
| </view> | |||
| <text>{{item.projectContractor}}</text> | |||
| <text>合同价款</text> | |||
| </view> | |||
| <view class="detail_time"> | |||
| <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | |||
| <text>2021.09.01-2022.08.31</text> | |||
| <view class="detail_time_box"> | |||
| <view class="detail_time"> | |||
| <image src="/image/icon/icon_date.png" style="width: 14px;height: 14px;"></image> | |||
| <text>{{item.startTime}}-{{item.endTime}}</text> | |||
| </view> | |||
| <view class="detail_time"> | |||
| <text class="detail_box_money"><text style="font-size:12px;display: inline-block;color: #E90000;">¥</text>{{item.projectAmount}}</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| <view slot="right" class="deleteBox"> | |||
| @@ -1,4 +1,4 @@ | |||
| /* pages/project/project.wxss */ | |||
| /* pages/bank/bank.wxss */ | |||
| .van-search__content { | |||
| border: 1px solid #5CAE77!important; | |||
| background: #fff!important; | |||
| @@ -24,4 +24,304 @@ van-search { | |||
| border-radius: 36px; | |||
| box-shadow: 0px 5px 5px #ddd; | |||
| } | |||
| text{display: block;} | |||
| 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: 65px; | |||
| 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; | |||
| justify-content: space-between; | |||
| } | |||
| .tit_box_left{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .detail_box{ | |||
| margin-top: 10px; | |||
| display: flex; | |||
| justify-content: space-between; | |||
| } | |||
| .detail_box text{ | |||
| color:#878787; | |||
| } | |||
| .li view text{ | |||
| /* margin-top: 15px; */ | |||
| } | |||
| .fkmc { | |||
| line-height: 20px; | |||
| font-size: 16px; | |||
| } | |||
| .detail_time .detail_box_money{ | |||
| font-size: 14px; | |||
| color: #E90000!important; | |||
| } | |||
| .detail_time_box{ | |||
| display: flex; | |||
| justify-content: space-between; | |||
| margin-top: 10px; | |||
| } | |||
| .detail_time{ | |||
| display: flex; | |||
| align-items: center; | |||
| padding-left: 3px; | |||
| } | |||
| .detail_time text{ | |||
| font-size: 12px; | |||
| margin-left: 5px; | |||
| color: #878787; | |||
| } | |||
| .li .detail_box_left text{ | |||
| text-align: center; | |||
| } | |||
| .li .detail_box_left .fkdw{ | |||
| color: #B5B5B5; | |||
| font-size: 14px; | |||
| margin-top: 5px; | |||
| } | |||
| .li .detail_box_center{ | |||
| color: #666666; | |||
| font-size: 12px; | |||
| text-align: center; | |||
| } | |||
| .li .detail_box_right{ | |||
| } | |||
| .li .detail_box_right text{ | |||
| text-align: center; | |||
| } | |||
| .li .detail_box_right .skdw{ | |||
| color: #B5B5B5; | |||
| font-size: 14px; | |||
| margin-top: 5px; | |||
| } | |||
| .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: 16px; | |||
| color: #333333; | |||
| line-height: 25px; | |||
| display: -webkit-box; | |||
| -webkit-box-orient: vertical; | |||
| -webkit-line-clamp: 1; | |||
| word-break: break-all; | |||
| overflow: hidden; | |||
| margin-left: 5px; | |||
| } | |||
| .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; | |||
| } | |||
| .tit_type{ | |||
| display: flex; | |||
| align-items: center; | |||
| } | |||
| .tit_type text{ | |||
| background: rgba(92, 174, 119, 0.2); | |||
| color: #5CAE77; | |||
| padding: 2px 10px; | |||
| } | |||
| .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; | |||
| } | |||
| .hp_type{ | |||
| padding: 4vw 3%; | |||
| display: flex; | |||
| border-bottom: 1px solid #eee; | |||
| } | |||
| .hp_type view{ | |||
| padding: 2vw 6%; | |||
| background: #EEEEEE; | |||
| border-radius: 60px; | |||
| margin-right: 3%; | |||
| width: 30vw; | |||
| text-align: center; | |||
| } | |||
| .hp_button{ | |||
| display: flex; | |||
| justify-content: space-around; | |||
| padding:4vw 0 6vw; | |||
| } | |||
| .hp_button view{ | |||
| padding: 3vw 6%; | |||
| background: #EEEEEE; | |||
| border-radius: 60px; | |||
| width: 30vw; | |||
| text-align: center; | |||
| } | |||
| .van-dropdown-menu { | |||
| margin-bottom: 15px; | |||
| } | |||
| @@ -142,5 +142,5 @@ | |||
| }, | |||
| "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | |||
| "projectname": "WXMB", | |||
| "libVersion": "2.24.1" | |||
| "libVersion": "2.24.3" | |||
| } | |||
| @@ -212,6 +212,33 @@ const URL_GET_INFOGET = `${URL_PREFIX}/contraction/info/get/`; | |||
| //根据id删除 银行收支流水 | |||
| const URL_GET_FLOWREMOVE = `${URL_PREFIX}/cashier/flow/remove/`; | |||
| //增加开户行 | |||
| const URL_GET_DEPOSITADD = `${URL_PREFIX}/yinnong/deposit/add`; | |||
| //添加合同 | |||
| const URL_POST_CONTRACTADD = `${URL_PREFIX}/contraction/info/add/`; | |||
| //查看合同列表 | |||
| const URL_GET_CONTRACTLIST = `${URL_PREFIX}/contraction/info/list/`; | |||
| //查看合同详情 | |||
| const URL_GET_CONTRACTDETAIL = `${URL_PREFIX}/contraction/info/get/`; | |||
| //修改合同详情 | |||
| const URL_POST_CONTRACTUPDATE = `${URL_PREFIX}/contraction/info/edit/`; | |||
| //删除合同 | |||
| const URL_GET_CONTRACTDELETE = `${URL_PREFIX}/contraction/info/remove/`; | |||
| //附件列表 | |||
| const URL_GET_ATTACHMENTLIST = `${URL_PREFIX}/system/attachment/query/`; | |||
| //新增银行汇票 | |||
| const URL_GET_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | |||
| //新增工程项目 | |||
| const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | |||
| /****************接口地址end****************/ | |||
| export { | |||
| @@ -295,5 +322,14 @@ export { | |||
| URL_GET_FLOWGET, | |||
| URL_GET_INFOGET, | |||
| URL_POST_GERFLOWEDIT, | |||
| URL_GET_FLOWREMOVE | |||
| URL_GET_FLOWREMOVE, | |||
| URL_GET_DEPOSITADD, | |||
| URL_POST_CONTRACTADD, | |||
| URL_GET_CONTRACTLIST, | |||
| URL_GET_CONTRACTDETAIL, | |||
| URL_POST_CONTRACTUPDATE, | |||
| URL_GET_CONTRACTDELETE, | |||
| URL_GET_ATTACHMENTLIST, | |||
| URL_GET_MONEYORDERADD, | |||
| URL_GET_PROJECTADD | |||
| } | |||