sale-client 3.6.310 → 3.6.312

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.
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Jun 13 14:30:20 CST 2024
2
+ gradle.version=5.2.1
Binary file
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.310",
3
+ "version": "3.6.312",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -245,7 +245,7 @@
245
245
  </div>
246
246
  <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_reminder_amount')"
247
247
  v-show="(formconfig && formconfig.f_reminder_amount && formconfig.f_reminder_amount.required) || !onlyshowmust"
248
- :class="[$v.f_reminder_amount.required ? 'has-error' : '']">
248
+ :class="[$v.f_reminder_amount.required ? 'has-error' : '']" title="余额小于该值后,微信公众号或短信推送余额不足提醒">
249
249
  <label for="f_reminder_amount" :style="{color: baseinfo.base.f_reminder_amount === null || baseinfo.base.f_reminder_amount === '' ? 'red' : null}" class="font_normal_body">{{getConfigLabelName('f_reminder_amount','提示金额')}}</label>
250
250
  <input type="number" v-model="baseinfo.base.f_reminder_amount" class="input_search" style="width:60%"
251
251
  v-validate:f_reminder_amount=getConfigValidate("f_reminder_amount",false)
@@ -471,9 +471,10 @@
471
471
  },
472
472
  watch: {
473
473
  'baseinfo.base.f_userinfo_id' (val) {
474
- if (this.baseinfo.base.f_reminder_amount === null) {
474
+ if(this.formconfig.f_reminder_amount!=null){
475
+ if (this.baseinfo.base.f_reminder_amount === null && this.formconfig.f_reminder_amount.required) {
475
476
  this.$showAlert('当前用户还未设置余额提示金额,请在提示金额字段进行设置', 'warning', 3000)
476
- }
477
+ }}
477
478
  },
478
479
  // 重置验证结果,当证件类型切换时,验证结果不能立即刷新,需要重置
479
480
  'baseinfo.base.f_credentials[0]' () {
@@ -144,16 +144,16 @@
144
144
  f_limit_times: '',
145
145
  f_time_value: '0',
146
146
  f_limit_type: '气量',
147
- f_limit_style:'',
147
+ f_limit_style: '',
148
148
  f_limit_value: '',
149
149
  f_limit_amount: '',
150
150
  f_start_date: this.$login.toStandardDateString()
151
151
  },
152
152
  limitshow: false,
153
- thirdPays: [{label: '支持', value: '1'},{label: '不支持', value: '0'}],
154
- timeTypes: [{label: '按月', value: '按月'},{label: '按日', value: '按日'}],
155
- limitTypes: [{label: '气量', value: '气量'},{label: '金额', value: '金额'}],
156
- limitstyle: [{label: '按次数', value: '按次数'},{label: '按总量', value: '按总量'}]
153
+ thirdPays: [{label: '包含', value: '1'}, {label: '不包含', value: '0'}, {label: '仅第三方', value: '-1'}],
154
+ timeTypes: [{label: '按月', value: '按月'}, {label: '按日', value: '按日'}],
155
+ limitTypes: [{label: '气量', value: '气量'}, {label: '金额', value: '金额'}],
156
+ limitstyle: [{label: '按次数', value: '按次数'}, {label: '按总量', value: '按总量'}]
157
157
  }
158
158
  },
159
159
  props: ['show', 'f_price_id', 'f_userinfo_id'],
@@ -214,7 +214,7 @@
214
214
  f_limit_times: '',
215
215
  f_time_value: '',
216
216
  f_limit_type: '气量',
217
- f_limit_style:'',
217
+ f_limit_style: '',
218
218
  f_limit_value: 0,
219
219
  f_limit_amount: 0,
220
220
  f_start_date: this.$login.toStandardDateString()
@@ -109,6 +109,12 @@
109
109
  condition="f_meter_brand in {}"
110
110
  close-on-select></v-select>
111
111
  </div>
112
+ <div class="form-group col-sm-3">
113
+ <label class="font_normal_body">气表状态</label>
114
+ <v-select :options='$parent.$parent.table_state' :value.sync="model.f_table_state"
115
+ close-on-select condition="f_table_state = '{}'"
116
+ placeholder='气表状态' v-model="model.f_table_state"></v-select>
117
+ </div>
112
118
  <div class="col-sm-3 form-group">
113
119
  <label class="font_normal_body">小&emsp;区&emsp;</label>
114
120
  <input type="text" class="input_search" v-model="model.f_residential_area" style="width: 60%"
@@ -168,6 +174,7 @@
168
174
  <th><nobr>客户状态</nobr></th>
169
175
  <th><nobr>客户地址</nobr></th>
170
176
  <th><nobr>表号</nobr></th>
177
+ <th><nobr>气表状态</nobr></th>
171
178
  <th><nobr>所属表册</nobr></th>
172
179
  <th><nobr>册内排序</nobr></th>
173
180
  <th><nobr>表箱号</nobr></th>
@@ -185,6 +192,7 @@
185
192
  <td>{{row.f_user_state}}</td>
186
193
  <td>{{row.f_address}}</td>
187
194
  <td>{{row.f_meternumber}}</td>
195
+ <td>{{row.f_table_state}}</td>
188
196
  <td>{{row.f_book_name}}</td>
189
197
  <td>{{row.f_meter_book_sort}}</td>
190
198
  <!-- <td>{{row.f_adjustable_id}}</td>-->
@@ -239,6 +247,7 @@ let loadParamGem = async function (self) {
239
247
  gasproperties: this.$appdata.getParam('用气性质') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用气性质')] : [],
240
248
  user_type: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
241
249
  meter_classify: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
250
+ table_state: this.$appdata.getParam('气表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')] : [],
242
251
  f_small_areas: this.$appdata.getParam('小区域') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('小区域')] : [],
243
252
  user_state: [{label: '正常', value: '正常'}, {label: '预备', value: '预备'}, {label: '销户', value: '销户'}],
244
253
  whether_list: [{label: '已在册内', value: 'is not null'}, {label: '不在册内', value: 'is null'}],
@@ -175,12 +175,14 @@
175
175
  *阶梯水价查询列表
176
176
  */
177
177
  // eslint-disable-next-line standard/object-curly-even-spacing
178
- import { PagedList} from 'vue-client'
178
+
179
+ import {HttpResetClass, PagedList} from 'vue-client'
179
180
  import Vue from 'vue'
180
181
  import axios from 'axios'
181
182
  export default {
182
183
  data () {
183
184
  return {
185
+ HttpReset: new HttpResetClass(),
184
186
  allSelect: false,
185
187
  arrshow: false,
186
188
  condition: '',
@@ -219,7 +221,8 @@
219
221
  return this.$showMessage('请选择缴费的用户')
220
222
  }
221
223
  if (this.ids.length !== 0 && !this.allSelect) {
222
- this.condition = this.$refs.paged.$refs.cri.condition + ' and f_userfiles_id in (' + this.ids + ')'
224
+ this.$refs.paged.$refs.cri.condition = this.$refs.paged.$refs.cri.condition?this.$refs.paged.$refs.cri.condition:'1=1'
225
+ this.condition = this.$refs.paged.$refs.cri.condition + ' and f_userfiles_id in (' + this.ids + ')'
223
226
  }
224
227
  let userinfo = {
225
228
  f_operator: this.$login.f.name,
@@ -229,7 +232,33 @@
229
232
  f_depid: this.$login.f.depids,
230
233
  f_depname: this.$login.f.deps
231
234
  }
232
- this.$resetpost('rs/logic/batchGovernmentSell',{data: {condition: this.condition,userinfo: userinfo}})
235
+ let uuid = this.$login.guid()
236
+ let data={
237
+ uuid:uuid,
238
+ condition:this.condition,
239
+ userinfo:userinfo
240
+ }
241
+ try {
242
+ this.$resetpost('rs/govsell/all',{data: data},{resolveMsg: null, rejectMsg: null}, 500)
243
+ } catch (e) {}
244
+ this.$showMessage(`正在批量处理中, 请耐心等待...`, [])
245
+ // 启动定时器定时查询处理结果
246
+ this.timer = setInterval(async () => {
247
+ let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
248
+ console.log(typeof (res))
249
+ console.log(res)
250
+ this.$showMessage(`正在批量处理中, 正在处理第>>>${res.data.n}户`, [])
251
+ if (res.data.msg || res.data.error) {
252
+ clearInterval(this.timer)
253
+ this.$closeMessage()
254
+ if (res.data.error) {
255
+ this.$showAlert(`${res.data.error}`, 'danger')
256
+ return
257
+ }
258
+ await this.$showMessage(`审核总条数: ${res.data.sum}, 成功${res.data.success}条, 失败${res.data.fail}条`)
259
+ this.$refs.paged.$refs.cri.model.search()
260
+ }
261
+ }, 5000)
233
262
  },
234
263
  downloadFiles() {
235
264
  let downurl = 'rs/downloadfile/file?filename=政府补贴导入Excel模板'
@@ -329,7 +358,7 @@
329
358
  }
330
359
  this.batchMeterShow = false
331
360
  // this.$showAlert(`一共上传${res.data.total}条数据, 成功${res.data.successnum}条`, 'success', 2000)
332
- this.search()
361
+ this.$refs.paged.$refs.cri.model.search()
333
362
  } else {
334
363
  let data = {
335
364
  tablename: 't_government_charge',
@@ -153,6 +153,15 @@
153
153
  condition="f_meternumber like '%{}%'" placeholder='表号'
154
154
  >
155
155
  </div>
156
+ <div class="col-sm-3 form-group">
157
+ <label class="font_normal_body">气表状态</label>
158
+ <v-select :options='$parent.$parent.table_state'
159
+ :value.sync="model.f_table_state"
160
+ v-model="model.f_table_state"
161
+ close-on-select
162
+ condition="f_table_state = '{}'"
163
+ placeholder='气表状态' ></v-select>
164
+ </div>
156
165
  <div class="col-sm-3 form-group">
157
166
  <label class="font_normal_body">抄表月份</label>
158
167
  <v-select :options='$parent.$parent.handMonths'
@@ -201,6 +210,12 @@
201
210
  <th>
202
211
  <nobr>客户类型</nobr>
203
212
  </th>
213
+ <th>
214
+ <nobr>气表状态</nobr>
215
+ </th>
216
+ <th>
217
+ <nobr>抄表月份</nobr>
218
+ </th>
204
219
  <th>
205
220
  <nobr>表底数</nobr>
206
221
  </th>
@@ -243,6 +258,12 @@
243
258
  <td>
244
259
  <nobr>{{ row.f_user_type }}</nobr>
245
260
  </td>
261
+ <td>
262
+ <nobr>{{ row.f_table_state }}</nobr>
263
+ </td>
264
+ <td>
265
+ <nobr>{{ row.f_hand_month }}</nobr>
266
+ </td>
246
267
  <td>
247
268
  <nobr>{{ row.f_meter_base }}</nobr>
248
269
  </td>
@@ -310,6 +331,7 @@ export default {
310
331
  }, ...this.$appdata.getParam('小区域')] : [],
311
332
  user_state: [{label: '正常', value: '正常'}, {label: '预备', value: '预备'}, {label: '销户', value: '销户'}],
312
333
  handMonths: this.$appdata.getParam('抄表月份') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('抄表月份')] : [],
334
+ table_state: this.$appdata.getParam('气表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表状态')] : [],
313
335
  whether_list: [{label: '已在册内', value: 'is not null'}, {label: '不在册内', value: 'is null'}],
314
336
  meterbrands: [],
315
337
  condition: '',
@@ -44,7 +44,7 @@
44
44
  style="width:60%"
45
45
  :options='$parent.$parent.meters' placeholder='气表类型'
46
46
  close-on-select
47
- condition="f_meter_classify like '%{}'"
47
+ condition="u.f_meter_classify like '%{}'"
48
48
  ></v-select>
49
49
  </div>
50
50
  <div class="col-sm-3 form-group">
@@ -87,36 +87,36 @@
87
87
  style="width:60%"
88
88
  @change="$parent.$parent.sliceChange"
89
89
  close-on-select
90
- condition="met.f_book_slice_area in {}"></v-select>
90
+ condition="f_book_slice_area in {}"></v-select>
91
91
  </div>
92
92
  <div class="col-sm-3 form-group">
93
93
  <label class="font_normal_body">小&emsp;&emsp;区</label>
94
94
  <input style="width:60%" type="text" class="form-control" v-model="model.f_residential_area"
95
- condition="address.f_residential_area like '%{}%'" placeholder='小区'
95
+ condition="f_residential_area like '%{}%'" placeholder='小区'
96
96
  >
97
97
  </div>
98
98
  <div class="col-sm-3 form-group">
99
99
  <label class="font_normal_body">楼&emsp;&emsp;栋</label>
100
100
  <input style="width:60%" type="text" class="form-control" v-model="model.f_building"
101
- condition="address.f_building like '%{}%'" placeholder='楼栋'
101
+ condition="f_building like '%{}%'" placeholder='楼栋'
102
102
  >
103
103
  </div>
104
104
  <div class="col-sm-3 form-group">
105
105
  <label class="font_normal_body">单&emsp;&emsp;元</label>
106
106
  <input style="width:60%" type="text" class="form-control" v-model="model.f_unit"
107
- condition="address.f_unit like '%{}%'" placeholder='单元'
107
+ condition="f_unit like '%{}%'" placeholder='单元'
108
108
  >
109
109
  </div>
110
110
  <div class="col-sm-3 form-group">
111
111
  <label class="font_normal_body">楼&emsp;&emsp;层</label>
112
112
  <input style="width:60%" type="text" class="form-control" v-model="model.f_floor"
113
- condition="address.f_floor like '%{}%'" placeholder='楼层'
113
+ condition="f_floor like '%{}%'" placeholder='楼层'
114
114
  >
115
115
  </div>
116
116
  <div class="col-sm-3 form-group">
117
117
  <label class="font_normal_body">&emsp;门牌号</label>
118
118
  <input style="width:60%" type="text" class="form-control" v-model="model.f_room"
119
- condition="address.f_room like '%{}%'" placeholder='门牌号'
119
+ condition="f_room like '%{}%'" placeholder='门牌号'
120
120
  >
121
121
  </div>
122
122
  </div>
@@ -129,13 +129,26 @@
129
129
  <input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"
130
130
  @change="$parent.$parent.$parent.select()"/>
131
131
  </th>
132
- <th><nobr>用户编号</nobr></th>
132
+ <th><nobr>客户编号</nobr></th>
133
133
  <th><nobr>用户信息</nobr></th>
134
134
  <th><nobr>地址信息</nobr></th>
135
- <th><nobr>用户状态</nobr></th>
135
+ <th><nobr>客户状态</nobr></th>
136
+
137
+ <th><nobr>客户类型</nobr></th>
138
+ <th><nobr>使用状态</nobr></th>
139
+ <th><nobr>气表状态</nobr></th>
136
140
  <th><nobr>气表类型</nobr></th>
141
+ <th><nobr>气表品牌</nobr></th>
142
+
143
+ <th><nobr>气表型号</nobr></th>
144
+ <th><nobr>发卡状态</nobr></th>
145
+ <th><nobr>用气类型</nobr></th>
146
+ <th><nobr>使用类型</nobr></th>
147
+ <th><nobr>抄表员</nobr></th>
148
+
149
+ <th><nobr>抄表月份</nobr></th>
137
150
  <th><nobr>调 压 箱</nobr></th>
138
- <th><nobr>表册片区</nobr></th>
151
+ <th><nobr>备注</nobr></th>
139
152
  </tr>
140
153
  </template>
141
154
  <template partial='body'>
@@ -147,9 +160,22 @@
147
160
  <td style="text-align: center;">{{row.f_user_name}}&nbsp;&nbsp;{{row.f_user_phone ? row.f_user_phone : ''}}</td>
148
161
  <td style="text-align: center;">{{row.f_address_detail ? row.f_address + row.f_address_detail : row.f_address}}</td>
149
162
  <td style="text-align: center;">{{row.f_user_state}}</td>
163
+
164
+ <td style="text-align: center;">{{row.f_user_type}}</td>
165
+ <td style="text-align: center;">{{row.f_usestate}}</td>
166
+ <td style="text-align: center;">{{row.f_table_state}}</td>
150
167
  <td style="text-align: center;">{{row.f_meter_classify}}</td>
168
+ <td style="text-align: center;">{{row.f_meter_brand}}</td>
169
+
170
+ <td style="text-align: center;">{{row.f_meter_style}}</td>
171
+ <td style="text-align: center;">{{row.f_whether_hairpin}}</td>
172
+ <td style="text-align: center;">{{row.f_user_nature}}</td>
173
+ <td style="text-align: center;">{{row.f_usetype}}</td>
174
+ <td style="text-align: center;">{{row.f_inputtor}}</td>
175
+
176
+ <td style="text-align: center;">{{row.f_hand_month}}</td>
151
177
  <td style="text-align: center;">{{row.f_adjustable_name}}</td>
152
- <td style="text-align: center;">{{row.f_book_slice_area}}</td>
178
+ <td style="text-align: center;">{{row.f_comments}}</td>
153
179
  </template>
154
180
  </data-grid>
155
181
  </criteria-paged>
@@ -327,17 +327,23 @@
327
327
  </div>
328
328
  </td>
329
329
  <td style="text-align: center;">
330
+ <!-- 民用-->
330
331
  <div v-if="!(row.f_user_type==='非民用')">
331
332
  {{ row.f_last_tablebase }}
332
333
  </div>
333
- <div v-if="row.f_user_type==='非民用' && row.f_meter_state === '未抄表' && row.states !== 0">
334
+ <!-- 非民用、未抄表、states!=0-->
335
+ <div v-if="row.f_user_type==='非民用' && row.f_meter_state === '未抄表' && row.states !== 0 && ($parent.$parent.$parent.inputType==='rw' && $index+1===$parent.$parent.$parent.inputIndex)">
334
336
  <input type="text" class="form-control" v-model="row.f_last_tablebase"
335
337
  @blur="$parent.$parent.$parent.enter(row)"
336
338
  v-next-el="{id: $index+1}" :id="$index" style="width: 100px;padding: 6px;"
337
339
  :disabled="row.state === '开始'"
338
- @change="row.f_card_reason = '替换表抄表'"
340
+ @change="$parent.$parent.$parent.inputType='ro'"
339
341
  @focus="$parent.$parent.$parent.clearError(row)">
340
342
  </div>
343
+ <div v-if="row.f_user_type==='非民用' && row.f_meter_state === '未抄表' && row.states !== 0 && $parent.$parent.$parent.inputType!=='rw'">
344
+ {{ row.f_last_tablebase }}
345
+ </div>
346
+ <!-- 非民用、未抄表、states=0-->
341
347
  <div v-if="row.f_user_type==='非民用' && (row.f_meter_state !== '未抄表' || row.states === 0)">
342
348
  {{ row.f_last_tablebase }}
343
349
  </div>
@@ -464,10 +470,17 @@
464
470
  <button type="button" name="button" class="btn btn-link"
465
471
  @click.stop="$parent.$parent.$parent.nopass(row)"
466
472
  v-if="row.f_meter_state === '待审核' && $parent.$parent.$parent.jurisdiction.includes('审核权限')">不通过</button>-->
467
- <button type="button" name="button" class="button_search button_spacing width-60" title="权限名称:(卡表抄表冲正)"
468
- @click.stop="$parent.$parent.$parent.cardhandCenter(row)"
469
- v-if="row.f_meter_state === '已抄表'">冲正
470
- </button>
473
+ <nobr>
474
+ <button type="button" name="button" class="button_search button_spacing width-60" title="权限名称:(卡表抄表冲正)"
475
+ @click.stop="$parent.$parent.$parent.cardhandCenter(row)"
476
+ v-if="row.f_meter_state === '已抄表'">冲正
477
+ </button>
478
+ <button type="button" name="button" class="button_search button_spacing width-60" title="替换表抄表"
479
+ @click.stop="$parent.$parent.$parent.changeInput(row,$index+1)"
480
+ v-if="row.f_user_type==='非民用' && row.f_meter_state === '未抄表' && row.states !== 0">
481
+ 替换表抄表
482
+ </button>
483
+ </nobr>
471
484
  </td>
472
485
  <td><span title="{{row.f_card_reason}}"
473
486
  v-if="row.f_card_reason">{{ row.f_card_reason.substring(0, 5) }} ...</span>
@@ -589,7 +602,10 @@ export default {
589
602
  initres: {
590
603
  org: [this.$login.f.orgid]
591
604
  },
592
- orgCondtionStr: ''
605
+ orgCondtionStr: '',
606
+ inputType: 'ro',
607
+ inputIndex: -1,
608
+ f_cardhand_type: null,
593
609
  }
594
610
  },
595
611
  beforeDestroy () {
@@ -748,6 +764,7 @@ export default {
748
764
  row.f_total_fee = row.total_fee
749
765
  // 余气量=累购-(本期指数-表初始指数)
750
766
  row.f_shengyu_gas = (row.f_total_gas - (row.f_tablebase - row.f_initial_base)).toFixed(2)
767
+ row.f_cardhand_type = this.f_cardhand_type
751
768
  console.log('录入完毕。。', row)
752
769
  this.$resetpost('rs/logic/cardCommonEnter', row, {resolveMsg: null, rejectMsg: '录入数据出错!!!'}).then((res) => {
753
770
  console.log('返回数据', res)
@@ -760,6 +777,7 @@ export default {
760
777
  } else {
761
778
 
762
779
  }
780
+ this.f_cardhand_type = null
763
781
  },
764
782
  batchAudit () {
765
783
  // 批量审核
@@ -790,6 +808,11 @@ export default {
790
808
  nopass (row) {
791
809
  co(modifyGen(this, row, 'rs/logic/cardhandnopass'))
792
810
  },
811
+ changeInput(row,num){
812
+ this.inputType = 'rw'
813
+ this.inputIndex = num
814
+ this.f_cardhand_type='替换表抄表'
815
+ },
793
816
  cardhandCenter (row) {
794
817
  // let load = new HttpResetClass()
795
818
  // load.load('POST', 'rs/logic/Correct', {data: row}, {warnMsg: null, resolveMsg: null})
@@ -225,6 +225,7 @@
225
225
  <div style="text-align:right; height: 25%">
226
226
  <strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
227
227
  <strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
228
+ <strong style="font-size: large" v-if="deductdetail">{{deductdetail ? deductdetail : ' 暂无'}}</strong><br/>
228
229
  <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm|| model.f_preamount === 0"
229
230
  :payment.sync="model.f_payment" :payment-data="paytype"
230
231
  @confirm-payment="confirm()">
@@ -278,7 +279,13 @@
278
279
  self.model.f_pregas = Math.floor(getGas.data.gas - 0)
279
280
  }
280
281
  }
281
- self.model.f_totalcost = ((self.row.f_balance - 0) >= (self.model.f_preamount - 0) ? 0 : (self.model.f_preamount - 0 - self.row.f_balance))
282
+ self.model.getDeduct = 0
283
+ // 计算抵扣包间费用抵扣金额
284
+ if (self.row.f_project_money && self.row.f_project_money > 0) {
285
+ self.model.getDeduct = (self.$CommonService.getDeduct(self.row, self.model.f_pregas) - 0)
286
+ }
287
+ // end
288
+ self.model.f_totalcost = ((self.row.f_balance - 0) >= ((self.model.f_preamount - 0) + self.model.getDeduct) ? 0 : ((self.model.f_preamount - 0) + self.model.getDeduct) - self.row.f_balance)
282
289
 
283
290
  self.model.chargeprice = getGas.data.chargeprice
284
291
  Object.assign(self.model, self.model, getGas.data)
@@ -290,7 +297,7 @@
290
297
  self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
291
298
  }
292
299
  self.model.f_preamount = (calFee - (self.dymoney - 0)).toFixed(self.row.f_fee_decimal || 4)
293
- self.calText(getGas.data.chargeprice)
300
+ self.calText(getGas.data.chargeprice, self.model.getDeduct)
294
301
  }
295
302
 
296
303
  // 输入气量,换算金额
@@ -303,8 +310,13 @@
303
310
  if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
304
311
  self.model.f_meter_type = self.row.f_meter_type
305
312
  let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
313
+ self.model.getDeduct = 0
314
+ // 计算抵扣包间费用抵扣金额
315
+ if (self.row.f_project_money && self.row.f_project_money > 0) {
316
+ self.model.getDeduct = (self.$CommonService.getDeduct(self.row, self.model.f_pregas) - 0)
317
+ }
306
318
  self.model.f_preamount = getAmount.data.chargenum.toFixed(self.row.f_fee_decimal || 4)
307
- self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4))
319
+ self.model.f_totalcost = ((self.row.f_balance - 0) > ((getAmount.data.chargenum - 0) + self.model.getDeduct - 0) ? 0 : (((getAmount.data.chargenum - 0) + self.model.getDeduct - 0) - (self.row.f_balance - 0)).toFixed(self.row.f_fee_decimal || 4))
308
320
  Object.assign(self.model, self.model, getAmount.data)
309
321
  self.model.chargeprice = getAmount.data.chargeprice
310
322
  if (self.model.f_payment == '赠气') {
@@ -316,7 +328,7 @@
316
328
  self.model.f_collection = Math.ceil(self.model.f_collection)
317
329
  }
318
330
  }
319
- self.calText(getAmount.data.chargeprice)
331
+ self.calText(getAmount.data.chargeprice, self.model.getDeduct)
320
332
  }
321
333
  }
322
334
  // 执行保存逻辑
@@ -399,7 +411,7 @@
399
411
  }
400
412
  }
401
413
  } else {
402
- self.$dispatch('success', '卡表收费')
414
+ self.$dispatch('success', '卡表收费', self.row)
403
415
  }
404
416
  self.clickConfirm = false
405
417
  } catch (error) {
@@ -495,7 +507,7 @@
495
507
  self.$dispatch('refresh', self.row)
496
508
  } else {
497
509
  self.$resetpost('rs/logic/writeCardAgin', getNoWriteCard.data[0], {resolveMsg: '重新写卡成功', rejectMsg: '重新写卡失败'})
498
- self.$dispatch('success', '卡表收费')
510
+ self.$dispatch('success', '卡表收费', self.row)
499
511
  }
500
512
  } else {
501
513
  self.$dispatch('refresh', self.row)
@@ -547,9 +559,11 @@
547
559
  f_privilege_id: 0,
548
560
  f_privilege_money: 0,
549
561
  f_privilege_gas: 0,
550
- f_after_discount: 0
562
+ f_after_discount: 0,
563
+ getDeduct: 0
551
564
  },
552
565
  calculatedetail: '',
566
+ deductdetail: '',
553
567
 
554
568
  // 启用发票管理需要对票号进行验证
555
569
  hasValidateBill: false,
@@ -677,7 +691,7 @@
677
691
  async calculatePreByCollection () {
678
692
  console.log('调用了')
679
693
  try {
680
- // this.model.f_collection = (this.model.f_collection - 0)
694
+ this.model.f_collection = (this.model.f_collection - 0)
681
695
  let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
682
696
  // 通过收款进行划价
683
697
  let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
@@ -687,7 +701,13 @@
687
701
  Object.assign(this.model, this.model, dymoney2.data)
688
702
  this.model.f_totalcost = ((this.row.f_balance - 0) > (dymoney2.data.chargenum - 0) ? 0 : ((dymoney2.data.chargenum - 0) - (this.row.f_balance - 0)).toFixed(this.row.f_fee_decimal || 4))
689
703
  this.model.f_preamount = dymoney2.data.chargenum
690
- this.calText(dymoney2.data.chargeprice)
704
+ this.model.getDeduct = 0
705
+ if (this.row.f_project_money && this.row.f_project_money > 0) {
706
+ this.model.getDeduct = (this.$CommonService.getDeduct(this.row, this.model.f_pregas) - 0)
707
+ this.model.f_totalcost = this.model.f_totalcost + this.model.getDeduct
708
+ this.model.f_collection = this.model.f_collection + this.model.getDeduct
709
+ }
710
+ this.calText(dymoney2.data.chargeprice, this.model.getDeduct)
691
711
  } catch (error) {
692
712
  this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
693
713
  this.$dispatch('error', '发卡售气', this.model, error)
@@ -805,7 +825,7 @@
805
825
  this.$dispatch('error', '发卡售气', this.model, error)
806
826
  }
807
827
  },
808
- calText (val) {
828
+ calText (val, getDeduct = 0) {
809
829
  let str = ''
810
830
  let num = 0
811
831
  val.forEach((item) => {
@@ -818,6 +838,13 @@
818
838
  str = str + item.f_price + ' x ' + Math.floor(item.f_gas) + '+'
819
839
  }
820
840
  })
841
+ if (getDeduct > 0) {
842
+ if ((this.model.f_pregas * this.row.f_gas_type) > this.row.f_project_money) {
843
+ this.deductdetail = '当前未结金额' + this.row.f_project_money + '元,不足抵扣,以未结金额为准'
844
+ } else {
845
+ this.deductdetail = '未结金额计算公式:' + this.row.f_gas_type + ' x ' + this.model.f_pregas + '=' + getDeduct
846
+ }
847
+ }
821
848
  str = str.slice(0, str.length - 1)
822
849
  this.calculatedetail = str
823
850
  if (num > 1) {
@@ -285,6 +285,11 @@
285
285
  condition="f_sellinggas_operate_date <= '{}'">
286
286
  </datepicker>
287
287
  </div>
288
+ <div class="col-sm-2 form-group">
289
+ <label class="font_normal_body">防盗卡号</label>
290
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_defendcard"
291
+ condition="f_defendcard = '{}' " placeholder="防盗卡号">
292
+ </div>
288
293
  </div>
289
294
  </div>
290
295
  </criteria>