|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
* @param item
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
export function isEmptyCheck(value) {
|
|
|
|
|
export function isEmptyCheck (value) {
|
|
|
|
|
if (value == null || value === "" || value == "null" || typeof value == "undefined") {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@ -16,14 +16,14 @@ export function isEmptyCheck(value) {
|
|
|
|
|
* @returns
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function isNotEmptyCheck(value) {
|
|
|
|
|
export function isNotEmptyCheck (value) {
|
|
|
|
|
return !isEmptyCheck(value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function toFixed(value) {
|
|
|
|
|
if(value == 0 || value == '0'){
|
|
|
|
|
export function toFixed (value) {
|
|
|
|
|
if (value == 0 || value == '0') {
|
|
|
|
|
return 0
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
return new Number(value).toFixed(2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -31,7 +31,7 @@ export function toFixed(value) {
|
|
|
|
|
* 根据状态工单类型ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function getDistanceName(distance) {
|
|
|
|
|
export function getDistanceName (distance) {
|
|
|
|
|
let str = "";
|
|
|
|
|
|
|
|
|
|
if (isNotEmptyCheck(distance)) {
|
|
|
|
|
@ -50,7 +50,7 @@ export function getDistanceName(distance) {
|
|
|
|
|
* 业务类型
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function jobTypeArray() {
|
|
|
|
|
export function jobTypeArray () {
|
|
|
|
|
let jobTypeArray = [
|
|
|
|
|
{
|
|
|
|
|
id: "0",
|
|
|
|
|
@ -91,7 +91,7 @@ export function jobTypeArray() {
|
|
|
|
|
* 根据业务类型ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function getJobTypeById(id) {
|
|
|
|
|
export function getJobTypeById (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = jobTypeArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -105,7 +105,7 @@ export function getJobTypeById(id) {
|
|
|
|
|
* 工种类型
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function workTypeArray() {
|
|
|
|
|
export function workTypeArray () {
|
|
|
|
|
let workTypeArray = [
|
|
|
|
|
{
|
|
|
|
|
id: 0,
|
|
|
|
|
@ -149,7 +149,7 @@ export function workTypeArray() {
|
|
|
|
|
* 根据工种类型ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function getWorkTypeById(id) {
|
|
|
|
|
export function getWorkTypeById (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = workTypeArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -163,7 +163,7 @@ export function getWorkTypeById(id) {
|
|
|
|
|
/**
|
|
|
|
|
* 根据传递的scene参数,获取里面的内容
|
|
|
|
|
*/
|
|
|
|
|
export function sceneToJson(sceneStr) {
|
|
|
|
|
export function sceneToJson (sceneStr) {
|
|
|
|
|
let json = {};
|
|
|
|
|
let array = sceneStr.split(",");
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -377,15 +377,15 @@ var healthAuth = [
|
|
|
|
|
|
|
|
|
|
// function CommonUtil(){}
|
|
|
|
|
|
|
|
|
|
export function getHealthArray() {
|
|
|
|
|
export function getHealthArray () {
|
|
|
|
|
return healthAuth;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getAuthArray() {
|
|
|
|
|
export function getAuthArray () {
|
|
|
|
|
return auth;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initAuthPicker(id) {
|
|
|
|
|
export function initAuthPicker (id) {
|
|
|
|
|
for (var i = 0; i < auth.length; i++) {
|
|
|
|
|
if (auth[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -393,15 +393,15 @@ export function initAuthPicker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getAuthValue(index) {
|
|
|
|
|
export function getAuthValue (index) {
|
|
|
|
|
return auth[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getIsMarryArray() {
|
|
|
|
|
export function getIsMarryArray () {
|
|
|
|
|
return isMarry;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initIsMarryPicker(name) {
|
|
|
|
|
export function initIsMarryPicker (name) {
|
|
|
|
|
for (var i = 0; i < isMarry.length; i++) {
|
|
|
|
|
if (isMarry[i].name == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -409,15 +409,15 @@ export function initIsMarryPicker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getIsMarryValue(index) {
|
|
|
|
|
export function getIsMarryValue (index) {
|
|
|
|
|
return isMarry[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getEducationArray() {
|
|
|
|
|
export function getEducationArray () {
|
|
|
|
|
return education;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initEducationPicker(name) {
|
|
|
|
|
export function initEducationPicker (name) {
|
|
|
|
|
for (var i = 0; i < education.length; i++) {
|
|
|
|
|
if (education[i].name == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -425,19 +425,19 @@ export function initEducationPicker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getEducationValue(index) {
|
|
|
|
|
export function getEducationValue (index) {
|
|
|
|
|
return education[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getSexValue(index) {
|
|
|
|
|
export function getSexValue (index) {
|
|
|
|
|
return sex[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getSexArray() {
|
|
|
|
|
export function getSexArray () {
|
|
|
|
|
return sex;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initSexPicker(id) {
|
|
|
|
|
export function initSexPicker (id) {
|
|
|
|
|
for (var i = 0; i < sex.length; i++) {
|
|
|
|
|
if (sex[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -446,13 +446,13 @@ export function initSexPicker(id) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getAttendanceStatus() {
|
|
|
|
|
export function getAttendanceStatus () {
|
|
|
|
|
return attendanceStatus;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusValue(index) {
|
|
|
|
|
export function getAttendanceStatusValue (index) {
|
|
|
|
|
return attendanceStatus[index].id;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusIndex(id) {
|
|
|
|
|
export function getAttendanceStatusIndex (id) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
|
|
if (attendanceStatus[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -460,7 +460,7 @@ export function getAttendanceStatusIndex(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusName(id) {
|
|
|
|
|
export function getAttendanceStatusName (id) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
|
|
if (attendanceStatus[i].id == id) {
|
|
|
|
|
return attendanceStatus[i].name;
|
|
|
|
|
@ -468,7 +468,7 @@ export function getAttendanceStatusName(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusNameOfIndex(index) {
|
|
|
|
|
export function getAttendanceStatusNameOfIndex (index) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus.length; i++) {
|
|
|
|
|
if (index == i) {
|
|
|
|
|
return attendanceStatus[i].name;
|
|
|
|
|
@ -477,13 +477,13 @@ export function getAttendanceStatusNameOfIndex(index) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getAttendanceStatus2() {
|
|
|
|
|
export function getAttendanceStatus2 () {
|
|
|
|
|
return attendanceStatus2;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusValue2(index) {
|
|
|
|
|
export function getAttendanceStatusValue2 (index) {
|
|
|
|
|
return attendanceStatus2[index].id;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusIndex2(id) {
|
|
|
|
|
export function getAttendanceStatusIndex2 (id) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
|
|
if (attendanceStatus2[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -491,7 +491,7 @@ export function getAttendanceStatusIndex2(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusName2(id) {
|
|
|
|
|
export function getAttendanceStatusName2 (id) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
|
|
if (attendanceStatus2[i].id == id) {
|
|
|
|
|
return attendanceStatus2[i].name;
|
|
|
|
|
@ -499,7 +499,7 @@ export function getAttendanceStatusName2(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getAttendanceStatusNameOfIndex2(index) {
|
|
|
|
|
export function getAttendanceStatusNameOfIndex2 (index) {
|
|
|
|
|
for (var i = 0; i < attendanceStatus2.length; i++) {
|
|
|
|
|
if (index == i) {
|
|
|
|
|
return attendanceStatus2[i].name;
|
|
|
|
|
@ -508,26 +508,26 @@ export function getAttendanceStatusNameOfIndex2(index) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getSignatoryTypeArray() {
|
|
|
|
|
export function getSignatoryTypeArray () {
|
|
|
|
|
return signatoryTypeArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getContractTypeArrayArray() {
|
|
|
|
|
export function getContractTypeArrayArray () {
|
|
|
|
|
return contractTypeArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getHourArray() {
|
|
|
|
|
export function getHourArray () {
|
|
|
|
|
return hourArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getTimeArray1() {
|
|
|
|
|
export function getTimeArray1 () {
|
|
|
|
|
return timeArray1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getInterviewArray() {
|
|
|
|
|
export function getInterviewArray () {
|
|
|
|
|
return interviewArray;
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewArrayName(id) {
|
|
|
|
|
export function getInterviewArrayName (id) {
|
|
|
|
|
for (var i = 0; i < interviewArray.length; i++) {
|
|
|
|
|
if (interviewArray[i].id == id) {
|
|
|
|
|
return interviewArray[i].name;
|
|
|
|
|
@ -536,10 +536,10 @@ export function getInterviewArrayName(id) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getInterviewStatusArray() {
|
|
|
|
|
export function getInterviewStatusArray () {
|
|
|
|
|
return interviewStatusArray;
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusName(id) {
|
|
|
|
|
export function getInterviewStatusName (id) {
|
|
|
|
|
for (var i = 0; i < interviewStatusArray.length; i++) {
|
|
|
|
|
if (interviewStatusArray[i].id == id) {
|
|
|
|
|
return interviewStatusArray[i].name;
|
|
|
|
|
@ -547,10 +547,10 @@ export function getInterviewStatusName(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusArray1() {
|
|
|
|
|
export function getInterviewStatusArray1 () {
|
|
|
|
|
return interviewStatusArray1;
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusName1(id) {
|
|
|
|
|
export function getInterviewStatusName1 (id) {
|
|
|
|
|
for (var i = 0; i < interviewStatusArray1.length; i++) {
|
|
|
|
|
if (interviewStatusArray1[i].id == id) {
|
|
|
|
|
return interviewStatusArray1[i].name;
|
|
|
|
|
@ -558,7 +558,7 @@ export function getInterviewStatusName1(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusIndex1(id) {
|
|
|
|
|
export function getInterviewStatusIndex1 (id) {
|
|
|
|
|
for (var i = 0; i < interviewStatusArray1.length; i++) {
|
|
|
|
|
if (interviewStatusArray1[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -567,10 +567,10 @@ export function getInterviewStatusIndex1(id) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getInterviewStatusArray2() {
|
|
|
|
|
export function getInterviewStatusArray2 () {
|
|
|
|
|
return interviewStatusArray2;
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusName2(id) {
|
|
|
|
|
export function getInterviewStatusName2 (id) {
|
|
|
|
|
for (var i = 0; i < interviewStatusArray2.length; i++) {
|
|
|
|
|
if (interviewStatusArray2[i].id == id) {
|
|
|
|
|
return interviewStatusArray2[i].name;
|
|
|
|
|
@ -578,7 +578,7 @@ export function getInterviewStatusName2(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getInterviewStatusIndex2(id) {
|
|
|
|
|
export function getInterviewStatusIndex2 (id) {
|
|
|
|
|
for (var i = 0; i < interviewStatusArray2.length; i++) {
|
|
|
|
|
if (interviewStatusArray2[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -587,11 +587,11 @@ export function getInterviewStatusIndex2(id) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getEntryStatusArray() {
|
|
|
|
|
export function getEntryStatusArray () {
|
|
|
|
|
return entryStatusArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getEntryStatusName(id) {
|
|
|
|
|
export function getEntryStatusName (id) {
|
|
|
|
|
for (var i = 0; i < entryStatusArray.length; i++) {
|
|
|
|
|
if (entryStatusArray[i].id == id) {
|
|
|
|
|
return entryStatusArray[i].name;
|
|
|
|
|
@ -599,7 +599,7 @@ export function getEntryStatusName(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getEntryStatusIndex(id) {
|
|
|
|
|
export function getEntryStatusIndex (id) {
|
|
|
|
|
for (var i = 0; i < entryStatusArray.length; i++) {
|
|
|
|
|
if (entryStatusArray[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -608,11 +608,11 @@ export function getEntryStatusIndex(id) {
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getWorkTypeArray() {
|
|
|
|
|
export function getWorkTypeArray () {
|
|
|
|
|
return workType;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initWorkTypePicker(id) {
|
|
|
|
|
export function initWorkTypePicker (id) {
|
|
|
|
|
for (var i = 0; i < workType.length; i++) {
|
|
|
|
|
if (workType[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -620,15 +620,15 @@ export function initWorkTypePicker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkTypeValue(index) {
|
|
|
|
|
export function getWorkTypeValue (index) {
|
|
|
|
|
return workType[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getWorkType2Array() {
|
|
|
|
|
export function getWorkType2Array () {
|
|
|
|
|
return workType2;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initWorkType2Picker(id) {
|
|
|
|
|
export function initWorkType2Picker (id) {
|
|
|
|
|
for (var i = 0; i < workType2.length; i++) {
|
|
|
|
|
if (workType2[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -636,15 +636,15 @@ export function initWorkType2Picker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkType2Value(index) {
|
|
|
|
|
export function getWorkType2Value (index) {
|
|
|
|
|
return workType2[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getWorkType3Array() {
|
|
|
|
|
export function getWorkType3Array () {
|
|
|
|
|
return workType3;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initWorkType3Picker(id) {
|
|
|
|
|
export function initWorkType3Picker (id) {
|
|
|
|
|
for (var i = 0; i < workType3.length; i++) {
|
|
|
|
|
if (workType3[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -652,10 +652,10 @@ export function initWorkType3Picker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkType3Value(index) {
|
|
|
|
|
export function getWorkType3Value (index) {
|
|
|
|
|
return workType3[index].id;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkType3Name(id) {
|
|
|
|
|
export function getWorkType3Name (id) {
|
|
|
|
|
for (var i = 0; i < workType3.length; i++) {
|
|
|
|
|
if (workType3[i].id == id) {
|
|
|
|
|
return workType3[i].name;
|
|
|
|
|
@ -664,11 +664,11 @@ export function getWorkType3Name(id) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getWorkType4Array() {
|
|
|
|
|
export function getWorkType4Array () {
|
|
|
|
|
return workType4;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initWorkType4Picker(id) {
|
|
|
|
|
export function initWorkType4Picker (id) {
|
|
|
|
|
for (var i = 0; i < workType4.length; i++) {
|
|
|
|
|
if (workType4[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -676,10 +676,10 @@ export function initWorkType4Picker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkType4Value(index) {
|
|
|
|
|
export function getWorkType4Value (index) {
|
|
|
|
|
return workType4[index].id;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkType4Name(id) {
|
|
|
|
|
export function getWorkType4Name (id) {
|
|
|
|
|
for (var i = 0; i < workType4.length; i++) {
|
|
|
|
|
if (workType4[i].id == id) {
|
|
|
|
|
return workType4[i].name;
|
|
|
|
|
@ -688,10 +688,10 @@ export function getWorkType4Name(id) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getSettlementCycleArray() {
|
|
|
|
|
export function getSettlementCycleArray () {
|
|
|
|
|
return settlementCycleArray;
|
|
|
|
|
}
|
|
|
|
|
export function getSettlementCycleName(id) {
|
|
|
|
|
export function getSettlementCycleName (id) {
|
|
|
|
|
for (var i = 0; i < settlementCycleArray.length; i++) {
|
|
|
|
|
if (settlementCycleArray[i].id == id) {
|
|
|
|
|
return settlementCycleArray[i].name;
|
|
|
|
|
@ -700,10 +700,10 @@ export function getSettlementCycleName(id) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getSalaryTypeArray() {
|
|
|
|
|
export function getSalaryTypeArray () {
|
|
|
|
|
return salaryTypeArray;
|
|
|
|
|
}
|
|
|
|
|
export function getSalaryTypeName(id) {
|
|
|
|
|
export function getSalaryTypeName (id) {
|
|
|
|
|
for (var i = 0; i < salaryTypeArray.length; i++) {
|
|
|
|
|
if (salaryTypeArray[i].id == id) {
|
|
|
|
|
return salaryTypeArray[i].name;
|
|
|
|
|
@ -711,7 +711,7 @@ export function getSalaryTypeName(id) {
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
export function getSalaryTypeSubName(id) {
|
|
|
|
|
export function getSalaryTypeSubName (id) {
|
|
|
|
|
for (var i = 0; i < salaryTypeArray.length; i++) {
|
|
|
|
|
if (salaryTypeArray[i].id == id) {
|
|
|
|
|
return salaryTypeArray[i].subName;
|
|
|
|
|
@ -720,11 +720,11 @@ export function getSalaryTypeSubName(id) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getHopeLiveArray() {
|
|
|
|
|
export function getHopeLiveArray () {
|
|
|
|
|
return hopeLive;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initHopeLivePicker(name) {
|
|
|
|
|
export function initHopeLivePicker (name) {
|
|
|
|
|
for (var i = 0; i < hopeLive.length; i++) {
|
|
|
|
|
if (hopeLive[i].id == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -732,15 +732,15 @@ export function initHopeLivePicker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getHopeLiveValue(index) {
|
|
|
|
|
export function getHopeLiveValue (index) {
|
|
|
|
|
return hopeLive[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getWorkExpArray() {
|
|
|
|
|
export function getWorkExpArray () {
|
|
|
|
|
return workExp;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initWorkExpPicker(name) {
|
|
|
|
|
export function initWorkExpPicker (name) {
|
|
|
|
|
for (var i = 0; i < workExp.length; i++) {
|
|
|
|
|
if (workExp[i].name == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -748,15 +748,15 @@ export function initWorkExpPicker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getWorkExpValue(index) {
|
|
|
|
|
export function getWorkExpValue (index) {
|
|
|
|
|
return workExp[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getEducation2Array() {
|
|
|
|
|
export function getEducation2Array () {
|
|
|
|
|
return education2;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initEducation2Picker(name) {
|
|
|
|
|
export function initEducation2Picker (name) {
|
|
|
|
|
for (var i = 0; i < education2.length; i++) {
|
|
|
|
|
if (education2[i].name == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -764,15 +764,15 @@ export function initEducation2Picker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getEducation2Value(index) {
|
|
|
|
|
export function getEducation2Value (index) {
|
|
|
|
|
return education2[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getIsMarry2Array() {
|
|
|
|
|
export function getIsMarry2Array () {
|
|
|
|
|
return isMarry2;
|
|
|
|
|
}
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initIsMarry2Picker(name) {
|
|
|
|
|
export function initIsMarry2Picker (name) {
|
|
|
|
|
for (var i = 0; i < isMarry2.length; i++) {
|
|
|
|
|
if (isMarry2[i].name == name) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -780,16 +780,16 @@ export function initIsMarry2Picker(name) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getIsMarry2Value(index) {
|
|
|
|
|
export function getIsMarry2Value (index) {
|
|
|
|
|
return isMarry2[index].id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getBankAuthArray() {
|
|
|
|
|
export function getBankAuthArray () {
|
|
|
|
|
return bankAuth;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//初始化picker选中项
|
|
|
|
|
export function initBankAuthPicker(id) {
|
|
|
|
|
export function initBankAuthPicker (id) {
|
|
|
|
|
for (var i = 0; i < bankAuth.length; i++) {
|
|
|
|
|
if (bankAuth[i].id == id) {
|
|
|
|
|
return i;
|
|
|
|
|
@ -797,7 +797,7 @@ export function initBankAuthPicker(id) {
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
export function getBankAuthValue(index) {
|
|
|
|
|
export function getBankAuthValue (index) {
|
|
|
|
|
return bankAuth[index].id;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
@ -806,7 +806,7 @@ export function getBankAuthValue(index) {
|
|
|
|
|
* @param detailPosition 详细地址
|
|
|
|
|
* @returns {string}
|
|
|
|
|
*/
|
|
|
|
|
export function getStoreAddress(district, detailPosition) {
|
|
|
|
|
export function getStoreAddress (district, detailPosition) {
|
|
|
|
|
var res = "";
|
|
|
|
|
if (isNotEmptyCheck(district)) {
|
|
|
|
|
var tmpArr = district.split(",");
|
|
|
|
|
@ -825,7 +825,7 @@ export function getStoreAddress(district, detailPosition) {
|
|
|
|
|
/**
|
|
|
|
|
* 代理推广明细事件
|
|
|
|
|
*/
|
|
|
|
|
export function agencyPromotionDetailEventArray() {
|
|
|
|
|
export function agencyPromotionDetailEventArray () {
|
|
|
|
|
let agencyPromotionDetailEventArray = [
|
|
|
|
|
{ id: "10", name: "扫码", value: "10", text: "扫码", checked: false },
|
|
|
|
|
{ id: "20", name: "报名", value: "20", text: "报名", checked: false },
|
|
|
|
|
@ -838,7 +838,7 @@ export function agencyPromotionDetailEventArray() {
|
|
|
|
|
/**
|
|
|
|
|
* 根据代理推广明细事件ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
export function getAgencyPromotionDetailEventNameId(id) {
|
|
|
|
|
export function getAgencyPromotionDetailEventNameId (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = agencyPromotionDetailEventArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -852,7 +852,7 @@ export function getAgencyPromotionDetailEventNameId(id) {
|
|
|
|
|
/**
|
|
|
|
|
* 代理推广明细佣金状态
|
|
|
|
|
*/
|
|
|
|
|
export function agencyPromotionDetailMoneyStatusArray() {
|
|
|
|
|
export function agencyPromotionDetailMoneyStatusArray () {
|
|
|
|
|
let agencyPromotionDetailMoneyStatusArray = [
|
|
|
|
|
{ id: "0", name: "无佣金", value: "0", text: "无佣金", checked: false },
|
|
|
|
|
{ id: "10", name: "待结算", value: "10", text: "待结算", checked: false },
|
|
|
|
|
@ -864,7 +864,7 @@ export function agencyPromotionDetailMoneyStatusArray() {
|
|
|
|
|
/**
|
|
|
|
|
* 根据代理推广明细佣金状态ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
export function getAgencyPromotionDetailMoneyStatusNameId(id) {
|
|
|
|
|
export function getAgencyPromotionDetailMoneyStatusNameId (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = agencyPromotionDetailMoneyStatusArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -875,14 +875,14 @@ export function getAgencyPromotionDetailMoneyStatusNameId(id) {
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function moneyToFixed(money, fixed = 2, multiplicator = 100) {
|
|
|
|
|
export function moneyToFixed (money, fixed = 2, multiplicator = 100) {
|
|
|
|
|
if (money != 0 && money != null && money != "" && money != undefined) {
|
|
|
|
|
return cutZero(new Number(money / multiplicator).toFixed(fixed));
|
|
|
|
|
} else {
|
|
|
|
|
return "0";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
export function cutZero(old) {
|
|
|
|
|
export function cutZero (old) {
|
|
|
|
|
//拷贝一份 返回去掉零的新串
|
|
|
|
|
let newstr = old;
|
|
|
|
|
//循环变量 小数部分长度
|
|
|
|
|
@ -923,7 +923,7 @@ export function cutZero(old) {
|
|
|
|
|
// return urlWithArgs
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
export function getDateArrayOfScope() {
|
|
|
|
|
export function getDateArrayOfScope () {
|
|
|
|
|
// var multiArray = [['2000年', '2001年'], ['01月', '02月', '03月', '04月', '05月'], ['-'],['2000年', '2001年'], ['01月', '02月', '03月', '04月', '05月']];
|
|
|
|
|
var multiArray = [[], ["01月", "02月", "03月", "04月", "05月", "06月", "07月", "08月", "09月", "10月", "11月", "12月"], ["-"], [], ["01月", "02月", "03月", "04月", "05月", "06月", "07月", "08月", "09月", "10月", "11月", "12月"]];
|
|
|
|
|
|
|
|
|
|
@ -941,7 +941,7 @@ export function getDateArrayOfScope() {
|
|
|
|
|
return multiArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function educationArray() {
|
|
|
|
|
export function educationArray () {
|
|
|
|
|
let educationArray = [
|
|
|
|
|
{ id: "初中", name: "初中" },
|
|
|
|
|
{ id: "高中", name: "高中" },
|
|
|
|
|
@ -958,7 +958,7 @@ export function educationArray() {
|
|
|
|
|
* @param val
|
|
|
|
|
* @returns {string}
|
|
|
|
|
*/
|
|
|
|
|
export function formatDateYMD(val) {
|
|
|
|
|
export function formatDateYMD (val) {
|
|
|
|
|
if (val == null || val == "") {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
@ -984,7 +984,7 @@ export function formatDateYMD(val) {
|
|
|
|
|
}
|
|
|
|
|
return fmt;
|
|
|
|
|
}
|
|
|
|
|
export function formatDateYMDHMS(val) {
|
|
|
|
|
export function formatDateYMDHMS (val) {
|
|
|
|
|
// model -> view,在更新 `<input>` 元素之前格式化值
|
|
|
|
|
if (val !== "") {
|
|
|
|
|
if (val !== null && val !== "" && typeof val == "string") {
|
|
|
|
|
@ -1020,7 +1020,7 @@ export function formatDateYMDHMS(val) {
|
|
|
|
|
* @param val
|
|
|
|
|
* @returns {string}
|
|
|
|
|
*/
|
|
|
|
|
export function formatDateYMDHM(val) {
|
|
|
|
|
export function formatDateYMDHM (val) {
|
|
|
|
|
// model -> view,在更新 `<input>` 元素之前格式化值
|
|
|
|
|
if (isEmptyCheck(val)) {
|
|
|
|
|
return "";
|
|
|
|
|
@ -1050,7 +1050,7 @@ export function formatDateYMDHM(val) {
|
|
|
|
|
return fmt;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
|
|
|
|
|
function getJobSpecialLabelNamesArray (jobSpecialLabelNames) {
|
|
|
|
|
if (isNotEmptyCheck(jobSpecialLabelNames)) {
|
|
|
|
|
return jobSpecialLabelNames.split(", ");
|
|
|
|
|
}
|
|
|
|
|
@ -1060,7 +1060,7 @@ function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
|
|
|
|
|
/**
|
|
|
|
|
* 处理工单状态
|
|
|
|
|
*/
|
|
|
|
|
export function userApplyOrderStatusArray() {
|
|
|
|
|
export function userApplyOrderStatusArray () {
|
|
|
|
|
// let orderStatus = [
|
|
|
|
|
// { id: "10", name: "审核中", value: "10", text: "审核中" },
|
|
|
|
|
// { id: "20", name: "待面试", value: "20", text: "待面试" },
|
|
|
|
|
@ -1118,7 +1118,7 @@ export function userApplyOrderStatusArray() {
|
|
|
|
|
/**
|
|
|
|
|
* 根据工单状态ID获取名称 我的老乡
|
|
|
|
|
*/
|
|
|
|
|
export function getUserApplyOrderStatusById(id) {
|
|
|
|
|
export function getUserApplyOrderStatusById (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = userApplyOrderStatusArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -1135,7 +1135,7 @@ export function getUserApplyOrderStatusById(id) {
|
|
|
|
|
/**
|
|
|
|
|
* 根据工单状态ID获取名称 我的工单
|
|
|
|
|
*/
|
|
|
|
|
export function getUserApplyOrderStatusByIdToBill(id) {
|
|
|
|
|
export function getUserApplyOrderStatusByIdToBill (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = userApplyOrderStatusArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -1146,7 +1146,7 @@ export function getUserApplyOrderStatusByIdToBill(id) {
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
// 处理职位列表的方法
|
|
|
|
|
export function disposeJobListData(jobList) {
|
|
|
|
|
export function disposeJobListData (jobList) {
|
|
|
|
|
if (jobList !== undefined) {
|
|
|
|
|
if (Array.isArray(jobList)) {
|
|
|
|
|
jobList.forEach((item) => {
|
|
|
|
|
@ -1480,7 +1480,7 @@ export function disposeJobListData(jobList) {
|
|
|
|
|
/**
|
|
|
|
|
* 根据薪资类型和薪资值获取薪资展示
|
|
|
|
|
*/
|
|
|
|
|
export function getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
|
|
|
|
|
export function getSalaryClassifyValue (salaryClassify, salaryClassifyValue) {
|
|
|
|
|
var hourlyPay = moneyToFixed(salaryClassifyValue);
|
|
|
|
|
if (salaryClassify == 0) {
|
|
|
|
|
return `<span>${hourlyPay}</span>元/小时`;
|
|
|
|
|
@ -1505,7 +1505,7 @@ export function getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
|
|
|
|
|
}
|
|
|
|
|
// 通过身份证获取信息
|
|
|
|
|
|
|
|
|
|
export function getAgeFromBirthday(bir) {
|
|
|
|
|
export function getAgeFromBirthday (bir) {
|
|
|
|
|
if (isEmptyCheck(bir)) {
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
@ -1567,7 +1567,7 @@ export function getAgeFromBirthday(bir) {
|
|
|
|
|
/**
|
|
|
|
|
* 代理成员角色类型
|
|
|
|
|
*/
|
|
|
|
|
export function agencyRoleTypeArray() {
|
|
|
|
|
export function agencyRoleTypeArray () {
|
|
|
|
|
let workTypeArray = [
|
|
|
|
|
{ id: 1, name: "创建人", value: "1", text: "创建人", checked: false },
|
|
|
|
|
{ id: 2, name: "管理员", value: "2", text: "管理员", checked: false },
|
|
|
|
|
@ -1578,7 +1578,7 @@ export function agencyRoleTypeArray() {
|
|
|
|
|
/**
|
|
|
|
|
* 根据代理成员角色ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
export function getAgencyRoleTypeById(id) {
|
|
|
|
|
export function getAgencyRoleTypeById (id) {
|
|
|
|
|
let str = "";
|
|
|
|
|
let array = agencyRoleTypeArray();
|
|
|
|
|
array.forEach((item) => {
|
|
|
|
|
@ -1589,15 +1589,23 @@ export function getAgencyRoleTypeById(id) {
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 全拷贝
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function fullCopy (data) {
|
|
|
|
|
return JSON.parse(JSON.stringify(data))
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* table最小宽度优化
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
export function tableWidth(_context,columns,widthNum){
|
|
|
|
|
export function tableWidth (_context, columns, widthNum) {
|
|
|
|
|
let num = 0;
|
|
|
|
|
console.log(columns);
|
|
|
|
|
for (var i = 0; i < columns.length; i++) {
|
|
|
|
|
if (typeof(columns[i].width) == "undefined") {
|
|
|
|
|
if (typeof (columns[i].width) == "undefined") {
|
|
|
|
|
num += widthNum
|
|
|
|
|
console.log(widthNum);
|
|
|
|
|
} else {
|
|
|
|
|
@ -1606,13 +1614,13 @@ export function tableWidth(_context,columns,widthNum){
|
|
|
|
|
}
|
|
|
|
|
console.log(num);
|
|
|
|
|
_context.currWidth = num;
|
|
|
|
|
console.log(_context.currWidth+"==============表宽")
|
|
|
|
|
console.log(_context.currWidth + "==============表宽")
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 代理成员权限
|
|
|
|
|
*/
|
|
|
|
|
export function agencyPermissionArray() {
|
|
|
|
|
export function agencyPermissionArray () {
|
|
|
|
|
//查看职位、报名、查看报名、查看老乡、修改密码、修改手机号、新增成员、修改成员信息、删除成员
|
|
|
|
|
let workTypeArray = [
|
|
|
|
|
{
|
|
|
|
|
@ -1679,7 +1687,7 @@ export function agencyPermissionArray() {
|
|
|
|
|
/**
|
|
|
|
|
* 根据代理权限ID获取名称
|
|
|
|
|
*/
|
|
|
|
|
export function getAgencyPermissionNameById(permissionStr) {
|
|
|
|
|
export function getAgencyPermissionNameById (permissionStr) {
|
|
|
|
|
// let str = "";
|
|
|
|
|
let array = agencyPermissionArray();
|
|
|
|
|
let names = [];
|
|
|
|
|
@ -1695,7 +1703,7 @@ export function getAgencyPermissionNameById(permissionStr) {
|
|
|
|
|
/**
|
|
|
|
|
* 根据代理角色获取权限
|
|
|
|
|
*/
|
|
|
|
|
export function getAgencyPermissionsByRole(role) {
|
|
|
|
|
export function getAgencyPermissionsByRole (role) {
|
|
|
|
|
if (role == 1) {
|
|
|
|
|
return "job:list,apply:add,apply:list,apply:user,user:pwd,user:tel,user:add,user:update,user:del";
|
|
|
|
|
} else {
|
|
|
|
|
@ -1705,7 +1713,7 @@ export function getAgencyPermissionsByRole(role) {
|
|
|
|
|
/**
|
|
|
|
|
* 获取当前时间
|
|
|
|
|
*/
|
|
|
|
|
export function getDateYMD() {
|
|
|
|
|
export function getDateYMD () {
|
|
|
|
|
// 开始时间
|
|
|
|
|
let date = new Date();
|
|
|
|
|
let prevYear = date.getFullYear();
|
|
|
|
|
|