Commit 8d29c2d1 authored by “yiyousong”'s avatar “yiyousong”

pref:修改事项材料页面

parent 2e5dfaf8
......@@ -2,19 +2,33 @@
<template>
<div class="applymaterial">
<a-button class="addclass" @click="showModal">新增材料</a-button>
<div class="table-content">
<Standardtable
<div class="table-content mt20">
<!-- 表格 -->
<a-table
bordered
:loading="loading"
:pagination="{
showTotal: (total) => `共 ${total} 条`,
current: current,
total: total,
pageSize: size,
showSizeChanger: true,
showQuickJumper: true,
pageSizeOptions: pageSizeOptions,
onChange: handlechange,
onShowSizeChange: showSizeChange,
}"
:scroll="{ y: 550 }"
:columns="columns"
:dataSource="dataSource"
:bordered="true"
:selectedRows="selectedRows"
:isShow="false"
:pagination="false"
@selectedRowChange="callback"
:data-source="dataSource"
:rowKey="(record) => record.id"
>
<span slot="num" slot-scope="{ index }">{{ index + 1 }}</span>
<template slot="look" slot-scope="{ text }">
<template slot="num" slot-scope="text, record, index">
<span>
{{ (current - 1) * size + index + 1 }}
</span>
</template>
<template slot="look" slot-scope="text">
<span class="kong mr" @click="downloadEmpty(text.matterDatumFileList)"
>空白表格</span
>
......@@ -24,31 +38,19 @@
>示例样表</span
>
</template>
<template slot="operate" slot-scope="{ text }">
<template slot="operate" slot-scope="text">
<span class="look_more mr" @click="readMore(text)">查看更多</span>
<span class="edit mr" @click="editMaterial(text)">编辑</span>
<a-popconfirm
title="删除不可恢复,确定要删除吗?"
@confirm="delMaterial(text.id)"
>
<a-icon slot="icon" type="question-circle-o" style="color: red" />
<span class="del">删除</span>
</a-popconfirm>
</template>
</Standardtable>
</a-table>
</div>
<!-- 翻页 -->
<a-pagination
v-model="current"
:total="total"
@change="handlechange"
:pageSize="size"
show-less-items
/>
<!-- 新增材料对话框 -->
<addmaterials
ref="addmaterials"
:formVisible.sync="formVisible"
:dict="dict"
></addmaterials>
<!-- 查看更多 -->
<material-details
......@@ -66,7 +68,6 @@
<script>
import local from "@/utils/local";
import Standardtable from "@/components/table/StandardTable.vue";
import addmaterials from "../group/addmaterials.vue";
import materialDetails from "../group/materialDetails.vue";
import downloadTable from "../group/downloadTable.vue";
......@@ -108,7 +109,6 @@ let columns = [
];
export default {
components: {
Standardtable,
addmaterials,
materialDetails,
downloadTable,
......@@ -118,6 +118,9 @@ export default {
return {
title: "下载空白表格",
columns,
dict: {}, // 材料字典
loading: false,
pageSizeOptions: ["10", "30", "50", "100"],
dataSource: [],
selectedRows: [], // 选中数据
formVisible: false,
......@@ -137,19 +140,23 @@ export default {
// 获取申请材料列表
async getMatterDatumData() {
if (local.getLocal("matter")) {
this.loading = true;
let res = await getMatterDatumList({
page: this.current,
size: this.size,
matterId: local.getLocal("matter").id,
matterName: local.getLocal("matter").matterName,
});
let { data } = res.data;
this.loading = false;
let { data, dict } = res.data;
if (!data.data.length && this.current > 1) {
this.current -= 1;
this.getMatterDatumData();
}
this.total = data.total;
this.dataSource = data.data;
this.dict = dict;
console.log(dict);
}
},
// 选中数据
......@@ -170,6 +177,11 @@ export default {
this.current = num;
this.getMatterDatumData();
},
// 改变每页显示数量
showSizeChange(size) {
this.size = size;
this.getMatterDatumData();
},
// 删除
async delMaterial(val) {
let res = await delMatterDatum({ id: val });
......
......@@ -17,18 +17,11 @@
:wrapper-col="{ span: 17 }"
>
<a-row>
<a-col :span="21">
<a-form-model-item
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
label="材料名称"
prop="materialName"
>
<a-col :span="12">
<a-form-model-item label="材料名称" prop="materialName">
<a-input v-model="form.materialName" placeholder="请输入材料名称" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="materialProperty" label="材料形式:">
<a-select
......@@ -36,73 +29,77 @@
placeholder="请选择材料形式"
>
<a-select-option
v-for="v in materialPropertyItem"
v-for="(v, key) in dict.materialProperty"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="isMust" label="材料必要性">
<a-form-model-item prop="isMust" label="材料必要性">
<a-select v-model="form.isMust" placeholder="请选择材料必要性">
<a-select-option v-for="v in isMustItem" :key="v" :value="v">{{
v
}}</a-select-option>
<a-select-option
v-for="(v, key) in dict.isMust"
:key="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="materialType" label="材料类型">
<a-form-model-item prop="materialType" label="材料类型">
<a-select placeholder="请选择材料类型" v-model="form.materialType">
<a-select-option
v-for="v in materialTypeItem"
v-for="(v, key) in dict.materialType"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="electronicgs" label="电子材料格式">
<a-form-model-item prop="electronicgs" label="电子材料格式">
<a-select
v-model="form.electronicgs"
placeholder="请选择电子材料格式"
>
<a-select-option
v-for="v in electronicgsItem"
v-for="(v, key) in dict.electronicgs"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="materialSource" label="来源渠道">
<a-form-model-item prop="materialSource" label="来源渠道">
<a-select
placeholder="请选择来源渠道"
v-model="form.materialSource"
>
<a-select-option
v-for="v in materialSourceItem"
v-for="(v, key) in dict.materialSource"
:key="v"
:value="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="paperNum" label="纸质材料份数">
<a-form-model-item prop="paperNum" label="纸质材料份数">
<a-input-number
placeholder="请选择材料份数"
:min="1"
......@@ -111,71 +108,78 @@
></a-input-number>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="paperGg" label="纸质材料规格">
<a-form-model-item prop="paperGg" label="纸质材料规格">
<a-select placeholder="请选择纸质材料规格" v-model="form.paperGg">
<a-select-option v-for="v in paperGgItem" :key="v" :value="v">{{
v
}}</a-select-option>
<a-select-option
v-for="(v, key) in dict.paperGg"
:key="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="jianmMs" label="减免模式">
<a-form-model-item prop="jianmMs" label="减免模式">
<a-select placeholder="请选择纸减免模式" v-model="form.jianmMs">
<a-select-option v-for="v in jianmMsItem" :key="v" :value="v">{{
v
}}</a-select-option>
<a-select-option
v-for="(v, key) in dict.jianmMs"
:key="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="sealWay" label="盖印方式">
<a-form-model-item prop="sealWay" label="盖印方式">
<a-select placeholder="请选择盖印方式" v-model="form.sealWay">
<a-select-option v-for="v in sealWayItem" :key="v" :value="v">{{
v
}}</a-select-option>
<a-select-option
v-for="(v, key) in dict.sealWay"
:key="v"
:value="key"
>{{ v }}</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="isjianm" label="是否减免">
<a-form-model-item prop="isjianm" label="是否减免">
<a-radio-group v-model="form.isjianm">
<a-radio value="是"></a-radio>
<a-radio value="否"></a-radio>
<a-radio :value="key" v-for="(v, key) in dict.isjianm" :key="v">{{
v
}}</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item prop="isLack" label="是否容缺">
<a-form-model-item prop="isLack" label="是否容缺">
<a-radio-group v-model="form.isLack">
<a-radio value="是"></a-radio>
<a-radio value="否"></a-radio>
<a-radio :value="key" v-for="(v, key) in dict.isLack" :key="v">{{
v
}}</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item
class="upload-file"
label="上传附件"
label="上传附件"
prop="matterDatumFileList"
>
<a-upload
name="file"
:multiple="true"
:action="api + '/file/commonupload'"
:action="api + 'file/commonupload'"
:customRequest="handleChangeEmptyFile"
:fileList="fileList2"
:remove="handleRemove"
......@@ -187,13 +191,13 @@
<a-col :span="12">
<a-form-model-item
class="upload-file"
label="上传附件"
label="上传附件"
prop="matterDatumFileList"
>
<a-upload
name="file"
:multiple="true"
:action="api + '/file/commonupload'"
:action="api + 'file/commonupload'"
:customRequest="handleChangeExampleFile"
:fileList="fileList1"
:remove="handleRemove"
......@@ -206,10 +210,12 @@
<a-row>
<a-col :span="12">
<a-form-model-item prop="materialSourceSm" label="来源渠道说明">
<a-form-model-item prop="materialSourceSm" label="来源渠道说明">
<a-textarea
v-model="form.materialSourceSm"
:auto-size="{ minRows: 3, maxRows: 5 }"
allowClear
placeholder="请输入来源渠道说明"
/>
</a-form-model-item>
</a-col>
......@@ -218,6 +224,8 @@
<a-textarea
v-model="form.remarkSub"
:auto-size="{ minRows: 3, maxRows: 5 }"
allowClear
placeholder="请输入填报须知"
/>
</a-form-model-item>
</a-col>
......@@ -225,18 +233,22 @@
<a-row>
<a-col :span="12">
<a-form-model-item prop="summary" label="受理标准">
<a-form-model-item prop="summary" label="受理标准">
<a-textarea
v-model="form.summary"
:auto-size="{ minRows: 3, maxRows: 5 }"
allowClear
placeholder="请输入受理标准"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item prop="clauseContent" label="提供材料依据:">
<a-form-model-item prop="clauseContent" label="材料依据">
<a-textarea
v-model="form.clauseContent"
:auto-size="{ minRows: 3, maxRows: 5 }"
allowClear
placeholder="请输入要求提供材料的依据"
/>
</a-form-model-item>
</a-col>
......@@ -244,10 +256,12 @@
<a-row>
<a-col :span="12">
<a-form-model-item prop="remark" label="备注">
<a-form-model-item prop="remark" label="备注">
<a-textarea
v-model="form.remark"
:auto-size="{ minRows: 3, maxRows: 5 }"
allowClear
placeholder="请输入备注"
/>
</a-form-model-item>
</a-col>
......@@ -258,14 +272,7 @@
<script>
import local from "@/utils/local";
const materialPropertyItem = ["纸质", "电子", "纸质/电子"];
const isMustItem = ["必要", "非必要"];
const materialTypeItem = ["", "原件", "复印件", "原件和复印件"];
const electronicgsItem = ["不限", "jpg", "jpeg", "pdf", "word"];
const materialSourceItem = ["", "申请人自备", "政府部门核发", "其他"];
const paperGgItem = ["A3", "A4"];
const jianmMsItem = ["", "", ""];
const sealWayItem = ["签证处盖章", "签字处按手印"];
import {
saveMatterDatum,
delMatterdatumfile,
......@@ -273,26 +280,27 @@ import {
} from "@/services/matter";
import { uploadFile } from "@/services/dept";
export default {
props: {
dict: {
type: Object,
required: true,
default: () => {
return {};
},
},
formVisible: {
type: Boolean,
default: false,
},
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL,
apiUrl: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
api: process.env.VUE_APP_API_BASE_URL + "/",
addTitle: "新增材料",
materialPropertyItem, // 材料形式选项
isMustItem, // 材料必要性选项
materialTypeItem, // 材料类型选项
electronicgsItem, // 电子材料格式选项
materialSourceItem, // 材料来源渠道选项
paperGgItem, // 纸质材料规格选项
jianmMsItem, // 减免模式选项
sealWayItem, // 盖章方式
fileList2: [], // 空白样表
fileList1: [], // 示例样表
delFileId: [], // 删除附件id
matterList: [], //站点事项列表
siteId: "",
form: {
matterId: undefined, // 事项id
matterName: "", // 事项名称
......@@ -320,73 +328,10 @@ export default {
materialName: [
{ required: true, message: "材料名称不能为空", trigger: "blur" },
],
materialProperty: [
{ required: true, message: "材料形式不能为空", trigger: "change" },
],
isMust: [
{ required: true, message: "材料必要性不能为空", trigger: "change" },
],
materialType: [
{ required: true, message: "材料类型不能为空", trigger: "change" },
],
electronicgs: [
{
required: true,
message: "电子材料格式不能为空",
trigger: "change",
},
],
materialSource: [
{ required: true, message: "来源渠道不能为空", trigger: "change" },
],
paperNum: [
{
required: true,
message: "纸质材料份数不能为空",
trigger: "change",
},
],
paperGg: [
{
required: true,
message: "纸质材料规格不能为空",
trigger: "change",
},
],
jianmMs: [
{ required: true, message: "减免模式不能为空", trigger: "change" },
],
sealWay: [
{ required: true, message: "盖章方式不能为空", trigger: "change" },
],
isjianm: [
{ required: true, message: "是否减免不能为空", trigger: "change" },
],
isLack: [
{ required: true, message: "是否容缺不能为空", trigger: "change" },
],
materialSourceSm: [
{ required: true, message: "来源渠道说明不能为空", trigger: "blur" },
],
remarkSub: [
{ required: true, message: "填表须知不能为空", trigger: "blur" },
],
summary: [
{ required: true, message: "受理标准不能为空", trigger: "blur" },
],
clauseContent: [
{ required: true, message: "材料依据不能为空", trigger: "blur" },
],
remark: [{ required: true, message: "备注不能为空", trigger: "blur" }],
},
};
},
props: {
formVisible: {
type: Boolean,
default: false,
},
},
computed: {
Visible: {
get() {
......@@ -401,17 +346,6 @@ export default {
// this.getSiteMatterList();
},
methods: {
// 获取站点事项列表
// async getSiteMatterList() {
// this.siteId = this.$route.query.siteId;
// let res = await getSiteMatterList({ siteId: this.siteId });
// this.matterList = res.data.data.data;
// },
// // 事项下拉选择
// handleSelect(val, node) {
// let { text } = node.componentOptions.children[0];
// this.form.matterName = text;
// },
// 保存
handleOk() {
if (local.getLocal("matter")) {
......
......@@ -28,7 +28,22 @@
<a-col :span="12">
<a-form-model-item label="所属部门" prop="deptId">
<a-select
style="width: 260px"
showSearch
v-model="form.deptId"
optionFilterProp="label"
placeholder="请选择部门"
@change="handleChange"
>
<a-select-option
v-for="v in deptList"
:key="v.id"
:value="v.deptNumber"
:label="v.name"
>
{{ v.name }}</a-select-option
>
</a-select>
<!-- <a-select
placeholder="请选择部门"
v-model="form.deptId"
@change="handleChange"
......@@ -41,7 +56,7 @@
>
{{ v.name }}
</a-select-option>
</a-select>
</a-select> -->
</a-form-model-item>
</a-col>
</a-row>
......@@ -199,15 +214,15 @@ export default {
{ required: true, message: "部门不能为空", trigger: "change" },
],
name: [{ required: true, message: "窗口名不能为空", trigger: "blur" }],
englishName: [
{ required: true, message: "窗口英语名不能为空", trigger: "blur" },
],
region: [
{ required: true, message: "窗口区域不能为空", trigger: "blur" },
],
englishRegion: [
{ required: true, message: "窗口英语区域不能为空", trigger: "blur" },
],
// englishName: [
// { required: true, message: "窗口英语名不能为空", trigger: "blur" },
// ],
// region: [
// { required: true, message: "窗口区域不能为空", trigger: "blur" },
// ],
// englishRegion: [
// { required: true, message: "窗口英语区域不能为空", trigger: "blur" },
// ],
fromnum: [
{ required: true, validator: changeWindowNumber, trigger: "blur" },
],
......
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