Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web
Showing
4 changed files
with
26 additions
and
251 deletions
... | @@ -51,20 +51,16 @@ | ... | @@ -51,20 +51,16 @@ |
51 | </template> | 51 | </template> |
52 | 52 | ||
53 | <script> | 53 | <script> |
54 | import personInfoTable from "./personInfoTable"; | ||
55 | import { addJtfcCxjgXx, getJtfcInfo } from "@/api/sqcx"; | 54 | import { addJtfcCxjgXx, getJtfcInfo } from "@/api/sqcx"; |
56 | import { datas, sendThis } from "./addjtfcdata"; | 55 | import { datas, sendThis } from "./addjtfcdata"; |
57 | import { mapGetters } from "vuex"; | 56 | import { mapGetters } from "vuex"; |
58 | export default { | 57 | export default { |
59 | components: { | ||
60 | personInfoTable, | ||
61 | }, | ||
62 | computed: { | 58 | computed: { |
63 | ...mapGetters(["dictData"]), | 59 | ...mapGetters(["dictData"]), |
64 | }, | 60 | }, |
65 | props: { | 61 | props: { |
66 | value: { type: Boolean, default: false }, | 62 | value: { type: Boolean, default: false }, |
67 | bsmSqcx: { type: String, default: "" }, | 63 | sqcxBsm: { type: String, default: "" }, |
68 | }, | 64 | }, |
69 | mounted () { | 65 | mounted () { |
70 | sendThis(this); | 66 | sendThis(this); |
... | @@ -99,19 +95,19 @@ export default { | ... | @@ -99,19 +95,19 @@ export default { |
99 | watch: { | 95 | watch: { |
100 | value (val) { | 96 | value (val) { |
101 | this.myValue = val; | 97 | this.myValue = val; |
98 | let that = this | ||
102 | if (val) { | 99 | if (val) { |
103 | //this.$alert(this.bsmSqcx); | 100 | if (this.sqcxBsm == "") { |
104 | if (this.bsmSqcx == "") { | 101 | that.add("sqr"); |
105 | this.add("sqr"); | 102 | that.add("qlr"); |
106 | this.add("qlr"); | ||
107 | } else { | 103 | } else { |
108 | this.loadData(); | 104 | that.loadData(); |
109 | } | 105 | } |
110 | } | 106 | } |
111 | }, | 107 | }, |
112 | "form.djSqcxDO.ycyrgx" (val) { | 108 | "form.djSqcxDO.ycyrgx" (val) { |
113 | if (val == "1") { | 109 | if (val == "1") { |
114 | this.form.qlrList = this.form.sqrList; | 110 | this.form.qlrList = _.cloneDeep(this.form.sqrList); |
115 | } else { | 111 | } else { |
116 | this.form.qlrList = []; | 112 | this.form.qlrList = []; |
117 | this.add("qlr"); | 113 | this.add("qlr"); |
... | @@ -119,20 +115,23 @@ export default { | ... | @@ -119,20 +115,23 @@ export default { |
119 | }, | 115 | }, |
120 | "form.sqrList" (val) { | 116 | "form.sqrList" (val) { |
121 | if (this.form.djSqcxDO.ycyrgx == '1') { | 117 | if (this.form.djSqcxDO.ycyrgx == '1') { |
122 | this.form.qlrList = this.form.sqrList | 118 | this.form.qlrList = _.cloneDeep(this.form.sqrList) |
123 | } | 119 | } |
124 | } | 120 | } |
125 | }, | 121 | }, |
126 | methods: { | 122 | methods: { |
127 | closeDialog () { | 123 | closeDialog () { |
124 | this.form.sqrList = [] | ||
125 | this.form.qlrList = [] | ||
126 | this.isSearch = false | ||
128 | this.$emit("input", false); | 127 | this.$emit("input", false); |
129 | }, | 128 | }, |
130 | loadData () { | 129 | loadData () { |
131 | this.$startLoading(); | 130 | this.$startLoading(); |
132 | getJtfcInfo({ sqcxBsm: sqcxBsm }).then((res) => { | 131 | getJtfcInfo({ sqcxBsm: this.sqcxBsm }).then((res) => { |
133 | this.$endLoading(); | 132 | this.$endLoading(); |
134 | if (res.code == 200) { | 133 | if (res.code == 200) { |
135 | this.form = res.result; | 134 | this.form = _.cloneDeep(res.result); |
136 | this.isSearch = true; | 135 | this.isSearch = true; |
137 | } | 136 | } |
138 | }); | 137 | }); | ... | ... |
1 | <!-- | ||
2 | 功能:个人信息table | ||
3 | 作者:calliope | ||
4 | --> | ||
5 | <template> | ||
6 | <lb-table :column="tableData.columns" :data="tableData.data" :maxHeight="200" heightNumSetting :pagination="false"> | ||
7 | </lb-table> | ||
8 | </template> | ||
9 | <script> | ||
10 | import { mapGetters } from "vuex"; | ||
11 | export default { | ||
12 | props: { | ||
13 | dataList: { type: Array, default: () => [{}] }, | ||
14 | }, | ||
15 | created () { | ||
16 | if (this.dataList.length == 0) { | ||
17 | this.add(); | ||
18 | } | ||
19 | }, | ||
20 | computed: { | ||
21 | ...mapGetters(["dictData"]), | ||
22 | }, | ||
23 | data () { | ||
24 | return { | ||
25 | tableData: { | ||
26 | columns: [ | ||
27 | { | ||
28 | width: "60", | ||
29 | renderHeader: (h, scope) => { | ||
30 | return ( | ||
31 | <i | ||
32 | class="el-icon-plus pointer" | ||
33 | onClick={() => { | ||
34 | this.add(); | ||
35 | }} | ||
36 | style="color:#409EFF" | ||
37 | ></i> | ||
38 | ); | ||
39 | }, | ||
40 | render: (h, scope) => { | ||
41 | return ( | ||
42 | <i | ||
43 | class="el-icon-minus pointer" | ||
44 | onClick={() => { | ||
45 | this.remove(scope.$index, scope.row); | ||
46 | }} | ||
47 | ></i> | ||
48 | ); | ||
49 | }, | ||
50 | }, | ||
51 | { | ||
52 | width: "150", | ||
53 | label: "身份证读卡器", | ||
54 | render: (h, scope) => { | ||
55 | return ( | ||
56 | <div> | ||
57 | <el-button | ||
58 | type="text" | ||
59 | icon="el-icon-edit-outline" | ||
60 | onClick={() => { | ||
61 | this.handleRead(scope); | ||
62 | }} | ||
63 | > | ||
64 | 读取 | ||
65 | </el-button> | ||
66 | </div> | ||
67 | ); | ||
68 | }, | ||
69 | }, | ||
70 | { | ||
71 | width: "150", | ||
72 | prop: "sqrxm", | ||
73 | label: "姓名/名称", | ||
74 | render: (h, scope) => { | ||
75 | return ( | ||
76 | <el-input | ||
77 | placeholder="姓名/名称" | ||
78 | value={scope.row[scope.column.property]} | ||
79 | onInput={(val) => { | ||
80 | scope.row[scope.column.property] = val; | ||
81 | }} | ||
82 | ></el-input> | ||
83 | ); | ||
84 | }, | ||
85 | }, | ||
86 | { | ||
87 | prop: "sqrzjlxbm", | ||
88 | label: "证件种类", | ||
89 | render: (h, scope) => { | ||
90 | return ( | ||
91 | <el-select | ||
92 | class="width100" | ||
93 | value={scope.row[scope.column.property]} | ||
94 | onChange={(val) => { | ||
95 | scope.row[scope.column.property] = val; | ||
96 | }} | ||
97 | > | ||
98 | {this.dictData["A30"].map((option) => { | ||
99 | return ( | ||
100 | <el-option | ||
101 | label={option.dname} | ||
102 | value={option.dcode} | ||
103 | ></el-option> | ||
104 | ); | ||
105 | })} | ||
106 | </el-select> | ||
107 | ); | ||
108 | }, | ||
109 | }, | ||
110 | { | ||
111 | prop: "sqrzjhm", | ||
112 | label: "证件号", | ||
113 | render: (h, scope) => { | ||
114 | return ( | ||
115 | <el-input | ||
116 | placeholder="证件号" | ||
117 | value={scope.row[scope.column.property]} | ||
118 | onInput={(val) => { | ||
119 | scope.row[scope.column.property] = val; | ||
120 | }} | ||
121 | maxlength="21" | ||
122 | ></el-input> | ||
123 | ); | ||
124 | }, | ||
125 | }, | ||
126 | { | ||
127 | prop: "lxdh", | ||
128 | label: "联系电话", | ||
129 | render: (h, scope) => { | ||
130 | return ( | ||
131 | <div class="typePhone"> | ||
132 | <el-input | ||
133 | placeholder="联系电话" | ||
134 | value={scope.row[scope.column.property]} | ||
135 | onInput={(val) => { | ||
136 | scope.row[scope.column.property] = val; | ||
137 | }} | ||
138 | onBlur={(val) => { | ||
139 | this.teltest(scope.row); | ||
140 | }} | ||
141 | type="tel" | ||
142 | maxlength="11" | ||
143 | ></el-input> | ||
144 | <span | ||
145 | v-show={scope.row.inputErr} | ||
146 | style={{ | ||
147 | fontSize: "12px", | ||
148 | color: "red", | ||
149 | position: "absolute", | ||
150 | bottom: "-2px", | ||
151 | left: "0", | ||
152 | }} | ||
153 | > | ||
154 | 请输入正确手机号 | ||
155 | </span> | ||
156 | </div> | ||
157 | ); | ||
158 | }, | ||
159 | }, | ||
160 | ], | ||
161 | data: this.dataList, | ||
162 | }, | ||
163 | }; | ||
164 | }, | ||
165 | watch: { | ||
166 | // 'tableData.data': { | ||
167 | // handler (newValue, oldName) { | ||
168 | // if (newValue.length != 0) { | ||
169 | // //this.$alert(newValue); | ||
170 | // //this.$emit('getInfoList', newValue) | ||
171 | // } | ||
172 | // }, | ||
173 | // deep: true, | ||
174 | // immediate: true | ||
175 | // }, | ||
176 | // dataList: { | ||
177 | // handler (newValue, oldName) { | ||
178 | // this.tableData.data = _.cloneDeep(newValue) | ||
179 | // //console.log(this.tableData.data, 'this.tableData.datathis.tableData.data'); | ||
180 | // }, | ||
181 | // deep: true, | ||
182 | // immediate: true | ||
183 | // }, | ||
184 | }, | ||
185 | methods: { | ||
186 | add () { | ||
187 | this.tableData.data.push({ | ||
188 | sqrxm: "", | ||
189 | sqrzjlxbm: "", | ||
190 | sqrzjhm: "", | ||
191 | lxdh: "", | ||
192 | inputErr: false, | ||
193 | }); | ||
194 | }, | ||
195 | remove (index, row) { | ||
196 | this.tableData.data.splice(index, 1); | ||
197 | }, | ||
198 | teltest (row) { | ||
199 | const reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/; | ||
200 | if (row.lxdh == "" || row.lxdh.length <= 10 || !reg.test(row.lxdh)) { | ||
201 | row.inputErr = true; | ||
202 | return false; | ||
203 | } else { | ||
204 | row.inputErr = false; | ||
205 | return true; | ||
206 | } | ||
207 | }, | ||
208 | }, | ||
209 | }; | ||
210 | </script> | ||
211 | <style scoped lang='scss'> | ||
212 | /deep/.el-table__cell { | ||
213 | padding: 12px 0; | ||
214 | } | ||
215 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -18,11 +18,11 @@ | ... | @@ -18,11 +18,11 @@ |
18 | </el-col> | 18 | </el-col> |
19 | <el-col :span="10"> | 19 | <el-col :span="10"> |
20 | <el-form-item label="查询时间"> | 20 | <el-form-item label="查询时间"> |
21 | <el-date-picker v-model="queryForm.sqr" type="date" | 21 | <el-date-picker v-model="queryForm.sqr" type="date" placeholder="开始日期" value-format="yyyy-MM-dd" |
22 | placeholder="开始日期" value-format="yyyy-MM-dd" clearable> | 22 | clearable> |
23 | </el-date-picker> 至 | 23 | </el-date-picker> 至 |
24 | <el-date-picker v-model="queryForm.sqr" type="date" | 24 | <el-date-picker v-model="queryForm.sqr" type="date" placeholder="结束日期" value-format="yyyy-MM-dd" |
25 | placeholder="结束日期" value-format="yyyy-MM-dd" clearable> | 25 | clearable> |
26 | </el-date-picker> | 26 | </el-date-picker> |
27 | </el-form-item> | 27 | </el-form-item> |
28 | </el-col> | 28 | </el-col> |
... | @@ -52,11 +52,11 @@ export default { | ... | @@ -52,11 +52,11 @@ export default { |
52 | name: "jtfc", | 52 | name: "jtfc", |
53 | components: { addjtfc }, | 53 | components: { addjtfc }, |
54 | mixins: [table], | 54 | mixins: [table], |
55 | mounted() { | 55 | mounted () { |
56 | sendThis(this); | 56 | sendThis(this); |
57 | this.queryClick(); | 57 | this.queryClick(); |
58 | }, | 58 | }, |
59 | data() { | 59 | data () { |
60 | return { | 60 | return { |
61 | timer: "", | 61 | timer: "", |
62 | isDialog: false, | 62 | isDialog: false, |
... | @@ -73,7 +73,7 @@ export default { | ... | @@ -73,7 +73,7 @@ export default { |
73 | }, | 73 | }, |
74 | methods: { | 74 | methods: { |
75 | // 初始化数据 | 75 | // 初始化数据 |
76 | queryClick() { | 76 | queryClick () { |
77 | this.$startLoading(); | 77 | this.$startLoading(); |
78 | getJtfcPage({ ...this.queryForm, ...this.pageData }).then((res) => { | 78 | getJtfcPage({ ...this.queryForm, ...this.pageData }).then((res) => { |
79 | this.$endLoading(); | 79 | this.$endLoading(); |
... | @@ -84,26 +84,17 @@ export default { | ... | @@ -84,26 +84,17 @@ export default { |
84 | } | 84 | } |
85 | }); | 85 | }); |
86 | }, | 86 | }, |
87 | handleSort(name, sort) { | 87 | handleSort (name, sort) { |
88 | console.log(name, sort); | 88 | console.log(name, sort); |
89 | }, | 89 | }, |
90 | handleAdd() { | 90 | handleAdd () { |
91 | //this.handleLoad(); | ||
92 | this.isDialog = true; | 91 | this.isDialog = true; |
93 | }, | 92 | }, |
94 | handleViewClick(scope) { | 93 | handleViewClick (row) { |
95 | //this.handleLoad(); | 94 | this.sqcxBsm = row.bsmSqcx; |
96 | this.bsmSqcx = scope.row.bsmSqcx; | ||
97 | this.isDialog = true; | 95 | this.isDialog = true; |
98 | // this.$popup("申请查询记录", "sqcx/sqcxjl/components/sqcxjlInfo", { | ||
99 | // formData: { | ||
100 | // sqcxBsm: sqcxBsm, | ||
101 | // }, | ||
102 | // cancel: function () { }, //取消事件的回调 | ||
103 | // confirm: function () { }, | ||
104 | // }); | ||
105 | }, | 96 | }, |
106 | handleLoad() { | 97 | handleLoad () { |
107 | this.timer = new Date().getTime(); | 98 | this.timer = new Date().getTime(); |
108 | }, | 99 | }, |
109 | }, | 100 | }, | ... | ... |
... | @@ -65,7 +65,7 @@ class data extends filter { | ... | @@ -65,7 +65,7 @@ class data extends filter { |
65 | label: "操作", | 65 | label: "操作", |
66 | width: 80, | 66 | width: 80, |
67 | render: (h, scope) => { | 67 | render: (h, scope) => { |
68 | return <el-button type="text" icon='el-icon-view' onClick={() => { vm.handleViewClick(scope) }}>查看</el-button> | 68 | return <el-button type="text" icon='el-icon-view' onClick={() => { vm.handleViewClick(scope.row) }}>查看</el-button> |
69 | } | 69 | } |
70 | } | 70 | } |
71 | ] | 71 | ] | ... | ... |
-
Please register or sign in to post a comment