| @@ -289,6 +289,26 @@ Page({ | |||
| } | |||
| }) | |||
| }, | |||
| delete2(e){ | |||
| console.log(e); | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_FLOWREMOVE + e.currentTarget.dataset.id, {method:'GET'},{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| that.data.flowListZC.splice(e.currentTarget.dataset.index, 1); | |||
| wx.showToast({ | |||
| title: '删除成功!', | |||
| icon: 'success', | |||
| duration: 2000 | |||
| }) | |||
| that.setData({ | |||
| flowListZC : that.data.flowListZC, | |||
| flowListZCNum:that.data.flowListZCNum-1 | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面隐藏 | |||
| */ | |||
| @@ -82,7 +82,7 @@ | |||
| </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/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete2"></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> | |||
| </view> | |||
| @@ -37,6 +37,8 @@ Page({ | |||
| crzhShow:false, | |||
| accountListOptions:[], //存入账户类型选项 | |||
| crlxShow:false, //收入类型弹窗显隐 | |||
| subjectOptions:[],//科目类型 | |||
| showKm:false | |||
| }, | |||
| onCancelcrlx(){ | |||
| this.setData({crlxShow:false,}) | |||
| @@ -67,6 +69,9 @@ Page({ | |||
| closeBox(){ | |||
| this.setData({showHt:false}) | |||
| }, | |||
| closeBoxKM(){ | |||
| this.setData({showKm:false}) | |||
| }, | |||
| getNewDate(date){ | |||
| //date是传过来的时间戳,注意需为13位,10位需*1000 | |||
| //也可以不传,获取的就是当前时间 | |||
| @@ -86,9 +91,21 @@ Page({ | |||
| contractionIdID:obj.code | |||
| }) | |||
| }, | |||
| onConfirmContractionKm(value){ | |||
| console.log(value); | |||
| let obj = value.detail.value; | |||
| this.setData({ | |||
| 'formData.subjectNameAll':obj.subjectNameAll, | |||
| showKm:false, | |||
| 'formData.subjectId':obj.subjectId, | |||
| }) | |||
| }, | |||
| selectContraction(){ | |||
| this.setData({showHt:true}) | |||
| }, | |||
| selectKM(){ | |||
| this.setData({showKm:true}) | |||
| }, | |||
| bindPickerChange (e) { | |||
| let obj = e.detail.value; | |||
| this.setData({ | |||
| @@ -135,6 +152,17 @@ Page({ | |||
| console.log(res); | |||
| } | |||
| }) | |||
| UTIL.httpRequest(API.URL_GET_SUBJECTLIST , {method:'GET'}, { | |||
| success: (res2) => { | |||
| if(res2.rows.length>0){ | |||
| that.setData({ | |||
| subjectOptions:res2.rows, | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -327,9 +355,17 @@ Page({ | |||
| } | |||
| }) | |||
| } | |||
| wx.redirectTo({ | |||
| url: '/pages/index/index' | |||
| wx.showToast({ | |||
| title: '修改成功', | |||
| icon: 'success', | |||
| duration: 2000 | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.redirectTo({ | |||
| url: '/pages/index/index' | |||
| }) | |||
| },2000) | |||
| }else{ | |||
| UTIL.showToastNoneIcon(res.msg); | |||
| } | |||
| @@ -76,7 +76,27 @@ | |||
| </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 class="flex-block"> | |||
| <text class="rules">对方科目</text> | |||
| <view class="wrap" bindtap="selectKM"> | |||
| <text wx:if="{{formData.subjectNameAll==''}}" class="color-gray">请选择对方科目</text> | |||
| <text wx:else>{{formData.subjectNameAll}}</text> | |||
| </view> | |||
| <van-popup show="{{showKm}}" round position="bottom" bind:close="closeBoxKM" > | |||
| <van-picker | |||
| columns="{{subjectOptions}}" | |||
| show-toolbar | |||
| value-key="subjectNameAll" | |||
| bind:cancel="closeBoxKM" | |||
| bind:confirm="onConfirmContractionKm" | |||
| /> | |||
| </van-popup> | |||
| </view> | |||
| <view class="flex-block"><text class="rules">备注说明</text> <input class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入备注说明" value="{{formData.accountSummary}}"/></view> | |||
| <view class="flex-block"><text class="rules">挂起原因</text> <input class="wrap" bindinput="inputChange" data-prop="formData.accountSummary" placeholder="请输入挂起原因" value="{{formData.remark}}" wx:if="{{formData.checkedStatus == 4}}"/></view> | |||
| </view> | |||
| <block wx:if="{{incomeType == 2}}"> | |||
| <view class="title"> | |||
| @@ -91,14 +111,14 @@ | |||
| </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> | |||
| <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"> | |||
| @@ -239,6 +239,9 @@ const URL_GET_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | |||
| //新增工程项目 | |||
| const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | |||
| //查询对方科目 | |||
| const URL_GET_SUBJECTLIST = `${URL_PREFIX}/finance/subject/list?is_last=Y`; | |||
| /****************接口地址end****************/ | |||
| export { | |||
| @@ -331,5 +334,6 @@ export { | |||
| URL_GET_CONTRACTDELETE, | |||
| URL_GET_ATTACHMENTLIST, | |||
| URL_GET_MONEYORDERADD, | |||
| URL_GET_PROJECTADD | |||
| URL_GET_PROJECTADD, | |||
| URL_GET_SUBJECTLIST | |||
| } | |||