safecheck-client 3.0.33-43 → 3.0.33-45
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 +133 -133
- package/src/App.vue +31 -31
- package/src/filiale/Util.js +337 -337
- package/src/filiale/bayan/android/SafecheckUserInfo.vue +1 -1
- package/src/filiale/fugou/pc/CheckBookSearchUser.vue +810 -810
- package/src/filiale/fugou/pc/CheckBookUser.vue +158 -158
- package/src/filiale/rongchuang/android/SafecheckDevices.vue +1400 -1400
- package/src/filiale/rongchuang/android/SafecheckOrderV.vue +2692 -2692
- package/src/filiale/rongchuang/android.js +13 -13
- package/src/filiale/rongchuang/pc/NewCheckpaper.vue +61 -8
- package/src/filiale/yangchunboneng/android/SafecheckOrderV.vue +2832 -2832
@@ -1,158 +1,158 @@
|
|
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"
|
10
|
-
placeholder='客户编号'
|
11
|
-
condition="f_userinfo_code = '{}'" @keyup.enter="search()">
|
12
|
-
</div>
|
13
|
-
<div class="form-group col-sm-2 button-range">
|
14
|
-
<button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
|
15
|
-
|
16
|
-
</div>
|
17
|
-
<div class="form-group col-sm-2 button-range">
|
18
|
-
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.delOfCheckBook()" v-el:cba>移出</button>
|
19
|
-
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
</criteria>
|
24
|
-
<data-grid :model="model" class="table_sy" partial='list' v-ref:grid>
|
25
|
-
<template partial='head'>
|
26
|
-
<tr>
|
27
|
-
<th>
|
28
|
-
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
|
29
|
-
</th>
|
30
|
-
<th>
|
31
|
-
<nobr>序号</nobr>
|
32
|
-
</th>
|
33
|
-
<th>
|
34
|
-
<nobr>用户编号</nobr>
|
35
|
-
</th>
|
36
|
-
<th>
|
37
|
-
<nobr>用户姓名</nobr>
|
38
|
-
</th>
|
39
|
-
<th>
|
40
|
-
<nobr>用户电话</nobr>
|
41
|
-
</th>
|
42
|
-
<th>
|
43
|
-
<nobr>用户地址</nobr>
|
44
|
-
</th>
|
45
|
-
|
46
|
-
</tr>
|
47
|
-
</template>
|
48
|
-
<template partial='body'>
|
49
|
-
<tr>
|
50
|
-
<td style="text-align: center">
|
51
|
-
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
52
|
-
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
53
|
-
</nobr>
|
54
|
-
</td>
|
55
|
-
<td style="text-align:center;">{{ $index + 1 }}</td>
|
56
|
-
<td style="text-align:center">{{ row.f_userinfo_code }}</td>
|
57
|
-
<td style="text-align:center">{{ row.f_user_name }}</td>
|
58
|
-
<td style="text-align:center">{{ row.f_user_phone }}</td>
|
59
|
-
<td style="text-align:center">{{ row.f_address }}</td>
|
60
|
-
</tr>
|
61
|
-
</template>
|
62
|
-
<template partial='foot'></template>
|
63
|
-
</data-grid>
|
64
|
-
</criteria-paged>
|
65
|
-
</div>
|
66
|
-
</template>
|
67
|
-
|
68
|
-
<script>
|
69
|
-
import {HttpResetClass, PagedList} from 'vue-client'
|
70
|
-
|
71
|
-
export default {
|
72
|
-
title: '安检记录列表',
|
73
|
-
props: ['row'],
|
74
|
-
data() {
|
75
|
-
return {
|
76
|
-
rowdata: this.row,
|
77
|
-
bookAll: false,
|
78
|
-
bookList:[],
|
79
|
-
model: new PagedList('rs/sql/safe_singleTable_OrderBy', 50,
|
80
|
-
{
|
81
|
-
items: '"tua.f_address,tui.f_userinfo_code,tui.f_user_name,tui.f_user_phone,tui.f_userinfo_id"',
|
82
|
-
tablename: '"t_user_address tua left join t_userinfo tui on tua.f_userinfo_id = tui.f_userinfo_id"',
|
83
|
-
orderitem: '"tua.id desc"'
|
84
|
-
}
|
85
|
-
)
|
86
|
-
}
|
87
|
-
},
|
88
|
-
ready() {
|
89
|
-
if (this.row) {
|
90
|
-
let condition = ''
|
91
|
-
condition = `tua.f_check_book_id =${this.row.id}`
|
92
|
-
this.model.search(condition)
|
93
|
-
//只显示用户页面
|
94
|
-
this.row.f_check_book_type = '用户'
|
95
|
-
}
|
96
|
-
},
|
97
|
-
watch: {
|
98
|
-
'row'(val) {
|
99
|
-
if (val) {
|
100
|
-
this.rowdata = val
|
101
|
-
let condition = ''
|
102
|
-
condition = `tua.f_check_book_id =${val.id} `
|
103
|
-
this.model.search(condition)
|
104
|
-
}
|
105
|
-
}
|
106
|
-
},
|
107
|
-
methods: {
|
108
|
-
selfSearch(args) {
|
109
|
-
if (this.rowdata.id) {
|
110
|
-
args.condition += `and tua.f_check_book_id =${this.rowdata.id}`
|
111
|
-
this.model.search(args.condition)
|
112
|
-
} else {
|
113
|
-
this.$showMessage('请选择片区')
|
114
|
-
}
|
115
|
-
},
|
116
|
-
checkModel (row) {
|
117
|
-
if (this.bookAll) {
|
118
|
-
return true
|
119
|
-
} else {
|
120
|
-
return this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1;
|
121
|
-
}
|
122
|
-
},
|
123
|
-
checkChange (row, e) {
|
124
|
-
if (e.target.checked) {
|
125
|
-
this.bookList.push(row.f_userinfo_id)
|
126
|
-
} else {
|
127
|
-
this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
|
128
|
-
}
|
129
|
-
},
|
130
|
-
delOfCheckBook(){
|
131
|
-
try {
|
132
|
-
let upAddress = `update t_user_address set f_check_book_id = null where 1 = 2 `
|
133
|
-
if (this.bookAll){
|
134
|
-
upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${this.row.id}'`
|
135
|
-
}else if (this.bookList.length > 0){
|
136
|
-
let codes = this.bookList.map( item => { return `'${item}'` } ).join()
|
137
|
-
upAddress = `update t_user_address set f_check_book_id = null where f_userinfo_id in (${codes})`
|
138
|
-
}
|
139
|
-
this.$showMessage('确认移出安检册', ['confirm', 'cancel']).then((res) => {
|
140
|
-
if (res === 'confirm') {
|
141
|
-
let http = new HttpResetClass()
|
142
|
-
http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
|
143
|
-
{resolveMsg: null, rejectMsg: '移出安检册失败'}).then(resp=>{
|
144
|
-
this.$showMessage('移出成功')
|
145
|
-
this.$refs.paged.$refs.criteria.search()
|
146
|
-
}).catch(error=>{
|
147
|
-
this.$showMessage('移出失败',error)
|
148
|
-
|
149
|
-
})
|
150
|
-
}
|
151
|
-
})
|
152
|
-
}catch (e) {
|
153
|
-
this.$showMessage('移出失败',e)
|
154
|
-
}
|
155
|
-
}
|
156
|
-
}
|
157
|
-
}
|
158
|
-
</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"
|
10
|
+
placeholder='客户编号'
|
11
|
+
condition="f_userinfo_code = '{}'" @keyup.enter="search()">
|
12
|
+
</div>
|
13
|
+
<div class="form-group col-sm-2 button-range">
|
14
|
+
<button class="button_search" style="margin-right: 10px" @click="search()" v-el:cba>查询</button>
|
15
|
+
|
16
|
+
</div>
|
17
|
+
<div class="form-group col-sm-2 button-range">
|
18
|
+
<button class="button_search" style="margin-right: 10px" @click="$parent.$parent.delOfCheckBook()" v-el:cba>移出</button>
|
19
|
+
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</criteria>
|
24
|
+
<data-grid :model="model" class="table_sy" partial='list' v-ref:grid>
|
25
|
+
<template partial='head'>
|
26
|
+
<tr>
|
27
|
+
<th>
|
28
|
+
<nobr><input type="checkbox" v-model="$parent.$parent.$parent.bookAll"></input>全选</nobr>
|
29
|
+
</th>
|
30
|
+
<th>
|
31
|
+
<nobr>序号</nobr>
|
32
|
+
</th>
|
33
|
+
<th>
|
34
|
+
<nobr>用户编号</nobr>
|
35
|
+
</th>
|
36
|
+
<th>
|
37
|
+
<nobr>用户姓名</nobr>
|
38
|
+
</th>
|
39
|
+
<th>
|
40
|
+
<nobr>用户电话</nobr>
|
41
|
+
</th>
|
42
|
+
<th>
|
43
|
+
<nobr>用户地址</nobr>
|
44
|
+
</th>
|
45
|
+
|
46
|
+
</tr>
|
47
|
+
</template>
|
48
|
+
<template partial='body'>
|
49
|
+
<tr>
|
50
|
+
<td style="text-align: center">
|
51
|
+
<nobr><input type="checkbox" :checked="$parent.$parent.$parent.checkModel(row)"
|
52
|
+
@change="$parent.$parent.$parent.checkChange(row, $event)"></input>
|
53
|
+
</nobr>
|
54
|
+
</td>
|
55
|
+
<td style="text-align:center;">{{ $index + 1 }}</td>
|
56
|
+
<td style="text-align:center">{{ row.f_userinfo_code }}</td>
|
57
|
+
<td style="text-align:center">{{ row.f_user_name }}</td>
|
58
|
+
<td style="text-align:center">{{ row.f_user_phone }}</td>
|
59
|
+
<td style="text-align:center">{{ row.f_address }}</td>
|
60
|
+
</tr>
|
61
|
+
</template>
|
62
|
+
<template partial='foot'></template>
|
63
|
+
</data-grid>
|
64
|
+
</criteria-paged>
|
65
|
+
</div>
|
66
|
+
</template>
|
67
|
+
|
68
|
+
<script>
|
69
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
70
|
+
|
71
|
+
export default {
|
72
|
+
title: '安检记录列表',
|
73
|
+
props: ['row'],
|
74
|
+
data() {
|
75
|
+
return {
|
76
|
+
rowdata: this.row,
|
77
|
+
bookAll: false,
|
78
|
+
bookList:[],
|
79
|
+
model: new PagedList('rs/sql/safe_singleTable_OrderBy', 50,
|
80
|
+
{
|
81
|
+
items: '"tua.f_address,tui.f_userinfo_code,tui.f_user_name,tui.f_user_phone,tui.f_userinfo_id"',
|
82
|
+
tablename: '"t_user_address tua left join t_userinfo tui on tua.f_userinfo_id = tui.f_userinfo_id"',
|
83
|
+
orderitem: '"tua.id desc"'
|
84
|
+
}
|
85
|
+
)
|
86
|
+
}
|
87
|
+
},
|
88
|
+
ready() {
|
89
|
+
if (this.row) {
|
90
|
+
let condition = ''
|
91
|
+
condition = `tua.f_check_book_id =${this.row.id}`
|
92
|
+
this.model.search(condition)
|
93
|
+
//只显示用户页面
|
94
|
+
this.row.f_check_book_type = '用户'
|
95
|
+
}
|
96
|
+
},
|
97
|
+
watch: {
|
98
|
+
'row'(val) {
|
99
|
+
if (val) {
|
100
|
+
this.rowdata = val
|
101
|
+
let condition = ''
|
102
|
+
condition = `tua.f_check_book_id =${val.id} `
|
103
|
+
this.model.search(condition)
|
104
|
+
}
|
105
|
+
}
|
106
|
+
},
|
107
|
+
methods: {
|
108
|
+
selfSearch(args) {
|
109
|
+
if (this.rowdata.id) {
|
110
|
+
args.condition += `and tua.f_check_book_id =${this.rowdata.id}`
|
111
|
+
this.model.search(args.condition)
|
112
|
+
} else {
|
113
|
+
this.$showMessage('请选择片区')
|
114
|
+
}
|
115
|
+
},
|
116
|
+
checkModel (row) {
|
117
|
+
if (this.bookAll) {
|
118
|
+
return true
|
119
|
+
} else {
|
120
|
+
return this.bookList.findIndex(res => res === row.f_userinfo_id) !== -1;
|
121
|
+
}
|
122
|
+
},
|
123
|
+
checkChange (row, e) {
|
124
|
+
if (e.target.checked) {
|
125
|
+
this.bookList.push(row.f_userinfo_id)
|
126
|
+
} else {
|
127
|
+
this.bookList.splice(this.bookList.findIndex(res => res === row.f_userinfo_id), 1)
|
128
|
+
}
|
129
|
+
},
|
130
|
+
delOfCheckBook(){
|
131
|
+
try {
|
132
|
+
let upAddress = `update t_user_address set f_check_book_id = null where 1 = 2 `
|
133
|
+
if (this.bookAll){
|
134
|
+
upAddress = `update t_user_address set f_check_book_id = null where f_check_book_id = '${this.row.id}'`
|
135
|
+
}else if (this.bookList.length > 0){
|
136
|
+
let codes = this.bookList.map( item => { return `'${item}'` } ).join()
|
137
|
+
upAddress = `update t_user_address set f_check_book_id = null where f_userinfo_id in (${codes})`
|
138
|
+
}
|
139
|
+
this.$showMessage('确认移出安检册', ['confirm', 'cancel']).then((res) => {
|
140
|
+
if (res === 'confirm') {
|
141
|
+
let http = new HttpResetClass()
|
142
|
+
http.load('POST', 'rs/logic/runSQL', {data: {sql: upAddress}},
|
143
|
+
{resolveMsg: null, rejectMsg: '移出安检册失败'}).then(resp=>{
|
144
|
+
this.$showMessage('移出成功')
|
145
|
+
this.$refs.paged.$refs.criteria.search()
|
146
|
+
}).catch(error=>{
|
147
|
+
this.$showMessage('移出失败',error)
|
148
|
+
|
149
|
+
})
|
150
|
+
}
|
151
|
+
})
|
152
|
+
}catch (e) {
|
153
|
+
this.$showMessage('移出失败',e)
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
</script>
|