sqlite单证
parent
3fd7abbb09
commit
ab1bc2129f
|
@ -0,0 +1,88 @@
|
||||||
|
import sqlite from './sqlite.js'
|
||||||
|
module.exports = {
|
||||||
|
dbName: 'dianji_chat',
|
||||||
|
dbPath: '_doc/dianji_chat.db',
|
||||||
|
// 创建所有表
|
||||||
|
createAllTable() {
|
||||||
|
this.createMessageRespList()
|
||||||
|
// this.createWorkMessageRespList()
|
||||||
|
this.creatAttachUnmoorRespList()
|
||||||
|
this.createShipmentShipSupplyRespList()
|
||||||
|
this.createShipmentAdviserLayoutRespList()
|
||||||
|
this.createShipmentLoadUnloadNoticeRespList()
|
||||||
|
this.createShipmentQualityConsultationRespList()
|
||||||
|
this.createAbnormalConditionRespList()
|
||||||
|
this.createMafiListRespList()
|
||||||
|
this.createSafetyInspectionRespList()
|
||||||
|
},
|
||||||
|
// 创建人员信息 messageRespList
|
||||||
|
createMessageRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists messageRespList ("webId" text NOT NULL,"bthId" text,"bthIdName" text,"jobStartTime" text,"jobEndTime" text,"shipPerson" text,"vvyId" text,"vvyName" text,"weatherId" text,"weatherType" text,"workSuite" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建工班信息 workMessageRespList
|
||||||
|
// createWorkMessageRespList() {
|
||||||
|
// console.log('创建表');
|
||||||
|
// let sql =
|
||||||
|
// 'CREATE TABLE if not exists workMessageRespList ("webId" text NOT NULL,"bthId" text,"bthIdName" text,"jobStartTime" text,"jobEndTime" text,"shipPerson" text,"vvyId" text,"vvyName" text,"weatherId" text,"weatherType" text,"workSuite" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
// this.executeSql(sql)
|
||||||
|
// },
|
||||||
|
// 创建系解缆 attachUnmoorRespList
|
||||||
|
creatAttachUnmoorRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists attachUnmoorRespList ("webId" text NOT NULL,"shipDeadWeight" text,"vvyId" text,"vvyName" text,"bthId" text,"bthIdName" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"attachTime" text,"unmoorTime" text,"shiftingBerthTime" text,"noProductBerthTime" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建供给 shipmentShipSupplyRespList
|
||||||
|
createShipmentShipSupplyRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists shipmentShipSupplyRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"stopBerthage" text,"stopBerthageName" text,"sssId" text,"supplyType" text,"supplyAmount" text,"supplyDate" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建指导员作业布置 shipmentAdviserLayoutRespList
|
||||||
|
createShipmentAdviserLayoutRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists shipmentAdviserLayoutRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"bthId" text,"bthIdName" text,"pwcTypeId" text,"pwcType" text,"personNumber" text,"loaderTypeId" text,"loaderType" text,"vehicleSize" text,"sparePart" text,"workTime" text,"startTime" text,"endTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建船舶装卸通知书 shipmentLoadUnloadNoticeRespList
|
||||||
|
createShipmentLoadUnloadNoticeRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists shipmentLoadUnloadNoticeRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"workDate" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建质量意见征询 shipmentQualityConsultationRespList
|
||||||
|
createShipmentQualityConsultationRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists shipmentQualityConsultationRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"bthId" text,"bthIdName" text,"loaderTypeId" text,"loaderType" text,"vehicleSize" text,"sparePart" text,"workTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建异常情况 abnormalConditionRespList
|
||||||
|
createAbnormalConditionRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists abnormalConditionRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"type" text,"remark" text,"workTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建mifi mafiListRespList
|
||||||
|
createMafiListRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists mafiListRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"loaderTypeId" text,"loaderType" text,"typeId" text,"type" text,"size" text,"mafiBarcode" text,"workDate" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
// 创建安全巡检 safetyInspectionRespList
|
||||||
|
createSafetyInspectionRespList() {
|
||||||
|
let sql =
|
||||||
|
'CREATE TABLE if not exists safetyInspectionRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"type" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="borTop" @click="tabsPort('center')">
|
<view class="borTop" @click="tabsPort('center')">
|
||||||
<uni-icons type="loop" size="16" />
|
<uni-icons type="loop" size="16" />
|
||||||
<text>切换港口</text>
|
<text>切换港区</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="borTop" @click="outLogin">
|
<view class="borTop" @click="outLogin">
|
||||||
<uni-icons type="undo" size="16" />
|
<uni-icons type="undo" size="16" />
|
||||||
|
@ -49,15 +49,15 @@
|
||||||
type: "",
|
type: "",
|
||||||
portList: [{
|
portList: [{
|
||||||
value: "1",
|
value: "1",
|
||||||
title: "港口1"
|
title: "港区1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "2",
|
value: "2",
|
||||||
title: "港口2"
|
title: "港区2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "3",
|
value: "3",
|
||||||
title: "港口3"
|
title: "港区3"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
portId: "",
|
portId: "",
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
showInfo() {
|
showInfo() {
|
||||||
this.infoType = !this.infoType
|
this.infoType = !this.infoType
|
||||||
},
|
},
|
||||||
// 点击切换港口
|
// 点击切换港区
|
||||||
tabsPort(type) {
|
tabsPort(type) {
|
||||||
this.type = type
|
this.type = type
|
||||||
this.$refs.popup.open(type)
|
this.$refs.popup.open(type)
|
||||||
|
|
|
@ -46,15 +46,15 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.portList = [{
|
this.portList = [{
|
||||||
value: "1",
|
value: "1",
|
||||||
title: "港口1"
|
title: "港区1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "2",
|
value: "2",
|
||||||
title: "港口2"
|
title: "港区2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "3",
|
value: "3",
|
||||||
title: "港口3"
|
title: "港区3"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -30,10 +31,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addAbnormalArr')
|
// this.infoList = uni.getStorageSync('addAbnormalArr')
|
||||||
|
this.executeSql1('abnormalConditionRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -54,6 +71,12 @@
|
||||||
url: `/pages/shipWork/abnormalAdd?params=${params}`
|
url: `/pages/shipWork/abnormalAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -133,9 +134,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
// let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
||||||
addAbnormalArr.splice(this.abnormalRowIndex, 1)
|
// addAbnormalArr.splice(this.abnormalRowIndex, 1)
|
||||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
// uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||||
|
let sql = `DELETE FROM abnormalConditionRespList WHERE webId = ${this.abnormalRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/abnormal'
|
url: '/pages/shipWork/abnormal'
|
||||||
})
|
})
|
||||||
|
@ -146,30 +149,48 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
let date = new Date().getTime()
|
||||||
let addAbnormalObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
type: this.type,
|
let webDate = this.getDate(date)
|
||||||
remark: this.remark,
|
|
||||||
workTime: this.workTime,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addAbnormalArr[this.abnormalRowIndex] = addAbnormalObj;
|
let sql =
|
||||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
`UPDATE abnormalConditionRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
type = '${this.type}',remark = '${this.remark}', workTime = '${this.workTime}',webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = '${this.abnormalRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addAbnormalArr != "") {
|
let sql = `insert into abnormalConditionRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addAbnormalArr.push(addAbnormalObj)
|
'${this.type}','${this.remark}','${this.workTime}',
|
||||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||||
} else {
|
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||||
addAbnormalArr = []
|
this.executeSql(sql)
|
||||||
addAbnormalArr.push(addAbnormalObj)
|
|
||||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
||||||
|
// let addAbnormalObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// type: this.type,
|
||||||
|
// remark: this.remark,
|
||||||
|
// workTime: this.workTime,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addAbnormalArr[this.abnormalRowIndex] = addAbnormalObj;
|
||||||
|
// uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addAbnormalArr != "") {
|
||||||
|
// addAbnormalArr.push(addAbnormalObj)
|
||||||
|
// uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||||
|
// } else {
|
||||||
|
// addAbnormalArr = []
|
||||||
|
// addAbnormalArr.push(addAbnormalObj)
|
||||||
|
// uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/abnormal'
|
url: '/pages/shipWork/abnormal'
|
||||||
})
|
})
|
||||||
|
@ -181,7 +202,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/abnormalAdd?params=${params}`
|
url: `/pages/shipWork/abnormalAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/abnormal'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -251,7 +251,13 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/carDetails`
|
url: `/pages/shipWork/carDetails`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -142,6 +142,12 @@
|
||||||
}
|
}
|
||||||
return newList
|
return newList
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/brandDetails'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -85,6 +85,12 @@
|
||||||
url: `/pages/shipWork/${url}`
|
url: `/pages/shipWork/${url}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/index'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -10,6 +10,13 @@
|
||||||
v-model="shipName" @input="input_json" @select="select_json"></superwei-combox>
|
v-model="shipName" @input="input_json" @select="select_json"></superwei-combox>
|
||||||
</view>
|
</view>
|
||||||
<button class="searchBtn" type="default" @click="search">搜索</button>
|
<button class="searchBtn" type="default" @click="search">搜索</button>
|
||||||
|
<button class="searchBtn" type="default" @click="isOpen">判断</button>
|
||||||
|
<button class="searchBtn" type="default" @click="open">打开</button>
|
||||||
|
<button class="searchBtn" type="default" @click="createTable">创建</button>
|
||||||
|
<button class="searchBtn" type="default" @click="dropTable">删除表</button>
|
||||||
|
<button class="searchBtn" type="default" @click="dropData">删除数据</button>
|
||||||
|
<button class="searchBtn" type="default" @click="add">新增</button>
|
||||||
|
<button class="searchBtn" type="default" @click="executeSql1('messageRespList')">查询</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemList">
|
<view class="itemList">
|
||||||
<template v-if="itemList.length > 0">
|
<template v-if="itemList.length > 0">
|
||||||
|
@ -88,6 +95,8 @@
|
||||||
<script>
|
<script>
|
||||||
import SideBar from '@/components/sider-bar/slider-bar';
|
import SideBar from '@/components/sider-bar/slider-bar';
|
||||||
import HeadInfo from '@/components/head-info/head-info';
|
import HeadInfo from '@/components/head-info/head-info';
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
|
import tableList from "../../common/createDataTable.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -104,6 +113,8 @@
|
||||||
total: 0,
|
total: 0,
|
||||||
pageSize: 4,
|
pageSize: 4,
|
||||||
current: 1,
|
current: 1,
|
||||||
|
|
||||||
|
shipInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -115,8 +126,84 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.pamValue = uni.getStorageSync('portObj').portId
|
this.pamValue = uni.getStorageSync('portObj').portId
|
||||||
|
this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
|
||||||
|
// 进页面创建表
|
||||||
|
tableList.createAllTable()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
open() {
|
||||||
|
plus.sqlite.openDatabase({
|
||||||
|
name: 'dianji_chat',
|
||||||
|
path: '_doc/dianji_chat.db',
|
||||||
|
success: function(e) {
|
||||||
|
console.log('打开数据库成功')
|
||||||
|
},
|
||||||
|
fail: function(e) {
|
||||||
|
console.log(e, '打开数据库失败')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
isOpen() {
|
||||||
|
let res = plus.sqlite.isOpenDatabase({
|
||||||
|
name: 'dianji_chat',
|
||||||
|
path: '_doc/dianji_chat.db',
|
||||||
|
});
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '数据库已打开'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '数据库未打开'
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
createTable() {
|
||||||
|
tableList.createAllTable()
|
||||||
|
},
|
||||||
|
dropTable() {
|
||||||
|
console.log('删除表');
|
||||||
|
let sql = 'DROP TABLE attachUnmoorRespList;'
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
dropData() {
|
||||||
|
let sql = "delete from messageRespList"
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
let data = this.shipInfo
|
||||||
|
data.forEach(v => {
|
||||||
|
let date = new Date().getTime()
|
||||||
|
let str = String(date)
|
||||||
|
v["id"] = Number(str.slice(str.length - 5))
|
||||||
|
})
|
||||||
|
let dbTable = 'messageRespList'
|
||||||
|
let sql = '';
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
sql = "insert into " + dbTable + " values('" + data[i].id + "','" + data[i].berthStatus + "')";
|
||||||
|
this.executeSql(sql)
|
||||||
|
console.log(data[i].id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
// this.sqlData = value
|
||||||
|
console.log(value); // 输出:Hello, World!
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = 'select * from ' + tableName
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 获取船的数据
|
// 获取船的数据
|
||||||
initData() {
|
initData() {
|
||||||
uni.request({
|
uni.request({
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<view class="title">马菲板号:{{item.mafiBarcode}}</view>
|
<view class="title">马菲板号:{{item.mafiBarcode}}</view>
|
||||||
<p>上传状态:未上传</p>
|
<p>上传状态:未上传</p>
|
||||||
<p>尺码:{{item.size}}</p>
|
<p>尺码:{{item.size}}</p>
|
||||||
<p>类型:{{item.lxTextValue}}</p>
|
<p>类型:{{item.type}}</p>
|
||||||
<p>装卸方式:{{item.loaderType}}</p>
|
<p>装卸方式:{{item.loaderType}}</p>
|
||||||
<p>航次:{{item.vvyName}}</p>
|
<p>航次:{{item.vvyName}}</p>
|
||||||
</view>
|
</view>
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -31,10 +32,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addMafiArr')
|
// this.infoList = uni.getStorageSync('addMafiArr')
|
||||||
|
this.executeSql1('mafiListRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -55,6 +72,12 @@
|
||||||
url: `/pages/shipWork/mafiAdd?params=${params}`
|
url: `/pages/shipWork/mafiAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>作业日期:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>作业日期:</p>
|
||||||
<uni-datetime-picker v-model="workTime" type="date" :clear-icon="false" @change="changeLog"
|
<uni-datetime-picker v-model="workDate" type="date" :clear-icon="false" @change="changeLog"
|
||||||
v-if="obj.state != 'look'" />
|
v-if="obj.state != 'look'" />
|
||||||
<text v-else>{{workTime}}</text>
|
<text v-else>{{workDate}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>马菲板号:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>马菲板号:</p>
|
||||||
|
@ -38,9 +38,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>类型:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>类型:</p>
|
||||||
<uni-data-select v-model="lxValue" :localdata="lxList" @change="lxChange"
|
<uni-data-select v-model="typeId" :localdata="lxList" @change="lxChange"
|
||||||
v-if="obj.state != 'look'"></uni-data-select>
|
v-if="obj.state != 'look'"></uni-data-select>
|
||||||
<text v-else>{{lxTextValue}}</text>
|
<text v-else>{{type}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>装卸类型:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>装卸类型:</p>
|
||||||
|
@ -64,6 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -82,20 +83,20 @@
|
||||||
vvyName: "",
|
vvyName: "",
|
||||||
hcList: [],
|
hcList: [],
|
||||||
// 作业时间
|
// 作业时间
|
||||||
workTime: [""],
|
workDate: [""],
|
||||||
// 马菲板号
|
// 马菲板号
|
||||||
mafiBarcode: "",
|
mafiBarcode: "",
|
||||||
// 尺码
|
// 尺码
|
||||||
size: 0,
|
size: 0,
|
||||||
// 类型下拉框
|
// 类型下拉框
|
||||||
lxValue: "",
|
typeId: "",
|
||||||
lxTextValue: "",
|
type: "",
|
||||||
lxList: [{
|
lxList: [{
|
||||||
value: 0,
|
value: "0",
|
||||||
text: "空板"
|
text: "空板"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 1,
|
value: "1",
|
||||||
text: "重板"
|
text: "重板"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -144,9 +145,9 @@
|
||||||
this.vvyName = this.mafiRow.vvyName
|
this.vvyName = this.mafiRow.vvyName
|
||||||
this.loaderTypeId = this.mafiRow.loaderTypeId
|
this.loaderTypeId = this.mafiRow.loaderTypeId
|
||||||
this.loaderType = this.mafiRow.loaderType
|
this.loaderType = this.mafiRow.loaderType
|
||||||
this.workTime = this.mafiRow.workTime
|
this.workDate = this.mafiRow.workDate
|
||||||
this.lxValue = this.mafiRow.lxValue
|
this.typeId = this.mafiRow.typeId
|
||||||
this.lxTextValue = this.mafiRow.lxTextValue
|
this.type = this.mafiRow.type
|
||||||
this.size = this.mafiRow.size
|
this.size = this.mafiRow.size
|
||||||
this.mafiBarcode = this.mafiRow.mafiBarcode
|
this.mafiBarcode = this.mafiRow.mafiBarcode
|
||||||
},
|
},
|
||||||
|
@ -161,10 +162,10 @@
|
||||||
},
|
},
|
||||||
// 类型下拉
|
// 类型下拉
|
||||||
lxChange(e) {
|
lxChange(e) {
|
||||||
this.lxValue = e;
|
this.typeId = e;
|
||||||
this.lxList.forEach(v => {
|
this.lxList.forEach(v => {
|
||||||
if (v.value == e) {
|
if (v.value == e) {
|
||||||
this.lxTextValue = v.text
|
this.type = v.text
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -179,7 +180,7 @@
|
||||||
},
|
},
|
||||||
// 作业时间
|
// 作业时间
|
||||||
changeLog(e) {
|
changeLog(e) {
|
||||||
this.workTime = e
|
this.workDate = e
|
||||||
},
|
},
|
||||||
// 取消
|
// 取消
|
||||||
cancel() {
|
cancel() {
|
||||||
|
@ -189,9 +190,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addMafiArr = uni.getStorageSync('addMafiArr')
|
// let addMafiArr = uni.getStorageSync('addMafiArr')
|
||||||
addMafiArr.splice(this.mafiRowIndex, 1)
|
// addMafiArr.splice(this.mafiRowIndex, 1)
|
||||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
// uni.setStorageSync('addMafiArr', addMafiArr);
|
||||||
|
let sql = `DELETE FROM mafiListRespList WHERE webId = ${this.mafiRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/mafi'
|
url: '/pages/shipWork/mafi'
|
||||||
})
|
})
|
||||||
|
@ -202,34 +205,53 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addMafiArr = uni.getStorageSync('addMafiArr')
|
let date = new Date().getTime()
|
||||||
let addMafiObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
loaderTypeId: this.loaderTypeId,
|
let webDate = this.getDate(date)
|
||||||
loaderType: this.loaderType,
|
|
||||||
lxValue: this.lxValue,
|
|
||||||
lxTextValue: this.lxTextValue,
|
|
||||||
size: this.size,
|
|
||||||
mafiBarcode: this.mafiBarcode,
|
|
||||||
workTime: this.workTime,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addMafiArr[this.mafiRowIndex] = addMafiObj;
|
let sql =
|
||||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
`UPDATE mafiListRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
loaderTypeId = '${this.loaderTypeId}',loaderType = '${this.loaderType}', typeId = '${this.typeId}',
|
||||||
|
type = '${this.type}',size = '${this.size}',mafiBarcode = '${this.mafiBarcode}',workDate = '${this.workDate}',
|
||||||
|
webStatus = '${webStatus}',webDate = '${webDate}' WHERE webId = '${this.mafiRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addMafiArr != "") {
|
let sql = `insert into mafiListRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addMafiArr.push(addMafiObj)
|
'${this.loaderTypeId}','${this.loaderType}','${this.typeId}','${this.type}','${this.size}','${this.mafiBarcode}','${this.workDate}',
|
||||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||||
} else {
|
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||||
addMafiArr = []
|
this.executeSql(sql)
|
||||||
addMafiArr.push(addMafiObj)
|
|
||||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addMafiArr = uni.getStorageSync('addMafiArr')
|
||||||
|
// let addMafiObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// loaderTypeId: this.loaderTypeId,
|
||||||
|
// loaderType: this.loaderType,
|
||||||
|
// typeId: this.typeId,
|
||||||
|
// type: this.type,
|
||||||
|
// size: this.size,
|
||||||
|
// mafiBarcode: this.mafiBarcode,
|
||||||
|
// workDate: this.workDate,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addMafiArr[this.mafiRowIndex] = addMafiObj;
|
||||||
|
// uni.setStorageSync('addMafiArr', addMafiArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addMafiArr != "") {
|
||||||
|
// addMafiArr.push(addMafiObj)
|
||||||
|
// uni.setStorageSync('addMafiArr', addMafiArr);
|
||||||
|
// } else {
|
||||||
|
// addMafiArr = []
|
||||||
|
// addMafiArr.push(addMafiObj)
|
||||||
|
// uni.setStorageSync('addMafiArr', addMafiArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/mafi'
|
url: '/pages/shipWork/mafi'
|
||||||
})
|
})
|
||||||
|
@ -241,7 +263,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/mafiAdd?params=${params}`
|
url: `/pages/shipWork/mafiAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/mafi'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -65,12 +66,33 @@
|
||||||
} else {
|
} else {
|
||||||
this.tabsIndex = this.tabsType
|
this.tabsIndex = this.tabsType
|
||||||
}
|
}
|
||||||
console.log(this.tabsType)
|
// this.peopleInfo = uni.getStorageSync('addPeopleArr')
|
||||||
this.peopleInfo = uni.getStorageSync('addPeopleArr')
|
|
||||||
this.shiftInfo = uni.getStorageSync('addShiftArr')
|
this.shiftInfo = uni.getStorageSync('addShiftArr')
|
||||||
|
console.log(this.shiftInfo)
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
|
if (this.tabsType == 0) {
|
||||||
|
this.executeSql1('messageRespList')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
// this.sqlData = value
|
||||||
|
if (this.tabsType == 0) {
|
||||||
|
this.peopleInfo = value
|
||||||
|
console.log(this.peopleInfo)
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -112,6 +134,12 @@
|
||||||
url: `/pages/shipWork/shiftDetails`
|
url: `/pages/shipWork/shiftDetails`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 离开页面删除数据
|
// 离开页面删除数据
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -30,10 +31,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addNoticeArr')
|
// this.infoList = uni.getStorageSync('addNoticeArr')
|
||||||
|
this.executeSql1('shipmentLoadUnloadNoticeRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -54,6 +71,12 @@
|
||||||
url: `/pages/shipWork/noticeAdd?params=${params}`
|
url: `/pages/shipWork/noticeAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -116,9 +117,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
// let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
||||||
addNoticeArr.splice(this.noticeRowIndex, 1)
|
// addNoticeArr.splice(this.noticeRowIndex, 1)
|
||||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
// uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||||
|
let sql = `DELETE FROM shipmentLoadUnloadNoticeRespList WHERE webId = ${this.noticeRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/notice'
|
url: '/pages/shipWork/notice'
|
||||||
})
|
})
|
||||||
|
@ -129,28 +132,44 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
let date = new Date().getTime()
|
||||||
let addNoticeObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
workDate: this.workDate,
|
let webDate = this.getDate(date)
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addNoticeArr[this.noticeRowIndex] = addNoticeObj;
|
let sql =
|
||||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
`UPDATE shipmentLoadUnloadNoticeRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
workDate = '${this.workDate}',webStatus = '${webStatus}',webDate = '${webDate}' WHERE webId = '${this.noticeRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addNoticeArr != "") {
|
let sql = `insert into shipmentLoadUnloadNoticeRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addNoticeArr.push(addNoticeObj)
|
'${this.workDate}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||||
} else {
|
this.executeSql(sql)
|
||||||
addNoticeArr = []
|
|
||||||
addNoticeArr.push(addNoticeObj)
|
|
||||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
||||||
|
// let addNoticeObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// workDate: this.workDate,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addNoticeArr[this.noticeRowIndex] = addNoticeObj;
|
||||||
|
// uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addNoticeArr != "") {
|
||||||
|
// addNoticeArr.push(addNoticeObj)
|
||||||
|
// uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||||
|
// } else {
|
||||||
|
// addNoticeArr = []
|
||||||
|
// addNoticeArr.push(addNoticeObj)
|
||||||
|
// uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/notice'
|
url: '/pages/shipWork/notice'
|
||||||
})
|
})
|
||||||
|
@ -162,7 +181,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/noticeAdd?params=${params}`
|
url: `/pages/shipWork/noticeAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/notice'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -32,10 +33,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addOpinionArr')
|
// this.infoList = uni.getStorageSync('addOpinionArr')
|
||||||
|
this.executeSql1('shipmentQualityConsultationRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -56,6 +73,12 @@
|
||||||
url: `/pages/shipWork/opinionAdd?params=${params}`
|
url: `/pages/shipWork/opinionAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -188,9 +189,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
// let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
||||||
addOpinionArr.splice(this.opinionRowIndex, 1)
|
// addOpinionArr.splice(this.opinionRowIndex, 1)
|
||||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
// uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||||
|
let sql = `DELETE FROM shipmentQualityConsultationRespList WHERE webId = ${this.opinionRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/opinion'
|
url: '/pages/shipWork/opinion'
|
||||||
})
|
})
|
||||||
|
@ -201,34 +204,55 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
let date = new Date().getTime()
|
||||||
let addOpinionObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
bthId: this.bthId,
|
let webDate = this.getDate(date)
|
||||||
bthIdName: this.bthIdName,
|
|
||||||
loaderTypeId: this.loaderTypeId,
|
|
||||||
loaderType: this.loaderType,
|
|
||||||
vehicleSize: this.vehicleSize,
|
|
||||||
sparePart: this.sparePart,
|
|
||||||
workTime: this.workTime,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addOpinionArr[this.opinionRowIndex] = addOpinionObj;
|
let sql =
|
||||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
`UPDATE shipmentQualityConsultationRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
bthId = '${this.bthId}',bthIdName = '${this.bthIdName}',loaderTypeId = '${this.loaderTypeId}',
|
||||||
|
loaderType = '${this.loaderType}', vehicleSize = '${this.vehicleSize}', sparePart = '${this.sparePart}',
|
||||||
|
workTime = '${this.workTime}',webStatus = '${webStatus}',webDate = '${webDate}' WHERE webId = '${this.opinionRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addOpinionArr != "") {
|
let sql = `insert into shipmentQualityConsultationRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addOpinionArr.push(addOpinionObj)
|
'${this.bthId}','${this.bthIdName}','${this.loaderTypeId}','${this.loaderType}','${this.vehicleSize}',
|
||||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
'${this.sparePart}','${this.workTime}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||||
} else {
|
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||||
addOpinionArr = []
|
'${webStatus}','${webDate}')`
|
||||||
addOpinionArr.push(addOpinionObj)
|
console.log(sql)
|
||||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
this.executeSql(sql)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
||||||
|
// let addOpinionObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// bthId: this.bthId,
|
||||||
|
// bthIdName: this.bthIdName,
|
||||||
|
// loaderTypeId: this.loaderTypeId,
|
||||||
|
// loaderType: this.loaderType,
|
||||||
|
// vehicleSize: this.vehicleSize,
|
||||||
|
// sparePart: this.sparePart,
|
||||||
|
// workTime: this.workTime,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addOpinionArr[this.opinionRowIndex] = addOpinionObj;
|
||||||
|
// uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addOpinionArr != "") {
|
||||||
|
// addOpinionArr.push(addOpinionObj)
|
||||||
|
// uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||||
|
// } else {
|
||||||
|
// addOpinionArr = []
|
||||||
|
// addOpinionArr.push(addOpinionObj)
|
||||||
|
// uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/opinion'
|
url: '/pages/shipWork/opinion'
|
||||||
})
|
})
|
||||||
|
@ -240,7 +264,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/opinionAdd?params=${params}`
|
url: `/pages/shipWork/opinionAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/opinion'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -27,10 +28,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addPatrolArr')
|
// this.infoList = uni.getStorageSync('addPatrolArr')
|
||||||
|
this.executeSql1('safetyInspectionRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
add(state, item, index) {
|
add(state, item, index) {
|
||||||
if (state != 'add') {
|
if (state != 'add') {
|
||||||
uni.setStorageSync('patrolRow', item);
|
uni.setStorageSync('patrolRow', item);
|
||||||
|
@ -44,6 +61,12 @@
|
||||||
url: `/pages/shipWork/patrolAdd?params=${params}`
|
url: `/pages/shipWork/patrolAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>图片上传:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>图片上传:</p>
|
||||||
<template v-if="obj.state != 'look'">
|
<template v-if="obj.state != 'look'">
|
||||||
<view class="picture">
|
<view class="picture">
|
||||||
<uni-file-picker limit="9" v-model="imageValue" fileMediatype="image" @select="select"
|
<uni-file-picker limit="9" v-model="url" fileMediatype="image" @select="select"
|
||||||
title="最多选择9张图片"></uni-file-picker>
|
title="最多选择9张图片"></uni-file-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view class="pictureLook" v-else>
|
<view class="pictureLook" v-else>
|
||||||
<view v-for="(item,index) in imageValue" :key="index">
|
<view v-for="(item,index) in url" :key="index">
|
||||||
<image :src="item">
|
<image :src="item">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -61,6 +61,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -81,7 +82,7 @@
|
||||||
// 类型
|
// 类型
|
||||||
type: "",
|
type: "",
|
||||||
// 图片
|
// 图片
|
||||||
imageValue: [],
|
url: [], // 待增加
|
||||||
// 描述
|
// 描述
|
||||||
remark: "",
|
remark: "",
|
||||||
}
|
}
|
||||||
|
@ -118,7 +119,7 @@
|
||||||
this.vvyName = this.patrolRow.vvyName
|
this.vvyName = this.patrolRow.vvyName
|
||||||
this.type = this.patrolRow.type
|
this.type = this.patrolRow.type
|
||||||
this.remark = this.patrolRow.remark
|
this.remark = this.patrolRow.remark
|
||||||
this.imageValue = this.patrolRow.imageValue
|
// this.url = this.patrolRow.url // 待增加
|
||||||
},
|
},
|
||||||
// 航次下拉
|
// 航次下拉
|
||||||
hcChange(e) {
|
hcChange(e) {
|
||||||
|
@ -141,9 +142,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
// let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
||||||
addPatrolArr.splice(this.patrolRowIndex, 1)
|
// addPatrolArr.splice(this.patrolRowIndex, 1)
|
||||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
// uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||||
|
let sql = `DELETE FROM safetyInspectionRespList WHERE webId = ${this.patrolRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/patrol'
|
url: '/pages/shipWork/patrol'
|
||||||
})
|
})
|
||||||
|
@ -154,30 +157,47 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
let date = new Date().getTime()
|
||||||
let addPatrolObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
type: this.type,
|
let webDate = this.getDate(date)
|
||||||
remark: this.remark,
|
|
||||||
imageValue: this.imageValue,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addPatrolArr[this.patrolRowIndex] = addPatrolObj;
|
let sql =
|
||||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
`UPDATE safetyInspectionRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
type = '${this.type}',remark = '${this.remark}', webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = '${this.patrolRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addPatrolArr != "") {
|
let sql = `insert into safetyInspectionRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addPatrolArr.push(addPatrolObj)
|
'${this.type}','${this.remark}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||||
} else {
|
this.executeSql(sql)
|
||||||
addPatrolArr = []
|
|
||||||
addPatrolArr.push(addPatrolObj)
|
|
||||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
||||||
|
// let addPatrolObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// type: this.type,
|
||||||
|
// remark: this.remark,
|
||||||
|
// url: this.url,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addPatrolArr[this.patrolRowIndex] = addPatrolObj;
|
||||||
|
// uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addPatrolArr != "") {
|
||||||
|
// addPatrolArr.push(addPatrolObj)
|
||||||
|
// uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||||
|
// } else {
|
||||||
|
// addPatrolArr = []
|
||||||
|
// addPatrolArr.push(addPatrolObj)
|
||||||
|
// uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/patrol'
|
url: '/pages/shipWork/patrol'
|
||||||
})
|
})
|
||||||
|
@ -189,7 +209,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/patrolAdd?params=${params}`
|
url: `/pages/shipWork/patrolAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/patrol'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -89,13 +90,13 @@
|
||||||
tqValue: "",
|
tqValue: "",
|
||||||
tqTextValue: "",
|
tqTextValue: "",
|
||||||
tqList: [{
|
tqList: [{
|
||||||
value: 0,
|
value: "0",
|
||||||
text: "晴"
|
text: "晴"
|
||||||
}, {
|
}, {
|
||||||
value: 1,
|
value: " 1",
|
||||||
text: "阴"
|
text: "阴"
|
||||||
}, {
|
}, {
|
||||||
value: 2,
|
value: "2",
|
||||||
text: "雨"
|
text: "雨"
|
||||||
}],
|
}],
|
||||||
// 作业组数
|
// 作业组数
|
||||||
|
@ -112,7 +113,6 @@
|
||||||
if ('params' in options) {
|
if ('params' in options) {
|
||||||
// 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
|
// 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
|
||||||
this.obj = JSON.parse(decodeURIComponent(options.params))
|
this.obj = JSON.parse(decodeURIComponent(options.params))
|
||||||
console.log(this.obj)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -204,9 +204,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
// let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
||||||
addPeopleArr.splice(this.peopleRowIndex, 1)
|
// addPeopleArr.splice(this.peopleRowIndex, 1)
|
||||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
// uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||||
|
let sql = `DELETE FROM messageRespList WHERE webId = ${this.peopleRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.setStorageSync('tabsType', 0);
|
uni.setStorageSync('tabsType', 0);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/mixWork'
|
url: '/pages/shipWork/mixWork'
|
||||||
|
@ -218,36 +220,57 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
let date = new Date().getTime()
|
||||||
let addPeopleObj = {
|
let str = String(date)
|
||||||
bthId: this.bwValue, // 泊位id
|
let webId = Number(str.slice(str.length - 5))
|
||||||
bthIdName: this.bwTextValue, // 泊位名转义
|
let webStatus = 0
|
||||||
jobStartTime: this.startTime, // 作业开始时间
|
let webDate = this.getDate(date)
|
||||||
jobEndTime: this.endTime, // 作业结束时间
|
|
||||||
shipPerson: this.shipValue, // 单船人数
|
|
||||||
vvyId: this.hcValue, // 航次id
|
|
||||||
vvyName: this.hcTextValue, // 航次id名
|
|
||||||
weatherId: this.tqValue, // 天气ID
|
|
||||||
weatherType: this.tqTextValue, // 天气类型
|
|
||||||
workSuite: this.workValue, // 作业组数
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName, // 贸易类型
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName, // 进出口
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName, // 船只名
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addPeopleArr[this.peopleRowIndex] = addPeopleObj;
|
let sql =
|
||||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
`UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bthIdName}',
|
||||||
|
jobStartTime = '${this.startTime}',jobEndTime = '${this.endTime}',shipPerson = '${this.shipValue}',
|
||||||
|
vvyId = '${this.hcValue}',vvyName = '${this.hcTextValue}',weatherId = '${this.tqValue}',
|
||||||
|
weatherType = '${this.tqTextValue}',workSuite = '${this.workValue}',webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = ${this.peopleRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addPeopleArr != "") {
|
let sql = `insert into messageRespList values('${webId}','${this.bwValue}','${this.bwTextValue}',
|
||||||
addPeopleArr.push(addPeopleObj)
|
'${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqValue}',
|
||||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
'${this.tqTextValue}','${this.workValue}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||||
} else {
|
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||||
addPeopleArr = []
|
'${webStatus}','${webDate}')`
|
||||||
addPeopleArr.push(addPeopleObj)
|
this.executeSql(sql)
|
||||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
||||||
|
// let addPeopleObj = {
|
||||||
|
// bthId: this.bwValue, // 泊位id
|
||||||
|
// bthIdName: this.bwTextValue, // 泊位名转义
|
||||||
|
// jobStartTime: this.startTime, // 作业开始时间
|
||||||
|
// jobEndTime: this.endTime, // 作业结束时间
|
||||||
|
// shipPerson: this.shipValue, // 单船人数
|
||||||
|
// vvyId: this.hcValue, // 航次id
|
||||||
|
// vvyName: this.hcTextValue, // 航次id名
|
||||||
|
// weatherId: this.tqValue, // 天气ID
|
||||||
|
// weatherType: this.tqTextValue, // 天气类型
|
||||||
|
// workSuite: this.workValue, // 作业组数
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName, // 贸易类型
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName, // 进出口
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName, // 船只名
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addPeopleArr[this.peopleRowIndex] = addPeopleObj;
|
||||||
|
// uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addPeopleArr != "") {
|
||||||
|
// addPeopleArr.push(addPeopleObj)
|
||||||
|
// uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||||
|
// } else {
|
||||||
|
// addPeopleArr = []
|
||||||
|
// addPeopleArr.push(addPeopleObj)
|
||||||
|
// uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
uni.setStorageSync('tabsType', 0);
|
uni.setStorageSync('tabsType', 0);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/mixWork'
|
url: '/pages/shipWork/mixWork'
|
||||||
|
@ -260,7 +283,34 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/peopleAdd?params=${params}`
|
url: `/pages/shipWork/peopleAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.setStorageSync('tabsType', 0);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/mixWork'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -339,7 +339,7 @@
|
||||||
this.shiftRowIndex = uni.getStorageSync('shiftRowIndex')
|
this.shiftRowIndex = uni.getStorageSync('shiftRowIndex')
|
||||||
this.hcValue = this.dataInfo.vvyId
|
this.hcValue = this.dataInfo.vvyId
|
||||||
this.hcTextValue = this.dataInfo.vvyName
|
this.hcTextValue = this.dataInfo.vvyName
|
||||||
this.zxValue = this.dataInfo.zxId
|
this.zxValue = this.dataInfo.loadType
|
||||||
this.zxTextValue = this.dataInfo.zxTextValue
|
this.zxTextValue = this.dataInfo.zxTextValue
|
||||||
this.ulList1 = this.dataInfo.shiftList
|
this.ulList1 = this.dataInfo.shiftList
|
||||||
this.fcUlList = this.dataInfo.fcList
|
this.fcUlList = this.dataInfo.fcList
|
||||||
|
@ -511,8 +511,8 @@
|
||||||
let addShiftObj = {
|
let addShiftObj = {
|
||||||
vvyName: this.hcTextValue,
|
vvyName: this.hcTextValue,
|
||||||
vvyId: this.hcValue,
|
vvyId: this.hcValue,
|
||||||
zxName: this.zxTextValue,
|
loadTypeName: this.zxTextValue,
|
||||||
zxId: this.zxValue,
|
loadType: this.zxValue,
|
||||||
shiftList: this.ulList1,
|
shiftList: this.ulList1,
|
||||||
fcList: this.fcUlList,
|
fcList: this.fcUlList,
|
||||||
otherList: this.otherObj
|
otherList: this.otherObj
|
||||||
|
@ -535,6 +535,13 @@
|
||||||
url: '/pages/shipWork/mixWork'
|
url: '/pages/shipWork/mixWork'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.setStorageSync('tabsType', 1);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/mixWork'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p>装卸类型:</p>
|
<p>装卸类型:</p>
|
||||||
<text> {{dataInfo.zxName}}</text>
|
<text> {{dataInfo.loadTypeName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ul bUl borTop" v-for="(item,index) in dataInfo.shiftList" :key="index + 'a'">
|
<view class="ul bUl borTop" v-for="(item,index) in dataInfo.shiftList" :key="index + 'a'">
|
||||||
|
@ -206,6 +206,13 @@
|
||||||
url: `/pages/shipWork/shiftAdd?params=${params}`
|
url: `/pages/shipWork/shiftAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.setStorageSync('tabsType', 1);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/mixWork'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -34,6 +34,14 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -49,6 +49,14 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
console.log(this.shipInfo)
|
console.log(this.shipInfo)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -30,11 +31,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addSupplyArr')
|
// this.infoList = uni.getStorageSync('addSupplyArr')
|
||||||
console.log(this.infoList)
|
this.executeSql1('shipmentShipSupplyRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -55,6 +71,12 @@
|
||||||
url: `/pages/shipWork/supplyAdd?params=${params}`
|
url: `/pages/shipWork/supplyAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>泊位:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>泊位:</p>
|
||||||
<uni-data-select v-model="bthId" :localdata="bwList" @change="bwChange"
|
<uni-data-select v-model="stopBerthage" :localdata="bwList" @change="bwChange"
|
||||||
v-if="obj.state != 'look'"></uni-data-select>
|
v-if="obj.state != 'look'"></uni-data-select>
|
||||||
<text v-else>{{bthIdName}}</text>
|
<text v-else>{{stopBerthageName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<p><text class="required" v-if="obj.state != 'look'">*</text>供给类型:</p>
|
<p><text class="required" v-if="obj.state != 'look'">*</text>供给类型:</p>
|
||||||
|
@ -59,6 +59,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -77,8 +78,8 @@
|
||||||
vvyName: "",
|
vvyName: "",
|
||||||
hcList: [],
|
hcList: [],
|
||||||
// 泊位下拉框
|
// 泊位下拉框
|
||||||
bthId: "",
|
stopBerthage: "",
|
||||||
bthIdName: "",
|
stopBerthageName: "",
|
||||||
bwList: [],
|
bwList: [],
|
||||||
// 供给类型
|
// 供给类型
|
||||||
supplyTypeId: "",
|
supplyTypeId: "",
|
||||||
|
@ -130,8 +131,8 @@
|
||||||
this.supplyRowIndex = uni.getStorageSync('supplyRowIndex');
|
this.supplyRowIndex = uni.getStorageSync('supplyRowIndex');
|
||||||
this.vvyId = this.supplyRow.vvyId
|
this.vvyId = this.supplyRow.vvyId
|
||||||
this.vvyName = this.supplyRow.vvyName
|
this.vvyName = this.supplyRow.vvyName
|
||||||
this.bthId = this.supplyRow.bthId
|
this.stopBerthage = this.supplyRow.stopBerthage
|
||||||
this.bthIdName = this.supplyRow.bthIdName
|
this.stopBerthageName = this.supplyRow.stopBerthageName
|
||||||
this.supplyTypeId = this.supplyRow.sssId
|
this.supplyTypeId = this.supplyRow.sssId
|
||||||
this.supplyType = this.supplyRow.supplyType
|
this.supplyType = this.supplyRow.supplyType
|
||||||
this.supplyAmount = this.supplyRow.supplyAmount
|
this.supplyAmount = this.supplyRow.supplyAmount
|
||||||
|
@ -148,10 +149,10 @@
|
||||||
},
|
},
|
||||||
// 泊位下拉
|
// 泊位下拉
|
||||||
bwChange(e) {
|
bwChange(e) {
|
||||||
this.bthId = e;
|
this.stopBerthage = e;
|
||||||
this.bwList.forEach(v => {
|
this.bwList.forEach(v => {
|
||||||
if (v.value == e) {
|
if (v.value == e) {
|
||||||
this.bthIdName = v.text
|
this.stopBerthageName = v.text
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -176,9 +177,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
// let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
||||||
addSupplyArr.splice(this.supplyRowIndex, 1)
|
// addSupplyArr.splice(this.supplyRowIndex, 1)
|
||||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
// uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||||
|
let sql = `DELETE FROM shipmentShipSupplyRespList WHERE webId = ${this.supplyRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/supply'
|
url: '/pages/shipWork/supply'
|
||||||
})
|
})
|
||||||
|
@ -189,34 +192,56 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
let date = new Date().getTime()
|
||||||
let addSupplyObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
bthId: this.bthId,
|
let webDate = this.getDate(date)
|
||||||
bthIdName: this.bthIdName,
|
|
||||||
sssId: this.supplyTypeId,
|
|
||||||
supplyType: this.supplyType,
|
|
||||||
supplyAmount: this.supplyAmount,
|
|
||||||
supplyDate: this.supplyDate,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addSupplyArr[this.supplyRowIndex] = addSupplyObj;
|
let sql =
|
||||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
`UPDATE shipmentShipSupplyRespList SET vvyId = '${this.vvyId}',vvyName = '${this.vvyName}',
|
||||||
|
stopBerthage = '${this.stopBerthage}',stopBerthageName = '${this.stopBerthageName}',sssId = '${this.supplyTypeId}',
|
||||||
|
supplyType = '${this.supplyType}',supplyAmount = '${this.supplyAmount}',supplyDate = '${this.supplyDate}',webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = ${this.supplyRow.webId};`
|
||||||
|
console.log(sql)
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addSupplyArr != "") {
|
let sql =
|
||||||
addSupplyArr.push(addSupplyObj)
|
`insert into shipmentShipSupplyRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
'${this.stopBerthage}','${this.stopBerthageName}','${this.supplyTypeId}',
|
||||||
} else {
|
'${this.supplyType}','${this.supplyAmount}','${this.supplyDate}',
|
||||||
addSupplyArr = []
|
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||||
addSupplyArr.push(addSupplyObj)
|
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
'${webStatus}','${webDate}')`
|
||||||
}
|
this.executeSql(sql)
|
||||||
}
|
}
|
||||||
|
// let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
||||||
|
// let addSupplyObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// stopBerthage: this.stopBerthage,
|
||||||
|
// stopBerthageName: this.stopBerthageName,
|
||||||
|
// sssId: this.supplyTypeId,
|
||||||
|
// supplyType: this.supplyType,
|
||||||
|
// supplyAmount: this.supplyAmount,
|
||||||
|
// supplyDate: this.supplyDate,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addSupplyArr[this.supplyRowIndex] = addSupplyObj;
|
||||||
|
// uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addSupplyArr != "") {
|
||||||
|
// addSupplyArr.push(addSupplyObj)
|
||||||
|
// uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||||
|
// } else {
|
||||||
|
// addSupplyArr = []
|
||||||
|
// addSupplyArr.push(addSupplyObj)
|
||||||
|
// uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/supply'
|
url: '/pages/shipWork/supply'
|
||||||
})
|
})
|
||||||
|
@ -228,7 +253,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/supplyAdd?params=${params}`
|
url: `/pages/shipWork/supplyAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/supply'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -135,7 +136,7 @@
|
||||||
this.untieRowIndex = uni.getStorageSync('untieRowIndex');
|
this.untieRowIndex = uni.getStorageSync('untieRowIndex');
|
||||||
this.vvyId = this.untieRow.vvyId
|
this.vvyId = this.untieRow.vvyId
|
||||||
this.vvyName = this.untieRow.vvyName
|
this.vvyName = this.untieRow.vvyName
|
||||||
this.zlShip = this.untieRow.zlShip
|
this.zlShip = this.untieRow.shipDeadWeight
|
||||||
this.bthId = this.untieRow.bthId
|
this.bthId = this.untieRow.bthId
|
||||||
this.bthIdName = this.untieRow.bthIdName
|
this.bthIdName = this.untieRow.bthIdName
|
||||||
this.attachTime = (this.untieRow.attachTime[0] ? this.untieRow.attachTime : '')
|
this.attachTime = (this.untieRow.attachTime[0] ? this.untieRow.attachTime : '')
|
||||||
|
@ -185,9 +186,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addUntieArr = uni.getStorageSync('addUntieArr')
|
// let addUntieArr = uni.getStorageSync('addUntieArr')
|
||||||
addUntieArr.splice(this.untieRowIndex, 1)
|
// addUntieArr.splice(this.untieRowIndex, 1)
|
||||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
// uni.setStorageSync('addUntieArr', addUntieArr);
|
||||||
|
let sql = `DELETE FROM attachUnmoorRespList WHERE webId = ${this.untieRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/untieCord'
|
url: '/pages/shipWork/untieCord'
|
||||||
})
|
})
|
||||||
|
@ -198,35 +201,55 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addUntieArr = uni.getStorageSync('addUntieArr')
|
let date = new Date().getTime()
|
||||||
let addUntieObj = {
|
let str = String(date)
|
||||||
zlShip: this.zlShip,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyId: this.vvyId,
|
let webStatus = 0
|
||||||
vvyName: this.vvyName,
|
let webDate = this.getDate(date)
|
||||||
bthId: this.bthId,
|
|
||||||
bthIdName: this.bthIdName,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
attachTime: this.attachTime,
|
|
||||||
unmoorTime: this.unmoorTime,
|
|
||||||
shiftingBerthTime: this.shiftingBerthTime,
|
|
||||||
noProductBerthTime: this.noProductBerthTime
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addUntieArr[this.untieRowIndex] = addUntieObj;
|
let sql =
|
||||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
`UPDATE attachUnmoorRespList SET shipDeadWeight = '${this.zlShip}',vvyId = '${this.vvyId}',
|
||||||
|
vvyName = '${this.vvyName}',bthId = '${this.bthId}',bthIdName = '${this.bthIdName}',
|
||||||
|
attachTime = '${this.attachTime}',unmoorTime = '${this.unmoorTime}',shiftingBerthTime = '${this.shiftingBerthTime}',
|
||||||
|
noProductBerthTime = '${this.noProductBerthTime}',webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = ${this.untieRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addUntieArr != "") {
|
let sql =
|
||||||
addUntieArr.push(addUntieObj)
|
`insert into attachUnmoorRespList values('${webId}','${this.zlShip}','${this.vvyId}','${this.vvyName}',
|
||||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
'${this.bthId}','${this.bthIdName}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||||
} else {
|
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||||
addUntieArr = []
|
'${this.attachTime}','${this.unmoorTime}','${this.shiftingBerthTime}','${this.noProductBerthTime}','${webStatus}','${webDate}')`
|
||||||
addUntieArr.push(addUntieObj)
|
this.executeSql(sql)
|
||||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addUntieArr = uni.getStorageSync('addUntieArr')
|
||||||
|
// let addUntieObj = {
|
||||||
|
// shipDeadWeight: this.zlShip,
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// bthId: this.bthId,
|
||||||
|
// bthIdName: this.bthIdName,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// attachTime: this.attachTime,
|
||||||
|
// unmoorTime: this.unmoorTime,
|
||||||
|
// shiftingBerthTime: this.shiftingBerthTime,
|
||||||
|
// noProductBerthTime: this.noProductBerthTime
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addUntieArr[this.untieRowIndex] = addUntieObj;
|
||||||
|
// uni.setStorageSync('addUntieArr', addUntieArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addUntieArr != "") {
|
||||||
|
// addUntieArr.push(addUntieObj)
|
||||||
|
// uni.setStorageSync('addUntieArr', addUntieArr);
|
||||||
|
// } else {
|
||||||
|
// addUntieArr = []
|
||||||
|
// addUntieArr.push(addUntieObj)
|
||||||
|
// uni.setStorageSync('addUntieArr', addUntieArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/untieCord'
|
url: '/pages/shipWork/untieCord'
|
||||||
})
|
})
|
||||||
|
@ -238,7 +261,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/untieAdd?params=${params}`
|
url: `/pages/shipWork/untieAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/untieCord'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -31,10 +32,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addUntieArr')
|
// this.infoList = uni.getStorageSync('addUntieArr')
|
||||||
|
this.executeSql1('attachUnmoorRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
// this.sqlData = value
|
||||||
|
this.infoList = value
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -55,6 +72,12 @@
|
||||||
url: `/pages/shipWork/untieAdd?params=${params}`
|
url: `/pages/shipWork/untieAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -30,10 +31,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||||
this.infoList = uni.getStorageSync('addAssignArr')
|
// this.infoList = uni.getStorageSync('addAssignArr')
|
||||||
|
this.executeSql1('shipmentAdviserLayoutRespList')
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 查
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
this.infoList = value
|
||||||
|
console.log(this.infoList)
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
executeSql1(tableName) {
|
||||||
|
let sql = `select * from ${tableName}`
|
||||||
|
this.executeSql(sql)
|
||||||
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign() {
|
sign() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -54,6 +71,12 @@
|
||||||
url: `/pages/shipWork/workAssignAdd?params=${params}`
|
url: `/pages/shipWork/workAssignAdd?params=${params}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/documentList'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sqlite from "../../common/sqlite.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -230,9 +231,11 @@
|
||||||
},
|
},
|
||||||
// 弹框删除
|
// 弹框删除
|
||||||
delConfirm() {
|
delConfirm() {
|
||||||
let addAssignArr = uni.getStorageSync('addAssignArr')
|
// let addAssignArr = uni.getStorageSync('addAssignArr')
|
||||||
addAssignArr.splice(this.assignRowIndex, 1)
|
// addAssignArr.splice(this.assignRowIndex, 1)
|
||||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
// uni.setStorageSync('addAssignArr', addAssignArr);
|
||||||
|
let sql = `DELETE FROM shipmentAdviserLayoutRespList WHERE webId = ${this.assignRow.webId};`
|
||||||
|
this.executeSql(sql)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/workAssign'
|
url: '/pages/shipWork/workAssign'
|
||||||
})
|
})
|
||||||
|
@ -243,39 +246,62 @@
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
save() {
|
save() {
|
||||||
let addAssignArr = uni.getStorageSync('addAssignArr')
|
let date = new Date().getTime()
|
||||||
let addAssignObj = {
|
let str = String(date)
|
||||||
vvyId: this.vvyId,
|
let webId = Number(str.slice(str.length - 5))
|
||||||
vvyName: this.vvyName,
|
let webStatus = 0
|
||||||
bthId: this.bthId,
|
let webDate = this.getDate(date)
|
||||||
bthIdName: this.bthIdName,
|
|
||||||
pwcTypeId: this.pwcTypeId,
|
|
||||||
pwcType: this.pwcType,
|
|
||||||
personNumber: this.personNumber,
|
|
||||||
loaderTypeId: this.loaderTypeId,
|
|
||||||
loaderType: this.loaderType,
|
|
||||||
vehicleSize: this.vehicleSize,
|
|
||||||
sparePart: this.sparePart,
|
|
||||||
workTime: this.workTime,
|
|
||||||
startTime: this.startTime,
|
|
||||||
endTime: this.endTime,
|
|
||||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
|
||||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
|
||||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
|
||||||
}
|
|
||||||
if (this.obj.state == "edit") {
|
if (this.obj.state == "edit") {
|
||||||
addAssignArr[this.assignRowIndex] = addAssignObj;
|
let sql =
|
||||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
`UPDATE shipmentAdviserLayoutRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||||
|
bthId = '${this.bthId}',bthIdName = '${this.bthIdName}', pwcTypeId = '${this.pwcTypeId}',
|
||||||
|
pwcType = '${this.pwcType}', personNumber = '${this.personNumber}',loaderTypeId = '${this.loaderTypeId}',
|
||||||
|
loaderType = '${this.loaderType}', vehicleSize = '${this.vehicleSize}', sparePart = '${this.sparePart}',
|
||||||
|
workTime = '${this.workTime}', startTime = '${this.startTime}', endTime = '${this.endTime}',webStatus = '${webStatus}',
|
||||||
|
webDate = '${webDate}' WHERE webId = '${this.assignRow.webId}';`
|
||||||
|
this.executeSql(sql)
|
||||||
} else if (this.obj.state == "add") {
|
} else if (this.obj.state == "add") {
|
||||||
if (addAssignArr != "") {
|
let sql = `insert into shipmentAdviserLayoutRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||||
addAssignArr.push(addAssignObj)
|
'${this.bthId}','${this.bthIdName}','${this.pwcTypeId}','${this.pwcType}','${this.personNumber}',
|
||||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
'${this.loaderTypeId}','${this.loaderType}','${this.vehicleSize}','${this.sparePart}','${this.workTime}',
|
||||||
} else {
|
'${this.startTime}','${this.endTime}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||||
addAssignArr = []
|
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||||
addAssignArr.push(addAssignObj)
|
'${webStatus}','${webDate}')`
|
||||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
this.executeSql(sql)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// let addAssignArr = uni.getStorageSync('addAssignArr')
|
||||||
|
// let addAssignObj = {
|
||||||
|
// vvyId: this.vvyId,
|
||||||
|
// vvyName: this.vvyName,
|
||||||
|
// bthId: this.bthId,
|
||||||
|
// bthIdName: this.bthIdName,
|
||||||
|
// pwcTypeId: this.pwcTypeId,
|
||||||
|
// pwcType: this.pwcType,
|
||||||
|
// personNumber: this.personNumber,
|
||||||
|
// loaderTypeId: this.loaderTypeId,
|
||||||
|
// loaderType: this.loaderType,
|
||||||
|
// vehicleSize: this.vehicleSize,
|
||||||
|
// sparePart: this.sparePart,
|
||||||
|
// workTime: this.workTime,
|
||||||
|
// startTime: this.startTime,
|
||||||
|
// endTime: this.endTime,
|
||||||
|
// tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||||
|
// importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||||
|
// spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||||
|
// }
|
||||||
|
// if (this.obj.state == "edit") {
|
||||||
|
// addAssignArr[this.assignRowIndex] = addAssignObj;
|
||||||
|
// uni.setStorageSync('addAssignArr', addAssignArr);
|
||||||
|
// } else if (this.obj.state == "add") {
|
||||||
|
// if (addAssignArr != "") {
|
||||||
|
// addAssignArr.push(addAssignObj)
|
||||||
|
// uni.setStorageSync('addAssignArr', addAssignArr);
|
||||||
|
// } else {
|
||||||
|
// addAssignArr = []
|
||||||
|
// addAssignArr.push(addAssignObj)
|
||||||
|
// uni.setStorageSync('addAssignArr', addAssignArr);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/shipWork/workAssign'
|
url: '/pages/shipWork/workAssign'
|
||||||
})
|
})
|
||||||
|
@ -287,7 +313,33 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/shipWork/workAssignAdd?params=${params}`
|
url: `/pages/shipWork/workAssignAdd?params=${params}`
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
// 获取日期
|
||||||
|
getDate(date) {
|
||||||
|
var date = new Date(date);
|
||||||
|
var YY = date.getFullYear() + '-';
|
||||||
|
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||||
|
var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
|
||||||
|
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||||
|
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||||
|
var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
|
||||||
|
return YY + MM + DD + " " + hh + mm + ss;
|
||||||
|
},
|
||||||
|
executeSql(sql) {
|
||||||
|
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
|
// 在resolve时执行的回调函数
|
||||||
|
console.log(value);
|
||||||
|
}).catch((error) => {
|
||||||
|
// 在reject时执行的回调函数
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onBackPress(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/shipWork/workAssign'
|
||||||
|
})
|
||||||
|
return true;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -113,8 +113,9 @@
|
||||||
data.id++
|
data.id++
|
||||||
// let sql = "insert into " + this.dbTable + " values('" + data.id + "','" + data.content +
|
// let sql = "insert into " + this.dbTable + " values('" + data.id + "','" + data.content +
|
||||||
// "','" + data.fromId + "','" + data.toId + "'," + data.flag + ")";
|
// "','" + data.fromId + "','" + data.toId + "'," + data.flag + ")";
|
||||||
let sql = "insert into " + this.dbTable + "(id, content, fromId, toId, flag) values('" + data.id + "','" + data.content +
|
let sql = "insert into " + this.dbTable + "(id, content, fromId, toId, flag) values('" + data.id + "','" +
|
||||||
"','" + data.fromId + "','" + data.toId + "'," + data.flag + ")";
|
data.content +
|
||||||
|
"','" + data.fromId + "','" + data.toId + "'," + data.flag + ")";
|
||||||
this.executeSql(sql)
|
this.executeSql(sql)
|
||||||
},
|
},
|
||||||
insertListChatRow() {
|
insertListChatRow() {
|
||||||
|
@ -164,11 +165,7 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
executeSql(sql) {
|
executeSql(sql) {
|
||||||
<<<<<<< HEAD
|
|
||||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
|
||||||
=======
|
|
||||||
Sqlite.executeSqlCeshi(sql).then((value) => {
|
Sqlite.executeSqlCeshi(sql).then((value) => {
|
||||||
>>>>>>> 99e78e950aa9ec6dccfe44174d8f77ac3239cf00
|
|
||||||
// 在resolve时执行的回调函数
|
// 在resolve时执行的回调函数
|
||||||
this.sqlData = value
|
this.sqlData = value
|
||||||
console.log(value); // 输出:Hello, World!
|
console.log(value); // 输出:Hello, World!
|
||||||
|
|
Loading…
Reference in New Issue