Compare commits

..

No commits in common. 'bce6aa7760477f1cd7e7e63dbf9bdb7fc516667c' and '5301986f2fd5ef56b50a166d656c185cf112b2ae' have entirely different histories.

  1. 3
      yyt-mall-wl/app.js
  2. 120
      yyt-mall-wl/pages/details/details.js
  3. 28
      yyt-mall-wl/pages/details/details.wxml
  4. 4
      yyt-mall-wl/pages/details/details.wxss
  5. 177
      yyt-mall-wl/pages/freiLogistics/freiLogistics.js
  6. 29
      yyt-mall-wl/pages/freiLogistics/freiLogistics.wxml
  7. 124
      yyt-mall-wl/pages/handover/handover.js
  8. 30
      yyt-mall-wl/pages/handover/handover.wxml
  9. 5
      yyt-mall-wl/pages/handover/handover.wxss
  10. 1
      yyt-mall-wl/pages/login/login.js
  11. 174
      yyt-mall-wl/pages/meLogistics/meLogistics.js
  12. 47
      yyt-mall-wl/pages/meLogistics/meLogistics.wxml
  13. 13
      yyt-mall-wl/pages/meLogistics/meLogistics.wxss
  14. 101
      yyt-mall-wl/pages/queryfrei/queryfrei.js
  15. 83
      yyt-mall-wl/pages/queryfrei/queryfrei.wxml
  16. 5
      yyt-mall-wl/pages/queryfrei/queryfrei.wxss
  17. 47
      yyt-mall-wl/pages/queryhandover/queryhandover.js
  18. 26
      yyt-mall-wl/pages/queryhandover/queryhandover.wxml
  19. 18
      yyt-mall-wl/pages/queryhandover/queryhandover.wxss
  20. 119
      yyt-mall-wl/pages/queryme/queryme.js
  21. 97
      yyt-mall-wl/pages/queryme/queryme.wxml
  22. 6
      yyt-mall-wl/pages/queryme/queryme.wxss
  23. 113
      yyt-mall-wl/pages/querythree/querythree.js
  24. 38
      yyt-mall-wl/pages/querythree/querythree.wxml
  25. 5
      yyt-mall-wl/pages/querythree/querythree.wxss
  26. 170
      yyt-mall-wl/pages/threeLogistics/threeLogistics.js
  27. 45
      yyt-mall-wl/pages/threeLogistics/threeLogistics.wxml
  28. 6
      yyt-mall-wl/pages/threeLogistics/threeLogistics.wxss
  29. 4
      yyt-mall-wl/utils/dateSetting.js

@ -15,9 +15,8 @@ App({
globalData: { globalData: {
// 本地环境 // 本地环境
// baseUrl: 'http://192.168.51.6:8201/mall-portal', // baseUrl: 'http://192.168.51.6:8201/mall-portal',
// baseUrl:'http://192.168.51.200:8201/mall-portal',
// 线上环境 // 线上环境
baseUrl:'https://api.wx.bjyytsoft.com/api/mall-portal', baseUrl:'http://192.168.51.66:8302/mall-portal',
token: '', token: '',
userInfo: {}, userInfo: {},
bindvx: false, bindvx: false,

@ -1,5 +1,4 @@
// pages/details/details.js // pages/details/details.js
var request=require('../../utils/http')
Page({ Page({
/** /**
@ -18,120 +17,11 @@ Page({
numberplate:'', //物流车号 numberplate:'', //物流车号
logisticsMen:'', //物流员 logisticsMen:'', //物流员
notes:'',//备注 notes:'',//备注
detailId:'',//详情id
},
//获取物流费用
getcost(e){
this.setData({
cost:e.detail.value
})
},
//获取转运箱号
getboxNum(e){
this.setData({
boxNum:e.detail.value
})
},
//获取物流车号
getnumberplate(e){
this.setData({
numberplate:e.detail.value
})
},
//物流员
getlogisticsMen(e){
this.setData({
logisticsMen:e.detail.value
})
},
//备注
getnotes(e){
this.setData({
notes:e.detail.value
})
}, },
goIndex(){ goIndex(){
var params={ wx.switchTab({
"cost":this.data.cost, url: '../index/index',
"boxNum":this.data.boxNum,
"numberplate":this.data.numberplate,
"logisticsMen":this.data.logisticsMen,
"notes":this.data.notes,
"id":this.data.detailId
}
request.post('/batch/editTranLogistics',params).then(res => {
if(res.data.code==200){
console.log(res);
if(res.data.data.logisticsWay == 1){
console.log('自建');
wx.reLaunch({
url:`../meLogistics/meLogistics?id=${res.data.data.logisticsWay}&logno=${res.data.data.logisticsNo}`
})
}else if(res.data.data.logisticsWay == 2){
console.log('第三方');
wx.reLaunch({
url: `../threeLogistics/threeLogistics?id=${res.data.data.logisticsWay}&logno=${res.data.data.logisticsNo}`,
})
}
}
// wx.showModal({
// showCancel:false,
// title: '提示',
// content: '修改成功',
// complete: (res) => {
// if (res.confirm) {
// wx.switchTab({
// url: '../index/index',
// })
// }
// }
// })
})
},
Delete(){
var params={
"id":this.data.detailId
}
request.post(`/batch/deleteTranLogistics/${this.data.detailId}`).then(res=>{
if(res.data.code==200){
console.log(res);
if(res.data.data.logisticsWay == 1){
console.log('自建');
wx.reLaunch({
url:`../meLogistics/meLogistics?id=${res.data.data.logisticsWay}&logno=${res.data.data.logisticsNo}`
})
}else if(res.data.data.logisticsWay == 2){
console.log('第三方');
wx.reLaunch({
url: `../threeLogistics/threeLogistics?id=${res.data.data.logisticsWay}&logno=${res.data.data.logisticsNo}`,
})
}
}
// if(res.data.code==200){
// wx.showModal({
// showCancel:false,
// title: '提示',
// content: '删除成功',
// complete: (res) => {
// if (res.confirm) {
// wx.switchTab({
// url: '../index/index',
// })
// }
// }
// })
// // wx.navigateBack({
// // data:1
// // })
// }
}) })
}, },
@ -152,12 +42,8 @@ Page({
boxNum:item.boxNum, boxNum:item.boxNum,
numberplate:item.numberplate, numberplate:item.numberplate,
logisticsMen:item.logisticsMen, logisticsMen:item.logisticsMen,
notes:item.notes, notes:item.notes
detailId:item.id,
startTime:item.startTime
}) })
}, },
/** /**

@ -3,56 +3,56 @@
<view class="back"> <view class="back">
<view class="cen"> <view class="cen">
<label>样本条码:</label> <label>样本条码:</label>
<input class="dis" type="text" disabled="false" value="{{barCode}}"/> <input type="text" value="{{barCode}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>接收时间:</label> <label>接收时间:</label>
<input class="dis" type="text" disabled="false" value="{{startTime==''?receiveTime:startTime}}"/> <input type="text" value="{{receiveTime}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>样本状态:</label> <label>样本状态:</label>
<input class="dis" type="text" disabled="false" value="{{status==1?'已发货':'已签收'}}"/> <input type="text" value="已签收" disabled="true"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>物流单号:</label> <label>物流单号:</label>
<input class="dis" type="text" disabled="false" value="{{logisticsNo}}"/> <input type="text" value="{{logisticsNo}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>物流单位:</label> <label>物流单位:</label>
<input class="dis" disabled="false" type="text" value="{{unitType==1?'顺丰':'' || unitType==2?'京东':'' || unitType==1?'自建':''}}"/> <input type="text" value="{{unitType}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>创建时间:</label> <label style="letter-spacing: 13rpx;">日 期:</label>
<input class="dis" type="text" disabled="false" value="{{receiveTime}}"/> <input type="text" value="{{entryDate}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>物流费用:</label> <label>物流费用:</label>
<input type="text" bindinput="getcost" value="{{cost}}"/> <input type="text" value="{{cost}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>到达日期:</label> <label>到达日期:</label>
<input class="dis" type="text" disabled="false" value="{{expectedEndTime}}"/> <input type="text" value="{{expectedEndTime}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" bindinput="getboxNum" value="{{boxNum}}"/> <input type="text" value="{{boxNum}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label>物流车号:</label> <label>物流车号:</label>
<input type="text" bindinput="getnumberplate" value="{{numberplate}}"/> <input type="text" value="{{numberplate}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label style="letter-spacing: 6rpx;">物流员:</label> <label style="letter-spacing: 6rpx;">物流员:</label>
<input type="text" bindinput="getlogisticsMen" value="{{logisticsMen}}"/> <input type="text" value="{{logisticsMen}}"/>
</view> </view>
<view class="cen"> <view class="cen">
<label style="letter-spacing: 12rpx;">备 注:</label> <label style="letter-spacing: 12rpx;">备 注:</label>
<input type="text" bindinput="getnotes" value="{{notes}}"/> <input type="text" value="{{notes}}"/>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<button class="btn1" bindtap="Delete">删 除</button> <button class="btn1">删 除</button>
<button class="btn2" bindtap="goIndex">保 存</button> <button class="btn2" bindtap="goIndex">保 存</button>
</view> </view>
</view> </view>

@ -45,7 +45,3 @@
color: #fff; color: #fff;
background-color: #27adb0; background-color: #27adb0;
} }
.dis{
background-color: #ddd !important;
}

@ -2,53 +2,58 @@
var datePicker = require('../../utils/dateSetting') var datePicker = require('../../utils/dateSetting')
var request = require('../../utils/http') var request = require('../../utils/http')
var dateUtils = require('../../utils/dateUtils') var dateUtils = require('../../utils/dateUtils')
var app=getApp()
Page({ Page({
data: { data: {
boxArr:[],//转运箱列表
// boxId:'',//转运箱id
boxNum: '', //转运箱号
numberplateArr:[],//车辆列表
numberplate:'',//车牌号
vehicleId:'',//车辆id
tranTypeArr:[],//转运方式列表
tranType:'',//转运方式id
tranType1:'',//转运方式
number:'',//数量
date: '',//日期
phone: '', //物流电话
cost: '', //物流费用
time: '',//到达时间
multiArray: [],
multiIndex: [0, 0, 0, 0, 0],
choose_year: "",
logisticsMen: '', //物流员
notes: '', //备注
selfOrderCode: '', //物流单号 selfOrderCode: '', //物流单号
sampleList: [], sampleList: [{
'id': 1,
'number': '2023050002',
'time': '2023-5-12 11:32',
'status': '已签收',
'name': '张三',
'num': 'M2023055568'
}
],
pipenum: '', pipenum: '',
ins: [], //转运方式 ins: [], //转运方式
insIdx: 0, //转运方式下标 insIdx: 0, //转运方式下标
date: '',
start: '2023-07-01', start: '2023-07-01',
end: '', end: '',
potoSrc: '../../images/addPoto.png', //默认图片 potoSrc: '../../images/addPoto.png', //默认图片
poto: [], //车辆&转运箱照片 最大长度 4 poto: [], //车辆&转运箱照片 最大长度 4
time: '',
multiArray: [],
multiIndex: [0, 0, 0, 0, 0],
choose_year: "",
srcArray: [], srcArray: [],
phone: '', //物流电话
boxNum: '', //转运箱号
cost: '', //物流费用
numberplate: '', //车牌号
logisticsMen: '', //物流员
notes: '', //备注
sampleCount: '0', //样本数量 sampleCount: '0', //样本数量
//样本列表
sampleList: [{
'id': 1,
'number': '2023050002',
'time': '2023-5-12 11:32',
'status': '已签收',
'name': '张三',
'num': 'M2023055568'
}],
}, },
scacode() { scacode() {
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
var result=res.result console.log(res.result);
if(result.length>20){
result=result.slice(5);
console.log(result);
}
this.setData({ this.setData({
pipenum:result pipenum: res.result
}) })
} }
}) })
@ -95,11 +100,10 @@ Page({
}) })
}, },
//转运方式 //送检机构
bindPickerChangetranType(e) { bindPickerChange(e) {
this.setData({ this.setData({
tranType:this.data.tranTypeArr[e.detail.value].dictValue, index: e.detail.value
tranType1:this.data.tranTypeArr[e.detail.value].dictLabel,
}) })
}, },
@ -111,23 +115,6 @@ Page({
}) })
}, },
//转运箱
// bindPickerChangeBox(e){
// this.setData({
// boxNum:this.data.boxArr[e.detail.value].boxNum,
// boxId:this.data.boxArr[e.detail.value].id
// })
// },
//车辆下拉选择
bindNumberplate(e) {
// console.log(JSON.stringify(e.detail.value))
this.setData({
numberplate:this.data.numberplateArr[e.detail.value].numberplate,
vehicleId:this.data.numberplateArr[e.detail.value].id,
})
},
//最后呈现时间的函数。 //最后呈现时间的函数。
bindMultiPickerChange: function (e) { bindMultiPickerChange: function (e) {
var dateStr = this.data.multiArray[0][this.data.multiIndex[0]] + var dateStr = this.data.multiArray[0][this.data.multiIndex[0]] +
@ -299,27 +286,25 @@ Page({
var tempData = { var tempData = {
"barCode": temp.pipenum, //样本条码 "barCode": temp.pipenum, //样本条码
"barCodeImg": "", //物流拍照图 "barCodeImg": "", //物流拍照图
"boxId":'',//转运箱id
"boxNum": temp.boxNum, //转运箱号 "boxNum": temp.boxNum, //转运箱号
"carPics": carPoto.toString(), //物流车图片 逗号分隔 "carPics": carPoto.toString(), //物流车图片 逗号分隔
"boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔 "boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔
"cost": temp.cost, // 物流费用 自建没有 "cost": 0, // 物流费用 自建没有
"driverMen": '', //驾驶员 "driverMen": temp.driverMen, //驾驶员
"entryDate": temp.date, // 录入日期 "entryDate": temp.date, // 录入日期
"endDate": '', //startTime "endDate": '', //startTime
"expectedEndTime": endTime, //预计到达时间 endTime "expectedEndTime": endTime, //预计到达时间 endTime
"institutionName":'', //送检机构名称 "institutionName": temp.ins[temp.insIdx].orgName, //送检机构名称
"institutionNo": '', //送检机构编号 "institutionNo": temp.ins[temp.insIdx].id, //送检机构编号
"logisticsMen": temp.logisticsMen, //物流员 "logisticsMen": temp.logisticsMen, //物流员
"logisticsNo": temp.selfOrderCode, //物流编号 "logisticsNo": temp.selfOrderCode, //物流编号
"logisticsWay": 3, //物流方式 1自建 2第三方 3货运 "logisticsWay": 1, //物流方式 1自建 2第三方 3货运
"notes": temp.notes, // 物流备注 "notes": temp.notes, // 物流备注
"number": temp.number, // 数量 "number": temp.number, // 数量
"numberplate": temp.numberplate, // 车牌号 "numberplate": "", // 车牌号
"vehicleId":'',//车辆id "phone": "", //物流电话
"phone": temp.phone, //物流电话
"startTime": '', //出发时间 "startTime": '', //出发时间
"tranType": temp.tranType, //物流方式 "tranType": "1", //物流方式
"unitType": "", //物流单位 1.顺丰 2.京东(自建物流没有该字段) "unitType": "", //物流单位 1.顺丰 2.京东(自建物流没有该字段)
"updateBy": 0, "updateBy": 0,
"updateTime": "" "updateTime": ""
@ -328,10 +313,9 @@ Page({
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));
if (res.data.code == 200) { if (res.data.code == 200) {
this.data.selfOrderCode = res.data.data
//保存成功后,查询底部列表 //保存成功后,查询底部列表
wx.showToast({ this.selSampleList();
title:res.data.message,
})
} else { } else {
wx.showModal({ wx.showModal({
title: '错误', title: '错误',
@ -351,7 +335,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
@ -362,10 +346,9 @@ Page({
//显示必选项为空提示 //显示必选项为空提示
showErrInfo(field, errInfo) { showErrInfo(field, errInfo) {
if (field === undefined || field.length == 0) { if (field === undefined || field.length == 0) {
wx.showModal({ wx.showToast({
showCancel:false, icon: 'error',
title:'提示', title: errInfo,
content:errInfo,
}) })
return true; return true;
} }
@ -389,14 +372,13 @@ Page({
}) })
} }
//转运箱 //转运箱
if (data_id == 'boxNum') { if (data_id == 'boxNum') {
this.setData({ this.setData({
boxNum: value boxNum: value
}) })
} }
//车牌号 //车牌号
if (data_id == 'numberplate') { if (data_id == 'numberplate') {
this.setData({ this.setData({
@ -404,7 +386,6 @@ Page({
}) })
} }
//物流电话
if(data_id == 'phone'){ if(data_id == 'phone'){
this.setData({ this.setData({
phone: value phone: value
@ -425,6 +406,13 @@ Page({
}) })
} }
//驾驶员
if (data_id == 'driverMen') {
this.setData({
driverMen: value
})
}
//备注 //备注
if (data_id == 'notes') { if (data_id == 'notes') {
this.setData({ this.setData({
@ -455,7 +443,7 @@ Page({
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流 //获取物流单号 1.自建物流 2.第三方物流 3.货运物流
request.get(`/batch/getBatchsNumber?logisticsWay=3`).then(res => { request.get(`/batch/getBatchsNumber?logisticsWay=3`).then(res => {
// console.log('getBatchsNumber=' + JSON.stringify(res.data)) console.log('getBatchsNumber=' + JSON.stringify(res.data))
if (res.data.code == 200) { if (res.data.code == 200) {
this.setData({ this.setData({
selfOrderCode: res.data.data selfOrderCode: res.data.data
@ -463,46 +451,25 @@ Page({
} }
}) })
// //获取送检机构列表 //获取送检机构列表
// request.get(`/dict/type/tran_method`).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.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({
poto: tempSrc
})
//转运方式
request.get(`/dict/type/tran_method`).then(res => { request.get(`/dict/type/tran_method`).then(res => {
var array = res.data.data
var tempArr = []
for (let index = 0; index < array.length; index++) {
tempArr.push(array[index].dictLabel)
}
this.setData({ this.setData({
tranTypeArr:res.data.data ins: tempArr
})
}) })
//转运箱 //查询物流批次列表
// request.post(`/box/selectTranBox`).then(res => { this.selSampleList();
// this.setData({ })
// boxArr:res.data.data
// })
// })
//车牌号 //初始化照片按钮
request.post(`/vehicle/selectTranVehicle`).then(res => { 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({
numberplateArr:res.data.data poto: tempSrc
})
}) })
}, },

@ -1,6 +1,6 @@
<view class="box"> <view class="box">
<view class="top"> <view class="top">
<input type="text" bindinput="inputTextInfo" data-id="barCode" value="{{pipenum}}" /> <input type="text" value="{{pipenum}}" />
<view bindtap="scacode"> <view bindtap="scacode">
<image src="../../images/saoma.png" style="width: 70rpx; height: 70rpx;"></image> <image src="../../images/saoma.png" style="width: 70rpx; height: 70rpx;"></image>
</view> </view>
@ -40,26 +40,17 @@
<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="bindPickerChange" value="{{index}}" range="{{ins}}">
<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="{{ins[index]}}" />
</picker> -->
<picker class="from-con" bindchange="bindPickerChangetranType" range-key="dictLabel" value="{{index}}" range="{{tranTypeArr}}">
<label>转运方式:</label>
<input type="text" disabled="true" placeholder="请选择转运方式" placeholder-class="place" value="{{tranType1}}" />
</picker> </picker>
<!-- <picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}">
<label>转运箱号:</label>
<input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}" />
</picker> -->
<view class="from-con"> <view class="from-con">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="inputTextInfo" data-id="boxNum" value="{{boxNum}}" /> <input type="text" placeholder="转运箱号" placeholder-class="place" value="" />
</view> </view>
<view class="from-con"> <view class="from-con">
<label space="nbsp" style="letter-spacing: 14rpx;">数 量:</label> <label>数量:</label>
<input type="number" bindinput="inputTextInfo" data-id="number" placeholder="数量" placeholder-class="place" value="{{number}}" /> <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">
<label style="letter-spacing: 14rpx;">日 期:</label> <label style="letter-spacing: 14rpx;">日 期:</label>
@ -74,20 +65,16 @@
<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><text style="color: red;position: absolute; left:-20rpx;">*</text>预计到达时间:</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>
<!-- <picker class="from-con" bindchange="bindNumberplate" range-key="numberplate" value="{{index}}" range="{{numberplateArr}}">
<label>车 牌 号:</label>
<input type="text" disabled="true" placeholder="请选择车牌号" placeholder-class="place" value="{{numberplate}}" />
</picker> -->
<view class="from-con"> <view class="from-con">
<label>车 号:</label> <label style="letter-spacing: 8rpx;">车牌号:</label>
<input type="text" placeholder="车牌号" placeholder-class="place" bindinput="inputTextInfo" data-id="numberplate" value="{{numberplate}}" /> <input type="text" placeholder="车牌号" placeholder-class="place" bindinput="inputTextInfo" data-id="numberplate" value="{{numberplate}}" />
</view> </view>
<view class="from-con"> <view class="from-con">
<label style="letter-spacing: 8rpx;">物流员:</label> <label style="letter-spacing: 8rpx;">物流员:</label>
<input type="text" bindinput="inputTextInfo" data-id="logisticsMen" placeholder="物流员" placeholder-class="place" value="{{logisticsMen}}" /> <input type="text" bindinput="inputTextInfo" data-id="logisticsMen" placeholder="物流员" placeholder-class="place" value="{{logistician}}" />
</view> </view>
<view class="from-con" style="border-bottom: none;"> <view class="from-con" style="border-bottom: none;">
<label style="letter-spacing: 14rpx;">备 注:</label> <label style="letter-spacing: 14rpx;">备 注:</label>

@ -33,17 +33,6 @@ Page({
], ],
date: '', //开始时间 date: '', //开始时间
endDate: '', endDate: '',
institutionNoArr:[],//送检机构数组
orgName:'',//送检机构名称
institutionNo:'',//送检机构编号
logisticsMen: '', //物流员
statusArr:[],//状态列表
status:[],//状态
statusId:'',//状态id
rangeType:1,//日期类型
logisticsNo:'', //物流单号
// date: '', // date: '',
start: '', start: '',
@ -51,7 +40,7 @@ Page({
logisticsCodeList: [], //物流单列表 logisticsCodeList: [], //物流单列表
sampleList: [], //样本列表 sampleList: [], //样本列表
showDialog: false, //默认不显示物流列表弹窗 showDialog: false, //默认不显示物流列表弹窗
logisticsNo:'', //记录当前物流单号
}, },
//筛选-------------------------- //筛选--------------------------
@ -68,23 +57,17 @@ Page({
for(var i in dateList){ for(var i in dateList){
if(dateList[i].id==id){ if(dateList[i].id==id){
dateList[i].isShow=true dateList[i].isShow=true
this.setData({
rangeType:dateList[i].id
})
}else{ }else{
dateList[i].isShow=false dateList[i].isShow=false
} }
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList
date:'',
endDate:''
}) })
}, },
//筛选确定 //筛选确定
okDate(){ okDate(){
this.selTranLogistics()
this.setData({ this.setData({
screenisshow:false screenisshow:false
}) })
@ -98,7 +81,6 @@ Page({
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList,
rangeType:'',
date: '', date: '',
endDate: '', endDate: '',
}) })
@ -112,103 +94,41 @@ Page({
}) })
}, },
//查询按钮 //刷新按钮
refresh() { refresh() {
this.selTranLogistics() this.selTranLogistics()
}, },
//重置按钮
resetting(){
this.setData({
date: '', //开始时间
endDate: '',
orgName:'',//送检机构名称
institutionNo:'',//送检机构编号
logisticsMen: '', //物流员
status:[],//状态
statusId:'',//状态id
rangeType:'',//日期类型
logisticsNo:'', //物流单号
logisticsCodeList: [], //物流单列表
sampleList: [], //样本列表
})
},
//开始时间 //开始时间
bindDateChange(e) { bindDateChange(e) {
var dateList=this.data.dateList // console.log(e.detail.value)
for(var i in dateList){
dateList[i].isShow=false
}
this.setData({ this.setData({
date: e.detail.value, date: e.detail.value
rangeType:5,
dateList:dateList
}) })
}, },
//结束时间 //结束时间
bindDateChangeend(e) { bindDateChangeend(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
endDate: e.detail.value, endDate: e.detail.value
rangeType:5,
dateList:dateList
}) })
}, },
//送检机构
bindPickerChange(e) {
this.setData({
orgName:this.data.institutionNoArr[e.detail.value].orgName,
institutionNo:this.data.institutionNoArr[e.detail.value].id
})
},
//状态
bindPickerChangeStatus(e){
this.setData({
status:this.data.statusArr[e.detail.value].dictLabel,
statusId:this.data.statusArr[e.detail.value].dictValue
})
},
//物流员
bindLogisticsMen(e) {
this.setData({
logisticsMen: e.detail.value
})
},
//物流单号
getLogisticsNo(e){
this.setData({
logisticsNo:e.detail.value
})
},
//查询物流单列表 //查询物流单列表
selTranLogistics() { selTranLogistics() {
var reqData = { var reqData = {
"logisticsNo":this.data.logisticsNo,//单号 startTime: this.data.date,
"institutionNo":this.data.institutionNo, //机构, pageNum: 1,
"createName":this.data.logisticsMen, //物流员, pageSize: 100
"status":this.data.statusId, //状态,
"startDate":this.data.date, //区间开始时间,
"endDate":this.data.endDate ,//区间结束时间,
"rangeType":this.data.rangeType, //日期类型(1.一个月 2.三个月 3.半年 4.一年 5.日期区间)
} }
request.post(`/batch/selectTranLogistics?pageNum=1&pageSize=9999`,reqData).then(res => { request.post(`/batch/selectTranLogistics`, reqData).then(res => {
if (res.data.data.length == 0) { if (res.data.data.length == 0) {
this.setData({ this.setData({
logisticsCodeList: [], logisticsCodeList: [],
sampleList:[] sampleList:[]
}) })
wx.showToast({ wx.showToast({
title: '无数据', title: '无数据',
icon: 'error' icon: 'error'
@ -240,7 +160,6 @@ Page({
this.drawQrImg(e.target.dataset.id) this.drawQrImg(e.target.dataset.id)
}, },
//生成二维码
drawQrImg(text) { drawQrImg(text) {
var _this = this; var _this = this;
const query = wx.createSelectorQuery() const query = wx.createSelectorQuery()
@ -317,27 +236,6 @@ Page({
// date: tempDate // date: tempDate
// }) // })
this.selTranLogistics() this.selTranLogistics()
//获取送检机构列表
request.post(`/institution/selectInstitution`).then(res => {
this.setData({
institutionNoArr: res.data.data
})
}),
//获取状态字典
request.get('/dict/type/tran_status').then(res => {
var statusArr=res.data.data
for(var i in statusArr){
if(statusArr[i].dictValue==3){
statusArr.splice(i,1)
}
}
this.setData({
statusArr:statusArr
})
})
}, },
/** /**

@ -22,7 +22,7 @@
</view> </view>
</view> </view>
<!-- <view class="top">物流单号M2023020200012已签收。签收时间:2023年6月14日 14:36</view> --> <view class="top">物流单号M2023020200012已签收。签收时间:2023年6月14日 14:36</view>
<view class="box"> <view class="box">
<view class="screen"> <view class="screen">
@ -40,22 +40,18 @@
</view> --> </view> -->
<view class="form"> <view class="form">
<picker class="from-con" bindchange="bindPickerChange" range-key="orgName" value="{{index}}" range="{{institutionNoArr}}"> <view class="from-con">
<label>送检机构:</label> <label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{orgName}}" /> <input type="text" placeholder="送检机构" placeholder-class="place"/>
</picker> </view>
<view class="from-con"> <view class="from-con">
<label style="letter-spacing: 8rpx;">物流员:</label> <label style="letter-spacing: 8rpx;">物流员:</label>
<input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" /> <input type="text" placeholder="物流员" placeholder-class="place" />
</view> </view>
<view class="from-con">
<picker class="from-con" bindchange="bindPickerChangeStatus" range-key="dictLabel" value="{{index}}" range="{{statusArr}}">
<label style="letter-spacing: 14rpx;">状 态:</label> <label style="letter-spacing: 14rpx;">状 态:</label>
<input type="text" disabled="true" placeholder="请选择状态" placeholder-class="place" value="{{status}}" /> <input type="text" placeholder="状态" placeholder-class="place" />
</picker> </view>
<view class="from-button" style="margin-top: 50rpx;"> <view class="from-button" style="margin-top: 50rpx;">
<button style="height: 65rpx;background-color: #eeeaea; border: 1rpx #f0eeee solid; border-radius: 50rpx;" bindtap="resetting">重 置</button> <button style="height: 65rpx;background-color: #eeeaea; border: 1rpx #f0eeee solid; border-radius: 50rpx;" bindtap="resetting">重 置</button>
<button style="height: 65rpx;background-color: #63bec0; color: #fff; border-radius: 50rpx; border: 1rpx #f0eeee solid;" bindtap="refresh">查 询</button> <button style="height: 65rpx;background-color: #63bec0; color: #fff; border-radius: 50rpx; border: 1rpx #f0eeee solid;" bindtap="refresh">查 询</button>
@ -74,16 +70,16 @@
</view> </view>
</scroll-view> </scroll-view>
<view style="margin-top: 40rpx;text-align: right;">总单数:{{all}}单</view> <view style="margin-top: 40rpx;text-align: right;">总管数:{{all}}管</view>
</view> </view>
<view class="back" style="padding: 50rpx 20rpx 100rpx 20rpx;box-shadow: 0 0 10px #ddd;"> <view class="back" style="padding: 20rpx;box-shadow: 0 0 10px #ddd;">
<scroll-view scroll-x scroll-y style="width: 100%; height: 400rpx; border: 1rpx #ddd solid;"> <scroll-view scroll-x style="width: 100%; height: 400rpx;">
<view class="tr top1"> <view class="tr top1">
<view class="td td1">序号</view> <view class="td td1">序号</view>
<view class="td">样本号</view> <view class="td">样本号</view>
<view class="td">送检机构</view> <view class="td">送检机构</view>
<view class="td" style="width: 400rpx !important;">日期</view> <view class="td td2">日期</view>
<view class="td">转运箱号</view> <view class="td">转运箱号</view>
<view class="td">交接人</view> <view class="td">交接人</view>
<view class="td">状态</view> <view class="td">状态</view>
@ -93,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">{{item.createTime}}</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>

@ -94,7 +94,6 @@
/* border-right:#ddd solid 1rpx ; /* border-right:#ddd solid 1rpx ;
border-top: #ddd solid 1rpx; */ border-top: #ddd solid 1rpx; */
border-right: 1rpx #ddd solid; border-right: 1rpx #ddd solid;
border-bottom: 1rpx #ddd solid;
padding: 10rpx 0; padding: 10rpx 0;
font-size: 22rpx; font-size: 22rpx;
display: flex; display: flex;
@ -102,8 +101,7 @@
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width:250rpx ; min-width: 200rpx;
overflow: hidden;
} }
.top1 view { .top1 view {
@ -115,6 +113,7 @@
min-width: 100rpx !important; min-width: 100rpx !important;
} }
.zan-dialog__mask { .zan-dialog__mask {
position: fixed; position: fixed;
top: 0; top: 0;

@ -46,6 +46,7 @@ Page({
}) })
}else{ }else{
request.post(`/sso/login?username=${this.data.username}&password=${this.data.userpwd}`).then(res => { request.post(`/sso/login?username=${this.data.username}&password=${this.data.userpwd}`).then(res => {
console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
app.globalData.token = res.data.data.tokenHead + res.data.data.token; app.globalData.token = res.data.data.tokenHead + res.data.data.token;
request.get('/sso/info').then(res2 => { request.get('/sso/info').then(res2 => {

@ -3,44 +3,45 @@
var datePicker = require('../../utils/dateSetting') var datePicker = require('../../utils/dateSetting')
var request = require('../../utils/http') var request = require('../../utils/http')
var dateUtils = require('../../utils/dateUtils') var dateUtils = require('../../utils/dateUtils')
var app=getApp()
//设定当前的时间,将其设定为常量 //设定当前的时间,将其设定为常量
Page({ Page({
data: { data: {
logno:'', pipenum: '',
boxArr:[],//转运箱列表
boxId:'',//转运箱id
boxNum: '', //转运箱号
numberplateArr:[],//车辆列表
numberplate:'',//车牌号
vehicleId:'',//车辆id
driverMen: '', //驾驶员
selfOrderCode: '', //物流单号 selfOrderCode: '', //物流单号
number: '', //数量 ins: [], //送检机构 服务端获取
insName: '', //机构列表名称
insIdx: 0, //当前所选机构下标
bushList: ['自建物流'], //运输方式 服务端获取 bushList: ['自建物流'], //运输方式 服务端获取
bush: '0', //运输方式下标
date: '', //当天日期
start: '2020-01-01',
end: '',
boxNum: '', //转运箱号
boxList: [], //查询回来的转运箱列表
boxIdx: '', //选择的下标
time: '', //出发时间 time: '', //出发时间
multiArray: [], multiArray: [],
multiIndex: [0, 0, 0, 0, 0], multiIndex: [0, 0, 0, 0, 0],
choose_year: "", choose_year: "",
time1: '', //到达时间 time1: '', //到达时间
multiArray1: [], multiArray1: [],
multiIndex1: [0, 0, 0, 0, 0], multiIndex1: [0, 0, 0, 0, 0],
choose_year1: "", choose_year1: "",
logisticsMen: '', //物流员
notes: '', //备注
pipenum: '',//样本条码
numberplate: '', //车牌号
numberplateIdx:'', //牌照角标
numberplateArr:[], //牌照号组
numberplateList:[], //车辆集合
ins: [], //送检机构 服务端获取 logisticsMen: '', //物流员
insName: '', //机构列表名称 number: '', //数量
insIdx: 0, //当前所选机构下标 notes: '', //备注
bush: '0', //运输方式下标 driverMen: '', //驾驶员
date: '', //当天日期 // srcArray: [], //样本组?
start: '2020-01-01',
end: '',
srcArray: [], //样本组?
potoSrc: '../../images/addPoto.png', //默认图片 potoSrc: '../../images/addPoto.png', //默认图片
poto: [], //车辆&转运箱照片&样本 最大长度 12 poto: [], //车辆&转运箱照片&样本 最大长度 12
tableArr: [], //扫码表数据 tableArr: [], //扫码表数据
@ -49,18 +50,12 @@ Page({
sampleList: [], sampleList: [],
}, },
//调用摄像头扫描样本码 //调用摄像头扫描样本码
scacode() { scacode() {
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
var result=res.result
if(result.length>20){
result=result.slice(5);
console.log(result);
}
this.setData({ this.setData({
pipenum:result pipenum: res.result
}) })
} }
}) })
@ -288,20 +283,11 @@ Page({
goDetail(e) { goDetail(e) {
console.log('goDetail=' + e.currentTarget.dataset.id); console.log('goDetail=' + e.currentTarget.dataset.id);
var sample = this.data.sampleList[e.currentTarget.dataset.id] var sample = this.data.sampleList[e.currentTarget.dataset.id]
console.log('==========',sample);
wx.navigateTo({ wx.navigateTo({
url: '../details/details?sample=' + JSON.stringify(sample), url: '../details/details?sample=' + JSON.stringify(sample),
}) })
}, },
//转运箱
bindPickerChangeBox(e){
this.setData({
boxNum:this.data.boxArr[e.detail.value].boxNum,
boxId:this.data.boxArr[e.detail.value].id
})
},
//文本输入信息 //文本输入信息
inputTextInfo(e) { inputTextInfo(e) {
var data_id = e.target.dataset.id; //组件tag var data_id = e.target.dataset.id; //组件tag
@ -320,6 +306,13 @@ Page({
}) })
} }
//转运箱号
if (data_id == 'boxNum') {
this.setData({
boxNum: value
})
}
//物流员 //物流员
if (data_id == 'logisticsMen') { if (data_id == 'logisticsMen') {
this.setData({ this.setData({
@ -342,23 +335,30 @@ Page({
} }
}, },
//转运箱号下拉选择
bindBoxNumber(e) {
// console.log(JSON.stringify(e.detail.value))
this.setData({
boxIdx: e.detail.value,
boxNum: this.data.boxList[e.detail.value]
})
},
//车辆下拉选择 //车辆下拉选择
bindNumberplate(e) { bindNumberplate(e) {
// console.log(JSON.stringify(e.detail.value)) // console.log(JSON.stringify(e.detail.value))
this.setData({ this.setData({
numberplate:this.data.numberplateArr[e.detail.value].numberplate, numberplateIdx: e.detail.value,
vehicleId:this.data.numberplateArr[e.detail.value].id, numberplate: this.data.numberplateArr[e.detail.value]
driverMen:this.data.numberplateArr[e.detail.value].driverMen,
}) })
}, },
//显示必选项为空提示 //显示必选项为空提示
showErrInfo(field, errInfo) { showErrInfo(field, errInfo) {
if (field === undefined || field.length == 0) { if (field === undefined || field.length == 0) {
wx.showModal({ wx.showToast({
showCancel:false, icon: 'error',
title:'提示', title: errInfo,
content:errInfo,
}) })
return true; return true;
} }
@ -373,9 +373,7 @@ Page({
var endTime = dateUtils.customizeDateFormat(temp.time1); var endTime = dateUtils.customizeDateFormat(temp.time1);
if (this.showErrInfo(startTime, '出发时间不可为空')) return if (this.showErrInfo(startTime, '出发时间不可为空')) return
if (this.showErrInfo(endTime, '到达时间不可为空')) return if (this.showErrInfo(endTime, '到过时间不可为空')) return
if (this.showErrInfo(this.data.numberplate, '车牌号不可为空')) return
//处理物流车拍照 //处理物流车拍照
var carPoto = [] var carPoto = []
@ -397,27 +395,25 @@ 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(), // 转运箱图片 逗号分隔
"cost": 0, // 物流费用 自建没有 "cost": 0, // 物流费用 自建没有
"driverMen": temp.driverMen, //驾驶员 "driverMen": temp.driverMen, //驾驶员
"entryDate": temp.date, // 录入日期 "entryDate": temp.date, // 录入日期
"endDate": '', //startTime "endDate": '2023-07-06 14:52:53', //startTime
"expectedEndTime": endTime, //预计到达时间 endTime "expectedEndTime": endTime, //预计到达时间 endTime
"institutionName": '', //送检机构名称 "institutionName": temp.insName, //送检机构名称
"institutionNo": '', //送检机构编号 "institutionNo": temp.ins[temp.insIdx].id, //送检机构编号
"logisticsMen": temp.logisticsMen, //物流员 "logisticsMen": temp.logisticsMen, //物流员
"logisticsNo": temp.selfOrderCode, //物流编号 "logisticsNo": temp.selfOrderCode, //物流编号
"logisticsWay": 1, //物流方式 1自建 2第三方 3货运 "logisticsWay": 1, //物流方式 1自建 2第三方 3货运
"notes": temp.notes, // 物流备注 "notes": temp.notes, // 物流备注
"number": temp.number, // 数量 "number": temp.number, // 数量
"numberplate": temp.numberplate, // 车牌号 "numberplate": temp.numberplate, // 车牌号
"vehicleId":temp.vehicleId,//车辆id
"phone": "", //物流电话 "phone": "", //物流电话
"startTime": startTime, //出发时间 "startTime": startTime, //出发时间
"tranType": "", //物流方式 "tranType": "1", //物流方式
"unitType": "", //物流单位 1.顺丰 2.京东(自建物流没有该字段) "unitType": "", //物流单位 1.顺丰 2.京东(自建物流没有该字段)
"updateBy": 0, "updateBy": 0,
"updateTime": "" "updateTime": ""
@ -426,9 +422,6 @@ Page({
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));
if (res.data.code == 200) { if (res.data.code == 200) {
wx.showToast({
title: res.data.message,
})
//保存成功后,查询底部列表 //保存成功后,查询底部列表
this.selSampleList(); this.selSampleList();
} else { } else {
@ -457,39 +450,10 @@ Page({
}) })
}, },
//退出
out(){
wx.switchTab({
url: '../index/index',
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if(options!==undefined){
console.log(options.logno);
this.setData({
logno:options.logno
})
}
if(this.data.logno===undefined){
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流
request.get(`/batch/getBatchsNumber?logisticsWay=1`).then(res => {
if (res.data.code == 200) {
this.data.selfOrderCode = res.data.data
this.setData({
selfOrderCode: res.data.data
})
this.selSampleList(); //查询物流批次列表
}
})
}
let now = new Date(); //获取时间 let now = new Date(); //获取时间
let year = now.getFullYear(); //获取当前年 let year = now.getFullYear(); //获取当前年
let month = now.getMonth() + 1; //获取当前月份 let month = now.getMonth() + 1; //获取当前月份
@ -513,8 +477,17 @@ Page({
], ],
}), }),
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流
request.get(`/batch/getBatchsNumber?logisticsWay=1`).then(res => {
if (res.data.code == 200) {
this.data.selfOrderCode = res.data.data
this.setData({
selfOrderCode: res.data.data
})
this.selSampleList(); //查询物流批次列表
}
})
//获取送检机构列表 //获取送检机构列表
@ -539,17 +512,28 @@ Page({
poto: tempSrc poto: tempSrc
}) })
//转运箱 //获取转运箱信息
request.post(`/box/selectTranBox`).then(res => { request.post(`/box/selectTranBox`).then(res => {
var array = res.data.data
var tempBoxList = []
for (let index = 0; index < array.length; index++) {
tempBoxList.push(array[index].boxNum)
}
this.setData({ this.setData({
boxArr:res.data.data boxList: tempBoxList
}) })
}) })
//车牌号 //获取车辆信息
request.post(`/vehicle/selectTranVehicle`).then(res => { request.post(`/vehicle/selectTranVehicle`).then(res => {
var array = res.data.data
var tempNumberplatArr = []
for (let index = 0; index < array.length; index++) {
tempNumberplatArr.push(array[index].numberplate)
}
this.setData({ this.setData({
numberplateArr:res.data.data numberplateArr :tempNumberplatArr
}) })
}) })
}, },
@ -565,13 +549,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if(this.data.logno!=undefined){
this.setData({
selfOrderCode:this.data.logno
})
this.selSampleList();
console.log(this.data.logno);
}
}, },
/** /**

@ -1,5 +1,4 @@
<!--pages/meLogistics/meLogistics.wxml 自建物流--> <!--pages/meLogistics/meLogistics.wxml 自建物流-->
<!-- <button bindtap="ceshi">测试</button> -->
<view class="box"> <view class="box">
<view class="top"> <view class="top">
<input type="text" bindinput="inputTextInfo" data-id="barCode" value="{{pipenum}}" /> <input type="text" bindinput="inputTextInfo" data-id="barCode" value="{{pipenum}}" />
@ -75,16 +74,22 @@
</view> </view>
</view> </view>
<!-- <view class="back">
<view class="bush">
<view style="flex: 1;">转运箱拍照</view>
</view>
<view class="bush-img">
<image bindtap="photograph" src="{{poto[2]}}" data-id="box_1"></image>
<image bindtap="photograph" src="{{poto[3]}}" data-id="box_2"></image>
</view>
</view> -->
<view class="form"> <view class="form">
<!-- <picker class="from-con" bindchange="bindPickerChange" value="{{insIdx}}" range="{{ins}}"> <picker class="from-con" bindchange="bindPickerChange" value="{{insIdx}}" range="{{ins}}">
<text>送检机构:</text> <text>送检机构:</text>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" /> <input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" />
</picker> --> </picker>
<!-- <view class="from-con">
<text>送检机构:</text>
<input type="text" placeholder="送检机构" placeholder-class="place" />
</view> -->
<view class="from-con"> <view class="from-con">
<text>物流单号:</text> <text>物流单号:</text>
@ -97,7 +102,7 @@
</picker> --> </picker> -->
<view class="from-con"> <view class="from-con">
<text space="nbsp" style="letter-spacing: 14rpx;">数 量:</text> <text space="nbsp" style="letter-spacing: 14rpx;">数 量:</text>
<input type="number" bindinput="inputTextInfo" data-id="number" placeholder="数量" placeholder-class="place" value="{{number}}" /> <input type="number" bindinput="inputTextInfo" data-id="number" placeholder="数量" placeholder-class="place" />
</view> </view>
<picker class="from-con" bindchange="bindbushChange" range="{{bushList}}"> <picker class="from-con" bindchange="bindbushChange" range="{{bushList}}">
@ -105,11 +110,14 @@
<input type="text" disabled="true" placeholder="请选择运输方式" placeholder-class="place" value="{{bushList[bush]}}" /> <input type="text" disabled="true" placeholder="请选择运输方式" placeholder-class="place" value="{{bushList[bush]}}" />
</picker> </picker>
<picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}"> <!-- <text>转运箱号:</text> -->
<picker class="from-con" bindchange="bindBoxNumber" range="{{boxList}}">
<text>转运箱号:</text> <text>转运箱号:</text>
<input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}" /> <input type="text" disabled="true" placeholder="转运箱号" placeholder-class="place" value="{{boxList[boxIdx]}}" />
</picker> </picker>
<!-- <input type="text" bindinput="inputTextInfo" data-id="boxNum" placeholder="转运箱号" placeholder-class="place" value="" /> -->
<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>*</label>
<text>出发时间:</text> <text>出发时间:</text>
@ -118,24 +126,25 @@
<picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange1" bindcolumnchange="bindMultiPickerColumnChange1" value="{{multiIndex1}}" range="{{multiArray1}}"> <picker class="from-con" mode="multiSelector" bindchange="bindMultiPickerChange1" bindcolumnchange="bindMultiPickerColumnChange1" value="{{multiIndex1}}" range="{{multiArray1}}">
<label>*</label> <label>*</label>
<text>预计到达时间:</text> <text>到达时间:</text>
<input value='{{time1}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" /> <input value='{{time1}}' placeholder='请选择到达时间' placeholder-class="place" disabled="true" />
</picker> </picker>
<picker class="from-con" bindchange="bindNumberplate" range-key="numberplate" value="{{index}}" range="{{numberplateArr}}">
<label>*</label> <!-- 车牌照 -->
<picker class="from-con" bindchange="bindNumberplate" range="{{numberplateArr}}">
<text>车 牌 号:</text> <text>车 牌 号:</text>
<input type="text" disabled="true" placeholder="请选择车牌号" placeholder-class="place" value="{{numberplate}}" /> <input type="text" disabled="true" placeholder="车牌号" placeholder-class="place" value="{{numberplateArr[numberplateIdx]}}" />
</picker> </picker>
<view class="from-con"> <view class="from-con">
<text space="nbsp">驾 驶 员:</text> <text space="nbsp">驾 驶 员:</text>
<input type="text" bindinput="inputTextInfo" data-id="driverMen" placeholder="驾驶员" placeholder-class="place" value="{{driverMen}}" /> <input type="text" bindinput="inputTextInfo" data-id="driverMen" placeholder="驾驶员" placeholder-class="place" value="{{driver}}" />
</view> </view>
<view class="from-con"> <view class="from-con">
<text space="nbsp">物 流 员:</text> <text space="nbsp">物 流 员:</text>
<input type="text" bindinput="inputTextInfo" data-id="logisticsMen" placeholder="物流员" placeholder-class="place" value="{{logisticsMen}}" /> <input type="text" bindinput="inputTextInfo" data-id="logisticsMen" placeholder="物流员" placeholder-class="place" value="{{logistician}}" />
</view> </view>
<view class="from-con"> <view class="from-con">
@ -146,11 +155,7 @@
</view> </view>
<!-- </view> --> <!-- </view> -->
<!-- <view style="display: flex; padding: 50rpx 10rpx;">
<button class="out" bindtap="out">退出</button>
<button class="save" bindtap="saveInfo">保 存</button>
</view> -->
<button class="bottomButton" bindtap="saveInfo">保 存</button> <button class="bottomButton"bindtap="saveInfo">保 存</button>
</view> </view>

@ -205,16 +205,3 @@
padding: 0rpx 2rpx; padding: 0rpx 2rpx;
min-width: 100rpx; min-width: 100rpx;
} }
.out{
background-color: #ddd;
width: 300rpx !important;
border-radius: 50rpx;
border: 1rpx #dad7d7 solid;
}
.save{
background-color: #4eb8b9;
width: 300rpx !important;
color: #fff;
border-radius: 50rpx;
}

@ -29,21 +29,18 @@ Page({
isShow:false, isShow:false,
}, },
], ],
institutionNoArr:[],//送检机构数组
orgName:'',//送检机构名称
institutionNo:'',//送检机构编号
boxNum: '', //转运箱号
logisticsMen: '', //物流员
logisticsNo: '', //物流单号
date: '', //开始时间
endDate: '',//结束时间
timeFarme:'',//时间范围
sampleList: [], //查询列表
date: '', //开始时间
endDate: '',
start: '2023-01-01', start: '2023-01-01',
end: '', end: '',
logisticsNo: '', //物流单号
ins: [],
insName: '', //机构名称
insIdx: '', //默认机构所选下标
logisticsMen: '', //物流员
boxNum: '', //转运箱号
sampleList: [], //查询列表
sampleCount: '', //查询记录总数 sampleCount: '', //查询记录总数
}, },
@ -55,28 +52,23 @@ Page({
}, },
selectDate(e){ selectDate(e){
console.log(e.currentTarget.dataset.id);
var id=e.currentTarget.dataset.id var id=e.currentTarget.dataset.id
var dateList=this.data.dateList var dateList=this.data.dateList
for(var i in dateList){ for(var i in dateList){
if(dateList[i].id==id){ if(dateList[i].id==id){
dateList[i].isShow=true dateList[i].isShow=true
this.setData({
timeFarme:dateList[i].id
})
}else{ }else{
dateList[i].isShow=false dateList[i].isShow=false
} }
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList
date: '',
endDate: '',
}) })
}, },
//筛选确定 //筛选确定
okDate(){ okDate(){
this.selSampleList()
this.setData({ this.setData({
screenisshow:false screenisshow:false
}) })
@ -92,8 +84,6 @@ Page({
dateList:dateList, dateList:dateList,
date: '', date: '',
endDate: '', endDate: '',
timeFarme:'',
sampleList:[]
}) })
}, },
@ -107,28 +97,16 @@ Page({
//开始时间 //开始时间
bindDateChange(e) { bindDateChange(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
date: e.detail.value, date: e.detail.value
timeFarme:5,
dateList:dateList
}) })
}, },
//结束时间 //结束时间
bindDateChangeend(e) { bindDateChangeend(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
endDate: e.detail.value, endDate: e.detail.value
timeFarme:5,
dateList:dateList
}) })
}, },
@ -149,8 +127,8 @@ Page({
//送检机构 //送检机构
bindPickerChange(e) { bindPickerChange(e) {
this.setData({ this.setData({
orgName:this.data.institutionNoArr[e.detail.value].orgName, insName: this.data.ins[e.detail.value],
institutionNo:this.data.institutionNoArr[e.detail.value].id insIdx: e.detail.value
}) })
}, },
@ -163,24 +141,17 @@ Page({
//查询底部列表数据 //查询底部列表数据
selSampleList() { selSampleList() {
console.log(this.data.logisticsNo);
var reqData = { var reqData = {
'logisticsWay':"3",//物流方式1自建2第三方3货运 'startDate': this.data.date,
'unitType':'',//物流单位 'endDate': this.data.endDate,
'institutionNo':this.data.institutionNo,//送检机构编号 'logisticsNo': this.data.logisticsNo,
'boxNum': this.data.boxNum, //转运箱号 'institutionNo': this.data.ins[this.data.insIdx],
'boxId':'',//转运箱id 'logisticsMen': this.data.logisticsMen,
'logisticsMen': this.data.logisticsMen, //物流员 'boxNum': this.data.boxNum
'logisticsNo': this.data.logisticsNo, //物流单号
'startDate': this.data.date, //开始时间
'endDate': this.data.endDate,//结束时间
'rangeType':this.data.timeFarme,//时间范围
} }
request.post(`/logistics/selectInfoLogistics?pageNum=1&pageSize=9999`, reqData).then(res => { request.post(`/logistics/selectTranLogistics`, reqData).then(res => {
if(res.data.data.length == 0){ if(res.data.data.length == 0){
this.setData({
sampleList:[]
})
wx.showToast({ wx.showToast({
title: '无查询结果', title: '无查询结果',
icon: 'error' icon: 'error'
@ -190,7 +161,6 @@ Page({
sampleList: res.data.data, sampleList: res.data.data,
sampleCount: res.data.data.length sampleCount: res.data.data.length
}) })
console.log(this.data.sampleList);
} }
}) })
}, },
@ -199,15 +169,10 @@ Page({
resetting() { resetting() {
this.currentTime() this.currentTime()
this.setData({ this.setData({
sampleList:[],//查询结果列表 logisticsNo: '',
orgName:'', insName: '',
institutionNo:'',//送检机构编号 logisticsMen: '',
boxNum: '', //转运箱号 boxNum: ''
logisticsMen: '', //物流员
logisticsNo: '', //物流单号
date: '', //开始时间
endDate: '',//结束时间
timeFarme:'',//时间范围
}) })
}, },
@ -228,13 +193,21 @@ Page({
onLoad(options) { onLoad(options) {
// this.currentTime() // this.currentTime()
//获取送检机构列表 //获取送检机构列表
request.post(`/institution/selectInstitution`).then(res => { 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({ this.setData({
institutionNoArr: res.data.data ins: tempArr
})
}) })
//查询物流批次列表
// this.selSampleList();
})
}, },

@ -33,21 +33,18 @@
</view> </view>
<view class="form"> <view class="form">
<picker class="from-con" bindchange="bindPickerChange" range-key="orgName" value="{{index}}" range="{{institutionNoArr}}"> <picker class="from-con" bindchange="bindPickerChange" value="{{insName}}" range="{{ins}}">
<label>送检机构:</label> <label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{orgName}}" /> <input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" />
</picker> </picker>
<view class="from-con"> <view class="from-con">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="bindBoxNum" value="{{boxNum}}" /> <input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="bindBoxNum" value="{{boxNum}}" />
</view> </view>
<view class="from-con"> <view class="from-con">
<label style="letter-spacing: 8rpx;">物流员:</label> <label style="letter-spacing: 8rpx;">物流员:</label>
<input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" /> <input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" />
</view> </view>
<view class="from-button"> <view class="from-button">
<button style="height: 65rpx;background-color: #eeeaea; border: 1rpx #f0eeee solid; border-radius: 50rpx;" bindtap="resetting">重 置</button> <button style="height: 65rpx;background-color: #eeeaea; border: 1rpx #f0eeee solid; border-radius: 50rpx;" bindtap="resetting">重 置</button>
<button style="height: 65rpx;background-color: #63bec0; color: #fff; border-radius: 50rpx; border: 1rpx #f0eeee solid;" bindtap="selSampleList">查 询</button> <button style="height: 65rpx;background-color: #63bec0; color: #fff; border-radius: 50rpx; border: 1rpx #f0eeee solid;" bindtap="selSampleList">查 询</button>
@ -56,36 +53,78 @@
</view> </view>
<view class="tabel"> <view class="tabel">
<scroll-view scroll-x scroll-y style="width: 100%; height: 400rpx; border: 1rpx #ddd solid;"> <scroll-view scroll-x style="width: 100%; height: 400rpx;">
<view class="tr top"> <view class="tr top">
<view class="td td1">序号</view> <view class="td td1">序号</view>
<view class="td">转运方式</view> <view class="td">转运方式</view>
<view class="td">转运箱号</view> <view class="td">转运箱号</view>
<view class="td">数 量</view> <view class="td td_date">数 量</view>
<view class="td td_date">日 期</view> <view class="td">日 期</view>
<view class="td td_date">物流电话</view> <view class="td">物流电话</view>
<view class="td">物流费用</view> <view class="td">物流费用</view>
<view class="td td_time">到达时间</view> <view class="td td_time">到达时间</view>
<view class="td">车牌号</view> <view class="td td_time">车牌号</view>
<view class="td">物流员</view> <view class="td">物流员</view>
<view class="td">备注</view> <view class="td">备注</view>
</view> </view>
<view class="tr" wx:for="{{sampleList}}" wx:key="index"> <block wx:for="{{sampleList}}" wx:key="index">
<view class="td td1"> {{index + 1}}</view> <view class="tr">
<view class="td"> {{item.tranType==1?'私家车':'' || item.tranType==2?'大巴':'' || item.tranType==3?'顺丰':'' || item.tranType==1?'其他':''}}</view> <view class="td td1">{{index + 1}}</view>
<view class="td"> {{item.boxPlateNumber}}</view> <view class="td">{{item.logisticsNo}}</view>
<view class="td"> {{item.number}}</view> <view class="td">{{item.institutionName}}</view>
<view class="td td_date"> {{item.entryDate}}</view> <view class="td td_date">{{item.entryDate}}</view>
<view class="td td_date"> {{item.phone}}</view> <view class="td">{{item.number}}</view>
<view class="td"> {{item.cost}}</view> <block>
<view class="td td_time"> {{item.expectedEndTime}}</view> <view class="td" wx:if="{{item.tranType == 1}}">私家车</view>
<view class="td"> {{item.carPlateNumber}}</view> <view class="td" wx:else>其他</view>
<view class="td"> {{item.logisticsMen}}</view> </block>
<view class="td"> {{item.notes}}</view> <view class="td">{{item.boxNum}}</view>
<view class="td td_time">{{item.startTime}}</view>
<view class="td td_time">{{item.endTime}}</view>
<view class="td">{{itme.numberplate}}</view>
<view class="td">{{itme.notes}}</view>
</view> </view>
</block>
</scroll-view> </scroll-view>
</view> </view>
<!-- <view class="tabel">
<scroll-view scroll-x style="width: 100%; height: 400rpx;">
<view class="tr top">
<view class="td td1">序号</view>
<view class="td">物流单号</view>
<view class="td">送检机构</view>
<view class="td td_date">日期</view>
<view class="td">样本管数</view>
<view class="td">转运方式</view>
<view class="td">转运箱号</view>
<view class="td td_time">出发时间</view>
<view class="td td_time">到达时间</view>
<view class="td">车牌号</view>
<view class="td">备注</view>
</view>
<block wx:for="{{sampleList}}" wx:key="index">
<view class="tr">
<view class="td td1">{{index + 1}}</view>
<view class="td">{{item.logisticsNo}}</view>
<view class="td">{{item.institutionName}}</view>
<view class="td td_date">{{item.entryDate}}</view>
<view class="td">{{item.number}}</view>
<block>
<view class="td" wx:if="{{item.tranType == 1}}">私家车</view>
<view class="td" wx:else>其他</view>
</block>
<view class="td">{{item.boxNum}}</view>
<view class="td td_time">{{item.startTime}}</view>
<view class="td td_time">{{item.endTime}}</view>
<view class="td">{{itme.numberplate}}</view>
<view class="td">{{itme.notes}}</view>
</view>
</block>
</scroll-view>
</view> -->
<button class="out" bindtap="out">退 出</button> <button class="out" bindtap="out">退 出</button>
</view> </view>

@ -51,7 +51,9 @@ page{
.tabel{ .tabel{
background-color: #fff; background-color: #fff;
border-radius: 15rpx;margin-top: 15rpx; border-radius: 15rpx;margin-top: 15rpx;
padding: 50rpx 15rpx 100rpx 15rpx; padding: 30rpx 10rpx 50rpx 10rpx;
padding: 20rpx;
/* border: 1rpx #ebeaea solid; */
box-shadow: 0 0 10px #ddd; box-shadow: 0 0 10px #ddd;
} }
.tr{ .tr{
@ -73,7 +75,6 @@ page{
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width: 150rpx; min-width: 150rpx;
overflow: hidden;
} }
.top view{ .top view{
background-color: #6bc9ca; background-color: #6bc9ca;

@ -1,5 +1,4 @@
// pages/queryhandover/queryhandover.js // pages/queryhandover/queryhandover.js
var request=require('../../utils/http')
Page({ Page({
/** /**
@ -32,9 +31,6 @@ Page({
date: '', //开始时间 date: '', //开始时间
endDate: '', endDate: '',
rangeType :'',//时间类型
listobj:'',
list:''
}, },
//筛选-------------------------- //筛选--------------------------
@ -51,23 +47,17 @@ Page({
for(var i in dateList){ for(var i in dateList){
if(dateList[i].id==id){ if(dateList[i].id==id){
dateList[i].isShow=true dateList[i].isShow=true
this.setData({
rangeType:dateList[i].id
})
}else{ }else{
dateList[i].isShow=false dateList[i].isShow=false
} }
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList
date: '',
endDate: '',
}) })
}, },
//筛选确定 //筛选确定
okDate(){ okDate(){
this.getlist()
this.setData({ this.setData({
screenisshow:false screenisshow:false
}) })
@ -82,10 +72,7 @@ Page({
this.setData({ this.setData({
dateList:dateList, dateList:dateList,
date: '', date: '',
rangeType:'',
endDate: '', endDate: '',
list:'',
listobj:'',
}) })
}, },
//------------------------------- //-------------------------------
@ -93,27 +80,15 @@ Page({
//开始时间 //开始时间
bindDateChange(e) { bindDateChange(e) {
// console.log(e.detail.value) // console.log(e.detail.value)
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
this.setData({ this.setData({
date: e.detail.value, date: e.detail.value
rangeType:5,
dateList:dateList
}) })
}, },
//结束时间 //结束时间
bindDateChangeend(e) { bindDateChangeend(e) {
// console.log(e.detail.value) // console.log(e.detail.value)
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
this.setData({ this.setData({
endDate: e.detail.value, endDate: e.detail.value
rangeType:5,
dateList:dateList
}) })
}, },
@ -124,22 +99,6 @@ Page({
}) })
}, },
getlist(){
var params={
"startDate": this.data.date,
"endDate" :this.data.endDate,
"rangeType":this.data.rangeType
}
request.post('/batch/logisticsHandoverList?pageNum=1&pageSize=9999',params).then(res=>{
this.setData({
listobj:res.data.data,
list:res.data.data.maps
})
// console.log(JSON.stringify(this.data.list));
console.log(this.data.list);
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */

@ -34,30 +34,30 @@
<view class="back"> <view class="back">
<view class="tabtop"> <view class="tabtop">
<text>物流单总数量:{{listobj.logisticsCount}}</text> <text>物流单总数量:0</text>
<text>样本总数量:{{listobj.sampleCount}}</text> <text>样本总数量:0</text>
<text>总费用:{{listobj.costSum}}</text> <text>总费用:¥0</text>
</view> </view>
<view class="tabel"> <view class="tabel">
<scroll-view scroll-x scroll-y style="width: 100%; height: 700rpx;"> <scroll-view scroll-x style="width: 100%; height: 500rpx;">
<view class="tr top"> <view class="tr top">
<!-- <view class="td td_date">日 期</view> --> <!-- <view class="td td_date">日 期</view> -->
<view class="td td3">物流单号</view> <view class="td">物流单号</view>
<view class="td">物流类型</view> <view class="td">物流类型</view>
<view class="td">转运方式</view> <view class="td">转运方式</view>
<view class="td">样本数量</view> <view class="td">样本数量</view>
<view class="td td1">费 用</view> <view class="td td1">费 用</view>
</view> </view>
<block wx:for="{{list}}" wx:key="index"> <block>
<view class="datatop">{{item.date}}</view> <view class="tr">
<view class="tr" wx:for="{{item.logisticsHandoverList}}" wx:for-item='item1' wx:for-index='index' wx:key="index"> <!-- <view class="td td_date">2023-10-05</view> -->
<view class="td td3">{{item1.logisticsNo}}</view> <!-- <view class="td">1234567894</view>
<view class="td">{{item1.logisticsWay==1?'自建物流':'' || item1.logisticsWay==2?'第三方物流':'' || item1.logisticsWay==1?'货运物流':''}}</view> <view class="td">自建物流</view>
<view class="td">陆运</view> <view class="td">车辆</view>
<view class="td">{{item1.childTableCount}}</view> <view class="td">50</view>
<view class="td td1">{{item1.cost}}</view> <view class="td td1">¥100</view> -->
</view> </view>
</block> </block>
</scroll-view> </scroll-view>

@ -108,7 +108,6 @@
margin-top: 10rpx; margin-top: 10rpx;
text-align: center; text-align: center;
box-shadow: 0 0 10px #ddd; box-shadow: 0 0 10px #ddd;
padding-bottom:100rpx;
} }
.tabtop{ .tabtop{
@ -148,20 +147,6 @@
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width: 150rpx; min-width: 150rpx;
overflow: hidden;
}
.datatop{
box-shadow: inset 0 0 8px rgb(180, 178, 178,0.7);
border-right: 1rpx #ddd solid;
border-bottom: 1rpx #ddd solid;
padding: 15rpx 0;
font-size: 24rpx;
background-color: #eee;
color: #666;
font-weight: 700;
width: 110%;
text-align: left;
padding-left:10rpx ;
} }
.top view{ .top view{
background-color: #6bc9ca; background-color: #6bc9ca;
@ -172,9 +157,6 @@
.td1{ .td1{
min-width: 100rpx !important; min-width: 100rpx !important;
} }
.td3{
min-width: 220rpx !important;
}
.td_date{ .td_date{
min-width: 200rpx !important; min-width: 200rpx !important;
} }

@ -29,22 +29,17 @@ Page({
isShow:false, isShow:false,
}, },
], ],
institutionNoArr:[],//送检机构数组
orgName:'',//送检机构名称
institutionNo:'',//送检机构编号
boxArr:[],//转运箱列表
boxId:'',//转运箱id
boxNum: '', //转运箱号
logisticsMen: '', //物流员
logisticsNo: '', //物流单号
date: '', //开始时间 date: '', //开始时间
endDate: '',//结束时间 endDate: '',
timeFarme:'',//时间范围
sampleList: [], //查询列表
start: '2023-01-01', start: '2023-01-01',
end: '', end: '',
logisticsNo: '', //物流单号
ins: [],
insName: '', //机构名称
insIdx: '', //默认机构所选下标
logisticsMen: '', //物流员
boxNum: '', //转运箱号
sampleList: [], //查询列表
sampleCount: '', //查询记录总数 sampleCount: '', //查询记录总数
}, },
@ -56,28 +51,23 @@ Page({
}, },
selectDate(e){ selectDate(e){
console.log(e.currentTarget.dataset.id);
var id=e.currentTarget.dataset.id var id=e.currentTarget.dataset.id
var dateList=this.data.dateList var dateList=this.data.dateList
for(var i in dateList){ for(var i in dateList){
if(dateList[i].id==id){ if(dateList[i].id==id){
dateList[i].isShow=true dateList[i].isShow=true
this.setData({
timeFarme:dateList[i].id
})
}else{ }else{
dateList[i].isShow=false dateList[i].isShow=false
} }
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList
date: '',
endDate: '',
}) })
}, },
//筛选确定 //筛选确定
okDate(){ okDate(){
this.selSampleList()
this.setData({ this.setData({
screenisshow:false screenisshow:false
}) })
@ -93,8 +83,6 @@ Page({
dateList:dateList, dateList:dateList,
date: '', date: '',
endDate: '', endDate: '',
timeFarme:'',
sampleList:[]
}) })
}, },
@ -108,28 +96,16 @@ Page({
//开始时间 //开始时间
bindDateChange(e) { bindDateChange(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
date: e.detail.value, date: e.detail.value
timeFarme:5,
dateList:dateList
}) })
}, },
//结束时间 //结束时间
bindDateChangeend(e) { bindDateChangeend(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
endDate: e.detail.value, endDate: e.detail.value
timeFarme:5,
dateList:dateList
}) })
}, },
@ -140,25 +116,18 @@ Page({
}) })
}, },
// //转运箱号 //转运箱号
// bindBoxNum(e) { bindBoxNum(e) {
// this.setData({
// boxNum: e.detail.value
// })
// },
//转运箱
bindPickerChangeBox(e){
this.setData({ this.setData({
boxNum:this.data.boxArr[e.detail.value].boxNum, boxNum: e.detail.value
boxId:this.data.boxArr[e.detail.value].id
}) })
}, },
//送检机构 //送检机构
bindPickerChange(e) { bindPickerChange(e) {
this.setData({ this.setData({
orgName:this.data.institutionNoArr[e.detail.value].orgName, insName: this.data.ins[e.detail.value],
institutionNo:this.data.institutionNoArr[e.detail.value].id insIdx: e.detail.value
}) })
}, },
@ -171,23 +140,17 @@ Page({
//查询底部列表数据 //查询底部列表数据
selSampleList() { selSampleList() {
var reqData = { var reqData = {
'logisticsWay':"1",//物流方式1自建2第三方3货运 'startDate': this.data.date,
'unitType':'',//物流单位 'endDate': this.data.endDate,
'institutionNo':this.data.institutionNo,//送检机构编号 'logisticsNo': this.data.logisticsNo,
'boxNum': '', //转运箱号 'institutionNo': this.data.ins[this.data.insIdx],
'boxId':this.data.boxId,//转运箱id 'logisticsMen': this.data.logisticsMen,
'logisticsMen': this.data.logisticsMen, //物流员 'boxNum': this.data.boxNum
'logisticsNo': this.data.logisticsNo, //物流单号
'startDate': this.data.date, //开始时间
'endDate': this.data.endDate,//结束时间
'rangeType':this.data.timeFarme,//时间范围
} }
request.post(`/logistics/selectInfoLogistics?pageNum=1&pageSize=9999`, reqData).then(res => { request.post(`/logistics/selectTranLogistics`, reqData).then(res => {
if(res.data.data.length == 0){ if(res.data.data.length == 0){
this.setData({
sampleList:[]
})
wx.showToast({ wx.showToast({
title: '无查询结果', title: '无查询结果',
icon: 'error' icon: 'error'
@ -197,7 +160,6 @@ Page({
sampleList: res.data.data, sampleList: res.data.data,
sampleCount: res.data.data.length sampleCount: res.data.data.length
}) })
console.log(this.data.sampleList);
} }
}) })
}, },
@ -206,16 +168,10 @@ Page({
resetting() { resetting() {
this.currentTime() this.currentTime()
this.setData({ this.setData({
sampleList:[],//查询结果列表 logisticsNo: '',
orgName:'', insName: '',
institutionNo:'',//送检机构编号 logisticsMen: '',
boxNum: '', //转运箱号 boxNum: ''
boxId:'',
logisticsMen: '', //物流员
logisticsNo: '', //物流单号
date: '', //开始时间
endDate: '',//结束时间
timeFarme:'',//时间范围
}) })
}, },
@ -236,17 +192,20 @@ Page({
onLoad(options) { onLoad(options) {
// this.currentTime() // this.currentTime()
//获取送检机构列表 //获取送检机构列表
request.post(`/institution/selectInstitution`).then(res => { 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({ this.setData({
institutionNoArr: res.data.data ins: tempArr
})
})
//转运箱
request.post(`/box/selectTranBox`).then(res => {
this.setData({
boxArr:res.data.data
}) })
//查询物流批次列表
// this.selSampleList();
}) })
}, },

@ -34,22 +34,22 @@
</view> </view>
<view class="form"> <view class="form">
<!-- <picker mode="date" value="date" start="start" end="end" bindchange="bindDateChange" class="from-con">
<picker class="from-con" bindchange="bindPickerChange" range-key="orgName" value="{{index}}" range="{{institutionNoArr}}"> <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> -->
<picker class="from-con" bindchange="bindPickerChange" value="{{insName}}" range="{{ins}}">
<label>送检机构:</label> <label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{orgName}}" /> <input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" />
</picker> </picker>
<view class="from-con">
<!-- <view class="from-con">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="bindBoxNum" value="{{boxNum}}" /> <input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="bindBoxNum" value="{{boxNum}}" />
</view> --> </view>
<picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}">
<label>转运箱号:</label>
<input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}" />
</picker>
<view class="from-con"> <view class="from-con">
<label style="letter-spacing: 8rpx;">物流员:</label> <label style="letter-spacing: 8rpx;">物流员:</label>
<input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" /> <input type="text" placeholder="物流员" placeholder-class="place" bindinput="bindLogisticsMen" value="{{logisticsMen}}" />
@ -63,37 +63,78 @@
</view> </view>
<view class="tabel"> <view class="tabel">
<scroll-view scroll-x scroll-y style="width: 100%; height: 400rpx; border: 1rpx #ddd solid;"> <scroll-view scroll-x style="width: 100%; height: 400rpx;">
<view class="tr top"> <view class="tr top">
<view class="td td1">序 号</view> <view class="td td1">序 号</view>
<view class="td">送检机构</view> <view class="td">送检机构</view>
<view class="td td_date">物流单号</view> <view class="td">物流单号</view>
<view class="td">数 量</view> <view class="td td_date">数 量</view>
<view class="td">运输方式</view> <view class="td td2">运输方式</view>
<view class="td">转运箱号</view> <view class="td">转运箱号</view>
<view class="td td_time">预计出发时间</view> <view class="td td_time">预计出发时间</view>
<view class="td td_time">预计到达时间</view> <view class="td td_time">到达时间</view>
<view class="td">车牌号</view> <view class="td">车牌号</view>
<view class="td">驾驶员</view> <view class="td">驾驶员</view>
<view class="td">物流员</view> <view class="td">物流员</view>
<view class="td" style="border-right: none;">备 注</view> <view class="td" style="border-right: none;">备 注</view>
</view> </view>
<view class="tr" wx:for="{{sampleList}}" wx:key="index">
<block wx:for="{{sampleList}}" wx:key="index">
<view class="tr">
<view class="td td1">{{index + 1}}</view> <view class="td td1">{{index + 1}}</view>
<view class="td"> {{item.institutionName}}</view> <view class="td">{{item.logisticsNo}}</view>
<view class="td td_date">{{item.logisticsNo}}</view> <view class="td">{{item.institutionName}}</view>
<view class="td">{{item.number}}</view> <view class="td td_date">{{item.createTime}}</view>
<view class="td">自建物流</view> <view class="td td2">{{item.number}}</view>
<view class="td">{{item.boxPlateNumber}}</view> <block>
<view class="td" wx:if="{{item.tranType == 1}}">自建物流</view>
<view class="td" wx:else>其他</view>
</block>
<view class="td">{{item.boxNum}}</view>
<view class="td td_time">{{item.startTime}}</view> <view class="td td_time">{{item.startTime}}</view>
<view class="td td_time">{{item.expectedEndTime}}</view> <view class="td td_time">{{item.collTime == '' ? '未核收':item.collTime}}</view>
<view class="td">{{item.carPlateNumber}}</view> <view class="td">{{itme.numberplate}}</view>
<view class="td">{{item.driverMen}}</view> <view class="td">{{itme.notes}}</view>
<view class="td">{{item.logisticsMen}}</view>
<view class="td" style="border-right: none;">{{item.notes}}</view>
</view> </view>
</block>
</scroll-view> </scroll-view>
</view> </view>
<!-- <view class="tabel">
<scroll-view scroll-x style="width: 100%; height: 400rpx;">
<view class="tr top">
<view class="td td1">序号</view>
<view class="td">物流单号</view>
<view class="td">送检机构</view>
<view class="td td_date">创建日期</view>
<view class="td td2">样本管数</view>
<view class="td">转运方式</view>
<view class="td">转运箱号</view>
<view class="td td_time">预计出发时间</view>
<view class="td td_time">到达时间</view>
<view class="td">车牌号</view>
<view class="td" style="border-right: none;">备注</view>
</view>
<block wx:for="{{sampleList}}" wx:key="index">
<view class="tr">
<view class="td td1">{{index + 1}}</view>
<view class="td">{{item.logisticsNo}}</view>
<view class="td">{{item.institutionName}}</view>
<view class="td td_date">{{item.createTime}}</view>
<view class="td td2">{{item.number}}</view>
<block>
<view class="td" wx:if="{{item.tranType == 1}}">自建物流</view>
<view class="td" wx:else>其他</view>
</block>
<view class="td">{{item.boxNum}}</view>
<view class="td td_time">{{item.startTime}}</view>
<view class="td td_time">{{item.collTime == '' ? '未核收':item.collTime}}</view>
<view class="td">{{itme.numberplate}}</view>
<view class="td">{{itme.notes}}</view>
</view>
</block>
</scroll-view>
</view> -->
<button class="out" bindtap="out">退 出</button> <button class="out" bindtap="out">退 出</button>
</view> </view>

@ -51,7 +51,9 @@ page{
.tabel{ .tabel{
background-color: #fff; background-color: #fff;
border-radius: 15rpx;margin-top: 15rpx; border-radius: 15rpx;margin-top: 15rpx;
padding: 50rpx 15rpx 100rpx 15rpx; padding: 30rpx 10rpx 50rpx 10rpx;
padding: 20rpx;
/* border: 1rpx #ebeaea solid; */
box-shadow: 0 0 10px #ddd; box-shadow: 0 0 10px #ddd;
} }
.tr{ .tr{
@ -73,9 +75,9 @@ page{
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width: 200rpx; min-width: 200rpx;
overflow: hidden;
} }
.top view{ .top view{
background-color: #6bc9ca; background-color: #6bc9ca;
color: #fff; color: #fff;

@ -29,24 +29,18 @@ Page({
isShow:false, isShow:false,
}, },
], ],
unitTypeArr:[],//物流单位列表
unitType:'',//物流单位id
unitType1:'',//物流单位
institutionNoArr:[],//送检机构数组
orgName:'',//送检机构名称
institutionNo:'',//送检机构编号
date: '', //开始时间 date: '', //开始时间
endDate: '', endDate: '',
timeFarme:'',//时间范围 start: '2023-01-01',
end: '',
logisticsNo: '', //物流单号 logisticsNo: '', //物流单号
ins: [],
insName: '', //机构名称
insIdx: '', //默认机构所选下标
logisticsMen: '', //物流员 logisticsMen: '', //物流员
boxNum: '', //转运箱号 boxNum: '', //转运箱号
sampleList: [], //查询列表 sampleList: [], //查询列表
start: '2023-01-01',
end: '',
sampleCount: '', //查询记录总数 sampleCount: '', //查询记录总数
}, },
@ -58,28 +52,23 @@ Page({
}, },
selectDate(e){ selectDate(e){
console.log(e.currentTarget.dataset.id);
var id=e.currentTarget.dataset.id var id=e.currentTarget.dataset.id
var dateList=this.data.dateList var dateList=this.data.dateList
for(var i in dateList){ for(var i in dateList){
if(dateList[i].id==id){ if(dateList[i].id==id){
dateList[i].isShow=true dateList[i].isShow=true
this.setData({
timeFarme:dateList[i].id
})
}else{ }else{
dateList[i].isShow=false dateList[i].isShow=false
} }
} }
this.setData({ this.setData({
dateList:dateList, dateList:dateList
date: '',
endDate: '',
}) })
}, },
//筛选确定 //筛选确定
okDate(){ okDate(){
this.selSampleList()
this.setData({ this.setData({
screenisshow:false screenisshow:false
}) })
@ -95,8 +84,6 @@ Page({
dateList:dateList, dateList:dateList,
date: '', date: '',
endDate: '', endDate: '',
timeFarme:'',
sampleList:[]
}) })
}, },
@ -110,36 +97,16 @@ Page({
//开始时间 //开始时间
bindDateChange(e) { bindDateChange(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
date: e.detail.value, date: e.detail.value
timeFarme:5,
dateList:dateList
}) })
}, },
//结束时间 //结束时间
bindDateChangeend(e) { bindDateChangeend(e) {
var dateList=this.data.dateList
for(var i in dateList){
dateList[i].isShow=false
}
// console.log(e.detail.value) // console.log(e.detail.value)
this.setData({ this.setData({
endDate: e.detail.value, endDate: e.detail.value
timeFarme:5,
dateList:dateList
})
},
//物流单位
bindPickerChangeunitType(e) {
this.setData({
unitType1:this.data.unitTypeArr[e.detail.value].dictLabel,
unitType:this.data.unitTypeArr[e.detail.value].dictValue
}) })
}, },
@ -160,8 +127,8 @@ Page({
//送检机构 //送检机构
bindPickerChange(e) { bindPickerChange(e) {
this.setData({ this.setData({
orgName:this.data.institutionNoArr[e.detail.value].orgName, insName: this.data.ins[e.detail.value],
institutionNo:this.data.institutionNoArr[e.detail.value].id insIdx: e.detail.value
}) })
}, },
@ -174,23 +141,17 @@ Page({
//查询底部列表数据 //查询底部列表数据
selSampleList() { selSampleList() {
var reqData = { var reqData = {
'logisticsWay':"2",//物流方式1自建2第三方3货运 'startDate': this.data.date,
'unitType':this.data.unitType,//物流单位 'endDate': this.data.endDate,
'institutionNo':this.data.institutionNo,//送检机构编号 'logisticsNo': this.data.logisticsNo,
'boxNum': this.data.boxNum, //转运箱号 'institutionNo': this.data.ins[this.data.insIdx],
'boxId':'',//转运箱id 'logisticsMen': this.data.logisticsMen,
'logisticsMen': this.data.logisticsMen, //物流员 'boxNum': this.data.boxNum
'logisticsNo': this.data.logisticsNo, //物流单号
'startDate': this.data.date, //开始时间
'endDate': this.data.endDate,//结束时间
'rangeType':this.data.timeFarme,//时间范围
} }
request.post(`/logistics/selectInfoLogistics?pageNum=1&pageSize=9999`, reqData).then(res => { request.post(`/logistics/selectTranLogistics`, reqData).then(res => {
if(res.data.data.length == 0){ if(res.data.data.length == 0){
this.setData({
sampleList:[]
})
wx.showToast({ wx.showToast({
title: '无查询结果', title: '无查询结果',
icon: 'error' icon: 'error'
@ -200,7 +161,6 @@ Page({
sampleList: res.data.data, sampleList: res.data.data,
sampleCount: res.data.data.length sampleCount: res.data.data.length
}) })
console.log(this.data.sampleList);
} }
}) })
}, },
@ -209,17 +169,10 @@ Page({
resetting() { resetting() {
this.currentTime() this.currentTime()
this.setData({ this.setData({
unitType:'',//物流单位id logisticsNo: '',
unitType1:'',//物流单位 insName: '',
orgName:'',//送检机构名称 logisticsMen: '',
institutionNo:'',//送检机构编号 boxNum: ''
date: '', //开始时间
endDate: '',
timeFarme:'',//时间范围
logisticsNo: '', //物流单号
logisticsMen: '', //物流员
boxNum: '', //转运箱号
sampleList: [], //查询列表
}) })
}, },
@ -241,21 +194,19 @@ Page({
// this.currentTime() // this.currentTime()
//获取送检机构列表 //获取送检机构列表
request.post(`/institution/selectInstitution`).then(res => { 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({ this.setData({
institutionNoArr: res.data.data ins: tempArr
})
}) })
//物流单位 //查询物流批次列表
request.get(`/dict/type/unit_type`).then(res => { // this.selSampleList();
this.setData({
unitTypeArr:res.data.data
})
}) })
}, },

@ -35,14 +35,13 @@
<view class="form"> <view class="form">
<picker class="from-con" bindchange="bindPickerChangeunitType" range-key="dictLabel" value="{{index}}" range="{{unitTypeArr}}"> <picker class="from-con">
<label>物流单位:</label> <label>物流单位:</label>
<input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{unitType1}}"/> <input type="text" disabled="true" placeholder="请选择物流单位" placeholder-class="place" value="{{insName}}" />
</picker> </picker>
<picker class="from-con" bindchange="bindPickerChange" value="{{insName}}" range="{{ins}}">
<picker class="from-con" bindchange="bindPickerChange" range-key="orgName" value="{{index}}" range="{{institutionNoArr}}">
<label>送检机构:</label> <label>送检机构:</label>
<input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{orgName}}" /> <input type="text" disabled="true" placeholder="请选择送检机构" placeholder-class="place" value="{{insName}}" />
</picker> </picker>
<view class="from-con"> <view class="from-con">
@ -61,31 +60,32 @@
</view> </view>
<view class="tabel"> <view class="tabel">
<scroll-view scroll-x scroll-y style="width: 100%; height: 400rpx; border: 1rpx solid #ddd;"> <scroll-view scroll-x style="width: 100%; height: 400rpx; ">
<view class="tr top"> <view class="tr top">
<view class="td td1">序 号</view> <view class="td td1">序 号</view>
<view class="td td_time">物流单号</view> <view class="td">物流单号</view>
<view class="td">物流单位</view> <view class="td">物流单位</view>
<view class="td td_date">送检机构</view> <view class="td td_date">送检机构</view>
<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">转运箱号</view>
<view class="td td_time">预计到达时间</view> <view class="td">到达时间</view>
<view class="td">物流员</view> <view class="td">物流员</view>
<view class="td td_time">备注</view> <view class="td">备注</view>
</view> </view>
<view class="tr" wx:for="{{sampleList}}" wx:key="index"> <block wx:for="{{sampleList}}" wx:key="index">
<view class="tr">
<view class="td td1">{{index + 1}}</view> <view class="td td1">{{index + 1}}</view>
<view class="td td_time">{{item.logisticsNo}}</view> <view class="td">{{item.logisticsNo}}</view>
<view class="td">{{item.unitType==1?'顺丰':'' || item.unitType==2?'京东':'' || item.unitType==3?'自建':''}}</view> <view class="td">{{item.institutionName}}</view>
<view class="td td_date">{{item.institutionName}}</view> <view class="td td_date">{{item.entryDate}}</view>
<view class="td td_date">{{item.phone}}</view>
<view class="td">{{item.cost}}</view> <view class="td">{{item.cost}}</view>
<view class="td">{{item.boxPlateNumber}}</view> <block>
<view class="td td_time">{{item.expectedEndTime}}</view> <view class="td" wx:if="{{item.tranType == 1}}">私家车</view>
<view class="td">{{item.logisticsMen}}</view> <view class="td" wx:else>其他</view>
<view class="td td_time">{{item.notes}}</view> </block>
</view> </view>
</block>
</scroll-view> </scroll-view>
</view> </view>

@ -55,7 +55,9 @@ page{
.tabel{ .tabel{
background-color: #fff; background-color: #fff;
border-radius: 15rpx;margin-top: 15rpx; border-radius: 15rpx;margin-top: 15rpx;
padding: 50rpx 15rpx 100rpx 15rpx; padding: 30rpx 10rpx 50rpx 10rpx;
padding: 20rpx;
/* border: 1rpx #ebeaea solid; */
box-shadow: 0 0 10px #ddd; box-shadow: 0 0 10px #ddd;
} }
.tr{ .tr{
@ -77,7 +79,6 @@ page{
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width: 150rpx; min-width: 150rpx;
overflow: hidden;
} }
.top view{ .top view{
background-color: #6bc9ca; background-color: #6bc9ca;

@ -2,37 +2,45 @@
var datePicker = require('../../utils/dateSetting') var datePicker = require('../../utils/dateSetting')
var request = require('../../utils/http') var request = require('../../utils/http')
var dateUtils = require('../../utils/dateUtils') var dateUtils = require('../../utils/dateUtils')
var app=getApp()
Page({ Page({
data: { data: {
logno:'',
boxArr:[],//转运箱列表 boxArr:[],//转运箱列表
// boxId:'',//转运箱id boxId:'',//转运箱id
boxNum: '', //转运箱号 boxNum: '', //转运箱号
unitTypeArr:[],//物流单位列表 unitTypeArr:[],//物流单位列表
unitType:'',//物流单位id unitType:'',//物流单位id
unitType1:'',//物流单位 unitType1:'',//物流单位
selfOrderCode: '', //物流单号 selfOrderCode: '', //物流单号
list: [{
'id': 1,
'number': '2023050002',
'time': '2023-5-12 11:32',
'status': '已签收',
'name': '张三',
'num': 'M2023055568'
}],
pipenum: '',
ins: [],
insIdx: 0, //物流所选下标
date: '',
start: '2023-07-01', // 时间选择器开始时间
end: '', // 时间选择器结束时间
potoSrc: '../../images/addPoto.png', //默认图片
poto: [], //车辆&转运箱照片 最大长度 4
expectedEndTime: '', //预计到达时间 expectedEndTime: '', //预计到达时间
multiArray: [], multiArray: [],
multiIndex: [0, 0, 0, 0, 0], multiIndex: [0, 0, 0, 0, 0],
choose_year: "", choose_year: "",
srcArray: [], srcArray: [],
phone: '', //物流电话 phone: '', //物流电话
cost: '', //物流费用 cost: '', //物流费用
logisticsMen: '', //物流员 logisticsMen: '', //物流员
notes: '', //备注 notes: '', //备注
pipenum: '',
number: '', //数量
list: [],
date: '',
start: '2023-07-01', // 时间选择器开始时间
end: '', // 时间选择器结束时间
potoSrc: '../../images/addPoto.png', //默认图片
poto: [], //车辆&转运箱照片 最大长度 4
sampleCount: '0', //样本数量 sampleCount: '0', //样本数量
//样本列表 //样本列表
sampleList: [], sampleList: [],
@ -69,8 +77,8 @@ Page({
var _this = this; var _this = this;
request.upImgFile(`/feedBack/upload`, imageSrc).then(res => { request.upImgFile(`/feedBack/upload`, imageSrc).then(res => {
var resObj = JSON.parse(res.data) var resObj = JSON.parse(res.data)
// console.log('upImgFile data =' + resObj.data.url); console.log('upImgFile data =' + resObj.data.url);
// console.log('upImgFile res=' + JSON.stringify(res.data)); console.log('upImgFile res=' + JSON.stringify(res.data));
if (resObj.code > 400) { if (resObj.code > 400) {
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
@ -117,13 +125,6 @@ Page({
}) })
} }
//物流单号
if (data_id == 'selfOrderCode') {
this.setData({
selfOrderCode: value
})
}
//物流电话 //物流电话
if (data_id == 'phone') { if (data_id == 'phone') {
this.setData({ this.setData({
@ -145,20 +146,6 @@ Page({
}) })
} }
//数量
if (data_id == 'number') {
this.setData({
number: value
})
}
//转运箱
if (data_id == 'boxNum') {
this.setData({
boxNum: value
})
}
//驾驶员 //驾驶员
if (data_id == 'driverMen') { if (data_id == 'driverMen') {
this.setData({ this.setData({
@ -177,13 +164,9 @@ Page({
scacode() { scacode() {
wx.scanCode({ wx.scanCode({
success: (res) => { success: (res) => {
var result=res.result console.log(res.result);
if(result.length>20){
result=result.slice(5);
console.log(result);
}
this.setData({ this.setData({
pipenum:result pipenum: res.result
}) })
} }
}) })
@ -197,8 +180,8 @@ Page({
maxDuration: 30, maxDuration: 30,
camera: 'back', camera: 'back',
success: res => { success: res => {
// console.log(this.data.srcI) console.log(this.data.srcI)
// console.log(res.tempFiles[0].tempFilePath) console.log(res.tempFiles[0].tempFilePath)
// this.up(); // this.up();
} }
}) })
@ -239,12 +222,12 @@ Page({
}, },
//转运箱 //转运箱
// bindPickerChangeBox(e){ bindPickerChangeBox(e){
// this.setData({ this.setData({
// boxNum:this.data.boxArr[e.detail.value].boxNum, boxNum:this.data.boxArr[e.detail.value].boxNum,
// boxId:this.data.boxArr[e.detail.value].id boxId:this.data.boxArr[e.detail.value].id
// }) })
// }, },
//日期 //日期
bindDateChange(e) { bindDateChange(e) {
@ -300,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.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
@ -309,24 +292,22 @@ Page({
}, },
goDetail(e) { goDetail() {
console.log('goDetail=' + e.currentTarget.dataset.id);
var sample = this.data.sampleList[e.currentTarget.dataset.id]
console.log('==========',sample);
wx.navigateTo({ wx.navigateTo({
url: '../details/details?sample=' + JSON.stringify(sample), url: '../details/details',
}) })
}, },
//保存样本信息 //保存样本信息
saveInfo() { saveInfo() {
var temp = this.data; var temp = this.data;
//处理出发时间
// var startTime = dateUtils.customizeDateFormat(temp.time);
//处理到达时间 //处理到达时间
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
if (this.showErrInfo(this.data.selfOrderCode, '物流单号不可为空')) return
//处理物流车拍照 //处理物流车拍照
var carPoto = [] var carPoto = []
@ -343,14 +324,14 @@ Page({
var tempData = { var tempData = {
"barCode": temp.pipenum, //样本条码 "barCode": temp.pipenum, //样本条码
"barCodeImg": "", //物流拍照图 "barCodeImg": "", //物流拍照图
"boxId":'',//转运箱id "boxId":temp.boxId,//转运箱id
"boxNum": temp.boxNum, //转运箱号 "boxNum": temp.boxNum, //转运箱号
"carPics": carPoto.toString(), //物流车图片 逗号分隔 "carPics": carPoto.toString(), //物流车图片 逗号分隔
"boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔 "boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔
"cost": temp.cost, // 物流费用 "cost": 0, // 物流费用
"driverMen": '', //驾驶员 "driverMen": temp.driverMen, //驾驶员
"entryDate": temp.date, // 录入日期 "entryDate": temp.date, // 录入日期
"endDate": '', //startTime "endDate": '2023-07-06 14:52:53', //startTime
"expectedEndTime": endTime, //预计到达时间 endTime "expectedEndTime": endTime, //预计到达时间 endTime
"institutionName":'',//送检机构名称 "institutionName":'',//送检机构名称
"institutionNo":'', //送检机构编号 "institutionNo":'', //送检机构编号
@ -367,12 +348,12 @@ Page({
"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));
if (res.data.code == 200) { if (res.data.code == 200) {
wx.showToast({ this.data.selfOrderCode = res.data.data
title: res.data.message,
})
//保存成功后,查询底部列表 //保存成功后,查询底部列表
this.selSampleList(); this.selSampleList();
} else { } else {
@ -391,10 +372,9 @@ Page({
//显示必选项为空提示 //显示必选项为空提示
showErrInfo(field, errInfo) { showErrInfo(field, errInfo) {
if (field === undefined || field.length == 0) { if (field === undefined || field.length == 0) {
wx.showModal({ wx.showToast({
showCancel:false, icon: 'error',
title:'提示', title: errInfo,
content:errInfo,
}) })
return true; return true;
} }
@ -404,13 +384,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if(options!==undefined){
console.log(options.logno);
this.setData({
logno:options.logno
})
}
let now = new Date(); //获取时间 let now = new Date(); //获取时间
let year = now.getFullYear(); //获取当前年 let year = now.getFullYear(); //获取当前年
let month = now.getMonth() + 1; //获取当前月份 let month = now.getMonth() + 1; //获取当前月份
@ -429,17 +402,30 @@ Page({
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流 //获取物流单号 1.自建物流 2.第三方物流 3.货运物流
// request.get(`/batch/getBatchsNumber?logisticsWay=2`).then(res => { request.get(`/batch/getBatchsNumber?logisticsWay=2`).then(res => {
// if (res.data.code == 200) { console.log('getBatchsNumber=' + JSON.stringify(res.data))
// this.data.selfOrderCode = res.data.data if (res.data.code == 200) {
// this.setData({ this.setData({
// selfOrderCode: res.data.data selfOrderCode: res.data.data
// }) })
}
})
// this.selSampleList(); //查询物流批次列表 //获取物流机构列表 /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)
// } // }
// 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] 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]
@ -455,11 +441,11 @@ Page({
}) })
//转运箱 //转运箱
// request.post(`/box/selectTranBox`).then(res => { request.post(`/box/selectTranBox`).then(res => {
// this.setData({ this.setData({
// boxArr:res.data.data boxArr:res.data.data
// }) })
// }) })
}, },
@ -474,13 +460,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
if(this.data.logno!=undefined){
this.setData({
selfOrderCode:this.data.logno
})
this.selSampleList();
console.log(this.data.logno);
}
}, },
/** /**

@ -1,6 +1,6 @@
<view class="box"> <view class="box">
<view class="top"> <view class="top">
<input type="text" bindinput="inputTextInfo" data-id="barCode" value="{{pipenum}}" /> <input type="text" value="{{pipenum}}" />
<view bindtap="scacode"> <view bindtap="scacode">
<image src="../../images/saoma.png" style="width: 70rpx; height: 70rpx;"></image> <image src="../../images/saoma.png" style="width: 70rpx; height: 70rpx;"></image>
</view> </view>
@ -24,18 +24,13 @@
<view class="td">物流员</view> <view class="td">物流员</view>
<view class="td">物流单号</view> <view class="td">物流单号</view>
</view> </view>
<view class="tr" wx:for="{{sampleList}}" wx:key="index" data-id="{{index}}" bindtap="goDetail"> <view class="tr" wx:for="{{sampleList}}" wx:key="index" bindtap="goDetail">
<view class="td1">{{index + 1}}</view> <view class="td1" bindtap="goDetail">{{item.id}}</view>
<view class="td">{{item.barCode}}</view> <view class="td">{{item.number}}123</view>
<view class="td">{{item.createTime}}</view> <view class="td">{{item.time}}</view>
<view wx:if="{{item.status == 0}}" class="td">未采样</view> <view class="td">{{item.status}}</view>
<view wx:elif="{{item.status == 1}}" class="td">已采样</view> <view class="td">{{item.name}}</view>
<view wx:elif="{{item.status == 2}}" class="td">已发货</view> <view class="td">{{item.num}}</view>
<view wx:elif="{{item.status == 3}}" class="td">已接收</view>
<view wx:elif="{{item.status == 4}}" class="td">重新采样</view>
<view wx:else class="td">其它</view>
<view class="td">{{item.logisticsMen}}</view>
<view class="td">{{item.logisticsNo}}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -66,19 +61,9 @@
</view> </view>
<view class="form"> <view class="form">
<!-- <view class="from-con"> <view class="from-con">
<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 class="from-con">
<label><text style="color: red;position: absolute; left:-20rpx;">*</text>物流单号:</label>
<input type="text" bindinput="inputTextInfo" data-id="selfOrderCode" placeholder="物流单号" placeholder-class="place" value="{{selfOrderCode}}" />
</view>
<view class="from-con">
<label space="nbsp" style="letter-spacing: 14rpx;">数 量:</label>
<input type="number" bindinput="inputTextInfo" data-id="number" placeholder="数量" placeholder-class="place" value="{{number}}" />
</view> </view>
<picker class="from-con" bindchange="bindPickerChangeunitType" range-key="dictLabel" value="{{index}}" range="{{unitTypeArr}}"> <picker class="from-con" bindchange="bindPickerChangeunitType" range-key="dictLabel" value="{{index}}" range="{{unitTypeArr}}">
@ -87,10 +72,10 @@
</picker> </picker>
<!-- <view class="from-con"> <view class="from-con">
<label>送检机构</label> <label>送检机构</label>
<input type="text" placeholder="送检机构" placeholder-class="place"/> <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">
<label>日期:</label> <label>日期:</label>
@ -105,14 +90,10 @@
<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>
<input type="text" placeholder="转运箱号" placeholder-class="place" bindinput="inputTextInfo" data-id="boxNum" value="{{boxNum}}" />
</view>
<!-- <picker class="from-con" bindchange="bindPickerChangeBox" range-key="boxNum" value="{{index}}" range="{{boxArr}}">
<label>转运箱号:</label> <label>转运箱号:</label>
<input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}"/> <input type="text" disabled="true" placeholder="请选择转运箱号" placeholder-class="place" value="{{boxNum}}"/>
</picker> --> </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><text style="color: red;position: absolute; left:-20rpx;">*</text>预计到达时间:</label> <label><text style="color: red;position: absolute; left:-20rpx;">*</text>预计到达时间:</label>

@ -126,7 +126,7 @@
} }
.tr .td{ .tr .td{
border-right:#ddd solid 1rpx ; border-right:#ddd solid 1rpx ;
border-bottom: #ddd solid 1rpx; border-top: #ddd solid 1rpx;
padding: 15rpx 0; padding: 15rpx 0;
font-size: 22rpx; font-size: 22rpx;
display: flex; display: flex;
@ -134,7 +134,7 @@
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
min-width: 250rpx; min-width: 200rpx;
} }
.tab-top view{ .tab-top view{
background-color: #51bdbe; background-color: #51bdbe;
@ -144,7 +144,7 @@
} }
.td1{ .td1{
border-right:#ddd solid 1rpx ; border-right:#ddd solid 1rpx ;
border-bottom: #ddd solid 1rpx; border-top: #ddd solid 1rpx;
padding: 15rpx 0; padding: 15rpx 0;
font-size: 22rpx; font-size: 22rpx;
display: flex; display: flex;

@ -2,8 +2,8 @@
// 测试 // 测试
const date = new Date(); const date = new Date();
const year = date.getFullYear(); const year = date.getFullYear();
const month = date.getMonth()+1; const month = date.getMonth() + 1;
const day = date.getDay() -1 ; //不知道为什么 + 1 的话,时间不是当前日 const day = date.getDay() + 16; //不知道为什么 + 1 的话,时间不是当前日
const hour = date.getHours(); const hour = date.getHours();
const minute = date.getMinutes(); const minute = date.getMinutes();
//确定月份呈现 //确定月份呈现

Loading…
Cancel
Save