特种作业证书状态更新

liujun-2024-06-06
liujun 2024-04-08 14:48:21 +08:00
parent 58ce329781
commit 1564af86d4
2 changed files with 70 additions and 95 deletions

View File

@ -27,7 +27,7 @@ export const getUserInfo = (params) => post("/app/user/getDetailByUserIdAndCorpI
export const setUserInfo = (params) => post("/app/user/edit", params) //修改用户信息 export const setUserInfo = (params) => post("/app/user/edit", params) //修改用户信息
export const getCertificateInformationList = (params) => post("/app/specialUser/list", params) //证书信息列表 export const getCertificateInformationList = (params) => post("/app/specialUser/list", params) //证书信息列表
export const getCertificateInformationView = (params) => post("/app/specialUser/goEdit", params) //证书信息查看 export const getCertificateInformationView = (params) => post("/app/specialUser/goEdit", params) //证书信息查看
export const setCertificateInformationAdd = (params) => upload("/app/specialUser/add", params) //证书信息添加 export const setCertificateInformationAdd = (params) => uploads("/app/specialUser/add", params) //证书信息添加
export const setCertificateInformationEdit = (params) => upload("/app/specialUser/edit", params) //证书信息修改 export const setCertificateInformationEdit = (params) => upload("/app/specialUser/edit", params) //证书信息修改
export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改 export const setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改
export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息 export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息

View File

@ -7,7 +7,7 @@
:fileList="form.fileList" :fileList="form.fileList"
@afterRead="fnAfterRead" @afterRead="fnAfterRead"
@delete="fnDeletePic" @delete="fnDeletePic"
:maxCount="1" :maxCount="2"
previewFullImage previewFullImage
></u-upload> ></u-upload>
</u-form-item> </u-form-item>
@ -122,95 +122,57 @@ export default {
REVIEW_TIME: '' REVIEW_TIME: ''
}, },
rules: { rules: {
// fileList: { fileList: {
// type: 'array', type: 'array',
// required: true, required: true,
// message: '', message: '请上传证书图片',
// trigger: ['change'] trigger: ['change']
// }, },
// NAME: { CER_TYPE_NAME: {
// required: true, required: true,
// message: '', message: '请选择证书类型',
// trigger: ['blur'] trigger: ['change']
// }, },
// SEX_NAME: { CERTIFICATE: {
// required: true, required: true,
// message: '', message: '请填写证书名称',
// trigger: ['change'] trigger: ['change']
// }, },
// PHONE: [ SPECIAL_NUMBER: {
// { required: true,
// required: true, message: '请填写证书编号',
// message: '', trigger: ['blur']
// trigger: ['blur'] },
// }, JOBS_TYPE: {
// { required: true,
// validator: (rule, value, callback) => { message: '请填写工种',
// return uni.$u.test.mobile(value); trigger: ['change']
// }, },
// message: '', specialName: {
// trigger: ['blur'], required: true,
// }, message: '请选择作业类别',
// ], trigger: ['change']
// CARD_ID: [ },
// { operationName: {
// required: true, required: true,
// message: '', message: '请选择操作项目',
// trigger: ['blur'] trigger: ['change']
// }, },
// { ISSUING_AUTHORITY: {
// validator: (rule, value, callback) => { required: true,
// return uni.$u.test.idCard(value); message: '请填写发证机关',
// }, trigger: ['blur']
// message: '', },
// trigger: ['blur'], VALIDITY_TIME_START: {
// }, required: true,
// ], message: '请选择有效期开始时间',
// CER_TYPE_NAME: { trigger: ['change']
// required: true, },
// message: '', VALIDITY_TIME_END: {
// trigger: ['change'] required: true,
// }, message: '请选择有效期结束时间',
// CERTIFICATE: { trigger: ['change']
// required: true, },
// message: '',
// trigger: ['change']
// },
// SPECIAL_NUMBER: {
// required: true,
// message: '',
// trigger: ['blur']
// },
// JOBS_TYPE: {
// required: true,
// message: '',
// trigger: ['change']
// },
// specialName: {
// required: true,
// message: '',
// trigger: ['change']
// },
// operationName: {
// required: true,
// message: '',
// trigger: ['change']
// },
// ISSUING_AUTHORITY: {
// required: true,
// message: '',
// trigger: ['blur']
// },
// VALIDITY_TIME_START: {
// required: true,
// message: '',
// trigger: ['change']
// },
// VALIDITY_TIME_END: {
// required: true,
// message: '',
// trigger: ['change']
// },
REVIEW_TIME: { REVIEW_TIME: {
required: true, required: true,
message: '请选择复审时间', message: '请选择复审时间',
@ -363,9 +325,22 @@ export default {
console.info(this.$refs) console.info(this.$refs)
this.$refs.form.validate().then(async () => { this.$refs.form.validate().then(async () => {
if(!this.SPECIAL_USER_ID){ if(!this.SPECIAL_USER_ID){
let files = []
files.push({
name: 'FILEPATH',
file: this.form.fileList[0],
uri: this.form.fileList[0].url,
})
files.push({
name: 'FILEPATH_BACK',
file: this.form.fileList[1],
uri: this.form.fileList[1].url,
})
await setCertificateInformationAdd({ await setCertificateInformationAdd({
filePath: this.form.fileList[0].url, // filePath: this.form.fileList[0].url,
name: 'file', files: files,
formData: { formData: {
...this.form ...this.form
} }