sale-client 3.5.238 → 3.5.239

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.
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "sale-client",
3
+ "version": "3.4.179-1",
4
+ "description": "收费模块前台组件",
5
+ "main": "src/index.js",
6
+ "scripts": {
7
+ "example": "node build/example-server.js",
8
+ "dev": "node build/dev-server.js",
9
+ "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
10
+ "unit": "karma start test/unit/karma.conf.js",
11
+ "build": "rimraf lib && mkdirp lib && cross-env webpack --progress --hide-modules --config build/webpack.prod.conf.js",
12
+ "e2e": "node test/e2e/runner.js",
13
+ "release": "bash build/release.sh"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://gitee.com/aote/product.git"
18
+ },
19
+ "dependencies": {
20
+ "examples": "^0.1.0",
21
+ "js-file-download": "0.4.12",
22
+ "less-loader": "^2.2.3",
23
+ "qrcodejs2": "0.0.2",
24
+ "vue": "^1.0.17",
25
+ "yarn": "^1.22.10"
26
+ },
27
+ "devDependencies": {
28
+ "address-client": "3.2.27",
29
+ "axios": "0.15.3",
30
+ "babel-core": "^6.0.0",
31
+ "babel-loader": "^6.0.0",
32
+ "babel-plugin-transform-runtime": "^6.0.0",
33
+ "babel-preset-es2015": "^6.0.0",
34
+ "babel-preset-stage-2": "^6.0.0",
35
+ "chai": "^3.5.0",
36
+ "co": "^4.6.0",
37
+ "compression-webpack-plugin": "1.1.2",
38
+ "connect-history-api-fallback": "^1.1.0",
39
+ "cross-env": "^1.0.7",
40
+ "cross-spawn": "^2.1.5",
41
+ "css-loader": "^0.23.0",
42
+ "echarts": "^4.1.0",
43
+ "eslint": "^3.19.0",
44
+ "eslint-config-standard": "^10.2.1",
45
+ "eslint-friendly-formatter": "^3.0.0",
46
+ "eslint-loader": "^1.7.1",
47
+ "eslint-plugin-html": "^3.0.0",
48
+ "eslint-plugin-import": "^2.7.0",
49
+ "eslint-plugin-node": "^5.2.0",
50
+ "eslint-plugin-promise": "^3.4.0",
51
+ "eslint-plugin-standard": "^3.0.1",
52
+ "eventsource-polyfill": "^0.9.6",
53
+ "express": "^4.13.3",
54
+ "extract-text-webpack-plugin": "^1.0.1",
55
+ "file-loader": "^0.8.4",
56
+ "filemanager-webpack-plugin": "^2.0.5",
57
+ "function-bind": "^1.0.2",
58
+ "html-webpack-plugin": "^2.8.1",
59
+ "http-proxy-middleware": "^0.11.0",
60
+ "inject-loader": "^2.0.1",
61
+ "isparta-loader": "^2.0.0",
62
+ "jasmine-core": "^2.4.1",
63
+ "jquery": "^3.3.1",
64
+ "jsencrypt": "3.0.0-rc.1",
65
+ "json-loader": "^0.5.4",
66
+ "karma": "^1.4.1",
67
+ "karma-chrome-launcher": "^2.2.0",
68
+ "karma-coverage": "^1.1.1",
69
+ "karma-mocha": "^1.3.0",
70
+ "karma-sinon-chai": "^1.3.1",
71
+ "karma-sourcemap-loader": "^0.3.7",
72
+ "karma-spec-reporter": "0.0.31",
73
+ "karma-webpack": "^2.0.2",
74
+ "ldap-clients": "3.0.7",
75
+ "less": "^2.7.3",
76
+ "manage-client": "3.1.8-88",
77
+ "mkdirp": "^0.5.1",
78
+ "mocha": "^3.2.0",
79
+ "moment": "2.24.0",
80
+ "ncp": "^2.0.0",
81
+ "nightwatch": "^0.8.18",
82
+ "qrcodejs2": "0.0.2",
83
+ "rimraf": "^2.5.0",
84
+ "selenium-server": "2.52.0",
85
+ "sinon": "^2.1.0",
86
+ "sinon-chai": "^2.8.0",
87
+ "style": "0.0.3",
88
+ "style-loader": "^0.20.3",
89
+ "system-clients": "3.2.0-2",
90
+ "url-loader": "^0.5.7",
91
+ "vue-client": "1.24.52",
92
+ "vue-clipboard2": "0.3.1",
93
+ "vue-hot-reload-api": "^1.2.0",
94
+ "vue-html-loader": "^1.0.0",
95
+ "vue-loader": "^8.2.1",
96
+ "vue-resource": "^1.5.0",
97
+ "vue-router": "^0.7.13",
98
+ "vue-strap": "^1.0.9",
99
+ "vue-style-loader": "^1.0.0",
100
+ "vue-validator": "2.1.7",
101
+ "webpack": "^1.12.2",
102
+ "webpack-dev-middleware": "^1.4.0",
103
+ "webpack-hot-middleware": "^2.6.0",
104
+ "webpack-merge": "^0.8.3",
105
+ "webpack-parallel-uglify-plugin": "^1.0.0",
106
+ "weixin-js-sdk": "^1.2.0"
107
+ },
108
+ "keywords": [
109
+ "selling-clients"
110
+ ],
111
+ "author": "张桥",
112
+ "license": "ISC",
113
+ "directories": {
114
+ "example": "examples",
115
+ "test": "test"
116
+ }
117
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.238",
3
+ "version": "3.5.239",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -43,7 +43,7 @@
43
43
  value: data.val
44
44
  })
45
45
  try {
46
- await this.$resetget(`http://127.0.0.1:8091/rs/content/images?path=${data.val.f_userinfo_code}`, {resolveMsg: null, rejectMsg: '获取数据错误!'})
46
+ await this.$resetget(`http://193.168.1.50:8887/rs/content/images?path=${data.val.f_userinfo_code}`, {resolveMsg: null, rejectMsg: '获取数据错误!'})
47
47
  .then(res => {
48
48
  console.log('离谱啊', res)
49
49
  let img = res.data.replace('[', '')
@@ -86,18 +86,19 @@
86
86
  readonly
87
87
  placeholder="备注">
88
88
  </div>
89
+ <div v-for="image in images" class="imgBox">
90
+ <span>用户{{row.value.f_newuser_name}}的过户资料</span>
91
+ <img :src="'data:image/'+'jpg'+';base64,'+image" width="50%"/>
92
+ </div>
89
93
  </div>
90
94
 
91
95
  </div>
92
96
  </div>
93
- <div v-for="image in images" class="imgBox">
94
- <span>不动产证</span>
95
- <img :src="'data:image/'+'jpg'+';base64,'+image" width="50%"/>
96
- </div>
97
+
97
98
  </div>
98
99
 
99
100
  <div style="text-align:right;height:auto;margin-top:10px;margin-right:30px;">
100
- <span style="color: red" v-if="row.f_order_state !== '待处理'&&row.f_order_state!==''&&row.f_order_state!==null">该条预约已处理</span>
101
+ <span style="color: red" v-if="row.f_order_state !== '待处理'&&row.f_order_state!==''&&row.f_order_state!==null">该条审核已处理</span>
101
102
  <br>
102
103
  <button type="button" :disabled="row.f_order_state!=='待处理'&&row.f_order_state!==''&&row.f_order_state!==null" class="btn btn-warning" @click="confirm(row)" style="width:80px;margin-left:20px;">审核失败</button>
103
104
  <button type="button" :disabled="row.f_order_state!=='待处理'&&row.f_order_state!==''&&row.f_order_state!==null" class="btn btn-primary" @click="confirm1(row)" style="width:80px;margin-left:20px;">审核通过</button>
@@ -179,13 +180,13 @@
179
180
  rejectMsg: '审核失败!!'
180
181
  }).then((res) => {
181
182
  if (res.data.code === 200) {
183
+ this.$resetpost('rs/logic/transferPass', row, {resolveMsg: '推送成功', rejectMsg: '推送失败!!'})
182
184
  this.$showAlert('预约成功审核成功!!', 'success', 2000)
183
185
  } else {
184
186
  this.$showAlert('预约成功审核失败!!', 'danger', 2000)
185
187
  }
186
188
  })
187
189
  this.$dispatch('refresh')
188
-
189
190
  }
190
191
  }
191
192
  }
@@ -236,16 +236,16 @@
236
236
  condition="f_usetype = '{}'" placeholder='使用类型'
237
237
  v-model='model.f_usetype'></v-select>
238
238
  </div>
239
- <div
240
- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
241
- class="form-group" >
242
- <label class="font_normal_body">用户等级</label>
243
- <v-select :options='$parent.$parent.userlevel' :search='true'
244
- :value.sync="model.userlevel"
245
- close-on-select
246
- condition="f_user_level = '{}'" placeholder='用户等级'
247
- v-model='model.userlevel'></v-select>
248
- </div>
239
+ <!-- <div-->
240
+ <!-- :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"-->
241
+ <!-- class="form-group" >-->
242
+ <!-- <label class="font_normal_body">用户等级</label>-->
243
+ <!-- <v-select :options='$parent.$parent.userlevel' :search='true'-->
244
+ <!-- :value.sync="model.userlevel"-->
245
+ <!-- close-on-select-->
246
+ <!-- condition="f_user_level = '{}'" placeholder='用户等级'-->
247
+ <!-- v-model='model.userlevel'></v-select>-->
248
+ <!-- </div>-->
249
249
  <div
250
250
  :class="{'col-sm-2':!$parent.$parent.createFile,'col-sm-4':$parent.$parent.createFile}"
251
251
  class="form-group" >
@@ -133,17 +133,24 @@
133
133
  <!-- </div>-->
134
134
  </div>
135
135
  <div class="row">
136
- <div style="" class="col-sm-4 form-group">
137
- <label for="f_user_level" class="font_normal_body ">&ensp;用户等级</label>
138
- <v-select :value.sync="baseinfo.base.f_user_level" :search="false" :value-single="true"
139
- :options='userlevel' placeholder='用户等级' close-on-select>
140
- </v-select>
141
- </div>
136
+ <!-- <div style="" class="col-sm-4 form-group">-->
137
+ <!-- <label for="f_user_level" class="font_normal_body ">&ensp;用户等级</label>-->
138
+ <!-- <v-select :value.sync="baseinfo.base.f_user_level" :search="false" :value-single="true"-->
139
+ <!-- :options='userlevel' placeholder='用户等级' close-on-select>-->
140
+ <!-- </v-select>-->
141
+ <!-- </div>-->
142
142
  <div class="col-sm-4 form-group">
143
- <label for="f_user_nature" class="font_normal_body" title="用户性质">&ensp;用气类型</label>
143
+ <label for="f_user_nature" class="font_normal_body" title="用户性质">&ensp;用户类型</label>
144
144
  <input type="text" v-show="false" v-model="baseinfo.base.f_user_nature">
145
145
  <v-select :value.sync="baseinfo.base.f_user_nature" :search="false" :value-single="true"
146
- :options='usernature' placeholder='用气类型' close-on-select>
146
+ :options='usernature' placeholder='用户类型'
147
+ close-on-select>
148
+ </v-select>
149
+ </div>
150
+ <div class="col-sm-4 form-group">
151
+ <label for="f_industry_type" class="font_normal_body ">&ensp;行业类型</label>
152
+ <v-select :value.sync="baseinfo.base.f_industry_type" :search="false" :value-single="true"
153
+ :options='getIndustryType' placeholder='行业类型' close-on-select>
147
154
  </v-select>
148
155
  </div>
149
156
  <div class="col-sm-4 form-group">
@@ -247,7 +254,9 @@
247
254
  userstates: this.$appdata.getParam('用户状态'),
248
255
  mgq: this.$appdata.getParam('是否煤改气'),
249
256
  costtype: this.$appdata.getParam('付款类型'),
257
+ // 用户类型
250
258
  usernature: this.$appdata.getParam('用户性质'),
259
+ // industryType: this.$appdata.getParam('行业类型'),
251
260
  userlevel: this.$appdata.getParam('用户等级'),
252
261
  housetype: [{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
253
262
  jurisdiction: this.$login.r,
@@ -319,7 +328,14 @@
319
328
  // // }
320
329
  // }
321
330
  },
322
- computed: {},
331
+ computed: {
332
+ getIndustryType (){
333
+ let usernature = this.baseinfo.base.f_user_nature;
334
+ let industryType = this.$appdata.getParam(usernature+'行业类型')
335
+ industryType==null?industryType=[]:industryType
336
+ return industryType
337
+ }
338
+ },
323
339
  events: {
324
340
  'confirmaddress' (res) {
325
341
  console.log('选定地址', res)
@@ -0,0 +1,944 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: hidden">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="row">
7
+ <div class="col-sm-4" :class="[$v.payment.required ? 'has-error' : '']">
8
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
9
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
10
+ v-validate:payment='{required: true }'>
11
+ <v-select v-model="f_payment"
12
+ placeholder='请选择'
13
+ :value.sync="model.f_payment"
14
+ :options='paytype' clear-button v-ref:payment></v-select>
15
+ </div>
16
+
17
+ <div class="col-sm-4" v-if="row.f_collection_type == '按气量'">
18
+ <label for="f_pregas" class=" font_normal_body">*预购气量</label>
19
+ <input class="input_search" style="width:60%" type="number" :disabled="config.calculatePreByCollection"
20
+ @blur="pregas()" v-model="model.f_pregas" v-el:fpregas
21
+ placeholder="预购气量"
22
+ v-next-el='fcollection'>
23
+ </div>
24
+ <div class="col-sm-4" v-if="row.f_collection_type == '按金额'">
25
+ <label for="f_pregas" class=" font_normal_body">*预购气量</label>
26
+ <input class="input_search" style="width:60%" type="number" v-el:fpregas
27
+ @blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
28
+ v-next-el='fcollection' :disabled="config.calculatePreByCollection"/>
29
+ </div>
30
+ <div class="col-sm-4"
31
+ :class="[$v.f_preamount.required || $v.f_preamount.dctest || model.f_preamount === 0 ? 'has-error' : 'has-success']">
32
+ <label for="f_pregas" class=" font_normal_body">*预购金额</label>
33
+ <input class="input_search" style="width:60%" type="number"
34
+ @blur="preamount()" v-model="model.f_preamount"
35
+ :disabled="config.calculatePreByCollection"
36
+ v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ]}' placeholder="预购金额">
37
+ </div><!--
38
+ <div class="col-sm-4" v-if="row.f_collection_type == '按气量'">
39
+ <label for="f_preamount" class=" font_normal_body">&nbsp;预购金额</label>
40
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
41
+ v-scale="[model.f_preamount, 4]" placeholder="预购金额" disabled>
42
+ </div>-->
43
+
44
+ </div>
45
+ <div class="row" style="margin-top:6px;">
46
+ <div class="col-sm-4" :class="[$v.printstyle.required ? 'has-error' : '']">
47
+ <label for="f_print" class="font_normal_body">打印格式</label>
48
+ <input type="text" v-show="false" v-model="$refs.printstyle.selectedItems"
49
+ v-validate:printstyle='{required: true }'>
50
+ <v-select id="print"
51
+ v-model="f_print"
52
+ placeholder='请选择'
53
+ :multiple="mulPrint"
54
+ :value.sync="model.f_print"
55
+ :options='printstyle'
56
+ close-on-select clear-button v-ref:printstyle>
57
+ </v-select>
58
+ </div>
59
+ <div class="col-sm-4 " v-if="hasLimit&&limitgas">
60
+ <label class="font_normal_body">&ensp;购气上限</label>
61
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxgas"
62
+ v-scale="[maxgas, 4]" placeholder='限购余气' disabled>
63
+ </div>
64
+ <div class="col-sm-4 form-group" v-if="hasLimit&&limitmoney">
65
+ <label class="font_normal_body">金额上限</label>
66
+ <input class="input_search" style="width:60%" style="width:60%" type="number" v-model="maxmoney"
67
+ v-scale="[maxmoney, 2]" placeholder='限购金额' disabled>
68
+ </div>
69
+ <div class="col-sm-4" v-if="!hasLimit">
70
+ </div>
71
+
72
+ <div class="col-sm-4"
73
+ :class="[$v.f_totalcost.required || $v.f_totalcost.dctest ? 'has-error' : 'has-success']">
74
+ <label for="f_temp_amount"
75
+ class=" font_normal_body">&nbsp;应收金额</label>
76
+ <input class="input_search" style="width:60%" type="number"
77
+ @blur="preamount()" v-model="model.f_totalcost"
78
+ v-validate:f_totalcost='{required: true, dctest: [0, ">=" ] }' placeholder="应收金额"
79
+ v-next-el='fcollection' v-scale="[model.f_totalcost, 4]" disabled>
80
+ </div>
81
+ </div>
82
+ <div class="row">
83
+
84
+ <div class="col-sm-4">
85
+ <label for="f_balance" class="font_normal_body">上期结余</label>
86
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_balance"
87
+ v-scale="[model.f_balance, 4]" placeholder="上期结余" disabled>
88
+ </div>
89
+
90
+ <div class="col-sm-4">
91
+ <label for="f_curbalance" class="font_normal_body">&nbsp;本期结余</label>
92
+ <input class="input_search" style="width:60%" type="number" v-model="curbalance"
93
+ v-scale="[curbalance, 4]" placeholder="本期结余" disabled>
94
+ </div>
95
+
96
+ <div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && !config.calculatePreByCollection"
97
+ :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
98
+ <label for="f_collection" class=" font_normal_body">*收&emsp;&emsp;款</label>
99
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
100
+ v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'
101
+ v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
102
+ v-scale="[model.f_totalcost, 4]" :disabled="$refs.givechange.promptText != ''"/>
103
+ </div>
104
+ <div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment!='赠气' && row.f_meter_type.includes('卡表') && config.calculatePreByCollection"
105
+ :class="[$v.f_collection.required ? 'has-error' : 'has-success']">
106
+ <label for="f_collection" class=" font_normal_body">*收&emsp;&emsp;款</label>
107
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
108
+ v-validate:f_collection='{required: true }'
109
+ @blur="calculatePreByCollection()"
110
+ v-el:fcollection
111
+ @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"/>
112
+ </div>
113
+ <div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment=='赠气' && row.f_meter_type.includes('卡表')"
114
+ :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
115
+ <label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收&emsp;款</font></label>
116
+ <input id="f_collection" class="input_search" style="width:60%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
117
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
118
+ v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_totalcost, 4]" :disabled="$refs.givechange.promptText != ''">
119
+ </div>
120
+ <div class="col-sm-3" v-if="row.f_collection_type === '按金额' && row.f_meter_type.includes('卡表')">
121
+ <label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收&emsp;款</font></label>
122
+ <input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
123
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
124
+ v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_collection, 4]" :disabled="$refs.givechange.promptText != ''">
125
+ </div>
126
+ <div class="col-sm-4" v-if="!row.f_meter_type.includes('卡表')">
127
+ <label for="f_collection" class=" font_normal_body"><font size="4px"
128
+ style="font-weight:bold">*收&emsp;款</font></label>
129
+ <input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;"
130
+ type="number" v-model="model.f_collection"
131
+ v-el:fcollection
132
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
133
+ @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
134
+ v-scale="[model.f_collection, 4]" disabled>
135
+ </div>
136
+ <div class="col-sm-1 form-group" v-show=" row.f_meter_type.includes('卡表')">
137
+ <give-change :curbalance="curbalance" :collection.sync="model.f_collection" v-ref:givechange></give-change>
138
+ </div>
139
+ </div>
140
+ <div class="row" style="margin-top:5px;" v-if="!config.calculatePreByCollection">
141
+ <div class="col-sm-9">
142
+ </div>
143
+ <div class="col-sm-3">
144
+ <span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
145
+ </div>
146
+ </div>
147
+
148
+ <div class="row" style="margin-top:5px;" v-show="authArr.includes('优惠权限')">
149
+ <div class="col-sm-4">
150
+ <label class="font_normal_body">优惠方式</label>
151
+ <v-select v-model="model.f_privilege_id" @blur.native.capture="privilegeCalculate"
152
+ placeholder='请选择'
153
+ :value.sync="model.f_privilege_id"
154
+ :options='privilegeList' clear-button value-single>
155
+ </v-select>
156
+ </div>
157
+ <div class="col-sm-4">
158
+ <label for="f_preamount" class=" font_normal_body">&nbsp;优惠金额</label>
159
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_privilege_money"
160
+ v-scale="[model.f_privilege_money, 2]" placeholder="优惠金额" disabled>
161
+ </div>
162
+ <div class="col-sm-4">
163
+ <label for="f_preamount" class=" font_normal_body">&nbsp;实际收款</label>
164
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_after_discount"
165
+ v-scale="[model.f_after_discount, 2]" placeholder="优惠后收款" disabled>
166
+ </div>
167
+ </div>
168
+
169
+ <div class="row" v-if="model.f_payment[0].includes('POS')">
170
+ <div class="col-sm-4">
171
+ <label for="f_voucher_number" class="font_normal_body">凭证号</label>
172
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_voucher_number"
173
+ placeholder="凭证号">
174
+ </div>
175
+ </div>
176
+ <div class="row" style="padding-top: 0.5em;">
177
+ <div class="col-sm-4" v-if="!mjshow">
178
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
179
+ <input class="input_search" style="width:60%" type="text"
180
+ v-model="model.f_serial_number" placeholder="业务单号">
181
+ </div>
182
+ <div class="col-sm-4" v-if="mjshow"
183
+ :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
184
+ <label for="f_serial_number" class=" font_normal_body">业务单号</label>
185
+ <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
186
+ v-model="model.f_serial_number" placeholder="业务单号">
187
+ </div>
188
+
189
+
190
+ <div class="col-sm-8">
191
+ <label for="f_comments" class="font_normal_body">&nbsp;备&emsp;&emsp;注</label>
192
+ <input class="input_search" style="width:77%" v-model="model.f_comments" rows="1" placeholder="备注">
193
+ </div>
194
+ </div>
195
+
196
+ <div v-if="paymentModel.length >1">
197
+ <div class="row" style="margin-top:10px;">
198
+ <p class="col-sm-2 text-left" style="padding: 10px;"><img src="../../../../../static/juxing.png"/><strong
199
+ style="margin-left: 4%">付款明细</strong></p>
200
+ </div>
201
+ <div class="row" style="margin-top:10px;">
202
+ <div class="col-sm-4 " v-for="pay in paymentModel">
203
+ <label class="font_normal_body">{{pay.f_payment}}:</label>
204
+ <input id="f_money" type="text" class="input_search" style="width:60%" v-model="pay.f_money">
205
+ </div>
206
+ <div class="col-sm-4 ">
207
+ <strong v-if="!islegal" style="color: red">所输入的金额必须等于收款金额</strong>
208
+ </div>
209
+ </div>
210
+ </div>
211
+ </form>
212
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
213
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close"
214
+ @printok="printok" v-ref:printbill></print-bill>
215
+ <div style="text-align:right; height: 25%">
216
+ <strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
217
+ <strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
218
+ <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm|| model.f_preamount === 0"
219
+ :payment.sync="model.f_payment" :payment-data="paytype"
220
+ @confirm-payment="confirm()">
221
+ </payment-code-button>
222
+ <button class="button_search btn-gn" type="submit" @click="checkInvoiceMsg()"
223
+ :disabled='!$v.valid || validateOk || !islegal || clickConfirm || model.f_preamount === 0'>确认
224
+ </button>
225
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
226
+ </div>
227
+ </validator>
228
+ <eticket-modal :show="eticket_msg" @close-modal-show="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
229
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
230
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_after_discount"></payment-code>
231
+ </div>
232
+ </div>
233
+ <upload :blodid="row.f_userinfo_id" v-if="config.showupload" isremark="true" fusetype="卡表收费"></upload>
234
+ </template>
235
+ <script>
236
+ import {HttpResetClass} from 'vue-client'
237
+
238
+ /**
239
+ *综合业务
240
+ *卡表收费组件
241
+ */
242
+
243
+ // 输入金额,换算气量
244
+ let preamountGen = async function (self) {
245
+ let calFee = ((self.model.f_preamount - 0)).toFixed(4)
246
+ if (self.model.f_payment == '赠气') {
247
+ calFee = (self.model.f_preamount - 0).toFixed(4)
248
+ }
249
+ // 通过金额进行划价
250
+ let getGas = await self.$CommonService.feeCalculate(self.model, calFee)
251
+ if (getGas.data.gas) {
252
+ if (self.row.f_isdecimal === '是') {
253
+ if (self.row.f_alias === 'QiaoSong') {
254
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(1)
255
+ } else {
256
+ if (self.row.f_collection_type === '按气量') {
257
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(2)
258
+ } else {
259
+ self.model.f_pregas = (getGas.data.gas - 0).toFixed(4)
260
+ }
261
+ }
262
+ if (self.row.f_collection_type === '按金额') {
263
+ self.dymoney = 0
264
+ } else {
265
+ let dymoney2 = await self.$CommonService.gasCalculate(self.model, (getGas.data.gas).toFixed(4))
266
+ self.dymoney = (getGas.data.chargenum - 0).toFixed(4) - (dymoney2.data.chargenum - 0).toFixed(4)
267
+ }
268
+ } else {
269
+ // 如果不支持小数,将划价出的多余非整数气量进行划价为金额
270
+ let tempnum = Math.floor(getGas.data.gas - 0)
271
+ let dymoney1 = await self.$CommonService.gasCalculate(self.model, (tempnum).toFixed(4))
272
+ self.dymoney = (getGas.data.chargenum - 0).toFixed(2) - (dymoney1.data.chargenum - 0).toFixed(2)
273
+ self.model.f_pregas = Math.floor(getGas.data.gas - 0)
274
+ }
275
+ }
276
+ self.model.f_totalcost = ((self.row.f_balance - 0) >= (self.model.f_preamount - 0) ? 0 : (self.model.f_preamount - 0 - self.row.f_balance))
277
+
278
+ self.model.chargeprice = getGas.data.chargeprice
279
+ Object.assign(self.model, self.model, getGas.data)
280
+ if (self.model.f_payment == '赠气') {
281
+ self.model.f_totalcost = self.model.f_preamount
282
+ self.model.f_collection = 0
283
+ } else {
284
+ self.model.f_collection = self.config.autoCollection ? self.model.f_totalcost : 0
285
+ self.model.f_totalcost = ((self.model.f_totalcost - 0) - (self.dymoney - 0)).toFixed(4)
286
+ }
287
+ self.model.f_collection = calFee
288
+ self.model.f_preamount = (calFee - (self.dymoney - 0)).toFixed(4)
289
+ self.calText(getGas.data.chargeprice)
290
+ }
291
+
292
+ // 输入气量,换算金额
293
+ let pregasGen = async function (self) {
294
+ if (self.row.f_isdecimal === '是') {
295
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(4)
296
+ } else {
297
+ self.model.f_pregas = (self.model.f_pregas - 0).toFixed(0)
298
+ }
299
+ if ((self.model.f_pregas - 0) - (self.maxgas - 0) <= 0) {
300
+ self.model.f_meter_type = self.row.f_meter_type
301
+ let getAmount = await self.$CommonService.gasCalculate(self.model, self.model.f_pregas)
302
+ self.model.f_preamount = getAmount.data.chargenum
303
+ self.model.f_totalcost = ((self.row.f_balance - 0) > (getAmount.data.chargenum - 0) ? 0 : ((getAmount.data.chargenum - 0) - (self.row.f_balance - 0)).toFixed(4))
304
+ Object.assign(self.model, self.model, getAmount.data)
305
+ self.model.chargeprice = getAmount.data.chargeprice
306
+ if (self.model.f_payment == '赠气') {
307
+ self.model.f_totalcost = getAmount.data.chargenum
308
+ self.model.f_collection = 0
309
+ } else {
310
+ self.model.f_collection = self.config.autoCollection ? self.model.f_totalcost : 0
311
+ if (self.config.floor) {
312
+ self.model.f_collection = Math.ceil(self.model.f_collection)
313
+ }
314
+ }
315
+ self.calText(getAmount.data.chargeprice)
316
+ }
317
+ }
318
+ // 执行保存逻辑
319
+ let sellgasGen = async function (self) {
320
+ try {
321
+ self.row.cardInfo = self.cardData
322
+
323
+ if (self.paymentModel.length === 0) {
324
+ self.paymentModel = [{
325
+ f_payment: self.model.f_payment[0],
326
+ f_money: self.model.f_preamount
327
+ }]
328
+ }
329
+ self.model.xiekamoney = self.model.f_preamount
330
+ if (self.row.f_price_type == '阶梯气价' && self.row.f_is_step == '否' && self.row.f_collection_type == '按金额') {
331
+ self.model.xiekamoney = (self.model.f_pregas * self.model.chargeprice[0].f_price)
332
+ self.model.xiekamoney = self.model.xiekamoney.toFixed(4)
333
+ }
334
+
335
+ self.model.payments = self.paymentModel
336
+ // 加入扫码盒付款码支付流水号
337
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
338
+ let res = await self.$CardService.sellgas(self.model, self.row)
339
+ let localeSustainMoney = window.localStorage.getItem('sustainMoney')
340
+ if (localeSustainMoney != null) {
341
+ localeSustainMoney = (localeSustainMoney - 0) + (self.model.f_collection - 0)
342
+ window.localStorage.setItem('sustainMoney', localeSustainMoney)
343
+ }
344
+ let param = []
345
+ for (let row of self.resid) {
346
+ param.push({id: row.id})
347
+ }
348
+ let writeid
349
+ if (res.data && res.data.id) {
350
+ writeid = res.data.id
351
+ } else {
352
+ writeid = res
353
+ }
354
+ let data = {
355
+ param: param,
356
+ f_blobid: writeid
357
+ }
358
+
359
+ await self.$resetpost('rs/logic/updatefiles', data)
360
+ console.log(self.config, self.config.hasPrint && !self.$login.r.includes('不打印发票'))
361
+ // 开始打票
362
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
363
+ if (self.model.f_print.indexOf('电子发票') == -1) {
364
+ if (self.$login.r.includes('非民用纸质票据拆分')) {
365
+ if (self.row.f_user_type === '非民用') {
366
+ self.billData.url = 'rs/report/fmy_card_bill'
367
+ }
368
+ }
369
+ if (self.row.f_meter_type === '金额卡表' && self.$appdata.getSingleValue('金额气量区分卡表票据')) {
370
+ self.billData.url = 'rs/report/fee_card_bill'
371
+ }
372
+ if (self.config.hasBillManage) {
373
+ // 启用发票管理,获取票据管理中的票号并存储记录
374
+ self.row.id = res
375
+ self.row.f_bill_type = '卡表收费'
376
+ self.row.f_bill_style = self.model.f_print[0]
377
+ self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
378
+ self.print = true
379
+ } else {
380
+ self.row.id = res
381
+ self.row.f_url = 'http://192.168.50.77:31039/report/jmreport/shareView/787097260170534912'
382
+ self.print = true
383
+ }
384
+ } else {
385
+ if (self.model.f_print[0] === '电子发票') {
386
+ self.row.id = res
387
+ self.eticket_show = true
388
+ // 应铜川需要卡表显示
389
+ await self.$refs.eticketbill.openETicket([res], self.row, '是', self.invoice_is_pax, '卡表收费')
390
+ // await self.$CommonService.openEticket(res, '售气收费')
391
+ // self.print = true
392
+ }
393
+ }
394
+ } else {
395
+ self.$dispatch('success', '卡表收费')
396
+ }
397
+ self.clickConfirm = false
398
+ } catch (error) {
399
+ console.log('捕获到异常', error)
400
+ if (error instanceof Object) {
401
+ self.$showAlert(error.data, 'danger', 0)
402
+ } else {
403
+ self.$showAlert(error, 'danger', 0)
404
+ }
405
+ self.$dispatch('refresh')
406
+ self.clickConfirm = false
407
+ }
408
+ }
409
+
410
+ let asyncCardMeterCenter = async function (self) {
411
+ await self.$getConfig(self, 'CardMeterCenter')
412
+ console.log('卡表收费config', self.config)
413
+ // 添加 “系统余额透支” 付款方式
414
+ let i = -1
415
+ for (const index in self.paytype) {
416
+ if (self.paytype[index].value == '系统余额透支') {
417
+ i = index
418
+ break
419
+ }
420
+ }
421
+ if (self.canOverdraftBalance()) {
422
+ if (i == -1) {
423
+ self.paytype.push({
424
+ label: '系统余额透支',
425
+ value: '系统余额透支'
426
+ })
427
+ }
428
+ } else {
429
+ if (i != -1) {
430
+ self.paytype.splice(i, 1)
431
+ }
432
+ }
433
+
434
+ // 默认打印格式
435
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
436
+ self.model.f_payment = [self.config.payment]
437
+ self.mulPrint = self.config.printType instanceof Array
438
+
439
+ // 获取当前票号用
440
+ self.model.f_use_type = self.config.billType
441
+ self.model.f_bill_type = self.model.f_print
442
+ self.hasValidateBill = self.config.hasBillManage
443
+
444
+ // 判断限购
445
+ let limit_param = {
446
+ f_userinfo_id: self.row.f_userinfo_id,
447
+ f_user_id: self.row.f_user_id,
448
+ f_stairprice_id: self.row.f_stairprice_id
449
+ }
450
+ let getLimit = await self.$resetpost('rs/logic/sale_getLimitGas', {data: limit_param}, {
451
+ resolveMsg: null,
452
+ rejectMsg: '获取限购值失败!!'
453
+ })
454
+ console.log('获取限购值', getLimit)
455
+ self.hasLimit = getLimit.data.hasLimit
456
+ if (self.hasLimit) {
457
+ if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
458
+ if (getLimit.data.f_limit_value < 0 && getLimit.data.f_limit_amount < 0) {
459
+ self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
460
+ self.$dispatch('refresh')
461
+ } else {
462
+ if (getLimit.data.f_limit_value) {
463
+ self.maxgas = (getLimit.data.f_limit_value - 0)
464
+ self.limitgas = true
465
+ }
466
+ if (getLimit.data.f_limit_amount) {
467
+ self.maxmoney = (getLimit.data.f_limit_amount - 0)
468
+ self.limitmoney = true
469
+ }
470
+ }
471
+ }
472
+ }
473
+ let nowrite_param = {
474
+ f_userfiles_id: self.row.f_userfiles_id
475
+ }
476
+ let getNoWriteCard = await self.$resetpost('rs/sql/getnowritecard', {data: nowrite_param}, {
477
+ resolveMsg: null,
478
+ rejectMsg: '获取最近卡表收费记录失败!!'
479
+ })
480
+ if (getNoWriteCard.data.length > 0) {
481
+ self.$showMessage(`三小时内存在写卡失败的记录,是否重新写卡?`, ['confirm', 'cancel']).then(async (res) => {
482
+ if (res === 'confirm') {
483
+ let url = 'http://127.0.0.1:8003/' + getNoWriteCard.data[0].f_cardpost
484
+ let param = JSON.parse(getNoWriteCard.data[0].f_cardparam)
485
+ let cardRes = await self.$resetpost(url, param, {resolveMsg: null, rejectMsg: '重新写卡失败'})
486
+ if (cardRes.data.Err || cardRes.data.Exception) {
487
+ self.$showAlert(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`, 'danger', 3000)
488
+ self.$dispatch('refresh', self.row)
489
+ } else {
490
+ self.$resetpost('rs/logic/writeCardAgin', getNoWriteCard.data[0], {resolveMsg: '重新写卡成功', rejectMsg: '重新写卡失败'})
491
+ self.$dispatch('success', '卡表收费')
492
+ }
493
+ } else {
494
+ self.$dispatch('refresh', self.row)
495
+ }
496
+ })
497
+ }
498
+ }
499
+ export default {
500
+ title: '卡表收费',
501
+ data () {
502
+ return {
503
+ mjshow: false,
504
+ serialShow: false,
505
+ resid: [], // 存放新增的f_files表中id
506
+ config: {
507
+ calculatePreByCollection: false, // 可以更具收款来反向计算预购
508
+ notShowFormula: false, // 不显示计算公式,默认显示
509
+ autoCollection: true, // 自动填写收款
510
+ showupload: true, // 显示上传
511
+ hasPrint: true, // 默认打票
512
+ hasBillManage: false, // 默认不启用发票管理
513
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
514
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
515
+ payment: '现金缴费',
516
+ floor: false,
517
+ overdraftBalance: false // 是否支持系统余额透支
518
+ },
519
+ eticket_msg: false,
520
+ eticket_show: false,
521
+ invoice_is_pax: '不征税',
522
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
523
+ model: {
524
+ f_purchase: 0,
525
+ f_payment: [],
526
+ f_pregas: '',
527
+ f_preamount: 0,
528
+ f_totalcost: 0,
529
+ f_curbalance: 0,
530
+ f_collection: '',
531
+ f_balance: 0,
532
+ f_print: [],
533
+ f_meter_type: '',
534
+ f_voucher_number: '',
535
+ f_banktransfer_person: '',
536
+ f_banktransfer_date: '',
537
+ f_privilege_id: 0,
538
+ f_privilege_money: 0,
539
+ f_after_discount: 0
540
+ },
541
+ calculatedetail: '',
542
+
543
+ // 启用发票管理需要对票号进行验证
544
+ hasValidateBill: false,
545
+ validateOk: false,
546
+
547
+ print: false,
548
+ billData: {
549
+ url: 'rs/report/card_bill',
550
+ billnumber: ''
551
+ },
552
+ hasLimit: false,
553
+ maxgas: 99999999, // 限购
554
+ maxmoney: 99999999,
555
+ limitmoney: false,
556
+ limitgas: false,
557
+
558
+ paymentModel: [], // 多笔付款方式
559
+
560
+ mulPrint: false,
561
+ clickConfirm: false, // 控制确认按钮只能点击一次
562
+ // 下拉框值
563
+ paytype: [],
564
+ printstyle: this.$appdata.getParam('打印格式'),
565
+ privilegeList: [{label: '无优惠', value: '0'}],
566
+ BankTransfer: false,
567
+ // 小数是否支持,导致划价产生的多余气量,金额
568
+ dymoney: 0
569
+ }
570
+ },
571
+ props: ['row', 'cardData'],
572
+ async ready () {
573
+ if (this.authArr.includes('余额写卡限定')) {
574
+ this.paytype = [{label: '余额写卡', value: '余额写卡'}]
575
+ } else {
576
+ this.paytype = await this.$appdata.getParam('付款方式') ? await this.$appdata.getParam('付款方式') : []
577
+ if (!this.$login.r.includes('免交充值付款')) {
578
+ this.paytype = this.paytype.filter((item) => {
579
+ return item.label != '免交'
580
+ })
581
+ }
582
+ }
583
+ // this.getPurchase()
584
+ this.model.f_price_id = this.row.f_price_id
585
+ this.model.f_user_id = this.row.f_user_id
586
+ this.model.f_userfiles_id = this.row.f_userfiles_id
587
+ this.model.f_userinfo_id = this.row.f_userinfo_id
588
+ this.model.f_balance = this.row.f_alias === 'QiaoSong' ? Math.trunc(this.row.f_balance) : this.row.f_balance
589
+ if (this.row.f_collection_type == '按金额') {
590
+ this.model.f_preamount = ''
591
+ this.model.f_pregas = 0
592
+ }
593
+ this.$els.fpregas.focus()
594
+ asyncCardMeterCenter(this)
595
+ },
596
+ watch: {
597
+ 'model.f_payment.length' (val) {
598
+ console.log('付款方式多选。。', val)
599
+ if (val > 1 && !this.model.f_preamount) {
600
+ this.model.f_payment = ['现金缴费']
601
+ this.$showAlert('请先计算付款金额', 'warning', 2000)
602
+ } else {
603
+ this.paymentModel = []
604
+
605
+ this.model.f_payment.forEach((res) => {
606
+ let temp = {
607
+ f_payment: res,
608
+ f_money: 0
609
+ }
610
+ this.paymentModel.push(temp)
611
+ })
612
+ this.$resetValidation()
613
+
614
+ // 获取计算优惠
615
+ this.getPrivilegeList()
616
+ }
617
+ },
618
+ 'model.f_payment' (val) {
619
+ if (val == '免交') {
620
+ this.mjshow = true
621
+ } else if (val == '赠气' && (this.model.f_preamount || this.model.f_preamount != '')) {
622
+ if (this.row.f_collection_type == '按气量') {
623
+ this.pregas()
624
+ } else {
625
+ this.preamount()
626
+ }
627
+ } else {
628
+ this.mjshow = false
629
+ }
630
+ // if(this.row.f_collection_type == '按气量'){
631
+ // this.pregas();
632
+ // }else{
633
+ // this.preamount();
634
+ // }
635
+ },
636
+ 'model.f_collection' (val) {
637
+ // 获取计算优惠
638
+ this.getPrivilegeList()
639
+ }
640
+ },
641
+ events: {
642
+ // 删除Resid数组元素
643
+ 'delResid' (val) {
644
+ this.resid.$remove({id: val, f_biobid: ''})
645
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
646
+ },
647
+ // 增加Resid数组元素
648
+ 'resid' (val) {
649
+ this.resid.push({id: val, f_biobid: ''})
650
+ }
651
+ },
652
+ methods: {
653
+ // 根据收款金额计算划价信息
654
+ // 需要配置 calculatePreByCollection = true
655
+ async calculatePreByCollection() {
656
+ try {
657
+ this.model.f_collection = (this.model.f_collection - 0)
658
+ let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
659
+ // 通过收款进行划价
660
+ let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
661
+ this.model.f_pregas = parseInt(getGas.data.gas)
662
+ let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
663
+ this.model.chargeprice = dymoney2.data.chargeprice
664
+ Object.assign(this.model, this.model, dymoney2.data)
665
+ this.model.f_totalcost = dymoney2.data.chargenum
666
+ this.model.f_preamount = dymoney2.data.chargenum
667
+ this.calText(dymoney2.data.chargeprice)
668
+ } catch (error) {
669
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
670
+ this.$dispatch('error', '发卡售气', this.model, error)
671
+ }
672
+ },
673
+ // 校验发票信息
674
+ checkInvoiceMsg (flag) {
675
+ // 校验是否超出最大透支余额
676
+ if (this.model.f_payment == '系统余额透支') {
677
+ const maxOverdraftBalance = -(this.$appdata.getSingleValue('最大透支余额') - 0)
678
+ const curSysBalance = (this.row.f_sys_balance - 0) - (this.model.f_totalcost - 0)
679
+ if (curSysBalance < maxOverdraftBalance) {
680
+ this.$showAlert('您的系统余额将超出最大透支余额,请使用别的付款方式!', 'danger', 5000)
681
+ return
682
+ }
683
+ this.model.f_sys_balance = curSysBalance
684
+ }
685
+
686
+ // 收款回车时, 如果确认按钮是灰色不进行任何操作
687
+ if (flag) return
688
+ console.log(this.model.f_print[0])
689
+ if (this.model.f_print[0] === '电子发票') {
690
+ if (!this.row.f_taxpayer_id) {
691
+ this.row.f_taxpayer_id = this.row.f_idnumber
692
+ }
693
+ if (!this.row.f_paper_name) {
694
+ this.row.f_paper_name = this.row.f_user_name
695
+ }
696
+ if (!this.row.f_address_phone) {
697
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
698
+ }
699
+ if (!this.row.f_email) {
700
+ this.row.f_email = this.row.f_email
701
+ }
702
+ this.eticket_msg = true
703
+ } else {
704
+ this.confirm()
705
+ }
706
+ },
707
+ confirm () {
708
+ this.eticket_msg = false
709
+ if (this.model.f_payment.length > 0 && this.model.f_payment.includes('余额写卡')) {
710
+ if (this.model.f_collection > this.row.f_balance) {
711
+ this.$showAlert('请注意!您的账户余额小于当前写卡金额,无法进行余额写卡,请修改后重试', 'warning', 2000)
712
+ return
713
+ }
714
+
715
+ if (this.model.f_collection > 0) {
716
+ this.$showAlert('请注意!进行余额写卡,收款不能大于0', 'warning', 1000)
717
+ return
718
+ }
719
+ }
720
+ this.$showMessage(`确定对用户${this.row.f_user_name}进行卡表收费吗?`, ['confirm', 'cancel']).then(async (res) => {
721
+ if (res === 'confirm') {
722
+ // 先调用付款码支付组件流程
723
+ let ss = await this.$refs.paymentcode.flowPath()
724
+ this.$refs.paymentcode.paymentCodeShow = false
725
+ console.log('付款码操作返回', ss)
726
+ if (!ss.result) return
727
+
728
+ this.clickConfirm = true
729
+ this.model.f_curbalance = this.curbalance
730
+ this.$dispatch('no-button')
731
+ sellgasGen(this)
732
+ }
733
+ })
734
+ },
735
+ eticket_toggle () {
736
+ this.eticket_show = false
737
+ this.$dispatch('success', '卡表收费')
738
+ },
739
+ clean () {
740
+ this.$info('取消操作')
741
+ this.$dispatch('refresh', this.row)
742
+ },
743
+ validateBill (val) {
744
+ this.validateOk = !val.isOk
745
+ this.billData.bill = val.bill
746
+ },
747
+ printok () {
748
+ // 收据打完,判断是否还有其他票据进行请求
749
+ for (let i = 0; i < this.model.f_print.length; i++) {
750
+ if (this.model.f_print[i] === '电子发票') {
751
+ this.$CommonService.openEticket(this.row.id, '售气收费')
752
+ }
753
+ }
754
+ this.$dispatch('success', '卡表收费')
755
+ },
756
+ pregas () {
757
+ this.dymoney = 0
758
+ if (this.model.f_pregas && this.model.f_pregas > 0) {
759
+ try {
760
+ // 对气量进行验证
761
+ if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
762
+ this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
763
+ this.model.f_pregas = null
764
+ } else {
765
+ pregasGen(this)
766
+ }
767
+ } catch (error) {
768
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
769
+ this.$dispatch('error', '发卡售气', this.model, error)
770
+ }
771
+ } else {
772
+ this.model.f_pregas = null
773
+ }
774
+ },
775
+ preamount () {
776
+ this.dymoney = 0
777
+ this.model.f_price_id = this.row.f_price_id
778
+ this.model.f_user_id = this.row.f_user_id
779
+ this.model.f_userfiles_id = this.row.f_userfiles_id
780
+ this.model.f_userinfo_id = this.row.f_userinfo_id
781
+ try {
782
+ preamountGen(this)
783
+ } catch (error) {
784
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
785
+ this.$dispatch('error', '发卡售气', this.model, error)
786
+ }
787
+ },
788
+ calText (val) {
789
+ let str = ''
790
+ let num = 0
791
+ val.forEach((item) => {
792
+ if (item.f_gas > 0) {
793
+ num = num + 1
794
+ }
795
+ if (this.row.f_isdecimal === '是') {
796
+ str = str + item.f_price + ' x ' + item.f_gas + '+'
797
+ } else {
798
+ str = str + item.f_price + ' x ' + Math.floor(item.f_gas) + '+'
799
+ }
800
+ })
801
+ str = str.slice(0, str.length - 1)
802
+ this.calculatedetail = str
803
+ if (num > 1) {
804
+ if (this.$login.r.find(item => item == '阶梯提示无按钮')) {
805
+ this.$showAlert('友好提示:本次购气已跨阶梯', 'warning', 3000)
806
+ } else {
807
+ this.$showMessage('友好提示:本次购气已跨阶梯', ['confirm', 'cancel'])
808
+ }
809
+ }
810
+ },
811
+ close () {
812
+ this.print = false
813
+ this.clean()
814
+ },
815
+ paymentchange () {
816
+ if (JSON.stringify(this.model.f_payment).indexOf('转账') !== -1) {
817
+ // 进入转账筛选条件
818
+ this.model.f_banktransfer_person = ''
819
+ this.model.f_banktransfer_date = ''
820
+ this.BankTransfer = true
821
+ } else {
822
+ this.model.f_banktransfer_person = ''
823
+ this.model.f_banktransfer_date = ''
824
+ this.BankTransfer = false
825
+ }
826
+ },
827
+ // 根据选择的付款方式 获取优惠列表
828
+ async getPrivilegeList () {
829
+ // 初始化下拉选择列表
830
+ this.privilegeList = [{label: '无优惠', value: '0'}]
831
+ // 初始为无优惠
832
+ this.model.f_privilege_id = '0'
833
+ if (this.model.f_payment && this.model.f_payment.length) {
834
+ // 查询条件
835
+ let payments = JSON.stringify(this.model.f_payment)
836
+ payments = payments.replace('[', '(').replace(']', ')').replace(/"/g, '\'')
837
+ let HttpReset = new HttpResetClass()
838
+ let privilege = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
839
+ data: {
840
+ items: 'id,f_privilege_name,f_privilege_type',
841
+ tablename: 't_privilege',
842
+ condition: `f_payment in ${payments} and f_gasproperties = '${this.row.f_gasproperties}' and f_user_type = '${this.row.f_user_type}' and f_perform_date <= GETDATE() and f_end_date >= GETDATE() and f_state = '有效'`,
843
+ orderitem: 'id'
844
+ }
845
+ }, {resolveMsg: null, rejectMsg: '查询优惠信息失败'})
846
+ // 查询结果放到下拉列表
847
+ for (let p of privilege.data) {
848
+ this.privilegeList.push({label: p.f_privilege_name, value: p.id, type: p.f_privilege_type})
849
+ }
850
+ this.privilegeCalculate()
851
+ }
852
+ },
853
+ // 优惠计算
854
+ async privilegeCalculate () {
855
+ // 初始化减免金额
856
+ this.model.f_privilege_money = 0
857
+ this.model.f_after_discount = this.model.f_collection
858
+ // 判断是否是自定义优惠
859
+ if (this.model.f_privilege_id != null && parseInt(this.model.f_privilege_id)) {
860
+ for (let p of this.privilegeList) {
861
+ if (p.value == this.model.f_privilege_id && p.type == '自定义') {
862
+ this.model.f_privilege_money = window.prompt('请输入你想优惠的金额')
863
+ if (!(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money) || !(/^[1-9]\d*(\.\d+)?$/).test(this.model.f_privilege_money)) {
864
+ this.$showMessage('金额输入格式不正确!')
865
+ this.model.f_privilege_money = 0
866
+ return
867
+ }
868
+ if ((this.model.f_privilege_money - 0) >= this.model.f_collection) {
869
+ this.$showMessage('减免金额不能大于等于收款金额')
870
+ this.model.f_privilege_money = 0
871
+ return
872
+ }
873
+ }
874
+ }
875
+ }
876
+ // 优惠方式, 收款 缺一不计算
877
+ if (this.model.f_payment && this.model.f_payment.length && parseInt(this.model.f_privilege_id) && this.model.f_collection) {
878
+ let c = {
879
+ f_privilege_id: this.model.f_privilege_id,
880
+ f_collection: this.model.f_collection,
881
+ f_privilege_money: this.data.f_privilege_money
882
+ }
883
+ let privilegeData = await this.$resetpost('rs/logic/calculatePrivilege', c, {
884
+ resolveMsg: null,
885
+ rejectMsg: '计算优惠金额出错'
886
+ })
887
+ // 减免金额
888
+ this.model.f_privilege_money = privilegeData.data.f_privilege_money
889
+ // 减免后收款金额
890
+ this.model.f_after_discount = privilegeData.data.f_collection
891
+ }
892
+ },
893
+ // 判断当前用户是否可以使用系统余额透支
894
+ canOverdraftBalance () {
895
+ return this.config.overdraftBalance && this.row.f_user_type != '民用'
896
+ }
897
+ },
898
+ computed: {
899
+ authArr () {
900
+ return this.$login.r ? this.$login.r : []
901
+ },
902
+ 'curbalance' () {
903
+ if (this.model.f_payment == '赠气') {
904
+ return this.model.f_balance
905
+ }
906
+ if (this.model.f_preamount) {
907
+ if (this.config.calculatePreByCollection) {
908
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
909
+ }
910
+ // if (this.row.f_collection_type === '按金额') {
911
+ // return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
912
+ // } else {
913
+ if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
914
+ return ((this.row.f_balance - 0) - (this.model.f_preamount - 0) + (this.model.f_collection - 0)).toFixed(4)
915
+ } else {
916
+ return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
917
+ }
918
+ // return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
919
+ // }
920
+ } else {
921
+ return this.row.f_balance
922
+ }
923
+ },
924
+ 'invoice_show_gas' () {
925
+ return this.row.f_collection_type === '按气量' ? '是' : '否'
926
+ },
927
+ 'islegal' () {
928
+ console.log('支付分离。。。', this.paymentModel.length, this.model.f_collection)
929
+ if (this.paymentModel.length > 1 && this.model.f_collection) {
930
+ let sum = 0
931
+ this.paymentModel.forEach((res) => {
932
+ sum += (res.f_money - 0)
933
+ })
934
+ return (this.model.f_collection - 0) === (sum - 0)
935
+ } else {
936
+ return true
937
+ }
938
+ }
939
+ }
940
+ }
941
+ </script>
942
+
943
+ <style>
944
+ </style>
@@ -29,4 +29,6 @@ export default function () {
29
29
  Vue.component('high-meter-idcard', (resolve) => { require(['./HighMeterCard'], resolve) })
30
30
  // 文件上传
31
31
  Vue.component('upload-idcard', (resolve) => {require(['./UploadIdCard'], resolve)})
32
+ // 卡表收费
33
+ Vue.component('card-meter-center', (resolve) => { require(['./components/revenue/CardMeterCenter'], resolve) })
32
34
  }
@@ -133,17 +133,17 @@
133
133
  <a style="font-size: 16px;font-weight: 500;">连接管信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
134
134
  </div>
135
135
  <div class="row auto" style="margin-left: 10px;">
136
- <div class="col-sm-6 form-group" style="padding-right: 5px;">
137
- <label class="font_normal_body">管道类型</label>
138
- <v-select :value.sync="row.f_pipe_type" v-model="row.f_pipe_type"
139
- :options='pipetypes' placeholder='管道类型' :value-single="true"
136
+ <div class="col-sm-8 form-group" style="padding-right: 5px;">
137
+ <label class="font_normal_body">有无不锈钢波纹管</label>
138
+ <v-select :value.sync="row.f_pipe_type" v-model="row.f_pipe_type"
139
+ :options='pipetypes' placeholder='有无不锈钢波纹管' :value-single="true"
140
140
  close-on-select></v-select>
141
141
  </div>
142
- <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[!row.f_pipe_num ? 'has-error' : '']">
143
- <label class="font_normal_body">*管道数量</label>
144
- <input type="number" class="input_search" style="width: 60%" v-model="row.f_pipe_num"
142
+ <div class="col-sm-4 form-group" style="padding-right: 5px;" :class="[!row.f_pipe_num ? 'has-error' : '']">
143
+ <label class="font_normal_body">*波纹管数量</label>
144
+ <input type="number" class="input_search" style="width: 40%" v-model="row.f_pipe_num"
145
145
  required="true"
146
- placeholder='管道数量'>
146
+ placeholder='数量'>
147
147
  </div>
148
148
  <div class="col-sm-6 form-group" style="padding-right: 5px;">
149
149
  <label class="font_normal_body" title="连接管安装日期">安装日期</label>
@@ -153,8 +153,8 @@
153
153
  :format="'yyyy-MM-dd'">
154
154
  </datepicker>
155
155
  </div>
156
- <div class="col-sm-6 form-group" style="padding-right: 5px;">
157
- <label class="font_normal_body" title="连接管到期日期">到期日期</label>
156
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
157
+ <label class="font_normal_body" title="连接管到期日期" style="margin-left: 20px">到期日期</label>
158
158
  <datepicker placeholder="连接管到期日期" style="width: 60%"
159
159
  v-model="row.f_pipeexpire_date"
160
160
  :value.sync="row.f_pipeexpire_date"
@@ -261,6 +261,7 @@ export default {
261
261
  imgadd: '/images/mainicon/adddevice.png',
262
262
  devicetypes: this.$appdata.getParam('设备类型'),
263
263
  pipetypes: this.$appdata.getParam('管道类型'),
264
+ // pipetypes: ['有不锈钢波纹管','无不锈钢波纹管'],
264
265
  WatchPurchases: this.$appdata.getParam('购买方式'),
265
266
  installperson: this.$appdata.getParam('安装人'),
266
267
  installtype: this.$appdata.getParam('安装方式'),
package/src/sale.js CHANGED
@@ -1136,9 +1136,16 @@ export default function () {
1136
1136
  // json模板
1137
1137
  Vue.component('json-parse', (resolve) => { require(['./components/revenue/comprehen/common/JSONParse'], resolve) })
1138
1138
  // 六安第三方过户预约审核页面
1139
- Vue.component('transfer-audit-center', (resolve) => { require(['./components/revenue/third/transferAuditCenter'], resolve) })
1139
+ // Vue.component('transfer-audit-center', (resolve) => { require(['./components/revenue/third/transferAuditCenter'], resolve) })
1140
1140
  // 六安第三方过户预约审核列表页面
1141
- Vue.component('transfer-audit', (resolve) => { require(['./components/revenue/third/transferAudit'], resolve) })
1141
+ // Vue.component('transfer-audit', (resolve) => { require(['./components/revenue/third/transferAudit'], resolve) })
1142
1142
  // 六安第三方过户预约审核数据展示页面
1143
- Vue.component('transfer-audit-dispose-basics', (resolve) => { require(['./components/revenue/third/transferAuditDisposeBasics'], resolve) })
1143
+ // Vue.component('transfer-audit-dispose-basics', (resolve) => { require(['./components/revenue/third/transferAuditDisposeBasics'], resolve) })
1144
+ // 日照第三方过户预约审核页面
1145
+ Vue.component('transfer-audit-center', (resolve) => { require(['./components/revenue/third/日照/transferAuditCenter'], resolve) })
1146
+ // 日照第三方过户预约审核列表页面
1147
+ Vue.component('transfer-audit', (resolve) => { require(['./components/revenue/third/日照/transferAudit'], resolve) })
1148
+ // 日照第三方过户预约审核数据展示页面
1149
+ Vue.component('transfer-audit-dispose-basics', (resolve) => { require(['./components/revenue/third/日照/transferAuditDisposeBasics'], resolve) })
1150
+
1144
1151
  }