自建物流统计查询.

生成二维码功能.
main
YXQ 1 year ago
parent 1906294411
commit 99620be5f3
  1. 2
      app.js
  2. 53
      pages/about/about.js
  3. 48
      pages/about/about.wxml
  4. 9
      pages/about/about.wxss
  5. 6
      pages/feedback/feedback.js
  6. 8
      pages/index/index.js
  7. 26
      pages/meLogistics/meLogistics.js
  8. 96
      pages/queryme/queryme.js
  9. 92
      pages/queryme/queryme.wxml
  10. 1
      pages/queryme/queryme.wxss
  11. 2
      utils/dateUtils.js

@ -16,7 +16,7 @@ App({
globalData: {
// 本地环境
baseUrl:'http://192.168.51.200:8201/mall-portal',
baseUrl:'http://192.168.51.22:8201/mall-portal',
// 线上环境
// baseUrl:'https://portal-api.macrozheng.com',
token: '',

@ -5,58 +5,63 @@ Page({
* 页面的初始数据
*/
data: {
username:'立即登录'
username: '立即登录'
},
//绑定微信
bindWx(){
bindWx() {
wx.showModal({
title: '绑定微信',
content: '平台账号与微信账号绑定后,可以直接用微信进行登录,是否进行绑定?',
confirmText:'绑定',
confirmText: '绑定',
complete: (res) => {
if (res.confirm) {
wx.login({
success: (res) => {
// console.log(res);
console.log(res);
},
})
}
if (res.cancel) {
}
}
})
},
//自建物流查询
goQueryme(){
wx.navigateTo({
url: '../queryme/queryme',
}
}
})
},
//第三方物流查询
goQuerythree(){
wx.navigateTo({
url: '../querythree/querythree',
})
},
//查询跳转
goSelNav(e) {
var tag = e.currentTarget.dataset.id
var url
//自建物流查询
if (tag == 'goQueryme') {
url = '../queryme/queryme'
}
//第三方物流查询
if (tag == 'goQuerythree') {
url = '../querythree/querythree'
}
//货运物流查询
if (tag == 'goQueryfrei') {
url = '../queryfrei/queryfrei'
}
//货运物流查询
goQueryfrei(){
wx.navigateTo({
url: '../queryfrei/queryfrei',
url: url,
})
},
goFeekback(){
//意见反馈
goFeekback() {
wx.navigateTo({
url: '../feedback/feedback',
})
},
goLogin(){
//登录
goLogin() {
wx.navigateTo({
url: '../login/login',
})

@ -1,9 +1,9 @@
<!--pages/about/about.wxml-->
<view class="box">
<view class="top" >
<view class="top">
<view class="userinfo">
<open-data type="userAvatarUrl"class="userimg" ></open-data>
<open-data type="userAvatarUrl" class="userimg"></open-data>
<!-- <open-data type="userNickName"></open-data> -->
<view class="userNickName" bindtap="goLogin">{{username}}</view>
</view>
@ -11,29 +11,29 @@
<view class="back">
<view class="com">
<view class="con">
<image src="../../images/binding_wx.png" bindtap="bindWx"></image>
<view class="text">绑定微信</view>
</view>
<view class="con" bindtap="goQueryme">
<image src="../../images/统计.png"></image>
<view class="text">自建物流查询</view>
</view>
<view class="con" bindtap="goQuerythree">
<image src="../../images/统计.png"></image>
<view class="text">第三方物流查询</view>
</view>
<view class="con" bindtap="goQueryfrei">
<image src="../../images/统计.png"></image>
<view class="text">货运物流查询</view>
</view>
<view class="con" bindtap="goFeekback">
<image src="../../images/意见反馈.png"></image>
<view class="text">意见反馈</view>
</view>
<view class="con">
<image src="../../images/binding_wx.png" bindtap="bindWx"></image>
<view class="text">绑定微信</view>
</view>
<view class="con" data-id="goQueryme" bindtap="goSelNav">
<image src="../../images/统计.png"></image>
<view class="text">自建物流查询</view>
</view>
<view class="con" data-id="goQuerythree" bindtap="goSelNav">
<image src="../../images/统计.png"></image>
<view class="text">第三方物流查询</view>
</view>
<view class="con" bindtap="goSelNav" data-id="goQueryfrei">
<image src="../../images/统计.png"></image>
<view class="text">货运物流查询</view>
</view>
<view class="con" bindtap="goFeekback">
<image src="../../images/意见反馈.png"></image>
<view class="text">意见反馈</view>
</view>
</view>
</view>
<view class="out" >退出登录</view>
<view class="out">退出登录</view>
</view>
</view>

@ -19,7 +19,7 @@
display: inline-block;
overflow: hidden;
border-radius: 50%;
border: 1rpx solid #eee;
border: 1rpx solid rgb(23, 153, 142);
margin-right: 40rpx;
}
.userNickName{
@ -55,9 +55,8 @@
color: #fff;
font-size: 30rpx;
width: 100%;
height: 80rpx;
border:2rpx #888 solid;
height: 100rpx;
background-color: #ff8c8c;
margin-top: 250rpx;
border-radius: 15rpx;
margin-top: 350rpx;
border-radius: 5rpx;
}

@ -59,7 +59,7 @@ Page({
goMyorder() {
//判断是否选择问题类型
if (this.data.index === 0) {
if (this.data.index == 0) {
wx.showToast({
title: '请选择问题类型',
icon: 'error'
@ -67,7 +67,7 @@ Page({
return;
}
if (this.data.upImageArr.length === 0) {
if (this.data.upImageArr.length == 0) {
wx.showToast({
title: '至少上传一张图片',
icon: 'error'
@ -76,7 +76,7 @@ Page({
}
//当没有描述时,弹框提示,但不是强制性。
if (this.data.problemStr.length === 0) {
if (this.data.problemStr.length == 0) {
wx.showModal({
title: '提示',
content: '如果有问题描述,可以帮助技术人员更快的解决问题,点击取消添加描述',

@ -66,22 +66,22 @@ Page({
var tag = e.currentTarget.dataset.id
var url
//自建物流
if(tag === 'goMelogistics'){
if(tag == 'goMelogistics'){
url = '../meLogistics/meLogistics'
}
//第三方
if(tag === 'goThreelogistics'){
if(tag == 'goThreelogistics'){
url = '../threeLogistics/threeLogistics'
}
//货运
if(tag === 'goLogistics'){
if(tag == 'goLogistics'){
url = '../freiLogistics/freiLogistics'
}
//物流交接
if(tag === 'goHandover'){
if(tag == 'goHandover'){
url = '../handover/handover'
}
wx.navigateTo({

@ -126,10 +126,10 @@ Page({
//物流车、转运箱拍照
photograph(e) {
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_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
//回显所拍摄照片
var _this = this;
@ -305,49 +305,49 @@ Page({
var data_id = e.target.dataset.id; //组件tag
var value = e.detail.value; //输入的文本
//样本编号
if (data_id === 'barCode') {
if (data_id == 'barCode') {
this.setData({
pipenum: value
})
}
//数量
if (data_id === 'number') {
if (data_id == 'number') {
this.setData({
number: value
})
}
//转运箱号
if (data_id === 'boxNum') {
if (data_id == 'boxNum') {
this.setData({
boxNum: value
})
}
//车牌号
if (data_id === 'numberplate') {
if (data_id == 'numberplate') {
this.setData({
numberplate: value
})
}
//物流员
if (data_id === 'logisticsMen') {
if (data_id == 'logisticsMen') {
this.setData({
logisticsMen: value
})
}
//驾驶员
if (data_id === 'driverMen') {
if (data_id == 'driverMen') {
this.setData({
driverMen: value
})
}
//备注
if (data_id === 'notes') {
if (data_id == 'notes') {
this.setData({
notes: value
})
@ -417,7 +417,7 @@ Page({
request.post(`/batch/addTranLogistics`, tempData).then(res => {
console.log(JSON.stringify(res.data));
if (res.data.code === 200) {
if (res.data.code == 200) {
//保存成功后,查询底部列表
this.selSampleList();
} else {
@ -477,7 +477,7 @@ Page({
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流
request.get(`/batch/getBatchsNumber?logisticsWay=1`).then(res => {
console.log('getBatchsNumber=' + JSON.stringify(res.data))
if (res.data.code === 200) {
if (res.data.code == 200) {
this.setData({
selfOrderCode: res.data.data
})

@ -1,4 +1,4 @@
const request = require('../../utils/http')
var app = getApp();
Page({
@ -6,33 +6,82 @@ Page({
* 页面的初始数据
*/
data: {
date: '',
endDate:'',
start:'2020-01-01',
end:'',
array: ['全部','xx卫生院','xx门诊',],
date: '', //开始时间
endDate: '',
start: '2020-01-01',
end: '',
logisticsNo: '', //物流单号
ins: [],
insName: '', //机构名称
insIdx: '', //默认机构所选下标
logisticsMen:'', //物流员
boxNum:'', //转运箱号
sampleList:[], //查询列表
sampleCount:'', //查询记录总数
},
//开始时间
bindDateChange(e){
bindDateChange(e) {
// console.log(e.detail.value)
this.setData({
date:e.detail.value
date: e.detail.value
})
},
//结束时间
bindDateChangeend(e){
bindDateChangeend(e) {
// console.log(e.detail.value)
this.setData({
endDate:e.detail.value
endDate: e.detail.value
})
},
//物流员
bindLogisticsMen(e){
this.setData({
logisticsMen: e.detail.value
})
},
bindPickerChange (e) {
// console.log( e.detail.value)
//转运箱号
bindBoxNum(e){
this.setData({
index: e.detail.value
boxNum: e.detail.value
})
},
//送检机构
bindPickerChange(e) {
console.log('bindPickerChange=' + e.detail.value)
this.setData({
insName: this.data.ins[e.detail.value],
insIdx:e.detail.value
})
},
//获取物流单号
getLogisticsNo(e) {
this.setData({
logisticsNo: e.detail.value
})
},
//查询底部列表数据
selSampleList() {
var reqData = {
'startDate': this.data.date,
'endDate' : this.data.endDate,
'logisticsNo': this.data.logisticsNo,
'institutionNo': this.data.ins[this.data.insIdx],
'logisticsMen':this.data.logisticsMen,
'boxNum':this.data.boxNum
}
request.post(`/logistics/selectTranLogistics`, reqData).then(res => {
console.log(res.data);
this.setData({
sampleList: res.data.data,
sampleCount: res.data.data.length
})
})
},
@ -44,8 +93,25 @@ Page({
let year = now.getFullYear(); //获取当前年
let month = now.getMonth() + 1; //获取当前月份
this.setData({
end: '' + year + '-' + (Array(2).join(0) + month).slice(-2) + '-' + (Array(2).join(0) + now.getDate()).slice(-2),
date: '' + year + '-' + (Array(2).join(0) + month).slice(-2) + '-' + (Array(2).join(0) + now.getDate()).slice(-2),
endDate: '' + year + '-' + (Array(2).join(0) + month).slice(-2) + '-' + (Array(2).join(0) + now.getDate()).slice(-2),
}) //当前的时间
//获取送检机构列表
request.post(`/institution/selectInstitution`).then(res => {
var array = res.data.data
var tempArr = []
for (let index = 0; index < array.length; index++) {
tempArr.push(array[index].orgName)
}
this.setData({
ins: tempArr
})
//查询物流批次列表
// this.selSampleList();
})
},

@ -1,41 +1,40 @@
<view style="background: -webkit-linear-gradient(top,#27adb0,#ebf7f7,#f1f1f1);min-height: 1300rpx;padding: 20rpx;">
<view class="form">
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChange" class="from-con">
<label>选择日期:</label>
<input type="text" disabled="true" placeholder="请选择开始日期" placeholder-class="place" value="{{date}}"/>
</picker>
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChangeend" class="from-con">
<label> </label>
<input type="text" disabled="true" placeholder="请选择结束日期" placeholder-class="place" value="{{endDate}}"/>
</picker>
<view class="from-con">
<label>物流单号:</label>
<input type="text" placeholder="物流单号" placeholder-class="place"/>
</view>
<picker class="from-con" bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
<label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{array[index]}}"/>
</picker>
<view class="from-con">
<label>物流员:</label>
<input type="text" placeholder="物流员" placeholder-class="place"/>
</view>
<view class="from-con">
<label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place"/>
</view>
<view class="from-button">
<button style="background-color: #ddd;">重 置</button>
<button style="background-color: #54b4b6; color: #fff;">查 询</button>
</view>
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChange" class="from-con">
<label>选择日期:</label>
<input type="text" disabled="true" placeholder="请选择开始日期" placeholder-class="place" value="{{date}}" />
</picker>
<picker mode="date" value="date" start="start" end="end" bindchange="bindDateChangeend" class="from-con">
<label> </label>
<input type="text" disabled="true" placeholder="请选择结束日期" placeholder-class="place" value="{{endDate}}" />
</picker>
<view class="from-con">
<label>物流单号:</label>
<input type="text" placeholder="物流单号" placeholder-class="place" bindinput="getLogisticsNo" />
</view>
<picker class="from-con" bindchange="bindPickerChange" value="{{insName}}" range="{{ins}}">
<label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" />
</picker>
<view class="from-con">
<label>物流员:</label>
<input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" />
</view>
<view class="from-con">
<label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="bindBoxNum" value="{{boxNum}}" />
</view>
<view class="from-button">
<button style="background-color: #ddd;">重 置</button>
<button style="background-color: #54b4b6; color: #fff;" bindtap="selSampleList">查 询</button>
</view>
</view>
<view style="background-color: #fff;border-radius: 15rpx;margin-top: 15rpx; padding: 30rpx 10rpx 50rpx 10rpx;">
<scroll-view scroll-x style="width: 100%;">
<view class="tr top" >
<scroll-view scroll-x style="width: 100%;">
<view class="tr top">
<view class="td td1">序号</view>
<view class="td">物流单号</view>
<view class="td">送检机构</view>
@ -43,7 +42,7 @@
<view class="td">样本管数</view>
<view class="td">送检机构</view>
</view>
<view class="tr" >
<view class="tr">
<view class="td td1">1</view>
<view class="td">JD56549856</view>
<view class="td">XX卫生院</view>
@ -51,22 +50,19 @@
<view class="td">10</view>
<view class="td">私家车</view>
</view>
<view class="tr" >
<view class="td td1">2</view>
<view class="td">JD56549856</view>
<view class="td">XX卫生院</view>
<view class="td td2">2023-5-12 14:32</view>
<view class="td">10</view>
<view class="td">私家车</view>
</view>
<block wx:for="{{selSampleList}}" wx:key="idx">
<view class="tr">
<view class="td td1">2</view>
<view class="td">JD56549856</view>
<view class="td">XX卫生院</view>
<view class="td td2">2023-5-12 14:32</view>
<view class="td">10</view>
<view class="td">私家车</view>
</view>
</block>
</scroll-view>
<!-- <view style="text-align: right; font-size: 26rpx;margin-top: 30rpx;padding: 0 20rpx;">共 2 条</view> -->
</view>
</view>
</view>

@ -33,6 +33,7 @@ page{
display: flex;
margin-top: 20rpx;
}
.from-button button{
display: flex;
align-items: center;

@ -3,7 +3,7 @@
//将 "2023年7月5日17时5分" 转换为 "2023-07-05 17:05:00" 格式
const customizeDateFormat = function(dateStr) {
if(dateStr === undefined || dateStr.length == 0){
if(dateStr == undefined || dateStr.length == 0){
return "";
}

Loading…
Cancel
Save