main
xuziying 1 year ago
parent ba6162c17d
commit 5301986f2f
  1. 17
      app.wxss
  2. 4
      pages/freiLogistics/freiLogistics.json
  3. 4
      pages/meLogistics/meLogistics.json
  4. 4
      pages/threeLogistics/threeLogistics.json
  5. 7
      yyt-mall-wl/app.js
  6. 3
      yyt-mall-wl/app.json
  7. 149
      yyt-mall-wl/pages/about/about.js
  8. 5
      yyt-mall-wl/pages/about/about.wxml
  9. 8
      yyt-mall-wl/pages/about/about.wxss
  10. 2
      yyt-mall-wl/pages/details/details.js
  11. 10
      yyt-mall-wl/pages/freiLogistics/freiLogistics.js
  12. 14
      yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml
  13. 3
      yyt-mall-wl/pages/handover/handover.js
  14. 4
      yyt-mall-wl/pages/handover/handover.wxml
  15. 7
      yyt-mall-wl/pages/handover/handover.wxss
  16. 82
      yyt-mall-wl/pages/index/index.js
  17. 3
      yyt-mall-wl/pages/login/login.js
  18. 2
      yyt-mall-wl/pages/meLogistics/meLogistics.js
  19. 2
      yyt-mall-wl/pages/meLogistics/meLogistics.wxml
  20. 6
      yyt-mall-wl/pages/meLogistics/meLogistics.wxss
  21. 157
      yyt-mall-wl/pages/queryhandover/queryhandover.js
  22. 4
      yyt-mall-wl/pages/queryhandover/queryhandover.json
  23. 70
      yyt-mall-wl/pages/queryhandover/queryhandover.wxml
  24. 173
      yyt-mall-wl/pages/queryhandover/queryhandover.wxss
  25. 91
      yyt-mall-wl/pages/threeLogistics/threeLogistics.js
  26. 30
      yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml
  27. 31
      yyt-mall-wl/project.private.config.json
  28. 54
      yyt-mall-wl/utils/login.js

@ -1,17 +0,0 @@
/**app.wxss**/
page{
background: -webkit-linear-gradient(top,#27adb0,#ebf7f7,#f4f4f4)
}
.box{
background: -webkit-linear-gradient(top,#27adb0,#ebf7f7,#f4f4f4);
min-height: 1400rpx;
padding: 5rpx 15rpx;
font-size: 28rpx;
}
.back{
padding: 10rpx;
border-radius: 15rpx;
background-color: #fff;
}

@ -1,4 +0,0 @@
{
"usingComponents": {},
"navigationBarTitleText": "三力货运物流"
}

@ -1,4 +0,0 @@
{
"usingComponents": {},
"navigationBarTitleText": "三力自建物流"
}

@ -1,4 +0,0 @@
{
"usingComponents": {},
"navigationBarTitleText": "三力第三方物流"
}

@ -12,12 +12,11 @@ App({
} }
}) })
}, },
globalData: { globalData: {
// 本地环境 // 本地环境
baseUrl: 'http://192.168.51.6:8201/mall-portal', // baseUrl: 'http://192.168.51.6:8201/mall-portal',
// 线上环境 // 线上环境
// baseUrl:'https://portal-api.macrozheng.com', baseUrl:'http://192.168.51.66:8302/mall-portal',
token: '', token: '',
userInfo: {}, userInfo: {},
bindvx: false, bindvx: false,
@ -37,7 +36,7 @@ App({
}) })
}; };
if (res.cancel) { if (res.cancel) {
// console.log('用户点击取消');
} }
} }
}) })

@ -12,7 +12,8 @@
"pages/feedback/feedback", "pages/feedback/feedback",
"pages/handover/handover", "pages/handover/handover",
"pages/login/login", "pages/login/login",
"pages/otherLogistics/otherLogistics" "pages/otherLogistics/otherLogistics",
"pages/queryhandover/queryhandover"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",

@ -8,41 +8,69 @@ Page({
*/ */
data: { data: {
username: '立即登录', username: '立即登录',
isLogin: false, //是否登录 bindvx:null,
outShow:false
}, },
//绑定微信 //绑定微信
bindWx() { bindWx() {
var isBindWx = '' if(app.globalData.token==''){
var content = '' app.judLogin()
if (app.globalData.bindvx) { }else if(this.data.bindvx){
//解绑 wx.showModal({
isBindWx = '解除绑定' title: '提示',
content = '平台账号已经与您微信账号绑定,是否进行解绑定?' content: `尊敬的${this.data.username},平台账号已经与您微信账号绑定,是否进行解绑?`,
} else { confirmText:'解除绑定',
//绑定 complete: (res) => {
isBindWx = '立刻绑定' if (res.confirm) {
content = '平台账号将与您微信账号绑定,是否进行绑定?' wx.login({
success: (res) => {
this.setData({
code:res.code
})
request.get(`/wx/getOpenid?code=${this.data.code}`).then(res => {
login.bindWechat({openid: res.data.openid}).then(res1=>{
if(res1.data.code==200){
wx.showToast({
title: res1.data.message,
});
this.onLoad()
} }
})
})
}
});
}
}
})
}else{
wx.showModal({ wx.showModal({
title: '绑定微信', title: '绑定微信',
content: content, content: `尊敬的${this.data.username},平台账号与微信账号绑定后,可以直接用微信进行登录,是否进行绑定?`,
confirmText: isBindWx, confirmText:'立即绑定',
complete: (res) => { complete: (res) => {
if (res.confirm) { if (res.confirm) {
login.bindWechat({ wx.login({
openid: app.globalData.openid success: (res) => {
}).then(res1 => { this.setData({
this.onLoad() code:res.code
}) })
request.get(`/wx/getOpenid?code=${this.data.code}`).then(res => {
login.bindWechat({openid: res.data.openid}).then(res1=>{
if(res1.data.code==200){
wx.showToast({
title: res1.data.message,
});
this.onLoad()
} }
if (res.cancel) { })
})
} }
});
};
} }
}) })
}
}, },
@ -65,16 +93,30 @@ Page({
url = '../queryfrei/queryfrei' url = '../queryfrei/queryfrei'
} }
//样本交接查询
if (tag == 'goQueryhandover') {
url = '../queryhandover/queryhandover'
}
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({ wx.navigateTo({
url: url, url: url,
}) })
}
}, },
//意见反馈 //意见反馈
goFeekback() { goFeekback() {
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({ wx.navigateTo({
url: '../feedback/feedback', url: '../feedback/feedback',
}) })
}
}, },
//登录 //登录
@ -88,29 +130,26 @@ Page({
//退出登录 //退出登录
outLogin() { outLogin(){
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: '是否确定退出?', content: `尊敬的${this.data.username},您确定退出当前账号吗?`,
complete: (res) => { complete: (res) => {
if (res.cancel) { if (res.cancel) {
} }
if (res.confirm) { if (res.confirm) {
app.globalData.token = '' app.globalData.token=''
app.globalData.userInfo = {} app.globalData.userInfo=''
this.setData({ this.setData({
isLogin: false, username:'立即登录',
username: '立即登录' outShow:false
})
wx.showToast({
title: '已退出',
}) })
this.onLoad()
} }
} }
}) })
}, },
/** /**
@ -118,19 +157,30 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
request.post('/sso/checkBind/' + app.globalData.openid).then(res2 => { setTimeout(fun=>{
console.log('检查是否绑定=' + JSON.stringify(res2.data.data)); if(app.globalData.token == ''){
app.globalData.bindvx = res2.data.data this.setData({
outShow:false
}) })
}else{
this.setData({
outShow:true,
username:app.globalData.userInfo.nickname
})
}
},3000)
var userInfo = app.globalData.userInfo wx.login({
success: (res) => {
if (userInfo != undefined && JSON.stringify(userInfo) != '{}') { request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => {
request.post('/sso/checkBind/'+res1.data.openid).then(res2 => {
this.setData({ this.setData({
username: userInfo.nickname, bindvx:res2.data.data
isLogin: true })
})
}) })
} }
});
}, },
/** /**
@ -145,6 +195,23 @@ Page({
*/ */
onShow() { onShow() {
if(app.globalData.token == ''){
this.setData({
outShow:false
})
}else{
this.setData({
outShow:true,
username:app.globalData.userInfo.nickname
})
}
// this.setData({
// username:app.globalData.userInfo.nickname
// })
}, },
/** /**

@ -29,7 +29,7 @@
<view class="text">绑定微信</view> <view class="text">绑定微信</view>
</view> </view>
<view class="con" bindtap="goSelNav" data-id="goQueryfrei"> <view class="con" bindtap="goSelNav" data-id="goQueryhandover">
<image src="../../images/样本交接.png"></image> <image src="../../images/样本交接.png"></image>
<view class="text">样本交接查询</view> <view class="text">样本交接查询</view>
</view> </view>
@ -41,6 +41,7 @@
</view> </view>
</view> </view>
<view wx:if="{{isLogin}}" class="out" bindtap="outLogin">退出登录</view> <!-- <view wx:if="{{isLogin}}" class="out" bindtap="outLogin">退出登录</view> -->
<view wx:if="{{outShow}}" class="out" bindtap="outLogin">退出登录</view>
</view> </view>

@ -32,13 +32,15 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
height: 350rpx; align-items: center;
padding: 50rpx 0;
} }
.con{ .con{
width: 220rpx; width: 220rpx;
margin-left: 10rpx; margin-left: 10rpx;
text-align: center; text-align: center;
margin-top: 40rpx; /* margin-top: 40rpx; */
padding: 30rpx 0;
} }
.con image{ .con image{
width: 100rpx; width: 100rpx;
@ -59,7 +61,7 @@
font-weight: 700; font-weight: 700;
letter-spacing: 5rpx; letter-spacing: 5rpx;
background-color: #4eb8b9; background-color: #4eb8b9;
margin-top: 350rpx; margin-top: 180rpx;
border-radius: 50rpx; border-radius: 50rpx;
border: 1rpx #ddd solid; border: 1rpx #ddd solid;
} }

@ -32,7 +32,7 @@ Page({
var item = JSON.parse(options.sample) var item = JSON.parse(options.sample)
this.setData({ this.setData({
barCode:item.barCode, barCode:item.barCode,
receiveTime:item.receiveTime, receiveTime:item.createTime,
status:item.status, status:item.status,
logisticsNo:item.logisticsNo, logisticsNo:item.logisticsNo,
unitType:item.unitType, unitType:item.unitType,

@ -198,8 +198,12 @@ Page({
var potoIdx = 0; var potoIdx = 0;
if (e.target.dataset.id == 'car_1') potoIdx = 0 if (e.target.dataset.id == 'car_1') potoIdx = 0
if (e.target.dataset.id == 'car_2') potoIdx = 1 if (e.target.dataset.id == 'car_2') potoIdx = 1
if (e.target.dataset.id == 'box_1') potoIdx = 2 if (e.target.dataset.id == 'car_3') potoIdx = 2
if (e.target.dataset.id == 'box_2') potoIdx = 3 if (e.target.dataset.id == 'car_4') potoIdx = 3
if (e.target.dataset.id == 'box_1') potoIdx = 4
if (e.target.dataset.id == 'box_2') potoIdx = 5
if (e.target.dataset.id == 'box_3') potoIdx = 6
if (e.target.dataset.id == 'box_4') potoIdx = 7
//回显所拍摄照片 //回显所拍摄照片
@ -463,7 +467,7 @@ Page({
}) })
//初始化照片按钮 //初始化照片按钮
var tempSrc = [this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc] var tempSrc = [this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc,this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc]
this.setData({ this.setData({
poto: tempSrc poto: tempSrc
}) })

@ -65,7 +65,7 @@
<input type="number" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" /> <input type="number" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" />
</view> </view>
<picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}"> <picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
<label>到达时间:</label> <label><text style="color: red;position: absolute; left:-20rpx;">*</text>到达时间:</label>
<input value='{{time}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" /> <input value='{{time}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" />
</picker> </picker>
<view class="from-con"> <view class="from-con">
@ -91,8 +91,8 @@
<view class="bush-img"> <view class="bush-img">
<image bindtap="photograph" src="{{poto[0]}}" data-id="car_1"></image> <image bindtap="photograph" src="{{poto[0]}}" data-id="car_1"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[2]}}" data-id="car_3"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[3]}}" data-id="car_4"></image>
</view> </view>
<view class="bush"> <view class="bush">
@ -100,10 +100,10 @@
<button bindtap="boxPhot" hidden="true">拍 照</button> <button bindtap="boxPhot" hidden="true">拍 照</button>
</view> </view>
<view class="bush-img"> <view class="bush-img">
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_1"></image> <image bindtap="photograph" src="{{poto[4]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[3]}}" data-id="box_2"></image> <image bindtap="photograph" src="{{poto[5]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_2"></image> <image bindtap="photograph" src="{{poto[6]}}" data-id="box_3"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_2"></image> <image bindtap="photograph" src="{{poto[7]}}" data-id="box_4"></image>
</view> </view>
</view> </view>

@ -135,7 +135,8 @@ Page({
}) })
} else { } else {
this.setData({ this.setData({
logisticsCodeList: res.data.data logisticsCodeList: res.data.data,
all:res.data.data.length
}) })
} }
}) })

@ -70,7 +70,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view style="margin-top: 40rpx;text-align: right;">总管数:20管</view> <view style="margin-top: 40rpx;text-align: right;">总管数:{{all}}管</view>
</view> </view>
<view class="back" style="padding: 20rpx;box-shadow: 0 0 10px #ddd;"> <view class="back" style="padding: 20rpx;box-shadow: 0 0 10px #ddd;">
@ -89,7 +89,7 @@
<view class="td td1">{{index+1}}</view> <view class="td td1">{{index+1}}</view>
<view class="td">{{item.barCode}}</view> <view class="td">{{item.barCode}}</view>
<view class="td">{{item.institutionName}}</view> <view class="td">{{item.institutionName}}</view>
<view class="td td2">{{item.entryDate}}</view> <view class="td td2">{{item.createTime}}</view>
<view class="td">{{item.boxNum}}</view> <view class="td">{{item.boxNum}}</view>
<view class="td">{{item.logisticsMen}}</view> <view class="td">{{item.logisticsMen}}</view>
<view class="td" wx:if="{{item.status == 0}}" class="td">未采样</view> <view class="td" wx:if="{{item.status == 0}}" class="td">未采样</view>

@ -60,7 +60,7 @@
.canvas { .canvas {
width: 100px; width: 100px;
height: 100px; height: 100px;
background-color: #6bc9ca; /* background-color: #6bc9ca; */
} }
.allordernum { .allordernum {
@ -121,13 +121,14 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
z-index: 10; z-index: 10;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.2);
/* 设置阴影半透明背景如: background: rgba(0, 0, 0, 0.4); */ /* 设置阴影半透明背景如: background: rgba(0, 0, 0, 0.4); */
display: none; display: none;
} }
.zan-dialog__container { .zan-dialog__container {
position: fixed; /* position: fixed; */
position: absolute;
bottom: 200rpx; bottom: 200rpx;
width: 280rpx; width: 280rpx;
/* 弹窗布局宽 */ /* 弹窗布局宽 */

@ -2,6 +2,7 @@
var request = require('../../utils/http') var request = require('../../utils/http')
import * as echarts from "../../components/echarts/echarts"; import * as echarts from "../../components/echarts/echarts";
var app = getApp(); var app = getApp();
const login=require('../../utils/login')
function initChart(canvas, width, height, dpr) { function initChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, { const chart = echarts.init(canvas, null, {
@ -85,9 +86,14 @@ Page({
if (tag == 'goHandover') { if (tag == 'goHandover') {
url = '../handover/handover' url = '../handover/handover'
} }
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({ wx.navigateTo({
url: url, url: url,
}) })
}
}, },
//判读是否有token //判读是否有token
@ -101,24 +107,6 @@ Page({
} }
}, },
//判断是否绑定了微信
isBindWx(openid) {
request.post(`/sso/checkBind/${openid}`).then(res => {
console.log("是否绑定" + JSON.stringify(res));
if (res.data.data == true) {
//已绑定 获取用户信息
request.get('/sso/info').then(res1 => {
console.log('res1.data.data =' + JSON.stringify(res1.data.data));
app.globalData.userInfo = res1.data.data
// console.log(app.globalData.userInfo);
})
} else {
//未绑定 提示登录
app.judLogin();
}
})
},
//查询跳转 //查询跳转
goSelNav(e) { goSelNav(e) {
var tag = e.currentTarget.dataset.id var tag = e.currentTarget.dataset.id
@ -138,10 +126,14 @@ Page({
url = '../queryfrei/queryfrei' url = '../queryfrei/queryfrei'
} }
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({ wx.navigateTo({
url: url, url: url,
}) })
}
}, },
/** /**
@ -149,57 +141,21 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
if (app.globalData.userInfo == undefined) {
//获取code
wx.login({ wx.login({
success: res => { success: (res) => {
// 发送 res.code 到后台换取 openId
request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => { request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => {
//记录OpenID // console.log(res1);
app.globalData.openid = res1.data.openid request.post('/sso/checkBind/'+res1.data.openid).then(res2 => {
this.isBindWx(res1.data.openid) this.setData({
bindvx:res2.data.data
}) })
if(res2.data.data && !app.globalData.token){
login.openidLogin()
} }
}) })
//检查是否绑定
// request.post('/sso/checkBind/' + app.globalData.openid).then(res2 => {
// console.log('检查是否绑定=' + JSON.stringify(res2.data.data));
// app.globalData.bindvx = res2.data.data
// })
}
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => {
//记录OpenID
app.globalData.openid = res1.data.openid
this.isBindWx(res1.data.openid)
}) })
// console.log(JSON.stringify(res));
// if (res.errMsg == 'login:ok') {
// request.post(`/sso/checkBind/` + res.code).then(res => {
// console.log('res=' + JSON.stringify(res));
// if (res.data.code != 200) {
// //未绑定
// app.judLogin();
// } else {
// //已绑定 设置token 与 用户信息
// }
// })
// } else {
// wx.showToast({
// title: res.errMsg,
// icon: 'error'
// })
// }
} }
}) });
}, },

@ -72,7 +72,7 @@ Page({
//创建随机验证码方法 //创建随机验证码方法
createCode() { createCode() {
let code = ''; let code = '';
let codeLength = 4; //验证码长度 let codeLength = 4;
let txt = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'C', 'd', 'E', 'f', 'g', 'H', 'i', 'J', 'k', 'L', 'm', 'N', 'O', 'p', 'Q', 'r', 'S', 'T', 'u', 'V', 'w', 'X', 'Y', 'z'); let txt = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'C', 'd', 'E', 'f', 'g', 'H', 'i', 'J', 'k', 'L', 'm', 'N', 'O', 'p', 'Q', 'r', 'S', 'T', 'u', 'V', 'w', 'X', 'Y', 'z');
for(let i = 0; i < codeLength; i++) { for(let i = 0; i < codeLength; i++) {
//随机数范围 //随机数范围
@ -82,7 +82,6 @@ Page({
this.setData({ this.setData({
code code
}) })
console.log(this.data.code);
}, },
/** /**

@ -349,7 +349,7 @@ Page({
// console.log(JSON.stringify(e.detail.value)) // console.log(JSON.stringify(e.detail.value))
this.setData({ this.setData({
numberplateIdx: e.detail.value, numberplateIdx: e.detail.value,
numberplate: this.data.boxList[e.detail.value] numberplate: this.data.numberplateArr[e.detail.value]
}) })
}, },

@ -25,7 +25,7 @@
<view class="tr" wx:for="{{sampleList}}" wx:key="index" data-id="{{index}}" bindtap="goDetail"> <view class="tr" wx:for="{{sampleList}}" wx:key="index" data-id="{{index}}" bindtap="goDetail">
<view class="td1">{{index + 1}}</view> <view class="td1">{{index + 1}}</view>
<view class="td">{{item.barCode}}</view> <view class="td">{{item.barCode}}</view>
<view class="td">{{item.receiveTime}}</view> <view class="td">{{item.createTime}}</view>
<view wx:if="{{item.status == 0}}" class="td">未采样</view> <view wx:if="{{item.status == 0}}" class="td">未采样</view>
<view wx:elif="{{item.status == 1}}" class="td">已采样</view> <view wx:elif="{{item.status == 1}}" class="td">已采样</view>
<view wx:elif="{{item.status == 2}}" class="td">已发货</view> <view wx:elif="{{item.status == 2}}" class="td">已发货</view>

@ -162,7 +162,7 @@
.tabel { .tabel {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
/* border: 1rpx #eee solid; */ border: 1rpx #ddd solid;
} }
@ -174,7 +174,7 @@
.tr .td { .tr .td {
border-right: #ddd solid 1rpx; border-right: #ddd solid 1rpx;
border-top: #ddd solid 1rpx; border-bottom: #ddd solid 1rpx;
padding: 15rpx 0; padding: 15rpx 0;
font-size: 22rpx; font-size: 22rpx;
display: flex; display: flex;
@ -194,7 +194,7 @@
.td1 { .td1 {
border-right: #ddd solid 1rpx; border-right: #ddd solid 1rpx;
border-top: #ddd solid 1rpx; border-bottom: #ddd solid 1rpx;
padding: 15rpx 0; padding: 15rpx 0;
font-size: 22rpx; font-size: 22rpx;
display: flex; display: flex;

@ -0,0 +1,157 @@
// pages/queryhandover/queryhandover.js
Page({
/**
* 页面的初始数据
*/
data: {
screenisshow:false,
dateList:[
{
id:1,
name:'近1个月',
isShow:false,
},
{
id:2,
name:'近3个月',
isShow:false,
},
{
id:3,
name:'近6个月',
isShow:false,
},
{
id:4,
name:'今年',
isShow:false,
},
],
date: '', //开始时间
endDate: '',
},
//筛选--------------------------
screenisshow(){
this.setData({
screenisshow:true
})
},
selectDate(e){
console.log(e.currentTarget.dataset.id);
var id=e.currentTarget.dataset.id
var dateList=this.data.dateList
for(var i in dateList){
if(dateList[i].id==id){
dateList[i].isShow=true
}else{
dateList[i].isShow=false
}
}
this.setData({
dateList:dateList
})
},
//筛选确定
okDate(){
this.setData({
screenisshow:false
})
},
//筛选重置
resDate(){
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
this.setData({
dateList:dateList,
date: '',
endDate: '',
})
},
//-------------------------------
//开始时间
bindDateChange(e) {
// console.log(e.detail.value)
this.setData({
date: e.detail.value
})
},
//结束时间
bindDateChangeend(e) {
// console.log(e.detail.value)
this.setData({
endDate: e.detail.value
})
},
//退出
out(){
wx.switchTab({
url: '../index/index',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "样本交接查询"
}

@ -0,0 +1,70 @@
<!--pages/queryhandover/queryhandover.wxml-->
<view class="zhezhaoceng {{screenisshow?'screenAlertActive':''}}">
<view class="screenAlert">
<view style="font-weight: 700;">按时间查询</view>
<view class="dateList">
<view wx:for="{{dateList}}" wx:key="index" data-id="{{item.id}}" bindtap="selectDate" class="date1 {{item.isShow?'dataActive':''}}">{{item.name}}</view>
<view class="selectdate">
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChange">
<input type="text" disabled="true" placeholder="起始时间" placeholder-class="place" value="{{date}}" />
</picker>
<text style="color:#ddd">—</text>
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChangeend">
<input type="text" disabled="true" placeholder="终止时间" placeholder-class="place" value="{{endDate}}" />
</picker>
</view>
</view>
<view style="display: flex; margin-top: 50rpx; padding: 20rpx 0;">
<button class="chongzhi" bindtap="resDate">重 置</button>
<button class="queren" bindtap="okDate">确 认</button>
</view>
</view>
</view>
<view class="box">
<view class="screen">
<input type="text" placeholder="请筛选时间" placeholder-class="place" bindinput="getLogisticsNo" value="{{logisticsNo}}" disabled="true" />
<view style="display: flex; align-items: center;" bindtap="screenisshow">
<image src="../../images/shaixuan.png"></image>
<view class="wz">筛选</view>
</view>
</view>
<view class="back">
<view class="tabtop">
<text>物流单总数量:0</text>
<text>样本总数量:0</text>
<text>总费用:¥0</text>
</view>
<view class="tabel">
<scroll-view scroll-x style="width: 100%; height: 500rpx;">
<view class="tr top">
<!-- <view class="td td_date">日 期</view> -->
<view class="td">物流单号</view>
<view class="td">物流类型</view>
<view class="td">转运方式</view>
<view class="td">样本数量</view>
<view class="td td1">费 用</view>
</view>
<block>
<view class="tr">
<!-- <view class="td td_date">2023-10-05</view> -->
<!-- <view class="td">1234567894</view>
<view class="td">自建物流</view>
<view class="td">车辆</view>
<view class="td">50</view>
<view class="td td1">¥100</view> -->
</view>
</block>
</scroll-view>
</view>
</view>
<button class="out" bindtap="out">退 出</button>
</view>

@ -0,0 +1,173 @@
/* pages/queryhandover/queryhandover.wxss */
.screen{
display: flex;
align-items: center;
margin-bottom: 5rpx;
font-size: 26rpx;
letter-spacing: 1rpx;
}
.screen input{
background-color: rgb(255, 255, 255);
flex: 1;
padding: 10rpx 35rpx;
border-radius: 50rpx;
box-shadow: 0 0 5rpx #ddd;
}
.screen image{
width: 50rpx;
height:50rpx;
margin-left: 15rpx;
}
.screen .wz{
margin-right: 10rpx;
font-size: 30rpx;
font-weight: 500;
color: #fff;
}
.zhezhaoceng{
position: fixed;
background-color: rgb(0, 0, 0,0.4);
width: 100%;
height: 100vh;
z-index: 1000;
transition: all 0.4s;
transform: translateY(-100vh);
}
.screenAlertActive{
transform: translateY(0);
}
.screenAlert{
z-index: 2000;
background:#f4f4f4;
border-radius: 0 0 20rpx 20rpx;
max-height: 500rpx;
padding: 20rpx;
font-size: 30rpx;
}
.dateList{
display: flex;
flex-wrap: wrap;
justify-content:space-around;
}
.dateList .date1{
background-color: #fff;
margin-left: 20rpx;
text-align: center;
width: 200rpx;
padding: 15rpx 0;
margin-top: 20rpx;
border-radius: 50rpx;
font-size: 26rpx;
}
.dataActive{
border: 1rpx #38bec0 solid;
background-color: #deeff0 !important;
}
.selectdate{
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
width: 62%;
}
.selectdate input{
background-color: #fff;
border-radius: 30rpx;
font-size: 26rpx;
padding: 12rpx 0;
text-align: center;
}
.chongzhi{
background-color: #eee;
border-radius: 52rpx;
border: 1rpx #ddd solid;
width: 45% !important;
height: 70rpx;
font-size: 30rpx;
}
.queren{
background-color: #38bec0;
color: #fff;
border-radius: 52rpx;
width: 45% !important;
height: 70rpx;
font-size: 30rpx;
}
.place{
color: rgb(209, 208, 208);
}
.back{
margin-top: 10rpx;
text-align: center;
box-shadow: 0 0 10px #ddd;
}
.tabtop{
display: flex;
width: 100%;
justify-content:space-evenly;
font-size: 26rpx;
color: #555;
margin-top: 20rpx;
}
.tabel{
background-color: #fff;
/* border-radius: 15rpx;margin-top: 15rpx; */
/* padding: 30rpx 10rpx 50rpx 10rpx; */
/* padding: 20rpx; */
border: 1rpx #ddd solid;
margin-top: 30rpx;
}
.tr{
display: flex;
width: 100%;
}
.tr .td{
/* border-right:#ddd solid 1rpx ;
border-top: #ddd solid 1rpx;
border-bottom: #ddd solid 1rpx; */
border-right: 1rpx #ddd solid;
border-bottom: 1rpx #ddd solid;
padding: 15rpx 0;
font-size: 22rpx;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: nowrap;
white-space: nowrap;
min-width: 150rpx;
}
.top view{
background-color: #6bc9ca;
color: #fff;
font-size: 24rpx !important;
font-weight: 700 !important;
}
.td1{
min-width: 100rpx !important;
}
.td_date{
min-width: 200rpx !important;
}
.td_time{
min-width: 300rpx !important;
}
.out{
border-radius: 50rpx;
background-color: #38bec0;
color: #fff;
margin-top: 200rpx;
width: 70% !important;
}

@ -4,6 +4,13 @@ var request = require('../../utils/http')
var dateUtils = require('../../utils/dateUtils') var dateUtils = require('../../utils/dateUtils')
Page({ Page({
data: { data: {
boxArr:[],//转运箱列表
boxId:'',//转运箱id
boxNum: '', //转运箱号
unitTypeArr:[],//物流单位列表
unitType:'',//物流单位id
unitType1:'',//物流单位
selfOrderCode: '', //物流单号 selfOrderCode: '', //物流单号
list: [{ list: [{
'id': 1, 'id': 1,
@ -29,7 +36,7 @@ Page({
choose_year: "", choose_year: "",
srcArray: [], srcArray: [],
phone: '', //物流电话 phone: '', //物流电话
boxNum: '', //转运箱号
cost: '', //物流费用 cost: '', //物流费用
logisticsMen: '', //物流员 logisticsMen: '', //物流员
notes: '', //备注 notes: '', //备注
@ -44,8 +51,12 @@ Page({
var potoIdx = 0; var potoIdx = 0;
if (e.target.dataset.id == 'car_1') potoIdx = 0 if (e.target.dataset.id == 'car_1') potoIdx = 0
if (e.target.dataset.id == 'car_2') potoIdx = 1 if (e.target.dataset.id == 'car_2') potoIdx = 1
if (e.target.dataset.id == 'box_1') potoIdx = 2 if (e.target.dataset.id == 'car_3') potoIdx = 2
if (e.target.dataset.id == 'box_2') potoIdx = 3 if (e.target.dataset.id == 'car_4') potoIdx = 3
if (e.target.dataset.id == 'box_1') potoIdx = 4
if (e.target.dataset.id == 'box_2') potoIdx = 5
if (e.target.dataset.id == 'box_3') potoIdx = 6
if (e.target.dataset.id == 'box_4') potoIdx = 7
//回显所拍摄照片 //回显所拍摄照片
var _this = this; var _this = this;
@ -121,13 +132,6 @@ Page({
}) })
} }
//转运箱号
if (data_id == 'boxNum') {
this.setData({
boxNum: value
})
}
//物流费用 //物流费用
if (data_id == 'cost') { if (data_id == 'cost') {
this.setData({ this.setData({
@ -209,12 +213,19 @@ Page({
}) })
}, },
//送检机构 //物流单位
bindPickerChange(e) { bindPickerChangeunitType(e) {
console.log('bindPickerChange = ' + JSON.stringify(e)); this.setData({
unitType1:this.data.unitTypeArr[e.detail.value].dictLabel,
unitType:this.data.unitTypeArr[e.detail.value].dictValue
})
},
//转运箱
bindPickerChangeBox(e){
this.setData({ this.setData({
index: e.detail.value, boxNum:this.data.boxArr[e.detail.value].boxNum,
insIdx:e.detail.value boxId:this.data.boxArr[e.detail.value].id
}) })
}, },
@ -272,7 +283,7 @@ Page({
'logisticsNo': this.data.selfOrderCode 'logisticsNo': this.data.selfOrderCode
} }
request.post(`/logistics/selectTranLogistics`, reqData).then(res => { request.post(`/logistics/selectTranLogistics`, reqData).then(res => {
console.log(res.data); // console.log(res.data);
this.setData({ this.setData({
sampleList: res.data.data, sampleList: res.data.data,
sampleCount: res.data.data.length sampleCount: res.data.data.length
@ -296,7 +307,7 @@ Page({
var endTime = dateUtils.customizeDateFormat(temp.expectedEndTime); var endTime = dateUtils.customizeDateFormat(temp.expectedEndTime);
// if (this.showErrInfo(startTime, '出发时间不可为空')) return // if (this.showErrInfo(startTime, '出发时间不可为空')) return
if (this.showErrInfo(endTime, '到时间不可为空')) return if (this.showErrInfo(endTime, '到时间不可为空')) return
//处理物流车拍照 //处理物流车拍照
var carPoto = [] var carPoto = []
@ -313,6 +324,7 @@ Page({
var tempData = { var tempData = {
"barCode": temp.pipenum, //样本条码 "barCode": temp.pipenum, //样本条码
"barCodeImg": "", //物流拍照图 "barCodeImg": "", //物流拍照图
"boxId":temp.boxId,//转运箱id
"boxNum": temp.boxNum, //转运箱号 "boxNum": temp.boxNum, //转运箱号
"carPics": carPoto.toString(), //物流车图片 逗号分隔 "carPics": carPoto.toString(), //物流车图片 逗号分隔
"boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔 "boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔
@ -321,8 +333,8 @@ Page({
"entryDate": temp.date, // 录入日期 "entryDate": temp.date, // 录入日期
"endDate": '2023-07-06 14:52:53', //startTime "endDate": '2023-07-06 14:52:53', //startTime
"expectedEndTime": endTime, //预计到达时间 endTime "expectedEndTime": endTime, //预计到达时间 endTime
"institutionName": temp.ins[temp.insIdx].orgName, //送检机构名称 "institutionName":'',//送检机构名称
"institutionNo": temp.ins[temp.insIdx].id, //送检机构编号 "institutionNo":'', //送检机构编号
"logisticsMen": temp.logisticsMen, //物流员 "logisticsMen": temp.logisticsMen, //物流员
"logisticsNo": temp.selfOrderCode, //物流编号 "logisticsNo": temp.selfOrderCode, //物流编号
"logisticsWay": 2, //物流方式 1自建 2第三方 3货运 "logisticsWay": 2, //物流方式 1自建 2第三方 3货运
@ -332,10 +344,11 @@ Page({
"phone": temp.phone, //物流电话 "phone": temp.phone, //物流电话
"startTime": "", //出发时间 "startTime": "", //出发时间
"tranType": "", //物流方式 "tranType": "", //物流方式
"unitType": temp.insIdx, //物流单位 1.顺丰 2.京东 "unitType": temp.unitType, //物流单位
"updateBy": 0, "updateBy": 0,
"updateTime": "" "updateTime": ""
} }
console.log(endTime);
request.post(`/batch/addTranLogistics`, tempData).then(res => { request.post(`/batch/addTranLogistics`, tempData).then(res => {
console.log(JSON.stringify(res.data)); console.log(JSON.stringify(res.data));
@ -399,25 +412,39 @@ Page({
}) })
//获取物流机构列表 /dict/type/{dictType} //获取物流机构列表 /dict/type/{dictType}
request.get(`/dict/type/unit_type`).then(res => { // request.get(`/dict/type/unit_type`).then(res => {
var array = res.data.data // var array = res.data.data
var tempArr = [] // var tempArr = []
for (let index = 0; index < array.length; index++) { // for (let index = 0; index < array.length; index++) {
tempArr.push(array[index].dictLabel) // tempArr.push(array[index].dictLabel)
} // }
// this.setData({
// ins: tempArr
// })
// //查询物流批次列表
// this.selSampleList()
// })
//初始化照片按钮
var tempSrc = [this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc,this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc]
this.setData({ this.setData({
ins: tempArr poto: tempSrc
}) })
//查询物流批次列表 //物流单位
this.selSampleList() request.get(`/dict/type/unit_type`).then(res => {
this.setData({
unitTypeArr:res.data.data
})
}) })
//初始化照片按钮 //转运箱
var tempSrc = [this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc] request.post(`/box/selectTranBox`).then(res => {
this.setData({ this.setData({
poto: tempSrc boxArr:res.data.data
})
}) })
}, },

@ -44,8 +44,8 @@
<view class="bush-img"> <view class="bush-img">
<image bindtap="photograph" src="{{poto[0]}}" data-id="car_1"></image> <image bindtap="photograph" src="{{poto[0]}}" data-id="car_1"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[2]}}" data-id="car_3"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[3]}}" data-id="car_4"></image>
</view> </view>
<view class="bush"> <view class="bush">
@ -53,10 +53,10 @@
<!-- <button bindtap="boxPhot">拍 照</button> --> <!-- <button bindtap="boxPhot">拍 照</button> -->
</view> </view>
<view class="bush-img"> <view class="bush-img">
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_1"></image> <image bindtap="photograph" src="{{poto[4]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[3]}}" data-id="box_2"></image> <image bindtap="photograph" src="{{poto[5]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[6]}}" data-id="car_3"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="car_2"></image> <image bindtap="photograph" src="{{poto[7]}}" data-id="car_4"></image>
</view> </view>
</view> </view>
@ -65,13 +65,16 @@
<label>物流单号:</label> <label>物流单号:</label>
<input type="text" placeholder="物流单号" disabled="false" placeholder-class="place" value="{{selfOrderCode}}" /> <input type="text" placeholder="物流单号" disabled="false" placeholder-class="place" value="{{selfOrderCode}}" />
</view> </view>
<picker class="from-con" bindchange="bindPickerChange" value="{{index}}" range="{{ins}}">
<picker class="from-con" bindchange="bindPickerChangeunitType" range-key="dictLabel" value="{{index}}" range="{{unitTypeArr}}">
<label>物流单位:</label> <label>物流单位:</label>
<input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{ins[index]}}" /> <input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{unitType1}}"/>
</picker> </picker>
<view class="from-con"> <view class="from-con">
<label>送检机构</label> <label>送检机构</label>
<input type="text" placeholder="送检机构"/> <input type="text" placeholder="送检机构" placeholder-class="place"/>
</view> </view>
<!-- <picker mode="date" value="date" start="{{start}}" end="{{end}}" bindchange="bindDateChange" class="from-con"> <!-- <picker mode="date" value="date" start="{{start}}" end="{{end}}" bindchange="bindDateChange" class="from-con">
@ -87,12 +90,13 @@
<label>物流费用:</label> <label>物流费用:</label>
<input type="text" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" /> <input type="text" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" />
</view> </view>
<view class="from-con"> <picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="inputTextInfo" data-id="boxNum" value="{{boxNum}}" /> <input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}"/>
</view> </picker>
<picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}"> <picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
<label>预计到达时间:</label> <label><text style="color: red;position: absolute; left:-20rpx;">*</text>预计到达时间:</label>
<input value='{{expectedEndTime}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" /> <input value='{{expectedEndTime}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" />
</picker> </picker>
<view class="from-con"> <view class="from-con">

@ -2,7 +2,8 @@
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "yyt_logistics", "projectname": "yyt_logistics",
"setting": { "setting": {
"compileHotReLoad": true "compileHotReLoad": true,
"urlCheck": false
}, },
"condition": { "condition": {
"miniprogram": { "miniprogram": {
@ -97,6 +98,34 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "",
"pathName": "pages/queryhandover/queryhandover",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/queryhandover/queryhandover",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/queryhandover/queryhandover",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/queryhandover/queryhandover",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }

@ -4,20 +4,23 @@ const openidLogin = function(){
wx.login({ wx.login({
success: (res) => { success: (res) => {
request.get('/wx/getOpenid?code='+res.code).then(res => { request.get('/wx/getOpenid?code='+res.code).then(res => {
getTokenByOpenld({openid: res.data.openid}).then(res1 => { wx.request({
// console.log('=============',res1); url: `${app.globalData.baseUrl}/sso/getTokenByOpenId`,
method:'POST',
data:{openid: res.data.openid},
header:{'content-type':'application/x-www-form-urlencoded'},
success:(res1) => {
if(res1.data.code == 200){ if(res1.data.code == 200){
app.globalData.token = res1.data.data.tokenHead + res1.data.data.token; app.globalData.token = res1.data.data.tokenHead + res1.data.data.token;
// console.log(app.globalData.token);
wx.showToast({ wx.showToast({
title: '登陆成功' title: '登陆成功'
}); });
request.get('/sso/info').then(res2 => { request.get('/sso/info').then(res2 => {
// console.log(res2);
app.globalData.userInfo=res2.data.data app.globalData.userInfo=res2.data.data
// console.log(app.globalData.userInfo);
}) })
} }
}
}) })
}) })
@ -34,4 +37,45 @@ module.exports = {
bindWechat(params){ bindWechat(params){
return request.post('/sso/bindWechat',params, {'content-type':'application/x-www-form-urlencoded'}) return request.post('/sso/bindWechat',params, {'content-type':'application/x-www-form-urlencoded'})
}, },
openidLogin,
} }
// const request = require('../utils/http')
// var app = getApp();
// const openidLogin = function(){
// wx.login({
// success: (res) => {
// request.get('/wx/getOpenid?code='+res.code).then(res => {
// getTokenByOpenld({openid: res.data.openid}).then(res1 => {
// // console.log('=============',res1);
// if(res1.data.code == 200){
// app.globalData.token = res1.data.data.tokenHead + res1.data.data.token;
// // console.log(app.globalData.token);
// wx.showToast({
// title: '登陆成功'
// });
// request.get('/sso/info').then(res2 => {
// // console.log(res2);
// app.globalData.userInfo=res2.data.data
// // console.log(app.globalData.userInfo);
// })
// }
// })
// })
// }
// })
// }
// const getTokenByOpenld = function(params){
// return request.post('/sso/getTokenByOpenId', params, {'content-type':'application/x-www-form-urlencoded'})
// }
// module.exports = {
// //绑定微信
// bindWechat(params){
// return request.post('/sso/bindWechat',params, {'content-type':'application/x-www-form-urlencoded'})
// },
// }
Loading…
Cancel
Save