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

调整报错异常

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