绑定下拉数据

dev2
Panzihang 2023-08-03 15:36:23 +08:00
parent a729731716
commit 96f8e07a89
19 changed files with 722 additions and 505 deletions

View File

@ -15,6 +15,8 @@ module.exports = {
this.createMafiListRespList()
this.createSafetyInspectionRespList()
this.createShipmentShipLoadPlansRespList()
this.createShipmentShipManage()
this.createShipOption()
},
// 创建人员信息 messageRespList
createMessageRespList() {
@ -79,15 +81,26 @@ module.exports = {
},
// 创建作业查询 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,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建船舶资料 shipmentShipManage
createShipmentShipManage() {
let sql =
'CREATE TABLE if not exists shipmentShipManage ("webId" text NOT NULL,"vslCd" text,"vslCnname" text,"vslGton" text,"vslNetton" text,"vslLoa" text,"vslBreadth" text,"vslDraftunload" text,"vslDraftload" text,"spmCabinht" text,"spmMintide" text,"spmCab" text,"spmBoardCentrele" text,"spmBoardFrontle" text,"spmBoardLaterle" text,"spmBoardCentrerg" text,"spmBoardFrontrg" text,"spmBoardLaterrg" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建下拉数据 shipOption
createShipOption() {
let sql =
'CREATE TABLE if not exists shipOption ("dictionariesName" text,"ptrCode" text,"ptrDesc" text,"webId" text NOT NULL,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
executeSql(sql) {
sqlite.executeSqlCeshi(sql).then((value) => {
// 在resolve时执行的回调函数
console.log(value);
// console.log(value);
}).catch((error) => {
// 在reject时执行的回调函数
console.error(error);

View File

@ -118,25 +118,17 @@ module.exports = {
// 判断有没有传参
if (dbTable !== undefined && data !== undefined) {
// 判断传的参是否有值
var bol = (JSON.stringify(data) == "{}");
var bol = (data == "");
if (!bol) {
if (condition == undefined) {
var sql = `INSERT INTO ${dbTable} VALUES('${data}')`;
var sql = `INSERT INTO ${dbTable} VALUES(${data})`;
// console.log(sql);
} else {
var sql = `INSERT INTO ${dbTable} (${condition}) VALUES(${data})`;
}
// console.log(sql);
return new Promise((resolve, reject) => {
// 表格添加数据
plus.sqlite.executeSql({
name: this.dbName,
sql: sql,
success(e) {
resolve(e);
},
fail(e) {
reject(e);
}
})
resolve(sql)
})
} else {
return new Promise((resolve, reject) => {

View File

@ -15,10 +15,7 @@
{
"path": "pages/index/instruct",
"style": {
"navigationBarTitleText": "指令",
"usingComponents": {
"van-progress": "/wxcomponents/vant/dist/progress/index"
}
"navigationBarTitleText": "指令"
}
},
{
@ -48,10 +45,7 @@
{
"path": "pages/shipWork/sign",
"style": {
"navigationBarTitleText": "单证签名",
"usingComponents": {
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "单证签名"
}
},
{
@ -63,28 +57,18 @@
{
"path": "pages/shipWork/peopleAdd",
"style": {
"navigationBarTitleText": "杂项作业(人员信息)",
"usingComponents": {
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "杂项作业(人员信息)"
}
},
{
"path": "pages/shipWork/shiftAdd",
"style": {
"navigationBarTitleText": "杂项作业(工班信息)",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "杂项作业(工班信息)"
}
}, {
"path": "pages/shipWork/shiftDetails",
"style": {
"navigationBarTitleText": "杂项作业(工班信息)",
"usingComponents": {
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "杂项作业(工班信息)"
}
}, {
"path": "pages/shipWork/untieCord",
@ -95,11 +79,7 @@
{
"path": "pages/shipWork/untieAdd",
"style": {
"navigationBarTitleText": "系解缆信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "系解缆信息"
}
},
{
@ -111,11 +91,7 @@
{
"path": "pages/shipWork/supplyAdd",
"style": {
"navigationBarTitleText": "供给信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "供给信息"
}
},
{
@ -127,11 +103,7 @@
{
"path": "pages/shipWork/workAssignAdd",
"style": {
"navigationBarTitleText": "指导员作业布置信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "指导员作业布置信息"
}
}, {
"path": "pages/shipWork/notice",
@ -142,11 +114,7 @@
{
"path": "pages/shipWork/noticeAdd",
"style": {
"navigationBarTitleText": "船舶装卸通知书信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "船舶装卸通知书信息"
}
}, {
"path": "pages/shipWork/opinion",
@ -156,11 +124,7 @@
}, {
"path": "pages/shipWork/opinionAdd",
"style": {
"navigationBarTitleText": "质量意见征询信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "质量意见征询信息"
}
}, {
"path": "pages/shipWork/abnormal",
@ -170,11 +134,7 @@
}, {
"path": "pages/shipWork/abnormalAdd",
"style": {
"navigationBarTitleText": "异常情况信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "异常情况信息"
}
}, {
"path": "pages/shipWork/mafi",
@ -184,11 +144,7 @@
}, {
"path": "pages/shipWork/mafiAdd",
"style": {
"navigationBarTitleText": "MAFI清单信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "MAFI清单信息"
}
}, {
"path": "pages/shipWork/patrol",
@ -198,11 +154,7 @@
}, {
"path": "pages/shipWork/patrolAdd",
"style": {
"navigationBarTitleText": "安全巡检信息",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "安全巡检信息"
}
}, {
"path": "pages/shipWork/shipInfo",
@ -234,30 +186,19 @@
{
"path": "pages/monitor/edit",
"style": {
"navigationBarTitleText": "编辑货物质量",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index",
"van-uploader": "/wxcomponents/vant/dist/uploader/index"
}
"navigationBarTitleText": "编辑货物质量"
}
},
{
"path": "pages/monitor/details",
"style": {
"navigationBarTitleText": "质损详情",
"usingComponents": {
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "质损详情"
}
},
{
"path": "pages/monitor/sign",
"style": {
"navigationBarTitleText": "签名",
"usingComponents": {
"van-button": "/wxcomponents/vant/dist/button/index"
}
"navigationBarTitleText": "签名"
}
},
{
@ -276,8 +217,14 @@
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0052A4",
"navigationBarTitleText": "港口Ipad",
"navigationBarTextStyle": "white"
"navigationBarTextStyle": "white",
"usingComponents": {
"van-icon": "/wxcomponents/vant/dist/icon/index",
"van-button": "/wxcomponents/vant/dist/button/index",
"van-uploader": "/wxcomponents/vant/dist/uploader/index",
"van-progress": "/wxcomponents/vant/dist/progress/index",
"van-stepper": "/wxcomponents/vant/dist/stepper/index"
}
},
"uniIdRouter": {},

View File

@ -81,6 +81,9 @@
type: "",
//
remark: "",
//
optionData: [],
}
},
onLoad(options) {
@ -93,17 +96,35 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -138,9 +159,6 @@
},
//
delConfirm() {
// 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({
@ -170,30 +188,6 @@
'${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'
})

View File

@ -27,7 +27,12 @@
<p>货代{{item.agentName}}</p>
</view>
</view>
<view class="pageBox" v-if="total > 0">
<uni-pagination :show-icon="true" :total="total" :pageSize="pageSize" :current="current"
@change="changePage" />
</view>
</template>
<o-empty v-else height="70vh" bg="#fff" />
</view>
</view>
@ -43,7 +48,13 @@
hasChoose: false,
menuList: [],
defaultValue: {},
listInfo: []
listInfo: [],
allList: [],
//
total: 0,
pageSize: 3,
current: 1,
}
},
mounted() {
@ -174,34 +185,50 @@
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.listInfo = value
console.log(this.listInfo)
this.allList = value
this.total = value.length
let newArr = this.getMapping(value, this.pageSize)
this.listInfo = newArr[this.current - 1];
}).catch((error) => {
// reject
console.error(error);
});
},
// ()
getMapping(list, num) {
let len = list.length
let newList = []
if (len) {
var chunk = num
for (var i = 0, j = len; i < j; i += chunk) {
newList.push(list.slice(i, i + chunk))
}
}
return newList
},
changePage(e) {
this.current = e.current;
this.executeSql1('shipmentShipLoadPlansRespList')
},
//
iconClick() {
if (this.searchValue != "") {
let listIndexArr = []
let newArr = []
this.listInfo.forEach((v, index) => {
this.allList.forEach((v, index) => {
if (v.brdName.indexOf(this.searchValue) != -1 || v.mnfBl.indexOf(this.searchValue) != -1) {
console.log(index)
listIndexArr.push(index)
}
})
console.log(listIndexArr)
if (listIndexArr.length > 0) {
listIndexArr.forEach((v, index) => {
newArr.push(this.listInfo[v])
newArr.push(this.allList[v])
})
this.listInfo = newArr
console.log(this.listInfo)
this.total = 0
}
} else {
this.initData()
this.executeSql1('shipmentShipLoadPlansRespList')
}
},
//

View File

@ -20,6 +20,7 @@
</template>
<script>
import sqlite from "../../common/sqlite.js"
export default {
data() {
return {
@ -73,13 +74,23 @@
url: "brandDetails"
}
],
shipInfo: []
}
},
mounted() {
this.shipInfo = uni.getStorageSync('shipInfo')
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
console.log(value)
}).catch((error) => {
// reject
console.error(error);
});
},
toGo(url) {
uni.navigateTo({
url: `/pages/shipWork/${url}`

View File

@ -119,6 +119,27 @@
current: 1,
shipInfo: {},
//
shipData: {
vslCd: "123",
vslCnname: "兰花快航",
vslGton: "9535",
vslNetton: "2861",
vslLoa: "100.29",
vslBreadth: "0",
vslDraftunload: "0",
vslDraftload: "0",
spmCabinht: "0",
spmMintide: "0",
spmCab: "15",
spmBoardCentrele: "0",
spmBoardFrontle: "0",
spmBoardLaterle: "0",
spmBoardCentrerg: "0",
spmBoardFrontrg: "0",
spmBoardLaterrg: "0"
},
//
workList: [{
agentId: "1",
agentName: "华图供应链管理(天津)有限公司",
@ -165,6 +186,120 @@
vvyName: "HC8595986",
yardPos: "C4区15道*2,16道*2",
}
],
//
optionData: [{
dictionariesName: "epTypeList",
ptrCode: "1",
ptrDesc: "贸易方式一",
},
{
dictionariesName: "epTypeList",
ptrCode: "2",
ptrDesc: "贸易方式二",
}, {
dictionariesName: "handTypeList",
ptrCode: "1",
ptrDesc: "装货",
}, {
dictionariesName: "handTypeList",
ptrCode: "2",
ptrDesc: "卸货",
}, {
dictionariesName: "loadTypeList",
ptrCode: "1",
ptrDesc: "Others",
}, {
dictionariesName: "loadTypeList",
ptrCode: "2",
ptrDesc: "Ro/Ro",
}, {
dictionariesName: "loadTypeList",
ptrCode: "3",
ptrDesc: "PortDevice",
}, {
dictionariesName: "ieTypeList",
ptrCode: "1",
ptrDesc: "出口",
}, {
dictionariesName: "ieTypeList",
ptrCode: "2",
ptrDesc: "进口",
},
{
dictionariesName: "supplyTypeList",
ptrCode: "1",
ptrDesc: "供油",
}, {
dictionariesName: "supplyTypeList",
ptrCode: "2",
ptrDesc: "供水",
}, {
dictionariesName: "supplyTypeList",
ptrCode: "3",
ptrDesc: "供电",
}, {
dictionariesName: "supplyTypeList",
ptrCode: "4",
ptrDesc: "其他",
}, {
dictionariesName: "turnoverTypeList",
ptrCode: "1",
ptrDesc: "舱内翻",
}, {
dictionariesName: "turnoverTypeList",
ptrCode: "2",
ptrDesc: "舱外翻",
webStatus: "0",
}, {
dictionariesName: "turnoverTypeList",
ptrCode: "3",
ptrDesc: "货物重装",
}, {
dictionariesName: "bthList",
ptrCode: "1",
ptrDesc: "泊位1",
}, {
dictionariesName: "bthList",
ptrCode: "2",
ptrDesc: "泊位2",
}, {
dictionariesName: "bthList",
ptrCode: "3",
ptrDesc: "泊位3",
}, {
dictionariesName: "carList",
ptrCode: "1",
ptrDesc: "轿车111",
}, {
dictionariesName: "carList",
ptrCode: "2",
ptrDesc: "备件",
}, {
dictionariesName: "carList",
ptrCode: "3",
ptrDesc: "大型轿车",
}, {
dictionariesName: "shiftList",
ptrCode: "1",
ptrDesc: "工班1",
}, {
dictionariesName: "shiftList",
ptrCode: "2",
ptrDesc: "工班2",
}, {
dictionariesName: "shiftList",
ptrCode: "3",
ptrDesc: "工班3",
}, {
dictionariesName: "vvyList",
ptrCode: "1",
ptrDesc: "hc123",
}, {
dictionariesName: "vvyList",
ptrCode: "2",
ptrDesc: "hc456",
},
]
}
},
@ -217,7 +352,7 @@
this.executeSql(sql)
},
dropData() {
let sql = "delete from shipmentShipLoadPlansRespList"
let sql = "delete from shipOption"
this.executeSql(sql)
},
add() {
@ -239,8 +374,7 @@
executeSql(sql) {
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
// this.sqlData = value
console.log(value); // Hello, World!
// console.log(value);
}).catch((error) => {
// reject
console.error(error);
@ -326,10 +460,23 @@
}]
// this.initData()
},
//
download(item) {
//
tableList.createAllTable()
//
cbzlData() {
let webStatus = 0
let sql = ""
let date = new Date().getTime()
let webId = uuidv4()
let webDate = api.getDate(date)
sql =
`insert into shipmentShipManage values('${webId}','${this.shipData.vslCd}','${this.shipData.vslCnname}',
'${this.shipData.vslGton}','${this.shipData.vslNetton}','${this.shipData.vslLoa}','${this.shipData.vslBreadth}','${this.shipData.vslDraftunload}','${this.shipData.vslDraftload}',
'${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}')`
this.executeSql(sql)
},
//
zycxData() {
let webStatus = 0
let sql = ""
for (let i = 0; i < this.workList.length; i++) {
@ -345,6 +492,38 @@
'${webStatus}','${webDate}')`
this.executeSql(sql)
}
},
//
xlData() {
for (let i = 0; i < this.optionData.length; i++) {
this.optionData[i]["webId"] = uuidv4()
let date = new Date().getTime()
this.optionData[i]["webStatus"] = "0"
this.optionData[i]["webDate"] = api.getDate(date)
let dbTable = 'shipOption'
let Arr = []
for (let key in this.optionData[i]) {
Arr.push(`'${ this.optionData[i][key]}'`);
}
let Str = Arr.join(',')
// console.log(Str)
sqlite.insertTableData(dbTable, Str).then((value) => {
// resolve
// console.log(value);
this.executeSql(value)
}).catch((error) => {
// reject
console.error(error);
});
}
},
//
download(item) {
//
tableList.createAllTable()
this.zycxData()
this.cbzlData()
this.xlData()
// let ids = []
// if (item.inVvyId != null && item.outVvyId == null) {
// ids.push(item.inVvyId)

View File

@ -108,6 +108,9 @@
loaderTypeId: "",
loaderType: "",
zxList: [],
//
optionData: [],
}
},
onLoad(options) {
@ -120,21 +123,45 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.handTypeList.forEach((v, index) => {
let zxOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'handTypeList') {
zxOption.push(v)
}
})
zxOption.forEach((v, index) => {
this.zxList.push({
text: v.ptrDesc,
value: v.ptrCode
@ -194,9 +221,6 @@
},
//
delConfirm() {
// 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({
@ -227,34 +251,6 @@
'${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'
})

View File

@ -80,7 +80,6 @@
sqlite.executeSqlCeshi(sql).then((value) => {
if (this.tabsType == 0) {
this.peopleInfo = value
console.log(this.peopleInfo)
}
}).catch((error) => {
// reject

View File

@ -66,6 +66,9 @@
hcList: [],
//
workDate: [''],
//
optionData: [],
}
},
onLoad(options) {
@ -78,17 +81,35 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -121,9 +142,6 @@
},
//
delConfirm() {
// 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({
@ -151,28 +169,6 @@
'${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'
})

View File

@ -100,6 +100,9 @@
sparePart: 0,
//
workTime: [''],
//
optionData: [],
}
},
onLoad(options) {
@ -112,31 +115,61 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.handTypeList.forEach((v, index) => {
let zxOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'handTypeList') {
zxOption.push(v)
}
})
zxOption.forEach((v, index) => {
this.zxList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
//
let bwOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'bthList') {
bwOption.push(v)
}
})
bwOption.forEach((v, index) => {
this.bwList.push({
text: v.bthBthnm,
value: v.bthId
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -193,9 +226,6 @@
},
//
delConfirm() {
// 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({
@ -228,34 +258,6 @@
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'
})

View File

@ -89,6 +89,9 @@
url: [], //
//
remark: "",
//
optionData: [],
}
},
onLoad(options) {
@ -101,17 +104,35 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -146,9 +167,6 @@
},
//
delConfirm() {
// 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({
@ -177,30 +195,6 @@
'${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'
})

View File

@ -96,13 +96,15 @@
tqList: [{
value: "0",
text: "晴"
}, {
},
{
value: " 1",
text: "阴"
}, {
value: "2",
text: "雨"
}],
}
],
//
workValue: 0,
//
@ -111,6 +113,9 @@
datetime: ['', ''],
startTime: "",
endTime: "",
//
optionData: [],
}
},
onLoad(options) {
@ -123,29 +128,54 @@
if (this.obj.state == "edit" || this.obj.state == "look") {
this.getRow()
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
this.bwList.push({
text: v.bthBthnm,
value: v.bthId
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
})
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
let bwOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'bthList') {
bwOption.push(v)
}
})
bwOption.forEach((v, index) => {
this.bwList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
},
//
getRow() {
this.peopleRow = uni.getStorageSync('peopleRow');
this.peopleRowIndex = uni.getStorageSync('peopleRowIndex');
this.hcValue = this.peopleRow.vvyId
this.hcTextValue = this.peopleRow.vvyName
this.tqValue = this.peopleRow.weatherId
@ -208,9 +238,6 @@
},
//
delConfirm() {
// 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);
@ -230,7 +257,7 @@
let webDate = api.getDate(date)
if (this.obj.state == "edit") {
let sql =
`UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bthIdName}',
`UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bwTextValue}',
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}',
@ -244,36 +271,6 @@
'${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'

View File

@ -182,6 +182,7 @@
</template>
<script>
import sqlite from "../../common/sqlite.js"
export default {
data() {
return {
@ -270,6 +271,9 @@
describe: "",
dgWork: "",
notes: "",
//
optionData: [],
}
}
},
@ -280,56 +284,103 @@
}
},
mounted() {
this.executeSql1('shipOption')
if (this.obj.state == 'edit') {
this.editData();
}
this.getShip()
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.handTypeList.forEach((v, index) => {
let zxOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'handTypeList') {
zxOption.push(v)
}
})
zxOption.forEach((v, index) => {
this.zxList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.shipmentBasicShiftList.forEach((v, index) => {
let gbOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'shiftList') {
gbOption.push(v)
}
})
gbOption.forEach((v, index) => {
this.gbList.push({
text: v.pwcTypeDesc,
value: v.pwcId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.shipmentVehicleModeList.forEach((v, index) => {
let cxOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'carList') {
cxOption.push(v)
}
})
cxOption.forEach((v, index) => {
this.cxList.push({
text: v.bvmName,
value: v.bvmId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.loadTypeList.forEach((v, index) => {
let fsOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'loadTypeList') {
fsOption.push(v)
}
})
fsOption.forEach((v, index) => {
this.fsList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.turnoverTypeList.forEach((v, index) => {
let fcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'turnoverTypeList') {
fcOption.push(v)
}
})
fcOption.forEach((v, index) => {
this.fcList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
},

View File

@ -11,7 +11,7 @@
</view>
<view class="li">
<p>航次</p>
<text>{{shipInfo.voyageScheduleDataList[0].vvyName}}</text>
<text>{{dataInfo.vvyName}}</text>
</view>
<view class="li">
<p>进出口</p>
@ -60,7 +60,7 @@
<view class="ul" v-for="(item2,index2) in item.fcUlList2" :key="index2 + 'info'">
<view class="li">
<p>航次</p>
<text>{{shipInfo.voyageScheduleDataList[0].vvyName}}</text>
<text>{{dataInfo.vvyName}}</text>
</view>
<view class="li">
<p>翻舱起点</p>

View File

@ -2,40 +2,52 @@
<view class="shipInfo">
<view class="container">
<view class="ul">
<view class="li">船名{{shipInfo.shipmentShipManage.vslCnname}}</view>
<view class="li">总重{{shipInfo.shipmentShipManage.vslGton}}</view>
<view class="li">净重{{shipInfo.shipmentShipManage.vslNetton}}</view>
<view class="li">长度{{shipInfo.shipmentShipManage.vslLoa}}</view>
<view class="li">宽度{{shipInfo.shipmentShipManage.vslBreadth}}</view>
<view class="li">空载吃水{{shipInfo.shipmentShipManage.vslDraftunload}}</view>
<view class="li">重载吃水{{shipInfo.shipmentShipManage.vslDraftload}}</view>
<view class="li">舱口高度{{shipInfo.shipmentShipManage.spmCabinht}}</view>
<view class="li">最低作业潮水{{shipInfo.shipmentShipManage.spmMintide}}</view>
<view class="li">驾驶台位置{{shipInfo.shipmentShipManage.spmCab}}</view>
<view class="li">跳板中左{{shipInfo.shipmentShipManage.spmBoardCentrele}}</view>
<view class="li">跳板前左{{shipInfo.shipmentShipManage.spmBoardFrontle}}</view>
<view class="li">跳板后左{{shipInfo.shipmentShipManage.spmBoardLaterle}}</view>
<view class="li">跳板中右{{shipInfo.shipmentShipManage.spmBoardCentrerg}}</view>
<view class="li">跳板前右{{shipInfo.shipmentShipManage.spmBoardFrontrg}}</view>
<view class="li">跳板后右 {{shipInfo.shipmentShipManage.spmBoardLaterrg}}</view>
<view class="li">船名{{shipInfo.vslCnname}}</view>
<view class="li">总重{{shipInfo.vslGton}}</view>
<view class="li">净重{{shipInfo.vslNetton}}</view>
<view class="li">长度{{shipInfo.vslLoa}}</view>
<view class="li">宽度{{shipInfo.vslBreadth}}</view>
<view class="li">空载吃水{{shipInfo.vslDraftunload}}</view>
<view class="li">重载吃水{{shipInfo.vslDraftload}}</view>
<view class="li">舱口高度{{shipInfo.spmCabinht}}</view>
<view class="li">最低作业潮水{{shipInfo.spmMintide}}</view>
<view class="li">驾驶台位置{{shipInfo.spmCab}}</view>
<view class="li">跳板中左{{shipInfo.spmBoardCentrele}}</view>
<view class="li">跳板前左{{shipInfo.spmBoardFrontle}}</view>
<view class="li">跳板后左{{shipInfo.spmBoardLaterle}}</view>
<view class="li">跳板中右{{shipInfo.spmBoardCentrerg}}</view>
<view class="li">跳板前右{{shipInfo.spmBoardFrontrg}}</view>
<view class="li">跳板后右 {{shipInfo.spmBoardLaterrg}}</view>
</view>
</view>
</view>
</template>
<script>
import sqlite from "../../common/sqlite.js"
export default {
data() {
return {
shipInfo: {
shipmentShipManage: {}
},
shipInfo: {},
}
},
mounted() {
this.shipInfo = uni.getStorageSync('shipInfo')
// this.shipInfo = uni.getStorageSync('shipInfo')
this.executeSql1('shipmentShipManage')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.shipInfo = value[0]
console.log(this.shipInfo)
}).catch((error) => {
// reject
console.error(error);
});
},
onBackPress(event) {
uni.navigateTo({
url: '/pages/shipWork/documentList'

View File

@ -92,6 +92,9 @@
supplyAmount: 0,
//
supplyDate: [""],
//
optionData: [],
}
},
onLoad(options) {
@ -104,25 +107,58 @@
if (this.obj.state == "edit" || this.obj.state == "look") {
this.getRow()
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
this.bwList.push({
text: v.bthBthnm,
value: v.bthId
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
})
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
this.shipInfo.supplyTypeList.forEach((v, index) => {
//
let bwOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'bthList') {
bwOption.push(v)
}
})
bwOption.forEach((v, index) => {
this.bwList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
let gjOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'supplyTypeList') {
gjOption.push(v)
}
})
gjOption.forEach((v, index) => {
this.gjList.push({
text: v.ptrDesc,
value: v.ptrCode
@ -181,9 +217,6 @@
},
//
delConfirm() {
// 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({
@ -217,33 +250,6 @@
'${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'
})

View File

@ -103,6 +103,9 @@
shiftingBerthTime: [''],
//
noProductBerthTime: [''],
//
optionData: [],
}
},
onLoad(options) {
@ -115,22 +118,48 @@
if (this.obj.state == "edit" || this.obj.state == "look") {
this.getRow()
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
this.bwList.push({
text: v.bthBthnm,
value: v.bthId
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
})
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
let bwOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'bthList') {
bwOption.push(v)
}
})
bwOption.forEach((v, index) => {
this.bwList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -190,9 +219,6 @@
},
//
delConfirm() {
// 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({
@ -225,34 +251,6 @@
'${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'
})

View File

@ -119,6 +119,9 @@
workTime: ['', ''],
startTime: "",
endTime: "",
//
optionData: [],
}
},
onLoad(options) {
@ -131,38 +134,74 @@
if (this.obj.state == 'edit' || this.obj.state == 'look') {
this.getRow();
}
this.getShip()
this.executeSql1('shipOption')
},
methods: {
//
executeSql1(tableName) {
let sql = `select * from ${tableName}`
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
this.optionData = value
this.getShip()
}).catch((error) => {
// reject
console.error(error);
});
},
//
getShip() {
this.shipInfo = uni.getStorageSync('shipInfo')
//
this.shipInfo.voyageScheduleDataList.forEach((v, index) => {
//
let hcOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'vvyList') {
hcOption.push(v)
}
})
hcOption.forEach((v, index) => {
this.hcList.push({
text: v.vvyName,
value: v.vvyId
text: v.ptrDesc,
value: v.ptrCode
})
})
//
let bwOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'bthList') {
bwOption.push(v)
}
})
bwOption.forEach((v, index) => {
this.bwList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.handTypeList.forEach((v, index) => {
let zxOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'handTypeList') {
zxOption.push(v)
}
})
zxOption.forEach((v, index) => {
this.zxList.push({
text: v.ptrDesc,
value: v.ptrCode
})
})
//
this.shipInfo.shipmentBasicShiftList.forEach((v, index) => {
let gbOption = []
this.optionData.forEach((v, index) => {
if (v.dictionariesName == 'shiftList') {
gbOption.push(v)
}
})
gbOption.forEach((v, index) => {
this.gbList.push({
text: v.pwcTypeDesc,
value: v.pwcId
})
})
//
this.shipInfo.pubBerthesManageRespList.forEach((v, index) => {
this.bwList.push({
text: v.bthBthnm,
value: v.bthId
text: v.ptrDesc,
value: v.ptrCode
})
})
},
@ -236,9 +275,6 @@
},
//
delConfirm() {
// 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({
@ -273,39 +309,6 @@
'${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'
})