safecheck-client 4.0.0-4 → 4.0.0-6

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.
@@ -76,11 +76,11 @@
76
76
  <p class="panel-title col-xs-3 text-left font">客户电话:</p>
77
77
  <p class="panel-title col-xs-9 text-left input-font">{{ row.f_user_phone }}</p>
78
78
  </div>
79
- <div class="row">
80
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"
81
- @click="$parent.$parent.$parent.inspect(row)">去登记
82
- </button>
83
- </div>
79
+ <!-- <div class="row">-->
80
+ <!-- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;"-->
81
+ <!-- @click="$parent.$parent.$parent.inspect(row)">去登记-->
82
+ <!-- </button>-->
83
+ <!-- </div>-->
84
84
  </div>
85
85
  </div>
86
86
  </div>
@@ -91,192 +91,202 @@
91
91
  <script>
92
92
 
93
93
 
94
- import { HttpResetClass, PagedList } from 'vue-client'
95
- export default {
96
- title: '保险登记',
97
- data() {
98
- return {
99
- model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/getInsuranceList`, 20,
100
- {
101
- sort: `'asc'`
102
- }
103
- ),
104
- orderFields: {
105
- f_book_name: 'asc'
106
- },
107
- isShowRealityArrears: false,
108
- criteriaShow: false,
109
- booknames: [],//表册名
110
- show: false
94
+ import { HttpResetClass, PagedList } from 'vue-client'
95
+ export default {
96
+ title: '保险登记',
97
+ props: {
98
+ f_userinfo_id: {
99
+ type: String,
100
+ default: ""
101
+ }
102
+ },
103
+ data() {
104
+ return {
105
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/sql/getInsuranceList`, 20,
106
+ {
107
+ sort: `'asc'`
108
+ }
109
+ ),
110
+ orderFields: {
111
+ f_book_name: 'asc'
112
+ },
113
+ isShowRealityArrears: false,
114
+ criteriaShow: false,
115
+ booknames: [],//表册名
116
+ show: false
117
+ }
118
+ },
119
+ async ready() {
120
+ if (this.f_userinfo_id){
121
+ this.search()
122
+ }
123
+ },
124
+ methods: {
125
+ switchPage(type) {
126
+ if (type === 'last' && this.currentPage > 1) {
127
+ this.currentPage--
128
+ this.search()
129
+ return
130
+ }
131
+ if (type === 'next' && this.currentPage < this.totalPage) {
132
+ this.currentPage++
133
+ this.search()
134
+ return
111
135
  }
112
136
  },
113
- async ready() {
114
- await getInitDate(this)
137
+ // 返回到抄表待办界面,主动刷新一次
138
+ clearCondition() {
139
+ Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
140
+ this.$refs.paged.$refs.cri.model[key] = []
141
+ })
142
+ this.$refs.paged.$refs.cri.model['f_meter_classify'] = ''
115
143
  },
116
- methods: {
117
- switchPage(type) {
118
- if (type === 'last' && this.currentPage > 1) {
119
- this.currentPage--
120
- this.search()
121
- return
122
- }
123
- if (type === 'next' && this.currentPage < this.totalPage) {
124
- this.currentPage++
125
- this.search()
126
- return
127
- }
128
- },
129
- // 返回到抄表待办界面,主动刷新一次
130
- clearCondition() {
131
- Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
132
- this.$refs.paged.$refs.cri.model[key] = []
133
- })
134
- this.$refs.paged.$refs.cri.model['f_meter_classify'] = ''
135
- },
136
- hidden() {
137
- this.criteriaShow = !this.criteriaShow
138
- },
139
- async selfSearch(args) {
140
-
141
- await this.model.search(args.condition, args.model)
142
- },
143
- search() {
144
- this.$refs.paged.$refs.cri.search()
145
- },
146
- inspect(param) {
147
- var propData = {
148
- _this: this,
149
- title: '保险登记详情',
150
- safe: false
151
- }
152
- param.tabname = this.tabname
153
- this.$dispatch('gotoson', propData)
154
- this.$goto('phone-insurance-purchase-detail', { data: param, model: param }, 'self', this.search)
144
+ hidden() {
145
+ this.criteriaShow = !this.criteriaShow
146
+ },
147
+ async selfSearch(args) {
148
+ if (this.f_userinfo_id){
149
+ args.condition += ` and ui.f_userinfo_id = '${this.f_userinfo_id}'`
155
150
  }
151
+ await this.model.search(args.condition, args.model)
156
152
  },
157
- events: {
158
- 'select'(val) {
159
- val.model = this.model
160
- this.$dispatch('changepage', val, 'save')
161
- },
162
- 'phonehand-success'(type) {
153
+ search() {
154
+ this.$refs.paged.$refs.cri.search()
155
+ },
156
+ inspect(param) {
157
+ var propData = {
158
+ _this: this.$parent.$parent,
159
+ title: '保险登记详情',
160
+ safe: false
161
+ }
162
+ param.tabname = this.tabname
163
+ this.$dispatch('gotoson', propData)
164
+ this.$parent.$parent.$goto('phone-insurance-purchase-detail', { data: param, model: param }, 'self', this.search)
165
+ }
166
+ },
167
+ events: {
168
+ 'select'(val) {
169
+ val.model = this.model
170
+ this.$dispatch('changepage', val, 'save')
171
+ },
172
+ 'phonehand-success'(type) {
173
+ this.search()
174
+ }
175
+ },
176
+ watch: {
177
+ 'currentPage'(val) {
178
+ if (this.currentPage !== val) {
163
179
  this.search()
164
180
  }
165
181
  },
166
- watch: {
167
- 'currentPage'(val) {
168
- if (this.currentPage !== val) {
169
- this.search()
170
- }
171
- },
172
- 'tabname'() {
182
+ 'tabname'() {
173
183
 
174
- },
175
- 'model.f_userinfo_id'(val) {
176
- if (val === '') {
177
- this.search()
178
- }
184
+ },
185
+ 'model.f_userinfo_id'(val) {
186
+ if (val === '') {
187
+ this.search()
179
188
  }
180
189
  }
181
190
  }
191
+ }
182
192
  </script>
183
193
  <style>
184
- .bg {
185
- background-color: blue;
186
- height: 1px;
187
- border: 0;
188
- }
194
+ .bg {
195
+ background-color: blue;
196
+ height: 1px;
197
+ border: 0;
198
+ }
189
199
 
190
- .app-row {
191
- background-color: white;
192
- padding: 10px 10px 0 10px;
193
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
194
- }
200
+ .app-row {
201
+ background-color: white;
202
+ padding: 10px 10px 0 10px;
203
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
204
+ }
195
205
 
196
- .search_input {
197
- border: 0;
198
- outline: none;
199
- }
206
+ .search_input {
207
+ border: 0;
208
+ outline: none;
209
+ }
200
210
 
201
- .font {
202
- font: 15px PingFang-SC-Medium;
203
- color: #666666;
204
- }
211
+ .font {
212
+ font: 15px PingFang-SC-Medium;
213
+ color: #666666;
214
+ }
205
215
 
206
- .input-font {
207
- font: 15px PingFang-SC-Medium;
208
- color: #333333;
209
- }
216
+ .input-font {
217
+ font: 15px PingFang-SC-Medium;
218
+ color: #333333;
219
+ }
210
220
 
211
- .btn-font {
212
- font: 600 16px PingFang-SC-Bold;
213
- color: #499EDF;
214
- }
221
+ .btn-font {
222
+ font: 600 16px PingFang-SC-Bold;
223
+ color: #499EDF;
224
+ }
215
225
 
216
- .btn-color {
217
- background-color: #FFFFFF;
218
- border-radius: 10px;
219
- border: 1px solid #499EDF;
220
- }
226
+ .btn-color {
227
+ background-color: #FFFFFF;
228
+ border-radius: 10px;
229
+ border: 1px solid #499EDF;
230
+ }
221
231
 
222
- .app-text {
223
- font-size: 12px;
224
- }
232
+ .app-text {
233
+ font-size: 12px;
234
+ }
225
235
 
226
- .panel-self {
227
- border-radius: 10px;
228
- border: 1px solid #499EDF;
229
- background-color: #F8F8F8;
230
- }
236
+ .panel-self {
237
+ border-radius: 10px;
238
+ border: 1px solid #499EDF;
239
+ background-color: #F8F8F8;
240
+ }
231
241
 
232
- .yybtn-color {
233
- background-color: #499edf;
234
- border-radius: 4px;
235
- border: 1px solid #499EDF;
236
- color: #FFFFFF;
237
- font: 14px PingFang-SC-Bold;
238
- }
242
+ .yybtn-color {
243
+ background-color: #499edf;
244
+ border-radius: 4px;
245
+ border: 1px solid #499EDF;
246
+ color: #FFFFFF;
247
+ font: 14px PingFang-SC-Bold;
248
+ }
239
249
 
240
- .qxbtn-color {
241
- background-color: #FFFFFF;
242
- border-radius: 4px;
243
- color: #499edf;
244
- font: 14px PingFang-SC-Bold;
245
- border: 1px solid #499EDF;
246
- }
250
+ .qxbtn-color {
251
+ background-color: #FFFFFF;
252
+ border-radius: 4px;
253
+ color: #499edf;
254
+ font: 14px PingFang-SC-Bold;
255
+ border: 1px solid #499EDF;
256
+ }
247
257
 
248
- .sort-caret {
249
- display: inline-block;
250
- width: 0;
251
- height: 0;
252
- border: 0;
253
- content: "";
254
- position: absolute;
255
- left: 3px;
256
- z-index: 2;
257
- }
258
+ .sort-caret {
259
+ display: inline-block;
260
+ width: 0;
261
+ height: 0;
262
+ border: 0;
263
+ content: "";
264
+ position: absolute;
265
+ left: 3px;
266
+ z-index: 2;
267
+ }
258
268
 
259
- .descending {
260
- bottom: -30px;
261
- border-top: 5px solid #97a8be;
262
- border-bottom: none;
263
- border-right: 5px solid transparent;
264
- border-left: 5px solid transparent;
265
- }
269
+ .descending {
270
+ bottom: -30px;
271
+ border-top: 5px solid #97a8be;
272
+ border-bottom: none;
273
+ border-right: 5px solid transparent;
274
+ border-left: 5px solid transparent;
275
+ }
266
276
 
267
- .ascending {
268
- border-right: 5px solid transparent;
269
- border-left: 5px solid transparent;
270
- top: 9px;
271
- border-top: none;
272
- border-bottom: 5px solid #97a8be;
273
- }
277
+ .ascending {
278
+ border-right: 5px solid transparent;
279
+ border-left: 5px solid transparent;
280
+ top: 9px;
281
+ border-top: none;
282
+ border-bottom: 5px solid #97a8be;
283
+ }
274
284
 
275
- .ascend .ascending {
276
- border-bottom-color: #48576a;
277
- }
285
+ .ascend .ascending {
286
+ border-bottom-color: #48576a;
287
+ }
278
288
 
279
- .descend .descending {
280
- border-top-color: #48576a;
281
- }
289
+ .descend .descending {
290
+ border-top-color: #48576a;
291
+ }
282
292
  </style>
@@ -70,7 +70,7 @@
70
70
  </div>
71
71
  <div class="col-xs-8 col-sm-8 col-md-8">
72
72
  <datepicker :value.sync="model.f_ins_start_date" v-model="model.f_ins_start_date" :format="'yyyy-MM-dd'"
73
- placeholder="请选择投保日期" style="width: 60%">
73
+ placeholder="请选择投保日期" style="width: 60%" @change="changeExpirationDate">
74
74
  </datepicker>
75
75
  </div>
76
76
  </div>
@@ -80,7 +80,7 @@
80
80
  <span class="text-left font">购买年限</span>
81
81
  </div>
82
82
  <div class="col-xs-8 col-sm-8 col-md-8">
83
- <input type="number" placeholder="购买年限" style="width: 60%" class="form-control show-font" v-model="model.f_salecount">
83
+ <input type="number" placeholder="购买年限" style="width: 60%" class="form-control show-font" v-model="model.f_salecount" @change="changeExpirationDate">
84
84
  </div>
85
85
  </div>
86
86
  <div class="row app-row col-xs-12 col-sm-6 col-md-6">
@@ -138,72 +138,68 @@
138
138
  </div>
139
139
  </template>
140
140
  <script>
141
- import { HttpResetClass } from 'vue-client'
142
- import * as Util from '../../../components/Util'
143
- import Vue from 'vue'
144
- export default {
145
- title: '手机单户抄表',
146
- data() {
147
- return {
148
- create_date:Util.getNowDate(),
141
+ import { HttpResetClass } from 'vue-client'
142
+ import * as Util from '../../../components/Util'
143
+ import Vue from 'vue'
144
+ export default {
145
+ title: '手机单户抄表',
146
+ data() {
147
+ return {
148
+ create_date:Util.getNowDate(),
149
149
  isCommit:false
150
- }
151
- },
152
- props: {
153
- data: {
154
- type: Object,
155
- default: function () {
156
- return {
157
- }
150
+ }
151
+ },
152
+ props: {
153
+ data: {
154
+ type: Object,
155
+ default: function () {
156
+ return {
158
157
  }
159
- },
160
- model: {
161
- type: Object,
162
- default: {}
163
158
  }
164
159
  },
165
- ready() {
166
- new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
167
- data: {
160
+ model: {
161
+ type: Object,
162
+ default: {}
163
+ }
164
+ },
165
+ ready() {
166
+ new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {
167
+ data: {
168
168
  items: '*',
169
169
  tablename: 't_userinfo',
170
170
  condition: `f_userinfo_id = '${this.model.f_userinfo_id}'`,
171
- orderitem: '1'
172
- }
173
- }).then(response => {
174
- this.model = Object.assign({}, this.model, response.data[0])
175
- // if(response.data[0].f_ins_stop_date && new Date(response.data[0].f_ins_stop_date) >= new Date() && response.data[0].f_ins_stop_date != Util.toStandardDateString()){
176
- // this.$showMessage('当前保险未过期,请核验后再处理。')
177
- // this.isCommit = true
178
- // }
179
- this.model.f_last_insexpiration_date = response.data[0].f_ins_stop_date
180
- })
181
- this.model.f_money = ''
182
- this.model.f_fee_type = ''
183
- this.model.f_insurance_type = '燃气险'
184
- this.model.f_comments = ''
185
- this.model.f_salecount = 1
186
- this.model.f_ins_number = ''
187
- this.model.f_ins_start_date = Util.toStandardDateString()
188
- },
189
- methods: {
190
- commit() {
191
- if (!this.model.f_money){
192
- this.$showMessage('金额未填写,请填写后重新尝试。')
193
- return
194
- }
195
- if (!this.model.f_ins_start_date){
196
- this.$showMessage('投保日期未选择,请选择后重新尝试。')
197
- return
198
- }
199
- if (!this.model.f_expiration_date){
200
- this.$showMessage('到期日期未选择,请选择后重新尝试。')
201
- return
202
- }
203
- if (!this.model.f_insurance_type){
204
- this.$showMessage('保险险种未填写,请填写后重新尝试。')
205
- return
206
- }
171
+ orderitem: '1'
172
+ }
173
+ }).then(response => {
174
+ this.model = Object.assign({}, this.model, response.data[0])
175
+ this.model.f_last_insexpiration_date = response.data[0].f_ins_stop_date
176
+ })
177
+ this.model.f_money = ''
178
+ this.model.f_fee_type = ''
179
+ this.model.f_insurance_type = '燃气险'
180
+ this.model.f_comments = ''
181
+ this.model.f_salecount = 1
182
+ this.model.f_ins_number = ''
183
+ this.model.f_ins_start_date = Util.toStandardDateString()
184
+ },
185
+ methods: {
186
+ commit() {
187
+ if (!this.model.f_money){
188
+ this.$showMessage('金额未填写,请填写后重新尝试。')
189
+ return
190
+ }
191
+ if (!this.model.f_ins_start_date){
192
+ this.$showMessage('投保日期未选择,请选择后重新尝试。')
193
+ return
194
+ }
195
+ if (!this.model.f_expiration_date){
196
+ this.$showMessage('到期日期未选择,请选择后重新尝试。')
197
+ return
198
+ }
199
+ if (!this.model.f_insurance_type){
200
+ this.$showMessage('保险险种未填写,请填写后重新尝试。')
201
+ return
202
+ }
207
203
  let commit_data = this.model
208
204
  commit_data.f_buy_date = this.create_date
209
205
  commit_data.f_total_ins_charge = ''
@@ -215,74 +211,70 @@
215
211
  commit_data.f_orgname = Vue.user.orgs
216
212
  commit_data.f_depid = Vue.user.depids
217
213
  commit_data.f_depname = Vue.user.deps
218
- new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/saveInsInfo`, { data: commit_data }).then(response => {
214
+ new HttpResetClass().load('post', `${this.$androidUtil.getProxyUrl()}/api/af-revenue/logic/saveInsInfo`, { data: commit_data }).then(response => {
219
215
  this.$showMessage('提交成功')
216
+ this.$back()
220
217
  }).catch(error => {
221
218
  this.$showMessage('提交失败')
222
219
  this.isCommit = false
223
220
  })
224
- },
225
221
  },
226
- watch: {
227
- 'model.f_ins_start_date'(new_var, old_var) {
228
- if (new_var) {
229
- this.model.f_expiration_date = Number(new_var.substring(0, 4)) + Number(this.model.f_salecount) + new_var.substring(4)
230
- } else {
231
- this.model.f_expiration_date = Number(old_var.substring(0, 4)) + Number(this.model.f_salecount) + old_var.substring(4)
232
- }
233
- },
234
- 'model.f_salecount'(new_var) {
235
- if (new_var) {
236
- this.model.f_expiration_date = Number(this.model.f_ins_start_date.substring(0, 4)) + Number(new_var) + this.model.f_ins_start_date.substring(4)
237
- } else {
238
- this.model.f_expiration_date = Number(this.model.f_ins_start_date.substring(0, 4)) + Number(new_var) + this.model.f_ins_start_date.substring(4)
239
- }
222
+ changeExpirationDate(){
223
+ if (this.model.f_ins_start_date && this.model.f_salecount){
224
+ let factoryDate = new Date(this.model.f_ins_start_date)
225
+ let scrapDate = new Date(factoryDate)
226
+ scrapDate.setFullYear(factoryDate.getFullYear() + parseInt(this.model.f_salecount))
227
+ let year = scrapDate.getFullYear()
228
+ let month = (scrapDate.getMonth() + 1).toString().padStart(2, '0')
229
+ let day = scrapDate.getDate().toString().padStart(2, '0')
230
+ this.model.f_expiration_date = `${year}-${month}-${day}`
240
231
  }
241
232
  }
242
233
  }
234
+ }
243
235
  </script>
244
236
  <style scoped>
245
- .mt-5 {
246
- margin-top: 5px;
247
- }
237
+ .mt-5 {
238
+ margin-top: 5px;
239
+ }
248
240
 
249
- .mt-10 {
250
- margin-top: 10px;
251
- }
241
+ .mt-10 {
242
+ margin-top: 10px;
243
+ }
252
244
 
253
- .mt-20 {
254
- margin-top: 20px;
255
- }
245
+ .mt-20 {
246
+ margin-top: 20px;
247
+ }
256
248
 
257
- .app-row {
258
- background-color: white;
259
- padding: 10px 10px 0 10px;
260
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
261
- }
249
+ .app-row {
250
+ background-color: white;
251
+ padding: 10px 10px 0 10px;
252
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
253
+ }
262
254
 
263
- .app-row-none-border {
264
- background-color: white;
265
- padding: 10px 10px 0 10px;
266
- }
255
+ .app-row-none-border {
256
+ background-color: white;
257
+ padding: 10px 10px 0 10px;
258
+ }
267
259
 
268
- .font {
269
- font: 15px PingFang-SC-Medium;
270
- color: #666666;
271
- }
260
+ .font {
261
+ font: 15px PingFang-SC-Medium;
262
+ color: #666666;
263
+ }
272
264
 
273
- .show-font {
274
- font: 15px PingFang-SC-Medium;
275
- color: #333333
276
- }
265
+ .show-font {
266
+ font: 15px PingFang-SC-Medium;
267
+ color: #333333
268
+ }
277
269
 
278
- .btn-font {
279
- font: 600 16px PingFang-SC-Bold;
280
- color: #499EDF;
281
- }
270
+ .btn-font {
271
+ font: 600 16px PingFang-SC-Bold;
272
+ color: #499EDF;
273
+ }
282
274
 
283
- .btn-color {
284
- background-color: #FFFFFF;
285
- border-radius: 10px;
286
- border: 1px solid #499EDF;
287
- }
275
+ .btn-color {
276
+ background-color: #FFFFFF;
277
+ border-radius: 10px;
278
+ border: 1px solid #499EDF;
279
+ }
288
280
  </style>
@@ -142,7 +142,7 @@
142
142
  props: ['data', 'tabname'],
143
143
  data() {
144
144
  return {
145
- model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/getInsuranceChargesList`, 20,
145
+ model: new PagedList(`${this.$androidUtil.getProxyUrl()}/api/af-revenue/sql/getInsuranceChargesList`, 20,
146
146
  {
147
147
  sort: `'asc'`
148
148
  }