From 63c0c44643fd8a6d0077de709c5ef0f61b4a08e7 Mon Sep 17 00:00:00 2001
From: Panzihang <819652404@qq.com>
Date: Fri, 4 Aug 2023 17:06:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Esqlit=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/createDataTable.js | 72 +++-
pages/shipWork/index.vue | 56 +--
pages/shipWork/mafiAdd.vue | 2 +-
pages/shipWork/mixWork.vue | 8 +
pages/shipWork/opinionAdd.vue | 6 +-
pages/shipWork/peopleAdd.vue | 680 ++++++++++++++++---------------
pages/shipWork/shiftAdd.vue | 131 ++++--
pages/shipWork/shiftDetails.vue | 22 +-
pages/shipWork/supplyAdd.vue | 2 +-
pages/shipWork/untieAdd.vue | 2 +-
pages/shipWork/workAssignAdd.vue | 6 +-
11 files changed, 568 insertions(+), 419 deletions(-)
diff --git a/common/createDataTable.js b/common/createDataTable.js
index 87dd273..d6d1e06 100644
--- a/common/createDataTable.js
+++ b/common/createDataTable.js
@@ -4,20 +4,50 @@ module.exports = {
dbPath: '_doc/dianji_chat.db',
// 创建所有表
createAllTable() {
+ // 创建船舶基本信息
+ this.createShipInfoTable()
+ // 创建人员信息
this.createMessageRespList()
- // this.createWorkMessageRespList()
+ // 创建工班信息
+ this.createWorkMessageRespList()
+ // 创建工班信息详细
+ this.createWorkMessageRespInfoList()
+ // // 创建工班信息翻仓
+ // this.createRetallyMessageRespList()
+ // // 创建工班信息翻仓详情
+ // this.createRetallyMessageRespInfoList()
+ // // 创建工班信息其他
+ // this.createInfoRespList()
+ // 创建系解缆
this.creatAttachUnmoorRespList()
+ // 创建供给
this.createShipmentShipSupplyRespList()
+ // 创建指导员作业布置
this.createShipmentAdviserLayoutRespList()
+ // 创建船舶装卸通知书
this.createShipmentLoadUnloadNoticeRespList()
+ // 创建质量意见征询
this.createShipmentQualityConsultationRespList()
+ // 创建异常情况
this.createAbnormalConditionRespList()
+ // 创建mafi
this.createMafiListRespList()
+ // 创建安全巡检
this.createSafetyInspectionRespList()
+ // 创建作业查询
this.createShipmentShipLoadPlansRespList()
+ // 创建船舶资料
this.createShipmentShipManage()
+ // 创建下拉数据
this.createShipOption()
},
+ // 创建船舶基本信息 shipInfoTable
+ createShipInfoTable() {
+ console.log("创建船舶基本信息表")
+ let sql =
+ 'CREATE TABLE if not exists shipInfoTable ("webId" text NOT NULL,"vslCd" text,"vslCnname" text,"vvyId" text,"vvyName" text,"importExportFlag" text,"importExportFlagName" text,"tradeType" text,"tradeTypeName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
// 创建人员信息 messageRespList
createMessageRespList() {
let sql =
@@ -25,12 +55,38 @@ module.exports = {
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)
- // },
+ createWorkMessageRespList() {
+ let sql =
+ 'CREATE TABLE if not exists workMessageRespList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"loadType" text,"loadTypeName" text,"pwcType" text,"pwcTypeName" text,"workStartTime" text,"workEndTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
+ // 创建工班信息详细 workMessageRespInfoList
+ createWorkMessageRespInfoList() {
+ let sql =
+ 'CREATE TABLE if not exists workMessageRespInfoList ("webId" text NOT NULL,"contactId" text,"carType" text,"carTypeName" text,"goodsNumber" text,"loadingType" text,"loadingTypeName" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
+ // 创建工班信息翻仓 retallyMessageRespList
+ createRetallyMessageRespList() {
+ console.log('创建工班信息翻仓表');
+ let sql =
+ 'CREATE TABLE if not exists workMessageRespFlipList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"retallyType" text,"retallyTypeName" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
+ // 创建工班信息翻仓详情 retallyMessageRespInfoList
+ createRetallyMessageRespInfoList() {
+ console.log('创建工班信息翻仓详情表');
+ let sql =
+ 'CREATE TABLE if not exists retallyMessageRespInfoList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"retallyOrigin" text,"retallyTerminus" text,"carType" text,"carTypeName" text,"retallyStartTime" text,"retallyEndTime" text,"goodsNumber" text,"goodsVolume" text,"goodsWeight" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
+ // 创建工班信息其他 infoRespList
+ createInfoRespList() {
+ console.log('创建工班信息翻仓其他表');
+ let sql =
+ 'CREATE TABLE if not exists infoRespList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"tecNum" text,"tecStartTm" text,"tecEndTm" text,"tecWeight" text,"tecVolume" text,"genNum" text,"genStartTm" text,"genEndTm" text,"genWeight" text,"genVolume" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
+ this.executeSql(sql)
+ },
// 创建系解缆 attachUnmoorRespList
creatAttachUnmoorRespList() {
let sql =
@@ -67,7 +123,7 @@ module.exports = {
'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
+ // 创建mafi 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"));'
diff --git a/pages/shipWork/index.vue b/pages/shipWork/index.vue
index 971be4f..aa50163 100644
--- a/pages/shipWork/index.vue
+++ b/pages/shipWork/index.vue
@@ -15,8 +15,7 @@
-
-
+
@@ -118,7 +117,17 @@
pageSize: 4,
current: 1,
- shipInfo: {},
+ // 船舶基本信息
+ shipInfo: {
+ vslCd: "123",
+ vslCnname: "测试船只",
+ vvyId: "hangciId",
+ vvyName: "hangciName",
+ importExportFlag: "jinchukouId",
+ importExportFlagName: "进口",
+ tradeType: "maoyileixingId",
+ tradeTypeName: "外贸"
+ },
// 船舶资料
shipData: {
vslCd: "123",
@@ -309,7 +318,7 @@
},
mounted() {
this.pamValue = uni.getStorageSync('portObj').portId
- this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
+ // this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
},
methods: {
open() {
@@ -348,28 +357,13 @@
},
dropTable() {
console.log('删除表');
- let sql = 'DROP TABLE shipmentShipLoadPlansRespList;'
+ let sql = 'DROP TABLE shipInfoTable;'
this.executeSql(sql)
},
dropData() {
- let sql = "delete from shipOption"
+ let sql = "delete from shipInfoTable"
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) => {
@@ -387,8 +381,7 @@
// 获取船的数据
initData() {
uni.request({
- url: this.$local + '/api/shipOperate/select?pamId=' + this.pamValue + "&vvyId=" + this
- .shipValue,
+ url: `${this.$local}/api/shipOperate/select?pamId=${this.pamValue}&vvyId=${this.shipValue}`,
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
@@ -423,7 +416,7 @@
// 获取船名航次下拉数据
getShip() {
uni.request({
- url: this.$local + '/api/shipOperate/queryShipmentVoyageData?key=' + this.shipInput,
+ url: `${this.$local}/api/shipOperate/queryShipmentVoyageData?key=${this.shipInput}`,
header: {
'Content-Type': 'application/json' //自定义请求头信息
},
@@ -460,6 +453,19 @@
}]
// this.initData()
},
+ // 船舶基本信息
+ shipDataInfo() {
+ let webStatus = 0
+ let sql = ""
+ let date = new Date().getTime()
+ let webId = uuidv4()
+ let webDate = api.getDate(date)
+ sql =
+ `insert into shipInfoTable values('${webId}','${this.shipInfo.vslCd}','${this.shipInfo.vslCnname}',
+ '${this.shipInfo.vvyId}','${this.shipInfo.vvyName}','${this.shipInfo.importExportFlag}','${this.shipInfo.importExportFlagName}',
+ '${this.shipInfo.tradeType}','${this.shipInfo.tradeTypeName}','${webStatus}','${webDate}')`
+ this.executeSql(sql)
+ },
// 船舶资料数据
cbzlData() {
let webStatus = 0
@@ -473,6 +479,7 @@
'${this.shipData.spmCabinht}','${this.shipData.spmMintide}','${this.shipData.spmCab}','${this.shipData.spmBoardCentrele}',
'${this.shipData.spmBoardFrontle}','${this.shipData.spmBoardLaterle}','${this.shipData.spmBoardCentrerg}','${this.shipData.spmBoardFrontrg}','${this.shipData.spmBoardLaterrg}',
'${webStatus}','${webDate}')`
+ console.log(sql)
this.executeSql(sql)
},
// 作业查询数据
@@ -524,6 +531,7 @@
this.zycxData()
this.cbzlData()
this.xlData()
+ this.shipDataInfo()
// let ids = []
// if (item.inVvyId != null && item.outVvyId == null) {
// ids.push(item.inVvyId)
diff --git a/pages/shipWork/mafiAdd.vue b/pages/shipWork/mafiAdd.vue
index 1148c0f..b15e542 100644
--- a/pages/shipWork/mafiAdd.vue
+++ b/pages/shipWork/mafiAdd.vue
@@ -33,7 +33,7 @@
*尺码:
-
+
{{size}}
diff --git a/pages/shipWork/mixWork.vue b/pages/shipWork/mixWork.vue
index 2b96bd7..40eb9b6 100644
--- a/pages/shipWork/mixWork.vue
+++ b/pages/shipWork/mixWork.vue
@@ -71,6 +71,9 @@
this.shipInfo = uni.getStorageSync('shipInfo')
if (this.tabsType == 0) {
this.executeSql1('messageRespList')
+ } else {
+ this.executeSql1('workMessageRespList')
+ this.executeSql1('workMessageRespInfoList')
}
},
methods: {
@@ -80,6 +83,8 @@
sqlite.executeSqlCeshi(sql).then((value) => {
if (this.tabsType == 0) {
this.peopleInfo = value
+ } else {
+ console.log(value)
}
}).catch((error) => {
// 在reject时执行的回调函数
@@ -96,8 +101,11 @@
this.tabsIndex = index;
if (item == "人员信息") {
this.tabsType = 0;
+ this.executeSql1('messageRespList')
} else {
this.tabsType = 1;
+ this.executeSql1('workMessageRespList')
+ this.executeSql1('workMessageRespInfoList')
}
},
// 点击新增
diff --git a/pages/shipWork/opinionAdd.vue b/pages/shipWork/opinionAdd.vue
index e4ec8f7..fd9b1aa 100644
--- a/pages/shipWork/opinionAdd.vue
+++ b/pages/shipWork/opinionAdd.vue
@@ -34,12 +34,12 @@
*车辆数量:
-
+
{{vehicleSize}}
*备件数量:
-
+
{{sparePart}}
@@ -100,7 +100,7 @@
sparePart: 0,
// 作业时间
workTime: [''],
-
+
// 下拉数据
optionData: [],
}
diff --git a/pages/shipWork/peopleAdd.vue b/pages/shipWork/peopleAdd.vue
index 6738dd6..689d9fa 100644
--- a/pages/shipWork/peopleAdd.vue
+++ b/pages/shipWork/peopleAdd.vue
@@ -1,370 +1,372 @@
-
-
-
-
-
- 船名:
- {{shipInfo.voyageScheduleDataList[0].spmName}}
+
+
+
+
+
+ 船名:
+ {{shipInfo.voyageScheduleDataList[0].spmName}}
+
+
+ *航次:
+
+ {{peopleRow.vvyName}}
+
+
+ 进出口:
+ {{shipInfo.voyageScheduleDataList[0].importExportFlagName}}
+
+
+ 贸易类型:
+ {{shipInfo.voyageScheduleDataList[0].tradeTypeName}}
+
+
+ *天气:
+
+ {{peopleRow.weatherType}}
+
+
+ *泊位:
+
+ {{peopleRow.bthIdName}}
+
+
+ *作业组数:
+
+ {{peopleRow.workSuite}}
+
+
+ *单船人数:
+
+ {{peopleRow.shipPerson}}
+
+
+ 作业时间:
+
+ {{peopleRow.jobStartTime}} - {{peopleRow.jobEndTime}}
+
-
- *航次:
-
- {{peopleRow.vvyName}}
+
+
+
+
+ 取消
+ 删除
+ 保存
+ 编辑
-
- 进出口:
- {{shipInfo.voyageScheduleDataList[0].importExportFlagName}}
-
-
- 贸易类型:
- {{shipInfo.voyageScheduleDataList[0].tradeTypeName}}
-
-
- *天气:
-
- {{peopleRow.weatherType}}
-
-
- *泊位:
-
- {{peopleRow.bthIdName}}
-
-
- *作业组数:
-
- {{peopleRow.workSuite}}
-
-
- *单船人数:
-
- {{peopleRow.shipPerson}}
-
-
- 作业时间:
-
- {{peopleRow.jobStartTime}} - {{peopleRow.jobEndTime}}
-
-
-
-
-
-
- 取消
- 删除
- 保存
- 编辑
-
-
+
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/shipWork/shiftAdd.vue b/pages/shipWork/shiftAdd.vue
index 9a144c3..cb4b4d0 100644
--- a/pages/shipWork/shiftAdd.vue
+++ b/pages/shipWork/shiftAdd.vue
@@ -52,7 +52,7 @@
*数量:
-
+
*装卸方式:
@@ -106,15 +106,15 @@
*数量:
-
+
*体积:
-
+
*重量:
-
+
@@ -128,11 +128,7 @@
*技术工人:
-
-
-
- *普通工人:
-
+
*作业时间 :
@@ -141,11 +137,28 @@
*重量:
-
+
*体积:
-
+
+
+
+ *普通工人:
+
+
+
+ *作业时间 :
+
+
+
+ *重量:
+
+
+
+ *体积:
+
描述:
@@ -183,6 +196,10 @@