对接标准/译文获取申请

This commit is contained in:
范强强
2024-03-28 11:21:59 +08:00
parent 3d261fe269
commit 508e38976e
2 changed files with 113 additions and 25 deletions
@@ -42,15 +42,15 @@
<el-col :span="12">
<el-form-item label="标准类型" prop="standType" label-width="100px" class="add-form-item">
<el-select
v-model="StandardApplyForEO.standType"
:placeholder="'请选择标准类型'"
clearable
v-model="StandardApplyForEO.standType"
:placeholder="'请选择标准类型'"
clearable
>
<el-option
v-for="opt in standTypeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
v-for="opt in standTypeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
@@ -61,15 +61,15 @@
<el-col :span="12">
<el-form-item label="标准类别" prop="standLb" label-width="100px" class="add-form-item">
<el-select
v-model="StandardApplyForEO.standLb"
:placeholder="'请选择标准类别'"
clearable
v-model="StandardApplyForEO.standLb"
:placeholder="'请选择标准类别'"
clearable
>
<el-option
v-for="opt in standLbList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
v-for="opt in standLbList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
@@ -203,15 +203,18 @@ export default {
submit () {
this.$refs.addFormRef.validate((valid) => {
if (valid) {
this.isSubmit = true
const url = this.id ? this.url.editUrl : this.url.addUrl
this.$http.postData(url, this.StandardApplyForEO, { _this: this },
res => {
if (res.ok) {
this.$emit('updateList')
this.$message.success(res.message)
this.visible = false
}else{
this.$message.warning(res.message)
}
this.isSubmit = false
})
}
})
@@ -4,7 +4,20 @@
<div class="search-area">
<el-form :inline="true" :model="StandardApplyForEOPage">
<el-form-item class="el-form-item search-item" label="类型">
<el-select v-model="StandardApplyForEOPage.type" clearable placeholder="请选择类型" />
<el-select
v-model="StandardApplyForEOPage.type"
:placeholder="'请选择类型'"
clearable
>
<el-option
v-for="opt in typeList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item class="el-form-item search-item" label="申请单位">
<el-select v-model="StandardApplyForEOPage.applyForUnitIds" clearable placeholder="请选择申请单位" />
@@ -35,7 +48,20 @@
/>
</el-form-item>
<el-form-item class="el-form-item search-item" label="申请状态">
<el-select v-model="StandardApplyForEOPage.status" clearable placeholder="请选择申请状态" />
<el-select
v-model="StandardApplyForEOPage.status"
:placeholder="'请选择申请状态'"
clearable
>
<el-option
v-for="opt in statusList"
:key="opt.value"
:value="opt.value === undefined ? '' :opt.value"
:label="opt.label"
>
{{ opt.label }}
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="searchData">查询</el-button>
@@ -173,7 +199,26 @@ export default {
url: {
getList: '/lawss/standardApplyFor/queryByPage',
updateState: '/lawss/standardApplyFor/batchUpdateStatus'
}
},
typeList: [],
statusList: [
{
label: '通过',
value: 'pass',
},
{
label: '驳回',
value: 'refuse',
},
{
label: '待审批',
value: 'pendingApproval',
},
{
label: '草稿',
value: 'draft',
}
],
}
},
mounted () {
@@ -182,8 +227,17 @@ export default {
this.$router.replace({ query: { ...this.$route.query, tag: undefined } })
}
this.getList()
this.getDicTypeListCode()
},
methods: {
getDicTypeListCode () {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.typeList = res.data.BZJYWTYPE // 标准类别
}, e => {
})
},
searchData () {
this.page = 1
this.getList()
@@ -209,6 +263,8 @@ export default {
this.StandardApplyForEO = []
this.total = 0
}
this.selectedList = []
this.$refs.selections.clearSelection()
this.tableLoading = false
})
},
@@ -224,11 +280,26 @@ export default {
return
}
const ids = id.join(',')
this.$http.postData(this.url.updateState, { status: 'pass', ids }, { _this: this }, res => {
if(res.ok) {
this.$message.success('操作成功')
}
this.$confirm('确定通过?', '提示', {
confirmButtonText: '确定',
confirmButtonClass: 'common-button-primary',
cancelButtonText: '取消',
type: 'warning',
roundButton: false
}).then(() => {
this.$http.postData(this.url.updateState, { status: 'pass', ids: ids }, { _this: this }, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
// 取消删除,清空选择
this.$refs.selections.clearSelection()
})
},
batchOverrule (id) {
if (id.length === 0) {
@@ -240,10 +311,24 @@ export default {
return
}
const ids = id.join(',')
this.$http.postData(this.url.updateState, { status: 'refuse', ids }, { _this: this }, res => {
if(res.ok) {
this.$message.success('操作成功')
}
this.$confirm('确定驳回?', '提示', {
confirmButtonText: '确定',
confirmButtonClass: 'common-button-primary',
cancelButtonText: '取消',
type: 'warning',
roundButton: false
}).then(() => {
this.$http.postData(this.url.updateState, { status: 'refuse', ids }, { _this: this }, res => {
if (res.ok) {
this.$message.success('操作成功')
this.getList()
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
// 取消删除,清空选择
this.$refs.selections.clearSelection()
})
},