初次提交

main
sunzehua 10 months ago
parent 6bc39e0cee
commit c50b491076

14
.gitignore vendored

@ -0,0 +1,14 @@
# Windows
[Dd]esktop.ini
Thumbs.db
$RECYCLE.BIN/
# macOS
.DS_Store
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
# Node.js
node_modules/

@ -0,0 +1,33 @@
//app.js
App({
onLaunch: function () {
if (!wx.cloud) {
console.error('请使用 2.2.3 或以上的基础库以使用云能力')
this.request = require('./utils/util.js').request;
this.util = require('./utils/util.js');
} else {
wx.cloud.init({
// env 参数说明:
// env 参数决定接下来小程序发起的云开发调用wx.cloud.xxx会默认请求到哪个云环境的资源
// 此处请填入环境 ID, 环境 ID 可打开云控制台查看
// 如不填则使用默认环境(第一个创建的环境)
// env: 'my-env-id',
traceUser: true,
})
this.request = require('./utils/util.js').request;
this.util = require('./utils/util.js');
}
this.globalData = {
//serverUrl: 'http://localhost:10200/Dispatch/WxApp',
serverUrl: 'https://trans.qzfanghe.com/Dispatch/WxApp',
baseInfo: null,
detailInfo:null
}
}
})

@ -0,0 +1,22 @@
{
"pages": [
"pages/index/index",
"pages/ds/ds",
"pages/cp/cp",
"pages/INWORK/INWORK",
"pages/WORKDETAIL/WORKDETAIL",
"pages/OLDWORK/OLDWORK",
"pages/INFO_FILES/INFO_FILES"
],
"window": {
"backgroundColor": "#FFF",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#FFF",
"navigationBarTitleText": "方合陆运业务辅助",
"navigationBarTextStyle": "black"
},
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"style": "v2"
}

@ -0,0 +1,158 @@
@import 'style/weui.wxss';
/**app.wxss**/
.container {
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
}
button {
background: initial;
}
button:focus{
outline: 0;
}
button::after{
border: none;
}
page {
background: #f6f6f6;
display: flex;
flex-direction: column;
justify-content: flex-start;
font-size:16px;
}
.userinfo, .uploader, .tunnel {
margin-top: 40rpx;
height: 140rpx;
width: 100%;
background: #fff;
border: 1px solid rgba(0, 0, 0, 0.1);
border-left: none;
border-right: none;
display: flex;
flex-direction: row;
align-items: center;
transition: all 300ms ease;
}
.userinfo-avatar {
width: 100rpx;
height: 100rpx;
margin: 20rpx;
border-radius: 50%;
background-size: cover;
background-color: white;
}
.userinfo-avatar:after {
border: none;
}
.userinfo-nickname {
font-size: 32rpx;
color: #007aff;
background-color: white;
background-size: cover;
}
.userinfo-nickname::after {
border: none;
}
.uploader, .tunnel {
height: auto;
padding: 0 0 0 40rpx;
flex-direction: column;
align-items: flex-start;
box-sizing: border-box;
}
.uploader-text, .tunnel-text {
width: 100%;
line-height: 52px;
font-size: 34rpx;
color: #007aff;
}
.uploader-container {
width: 100%;
height: 400rpx;
padding: 20rpx 20rpx 20rpx 0;
display: flex;
align-content: center;
justify-content: center;
box-sizing: border-box;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.uploader-image {
width: 100%;
height: 360rpx;
}
.tunnel {
padding: 0 0 0 40rpx;
}
.tunnel-text {
position: relative;
color: #222;
display: flex;
flex-direction: row;
align-content: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.tunnel-text:first-child {
border-top: none;
}
.tunnel-switch {
position: absolute;
right: 20rpx;
top: -2rpx;
}
.disable {
color: #888;
}
.service {
position: fixed;
right: 40rpx;
bottom: 40rpx;
width: 140rpx;
height: 140rpx;
border-radius: 50%;
background: linear-gradient(#007aff, #0063ce);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
display: flex;
align-content: center;
justify-content: center;
transition: all 300ms ease;
}
.service-button {
position: absolute;
top: 40rpx;
}
.service:active {
box-shadow: none;
}
.request-text {
padding: 20rpx 0;
font-size: 24rpx;
line-height: 36rpx;
word-break: break-all;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,214 @@
var app = getApp()
// pages/INFO_FILES/INFO_FILES.js
Page({
/**
* 页面的初始数据
*/
data: {
dataList:[],
upFiles: [],
upResult:[],
gid:"",
homeurl:"",
picurl:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
gid: options.gid
})
this.query();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
query() {
var that = this;
var openid=getApp().globalData.baseInfo.OPENID;
var gid=this.data.gid;
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'司机上传附件',
GId:gid
}
);
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {'content-type': 'application/x-www-form-urlencoded'},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
console.log(r);
that.setData({
dataList: r.data.Data
})
}
})
},
chooseFile(e) {
var that = this;
//chooseImage改为chooseMedia
wx.chooseMedia({
count: 1,
mediaType: ['image','video'],
//sizeType: ['compressed'],
sourceType: ['album', 'camera'],
maxDuration: 30,
camera: 'back',
success(res) {
console.log(res)
// var files = that.data.upFiles;
// files.push(res.tempFilePaths[0])
// that.setData({
// upFiles: files
// })
var files = [];
res.tempFiles.forEach((x)=>{
var IMG=x.tempFilePath;
files.push(IMG);
})
that.setData({
upFiles: files
})
}
})
},
submitBill(res) {
wx.showLoading({
title: '请稍后'
})
var that = this;
var openid=getApp().globalData.baseInfo.OPENID;
if (this.data.upFiles.length > 0) {
for (let c = 0; c < this.data.upFiles.length; c++) {
wx.uploadFile({
url: getApp().globalData.serverUrl + '/UploadFile_PC',
filePath: this.data.upFiles[c],
name: 'file',
formData: {
gid: that.data.gid,
openid: openid
},
success(res) {
console.log(res)
if (res.statusCode == 200) {
that.query();
wx.hideLoading();
that.setData({
upFiles: []
});
} else {
wx.showModal({
title: '提示',
content: '上传文件出错',
showCancel: false
})
}
}
})
}
} else {
that.query();
wx.hideLoading()
}
},
delfile(e) {
var that = this;
var docgid = e.currentTarget.dataset.gid;
var openid=getApp().globalData.baseInfo.OPENID;
var gid=this.data.gid;
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'司机删除附件',
GId:gid,
DocGid:docgid
}
);
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {'content-type': 'application/x-www-form-urlencoded'},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
console.log(r);
that.setData({
dataList: r.data.Data
})
}
})
},
previewImage: function (e) {
var current=e.target.dataset.src;
wx.previewImage({
current: current, // 当前显示图片的http链接
urls: [current] // 需要预览的图片http链接列表
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,52 @@
<!--pages/INFO_FILES/INFO_FILES.wxml-->
<view class="page">
<view class="page__bd">
<!-- <view class="weui-form-preview">
<view class="weui-form-preview__hd">
<view class="weui-form-preview__item">
<view class="weui-form-preview__label"><p>提单号:<span>{{mblno}}</span></p></view>
<view class="weui-form-preview__label"><p>箱号:<span>{{showcntrno}}</span></p></view>
<view class="weui-form-preview__label"><p>车号:<span>{{truckno}}</span></p></view>
</view>
</view>
</view> -->
<view class="weui-cells">
<view class="weui-cell" style="background:none;margin-bottom:5px !important;">
<view class="increase weui-cell__bd" bindtap="chooseFile"><image src="../../images/increase.png"></image>拍照</view>
<view class="weui-cell__ft"><button bindtap="submitBill">提交</button></view>
</view>
未提交图片:
<view class="weui-cell">
<view class="weui-cell__bd">
<view wx:for="{{upFiles}}" wx:key="item" data-id="{{item}}">
<image mode="aspectFill" src="{{item}}"></image>
</view>
</view>
</view>
已上传图片:
<view class="weui-cell weui-shadow" wx:for="{{dataList}}" wx:key="item">
<view class="weui-cell__bd">
<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>
</view>
</view>
</view>
</view>
<!--
<image class='image_size' src='http://192.168.0.100:10200/DSWMSPIC/Upload/Tables/VW_INFO_FILES/202012100909412467/1.jpg' mode="widthFix"></image>
--->

@ -0,0 +1,107 @@
/* pages/INFO_FILES/INFO_FILES.wxss */
page{
background: #FFF;
}
.weui-form-preview{
padding:5px 16px;
padding-bottom:10px;
margin-bottom:0px;
background: #f7f7f7;
}
.weui-form-preview:before,.weui-form-preview__hd{
padding:0;
}
.weui-form-preview:before,.weui-form-preview__hd:after,.weui-form-preview:after,.weui-cell:before{
border:none;
}
.weui-form-preview__hd .weui-form-preview__item .weui-form-preview__label{
width:100%;
color:#333;
font-size: 14px;
line-height:1.75em;
text-align: left;
text-align-last: left;
}
.weui-form-preview__hd .weui-form-preview__item .weui-form-preview__label p{
color:#666;
}
.weui-form-preview__hd .weui-form-preview__item .weui-form-preview__label span{
display: block;
float:right;
}
.weui-cells:before,.weui-cells:after{
border:none;
}
.weui-cells{
margin-top:0px;
}
.weui-cells .weui-cell{
background: #FFF;
margin-left:10px;
margin-right:10px;
margin-bottom:10px;
border-radius:5px;
padding:10px;
padding-bottom:5px;
}
.weui-cells .weui-cell.weui-shadow{
border-bottom:10px solid #f7f7f7;
margin-left:0;
margin-right:0;
padding-left:0;
padding-right:0;
padding-top:0;
}
.weui-cells .weui-cell.weui-shadow .weui-cell__bd{
margin-left:15px;
margin-right:15px;
}
.weui-cells .weui-cell .increase{
color:#2d8cf0;
font-size:16px;
}
.weui-cells .weui-cell .increase image{
width:18px;
height:18px;
display: block;
margin-top:2px;
margin-right:5px;
float: left;
}
.weui-cells .weui-cell .weui-cell__ft button{
width:55px;
font-weight: normal;
padding:0;
min-height:30px;
line-height:30px;
text-align: center;
font-size: 14px;
background:#2d8cf0;
color:#FFF;
}
.weui-cells .weui-cell:last-child{
padding:0 !important;
}
.weui-cell__bd .img-box image{
width:auto !important;
border-radius: 5px;
cursor: pointer;
display: block;
max-width: 100%;
}
.weui-cell__bd .delete-btn{
display:block;
margin-top:5px;
font-size: 12px;
color:#fb451e;
padding:4px 7px;
border-radius:3px;
float:right;
}
.weui-cell__bd .delete-btn image{
width:12px;
height:15px;
margin-right:3px;
display: block;
float:left;
}

@ -0,0 +1,99 @@
// pages/INWORK/INWORK.js
Page({
/**
* 页面的初始数据
*/
data: {
dataList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.query();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
,
query(e) {
var that = this
var openid=getApp().globalData.baseInfo.OPENID;
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'当前业务'
}
);
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {'content-type': 'application/x-www-form-urlencoded'},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
console.log(r)
that.setData({
dataList: r.data.Data
})
}
})
} ,
showdodetail(e) {
var that = this
var gid = e.currentTarget.dataset.gid;
console.log(e.currentTarget.dataset);
wx.navigateTo({
url: '/pages/WORKDETAIL/WORKDETAIL?histype=now&gid='+gid
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,15 @@
<!--pages/INWORK/INWORK.wxml-->
<view class="page">
<view class="weui-cells weui-cells_form">
<view class="weui-cell" wx:for="{{dataList}}" wx:key="item">
<view style="font-size: 14px;color: black;" class="weui-cell__bd" bindtap="showdodetail" data-gid="{{item.gId}}" >
<view class="customer-name">{{item.ExpDate}} {{item.CustomerName}}</view>
<view >{{item.LoadPlace}}</view>
<view>场站名称:<span>{{item.YardName}}</span></view>
<view>提交状态:<span>{{item.TASKSTATUS}}</span></view>
<view style="color: rgb(30, 196, 196);">详情点击查看</view>
</view>
</view>
</view>
</view>

@ -0,0 +1 @@
/* pages/INWORK/INWORK.wxss */

@ -0,0 +1,98 @@
Page({
/**
* 页面的初始数据
*/
data: {
dataList:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.query();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
,
query(e) {
var that = this
var openid=getApp().globalData.baseInfo.OPENID;
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'历史业务'
}
);
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {'content-type': 'application/x-www-form-urlencoded'},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
console.log(r)
that.setData({
dataList: r.data.Data
})
}
})
} ,
showdodetail(e) {
var that = this
var gid = e.currentTarget.dataset.gid;
console.log(e.currentTarget.dataset);
wx.navigateTo({
url: '/pages/WORKDETAIL/WORKDETAIL?histype=old&gid='+gid
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,15 @@
<!--pages/OLDWORK/OLDWORK.wxml-->
<view class="page">
<view class="weui-cells weui-cells_form">
<view class="weui-cell" wx:for="{{dataList}}" wx:key="item">
<view class="weui-cell__bd" bindtap="showdodetail" data-gid="{{item.gId}}" >
<view class="customer-name">{{item.ExpDate}} {{item.CustomerName}}</view>
<!--<view >{{item.gId}}</view>-->
<view >{{item.LoadPlace}}</view>
<view>场站名称:<span>{{item.YardName}}</span></view>
<view>提交状态:<span>{{item.TASKSTATUS}}</span></view>
<view>详情点击查看</view>
</view>
</view>
</view>
</view>

@ -0,0 +1 @@
/* pages/OLDWORK/OLDWORK.wxss */

@ -0,0 +1,397 @@
// pages/WORKDETAIL/WORKDETAIL.js
Page({
/**
* 页面的初始数据
*/
data: {
headData: {
//FuelPrice:0,
FuelQty: 0,
Amount: 0,
RealMil: 0,
StartMil: 0,
EndMil: 0,
JYZ: '',
CtnList: [],
DocList: [],
FeeList: [],
FuelList: [],
JYZList: ['中石油', '中石化', '金盾', '大象']
},
histype: "",
gid: "",
diabled: false,
JYindex: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
//console.log('options:'+options);
this.setData({
gid: options.gid,
histype: options.histype
})
this.query();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
handleAddjiayou() {
this.data.headData.FuelList.push({
JYTYPE: ''
})
this.setData({
headData: this.data.headData
})
},
handleSelectType(e) {
const index = e.currentTarget.dataset.index
this.data.headData.FuelList[index].JYTYPE = this.data.headData.JYZList[e.detail.value]
this.setData({
headData: this.data.headData,
JYindex: e.detail.value
})
},
query() {
var that = this;
var openid = getApp().globalData.baseInfo.OPENID;
var gid = this.data.gid;
var jsonstr = JSON.stringify({
openid: openid,
formname: '派车业务',
GId: gid
});
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {
'content-type': 'application/x-www-form-urlencoded'
},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
console.log(r)
if (!r.data.Data.FuelList) {
r.data.Data.FuelList = []
}
that.setData({
headData: r.data.Data
})
}
})
},
showinfofile(e) {
var that = this
var url = e.currentTarget.dataset.url;
console.log(url);
wx.navigateTo({
url: '/pages/Doc/Doc?url=' + url
})
},
radioChange(e){
const index = e.currentTarget.dataset.index
this.data.headData.FuelList[index].REMARK = e.detail.value
this.setData({
headData: this.data.headData,
})
},
handleInput(e){
const index = e.currentTarget.dataset.index
const type = e.currentTarget.dataset.type
this.data.headData.FuelList[index][type] = e.detail.value
this.setData({
headData: this.data.headData,
})
},
vmodel(e) {
var that = this;
that.data.headData[e.currentTarget.id] = e.detail.value;
this.setData({
headData: that.data.headData
/**
* e.currentTarget.dataset.value 拿到我要改变的数据 input
* e.detail.value 拿到 我改变以后的值
*/
})
},
vmodel_fee(e) {
console.log(e)
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;
}
}
})
this.setData({
headData: that.data.headData
/**
* e.currentTarget.dataset.value 拿到我要改变的数据 input
* e.detail.value 拿到 我改变以后的值
*/
})
},
selectJYZ(e) {
console.log(e)
var that = this;
var gid = e.currentTarget.dataset.item;
//that.data.headData.FeeList[e.currentTarget.id]=e.detail.value;
that.data.headData.JYZ = e.detail.value;
this.setData({
headData: that.data.headData
/**
* e.currentTarget.dataset.value 拿到我要改变的数据 input
* e.detail.value 拿到 我改变以后的值
*/
})
},
SaveClick(res) {
wx.showLoading({
title: '请稍候'
});
var that = this;
var openid = getApp().globalData.baseInfo.OPENID;
var headData = this.data.headData;
var jsonstr = JSON.stringify({
openid: openid,
formname: '保存业务',
headData: headData
});
console.log(headData)
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();
}
})
},
AddFeeClick(res) {
var that = this;
var headData = this.data.headData;
var GID = this.getGuid();
headData.FeeList.push({
GID: GID
});
this.setData({
headData: that.data.headData
});
},
DelFeeClick(res) {
var that = this;
var gid = res.currentTarget.dataset.item;
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.FeeList = newFeeList;
this.setData({
headData: that.data.headData
})
},
SubmitClick(res) {
wx.showLoading({
title: '请稍候'
});
var that = this;
var openid = getApp().globalData.baseInfo.OPENID;
var headData = this.data.headData;
var jsonstr = JSON.stringify({
openid: openid,
formname: '提交审核',
headData: headData
});
wx.request({
url: getApp().globalData.serverUrl + '/FHDriverInterface',
header: {
'content-type': 'application/x-www-form-urlencoded'
},
method: 'POST',
data: {
jsonstr
},
success: function (r) {
//r: data:{
// Data: null
// DataBody: null
// Message: "数据保存成功"
// Message2: null
// Success: true
// }
console.log(r)
that.query();
wx.hideLoading();
}
})
},
CallBackClick(res) {
wx.showLoading({
title: '请稍候'
});
var that = this;
var openid = getApp().globalData.baseInfo.OPENID;
var headData = this.data.headData;
var jsonstr = JSON.stringify({
openid: openid,
formname: '撤回审核',
headData: headData
});
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();
}
})
},
showDocList(e) {
var that = this;
var gid = this.data.gid;
wx.navigateTo({
url: '/pages/INFO_FILES/INFO_FILES?gid=' + gid
})
},
// bindPickerChange: function(e) {
// //console.log('picker发送选择改变携带值为', e.detail.value)
// this.setData({
// index: e.detail.value
// })
// },
getGuid: function () {
var s = [];
var hexDigits = "0123456789abcdef";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4";
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,147 @@
<!--pages/WORKDETAIL/WORKDETAIL.wxml-->
<view class="page">
<view class="weui-cells weui-cells_form">
<view class="weui-cell" wx:key="item">
<view class="weui-cell__bd">
<view class="customer-name">提单号:{{headData.MblNoSe}} </view>
<view class="customer-name">船名航次:{{headData.VoyVeg}} </view>
<view class="customer-name">提箱场站:{{headData.YardName}} </view>
<view class="customer-name">派车申请人:{{headData.UserName}} </view>
<view class="customer-name">装货工厂:{{headData.FACTRYNAME}} </view>
<view class="customer-name">装货地址:{{headData.LoadPlace}} </view>
<view class="customer-name">联系电话1{{headData.LinkTel}} </view>
<view class="customer-name">联系电话2{{headData.LinkTelSe}} </view>
<view class="customer-name">箱型箱量:{{headData.ContainerType}} </view>
<view class="customer-name">件数:{{headData.ContainerQty}} </view>
<view class="customer-name">重量:{{headData.Ton}} </view>
<view class="customer-name">体积:{{headData.LoadCount}} </view>
<view class="customer-name">货物标示:{{headData.CargoID}} </view>
<view class="customer-name">品名:{{headData.GoodsName}} </view>
<view class="customer-name">危品等级:{{headData.DCLASS}} </view>
<view class="customer-name">危品编号:{{headData.DUNNO}} </view>
<!-- <view class="weui-cell" style="margin-top: 20px;">
<view class="weui-cell__hd">
<picker id="JYZ" bindchange="selectJYZ" data-item="{{headData.JYZ}}" value="{{headData.JYZ}}" range="{{headData.JYZList}}">
<view class="picker">
<text style="font-weight: bold;font-size: 15px;">加油类型:</text>
[{{headData.JYZList[headData.JYZ]}}]
</view>
</picker>
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd" style="display: flex;">
<label class="weui-label" style="font-weight: bold;font-size: 15px;">加油(气)量:</label>
<input class="number" id="FuelQty" value="{{headData.FuelQty}}" bindinput="vmodel" placeholder="请输入加油(气)量" />
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd" style="display: flex;">
<p class="weui-label" style="width: 120px;font-weight: bold;font-size: 15px;">加油(气)金额:</p>
<input type="number" id="Amount" value="{{headData.Amount}}" bindinput="vmodel" number placeholder="请输入加油(气)金额"></input>
</view>
</view> -->
<view class="weui-cell">
<view class="weui-cell__hd" style="display: flex;">
<label class="weui-label" style="font-weight: bold;font-size: 15px;">开始公里数:</label>
<input class="number" id="StartMil" value="{{headData.StartMil}}" bindinput="vmodel" placeholder="请输入开始公里数" />
<!--bindinput="RealMilInput"-->
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd" style="display: flex;">
<label class="weui-label" style="font-weight: bold;font-size: 15px;">结束公里数:</label>
<input class="number" id="EndMil" value="{{headData.EndMil}}" bindinput="vmodel" placeholder="请输入结束公里数" />
<!--bindinput="RealMilInput"-->
</view>
</view>
<view class="customer-name">公里数合计:{{headData.RealMil}} </view>
<!--
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">实际里程:</label>
<input class="number" id="RealMil" value="{{headData.RealMil}}" bindinput="vmodel" placeholder="请输入实际里程" />
</view>
</view>
-->
<view class="customer-name">提交状态:{{headData.TASKSTATUS}} </view>
<view>费用列表</view>
<button type="primary" size="default" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="AddFeeClick" hover-class="other-button-hover"> 添加费用 </button>
<view class="weui-cell" wx:for="{{headData.JYZList}}" 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>
<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">
<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>
{{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="请输入加油(气)量" />
</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="请输入加油(气)金额" />
</view>
<view style="display: flex;align-items: center;">
<label class="weui-label" style="font-weight: bold;font-size: 14px;text-align: right;">备注:</label>
<radio-group data-index="{{idx}}" bindchange="radioChange">
<radio value="记账" />记账
<radio value="现金" />现金
</radio-group>
</view>
</view>
</view>
<view class="weui-cell" style="margin-top: 20px;">
<view class="weui-cell__bd">
<button type="primary" size="default" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="SaveClick" hover-class="other-button-hover"> 保存 </button>
<button style="margin:15px auto;" type="primary" size="default" loading="{{loading}}" plain="true" disabled="{{disabled}}" bindtap="SubmitClick" hover-class="other-button-hover"> 提交审核 </button>
<button type="warn" size="default" loading="{{loading}}" plain="true" disabled="{{disabled}}" bindtap="CallBackClick" hover-class="other-button-hover"> 撤回提交 </button>
</view>
</view>
</view>
</view>
<view>箱信息</view>
<view class="weui-cell" wx:for="{{headData.CtnList}}" wx:key="item">
<view class="weui-cell__bd">
<view>箱号:<span>{{item.CNTRNO}}</span></view>
<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>-->
</view>
</view>
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}" disabled="{{disabled}}" bindtap="showDocList" hover-class="other-button-hover"> 拍照上传 </button>
</view>
</view>

@ -0,0 +1,16 @@
/* pages/WORKDETAIL/WORKDETAIL.wxss */
.customer-name{
font-size: 15px;
color: black;
}
.jiayouList{
width: 90%;
margin: 10px auto;
}
.jiayouItem{
margin-bottom: 15px;
background: rgb(226, 225, 225);
padding: 5px;
}

@ -0,0 +1,170 @@
//index.js
//获取应用实例
var app = getApp()
Page({
data: {
userOldPwd: '',
userNewPwd1: '',
userNewPwd2: ''
},
//用户名和密码输入框事件
userOldPwdInput:function(e){
this.setData({
userOldPwd:e.detail.value
})
},
userNewPwd1Input:function(e){
this.setData({
userNewPwd1:e.detail.value
})
},
userNewPwd2Input:function(e){
this.setData({
userNewPwd2:e.detail.value
})
},
ConfirmClick:function(){
if(this.data.userOldPwd.length == 0 || this.data.userNewPwd1.length == 0){
this.setData({
infoMess:'温馨提示:新旧密码都不能为空!',
})
}if(this.data.userNewPwd1.length != this.data.userNewPwd2.length ){
this.setData({
infoMess:'温馨提示:新密码两次录入必须内容一致',
})
}else{
//console.log(this.data.userName+':'+this.data.userPwd)
this.setData({
infoMess:'保存中......',
})
let that=this;
let url = getApp().globalData.serverUrl + '/FHDriverInterface';
//let url="http://112.226.192.143:10200/CommMng/BasicDataRef/GetUserRefList";
//let url="http://112.226.192.143:10200/Dispatch/WxApp/FirstLogin";
var openid=getApp().globalData.baseInfo.OPENID;
var userOldPwd=this.data.userOldPwd;
var userNewPwd1=this.data.userNewPwd1;
var userNewPwd2=this.data.userNewPwd2;
wx.login({
success(res) {
if (res.code) {
// var param={
// openid:openid,
// formname:'修改密码',
// userOldPwd:userOldPwd,
// userNewPwd1:userNewPwd1,
// userNewPwd2:userNewPwd2
// };
var jsonstr=JSON.stringify(
{
openid:openid,
formname:'修改密码',
userOldPwd:userOldPwd,
userNewPwd1:userNewPwd1,
userNewPwd2:userNewPwd2
}
);
wx.request({
header: {'content-type': 'application/x-www-form-urlencoded'},
url: url,
method: 'POST',
data: {
jsonstr
},
success: function(r) {
console.log(r)
if (r.data.Success==true) {
wx.reLaunch({
url: '/pages/ds/ds'
})
}else{
that.setData({
infoMess:(r.data.Message)
})
}
}
})
}
}
})
}
},
authLogin(e) {
var that = this
wx.login({
success(res) {
if (res.code) {
let url = getApp().globalData.serverUrl + '/GetDriverInfo';
url = url+'?code='+res.code;
wx.request({
url: getApp().globalData.serverUrl + '/GetDriverInfo',
method: 'POST',
data: {
scene: that.data.scene,
code: res.code
},
success: function(r) {
console.log(r)
if (r.data == 'ok') {
wx.reLaunch({
url: '/pages/index/index'
})
}
}
})
}
}
})
},
onLoad: function () {
console.log('onLoad')
var that = this
wx.login({
success(res) {
if (res.code) {
console.log('code:' + res.code)
//发起网络请求
wx.request({
url: getApp().globalData.serverUrl + '/GetDriverInfo?code=' + res.code,
success: function (res) {
wx.hideLoading()
if (res.data.ErrorCode == 0) {
console.log(res.data)
var baseInfo = res.data.BaseInfo
//var detailInfo = res.data.DetailInfo
getApp().globalData.baseInfo = baseInfo
//getApp().globalData.detailInfo = detailInfo
that.setData({
baseInfo: baseInfo
})
//that.checkBind();
} else if (res.data.ErrorCode == -1) {
// wx.reLaunch({
// url: '/pages/register/register'
// })
that.setData({
hasNoUsedr: true
})
}
}
})
} else {
this.setData({
infoMess:'登录失败!请检查账号和密码是否准确',
})
console.log('登录失败!' + res.errMsg)
}
}
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,49 @@
<!--index.wxml-->
<!--如果在同一个form表单中创建了多个input输入框可以给给每个输入框创建自己的
name=“userName”属性可以区别哪个输入框并通过添加
属性提交bindsubmit="方法名" 重置bindreset="方法名",达到清除输入框内容的目的
js文件中的用法e.detail.value.userName.length-->
<view class="page">
<view class="weui-cells weui-cells_form">
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">原密码:</label>
<input class="input" name="userOldPwd" placeholder="请输入当前密码"
bindinput="userOldPwdInput"/>
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">新密码:</label>
<input class="input" name="userNewPwd1" password placeholder="请输入密码" bindinput="userNewPwd1Input" />
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">重复新密码:</label>
<input class="input" name="userNewPwd2" password placeholder="请再次输入密码"
bindinput="userNewPwd2Input" />
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__bd">
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="ConfirmClick" hover-class="other-button-hover"> 确定 </button>
</view>
</view>
<view class="weui-cell weui-msg">
<view class="weui-cell__bd">
<view class="weui-msg__tips">{{infoMess}}</view>
</view>
</view>
</view>
</view>
<!--
<button type="warn" size="default" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="dologout"> 退出登陆 </button>
-->
<!--
<view>{{userName}}</view>
<view>{{passWd}}</view>-->

@ -0,0 +1,88 @@
/**index.wxss**/
.itemView{
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
height: 25px;
justify-content: flex-start;
display: flex;
/*align-items: center;*/
}
.input{
width: 280px;
height: 25px;
border: 1px solid lightgray;
border-radius: 5px;
}
.button-hover {
background-color: red;
}
/** 添加自定义button点击态样式类**/
.other-button-hover {
background-color: blue;
}
button {margin: 10px;}
input::-webkit-input-placeholder {
color: #999 !important;
}
input::-moz-placeholder {
color: #999 !important;
}
input:-moz-placeholder {
color: #999 !important;
}
input:-ms-input-placeholder {
color: #999 !important;
}
page{
background: #FFF;
}
.page{
background: #FFF;
}
.weui-cells:before,.weui-cells:after,.weui-cell:before{
border:none;
}
.weui-cells .weui-cell{
padding-bottom:5px !important;
}
.weui-cell .weui-cell__hd{
width:100% !important;
}
.weui-cells_form .weui-cell .weui-cell__hd input{
width:100% !important;
border:none !important;
border-bottom: 1px solid #e8ecef !important;
border-radius:0 !important;
font-size: 12px;
color:#666 !important;
margin-top:5px;
text-align:left;
text-align-last: left;
}
.weui-cells_form .weui-cell__bd{
width:100%;
flex: none;
}
button {
width:80% !important;
text-align: center;
background: #3496fe !important;
color: #FFF !important;
font-weight: normal;
display: block;
border-radius: 7px;
box-shadow:1px 4px 7px rgba(45,140,240,.2);
}
.weui-msg{
padding:0;
}
.weui-msg__tips{
text-align: center;
}

@ -0,0 +1,145 @@
//index.js
//获取应用实例
var app = getApp()
Page({
data: {
userName: '',
userPwd: '',
userMobile: '',
hasNoUsedr:false
},
//用户名和密码输入框事件
userMobileInput:function(e){
this.setData({
userMobile:e.detail.value
})
},
passWdInput:function(e){
this.setData({
userPwd:e.detail.value
})
},
//登录按钮点击事件调用参数要用this.data.参数;
//设置参数值要使用this.setData({})方法
loginBtnClick:function(){
if(this.data.userMobile.length == 0 || this.data.userPwd.length == 0){
this.setData({
infoMess:'温馨提示:手机号和密码不能为空!',
})
}else{
//console.log(this.data.userName+':'+this.data.userPwd)
this.setData({
infoMess:'登录中......',
})
let that=this;
let url = getApp().globalData.serverUrl + '/DriverFirstLogin';
//let url="http://112.226.192.143:10200/CommMng/BasicDataRef/GetUserRefList";
//let url="http://112.226.192.143:10200/Dispatch/WxApp/FirstLogin";
wx.login({
success(res) {
if (res.code) {
//console.log('code:' + res.code);
url = url+'?TEL='+ that.data.userMobile;
url = url+'&password='+ that.data.userPwd;
url = url+'&AuthCode='+ res.code;
wx.request({
url: url,
method: 'POST',
data: {
},
success: function(r) {
console.log(r)
if (r.data.ErrorCode==0) {
wx.reLaunch({
url: '/pages/index/index'
})
}else{
that.setData({
infoMess:'登录失败!请检查账号和密码是否准确',
})
}
}
})
}
}
})
}
},
authLogin(e) {
var that = this
wx.login({
success(res) {
if (res.code) {
let url = getApp().globalData.serverUrl + '/GetDriverInfo';
url = url+'?code='+res.code;
wx.request({
url: getApp().globalData.serverUrl + '/GetDriverInfo',
method: 'POST',
data: {
scene: that.data.scene,
code: res.code
},
success: function(r) {
console.log(r)
if (r.data == 'ok') {
wx.reLaunch({
url: '/pages/index/index'
})
}
}
})
}
}
})
},
onLoad: function () {
console.log('onLoad')
var that = this
wx.login({
success(res) {
if (res.code) {
console.log('code:' + res.code)
//发起网络请求
wx.request({
url: getApp().globalData.serverUrl + '/GetDriverInfo?code=' + res.code,
success: function (res) {
wx.hideLoading()
if (res.data.ErrorCode == 0) {
console.log(res.data)
var baseInfo = res.data.BaseInfo
//var detailInfo = res.data.DetailInfo
getApp().globalData.baseInfo = baseInfo
//getApp().globalData.detailInfo = detailInfo
that.setData({
baseInfo: baseInfo
})
//that.checkBind();
} else if (res.data.ErrorCode == -1) {
// wx.reLaunch({
// url: '/pages/register/register'
// })
that.setData({
hasNoUsedr: true
})
}
}
})
} else {
this.setData({
infoMess:'登录失败!请检查账号和密码是否准确',
})
console.log('登录失败!' + res.errMsg)
}
}
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,43 @@
<!--index.wxml-->
<!--如果在同一个form表单中创建了多个input输入框可以给给每个输入框创建自己的
name=“userName”属性可以区别哪个输入框并通过添加
属性提交bindsubmit="方法名" 重置bindreset="方法名",达到清除输入框内容的目的
js文件中的用法e.detail.value.userName.length-->
<view class="page">
<view class="weui-cells weui-cells_form">
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">手机号:</label>
<input class="input" name="userMobile" placeholder="请输入手机号"
bindinput="userMobileInput"/>
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__hd">
<label class="weui-label">密 码:</label>
<input class="input" name="passWd" password placeholder="请输入密码"
bindinput="passWdInput" />
</view>
</view>
<view class="weui-cell">
<view class="weui-cell__bd">
<button type="default" size="default" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="loginBtnClick" hover-class="other-button-hover"> 登录 </button>
</view>
</view>
<view class="weui-cell weui-msg">
<view class="weui-cell__bd">
<view class="weui-msg__tips">{{infoMess}}</view>
</view>
</view>
</view>
</view>
<!--
<button type="warn" size="default" loading="{{loading}}" plain="{{plain}}"
disabled="{{disabled}}" bindtap="dologout"> 退出登陆 </button>
-->
<!--
<view>{{userName}}</view>
<view>{{passWd}}</view>-->

@ -0,0 +1,88 @@
/**index.wxss**/
.itemView{
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
height: 25px;
justify-content: flex-start;
display: flex;
/*align-items: center;*/
}
.input{
width: 280px;
height: 25px;
border: 1px solid lightgray;
border-radius: 5px;
}
.button-hover {
background-color: red;
}
/** 添加自定义button点击态样式类**/
.other-button-hover {
background-color: blue;
}
button {margin: 10px;}
input::-webkit-input-placeholder {
color: #999 !important;
}
input::-moz-placeholder {
color: #999 !important;
}
input:-moz-placeholder {
color: #999 !important;
}
input:-ms-input-placeholder {
color: #999 !important;
}
page{
background: #FFF;
}
.page{
background: #FFF;
}
.weui-cells:before,.weui-cells:after,.weui-cell:before{
border:none;
}
.weui-cells .weui-cell{
padding-bottom:5px !important;
}
.weui-cell .weui-cell__hd{
width:100% !important;
}
.weui-cells_form .weui-cell .weui-cell__hd input{
width:100% !important;
border:none !important;
border-bottom: 1px solid #e8ecef !important;
border-radius:0 !important;
font-size: 12px;
color:#666 !important;
margin-top:5px;
text-align:left;
text-align-last: left;
}
.weui-cells_form .weui-cell__bd{
width:100%;
flex: none;
}
button {
width:80% !important;
text-align: center;
background: #3496fe !important;
color: #FFF !important;
font-weight: normal;
display: block;
border-radius: 7px;
box-shadow:1px 4px 7px rgba(45,140,240,.2);
}
.weui-msg{
padding:0;
}
.weui-msg__tips{
text-align: center;
}

@ -0,0 +1,160 @@
//index.js
const app = getApp()
Page({
data: {
avatarUrl: './user-unlogin.png',
userInfo: {SHOWNAME:"--",companyname:"--"},
baseInfo:null,
logged: false,
takeSession: false,
requestResult: '',
hasNoUsedr:false
},
onLoad: function() {
//后台验证
var that = this
wx.login({
success(res) {
if (res.code) {
console.log('code:' + res.code)
//发起网络请求
wx.request({
url: getApp().globalData.serverUrl + '/GetDriverInfo?code=' + res.code,
success: function (res) {
wx.hideLoading()
if (res.data.ErrorCode == 0) {
console.log(res.data)
var baseInfo = res.data.BaseInfo
//var detailInfo = res.data.DetailInfo
getApp().globalData.baseInfo = baseInfo
//getApp().globalData.detailInfo = detailInfo
that.setData({
userInfo: baseInfo
})
that.checkBind();
} else if (res.data.ErrorCode == -1) {
// wx.reLaunch({
// url: '/pages/register/register'
// })
that.setData({
hasNoUsedr: true
});
that.checkBind();
}
}
})
} else {
console.log('登录失败!' + res.errMsg)
}
}
})
},
onGetUserInfo: function(e) {
if (!this.data.logged && e.detail.userInfo) {
this.setData({
logged: true,
avatarUrl: e.detail.userInfo.avatarUrl,
userInfo: e.detail.userInfo
})
}
},
checkBind: function () {
if (this.data.hasNoUsedr) {
wx.showModal({
title: '提示',
content: '您还未输入账号和密码,需要先输入并验证通过才能使用,马上开始吗?',
success: function (res) {
if (res.confirm) {
wx.redirectTo({
url: '/pages/ds/ds'
})
}
}
})
return false;
}
return true;
},
onGetOpenid: function() {
// 调用云函数
wx.cloud.callFunction({
name: 'login',
data: {},
success: res => {
console.log('[云函数] [login] user openid: ', res.result.openid)
app.globalData.openid = res.result.openid
wx.navigateTo({
url: '../userConsole/userConsole',
})
},
fail: err => {
console.error('[云函数] [login] 调用失败', err)
wx.navigateTo({
url: '../deployFunctions/deployFunctions',
})
}
})
},
// 上传图片
doUpload: function () {
// 选择图片
wx.chooseMedia({
count: 1,
mediaType: ['image','video'],
//sizeType: ['compressed'],
sourceType: ['album', 'camera'],
maxDuration: 30,
camera: 'back',
success: function (res) {
wx.showLoading({
title: '上传中',
})
//const filePath = res.tempFilePaths[0]
var filePath = res.tempFiles;
// that.setData({
// upFiles: files
// })
// 上传图片
const cloudPath = `my-image${filePath.match(/\.[^.]+?$/)[0]}`
wx.cloud.uploadFile({
cloudPath,
filePath,
success: res => {
console.log('[上传文件] 成功:', res)
app.globalData.fileID = res.fileID
app.globalData.cloudPath = cloudPath
app.globalData.imagePath = filePath
wx.navigateTo({
url: '../storageConsole/storageConsole'
})
},
fail: e => {
console.error('[上传文件] 失败:', e)
wx.showToast({
icon: 'none',
title: '上传失败',
})
},
complete: () => {
wx.hideLoading()
}
})
},
fail: e => {
console.error(e)
}
})
},
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,59 @@
<!--index.wxml-->
<!-- 用户 openid -->
<!--
<view class="userinfo">
<button
open-type="getUserInfo"
bindgetuserinfo="onGetUserInfo"
class="userinfo-avatar"
style="background-image: url({{avatarUrl}})"
size="default"
></button>
<view class="userinfo-nickname-wrapper">
<button class="userinfo-nickname" bindtap="onGetOpenid">点击获取 openid</button>
</view>
</view>
-->
<view class="page">
<view class="page__hd">
<view class="weui-flex">
<view class="weui-flex__item">
<image src="../../images/logo.png"></image>
{{userInfo.DrvName}}-{{userInfo.Mobile}}
</view>
</view>
</view>
<view class="page__bd">
<view class="uploader">
<navigator url="../INWORK/INWORK" open-type="navigate" class="uploader-text">
<image src="../../images/photograph.png"></image>
待执行业务
</navigator>
</view>
<view class="uploader">
<navigator url="../OLDWORK/OLDWORK" open-type="navigate" class="uploader-text">
<image src="../../images/photograph.png"></image>
历史任务
</navigator>
</view>
<!-- 登录窗口 -->
<view class="relogin">
<navigator url="../ds/ds" open-type="navigate" class="uploader-text">
<text>重新登录</text>
</navigator>
</view>
<view class="relogin">
<navigator url="../cp/cp" open-type="navigate" class="uploader-text">
<text>修改密码</text>
</navigator>
</view>
</view>
</view>

@ -0,0 +1,65 @@
/**index.wxss**/
page{
background: #FFF;
}
.page__hd{
margin-top:5em;
}
.page__hd .weui-flex .weui-flex__item{
text-align: center;
color:#333;
font-size: 18px;
font-weight:bold;
}
.page__hd .weui-flex .weui-flex__item image{
width:100px;
height:100px;
display: block;
margin:0 auto .75em;
}
.page__bd .uploader{
padding-left:0;
border:none;
}
.page__bd{
margin-top:2em;
}
.page__bd .uploader navigator{
width:80% !important;
height:40px;
line-height: 40px;
text-align: center;
background: #3496fe !important;
border:1px solid #3496fe;
color: #FFF !important;
font-weight: normal;
border-radius: 7px;
margin:0 auto;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.page__bd .relogin navigator{
width:80% !important;
height:40px;
line-height: 40px;
text-align: center;
background: #FFF !important;
border:1px solid #2d8cf0;
color: #2d8cf0 !important;
font-weight: normal;
display: block;
border-radius: 7px;
margin:15px auto 0;
}
.page__bd .uploader navigator image{
width:23px;
height:16px;
margin-right: 7px;
}
.page__bd .uploader.search navigator image{
width:20px;
height:20px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

@ -0,0 +1,53 @@
{
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": true,
"lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"useIsolateContext": true,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true,
"useStaticServer": true
},
"compileType": "miniprogram",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.30.0",
"packOptions": {
"ignore": [],
"include": []
},
"appid": "wxdac8ae92b245cddf"
}

@ -0,0 +1,8 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "WXAPP_FH",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
}
}

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

@ -0,0 +1,144 @@
page {
background: #f6f6f6;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.list {
margin-top: 40rpx;
height: auto;
width: 100%;
background: #fff;
padding: 0 40rpx;
border: 1px solid rgba(0, 0, 0, 0.1);
border-left: none;
border-right: none;
transition: all 300ms ease;
display: flex;
flex-direction: column;
align-items: stretch;
box-sizing: border-box;
}
.list-item {
width: 100%;
padding: 0;
line-height: 104rpx;
font-size: 34rpx;
color: #007aff;
border-top: 1px solid rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: row;
align-content: center;
justify-content: space-between;
box-sizing: border-box;
}
.list-item:first-child {
border-top: none;
}
.list-item image {
max-width: 100%;
max-height: 20vh;
margin: 20rpx 0;
}
.request-text {
color: #222;
padding: 20rpx 0;
font-size: 24rpx;
line-height: 36rpx;
word-break: break-all;
}
.guide {
width: 100%;
padding: 40rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.guide .headline {
font-size: 34rpx;
font-weight: bold;
color: #555;
line-height: 40rpx;
}
.guide .p {
margin-top: 20rpx;
font-size: 28rpx;
line-height: 36rpx;
color: #666;
}
.guide .code {
margin-top: 20rpx;
font-size: 28rpx;
line-height: 36rpx;
color: #666;
background: white;
white-space: pre;
}
.guide .code-dark {
margin-top: 20rpx;
background: rgba(0, 0, 0, 0.8);
padding: 20rpx;
font-size: 28rpx;
line-height: 36rpx;
border-radius: 6rpx;
color: #fff;
white-space: pre
}
.guide image {
max-width: 100%;
}
.guide .image1 {
margin-top: 20rpx;
max-width: 100%;
width: 356px;
height: 47px;
}
.guide .image2 {
margin-top: 20rpx;
width: 264px;
height: 100px;
}
.guide .flat-image {
height: 100px;
}
.guide .code-image {
max-width: 100%;
}
.guide .copyBtn {
width: 180rpx;
font-size: 20rpx;
margin-top: 16rpx;
margin-left: 0;
}
.guide .nav {
margin-top: 50rpx;
display: flex;
flex-direction: row;
align-content: space-between;
}
.guide .nav .prev {
margin-left: unset;
}
.guide .nav .next {
margin-right: unset;
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save