safecheck-client 3.0.33-91 → 3.0.33-93

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.
@@ -1,139 +1,139 @@
1
- <template>
2
- <div>
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='search' v-ref:criteria>
5
- <div novalidate class="form-inline auto" partial>
6
- <div class="form-group">
7
- 用户名称:
8
- <input type="text" class="form-control" v-model="model.f_username"
9
- condition="f_username like '%{}%'">
10
- 用户电话:
11
- <input type="text" class="form-control" v-model="model.f_phone"
12
- condition="f_phone like '%{}%'">
13
- 用户编号:
14
- <input type="text" class="form-control" v-model="model.f_userid"
15
- condition="f_userid like '%{}%'">
16
- 有无安检计划:
17
- <input type="text" class="form-control" v-model="$parent.$parent.model.f_check_plan.f_plan_name" @click="$parent.$parent.showChooser" readonly="readonly">
18
- 审核状态:
19
- <v-select id="f_approved"
20
- placeholder='请选择审核状态'
21
- v-model='model.f_approved'
22
- :value.sync="$parent.$parent.model.f_approved"
23
- :options='$parent.$parent.f_approval_states'
24
- condition=""
25
- close-on-select clear-button></v-select>
26
- <button class="btn btn-default" @click="search()">查询</button>
27
- <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
28
- <div slot="modal-header" class="modal-header">
29
- <h4 class="modal-title">
30
- 选择计划
31
- </h4>
32
- </div>
33
- <div slot="modal-body" class="modal-body">
34
- <plan-chooser :f.sync="$parent.$parent.f" v-ref:chooser></plan-chooser>
35
- </div>
36
- <div slot="modal-footer" class="modal-footer">
37
- <button type="button" class="btn btn-default" @click="$parent.$parent.ok">确认</button>
38
- <button type="button" class="btn btn-default" @click="$parent.$parent.cancel">取消</button>
39
- </div>
40
- <modal>
41
- </div>
42
- </div>
43
- </criteria>
44
- <data-grid :model="model" partial='list' v-ref:grid>
45
- <template partial='head'>
46
- <tr>
47
- <th>操作</th>
48
- <th>维修状态</th>
49
- <th>审核状态</th>
50
- <th>用户编号</th>
51
- <th>用户名称</th>
52
- <th>入户时间</th>
53
- <th>离开时间</th>
54
- <th>安检人</th>
55
- <th>用户类型</th>
56
- <th>详细地址</th>
57
- </tr>
58
- </template>
59
- <template partial='body'>
60
- <td>
61
- <button class="btn btn-default" @click='$parent.$parent.$parent.change(row)'>查看</button>
62
- <button class="btn btn-default" @click='$parent.$parent.$parent.verify(row)'>审核</button>
63
- </td>
64
- <td>{{row.f_repaired}}</td>
65
- <td>{{row.f_repair_approved}}</td>
66
- <td>{{row.f_userinfo_code}}</td>
67
- <td>{{row.f_user_name}}</td>
68
- <td>{{row.f_onsite_time}}</td>
69
- <td>{{row.f_offsite_time}}</td>
70
- <td>{{row.f_checker_name}}</td>
71
- <td>{{row.f_check_type}}</td>
72
- <td>{{row.f_address}}</td>
73
- </template>
74
- </data-grid>
75
- </criteria-paged>
76
- </div>
77
- </template>
78
-
79
- <script>
80
- import { PagedList } from 'vue-client'
81
- import Vue from 'vue'
82
- import AppData from '../../stores/AppData'
83
-
84
- export default {
85
- title: '维修审核',
86
- props: ['f'],
87
- data() {
88
- let model = new PagedList('rs/sql/查找维修单', 20, {
89
- f_plan_id: 'this.f_check_plan.id',
90
- f_repair_approved: 'this.f_approved[0]',
91
- f_no_checkplan: 'this.f_no_checkplan[0]',
92
- f_subcompany: 'this.f_subcompany'
93
- })
94
- model.f_check_plan = {f_plan_name: '', id: ''}
95
- model.f_approved = ['']
96
- model.f_entry = ['']
97
- model.f_subcompany = Vue.f_subcompany
98
- return {
99
- model: model,
100
- showModal: false,
101
- f_approval_states: this.$appdata.getParam('维修审核状态'),
102
- f_checkplans: this.$appdata.getParam('有无计划'),
103
- }
104
- },
105
- methods: {
106
- change(row) {
107
- if (row.f_check_type == '居民') {
108
- this.$goto('check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
109
- } else {
110
- this.$goto('check-paper-noncivil', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
111
- }
112
- },
113
- verify(row) {
114
- this.$goto('repair-verify-form', {item: row, name: this.$login.f.name}, 'self', this.refresh)
115
- },
116
- refresh() {
117
- this.$refs.paged.$refs.criteria.search()
118
- },
119
- showChooser() {
120
- this.showModal = true
121
- },
122
- ok() {
123
- this.showModal = false
124
- this.model.f_check_plan = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
125
- },
126
- cancel() {
127
- this.showModal = false
128
- this.model.f_check_plan = {f_plan_name: '', id: ''}
129
- }
130
- },
131
- watch: {
132
- 'model.f_no_checkplan'(val) {
133
- if (this.model.f_no_checkplan[0] == '有计划安检') {
134
- this.showChooser()
135
- }
136
- }
137
- }
138
- }
139
- </script>
1
+ <template>
2
+ <div>
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='search' v-ref:criteria>
5
+ <div novalidate class="form-inline auto" partial>
6
+ <div class="form-group">
7
+ 用户名称:
8
+ <input type="text" class="form-control" v-model="model.f_username"
9
+ condition="f_username like '%{}%'">
10
+ 用户电话:
11
+ <input type="text" class="form-control" v-model="model.f_phone"
12
+ condition="f_phone like '%{}%'">
13
+ 用户编号:
14
+ <input type="text" class="form-control" v-model="model.f_userid"
15
+ condition="f_userid like '%{}%'">
16
+ 有无安检计划:
17
+ <input type="text" class="form-control" v-model="$parent.$parent.model.f_check_plan.f_plan_name" @click="$parent.$parent.showChooser" readonly="readonly">
18
+ 审核状态:
19
+ <v-select id="f_approved"
20
+ placeholder='请选择审核状态'
21
+ v-model='model.f_approved'
22
+ :value.sync="$parent.$parent.model.f_approved"
23
+ :options='$parent.$parent.f_approval_states'
24
+ condition=""
25
+ close-on-select clear-button></v-select>
26
+ <button class="btn btn-default" @click="search()">查询</button>
27
+ <modal :show.sync="$parent.$parent.showModal" v-ref:modal>
28
+ <div slot="modal-header" class="modal-header">
29
+ <h4 class="modal-title">
30
+ 选择计划
31
+ </h4>
32
+ </div>
33
+ <div slot="modal-body" class="modal-body">
34
+ <plan-chooser :f.sync="$parent.$parent.f" v-ref:chooser></plan-chooser>
35
+ </div>
36
+ <div slot="modal-footer" class="modal-footer">
37
+ <button type="button" class="btn btn-default" @click="$parent.$parent.ok">确认</button>
38
+ <button type="button" class="btn btn-default" @click="$parent.$parent.cancel">取消</button>
39
+ </div>
40
+ <modal>
41
+ </div>
42
+ </div>
43
+ </criteria>
44
+ <data-grid :model="model" partial='list' v-ref:grid>
45
+ <template partial='head'>
46
+ <tr>
47
+ <th>操作</th>
48
+ <th>维修状态</th>
49
+ <th>审核状态</th>
50
+ <th>用户编号</th>
51
+ <th>用户名称</th>
52
+ <th>入户时间</th>
53
+ <th>离开时间</th>
54
+ <th>安检人</th>
55
+ <th>用户类型</th>
56
+ <th>详细地址</th>
57
+ </tr>
58
+ </template>
59
+ <template partial='body'>
60
+ <td>
61
+ <button class="btn btn-default" @click='$parent.$parent.$parent.change(row)'>查看</button>
62
+ <button class="btn btn-default" @click='$parent.$parent.$parent.verify(row)'>审核</button>
63
+ </td>
64
+ <td>{{row.f_repaired}}</td>
65
+ <td>{{row.f_repair_approved}}</td>
66
+ <td>{{row.f_userinfo_code}}</td>
67
+ <td>{{row.f_user_name}}</td>
68
+ <td>{{row.f_onsite_time}}</td>
69
+ <td>{{row.f_offsite_time}}</td>
70
+ <td>{{row.f_checker_name}}</td>
71
+ <td>{{row.f_check_type}}</td>
72
+ <td>{{row.f_address}}</td>
73
+ </template>
74
+ </data-grid>
75
+ </criteria-paged>
76
+ </div>
77
+ </template>
78
+
79
+ <script>
80
+ import { PagedList } from 'vue-client'
81
+ import Vue from 'vue'
82
+ import AppData from '../../stores/AppData'
83
+
84
+ export default {
85
+ title: '维修审核',
86
+ props: ['f'],
87
+ data() {
88
+ let model = new PagedList('rs/sql/查找维修单', 20, {
89
+ f_plan_id: 'this.f_check_plan.id',
90
+ f_repair_approved: 'this.f_approved[0]',
91
+ f_no_checkplan: 'this.f_no_checkplan[0]',
92
+ f_subcompany: 'this.f_subcompany'
93
+ })
94
+ model.f_check_plan = {f_plan_name: '', id: ''}
95
+ model.f_approved = ['']
96
+ model.f_entry = ['']
97
+ model.f_subcompany = Vue.f_subcompany
98
+ return {
99
+ model: model,
100
+ showModal: false,
101
+ f_approval_states: this.$appdata.getParam('维修审核状态'),
102
+ f_checkplans: this.$appdata.getParam('有无计划'),
103
+ }
104
+ },
105
+ methods: {
106
+ change(row) {
107
+ if (row.f_check_type == '居民') {
108
+ this.$goto('check-paper', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
109
+ } else {
110
+ this.$goto('check-paper-noncivil', {f_plan_id: row.f_check_plan_id, item: row, role: 'view'}, 'self')
111
+ }
112
+ },
113
+ verify(row) {
114
+ this.$goto('repair-verify-form', {item: row, name: this.$login.f.name}, 'self', this.refresh)
115
+ },
116
+ refresh() {
117
+ this.$refs.paged.$refs.criteria.search()
118
+ },
119
+ showChooser() {
120
+ this.showModal = true
121
+ },
122
+ ok() {
123
+ this.showModal = false
124
+ this.model.f_check_plan = this.$refs.paged.$refs.criteria.$refs.modal.$children[0].selectedRow
125
+ },
126
+ cancel() {
127
+ this.showModal = false
128
+ this.model.f_check_plan = {f_plan_name: '', id: ''}
129
+ }
130
+ },
131
+ watch: {
132
+ 'model.f_no_checkplan'(val) {
133
+ if (this.model.f_no_checkplan[0] == '有计划安检') {
134
+ this.showChooser()
135
+ }
136
+ }
137
+ }
138
+ }
139
+ </script>
@@ -1,107 +1,107 @@
1
- <template>
2
- <div>
3
- <validator name='v'>
4
- <a href="#" class="btn btn-primary" @click="this.$back('items')">&lt;&lt;</a>
5
- <form novalidate class="form-horizontal">
6
- <div class="form-group">
7
- <label class="col-sm-2 control-lable">审核人:</label>
8
- <div class="col-sm-8">
9
- <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved_by" v-validate:f_approved_by='{ required: true }' />
10
- </div>
11
- </div>
12
- <div class="form-group">
13
- <label class="col-sm-2 control-lable">审核结果:</label>
14
- <div class="col-sm-8">
15
- <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved" v-validate:f_approved='{ required: true }' />
16
- </div>
17
- </div>
18
- <div class="form-group">
19
- <label class="col-sm-2 control-lable">审核时间:</label>
20
- <div class="col-sm-8">
21
- <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved_time"/>
22
- </div>
23
- </div>
24
- <div class="form-group">
25
- <label class="col-sm-2 control-lable">审核备注:</label>
26
- <div class="col-sm-8">
27
- <textarea class="form-control" type="text" v-model="item.f_approved_note"></textarea>
28
- </div>
29
- </div>
30
- <div class="form-group col-sm-12">
31
- <button :disabled="(item.f_approved != '未审核' && item.f_approved != '重检')" type="button" class="btn btn-primary col-sm-3" @click="approve">
32
- <span class="glyphicon glyphicon-ok"></span> 通过
33
- </button>
34
- <button :disabled="(item.f_approved != '未审核' && item.f_approved != '重检')" type="button" class="btn btn-primary col-sm-3" @click="disapprove">
35
- <span class="glyphicon glyphicon-remove"></span> 打回
36
- </button>
37
- </div>
38
- </form>
39
- </validator>
40
- </div>
41
-
42
- </template>
43
-
44
- <script>
45
- import * as Util from '../Util'
46
- import co from 'co'
47
- import Vue from 'vue'
48
-
49
- let syncApprove = function * (self) {
50
- yield self.$resetpost('rs/logic/ApprovePaper', {data:{item: self.item}}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then(
51
- (res)=>{
52
- if(res.data.code == 200){
53
- alert("安检单审核通过!")
54
- self.$back('items')
55
- }
56
- }
57
- )
58
- }
59
-
60
- let syncDisapprove = function * (self) {
61
- yield self.$resetpost('rs/logic/DisapprovePaper', {data:{item: self.item}}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then((res)=> {
62
- if (res.data.code == 200) {
63
- alert("安检单已打回!")
64
- self.$back('items')
65
- }
66
- })
67
- }
68
-
69
- let noPlanDisapprove = function * (self) {
70
- yield self.$resetpost('rs/logic/NoPlanDisapprove', {data: self.item}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then((res)=> {
71
- if (res.data.code == 200) {
72
- alert("安检单已打回!")
73
- self.$back('items')
74
- }
75
- })
76
- }
77
- export default {
78
- title: '安检单审核',
79
- props: ['item', 'name'],
80
- ready () {
81
- if(this.item.f_approved == '未审核') {
82
- this.item.f_approved_time = Util.toStandardTimeString()
83
- this.item.f_approved_by = this.$login.f.name
84
- }
85
- },
86
- methods: {
87
- approve () {
88
- this.item.f_approved = '已审核'
89
- let gen = syncApprove(this)
90
- return co(gen)
91
- },
92
- disapprove () {
93
- if(this.item.f_no_checkplan == '无计划安检'){
94
- this.item.f_approved = '打回'
95
- let gen = noPlanDisapprove(this)
96
- return co(gen)
97
- }
98
- else {
99
- this.item.f_approved = '打回'
100
- let gen = syncDisapprove(this)
101
- return co(gen)
102
- }
103
- },
104
- }
105
- }
106
-
107
- </script>
1
+ <template>
2
+ <div>
3
+ <validator name='v'>
4
+ <a href="#" class="btn btn-primary" @click="this.$back('items')">&lt;&lt;</a>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="form-group">
7
+ <label class="col-sm-2 control-lable">审核人:</label>
8
+ <div class="col-sm-8">
9
+ <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved_by" v-validate:f_approved_by='{ required: true }' />
10
+ </div>
11
+ </div>
12
+ <div class="form-group">
13
+ <label class="col-sm-2 control-lable">审核结果:</label>
14
+ <div class="col-sm-8">
15
+ <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved" v-validate:f_approved='{ required: true }' />
16
+ </div>
17
+ </div>
18
+ <div class="form-group">
19
+ <label class="col-sm-2 control-lable">审核时间:</label>
20
+ <div class="col-sm-8">
21
+ <input readonly='readonly' class="form-control" type="text" v-model="item.f_approved_time"/>
22
+ </div>
23
+ </div>
24
+ <div class="form-group">
25
+ <label class="col-sm-2 control-lable">审核备注:</label>
26
+ <div class="col-sm-8">
27
+ <textarea class="form-control" type="text" v-model="item.f_approved_note"></textarea>
28
+ </div>
29
+ </div>
30
+ <div class="form-group col-sm-12">
31
+ <button :disabled="(item.f_approved != '未审核' && item.f_approved != '重检')" type="button" class="btn btn-primary col-sm-3" @click="approve">
32
+ <span class="glyphicon glyphicon-ok"></span> 通过
33
+ </button>
34
+ <button :disabled="(item.f_approved != '未审核' && item.f_approved != '重检')" type="button" class="btn btn-primary col-sm-3" @click="disapprove">
35
+ <span class="glyphicon glyphicon-remove"></span> 打回
36
+ </button>
37
+ </div>
38
+ </form>
39
+ </validator>
40
+ </div>
41
+
42
+ </template>
43
+
44
+ <script>
45
+ import * as Util from '../Util'
46
+ import co from 'co'
47
+ import Vue from 'vue'
48
+
49
+ let syncApprove = function * (self) {
50
+ yield self.$resetpost('rs/logic/ApprovePaper', {data:{item: self.item}}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then(
51
+ (res)=>{
52
+ if(res.data.code == 200){
53
+ alert("安检单审核通过!")
54
+ self.$back('items')
55
+ }
56
+ }
57
+ )
58
+ }
59
+
60
+ let syncDisapprove = function * (self) {
61
+ yield self.$resetpost('rs/logic/DisapprovePaper', {data:{item: self.item}}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then((res)=> {
62
+ if (res.data.code == 200) {
63
+ alert("安检单已打回!")
64
+ self.$back('items')
65
+ }
66
+ })
67
+ }
68
+
69
+ let noPlanDisapprove = function * (self) {
70
+ yield self.$resetpost('rs/logic/NoPlanDisapprove', {data: self.item}, {resolveMsg: '操作成功!', rejectMsg: '操作失败!'}).then((res)=> {
71
+ if (res.data.code == 200) {
72
+ alert("安检单已打回!")
73
+ self.$back('items')
74
+ }
75
+ })
76
+ }
77
+ export default {
78
+ title: '安检单审核',
79
+ props: ['item', 'name'],
80
+ ready () {
81
+ if(this.item.f_approved == '未审核') {
82
+ this.item.f_approved_time = Util.toStandardTimeString()
83
+ this.item.f_approved_by = this.$login.f.name
84
+ }
85
+ },
86
+ methods: {
87
+ approve () {
88
+ this.item.f_approved = '已审核'
89
+ let gen = syncApprove(this)
90
+ return co(gen)
91
+ },
92
+ disapprove () {
93
+ if(this.item.f_no_checkplan == '无计划安检'){
94
+ this.item.f_approved = '打回'
95
+ let gen = noPlanDisapprove(this)
96
+ return co(gen)
97
+ }
98
+ else {
99
+ this.item.f_approved = '打回'
100
+ let gen = syncDisapprove(this)
101
+ return co(gen)
102
+ }
103
+ },
104
+ }
105
+ }
106
+
107
+ </script>