Commit 3a35d60d authored by 贺世双's avatar 贺世双

调整报错异常

parent d31e1303
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
globalData: { globalData: {
projectMini: 'biz-trina5-app', //项目名 projectMini: 'biz-trina5-app', //项目名
loginAction: '', //登录Action loginAction: '', //登录Action
tabList: [], //底部Tab菜单
cacheUserLocation: {}, //用户地址位置信息缓存,含经、纬度地址描述等 cacheUserLocation: {}, //用户地址位置信息缓存,含经、纬度地址描述等
shipmentInfo: { //运单信息 跳转运单详情时设置 shipmentInfo: { //运单信息 跳转运单详情时设置
shipmentNo: "", //运单号 shipmentNo: "", //运单号
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
2. 打包生产模式: 小程序切换url; H5切换ENV_MODEL 2. 打包生产模式: 小程序切换url; H5切换ENV_MODEL
*/ */
let BASEURL = { let BASEURL = {
//url: "http://127.0.0.1:8080", //开发 url: "http://127.0.0.1:8080", //开发
url: "https://otmuat.trinasolar.com", //UAT //url: "https://otmuat.trinasolar.com", //UAT
//url: "https://otms.trinasolar.com", //正式 //url: "https://otms.trinasolar.com", //正式
} }
......
...@@ -134,6 +134,11 @@ ...@@ -134,6 +134,11 @@
local_atd:"",//实际发货时间 local_atd:"",//实际发货时间
local_ata:"",//实际进港时间 local_ata:"",//实际进港时间
}, },
rules: {
'local_atd': { required: true },//实际发货时间
'local_ata': { required: true }, //实际进港时间
'actual_arrival_factory_time':{ required: true },
},
} }
}, },
/*onLoad(options) { /*onLoad(options) {
...@@ -234,7 +239,6 @@ ...@@ -234,7 +239,6 @@
//异常上报 //异常上报
onAbnormalEvents(){ onAbnormalEvents(){
if (this.message.length >0) { if (this.message.length >0) {
console.log(this.message)
getApp().globalData.abnormalEvent = this.message[0] getApp().globalData.abnormalEvent = this.message[0]
uni.navigateTo({ uni.navigateTo({
url: `/subpkg/abnormalEvent/abnormalEvent`, url: `/subpkg/abnormalEvent/abnormalEvent`,
...@@ -253,22 +257,16 @@ ...@@ -253,22 +257,16 @@
this.formData.rows= rows; this.formData.rows= rows;
this.formData.ship_event_code=type;//进度更新类型 this.formData.ship_event_code=type;//进度更新类型
//已到厂时间 //已到厂时间
if(!this.formData.actual_arrival_factory_time && type=="truck_arrive"){ if(this.formData.actual_arrival_factory_time){
this.formData.local_ata=""; this.formData.actual_arrival_factory_time= this.formatDate(this.formData.actual_arrival_factory_time)
this.formData.local_atd="";
this.formData.actual_arrival_factory_time= this.formatDate(this.formData.time)
} }
//仓库到货时间 //仓库到货时间
if(!this.formData.local_atd && type=="truck_departure"){ if(this.formData.local_atd){
this.formData.local_ata=""; this.formData.local_atd= this.formatDate(this.formData.local_atd)
this.formData.actual_arrival_factory_time="";
this.formData.local_atd= this.formatDate(this.formData.time)
} }
//进港时间 //进港时间
if(!this.formData.local_ata && type=="truck_entry"){ if(this.formData.local_ata){
this.formData.actual_arrival_factory_time=""; this.formData.local_ata= this.formatDate(this.formData.local_ata)
this.formData.local_atd="";
this.formData.local_ata= this.formatDate(this.formData.time)
} }
var baseData = { var baseData = {
"aux": { "aux": {
...@@ -350,14 +348,17 @@ ...@@ -350,14 +348,17 @@
//到厂关闭弹出框 //到厂关闭弹出框
closeProcess() { closeProcess() {
this.visible = false this.visible = false
this.formData.actual_arrival_factory_time="";
}, },
//仓库发货关闭弹出框 //仓库发货关闭弹出框
closeProcess1() { closeProcess1() {
this.visible1 = false this.visible1 = false;
this.formData.local_atd="";
}, },
//进港关闭弹出框 //进港关闭弹出框
closeProcess2() { closeProcess2() {
this.visible2 = false this.visible2 = false;
this.formData.local_ata="";
}, },
//关闭时间选择框 //关闭时间选择框
onVisibleDate(type) { onVisibleDate(type) {
...@@ -419,7 +420,7 @@ ...@@ -419,7 +420,7 @@
}, },
//时间戳转换 //时间戳转换
formatDate(timestamp) { formatDate(timestamp) {
var data =""; /*var data ="";
this.formData.time=""; this.formData.time="";
if(!timestamp){ if(!timestamp){
data=new Date(); data=new Date();
...@@ -428,12 +429,13 @@ ...@@ -428,12 +429,13 @@
} else{ } else{
data=new Date(timestamp); data=new Date(timestamp);
} }
//if (!timestamp) return const nowDate = data*/
const nowDate = data if (!timestamp) return
const nowDate = new Date(timestamp);
var year = nowDate.getFullYear(); var year = nowDate.getFullYear();
var month = nowDate.getMonth() < 10 ? '0' + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1; var month = nowDate.getMonth() < 10 ? '0' + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
var date = nowDate.getDate(); var date = nowDate.getDate()< 10 ? '0' + nowDate.getDate() : nowDate.getDate();
const hour = nowDate.getHours(); const hour = nowDate.getHours()< 10 ? '0' + nowDate.getHours() : nowDate.getHours() ;
const minute = nowDate.getMinutes()< 10 ? '0'+ nowDate.getMinutes() : nowDate.getMinutes() ; const minute = nowDate.getMinutes()< 10 ? '0'+ nowDate.getMinutes() : nowDate.getMinutes() ;
var seconds = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds(); var seconds = nowDate.getSeconds() < 10 ? '0' + nowDate.getSeconds() : nowDate.getSeconds();
if (this.dateType === 'date') { if (this.dateType === 'date') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment