From 5301986f2fd5ef56b50a166d656c185cf112b2ae Mon Sep 17 00:00:00 2001 From: xuziying <1620990577@qq.com> Date: Sun, 30 Jul 2023 13:29:41 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BC=98=E5=8C=96'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.wxss | 17 -- pages/freiLogistics/freiLogistics.json | 4 - pages/meLogistics/meLogistics.json | 4 - pages/threeLogistics/threeLogistics.json | 4 - yyt-mall-wl/app.js | 7 +- yyt-mall-wl/app.json | 3 +- yyt-mall-wl/pages/about/about.js | 187 ++++++++++++------ yyt-mall-wl/pages/about/about.wxml | 5 +- yyt-mall-wl/pages/about/about.wxss | 8 +- yyt-mall-wl/pages/details/details.js | 2 +- .../pages/freiLogistics/freiLogistics.js | 10 +- .../pages/freiLogistics/freiLogistics.wxml | 14 +- yyt-mall-wl/pages/handover/handover.js | 3 +- yyt-mall-wl/pages/handover/handover.wxml | 4 +- yyt-mall-wl/pages/handover/handover.wxss | 9 +- yyt-mall-wl/pages/index/index.js | 100 +++------- yyt-mall-wl/pages/login/login.js | 3 +- yyt-mall-wl/pages/meLogistics/meLogistics.js | 2 +- .../pages/meLogistics/meLogistics.wxml | 2 +- .../pages/meLogistics/meLogistics.wxss | 6 +- .../pages/queryhandover/queryhandover.js | 157 +++++++++++++++ .../pages/queryhandover/queryhandover.json | 4 + .../pages/queryhandover/queryhandover.wxml | 70 +++++++ .../pages/queryhandover/queryhandover.wxss | 173 ++++++++++++++++ .../pages/threeLogistics/threeLogistics.js | 93 +++++---- .../pages/threeLogistics/threeLogistics.wxml | 30 +-- yyt-mall-wl/project.private.config.json | 31 ++- yyt-mall-wl/utils/login.js | 72 +++++-- 28 files changed, 767 insertions(+), 257 deletions(-) delete mode 100644 app.wxss delete mode 100644 pages/freiLogistics/freiLogistics.json delete mode 100644 pages/meLogistics/meLogistics.json delete mode 100644 pages/threeLogistics/threeLogistics.json create mode 100644 yyt-mall-wl/pages/queryhandover/queryhandover.js create mode 100644 yyt-mall-wl/pages/queryhandover/queryhandover.json create mode 100644 yyt-mall-wl/pages/queryhandover/queryhandover.wxml create mode 100644 yyt-mall-wl/pages/queryhandover/queryhandover.wxss diff --git a/app.wxss b/app.wxss deleted file mode 100644 index a876eb7..0000000 --- a/app.wxss +++ /dev/null @@ -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; -} diff --git a/pages/freiLogistics/freiLogistics.json b/pages/freiLogistics/freiLogistics.json deleted file mode 100644 index 7067bc5..0000000 --- a/pages/freiLogistics/freiLogistics.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "三力货运物流" -} \ No newline at end of file diff --git a/pages/meLogistics/meLogistics.json b/pages/meLogistics/meLogistics.json deleted file mode 100644 index b848ee4..0000000 --- a/pages/meLogistics/meLogistics.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "三力自建物流" -} \ No newline at end of file diff --git a/pages/threeLogistics/threeLogistics.json b/pages/threeLogistics/threeLogistics.json deleted file mode 100644 index 79b2825..0000000 --- a/pages/threeLogistics/threeLogistics.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "三力第三方物流" -} \ No newline at end of file diff --git a/yyt-mall-wl/app.js b/yyt-mall-wl/app.js index 8c77500..1656be5 100644 --- a/yyt-mall-wl/app.js +++ b/yyt-mall-wl/app.js @@ -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('用户点击取消'); + } } }) diff --git a/yyt-mall-wl/app.json b/yyt-mall-wl/app.json index 4f27185..cc0020d 100644 --- a/yyt-mall-wl/app.json +++ b/yyt-mall-wl/app.json @@ -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", diff --git a/yyt-mall-wl/pages/about/about.js b/yyt-mall-wl/pages/about/about.js index 7cf9761..bf45dff 100644 --- a/yyt-mall-wl/pages/about/about.js +++ b/yyt-mall-wl/pages/about/about.js @@ -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 + // }) + + + }, /** diff --git a/yyt-mall-wl/pages/about/about.wxml b/yyt-mall-wl/pages/about/about.wxml index 4a38885..61d678a 100644 --- a/yyt-mall-wl/pages/about/about.wxml +++ b/yyt-mall-wl/pages/about/about.wxml @@ -29,7 +29,7 @@ 绑定微信 - + 样本交接查询 @@ -41,6 +41,7 @@ - 退出登录 + + 退出登录 \ No newline at end of file diff --git a/yyt-mall-wl/pages/about/about.wxss b/yyt-mall-wl/pages/about/about.wxss index 3eb1901..69b535e 100644 --- a/yyt-mall-wl/pages/about/about.wxss +++ b/yyt-mall-wl/pages/about/about.wxss @@ -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; } \ No newline at end of file diff --git a/yyt-mall-wl/pages/details/details.js b/yyt-mall-wl/pages/details/details.js index 1cad8f8..1c5b673 100644 --- a/yyt-mall-wl/pages/details/details.js +++ b/yyt-mall-wl/pages/details/details.js @@ -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, diff --git a/yyt-mall-wl/pages/freiLogistics/freiLogistics.js b/yyt-mall-wl/pages/freiLogistics/freiLogistics.js index ea193a4..8fb8220 100644 --- a/yyt-mall-wl/pages/freiLogistics/freiLogistics.js +++ b/yyt-mall-wl/pages/freiLogistics/freiLogistics.js @@ -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 }) diff --git a/yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml b/yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml index 0026f3c..4a3dcb9 100644 --- a/yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml +++ b/yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml @@ -65,7 +65,7 @@ - + @@ -91,8 +91,8 @@ - - + + @@ -100,10 +100,10 @@ - - - - + + + + diff --git a/yyt-mall-wl/pages/handover/handover.js b/yyt-mall-wl/pages/handover/handover.js index 5e8650f..b063bed 100644 --- a/yyt-mall-wl/pages/handover/handover.js +++ b/yyt-mall-wl/pages/handover/handover.js @@ -135,7 +135,8 @@ Page({ }) } else { this.setData({ - logisticsCodeList: res.data.data + logisticsCodeList: res.data.data, + all:res.data.data.length }) } }) diff --git a/yyt-mall-wl/pages/handover/handover.wxml b/yyt-mall-wl/pages/handover/handover.wxml index cb7a3a1..f8048eb 100644 --- a/yyt-mall-wl/pages/handover/handover.wxml +++ b/yyt-mall-wl/pages/handover/handover.wxml @@ -70,7 +70,7 @@ - 总管数:20管 + 总管数:{{all}}管 @@ -89,7 +89,7 @@ {{index+1}} {{item.barCode}} {{item.institutionName}} - {{item.entryDate}} + {{item.createTime}} {{item.boxNum}} {{item.logisticsMen}} 未采样 diff --git a/yyt-mall-wl/pages/handover/handover.wxss b/yyt-mall-wl/pages/handover/handover.wxss index 2d873a3..b217f54 100644 --- a/yyt-mall-wl/pages/handover/handover.wxss +++ b/yyt-mall-wl/pages/handover/handover.wxss @@ -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; -} \ No newline at end of file +} diff --git a/yyt-mall-wl/pages/index/index.js b/yyt-mall-wl/pages/index/index.js index 4d523f0..4152ebb 100644 --- a/yyt-mall-wl/pages/index/index.js +++ b/yyt-mall-wl/pages/index/index.js @@ -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' - // }) - // } } - }) + }); }, diff --git a/yyt-mall-wl/pages/login/login.js b/yyt-mall-wl/pages/login/login.js index c68015a..9f6e150 100644 --- a/yyt-mall-wl/pages/login/login.js +++ b/yyt-mall-wl/pages/login/login.js @@ -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); }, /** diff --git a/yyt-mall-wl/pages/meLogistics/meLogistics.js b/yyt-mall-wl/pages/meLogistics/meLogistics.js index 042cee4..1069d92 100644 --- a/yyt-mall-wl/pages/meLogistics/meLogistics.js +++ b/yyt-mall-wl/pages/meLogistics/meLogistics.js @@ -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] }) }, diff --git a/yyt-mall-wl/pages/meLogistics/meLogistics.wxml b/yyt-mall-wl/pages/meLogistics/meLogistics.wxml index 9309266..9180a79 100644 --- a/yyt-mall-wl/pages/meLogistics/meLogistics.wxml +++ b/yyt-mall-wl/pages/meLogistics/meLogistics.wxml @@ -25,7 +25,7 @@ {{index + 1}} {{item.barCode}} - {{item.receiveTime}} + {{item.createTime}} 未采样 已采样 已发货 diff --git a/yyt-mall-wl/pages/meLogistics/meLogistics.wxss b/yyt-mall-wl/pages/meLogistics/meLogistics.wxss index 242ae37..3ca6b85 100644 --- a/yyt-mall-wl/pages/meLogistics/meLogistics.wxss +++ b/yyt-mall-wl/pages/meLogistics/meLogistics.wxss @@ -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; diff --git a/yyt-mall-wl/pages/queryhandover/queryhandover.js b/yyt-mall-wl/pages/queryhandover/queryhandover.js new file mode 100644 index 0000000..ae145c1 --- /dev/null +++ b/yyt-mall-wl/pages/queryhandover/queryhandover.js @@ -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() { + + } +}) \ No newline at end of file diff --git a/yyt-mall-wl/pages/queryhandover/queryhandover.json b/yyt-mall-wl/pages/queryhandover/queryhandover.json new file mode 100644 index 0000000..0b18e95 --- /dev/null +++ b/yyt-mall-wl/pages/queryhandover/queryhandover.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "样本交接查询" +} \ No newline at end of file diff --git a/yyt-mall-wl/pages/queryhandover/queryhandover.wxml b/yyt-mall-wl/pages/queryhandover/queryhandover.wxml new file mode 100644 index 0000000..c845c58 --- /dev/null +++ b/yyt-mall-wl/pages/queryhandover/queryhandover.wxml @@ -0,0 +1,70 @@ + + + + 按时间查询 + + {{item.name}} + + + + + + + + + + + + + + + + + + + + + + + + + 筛选 + + + + + + 物流单总数量:0 + 样本总数量:0 + 总费用:¥0 + + + + + + + 物流单号 + 物流类型 + 转运方式 + 样本数量 + 费 用 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yyt-mall-wl/pages/queryhandover/queryhandover.wxss b/yyt-mall-wl/pages/queryhandover/queryhandover.wxss new file mode 100644 index 0000000..ca68e4c --- /dev/null +++ b/yyt-mall-wl/pages/queryhandover/queryhandover.wxss @@ -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; +} \ No newline at end of file diff --git a/yyt-mall-wl/pages/threeLogistics/threeLogistics.js b/yyt-mall-wl/pages/threeLogistics/threeLogistics.js index 3d9f8e1..54017bb 100644 --- a/yyt-mall-wl/pages/threeLogistics/threeLogistics.js +++ b/yyt-mall-wl/pages/threeLogistics/threeLogistics.js @@ -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 + }) + }) + }, /** diff --git a/yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml b/yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml index 7fc3993..b2f0514 100644 --- a/yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml +++ b/yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml @@ -44,8 +44,8 @@ - - + + @@ -53,10 +53,10 @@ - - - - + + + + @@ -65,13 +65,16 @@ - + + - + + + - +