From 8e2a42e4a2da78f9cda9fa3e7732a0ef72f0c906 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 12 Nov 2021 09:29:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/securityUnitChild/social.vue | 190 ++++++++++++++++++++++++++++++++---------------
1 files changed, 129 insertions(+), 61 deletions(-)
diff --git a/src/views/securityUnitChild/social.vue b/src/views/securityUnitChild/social.vue
index 5a05171..fdd6a98 100644
--- a/src/views/securityUnitChild/social.vue
+++ b/src/views/securityUnitChild/social.vue
@@ -62,15 +62,28 @@
</template>
<script>
-import { getList, getDetail, add, update, remove } from "@/api/social/social";
+import {
+ getuseList,
+ getList,
+ getDetail,
+ add,
+ update,
+ remove,
+} from "@/api/social/social";
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
-
export default {
- props: ["deptid"],
+ props: ["deptid", "socialRE"],
data() {
+ var deptid = this.deptid;
+ if (this.deptid == undefined) {
+ // deptid = this.userInfo
+ // console.log(this.$store.getters.userInfo.dept_id);
+ deptid = this.$store.getters.userInfo.dept_id;
+ }
return {
- form: {},
+ form: { cardid: "" },
+
query: {},
loading: true,
excelBox: false,
@@ -100,11 +113,18 @@
width: 65,
labelWidth: 110,
-
+ change: (res) => {
+ this.changes(res);
+ },
+ dicUrl: "/api/blade-user/page-security-unit?deptId=" + deptid,
+ props: {
+ label: "realName",
+ value: "id",
+ },
search: true,
searchLabelWidth: 45,
searchSpan: 4,
-
+ type: "select",
rules: [
{
required: true,
@@ -117,7 +137,20 @@
label: "性别",
prop: "sex",
width: 55,
+ type: "select",
+ dicData: [
+ {
+ label: "男",
+ value: 1,
+ },
+ {
+ label: "女",
+ value: 2,
+ },
+ ],
labelWidth: 110,
+ addDisabled: true,
+ editDisabled: true,
rules: [
{
required: true,
@@ -126,39 +159,45 @@
},
],
},
- {
- label: "民族",
- prop: "nation",
- width: 55,
- labelWidth: 110,
- rules: [
- {
- required: true,
- message: "请输入民族",
- trigger: "blur",
- },
- ],
- },
- {
- label: "出生日期",
- labelWidth: 110,
- width: 90,
- prop: "birthday",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [
- {
- required: true,
- message: "请输入出生日期",
- trigger: "blur",
- },
- ],
- },
+ // {
+ // label: "民族",
+ // prop: "nation",
+ // addDisabled: true,
+ // editDisabled: true,
+ // width: 55,
+ // labelWidth: 110,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入民族",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ // {
+ // label: "出生日期",
+ // labelWidth: 110,
+ // width: 90,
+ // // addDisabled: true,
+ // // editDisabled: true,
+ // prop: "birthday",
+ // type: "date",
+ // format: "yyyy-MM-dd",
+ // valueFormat: "yyyy-MM-dd",
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入出生日期",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
{
label: "联系电话",
prop: "telephone",
labelWidth: 110,
+ addDisabled: true,
+ editDisabled: true,
width: 98,
rules: [
{
@@ -172,6 +211,8 @@
label: "身份证号",
prop: "cardid",
labelWidth: 110,
+ addDisabled: true,
+ editDisabled: true,
width: 150,
rules: [
{
@@ -186,6 +227,8 @@
prop: "residence",
labelWidth: 110,
overHidden: true,
+ addDisabled: true,
+ editDisabled: true,
rules: [
{
required: true,
@@ -194,31 +237,35 @@
},
],
},
- {
- label: "居住地址 ",
- prop: "address",
- overHidden: true,
- labelWidth: 110,
- rules: [
- {
- required: true,
- message: "请输入居住地址 ",
- trigger: "blur",
- },
- ],
- },
- {
- label: "户籍性质",
- prop: "nature",
- labelWidth: 110,
- rules: [
- {
- required: true,
- message: "请输入户籍性质",
- trigger: "blur",
- },
- ],
- },
+ // {
+ // label: "居住地址 ",
+ // prop: "address",
+ // overHidden: true,
+ // addDisabled: true,
+ // editDisabled: true,
+ // labelWidth: 110,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入居住地址 ",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ // {
+ // label: "户籍性质",
+ // prop: "nature",
+ // // addDisabled: true,
+ // // editDisabled: true,
+ // labelWidth: 110,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入户籍性质",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
{
label: "个人缴费额",
prop: "amount",
@@ -278,7 +325,7 @@
res: "data",
},
tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/social/import-user",
+ action: "/api/social/import-user?deptid=" + deptid,
},
// {
// label: "数据覆盖",
@@ -329,6 +376,10 @@
this.deptid;
}
},
+ socialRE() {
+ this.$refs.crud.refreshTable();
+ this.$refs.crud.doLayout();
+ },
},
computed: {
...mapGetters(["permission", "userInfo"]),
@@ -349,6 +400,21 @@
},
},
methods: {
+ changes(val) {
+ if (val.value != "") {
+ getuseList(val.value).then((res) => {
+ // console.log(res);
+ var d = res.data.data;
+ this.form.cardid = d.cardid;
+ this.form.telephone = d.phone;
+ this.form.residence = d.nativeplace;
+ this.form.address = d.address;
+ this.form.sex = d.sex;
+ this.form.nation = d.nation;
+ this.form.birthday = d.birthday;
+ });
+ }
+ },
rowSave(row, done, loading) {
console.log(row);
row.deptid = this.deptid;
@@ -486,6 +552,8 @@
this.page.total = data.total;
this.data = data.records;
this.loading = false;
+ this.$refs.crud.refreshTable();
+ this.$refs.crud.doLayout();
this.selectionClear();
});
},
--
Gitblit v1.9.3