From 0a400fd422820ed466044803208b1dcb7df45b54 Mon Sep 17 00:00:00 2001 From: Panzihang <819652404@qq.com> Date: Fri, 26 Jan 2024 18:02:31 +0800 Subject: [PATCH] 1.26 --- config/index.js | 3 +- env.js | 18 ++++++++++ main.js | 1 + pages/index/instruct.vue | 17 +++++++-- pages/login/index.vue | 39 ++++++++++++++++++--- pages/quality/edit.vue | 65 ++++++++++++++++++----------------- pages/quality/index.vue | 1 + pages/quality/zsEdit.vue | 1 + pages/shipWork/index.vue | 50 ++++++++++++++++++++++++++- pages/shipWork/mafi.vue | 2 +- pages/shipWork/mixWork.vue | 5 +-- pages/shipWork/peopleAdd.vue | 50 ++++++++++++++++----------- pages/shipWork/supply.vue | 4 +-- pages/shipWork/supplySign.vue | 5 +-- pages/shipWork/untieCord.vue | 2 +- 15 files changed, 193 insertions(+), 70 deletions(-) create mode 100644 env.js diff --git a/config/index.js b/config/index.js index aa7c553..3415388 100644 --- a/config/index.js +++ b/config/index.js @@ -16,7 +16,8 @@ export default { * @description api请求基础路径 */ // local: "http://192.168.61.133/tos", // VPN地址 - local: "https://rtops4.haitongauto.com/tos", // 海通地址 + local: "https://rtops4.haitongauto.com/tos", // 海通地址(测试版) + local2: "https://rtops.haitongauto.com/tos", // 海通地址(正式版) imgSrc: "http://116.205.142.169/HtRtosResource/assets/", mapkey: "FUFBZ-KBIWW-P63RR-RR4W3-BNV4H-T6BGX" } \ No newline at end of file diff --git a/env.js b/env.js new file mode 100644 index 0000000..4363b66 --- /dev/null +++ b/env.js @@ -0,0 +1,18 @@ +import config, { local ,local2 } from '@/config/index.js' +import Vue from 'vue' +export function changeEnv () { + const {local ,local2} = config + if(Vue.prototype.$local == local) { + Vue.prototype.$local = local2 + uni.showToast({ + icon: 'none', + title: '切换到正式环境' + }); + } else { + Vue.prototype.$local = local + uni.showToast({ + icon: 'none', + title: '切换到测试环境' + }); + } +} \ No newline at end of file diff --git a/main.js b/main.js index 0daeb28..cf5a6f0 100644 --- a/main.js +++ b/main.js @@ -3,6 +3,7 @@ import store from './store' import config from '@/config'; const { local, + local2, mapkey, imgSrc } = config; diff --git a/pages/index/instruct.vue b/pages/index/instruct.vue index 419035d..69f3aaa 100644 --- a/pages/index/instruct.vue +++ b/pages/index/instruct.vue @@ -553,12 +553,22 @@ :key="index3" :style="getDynamicStyle(item3, item.shipSpace)"> - {{item3.stowageNo}} {{item3.potName}} {{item3.amount}} + {{item3.stowageNo}} + {{item3.potName}} + ({{item3.transitPortName}}) + {{item3.amount}}

- {{item3.stowageNo}} {{item3.potName}} - {{item3.amount}} + {{item3.stowageNo}} + {{item3.potName}} + ({{item3.transitPortName}}) + + {{item3.amount}}

@@ -1684,6 +1694,7 @@ success: (res) => { if (res.data.status == "200") { this.goodsInfo = res.data.data + console.log(this.goodsInfo) if (this.imgInfo.whetherNormal == "0") { this.goodsInfo.reverse() } diff --git a/pages/login/index.vue b/pages/login/index.vue index 73501c5..7d3fa1d 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -9,6 +9,9 @@ + + 切换环境 + @@ -62,6 +65,9 @@ decrypt } from "../../common/crypto.js" import LotusLoading from "../../components/Winglau14-lotusLoading/Winglau14-LotusLoading.vue"; + import { + changeEnv + } from '../../env.js' export default { data() { return { @@ -85,20 +91,22 @@ lotusLoadingData: { isShow: false //设置显示加载中组件true显示false隐藏 }, - pwdShow: false + pwdShow: false, } }, components: { LotusLoading }, - onLoad() { - this.screenHeight = uni.getSystemInfoSync().windowHeight; - }, + methods: { // 点击图标 iconC() { this.pwdShow = !this.pwdShow }, + // 切换环境 + tabHj() { + changeEnv() + }, // 登录 loginGo(type) { this.lotusLoadingData.isShow = true @@ -264,7 +272,7 @@ position: absolute; top: 117px; text-align: center; - + p { font-size: 36px; color: #FFFFFF; @@ -279,6 +287,27 @@ display: flex; justify-content: center; + .tabBox { + position: absolute; + right: 10px; + top: 10px; + + .hjButton { + width: 80px; + height: 30px; + line-height: 30px; + text-align: center; + background-color: #0067CF; + color: #fff; + } + + text { + color: #23262E; + text-align: center; + } + } + + .loginTop { width: 172px; height: 30px; diff --git a/pages/quality/edit.vue b/pages/quality/edit.vue index dbe2fef..9b7aba8 100644 --- a/pages/quality/edit.vue +++ b/pages/quality/edit.vue @@ -554,39 +554,41 @@ }, // type 1 板车照片 2板车车牌照 3质损照片 4车架号图片 5签名 6参考图 initImg(fileName, type) { - uni.request({ - url: `${this.$local}/api/file/url/?fileName=${fileName}`, - header: { - 'Content-Type': 'application/json', //自定义请求头信息 - 'Authorization': `Bearer ${this.loginObj.access_token}` - }, - method: 'GET', //请求方式,必须为大写 - success: (res) => { - if (res.statusCode == 200) { - if (type == 1) { - this.bcPhoto2.push({ - url: res.data - }) - } else if (type == 2) { - this.bcLicense2.push({ - url: res.data - }) - } else if (type == 3) { - this.zsPhoto2.push({ - url: res.data - }) - } else if (type == 4) { - this.carPhoto2.push({ - url: res.data - }) - } else if (type == 5) { - this.signImg = res.data - } else if (type == 6) { - this.hzzsImg = res.data + if (fileName != "") { + uni.request({ + url: `${this.$local}/api/file/url/?fileName=${fileName}`, + header: { + 'Content-Type': 'application/json', //自定义请求头信息 + 'Authorization': `Bearer ${this.loginObj.access_token}` + }, + method: 'GET', //请求方式,必须为大写 + success: (res) => { + if (res.statusCode == 200) { + if (type == 1) { + this.bcPhoto2.push({ + url: res.data + }) + } else if (type == 2) { + this.bcLicense2.push({ + url: res.data + }) + } else if (type == 3) { + this.zsPhoto2.push({ + url: res.data + }) + } else if (type == 4) { + this.carPhoto2.push({ + url: res.data + }) + } else if (type == 5) { + this.signImg = res.data + } else if (type == 6) { + this.hzzsImg = res.data + } } } - } - }) + }) + } }, // 质损发生环节选项 radioChange(evt) { @@ -1401,6 +1403,7 @@ "ygqId": this.ygqId, // 质量id "vinCode": this.carValue, // 车架号 } + console.log(editReqDTO) uni.request({ url: `${this.$local}/api/goodsQuality/edit`, data: editReqDTO, diff --git a/pages/quality/index.vue b/pages/quality/index.vue index 7b006cd..6341b19 100644 --- a/pages/quality/index.vue +++ b/pages/quality/index.vue @@ -171,6 +171,7 @@ this.portObj = uni.getStorageSync('portObj') uni.setStorageSync('signImg', "") uni.setStorageSync('hzzsImg', "") + uni.setStorageSync('isSign', true) this.initData() this.getBrand() this.getShip() diff --git a/pages/quality/zsEdit.vue b/pages/quality/zsEdit.vue index 3140cd2..4e59cc1 100644 --- a/pages/quality/zsEdit.vue +++ b/pages/quality/zsEdit.vue @@ -145,6 +145,7 @@ this.ctx.lineTo(point2.X, point2.Y); this.ctx.stroke(); this.ctx.draw(true); + this.isSign = true }, handleCancel() { uni.navigateBack({ diff --git a/pages/shipWork/index.vue b/pages/shipWork/index.vue index d1767c1..662dbe5 100644 --- a/pages/shipWork/index.vue +++ b/pages/shipWork/index.vue @@ -964,8 +964,9 @@ value.forEach(v => { this.vtpList.push(v.vtpId) }) - } else if (tableName == 'shipOption') {} else if (tableName == "messageRespList") { + } else if (tableName == "messageRespList") { that.messageRespList = value + console.log(value) } else if (tableName == "workMessageRespList") { that.workMessageRespList = value that.workMessageRespList.forEach(v => { @@ -999,18 +1000,65 @@ }) } else if (tableName == "attachUnmoorRespList") { that.attachUnmoorRespList = value + that.attachUnmoorRespList.forEach(v => { + if (v.attachTime == "null") { + that.$set(v, "attachTime", null) + } + if (v.unmoorTime == "null") { + that.$set(v, "unmoorTime", null) + } + if (v.shiftingBerthTime == "null") { + that.$set(v, "shiftingBerthTime", null) + } + if (v.noProductBerthStTime == "null") { + that.$set(v, "noProductBerthStTime", null) + } + if (v.noProductBerthEdTime == "null") { + that.$set(v, "noProductBerthEdTime", null) + } + }) } else if (tableName == "shipmentShipSupplyRespList") { that.shipmentShipSupplyRespList = value + that.shipmentShipSupplyRespList.forEach(v => { + if (v.supplyDate == "null") { + that.$set(v, "supplyDate", null) + } + }) } else if (tableName == "shipmentAdviserLayoutRespList") { that.shipmentAdviserLayoutRespList = value + that.shipmentAdviserLayoutRespList.forEach(v => { + if (v.workTime == "null") { + that.$set(v, "workTime", null) + } + }) } else if (tableName == "shipmentLoadUnloadNoticeRespList") { that.shipmentLoadUnloadNoticeRespList = value + that.shipmentLoadUnloadNoticeRespList.forEach(v => { + if (v.workDate == "null") { + that.$set(v, "workDate", null) + } + }) } else if (tableName == "shipmentQualityConsultationRespList") { that.shipmentQualityConsultationRespList = value + that.shipmentQualityConsultationRespList.forEach(v => { + if (v.operationDate == "null") { + that.$set(v, "operationDate", null) + } + }) } else if (tableName == "abnormalConditionRespList") { that.abnormalConditionRespList = value + that.abnormalConditionRespList.forEach(v => { + if (v.operationDate == "null") { + that.$set(v, "operationDate", null) + } + }) } else if (tableName == "mafiListRespList") { that.mafiListRespList = value + that.mafiListRespList.forEach(v => { + if (v.workDate == "null") { + that.$set(v, "workDate", null) + } + }) } else if (tableName == "workSignTable") { that.workSignTable = value } else if (tableName == 'evaluateTable') { diff --git a/pages/shipWork/mafi.vue b/pages/shipWork/mafi.vue index 14b4d3d..198887e 100644 --- a/pages/shipWork/mafi.vue +++ b/pages/shipWork/mafi.vue @@ -19,7 +19,7 @@

装卸方式:{{item.loadType}}

-

未提交审核

+

待提交

待审核

diff --git a/pages/shipWork/mixWork.vue b/pages/shipWork/mixWork.vue index 5819668..06bb3aa 100644 --- a/pages/shipWork/mixWork.vue +++ b/pages/shipWork/mixWork.vue @@ -24,7 +24,7 @@

单船人数:{{item.shipPerson}}

-

未提交审核

+

待提交

待审核

@@ -68,7 +68,7 @@ 结束时间:{{item2.workEndTime}}
-

未提交审核

+

待提交

待审核

@@ -145,6 +145,7 @@ .aId] = [item]; return res; }, {})); + console.log(this.shiftInfo) this.shiftInfo.forEach(v => { v.forEach(i => { this.$set(i, "shiftArr", []) diff --git a/pages/shipWork/peopleAdd.vue b/pages/shipWork/peopleAdd.vue index 9db8a4b..ee81c6f 100644 --- a/pages/shipWork/peopleAdd.vue +++ b/pages/shipWork/peopleAdd.vue @@ -374,28 +374,36 @@ }, // 保存 save() { - let date = new Date().getTime() - let pmeId = uuidv4() - let webStatus = 0 - let webDate = api.getDate(date) - if (this.obj.state == "edit") { - let sql = - `UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bwTextValue}', - jobStartTime = '${this.startTime}',jobEndTime = '${this.endTime}',shipPerson = '${this.shipValue}', - vvyId = '${this.hcValue}',vvyName = '${this.hcTextValue}',weatherType = '${this.tqTextValue}', - weatherTypeDesc = '${this.tqTextValue}',workSuite = '${this.workValue}',webStatus = '${webStatus}', - importExportFlagName = '${this.importExportFlagName}',webDate = '${webDate}' WHERE pmeId = '${this.peopleRow.pmeId}';` - this.executeSql(sql) - } else if (this.obj.state == "add") { - let sql = - `insert into messageRespList values('${pmeId}','${this.vtpId}','${this.bwValue}','${this.bwTextValue}', - '${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqTextValue}', - '${this.tqTextValue}','${this.workValue}','${this.importExportFlagName}','${0}','${webStatus}','${webDate}')` - this.executeSql(sql) + if (this.datetime[0] == "") { + uni.showModal({ + title: '提示', + showCancel: false, + content: '请输入作业时间!' + }) + } else { + let date = new Date().getTime() + let pmeId = uuidv4() + let webStatus = 0 + let webDate = api.getDate(date) + if (this.obj.state == "edit") { + let sql = + `UPDATE messageRespList SET bthId = '${this.bwValue}',bthIdName = '${this.bwTextValue}', + jobStartTime = '${this.startTime}',jobEndTime = '${this.endTime}',shipPerson = '${this.shipValue}', + vvyId = '${this.hcValue}',vvyName = '${this.hcTextValue}',weatherType = '${this.tqTextValue}', + weatherTypeDesc = '${this.tqTextValue}',workSuite = '${this.workValue}',webStatus = '${webStatus}', + importExportFlagName = '${this.importExportFlagName}',webDate = '${webDate}' WHERE pmeId = '${this.peopleRow.pmeId}';` + this.executeSql(sql) + } else if (this.obj.state == "add") { + let sql = + `insert into messageRespList values('${pmeId}','${this.vtpId}','${this.bwValue}','${this.bwTextValue}', + '${this.startTime}','${this.endTime}','${this.shipValue}','${this.hcValue}','${this.hcTextValue}','${this.tqTextValue}', + '${this.tqTextValue}','${this.workValue}','${this.importExportFlagName}','${0}','${webStatus}','${webDate}')` + this.executeSql(sql) + } + uni.navigateTo({ + url: '/pages/shipWork/mixWork' + }) } - uni.navigateTo({ - url: '/pages/shipWork/mixWork' - }) }, // 编辑 toGo(state) { diff --git a/pages/shipWork/supply.vue b/pages/shipWork/supply.vue index 77e270e..44cd165 100644 --- a/pages/shipWork/supply.vue +++ b/pages/shipWork/supply.vue @@ -13,13 +13,13 @@ 航次:{{item.vvyName}}
-

类型:{{item.supplyTypeNm}}

+

类型:{{item.supplyType}}

进出口:{{item.importExportFlagName}}

贸易类型:{{shipInfo.spmTradeName}}

日期:{{item.supplyDate}}

-

未提交审核

+

待提交

待审核

diff --git a/pages/shipWork/supplySign.vue b/pages/shipWork/supplySign.vue index d2cead7..00b152a 100644 --- a/pages/shipWork/supplySign.vue +++ b/pages/shipWork/supplySign.vue @@ -44,7 +44,7 @@

泊位/Berth:

-

{{tableInfo.bthIdName}}

+

{{tableInfo.stopBerthageName}}

日期/Date:

@@ -126,9 +126,10 @@ // 在resolve时执行的回调函数 this.tabsList = [] this.tableInfo = value[tabsValue] + console.log(this.tableInfo) value.forEach((v, index) => { let obj = { - name: `供水${index + 1}`, + name: `供给${index + 1}`, } this.tabsList.push(obj) }) diff --git a/pages/shipWork/untieCord.vue b/pages/shipWork/untieCord.vue index 3fdd3ae..3770b78 100644 --- a/pages/shipWork/untieCord.vue +++ b/pages/shipWork/untieCord.vue @@ -19,7 +19,7 @@

系缆时间:{{item.attachTime}}

-

未提交审核

+

待提交

待审核