sale-client 3.6.457 → 3.6.459

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,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.67:30785/', 'http://localhost:8080/', 'http://192.168.50.67:30785']
4
+ const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.67:30785/', 'http://192.168.50.67:30785/', 'http://192.168.50.67:30785']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.457",
3
+ "version": "3.6.459",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -124,21 +124,21 @@
124
124
  condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
125
125
  }
126
126
  }, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
127
+ if (res.data[0].f_meter_type) {
128
+ if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
129
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
130
+ self.$dispatch('cancel')
131
+ }
132
+ if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
133
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
134
+ self.$dispatch('cancel')
135
+ }
127
136
 
128
- if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
129
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
130
- self.$dispatch('cancel')
131
- }
132
- if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
133
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
134
- self.$dispatch('cancel')
135
- }
136
-
137
- if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
138
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
139
- self.$dispatch('cancel')
137
+ if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
138
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
139
+ self.$dispatch('cancel')
140
+ }
140
141
  }
141
-
142
142
  // 获取原来收费记录使用的发票类型
143
143
  let param = {
144
144
  id: self.data.id,
@@ -43,14 +43,16 @@
43
43
  <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
44
44
 
45
45
  <button class="btn btn-default" @click="$parent.$parent.Fileinput()">反盘导入</button>
46
- <export-excel :data="$parent.$parent.getCondition"
46
+
47
+ <export-excel :data="$parent.$parent.getCondition" ref="newhandplanExport"
47
48
  :field="$parent.$parent.getBankfield" :header="$parent.$parent.other"
48
49
  sqlurl="rs/logic/saleExport" sql-name="newhandplanQuery" template-name='送盘导出' btn-name="送盘导出"
49
50
  :choose-col="true"></export-excel>
50
51
  <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
51
52
  :field="$parent.$parent.getfield" :header="$parent.$parent.other"
52
53
  sqlurl="rs/logic/saleExport" sql-name="salehandplanQuery" template-name='抄表查询导出'
53
- :choose-col="true"></export-excel>
54
+ :choose-col="true" ref="salehandplanExport"></export-excel>
55
+
54
56
  <print-data :sum-field="$parent.$parent.getfield" :model="$parent.model" :field="$parent.$parent.getfield"
55
57
  :defaultfield="$parent.$parent.defaultfield" print-name="抄表查询打印"
56
58
  titletable="抄表查询"
@@ -820,21 +822,21 @@
820
822
  'f_stair3amount': '三阶气量',
821
823
  'f_stair3price': '三阶单价',
822
824
  'f_stair3fee': '三阶气费',
823
- 'f_rest_date': '所属年月'}
825
+ 'f_rest_date': '所属年月'},
826
+ batchBankConfig2: {'f_userinfo_code': '客户编号',
827
+ 'f_userinfo_id': '用户编号',
828
+ 'phone': '客户电话',
829
+ 'f_user_name': '客户姓名',
830
+ 'f_address': '客户地址',
831
+ 'f_bank_accopen': '银行户名',
832
+ 'f_bank_pay_number': '缴费编号',
833
+ 'f_bank_account': '银行开户账号',
834
+ 'f_paper_account': '开户行及账号',
835
+ 'f_bank_name': '银行名称',
836
+ 'f_oughtfee': '欠费金额',
837
+ 'f_balance': '上期余额',
838
+ 'f_comments': '备注'}
824
839
  },
825
- batchBankConfig2: {'f_userinfo_code': '客户编号',
826
- 'f_userinfo_id': '用户编号',
827
- 'phone': '客户电话',
828
- 'f_user_name': '客户姓名',
829
- 'f_address': '客户地址',
830
- 'f_bank_accopen': '银行户名',
831
- 'f_bank_pay_number': '缴费编号',
832
- 'f_bank_account': '银行开户账号',
833
- 'f_paper_account': '开户行及账号',
834
- 'f_bank_name': '银行名称',
835
- 'f_oughtfee': '欠费金额',
836
- 'f_balance': '上期余额',
837
- 'f_comments': '备注'},
838
840
  batchmoneyShow: false,
839
841
  prices: [],
840
842
  bgl: [{label: '全部', value: ''}, {label: '有', value: '1'}, {label: '无', value: '0'}],
@@ -1117,11 +1119,14 @@
1117
1119
  console.log('obj:----------', obj)
1118
1120
  this.orgCondtionStr = condition
1119
1121
  },
1120
- stamp () {
1122
+ stamp (type) {
1121
1123
  this.all = false
1122
- // 默认选择要打印的列
1123
- this.modelval = this.defaultPrint1
1124
- this.fields = this.getfield
1124
+ if (type === 'newhandplan') {
1125
+ this.fields = this.getBankfield()
1126
+ } else if (type === 'salehandplan') {
1127
+ this.fields = this.getfield()
1128
+ this.modelval = this.defaultPrint
1129
+ }
1125
1130
  this.printshow = true
1126
1131
  this.put()
1127
1132
  },
@@ -1239,7 +1244,7 @@
1239
1244
  return this.config.excelHeaders
1240
1245
  },
1241
1246
  getBankfield () {
1242
- return this.batchBankConfig2
1247
+ return this.config.batchBankConfig2
1243
1248
  },
1244
1249
  usertypes () {
1245
1250
  return [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')]
@@ -1345,6 +1350,20 @@
1345
1350
  }, 3000)
1346
1351
  }
1347
1352
  }
1353
+ },
1354
+ mounted () {
1355
+ this.$refs.newhandplanExport.$el.querySelector('button').addEventListener('click', (e) => {
1356
+ e.stopPropagation()
1357
+ this.stamp('newhandplan')
1358
+ })
1359
+ this.$refs.salehandplanExport.$el.querySelector('button').addEventListener('click', (e) => {
1360
+ e.stopPropagation()
1361
+ this.stamp('salehandplan')
1362
+ })
1363
+ },
1364
+ beforeDestroy () {
1365
+ this.$refs.newhandplanExport.$el.querySelector('button').removeEventListener('click', this.stamp)
1366
+ this.$refs.salehandplanExport.$el.querySelector('button').removeEventListener('click', this.stamp)
1348
1367
  }
1349
1368
  }
1350
1369
  </script>
@@ -111,21 +111,21 @@
111
111
  condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
112
112
  }
113
113
  }, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
114
+ if (res.data[0].f_meter_type) {
115
+ if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
116
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
117
+ self.$dispatch('cancel')
118
+ }
119
+ if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
120
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
+ self.$dispatch('cancel')
122
+ }
114
123
 
115
- if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
116
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
117
- self.$dispatch('cancel')
118
- }
119
- if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
120
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
- self.$dispatch('cancel')
122
- }
123
-
124
- if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
125
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
126
- self.$dispatch('cancel')
124
+ if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
125
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
126
+ self.$dispatch('cancel')
127
+ }
127
128
  }
128
-
129
129
  // 获取原来收费记录使用的发票类型
130
130
  let param = {
131
131
  id: self.data.id,
@@ -152,7 +152,7 @@
152
152
  <!-- </span>-->
153
153
  <!-- </td>-->
154
154
  <!-- </tr>-->
155
- <tr>
155
+ <tr v-if="inspectionResult === '有隐患'">
156
156
  <td colspan="1">安检备注</td>
157
157
  <td colspan="3">{{model.f_repair_approved_note}}</td>
158
158
  </tr>
@@ -112,21 +112,21 @@ import {HttpResetClass} from 'vue-client'
112
112
  condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
113
113
  }
114
114
  }, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
115
+ if (res.data[0].f_meter_type) {
116
+ if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
117
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
118
+ self.$dispatch('cancel')
119
+ }
120
+ if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
121
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
122
+ self.$dispatch('cancel')
123
+ }
115
124
 
116
- if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
117
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
118
- self.$dispatch('cancel')
119
- }
120
- if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
121
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
122
- self.$dispatch('cancel')
123
- }
124
-
125
- if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
126
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
127
- self.$dispatch('cancel')
125
+ if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
126
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
127
+ self.$dispatch('cancel')
128
+ }
128
129
  }
129
-
130
130
  // 获取原来收费记录使用的发票类型
131
131
  let param = {
132
132
  id: self.data.id,
@@ -106,21 +106,21 @@
106
106
  condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
107
107
  }
108
108
  }, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
109
+ if (res.data[0].f_meter_type) {
110
+ if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
111
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
112
+ self.$dispatch('cancel')
113
+ }
114
+ if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
115
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
116
+ self.$dispatch('cancel')
117
+ }
109
118
 
110
- if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
111
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
112
- self.$dispatch('cancel')
113
- }
114
- if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
115
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
116
- self.$dispatch('cancel')
117
- }
118
-
119
- if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
120
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
- self.$dispatch('cancel')
119
+ if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
120
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
+ self.$dispatch('cancel')
122
+ }
122
123
  }
123
-
124
124
  // 获取原来收费记录使用的发票类型
125
125
  let param = {
126
126
  id: self.data.id,
@@ -131,7 +131,7 @@
131
131
  >
132
132
  </v-select>
133
133
  </div>
134
- <div class="col-sm-12 form-group" id="f_comments" :class="[$v.f_yc_comments.required ? 'has-error' : 'has-success']"
134
+ <div class="col-sm-12 form-group" id="f_comments" :class="[$v.f_yc_comments.required ? 'has-error' : 'has-success']" title="参数名称:【移出重点用户原因】"
135
135
  v-if=" model.f_black_state == '已拉黑' || model.f_black_state == '移出拉黑审核'">
136
136
  <label for="f_comments" class=" font_normal_body">移出原因</label>
137
137
  <input type="text" v-model="model.f_yc_comments" v-show="false"
@@ -117,7 +117,7 @@
117
117
  >
118
118
  </v-select>
119
119
  </div>
120
- <div class="col-sm-2 form-group" :class="{'col-sm-2':!$parent.$parent.$parent.isdetail, 'col-sm-3':$parent.$parent.$parent.isdetail}" >
120
+ <div class="col-sm-2 form-group" :class="{'col-sm-2':!$parent.$parent.$parent.isdetail, 'col-sm-3':$parent.$parent.$parent.isdetail}" title="参数名称:【移出重点用户原因】">
121
121
  <label class=" font_normal_body">移出原因</label>
122
122
  <v-select
123
123
  :value.sync="model.f_black_comments1"
@@ -255,7 +255,7 @@
255
255
  data () {
256
256
  return {
257
257
  fcomments: this.$appdata.getParam('移入原因') ? [ ...this.$appdata.getParam('移入原因')] : [],
258
- fcomments1: this.$appdata.getParam('移出原因') ? [ ...this.$appdata.getParam('移出原因')] : [],
258
+ fcomments1: this.$appdata.getParam('移出重点用户原因') ? [ ...this.$appdata.getParam('移出重点用户原因')] : [],
259
259
  KeyModel: {
260
260
  f_opr_state: '移入',
261
261
  f_comments: '',
@@ -368,7 +368,7 @@
368
368
  }
369
369
  if (this.authArr.includes('冲正权限')) {
370
370
 
371
- if (!this.config.cancletime && !this.$login.f.rolesnames.includes('财务')) {
371
+ if (!this.config.cancletime && !this.$login.f.rolesnames.includes('财务退款')) {
372
372
  if (!this.config.cancleother) {
373
373
  if (row.f_operator != this.$login.f.name) {
374
374
  this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
@@ -106,19 +106,20 @@
106
106
  condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
107
107
  }
108
108
  }, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
109
+ if (res.data[0].f_meter_type) {
110
+ if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
111
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
112
+ self.$dispatch('cancel')
113
+ }
114
+ if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
115
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
116
+ self.$dispatch('cancel')
117
+ }
109
118
 
110
- if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
111
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
112
- self.$dispatch('cancel')
113
- }
114
- if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
115
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
116
- self.$dispatch('cancel')
117
- }
118
-
119
- if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
120
- self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
- self.$dispatch('cancel')
119
+ if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
120
+ self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
121
+ self.$dispatch('cancel')
122
+ }
122
123
  }
123
124
 
124
125
  // 获取原来收费记录使用的发票类型
@@ -111,9 +111,14 @@
111
111
  <div class="row auto" style="margin-left: 10px;">
112
112
  <div class="col-sm-6 form-group" style="padding-right: 5px;" v-if="devicesinfoShow">
113
113
  <label class="font_normal_body">到期日期</label>
114
- <input type="test" class="input_search" style="width: 60%" v-model="row.f_expire_date"
115
- :value.sync="row.f_expire_date"
116
- placeholder="到期日期" disabled></input>
114
+ <datepicker placeholder="到期日期" style="width: 60%"
115
+ v-model="row.f_expire_date"
116
+ :value.sync="row.f_expire_date"
117
+ :format="'yyyy-MM-dd'">
118
+ </datepicker>
119
+ <!-- <input type="test" class="input_search" style="width: 60%" v-model="row.f_expire_date"-->
120
+ <!-- :value.sync="row.f_expire_date"-->
121
+ <!-- placeholder="到期日期" ></input>-->
117
122
  </div>
118
123
  <div class="col-sm-6 form-group" style="padding-right: 5px;">
119
124
  <label class="font_normal_body">设备数量</label>
@@ -437,7 +442,8 @@ export default {
437
442
  f_devices_type: '家用灶具',
438
443
  f_input_person: this.f_input_person,
439
444
  f_userinfodevices_state: '正常',
440
- f_input_date: this.$login.toStandardTimeString()
445
+ f_input_date: this.$login.toStandardTimeString(),
446
+ f_expire_date: this.$login.toStandardDateString()
441
447
  })
442
448
  },
443
449
  closeModal () {
@@ -0,0 +1,309 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='a' @valid="addressValid(true)" @invalid="addressValid(false)">
4
+ <form class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4">
7
+ <label class="font_normal_body">用户姓名</label>
8
+ <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
9
+ </div>
10
+ <div class="col-sm-4">
11
+ <label class="font_normal_body">换表类型</label>
12
+ <input type="text" v-model="model.f_type" disabled=disabled style="width: 60%" class="input_search">
13
+ </div>
14
+ <div class="col-sm-4">
15
+ <label class="font_normal_body">换表费&emsp;</label>
16
+ <input type="text" v-model="model.f_changemeter_fee" disabled=disabled style="width: 60%" class="input_search">
17
+ </div>
18
+ </div>
19
+
20
+ <div class="row">
21
+ <div class="col-sm-4">
22
+ <label class="font_normal_body">旧表号&emsp;</label>
23
+ <input type="text" v-model="model.f_meternumber_old" disabled=disabled style="width: 60%" class="input_search">
24
+ </div>
25
+ <div class="col-sm-4">
26
+ <label class="font_normal_body">新表号&emsp;</label>
27
+ <input type="text" v-model="model.f_meternumber" disabled=disabled style="width: 60%" class="input_search">
28
+ </div>
29
+ <div class="col-sm-4">
30
+ <label class="font_normal_body">旧表品牌</label>
31
+ <input type="text" v-model="model.f_meter_brand_old" disabled=disabled style="width: 60%" class="input_search">
32
+ </div>
33
+ </div>
34
+
35
+ <div class="row">
36
+ <div class="col-sm-4">
37
+ <label class="font_normal_body">新表品牌</label>
38
+ <input type="text" v-model="model.f_meter_brand" disabled=disabled style="width: 60%" class="input_search">
39
+ </div>
40
+ <div class="col-sm-4">
41
+ <label class="font_normal_body">补气量&emsp;</label>
42
+ <input type="text" v-model="model.f_remanent_gas" disabled=disabled style="width: 60%" class="input_search">
43
+ </div>
44
+ <div class="col-sm-4">
45
+ <label class="font_normal_body">补气金额</label>
46
+ <input type="text" v-model="model.f_remanent_money" disabled=disabled style="width: 60%" class="input_search">
47
+ </div>
48
+ </div>
49
+ <div class="row">
50
+ <div class="col-sm-4">
51
+ <label class="font_normal_body">换表状态</label>
52
+ <input type="text" v-model="model.f_state" disabled=disabled style="width: 60%" class="input_search">
53
+ <!-- <v-select :value.sync="model.f_changemeter_state" v-model="model.f_changemeter_state"-->
54
+ <!-- :options='changestate' placeholder='换表状态'-->
55
+ <!-- :value-single="true"-->
56
+ <!-- :search="false"-->
57
+ <!-- close-on-select></v-select>-->
58
+
59
+ </div>
60
+
61
+ </div>
62
+ <div class="row">
63
+ <div class="col-sm-4">
64
+ <label class="font_normal_body">换表人&emsp;</label>
65
+ <input type="text" v-model="model.f_change_operator" style="width: 60%" class="input_search">
66
+ </div>
67
+ <div class="col-sm-4 form-group">
68
+ <label class="font_normal_body" title="参数:操作人员查询">操作人员</label>
69
+ <v-select :value.sync="model.f_operatorid"
70
+ v-model="model.f_operatorid"
71
+ :value-single="true" @change="selectoperator()"
72
+ :options='foperator'
73
+ close-on-select></v-select>
74
+ <!-- @click="selectoperator"-->
75
+ </div>
76
+ <div class="col-sm-4">
77
+ <label class="font_normal_body">换表日期</label>
78
+ <datepicker placeholder="换表日期" style="width: 60%"
79
+ v-model="model.f_operate_date"
80
+ :value.sync="model.f_operate_date"
81
+ :format="'yyyy-MM-dd HH:mm:ss'">
82
+ </datepicker>
83
+ </div>
84
+ </div>
85
+ <div class="row">
86
+ <div class="col-sm-8">
87
+ <label class="font_normal_body">地&emsp;&emsp;址</label>
88
+ <input type="text" v-model="model.f_address" disabled=disabled style="width: 80%" class="input_search">
89
+ </div>
90
+ </div>
91
+ <!-- <div class="row">-->
92
+ <!-- <div class="col-sm-4">-->
93
+ <!-- <label class="font_normal_body">下发日期</label>-->
94
+ <!-- <datepicker id="f_hand_date"-->
95
+ <!-- placeholder="下发日期"-->
96
+ <!-- style="width:60%"-->
97
+ <!-- v-model="model.f_hand_date"-->
98
+ <!-- :value.sync="model.f_hand_date"-->
99
+ <!-- :format="'yyyy-MM-dd HH:mm:ss'"-->
100
+ <!-- >-->
101
+ <!-- </datepicker>-->
102
+ <!-- </div>-->
103
+ <!-- -->
104
+
105
+ <!-- </div>-->
106
+
107
+ <div class="row">
108
+ <div class="col-sm-8">
109
+ <label class="font_normal_body">换表原因</label>
110
+ <input type="text" v-model="model.f_comments" style="width: 80%" class="input_search">
111
+ </div>
112
+ </div>
113
+
114
+ <div class="row">
115
+ <div class="col-sm-8">
116
+ <label class="font_normal_body">换表单号</label>
117
+ <input type="text" v-model="model.f_serial_number" style="width: 80%" class="input_search">
118
+ </div>
119
+ </div>
120
+
121
+ <div class="row">
122
+ <div class="col-sm-8">
123
+ <label class="font_normal_body">其他备注</label>
124
+ <input type="text" v-model="model.f_othereason" style="width: 80%" class="input_search">
125
+ </div>
126
+ </div>
127
+ </form>
128
+ <div style="float: right">
129
+ <button class="button_search" @click="save">保存</button>
130
+ <button class="button_clear" @click="cancel">取消</button>
131
+ </div>
132
+ </validator>
133
+ <modal :show.sync="showfiles" width="80%"style="width:auto;" v-ref:modal middle backdrop="false">
134
+ <article slot="modal-body">
135
+ <upload :blodid="model.f_userinfo_id" :businessid="model.id" v-ref:upload fusetype="换表" isremark="true" style="width:auto" ></upload>
136
+ </article>
137
+ <footer slot="modal-footer" class="modal-footer">
138
+ </footer>
139
+ </modal>
140
+ <!--文件上传按钮-->
141
+ <button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>
142
+ </div>
143
+ </template>
144
+ <script>
145
+ import Vue from 'vue'
146
+ import {HttpResetClass} from 'vue-client'
147
+ import * as Util from "../../Util";
148
+ var data
149
+ let readyGen = async function (self) {
150
+ await self.$LoadParams.loadParam(self.f_filialeid)
151
+ await self.$GetSaleParam.initinputtor()
152
+ await self.initoperator()
153
+ }
154
+ export default {
155
+ title: '基本信息',
156
+
157
+ data () {
158
+ return {
159
+ uploadText: '换表',
160
+ // 构建数组来存储对象
161
+ editbank: true,
162
+ recordList: [],
163
+ foperator: [],
164
+ changestate: [{label: '有效', value: '有效'}, {label: '无效', value: '无效'}],
165
+ showfiles: false,
166
+ // meterstate:[{label:'已抄',value:'已抄'},{label:'未抄',value:'未抄'}],
167
+ // handstate:[{label:'有效',value:'有效'},{label:'冲正',value:'冲正'},{label:'作废',value:'作废'},{label:'待审核',value:'待审核'}],
168
+ fileNameSet: {
169
+ 'f_change_operator': '换表人',
170
+ 'f_operate_date': '换表日期',
171
+ 'f_comments': '换表原因',
172
+ 'f_othereason': '其他备注',
173
+ 'f_serial_number': '换表单号'
174
+ // 'f_newtable_state':'新表状态'
175
+ }
176
+ }
177
+ },
178
+ props: {
179
+ oldmodel: Object,
180
+ model: Object
181
+ },
182
+
183
+ ready () {
184
+ this.oldmodel = JSON.parse(JSON.stringify(this.model))
185
+ readyGen(this)
186
+ },
187
+ created () {
188
+ },
189
+ methods: {
190
+ initoperator(){
191
+
192
+ this.foperator=[]
193
+ console.log("this.$login",this.$login,this.oldmodel,this.model)
194
+ let arr = this.$GetSaleParam.inputtors.filter((res) => {
195
+ if (res.rolestr != null && res.rolestr != '') {
196
+ return res.rolestr.indexOf('营业员') > -1 && res.f_department_name == this.model.f_depname
197
+ }
198
+ })
199
+ arr.forEach((res) => {
200
+ this.foperator.push({label: res.name, value: res.id})
201
+ })
202
+ },
203
+ selectoperator () {
204
+ let id = this.model.f_operatorid
205
+ if(!this.model.f_operatorid){
206
+ return
207
+ }
208
+ let http = new HttpResetClass()
209
+ http.load('POST', 'rs/sql/saleSingleTable',
210
+ {data:{tablename: 't_user',
211
+ condition: `id = '${id}'`}},
212
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
213
+ console.log('kanak,res', res)
214
+ if(res.data.length>0){
215
+ this.model.f_operator = res.data[0].name
216
+ }else{
217
+ this.model.f_operatorid = ''
218
+ this.$showAlert('操作员信息未找到','warning',2000)
219
+ }
220
+ console.log('this.f_operatorid', this.model.f_operator)
221
+ })
222
+ },
223
+ cancel () {
224
+ this.$dispatch('close')
225
+ },
226
+
227
+ uploadFiles () {
228
+ this.showfiles = !this.showfiles
229
+ },
230
+ async save () {
231
+ for (var item in this.model) {
232
+ if (this.model[item] instanceof Array) {
233
+ this.model[item] = this.model[item].length > 0 ? this.model[item][0] : ''
234
+ }
235
+ if (this.model[item] != this.oldmodel[item]) {
236
+ var car = {
237
+ chinesename: this.fileNameSet[item],
238
+ fieldname: item,
239
+ tablename: 't_changetables',
240
+ oldvalue: this.oldmodel[item],
241
+ newvalue: this.model[item],
242
+ state: '有效',
243
+ modifitime: Util.toStandardTimeString(),
244
+ operator: this.$login.f.name,
245
+ changemeter_id: this.model.id,
246
+ f_operator: this.$login.f.name,
247
+ f_operatorid: this.$login.f.id,
248
+ f_orgid: this.$login.f.orgid,
249
+ f_orgname: this.$login.f.orgs,
250
+ f_depid: this.$login.f.depids,
251
+ f_depname: this.$login.f.deps
252
+ }
253
+ this.recordList.push(car)
254
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
255
+ console.log(car)
256
+ }
257
+ }
258
+ await this.$resetpost('rs/logic/saveChangeMeterRecord', {data: {recordlist: this.recordList, newData: this.model}})
259
+ // let changetablesData = {
260
+ // id: this.model.id,
261
+ // f_change_operator: this.model.f_change_operator,
262
+ // f_comments: this.model.f_comments,
263
+ // f_othereason: this.model.f_othereason,
264
+ // f_operate_date: this.model.f_operate_date
265
+ // }
266
+ let sqldata = `update t_changetables set
267
+ f_change_operator ='${this.model.f_change_operator}',
268
+ f_comments ='${this.model.f_comments}',
269
+ f_othereason ='${this.model.f_othereason}',
270
+ f_operate_date='${this.model.f_operate_date}',
271
+ f_serial_number='${this.model.f_serial_number}'
272
+ where id ='${this.model.id}'`
273
+ console.log('换表记录修正保存', sqldata)
274
+ await this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: null})
275
+ // await this.$resetpost('rs/entity/t_changetables', changetablesData, {resolveMsg: '修改成功', rejectMsg: '未通过,修改出错!!!'})
276
+ // console.log('this.model', this.model)
277
+ this.$dispatch('close')
278
+ }
279
+ },
280
+ computed: {
281
+ meterstate () {
282
+ return this.$appdata.getParam('抄表状态')
283
+ },
284
+
285
+ inputtores () {
286
+ // 获取抄表员
287
+ console.log('获取抄表员', this.$login.f)
288
+ let rs = new Array()
289
+ if (this.$login.f.f_gasman.length > 0) {
290
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
291
+ let temp = {
292
+ label: this.$login.f.f_gasman[i].name,
293
+ value: this.$login.f.f_gasman[i].name
294
+ }
295
+ rs.push(temp)
296
+ }
297
+ }
298
+ // let rs = this.$appdata.getParam('抄表员')
299
+ return rs
300
+ }
301
+
302
+ },
303
+ watch: {
304
+ 'model'(){
305
+ this.initoperator()
306
+ }
307
+ }
308
+ }
309
+ </script>
@@ -53,4 +53,6 @@ export default function () {
53
53
  Vue.component('meter-message', (resolve) => { require(['./MeterMessage'], resolve) })
54
54
  // 换表记录维护列表
55
55
  Vue.component('changemeter-list-maintain', (resolve) => { require(['./changemeterListMaintain'], resolve) })
56
+ // 换表具体信息
57
+ Vue.component('changemeter-operate', (resolve) => { require(['./changemeterOperate'], resolve) })
56
58
  }