diff --git a/pages/INFO_FILES/INFO_FILES.js b/pages/INFO_FILES/INFO_FILES.js index f995c64..2e47987 100644 --- a/pages/INFO_FILES/INFO_FILES.js +++ b/pages/INFO_FILES/INFO_FILES.js @@ -12,6 +12,7 @@ Page({ upResult:[], gid:"", r_gid:"", + receipttype:"", homeurl:"", picurl:"" }, @@ -24,6 +25,7 @@ Page({ this.setData({ gid: options.gid ,r_gid:options.r_gid + ,receipttype:options.receipttype }) @@ -83,12 +85,14 @@ Page({ var openid=getApp().globalData.baseInfo.OPENID; var gid=this.data.gid; var r_gid=this.data.r_gid; + var receipttype=this.data.receipttype; var jsonstr=JSON.stringify( { openid:openid, formname:'司机上传附件', GId:gid, - R_GID:r_gid + R_GID:r_gid, + receipttype:receipttype } ); console.log(jsonstr); @@ -156,6 +160,7 @@ Page({ formData: { gid: that.data.gid, r_gid: that.data.r_gid, + receipttype:that.data.receipttype, openid: openid }, success(res) { diff --git a/pages/INFO_FILES/INFO_FILES.wxml b/pages/INFO_FILES/INFO_FILES.wxml index 001f54f..2889f73 100644 --- a/pages/INFO_FILES/INFO_FILES.wxml +++ b/pages/INFO_FILES/INFO_FILES.wxml @@ -14,6 +14,7 @@ 拍照 + {{receipttype}} 未提交图片: diff --git a/pages/WORKDETAIL/WORKDETAIL.js b/pages/WORKDETAIL/WORKDETAIL.js index 133315c..adb23a0 100644 --- a/pages/WORKDETAIL/WORKDETAIL.js +++ b/pages/WORKDETAIL/WORKDETAIL.js @@ -17,6 +17,7 @@ Page({ DocList: [], FeeList: [], FuelList: [], + FHFEEGroup:[], JYZList: ['中石油', '中石化', '金盾', '大象'] }, histype: "", @@ -169,22 +170,23 @@ Page({ }) }, vmodel_fee(e) { - console.log(e) + console.log(e, 11) var that = this; var gid = e.currentTarget.dataset.item; //that.data.headData.FeeList[e.currentTarget.id]=e.detail.value; - that.data.headData.FeeList.forEach((x) => { - - if (x.GID == gid) { - - if (e.currentTarget.id == 'FEENAME') { - x.F_NO = e.detail.value; - } - if (e.currentTarget.id == 'AMOUNT') { - x.AMOUNT = e.detail.value; + that.data.headData.FHFEEGroup.forEach((x) => { + x.FeeList.forEach(i => { + if (i.GID == gid) { + console.log(i) + if (e.currentTarget.id == 'FEENAME') { + i.F_NO = e.detail.value; + } + if (e.currentTarget.id == 'AMOUNT') { + i.AMOUNT = e.detail.value; + } } - } + }) }) this.setData({ headData: that.data.headData @@ -240,11 +242,12 @@ Page({ }, AddFeeClick(res) { - + console.log(res) + const type = res.currentTarget.dataset.type var that = this; var headData = this.data.headData; var GID = this.getGuid(); - headData.FeeList.push({ + headData.FHFEEGroup[type].FeeList.push({ GID: GID }); this.setData({ @@ -258,33 +261,33 @@ Page({ var newFeeList = []; var openid = getApp().globalData.baseInfo.OPENID; - that.data.headData.FeeList.forEach((x) => { - - if (x.GID == gid) { - - var jsonstr = JSON.stringify({ - openid: openid, - formname: '删除费用', - headData: that.data.headData, - FEEID: gid - }); - wx.request({ - url: getApp().globalData.serverUrl + '/FHDriverInterface', - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, - method: 'POST', - data: { - jsonstr - }, - success: function (r) { - //that.query(); - //wx.hideLoading(); - } - }) - } else { - newFeeList.push(x); - } + that.data.headData.FHFEEGroup.forEach((x) => { + x.FeeList.forEach(i => { + if (i.GID == gid) { + var jsonstr = JSON.stringify({ + openid: openid, + formname: '删除费用', + headData: that.data.headData, + FEEID: gid + }); + wx.request({ + url: getApp().globalData.serverUrl + '/FHDriverInterface', + header: { + 'content-type': 'application/x-www-form-urlencoded' + }, + method: 'POST', + data: { + jsonstr + }, + success: function (r) { + that.query(); + //wx.hideLoading(); + } + }) + } else { + newFeeList.push(i); + } + }) }) that.data.headData.FeeList = newFeeList; this.setData({ @@ -404,8 +407,11 @@ Page({ // console.log("触发查询附件"); // console.log(e); // console.log("e_end"); + console.log(e.currentTarget.dataset.receipttype); + var receipttype=e.currentTarget.dataset.receipttype; + wx.navigateTo({ - url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid+'&r_gid=' + url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid+'&receipttype='+receipttype+'&r_gid=' }) }, showDocList_Detail(e) { diff --git a/pages/WORKDETAIL/WORKDETAIL.wxml b/pages/WORKDETAIL/WORKDETAIL.wxml index 68550b0..46db87f 100644 --- a/pages/WORKDETAIL/WORKDETAIL.wxml +++ b/pages/WORKDETAIL/WORKDETAIL.wxml @@ -73,9 +73,35 @@ 提交状态:{{headData.TASKSTATUS}} - - + + + + + + + + + {{item.FeeNameList[row.F_NO]}} 请选择费用名 + + + + + + + + + - + 删除 - 加油/维修类型: + 加油类型: {{item.JYTYPE?item.JYTYPE:'请选择'}} - + + bindinput="handleInput" data-index="{{idx}}" data-type='JYCOUNT' value="{{item.JYCOUNT}}" placeholder="请输入加油(气)量" /> - + + bindinput="handleInput" data-index="{{idx}}" data-type='JYAMOUNT' value="{{item.JYAMOUNT}}" placeholder="请输入加油(气)金额" /> @@ -166,6 +192,9 @@ --> - + + + + \ No newline at end of file diff --git a/pages/WORKDETAIL/WORKDETAIL.wxss b/pages/WORKDETAIL/WORKDETAIL.wxss index f8bf458..dd520dc 100644 --- a/pages/WORKDETAIL/WORKDETAIL.wxss +++ b/pages/WORKDETAIL/WORKDETAIL.wxss @@ -14,3 +14,8 @@ background: rgb(226, 225, 225); padding: 5px; } + +.fee-title { + display: flex; + margin: 50rpx 0; +} \ No newline at end of file