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 class="borTop" @click="tabsPort('center')">
|
||||
<uni-icons type="loop" size="16" />
|
||||
<text>切换港口</text>
|
||||
<text>切换港区</text>
|
||||
</view>
|
||||
<view class="borTop" @click="outLogin">
|
||||
<uni-icons type="undo" size="16" />
|
||||
|
@ -49,15 +49,15 @@
|
|||
type: "",
|
||||
portList: [{
|
||||
value: "1",
|
||||
title: "港口1"
|
||||
title: "港区1"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
title: "港口2"
|
||||
title: "港区2"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
title: "港口3"
|
||||
title: "港区3"
|
||||
},
|
||||
],
|
||||
portId: "",
|
||||
|
@ -74,7 +74,7 @@
|
|||
showInfo() {
|
||||
this.infoType = !this.infoType
|
||||
},
|
||||
// 点击切换港口
|
||||
// 点击切换港区
|
||||
tabsPort(type) {
|
||||
this.type = type
|
||||
this.$refs.popup.open(type)
|
||||
|
|
|
@ -46,15 +46,15 @@
|
|||
mounted() {
|
||||
this.portList = [{
|
||||
value: "1",
|
||||
title: "港口1"
|
||||
title: "港区1"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
title: "港口2"
|
||||
title: "港区2"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
title: "港口3"
|
||||
title: "港区3"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -30,10 +31,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addAbnormalArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addAbnormalArr')
|
||||
this.executeSql1('abnormalConditionRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -54,6 +71,12 @@
|
|||
url: `/pages/shipWork/abnormalAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -133,9 +134,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
||||
addAbnormalArr.splice(this.abnormalRowIndex, 1)
|
||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||
// let addAbnormalArr = uni.getStorageSync('addAbnormalArr')
|
||||
// addAbnormalArr.splice(this.abnormalRowIndex, 1)
|
||||
// uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||
let sql = `DELETE FROM abnormalConditionRespList WHERE webId = ${this.abnormalRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/abnormal'
|
||||
})
|
||||
|
@ -146,30 +149,48 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
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,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addAbnormalArr[this.abnormalRowIndex] = addAbnormalObj;
|
||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addAbnormalArr != "") {
|
||||
addAbnormalArr.push(addAbnormalObj)
|
||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||
} else {
|
||||
addAbnormalArr = []
|
||||
addAbnormalArr.push(addAbnormalObj)
|
||||
uni.setStorageSync('addAbnormalArr', addAbnormalArr);
|
||||
}
|
||||
let sql = `insert into abnormalConditionRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.type}','${this.remark}','${this.workTime}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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({
|
||||
url: '/pages/shipWork/abnormal'
|
||||
})
|
||||
|
@ -181,7 +202,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -251,7 +251,13 @@
|
|||
uni.navigateTo({
|
||||
url: `/pages/shipWork/carDetails`
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -142,6 +142,12 @@
|
|||
}
|
||||
return newList
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/brandDetails'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -85,6 +85,12 @@
|
|||
url: `/pages/shipWork/${url}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/index'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
v-model="shipName" @input="input_json" @select="select_json"></superwei-combox>
|
||||
</view>
|
||||
<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 class="itemList">
|
||||
<template v-if="itemList.length > 0">
|
||||
|
@ -88,6 +95,8 @@
|
|||
<script>
|
||||
import SideBar from '@/components/sider-bar/slider-bar';
|
||||
import HeadInfo from '@/components/head-info/head-info';
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import tableList from "../../common/createDataTable.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -104,6 +113,8 @@
|
|||
total: 0,
|
||||
pageSize: 4,
|
||||
current: 1,
|
||||
|
||||
shipInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -115,8 +126,84 @@
|
|||
},
|
||||
mounted() {
|
||||
this.pamValue = uni.getStorageSync('portObj').portId
|
||||
this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
|
||||
// 进页面创建表
|
||||
tableList.createAllTable()
|
||||
},
|
||||
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() {
|
||||
uni.request({
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<view class="title">马菲板号:{{item.mafiBarcode}}</view>
|
||||
<p>上传状态:未上传</p>
|
||||
<p>尺码:{{item.size}}</p>
|
||||
<p>类型:{{item.lxTextValue}}</p>
|
||||
<p>类型:{{item.type}}</p>
|
||||
<p>装卸方式:{{item.loaderType}}</p>
|
||||
<p>航次:{{item.vvyName}}</p>
|
||||
</view>
|
||||
|
@ -23,6 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -31,10 +32,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addMafiArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addMafiArr')
|
||||
this.executeSql1('mafiListRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -55,6 +72,12 @@
|
|||
url: `/pages/shipWork/mafiAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
</view>
|
||||
<view class="li">
|
||||
<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'" />
|
||||
<text v-else>{{workTime}}</text>
|
||||
<text v-else>{{workDate}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<p><text class="required" v-if="obj.state != 'look'">*</text>马菲板号:</p>
|
||||
|
@ -38,9 +38,9 @@
|
|||
</view>
|
||||
<view class="li">
|
||||
<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>
|
||||
<text v-else>{{lxTextValue}}</text>
|
||||
<text v-else>{{type}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<p><text class="required" v-if="obj.state != 'look'">*</text>装卸类型:</p>
|
||||
|
@ -64,6 +64,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -82,20 +83,20 @@
|
|||
vvyName: "",
|
||||
hcList: [],
|
||||
// 作业时间
|
||||
workTime: [""],
|
||||
workDate: [""],
|
||||
// 马菲板号
|
||||
mafiBarcode: "",
|
||||
// 尺码
|
||||
size: 0,
|
||||
// 类型下拉框
|
||||
lxValue: "",
|
||||
lxTextValue: "",
|
||||
typeId: "",
|
||||
type: "",
|
||||
lxList: [{
|
||||
value: 0,
|
||||
value: "0",
|
||||
text: "空板"
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
value: "1",
|
||||
text: "重板"
|
||||
},
|
||||
],
|
||||
|
@ -144,9 +145,9 @@
|
|||
this.vvyName = this.mafiRow.vvyName
|
||||
this.loaderTypeId = this.mafiRow.loaderTypeId
|
||||
this.loaderType = this.mafiRow.loaderType
|
||||
this.workTime = this.mafiRow.workTime
|
||||
this.lxValue = this.mafiRow.lxValue
|
||||
this.lxTextValue = this.mafiRow.lxTextValue
|
||||
this.workDate = this.mafiRow.workDate
|
||||
this.typeId = this.mafiRow.typeId
|
||||
this.type = this.mafiRow.type
|
||||
this.size = this.mafiRow.size
|
||||
this.mafiBarcode = this.mafiRow.mafiBarcode
|
||||
},
|
||||
|
@ -161,10 +162,10 @@
|
|||
},
|
||||
// 类型下拉
|
||||
lxChange(e) {
|
||||
this.lxValue = e;
|
||||
this.typeId = e;
|
||||
this.lxList.forEach(v => {
|
||||
if (v.value == e) {
|
||||
this.lxTextValue = v.text
|
||||
this.type = v.text
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -179,7 +180,7 @@
|
|||
},
|
||||
// 作业时间
|
||||
changeLog(e) {
|
||||
this.workTime = e
|
||||
this.workDate = e
|
||||
},
|
||||
// 取消
|
||||
cancel() {
|
||||
|
@ -189,9 +190,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addMafiArr = uni.getStorageSync('addMafiArr')
|
||||
addMafiArr.splice(this.mafiRowIndex, 1)
|
||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
||||
// let addMafiArr = uni.getStorageSync('addMafiArr')
|
||||
// addMafiArr.splice(this.mafiRowIndex, 1)
|
||||
// uni.setStorageSync('addMafiArr', addMafiArr);
|
||||
let sql = `DELETE FROM mafiListRespList WHERE webId = ${this.mafiRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/mafi'
|
||||
})
|
||||
|
@ -202,34 +205,53 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
let addMafiArr = uni.getStorageSync('addMafiArr')
|
||||
let addMafiObj = {
|
||||
vvyId: this.vvyId,
|
||||
vvyName: this.vvyName,
|
||||
loaderTypeId: this.loaderTypeId,
|
||||
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,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addMafiArr[this.mafiRowIndex] = addMafiObj;
|
||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addMafiArr != "") {
|
||||
addMafiArr.push(addMafiObj)
|
||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
||||
} else {
|
||||
addMafiArr = []
|
||||
addMafiArr.push(addMafiObj)
|
||||
uni.setStorageSync('addMafiArr', addMafiArr);
|
||||
}
|
||||
let sql = `insert into mafiListRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.loaderTypeId}','${this.loaderType}','${this.typeId}','${this.type}','${this.size}','${this.mafiBarcode}','${this.workDate}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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({
|
||||
url: '/pages/shipWork/mafi'
|
||||
})
|
||||
|
@ -241,7 +263,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -65,12 +66,33 @@
|
|||
} else {
|
||||
this.tabsIndex = this.tabsType
|
||||
}
|
||||
console.log(this.tabsType)
|
||||
this.peopleInfo = uni.getStorageSync('addPeopleArr')
|
||||
// this.peopleInfo = uni.getStorageSync('addPeopleArr')
|
||||
this.shiftInfo = uni.getStorageSync('addShiftArr')
|
||||
console.log(this.shiftInfo)
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
if (this.tabsType == 0) {
|
||||
this.executeSql1('messageRespList')
|
||||
}
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -112,6 +134,12 @@
|
|||
url: `/pages/shipWork/shiftDetails`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
},
|
||||
// 离开页面删除数据
|
||||
destroyed() {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -30,10 +31,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addNoticeArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addNoticeArr')
|
||||
this.executeSql1('shipmentLoadUnloadNoticeRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -54,6 +71,12 @@
|
|||
url: `/pages/shipWork/noticeAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -116,9 +117,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
||||
addNoticeArr.splice(this.noticeRowIndex, 1)
|
||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||
// let addNoticeArr = uni.getStorageSync('addNoticeArr')
|
||||
// addNoticeArr.splice(this.noticeRowIndex, 1)
|
||||
// uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||
let sql = `DELETE FROM shipmentLoadUnloadNoticeRespList WHERE webId = ${this.noticeRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/notice'
|
||||
})
|
||||
|
@ -129,28 +132,44 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
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,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addNoticeArr[this.noticeRowIndex] = addNoticeObj;
|
||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addNoticeArr != "") {
|
||||
addNoticeArr.push(addNoticeObj)
|
||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||
} else {
|
||||
addNoticeArr = []
|
||||
addNoticeArr.push(addNoticeObj)
|
||||
uni.setStorageSync('addNoticeArr', addNoticeArr);
|
||||
}
|
||||
let sql = `insert into shipmentLoadUnloadNoticeRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.workDate}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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({
|
||||
url: '/pages/shipWork/notice'
|
||||
})
|
||||
|
@ -162,7 +181,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -32,10 +33,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addOpinionArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addOpinionArr')
|
||||
this.executeSql1('shipmentQualityConsultationRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -56,6 +73,12 @@
|
|||
url: `/pages/shipWork/opinionAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -188,9 +189,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
||||
addOpinionArr.splice(this.opinionRowIndex, 1)
|
||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||
// let addOpinionArr = uni.getStorageSync('addOpinionArr')
|
||||
// addOpinionArr.splice(this.opinionRowIndex, 1)
|
||||
// uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||
let sql = `DELETE FROM shipmentQualityConsultationRespList WHERE webId = ${this.opinionRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/opinion'
|
||||
})
|
||||
|
@ -201,34 +204,55 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
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,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addOpinionArr[this.opinionRowIndex] = addOpinionObj;
|
||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addOpinionArr != "") {
|
||||
addOpinionArr.push(addOpinionObj)
|
||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||
} else {
|
||||
addOpinionArr = []
|
||||
addOpinionArr.push(addOpinionObj)
|
||||
uni.setStorageSync('addOpinionArr', addOpinionArr);
|
||||
}
|
||||
let sql = `insert into shipmentQualityConsultationRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.bthId}','${this.bthIdName}','${this.loaderTypeId}','${this.loaderType}','${this.vehicleSize}',
|
||||
'${this.sparePart}','${this.workTime}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||
'${webStatus}','${webDate}')`
|
||||
console.log(sql)
|
||||
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({
|
||||
url: '/pages/shipWork/opinion'
|
||||
})
|
||||
|
@ -240,7 +264,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -27,10 +28,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addPatrolArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addPatrolArr')
|
||||
this.executeSql1('safetyInspectionRespList')
|
||||
},
|
||||
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) {
|
||||
if (state != 'add') {
|
||||
uni.setStorageSync('patrolRow', item);
|
||||
|
@ -44,6 +61,12 @@
|
|||
url: `/pages/shipWork/patrolAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
<p><text class="required" v-if="obj.state != 'look'">*</text>图片上传:</p>
|
||||
<template v-if="obj.state != 'look'">
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
<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">
|
||||
</view>
|
||||
</view>
|
||||
|
@ -61,6 +61,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -81,7 +82,7 @@
|
|||
// 类型
|
||||
type: "",
|
||||
// 图片
|
||||
imageValue: [],
|
||||
url: [], // 待增加
|
||||
// 描述
|
||||
remark: "",
|
||||
}
|
||||
|
@ -118,7 +119,7 @@
|
|||
this.vvyName = this.patrolRow.vvyName
|
||||
this.type = this.patrolRow.type
|
||||
this.remark = this.patrolRow.remark
|
||||
this.imageValue = this.patrolRow.imageValue
|
||||
// this.url = this.patrolRow.url // 待增加
|
||||
},
|
||||
// 航次下拉
|
||||
hcChange(e) {
|
||||
|
@ -141,9 +142,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
||||
addPatrolArr.splice(this.patrolRowIndex, 1)
|
||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||
// let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
||||
// addPatrolArr.splice(this.patrolRowIndex, 1)
|
||||
// uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||
let sql = `DELETE FROM safetyInspectionRespList WHERE webId = ${this.patrolRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/patrol'
|
||||
})
|
||||
|
@ -154,30 +157,47 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
let addPatrolArr = uni.getStorageSync('addPatrolArr')
|
||||
let addPatrolObj = {
|
||||
vvyId: this.vvyId,
|
||||
vvyName: this.vvyName,
|
||||
type: this.type,
|
||||
remark: this.remark,
|
||||
imageValue: this.imageValue,
|
||||
tradeTypeName: this.shipInfo.voyageScheduleDataList[0].tradeTypeName,
|
||||
importExportFlagName: this.shipInfo.voyageScheduleDataList[0].importExportFlagName,
|
||||
spmName: this.shipInfo.voyageScheduleDataList[0].spmName,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addPatrolArr[this.patrolRowIndex] = addPatrolObj;
|
||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addPatrolArr != "") {
|
||||
addPatrolArr.push(addPatrolObj)
|
||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||
} else {
|
||||
addPatrolArr = []
|
||||
addPatrolArr.push(addPatrolObj)
|
||||
uni.setStorageSync('addPatrolArr', addPatrolArr);
|
||||
}
|
||||
let sql = `insert into safetyInspectionRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.type}','${this.remark}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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({
|
||||
url: '/pages/shipWork/patrol'
|
||||
})
|
||||
|
@ -189,7 +209,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -89,13 +90,13 @@
|
|||
tqValue: "",
|
||||
tqTextValue: "",
|
||||
tqList: [{
|
||||
value: 0,
|
||||
value: "0",
|
||||
text: "晴"
|
||||
}, {
|
||||
value: 1,
|
||||
value: " 1",
|
||||
text: "阴"
|
||||
}, {
|
||||
value: 2,
|
||||
value: "2",
|
||||
text: "雨"
|
||||
}],
|
||||
// 作业组数
|
||||
|
@ -112,7 +113,6 @@
|
|||
if ('params' in options) {
|
||||
// 获取传递的对象参数,使用decodeURIComponent解码,并转为对象
|
||||
this.obj = JSON.parse(decodeURIComponent(options.params))
|
||||
console.log(this.obj)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -204,9 +204,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
||||
addPeopleArr.splice(this.peopleRowIndex, 1)
|
||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||
// let addPeopleArr = uni.getStorageSync('addPeopleArr')
|
||||
// addPeopleArr.splice(this.peopleRowIndex, 1)
|
||||
// uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||
let sql = `DELETE FROM messageRespList WHERE webId = ${this.peopleRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.setStorageSync('tabsType', 0);
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/mixWork'
|
||||
|
@ -218,36 +220,57 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
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, // 船只名
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addPeopleArr[this.peopleRowIndex] = addPeopleObj;
|
||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addPeopleArr != "") {
|
||||
addPeopleArr.push(addPeopleObj)
|
||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||
} else {
|
||||
addPeopleArr = []
|
||||
addPeopleArr.push(addPeopleObj)
|
||||
uni.setStorageSync('addPeopleArr', addPeopleArr);
|
||||
let sql = `insert into messageRespList values('${webId}','${this.bwValue}','${this.bwTextValue}',
|
||||
'${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqValue}',
|
||||
'${this.tqTextValue}','${this.workValue}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||
'${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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.navigateTo({
|
||||
url: '/pages/shipWork/mixWork'
|
||||
|
@ -260,7 +283,34 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -339,7 +339,7 @@
|
|||
this.shiftRowIndex = uni.getStorageSync('shiftRowIndex')
|
||||
this.hcValue = this.dataInfo.vvyId
|
||||
this.hcTextValue = this.dataInfo.vvyName
|
||||
this.zxValue = this.dataInfo.zxId
|
||||
this.zxValue = this.dataInfo.loadType
|
||||
this.zxTextValue = this.dataInfo.zxTextValue
|
||||
this.ulList1 = this.dataInfo.shiftList
|
||||
this.fcUlList = this.dataInfo.fcList
|
||||
|
@ -511,8 +511,8 @@
|
|||
let addShiftObj = {
|
||||
vvyName: this.hcTextValue,
|
||||
vvyId: this.hcValue,
|
||||
zxName: this.zxTextValue,
|
||||
zxId: this.zxValue,
|
||||
loadTypeName: this.zxTextValue,
|
||||
loadType: this.zxValue,
|
||||
shiftList: this.ulList1,
|
||||
fcList: this.fcUlList,
|
||||
otherList: this.otherObj
|
||||
|
@ -535,6 +535,13 @@
|
|||
url: '/pages/shipWork/mixWork'
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.setStorageSync('tabsType', 1);
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/mixWork'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</view>
|
||||
<view class="li">
|
||||
<p>装卸类型:</p>
|
||||
<text> {{dataInfo.zxName}}</text>
|
||||
<text> {{dataInfo.loadTypeName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<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}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.setStorageSync('tabsType', 1);
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/mixWork'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -34,6 +34,14 @@
|
|||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
},
|
||||
methods: {
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -49,6 +49,14 @@
|
|||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
console.log(this.shipInfo)
|
||||
},
|
||||
methods: {
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -30,11 +31,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addSupplyArr')
|
||||
console.log(this.infoList)
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addSupplyArr')
|
||||
this.executeSql1('shipmentShipSupplyRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -55,6 +71,12 @@
|
|||
url: `/pages/shipWork/supplyAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
</view>
|
||||
<view class="li">
|
||||
<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>
|
||||
<text v-else>{{bthIdName}}</text>
|
||||
<text v-else>{{stopBerthageName}}</text>
|
||||
</view>
|
||||
<view class="li">
|
||||
<p><text class="required" v-if="obj.state != 'look'">*</text>供给类型:</p>
|
||||
|
@ -59,6 +59,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -77,8 +78,8 @@
|
|||
vvyName: "",
|
||||
hcList: [],
|
||||
// 泊位下拉框
|
||||
bthId: "",
|
||||
bthIdName: "",
|
||||
stopBerthage: "",
|
||||
stopBerthageName: "",
|
||||
bwList: [],
|
||||
// 供给类型
|
||||
supplyTypeId: "",
|
||||
|
@ -130,8 +131,8 @@
|
|||
this.supplyRowIndex = uni.getStorageSync('supplyRowIndex');
|
||||
this.vvyId = this.supplyRow.vvyId
|
||||
this.vvyName = this.supplyRow.vvyName
|
||||
this.bthId = this.supplyRow.bthId
|
||||
this.bthIdName = this.supplyRow.bthIdName
|
||||
this.stopBerthage = this.supplyRow.stopBerthage
|
||||
this.stopBerthageName = this.supplyRow.stopBerthageName
|
||||
this.supplyTypeId = this.supplyRow.sssId
|
||||
this.supplyType = this.supplyRow.supplyType
|
||||
this.supplyAmount = this.supplyRow.supplyAmount
|
||||
|
@ -148,10 +149,10 @@
|
|||
},
|
||||
// 泊位下拉
|
||||
bwChange(e) {
|
||||
this.bthId = e;
|
||||
this.stopBerthage = e;
|
||||
this.bwList.forEach(v => {
|
||||
if (v.value == e) {
|
||||
this.bthIdName = v.text
|
||||
this.stopBerthageName = v.text
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -176,9 +177,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
||||
addSupplyArr.splice(this.supplyRowIndex, 1)
|
||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||
// let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
||||
// addSupplyArr.splice(this.supplyRowIndex, 1)
|
||||
// uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||
let sql = `DELETE FROM shipmentShipSupplyRespList WHERE webId = ${this.supplyRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/supply'
|
||||
})
|
||||
|
@ -189,34 +192,56 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
let addSupplyArr = uni.getStorageSync('addSupplyArr')
|
||||
let addSupplyObj = {
|
||||
vvyId: this.vvyId,
|
||||
vvyName: this.vvyName,
|
||||
bthId: this.bthId,
|
||||
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,
|
||||
}
|
||||
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addSupplyArr[this.supplyRowIndex] = addSupplyObj;
|
||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addSupplyArr != "") {
|
||||
addSupplyArr.push(addSupplyObj)
|
||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||
} else {
|
||||
addSupplyArr = []
|
||||
addSupplyArr.push(addSupplyObj)
|
||||
uni.setStorageSync('addSupplyArr', addSupplyArr);
|
||||
}
|
||||
let sql =
|
||||
`insert into shipmentShipSupplyRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.stopBerthage}','${this.stopBerthageName}','${this.supplyTypeId}',
|
||||
'${this.supplyType}','${this.supplyAmount}','${this.supplyDate}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||
'${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({
|
||||
url: '/pages/shipWork/supply'
|
||||
})
|
||||
|
@ -228,7 +253,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -135,7 +136,7 @@
|
|||
this.untieRowIndex = uni.getStorageSync('untieRowIndex');
|
||||
this.vvyId = this.untieRow.vvyId
|
||||
this.vvyName = this.untieRow.vvyName
|
||||
this.zlShip = this.untieRow.zlShip
|
||||
this.zlShip = this.untieRow.shipDeadWeight
|
||||
this.bthId = this.untieRow.bthId
|
||||
this.bthIdName = this.untieRow.bthIdName
|
||||
this.attachTime = (this.untieRow.attachTime[0] ? this.untieRow.attachTime : '')
|
||||
|
@ -185,9 +186,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addUntieArr = uni.getStorageSync('addUntieArr')
|
||||
addUntieArr.splice(this.untieRowIndex, 1)
|
||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
||||
// let addUntieArr = uni.getStorageSync('addUntieArr')
|
||||
// addUntieArr.splice(this.untieRowIndex, 1)
|
||||
// uni.setStorageSync('addUntieArr', addUntieArr);
|
||||
let sql = `DELETE FROM attachUnmoorRespList WHERE webId = ${this.untieRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/untieCord'
|
||||
})
|
||||
|
@ -198,35 +201,55 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
let addUntieArr = uni.getStorageSync('addUntieArr')
|
||||
let addUntieObj = {
|
||||
zlShip: 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
|
||||
}
|
||||
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addUntieArr[this.untieRowIndex] = addUntieObj;
|
||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addUntieArr != "") {
|
||||
addUntieArr.push(addUntieObj)
|
||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
||||
} else {
|
||||
addUntieArr = []
|
||||
addUntieArr.push(addUntieObj)
|
||||
uni.setStorageSync('addUntieArr', addUntieArr);
|
||||
}
|
||||
let sql =
|
||||
`insert into attachUnmoorRespList values('${webId}','${this.zlShip}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.bthId}','${this.bthIdName}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||
'${this.attachTime}','${this.unmoorTime}','${this.shiftingBerthTime}','${this.noProductBerthTime}','${webStatus}','${webDate}')`
|
||||
this.executeSql(sql)
|
||||
}
|
||||
// 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({
|
||||
url: '/pages/shipWork/untieCord'
|
||||
})
|
||||
|
@ -238,7 +261,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -31,10 +32,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addUntieArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addUntieArr')
|
||||
this.executeSql1('attachUnmoorRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -55,6 +72,12 @@
|
|||
url: `/pages/shipWork/untieAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -30,10 +31,26 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
this.infoList = uni.getStorageSync('addAssignArr')
|
||||
// this.shipInfo = uni.getStorageSync('shipInfo')
|
||||
// this.infoList = uni.getStorageSync('addAssignArr')
|
||||
this.executeSql1('shipmentAdviserLayoutRespList')
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
@ -54,6 +71,12 @@
|
|||
url: `/pages/shipWork/workAssignAdd?params=${params}`
|
||||
})
|
||||
},
|
||||
onBackPress(event) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/documentList'
|
||||
})
|
||||
return true;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -230,9 +231,11 @@
|
|||
},
|
||||
// 弹框删除
|
||||
delConfirm() {
|
||||
let addAssignArr = uni.getStorageSync('addAssignArr')
|
||||
addAssignArr.splice(this.assignRowIndex, 1)
|
||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
||||
// let addAssignArr = uni.getStorageSync('addAssignArr')
|
||||
// addAssignArr.splice(this.assignRowIndex, 1)
|
||||
// uni.setStorageSync('addAssignArr', addAssignArr);
|
||||
let sql = `DELETE FROM shipmentAdviserLayoutRespList WHERE webId = ${this.assignRow.webId};`
|
||||
this.executeSql(sql)
|
||||
uni.navigateTo({
|
||||
url: '/pages/shipWork/workAssign'
|
||||
})
|
||||
|
@ -243,39 +246,62 @@
|
|||
},
|
||||
// 保存
|
||||
save() {
|
||||
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,
|
||||
}
|
||||
let date = new Date().getTime()
|
||||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
addAssignArr[this.assignRowIndex] = addAssignObj;
|
||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
||||
let sql =
|
||||
`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") {
|
||||
if (addAssignArr != "") {
|
||||
addAssignArr.push(addAssignObj)
|
||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
||||
} else {
|
||||
addAssignArr = []
|
||||
addAssignArr.push(addAssignObj)
|
||||
uni.setStorageSync('addAssignArr', addAssignArr);
|
||||
}
|
||||
let sql = `insert into shipmentAdviserLayoutRespList values('${webId}','${this.vvyId}','${this.vvyName}',
|
||||
'${this.bthId}','${this.bthIdName}','${this.pwcTypeId}','${this.pwcType}','${this.personNumber}',
|
||||
'${this.loaderTypeId}','${this.loaderType}','${this.vehicleSize}','${this.sparePart}','${this.workTime}',
|
||||
'${this.startTime}','${this.endTime}','${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
|
||||
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
|
||||
'${webStatus}','${webDate}')`
|
||||
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({
|
||||
url: '/pages/shipWork/workAssign'
|
||||
})
|
||||
|
@ -287,7 +313,33 @@
|
|||
uni.navigateTo({
|
||||
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>
|
||||
|
|
|
@ -113,7 +113,8 @@
|
|||
data.id++
|
||||
// let sql = "insert into " + this.dbTable + " values('" + data.id + "','" + data.content +
|
||||
// "','" + 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.content +
|
||||
"','" + data.fromId + "','" + data.toId + "'," + data.flag + ")";
|
||||
this.executeSql(sql)
|
||||
},
|
||||
|
@ -164,11 +165,7 @@
|
|||
});
|
||||
},
|
||||
executeSql(sql) {
|
||||
<<<<<<< HEAD
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
=======
|
||||
Sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
>>>>>>> 99e78e950aa9ec6dccfe44174d8f77ac3239cf00
|
||||
// 在resolve时执行的回调函数
|
||||
this.sqlData = value
|
||||
console.log(value); // 输出:Hello, World!
|
||||
|
|
Loading…
Reference in New Issue