代码优化,新增api
parent
ab1bc2129f
commit
9daa1cb4b2
|
@ -0,0 +1,13 @@
|
|||
module.exports = {
|
||||
// 获取日期 传一个时间戳 转为YY-MM-DD hh-mm-ss 格式
|
||||
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;
|
||||
},
|
||||
}
|
|
@ -14,6 +14,7 @@ module.exports = {
|
|||
this.createAbnormalConditionRespList()
|
||||
this.createMafiListRespList()
|
||||
this.createSafetyInspectionRespList()
|
||||
this.createShipmentShipLoadPlansRespList()
|
||||
},
|
||||
// 创建人员信息 messageRespList
|
||||
createMessageRespList() {
|
||||
|
@ -76,6 +77,13 @@ module.exports = {
|
|||
'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)
|
||||
},
|
||||
// 创建作业查询 shipmentShipLoadPlansRespList
|
||||
createShipmentShipLoadPlansRespList() {
|
||||
console.log("创建作业查询表");
|
||||
let sql =
|
||||
'CREATE TABLE if not exists shipmentShipLoadPlansRespList ("webId" text NOT NULL,"agentId" text,"agentName" text,"amount" text,"brdId" text,"brdName" text,"bvdId" text,"bvdName" text,"bvmId" text,"bvmName" text,"carHeight" text,"carLength" text,"carWidth" text,"customsDeclareNo" text,"customsDeclareStatus" text,"mnfBl" text,"potId" text,"potName" text,"sourceType" text,"vvyId" text,"vvyName" text,"yardPos" text, PRIMARY KEY("webId"));'
|
||||
this.executeSql(sql)
|
||||
},
|
||||
executeSql(sql) {
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -47,10 +48,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -153,7 +154,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE abnormalConditionRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||
|
@ -203,17 +204,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -127,8 +127,6 @@
|
|||
mounted() {
|
||||
this.pamValue = uni.getStorageSync('portObj').portId
|
||||
this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
|
||||
// 进页面创建表
|
||||
tableList.createAllTable()
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
@ -282,30 +280,32 @@
|
|||
},
|
||||
// 下载
|
||||
download(item) {
|
||||
let ids = []
|
||||
if (item.inVvyId != null && item.outVvyId == null) {
|
||||
ids.push(item.inVvyId)
|
||||
} else if (item.outVvyId != null && item.inVvyId == null) {
|
||||
ids.push(item.outVvyId)
|
||||
} else if (item.inVvyId != null && item.outVvyId != null) {
|
||||
ids.push(item.inVvyId)
|
||||
ids.push(item.outVvyId)
|
||||
}
|
||||
console.log(ids)
|
||||
uni.request({
|
||||
url: this.$local + '/api/shipOperate/download?vvyIds=' + ids,
|
||||
header: {
|
||||
'Content-Type': 'application/json' //自定义请求头信息
|
||||
},
|
||||
method: 'GET', //请求方式,必须为大写
|
||||
success: (res) => {
|
||||
console.log('接口返回------', res);
|
||||
if (res.statusCode == 200) {
|
||||
// 存储数据
|
||||
uni.setStorageSync('shipInfo', res.data.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
// 下载创建单证内的表
|
||||
tableList.createAllTable()
|
||||
// let ids = []
|
||||
// if (item.inVvyId != null && item.outVvyId == null) {
|
||||
// ids.push(item.inVvyId)
|
||||
// } else if (item.outVvyId != null && item.inVvyId == null) {
|
||||
// ids.push(item.outVvyId)
|
||||
// } else if (item.inVvyId != null && item.outVvyId != null) {
|
||||
// ids.push(item.inVvyId)
|
||||
// ids.push(item.outVvyId)
|
||||
// }
|
||||
// console.log(ids)
|
||||
// uni.request({
|
||||
// url: this.$local + '/api/shipOperate/download?vvyIds=' + ids,
|
||||
// header: {
|
||||
// 'Content-Type': 'application/json' //自定义请求头信息
|
||||
// },
|
||||
// method: 'GET', //请求方式,必须为大写
|
||||
// success: (res) => {
|
||||
// console.log('接口返回------', res);
|
||||
// if (res.statusCode == 200) {
|
||||
// // 存储数据
|
||||
// uni.setStorageSync('shipInfo', res.data.data);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// 上传
|
||||
upload(item) {
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -48,10 +49,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -209,7 +210,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE mafiListRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||
|
@ -264,17 +265,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
}
|
||||
// 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')
|
||||
|
@ -76,10 +75,9 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
// this.sqlData = value
|
||||
if (this.tabsType == 0) {
|
||||
this.peopleInfo = value
|
||||
console.log(this.peopleInfo)
|
||||
|
@ -89,10 +87,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -47,10 +48,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -136,7 +137,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE shipmentLoadUnloadNoticeRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||
|
@ -182,17 +183,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -34,7 +34,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -44,10 +45,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
add(state, item, index) {
|
||||
if (state != 'add') {
|
||||
uni.setStorageSync('patrolRow', item);
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -161,7 +162,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE safetyInspectionRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||
|
@ -210,17 +211,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -224,7 +225,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bthIdName}',
|
||||
|
@ -284,17 +285,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -47,10 +48,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -196,14 +197,13 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
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") {
|
||||
let sql =
|
||||
|
@ -254,17 +254,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -205,7 +206,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE attachUnmoorRespList SET shipDeadWeight = '${this.zlShip}',vvyId = '${this.vvyId}',
|
||||
|
@ -262,17 +263,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
|
@ -38,20 +38,16 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
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({
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
},
|
||||
methods: {
|
||||
// 查
|
||||
executeSql(sql) {
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
sqlite.executeSqlCeshi(sql).then((value) => {
|
||||
// 在resolve时执行的回调函数
|
||||
this.infoList = value
|
||||
|
@ -47,10 +48,6 @@
|
|||
console.error(error);
|
||||
});
|
||||
},
|
||||
executeSql1(tableName) {
|
||||
let sql = `select * from ${tableName}`
|
||||
this.executeSql(sql)
|
||||
},
|
||||
// 点击签名
|
||||
sign() {
|
||||
uni.navigateTo({
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
|
||||
<script>
|
||||
import sqlite from "../../common/sqlite.js"
|
||||
import api from "../../common/api.js"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -165,6 +166,7 @@
|
|||
// 获取当前行信息
|
||||
getRow() {
|
||||
this.assignRow = uni.getStorageSync('assignRow');
|
||||
console.log(this.assignRow)
|
||||
this.assignRowIndex = uni.getStorageSync('assignRowIndex');
|
||||
this.vvyId = this.assignRow.vvyId
|
||||
this.vvyName = this.assignRow.vvyName
|
||||
|
@ -177,7 +179,7 @@
|
|||
this.loaderType = this.assignRow.loaderType
|
||||
this.vehicleSize = this.assignRow.vehicleSize
|
||||
this.sparePart = this.assignRow.sparePart
|
||||
this.workTime = this.assignRow.workTime
|
||||
this.workTime = [this.assignRow.startTime, this.assignRow.endTime]
|
||||
this.startTime = this.assignRow.startTime
|
||||
this.endTime = this.assignRow.endTime
|
||||
},
|
||||
|
@ -250,7 +252,7 @@
|
|||
let str = String(date)
|
||||
let webId = Number(str.slice(str.length - 5))
|
||||
let webStatus = 0
|
||||
let webDate = this.getDate(date)
|
||||
let webDate = api.getDate(date)
|
||||
if (this.obj.state == "edit") {
|
||||
let sql =
|
||||
`UPDATE shipmentAdviserLayoutRespList SET vvyId = '${this.vvyId}', vvyName = '${this.vvyName}',
|
||||
|
@ -314,17 +316,6 @@
|
|||
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时执行的回调函数
|
||||
|
|
Loading…
Reference in New Issue