apply-clients 3.5.5-10 → 3.5.5-11

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,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.5.5-10",
3
+ "version": "3.5.5-11",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,230 +1,232 @@
1
- <template>
2
- <div class="col-sm-12" style="margin: 20px 0px;">
3
- <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
- <template partial='head'>
5
- <tr>
6
- <th class="textNoLineBreak">序号</th>
7
- <th class="textNoLineBreak">检查项目</th>
8
- <th class="textNoLineBreak">检查结果</th>
9
- <th class="textNoLineBreak">操作</th>
10
- <th class="textNoLineBreak">
11
- <button style="color:black" class="button_new button_spacing" type="button" @click="$parent.$parent.getCheck()">重置
12
- </button>
13
- </th>
14
- </tr>
15
- </template>
16
- <template partial='body'>
17
- <tr>
18
- <td style="text-align: center;">
19
- <nobr>{{$index+1}}</nobr>
20
- </td>
21
- <td style="text-align: center;" >
22
- <nobr>{{row.f_check_list}}</nobr>
23
- </td>
24
- <td style="text-align: center;">
25
- <nobr>{{row.f_check_value}}</nobr>
26
- </td>
27
- <td style="text-align: center;">
28
- <nobr>
29
- <button
30
- type="button"
31
- name="button"
32
- class="btn btn-link"
33
- @click="$parent.$parent.showModal(row)"
34
- >修改</button>
35
- </nobr>
36
- </td>
37
- </tr>
38
- </template>
39
- </data-grid>
40
- <validator name="v">
41
- <modal v-if="showCheckModel" :show.sync="showCheckModel" v-ref:modal :large="true" :backdrop="false" title="收费明细">
42
- <header slot="modal-header" class="modal-header">
43
- <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
44
- <h4 class="modal-title">检查明细</h4>
45
- </header>
46
- <article slot="modal-body" class="modal-body clearfix">
47
- <div class="form-group col-sm-12">
48
- <label class="col-sm-2 control-label">检查项目:</label>
49
- <div class="col-sm-10">
50
- <textarea width="100%" rows="3" readonly v-model="checkList.f_check_list"></textarea>
51
- </div>
52
-
53
- </div>
54
- <div class="form-group col-sm-12" >
55
- <label class="col-sm-2 control-label">检查结果:</label>
56
- <div class="col-sm-10">
57
- <input-select
58
- placeholder='请选择' width="100%"
59
- v-model="checkList.f_check_value"
60
- :value.sync="checkList.f_check_value"
61
- :options='item'
62
- class="select select_list"
63
- :value-single="true"
64
- close-on-select ></input-select>
65
- </div>
66
- </div>
67
- <app-check-take-pic
68
- :blobid="selectdata.f_process_id"
69
- :flag="flag"
70
- :defname="selectdata.defname"
71
- :isdelete="true"
72
- :istakepic="true"
73
- :istype="true">
74
- </app-check-take-pic>
75
- </article>
76
- <footer slot="modal-footer" class="modal-footer">
77
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="save()">保存</button>
78
- </footer>
79
- </modal>
80
- </validator>
81
- </div>
82
- </template>
83
- <script>
84
- import {HttpResetClass} from 'vue-client'
85
- import Vue from 'vue'
86
- import co from "co";
87
-
88
- export default {
89
- title: '检查项管理',
90
- props: {
91
- selectdata: {
92
- type: Object
93
- },
94
- },
95
- data () {
96
- return {
97
- model: {
98
- data: null
99
- },
100
- flag:0,
101
- showCheckModel: false,
102
- checkList:{},
103
- item: [{label: '是', value: '是'},{label: '否', value: '否'}],
104
- hasList:false,
105
- savelist:[]
106
- }
107
- },
108
- ready () {
109
- this.search()
110
- },
111
- methods: {
112
- async flush(){
113
- let http = new HttpResetClass()
114
- let data = {
115
- tablename: 't_apply_check',
116
- condition: `f_process_id= '${this.selectdata.f_process_id}'`
117
- }
118
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
119
- resolveMsg: null,
120
- rejectMsg: '检查项查询失败!!!'
121
- })
122
- this.model.data=res.data
123
- },
124
- async getCheck(){
125
- let http = new HttpResetClass()
126
- this.$showMessage('是否获取最新检查项?', ['confirm', 'cancel']).then(async (res) => {
127
- if (res === 'confirm') {
128
- this.model.data=[]
129
- let del= `delete from t_apply_check where f_process_id='${this.selectdata.f_process_id}'`
130
- //删除旧的检查项,
131
- await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: del}},
132
- {resolveMsg: null, rejectMsg: '删除安检册失败'})
133
- //拉取新的检查项
134
- await this.saveCheck()
135
- //刷新
136
- await this.flush()
137
- }
138
- })
139
- },
140
- async save(){
141
- let res = await this.$resetpost(
142
- `${this.$androidUtil.getProxyUrl()}/apply/rs/entity/t_apply_check`,
143
- this.checkList,
144
- {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
145
- )
146
- if(res){
147
- this.showCheckModel=false
148
- this.search()
149
- }
150
- },
151
- showModal(row){
152
- this.checkList=row
153
- this.flag=this.selectdata.f_apply_num+row.id
154
- this.showCheckModel=true
155
- },
156
- closeModal() {
157
- this.showCheckModel=false
158
- },
159
- //如果是第一次,则新保存检查想到数据库
160
- async saveCheck() {
161
- if (this.hasList === false) {
162
- this.savelist = []
163
- let checkList
164
- if (this.selectdata.f_apply_type == '工商户报建'){
165
- checkList = this.$appdata.getParam("报建非民用检查项目")
166
- }else {
167
- checkList = this.$appdata.getParam("报建民用检查项目")
168
- }
169
-
170
- //遍历数组,获取数组中的每一个对象,并获取对象的value
171
- for (let i = 0; i < checkList.length; i++) {
172
- let obj = checkList[i]
173
- let value = obj.value
174
- this.savelist.push(value)
175
- }
176
- //保存到数据库
177
- let http = new HttpResetClass()
178
- let data = {
179
- apply: this.selectdata,
180
- user: Vue.user,
181
- check:this.savelist
182
- }
183
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyCheck`, {data: data}, {
184
- resolveMsg: null,
185
- rejectMsg: '添加失败!!!'
186
- })
187
- }
188
- },
189
- //查询
190
- async search() {
191
- let http = new HttpResetClass()
192
- let data = {
193
- tablename: 't_apply_check',
194
- condition: `f_process_id= '${this.selectdata.f_process_id}'`
195
- }
196
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
197
- resolveMsg: null,
198
- rejectMsg: '检查项查询失败!!!'
199
- })
200
- if(res.data.length>0){
201
- this.model.data=res.data
202
- }else{
203
- this.saveCheck()
204
- }
205
- }
206
- },
207
- events: {
208
- },
209
- computed: {
210
- CheckItems() {
211
- return this.$appdata.getParam("报建检查项目")
212
- }
213
- },
214
- watch: {
215
- }
216
- }
217
- </script>
218
- <style scoped>
219
- .textNoLineBreak {
220
- white-space: nowrap;
221
- }
222
- .head-but{
223
- margin-left: 5px;
224
- height: 34px;
225
- /*background-color: #6aa6e2;*/
226
- border-radius: 4px;
227
- font-family: PingFang;
228
- color: #ffffff;
229
- }
230
- </style>
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">检查项目</th>
8
+ <th class="textNoLineBreak">检查结果</th>
9
+ <th class="textNoLineBreak">操作</th>
10
+ <th class="textNoLineBreak">
11
+ <button style="color:black" class="button_new button_spacing" type="button" @click="$parent.$parent.getCheck()">重置
12
+ </button>
13
+ </th>
14
+ </tr>
15
+ </template>
16
+ <template partial='body'>
17
+ <tr>
18
+ <td style="text-align: center;">
19
+ <nobr>{{$index+1}}</nobr>
20
+ </td>
21
+ <td style="text-align: center;" >
22
+ <nobr>{{row.f_check_list}}</nobr>
23
+ </td>
24
+ <td style="text-align: center;">
25
+ <nobr>{{row.f_check_value}}</nobr>
26
+ </td>
27
+ <td style="text-align: center;">
28
+ <nobr>
29
+ <button
30
+ type="button"
31
+ name="button"
32
+ class="btn btn-link"
33
+ @click="$parent.$parent.showModal(row)"
34
+ >修改</button>
35
+ </nobr>
36
+ </td>
37
+ </tr>
38
+ </template>
39
+ </data-grid>
40
+ <validator name="v">
41
+ <modal v-if="showCheckModel" :show.sync="showCheckModel" v-ref:modal :large="true" :backdrop="false" title="收费明细">
42
+ <header slot="modal-header" class="modal-header">
43
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
44
+ <h4 class="modal-title">检查明细</h4>
45
+ </header>
46
+ <article slot="modal-body" class="modal-body clearfix">
47
+ <div class="form-group col-sm-12">
48
+ <label class="col-sm-2 control-label">检查项目:</label>
49
+ <div class="col-sm-10">
50
+ <textarea width="100%" rows="3" readonly v-model="checkList.f_check_list"></textarea>
51
+ </div>
52
+
53
+ </div>
54
+ <div class="form-group col-sm-12" >
55
+ <label class="col-sm-2 control-label">检查结果:</label>
56
+ <div class="col-sm-10">
57
+ <input-select
58
+ placeholder='请选择' width="100%"
59
+ v-model="checkList.f_check_value"
60
+ :value.sync="checkList.f_check_value"
61
+ :options='item'
62
+ class="select select_list"
63
+ :value-single="true"
64
+ close-on-select ></input-select>
65
+ </div>
66
+ </div>
67
+ <app-check-take-pic
68
+ :blobid="selectdata.f_process_id"
69
+ :flag="flag"
70
+ :defname="selectdata.defname"
71
+ :isdelete="true"
72
+ :istakepic="true"
73
+ :istype="true">
74
+ </app-check-take-pic>
75
+ </article>
76
+ <footer slot="modal-footer" class="modal-footer">
77
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="save()">保存</button>
78
+ </footer>
79
+ </modal>
80
+ </validator>
81
+ </div>
82
+ </template>
83
+ <script>
84
+ import {HttpResetClass} from 'vue-client'
85
+ import Vue from 'vue'
86
+ import co from "co";
87
+
88
+ export default {
89
+ title: '检查项管理',
90
+ props: {
91
+ selectdata: {
92
+ type: Object
93
+ },
94
+ },
95
+ data () {
96
+ return {
97
+ model: {
98
+ data: null
99
+ },
100
+ flag:0,
101
+ showCheckModel: false,
102
+ checkList:{},
103
+ item: [{label: '是', value: '是'},{label: '否', value: '否'}],
104
+ hasList:false,
105
+ savelist:[]
106
+ }
107
+ },
108
+ ready () {
109
+ this.search()
110
+ },
111
+ methods: {
112
+ async flush(){
113
+ let http = new HttpResetClass()
114
+ let data = {
115
+ tablename: 't_apply_check',
116
+ condition: `f_process_id= '${this.selectdata.f_process_id}'`
117
+ }
118
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
119
+ resolveMsg: null,
120
+ rejectMsg: '检查项查询失败!!!'
121
+ })
122
+ this.model.data=res.data
123
+ },
124
+ async getCheck(){
125
+ let http = new HttpResetClass()
126
+ this.$showMessage('是否获取最新检查项?', ['confirm', 'cancel']).then(async (res) => {
127
+ if (res === 'confirm') {
128
+ this.model.data=[]
129
+ let del= `delete from t_apply_check where f_process_id='${this.selectdata.f_process_id}'`
130
+ //删除旧的检查项,
131
+ await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/runSQL`, {data: {sql: del}},
132
+ {resolveMsg: null, rejectMsg: '删除安检册失败'})
133
+ //拉取新的检查项
134
+ await this.saveCheck()
135
+ //刷新
136
+ await this.flush()
137
+ }
138
+ })
139
+ },
140
+ async save(){
141
+ let res = await this.$resetpost(
142
+ `${this.$androidUtil.getProxyUrl()}/apply/rs/entity/t_apply_check`,
143
+ this.checkList,
144
+ {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
145
+ )
146
+ if(res){
147
+ this.showCheckModel=false
148
+ this.search()
149
+ }
150
+ },
151
+ showModal(row){
152
+ this.checkList=row
153
+ this.flag=this.selectdata.f_apply_num+row.id
154
+ this.showCheckModel=true
155
+ },
156
+ closeModal() {
157
+ this.showCheckModel=false
158
+ },
159
+ //如果是第一次,则新保存检查想到数据库
160
+ async saveCheck() {
161
+ if (this.hasList === false) {
162
+ this.savelist = []
163
+ let checkList
164
+ if (this.selectdata.f_apply_type == '工商户报建'){
165
+ checkList = this.$appdata.getParam("报建非民用检查项目")
166
+ }else if(this.selectdata.f_apply_type == '团购报建'){
167
+ checkList = this.$appdata.getParam("报建团购检查项目")
168
+ } else{
169
+ checkList = this.$appdata.getParam("报建民用检查项目")
170
+ }
171
+
172
+ //遍历数组,获取数组中的每一个对象,并获取对象的value
173
+ for (let i = 0; i < checkList.length; i++) {
174
+ let obj = checkList[i]
175
+ let value = obj.value
176
+ this.savelist.push(value)
177
+ }
178
+ //保存到数据库
179
+ let http = new HttpResetClass()
180
+ let data = {
181
+ apply: this.selectdata,
182
+ user: Vue.user,
183
+ check:this.savelist
184
+ }
185
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addApplyCheck`, {data: data}, {
186
+ resolveMsg: null,
187
+ rejectMsg: '添加失败!!!'
188
+ })
189
+ }
190
+ },
191
+ //查询
192
+ async search() {
193
+ let http = new HttpResetClass()
194
+ let data = {
195
+ tablename: 't_apply_check',
196
+ condition: `f_process_id= '${this.selectdata.f_process_id}'`
197
+ }
198
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data:data}, {
199
+ resolveMsg: null,
200
+ rejectMsg: '检查项查询失败!!!'
201
+ })
202
+ if(res.data.length>0){
203
+ this.model.data=res.data
204
+ }else{
205
+ this.saveCheck()
206
+ }
207
+ }
208
+ },
209
+ events: {
210
+ },
211
+ computed: {
212
+ CheckItems() {
213
+ return this.$appdata.getParam("报建检查项目")
214
+ }
215
+ },
216
+ watch: {
217
+ }
218
+ }
219
+ </script>
220
+ <style scoped>
221
+ .textNoLineBreak {
222
+ white-space: nowrap;
223
+ }
224
+ .head-but{
225
+ margin-left: 5px;
226
+ height: 34px;
227
+ /*background-color: #6aa6e2;*/
228
+ border-radius: 4px;
229
+ font-family: PingFang;
230
+ color: #ffffff;
231
+ }
232
+ </style>