main
ddlucky 9 months ago
parent 41f829d04d
commit 28de071d00

@ -23,8 +23,8 @@ App({
this.globalData = {
//serverUrl: 'http://localhost:10200/Dispatch/WxApp',
serverUrl: 'https://trans.qzfanghe.com/Dispatch/WxApp',
serverUrl: 'http://localhost:10200/Dispatch/WxApp',
//serverUrl: 'https://trans.qzfanghe.com/Dispatch/WxApp',
baseInfo: null,
detailInfo:null

@ -11,6 +11,7 @@ Page({
upFiles: [],
upResult:[],
gid:"",
r_gid:"",
homeurl:"",
picurl:""
},
@ -19,8 +20,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
//console.log(options);
this.setData({
gid: options.gid
,r_gid:options.r_gid
})
@ -79,13 +82,16 @@ Page({
var that = this;
var openid=getApp().globalData.baseInfo.OPENID;
var gid=this.data.gid;
var r_gid=this.data.r_gid;
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'司机上传附件',
GId:gid
GId:gid,
R_GID:r_gid
}
);
console.log(jsonstr);
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {'content-type': 'application/x-www-form-urlencoded'},
@ -94,7 +100,7 @@ Page({
jsonstr
},
success: function (r) {
console.log(r);
//console.log(r);
that.setData({
dataList: r.data.Data
})
@ -114,7 +120,7 @@ Page({
maxDuration: 30,
camera: 'back',
success(res) {
console.log(res)
//console.log(res)
// var files = that.data.upFiles;
// files.push(res.tempFilePaths[0])
// that.setData({
@ -148,10 +154,11 @@ Page({
name: 'file',
formData: {
gid: that.data.gid,
r_gid: that.data.r_gid,
openid: openid
},
success(res) {
console.log(res)
//console.log(res)
if (res.statusCode == 200) {
that.query();
wx.hideLoading();
@ -196,10 +203,11 @@ Page({
jsonstr
},
success: function (r) {
console.log(r);
that.setData({
dataList: r.data.Data
})
//console.log(r);
// that.setData({
// dataList: r.data.Data
// })
that.query();
}
})

@ -30,8 +30,7 @@
<view class="weui-cell__bd">
<image src='{{item.Driect_URL}}' data-src="{{item.Driect_URL}}" bindtap="previewImage" mode="widthFix"></image>
<image src='{{item.Driect_URL}}' data-src="{{item.Driect_URL}}" bindtap="previewImage" mode="widthFix"></image>
<view class="delete-btn" bindtap="delfile" data-gid="{{item.GID}}"><image src="../../images/delete.png"></image>删除</view>
</view>

@ -89,6 +89,7 @@ Page({
this.data.headData.FuelList.push({
JYTYPE: ''
//,JYCOUNT:1
})
this.setData({
headData: this.data.headData
@ -290,6 +291,46 @@ Page({
headData: that.data.headData
})
},
DelFuelClick(e) {
//console.log(e);
var that = this;
var gid = e.currentTarget.dataset.item;
var newFeeList = [];
var openid = getApp().globalData.baseInfo.OPENID;
that.data.headData.FuelList.forEach((x) => {
if (x.GID == gid) {
//console.log('删除加油1');
var jsonstr = JSON.stringify({
openid: openid,
formname: '删除加油',
headData: that.data.headData,
GID: 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.FuelList = newFeeList;
this.setData({
headData: that.data.headData
})
},
SubmitClick(res) {
wx.showLoading({
title: '请稍候'
@ -357,12 +398,38 @@ Page({
},
showDocList(e) {
var that = this;
var gid = this.data.gid;
// console.log("触发查询附件");
// console.log(e);
// console.log("e_end");
wx.navigateTo({
url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid+'&r_gid='
})
},
showDocList_Detail(e) {
//显示费用的图片。用receipt_doc.r_gid来关联费用或者加油ID
var that = this;
var gid = this.data.gid;
// console.log("触发查询附件");
// console.log(e);
// console.log("e_end");
console.log(e.currentTarget.dataset.rgid);
if(!e.currentTarget.dataset.rgid){
wx.showToast({
icon: 'none',
title: '请先执行保存',
});
return;
}
var r_gid=e.currentTarget.dataset.rgid;
wx.navigateTo({
url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid
url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid+'&r_gid='+r_gid
})
},
// bindPickerChange: function(e) {
// //console.log('picker发送选择改变携带值为', e.detail.value)
// this.setData({

@ -71,45 +71,54 @@
</view>
-->
<view class="customer-name">提交状态:{{headData.TASKSTATUS}} </view>
<view>费用列表</view>
<!--
<view>费用列表</view>-->
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="AddFeeClick" hover-class="other-button-hover"> 添加费用 </button>
<view class="weui-cell" wx:for="{{headData.FeeList}}" wx:key="item" data-gid="{{item.GID}}">
<picker
bindchange="vmodel_fee" id="FEENAME"
data-item="{{item.GID}}"
value="{{item.F_NO}}" range="{{headData.FeeNameList}}">
<view class="picker">
费用名称:[{{headData.FeeNameList[item.F_NO]}}]
</view>
</picker>
<input class="number" id="AMOUNT" value="{{item.AMOUNT}}"
data-item="{{item.GID}}"
bindinput="vmodel_fee"
placeholder="请输入金额" />
<button type="mini" size="mini" loading="{{loading}}" plain="{{plain}}"
data-item="{{item.GID}}"
disabled="{{disabled}}" bindtap="DelFeeClick" hover-class="other-button-hover"> 删除 </button>
<view class="jiayouList" wx:for="{{headData.FeeList}}" wx:key="item" data-gid="{{item.GID}}">
<view class="weui-cell" >
<picker style="font-weight: bold;font-size: 16px;width: 245px;"
bindchange="vmodel_fee" id="FEENAME"
data-item="{{item.GID}}"
value="{{item.F_NO}}" range="{{headData.FeeNameList}}">
<view class="picker">
费用:{{headData.FeeNameList[item.F_NO]}}
</view>
</picker>
<input class="number" id="AMOUNT" style="font-weight: bold;font-size: 18px;"
value="{{item.AMOUNT}}" data-item="{{item.GID}}" bindinput="vmodel_fee" placeholder="请输入金额" />
<button type="mini" size="mini" style="font-size: 16px;width: 130px;"
loading="{{loading}}" plain="{{plain}}" data-item="{{item.GID}}"
disabled="{{disabled}}" bindtap="DelFeeClick" hover-class="other-button-hover">
<image style="font-size: 10px;width: 12px;height: 12px;" src="../../images/delete.png"></image>
删除 </button>
</view>
<button type="default" size="mini" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}"
bindtap="showDocList_Detail" data-rgid="{{item.GID}}" hover-class="other-button-hover"> 拍照上传 </button>
</view>
<view>加油记录</view>
<button type="primary" size="default" plain="{{plain}}" bindtap="handleAddjiayou"> 添加加油记录 </button>
<!--
<view>加油记录</view>-->
<button type="primary" size="default" plain="{{plain}}" bindtap="handleAddjiayou"> 添加加油/维修 </button>
<view class="jiayouList">
<view class='jiayouItem' wx:for-index="idx" wx:for="{{headData.FuelList}}" wx:key="item">
<view class="delete-btn" style="text-align: right;" bindtap="DelFuelClick" data-item="{{item.GID}}"><image style="font-weight: bold;font-size: 10px;width: 12px;height: 12px;" src="../../images/delete.png"></image>删除</view>
<picker bindchange="handleSelectType" data-index="{{idx}}" value="{{JYindex}}" range="{{headData.JYZList}}">
<view class="picker">
<text style="font-weight: bold;font-size: 14px;width: 105px;text-align: right;display: inline-block;">加油类型:</text>
<text style="font-weight: bold;font-size: 14px;width: 136px;text-align: right;display: inline-block;">加油/维修类型:</text>
{{item.JYTYPE?item.JYTYPE:'请选择'}}
</view>
</picker>
<view style="display: flex;margin:5px 0px;">
<label class="weui-label" style="font-weight: bold;font-size: 14px;text-align: right;">加油(气)量:</label>
<input type="digit" bindinput="handleInput" data-index="{{idx}}" data-type='JYCOUNT' value="{{item.JYCOUNT}}" placeholder="请输入加油(气)量" />
<label class="weui-label" style="font-weight: bold;font-size: 14px;width: 145px;text-align: right;">加油(气/维修)量:</label>
<input type="digit" style="font-weight: bold;font-size: 18px;"
bindinput="handleInput" data-index="{{idx}}" data-type='JYCOUNT' value="{{item.JYCOUNT}}" placeholder="请输入加油(气/维修)量" />
</view>
<view style="display: flex;">
<label class="weui-label" style="font-weight: bold;font-size: 14px;text-align: right;">加油(气)金额:</label>
<input type="digit" bindinput="handleInput" data-index="{{idx}}" data-type='JYAMOUNT' value="{{item.JYAMOUNT}}" placeholder="请输入加油(气)金额" />
<label class="weui-label" style="font-weight: bold;font-size: 14px;width: 145px;text-align: right;">加油(气/维修)金额:</label>
<input type="digit" style="font-weight: bold;font-size: 18px;"
bindinput="handleInput" data-index="{{idx}}" data-type='JYAMOUNT' value="{{item.JYAMOUNT}}" placeholder="请输入加油(气/维修)金额" />
</view>
<view style="display: flex;align-items: center;">
<label class="weui-label" style="font-weight: bold;font-size: 14px;text-align: right;">备注:</label>
@ -118,6 +127,9 @@
<radio value="现金" checked="{{item.REMARK=='现金'}}" />现金
</radio-group>
</view>
<view style="display: flex;align-items: center;"></view>
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}"
bindtap="showDocList_Detail" data-rgid="{{item.GID}}" hover-class="other-button-hover"> 拍照上传 </button>
</view>
</view>
@ -138,19 +150,22 @@
<view>封号:<span>{{item.SEALNO}}</span></view>
</view>
</view>
<!--
<view>附件信息</view>
<view class="weui-cell" wx:for="{{headData.DocList}}" wx:key="item">
<view class="weui-cell__bd" bindtap="showinfofile" data-url="{{item.Driect_URL}}">
<view>文件类型:<span>{{item.RECEIPTTYPE}}</span></view>
<view>文件编号/编码:{{item.documentAttachedCode}};{{item.documentAttachedNo}}</view>
<view>点击查看</view>
<!--
<view><span>{{item.Driect_URL}}</span></view>
<web-view src="{{item.Driect_URL}}"></web-view>-->
<web-view src="{{item.Driect_URL}}"></web-view>
</view>
</view>
-->
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="showDocList" hover-class="other-button-hover"> 拍照上传 </button>
</view>
</view>
Loading…
Cancel
Save