From ce94432f58dd0a0e6e5a034b98c9b16812470551 Mon Sep 17 00:00:00 2001 From: dengyu Date: Wed, 24 Jul 2024 11:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E5=90=88=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E8=B4=B9=E7=94=A8=E7=9A=84=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/INFO_FILES/INFO_FILES.js | 7 ++- pages/INFO_FILES/INFO_FILES.wxml | 1 + pages/WORKDETAIL/WORKDETAIL.js | 88 +++++++++++++++++--------------- pages/WORKDETAIL/WORKDETAIL.wxml | 51 ++++++++++++++---- pages/WORKDETAIL/WORKDETAIL.wxss | 5 ++ 5 files changed, 99 insertions(+), 53 deletions(-) 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