在转办旁回显所选人员
认证清单--认证目录-添加,字符长度限制提示
This commit is contained in:
@@ -67,7 +67,8 @@
|
||||
departId: '',
|
||||
defaultExpandedKeys: [],
|
||||
submitLoading: false,
|
||||
visibleTree: false
|
||||
visibleTree: false,
|
||||
userName: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -110,7 +111,7 @@
|
||||
}
|
||||
if (this.userIds && this.userIds.length > 0) {
|
||||
this.submitLoading = true
|
||||
this.$emit('SelectedByForm', this.userIds.join(','))
|
||||
this.$emit('SelectedByForm', this.userIds.join(','),this.userName.join(','))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
@@ -142,7 +143,7 @@
|
||||
postAction('sys/user/queryDepartUserTreeList', {
|
||||
departId: this.departId,
|
||||
json: gData,
|
||||
flag:'1'
|
||||
flag: '1'
|
||||
}).then((res) => {
|
||||
this.confirmLoading = false
|
||||
if (res.success) {
|
||||
@@ -155,8 +156,14 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
checkChange(e) {
|
||||
checkChange(e, name) {
|
||||
this.userName = []
|
||||
this.userIds = e
|
||||
if (name.checkedNodes && name.checkedNodes.length > 0) {
|
||||
name.checkedNodes.forEach(res => {
|
||||
this.userName.push(res.data.props.dataRef.title)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model :model="formInline" class="formAdd" ref="ruleForm">
|
||||
<a-form-model :model="formInline" :rules="rules" class="formAdd" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('directoryName')">{{$t('directoryName')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="directoryName">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.directoryName"
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('batch')">{{$t('batch')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="lot">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.lot"
|
||||
@@ -77,7 +77,7 @@
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('testReportLocation')">{{$t('testReportLocation')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="detectionReportLocation">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.detectionReportLocation"
|
||||
@@ -93,7 +93,7 @@
|
||||
<span class="title-text-text"
|
||||
:title="$t('explain')">{{$t('explain')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel">
|
||||
<a-form-model-item class="itemModel" prop="explainInfo">
|
||||
<a-textarea
|
||||
style="width: 100%"
|
||||
:placeholder="$t('PleaseEnter')+$t('explain')"
|
||||
@@ -127,6 +127,36 @@
|
||||
return {
|
||||
visible: false,
|
||||
formInline: {},
|
||||
rules:{
|
||||
directoryName: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('directoryName') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
lot: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('batch') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
detectionReportLocation:[
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('testReportLocation') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
explainInfo:[
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('explain') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
},
|
||||
confirmLoading: false,
|
||||
disabled: false,
|
||||
url: {
|
||||
@@ -142,47 +172,55 @@
|
||||
add() {
|
||||
this.visible = true
|
||||
this.formInline = {}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
edit(val) {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.formInline = val
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
},
|
||||
handleSubmit() {
|
||||
if (!this.formInline.directoryName && !this.formInline.lot && !this.formInline.directoryFile &&
|
||||
!this.formInline.experimentFile && !this.formInline.detectionReportLocation && !this.formInline.explainInfo) {
|
||||
this.$message.warning(this.$t('dataCannotEmpty'))
|
||||
} else {
|
||||
let Action
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
let query = {
|
||||
projectLibraryId: this.$route.query.id,
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('certificationDirectoryList')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid){
|
||||
if (!this.formInline.directoryName && !this.formInline.lot && !this.formInline.directoryFile &&
|
||||
!this.formInline.experimentFile && !this.formInline.detectionReportLocation && !this.formInline.explainInfo) {
|
||||
this.$message.warning(this.$t('dataCannotEmpty'))
|
||||
} else {
|
||||
let Action
|
||||
let url = ''
|
||||
if (this.formInline.id) {
|
||||
url = this.url.edit
|
||||
Action = putAction
|
||||
} else {
|
||||
url = this.url.add
|
||||
Action = postAction
|
||||
}
|
||||
let query = {
|
||||
projectLibraryId: this.$route.query.id,
|
||||
...this.formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
Action(url, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('certificationDirectoryList')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.$refs.uploadFile.perentHandleFunc()
|
||||
|
||||
+9
-1
@@ -49,6 +49,9 @@
|
||||
<a-radio value="Transfer" v-if="query.TaskKey == 'zrrtjjfw' || query.TaskKey == 'zrrqr'">
|
||||
{{$t('turnToDo')}}
|
||||
</a-radio>
|
||||
<span>
|
||||
{{this.formInline.dezrrSubmitUserName}}
|
||||
</span>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
@@ -184,16 +187,21 @@
|
||||
} else {
|
||||
this.$refs.SelectedByRef.visible = false
|
||||
this.formInline.secondChargePersonUserId = ''
|
||||
this.formInline.dezrrSubmitUserName = ''
|
||||
this.formInline.dezrrSubmitUserId = ''
|
||||
}
|
||||
},
|
||||
//转办接口
|
||||
SelectedByForm(userIds) {
|
||||
SelectedByForm(userIds, name) {
|
||||
if (this.query.TaskKey == 'zrrtjjfw') {
|
||||
this.formInline.dezrrSubmitUserId = userIds
|
||||
} else {
|
||||
this.formInline.secondChargePersonUserId = userIds
|
||||
}
|
||||
this.formInline.dezrrSubmitUserName = name
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.SelectedByRef.visible = false
|
||||
this.$refs.SelectedByRef.submitLoading = false
|
||||
},
|
||||
submitNoRule(callBack) {
|
||||
callBack(this.formInline)
|
||||
|
||||
Reference in New Issue
Block a user