2023-07-05 10:56:11 +08:00
< template >
< view class = "app" >
2023-08-18 17:28:11 +08:00
< head -info :navIndex ="2" > < / h e a d - i n f o >
2023-07-05 10:56:11 +08:00
< view class = "container" >
< view class = "content" >
< view class = "form" >
2023-07-13 16:46:06 +08:00
< view class = "select" >
2023-09-23 20:16:54 +08:00
< superwei -combox :candidates ="shipList" :isJSON ="true" keyName = "shipVvyname"
placeholder = "请选择船名航次" v - model = "shipVvyname" @ input = "input_json"
@ select = "select_json" > < / s u p e r w e i - c o m b o x >
2023-07-06 17:08:59 +08:00
< / view >
2023-07-25 13:18:37 +08:00
< button class = "searchBtn" type = "default" @click ="search" > 搜 索 < / button >
2023-11-01 18:40:05 +08:00
2023-11-13 10:11:34 +08:00
<!-- < button class = "searchBtn" type = "default" @click ="dropTable" > 删 除 表 < / button > - - >
2023-11-28 17:52:09 +08:00
<!-- < button class = "searchBtn" type = "default" @click ="dropData" > 删 除 数 据 < / button > - - >
2023-11-24 15:55:58 +08:00
<!-- < button class = "searchBtn" type = "default" @click ="createTable" > 创 建 < / button > - - >
2023-11-28 17:52:09 +08:00
<!-- < button class = "searchBtn" type = "default" @click ="delAll" > 批 量 删 除 表 < / button > - - >
<!-- < button class = "searchBtn" type = "default" @click ="delAllData" > 批 量 删 除 数 据 < / button > - - >
2023-07-05 10:56:11 +08:00
< / view >
< view class = "itemList" >
2023-07-25 13:18:37 +08:00
< template v-if ="itemList.length > 0" >
2023-08-24 16:22:29 +08:00
< view v-for ="(item, index) in itemList" :key="index" class="item" >
< view @click ="toGo(item)" >
< view class = "title" >
2023-09-23 20:16:54 +08:00
< image src = "../../static/images/ship.png" mode = "widthFix" > < / image >
2023-08-24 16:22:29 +08:00
< view class = "name" >
2023-09-23 20:16:54 +08:00
{ { item . spmName } }
2023-08-24 16:22:29 +08:00
< / view >
2023-07-06 17:08:59 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< view class = "row" >
< view class = "nitem" >
进口航次 : < text > { { item . inVvyName } } < / text >
< / view >
< view class = "nitem" >
2023-11-16 18:04:18 +08:00
贸易类型 : < text > { { item . inTradeTypeName } } < / text >
2023-08-24 16:22:29 +08:00
< / view >
2023-07-06 17:08:59 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< view class = "row" >
< view class = "nitem" >
出口航次 : < text > { { item . outVvyName } } < / text >
< / view >
< view class = "nitem" >
2023-11-16 18:04:18 +08:00
贸易类型 : < text > { { item . outTradeTypeName } } < / text >
2023-08-24 16:22:29 +08:00
< / view >
2023-07-06 17:08:59 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< view class = "row" >
< view class = "nitem" >
计划泊位 : < text > { { item . planBerthageName } } < / text >
< / view >
< view class = "nitem" >
实际泊位 : < text > { { item . actualBerthageName } } < / text >
< / view >
2023-08-18 17:28:11 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< view class = "statusBox statusBox1" >
2023-11-01 18:40:05 +08:00
< view class = "statusInfo" v-if ="item.uploadStatus == '已上传'" >
2023-08-24 16:22:29 +08:00
< text > 已上传 < / text >
< text > { { item . uploadTime } } < / text >
< / view >
< view class = "statusInfo notStatus" v-else >
< text > 未上传 < / text >
< / view >
2023-08-18 17:28:11 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< view class = "statusBox statusBox2" >
2023-11-01 18:40:05 +08:00
< view class = "statusInfo" v-if ="item.downloadStatus == '已下载'" >
2023-08-24 16:22:29 +08:00
< text > 已下载 < / text >
< text > { { item . downloadTime } } < / text >
< / view >
< view class = "statusInfo notStatus" v-else >
< text > 未下载 < / text >
< / view >
2023-07-06 17:08:59 +08:00
< / view >
2023-08-18 17:28:11 +08:00
< / view >
< view class = "footer" >
< view class = "fitem" >
2023-08-24 16:22:29 +08:00
< button : class = "{fitem1:item.uploadTime != ''}" type = "default"
: disabled = "item.uploadTime == ''" @ click . stop = "download(item)" > 下载 < / button >
2023-08-18 17:28:11 +08:00
< button class = "fitem2" type = "default" @click.stop ="upload(item)" > 上传 < / button >
< / view >
< / view >
2023-07-05 10:56:11 +08:00
< / view >
2023-08-24 16:22:29 +08:00
< uni -popup ref = "popup" type = "message" >
< uni -popup -message :type ="msgType" :message ="popupText"
: duration = "2000" > < / u n i - p o p u p - m e s s a g e >
< / u n i - p o p u p >
2023-12-22 17:48:52 +08:00
< template v-if ="isMore" >
< uni -load -more iconType = "circle" status = "loading" style = "width: 100%;" / >
< / template >
2023-07-17 17:10:05 +08:00
< / template >
< o -empty v -else height = "70vh" bg = "#f5f6fa" / >
< / view >
2023-11-21 17:43:02 +08:00
<!-- < view class = "pageBox" v-if ="itemList.length > 0" >
2023-07-17 17:10:05 +08:00
< uni -pagination :show-icon ="true" :total ="total" :pageSize ="pageSize" :current ="current"
@ change = "changePage" / >
2023-11-21 17:43:02 +08:00
< / view > -- >
2023-07-05 10:56:11 +08:00
< / view >
< / view >
2023-11-01 18:40:05 +08:00
< LotusLoading :lotusLoadingData ="lotusLoadingData" > < / LotusLoading >
2023-07-05 10:56:11 +08:00
< / view >
< / template >
< script >
import HeadInfo from '@/components/head-info/head-info' ;
2023-08-01 09:32:45 +08:00
import sqlite from "../../common/sqlite.js"
import tableList from "../../common/createDataTable.js"
2023-08-01 16:32:50 +08:00
import api from "../../common/api.js"
2023-11-01 18:40:05 +08:00
import LotusLoading from "../../components/Winglau14-lotusLoading/Winglau14-LotusLoading.vue" ;
2023-08-18 17:28:11 +08:00
import {
v4 as uuidv4
} from 'uuid' ;
2023-07-05 10:56:11 +08:00
export default {
data ( ) {
return {
2023-09-23 20:16:54 +08:00
loginObj : { } ,
2023-11-01 18:40:05 +08:00
vtpId : "" ,
2023-08-24 16:22:29 +08:00
// 下载成功提示
popupText : "" ,
// 下载失败提示
errorText : "" ,
// 提示类型
msgType : "" ,
2023-09-23 20:16:54 +08:00
// 下载数据
downloadData : { } ,
2023-08-24 16:22:29 +08:00
2023-07-13 16:46:06 +08:00
// 港口
2023-09-23 20:16:54 +08:00
portObj : { } ,
2023-07-24 16:56:46 +08:00
// pamList: [],
2023-07-13 16:46:06 +08:00
// 船名航次
2023-09-23 20:16:54 +08:00
spmId : "" , // 船名ID
spmName : '' , // 船名
vvyId : "" , // 航次ID
vvyName : "" , // 航次名
shipVvyname : "" ,
2023-07-13 16:46:06 +08:00
shipList : [ ] ,
2023-07-17 17:10:05 +08:00
shipInput : "" ,
itemList : [ ] ,
2023-11-01 18:40:05 +08:00
vtpList : [ ] ,
2023-07-17 17:10:05 +08:00
// 分页
total : 0 ,
2023-11-21 17:43:02 +08:00
pageSize : 12 ,
2023-07-17 17:10:05 +08:00
current : 1 ,
2023-08-01 09:32:45 +08:00
2023-08-03 15:36:23 +08:00
// 下拉数据
2023-09-23 20:16:54 +08:00
optionData : [ ] ,
2023-11-01 18:40:05 +08:00
// 人员信息
messageRespList : [ ] ,
// 工班信息
workMessageRespList : [ ] ,
// 工班信息详细
workMessageRespInfoList : [ ] ,
// 工班信息翻仓
retallyMessageRespList : [ ] ,
// 工班信息其他
infoRespList : [ ] ,
// 系解缆
attachUnmoorRespList : [ ] ,
// 供给
shipmentShipSupplyRespList : [ ] ,
// 指导员作业布置
shipmentAdviserLayoutRespList : [ ] ,
// 船舶装卸通知书
shipmentLoadUnloadNoticeRespList : [ ] ,
// 质量意见征询
shipmentQualityConsultationRespList : [ ] ,
2023-11-24 15:55:58 +08:00
// 质量意见征询评价表
evaluateTable : [ ] ,
2023-11-01 18:40:05 +08:00
// 异常情况
abnormalConditionRespList : [ ] ,
// mafi清单
mafiListRespList : [ ] ,
// 签名数据
workSignTable : [ ] ,
// 所有表
allList : [ "shipInfoTable" , "voyageScheduleDataPadRespDTO" , "voyageScheduleDataDetailRespDTOList" ,
"messageRespList" , "workMessageRespList" , "workMessageRespInfoList" ,
2023-09-23 20:16:54 +08:00
"retallyMessageRespList" , "infoRespList" , "attachUnmoorRespList" , "shipmentShipSupplyRespList" ,
"shipmentAdviserLayoutRespList" , "shipmentLoadUnloadNoticeRespList" ,
"shipmentQualityConsultationRespList" , "abnormalConditionRespList" , "mafiListRespList" ,
2023-11-01 18:40:05 +08:00
"shipmentShipLoadPlansRespList" , "workQueryDetails" , "shipOption" , "workSignTable" ,
"shipmentBasicShiftList" , "evaluateTable"
] ,
// 所有单证
allArr : [ "messageRespList" , "workMessageRespList" , "workMessageRespInfoList" ,
"retallyMessageRespList" , "infoRespList" , "attachUnmoorRespList" , "shipmentShipSupplyRespList" ,
"shipmentAdviserLayoutRespList" , "shipmentLoadUnloadNoticeRespList" ,
"shipmentQualityConsultationRespList" , "abnormalConditionRespList" , "mafiListRespList" ,
2023-11-24 15:55:58 +08:00
"workSignTable" , "evaluateTable"
2023-11-01 18:40:05 +08:00
] ,
// 基础数据表
jcList : [ "shipInfoTable" , "voyageScheduleDataPadRespDTO" , "voyageScheduleDataDetailRespDTOList" ,
"shipmentBasicShiftList" , "shipOption"
] ,
2023-12-22 17:48:52 +08:00
isMore : false ,
2023-11-01 18:40:05 +08:00
lotusLoadingData : {
isShow : false //设置显示加载中组件true显示false隐藏
}
2023-07-05 10:56:11 +08:00
}
} ,
components : {
2023-07-13 16:46:06 +08:00
HeadInfo ,
2023-11-01 18:40:05 +08:00
LotusLoading
2023-07-13 16:46:06 +08:00
} ,
2023-11-21 17:43:02 +08:00
onReachBottom ( ) {
this . current ++
this . initData ( )
2023-12-22 17:48:52 +08:00
this . isMore = true
2023-11-21 17:43:02 +08:00
} ,
2023-09-23 20:16:54 +08:00
onBackPress ( options ) {
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if ( options . from == 'backbutton' ) {
return true ;
} else if ( options . from == 'navigateBack' ) {
return false ;
}
} ,
2023-07-13 16:46:06 +08:00
mounted ( ) {
2023-09-23 20:16:54 +08:00
this . portObj = uni . getStorageSync ( 'portObj' )
this . loginObj = uni . getStorageSync ( 'loginObj' )
this . getShip ( )
2023-11-01 18:40:05 +08:00
this . initData ( )
2023-07-05 10:56:11 +08:00
} ,
methods : {
2023-08-01 09:32:45 +08:00
createTable ( ) {
tableList . createAllTable ( )
} ,
2023-09-23 20:16:54 +08:00
// 批量删除
2024-04-19 16:21:28 +08:00
delAll ( ) { n
2023-09-23 20:16:54 +08:00
console . log ( '批量删除表' ) ;
2023-11-01 18:40:05 +08:00
this . allList . forEach ( v => {
2023-09-23 20:16:54 +08:00
let sql = ` DROP TABLE ${ v } ; `
this . executeSql ( sql )
} )
} ,
2023-11-01 18:40:05 +08:00
// 批量删除数据
delAllData ( ) {
console . log ( '批量删除数据' ) ;
this . allList . forEach ( v => {
2023-12-08 17:42:10 +08:00
let sql = ` delete from ${ v } WHERE vtpId = '341a92f3c9ae3d4d228561d84984a1fb'; `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
} )
uni . setStorageSync ( 'delSrmIds' , [ ] ) ;
uni . setStorageSync ( 'delSwmIds' , [ ] ) ;
} ,
2023-08-01 09:32:45 +08:00
dropTable ( ) {
console . log ( '删除表' ) ;
2024-05-22 16:04:54 +08:00
let sql = 'DROP TABLE infoRespList'
2023-08-01 09:32:45 +08:00
this . executeSql ( sql )
} ,
dropData ( ) {
2023-08-15 09:18:52 +08:00
console . log ( '删除数据' ) ;
2023-11-28 17:52:09 +08:00
let sql = "delete from workSignTable"
2023-08-01 09:32:45 +08:00
this . executeSql ( sql )
} ,
2023-07-13 16:46:06 +08:00
// 获取船的数据
2023-11-28 17:52:09 +08:00
initData ( flag ) {
2023-07-13 16:46:06 +08:00
uni . request ( {
2023-09-23 20:16:54 +08:00
url : ` ${ this . $local } /api/shipOperate/select?pamId= ${ this . portObj . portId } &vvyId= ${ this . vvyId } &size= ${ this . pageSize } ¤t= ${ this . current } ` ,
2023-07-13 16:46:06 +08:00
header : {
2023-09-23 20:16:54 +08:00
'Content-Type' : 'application/json' , //自定义请求头信息
'Authorization' : ` Bearer ${ this . loginObj . access _token } `
2023-07-13 16:46:06 +08:00
} ,
method : 'GET' , //请求方式,必须为大写
success : ( res ) => {
if ( res . statusCode === 200 ) {
2023-12-22 17:48:52 +08:00
this . isMore = false
2023-09-23 20:16:54 +08:00
this . total = res . data . data . total
2023-11-28 17:52:09 +08:00
if ( flag && flag == 'new' ) {
this . pageSize = 12
this . current = 1
this . itemList = res . data . data . records
} else {
this . itemList . push ( ... res . data . data . records )
}
2023-07-13 16:46:06 +08:00
}
}
} )
2023-11-01 18:40:05 +08:00
let that = this
setTimeout ( function ( ) {
that . vtpId = [ ]
let sq = ` select * from shipInfoTable `
that . executeSql ( sq , "shipInfoTable" )
} , 100 )
2023-07-13 16:46:06 +08:00
} ,
2023-08-15 09:18:52 +08:00
// 点击分页
2023-07-17 17:10:05 +08:00
changePage ( e ) {
this . current = e . current ;
this . initData ( )
} ,
2023-07-13 16:46:06 +08:00
// 获取船名航次下拉数据
getShip ( ) {
uni . request ( {
2023-08-04 17:06:33 +08:00
url : ` ${ this . $local } /api/shipOperate/queryShipmentVoyageData?key= ${ this . shipInput } ` ,
2023-07-13 16:46:06 +08:00
header : {
2023-09-23 20:16:54 +08:00
'Content-Type' : 'application/json' , //自定义请求头信息
'Authorization' : ` Bearer ${ this . loginObj . access _token } `
2023-07-13 16:46:06 +08:00
} ,
method : 'GET' , //请求方式,必须为大写
success : ( res ) => {
if ( res . statusCode === 200 ) {
2023-07-17 17:10:05 +08:00
this . shipList = res . data . data
2023-09-23 20:16:54 +08:00
this . shipList . forEach ( v => {
this . $set ( v , "shipVvyname" , ` ${ v . spmName } / ${ v . vvyName } ` )
} )
2023-07-13 16:46:06 +08:00
}
}
} )
} ,
2023-07-17 17:10:05 +08:00
// 船名航次下拉模糊查询
input _json ( e ) {
2023-09-23 20:16:54 +08:00
this . shipInput = e
if ( e == "" ) {
this . vvyId = ""
}
this . getShip ( )
2023-07-17 17:10:05 +08:00
} ,
// 船名航次下拉选项
select _json ( e ) {
2023-09-23 20:16:54 +08:00
this . vvyId = e . vvyId
this . vvyName = e . vvyName
this . spmId = e . spmId
this . spmName = e . spmName
2023-07-17 17:10:05 +08:00
} ,
2023-07-13 16:46:06 +08:00
// 点击搜索
search ( ) {
2023-11-28 17:52:09 +08:00
this . pageSize = 12
this . current = 1
this . initData ( 'new' )
2023-07-05 10:56:11 +08:00
} ,
2023-09-23 20:16:54 +08:00
// 下拉数据
2023-11-01 18:40:05 +08:00
xlData ( vtpId ) {
2023-09-23 20:16:54 +08:00
for ( let i = 0 ; i < this . optionData . length ; i ++ ) {
this . optionData [ i ] [ "webId" ] = uuidv4 ( )
2023-11-01 18:40:05 +08:00
this . optionData [ i ] [ "vtpId" ] = vtpId
2023-09-23 20:16:54 +08:00
let date = new Date ( ) . getTime ( )
this . optionData [ i ] [ "webStatus" ] = "0"
this . optionData [ i ] [ "webDate" ] = api . getDate ( date )
let dbTable = 'shipOption'
let Arr = [ ]
for ( let key in this . optionData [ i ] ) {
Arr . push ( ` ' ${ this . optionData [ i ] [ key ] } ' ` ) ;
}
let Str = Arr . join ( ',' )
sqlite . insertTableData ( dbTable , Str ) . then ( ( value ) => {
// 在resolve时执行的回调函数
2023-11-01 18:40:05 +08:00
this . executeSql ( value , "shipOption" )
2023-09-23 20:16:54 +08:00
} ) . catch ( ( error ) => {
// 在reject时执行的回调函数
console . error ( error ) ;
} ) ;
}
2023-08-04 17:06:33 +08:00
} ,
2023-09-23 20:16:54 +08:00
// 船舶基本信息
2023-11-13 10:11:34 +08:00
shipDataInfo ( info , vtpId ) {
2023-08-03 15:36:23 +08:00
let date = new Date ( ) . getTime ( )
let webId = uuidv4 ( )
let webDate = api . getDate ( date )
2023-09-23 20:16:54 +08:00
let sql =
2023-11-13 10:11:34 +08:00
` insert into shipInfoTable values(' ${ webId } ',' ${ vtpId } ',' ${ info . agencyCname } ',' ${ info . ctyCnname } ',' ${ info . ctyCode } ',' ${ info . dataVersion } ',' ${ info . shipCname } ',
2023-09-23 20:16:54 +08:00
'${info.shipTypeName}' , '${info.spmBoardCentrele}' , '${info.spmBoardCentrerg}' , '${info.spmBoardFrontle}' , '${info.spmBoardFrontrg}' , '${info.spmBoardLaterle}' ,
'${info.spmBoardLaterrg}' , '${info.spmCab}' , '${info.spmCabinht}' , '${info.spmCountrycd}' , '${info.spmEdicd}' , '${info.spmId}' ,
'${info.spmLightWeight}' , '${info.spmMadeTime}' , '${info.spmMintide}' , '${info.spmMmsi}' , '${info.spmNationality}' , '${info.spmPilot}' ,
'${info.spmPilotName}' , '${info.spmRemark}' , '${info.spmShipSign}' , '${info.spmShipType}' , '${info.spmTotalCargo}' , '${info.spmTrade}' ,
'${info.spmTradeName}' , '${info.tenantId}' , '${info.termcd}' , '${info.valid}' , '${info.vslAudio}' , '${info.vslBaynum}' ,
'${info.vslBkbaynum}' , '${info.vslBkendbay}' , '${info.vslBkstartbay}' , '${info.vslBksternnum}' , '${info.vslBreadth}' , '${info.vslCallid}' ,
'${info.vslCallsign}' , '${info.vslCd}' , '${info.vslCnname}' , '${info.vslCstAgency}' , '${info.vslCstShippingline}' , '${info.vslCtyCountrycd}' ,
'${info.vslDeckmaxrows}' , '${info.vslDeckmaxtiers}' , '${info.vslDepth}' , '${info.vslDerrickamount}' , '${info.vslDraftload}' , '${info.vslDraftunload}' ,
'${info.vslEndlength}' , '${info.vslEnname}' , '${info.vslGton}' , '${info.vslHatchamount}' , '${info.vslHatchcoveramount}' , '${info.vslHatchmaxrows}' ,
'${info.vslHatchmaxtiers}' , '${info.vslImono}' , '${info.vslLcg}' , '${info.vslLoa}' , '${info.vslLoaddisargereq}' , '${info.vslMadedt}' ,
'${info.vslNetton}' , '${info.vslOrigin}' , '${info.vslPilotage}' , '${info.vslRfsocket}' , '${info.vslSailspeed}' , '${info.vslSpoptp}' ,
'${info.vslStdId}' , '${info.vslStopsign}' , '${info.vslStowagereq}' , '${info.vslSummaryloading}' , '${info.vslTcg}' , '${info.vslTotallocation}' ,
2024-03-06 10:22:11 +08:00
'${info.vslUncode}' , '${info.vslVcg}' , '${info.vslVtpcode}' , '${webDate}' , '${info.actualBerthingTime}' ) `
2023-08-03 15:36:23 +08:00
this . executeSql ( sql )
} ,
2023-11-01 18:40:05 +08:00
// 船舶计划信息
shipPlanInfo ( info ) {
let webId = uuidv4 ( )
let sql =
` insert into voyageScheduleDataPadRespDTO values(' ${ webId } ',' ${ this . vtpId } ',' ${ info . berthStatus } ',' ${ info . confirmTime } ',' ${ info . pamId } ',' ${ info . planAnchoringTime } ',
'${info.planArrivePortTime}' , '${info.planBerthage}' , '${info.planBerthageName}' , '${info.planBerthingTime}' , '${info.planDeparturePortTime}' ,
'${info.shipmentStatus}' , '${info.spmId}' , '${info.spmName}' ) `
this . executeSql ( sql )
info . voyageScheduleDataDetailRespDTOList . forEach ( v => {
let webId2 = uuidv4 ( )
let sql2 =
` insert into voyageScheduleDataDetailRespDTOList values(' ${ webId2 } ',' ${ this . vtpId } ',
'${webId}' , '${v.importExportFlag}' , '${v.importExportFlagName}' , '${v.lcoId}' , '${v.lcoName}' ,
'${v.pamId}' , '${v.planAmount}' , '${v.planCarAmount}' , '${v.planFinishTime}' , '${v.planNum}' , '${v.planOtherAmount}' ,
'${v.planParts}' , '${v.planRetallyAmount}' , '${v.planStartTime}' , '${v.planTunnage}' , '${v.planVolume}' , '${v.planWeight}' ,
'${v.shipAgentId}' , '${v.shipAgentName}' , '${v.shipComId}' , '${v.shipComName}' , '${v.spmId}' , '${v.spmName}' ,
'${v.teamNum}' , '${v.tradeType}' , '${v.tradeTypeName}' , '${v.vgdGoodName}' , '${v.votId}' , '${v.vvyId}' ,
'${v.vvyName}' ) `
this . executeSql ( sql2 )
} )
2023-08-03 15:36:23 +08:00
} ,
// 下载
download ( item ) {
2023-11-01 18:40:05 +08:00
let sum = 0
this . vtpList . forEach ( v => {
if ( item . vtpId == v ) {
sum ++
}
} )
if ( sum == 0 ) {
if ( item . padLockStatus == 0 || item . padLockStatus == 1 ) {
this . lotusLoadingData . isShow = true
let vvyIds = [ ]
if ( item . inVvyId != null && item . outVvyId == null ) {
vvyIds . push ( item . inVvyId )
} else if ( item . outVvyId != null && item . inVvyId == null ) {
vvyIds . push ( item . outVvyId )
} else if ( item . inVvyId != null && item . outVvyId != null ) {
vvyIds . push ( item . inVvyId )
vvyIds . push ( item . outVvyId )
}
uni . request ( {
url : ` ${ this . $local } /api/shipOperate/download?vvyIds= ${ vvyIds } ` ,
header : {
'Content-Type' : 'application/json' , //自定义请求头信息
'Authorization' : ` Bearer ${ this . loginObj . access _token } `
} ,
method : 'GET' , //请求方式,必须为大写
success : ( res ) => {
console . log ( '接口返回------' , res ) ;
if ( res . statusCode == 200 ) {
uni . showToast ( {
title : ` 下载成功 ` ,
icon : 'success' ,
duration : 2000
} )
2023-11-28 17:52:09 +08:00
this . current = 1
this . initData ( 'new' )
2023-11-01 18:40:05 +08:00
this . lotusLoadingData . isShow = false
let date = new Date ( ) . getTime ( )
let webDate = api . getDate ( date )
this . vtpId = item . vtpId
uni . setStorageSync ( 'vtpId' , item . vtpId ) ;
this . downloadData = res . data . data
2023-11-13 10:11:34 +08:00
this . shipDataInfo ( this . downloadData . shipmentShipManage , item . vtpId )
2023-11-01 18:40:05 +08:00
this . optionData = [ ]
// 贸易类型
this . downloadData . epTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "epTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 装卸类型
this . downloadData . handTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "handTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 车型
this . downloadData . shipmentVehicleModeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "carList" ,
ptrCode : v . bvmId ,
ptrDesc : v . bvmName ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : v . bvmEnName
2023-11-01 18:40:05 +08:00
} )
} )
// 进出口
this . downloadData . ieTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "ieTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 装卸方式
this . downloadData . loadTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "loadTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 泊位
this . downloadData . pubBerthesManageRespList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "bthList" ,
ptrCode : v . bthId ,
ptrDesc : v . bthBthnm ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : v . bthEnBthnm
2023-11-01 18:40:05 +08:00
} )
} )
// 翻仓类型
this . downloadData . turnoverTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "turnoverTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 天气预报
2024-04-02 18:05:56 +08:00
// this.downloadData.weatherForecastList.forEach(v => {
this . downloadData . pubTypeWeather . forEach ( v => {
2023-11-01 18:40:05 +08:00
this . optionData . push ( {
dictionariesName : "weather" ,
2024-04-02 18:05:56 +08:00
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : v . ptrEnDesc
2023-11-01 18:40:05 +08:00
} )
} )
// 工班类型
this . downloadData . shipmentBasicShiftList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "shiftList" ,
ptrCode : v . pwcCode ,
ptrDesc : v . pwcTypeDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 供给类型
this . downloadData . supplyTypeList . forEach ( v => {
this . optionData . push ( {
dictionariesName : "supplyTypeList" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
// 航次下拉
this . downloadData . voyageScheduleDataPadRespDTO
. voyageScheduleDataDetailRespDTOList
. forEach ( v => {
this . optionData . push ( {
dictionariesName : "vvyList" ,
ptrCode : v . vvyId ,
ptrDesc : v . vvyName ,
2024-04-19 16:21:28 +08:00
ptrEnDesc : ''
2023-11-01 18:40:05 +08:00
} )
} )
2024-04-29 17:03:52 +08:00
// 机械类型
this . downloadData . pmtType . forEach ( v => {
this . optionData . push ( {
dictionariesName : "pmtType" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
ptrEnDesc : v . ptrEnDesc
} )
} )
// 超长类型
this . downloadData . pubTypeLengthType . forEach ( v => {
this . optionData . push ( {
dictionariesName : "pubTypeLengthType" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
ptrEnDesc : v . ptrEnDesc
} )
} )
// 港区类型
this . downloadData . portDetail . forEach ( v => {
this . optionData . push ( {
dictionariesName : "portDetail" ,
ptrCode : v . ptrCode ,
ptrDesc : v . ptrDesc ,
ptrEnDesc : v . ptrEnDesc
} )
} )
// 提单号数据
this . downloadData . mnfBlByVvyId . forEach ( item => {
item . mnfBls . forEach ( v => {
this . optionData . push ( {
dictionariesName : "mnfBlByVvyId" ,
ptrCode : '' ,
ptrDesc : v ,
ptrEnDesc : ''
} )
} )
} )
2023-11-01 18:40:05 +08:00
// 存下拉到数据库
this . xlData ( item . vtpId )
let webStatus = 1
// 工班基础信息表
if ( this . downloadData . shipmentBasicShiftList . length > 0 ) {
this . downloadData . shipmentBasicShiftList . forEach ( v => {
let webId = uuidv4 ( )
let sql = ` insert into shipmentBasicShiftList values(' ${ webId } ',' ${ item . vtpId } ',' ${ v . beginTime } ',' ${ v . endTime } ',
'${v.pwcCode}' , '${v.pwcType}' , '${v.pwcTypeDesc}' ) `
this . executeSql ( sql )
2023-09-23 20:16:54 +08:00
} )
}
2023-11-01 18:40:05 +08:00
// 杂项单证人员信息表
if ( this . downloadData . messageRespList . length > 0 ) {
this . downloadData . messageRespList . forEach ( v => {
let sql =
` insert into messageRespList values(' ${ v . pmeId } ',' ${ this . vtpId } ',' ${ v . bthId } ',' ${ v . bthIdName } ',
'${v.jobStartTime}' , '${v.jobEndTime}' , '${v.shipPerson}' , '${v.vvyId}' , '${v.vvyName}' , '${v.weatherType}' ,
'${v.weatherTypeDesc}' , '${v.workSuite}' , '${v.importExportFlagName}' , '${v.status}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 工班信息
let aId = uuidv4 ( )
if ( this . downloadData . workMessageRespList . length > 0 ) {
this . downloadData . workMessageRespList . forEach ( v => {
let sql =
` insert into workMessageRespList values(' ${ v . wkmId } ',' ${ this . vtpId } ',' ${ this . downloadData . shipmentShipManage . spmId } ',' ${ aId } ',
'${v.vvyId}' , '${v.vvyName}' , '${v.importExportFlagName}' , '${v.loadType}' , '${v.loadTypeName}' , '${v.pwcType}' ,
'${v.pwcTypeName}' , '${v.workStartTime}' , '${v.workEndTime}' , '${v.status}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
if ( v . workMessageDetailRespDTOS . length > 0 ) {
v . workMessageDetailRespDTOS . forEach ( v2 => {
let sql2 = ` insert into workMessageRespInfoList values(' ${ v2 . wkdId } ',' ${ this . vtpId } ',' ${ v2 . wkmId } ',' ${ v2 . carType } ',
2024-04-29 17:03:52 +08:00
'${v2.carTypeName}' , '${v2.goodsNumber}' , '${v2.loadingType}' , '${v2.loadingTypeName}' , '${v2.remark}' , '${v2.mnfBl}' ,
'${v2.weight}' , '${v2.volume}' , '${v2.lengthType}' , '${v2.pmtType}' , '${webStatus}' , '${v.createTime}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql2 )
} )
}
} )
}
let editStatus = 1
// 翻仓信息
if ( this . downloadData . retallyRespList . length > 0 ) {
this . downloadData . retallyRespList . forEach ( v => {
let sql =
` insert into retallyMessageRespList values(' ${ v . reyId } ',' ${ this . vtpId } ',' ${ this . downloadData . shipmentShipManage . spmId } ',' ${ aId } ',
'${v.reyVvyId}' , '${v.reyVvyName}' , '${v.retallyType}' , '${v.retallyTypeName}' , '${v.retallyOrigin}' , '${v.retallyTerminus}' ,
'${v.retallyStartTime}' , '${v.retallyEndTime}' , '${v.carType}' , '${v.carTypeName}' ,
2024-05-09 11:12:03 +08:00
'${v.goodsNumber}' , '${v.goodsVolume}' , '${v.goodsWeight}' , '${v.mafiGroupNum}' , '${v.mafiSize}' , '${editStatus}' , '${webStatus}' , '${webDate}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
} )
}
// 其他信息
if ( this . downloadData . infoRespList . length > 0 ) {
this . downloadData . infoRespList . forEach ( v => {
let sql =
` insert into infoRespList values(' ${ v . soiId } ',' ${ this . vtpId } ',' ${ this . downloadData . shipmentShipManage . spmId } ',' ${ aId } ',' ${ v . vvyId } ',
'${v.vvyIdDesc}' , '${v.tecNum}' , '${v.startTm}' , '${v.endTm}' , '${v.weight}' , '${v.volume}' , '${v.genNum}' ,
'${v.startTmPt}' , '${v.endTmPt}' , '${v.weightPt}' , '${v.volumePt}' , '${v.auxRemark}' ,
2024-05-22 16:04:54 +08:00
'${v.waitRemark}' , '${v.workRemark}' , '${webStatus}' , '${v.createTime}' , '${v.tecNumNext}' , '${v.genNumNext}' , '${v.remark}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
} )
}
// 系解缆
if ( this . downloadData . attachUnmoorRespList . length > 0 ) {
this . downloadData . attachUnmoorRespList . forEach ( v => {
let sql =
` insert into attachUnmoorRespList values(' ${ v . sauId } ',' ${ this . vtpId } ',' ${ v . shipDeadWeight } ',' ${ v . vvyId } ',
'${v.vvyName}' , '${v.importExportFlagName}' , '${v.bthId}' , '${v.bthIdName}' , '${v.attachTime}' , '${v.unmoorTime}' , '${v.shiftingBerthTime}' ,
'${v.noProductBerthStTime}' , '${v.noProductBerthEdTime}' , '${v.status}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 供给
if ( this . downloadData . shipmentShipSupplyRespList . length > 0 ) {
this . downloadData . shipmentShipSupplyRespList . forEach ( v => {
let sql =
` insert into shipmentShipSupplyRespList values(' ${ v . sssId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.stopBerthage}' , '${v.stopBerthageNm}' , '${v.supplyType}' , '${v.supplyTypeNm}' , '${v.supplyAmount}' ,
'${v.supplyDate}' , '${v.status}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 指导员作业布置
if ( this . downloadData . shipmentAdviserLayoutRespList . length > 0 ) {
this . downloadData . shipmentAdviserLayoutRespList . forEach ( v => {
let sql =
` insert into shipmentAdviserLayoutRespList values(' ${ v . altId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.bthId}' , '${v.bthIdName}' , '${v.pwcType}' , '${v.pwcTypeName}' , '${v.personNumber}' ,
'${v.loaderType}' , '${v.loaderTypeName}' , '${v.vehicleSize}' , '${v.sparePart}' , '${v.workTime}' ,
'${v.startTime}' , '${v.endTime}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 船舶装卸通知书
if ( this . downloadData . shipmentLoadUnloadNoticeRespList . length > 0 ) {
this . downloadData . shipmentLoadUnloadNoticeRespList . forEach ( v => {
let sql =
` insert into shipmentLoadUnloadNoticeRespList values(' ${ v . sluId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.workDate}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 质量意见征询
if ( this . downloadData . shipmentQualityConsultationRespList . length > 0 ) {
this . downloadData . shipmentQualityConsultationRespList . forEach ( v => {
2023-11-24 15:55:58 +08:00
let webId = uuidv4 ( )
2023-11-01 18:40:05 +08:00
let sql =
` insert into shipmentQualityConsultationRespList values(' ${ v . vqcId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.bthId}' , '${v.berth}' , '${v.handlingType}' , '${v.handlingName}' , '${v.vehiclesNumber}' , '${v.spareNumber}' ,
2024-03-07 13:58:14 +08:00
'${v.operationDate}' , '${webStatus}' , '${v.createTime}' , '${v.vehiclesNumberDe}' , '${v.spareNumberDe}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
2023-11-24 15:55:58 +08:00
let sql2 =
` insert into evaluateTable values(' ${ webId } ',' ${ this . vtpId } ',' ${ v . vqcId } ',' ${ v . evaluateOperate } ',' ${ v . evaluateSpeedSpecs } ',
'${v.evaluateNoRude}' , '${v.evaluateAttitude}' , '${v.otherComents}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql2 )
2023-11-01 18:40:05 +08:00
} )
}
// 异常情况
if ( this . downloadData . abnormalConditionRespList . length > 0 ) {
this . downloadData . abnormalConditionRespList . forEach ( v => {
let sql =
` insert into abnormalConditionRespList values(' ${ v . vacId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.type}' , '${v.remark}' , '${v.operationDate}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// mafi清单
if ( this . downloadData . mafiListRespList . length > 0 ) {
this . downloadData . mafiListRespList . forEach ( v => {
let sql =
` insert into mafiListRespList values(' ${ v . smlId } ',' ${ this . vtpId } ',' ${ v . vvyId } ',' ${ v . vvyName } ',' ${ v . importExportFlagName } ',
'${v.loadType}' , '${v.loadType}' , '${v.type}' , '${v.type}' , '${v.size}' ,
'${v.mafiBarcode}' , '${v.workDate}' , '${v.status}' , '${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql )
} )
}
// 船舶计划
this . shipPlanInfo ( this . downloadData . voyageScheduleDataPadRespDTO )
// 作业查询
2023-11-24 15:55:58 +08:00
if ( this . downloadData . shipmentShipLoadPlansRespList != null ) {
2023-11-01 18:40:05 +08:00
this . downloadData . shipmentShipLoadPlansRespList . forEach ( v => {
let sql =
` insert into shipmentShipLoadPlansRespList values(' ${ v . splId } ',' ${ this . vtpId } ',' ${ v . agentId } ',' ${ v . agentName } ',
'${v.amount}' , '${v.brdId}' , '${v.brdName}' , '${v.bvdId}' , '${v.bvdName}' , '${v.bvmId}' , '${v.bvmName}' ,
2023-12-08 17:42:10 +08:00
'${v.carHeight}' , '${v.carLength}' , '${v.carWidth}' , '${v.consignee}' , '${v.customsDeclareNo}' ,
'${v.customsDeclareStatus}' , '${v.ieFg}' , '${v.ieFgNm}' , '${v.mnfBl}' , '${v.model}' ,
'${v.potId}' , '${v.potName}' , '${v.sourceType}' , '${v.sourceTypeNm}' , '${v.spmId}' ,
'${v.telephone}' , '${v.ticketGtpks}' , '${v.ticketVolume}' , '${v.ticketWeight}' , '${v.tradeType}' ,
'${v.tradeTypeNm}' , '${v.volume}' , '${v.vslCnname}' ,
'${v.vvyId}' , '${v.vvyName}' , '${v.weight}' ,
'${v.yardPos}' , '${webStatus}' , '${v.createTime}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
if ( v . workQueryDetails != null ) {
let sql2 =
2023-12-08 17:42:10 +08:00
` insert into workQueryDetails values(' ${ v . workQueryDetails . splId } ',' ${ this . vtpId } ',' ${ v . splId } ',
'${v.workQueryDetails.agentId}' ,
'${v.workQueryDetails.agentName}' , '${v.workQueryDetails.amount}' , '${v.workQueryDetails.brdId}' ,
'${v.workQueryDetails.brdName}' ,
'${v.workQueryDetails.bvdId}' , '${v.workQueryDetails.bvdName}' , '${v.workQueryDetails.bvmId}' ,
'${v.workQueryDetails.bvmName}' ,
'${v.workQueryDetails.carHeight}' , '${v.workQueryDetails.carLength}' , '${v.workQueryDetails.carWidth}' ,
'${v.workQueryDetails.consignee}' , '${v.workQueryDetails.customsDeclareNo}' ,
'${v.workQueryDetails.customsDeclareStatus}' ,
'${v.workQueryDetails.ieFg}' , '${v.workQueryDetails.ieFgNm}' , '${v.workQueryDetails.mnfBl}' ,
'${v.workQueryDetails.model}' ,
'${v.workQueryDetails.potId}' , '${v.workQueryDetails.potName}' , '${v.workQueryDetails.sourceType}' ,
'${v.workQueryDetails.sourceTypeNm}' ,
'${v.workQueryDetails.spmId}' , '${v.workQueryDetails.telephone}' , '${v.workQueryDetails.ticketGtpks}' ,
'${v.workQueryDetails.ticketVolume}' , '${v.workQueryDetails.ticketWeight}' ,
'${v.workQueryDetails.tradeType}' , '${v.workQueryDetails.tradeTypeNm}' , '${v.workQueryDetails.volume}' ,
'${v.workQueryDetails.vslCnname}' , '${v.workQueryDetails.vvyId}' ,
'${v.workQueryDetails.vvyName}' , '${v.workQueryDetails.weight}' , '${v.workQueryDetails.yardPos}' ,
'${webStatus}' , '${v.createTime}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql2 )
2023-12-08 17:42:10 +08:00
v . workQueryDetails . vinCodeDetails . forEach ( e => {
let sql3 = ` insert into vinCodeDetails values(' ${ e . spdId } ',' ${ this . vtpId } ',' ${ e . splId } ',' ${ e . godId } ',
'${e.storeArea}' , '${e.storeLine}' , '${e.storeSeat}' , '${e.vinCode}' , '${e.yacId}' , '${e.yardId}' ,
'${e.yardName}' , '${e.yardPos}' ,
'${webStatus}' , '${v.createTime}' ) `
this . executeSql ( sql3 )
} )
2023-11-01 18:40:05 +08:00
}
} )
}
// 单证签名图片
if ( this . downloadData . signAppendixRespList . length > 0 ) {
this . downloadData . signAppendixRespList . forEach ( v => {
let sql =
` insert into workSignTable values(' ${ v . swsId } ',' ${ this . vtpId } ',' ${ v . bizId } ',' ${ v . signFile } ',' ${ v . bizType } ',' ${ v . sort } ',
2023-11-24 15:55:58 +08:00
'${v.vvyId}' , '${webDate}' ) `
2023-11-01 18:40:05 +08:00
this . executeSql ( sql )
} )
}
// 删除人员信息 ID 集合
uni . setStorageSync ( 'delPmIds' , [ ] )
// 删除工班信息 ID 集合
uni . setStorageSync ( 'delSwmIds' , [ ] )
// 删除翻仓信息展示 ID 集合
uni . setStorageSync ( 'delSrmIds' , [ ] )
// 删除单证作业其他信息ID 集合
uni . setStorageSync ( 'delSoiIds' , [ ] )
// 删除 单证-系解缆 ID 集合
uni . setStorageSync ( 'delSauIds' , [ ] )
// 删除船舶供给 ID 集合
uni . setStorageSync ( 'delSsIds' , [ ] )
// 删除指导员作业布置 ID 集合
uni . setStorageSync ( 'delAlIds' , [ ] )
// 删除船舶装卸通知书 ID 集合
uni . setStorageSync ( 'delLnIds' , [ ] )
// 删除质量意见征询单 ID 集合
uni . setStorageSync ( 'delCsIds' , [ ] )
// 删除异常情况单 ID 集合
uni . setStorageSync ( 'delCtIds' , [ ] )
// 删除MAFI ID 集合
uni . setStorageSync ( 'delMfIds' , [ ] )
} else {
uni . showToast ( {
title : ` 下载失败 ` ,
icon : 'error' ,
duration : 2000
} )
this . lotusLoadingData . isShow = false
}
2023-09-23 20:16:54 +08:00
}
2023-11-01 18:40:05 +08:00
} )
} else {
uni . showToast ( {
icon : 'none' ,
2024-04-09 14:20:21 +08:00
title : '该船名航次已被其他用户下载,不可再次下载'
2023-11-01 18:40:05 +08:00
} ) ;
2023-09-23 20:16:54 +08:00
}
2023-11-01 18:40:05 +08:00
} else {
uni . showToast ( {
icon : 'none' ,
title : '有单证未上传,请先上传信息后再下载'
} ) ;
}
2023-07-13 16:46:06 +08:00
} ,
2023-07-17 17:10:05 +08:00
// 上传
upload ( item ) {
2023-11-01 18:40:05 +08:00
if ( item . padLockStatus == 0 ) {
this . lotusLoadingData . isShow = true
this . allArr . forEach ( v => {
this . executeSql1 ( v , item . vtpId )
} )
let that = this
setTimeout ( function ( ) {
that . workMessageRespList . forEach ( v => {
that . workMessageRespInfoList . forEach ( v2 => {
if ( v . webId == v2 . contactId ) {
v . workMessageDetailReqDTOS . push ( v2 )
}
} )
} )
2023-11-24 15:55:58 +08:00
that . shipmentQualityConsultationRespList . forEach ( v => {
that . evaluateTable . forEach ( v2 => {
if ( v . vqcId == v2 . signId ) {
that . $set ( v , "evaluateOperate" , v2 . evaluate )
that . $set ( v , "evaluateSpeedSpecs" , v2 . evaluate2 )
that . $set ( v , "evaluateNoRude" , v2 . evaluate3 )
that . $set ( v , "evaluateAttitude" , v2 . evaluate4 )
that . $set ( v , "otherComents" , v2 . remake )
}
} )
} )
2023-11-01 18:40:05 +08:00
let delPmIds = uni . getStorageSync ( "delPmIds" )
2023-11-16 18:04:18 +08:00
if ( delPmIds == null || delPmIds == "" ) {
delPmIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delSwmIds = uni . getStorageSync ( "delSwmIds" )
2023-11-16 18:04:18 +08:00
if ( delSwmIds == null || delSwmIds == "" ) {
delSwmIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delSrmIds = uni . getStorageSync ( "delSrmIds" )
2023-11-16 18:04:18 +08:00
if ( delSrmIds == null || delSrmIds == "" ) {
delSrmIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delSoiIds = uni . getStorageSync ( "delSoiIds" )
2023-11-16 18:04:18 +08:00
if ( delSoiIds == null || delSoiIds == "" ) {
delSoiIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delSauIds = uni . getStorageSync ( "delSauIds" )
2023-11-16 18:04:18 +08:00
if ( delSauIds == null || delSauIds == "" ) {
delSauIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delSsIds = uni . getStorageSync ( "delSsIds" )
2023-11-16 18:04:18 +08:00
if ( delSsIds == null || delSsIds == "" ) {
delSsIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delAlIds = uni . getStorageSync ( "delAlIds" )
2023-11-16 18:04:18 +08:00
if ( delAlIds == null || delAlIds == "" ) {
delAlIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delLnIds = uni . getStorageSync ( "delLnIds" )
2023-11-16 18:04:18 +08:00
if ( delLnIds == null || delLnIds == "" ) {
delLnIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delCsIds = uni . getStorageSync ( "delCsIds" )
2023-11-16 18:04:18 +08:00
if ( delCsIds == null || delCsIds == "" ) {
delCsIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delCtIds = uni . getStorageSync ( "delCtIds" )
2023-11-16 18:04:18 +08:00
if ( delCtIds == null || delCtIds == "" ) {
delCtIds = [ ]
}
2023-11-01 18:40:05 +08:00
let delMfIds = uni . getStorageSync ( "delMfIds" )
2023-11-16 18:04:18 +08:00
if ( delMfIds == null || delMfIds == "" ) {
delMfIds = [ ]
}
2024-04-19 16:21:28 +08:00
let workSignTableArr = [ ]
that . workSignTable . forEach ( item => {
if ( item . vvyId . indexOf ( '/' ) != - 1 ) {
workSignTableArr . push (
{
webId : item . webId ,
vtpId : item . vtpId ,
bizId : item . bizId ,
signFile : item . signFile ,
bizType : item . bizType ,
sort : item . sort ,
vvyId : item . vvyId . split ( '/' ) [ 0 ] ,
webDate : item . webDate ,
} ,
{
webId : item . webId ,
vtpId : item . vtpId ,
bizId : item . bizId ,
signFile : item . signFile ,
bizType : item . bizType ,
sort : item . sort ,
vvyId : item . vvyId . split ( '/' ) [ 1 ] ,
webDate : item . webDate ,
}
)
} else {
workSignTableArr . push ( item )
}
} )
2023-11-01 18:40:05 +08:00
let workDataInfo = {
"adviserLayoutReqList" : that . shipmentAdviserLayoutRespList , // 指导员作业布置
"conditionReqList" : that . abnormalConditionRespList , // 异常情况单
"consultationReqList" : that . shipmentQualityConsultationRespList , // 质量意见征询单
"delAlIds" : delAlIds , // 删除指导员作业布置 ID 集合
"delCsIds" : delCsIds , // 删除质量意见征询单 ID 集合
"delCtIds" : delCtIds , // 删除异常情况单 ID 集合
"delLnIds" : delLnIds , // 删除船舶装卸通知书 ID 集合
"delMfIds" : delMfIds , // 删除MAFI ID 集合
"delPmIds" : delPmIds , // 删除人员信息 ID 集合
"delSauIds" : delSauIds , // 删除 单证-系解缆 ID 集合
"delSiIds" : [ ] , // 删除安全巡检 ID 集合
"delSoiIds" : delSoiIds , // 删除单证作业其他信息ID 集合
"delSrmIds" : delSrmIds , // 删除翻仓信息展示 ID 集合
"delSsIds" : delSsIds , // 删除船舶供给 ID 集合
"delSwmIds" : delSwmIds , // 删除工班信息 ID 集合
"inVvyId" : item . inVvyId , // 进口航次ID
"loadUnloadNoticeReqList" : that . shipmentLoadUnloadNoticeRespList , // 船舶装卸通知书
"outVvyId" : item . outVvyId , // 出口航次ID
"personMessageReqList" : that . messageRespList , // 人员信息
"shipmentAttachUnmoorReqList" : that . attachUnmoorRespList , // 单证-系解缆
"shipmentMafiListReqList" : that . mafiListRespList , // MAFI
"shipmentOtherInfoReqList" : that . infoRespList , // 单证作业其他信息
"shipmentRetallyReqList" : that . retallyMessageRespList , // 单证-翻仓信息展示
"shipmentSafetyInspectionReqList" : [ ] , // 安全巡检
"shipmentShipSupplyReqList" : that . shipmentShipSupplyRespList , // 船舶供给
"shipmentWorkMessageReqList" : that . workMessageRespList , // 单证-工班信息
2024-04-19 16:21:28 +08:00
// "shipmentWorkSignAppendixReqList": that.workSignTable,
"shipmentWorkSignAppendixReqList" : workSignTableArr , //签名保存数组
2023-11-01 18:40:05 +08:00
"vtpId" : item . vtpId
}
2024-04-19 16:21:28 +08:00
console . log ( '上传参数' , workDataInfo )
2023-11-01 18:40:05 +08:00
uni . request ( {
url : that . $local + '/api/shipOperate/upload' ,
data : workDataInfo ,
header : {
'Content-Type' : 'application/json' , //自定义请求头信息
'Authorization' : ` Bearer ${ that . loginObj . access _token } `
} ,
method : 'POST' , //请求方式,必须为大写
success : ( res ) => {
2024-04-19 16:21:28 +08:00
console . log ( '上传接口返回------' , res ) ;
2023-11-01 18:40:05 +08:00
that . lotusLoadingData . isShow = false
if ( res . data . status == 200 ) {
that . allList . forEach ( v => {
let sql =
` delete from ${ v } WHERE vtpId = ' ${ item . vtpId } '; `
that . executeSql ( sql )
} )
that . vtpList . forEach ( ( v , index ) => {
if ( item . vtpId == v ) {
that . vtpList . splice ( index , 1 )
}
} )
2023-11-28 17:52:09 +08:00
that . current = 1
that . initData ( 'new' )
2023-11-01 18:40:05 +08:00
uni . showToast ( {
title : ` 上传成功 ` ,
icon : 'success' ,
duration : 2000
} )
// 重置删除集合
// 删除人员信息 ID 集合
uni . setStorageSync ( 'delPmIds' , [ ] )
// 删除工班信息 ID 集合
uni . setStorageSync ( 'delSwmIds' , [ ] )
// 删除翻仓信息展示 ID 集合
uni . setStorageSync ( 'delSrmIds' , [ ] )
// 删除单证作业其他信息ID 集合
uni . setStorageSync ( 'delSoiIds' , [ ] )
// 删除 单证-系解缆 ID 集合
uni . setStorageSync ( 'delSauIds' , [ ] )
// 删除船舶供给 ID 集合
uni . setStorageSync ( 'delSsIds' , [ ] )
// 删除指导员作业布置 ID 集合
uni . setStorageSync ( 'delAlIds' , [ ] )
// 删除船舶装卸通知书 ID 集合
uni . setStorageSync ( 'delLnIds' , [ ] )
// 删除质量意见征询单 ID 集合
uni . setStorageSync ( 'delCsIds' , [ ] )
// 删除异常情况单 ID 集合
uni . setStorageSync ( 'delCtIds' , [ ] )
// 删除MAFI ID 集合
uni . setStorageSync ( 'delMfIds' , [ ] )
2023-11-28 17:52:09 +08:00
// 重置评价表
uni . setStorageSync ( 'evaluate' , "1" )
uni . setStorageSync ( 'current' , 0 )
uni . setStorageSync ( 'evaluate2' , "1" )
uni . setStorageSync ( 'current2' , 0 )
uni . setStorageSync ( 'evaluate3' , "1" )
uni . setStorageSync ( 'current3' , 0 )
uni . setStorageSync ( 'evaluate4' , "1" )
uni . setStorageSync ( 'current4' , 0 )
uni . setStorageSync ( 'remake' , "" )
2023-11-01 18:40:05 +08:00
} else {
uni . showToast ( {
title : res . data . error _description ,
icon : 'none' ,
duration : 2000
} )
}
}
} )
} , 2000 ) ;
} else {
uni . showToast ( {
icon : 'none' ,
2024-04-09 14:20:21 +08:00
title : '该船名航次已被其他用户下载,不可再次上传'
2023-11-01 18:40:05 +08:00
} ) ;
2023-07-17 17:10:05 +08:00
}
2023-11-01 18:40:05 +08:00
} ,
executeSql ( sql , tableName ) {
let that = this
sqlite . executeSqlCeshi ( sql ) . then ( ( value ) => {
// 在resolve时执行的回调函数
if ( tableName == "shipInfoTable" ) {
value . forEach ( v => {
this . vtpList . push ( v . vtpId )
} )
2024-01-26 18:02:31 +08:00
} else if ( tableName == "messageRespList" ) {
2023-11-01 18:40:05 +08:00
that . messageRespList = value
} else if ( tableName == "workMessageRespList" ) {
that . workMessageRespList = value
that . workMessageRespList . forEach ( v => {
that . $set ( v , "wkmId" , v . webId )
that . $set ( v , "workMessageDetailReqDTOS" , [ ] )
} )
} else if ( tableName == "workMessageRespInfoList" ) {
that . workMessageRespInfoList = value
that . workMessageRespInfoList . forEach ( v => {
that . $set ( v , "wkdId" , v . webId )
} )
} else if ( tableName == "retallyMessageRespList" ) {
that . retallyMessageRespList = value
that . retallyMessageRespList . forEach ( v => {
that . $set ( v , "reyId" , v . webId )
2023-11-24 15:55:58 +08:00
if ( v . retallyStartTime == "null" ) {
that . $set ( v , "retallyStartTime" , null )
}
if ( v . retallyEndTime == "null" ) {
that . $set ( v , "retallyEndTime" , null )
}
2023-11-01 18:40:05 +08:00
} )
} else if ( tableName == "infoRespList" ) {
value . forEach ( v => {
if ( v . tecNum > 0 || v . genNum > 0 ) {
that . infoRespList . push ( v )
}
} )
that . infoRespList . forEach ( v => {
that . $set ( v , "soiId" , v . webId )
} )
} else if ( tableName == "attachUnmoorRespList" ) {
that . attachUnmoorRespList = value
2024-01-26 18:02:31 +08:00
that . attachUnmoorRespList . forEach ( v => {
if ( v . attachTime == "null" ) {
that . $set ( v , "attachTime" , null )
}
if ( v . unmoorTime == "null" ) {
that . $set ( v , "unmoorTime" , null )
}
if ( v . shiftingBerthTime == "null" ) {
that . $set ( v , "shiftingBerthTime" , null )
}
if ( v . noProductBerthStTime == "null" ) {
that . $set ( v , "noProductBerthStTime" , null )
}
if ( v . noProductBerthEdTime == "null" ) {
that . $set ( v , "noProductBerthEdTime" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "shipmentShipSupplyRespList" ) {
that . shipmentShipSupplyRespList = value
2024-01-26 18:02:31 +08:00
that . shipmentShipSupplyRespList . forEach ( v => {
if ( v . supplyDate == "null" ) {
that . $set ( v , "supplyDate" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "shipmentAdviserLayoutRespList" ) {
that . shipmentAdviserLayoutRespList = value
2024-01-26 18:02:31 +08:00
that . shipmentAdviserLayoutRespList . forEach ( v => {
if ( v . workTime == "null" ) {
that . $set ( v , "workTime" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "shipmentLoadUnloadNoticeRespList" ) {
that . shipmentLoadUnloadNoticeRespList = value
2024-01-26 18:02:31 +08:00
that . shipmentLoadUnloadNoticeRespList . forEach ( v => {
if ( v . workDate == "null" ) {
that . $set ( v , "workDate" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "shipmentQualityConsultationRespList" ) {
that . shipmentQualityConsultationRespList = value
2024-01-26 18:02:31 +08:00
that . shipmentQualityConsultationRespList . forEach ( v => {
if ( v . operationDate == "null" ) {
that . $set ( v , "operationDate" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "abnormalConditionRespList" ) {
that . abnormalConditionRespList = value
2024-01-26 18:02:31 +08:00
that . abnormalConditionRespList . forEach ( v => {
if ( v . operationDate == "null" ) {
that . $set ( v , "operationDate" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "mafiListRespList" ) {
that . mafiListRespList = value
2024-01-26 18:02:31 +08:00
that . mafiListRespList . forEach ( v => {
if ( v . workDate == "null" ) {
that . $set ( v , "workDate" , null )
}
} )
2023-11-01 18:40:05 +08:00
} else if ( tableName == "workSignTable" ) {
that . workSignTable = value
2023-11-24 15:55:58 +08:00
} else if ( tableName == 'evaluateTable' ) {
that . evaluateTable = value
2023-12-08 17:42:10 +08:00
that . evaluateTable . forEach ( v => {
if ( v . evaluate == "null" ) {
that . $set ( v , "evaluate" , null )
}
if ( v . evaluate2 == "null" ) {
that . $set ( v , "evaluate2" , null )
}
if ( v . evaluate3 == "null" ) {
that . $set ( v , "evaluate3" , null )
}
if ( v . evaluate4 == "null" ) {
that . $set ( v , "evaluate4" , null )
}
if ( v . remake == "null" ) {
that . $set ( v , "remake" , null )
}
} )
2023-07-17 17:10:05 +08:00
}
2023-11-01 18:40:05 +08:00
} ) . catch ( ( error ) => {
// 在reject时执行的回调函数
console . error ( error ) ;
} ) ;
} ,
// 查
executeSql1 ( tableName , id ) {
let sql = ` select * from ${ tableName } WHERE vtpId = ' ${ id } '; `
2024-05-09 11:12:03 +08:00
// if(tableName == 'workSignTable') sql = `SELECT webId,vtpId,strftime('%Y-%m-%d', bizId) as bizId,signFile,bizType,sort,vvyId,webDate FROM workSignTable t WHERE vtpId='${id}';`
2023-11-01 18:40:05 +08:00
this . executeSql ( sql , tableName )
2023-07-17 17:10:05 +08:00
} ,
toGo ( item ) {
2023-11-01 18:40:05 +08:00
let sum = 0
this . vtpList . forEach ( v => {
if ( item . vtpId == v ) {
sum ++
}
2023-07-13 11:18:17 +08:00
} )
2023-11-01 18:40:05 +08:00
if ( sum > 0 ) {
uni . setStorageSync ( 'vtpId' , item . vtpId )
if ( item . downloadStatus == '已下载' ) {
uni . navigateTo ( {
url : ` /pages/shipWork/documentList `
} )
} else {
uni . showToast ( {
icon : 'none' ,
title : '当前船只没下载,请下载后进入船只'
} ) ;
}
} else {
uni . showToast ( {
icon : 'none' ,
title : '当前船只没下载或者已经上传,请重新下载后进入船只'
} ) ;
}
2023-07-13 11:18:17 +08:00
}
2023-07-05 10:56:11 +08:00
}
} ;
< / script >
2023-07-13 16:46:06 +08:00
< style lang = "less" scoped >
2023-07-05 10:56:11 +08:00
. container {
background - color : # f5f6fa ;
display : flex ;
2023-11-01 18:40:05 +08:00
min - height : calc ( 100 vh - 68 px ) ;
2023-11-13 10:11:34 +08:00
margin - top : 66 px ;
2023-07-05 10:56:11 +08:00
}
. content {
2023-11-01 18:40:05 +08:00
min - height : calc ( 100 vh - 68 px ) ;
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
. form {
2023-11-21 17:43:02 +08:00
width : 100 % ;
background : # f5f6fa ;
2023-07-05 10:56:11 +08:00
display : flex ;
2023-11-21 17:43:02 +08:00
position : fixed ;
top : 66 px ;
right : 0 ;
z - index : 995 ;
padding : 16 px ;
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
. select {
2023-07-13 16:46:06 +08:00
width : 200 px ;
2023-11-28 17:52:09 +08:00
margin - right : 15 px ;
2023-07-05 10:56:11 +08:00
}
2023-07-06 17:08:59 +08:00
2023-07-05 10:56:11 +08:00
. input {
width : 200 px ;
height : 35 px ;
line - height : 35 px ;
margin - left : 15 px ;
}
2023-07-13 16:46:06 +08:00
2023-07-25 13:18:37 +08:00
. searchBtn {
2023-07-13 16:46:06 +08:00
height : 35 px ;
line - height : 35 px ;
2023-07-25 13:18:37 +08:00
margin - left : 0 ;
2023-08-18 17:28:11 +08:00
font - size : 16 px ;
color : # fff ;
background - color : # 0067 CF ;
2023-11-28 17:52:09 +08:00
margin - right : 1 px ;
2023-07-13 16:46:06 +08:00
}
2023-07-05 10:56:11 +08:00
}
. itemList {
width : 100 % ;
display : flex ;
2023-11-01 18:40:05 +08:00
justify - content : space - between ;
2023-07-05 10:56:11 +08:00
flex - wrap : wrap ;
2023-11-21 17:43:02 +08:00
padding : 16 px ;
2023-12-22 17:48:52 +08:00
margin - top : 40 px ;
padding - bottom : 50 px ;
2023-07-06 17:08:59 +08:00
2023-07-17 17:10:05 +08:00
/deep/ . o - empty {
width : 100 % ;
margin - top : 15 px ;
}
2023-07-05 10:56:11 +08:00
. item {
2023-11-01 18:40:05 +08:00
width : 32.5 % ;
2023-07-05 10:56:11 +08:00
margin - top : 15 px ;
2023-08-18 17:28:11 +08:00
background - color : # fff ;
border - radius : 8 px ;
2023-12-22 17:48:52 +08:00
padding : 16 px ;
2023-08-18 17:28:11 +08:00
position : relative ;
2023-07-05 10:56:11 +08:00
. title {
display : flex ;
2023-12-22 17:48:52 +08:00
margin - bottom : 24 px ;
2023-08-18 17:28:11 +08:00
image {
width : 32 px ;
height : 32 px ;
margin - right : 12 px ;
}
. name {
margin - top : 5 px ;
font - size : 16 px ;
color : # 23262 E ;
font - weight : bold ;
}
2023-07-05 10:56:11 +08:00
}
. row {
display : flex ;
justify - content : space - between ;
2023-12-22 17:48:52 +08:00
font - size : 16 px ;
margin - bottom : 12 px ;
2023-07-05 10:56:11 +08:00
2023-07-06 17:08:59 +08:00
. nitem {
width : 46 % ;
2023-12-22 17:48:52 +08:00
overflow : hidden ;
text - overflow : ellipsis ;
white - space : nowrap ;
color : # 999 ;
2023-07-06 17:08:59 +08:00
2023-12-22 17:48:52 +08:00
text {
color : # 23262 e ;
2023-07-06 17:08:59 +08:00
}
2023-07-05 10:56:11 +08:00
}
}
2023-07-06 17:08:59 +08:00
. footer {
2023-07-17 17:10:05 +08:00
width : 100 % ;
2023-12-22 17:48:52 +08:00
height : 42 px ;
2023-07-06 17:08:59 +08:00
display : flex ;
2023-08-18 17:28:11 +08:00
justify - content : flex - end ;
border - top : 1 px solid # EEEEEE ;
2023-12-22 17:48:52 +08:00
padding - top : 14 px ;
2023-07-06 17:08:59 +08:00
. fitem {
2023-08-18 17:28:11 +08:00
display : flex ;
2023-07-06 17:08:59 +08:00
}
2023-08-18 17:28:11 +08:00
button {
width : 72 px ;
height : 28 px ;
line - height : 28 px ;
border - radius : 4 px ;
margin - right : 16 px ;
font - size : 14 px ;
2023-08-24 16:22:29 +08:00
border : 1 px solid rgba ( 0 , 0 , 0 , .2 ) ;
2023-08-18 17:28:11 +08:00
}
. fitem1 {
2023-08-24 16:22:29 +08:00
border : 1 px solid # FC8300 ;
color : # FC8300 ;
background : # fff ;
/deep/ : after {
border : none ;
}
2023-08-18 17:28:11 +08:00
}
. fitem2 {
background : # 0067 CF ;
color : # fff ;
}
}
. statusBox {
. statusInfo {
margin - bottom : 3 px ;
padding : 5 px ;
background : # F1F8FF ;
border - radius : 4 px ;
font - size : 12 px ;
color : # 0067 CF ;
text : first - child {
margin - right : 10 px ;
}
}
. notStatus {
background : # FFF7EE ;
color : # FC8300 ;
text : first - child {
margin - right : 0 ;
}
}
}
. statusBox1 {
position : absolute ;
2023-11-28 17:52:09 +08:00
top : 10 px ;
2023-08-18 17:28:11 +08:00
right : 5 px ;
}
. statusBox2 {
position : absolute ;
2023-11-28 17:52:09 +08:00
top : 40 px ;
2023-08-18 17:28:11 +08:00
right : 5 px ;
2023-07-06 17:08:59 +08:00
}
2023-07-05 10:56:11 +08:00
}
2023-11-01 18:40:05 +08:00
. item : nth - child ( 3 n ) {
2023-07-05 10:56:11 +08:00
margin - right : 0 ;
}
}
2023-07-17 17:10:05 +08:00
. pageBox {
margin - top : 20 px ;
}
2023-07-05 10:56:11 +08:00
}
2023-07-13 11:18:17 +08:00
< / style >