pad-app/pages/shipWork/documentList.vue

280 lines
6.6 KiB
Vue
Raw Normal View History

2023-07-11 15:28:40 +08:00
<template>
<view class="documentList">
2023-12-08 17:42:10 +08:00
<head-view :title="title" :type="true" url="/pages/shipWork/index" @isPreview="isPreview"></head-view>
2023-11-24 15:55:58 +08:00
<!-- <uni-notice-bar show-icon single :text="noticeText" style="margin-top: 68px;" /> -->
2023-07-11 15:28:40 +08:00
<view class="container">
2023-08-18 17:28:11 +08:00
<view class="workBox">
<view class="title">
2023-09-23 20:16:54 +08:00
<image src="../../static/images/shipWork/zydz.png" mode="widthFix"></image>
2023-08-18 17:28:11 +08:00
<text>作业单证</text>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in infoList" :key="index" @click="toGo(item.url)">
2023-09-23 20:16:54 +08:00
<image :src="item.imgUrl" mode="widthFix"></image>
2023-08-18 17:28:11 +08:00
<p>{{item.name}}</p>
2023-11-01 18:40:05 +08:00
<!-- <view class="uploadStatus" v-if="!item.status">
2023-08-18 17:28:11 +08:00
<text>未上传</text>
2023-11-01 18:40:05 +08:00
</view> -->
2023-08-18 17:28:11 +08:00
</view>
2023-07-18 17:37:15 +08:00
</view>
</view>
2023-08-18 17:28:11 +08:00
<view class="workBox">
<view class="title">
2023-09-23 20:16:54 +08:00
<image src="../../static/images/shipWork/qtzy.png" mode="widthFix"></image>
2023-08-18 17:28:11 +08:00
<text>其他作业</text>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in otherListh" :key="index" @click="toGo(item.url)">
2023-09-23 20:16:54 +08:00
<image :src="item.imgUrl" mode="widthFix"></image>
2023-08-18 17:28:11 +08:00
<p>{{item.name}}</p>
</view>
2023-07-18 17:37:15 +08:00
</view>
</view>
2023-07-11 15:28:40 +08:00
</view>
</view>
</template>
<script>
2023-08-03 15:36:23 +08:00
import sqlite from "../../common/sqlite.js"
2023-07-11 15:28:40 +08:00
export default {
data() {
return {
2023-11-01 18:40:05 +08:00
title: "",
vtpId: "",
noticeText: "",
2023-07-11 15:28:40 +08:00
infoList: [{
2023-07-17 17:10:05 +08:00
name: "杂项作业单",
2023-08-18 17:28:11 +08:00
url: "mixWork",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
2023-08-23 17:42:44 +08:00
tableName: "messageRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "系解缆",
2023-08-18 17:28:11 +08:00
url: "untieCord",
imgUrl: "../../static/images/shipWork/zxzyd.png",
status: false,
2023-08-23 17:42:44 +08:00
tableName: "attachUnmoorRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "供给",
2023-08-18 17:28:11 +08:00
url: "supply",
imgUrl: "../../static/images/shipWork/gj.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "shipmentShipSupplyRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "指导员作业布置",
2023-08-18 17:28:11 +08:00
url: "workAssign",
imgUrl: "../../static/images/shipWork/zybz.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "shipmentAdviserLayoutRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "船舶装卸通知单",
2023-08-18 17:28:11 +08:00
url: "notice",
imgUrl: "../../static/images/shipWork/tzd.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "shipmentLoadUnloadNoticeRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "质量意见征询",
2023-08-18 17:28:11 +08:00
url: "opinion",
imgUrl: "../../static/images/shipWork/zlyj.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "shipmentQualityConsultationRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "异常情况",
2023-08-18 17:28:11 +08:00
url: "abnormal",
imgUrl: "../../static/images/shipWork/yczk.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "abnormalConditionRespList",
2023-07-17 17:10:05 +08:00
},
{
name: "MAFI清单",
2023-08-18 17:28:11 +08:00
url: "mafi",
imgUrl: "../../static/images/shipWork/mafiqd.png",
status: true,
2023-08-23 17:42:44 +08:00
tableName: "mafiListRespList",
2023-07-17 17:10:05 +08:00
}
],
2023-07-11 15:28:40 +08:00
otherListh: [{
name: "安全巡检",
2023-11-21 17:43:02 +08:00
url: "patrol",
2023-08-23 17:42:44 +08:00
imgUrl: "../../static/images/shipWork/aqxj.png",
tableName: "safetyInspectionRespList",
2023-07-11 15:28:40 +08:00
},
{
name: "船舶资料",
2023-08-18 17:28:11 +08:00
url: "shipInfo",
2023-08-23 17:42:44 +08:00
imgUrl: "../../static/images/shipWork/cbzl.png",
tableName: ""
2023-07-11 15:28:40 +08:00
},
{
name: "船舶计划",
2023-08-18 17:28:11 +08:00
url: "shipPlan",
2023-08-23 17:42:44 +08:00
imgUrl: "../../static/images/shipWork/cbjh.png",
tableName: ""
2023-07-11 15:28:40 +08:00
},
{
name: "作业查询",
2023-08-18 17:28:11 +08:00
url: "brandDetails",
2023-08-23 17:42:44 +08:00
imgUrl: "../../static/images/shipWork/zycx.png",
tableName: "shipmentShipLoadPlansRespList",
2023-07-11 15:28:40 +08:00
}
],
2023-08-23 17:42:44 +08:00
tableStatusList: [],
noticeList: [],
2023-11-01 18:40:05 +08:00
vtpId: "",
inVvyId: "",
inVvyName: "",
outVvyId: "",
outVvyName: "",
shipName: "",
2023-07-11 15:28:40 +08:00
}
},
2023-07-18 17:37:15 +08:00
mounted() {
2023-11-01 18:40:05 +08:00
this.vtpId = uni.getStorageSync('vtpId')
2023-08-23 17:42:44 +08:00
this.getTableStauts()
2023-07-17 17:10:05 +08:00
},
2023-07-11 15:28:40 +08:00
methods: {
2023-12-08 17:42:10 +08:00
isPreview(e) {
this.title = e
},
2023-08-23 17:42:44 +08:00
getTableStauts() {
this.infoList.forEach((v, index) => {
this.executeSql(v.tableName)
})
2023-11-01 18:40:05 +08:00
this.executeSql("voyageScheduleDataDetailRespDTOList")
2023-08-23 17:42:44 +08:00
},
2023-08-03 15:36:23 +08:00
// 查
2023-08-23 17:42:44 +08:00
executeSql(tableName) {
2023-11-01 18:40:05 +08:00
let sql = `select * from ${tableName} WHERE vtpId = '${this.vtpId}'`
2023-08-23 17:42:44 +08:00
sqlite.executeSqlCeshi(sql).then((value) => {
// 在resolve时执行的回调函数
2023-11-01 18:40:05 +08:00
if (tableName == "voyageScheduleDataDetailRespDTOList") {
value.forEach(v => {
if (v.importExportFlagName == '出口') {
this.outVvyId = v.vvyId
this.outVvyName = v.vvyName
2024-04-19 16:21:28 +08:00
} else {
this.inVvyId = v.vvyId
this.inVvyName = v.vvyName
2023-11-01 18:40:05 +08:00
}
})
this.shipName = `${value[0].spmName}`
this.title = `${value[0].spmName} 进口航次:${this.inVvyName} / 出口航次:${this.outVvyName}`
2023-08-23 17:42:44 +08:00
} else {
if (value.length == 0) {
this.tableStatusList.push(tableName)
}
value.forEach(v => {
if (v.webStatus == 0) {
this.tableStatusList.push(tableName)
}
})
this.tableStatusList = Array.from(new Set(this.tableStatusList))
let meg = ""
this.infoList.forEach((v, index) => {
this.tableStatusList.forEach(item => {
if (v.tableName == item) {
v.status = false
meg += `${v.name}`
let megs = meg.substring(0, meg.length - 1)
this.noticeText = `${megs}单证未填写`
}
})
})
}
}).catch((error) => {
// 在reject时执行的回调函数
console.error(error);
});
},
2023-07-11 15:28:40 +08:00
toGo(url) {
2023-11-01 18:40:05 +08:00
if (url != "") {
uni.setStorageSync('shipWorkTitle', this.shipName)
uni.navigateTo({
url: `/pages/shipWork/${url}`
})
}
2023-07-18 17:37:15 +08:00
},
2023-07-11 15:28:40 +08:00
}
}
</script>
<style lang="less" scoped>
.documentList {
.container {
padding: 30px 20px;
2023-08-24 16:22:29 +08:00
min-height: calc(100vh - 119px);
2023-11-24 15:55:58 +08:00
margin-top: 68px;
2023-07-11 15:28:40 +08:00
2023-08-18 17:28:11 +08:00
.workBox {
background-color: #fff;
margin-bottom: 20px;
2023-12-27 17:57:26 +08:00
padding: 24px 16px;
2023-08-18 17:28:11 +08:00
}
2023-07-11 15:28:40 +08:00
.title {
2023-08-18 17:28:11 +08:00
display: flex;
image {
width: 18px;
height: 18px;
margin-top: 3px;
}
text {
margin-left: 10px;
font-size: 16px;
font-weight: bold;
}
2023-07-11 15:28:40 +08:00
}
2023-07-18 17:37:15 +08:00
.ul {
2023-07-11 15:28:40 +08:00
display: flex;
flex-wrap: wrap;
2023-07-18 17:37:15 +08:00
.li {
2023-12-27 17:57:26 +08:00
margin: 24px;
margin-left: 0;
2023-08-18 17:28:11 +08:00
width: 195px;
height: 70px;
line-height: 70px;
box-shadow: 1px 1px 6px 0 rgba(52, 52, 52, 0.20);
border-radius: 8px;
display: flex;
position: relative;
overflow: hidden;
2023-07-11 15:28:40 +08:00
2023-08-18 17:28:11 +08:00
image {
width: 38px;
height: 38px;
margin: 16px;
2023-07-11 15:28:40 +08:00
}
2023-07-12 17:46:47 +08:00
p {
2023-08-18 17:28:11 +08:00
color: #23262E;
2023-07-11 15:28:40 +08:00
font-size: 16px;
2023-08-18 17:28:11 +08:00
font-weight: bold;
}
.uploadStatus {
padding: 0 8px;
height: 20px;
line-height: 20px;
background: #FFF7EE;
border-radius: 4px;
color: #FC8300;
position: absolute;
right: 0;
top: 0;
2023-07-11 15:28:40 +08:00
}
}
}
}
}
</style>