| @@ -16,7 +16,9 @@ Page({ | |||
| bankType: "", //所属银行 必填 | |||
| bankDeposit: "", //开户行 必填 | |||
| payeePaymentLines: "", //联行号 //必填 | |||
| } | |||
| }, | |||
| id:"", | |||
| bankTypeOptions:[] | |||
| }, | |||
| back:function(){ | |||
| wx.navigateBack({ | |||
| @@ -27,6 +29,35 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| if(options.id!=null&&options.id!=""){ | |||
| this.setData({id:options.id}) | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITDETAIL + this.data.id, {method:'GET'}, { | |||
| success: (res) => { | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||
| success: (r) => { | |||
| this.setData({ | |||
| bankTypeOptions:r.data | |||
| }); | |||
| console.log(this.data.bankTypeOptions) | |||
| this.data.bankTypeOptions.map(rr => { | |||
| if(rr.dictValue == res.data.bankType){ | |||
| res.data.bankTypeText = rr.dictLabel | |||
| this.setData({'form':res.data}); | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }else{ | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'bank_type', {method:'GET'}, { | |||
| success: (r) => { | |||
| this.setData({ | |||
| bankTypeOptions:r.data | |||
| }); | |||
| } | |||
| }) | |||
| } | |||
| }, | |||
| @@ -52,13 +83,11 @@ Page({ | |||
| }) | |||
| }, | |||
| 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 | |||
| }) | |||
| @@ -66,7 +95,7 @@ Page({ | |||
| onConfirm(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({ | |||
| @@ -96,7 +125,8 @@ Page({ | |||
| }) | |||
| }, | |||
| goSubmit(){ | |||
| if(this.data.form.sheng===''||this.data.form.code==sheng){ //省 | |||
| console.log(this.data.form) | |||
| if(this.data.form.sheng===''||this.data.form.sheng==null){ //省 | |||
| UTIL.showToastNoneIcon('请填写省!'); | |||
| return false; | |||
| }else if(this.data.form.shi===''||this.data.form.shi==null){ //市 | |||
| @@ -114,20 +144,38 @@ Page({ | |||
| }else{ | |||
| 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 | |||
| if(that.data.form.id==""||that.data.form.id==null){ | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITADD, that.data.form, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "提交成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| }else{ | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITUPDATE, that.data.form, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "修改成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }, | |||
| /** | |||
| @@ -30,7 +30,7 @@ | |||
| data-value="form.bankDeposit" | |||
| /> | |||
| </van-popup> | |||
| <van-field label="开户行" value="{{ form.bankDepositText }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.bankDepositText" /> | |||
| <van-field label="开户行" value="{{ form.bankDeposit }}" placeholder="请输入开户银行" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.bankDepositText" /> | |||
| <van-field label="联行号" value="{{ form.payeePaymentLines }}" placeholder="请输入联行号" border="{{ false }}" bind:change="onChange" input-align="right" required data-formname="form.payeePaymentLines"/> | |||
| </view> | |||
| <view class="bottom"> | |||
| @@ -11,7 +11,8 @@ Page({ | |||
| isIPX: app.globalData.isIPX, | |||
| depositList:[], | |||
| bankTypeOptions:[], | |||
| value:"" | |||
| value:"", | |||
| scrollHeight:'' | |||
| }, | |||
| goAdd(){ | |||
| wx.navigateTo({ | |||
| @@ -27,7 +28,14 @@ Page({ | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| var _this = this; | |||
| let qu = wx.createSelectorQuery() | |||
| qu.select("#top_view2").boundingClientRect() | |||
| qu.exec(res => { | |||
| _this.setData({ | |||
| scrollHeight:wx.getSystemInfoSync().windowHeight-res[0].top | |||
| }) | |||
| }) | |||
| }, | |||
| /** | |||
| @@ -51,19 +59,16 @@ Page({ | |||
| let param = { | |||
| 'bankDeposit':this.data.value | |||
| } | |||
| console.log(2); | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITLIST, param,{ | |||
| 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)+'****' | |||
| if(i == response.rows.length-1){ | |||
| that.setData({ | |||
| depositList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| that.setData({ | |||
| depositList:response.rows | |||
| }) | |||
| } | |||
| } | |||
| }) | |||
| @@ -79,7 +84,7 @@ Page({ | |||
| UTIL.httpRequest(API.URL_GET_DEPOSITDELETE + e.currentTarget.dataset.id, {method:'GET'},{ | |||
| success: (res) => { | |||
| if (res.code == API.SUCCESS_CODE) { | |||
| that.data.depositList.splice(e.currentTarget.dataset.index, 1); | |||
| that.data.depositList.splice(e.currentTarget.dataset.index, 1); | |||
| wx.showToast({ | |||
| title: '删除成功!', | |||
| icon: 'success', | |||
| @@ -21,14 +21,58 @@ Page({ | |||
| endTime: "", //到期日期 必填 | |||
| orderStatus: "", //汇票状态 必填 1在库 2转付中 3转付 4承兑 | |||
| remark: "", | |||
| } | |||
| }, | |||
| orderStatusOptions:[], | |||
| orderTypeOptions:[], | |||
| showBtn:true | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| console.log(options) | |||
| if(options.id!=null&&options.id!=""){ | |||
| let that = this | |||
| this.setData({id:options.id}) | |||
| UTIL.httpRequest(API.URL_GET_MONEYORDERDETAIL + this.data.id, {method:'GET'}, { | |||
| success: (res) => { | |||
| if(res.data.orderStatus!='1'){ | |||
| this.setData({'showBtn':false}); | |||
| } | |||
| //汇票类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_type', {method:'GET'}, { | |||
| success: (rr) => { | |||
| this.setData({ | |||
| orderTypeOptions:rr.data | |||
| }); | |||
| this.data.orderTypeOptions.map(r => { | |||
| if(r.dictValue == res.data.orderType){ | |||
| res.data.orderTypeText = r.dictLabel | |||
| that.setData({'form':res.data}); | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| //汇票状态 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'order_status', {method:'GET'}, { | |||
| success: (rr) => { | |||
| this.setData({ | |||
| orderStatusOptions:rr.data | |||
| }); | |||
| this.data.orderStatusOptions.map(r => { | |||
| if(r.dictValue == res.data.orderStatus){ | |||
| res.data.orderStatusText = r.dictLabel | |||
| that.setData({'form':res.data}); | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }else{ | |||
| this.onShow() | |||
| } | |||
| }, | |||
| /** | |||
| @@ -78,7 +122,6 @@ Page({ | |||
| }) | |||
| }, | |||
| onConfirmOrderType(event) { | |||
| console.log(event); | |||
| this.setData({ | |||
| [event.currentTarget.dataset.name]: false, | |||
| [event.currentTarget.dataset.value]: event.detail.value.dictValue, | |||
| @@ -116,20 +159,37 @@ Page({ | |||
| }else{ | |||
| 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) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| if(that.data.form.id==""||that.data.form.id==null){ | |||
| UTIL.httpRequest(API.URL_GET_MONEYORDERADD, that.data.form , { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: '新增成功', | |||
| icon: 'success', | |||
| duration: 2000, | |||
| complete(){ | |||
| setTimeout(function(){ | |||
| that.back(); | |||
| },2000) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }else{ | |||
| UTIL.httpRequest(API.URL_POST_MONEYORDERUPDATE, that.data.form , { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: '修改成功', | |||
| icon: 'success', | |||
| duration: 2000, | |||
| complete(){ | |||
| setTimeout(function(){ | |||
| that.back(); | |||
| },2000) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }, | |||
| onConfirmTime(event){ | |||
| @@ -1,7 +1,7 @@ | |||
| <!--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> | |||
| <text style="top:{{isIPX?'54px':'30px'}};">{{form.id?"查看":"新增"}}银行汇票</text> | |||
| </view> | |||
| <view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};"> | |||
| @@ -46,6 +46,6 @@ | |||
| <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" data-value="form.remark"/> | |||
| </view> | |||
| <view class="bottom"> | |||
| <view class="bottom" wx:if="{{showBtn}}"> | |||
| <view class="btn2" bindtap="goSubmit">确认</view> | |||
| </view> | |||
| @@ -78,6 +78,11 @@ Page({ | |||
| */ | |||
| onReady() { | |||
| }, | |||
| goUpdate(e){ | |||
| wx.navigateTo({ | |||
| url: 'add/add?id='+ e.currentTarget.dataset.id, | |||
| }) | |||
| }, | |||
| goSearch(e){ | |||
| this.setData({'value':e.detail}) | |||
| @@ -218,7 +223,7 @@ Page({ | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||
| success: (rr) => { | |||
| if(rr.rows.length>0){ | |||
| if(rr.code==200&&rr.rows.length>0){ | |||
| rr.rows.map((rrr,index) => { | |||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||
| if(index==rr.rows.length-1){ | |||
| @@ -21,8 +21,8 @@ | |||
| <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bind:change="changeTab2" /> | |||
| </van-dropdown-menu> | |||
| <scroll-view scroll-y refresher-threshold="0" id="top_view2" style="height:{{scrollHeight}}px" bindscrolltolower="paging" lower-threshold="100"> | |||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{moneyorderList}}" wx:key="index"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <van-swipe-cell right-width="{{ 130 }}" class="workflow" wx:for="{{moneyorderList}}" wx:key="index" wx:for-item="item"> | |||
| <view class="li" bindtap="goUpdate" data-id="{{item.id}}"> | |||
| <view class="tit_box"> | |||
| <view class="tit_box_left"> | |||
| <van-tag plain type="danger" color="#FC9A55" style="margin-right:10px;">汇票号</van-tag> | |||
| @@ -55,11 +55,11 @@ | |||
| </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 style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(255,0,0,0.4);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete" wx-if="{{item.orderStatus==1}}"> | |||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" ></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 style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(98,173,102,0.4);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||
| <image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;" ></image> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| @@ -23,6 +23,8 @@ Page({ | |||
| uploadOptions:[], | |||
| fileList:[], | |||
| showPopup:false, | |||
| showRelevance:false, | |||
| relevanceList:[], | |||
| fileEvent:{}, | |||
| itemId:"" | |||
| }, | |||
| @@ -120,6 +122,27 @@ Page({ | |||
| } | |||
| }) | |||
| }, | |||
| relevance(e){ | |||
| console.log(e) | |||
| let params = { | |||
| contractionId:e.currentTarget.dataset.id | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_ASSETLIST, params, { | |||
| success: (rr) => { | |||
| console.log(rr) | |||
| this.setData({ | |||
| 'revelanceList':rr.rows, | |||
| 'showRelevance':true | |||
| }) | |||
| }, | |||
| fail:(rr) =>{ | |||
| console.log(rr); | |||
| }, | |||
| complete:(rr) => { | |||
| console.log(rr); | |||
| } | |||
| }) | |||
| }, | |||
| upload(e){ | |||
| this.setData({itemId:e.currentTarget.dataset.id}); | |||
| this.asyncFun(e.currentTarget.dataset.id) | |||
| @@ -139,16 +162,23 @@ Page({ | |||
| } | |||
| 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}) | |||
| } | |||
| }) | |||
| if(rr.code==200&&rr.rows.length>0){ | |||
| rr.rows.map((rrr,index) => { | |||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||
| if(index==rr.rows.length-1){ | |||
| newList.push(Object.assign({},res,{"list":rr.rows})) | |||
| _this.setData({"fileList":_this.data.fileList.concat(newList)}); | |||
| _this.setData({"showUpload":true}) | |||
| } | |||
| }) | |||
| }else{ | |||
| let newuploadList = uploadList | |||
| newuploadList.map(rd => { | |||
| rd.list = newList | |||
| }) | |||
| _this.setData({"fileList":newuploadList}); | |||
| _this.setData({"showUpload":true}) | |||
| } | |||
| }, | |||
| fail:(rr) =>{ | |||
| console.log(rr); | |||
| @@ -162,6 +192,7 @@ Page({ | |||
| }, | |||
| closeBox(){ | |||
| this.setData({"showUpload":false}) | |||
| this.setData({"showRelevance":false}) | |||
| }, | |||
| deleteImg(event){ | |||
| this.setData({"fileEvent":event}) | |||
| @@ -16,7 +16,7 @@ | |||
| <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" > | |||
| <van-swipe-cell right-width="{{ 150 }}" 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> | |||
| @@ -53,11 +53,29 @@ | |||
| </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 style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="delete"> | |||
| <view> | |||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||
| </view> | |||
| <view> | |||
| <text style="color:red">删除</text> | |||
| </view> | |||
| </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 style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(98,173,102,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="upload"> | |||
| <view> | |||
| <image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||
| </view> | |||
| <view> | |||
| <text style="color: #62AD66;">附件</text> | |||
| </view> | |||
| </view> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(239,135,7,0.2);" data-id="{{item.id}}" data-index="{{index}}" bindtap="relevance"> | |||
| <view> | |||
| <image src="../../image/icon/relevance_icon.png" style="width: 25px;height: 25px;margin: 0 auto;display: block;" ></image> | |||
| </view> | |||
| <view> | |||
| <text style="color: #ffa601;">资产</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| @@ -80,6 +98,62 @@ | |||
| </view> | |||
| </scroll-view> | |||
| </van-action-sheet> | |||
| <van-action-sheet show="{{showRelevance}}" title="已关联资产" bind:close="closeBox"> | |||
| <scroll-view scroll-y="true" style="height: 700rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||
| <view class="table"> | |||
| <view class="tr" style="background:#62AD66;color: #fff;border-radius:10px;"> | |||
| <view class="th">资产类型</view> | |||
| <view class="th">资产名称</view> | |||
| <view class="th">数量(单位)</view> | |||
| </view> | |||
| <van-swipe-cell right-width="{{ 50 }}" wx:for="{{revelanceList}}" wx:key="index" wx:for-item="item" > | |||
| <view class="tr"> | |||
| <view class="th">{{item.assetTable}}</view> | |||
| <view class="th">{{item.name}}</view> | |||
| <view class="th">{{item.num}}{{item.unit}}</view> | |||
| </view> | |||
| <view slot="right" class="deleteBoxAsset"> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" bindtap="delete" data-id="{{item.id}}" data-index="{{index}}" > | |||
| <view> | |||
| <text style="color:red">删除</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| <view class="tr" > | |||
| <button type="primary">新增</button> | |||
| </view> | |||
| </view> | |||
| </scroll-view> | |||
| </van-action-sheet> | |||
| <van-action-sheet show="{{showRelevance}}" title="可关联资产" bind:close="closeBox"> | |||
| <scroll-view scroll-y="true" style="height: 700rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="0"> | |||
| <view class="table"> | |||
| <view class="tr" style="background:#62AD66;color: #fff;border-radius:10px;"> | |||
| <view class="th">资产类型</view> | |||
| <view class="th">资产名称</view> | |||
| <view class="th">数量(单位)</view> | |||
| </view> | |||
| <van-swipe-cell right-width="{{ 50 }}" wx:for="{{revelanceList}}" wx:key="index" wx:for-item="item" > | |||
| <view class="tr"> | |||
| <view class="th">{{item.assetTable}}</view> | |||
| <view class="th">{{item.name}}</view> | |||
| <view class="th">{{item.num}}{{item.unit}}</view> | |||
| </view> | |||
| <view slot="right" class="deleteBoxAsset"> | |||
| <view style="flex: 1;height: 100%;display: flex;align-items: center;flex-direction: column;justify-content: center;background-color: rgb(255,0,0,0.2);" bindtap="delete" data-id="{{item.id}}" data-index="{{index}}" > | |||
| <view> | |||
| <text style="color:red">删除</text> | |||
| </view> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| <view class="tr" > | |||
| <button type="primary">新增关联资产</button> | |||
| </view> | |||
| </view> | |||
| </scroll-view> | |||
| </van-action-sheet> | |||
| <modal hidden="{{!showPopup}}" title="是否删除?" confirm-text="是" cancel-text="否" bindcancel="cancelTem" bindconfirm="confirmTem"> | |||
| </modal> | |||
| @@ -64,7 +64,15 @@ text{display: block;} | |||
| color: #31936c; | |||
| } | |||
| .deleteBox{ | |||
| width: 130px; | |||
| width: 150px; | |||
| text-align: center; | |||
| height: 100%; | |||
| background: #F6F6F6; | |||
| align-items: center; | |||
| display: flex; | |||
| } | |||
| .deleteBoxAsset{ | |||
| width: 50px; | |||
| text-align: center; | |||
| height: 100%; | |||
| background: #F6F6F6; | |||
| @@ -249,7 +257,10 @@ text{display: block;} | |||
| text-align: center; | |||
| border-radius: 5px; | |||
| white-space:pre-wrap; | |||
| padding: 22px 8px; | |||
| padding: 5rpx 8rpx; | |||
| width: 50rpx; | |||
| margin: 0px 14px; | |||
| font-size: 24rpx; | |||
| } | |||
| .fj-li{ | |||
| margin-top: 20px; | |||
| @@ -266,4 +277,24 @@ text{display: block;} | |||
| } | |||
| .van-icon-description{ | |||
| font-size: 60px; | |||
| } | |||
| .table{ | |||
| width:98%; | |||
| margin-left:1%; | |||
| } | |||
| .tr{ | |||
| width:100%; | |||
| display: flex; | |||
| align-items:center; | |||
| justify-content:center; | |||
| height:3rem; | |||
| } | |||
| .th,.td{ | |||
| flex: 1; | |||
| text-align: center; | |||
| align-items: center; | |||
| justify-content: center; | |||
| } | |||
| .th{ | |||
| display: flex; | |||
| } | |||
| @@ -11,20 +11,47 @@ Page({ | |||
| isIPX: app.globalData.isIPX, | |||
| showStartTime:false, | |||
| showEndTime:false, | |||
| ynProjcetStatusOptions:[], | |||
| form:{}, | |||
| id:"" | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面加载 | |||
| */ | |||
| onLoad(options) { | |||
| var that = this; | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_projcet_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| ynProjcetStatusOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| console.log(options) | |||
| if(options.id!=null&&options.id!=""){ | |||
| let that = this | |||
| this.setData({id:options.id}) | |||
| UTIL.httpRequest(API.URL_GET_PROJECTGET + this.data.id, {method:'GET'}, { | |||
| success: (res) => { | |||
| //汇票类型 | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_projcet_status', {method:'GET'}, { | |||
| success: (rr) => { | |||
| this.setData({ | |||
| ynProjcetStatusOptions:rr.data | |||
| }); | |||
| this.data.ynProjcetStatusOptions.map(r => { | |||
| if(r.dictValue == res.data.ynProjcetStatus){ | |||
| res.data.ynProjcetStatusText = r.dictLabel | |||
| that.setData({'form':res.data}); | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| }) | |||
| }else{ | |||
| UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'yn_projcet_status', {method:'GET'}, { | |||
| success: (res) => { | |||
| this.setData({ | |||
| ynProjcetStatusOptions:res.data | |||
| }); | |||
| } | |||
| }) | |||
| } | |||
| }, | |||
| back:function(){ | |||
| @@ -59,24 +86,62 @@ Page({ | |||
| }); | |||
| }, | |||
| goSubmit(){ | |||
| var that = this ; | |||
| if(this.data.form.projectName===''||this.data.form.projectName==null){ //项目名称 | |||
| UTIL.showToastNoneIcon('请填写项目名称!'); | |||
| return false; | |||
| }else if(this.data.form.projectContractor===''||this.data.form.projectContractor==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.projectAmount === ''||this.data.form.projectAmount==null){//合共价款 | |||
| UTIL.showToastNoneIcon('请输入收票单位!'); | |||
| return false; | |||
| }else if(this.data.form.ynProjcetStatus === ''||this.data.form.ynProjcetStatus==null){//工程状态 | |||
| UTIL.showToastNoneIcon('工程状态不能为空!'); | |||
| return false; | |||
| }else{ | |||
| var that = this ; | |||
| let data = that.data.form; | |||
| data.method = 'POST'; | |||
| UTIL.httpRequest(API.URL_GET_PROJECTADD, data, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "提交成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| if(that.data.form.id==""||that.data.form.id==null){ | |||
| UTIL.httpRequest(API.URL_GET_PROJECTADD, data, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "新增成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| }else{ | |||
| UTIL.httpRequest(API.URL_POST_PROJECTUPDATE, data, { | |||
| success: (res) => { | |||
| wx.showToast({ | |||
| title: "修改成功!", | |||
| duration: 2000, | |||
| icon:"success" | |||
| }) | |||
| setTimeout(function(){ | |||
| wx.navigateBack({ | |||
| delta:1 | |||
| }) | |||
| },2000) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| }, | |||
| onChange(event){ | |||
| console.log(event); | |||
| @@ -68,6 +68,12 @@ this.onShow(); | |||
| delta: 1 | |||
| }) | |||
| }, | |||
| goUpdate(e){ | |||
| wx.navigateTo({ | |||
| url: 'add/add?id='+ e.currentTarget.dataset.id, | |||
| }) | |||
| }, | |||
| /** | |||
| * 生命周期函数--监听页面显示 | |||
| */ | |||
| @@ -145,8 +151,6 @@ this.onShow(); | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| changeTab2(e){ | |||
| var that = this ; | |||
| @@ -173,8 +177,6 @@ this.onShow(); | |||
| }) | |||
| } | |||
| }) | |||
| }, | |||
| upload(e){ | |||
| this.setData({itemId:e.currentTarget.dataset.id}); | |||
| @@ -195,7 +197,7 @@ this.onShow(); | |||
| } | |||
| UTIL.httpRequest(API.URL_GET_ATTACHMENTLIST, oData, { | |||
| success: (rr) => { | |||
| if(rr.rows.length>0){ | |||
| if(rr.code==200&&rr.rows.length>0){ | |||
| rr.rows.map((rrr,index) => { | |||
| rrr.url = URL_PREFIX + rrr.fileUrl | |||
| if(index==rr.rows.length-1){ | |||
| @@ -17,7 +17,7 @@ | |||
| </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="{{projectList}}" wx:key="index"> | |||
| <view class="li" bindtap="goUpdate"> | |||
| <view class="li" bindtap="goUpdate" data-id="{{item.id}}"> | |||
| <view class="tit_box"> | |||
| <view class="tit_box_left"> | |||
| <image src="/image/icon/icon_gc.png" style="width: 17px; height: 15px;"></image> | |||
| @@ -44,11 +44,11 @@ | |||
| </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 style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(255,0,0,0.4);" bindtap="delete"> | |||
| <image src="../../image/apply/icon_delete.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" ></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 style="flex: 1;height: 100%;display: flex;align-items: center;background-color: rgb(98,173,102,0.4);" bindtap="upload"> | |||
| <image src="../../image/icon/upload_icon.png" style="width: 25px;height: 25px;margin: 0 auto;" data-id="{{item.id}}" data-index="{{index}}" ></image> | |||
| </view> | |||
| </view> | |||
| </van-swipe-cell> | |||
| @@ -24,7 +24,7 @@ const MSG_ERROR_TO = '提交异常,请重试'; | |||
| const MSG_INVALID_USER_TOKEN='登陆信息失效,请重新登陆'; | |||
| /****************接口提示信息end**************** | |||
| /****************接口地址start****************/ | |||
| /****************接口地址start****************/ | |||
| //获取openId | |||
| const URL_GET_OPENID=`${URL_PREFIX}/wechat/codeLogin`; | |||
| // 获取手机号解密接口 | |||
| @@ -215,6 +215,12 @@ const URL_GET_FLOWREMOVE = `${URL_PREFIX}/cashier/flow/remove/`; | |||
| //增加开户行 | |||
| const URL_GET_DEPOSITADD = `${URL_PREFIX}/yinnong/deposit/add`; | |||
| //查询开户行详情 | |||
| const URL_GET_DEPOSITDETAIL = `${URL_PREFIX}/yinnong/deposit/get/`; | |||
| //查询开户行详情 | |||
| const URL_POST_DEPOSITUPDATE = `${URL_PREFIX}/yinnong/deposit/edit`; | |||
| //添加合同 | |||
| const URL_POST_CONTRACTADD = `${URL_PREFIX}/contraction/info/add/`; | |||
| @@ -234,7 +240,13 @@ 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_POST_MONEYORDERADD = `${URL_PREFIX}/yinnong/moneyorder/add`; | |||
| //银行汇票详情 | |||
| const URL_GET_MONEYORDERDETAIL = `${URL_PREFIX}/yinnong/moneyorder/get/`; | |||
| //修改银行汇票 | |||
| const URL_POST_MONEYORDERUPDATE = `${URL_PREFIX}/yinnong/moneyorder/edit`; | |||
| //删除银行汇票 | |||
| const URL_GET_MONEYORDERDELETE = `${URL_PREFIX}/yinnong/moneyorder/remove/`; | |||
| @@ -242,6 +254,12 @@ const URL_GET_MONEYORDERDELETE = `${URL_PREFIX}/yinnong/moneyorder/remove/`; | |||
| //新增工程项目 | |||
| const URL_GET_PROJECTADD = `${URL_PREFIX}/yinnong/project/add`; | |||
| //工程项目详情 | |||
| const URL_GET_PROJECTGET = `${URL_PREFIX}/yinnong/project/get/`; | |||
| //工程项目修改 | |||
| const URL_POST_PROJECTUPDATE = `${URL_PREFIX}/yinnong/project/edit`; | |||
| //查询对方科目 | |||
| const URL_GET_SUBJECTLIST = `${URL_PREFIX}/finance/subject/list?is_last=Y`; | |||
| @@ -274,6 +292,8 @@ const URL_GET_PASSWORDEDIT = `${URL_PREFIX}/cashier/account/editPassWord`; | |||
| //收款人修改 | |||
| const URL_GET_PAYEEEDIT = `${URL_PREFIX}/yinnong/payee/edit`; | |||
| //合同关联资产 | |||
| const URL_GET_ASSETLIST = `${URL_PREFIX}/contraction/asset/list`; | |||
| /****************接口地址end****************/ | |||
| @@ -368,7 +388,7 @@ export { | |||
| URL_POST_CONTRACTUPDATE, | |||
| URL_GET_CONTRACTDELETE, | |||
| URL_GET_ATTACHMENTLIST, | |||
| URL_GET_MONEYORDERADD, | |||
| URL_POST_MONEYORDERADD, | |||
| URL_GET_PERMANENTLIST, | |||
| URL_GET_PERMANENTDELETE, | |||
| URL_GET_PERMANENTDETAIL, | |||
| @@ -380,5 +400,12 @@ export { | |||
| URL_GET_PROJECTADD, | |||
| URL_GET_PROJECTDELETE, | |||
| URL_GET_PASSWORDEDIT, | |||
| URL_GET_PAYEEEDIT | |||
| URL_GET_PAYEEEDIT, | |||
| URL_GET_ASSETLIST, | |||
| URL_GET_MONEYORDERDETAIL, | |||
| URL_POST_MONEYORDERUPDATE, | |||
| URL_GET_PROJECTGET, | |||
| URL_POST_PROJECTUPDATE, | |||
| URL_GET_DEPOSITDETAIL, | |||
| URL_POST_DEPOSITUPDATE | |||
| } | |||