|
|
// pages/channelOrder/index.js
|
|
|
const app = getApp();
|
|
|
var dateTimePicker = require('../../utils/dateTimePicker.js');
|
|
|
var dateUtil = require('../../utils/dateUtil.js');
|
|
|
var commonUtil = require('../../utils/commonUtil.js');
|
|
|
const mydate = new Date();
|
|
|
const tomorrow = new Date();
|
|
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
|
Page({
|
|
|
|
|
|
/**
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
zhengceTextList: [{ name: '政策一', value: 1 }, { name: '政策二', value: 2 }, { name: '政策三', value: 3 }, { name: '政策四', value: 4 }, { name: '政策五', value: 5 }, { name: '政策六', value: 6 }, { name: '政策七', value: 7 }, { name: '政策八', value: 8 }],
|
|
|
settleList: [{ name: '未结清', value: 0 }, { name: '已结清', value: 1 }],
|
|
|
policyIdx: 0,
|
|
|
settleIdx: 0,
|
|
|
policyNum: 0,
|
|
|
managerRoleClassify: false,
|
|
|
roleOf41: false,
|
|
|
roleOf142: false,
|
|
|
roleOf132: false,
|
|
|
testMap: [],
|
|
|
allShow: false,
|
|
|
height: 22,
|
|
|
openShow: true,
|
|
|
// userServeRecords:[{},{},{},{},{},{},{},{},{}],
|
|
|
workOrderId: '',
|
|
|
record: {},
|
|
|
statusText: '',
|
|
|
timeText: '',
|
|
|
timeText2: '',
|
|
|
timeStr: '',
|
|
|
timeStr2: '',
|
|
|
userServeRecords: {},
|
|
|
desp: '',
|
|
|
despModal: '',
|
|
|
isTimeShow: true,
|
|
|
isTimeShowDbl: true,
|
|
|
interviewTime: '',
|
|
|
status: "",
|
|
|
from: '',
|
|
|
recordDetail: {},
|
|
|
getStatus: '',
|
|
|
showDialog: false,
|
|
|
stateItems: [
|
|
|
{ value: '25', name: '已接到' },
|
|
|
{ value: '26', name: '未接到' },
|
|
|
],
|
|
|
startYear: 2022,
|
|
|
endYear: 2024,
|
|
|
currentTime: '',
|
|
|
currentTime1: '',
|
|
|
currentTime2: '',
|
|
|
checkedState: '',
|
|
|
iosDialog1: false,
|
|
|
iosDialog2: false,
|
|
|
dateTimeArrayTmp: null,
|
|
|
initTime: '',
|
|
|
showDialogDesp: false,
|
|
|
prevPageChange: false,
|
|
|
auditStep:0,
|
|
|
},
|
|
|
bindPickerChangePolicy (e) {
|
|
|
var that = this;
|
|
|
console.log("picker发送选择改变,携带值为", e.detail.value);
|
|
|
this.setData({
|
|
|
policyIdx: e.detail.value,
|
|
|
});
|
|
|
var paramData = {};
|
|
|
paramData["policyIdx"] = Number(e.detail.value) + 1;
|
|
|
paramData["orderId"] = this.data.workOrderId;
|
|
|
console.log(paramData);
|
|
|
that.changeStatusTime(paramData);
|
|
|
},
|
|
|
bindPickerChangeSettle(e) {
|
|
|
var that = this;
|
|
|
console.log("picker发送选择改变,携带值为", e.detail.value);
|
|
|
that.setData({
|
|
|
settleIdx: e.detail.value,
|
|
|
});
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/settled/"+that.data.record.id+"/"+e.detail.value,
|
|
|
header: app.globalData.headers,
|
|
|
method: "GET",
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
console.log(that.data.record);
|
|
|
if (res.data.status == 200) {
|
|
|
wx.showToast({
|
|
|
title: "修改成功",
|
|
|
icon: "success",
|
|
|
duration: 1500,
|
|
|
});
|
|
|
}else{
|
|
|
that.setData({
|
|
|
settleIdx: that.data.record.settled,
|
|
|
});
|
|
|
wx.showToast({
|
|
|
title: res.data.msg,
|
|
|
icon:'none',
|
|
|
duration: 1500,
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
wx.showToast({
|
|
|
title: "修改失败",
|
|
|
icon: "error",
|
|
|
duration: 1500,
|
|
|
});
|
|
|
},
|
|
|
});
|
|
|
|
|
|
},
|
|
|
changeStatusTime (data) {
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/updateOrder",
|
|
|
data: data,
|
|
|
header: app.globalData.headers,
|
|
|
method: "POST",
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
if (res.data.status == 200) {
|
|
|
wx.showToast({
|
|
|
title: "修改成功",
|
|
|
icon: "success",
|
|
|
duration: 1500,
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) { },
|
|
|
});
|
|
|
},
|
|
|
preventTouchMove () { },
|
|
|
showInfo () {
|
|
|
this.setData({
|
|
|
iosDialog1: true,
|
|
|
})
|
|
|
},
|
|
|
showDesp () {
|
|
|
this.setData({
|
|
|
showDialogDesp: true,
|
|
|
})
|
|
|
},
|
|
|
showInfo2 (e) {
|
|
|
console.log(JSON.parse(e.currentTarget.dataset.detail));
|
|
|
|
|
|
this.setData({
|
|
|
iosDialog2: true,
|
|
|
recordDetail: JSON.parse(e.currentTarget.dataset.detail)
|
|
|
})
|
|
|
},
|
|
|
showImgs (e) {
|
|
|
var that = this;
|
|
|
let curr = [];
|
|
|
that.data.urls.forEach(item => {
|
|
|
curr.push(item.url)
|
|
|
})
|
|
|
wx.previewImage({
|
|
|
current: e.currentTarget.dataset.src, // 当前显示图片的 http 链接
|
|
|
urls: curr // 需要预览的图片 http 链接列表
|
|
|
})
|
|
|
},
|
|
|
|
|
|
copyClose () {
|
|
|
var that = this;
|
|
|
var text = "姓名:" + that.data.record.userName + "/" + (that.data.record.sex == 1 ? '男' : '女') + "/" + that.data.record.age + "岁" + (that.data.record.nation == '族' ? '' : '/' + that.data.record.nation) + '\n身份证号:' + (that.data.record.idCard == '' ? '-' : that.data.record.idCard) + '\n电话:' + (that.data.record.tel == '' ? '-' : that.data.record.tel) + '\n报名企业:' + that.data.record.storeName
|
|
|
+ '\n报名岗位:' + that.data.record.storeJobName + '\n面试时间:' + that.data.interviewTime + '\n\n总利润:' + (that.data.record.totalProfit ? that.data.record.totalProfit : '-')
|
|
|
|
|
|
|
|
|
wx.setClipboardData({
|
|
|
data: text,
|
|
|
success (res) {
|
|
|
wx.getClipboardData({
|
|
|
success (res) {
|
|
|
console.log(res.data) // data
|
|
|
that.close1();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
copyClose2 () {
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
var text = "姓名:" + that.data.recordDetail.userName + "/" + (that.data.recordDetail.sex == 1 ? '男' : '女') + "/" + that.data.recordDetail.age + "岁" + (that.data.recordDetail.nation == '族' ? '' : '/' + that.data.recordDetail.nation) + '\n电话:' + (that.data.recordDetail.tel == '' || that.data.recordDetail.tel == undefined || that.data.recordDetail.tel == null ? '-' : that.data.recordDetail.tel) + '\n身份证号:' + (that.data.recordDetail.idCard == '' ? '-' : that.data.recordDetail.idCard) + '\n家庭地址:' + (that.data.recordDetail.address == '' || that.data.recordDetail.address == undefined || that.data.recordDetail.address == null ? '-' : that.data.recordDetail.address) + '\n报名岗位:' + that.data.recordDetail.storeJobName + '\n政策:' + that.data.recordDetail.policy
|
|
|
|
|
|
|
|
|
|
|
|
wx.setClipboardData({
|
|
|
data: text,
|
|
|
success (res) {
|
|
|
wx.getClipboardData({
|
|
|
success (res) {
|
|
|
console.log(res.data) // data
|
|
|
that.close2();
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
close1: function () {
|
|
|
|
|
|
console.log("close");
|
|
|
|
|
|
this.setData({
|
|
|
iosDialog1: false,
|
|
|
})
|
|
|
},
|
|
|
close2: function () {
|
|
|
|
|
|
console.log("close");
|
|
|
|
|
|
this.setData({
|
|
|
iosDialog2: false,
|
|
|
})
|
|
|
},
|
|
|
editUser () {
|
|
|
wx.navigateTo({
|
|
|
url: '../newEnroll/enroll/index?from=editUser',
|
|
|
})
|
|
|
},
|
|
|
makePhone (e) {
|
|
|
wx.makePhoneCall({
|
|
|
phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
|
|
|
})
|
|
|
},
|
|
|
getDesp (e) {
|
|
|
this.setData({
|
|
|
desp: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
getPolicy (e) {
|
|
|
console.log(e.detail.value);
|
|
|
|
|
|
let currData = {};
|
|
|
currData["policy"] = e.detail.value;
|
|
|
currData["orderId"] = this.data.workOrderId;
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/changeOrderPolicy",
|
|
|
method: "GET",
|
|
|
data: currData,
|
|
|
header: app.globalData.header,
|
|
|
success: function (res) {
|
|
|
console.log(res)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
clearDesp () {
|
|
|
this.setData({
|
|
|
desp: ""
|
|
|
});
|
|
|
},
|
|
|
getModalDesp (e) {
|
|
|
this.setData({
|
|
|
despModal: e.detail.value
|
|
|
})
|
|
|
},
|
|
|
// clearDesp(){
|
|
|
// this.setData({
|
|
|
// despModal:""
|
|
|
// });
|
|
|
// },
|
|
|
submitDesp () {
|
|
|
var that = this;
|
|
|
if (this.data.desp == "") {
|
|
|
return
|
|
|
} else {
|
|
|
wx.showLoading({
|
|
|
title: '添加中...',
|
|
|
})
|
|
|
let currData = {};
|
|
|
currData["desp"] = this.data.desp;
|
|
|
currData["orderId"] = this.data.workOrderId;
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/changeOrderDesp",
|
|
|
method: "GET",
|
|
|
data: currData,
|
|
|
header: app.globalData.header,
|
|
|
success: function (res) {
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
desp: ""
|
|
|
});
|
|
|
wx.hideLoading({
|
|
|
success: (res) => {
|
|
|
that.getDetail();
|
|
|
that.close();
|
|
|
wx.createSelectorQuery().select('.bb4').boundingClientRect(res => {
|
|
|
// 到这里,我们可以从res中读到class为bb4的top,即离顶部的距离(px)
|
|
|
// 2使用wx.pageScrollTo()将页面滚动到对应位置
|
|
|
wx.pageScrollTo({
|
|
|
scrollTop: 400, // 滚动到的位置(距离顶部 px)
|
|
|
duration: 300 //滚动所需时间 如果不需要滚动过渡动画,设为0(ms)
|
|
|
})
|
|
|
}).exec()
|
|
|
|
|
|
},
|
|
|
})
|
|
|
|
|
|
}
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad (options) {
|
|
|
wx.showLoading({
|
|
|
title: '加载中...',
|
|
|
})
|
|
|
console.log(options.workOrderId);
|
|
|
console.log(app.globalData);
|
|
|
console.log(wx.getStorageSync("loginUser"))
|
|
|
this.setData({
|
|
|
workOrderId: options.workOrderId,
|
|
|
from: options.from,
|
|
|
managerRoleClassify: wx.getStorageSync("loginUser").managerRoleClassify,
|
|
|
roleOf41: wx.getStorageSync("loginUser").roleOf41,
|
|
|
roleOf142: wx.getStorageSync("loginUser").roleOf142,
|
|
|
roleOf132: wx.getStorageSync("loginUser").roleOf132,
|
|
|
})
|
|
|
|
|
|
var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, this.data.currentTime);
|
|
|
for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日";
|
|
|
}
|
|
|
console.log(obj.dateTime);
|
|
|
let tmp = this.deepClone(obj.dateTimeArray);
|
|
|
tmp = Object.values(tmp);
|
|
|
// if(mydate.toTimeString() < '16:00') {
|
|
|
// obj.dateTimeArray[3] = obj.dateTimeArray[3].filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// }
|
|
|
// obj.dateTimeArray[3] = obj.dateTimeArray[3].filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// console.log(tmp)
|
|
|
this.setData({
|
|
|
dateTimeArray: obj.dateTimeArray,
|
|
|
dateTimeArray2: obj.dateTimeArray,
|
|
|
dateTimeArrayTmp: tmp,
|
|
|
dateTime: obj.dateTime,
|
|
|
dateTime1: obj.dateTime,
|
|
|
dateTime2: obj.dateTime,
|
|
|
});
|
|
|
|
|
|
},
|
|
|
deepClone (obj, newObj) {
|
|
|
var newObj = newObj || {};
|
|
|
for (let key in obj) {
|
|
|
if (typeof obj[key] == 'object') {
|
|
|
let isArray = Array.isArray(obj[key]); //判断是否数组
|
|
|
newObj[key] = (isArray == true ? [] : {})
|
|
|
this.deepClone(obj[key], newObj[key]);
|
|
|
} else {
|
|
|
newObj[key] = obj[key]
|
|
|
}
|
|
|
}
|
|
|
return newObj;
|
|
|
},
|
|
|
doInitTime (obj) {
|
|
|
console.log(obj)
|
|
|
// var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, this.data.currentTime);
|
|
|
for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日";
|
|
|
}
|
|
|
let tmp = this.deepClone(obj.dateTimeArray);
|
|
|
tmp = Object.values(tmp)
|
|
|
// if(mydate.toTimeString() < '16:00') {
|
|
|
// obj.dateTimeArray[3] = obj.dateTimeArray[3].filter(time => time > `${mydate.getHours()}:30`);
|
|
|
// }
|
|
|
var month = mydate.getMonth() + 1;
|
|
|
var todayStr = `${mydate.getFullYear()}年${month < 10 ? ('0' + month) : month}月${mydate.getDate() < 10 ? ('0' + mydate.getDate()) : mydate.getDate()}日`;
|
|
|
var dateStr = `${obj.dateTimeArray[0][obj.dateTime[0]]}${obj.dateTimeArray[1][obj.dateTime[1]]}${obj.dateTimeArray[2][obj.dateTime[2]]}`;
|
|
|
// if(`${mydate.getFullYear()}年` == obj.dateTimeArray[0][obj.dateTime[0]] && `${month < 10 ? ('0' + month) : month}月` == obj.dateTimeArray[1][obj.dateTime[1]] && `${mydate.getDate() < 10 ? ('0' + mydate.getDate()) : mydate.getDate()}日` == obj.dateTimeArray[2][obj.dateTime[2]]) {//今天
|
|
|
let arrays = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
console.log(todayStr, dateStr)
|
|
|
// if (todayStr == dateStr) {//今天
|
|
|
// obj.dateTimeArray[3] = arrays.filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// let num = arrays.length - obj.dateTimeArray[3].length;
|
|
|
// obj.dateTime[3] -= num;
|
|
|
// } else if (todayStr > dateStr) {//今天之前
|
|
|
// obj.dateTimeArray[3] = [];
|
|
|
// } else {
|
|
|
// obj.dateTimeArray[3] = arrays;
|
|
|
// }
|
|
|
console.log(obj)
|
|
|
return obj;
|
|
|
},
|
|
|
doInitTime2 (obj) {
|
|
|
console.log(obj)
|
|
|
// var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, this.data.currentTime);
|
|
|
for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月";
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日";
|
|
|
}
|
|
|
let tmp = this.deepClone(obj.dateTimeArray);
|
|
|
tmp = Object.values(tmp)
|
|
|
// if(mydate.toTimeString() < '16:00') {
|
|
|
// obj.dateTimeArray[3] = obj.dateTimeArray[3].filter(time => time > `${mydate.getHours()}:30`);
|
|
|
// }
|
|
|
var month = mydate.getMonth() + 1;
|
|
|
var todayStr = `${mydate.getFullYear()}年${month < 10 ? ('0' + month) : month}月${mydate.getDate() < 10 ? ('0' + mydate.getDate()) : mydate.getDate()}日`;
|
|
|
var dateStr = `${obj.dateTimeArray[0][obj.dateTime[0]]}${obj.dateTimeArray[1][obj.dateTime[1]]}${obj.dateTimeArray[2][obj.dateTime[2]]}`;
|
|
|
// if(`${mydate.getFullYear()}年` == obj.dateTimeArray[0][obj.dateTime[0]] && `${month < 10 ? ('0' + month) : month}月` == obj.dateTimeArray[1][obj.dateTime[1]] && `${mydate.getDate() < 10 ? ('0' + mydate.getDate()) : mydate.getDate()}日` == obj.dateTimeArray[2][obj.dateTime[2]]) {//今天
|
|
|
let arrays = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
console.log(todayStr, dateStr)
|
|
|
// if (todayStr == dateStr) {//今天
|
|
|
// obj.dateTimeArray[3] = arrays.filter(time => time < `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// let num = arrays.length - obj.dateTimeArray[3].length;
|
|
|
// obj.dateTime[3] -= num;
|
|
|
// } else if (todayStr < dateStr) {//今天之前
|
|
|
// obj.dateTimeArray[3] = [];
|
|
|
// } else {
|
|
|
// obj.dateTimeArray[3] = arrays;
|
|
|
// }
|
|
|
console.log(obj)
|
|
|
return obj;
|
|
|
},
|
|
|
autoChangeDateTimeArray (arr, dateArr) {
|
|
|
// var dateArr = this.data.dateTimeArray;
|
|
|
console.log(dateArr, arr, this.data.dateTimeArrayTmp)
|
|
|
|
|
|
// let date = mydate.toLocaleDateString();
|
|
|
// let arrays = date.split('/');
|
|
|
let arrays = [];
|
|
|
arrays.push(mydate.getFullYear());
|
|
|
arrays.push(mydate.getMonth() + 1);
|
|
|
arrays.push(mydate.getDate());
|
|
|
|
|
|
return dateArr
|
|
|
// debugger;
|
|
|
|
|
|
// if (`${arrays[0]}年` > dateArr[0][arr[0]]) {//选择当前年份之前的 清空后续选项
|
|
|
// dateArr[1] = [];
|
|
|
// dateArr[2] = [];
|
|
|
// dateArr[3] = [];
|
|
|
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[0]}年` <= dateArr[0][arr[0]]) {//等于当前年份 比较月份
|
|
|
// dateArr[1] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[1]));
|
|
|
// dateArr[2] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[2]));
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日";
|
|
|
// }
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` > dateArr[1][arr[1]])
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月`) //当前月份
|
|
|
// console.log(dateArr[1][arr[1]]) //选择的月份
|
|
|
|
|
|
// if (`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` > dateArr[1][arr[1]]) {//选择当前月份之前的 清空后续选项
|
|
|
// dateArr[2] = [];
|
|
|
// dateArr[3] = [];
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]]) {//等于当前年份 比较月份
|
|
|
// dateArr[2] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[2]));
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日";
|
|
|
// }
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// console.log(arrays[2]) //当前日期
|
|
|
// console.log(dateArr[2][arr[2]])
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` > dateArr[1][arr[1]])
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月`) //当前月份
|
|
|
// console.log(dateArr[1][arr[1]]) //选择的月份
|
|
|
|
|
|
// if (`${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` > dateArr[2][arr[2]]) {//选择当前月份之前的 清空后续选项
|
|
|
// dateArr[3] = [];
|
|
|
// //选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` <= dateArr[2][arr[2]]) {//等于当前年份 比较月份
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// if (`${arrays[0]}年` == dateArr[0][arr[0]] && `${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]] && `${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` == dateArr[2][arr[2]]) {
|
|
|
// dateArr[3] = dateArr[3].filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
// } else {
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// if (`${arrays[0]}年` == dateArr[0][arr[0]] && `${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]] && `${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` == dateArr[2][arr[2]]) {
|
|
|
// dateArr[3] = dateArr[3].filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
},
|
|
|
autoChangeDateTimeArray2 (arr, dateArr) {
|
|
|
// var dateArr = this.data.dateTimeArray;
|
|
|
console.log(dateArr, arr, this.data.dateTimeArrayTmp)
|
|
|
|
|
|
// let date = mydate.toLocaleDateString();
|
|
|
// let arrays = date.split('/');
|
|
|
let arrays = [];
|
|
|
arrays.push(mydate.getFullYear());
|
|
|
arrays.push(mydate.getMonth() + 1);
|
|
|
arrays.push(mydate.getDate());
|
|
|
// debugger;
|
|
|
return dateArr
|
|
|
// if (`${arrays[0]}年` < dateArr[0][arr[0]]) {//选择当前年份之前的 清空后续选项
|
|
|
// dateArr[1] = [];
|
|
|
// dateArr[2] = [];
|
|
|
// dateArr[3] = [];
|
|
|
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[0]}年` >= dateArr[0][arr[0]]) {//等于当前年份 比较月份
|
|
|
// dateArr[1] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[1]));
|
|
|
// dateArr[2] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[2]));
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日";
|
|
|
// }
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` > dateArr[1][arr[1]])
|
|
|
// console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月`) //当前月份
|
|
|
// console.log(dateArr[1][arr[1]]) //选择的月份
|
|
|
|
|
|
// if (`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` < dateArr[1][arr[1]]) {//选择当前月份之后的 清空后续选项
|
|
|
// dateArr[2] = [];
|
|
|
// dateArr[3] = [];
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]]) {//等于当前年份 比较月份
|
|
|
// dateArr[2] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[2]));
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日";
|
|
|
// }
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// // console.log(arrays[2]) //当前日期
|
|
|
// // console.log(dateArr[2][arr[2]])
|
|
|
// // console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` > dateArr[1][arr[1]])
|
|
|
// // console.log(`${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月`) //当前月份
|
|
|
// // console.log(dateArr[1][arr[1]]) //选择的月份
|
|
|
|
|
|
// if (`${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` < dateArr[2][arr[2]]) {//选择当前月份之后的 清空后续选项
|
|
|
// dateArr[3] = [];
|
|
|
// //选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项选择当前月份之前的 清空后续选项
|
|
|
// return dateArr;
|
|
|
// } else if (`${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` >= dateArr[2][arr[2]]) {//等于当前年份 比较月份
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// if (`${arrays[0]}年` == dateArr[0][arr[0]] && `${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]] && `${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` == dateArr[2][arr[2]]) {
|
|
|
// dateArr[3] = dateArr[3].filter(time => time <= `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
// } else {
|
|
|
// dateArr[3] = Object.values(this.deepClone(this.data.dateTimeArrayTmp[3]));
|
|
|
// if (`${arrays[0]}年` == dateArr[0][arr[0]] && `${arrays[1] < 10 ? ('0' + arrays[1]) : arrays[1]}月` == dateArr[1][arr[1]] && `${arrays[2] < 10 ? ('0' + arrays[2]) : arrays[2]}日` == dateArr[2][arr[2]]) {
|
|
|
// dateArr[3] = dateArr[3].filter(time => time > `${mydate.getHours() < 10 ? ("0" + mydate.getHours()) : mydate.getHours()}:30`);
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
// return dateArr;
|
|
|
// }
|
|
|
},
|
|
|
|
|
|
|
|
|
openText () {
|
|
|
var that = this;
|
|
|
that.data.record.isOpen = true;
|
|
|
that.setData({
|
|
|
record: that.data.record
|
|
|
})
|
|
|
},
|
|
|
closeText () {
|
|
|
var that = this;
|
|
|
that.data.record.isOpen = false;
|
|
|
that.setData({
|
|
|
record: that.data.record
|
|
|
})
|
|
|
},
|
|
|
editPolicy (e) {
|
|
|
var policy = e.currentTarget.dataset.policy;
|
|
|
var name = e.currentTarget.dataset.name
|
|
|
console.log(policy);
|
|
|
// localStorage.setItem("employeeSalary",policy);
|
|
|
if(name == 'employeeSalary'){
|
|
|
wx.setStorage({
|
|
|
key:'employeeSalary',
|
|
|
data:policy
|
|
|
})
|
|
|
|
|
|
console.log(wx.getStorage({key: 'employeeSalary'}));
|
|
|
}
|
|
|
wx.navigateTo({
|
|
|
url: '../editPolicy/index?policy=' + policy + '&orderId=' + this.data.workOrderId + '&name=' + name,
|
|
|
})
|
|
|
},
|
|
|
editBoCaiProfit (e) {
|
|
|
var boCaiProfit = e.currentTarget.dataset.bocaiprofit;
|
|
|
|
|
|
console.log(boCaiProfit);
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url: '../editBoCaiProfit/index?boCaiProfit=' + boCaiProfit + '&orderId=' + this.data.workOrderId,
|
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
goChoose () {
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/changeStatus/index?orderId=' + this.data.workOrderId + '&from=' + this.data.from,
|
|
|
})
|
|
|
},
|
|
|
mapToObj (map) {
|
|
|
let obj = Object.create(null);
|
|
|
for (let [k, v] of map) {
|
|
|
obj[k] = v;
|
|
|
}
|
|
|
return obj;
|
|
|
},
|
|
|
getDetail () {
|
|
|
var that = this;
|
|
|
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
// setTimeout(function(){
|
|
|
// var query = wx.createSelectorQuery();
|
|
|
// query.select('#text').boundingClientRect();
|
|
|
// query.exec((res) => {
|
|
|
// res[0].height;
|
|
|
// console.log(res[0].height);
|
|
|
// that.setData({
|
|
|
// height: res[0].height
|
|
|
// })
|
|
|
// })
|
|
|
// },10)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/details",
|
|
|
method: "GET",
|
|
|
data: { orderId: that.data.workOrderId },
|
|
|
header: app.globalData.header,
|
|
|
success: function (res) {
|
|
|
|
|
|
console.log(res.data.data);
|
|
|
var statusText = "";
|
|
|
var timeText = "";
|
|
|
var timeText2 = "";
|
|
|
var timeStr = "";
|
|
|
var timeStr2 = "";
|
|
|
var status = res.data.data.applyOrder.status
|
|
|
res.data.data.applyOrder.isOpen = false
|
|
|
that.data.auditStep = res.data.data.applyOrder.auditStep
|
|
|
|
|
|
let userinfo = res.data.data.applyOrder;
|
|
|
let userinfo2 = {};
|
|
|
userinfo2["name"] = userinfo.userName,
|
|
|
userinfo2["nationality"] = userinfo.nation,
|
|
|
userinfo2["num"] = userinfo.idCard,
|
|
|
userinfo2["currentImg"] = userinfo.idCardImageUrl,
|
|
|
userinfo2["idCardImageUrl"] = userinfo.idCardImageUrl,
|
|
|
userinfo2["sex"] = userinfo.sex,
|
|
|
userinfo2["age"] = userinfo.age,
|
|
|
userinfo2["idCard"] = userinfo.idCard,
|
|
|
userinfo2["userId"] = userinfo.userId,
|
|
|
userinfo2["tel"] = userinfo.tel,
|
|
|
userinfo2["address"] = userinfo.address,
|
|
|
|
|
|
wx.setStorageSync('townsManInfo', { ...userinfo2 });
|
|
|
|
|
|
|
|
|
if (status == 10) {
|
|
|
// debugger;
|
|
|
statusText = "待审核"
|
|
|
timeText = "面试时间"
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
|
|
|
|
|
|
timeText2 = "接待时间"
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.receptionTime)) {//没有接待时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.receptionTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 20) {
|
|
|
statusText = "待接待"
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
console.log(timeStr);
|
|
|
|
|
|
}
|
|
|
timeText2 = "接待时间"
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.receptionTime)) {//没有接待时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.receptionTime)
|
|
|
}
|
|
|
console.log(timeStr2);
|
|
|
} else if (status == 21) {
|
|
|
statusText = "审核未通过"
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
timeText2 = "接待时间"
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.receptionTime)) {//没有接待时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.receptionTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 25) {
|
|
|
statusText = "待面试"
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
} else if (status == 26) {
|
|
|
statusText = "未接到"
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
|
|
|
timeText2 = "接待时间"
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.receptionTime)) {//没有接待时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.receptionTime)
|
|
|
}
|
|
|
} else if (status == 30) {
|
|
|
console.log(that.data.auditStep)
|
|
|
statusText = "待入职"
|
|
|
if(that.data.auditStep == 1 || that.data.auditStep == 2){
|
|
|
timeText = "入职时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.applyEntryTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.applyEntryTime)
|
|
|
console.log(timeStr);
|
|
|
}
|
|
|
}else{
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
console.log(timeStr);
|
|
|
}
|
|
|
|
|
|
timeText2 = "约入职时间"
|
|
|
// timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willEntryTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.willEntryTime)) {//没有面试时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '12:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willEntryTime)
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
} else if (status == 35) {
|
|
|
statusText = "面试未通过"
|
|
|
timeText = "面试时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
} else if (status == 40) {
|
|
|
statusText = "在职中"
|
|
|
timeText2 = "入职时间"
|
|
|
// timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.entryTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.entryTime)) {//没有入职时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '12:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.entryTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 48) {
|
|
|
statusText = "约离职"
|
|
|
timeText = "入职时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.entryTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.entryTime)) {//没有入职时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '12:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.entryTime)
|
|
|
}
|
|
|
timeText2 = "约离职时间"
|
|
|
// timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willLeaveTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.willLeaveTime)) {//没有约离职时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '18:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willLeaveTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 45) {
|
|
|
statusText = "通过未入职"
|
|
|
timeText = "面试时间"
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.interviewTime)) {//没有面试时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '16:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.interviewTime)
|
|
|
}
|
|
|
timeText2 = "约入职时间"
|
|
|
// timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willEntryTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.willEntryTime)) {//没有面试时间,设置默认值
|
|
|
timeStr2 = mydate.toTimeString() >= '12:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr2 = dateUtil.formatDateYMDHM(res.data.data.applyOrder.willEntryTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 50) {
|
|
|
statusText = "已离职"
|
|
|
timeText = "离职时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.leaveTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.leaveTime)) {//没有离职时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '18:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.leaveTime)
|
|
|
}
|
|
|
|
|
|
} else if (status == 60) {
|
|
|
statusText = "已完成"
|
|
|
timeText = "离职时间"
|
|
|
// timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.leaveTime)
|
|
|
if (commonUtil.isEmptyCheck(res.data.data.applyOrder.leaveTime)) {//没有离职时间,设置默认值
|
|
|
timeStr = mydate.toTimeString() >= '18:00' ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`);
|
|
|
} else {
|
|
|
timeStr = dateUtil.formatDateYMDHM(res.data.data.applyOrder.leaveTime)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
wx.setStorage({ key: "timeText", data: timeText })
|
|
|
wx.setStorage({ key: "status", data: status })
|
|
|
wx.setStorage({ key: "timeStr", data: timeStr })
|
|
|
|
|
|
wx.setStorage({ key: "timeText2", data: timeText2 })
|
|
|
wx.setStorage({ key: "timeStr2", data: timeStr2 })
|
|
|
|
|
|
// res.data.data.records.forEach((item,index)=>{
|
|
|
|
|
|
// console.log(item + "=="+index);
|
|
|
|
|
|
// })
|
|
|
|
|
|
for (var key in res.data.data.records) {
|
|
|
// console.log(key, res.data.data.records[key]);
|
|
|
res.data.data.records[key].forEach((item, index) => {
|
|
|
if (item.desp.substr(item.desp.length - 3, 3) == "备注:") {
|
|
|
item.desp = item.desp.replace(/备注:/g, "")
|
|
|
}
|
|
|
|
|
|
if (item.type == 1) {
|
|
|
item["statusText"] = "报名审核中"
|
|
|
} else if (item.type == 2) {
|
|
|
item["statusText"] = "待接待"
|
|
|
} else if (item.type == 3) {
|
|
|
item["statusText"] = "待入职"
|
|
|
} else if (item.type == 4) {
|
|
|
item["statusText"] = "在职中"
|
|
|
} else if (item.type == 5) {
|
|
|
item["statusText"] = "已离职"
|
|
|
} else if (item.type == 9) {
|
|
|
item["statusText"] = "约离职"
|
|
|
} else if (item.type == 6) {
|
|
|
item["statusText"] = "已完成"
|
|
|
} else if (item.type == 11) {
|
|
|
item["statusText"] = "审核未通过"
|
|
|
} else if (item.type == 12) {
|
|
|
item["statusText"] = "已接到"
|
|
|
} else if (item.type == 13) {
|
|
|
item["statusText"] = "未接到"
|
|
|
} else if (item.type == 14) {
|
|
|
item["statusText"] = "面试未通过"
|
|
|
} else if (item.type == 15) {
|
|
|
item["statusText"] = "未入职"
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
that.setData({
|
|
|
testMap: res.data.data.records,
|
|
|
})
|
|
|
|
|
|
// res.data.data.records.forEach((item,index)=>{
|
|
|
|
|
|
|
|
|
// console.log(item);
|
|
|
|
|
|
|
|
|
// if(item.desp.substr(item.desp.length-3,3) == "备注:"){
|
|
|
// item.desp = item.desp.replace(/备注:/g,"")
|
|
|
// }
|
|
|
// // console.log(item.status);
|
|
|
// if(item.type == 1){
|
|
|
// // debugger;
|
|
|
// item["statusText"] = "报名审核中"
|
|
|
// }else if(item.type == 2){
|
|
|
// item["statusText"] = "待接待"
|
|
|
// }else if(item.type == 3){
|
|
|
// item["statusText"] = "待入职"
|
|
|
// }else if(item.type == 4){
|
|
|
// item["statusText"] = "在职中"
|
|
|
// }else if(item.type == 5){
|
|
|
// item["statusText"] = "已离职"
|
|
|
// }else if(item.type == 9){
|
|
|
// item["statusText"] = "约离职"
|
|
|
// }else if(item.type == 6){
|
|
|
// item["statusText"] = "已完成"
|
|
|
// }else if(item.type == 11){
|
|
|
// item["statusText"] = "审核未通过"
|
|
|
// }else if(item.type == 12){
|
|
|
// item["statusText"] = "已接到"
|
|
|
// }else if(item.type == 13){
|
|
|
// item["statusText"] = "未接到"
|
|
|
// }else if(item.type == 14){
|
|
|
// item["statusText"] = "面试未通过"
|
|
|
// }else if(item.type == 15){
|
|
|
// item["statusText"] = "未入职"
|
|
|
// }
|
|
|
// })
|
|
|
|
|
|
// console.log(status)
|
|
|
// console.log(that.data.stateItems);
|
|
|
|
|
|
if (status == 25) {
|
|
|
that.data.stateItems = [
|
|
|
{ value: '30', name: '面试通过' },
|
|
|
{ value: '35', name: '面试未通过' },
|
|
|
]
|
|
|
} else if (status == 30) {
|
|
|
that.data.stateItems = [
|
|
|
{ value: '37', name: '提交入职申请' },
|
|
|
{ value: '45', name: '通过未入职' },
|
|
|
]
|
|
|
} else if (status == 40 || status == 48) {
|
|
|
that.data.stateItems = [
|
|
|
{ value: '40', name: '在职中' },
|
|
|
{ value: '48', name: '约离职' },
|
|
|
{ value: '50', name: '已离职' }
|
|
|
]
|
|
|
} else if (status == 10) {
|
|
|
that.data.stateItems = [
|
|
|
{ value: '20', name: '审核通过' },
|
|
|
{ value: '21', name: '审核未通过' }
|
|
|
]
|
|
|
} else if (status == 20) {
|
|
|
that.data.stateItems = [
|
|
|
{ value: '25', name: '已接到' },
|
|
|
{ value: '26', name: '未接到' },
|
|
|
]
|
|
|
}
|
|
|
//判断是否显示时间
|
|
|
if (status == 60 || status == 40) {
|
|
|
that.setData({
|
|
|
isTimeShow: false
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
isTimeShow: true,
|
|
|
|
|
|
})
|
|
|
}
|
|
|
if (status == 25) {
|
|
|
that.setData({
|
|
|
isTimeShowDbl: false
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
isTimeShowDbl: true,
|
|
|
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// res.data.data.serveRecords.forEach((item,index)=>{
|
|
|
// // console.log(item.desp.indexOf("备注:"));
|
|
|
// // console.log(item.desp.substr(item.desp.length-3,3));
|
|
|
// if(item.desp.substr(item.desp.length-3,3) == "备注:"){
|
|
|
// item.desp = item.desp.replace(/备注:/g,"")
|
|
|
// }
|
|
|
// })
|
|
|
|
|
|
if (res.data.data.applyOrder.nation.substr(res.data.data.applyOrder.nation.length - 1, 1) != '族') {
|
|
|
res.data.data.applyOrder.nation = res.data.data.applyOrder.nation + '族'
|
|
|
}
|
|
|
|
|
|
// if(timeStr.includes("undefined")){
|
|
|
// timeStr == '-'
|
|
|
// }
|
|
|
// if(timeStr2.includes("undefined")){
|
|
|
// timeStr == '-'
|
|
|
// }
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
// height: 0,
|
|
|
allShow: true,
|
|
|
interviewTime: dateUtil.formatDateYMD(res.data.data.applyOrder.interviewTime),
|
|
|
record: res.data.data.applyOrder,
|
|
|
statusText: statusText,
|
|
|
auditStep:res.data.data.applyOrder.auditStep,
|
|
|
timeText,
|
|
|
timeText2,
|
|
|
timeStr,
|
|
|
timeStr2,
|
|
|
currentTime: timeStr,
|
|
|
currentTime1: timeStr,
|
|
|
currentTime2: timeStr2,
|
|
|
status,
|
|
|
stateItems: that.data.stateItems,
|
|
|
userServeRecords: res.data.data.records,
|
|
|
policyIdx: Number(res.data.data.applyOrder.policyIdx) - 1,
|
|
|
settleIdx:Number(res.data.data.applyOrder.settled),
|
|
|
zhengceTextList: that.data.zhengceTextList.slice(0, res.data.data.applyOrder.policyNum)
|
|
|
})
|
|
|
console.log(that.data.record);
|
|
|
that.data.interview1 = new Date(that.data.record.interviewTime).getTime() // 面试时间
|
|
|
that.data.reception1 = new Date(that.data.record.receptionTime).getTime() // 接待时间
|
|
|
that.data.willEntry1 = new Date(that.data.record.willEntryTime).getTime() // 约入职时间
|
|
|
that.data.entry1 = new Date(that.data.record.entryTime).getTime() // 入职时间
|
|
|
that.data.willLeave1 = new Date(that.data.record.willLeaveTime).getTime() // 约离职时间
|
|
|
that.data.leave1 = new Date(that.data.record.leaveTime).getTime() // 离职时间
|
|
|
resolve(res);
|
|
|
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
onReady () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow () {
|
|
|
var that = this;
|
|
|
|
|
|
console.log(that.data.workOrderId);
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/markHasRead?orderId=" + that.data.workOrderId,
|
|
|
header: app.globalData.header,
|
|
|
method: "GET",
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
},
|
|
|
});
|
|
|
// console.log(that.data.from );
|
|
|
// if(app.isNotEmptyCheck(that.data.from)){
|
|
|
// var pages = getCurrentPages();
|
|
|
// var prevPage = pages[pages.length - 2]; // 上一个页面
|
|
|
// prevPage.setData({
|
|
|
// hasChange: false
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
that.getDetail().then((res) => {
|
|
|
console.log(res);
|
|
|
|
|
|
console.log(res.data.data.applyOrder.status != 10)
|
|
|
|
|
|
|
|
|
if (this.data.from == "project") {
|
|
|
// 10 为输入框状态
|
|
|
if (res.data.data.applyOrder.status != 10) {
|
|
|
var query = wx.createSelectorQuery();
|
|
|
query.select('#text').boundingClientRect();
|
|
|
query.exec((res) => {
|
|
|
res[0].height;
|
|
|
that.setData({
|
|
|
height: res[0].height
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
that.setData({
|
|
|
height: "22.001"
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
wx.hideLoading({
|
|
|
success: (res) => { },
|
|
|
})
|
|
|
|
|
|
that.getImgs(that.data.record.userId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (app.isNotEmptyCheck(wx.getStorageSync("statusTemp"))) {
|
|
|
var statusTemp = wx.getStorageSync("statusTemp");
|
|
|
console.log(statusTemp);
|
|
|
console.log(that.data.status);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getImgs (userId) {
|
|
|
var that = this;
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/imgs/list/" + userId + "?type=20",
|
|
|
header: app.globalData.headers,
|
|
|
method: "GET",
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
let currFils = [];
|
|
|
let regs = /\.(jpg|jpeg|png)(\?.*)?$/;
|
|
|
if (app.isNotEmptyCheck(res.data.data.userImgs)) {
|
|
|
res.data.data.userImgs.forEach(item => {
|
|
|
if (regs.test(item.url.toLowerCase())) {
|
|
|
currFils.push({ url: item.url, id: item.id })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
that.setData({
|
|
|
files: currFils.slice(0, 4),
|
|
|
urls: currFils,
|
|
|
});
|
|
|
// }
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
console.log(res);
|
|
|
},
|
|
|
});
|
|
|
},
|
|
|
pickerTap: function (e) {
|
|
|
var time = this.data.currentTime;
|
|
|
if (commonUtil.isNotEmptyCheck(e.currentTarget.dataset.timestr)) {
|
|
|
time = this.data.initTime;
|
|
|
}
|
|
|
var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, time);
|
|
|
console.log(obj.dateTimeArray, time);
|
|
|
|
|
|
|
|
|
if (this.data.status != 40 && this.data.status != 50 && this.data.checkedState != 40 && this.data.checkedState != 50) {
|
|
|
obj = this.doInitTime(obj);
|
|
|
}
|
|
|
// if(obj.dateTime[3] < 0){
|
|
|
// obj.dateTime[3] = 0
|
|
|
// }
|
|
|
// console.log(obj.dateTimeArray);
|
|
|
|
|
|
console.log(obj.dateTimeArray[0][0])
|
|
|
console.log(obj.dateTimeArray[0][0].indexOf("年"))
|
|
|
|
|
|
if (obj.dateTimeArray[0][0].indexOf("年") == -1) {
|
|
|
for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年"
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月"
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日"
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
this.setData({
|
|
|
dateTimeArray: obj.dateTimeArray,
|
|
|
dateTime: obj.dateTime,
|
|
|
});
|
|
|
},
|
|
|
|
|
|
pickerTap2: function (e) {
|
|
|
console.log(e);
|
|
|
var obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear, this.data.currentTime2);
|
|
|
// console.log(obj.dateTimeArray, obj);
|
|
|
// for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
// obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年"
|
|
|
// }
|
|
|
// for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
// obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月"
|
|
|
// }
|
|
|
// for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
// obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日"
|
|
|
// }
|
|
|
if (this.data.status != 40 && this.data.status != 50 && this.data.checkedState != 40 && this.data.checkedState != 50) {
|
|
|
obj = this.doInitTime(obj);
|
|
|
}
|
|
|
console.log(obj.dateTimeArray[0][0])
|
|
|
console.log(obj.dateTimeArray[0][0].indexOf("年"))
|
|
|
|
|
|
if (obj.dateTimeArray[0][0].indexOf("年") == -1) {
|
|
|
for (let index = 0; index < obj.dateTimeArray[0].length; index++) {
|
|
|
obj.dateTimeArray[0][index] = obj.dateTimeArray[0][index] + "年"
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[1].length; index++) {
|
|
|
obj.dateTimeArray[1][index] = obj.dateTimeArray[1][index] + "月"
|
|
|
}
|
|
|
for (let index = 0; index < obj.dateTimeArray[2].length; index++) {
|
|
|
obj.dateTimeArray[2][index] = obj.dateTimeArray[2][index] + "日"
|
|
|
}
|
|
|
}
|
|
|
this.setData({
|
|
|
dateTimeArray2: obj.dateTimeArray,
|
|
|
dateTime2: obj.dateTime
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 切换状态时间选择
|
|
|
*/
|
|
|
changeDateTime (e) {
|
|
|
var dateTimeArray = this.data.dateTimeArray,
|
|
|
dateTime = e.detail.value;
|
|
|
|
|
|
console.log(dateTime);
|
|
|
|
|
|
if (dateTime[3] == 0) {
|
|
|
wx.showToast({
|
|
|
title: '选择时间不正确',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
|
|
|
let time = dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]]
|
|
|
let nowTime = new Date().getTime()
|
|
|
let setTime = new Date(time).getTime()
|
|
|
console.log(this.data.checkedState);
|
|
|
// let setTime1 = new Date(this.data.currentTime2).getTime()
|
|
|
let allowPass = true
|
|
|
let title = true
|
|
|
if (this.data.checkedState == 10) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '接待时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime > setTime1) {
|
|
|
title = '接待时间不能晚于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.checkedState == 20) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '接待时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime > setTime1) {
|
|
|
title = '接待时间不能晚于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.checkedState == 30) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '约入职时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.interview1) {
|
|
|
title = '约入职时间不能早于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.checkedState == 40) {
|
|
|
if (nowTime < setTime) {
|
|
|
title = '入职时间不能晚于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.interview1) {
|
|
|
title = '入职时间不能早于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.checkedState == 48) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '约离职时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.entry1) {
|
|
|
title = '约离职时间不能早于入职时间,请重新选择'
|
|
|
allowPass = false
|
|
|
|
|
|
}
|
|
|
} else if (this.data.checkedState == 50) {
|
|
|
if (nowTime < setTime) {
|
|
|
title = '离职时间不能晚于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.entry1) {
|
|
|
title = '离职时间不能早于入职时间,请重新选择'
|
|
|
allowPass = false
|
|
|
|
|
|
}
|
|
|
}
|
|
|
if (allowPass == false) {
|
|
|
wx.showToast({
|
|
|
title,
|
|
|
icon: 'none',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
this.setData({
|
|
|
// dateTime: e.detail.value,
|
|
|
currentTime: dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]],
|
|
|
initTime: dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]]
|
|
|
});
|
|
|
|
|
|
|
|
|
console.log(this.data.dateTimeArray);
|
|
|
console.log(this.data.currentTime)
|
|
|
},
|
|
|
/**
|
|
|
* 面试时间选择
|
|
|
*/
|
|
|
changeDateTime1 (e) {
|
|
|
var that = this;
|
|
|
console.log('changeDateTime1', e);
|
|
|
console.log(this.data);
|
|
|
var dateTimeArray = this.data.dateTimeArray,
|
|
|
dateTime = e.detail.value;
|
|
|
if (dateTime[3] == 0) {
|
|
|
wx.showToast({
|
|
|
title: '选择时间不正确',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
|
|
|
let time1 = dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]]
|
|
|
|
|
|
// id = "10", name = "待审核",
|
|
|
// id = "20", name = "待接待",
|
|
|
// id = "21", name = "审核未通过",
|
|
|
// id = "25", name = "待面试",
|
|
|
// id = "26", name = "未接到",
|
|
|
// id = "30", name = "待入职",
|
|
|
// id = "35", name = "面试未通过",
|
|
|
// id = "40", name = "在职中",
|
|
|
// id = "45", name = "通过未入职",
|
|
|
// id = "48", name = "约离职",
|
|
|
// id = "50", name = "已离职"
|
|
|
let nowTime = new Date().getTime()
|
|
|
let setTime = new Date(time1).getTime()
|
|
|
let setTime1 = new Date(this.data.currentTime2).getTime()
|
|
|
let allowPass = true
|
|
|
let title = true
|
|
|
if (this.data.status == 10) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '面试时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < setTime1) {
|
|
|
title = '面试时间不能早于接待时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 20) {
|
|
|
|
|
|
if (nowTime > setTime) {
|
|
|
title = '面试时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < setTime1) {
|
|
|
title = '面试时间不能早于接待时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 25) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '面试时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 30) {
|
|
|
if (nowTime < setTime) {
|
|
|
title = '入职时间不能晚于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 40) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '约入职时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 48) {
|
|
|
if (nowTime < setTime) {
|
|
|
title = '入职时间不能晚于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
}
|
|
|
if (allowPass == false) {
|
|
|
wx.showToast({
|
|
|
title,
|
|
|
icon: 'none',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
this.setData({
|
|
|
checkedState: this.data.status,
|
|
|
currentTime1: dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]],
|
|
|
currentTime: dateTimeArray[0][dateTime[0]].replace("年", '') + '-' + dateTimeArray[1][dateTime[1]].replace("月", '') + '-' + dateTimeArray[2][dateTime[2]].replace("日", '') + ' ' + dateTimeArray[3][dateTime[3]],
|
|
|
});
|
|
|
console.log(this.data.dateTimeArray);
|
|
|
console.log(this.data.currentTime)
|
|
|
console.log(this.data.status)
|
|
|
// return
|
|
|
|
|
|
that.updateJob(1);
|
|
|
},
|
|
|
/**
|
|
|
* 除切状态和面试外的时间选择
|
|
|
*/
|
|
|
changeDateTime2 (e) {
|
|
|
var that = this;
|
|
|
console.log('changeDateTime2', e);
|
|
|
var dateTimeArray2 = this.data.dateTimeArray2,
|
|
|
dateTime2 = e.detail.value;
|
|
|
if (dateTime2[3] == 0) {
|
|
|
wx.showToast({
|
|
|
title: '选择时间不正确',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
|
|
|
let time2 = dateTimeArray2[0][dateTime2[0]].replace("年", '') + '-' + dateTimeArray2[1][dateTime2[1]].replace("月", '') + '-' + dateTimeArray2[2][dateTime2[2]].replace("日", '') + ' ' + dateTimeArray2[3][dateTime2[3]]
|
|
|
let nowTime = new Date().getTime()
|
|
|
let setTime = new Date(time2).getTime()
|
|
|
let setTime1 = new Date(this.data.currentTime1).getTime()
|
|
|
let allowPass = true
|
|
|
let title = true
|
|
|
if (this.data.status == 10) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '接待时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime > setTime1) {
|
|
|
title = '接待时间不能晚于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 20) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '接待时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime > setTime1) {
|
|
|
title = '接待时间不能晚于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 30) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '约入职时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.interview1) {
|
|
|
title = '约入职时间不能早于面试时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 40) {
|
|
|
if (nowTime < setTime) {
|
|
|
title = '入职时间不能晚于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.willEntry1) {
|
|
|
title = '入职时间不能早于约入职时间,请重新选择'
|
|
|
allowPass = false
|
|
|
}
|
|
|
} else if (this.data.status == 48) {
|
|
|
if (nowTime > setTime) {
|
|
|
title = '约离职时间不能早于现在的时间,请重新选择'
|
|
|
allowPass = false
|
|
|
} else if (setTime < this.data.entry1) {
|
|
|
title = '约离职时间不能早于入职时间,请重新选择'
|
|
|
allowPass = false
|
|
|
|
|
|
}
|
|
|
}
|
|
|
if (allowPass == false) {
|
|
|
wx.showToast({
|
|
|
title,
|
|
|
icon: 'none',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
this.setData({
|
|
|
checkedState: this.data.status,
|
|
|
currentTime2: dateTimeArray2[0][dateTime2[0]].replace("年", '') + '-' + dateTimeArray2[1][dateTime2[1]].replace("月", '') + '-' + dateTimeArray2[2][dateTime2[2]].replace("日", '') + ' ' + dateTimeArray2[3][dateTime2[3]],
|
|
|
});
|
|
|
console.log(this.data.dateTimeArray2);
|
|
|
console.log(this.data.currentTime2)
|
|
|
console.log(this.data.status)
|
|
|
that.updateJob(1);
|
|
|
},
|
|
|
|
|
|
|
|
|
changeDateTimeColumn (e) {
|
|
|
var arr = this.data.dateTime;
|
|
|
arr[e.detail.column] = e.detail.value;
|
|
|
console.log(e);
|
|
|
console.log(arr);
|
|
|
// debugger
|
|
|
if (this.data.checkedState == 40 || this.data.status == 48) {
|
|
|
var dateArr = this.autoChangeDateTimeArray2(arr, this.data.dateTimeArray); //当前之后的时间不可选
|
|
|
|
|
|
dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
|
|
|
for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
}
|
|
|
} else if (this.data.status != 50 && this.data.checkedState != 50) { //&& this.data.checkedState != 40 this.data.status != 40 &&
|
|
|
var dateArr = this.autoChangeDateTimeArray(arr, this.data.dateTimeArray);
|
|
|
console.log(dateArr);
|
|
|
dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
|
|
|
for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
}
|
|
|
|
|
|
|
|
|
} else {
|
|
|
var dateArr = this.data.dateTimeArray
|
|
|
dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
}
|
|
|
}
|
|
|
this.setData({
|
|
|
dateTimeArray: dateArr,
|
|
|
dateTime: arr,
|
|
|
});
|
|
|
// dateArr = this.data.dateTimeArray;
|
|
|
// arr[e.detail.column] = e.detail.value;
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
// }
|
|
|
// // .replace("年",'').replace("月",'').replace("日",'')
|
|
|
// this.setData({
|
|
|
// dateTimeArray: dateArr,
|
|
|
// dateTime: arr
|
|
|
// });
|
|
|
},
|
|
|
changeDateTimeColumn2 (e) {
|
|
|
var arr = this.data.dateTime2;
|
|
|
arr[e.detail.column] = e.detail.value;
|
|
|
console.log(e);
|
|
|
console.log(arr);
|
|
|
// var dateArr = this.autoChangeDateTimeArray(arr, this.data.dateTimeArray2);
|
|
|
if (this.data.status != 40 && this.data.status != 50 && this.data.checkedState != 40 && this.data.checkedState != 50) {
|
|
|
var dateArr = this.autoChangeDateTimeArray(arr, this.data.dateTimeArray2);
|
|
|
|
|
|
console.log(dateArr[0][arr[0]], dateArr[1][arr[1]])
|
|
|
|
|
|
dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
|
|
|
for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
}
|
|
|
} else {
|
|
|
var dateArr = this.data.dateTimeArray2
|
|
|
|
|
|
dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
|
|
|
for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
}
|
|
|
}
|
|
|
this.setData({
|
|
|
dateTimeArray2: dateArr,
|
|
|
dateTime2: arr,
|
|
|
});
|
|
|
// dateArr = this.data.dateTimeArray2;
|
|
|
// arr[e.detail.column] = e.detail.value;
|
|
|
// dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
|
|
|
// for (let index = 0; index < dateArr[2].length; index++) {
|
|
|
// dateArr[2][index] = dateArr[2][index] + "日"
|
|
|
// }
|
|
|
// // .replace("年",'').replace("月",'').replace("日",'')
|
|
|
// this.setData({
|
|
|
// dateTimeArray2: dateArr,
|
|
|
// dateTime2: arr
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
changeStatus () {
|
|
|
var that = this;
|
|
|
if (((that.data.status != 21 && that.data.status != 50 && that.data.status != 60 && that.data.status != 26 && that.data.status != 35 && that.data.status != 45) && (that.data.managerRoleClassify || that.data.roleOf142 || that.data.roleOf132)) || (that.data.roleOf41 && that.data.status == 10)) {
|
|
|
if((that.data.status == 30 && that.data.checkedState == 37) || that.data.auditStep == 1){
|
|
|
that.setData({
|
|
|
showDialog: true,
|
|
|
stateItems:[
|
|
|
{ value: '38', name: '政策审核通过' },
|
|
|
]
|
|
|
});
|
|
|
}else if((that.data.status == 30 && that.data.checkedState == 38) || that.data.auditStep == 2){
|
|
|
that.setData({
|
|
|
showDialog: true,
|
|
|
stateItems:[
|
|
|
{ value: '41', name: '财务审核通过' },
|
|
|
{ value: '39', name: '财务审核不通过' },
|
|
|
]
|
|
|
});
|
|
|
}else{
|
|
|
this.setData({
|
|
|
showDialog: true,
|
|
|
checkedState: '',
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
},
|
|
|
close () {
|
|
|
// console.log(this.data.checkedState + "获取到的单选");
|
|
|
this.setData({
|
|
|
showDialog: false,
|
|
|
showDialogDesp: false,
|
|
|
despModal: ""
|
|
|
});
|
|
|
},
|
|
|
getInitializationTime (targetTime) {
|
|
|
var date = new Date();
|
|
|
var tomorrow = new Date();
|
|
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
|
return date.toTimeString() >= targetTime ? (dateUtil.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (dateUtil.formatDateYMD(date.toLocaleDateString()) + " " + `${date.getHours() + 1}:00`);
|
|
|
},
|
|
|
radioChange (e) {
|
|
|
console.log('radio发生change事件,携带value值为:', e.detail.value);
|
|
|
var that = this;
|
|
|
let stateItems = that.data.stateItems;
|
|
|
console.log(stateItems);
|
|
|
for (let i = 0; i < stateItems.length; i++) {
|
|
|
if (stateItems[i].value == e.detail.value) {
|
|
|
var time = '';
|
|
|
if (stateItems[i].name == '面试通过') {//约入职时间
|
|
|
time = that.getInitializationTime("12:00");
|
|
|
} else if (stateItems[i].name == '提交入职申请') {//入职时间
|
|
|
time = that.getInitializationTime("12:00");
|
|
|
} else if (stateItems[i].name == '约离职') {//约离职时间
|
|
|
console.log(dateUtil.formatDateYMDHM(that.data.record.willLeaveTime));
|
|
|
time = commonUtil.isNotEmptyCheck(that.data.record.willLeaveTime) ? dateUtil.formatDateYMDHM(that.data.record.willLeaveTime) : that.getInitializationTime("18:00");
|
|
|
} else if (stateItems[i].name == '已离职') {//离职时间
|
|
|
time = that.getInitializationTime("18:00");
|
|
|
}
|
|
|
that.setData({
|
|
|
checkedState: e.detail.value,
|
|
|
initTime: commonUtil.isNotEmptyCheck(time) ? time : that.data.initTime,
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
console.log(that.data.checkedState + "点击的单选");
|
|
|
// this.setData({
|
|
|
// ["userInfo.sex"]: currentSex,
|
|
|
// sex,
|
|
|
// });
|
|
|
},
|
|
|
submitModal () {
|
|
|
var that = this;
|
|
|
console.log(that.data.checkedState + "获取到的单选");
|
|
|
console.log(that.data.despModal + "获取到的输入框");
|
|
|
|
|
|
|
|
|
if (that.data.checkedState == 20 || that.data.checkedState == 21) {
|
|
|
// console.log(that.data.height)
|
|
|
that.setData({
|
|
|
height: "22.001"
|
|
|
});
|
|
|
}
|
|
|
console.log(that.data.height)
|
|
|
if (app.isEmptyCheck(that.data.checkedState)) {
|
|
|
wx.showToast({
|
|
|
title: '请先选择状态',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
|
|
|
if (that.data.initTime.includes("undefined")) {
|
|
|
wx.showToast({
|
|
|
title: '选择时间不正确',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
|
|
|
if (that.data.checkedState == 30 || that.data.checkedState == 48 || that.data.checkedState == 50) {
|
|
|
if (app.isEmptyCheck(that.data.initTime)) {
|
|
|
wx.showToast({
|
|
|
title: '请先选择时间',
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
|
|
|
that.updateJob(2);
|
|
|
|
|
|
|
|
|
},
|
|
|
updateJob (num) {
|
|
|
var that = this;
|
|
|
let currData = {};
|
|
|
|
|
|
console.log(that.data.checkedState);
|
|
|
// return
|
|
|
let url = app.globalData.ip + "/user/apply/order/changeOrderStatusAndDesp"
|
|
|
|
|
|
currData["status"] = that.data.checkedState;
|
|
|
currData["desp"] = that.data.despModal;
|
|
|
currData["orderId"] = that.data.workOrderId;
|
|
|
// debugger;
|
|
|
|
|
|
if (num == 2) {
|
|
|
if (that.data.checkedState == 30) {
|
|
|
currData["willEntryTime"] = that.data.initTime;
|
|
|
} else if (that.data.checkedState == 37) {
|
|
|
currData["status"] = 30;
|
|
|
currData["entryTimeStr"] = that.data.initTime;
|
|
|
url = app.globalData.ip + "/user/apply/order/applyEntry"
|
|
|
}else if (that.data.checkedState == 38) {
|
|
|
currData["status"] = 30;
|
|
|
url = app.globalData.ip + "/user/apply/order/checkPolicy"
|
|
|
} else if (that.data.checkedState == 40) {
|
|
|
currData["entryTime"] = that.data.initTime;
|
|
|
} else if (that.data.checkedState == 48) {
|
|
|
currData["willLeaveTime"] = that.data.initTime;
|
|
|
} else if (that.data.checkedState == 50) {
|
|
|
currData["leaveTime"] = that.data.initTime;
|
|
|
}else if (that.data.checkedState == 41) {
|
|
|
currData["status"] = 30;
|
|
|
currData["step"] = 2;
|
|
|
that.data.checkedState = 41;
|
|
|
url = app.globalData.ip + "/user/apply/order/checkFinance"
|
|
|
that.close();
|
|
|
}else if (that.data.checkedState == 39) {
|
|
|
currData["status"] = 30;
|
|
|
currData["step"] = 3;
|
|
|
that.data.openState = 37;
|
|
|
url = app.globalData.ip + "/user/apply/order/checkFinance"
|
|
|
that.close();
|
|
|
} else {
|
|
|
currData["interviewTime"] = that.data.initTime;
|
|
|
}
|
|
|
} else {
|
|
|
if (that.data.status == 30) {
|
|
|
// currData["interviewTime"] = that.data.currentTime;
|
|
|
currData["entryTime"] = that.data.currentTime;
|
|
|
currData["willEntryTime"] = that.data.currentTime2;
|
|
|
} else if (that.data.status == 40) {
|
|
|
currData["entryTime"] = that.data.currentTime2;
|
|
|
} else if (that.data.status == 48) {
|
|
|
currData["entryTime"] = that.data.currentTime;
|
|
|
currData["willLeaveTime"] = that.data.currentTime2;
|
|
|
} else if (that.data.status == 50) {
|
|
|
currData["leaveTime"] = that.data.currentTime;
|
|
|
} else {
|
|
|
currData["interviewTime"] = that.data.currentTime;
|
|
|
currData["receptionTime"] = that.data.currentTime2;
|
|
|
}
|
|
|
}
|
|
|
wx.request({
|
|
|
url: url,
|
|
|
method: "POST",
|
|
|
header: app.globalData.header,
|
|
|
data: currData,
|
|
|
success: function (res) {
|
|
|
if (res.data.status == 200) {
|
|
|
// var pages = getCurrentPages();
|
|
|
// var currPage = pages[pages.length - 1]; // 当前页面
|
|
|
// var prevPage = pages[pages.length - 2]; // 上一个页面
|
|
|
// prevPage.setData({
|
|
|
// hasChange: true
|
|
|
// });
|
|
|
that.setData({
|
|
|
prevPageChange: true
|
|
|
})
|
|
|
|
|
|
|
|
|
that.getDetail();
|
|
|
that.close();
|
|
|
} else {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: res.data.msg,
|
|
|
showCancel: false,
|
|
|
success (res1) {
|
|
|
if (res1.confirm) {
|
|
|
console.log('用户点击确定')
|
|
|
} else if (res1.cancel) {
|
|
|
console.log('用户点击取消')
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
},
|
|
|
// fail:function(res){
|
|
|
// wx.showModal({
|
|
|
// title: '提示',
|
|
|
// content: res.errMsg,
|
|
|
// showCancel:false,
|
|
|
// success (res1) {
|
|
|
// if (res.confirm) {
|
|
|
// console.log('用户点击确定')
|
|
|
// } else if (res.cancel) {
|
|
|
// console.log('用户点击取消')
|
|
|
// }
|
|
|
// }
|
|
|
// })
|
|
|
|
|
|
|
|
|
// },
|
|
|
})
|
|
|
},
|
|
|
reset () {
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
let currData = {};
|
|
|
|
|
|
console.log("reset");
|
|
|
|
|
|
|
|
|
// var stateItems = [
|
|
|
// {value: '25', name: '已接到'},
|
|
|
// {value: '26', name: '未接到'},
|
|
|
// ]
|
|
|
|
|
|
that.setData({
|
|
|
auditStep : 0,
|
|
|
stateItems: [
|
|
|
{ value: '25', name: '已接到' },
|
|
|
{ value: '26', name: '未接到' },
|
|
|
]
|
|
|
})
|
|
|
currData["auditStep"] = 10;
|
|
|
currData["status"] = 10;
|
|
|
currData["orderId"] = that.data.workOrderId;
|
|
|
wx.request({
|
|
|
url: app.globalData.ip + "/user/apply/order/changeOrderStatusAndDesp",
|
|
|
method: "POST",
|
|
|
header: app.globalData.header,
|
|
|
data: currData,
|
|
|
success: function (res) {
|
|
|
that.getDetail();
|
|
|
},
|
|
|
fail: function () {
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
onHide () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
onUnload () {
|
|
|
var pages = getCurrentPages();
|
|
|
var currPage = pages[pages.length - 1]; // 当前页面
|
|
|
var prevPage = pages[pages.length - 2]; // 上一个页面
|
|
|
if (this.data.prevPageChange) {
|
|
|
|
|
|
if (app.isNotEmptyCheck(prevPage)) {
|
|
|
prevPage.setData({
|
|
|
hasChange: true
|
|
|
});
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
if (app.isNotEmptyCheck(prevPage)) {
|
|
|
prevPage.setData({
|
|
|
hasChange: false
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
onPullDownRefresh () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
onShareAppMessage () {
|
|
|
|
|
|
}
|
|
|
}) |