修改bug
parent
4cc74cafbf
commit
6e5a89f504
|
@ -469,8 +469,9 @@
|
|||
} else if (this.current == '其他') {
|
||||
this.isOther = true
|
||||
}
|
||||
console.log('this.radioList',this.radioList,this.infoData.qdLink);
|
||||
this.radioList.forEach(v => {
|
||||
if (v.name == this.infoData.qdLink) {
|
||||
if (v.value == this.infoData.qdLink) {
|
||||
this.currentValue = v.value
|
||||
this.$set(v, "checked", true)
|
||||
} else {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<p>Berthed at Haitong:</p><text>{{bwInfo}}</text>
|
||||
</view> -->
|
||||
<view class="li">
|
||||
<text>Foreman Working time:</text><text>???</text>
|
||||
<text>Foreman Working time:</text><text>{{RYSJ[0].minStartTime | textFilter}}-{{RYSJ[0].maxEndTime | textFilter}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<text>Berthed at Haitong:</text><text>
|
||||
|
@ -131,10 +131,10 @@
|
|||
</view>
|
||||
<view class="cell cellX">
|
||||
<view class="item bo_r">
|
||||
{{item2.workStartTime}}
|
||||
{{item2.workStartTime | textFilter}}
|
||||
</view>
|
||||
<view class="item bo_r">
|
||||
{{item2.workEndTime}}
|
||||
{{item2.workEndTime | textFilter}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cellY">
|
||||
|
@ -219,8 +219,8 @@
|
|||
<view class="sz">{{item.retallyOrigin}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="sz bo_r">{{item.retallyStartTime}}</view>
|
||||
<view class="sz bo_r">{{item.retallyEndTime}}</view>
|
||||
<view class="sz bo_r">{{item.retallyStartTime | textFilter}}</view>
|
||||
<view class="sz bo_r">{{item.retallyEndTime | textFilter}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weight cellX">
|
||||
|
@ -248,8 +248,8 @@
|
|||
<view class="sz">{{item.retallyOrigin}}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="sz bo_r">{{item.retallyStartTime}}</view>
|
||||
<view class="sz bo_r">{{item.retallyEndTime}}</view>
|
||||
<view class="sz bo_r">{{item.retallyStartTime | textFilter}}</view>
|
||||
<view class="sz bo_r">{{item.retallyEndTime | textFilter}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weight cellX">
|
||||
|
@ -329,12 +329,12 @@
|
|||
<view class="sz">{{ PTGR[0].totalGenNum }}</view>
|
||||
</view>
|
||||
<view class="cellY">
|
||||
<view class="sz bo_b">{{ JSGR[0].minStartTime }}</view>
|
||||
<view class="sz">{{ PTGR[0].minStartTimePt }}</view>
|
||||
<view class="sz bo_b">{{ JSGR[0].minStartTime | textFilter}}</view>
|
||||
<view class="sz">{{ PTGR[0].minStartTimePt | textFilter}}</view>
|
||||
</view>
|
||||
<view class="cellY">
|
||||
<view class="sz bo_b">{{ JSGR[0].maxEndTime }}</view>
|
||||
<view class="sz">{{ PTGR[0].maxEndTimePt }}</view>
|
||||
<view class="sz bo_b">{{ JSGR[0].maxEndTime | textFilter}}</view>
|
||||
<view class="sz">{{ PTGR[0].maxEndTimePt | textFilter}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weight cellY bo_r">
|
||||
|
@ -459,6 +459,7 @@
|
|||
delId: "",
|
||||
PTGR:[],
|
||||
JSGR:[],
|
||||
RYSJ:[]
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -518,6 +519,15 @@
|
|||
that.bwInfo = that.bwArr.join(",")
|
||||
}, 300)
|
||||
},
|
||||
filters: {
|
||||
textFilter(value) {
|
||||
let split_s = value.split(" ")
|
||||
let result = split_s[1].split(":")
|
||||
let date = split_s[0].split("-")
|
||||
let sum = result[0] + ":" + result[1] + "(" + date[2] + ")"
|
||||
return sum
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查船舶信息/人员信息
|
||||
executeSql(tableName) {
|
||||
|
@ -546,6 +556,7 @@
|
|||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
this.timeArr = value
|
||||
value.forEach((v, index) => {
|
||||
console.log('v',v);
|
||||
this.startTime = v.work_shift.split(",")[0]
|
||||
this.endTime = v.work_shift.split(",")[1]
|
||||
let sql2 =
|
||||
|
@ -570,6 +581,13 @@
|
|||
let sql6 = `SELECT MIN(startTm) AS minStartTime,MAX(endTm) AS maxEndTime,SUM(tecNum) AS totalTecNum,SUM(weight) AS totalWeight,SUM(volume) AS totalvolume,GROUP_CONCAT(waitRemark, ', ') AS allWaitRemark,GROUP_CONCAT(auxRemark, ', ') AS allAuxRemark
|
||||
FROM infoRespList WHERE vtpId = '${this.vtpId}' AND startTm>='${this.startTime}'AND endTm<='${this.endTime}'`
|
||||
this.executeSql7(sql6)
|
||||
// 人员信息作业时间
|
||||
let sql7 = `SELECT MIN(jobStartTime) AS minStartTime,MAX(jobEndTime) AS maxEndTime
|
||||
FROM messageRespList
|
||||
WHERE vtpId = '${this.vtpId}'
|
||||
AND jobStartTime>='${this.startTime}'
|
||||
AND jobEndTime<='${this.endTime}'`
|
||||
this.executeSql8(sql7)
|
||||
})
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
|
@ -659,11 +677,9 @@
|
|||
executeSql4(sql) {
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
// console.log('value',value);
|
||||
if (value.length > 0) {
|
||||
this.PTGR.push(...value)
|
||||
}
|
||||
// this.qtList = api.arrFrom(this.qtList, "webId")
|
||||
}).catch((error) => {
|
||||
// 在reject时执行的回调函数
|
||||
console.error(error);
|
||||
|
@ -676,7 +692,18 @@
|
|||
if (value.length > 0) {
|
||||
this.JSGR.push(...value)
|
||||
}
|
||||
// this.qtList = api.arrFrom(this.qtList, "webId")
|
||||
}).catch((error) => {
|
||||
// 在reject时执行的回调函数
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
// 人员信息作业时间
|
||||
executeSql8(sql) {
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
if (value.length > 0) {
|
||||
this.RYSJ.push(...value)
|
||||
}
|
||||
}).catch((error) => {
|
||||
// 在reject时执行的回调函数
|
||||
console.error(error);
|
||||
|
@ -686,6 +713,7 @@
|
|||
executeSql6(sql) {
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
console.log('value',value);
|
||||
if (value.length > 0) {
|
||||
this.peopleList.push(...value)
|
||||
}
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
<p><text class="required" v-if="obj.state != 'look'">*</text>天气:</p>
|
||||
<!-- <uni-data-select v-model="tqValue" :localdata="tqList" @change="tqChange"
|
||||
v-if="obj.state != 'look'"></uni-data-select> -->
|
||||
<uni-easyinput v-if="obj.state != 'look'" v-model="tqTextValue"
|
||||
placeholder="请输入"></uni-easyinput>
|
||||
<text v-else>{{peopleRow.weatherType}}</text>
|
||||
<!-- <uni-easyinput v-if="obj.state != 'look'" v-model="tqTextValue"
|
||||
placeholder="请输入"></uni-easyinput> -->
|
||||
<!-- <text v-else>{{peopleRow.weatherType}}</text> -->
|
||||
<text>{{ tqTextValue }}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<p><text class="required" v-if="obj.state != 'look'">*</text>泊位:</p>
|
||||
|
@ -49,7 +50,7 @@
|
|||
<text v-else>{{peopleRow.shipPerson}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<p>作业时间:</p>
|
||||
<p><text class="required" v-if="obj.state != 'look'">*</text>作业时间:</p>
|
||||
<template v-if="flag">
|
||||
<uni-datetime-picker v-model="datetime" type="datetimerange" rangeSeparator="-"
|
||||
@change="changeLog" v-if="obj.state != 'look'" :hide-second="true" :border="false" />
|
||||
|
@ -149,6 +150,7 @@
|
|||
this.executeSql1("shipInfoTable")
|
||||
this.executeSql1("voyageScheduleDataDetailRespDTOList")
|
||||
this.executeSql1("shipmentBasicShiftList")
|
||||
this.executeSql1("messageRespList")
|
||||
if (this.obj.state == "edit") {
|
||||
this.title = "编辑人员信息"
|
||||
} else if (this.obj.state == "look") {
|
||||
|
@ -185,6 +187,8 @@
|
|||
} else if (tableName == "shipmentBasicShiftList") {
|
||||
this.beginDate = value[0].beginTime
|
||||
this.endDate = value[2].endTime
|
||||
} else if(tableName == "messageRespList") {
|
||||
console.log('value',value);
|
||||
}
|
||||
}).catch((error) => {
|
||||
// 在reject时执行的回调函数
|
||||
|
@ -374,13 +378,38 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
if(!this.hcValue) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入航次!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.tqTextValue) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入天气!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.bwValue) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入泊位!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.datetime[0] == "") {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入作业时间!'
|
||||
})
|
||||
} else {
|
||||
return
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let pmeId = uuidv4()
|
||||
let webStatus = 0
|
||||
|
@ -403,7 +432,6 @@
|
|||
uni.navigateTo({
|
||||
url: '/pages/shipWork/mixWork'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 编辑
|
||||
toGo(state) {
|
||||
|
|
|
@ -248,39 +248,39 @@
|
|||
<p class="title">辅助作业</p>
|
||||
<view class="delBox" @click="delQt(item,index)">×</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">技术工人:</p>
|
||||
<p class="liTitle"><text class="required">*</text>技术工人:</p>
|
||||
<uni-number-box v-model="item.jsworker" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">作业时间 :</p>
|
||||
<p class="liTitle"><text class="required">*</text>作业时间 :</p>
|
||||
<uni-datetime-picker v-if="flag" v-model="item.datetime" type="datetimerange"
|
||||
rangeSeparator="-" @change="changeLog(item,'other')" :hide-second="true"
|
||||
:border="false" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">重量:</p>
|
||||
<p class="liTitle"><text class="required">*</text>重量:</p>
|
||||
<uni-number-box v-model="item.zlValue" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">体积:</p>
|
||||
<p class="liTitle"><text class="required">*</text>体积:</p>
|
||||
<uni-number-box v-model="item.tjValue" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">普通工人:</p>
|
||||
<p class="liTitle"><text class="required">*</text>普通工人:</p>
|
||||
<uni-number-box v-model="item.ptworker" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">作业时间 :</p>
|
||||
<p class="liTitle"><text class="required">*</text>作业时间 :</p>
|
||||
<uni-datetime-picker v-if="flag" v-model="item.datetime2" type="datetimerange"
|
||||
rangeSeparator="-" @change="changeLog(item,'other2')" :hide-second="true"
|
||||
:border="false" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">重量:</p>
|
||||
<p class="liTitle"><text class="required">*</text>重量:</p>
|
||||
<uni-number-box v-model="item.zlValue2" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li">
|
||||
<p class="liTitle">体积:</p>
|
||||
<p class="liTitle"><text class="required">*</text>体积:</p>
|
||||
<uni-number-box v-model="item.tjValue2" :max="1000000000" />
|
||||
</view>
|
||||
<view class="li iLi">
|
||||
|
@ -855,13 +855,17 @@
|
|||
// 获取开始结束时间年月日
|
||||
let sYMD = item.datetime[0].split(' ')[0]
|
||||
let eYMD = item.datetime[1].split(' ')[0]
|
||||
// 获取开始结束时间的时间戳
|
||||
let sT = Date.parse(item.datetime[0])
|
||||
let eT = Date.parse(item.datetime[1])
|
||||
|
||||
// 工班作业时间
|
||||
if (this.active == 0) {
|
||||
if (item.gbValue != "") {
|
||||
let sresDate = api.HMS_daxiao(this.sShiftDate, sTime)
|
||||
let eresDate = api.HMS_daxiao(this.eShiftDate, eTime)
|
||||
if (sYMD != eYMD) {
|
||||
if (sresDate <= 0 && eresDate >= 0) {
|
||||
if (sresDate <= 0 && eresDate >= 0 && eT - sT <= 28800000) {
|
||||
that.flag = true
|
||||
item.startTime = item.datetime[0]
|
||||
item.endTime = item.datetime[1]
|
||||
|
@ -936,9 +940,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 获取开始结束时间的时间戳
|
||||
let sT = Date.parse(item.datetime[0])
|
||||
let eT = Date.parse(item.datetime[1])
|
||||
// 获取开始结束时间时分转数字
|
||||
let nsTime = Number((sTime.split(':')).join(''))
|
||||
let neTime = Number((eTime.split(':')).join(''))
|
||||
|
@ -1422,7 +1423,111 @@
|
|||
showCancel: false,
|
||||
content: '请输入航次,装卸类型!'
|
||||
})
|
||||
} else {
|
||||
return
|
||||
}
|
||||
let arr = this.leftUlList1.concat(this.rightUlList1)
|
||||
if(arr.length) {
|
||||
let flag = false
|
||||
arr.forEach(item => {
|
||||
if(!item.gbTextValue) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入工班!'
|
||||
})
|
||||
flag = true
|
||||
return
|
||||
}
|
||||
if(!item.startTime) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入作业时间!'
|
||||
})
|
||||
flag = true
|
||||
return
|
||||
}
|
||||
item.ulList2.forEach(ite => {
|
||||
if(!ite.carTypeName) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入车型!'
|
||||
})
|
||||
flag = true
|
||||
return
|
||||
}
|
||||
if(!ite.loadingTypeName) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入装卸方式!'
|
||||
})
|
||||
flag = true
|
||||
return
|
||||
}
|
||||
})
|
||||
})
|
||||
if(flag) return
|
||||
}
|
||||
if(this.fcUlList.length) {
|
||||
let flag = false
|
||||
this.fcUlList.forEach(item => {
|
||||
if(!item.retallyTypeName) {
|
||||
flag = true
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入翻舱类型!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!item.retallyStartTime) {
|
||||
flag = true
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入作业时间!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!item.carTypeName) {
|
||||
flag = true
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入车型!'
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
if(flag) return
|
||||
}
|
||||
if(this.otherArr.length) {
|
||||
let flag = false
|
||||
this.otherArr.forEach(item => {
|
||||
if(!item.startTime) {
|
||||
flag = true
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入作业时间!'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!item.startTime2) {
|
||||
flag = true
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
showCancel: false,
|
||||
content: '请输入作业时间!'
|
||||
})
|
||||
return
|
||||
}
|
||||
})
|
||||
if(flag) return
|
||||
}
|
||||
|
||||
let date = new Date().getTime()
|
||||
let contactId = this.shipInfo.webId
|
||||
let webStatus = "0"
|
||||
|
@ -1623,7 +1728,6 @@
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
executeSql(sql) {
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
|
|
|
@ -462,7 +462,7 @@
|
|||
flex-wrap: wrap;
|
||||
padding: 0 16px 16px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
width: 49%;
|
||||
.li {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
@ -473,8 +473,10 @@
|
|||
}
|
||||
|
||||
.wLi {
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
width: 49%;
|
||||
display:flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue