|
@@ -125,6 +125,7 @@
|
|
|
this.detailData = JSON.parse(options.obj)
|
|
|
console.log(this.detailData)
|
|
|
this.fileList1=[]
|
|
|
+ this.fileList2=[]
|
|
|
if(this.detailData.hyCarrierInfo.unloadingImg){
|
|
|
this.imgList=this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
|
var data=this.detailData.hyCarrierInfo.unloadingImg.split(',')
|
|
@@ -134,6 +135,15 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(this.detailData.hyCarrierInfo.receiptImg){
|
|
|
+ this.imgList1=this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
+ var data=this.detailData.hyCarrierInfo.receiptImg.split(',')
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if(data[i]!=''){
|
|
|
+ this.fileList2.push({url:data[i]})
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if(this.detailData.hyCarrierInfo.totalFreight){
|
|
|
this.$set(this.detailData,'totalFreight',String(this.detailData.hyCarrierInfo.totalFreight))
|
|
|
// this.detailData.totalFreight=String(this.detailData.hyCarrierInfo.totalFreight)
|
|
@@ -152,7 +162,7 @@
|
|
|
// totalFreight: '',
|
|
|
unloadingImg:this.detailData.hyCarrierInfo.unloadingImg,
|
|
|
receiptImg:this.detailData.hyCarrierInfo.receiptImg,
|
|
|
- id: this.detailData.carrierId,
|
|
|
+ id: this.detailData.carrierId?this.detailData.carrierId:this.detailData.hyCarrierInfo.id,
|
|
|
}
|
|
|
this.validityPeriod = this.$helper.makeValidityPeriod()
|
|
|
// #ifdef APP-PLUS
|
|
@@ -162,10 +172,13 @@
|
|
|
},
|
|
|
methods: {
|
|
|
deletePic(event) {
|
|
|
+ console.log(this[`fileList${event.name}`])
|
|
|
this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
+ this.imgList.splice(event.index, 1)
|
|
|
},
|
|
|
deletePic1(event) {
|
|
|
this[`fileList${event.name}`].splice(event.index, 1)
|
|
|
+ this.imgList1.splice(event.index, 1)
|
|
|
},
|
|
|
getNowTime() {
|
|
|
let now = new Date();
|
|
@@ -315,6 +328,7 @@
|
|
|
async afterRead(event) {
|
|
|
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
let lists = [].concat(event.file)
|
|
|
+
|
|
|
let fileListLen = this[`fileList${event.name}`].length
|
|
|
lists.map((item) => {
|
|
|
this[`fileList${event.name}`].push({
|
|
@@ -438,6 +452,14 @@
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
+ if (!this.detailData.carrierInfo.receiptImg) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请上传回单照片!',
|
|
|
+ icon: "none",
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
this.isShowAlert = false
|
|
|
uni.showLoading({
|
|
|
title:'加载中'
|