sale-client 3.5.2 → 3.5.3

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": "sale-client",
3
- "version": "3.5.2",
3
+ "version": "3.5.3",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -437,6 +437,7 @@
437
437
  </div>
438
438
  </article>
439
439
  <footer slot="modal-footer" class="modal-footer">
440
+ <button class="button_search button_spacing" type="button" @click="goChargeManage()">去收费</button>
440
441
  <button class="button_search button_spacing" type="button" @click="doCopy()">复制</button>
441
442
  <button class="button_search button_spacing" type="button" @click="close2()">取消</button>
442
443
  </footer>
@@ -636,6 +637,9 @@ let loadParamGem = async function (self) {
636
637
  this.isShowDetailInfo = true
637
638
  this.rowData = obj
638
639
  },
640
+ goChargeManage () {
641
+ this.$goto('charge-manage', {f: this.$login.f}, 'main')
642
+ },
639
643
  async doCopy () {
640
644
  await this.$copyText(this.resdata)
641
645
  this.resshow = false
@@ -1,8 +1,5 @@
1
1
  <template>
2
2
  <div>
3
- <div style="margin-bottom: 2%; margin-top: 2%">
4
- <button class="button_search" style="width: max-content" @click="phoneManage()">管理备用电话</button>
5
- </div>
6
3
  <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
7
4
  <form class="form-horizontal select-overspread ">
8
5
  <div class="row">
@@ -17,6 +14,7 @@
17
14
  <input type="text" maxlength="11" v-model="baseinfo.base.f_user_phone"
18
15
  v-validate:f_user_phone="{minlength: 11, maxlength: 11 }" class="input_search" style="width:60%"
19
16
  placeholder="客户电话" v-el:phone v-next-el="area">
17
+ <button type="button" class="glyphicon glyphicon-plus" @click.stop="phoneManage()"></button>
20
18
  </div>
21
19
  <div class="col-sm-4 form-group" style="" v-if="true">
22
20
  <label for="f_user_state" class="font_normal_body">&ensp;客户状态</label>
@@ -6,7 +6,7 @@
6
6
  <img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">
7
7
  <a style="font-size: 20px;font-weight: 500;">基本信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
8
8
  <button class="button_search" style="width: max-content" v-show="data.baseinfo.base.f_user_nature === '单位'" @click="showUserDevices($index, data.baseinfo)">用户设备信息</button>
9
- <button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>
9
+ <button class="button_search" style="width: max-content" @click="uploadFiles()">上传/查看附件</button>
10
10
  <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
11
11
  <button class="button_search" style="width: max-content" @click="openBankAccount()" v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户</button>
12
12
  </div>
@@ -93,7 +93,7 @@
93
93
  </div>
94
94
  <div class="row">
95
95
  <div class="col-sm-2"></div>
96
- <input v-if="fileSaveData.reason ==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
96
+ <input v-if="fileSaveData.reason==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
97
97
  </div>
98
98
  </article>
99
99
  <footer slot="modal-footer" class="modal-footer">
@@ -161,7 +161,7 @@ export default {
161
161
  bank: {
162
162
  f_bank_name: ''
163
163
  },
164
- //用户备用电话信息
164
+ // 用户备用电话信息
165
165
  userphonelist: []
166
166
  },
167
167
  addressinfo: {},
@@ -533,7 +533,7 @@ export default {
533
533
  f_meter_book_num: ''
534
534
  },
535
535
  bank: {},
536
- //用户备用电话信息
536
+ // 用户备用电话信息
537
537
  userphonelist: []
538
538
  },
539
539
  addressinfo: {
@@ -151,6 +151,7 @@
151
151
  </div>
152
152
  <div class="auto" style="float: right;">
153
153
  <button class="button_clear " @click="cancelmain()" >返回</button>
154
+ <button class="button_search" type="button" @click="goChargeManage">去收费</button>
154
155
  <button v-if="row.f_meter_brand.includes('西美')&&row.f_meter_type.includes('物联网表')"
155
156
  class="button_search" type="button" @click="clearBarrier">清除障碍</button>
156
157
  <button v-if="row.f_meter_type.includes('物联网表')"
@@ -316,6 +317,9 @@
316
317
  uuidA = s.join('');
317
318
  return uuidA;
318
319
  },
320
+ goChargeManage () {
321
+ this.$goto('charge-manage', {f: this.$login.f}, 'main')
322
+ },
319
323
  openUser () {
320
324
  this.$showMessage(`是否需要给用户进行开户?`, ['confirm', 'cancel']).then(async (res) => {
321
325
  if (res === 'confirm') {
@@ -104,6 +104,10 @@
104
104
  <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%" >燃气使用:</td>
105
105
  <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_usegas }}</td>
106
106
  </tr>
107
+ <tr>
108
+ <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%" >机械读数:</td>
109
+ <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ model.f_item_name ==='机械读数' ? '无': model.f_item_value }}</td>
110
+ </tr>
107
111
  <tr >
108
112
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">用户满意度:</td>
109
113
  <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;">{{ model.f_client_evaluation }}</td>
@@ -186,6 +186,8 @@ export default {
186
186
  if (owe.data.length > 0 && (!this.useraccount[0].f_meter_classify.includes('卡表'))) {
187
187
  this.$showAlert('该表有欠费,无法销户', 'warning', 3000)
188
188
  // this.$dispatch('button-specifies', {name:'机表收费', value: 'machine-charge'}, this.row)
189
+ } else if ((this.model.userinfo.f_meter_classify === '物联网表' && this.model.userinfo.f_balance_amount && this.model.userinfo.f_balance_amount > 0) || (this.model.userinfo.f_meter_classify !== '物联网表' && this.model.userinfo.f_balance && this.model.userinfo.f_balance > 0)) {
190
+ this.$showAlert('该表有余额,无法销户', 'warning', 3000)
189
191
  } else {
190
192
  await this.cancellation()
191
193
  }
@@ -80,7 +80,7 @@
80
80
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_mpc_state}}</nobr></td>
81
81
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_mpc_network}}</nobr></td>
82
82
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_last_message_date}}</nobr></td>
83
- <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_newmessage}}</nobr></td>
83
+ <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_new_message}}</nobr></td>
84
84
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_modify_user}}</nobr></td>
85
85
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.f_modify_date}}</nobr></td>
86
86
  <td v-show="$parent.$parent.$parent.listshow" style="text-align:center"><nobr>{{row.sumuserfiles}}</nobr></td>
@@ -28,6 +28,7 @@
28
28
  condition="f_address like '%{}%'" placeholder='客户地址'>
29
29
  </div>
30
30
  <div class="span" style="float:right;">
31
+ <button class="button_search button_spacing" @click="$parent.$parent.networking()">组网</button>
31
32
  <button class="button_search button_spacing" @click="$parent.$parent.meterRead()">抄表</button>
32
33
  <button class="button_search button_spacing" @click="$parent.$parent.confirmaddress()">取消关联</button>
33
34
  <button class="button_search button_spacing" @click="search()">查询</button>
@@ -292,6 +293,35 @@ export default {
292
293
  this.search()
293
294
  }
294
295
  },
296
+ async networking () {
297
+ let res = await this.$showMessage('确定对选择的表具进行组网操作吗?', ['confirm', 'cancel'])
298
+ if (res === 'confirm') {
299
+ let rowdata = this.$refs.paged.$refs.grid.getRowData()
300
+ if (rowdata.length <= 0) {
301
+ this.$showMessage('请至少选择一个表具!')
302
+ return
303
+ }
304
+ console.log(rowdata)
305
+ let userfilesids = []
306
+ for (let row of rowdata) {
307
+ userfilesids.push({
308
+ f_userfiles_id: row.f_userfiles_id,
309
+ f_meternumber: row.f_meternumber
310
+ })
311
+ }
312
+ let param = {
313
+ f_orgid: this.$login.f.orgid,
314
+ f_orgname: this.$login.f.name,
315
+ concentratorid: this.fileinfo.id,
316
+ f_mpc_number: this.fileinfo.f_mpc_number,
317
+ userfilesid: '',
318
+ userfilesids: userfilesids,
319
+ state: 'delete'
320
+ }
321
+ await this.$resetpost('rs/logic/concentratorNetWorking', param, {resolveMsg: '组网操作成功!', rejectMsg: '组网操作失败!'})
322
+ this.search()
323
+ }
324
+ },
295
325
  search () {
296
326
  this.$refs.paged.$refs.cri.search()
297
327
  },
@@ -955,9 +955,19 @@
955
955
  this.$showAlert(`请先查询用户信息`, 'warning', 2000)
956
956
  return
957
957
  }
958
- if (this.danhu.f_tablebase < this.danhu.info.f_tablebase) {
959
- this.$showAlert(`输入表底数信息有误上期底数为 ${this.danhu.info.f_tablebase}`, 'warning', 2000)
958
+ if (this.danhu.f_tablebase < 0) {
959
+ this.$showAlert(`底数不能小于0,请注意!`, 'warning', 2000)
960
960
  return
961
+ } else if (this.danhu.f_tablebase - parseInt(this.danhu.f_tablebase) !== 0) {
962
+ this.$showAlert(`底数只能输入整数,请注意!`, 'warning', 2000)
963
+ return
964
+ } else if (this.danhu.f_tablebase < this.danhu.info.f_tablebase && !this.danhu.info.f_capacity) {
965
+ this.$showAlert(`本期表底数不能低于上期表底数`, 'warning', 2000)
966
+ return
967
+ } else {
968
+ if (this.danhu.f_tablebase < this.danhu.info.f_tablebase) {
969
+ this.$showMessage('本次抄表已超越最大量程, 请熟知!')
970
+ }
961
971
  }
962
972
  let param = {
963
973
  downDate: this.downModel.downDate,
@@ -968,35 +978,36 @@
968
978
  f_operatorid: this.$login.f.id
969
979
  }
970
980
  console.log('下发参数:', param)
971
- await this.$resetpost('rs/logic/downHand', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
972
- console.log('下发计划成功')
973
- }).catch((error) => {
974
- this.danhu.show = false
975
- this.$showAlert(`下发失败,请注意查看,失败原因:` + JSON.toString(error), 'danger', 2000)
976
- })
977
- let hanid = await this.$resetpost('/rs/sql/querySingleTable', {
978
- data: {
979
- items: 'max(id) id',
980
- tablename: 't_handplan',
981
- condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `
982
- }
983
- }, {resolveMsg: null, rejectMsg: '查询抄表信息失败'})
984
- let handParam = {
985
- f_meter_classify: this.danhu.info.f_meter_classify,
986
- f_meter_brand: this.danhu.info.f_meter_brand,
987
- f_hand_id: hanid.data[0].id,
988
- f_tablebase: this.danhu.f_tablebase,
989
- f_userinfo_id: this.danhu.info.f_userinfo_id
990
- }
991
- await this.$resetpost('rs/logic/sale_commonEnter', {data: handParam}, {
992
- resolveMsg: null,
993
- rejectMsg: null
994
- }).then((res) => {
995
- this.$showAlert(`单户抄表成功!`, 'success', 2000)
996
- this.danhuShow()
981
+ this.$resetpost('rs/logic/downHand', {data: param}, {resolveMsg: null, rejectMsg: '下发失败,请检查该用户是否在该归属期内已有抄表记录'}).then((res) => {
982
+ console.log('下发计划成功', res)
983
+ this.$resetpost('/rs/sql/querySingleTable', {
984
+ data: {
985
+ items: 'max(id) id',
986
+ tablename: 't_handplan',
987
+ condition: ` f_userfiles_id = '${this.danhu.info.f_userfiles_id}' `
988
+ }
989
+ }, {resolveMsg: null, rejectMsg: '查询抄表信息失败'}).then((res2) => {
990
+ let handParam = {
991
+ f_meter_classify: this.danhu.info.f_meter_classify,
992
+ f_meter_brand: this.danhu.info.f_meter_brand,
993
+ f_hand_id: res2.data[0].id,
994
+ f_tablebase: this.danhu.f_tablebase,
995
+ f_userinfo_id: this.danhu.info.f_userinfo_id
996
+ }
997
+ this.$resetpost('rs/logic/sale_commonEnter', {data: handParam}, {
998
+ resolveMsg: null,
999
+ rejectMsg: null
1000
+ })
1001
+ }).then((res) => {
1002
+ this.$showAlert(`单户抄表成功!`, 'success', 2000)
1003
+ this.danhuShow()
1004
+ }).catch((error) => {
1005
+ this.danhu.show = false
1006
+ this.$showAlert(`单户抄表失败!` + JSON.toString(error), 'danger', 2000)
1007
+ })
997
1008
  }).catch((error) => {
998
1009
  this.danhu.show = false
999
- this.$showAlert(`单户抄表失败!` + JSON.toString(error), 'danger', 2000)
1010
+ this.$showAlert(`抄表失败,请注意查看,失败原因:` + JSON.toString(error), 'danger', 2000)
1000
1011
  })
1001
1012
  },
1002
1013
  // 获得本月的最后一天。
@@ -11,20 +11,19 @@ let cancelUserGen = function * (data, type) {
11
11
  if (owe.data === 1 && hasHandplan.data.length > 0) {
12
12
  Vue.showAlert('该客户还有欠费,不能销户!!', 'danger', 0)
13
13
  } else {
14
- yield Vue.resetpost('rs/logic/saveSingleCancellation', data, {resolveMsg: `${type}成功`, rejectMsg: `${type}失败`}).then(res=>{
15
- if(res && res.data){
16
- if(type =='销户'){
17
- if(!(res.data.isaudit==null)){
18
- if(res.data.isaudit == 1){
19
- Vue.showAlert('提交成功,等待管理审核!','success',2000);
20
- return;
14
+ yield Vue.resetpost('rs/logic/saveSingleCancellation', data, {resolveMsg: `${type}成功`, rejectMsg: `${type}失败`}).then(res => {
15
+ if (res && res.data) {
16
+ if (type === '销户') {
17
+ if (!(res.data.isaudit === null)) {
18
+ if (res.data.isaudit === 1) {
19
+ Vue.showAlert('提交成功,等待管理审核!', 'success', 2000)
20
+ return
21
21
  }
22
22
  }
23
23
  }
24
- Vue.showAlert('销户成功','success',2000);
24
+ Vue.showAlert('销户成功', 'success', 2000)
25
25
  }
26
26
  })
27
-
28
27
  }
29
28
  } else {
30
29
  Vue.resetpost('rs/logic/saveSingleCancellation', data, {resolveMsg: `${type}成功`, rejectMsg: `${type}失败`})
@@ -214,7 +213,6 @@ let FileService = {
214
213
  let data = {
215
214
  f_operat_type: operateType,
216
215
  f_describe: `${Vue.$login.f.name}对客户${model.userinfo.f_user_name}进行销户`,
217
- f_state: '有效',
218
216
  f_user_id: model.userinfo.f_user_id,
219
217
  f_user_name: model.userinfo.f_user_name,
220
218
  f_state: type === '启用' ? '正常' : '销户',