safecheck-client 3.0.33-75 → 3.0.33-77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "safecheck-client",
3
3
  "//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
4
- "version": "3.0.33-75",
4
+ "version": "3.0.33-77",
5
5
  "description": "安检模块 前端组件",
6
6
  "author": "丁新 <417755458@qq.com>",
7
7
  "license": "ISC",
@@ -1,198 +1,225 @@
1
- <template>
2
- <div class="auto select-overspread">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group col-sm-3" >
8
- <label class="font_normal_body">客户编号</label>
9
- <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
- condition="f_userinfo_code = '{}'" @keyup.enter="search()">
11
- </div>
12
- <div class="form-group col-sm-2 button-range" >
13
- <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
14
- <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
15
- </div>
16
- </div>
17
- </div>
18
- </criteria>
19
- <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
20
- <template partial='head' >
21
- <tr>
22
- <th>
23
- <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
24
- </th>
25
- <th><nobr>序号</nobr></th>
26
- <th><nobr>用户编号</nobr></th>
27
- <th><nobr>用户姓名</nobr></th>
28
- <th><nobr>用户电话</nobr></th>
29
- <th><nobr>用户地址</nobr></th>
30
- <th><nobr>操作</nobr></th>
31
- </tr>
32
- </template>
33
- <template partial='body' >
34
- <tr >
35
- <td style="text-align: center">
36
- <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
37
- @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
38
- </nobr>
39
- </td>
40
- <td style="text-align:center;">{{$index+1}}</td>
41
- <td style="text-align:center">{{row.f_userinfo_code}}</td>
42
- <td style="text-align:center">{{row.f_user_name}}</td>
43
- <td style="text-align:center">{{row.f_user_phone}}</td>
44
- <td style="text-align:center">{{row.f_address}}</td>
45
- <td style="text-align: center">
46
- <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
47
- </td>
48
- </tr>
49
- </template>
50
- <template partial='foot'></template>
51
- </data-grid>
52
- </criteria-paged>
53
- </div>
54
- </template>
55
-
56
- <script>
57
- import {PagedList} from 'vue-client'
58
- import bus from "../../../bus";
59
-
60
- export default {
61
- title: '安检记录列表',
62
- props: ['row'],
63
- data () {
64
- return {
65
- checkAll:false,
66
- rowdata: this.row,
67
- bookList: [],
68
- model: new PagedList('rs/sql/getUserByCheckBook', 50)
69
- }
70
- },
71
- ready(){
72
- if(this.row){
73
- let condition=''
74
- if(this.row.id){
75
-
76
- condition = `tua.f_check_book_id ='${this.row.id}'`
77
- }else{
78
- condition = `1=1`
79
- }
80
-
81
- // if(this.row.f_check_book_type1=='小区'){
82
- // this.model.url = 'rs/sql/getUserByCheckBook'
83
- // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
84
- // }else{
85
- // this.model.url = 'rs/sql/getUserByCheckBookCompany'
86
- // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
87
- // }
88
- this.model.search(condition)
89
- //只显示用户页面
90
- this.row.f_check_book_type='用户'
91
- }
92
- },
93
- watch: {
94
- 'checkAll'(val){
95
- if(!val){
96
- this.bookList=[]
97
- }
98
- //如果是全选,则查询这个安检册下的用户
99
-
100
- if(val){
101
- //遍历this.model.rows
102
- this.model.rows.forEach(res=>{
103
- this.bookList.push(res.f_userinfo_id)
104
- })
105
- }
106
- },
107
- 'row' (val) {
108
- if (val) {
109
- this.rowdata = val
110
- let condition=''
111
- condition = `tua.f_check_book_id ='${val.id}'`
112
- // if(this.row.f_check_book_type1=='小区'){
113
- // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
114
- // }else{
115
- // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
116
- // }
117
- this.model.search(condition)
118
- }
119
- }
120
- },
121
- methods: {
122
- setCheckAll() {
123
- this.checkAll=this.checkAll?false:true;
124
- // 全选改变后,清空选中数据
125
- this.bookList = []
126
- },
127
- checkModel (row) {
128
- if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
129
- return true
130
- } else {
131
- return false
132
- }
133
- },
134
- checkChange (row, e) {
135
- if (e.target.checked) {
136
- this.bookList.push(row.f_userinfo_id)
137
- } else {
138
- this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
139
- }
140
- },
141
- removes(){
142
-
143
- if(this.bookList.length===0){
144
- this.$showMessage('请选择用户')
145
- return
146
- }
147
- this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
148
- if(res==='confirm'){
149
- //for遍历this.bookList,将每个用户移出安检册
150
- var c="("
151
- for(var i=0;i<this.bookList.length;i++){
152
- c+=`'${this.bookList[i]}'`+","
153
- }
154
- //去掉最后一个逗号
155
- c=c.substring(0,c.length-1)
156
- c+=")"
157
- let data = {
158
- condition: c,
159
- f_book_id: this.row.id
160
- }
161
- this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
162
- this.$showMessage('移出成功')
163
- this.$refs.paged.$refs.criteria.search()
164
- })
165
- }
166
- })
167
- },
168
- remove(row){
169
-
170
- this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
171
- if(res==='confirm'){
172
- let data = {
173
- f_userinfo_id: row.f_userinfo_id,
174
- f_book_id: this.row.id
175
- }
176
- this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
177
- this.$showMessage('移出成功')
178
- this.$refs.paged.$refs.criteria.search()
179
- })
180
- }
181
- })
182
- },
183
- selfSearch (args) {
184
- if (this.rowdata.id) {
185
- args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
186
- // if(this.rowdata.f_check_book_type1=='小区'){
187
- // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
188
- // }else{
189
- // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
190
- // }
191
- this.model.search(args.condition)
192
- } else {
193
- this.$showMessage('请选择片区')
194
- }
195
- }
196
- }
197
- }
198
- </script>
1
+ <template>
2
+ <div class="auto select-overspread">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group col-sm-3" >
8
+ <label class="font_normal_body">客户编号</label>
9
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_userinfo_code" placeholder='客户编号'
10
+ condition="tui.f_userinfo_code = '{}'" @keyup.enter="search()">
11
+ </div>
12
+ <div class="form-group col-sm-3">
13
+ <label class="font_normal_body">客户名称</label>
14
+ <input type="text" class="input_search" v-model="model.f_user_name"
15
+ style="width: 60%" placeholder="客户名称" condition="tui.f_user_name like '%{}%'">
16
+ </div>
17
+ <div class="form-group col-sm-3" >
18
+ <label class="font_normal_body">地址</label>
19
+ <input type="text" class="input_search" v-model="model.f_address"
20
+ style="width: 60%" placeholder="地址" condition="tua.f_address like '%{}%'">
21
+ </div>
22
+ </div>
23
+ <div class="row">
24
+ <div class="form-group col-sm-3" >
25
+ <label class="font_normal_body">小区名称</label>
26
+ <input type="text" class="input_search" v-model="model.f_residential_area"
27
+ style="width: 60%" placeholder="小区名称" condition="tua.f_residential_area like '%{}%'">
28
+ </div>
29
+ <div class="form-group col-sm-3" >
30
+ <label class="font_normal_body">客户类型</label>
31
+ <v-select :value.sync="model.f_user_type" v-model='model.f_user_type'
32
+ :value-single="true" style="width: 60%"
33
+ class="select_list select"
34
+ :options='$parent.$parent.userTypes' placeholder='客户类型'
35
+ close-on-select
36
+ condition="tuf.f_user_type ='{}'"></v-select>
37
+ </div>
38
+ <div class="form-group col-sm-2 button-range" >
39
+ <button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
40
+ <button class="button_spacing button_search-1" @click='$parent.$parent.removes()' v-if="$parent.$parent.bookList.length>0" >移出安检册</button>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </criteria>
45
+ <data-grid :model="model" class="table_sy" partial='list' v-ref:grid >
46
+ <template partial='head' >
47
+ <tr>
48
+ <th>
49
+ <nobr><input type="checkbox" v-model="$parent.$parent.$parent.checkAll"></input>全选</nobr>
50
+ </th>
51
+ <th><nobr>序号</nobr></th>
52
+ <th><nobr>用户编号</nobr></th>
53
+ <th><nobr>用户姓名</nobr></th>
54
+ <th><nobr>用户电话</nobr></th>
55
+ <th><nobr>用户地址</nobr></th>
56
+ <th><nobr>操作</nobr></th>
57
+ </tr>
58
+ </template>
59
+ <template partial='body' >
60
+ <tr >
61
+ <td style="text-align: center">
62
+ <nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
63
+ @change="$parent.$parent.$parent.checkChange(row, $event)"></input>
64
+ </nobr>
65
+ </td>
66
+ <td style="text-align:center;">{{$index+1}}</td>
67
+ <td style="text-align:center">{{row.f_userinfo_code}}</td>
68
+ <td style="text-align:center">{{row.f_user_name}}</td>
69
+ <td style="text-align:center">{{row.f_user_phone}}</td>
70
+ <td style="text-align:center">{{row.f_address}}</td>
71
+ <td style="text-align: center">
72
+ <button class="button_spacing button_search-1" @click='$parent.$parent.$parent.remove(row)'>移出安检册</button>
73
+ </td>
74
+ </tr>
75
+ </template>
76
+ <template partial='foot'></template>
77
+ </data-grid>
78
+ </criteria-paged>
79
+ </div>
80
+ </template>
81
+
82
+ <script>
83
+ import {PagedList} from 'vue-client'
84
+ import bus from "../../../bus";
85
+
86
+ export default {
87
+ title: '安检记录列表',
88
+ props: ['row'],
89
+ data () {
90
+ return {
91
+ checkAll:false,
92
+ rowdata: this.row,
93
+ bookList: [],
94
+ userTypes: [{label: '全部', value: ''},{label: '民用', value: '民用'}, {label: '非民用', value: '非民用'}],
95
+ model: new PagedList('rs/sql/getUserByCheckBook', 50)
96
+ }
97
+ },
98
+ ready(){
99
+ if(this.row){
100
+ let condition=''
101
+ if(this.row.id){
102
+
103
+ condition = `tua.f_check_book_id ='${this.row.id}'`
104
+ }else{
105
+ condition = `1=1`
106
+ }
107
+
108
+ // if(this.row.f_check_book_type1=='小区'){
109
+ // this.model.url = 'rs/sql/getUserByCheckBook'
110
+ // condition = `ta.f_check_book_id =${this.row.f_check_book_id} and ta.id=${this.row.id}`
111
+ // }else{
112
+ // this.model.url = 'rs/sql/getUserByCheckBookCompany'
113
+ // condition = `tc.f_check_book_id =${this.row.f_check_book_id} and tc.id=${this.row.id}`
114
+ // }
115
+ this.model.search(condition)
116
+ //只显示用户页面
117
+ this.row.f_check_book_type='用户'
118
+ }
119
+ },
120
+ watch: {
121
+ 'checkAll'(val){
122
+ if(!val){
123
+ this.bookList=[]
124
+ }
125
+ //如果是全选,则查询这个安检册下的用户
126
+
127
+ if(val){
128
+ //遍历this.model.rows
129
+ this.model.rows.forEach(res=>{
130
+ this.bookList.push(res.f_userinfo_id)
131
+ })
132
+ }
133
+ },
134
+ 'row' (val) {
135
+ if (val) {
136
+ this.rowdata = val
137
+ let condition=''
138
+ condition = `tua.f_check_book_id ='${val.id}'`
139
+ // if(this.row.f_check_book_type1=='小区'){
140
+ // condition = `ta.f_check_book_id =${val.f_check_book_id} and ta.id=${val.id}`
141
+ // }else{
142
+ // condition = `tc.f_check_book_id =${val.f_check_book_id} and tc.id=${val.id}`
143
+ // }
144
+ this.model.search(condition)
145
+ }
146
+ }
147
+ },
148
+ methods: {
149
+ setCheckAll() {
150
+ this.checkAll=this.checkAll?false:true;
151
+ // 全选改变后,清空选中数据
152
+ this.bookList = []
153
+ },
154
+ checkModel (row) {
155
+ if (this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1) {
156
+ return true
157
+ } else {
158
+ return false
159
+ }
160
+ },
161
+ checkChange (row, e) {
162
+ if (e.target.checked) {
163
+ this.bookList.push(row.f_userinfo_id)
164
+ } else {
165
+ this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
166
+ }
167
+ },
168
+ removes(){
169
+
170
+ if(this.bookList.length===0){
171
+ this.$showMessage('请选择用户')
172
+ return
173
+ }
174
+ this.$showMessage("确认将用户移出此安检册?",['confirm']).then(res=>{
175
+ if(res==='confirm'){
176
+ //for遍历this.bookList,将每个用户移出安检册
177
+ var c="("
178
+ for(var i=0;i<this.bookList.length;i++){
179
+ c+=`'${this.bookList[i]}'`+","
180
+ }
181
+ //去掉最后一个逗号
182
+ c=c.substring(0,c.length-1)
183
+ c+=")"
184
+ let data = {
185
+ condition: c,
186
+ f_book_id: this.row.id
187
+ }
188
+ this.$http.post('rs/logic/removesCheckBookUser', {data: data}).then(res=>{
189
+ this.$showMessage('移出成功')
190
+ this.$refs.paged.$refs.criteria.search()
191
+ })
192
+ }
193
+ })
194
+ },
195
+ remove(row){
196
+
197
+ this.$showMessage("确认移出此安检册?",['confirm']).then(res=>{
198
+ if(res==='confirm'){
199
+ let data = {
200
+ f_userinfo_id: row.f_userinfo_id,
201
+ f_book_id: this.row.id
202
+ }
203
+ this.$http.post('rs/logic/removeUserByCheckBook', {data: data}).then(res=>{
204
+ this.$showMessage('移出成功')
205
+ this.$refs.paged.$refs.criteria.search()
206
+ })
207
+ }
208
+ })
209
+ },
210
+ selfSearch (args) {
211
+ if (this.rowdata.id) {
212
+ args.condition +=` and tua.f_check_book_id ='${this.rowdata.id}'`
213
+ // if(this.rowdata.f_check_book_type1=='小区'){
214
+ // args.condition += `and ta.f_check_book_id =${this.rowdata.f_check_book_id} and ta.id=${this.rowdata.id}`
215
+ // }else{
216
+ // args.condition += `and tc.f_check_book_id =${this.rowdata.f_check_book_id} and tc.id=${this.rowdata.id}`
217
+ // }
218
+ this.model.search(args.condition)
219
+ } else {
220
+ this.$showMessage('请选择片区')
221
+ }
222
+ }
223
+ }
224
+ }
225
+ </script>