forked from integrated_whb/integrated_whb_vue
				
			BUG优化
							parent
							
								
									f06cc86d7f
								
							
						
					
					
						commit
						56b3e8f052
					
				|  | @ -233,6 +233,7 @@ import { | ||||||
|   getFreightTrailerView, |   getFreightTrailerView, | ||||||
|   setFreightTrailerAdd, |   setFreightTrailerAdd, | ||||||
|   setFreightTrailerEdit, |   setFreightTrailerEdit, | ||||||
|  |   findTrailerByPlateNumber, | ||||||
| } from "@/request/enterprise_management.js"; | } from "@/request/enterprise_management.js"; | ||||||
| import { setUploadImg } from "@/request/api.js"; | import { setUploadImg } from "@/request/api.js"; | ||||||
| import { ElMessage } from "element-plus"; | import { ElMessage } from "element-plus"; | ||||||
|  | @ -243,6 +244,7 @@ const route = useRoute(); | ||||||
| const router = useRouter(); | const router = useRouter(); | ||||||
| const FREIGHTTRAILER_ID = route.query.FREIGHTTRAILER_ID; | const FREIGHTTRAILER_ID = route.query.FREIGHTTRAILER_ID; | ||||||
| const formRef = ref(null); | const formRef = ref(null); | ||||||
|  | let plateNumber = ''; | ||||||
| const form = ref({ | const form = ref({ | ||||||
|   NUM: "", |   NUM: "", | ||||||
|   PLATE_NUMBER: "", |   PLATE_NUMBER: "", | ||||||
|  | @ -269,6 +271,19 @@ const form = ref({ | ||||||
|   OPER_CERTIFICATE_IMG: [], |   OPER_CERTIFICATE_IMG: [], | ||||||
|   TRAILER_INFO: [], |   TRAILER_INFO: [], | ||||||
| }); | }); | ||||||
|  | const isPlateNumberRepetition = async (rule, vehicleNumber, callback) => { | ||||||
|  |   if (vehicleNumber) { | ||||||
|  |     const vehicleCount = await findTrailerByPlateNumber({ vehicleNumber }); | ||||||
|  |     if (vehicleCount.pd) { | ||||||
|  |       if (vehicleCount.pd.PLATE_NUMBER === plateNumber) { | ||||||
|  |         callback(); | ||||||
|  |       } else { | ||||||
|  |         callback(new Error("车辆已存在")); | ||||||
|  |       } | ||||||
|  |     } else callback(); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | 
 | ||||||
| const isVehicleNumber = (rule, vehicleNumber, callback) => { | const isVehicleNumber = (rule, vehicleNumber, callback) => { | ||||||
|   if (vehicleNumber) { |   if (vehicleNumber) { | ||||||
|     const xreg = |     const xreg = | ||||||
|  | @ -279,6 +294,7 @@ const isVehicleNumber = (rule, vehicleNumber, callback) => { | ||||||
|       if (creg.test(vehicleNumber) === false) { |       if (creg.test(vehicleNumber) === false) { | ||||||
|         callback(new Error("格式错误")); |         callback(new Error("格式错误")); | ||||||
|       } else callback(); |       } else callback(); | ||||||
|  | 
 | ||||||
|     } else if (vehicleNumber.length === 8) { |     } else if (vehicleNumber.length === 8) { | ||||||
|       if (xreg.test(vehicleNumber) === false) { |       if (xreg.test(vehicleNumber) === false) { | ||||||
|         callback(new Error("格式错误")); |         callback(new Error("格式错误")); | ||||||
|  | @ -292,6 +308,7 @@ const rules = { | ||||||
|   PLATE_NUMBER: [ |   PLATE_NUMBER: [ | ||||||
|     { required: true, message: "请输入", trigger: "blur" }, |     { required: true, message: "请输入", trigger: "blur" }, | ||||||
|     { validator: isVehicleNumber, trigger: "blur" }, |     { validator: isVehicleNumber, trigger: "blur" }, | ||||||
|  |     { validator: isPlateNumberRepetition, trigger: "blur" }, | ||||||
|   ], |   ], | ||||||
|   VIN: [{ required: true, message: "请输入", trigger: "blur" }], |   VIN: [{ required: true, message: "请输入", trigger: "blur" }], | ||||||
|   TRAILER_TYPE: [{ required: true, message: "请输入", trigger: "blur" }], |   TRAILER_TYPE: [{ required: true, message: "请输入", trigger: "blur" }], | ||||||
|  | @ -321,6 +338,7 @@ const fnGetData = async () => { | ||||||
|     resData.operCertificateImgs |     resData.operCertificateImgs | ||||||
|   ); |   ); | ||||||
|   form.value.TRAILER_INFO = addingPrefixToFile(resData.trailerInfoImgs); |   form.value.TRAILER_INFO = addingPrefixToFile(resData.trailerInfoImgs); | ||||||
|  |   plateNumber = form.value.PLATE_NUMBER | ||||||
| }; | }; | ||||||
| fnGetData(); | fnGetData(); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -36,11 +36,15 @@ | ||||||
|           </el-col> |           </el-col> | ||||||
|           <el-col :span="5"> |           <el-col :span="5"> | ||||||
|             <el-form-item label="归属部门" prop="DEPARTMENT_NAME"> |             <el-form-item label="归属部门" prop="DEPARTMENT_NAME"> | ||||||
|               <el-input |               <layout-department | ||||||
|  |                 v-model="searchForm.DEPARTMENT_NAME" | ||||||
|  |                 @update:model-value="data.form.POST_ID = ''" | ||||||
|  |               /> | ||||||
|  |               <!--              <el-input | ||||||
|                 v-model="searchForm.DEPARTMENT_NAME" |                 v-model="searchForm.DEPARTMENT_NAME" | ||||||
|                 placeholder="请输入归属部门" |                 placeholder="请输入归属部门" | ||||||
|                 clearable |                 clearable | ||||||
|               /> |               />--> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
|           <el-col :span="3"> |           <el-col :span="3"> | ||||||
|  | @ -168,6 +172,7 @@ import { debounce } from "throttle-debounce"; | ||||||
| import { ElMessageBox, ElMessage } from "element-plus"; | import { ElMessageBox, ElMessage } from "element-plus"; | ||||||
| import LayoutImportFile from "@/components/import_file/index.vue"; | import LayoutImportFile from "@/components/import_file/index.vue"; | ||||||
| import { reactive } from "vue"; | import { reactive } from "vue"; | ||||||
|  | import LayoutDepartment from "@/components/department/index.vue"; | ||||||
| const router = useRouter(); | const router = useRouter(); | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   importDialogVisible: false, |   importDialogVisible: false, | ||||||
|  |  | ||||||
|  | @ -250,7 +250,7 @@ | ||||||
|                       <el-radio-button |                       <el-radio-button | ||||||
|                         v-for="(item, index) in data.periodList" |                         v-for="(item, index) in data.periodList" | ||||||
|                         :key="index" |                         :key="index" | ||||||
|                         :label="item.periodStr" |                         :value="item.periodStr" | ||||||
|                       > |                       > | ||||||
|                         {{ item.period.WORKSTATUS === "1" ? "上班" : "休班" }} |                         {{ item.period.WORKSTATUS === "1" ? "上班" : "休班" }} | ||||||
|                       </el-radio-button> |                       </el-radio-button> | ||||||
|  | @ -276,24 +276,24 @@ | ||||||
|         <el-col :span="8"> |         <el-col :span="8"> | ||||||
|           <el-form-item label="是否安全管理人员" prop="IS_SAFETY"> |           <el-form-item label="是否安全管理人员" prop="IS_SAFETY"> | ||||||
|             <el-radio-group v-model="data.form.IS_SAFETY"> |             <el-radio-group v-model="data.form.IS_SAFETY"> | ||||||
|               <el-radio :label="1">是</el-radio> |               <el-radio :value="1">是</el-radio> | ||||||
|               <el-radio :label="0">否</el-radio> |               <el-radio :value="0">否</el-radio> | ||||||
|             </el-radio-group> |             </el-radio-group> | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-col> |         </el-col> | ||||||
|         <el-col :span="8"> |         <el-col :span="8"> | ||||||
|           <el-form-item label="是否主要负责人" prop="ISHEAD"> |           <el-form-item label="是否主要负责人" prop="ISHEAD"> | ||||||
|             <el-radio-group v-model="data.form.ISHEAD"> |             <el-radio-group v-model="data.form.ISHEAD"> | ||||||
|               <el-radio label="1">是</el-radio> |               <el-radio value="1">是</el-radio> | ||||||
|               <el-radio label="0">否</el-radio> |               <el-radio value="0">否</el-radio> | ||||||
|             </el-radio-group> |             </el-radio-group> | ||||||
|           </el-form-item> |           </el-form-item> | ||||||
|         </el-col> |         </el-col> | ||||||
|         <el-col :span="8"> |         <el-col :span="8"> | ||||||
|           <el-form-item label="是否部门领导" prop="ISLEADER"> |           <el-form-item label="是否部门领导" prop="ISLEADER"> | ||||||
|             <el-radio-group v-model="data.form.ISLEADER"> |             <el-radio-group v-model="data.form.ISLEADER"> | ||||||
|               <el-radio label="1">是</el-radio> |               <el-radio value="1">是</el-radio> | ||||||
|               <el-radio label="0">否</el-radio> |               <el-radio value="0">否</el-radio> | ||||||
|             </el-radio-group> |             </el-radio-group> | ||||||
|             <!--                <el-tooltip |             <!--                <el-tooltip | ||||||
|                   content="温馨提示:部门领导可以审核离岗申请,查看同部门清单数据" |                   content="温馨提示:部门领导可以审核离岗申请,查看同部门清单数据" | ||||||
|  | @ -893,12 +893,12 @@ const data = reactive({ | ||||||
|   oldDepartId: "", |   oldDepartId: "", | ||||||
|   fileForm: { |   fileForm: { | ||||||
|     // 身份证照片 |     // 身份证照片 | ||||||
|     ID_CARD_FRONT: "", |     ID_CARD_FRONT: [], | ||||||
|     ID_CARD_BACK: "", |     ID_CARD_BACK: [], | ||||||
|     // 驾驶证照片 |     // 驾驶证照片 | ||||||
|     DRIVER_LICENSE: "", |     DRIVER_LICENSE: [], | ||||||
|     // 道路运输从业人员从业资格证照片 |     // 道路运输从业人员从业资格证照片 | ||||||
|     QUALIFICATION_CERTIFICATE: "", |     QUALIFICATION_CERTIFICATE: [], | ||||||
|   }, |   }, | ||||||
|   form: { |   form: { | ||||||
|     USERNAME: "", |     USERNAME: "", | ||||||
|  | @ -998,6 +998,7 @@ const fnSelectPersonSubmit = (selectionData) => { | ||||||
|   const names = selectionData.map((item) => item.NAME).join(","); |   const names = selectionData.map((item) => item.NAME).join(","); | ||||||
|   data.form.PERSON_ID = userIds; |   data.form.PERSON_ID = userIds; | ||||||
|   data.form.NAME = names; |   data.form.NAME = names; | ||||||
|  |   data.form.faceFile = ""; | ||||||
|   fnGetData(userIds); |   fnGetData(userIds); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -1282,7 +1283,11 @@ const fnSubmit = debounce( | ||||||
|       //   return; |       //   return; | ||||||
|       // } |       // } | ||||||
|       formData.append("choice", "choice"); |       formData.append("choice", "choice"); | ||||||
|       await setPractitionerAdd(formData); |       const flag = await setPractitionerAdd(formData); | ||||||
|  |       if (flag.msg === "1") { | ||||||
|  |         ElMessage.warning("人脸图像不符合要求,请重新上传"); | ||||||
|  |         return; | ||||||
|  |       } | ||||||
|     } else { |     } else { | ||||||
|       if ( |       if ( | ||||||
|         data.oldDepartId !== data.form.DEPARTMENT_ID || |         data.oldDepartId !== data.form.DEPARTMENT_ID || | ||||||
|  |  | ||||||
|  | @ -64,7 +64,6 @@ import { debounce } from "throttle-debounce"; | ||||||
| import useListData from "@/assets/js/useListData.js"; | import useListData from "@/assets/js/useListData.js"; | ||||||
| import { reactive, watch } from "vue"; | import { reactive, watch } from "vue"; | ||||||
| import { serialNumber } from "@/assets/js/utils.js"; | import { serialNumber } from "@/assets/js/utils.js"; | ||||||
| import { differenceWith } from "lodash-es"; |  | ||||||
| import { getUserNoCorpinfoListAll } from "@/request/user_practitioner.js"; | import { getUserNoCorpinfoListAll } from "@/request/user_practitioner.js"; | ||||||
| import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js"; | import { layoutFnGetPersonnelTypeTraffic } from "@/assets/js/data_dictionary.js"; | ||||||
| 
 | 
 | ||||||
|  | @ -74,11 +73,6 @@ const props = defineProps({ | ||||||
|     required: true, |     required: true, | ||||||
|     default: false, |     default: false, | ||||||
|   }, |   }, | ||||||
|   listData: { |  | ||||||
|     type: Array, |  | ||||||
|     required: true, |  | ||||||
|     default: () => [], |  | ||||||
|   }, |  | ||||||
| }); | }); | ||||||
| const emits = defineEmits(["update:visible", "submit", "submitall"]); | const emits = defineEmits(["update:visible", "submit", "submitall"]); | ||||||
| const visible = useVModel(props, "visible", emits); | const visible = useVModel(props, "visible", emits); | ||||||
|  | @ -113,13 +107,8 @@ const fnSubmit = debounce( | ||||||
|   1000, |   1000, | ||||||
|   () => { |   () => { | ||||||
|     const selectionData = tableRef.value.getSelectionRows(); |     const selectionData = tableRef.value.getSelectionRows(); | ||||||
|     const listData = differenceWith( |  | ||||||
|       selectionData, |  | ||||||
|       props.listData, |  | ||||||
|       (a, b) => a.RISKCHECKITEM_ID === b.RISKCHECKITEM_ID |  | ||||||
|     ); |  | ||||||
|     fnClose(); |     fnClose(); | ||||||
|     emits("submit", listData); |     emits("submit", selectionData); | ||||||
|   }, |   }, | ||||||
|   { atBegin: true } |   { atBegin: true } | ||||||
| ); | ); | ||||||
|  |  | ||||||
|  | @ -12,17 +12,17 @@ | ||||||
|       <el-descriptions :column="3" border> |       <el-descriptions :column="3" border> | ||||||
|         <el-descriptions-item label="申请类别"> |         <el-descriptions-item label="申请类别"> | ||||||
|           <template v-if="data.statusInfo.APPLY_TYPE === '1'" |           <template v-if="data.statusInfo.APPLY_TYPE === '1'" | ||||||
|             >入职申请</template |             >入职申请 | ||||||
|           > |           </template> | ||||||
|           <template v-else-if="data.statusInfo.APPLY_TYPE === '2'" |           <template v-else-if="data.statusInfo.APPLY_TYPE === '2'" | ||||||
|             >企业入职</template |             >企业入职 | ||||||
|           > |           </template> | ||||||
|           <template v-else-if="data.statusInfo.APPLY_TYPE === '3'" |           <template v-else-if="data.statusInfo.APPLY_TYPE === '3'" | ||||||
|             >离职申请</template |             >离职申请 | ||||||
|           > |           </template> | ||||||
|           <template v-else-if="data.statusInfo.APPLY_TYPE === '4'" |           <template v-else-if="data.statusInfo.APPLY_TYPE === '4'" | ||||||
|             >企业解聘</template |             >企业解聘 | ||||||
|           > |           </template> | ||||||
|         </el-descriptions-item> |         </el-descriptions-item> | ||||||
|         <el-descriptions-item label="备注"> |         <el-descriptions-item label="备注"> | ||||||
|           {{ data.statusInfo.REVIEW_COMMENTS }} |           {{ data.statusInfo.REVIEW_COMMENTS }} | ||||||
|  | @ -96,6 +96,7 @@ | ||||||
|           width="100" |           width="100" | ||||||
|           height="100" |           height="100" | ||||||
|           class="ml-10" |           class="ml-10" | ||||||
|  |           alt="" | ||||||
|         /> |         /> | ||||||
|       </el-descriptions-item> |       </el-descriptions-item> | ||||||
|       <el-descriptions-item label="身份证(背面)"> |       <el-descriptions-item label="身份证(背面)"> | ||||||
|  | @ -179,6 +180,20 @@ | ||||||
|         }} |         }} | ||||||
|       </el-descriptions-item> |       </el-descriptions-item> | ||||||
|     </el-descriptions> |     </el-descriptions> | ||||||
|  |     <el-divider content-position="left">人员认证</el-divider> | ||||||
|  |     <el-descriptions :column="1" border> | ||||||
|  |       <el-descriptions-item label="人脸照片"> | ||||||
|  |         <img | ||||||
|  |           v-if="data.info.faceFile !== null" | ||||||
|  |           v-viewer | ||||||
|  |           :src="data.info.faceFile" | ||||||
|  |           width="100" | ||||||
|  |           height="100" | ||||||
|  |           class="ml-10" | ||||||
|  |         /> | ||||||
|  |       </el-descriptions-item> | ||||||
|  |     </el-descriptions> | ||||||
|  | 
 | ||||||
|     <!--    <div v-for="(item, index) in data.certificateList" :key="index"> |     <!--    <div v-for="(item, index) in data.certificateList" :key="index"> | ||||||
|       <el-divider content-position="left"> |       <el-divider content-position="left"> | ||||||
|         {{ |         {{ | ||||||
|  | @ -279,7 +294,7 @@ | ||||||
|       </el-descriptions> |       </el-descriptions> | ||||||
|     </div>--> |     </div>--> | ||||||
|     <div class="tc mt-10"> |     <div class="tc mt-10"> | ||||||
|       <el-button type="primary" @click="router.back"> 返回 </el-button> |       <el-button type="primary" @click="router.back"> 返回</el-button> | ||||||
|     </div> |     </div> | ||||||
|   </layout-card> |   </layout-card> | ||||||
| </template> | </template> | ||||||
|  | @ -288,12 +303,15 @@ | ||||||
| import { getPractitionerInfo } from "@/request/user_practitioner.js"; | import { getPractitionerInfo } from "@/request/user_practitioner.js"; | ||||||
| import { reactive } from "vue"; | import { reactive } from "vue"; | ||||||
| import { useRoute, useRouter } from "vue-router"; | import { useRoute, useRouter } from "vue-router"; | ||||||
|  | 
 | ||||||
| const FILE_URL = import.meta.env.VITE_FILE_URL; | const FILE_URL = import.meta.env.VITE_FILE_URL; | ||||||
| const route = useRoute(); | const route = useRoute(); | ||||||
| const router = useRouter(); | const router = useRouter(); | ||||||
| const { USER_ID } = route.query; | const { USER_ID } = route.query; | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   info: {}, |   info: { | ||||||
|  |     faceFile: {}, | ||||||
|  |   }, | ||||||
|   certificateList: [], |   certificateList: [], | ||||||
|   statusInfo: {}, |   statusInfo: {}, | ||||||
|   dispose: "", |   dispose: "", | ||||||
|  | @ -301,11 +319,17 @@ const data = reactive({ | ||||||
|   drivingLicence: [], |   drivingLicence: [], | ||||||
|   qualificationCertificate: [], |   qualificationCertificate: [], | ||||||
| }); | }); | ||||||
|  | 
 | ||||||
| const fnGetData = async () => { | const fnGetData = async () => { | ||||||
|   if (!USER_ID) return; |   if (!USER_ID) return; | ||||||
|   const resData = await getPractitionerInfo({ USER_ID }); |   const resData = await getPractitionerInfo({ USER_ID }); | ||||||
|   data.info = resData.pd; |   data.info = resData.pd; | ||||||
|   data.statusInfo = resData.statusInfo; |   data.statusInfo = resData.statusInfo; | ||||||
|  |   if (data.info.USERAVATARURL_CONVERT) { | ||||||
|  |     data.info.faceFile = [ | ||||||
|  |       { url: data.info.USERAVATARPREFIX + data.info.USERAVATARURL_CONVERT }, | ||||||
|  |     ]; | ||||||
|  |   } | ||||||
|   resData.certificateList.forEach((item) => { |   resData.certificateList.forEach((item) => { | ||||||
|     item.ID_PHOTO_FRONT = FILE_URL + item.ID_PHOTO_FRONT; |     item.ID_PHOTO_FRONT = FILE_URL + item.ID_PHOTO_FRONT; | ||||||
|     if (item.ID_PHOTO_BACK) { |     if (item.ID_PHOTO_BACK) { | ||||||
|  |  | ||||||
|  | @ -955,10 +955,11 @@ const fnGetData = async () => { | ||||||
|   form.PASSWORD = "Aa@123456"; |   form.PASSWORD = "Aa@123456"; | ||||||
|   form.periodStr = resData.periodStr; |   form.periodStr = resData.periodStr; | ||||||
|   form.ISSTUDENT = resData.pd.ISSTUDENT.toString(); |   form.ISSTUDENT = resData.pd.ISSTUDENT.toString(); | ||||||
|   if (form.USERAVATARURL_CONVERT) |   if (form.USERAVATARURL_CONVERT) { | ||||||
|     form.faceFile = [ |     form.faceFile = [ | ||||||
|       { url: form.USERAVATARPREFIX + form.USERAVATARURL_CONVERT }, |       { url: form.USERAVATARPREFIX + form.USERAVATARURL_CONVERT }, | ||||||
|     ]; |     ]; | ||||||
|  |   } | ||||||
|   data.scheduleInfo = resData.period; |   data.scheduleInfo = resData.period; | ||||||
|   data.oldPostId = form.POST_ID; |   data.oldPostId = form.POST_ID; | ||||||
|   data.oldDepartId = form.DEPARTMENT_ID; |   data.oldDepartId = form.DEPARTMENT_ID; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue