文档工具-认证清单维护-添加-法规编号

This commit is contained in:
刘彦泽
2023-03-15 11:17:28 +08:00
parent c36ee521e7
commit 519c08e68f
2 changed files with 122 additions and 98 deletions
@@ -1,4 +1,5 @@
<template> <template>
<div>
<a-drawer <a-drawer
:title="$t('add')" :title="$t('add')"
:maskClosable="false" :maskClosable="false"
@@ -18,7 +19,10 @@
<span class="title-text-text" :title="$t ('regulationNo')">{{$t('regulationNo')}}</span> <span class="title-text-text" :title="$t ('regulationNo')">{{$t('regulationNo')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="serialNumber"> <a-form-model-item class="itemModel" prop="serialNumber">
<codeNumber @regulation="regulation"/> <a-input @click.native="serialNumberClick"
class="box-input"
:placeholder="$t('PleaseSelect')+$t('regulationNo')"
v-model="formInline.serialNumber"></a-input>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -31,6 +35,7 @@
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" <j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
@input="handleInput('dutyTerritory')"
v-model="formInline.dutyTerritory" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')" :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'" :type="'select'"
@@ -148,6 +153,9 @@
<a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button type="primary" @click="handleSubmit" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
<codeNumber ref="codeNumber" @regulation="regulation" />
</div>
</template> </template>
<script> <script>
@@ -188,7 +196,7 @@ export default {
{ {
required: true, required: true,
message: 'WVTA ID' + this.$t('regulationNo'), message: 'WVTA ID' + this.$t('regulationNo'),
trigger: 'change' trigger: 'blur'
}, },
{ {
max: 300, max: 300,
@@ -209,14 +217,21 @@ export default {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
this.formInline.dataList = [{}] this.formInline.dataList = [{}]
this.formInline = { ...this.formInline }
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
this.$refs.codeNumber.number()
}) })
}, },
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleSubmit() { handleSubmit() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
@@ -274,9 +289,16 @@ export default {
} }
}) })
}, },
serialNumberClick(){
this.$refs.codeNumber.add()
},
regulation(item,data) { regulation(item,data) {
this.formInline.serialNumber = item this.formInline.serialNumber = item
this.formInline.bussDocumentLibraryId = data this.formInline.bussDocumentLibraryId = data
this.$nextTick(()=>{
this.formInline = {... this.formInline}
this.$refs.ruleForm.validateField(['serialNumber'])
})
} }
} }
} }
@@ -1,9 +1,9 @@
<template> <template>
<div> <div>
<a-input allowClear <!-- <a-input allowClear-->
@click="add" <!-- @click="add"-->
:placeholder="$t('PleaseSelect')+$t('regulationNo')" <!-- :placeholder="$t('PleaseSelect')+$t('regulationNo')"-->
v-model="regulation"></a-input> <!-- v-model="regulation"></a-input>-->
<a-drawer <a-drawer
:title="$t('regulationNo')" :title="$t('regulationNo')"
:width="1000" :width="1000"
@@ -204,6 +204,9 @@ export default {
this.replacePage() this.replacePage()
this.queryConditionInventory() this.queryConditionInventory()
}, },
// number() {
// this.regulation = ''
// },
searchQuery() { searchQuery() {
this.pageNo = 1 this.pageNo = 1
this.replacePage() this.replacePage()
@@ -284,12 +287,11 @@ export default {
this.confirmLoading = true this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (this.selectedRowKeys.length < 2){ if (this.selectedRowKeys.length < 2){
let fgid = '' let fgid = this.selectedRowList[0].id
this.fgid = this.selectedRowList[0].id let regulationIndex = this.selectedRowList[0].serial_number
this.regulation = this.selectedRowList[0].serial_number
this.confirmLoading = false this.confirmLoading = false
this.visible = false this.visible = false
this.$emit('regulation',this.regulation,this.fgid) this.$emit('regulation',regulationIndex,fgid)
} else { } else {
this.$message.warning(this.$t('OnlyOneSelected')) this.$message.warning(this.$t('OnlyOneSelected'))
this.confirmLoading = false this.confirmLoading = false