|
|
@ -1,122 +1,187 @@ |
|
|
|
// pages/meLogistics/meLogistics.js
|
|
|
|
// pages/meLogistics/meLogistics.js
|
|
|
|
var datePicker = require('../../utils/dateSetting') |
|
|
|
const datePicker = require('../../utils/dateSetting') |
|
|
|
const http = require('../../utils/http') |
|
|
|
const request = require('../../utils/http') |
|
|
|
|
|
|
|
const dateUtils = require('../../utils/dateUtils') |
|
|
|
|
|
|
|
|
|
|
|
//设定当前的时间,将其设定为常量
|
|
|
|
//设定当前的时间,将其设定为常量
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Page({ |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
list:[ |
|
|
|
pipenum: '', |
|
|
|
{ |
|
|
|
selfOrderCode: '', //物流单号
|
|
|
|
'id':1, |
|
|
|
ins: [], //送检机构 服务端获取
|
|
|
|
'number':'2023050002', |
|
|
|
insName: [], //机构列表名称
|
|
|
|
'time':'2023-5-12 11:32', |
|
|
|
insIdx: 0, //当前所选机构下标
|
|
|
|
'status':'已签收', |
|
|
|
bushList: ['私家车', '大巴', '顺丰', '其他'], //运输方式 服务端获取
|
|
|
|
'name':'张三', |
|
|
|
bush: '', //运输方式下标
|
|
|
|
'num':'M2023055568' |
|
|
|
date: '', //当天日期
|
|
|
|
}, |
|
|
|
start: '2020-01-01', |
|
|
|
{ |
|
|
|
end: '', |
|
|
|
'id':2, |
|
|
|
|
|
|
|
'number':'2023050002', |
|
|
|
boxNum: '', //转运箱号
|
|
|
|
'time':'2023-5-12 11:32', |
|
|
|
|
|
|
|
'status':'已签收', |
|
|
|
time: '', //出发时间
|
|
|
|
'name':'李四', |
|
|
|
|
|
|
|
'num':'M2023055568' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
pipenum:'', |
|
|
|
|
|
|
|
selfOrderCode:'',//物流单号
|
|
|
|
|
|
|
|
ins: ['xx卫生院','xx门诊',], |
|
|
|
|
|
|
|
bushList:['私家车','大巴','顺丰','其他'], |
|
|
|
|
|
|
|
bush:'', |
|
|
|
|
|
|
|
date: '', |
|
|
|
|
|
|
|
start:'2020-01-01', |
|
|
|
|
|
|
|
end:'', |
|
|
|
|
|
|
|
//开始
|
|
|
|
|
|
|
|
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: "", |
|
|
|
|
|
|
|
numberplate: '', //车牌号
|
|
|
|
srcArray:[] |
|
|
|
logisticsMen: '', //物流员
|
|
|
|
|
|
|
|
number: '', //数量
|
|
|
|
|
|
|
|
notes: '', //备注
|
|
|
|
|
|
|
|
driverMen: '', //驾驶员
|
|
|
|
|
|
|
|
srcArray: [], //样本组?
|
|
|
|
|
|
|
|
potoSrc: '../../images/addPoto.png', //默认图片
|
|
|
|
|
|
|
|
poto: [], //车辆&转运箱照片 最大长度 4
|
|
|
|
|
|
|
|
tableArr: [], //扫码表数据
|
|
|
|
|
|
|
|
sampleCount: '0', //样本数量
|
|
|
|
|
|
|
|
//样本列表
|
|
|
|
|
|
|
|
sampleList: [{ |
|
|
|
|
|
|
|
'id': 1, |
|
|
|
|
|
|
|
'number': '2023050002', |
|
|
|
|
|
|
|
'time': '2023-5-12 11:32', |
|
|
|
|
|
|
|
'status': '已签收', |
|
|
|
|
|
|
|
'name': '张三', |
|
|
|
|
|
|
|
'num': 'M2023055568' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
'id': 2, |
|
|
|
|
|
|
|
'number': '2023050002', |
|
|
|
|
|
|
|
'time': '2023-5-12 11:32', |
|
|
|
|
|
|
|
'status': '已签收', |
|
|
|
|
|
|
|
'name': '李四', |
|
|
|
|
|
|
|
'num': 'M2023055568' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
'id': 3, |
|
|
|
|
|
|
|
'number': '2023050002', |
|
|
|
|
|
|
|
'time': '2023-5-12 11:32', |
|
|
|
|
|
|
|
'status': '已签收', |
|
|
|
|
|
|
|
'name': '李四', |
|
|
|
|
|
|
|
'num': 'M2023055568' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
scacode(){ |
|
|
|
//调用摄像头
|
|
|
|
|
|
|
|
scacode() { |
|
|
|
wx.scanCode({ |
|
|
|
wx.scanCode({ |
|
|
|
success:(res)=>{ |
|
|
|
success: (res) => { |
|
|
|
console.log(res.result); |
|
|
|
console.log(res.result); |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
pipenum:res.result |
|
|
|
pipenum: res.result |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//样本拍照
|
|
|
|
//样本拍照
|
|
|
|
phot(){ |
|
|
|
phot() { |
|
|
|
wx.chooseMedia({ |
|
|
|
wx.chooseMedia({ |
|
|
|
count: 1, |
|
|
|
count: 1, |
|
|
|
mediaType: ['image','video'], |
|
|
|
mediaType: ['image', 'video'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
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();
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//上传图片接口地址
|
|
|
|
|
|
|
|
// up(){
|
|
|
|
|
|
|
|
// console.log(this.data.srcI)
|
|
|
|
|
|
|
|
// wx.uploadFile({
|
|
|
|
|
|
|
|
// filePath: this.data.srcI,
|
|
|
|
|
|
|
|
// name: 'file',
|
|
|
|
|
|
|
|
// url: '',
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//物流车拍照
|
|
|
|
//物流车拍照
|
|
|
|
bushPhot(){ |
|
|
|
bushPhot() { |
|
|
|
wx.chooseMedia({ |
|
|
|
wx.chooseMedia({ |
|
|
|
count: 1, |
|
|
|
count: 1, |
|
|
|
mediaType: ['image','video'], |
|
|
|
mediaType: ['image', 'video'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
maxDuration: 30, |
|
|
|
maxDuration: 30, |
|
|
|
camera: 'back', |
|
|
|
camera: 'back', |
|
|
|
success: res=>{ |
|
|
|
success: res => { |
|
|
|
// this.up();
|
|
|
|
// this.up();
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//转运箱拍照
|
|
|
|
//转运箱拍照
|
|
|
|
boxPhot(){ |
|
|
|
boxPhot(e) { |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
wx.chooseMedia({ |
|
|
|
wx.chooseMedia({ |
|
|
|
count: 1, |
|
|
|
count: 1, |
|
|
|
mediaType: ['image','video'], |
|
|
|
mediaType: ['image', 'video'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
sourceType: ['album', 'camera'], |
|
|
|
maxDuration: 30, |
|
|
|
maxDuration: 30, |
|
|
|
camera: 'back', |
|
|
|
camera: 'back', |
|
|
|
success: res=>{ |
|
|
|
success: res => { |
|
|
|
// this.up();
|
|
|
|
// this.up();
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//物流车、转运箱拍照
|
|
|
|
|
|
|
|
photograph(e) { |
|
|
|
|
|
|
|
var potoIdx = 0; |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
|
|
|
|
if (e.target.dataset.id === 'car_1') { |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
|
|
|
|
potoIdx = 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.target.dataset.id === 'car_2') { |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
|
|
|
|
potoIdx = 1 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.target.dataset.id === 'box_1') { |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
|
|
|
|
potoIdx = 2 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (e.target.dataset.id === 'box_2') { |
|
|
|
|
|
|
|
console.log(e.target.dataset.id); |
|
|
|
|
|
|
|
potoIdx = 3 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//回显所拍摄照片
|
|
|
|
|
|
|
|
var _this = this; |
|
|
|
|
|
|
|
wx.chooseMedia({ |
|
|
|
|
|
|
|
count: 1, |
|
|
|
|
|
|
|
mediaType: ['image', 'video'], |
|
|
|
|
|
|
|
sourceType: ['camera'], |
|
|
|
|
|
|
|
sizeType: ['compressed'], |
|
|
|
|
|
|
|
camera: 'back', |
|
|
|
|
|
|
|
success: res => { |
|
|
|
|
|
|
|
console.log(res.tempFiles[0].tempFilePath) |
|
|
|
|
|
|
|
_this.data.poto[potoIdx] = res.tempFiles[0].tempFilePath |
|
|
|
|
|
|
|
_this.setData({ |
|
|
|
|
|
|
|
poto: _this.data.poto |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//显示回调图片
|
|
|
|
|
|
|
|
addCallBackImage(imageSrc) { |
|
|
|
|
|
|
|
var temp = { |
|
|
|
|
|
|
|
isBtn: false, |
|
|
|
|
|
|
|
imgUrl: imageSrc, |
|
|
|
|
|
|
|
text: imageSrc, |
|
|
|
|
|
|
|
func: "delImage" |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
this.data.imageArr.unshift(temp); |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
imageArr: this.data.imageArr |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//送检机构
|
|
|
|
//送检机构
|
|
|
|
bindPickerChange(e) { |
|
|
|
bindPickerChange(e) { |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
index: e.detail.value |
|
|
|
insIdx: e.detail.value, |
|
|
|
|
|
|
|
insName: this.data.ins[e.detail.value] |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -128,10 +193,10 @@ Page({ |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//日期
|
|
|
|
//日期
|
|
|
|
bindDateChange(e){ |
|
|
|
bindDateChange(e) { |
|
|
|
// console.log(e.detail.value)
|
|
|
|
// console.log(e.detail.value)
|
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
date:e.detail.value |
|
|
|
date: e.detail.value |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -143,10 +208,12 @@ Page({ |
|
|
|
this.data.multiArray[2][this.data.multiIndex[2]] + |
|
|
|
this.data.multiArray[2][this.data.multiIndex[2]] + |
|
|
|
this.data.multiArray[3][this.data.multiIndex[3]] + |
|
|
|
this.data.multiArray[3][this.data.multiIndex[3]] + |
|
|
|
this.data.multiArray[4][this.data.multiIndex[4]]; |
|
|
|
this.data.multiArray[4][this.data.multiIndex[4]]; |
|
|
|
|
|
|
|
|
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
time: dateStr |
|
|
|
time: dateStr |
|
|
|
}) |
|
|
|
}) |
|
|
|
},//开始
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
bindMultiPickerChange1: function (e) { |
|
|
|
bindMultiPickerChange1: function (e) { |
|
|
|
var dateStr = this.data.multiArray1[0][this.data.multiIndex1[0]] + |
|
|
|
var dateStr = this.data.multiArray1[0][this.data.multiIndex1[0]] + |
|
|
|
this.data.multiArray1[1][this.data.multiIndex1[1]] + |
|
|
|
this.data.multiArray1[1][this.data.multiIndex1[1]] + |
|
|
@ -156,7 +223,7 @@ Page({ |
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
time1: dateStr |
|
|
|
time1: dateStr |
|
|
|
}) |
|
|
|
}) |
|
|
|
},//结束
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//当时间选择器呈现并进行滚动选择时间时调用该函数。开始
|
|
|
|
//当时间选择器呈现并进行滚动选择时间时调用该函数。开始
|
|
|
|
bindMultiPickerColumnChange: function (e) { |
|
|
|
bindMultiPickerColumnChange: function (e) { |
|
|
@ -214,10 +281,146 @@ Page({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//样本详细信息
|
|
|
|
goDetail(){ |
|
|
|
goDetail(e) { |
|
|
|
|
|
|
|
console.log('goDetail=' + e.currentTarget.dataset.id); |
|
|
|
|
|
|
|
var sample = this.data.sampleList[e.currentTarget.dataset.id] |
|
|
|
wx.navigateTo({ |
|
|
|
wx.navigateTo({ |
|
|
|
url: '../details/details', |
|
|
|
url: '../details/details?sample=' + JSON.stringify(sample), |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//文本输入信息
|
|
|
|
|
|
|
|
inputTextInfo(e) { |
|
|
|
|
|
|
|
var data_id = e.target.dataset.id; //组件tag
|
|
|
|
|
|
|
|
var value = e.detail.value; //输入的文本
|
|
|
|
|
|
|
|
//样本编号
|
|
|
|
|
|
|
|
if (data_id === 'barCode') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
pipenum: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//数量
|
|
|
|
|
|
|
|
if (data_id === 'number') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
number: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//转运箱号
|
|
|
|
|
|
|
|
if (data_id === 'boxNum') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
boxNum: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//车牌号
|
|
|
|
|
|
|
|
if (data_id === 'numberplate') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
numberplate: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//物流员
|
|
|
|
|
|
|
|
if (data_id === 'logisticsMen') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
logisticsMen: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//驾驶员
|
|
|
|
|
|
|
|
if (data_id === 'driverMen') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
driverMen: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//备注
|
|
|
|
|
|
|
|
if (data_id === 'notes') { |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
notes: value |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存样本信息
|
|
|
|
|
|
|
|
saveInfo() { |
|
|
|
|
|
|
|
var temp = this.data; |
|
|
|
|
|
|
|
//处理出发时间
|
|
|
|
|
|
|
|
var startTime = dateUtils.customizeDateFormat(temp.time); |
|
|
|
|
|
|
|
//处理到达时间
|
|
|
|
|
|
|
|
var endTime = dateUtils.customizeDateFormat(temp.time1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//处理物流车拍照
|
|
|
|
|
|
|
|
var carPoto = [] |
|
|
|
|
|
|
|
var boxPoto = [] |
|
|
|
|
|
|
|
var array = this.data.poto; |
|
|
|
|
|
|
|
for (let index = 0; index < array.length; index++) { |
|
|
|
|
|
|
|
if (index < 2 && array[index] != this.data.potoSrc) { |
|
|
|
|
|
|
|
carPoto.push(array[index]) |
|
|
|
|
|
|
|
} else if (array[index] != this.data.potoSrc) { |
|
|
|
|
|
|
|
boxPoto.push(array[index]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var tempData = { |
|
|
|
|
|
|
|
"barCode": temp.pipenum, //样本条码
|
|
|
|
|
|
|
|
"barCodeImg": "", //物流拍照图
|
|
|
|
|
|
|
|
"boxNum": temp.boxNum, //转运箱号
|
|
|
|
|
|
|
|
"carPics": carPoto.toString(), //物流车图片 逗号分隔
|
|
|
|
|
|
|
|
"boxPics": boxPoto.toString(), // 转运箱图片 逗号分隔
|
|
|
|
|
|
|
|
"cost": 0, // 物流费用 自建没有
|
|
|
|
|
|
|
|
"driverMen": temp.driverMen, //驾驶员
|
|
|
|
|
|
|
|
"entryDate": temp.date, // 录入日期
|
|
|
|
|
|
|
|
"endDate": '2023-07-06 14:52:53', //startTime
|
|
|
|
|
|
|
|
"expectedEndTime": endTime, //预计到达时间 endTime
|
|
|
|
|
|
|
|
"institutionName": temp.ins[temp.insIdx].orgName, //送检机构名称
|
|
|
|
|
|
|
|
"institutionNo": temp.ins[temp.insIdx].id, //送检机构编号
|
|
|
|
|
|
|
|
"logisticsMen": temp.logisticsMen, //物流员
|
|
|
|
|
|
|
|
"logisticsNo": temp.selfOrderCode, //物流编号
|
|
|
|
|
|
|
|
"logisticsWay": 1, //物流方式 1自建 2第三方 3货运
|
|
|
|
|
|
|
|
"notes": temp.notes, // 物流备注
|
|
|
|
|
|
|
|
"number": temp.number, // 数量
|
|
|
|
|
|
|
|
"numberplate": "", // 车牌号
|
|
|
|
|
|
|
|
"phone": "", //物流电话
|
|
|
|
|
|
|
|
"startTime": startTime, //出发时间
|
|
|
|
|
|
|
|
"tranType": "1", //物流方式
|
|
|
|
|
|
|
|
"unitType": "", //物流单位 1.顺丰 2.京东(自建物流没有该字段)
|
|
|
|
|
|
|
|
"updateBy": 0, |
|
|
|
|
|
|
|
"updateTime": "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('saveInfo=' + JSON.stringify(tempData)); |
|
|
|
|
|
|
|
request.post(`/batch/addTranLogistics`, tempData).then(res => { |
|
|
|
|
|
|
|
console.log(JSON.stringify(res.data)); |
|
|
|
|
|
|
|
if (res.data.code === 200) { |
|
|
|
|
|
|
|
//保存成功后,查询底部列表
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
wx.showModal({ |
|
|
|
|
|
|
|
title: '错误', |
|
|
|
|
|
|
|
content: res.data.message, |
|
|
|
|
|
|
|
showCancel: false, |
|
|
|
|
|
|
|
complete: (res) => { |
|
|
|
|
|
|
|
if (res.confirm) {} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询底部列表数据
|
|
|
|
|
|
|
|
selSampleList() { |
|
|
|
|
|
|
|
var reqData = { |
|
|
|
|
|
|
|
'logisticsNo': this.data.selfOrderCode |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
request.post(`/logistics/selectTranLogistics`, reqData).then(res => { |
|
|
|
|
|
|
|
console.log(res.data); |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
sampleList: res.data.data, |
|
|
|
|
|
|
|
sampleCount: res.data.data.length |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -229,17 +432,18 @@ Page({ |
|
|
|
let year = now.getFullYear(); //获取当前年
|
|
|
|
let year = now.getFullYear(); //获取当前年
|
|
|
|
let month = now.getMonth() + 1; //获取当前月份
|
|
|
|
let month = now.getMonth() + 1; //获取当前月份
|
|
|
|
this.setData({ |
|
|
|
this.setData({ |
|
|
|
end: '' + year + '-' + (Array(2).join(0) + month).slice(-2) + '-' + (Array(2).join(0) + now.getDate()).slice(-2),//当前的时间
|
|
|
|
end: '' + year + '-' + (Array(2).join(0) + month).slice(-2) + '-' + (Array(2).join(0) + now.getDate()).slice(-2), //当前的时间
|
|
|
|
|
|
|
|
|
|
|
|
//开始
|
|
|
|
//开始
|
|
|
|
multiArray:[[year + "年", year + 1 + "年", year + 2 + "年"], |
|
|
|
multiArray: [ |
|
|
|
|
|
|
|
[year + "年", year + 1 + "年", year + 2 + "年"], |
|
|
|
datePicker.determineMonth(), |
|
|
|
datePicker.determineMonth(), |
|
|
|
datePicker.determineDay(year, month), |
|
|
|
datePicker.determineDay(year, month), |
|
|
|
datePicker.determineHour(), |
|
|
|
datePicker.determineHour(), |
|
|
|
datePicker.determineMinute() |
|
|
|
datePicker.determineMinute() |
|
|
|
], |
|
|
|
], |
|
|
|
//结束
|
|
|
|
//结束
|
|
|
|
multiArray1:[[year + "年", year + 1 + "年", year + 2 + "年"], |
|
|
|
multiArray1: [ |
|
|
|
|
|
|
|
[year + "年", year + 1 + "年", year + 2 + "年"], |
|
|
|
datePicker.determineMonth(), |
|
|
|
datePicker.determineMonth(), |
|
|
|
datePicker.determineDay(year, month), |
|
|
|
datePicker.determineDay(year, month), |
|
|
|
datePicker.determineHour(), |
|
|
|
datePicker.determineHour(), |
|
|
@ -248,14 +452,35 @@ Page({ |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流
|
|
|
|
//获取物流单号 1.自建物流 2.第三方物流 3.货运物流
|
|
|
|
http.get(`/batch/getBatchsNumber?logisticsWay=1`).then(res => { |
|
|
|
request.get(`/batch/getBatchsNumber?logisticsWay=1`).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 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取送检机构列表
|
|
|
|
|
|
|
|
request.post(`/institution/selectInstitution`).then(res => { |
|
|
|
|
|
|
|
var array = res.data.data |
|
|
|
|
|
|
|
var tempArr = [] |
|
|
|
|
|
|
|
for (let index = 0; index < array.length; index++) { |
|
|
|
|
|
|
|
tempArr.push(array[index].orgName) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
ins: tempArr |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询物流批次列表
|
|
|
|
|
|
|
|
this.selSampleList(); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//初始化照片按钮
|
|
|
|
|
|
|
|
var tempSrc = [this.data.potoSrc, this.data.potoSrc, this.data.potoSrc, this.data.potoSrc] |
|
|
|
|
|
|
|
this.setData({ |
|
|
|
|
|
|
|
poto: tempSrc |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|