Commit e63dd064 authored by “yiyousong”'s avatar “yiyousong”

pref:修改事项中介

parent e05f69d4
...@@ -300,10 +300,10 @@ ...@@ -300,10 +300,10 @@
</a-row> </a-row>
</a-form-model> </a-form-model>
<div class="btn_box"> <div class="btn_box">
<a-button type="primary" class="mr" @click="handleOk" :loading="loading"> <a-button class="mr" @click="handleReset"> 重置 </a-button>
<a-button type="primary" @click="handleOk" :loading="loading">
确定 确定
</a-button> </a-button>
<a-button @click="handleReset"> 重置 </a-button>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
</a-table> </a-table>
</div> </div>
<!-- 新增受理条件 --> <!-- 新增受理条件 -->
<a-modal v-model="visible" :title="title"> <a-modal
v-model="visible"
:title="title"
@cancel="handleClose"
:maskClosable="false"
>
<template slot="footer"> <template slot="footer">
<a-button @click="handleClose">关闭</a-button> <a-button @click="handleClose">关闭</a-button>
<a-button type="primary" @click="handleOk">确定</a-button> <a-button type="primary" @click="handleOk">确定</a-button>
......
...@@ -7,8 +7,19 @@ ...@@ -7,8 +7,19 @@
:labelCol="{ span: 8 }" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }" :wrapperCol="{ span: 16 }"
> >
<a-form-model-item label="中介服务">
<a-radio-group v-model="isHave" @change="chagneHave">
<a-radio :value="true"> 具有 </a-radio>
<a-radio :value="false"> 不具有 </a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="中介服务事项名称" prop="title"> <a-form-model-item label="中介服务事项名称" prop="title">
<a-input placeholder="请输入事项名称" v-model="form.title" /> <a-input
:disabled="!isHave"
placeholder="请输入事项名称"
v-model="form.title"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item <a-form-model-item
label="中介服务实施机构及资质资格要求" label="中介服务实施机构及资质资格要求"
...@@ -17,6 +28,7 @@ ...@@ -17,6 +28,7 @@
<a-textarea <a-textarea
v-model="form.intermediaryRequest" v-model="form.intermediaryRequest"
placeholder="请输入要求" placeholder="请输入要求"
:disabled="!isHave"
:rows="4" :rows="4"
allow-clear allow-clear
/> />
...@@ -24,6 +36,7 @@ ...@@ -24,6 +36,7 @@
<a-form-model-item label="服务时限" prop="intermediaryRequestTime"> <a-form-model-item label="服务时限" prop="intermediaryRequestTime">
<a-input <a-input
placeholder="请输入服务时限" placeholder="请输入服务时限"
:disabled="!isHave"
v-model="form.intermediaryRequestTime" v-model="form.intermediaryRequestTime"
/> />
</a-form-model-item> </a-form-model-item>
...@@ -32,23 +45,37 @@ ...@@ -32,23 +45,37 @@
v-model="form.remark" v-model="form.remark"
placeholder="请输入备注" placeholder="请输入备注"
:rows="4" :rows="4"
:disabled="!isHave"
allow-clear allow-clear
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item :wrapper-col="{ span: 14, offset: 12 }"> <a-form-model-item :wrapper-col="{ span: 14, offset: 12 }">
<a-button type="primary" @click="onSubmit"> 确定 </a-button> <a-button
<a-button style="margin-left: 10px" @click="resetForm"> 重置 </a-button> :disabled="!isHave"
style="margin-right: 10px"
@click="resetForm"
>
重置
</a-button>
<a-button :disabled="!isHave" type="primary" @click="onSubmit">
确定
</a-button>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
</div> </div>
</template> </template>
<script> <script>
import { addMatterintermediary } from "@/services/matter"; import {
addMatterintermediary,
getMatterintermediaryList,
delMatterintermediary,
} from "@/services/matter";
import local from "@/utils/local"; import local from "@/utils/local";
export default { export default {
data() { data() {
return { return {
isHave: false,
matterList: [], matterList: [],
siteId: "", siteId: "",
form: { form: {
...@@ -78,21 +105,28 @@ export default { ...@@ -78,21 +105,28 @@ export default {
}, },
}; };
}, },
created() {}, created() {
this.getMatterintermediaryList();
},
methods: { methods: {
// 获取站点事项列表 // 获取办理流程列表
// async getSiteMatterList() { async getMatterintermediaryList() {
// this.siteId = this.$route.query.siteId; if (!local.getLocal("matter")) return;
// let res = await getSiteMatterList({ siteId: this.siteId }); let res = await getMatterintermediaryList({
// this.matterList = res.data.data.data; page: 1,
// }, size: -1,
matterId: local.getLocal("matter").id,
// // 事项下拉选择 matterName: local.getLocal("matter").matterName,
// handleSelect(val, node) { });
// let { text } = node.componentOptions.children[0]; if (res.data.code === 1 && res.data.data.data.length) {
// this.form.matterName = text; this.form = res.data.data.data[0];
// }, this.isHave = true;
} else {
Object.assign(this.form, this.$options.data().form);
this.form.id && this.$delete(this.form, "id");
this.isHave = false;
}
},
onSubmit() { onSubmit() {
if (!local.getLocal("matter")) { if (!local.getLocal("matter")) {
this.$message.warning("请先新增基本信息"); this.$message.warning("请先新增基本信息");
...@@ -108,8 +142,7 @@ export default { ...@@ -108,8 +142,7 @@ export default {
let { code, msg } = res.data; let { code, msg } = res.data;
if (code === 1) { if (code === 1) {
this.$message.success(msg); this.$message.success(msg);
} else { this.getMatterintermediaryList();
this.$message.error(msg);
} }
} }
}); });
...@@ -117,6 +150,18 @@ export default { ...@@ -117,6 +150,18 @@ export default {
resetForm() { resetForm() {
this.$refs.formData.resetFields(); this.$refs.formData.resetFields();
}, },
async chagneHave() {
if (!this.isHave && this.form.id) {
let res = await delMatterintermediary({ id: this.form.id });
let { code, msg } = res.data;
if (code === 1) {
this.$message.success(msg);
this.getMatterintermediaryList();
}
} else if (this.isHave) {
this.$refs.formData.resetFields();
}
},
}, },
}; };
</script> </script>
...@@ -130,11 +175,9 @@ export default { ...@@ -130,11 +175,9 @@ export default {
/deep/ .ant-form-item-control { /deep/ .ant-form-item-control {
margin-bottom: 10px; margin-bottom: 10px;
} }
/deep/.ant-col-8 { /deep/.ant-form-item {
width: 33.33333333% !important; display: flex;
} align-items: center;
/deep/.ant-input {
width: 100% !important;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -796,10 +796,10 @@ ...@@ -796,10 +796,10 @@
</div> </div>
<div class="btn_box mb20"> <div class="btn_box mb20">
<a-button type="primary" class="mr" @click="handleOk" :loading="loading"> <a-button class="mr" @click="handleReset"> 重置 </a-button>
<a-button type="primary" @click="handleOk" :loading="loading">
确定 确定
</a-button> </a-button>
<a-button @click="handleReset"> 重置 </a-button>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -32,18 +32,18 @@ ...@@ -32,18 +32,18 @@
<a-form-model-item> <a-form-model-item>
<a-button <a-button
:disabled="isRates" :disabled="isRates"
@click="handleReset"
style="margin-left: 90px" style="margin-left: 90px"
type="primary"
@click="onSubmit"
> >
确定 重置
</a-button> </a-button>
<a-button <a-button
:disabled="isRates" :disabled="isRates"
@click="handleReset"
style="margin-left: 20px" style="margin-left: 20px"
type="primary"
@click="onSubmit"
> >
重置 确定
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
...@@ -92,6 +92,7 @@ export default { ...@@ -92,6 +92,7 @@ export default {
this.isRates = false; this.isRates = false;
} else { } else {
Object.assign(this.formData, this.$options.data().formData); Object.assign(this.formData, this.$options.data().formData);
this.formData.id && this.$delete(this.formData, "id");
this.isRates = true; this.isRates = true;
} }
}, },
......
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
@cancel="handleClose" @cancel="handleClose"
> >
<template slot="footer"> <template slot="footer">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button @click="handleReset">重置</a-button> <a-button @click="handleReset">重置</a-button>
<a-button type="primary" @click="handleOk">确定</a-button>
</template> </template>
<a-form-model <a-form-model
ref="ruleForm" ref="ruleForm"
......
...@@ -159,6 +159,11 @@ ...@@ -159,6 +159,11 @@
</div> </div>
<div class="btn-box"> <div class="btn-box">
<a-space> <a-space>
<a-button
:disabled="!formData.skinFieldList.length"
@click="resetForm"
>重置</a-button
>
<a-button <a-button
:disabled="!formData.skinFieldList.length" :disabled="!formData.skinFieldList.length"
type="primary" type="primary"
...@@ -166,11 +171,6 @@ ...@@ -166,11 +171,6 @@
@click="getPrintScreen" @click="getPrintScreen"
>保存</a-button >保存</a-button
> >
<a-button
:disabled="!formData.skinFieldList.length"
@click="resetForm"
>重置</a-button
>
</a-space> </a-space>
</div> </div>
</div> </div>
......
...@@ -137,6 +137,14 @@ export async function delMattersetbase(data) { ...@@ -137,6 +137,14 @@ export async function delMattersetbase(data) {
export async function addMatterintermediary(data) { export async function addMatterintermediary(data) {
return request(matterintermediary.save, METHOD.POST, data); return request(matterintermediary.save, METHOD.POST, data);
} }
// 中介服务列表
export async function getMatterintermediaryList(data) {
return request(matterintermediary.list, METHOD.POST, data);
}
// 删除
export async function delMatterintermediary(data) {
return request(matterintermediary.delete, METHOD.GET, data);
}
/** /**
* 办理流程 * 办理流程
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment