特种作业证书状态更新

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 getCertificateInformationList = (params) => post("/app/specialUser/list", 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 setCertificateInformationEditPost = (params) => post("/app/specialUser/edit", params) //证书信息修改
export const getDeptTree = (params) => post("/api/department/listzTree", params) //用户信息

View File

@ -7,7 +7,7 @@
:fileList="form.fileList"
@afterRead="fnAfterRead"
@delete="fnDeletePic"
:maxCount="1"
:maxCount="2"
previewFullImage
></u-upload>
</u-form-item>
@ -122,95 +122,57 @@ export default {
REVIEW_TIME: ''
},
rules: {
// fileList: {
// type: 'array',
// required: true,
// message: '',
// trigger: ['change']
// },
// NAME: {
// required: true,
// message: '',
// trigger: ['blur']
// },
// SEX_NAME: {
// required: true,
// message: '',
// trigger: ['change']
// },
// PHONE: [
// {
// required: true,
// message: '',
// trigger: ['blur']
// },
// {
// validator: (rule, value, callback) => {
// return uni.$u.test.mobile(value);
// },
// message: '',
// trigger: ['blur'],
// },
// ],
// CARD_ID: [
// {
// required: true,
// message: '',
// trigger: ['blur']
// },
// {
// validator: (rule, value, callback) => {
// return uni.$u.test.idCard(value);
// },
// message: '',
// trigger: ['blur'],
// },
// ],
// CER_TYPE_NAME: {
// required: true,
// message: '',
// trigger: ['change']
// },
// CERTIFICATE: {
// 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']
// },
fileList: {
type: 'array',
required: true,
message: '请上传证书图片',
trigger: ['change']
},
CER_TYPE_NAME: {
required: true,
message: '请选择证书类型',
trigger: ['change']
},
CERTIFICATE: {
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: {
required: true,
message: '请选择复审时间',
@ -352,9 +314,9 @@ export default {
}else{
uni.$u.toast('图片格式不正确请上传jpg格式图片或者png格式图片')
this.form.fileList=[]
}
},
fnDeletePic(event) {
this.form.fileList.splice(event.index, 1)
@ -363,9 +325,22 @@ export default {
console.info(this.$refs)
this.$refs.form.validate().then(async () => {
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({
filePath: this.form.fileList[0].url,
name: 'file',
// filePath: this.form.fileList[0].url,
files: files,
formData: {
...this.form
}