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. 187
      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. 9
      yyt-mall-wl/pages/handover/handover.wxss
  16. 100
      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. 93
      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. 72
      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: {
// 本地环境
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: '',
userInfo: {},
bindvx: false,
@ -37,7 +36,7 @@ App({
})
};
if (res.cancel) {
// console.log('用户点击取消');
}
}
})

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

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

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

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

@ -198,8 +198,12 @@ Page({
var 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 == 'box_1') potoIdx = 2
if (e.target.dataset.id == 'box_2') potoIdx = 3
if (e.target.dataset.id == 'car_3') potoIdx = 2
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({
poto: tempSrc
})

@ -65,7 +65,7 @@
<input type="number" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" />
</view>
<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" />
</picker>
<view class="from-con">
@ -91,8 +91,8 @@
<view class="bush-img">
<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[3]}}" data-id="car_4"></image>
</view>
<view class="bush">
@ -100,10 +100,10 @@
<button bindtap="boxPhot" hidden="true">拍 照</button>
</view>
<view class="bush-img">
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[3]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[4]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[5]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[6]}}" data-id="box_3"></image>
<image bindtap="photograph" src="{{poto[7]}}" data-id="box_4"></image>
</view>
</view>

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

@ -70,7 +70,7 @@
</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 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">{{item.barCode}}</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.logisticsMen}}</view>
<view class="td" wx:if="{{item.status == 0}}" class="td">未采样</view>

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

@ -2,6 +2,7 @@
var request = require('../../utils/http')
import * as echarts from "../../components/echarts/echarts";
var app = getApp();
const login=require('../../utils/login')
function initChart(canvas, width, height, dpr) {
const chart = echarts.init(canvas, null, {
@ -85,9 +86,14 @@ Page({
if (tag == 'goHandover') {
url = '../handover/handover'
}
wx.navigateTo({
url: url,
})
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({
url: url,
})
}
},
//判读是否有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) {
var tag = e.currentTarget.dataset.id
@ -138,10 +126,14 @@ Page({
url = '../queryfrei/queryfrei'
}
wx.navigateTo({
url: url,
})
if(app.globalData.token==''){
app.judLogin()
}else{
wx.navigateTo({
url: url,
})
}
},
/**
@ -149,57 +141,21 @@ Page({
*/
onLoad(options) {
if (app.globalData.userInfo == undefined) {
//获取code
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId
request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => {
//记录OpenID
app.globalData.openid = res1.data.openid
this.isBindWx(res1.data.openid)
})
}
})
//检查是否绑定
// 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
success: (res) => {
request.get(`/wx/getOpenid?code=${res.code}`).then(res1 => {
//记录OpenID
app.globalData.openid = res1.data.openid
this.isBindWx(res1.data.openid)
// console.log(res1);
request.post('/sso/checkBind/'+res1.data.openid).then(res2 => {
this.setData({
bindvx:res2.data.data
})
if(res2.data.data && !app.globalData.token){
login.openidLogin()
}
})
})
// 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() {
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');
for(let i = 0; i < codeLength; i++) {
//随机数范围
@ -82,7 +82,6 @@ Page({
this.setData({
code
})
console.log(this.data.code);
},
/**

@ -349,7 +349,7 @@ Page({
// console.log(JSON.stringify(e.detail.value))
this.setData({
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="td1">{{index + 1}}</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:elif="{{item.status == 1}}" class="td">已采样</view>
<view wx:elif="{{item.status == 2}}" class="td">已发货</view>

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

@ -44,8 +44,8 @@
<view class="bush-img">
<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[3]}}" data-id="car_4"></image>
</view>
<view class="bush">
@ -53,10 +53,10 @@
<!-- <button bindtap="boxPhot">拍 照</button> -->
</view>
<view class="bush-img">
<image bindtap="photograph" src="{{poto[1]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[3]}}" data-id="box_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[4]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[5]}}" data-id="box_2"></image>
<image bindtap="photograph" src="{{poto[6]}}" data-id="car_3"></image>
<image bindtap="photograph" src="{{poto[7]}}" data-id="car_4"></image>
</view>
</view>
@ -65,13 +65,16 @@
<label>物流单号:</label>
<input type="text" placeholder="物流单号" disabled="false" placeholder-class="place" value="{{selfOrderCode}}" />
</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>
<input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{ins[index]}}" />
<input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{unitType1}}"/>
</picker>
<view class="from-con">
<label>送检机构</label>
<input type="text" placeholder="送检机构"/>
<input type="text" placeholder="送检机构" placeholder-class="place"/>
</view>
<!-- <picker mode="date" value="date" start="{{start}}" end="{{end}}" bindchange="bindDateChange" class="from-con">
@ -87,12 +90,13 @@
<label>物流费用:</label>
<input type="text" placeholder="物流费用" placeholder-class="place" bindinput="inputTextInfo" data-id="cost" value="{{cost}}" />
</view>
<view class="from-con">
<picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}">
<label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="inputTextInfo" data-id="boxNum" value="{{boxNum}}" />
</view>
<input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}"/>
</picker>
<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" />
</picker>
<view class="from-con">

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

@ -4,20 +4,23 @@ 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);
})
wx.request({
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){
app.globalData.token = res1.data.data.tokenHead + res1.data.data.token;
wx.showToast({
title: '登陆成功'
});
request.get('/sso/info').then(res2 => {
app.globalData.userInfo=res2.data.data
})
}
}
})
})
@ -34,4 +37,45 @@ module.exports = {
bindWechat(params){
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