特种作业证书状态更新
parent
58ce329781
commit
1564af86d4
|
@ -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) //用户信息
|
||||||
|
|
|
@ -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: '请选择复审时间',
|
||||||
|
@ -352,9 +314,9 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
uni.$u.toast('图片格式不正确,请上传jpg格式图片或者png格式图片')
|
uni.$u.toast('图片格式不正确,请上传jpg格式图片或者png格式图片')
|
||||||
this.form.fileList=[]
|
this.form.fileList=[]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
fnDeletePic(event) {
|
fnDeletePic(event) {
|
||||||
this.form.fileList.splice(event.index, 1)
|
this.form.fileList.splice(event.index, 1)
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue