diff --git a/pages/quality/edit.vue b/pages/quality/edit.vue
index f992d03..a3b1e79 100644
--- a/pages/quality/edit.vue
+++ b/pages/quality/edit.vue
@@ -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 {
diff --git a/pages/shipWork/mixSign.vue b/pages/shipWork/mixSign.vue
index 263c6a7..b9ca47b 100644
--- a/pages/shipWork/mixSign.vue
+++ b/pages/shipWork/mixSign.vue
@@ -52,7 +52,7 @@
Berthed at Haitong:
{{bwInfo}}
-->
- Foreman Working time:???
+ Foreman Working time:{{RYSJ[0].minStartTime | textFilter}}-{{RYSJ[0].maxEndTime | textFilter}}
Berthed at Haitong:
@@ -131,10 +131,10 @@
- {{item2.workStartTime}}
+ {{item2.workStartTime | textFilter}}
- {{item2.workEndTime}}
+ {{item2.workEndTime | textFilter}}
@@ -219,8 +219,8 @@
{{item.retallyOrigin}}
- {{item.retallyStartTime}}
- {{item.retallyEndTime}}
+ {{item.retallyStartTime | textFilter}}
+ {{item.retallyEndTime | textFilter}}
@@ -248,8 +248,8 @@
{{item.retallyOrigin}}
- {{item.retallyStartTime}}
- {{item.retallyEndTime}}
+ {{item.retallyStartTime | textFilter}}
+ {{item.retallyEndTime | textFilter}}
@@ -329,12 +329,12 @@
{{ PTGR[0].totalGenNum }}
- {{ JSGR[0].minStartTime }}
- {{ PTGR[0].minStartTimePt }}
+ {{ JSGR[0].minStartTime | textFilter}}
+ {{ PTGR[0].minStartTimePt | textFilter}}
- {{ JSGR[0].maxEndTime }}
- {{ PTGR[0].maxEndTimePt }}
+ {{ JSGR[0].maxEndTime | textFilter}}
+ {{ PTGR[0].maxEndTimePt | textFilter}}
@@ -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)
}
diff --git a/pages/shipWork/peopleAdd.vue b/pages/shipWork/peopleAdd.vue
index ee81c6f..0894e9f 100644
--- a/pages/shipWork/peopleAdd.vue
+++ b/pages/shipWork/peopleAdd.vue
@@ -26,9 +26,10 @@
*天气:
-
- {{peopleRow.weatherType}}
+
+
+ {{ tqTextValue }}
*泊位:
@@ -49,7 +50,7 @@
{{peopleRow.shipPerson}}
- 作业时间:
+ *作业时间:
@@ -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,36 +378,60 @@
},
// 保存
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 {
- let date = new Date().getTime()
- let pmeId = uuidv4()
- let webStatus = 0
- let webDate = api.getDate(date)
- if (this.obj.state == "edit") {
- let sql =
- `UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bwTextValue}',
- jobStartTime = '${this.startTime}',jobEndTime = '${this.endTime}',shipPerson = '${this.shipValue}',
- vvyId = '${this.hcValue}',vvyName = '${this.hcTextValue}',weatherType = '${this.tqTextValue}',
- weatherTypeDesc = '${this.tqTextValue}',workSuite = '${this.workValue}',webStatus = '${webStatus}',
- importExportFlagName = '${this.importExportFlagName}',webDate = '${webDate}' WHERE pmeId = '${this.peopleRow.pmeId}';`
- this.executeSql(sql)
- } else if (this.obj.state == "add") {
- let sql =
- `insert into messageRespList values('${pmeId}','${this.vtpId}','${this.bwValue}','${this.bwTextValue}',
- '${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqTextValue}',
- '${this.tqTextValue}','${this.workValue}','${this.importExportFlagName}','${0}','${webStatus}','${webDate}')`
- this.executeSql(sql)
- }
- uni.navigateTo({
- url: '/pages/shipWork/mixWork'
- })
+ return
}
+ let date = new Date().getTime()
+ let pmeId = uuidv4()
+ let webStatus = 0
+ let webDate = api.getDate(date)
+ if (this.obj.state == "edit") {
+ let sql =
+ `UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bwTextValue}',
+ jobStartTime = '${this.startTime}',jobEndTime = '${this.endTime}',shipPerson = '${this.shipValue}',
+ vvyId = '${this.hcValue}',vvyName = '${this.hcTextValue}',weatherType = '${this.tqTextValue}',
+ weatherTypeDesc = '${this.tqTextValue}',workSuite = '${this.workValue}',webStatus = '${webStatus}',
+ importExportFlagName = '${this.importExportFlagName}',webDate = '${webDate}' WHERE pmeId = '${this.peopleRow.pmeId}';`
+ this.executeSql(sql)
+ } else if (this.obj.state == "add") {
+ let sql =
+ `insert into messageRespList values('${pmeId}','${this.vtpId}','${this.bwValue}','${this.bwTextValue}',
+ '${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqTextValue}',
+ '${this.tqTextValue}','${this.workValue}','${this.importExportFlagName}','${0}','${webStatus}','${webDate}')`
+ this.executeSql(sql)
+ }
+ uni.navigateTo({
+ url: '/pages/shipWork/mixWork'
+ })
},
// 编辑
toGo(state) {
diff --git a/pages/shipWork/shiftAdd.vue b/pages/shipWork/shiftAdd.vue
index e4a03e5..11ba8d9 100644
--- a/pages/shipWork/shiftAdd.vue
+++ b/pages/shipWork/shiftAdd.vue
@@ -248,39 +248,39 @@
辅助作业
×
- 技术工人:
+ *技术工人:
- 作业时间 :
+ *作业时间 :
- 重量:
+ *重量:
- 体积:
+ *体积:
- 普通工人:
+ *普通工人:
- 作业时间 :
+ *作业时间 :
- 重量:
+ *重量:
- 体积:
+ *体积:
@@ -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) => {
diff --git a/pages/shipWork/shiftDetails.vue b/pages/shipWork/shiftDetails.vue
index f445fe5..90b4963 100644
--- a/pages/shipWork/shiftDetails.vue
+++ b/pages/shipWork/shiftDetails.vue
@@ -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;
}
}