sale-client 3.7.63 → 3.7.64

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.7.63",
3
+ "version": "3.7.64",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -50,16 +50,21 @@ export default {
50
50
  },
51
51
  methods: {
52
52
  arrAddFun () {
53
- // 拓展数组去空值的方法
54
- Array.prototype.removeEmpty = function () {
55
- for (var i = 0; i < this.length; i++) {
56
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
- this.splice(i, 1)
58
- i--
53
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
54
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
55
+ value: function () {
56
+ for (var i = 0; i < this.length; i++) {
57
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
58
+ this.splice(i, 1)
59
+ i--
60
+ }
59
61
  }
60
- }
61
- return this
62
- }
62
+ return this
63
+ },
64
+ enumerable: false,
65
+ writable: true,
66
+ configurable: true
67
+ })
63
68
  },
64
69
  // 合并二维数组并去空
65
70
  mergeRowData (rowsdata) {
@@ -49,16 +49,21 @@
49
49
  },
50
50
  methods: {
51
51
  arrAddFun () {
52
- // 拓展数组去空值的方法
53
- Array.prototype.removeEmpty = function () {
54
- for (var i = 0; i < this.length; i++) {
55
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
56
- this.splice(i, 1)
57
- i--
52
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
53
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
54
+ value: function () {
55
+ for (var i = 0; i < this.length; i++) {
56
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
+ this.splice(i, 1)
58
+ i--
59
+ }
58
60
  }
59
- }
60
- return this
61
- }
61
+ return this
62
+ },
63
+ enumerable: false,
64
+ writable: true,
65
+ configurable: true
66
+ })
62
67
  },
63
68
  // 合并二维数组并去空
64
69
  mergeRowData (rowsdata) {
@@ -50,16 +50,21 @@
50
50
  },
51
51
  methods: {
52
52
  arrAddFun () {
53
- // 拓展数组去空值的方法
54
- Array.prototype.removeEmpty = function () {
55
- for (var i = 0; i < this.length; i++) {
56
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
- this.splice(i, 1)
58
- i--
53
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
54
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
55
+ value: function () {
56
+ for (var i = 0; i < this.length; i++) {
57
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
58
+ this.splice(i, 1)
59
+ i--
60
+ }
59
61
  }
60
- }
61
- return this
62
- }
62
+ return this
63
+ },
64
+ enumerable: false,
65
+ writable: true,
66
+ configurable: true
67
+ })
63
68
  },
64
69
  // 合并二维数组并去空
65
70
  mergeRowData (rowsdata) {
@@ -50,16 +50,21 @@
50
50
  },
51
51
  methods: {
52
52
  arrAddFun () {
53
- // 拓展数组去空值的方法
54
- Array.prototype.removeEmpty = function () {
55
- for (var i = 0; i < this.length; i++) {
56
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
- this.splice(i, 1)
58
- i--
53
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
54
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
55
+ value: function () {
56
+ for (var i = 0; i < this.length; i++) {
57
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
58
+ this.splice(i, 1)
59
+ i--
60
+ }
59
61
  }
60
- }
61
- return this
62
- }
62
+ return this
63
+ },
64
+ enumerable: false,
65
+ writable: true,
66
+ configurable: true
67
+ })
63
68
  },
64
69
  // 合并二维数组并去空
65
70
  mergeRowData (rowsdata) {
@@ -49,16 +49,21 @@
49
49
  },
50
50
  methods: {
51
51
  arrAddFun () {
52
- // 拓展数组去空值的方法
53
- Array.prototype.removeEmpty = function () {
54
- for (var i = 0; i < this.length; i++) {
55
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
56
- this.splice(i, 1)
57
- i--
52
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
53
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
54
+ value: function () {
55
+ for (var i = 0; i < this.length; i++) {
56
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
+ this.splice(i, 1)
58
+ i--
59
+ }
58
60
  }
59
- }
60
- return this
61
- }
61
+ return this
62
+ },
63
+ enumerable: false,
64
+ writable: true,
65
+ configurable: true
66
+ })
62
67
  },
63
68
  // 合并二维数组并去空
64
69
  mergeRowData (rowsdata) {
@@ -50,16 +50,21 @@
50
50
  },
51
51
  methods: {
52
52
  arrAddFun () {
53
- // 拓展数组去空值的方法
54
- Array.prototype.removeEmpty = function () {
55
- for (var i = 0; i < this.length; i++) {
56
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
- this.splice(i, 1)
58
- i--
53
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
54
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
55
+ value: function () {
56
+ for (var i = 0; i < this.length; i++) {
57
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
58
+ this.splice(i, 1)
59
+ i--
60
+ }
59
61
  }
60
- }
61
- return this
62
- }
62
+ return this
63
+ },
64
+ enumerable: false,
65
+ writable: true,
66
+ configurable: true
67
+ })
63
68
  },
64
69
  // 合并二维数组并去空
65
70
  mergeRowData (rowsdata) {
@@ -50,16 +50,21 @@
50
50
  },
51
51
  methods: {
52
52
  arrAddFun () {
53
- // 拓展数组去空值的方法
54
- Array.prototype.removeEmpty = function () {
55
- for (var i = 0; i < this.length; i++) {
56
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
57
- this.splice(i, 1)
58
- i--
53
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
54
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
55
+ value: function () {
56
+ for (var i = 0; i < this.length; i++) {
57
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
58
+ this.splice(i, 1)
59
+ i--
60
+ }
59
61
  }
60
- }
61
- return this
62
- }
62
+ return this
63
+ },
64
+ enumerable: false,
65
+ writable: true,
66
+ configurable: true
67
+ })
63
68
  },
64
69
  // 合并二维数组并去空
65
70
  mergeRowData (rowsdata) {
@@ -62,16 +62,21 @@
62
62
  this.files = value
63
63
  },
64
64
  arrAddFun () {
65
- // 拓展数组去空值的方法
66
- Array.prototype.removeEmpty = function () {
67
- for (var i = 0; i < this.length; i++) {
68
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
69
- this.splice(i, 1)
70
- i--
65
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
66
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
67
+ value: function () {
68
+ for (var i = 0; i < this.length; i++) {
69
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
70
+ this.splice(i, 1)
71
+ i--
72
+ }
71
73
  }
72
- }
73
- return this
74
- }
74
+ return this
75
+ },
76
+ enumerable: false,
77
+ writable: true,
78
+ configurable: true
79
+ })
75
80
  },
76
81
  async save () {
77
82
  var edititem = []
@@ -54,16 +54,21 @@
54
54
  },
55
55
  methods: {
56
56
  arrAddFun () {
57
- // 拓展数组去空值的方法
58
- Array.prototype.removeEmpty = function () {
59
- for (var i = 0; i < this.length; i++) {
60
- if (this[i] == '' || typeof (this[i]) == 'undefined') {
61
- this.splice(i, 1)
62
- i--
57
+ // 拓展数组去空值的方法(不可枚举,避免污染 for...in 遍历)
58
+ Object.defineProperty(Array.prototype, 'removeEmpty', {
59
+ value: function () {
60
+ for (var i = 0; i < this.length; i++) {
61
+ if (this[i] == '' || typeof (this[i]) == 'undefined') {
62
+ this.splice(i, 1)
63
+ i--
64
+ }
63
65
  }
64
- }
65
- return this
66
- }
66
+ return this
67
+ },
68
+ enumerable: false,
69
+ writable: true,
70
+ configurable: true
71
+ })
67
72
  },
68
73
  // 合并二维数组并去空
69
74
  mergeRowData (rowsdata) {
@@ -0,0 +1,827 @@
1
+ <template>
2
+ <div class="auto" id="meterInfoTest_New">
3
+ <validator name='m' @valid="mValid(true)" @invalid="mValid(false)">
4
+ <form class="form-horizontal select-overspread ">
5
+ <div class="row">
6
+ <div class="col-sm-4 form-group" :class="[$m.meternumber.required ? 'has-error' : '']">
7
+ <label for="f_meternumber" class="font_normal_body">&ensp;表&emsp;&emsp;号</label>
8
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_meternumber"
9
+ @blur="meternumberValidate()" placeholder='表号'
10
+ v-next-el="{id: 'metertitles'}">
11
+ </div>
12
+ <div class="col-sm-4 form-group" :class="[$m.f_metertitles.required ? 'has-error' : '']"
13
+ v-show="(formconfig && formconfig.f_metertitles && formconfig.f_metertitles.required) || !onlyshowmust"
14
+ v-if="getConfigShowItem('f_metertitles')">
15
+ <label for="f_metertitles" class="font_normal_body">&ensp;表&ensp;封&ensp;号</label>
16
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_metertitles" placeholder='表封号'
17
+ v-next-el="{id: 'meterbase'}">
18
+ </div>
19
+ <div class="col-sm-4 form-group" :class="[$m.f_defendcard.required ? 'has-error' : '']"
20
+ v-show="(formconfig && formconfig.f_defendcard && formconfig.f_defendcard.required) || !onlyshowmust"
21
+ v-if="getConfigShowItem('f_defendcard',false)">
22
+ <label class="font_normal_body">防盗卡号1</label>
23
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_defendcard"
24
+ v-validate:f_defendcard=getConfigValidate('f_defendcard',false)
25
+ :value.sync="row.f_defendcard"
26
+ placeholder='防盗卡号1' >
27
+ </div>
28
+ <div class="col-sm-4 form-group" :class="[$m.f_defendcard_two.required ? 'has-error' : '']"
29
+ v-show="(formconfig && formconfig.f_defendcard_two && formconfig.f_defendcard_two.required) || !onlyshowmust"
30
+ v-if="getConfigShowItem('f_defendcard_two',false)">
31
+ <label class="font_normal_body">防盗卡号2</label>
32
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_defendcard_two"
33
+ v-validate:f_defendcard_two=getConfigValidate('f_defendcard_two',false)
34
+ :value.sync="row.f_defendcard_two"
35
+ placeholder='防盗卡号2' >
36
+ </div>
37
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_meter_base')"
38
+ v-show="(formconfig && formconfig.f_meter_base && formconfig.f_meter_base.required) || !onlyshowmust">
39
+ <label for="f_meter_base" class="font_normal_body">&ensp;表&ensp;读&ensp;数</label>
40
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_meter_base" placeholder='表底数'
41
+ :disabled="!jurisdiction.includes('档案信息查询修改')" :readonly="!row.f_userfiles_id">
42
+ </div>
43
+ <div class="col-sm-4 form-group" title="涉及权限:【档案信息查询修改】" v-if="getConfigShowItem('f_initial_base')"
44
+ v-show="(formconfig && formconfig.f_initial_base && formconfig.f_initial_base.required) || !onlyshowmust">
45
+ <label for="f_meter_base" class="font_normal_body">&ensp;初始底数</label>
46
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_initial_base" placeholder='表底数'
47
+ :disabled="!jurisdiction.includes('档案信息查询修改')">
48
+ </div>
49
+ <div class="col-sm-4 form-group">
50
+ <label for="gasbrand" class="font_normal_body">气表品牌</label>
51
+ <v-select :value.sync="row.gasbrand" :options='meterbrands' placeholder='气表品牌' close-on-select
52
+ search @change='brandChange' v-model='row.gasbrand' v-ref:brand></v-select>
53
+ </div>
54
+ <div class="col-sm-4 form-group">
55
+ <label for="gasmodel" class="font_normal_body">气表型号</label>
56
+ <v-select :value.sync="row.gasmodel" :options='row.gasbrand[0].gasmodel' placeholder='气表型号'
57
+ close-on-select
58
+ v-model='row.gasmodel' :disabled='row.gasbrand.length === 0 ' v-ref:model></v-select>
59
+ </div>
60
+ <div class="col-sm-4 form-group" :class="[$m.name.required ? 'has-error' : '']">
61
+ <label for="pricename" class="font_normal_body">*气价名称</label>
62
+ <v-select :value.sync="row.pricename" v-model="row.pricename" search
63
+ placeholder='气价名称' :options="getPricenames" @change="priceChange"
64
+ close-on-select :disabled="permissionPrice" v-ref:name></v-select>
65
+ <input type="text" v-show="false" v-model="$refs.name.selectedItems" v-validate:name='{required: true }'>
66
+ </div>
67
+ <div class="col-sm-4 form-group">
68
+ <label for="f_username" class="font_normal_body">&ensp;客户类型</label>
69
+ <v-select :value.sync="row.f_user_type"
70
+ :options='usertypes' placeholder='客户类型'
71
+ @change="userTypeChange()"
72
+ :disabled="true"
73
+ close-on-select></v-select>
74
+ </div>
75
+ <!--<div class="col-sm-4 form-group" v-if="showindustry">-->
76
+ <!--<label for="f_username" class="font_normal_body" title="参数:工业备注" >&ensp;工业备注</label>-->
77
+ <!--<input type="text" v-show="false" v-model="$refs.f_industry_comments.selectedItems" >-->
78
+ <!--<v-select :value.sync="row.f_industry_comments"-->
79
+ <!--v-ref:f_industry_comments-->
80
+ <!--:options='industrycomments' placeholder='工业备注'-->
81
+ <!--v-model='row.f_industry_comments'-->
82
+ <!--close-on-select></v-select>-->
83
+ <!--</div>-->
84
+ <div class="col-sm-4 form-group"
85
+ :class="[$m.gas.required ? 'select-error' : '']">
86
+ <label for="f_username" class="font_normal_body">&ensp;用气性质</label>
87
+ <input type="text" v-show="false" v-model="$refs.gas.selectedItems" v-validate:gas='{required: true }'>
88
+ <v-select :value.sync="row.f_gasproperties" v-model="row.f_gasproperties"
89
+ :options='gasproperties' placeholder='用气性质'
90
+ :disabled="true"
91
+ close-on-select v-ref:gas></v-select>
92
+ </div>
93
+ <div class="col-sm-4 form-group" v-show="row.f_gasproperties=='工业'||row.f_gasproperties=='工业用气'">
94
+ <label for="f_gongye_type" class="font_normal_body" title="参数:工业备注">&ensp;工业备注</label>
95
+ <v-select :value.sync="row.f_gongye_type" v-model='row.f_gongye_type'
96
+ style="width:60%"
97
+ :options='gongyetype' placeholder='工业备注'
98
+ close-on-select
99
+ v-el:cc></v-select>
100
+ </div>
101
+ <div class="col-sm-4 form-group">
102
+ <label for="f_detailprice" class="font_normal_body">&ensp;价&emsp;&emsp;格</label>
103
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_detailprice" placeholder='价格'
104
+ disabled>
105
+ </div>
106
+ <div class="col-sm-4 form-group" :class="[$m.type.required ? 'select-error' : '']">
107
+ <label for="pricetype" class="font_normal_body">&ensp;气价类型</label>
108
+ <v-select :value.sync="row.pricetype" v-model="row.pricetype"
109
+ placeholder='气价类型' :options="pricetypes"
110
+ :value-single="true"
111
+ :disabled="true"
112
+ close-on-select v-ref:type>
113
+ </v-select>
114
+ <input type="text" v-show="false" v-model="$refs.type.selectedItems" v-validate:type='{required: true }'>
115
+ </div>
116
+ <div class="col-sm-4 form-group">
117
+ <label class="font_normal_body">&ensp;气价备注</label>
118
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_price_comments" placeholder='气价备注' disabled>
119
+ </div>
120
+
121
+ <div class="col-sm-4 form-group" title="涉及权限:【档案信息查询修改】" v-if="getConfigShowItem('f_total_gas')"
122
+ v-show="(formconfig && formconfig.f_total_gas && formconfig.f_total_gas.required) || !onlyshowmust">
123
+ <label for="f_meter_base" class="font_normal_body">&ensp;累购气量</label>
124
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_total_gas" placeholder='累购气量'
125
+ :disabled="!jurisdiction.includes('档案信息查询修改')">
126
+ </div>
127
+
128
+ <div class="col-sm-4 form-group" title="涉及权限:【档案信息查询修改】" v-if="getConfigShowItem('f_total_fee')"
129
+ v-show="(formconfig && formconfig.f_total_fee && formconfig.f_total_fee.required) || !onlyshowmust">
130
+ <label for="f_meter_base" class="font_normal_body">&ensp;累购金额</label>
131
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_total_fee" placeholder='累购金额'
132
+ :disabled="!jurisdiction.includes('档案信息查询修改')">
133
+ </div>
134
+ <!--<div class="row">-->
135
+ <!--<div class="col-sm-12" style="margin-top: -10px">-->
136
+ <!--<label for="f_userfiles_address" class="font_normal_body">安装地址</label>-->
137
+ <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_userfiles_address" placeholder='安装地址'>-->
138
+ <!--</div>-->
139
+ <!--</div>-->
140
+
141
+ <div class="col-sm-4 form-group"
142
+ :class="[$m.f_aroundmeter.required ? 'has-error' : '']"
143
+ v-show="(formconfig && formconfig.f_aroundmeter && formconfig.f_aroundmeter.required) || !onlyshowmust"
144
+ v-if="getConfigShowItem('f_aroundmeter')">
145
+ <input type="text" v-show="false" v-model="row.f_aroundmeter"
146
+ v-validate:f_aroundmeter="getConfigValidate('f_aroundmeter',false)">
147
+ <label for="gasmodel" class="font_normal_body w2" style="width: auto;letter-spacing: 2em;margin-right: -2em;margin-left: -2em;">&ensp;{{getConfigLabelName('f_aroundmeter','表向')}}</label>
148
+ <v-select :value.sync="row.f_aroundmeter" :options='aroundmeters'
149
+ :placeholder="getConfigPlaceholder('f_aroundmeter','表向')"
150
+ close-on-select
151
+ v-model='row.f_aroundmeter'></v-select>
152
+ </div>
153
+ <div class="col-sm-4 form-group" :class="[$m.f_gas_person.required ? 'has-error' : '']"
154
+ v-show="(formconfig && formconfig.f_gas_person && formconfig.f_gas_person.required) || !onlyshowmust"
155
+ v-if="getConfigShowItem('f_gas_person')">
156
+ <label for="f_gas_person" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em"
157
+ class="font_normal_body">&ensp;{{getConfigLabelName('f_gas_person','通气人')}}</label>
158
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_gas_person"
159
+ v-validate:f_gas_person="getConfigValidate('f_gas_person',false)"
160
+ placeholder='通气人'>
161
+ </div>
162
+ <div class="col-sm-4 form-group" :class="[$m.f_gas_date.required ? 'has-error' : '']"
163
+ v-show="(formconfig && formconfig.f_gas_date && formconfig.f_gas_date.required) || !onlyshowmust"
164
+ v-if="getConfigShowItem('f_gas_date')">
165
+ <input type="text" v-model="$refs.f_gas_date.value" v-show="false"
166
+ v-validate:f_gas_date="getConfigValidate('f_gas_date',false)">
167
+ <label for="f_gas_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_gas_date','通气日期')}}</label>
168
+ <datepicker style="width:60%" placeholder="通气日期"
169
+ v-model="row.f_gas_date"
170
+ v-ref:f_gas_date
171
+ :value.sync="row.f_gas_date"
172
+ :format="'yyyy-MM-dd HH:mm:ss'"
173
+ ></datepicker>
174
+ </div>
175
+
176
+ <div class="col-sm-4 form-group" :class="[$m.f_position.required ? 'has-error' : '']"
177
+ v-show="(formconfig && formconfig.f_position && formconfig.f_position.required) || !onlyshowmust"
178
+ v-if="getConfigShowItem('f_gas_date')">
179
+ <label for="f_position" class="font_normal_body" title="参数:安装位置">&ensp;{{getConfigLabelName('f_position','安装位置')}}</label>
180
+ <input type="text" v-model="row.f_position" v-show="false"
181
+ v-validate:f_position="getConfigValidate('f_position',false)">
182
+ <v-select :value.sync="row.f_position" v-model="row.f_position"
183
+ :options='positions' placeholder='安装位置'
184
+ close-on-select></v-select>
185
+ </div>
186
+ <div class="col-sm-4 form-group" v-show="false">
187
+ <label for="f_remanent_gas" class="font_normal_body">剩余气量</label>
188
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_remanent_gas"
189
+ placeholder='剩余气量'
190
+ :disabled="f_userinfo_id">
191
+ <!--<button type="button" name="button" class="btn btn-link" @click="modefiy('f_remanent_gas')" v-if="f_userinfo_id">修改</button>-->
192
+ </div>
193
+ <div class="col-sm-4 form-group" :class="[$m.f_install_person.required ? 'has-error' : '']"
194
+ v-show="(formconfig && formconfig.f_install_person && formconfig.f_install_person.required) || !onlyshowmust"
195
+ v-if="getConfigShowItem('f_install_person')">
196
+ <label for="f_install_person" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_install_person','安装人')}}</label>
197
+ <input type="text" v-model="row.f_install_person" v-show="false"
198
+ v-validate:f_install_person="getConfigValidate('f_install_person',false)">
199
+ <v-select :value.sync="row.f_install_person" v-model="row.f_install_person"
200
+ :options='installperson' placeholder='安装人'
201
+ close-on-select></v-select>
202
+ </div>
203
+ <div class="col-sm-4 form-group" :class="[$m.f_subscribe_date.required ? 'has-error' : '']"
204
+ v-show="(formconfig && formconfig.f_subscribe_date && formconfig.f_subscribe_date.required) || !onlyshowmust"
205
+ v-if="getConfigShowItem('f_subscribe_date')">
206
+ <label for="f_subscribe_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_subscribe_date','预约时间')}}</label>
207
+ <input type="text" v-model="row.f_subscribe_date" v-show="false"
208
+ v-validate:f_subscribe_date="getConfigValidate('f_subscribe_date',false)">
209
+ <datepicker style="width:60%" placeholder="预约通气时间"
210
+ v-model="row.f_subscribe_date"
211
+ :value.sync="row.f_subscribe_date"
212
+ :format="'yyyy-MM-dd HH:mm:ss'"
213
+ ></datepicker>
214
+ </div>
215
+ <div class="col-sm-4 form-group" v-show="opteratormetrbook && ((formconfig && formconfig.f_meter_book_num && formconfig.f_meter_book_num.required) || !onlyshowmust)" :class="[$m.f_meter_book_num.required ? 'has-error' : '']"
216
+ v-if="getConfigShowItem('f_meter_book_num')">
217
+ <label for="f_position" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_meter_book_num','抄表册')}}</label>
218
+ <input type="text" v-model="row.f_meter_book_num" v-show="false"
219
+ v-validate:f_meter_book_num="getConfigValidate('f_meter_book_num',false)">
220
+ <v-select :value.sync="row.f_meter_book_num" v-model="row.f_meter_book_num"
221
+ :options='meterbookoptions' placeholder='抄表册'
222
+ close-on-select></v-select>
223
+ </div>
224
+ <div class="col-sm-4 form-group" :class="[$m.f_install_date.required ? 'has-error' : '']"
225
+ v-show="(formconfig && formconfig.f_install_date && formconfig.f_install_date.required) || !onlyshowmust"
226
+ v-if="getConfigShowItem('f_install_date')">
227
+ <input type="text" v-model="row.f_install_date" v-show="false"
228
+ v-validate:f_install_date="getConfigValidate('f_install_date',false)">
229
+ <label for="f_install_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_install_date','安装日期')}}</label>
230
+ <datepicker style="width:60%" id="startDate" placeholder="安装日期" width='100%'
231
+ v-model="row.f_install_date"
232
+ :value.sync="row.f_install_date"
233
+ class="datepicker"
234
+ v-ref:f_install_date
235
+ :format="'yyyy-MM-dd HH:mm:ss'"
236
+ :show-reset-button="true">
237
+ </datepicker>
238
+ </div>
239
+ <div class="col-sm-4 form-group" :class="[$m.f_adjustable.required ? 'has-error' : '']"
240
+ v-show="(formconfig && formconfig.f_adjustable && formconfig.f_adjustable.required) || !onlyshowmust"
241
+ v-if="getConfigShowItem('f_adjustable')">
242
+ <label for="f_adjustable" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_adjustable','调压箱')}}</label>
243
+ <input type="text" v-model="row.f_adjustable" v-show="false"
244
+ v-validate:f_adjustable="getConfigValidate('f_adjustable',false)">
245
+ <v-select :value.sync="row.f_adjustable" :options='adjustables' placeholder='调压箱' close-on-select
246
+ v-model='row.f_adjustable' :search='true'></v-select>
247
+ </div>
248
+ <div class="col-sm-4 form-group" :class="[$m.f_hand_date.required ? 'has-error' : '']"
249
+ v-show="(formconfig && formconfig.f_hand_date && formconfig.f_hand_date.required) || !onlyshowmust"
250
+ v-if="getConfigShowItem('f_hand_date')">
251
+ <label for="f_hand_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_hand_date','上次抄表')}}</label>
252
+ <input type="text" v-model="row.f_hand_date" v-show="false"
253
+ v-validate:f_hand_date="getConfigValidate('f_hand_date',false)">
254
+ <datepicker style="width:60%" id="f_hand_date" placeholder="上次抄表日期"
255
+ v-model="row.f_hand_date"
256
+ :value.sync="row.f_hand_date"
257
+ class="datepicker"
258
+ :format="'yyyy-MM-dd HH:mm:ss'"
259
+ :show-reset-button="true">
260
+ </datepicker>
261
+ </div>
262
+ <div class="col-sm-4 form-group" :class="[$m.f_price_ratio.required ? 'has-error' : '']"
263
+ v-show="(formconfig && formconfig.f_price_ratio && formconfig.f_price_ratio.required) || !onlyshowmust"
264
+ v-if="getConfigShowItem('f_price_ratio')">
265
+ <label for="f_ratio" class="font_normal_body" style="width: auto;letter-spacing: 2em;margin-right: -2em;margin-left: -2em">&ensp;{{getConfigLabelName('f_price_ratio','比率')}}</label>
266
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_price_ratio"
267
+ :value.sync="row.f_price_ratio"
268
+ v-validate:f_price_ratio=getConfigValidate('f_price_ratio',false)
269
+ placeholder='比率'>
270
+ </div>
271
+ <div class="col-sm-4 form-group" :class="[$m.f_scrap_date.required ? 'has-error' : '']"
272
+ v-show="(formconfig && formconfig.f_scrap_date && formconfig.f_scrap_date.required) || !onlyshowmust"
273
+ v-if="getConfigShowItem('f_scrap_date')">
274
+ <label for="f_scrap_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_scrap_date','报废日期')}}</label>
275
+ <input type="text" v-model="row.f_scrap_date" v-show="false"
276
+ v-validate:f_scrap_date="getConfigValidate('f_scrap_date',false)">
277
+ <datepicker style="width:60%" id="ScrapDate" placeholder="报废日期" width='100%'
278
+ v-model="row.f_scrap_date"
279
+ :value.sync="row.f_scrap_date"
280
+ class="datepicker"
281
+ :format="'yyyy-MM-dd'"
282
+ :show-reset-button="true">
283
+ </datepicker>
284
+ </div>
285
+ <div class="col-sm-4 form-group" v-show="row.f_meter_classify == '物联网表' && (formconfig && formconfig.f_valve_state.required || !onlyshowmust)" v-if="getConfigShowItem('f_valve_state')">
286
+ <label for="gasmodel" class="font_normal_body">&ensp;阀门状态</label>
287
+ <v-select :value.sync="row.f_valve_state" :options='valvestate' placeholder='阀门状态' close-on-select
288
+ v-model='row.f_valve_state'></v-select>
289
+ </div>
290
+ <div class="col-sm-4 form-group" :class="[$m.f_garbage_fee.required ? 'has-error' : '']"
291
+ v-show="(formconfig && formconfig.f_garbage_fee && formconfig.f_garbage_fee.required) || !onlyshowmust"
292
+ v-if="getConfigShowItem('f_garbage_fee')">
293
+ <label for="gasmodel" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_garbage_fee','垃圾费')}}</label>
294
+ <input type="text" v-model="row.f_garbage_fee" v-show="false"
295
+ v-validate:f_garbage_fee="getConfigValidate('f_garbage_fee',false)">
296
+ <v-select :value.sync="row.f_garbage_fee" :options='garbagefee' placeholder='垃圾费' close-on-select
297
+ :value-single="true"
298
+ v-model='row.f_garbage_fee'></v-select>
299
+ </div>
300
+ <div class="col-sm-4 form-group" :class="[$m.f_inputtor.required ? 'has-error' : '']"
301
+ v-show="(formconfig && formconfig.f_inputtor && formconfig.f_inputtor.required) || !onlyshowmust"
302
+ v-if="getConfigShowItem('f_inputtor')">
303
+ <label class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_inputtor','抄表员')}}</label>
304
+ <input type="text" v-model="row.f_inputtor" v-show="false"
305
+ v-validate:f_inputtor="getConfigValidate('f_inputtor',false)">
306
+ <v-select :value.sync="row.f_inputtor" v-model='row.f_inputtor'
307
+ style="width:60%"
308
+ :options='inputtores' placeholder='抄表员'
309
+ close-on-select
310
+ condition="f_inputtor like '%{}%'" v-el:cc></v-select>
311
+ </div>
312
+ <div class="col-sm-4 form-group" :class="[$m.f_usetype.required ? 'has-error' : '']"
313
+ v-show="(formconfig && formconfig.f_usetype && formconfig.f_usetype.required) || !onlyshowmust"
314
+ v-if="getConfigShowItem('f_usetype')">
315
+ <label for="f_usetype" class="font_normal_body" title="参数:使用类型">&ensp;{{getConfigLabelName('f_usetype','使用类型')}}</label>
316
+ <input type="text" v-model="row.f_usetype" v-show="false"
317
+ v-validate:f_usetype="getConfigValidate('f_usetype',false)">
318
+ <v-select :value.sync="row.f_usetype" v-model="row.f_usetype"
319
+ :options='usetype' placeholder='使用类型'
320
+ close-on-select></v-select>
321
+ </div>
322
+ <div class="col-sm-4 form-group" :class="[$m.f_usetype.required ? 'has-error' : '']"
323
+ v-show="(formconfig && formconfig.f_usestate && formconfig.f_usestate.required) || !onlyshowmust"
324
+ v-if="getConfigShowItem('f_usestate')">
325
+ <label for="f_position" class="font_normal_body" title="参数:使用状态">&ensp;{{getConfigLabelName('f_usestate','使用状态')}}</label>
326
+ <input type="text" v-model="row.f_usestate" v-show="false"
327
+ v-validate:f_usestate="getConfigValidate('f_usestate',false)">
328
+ <v-select :value.sync="row.f_usestate" v-model="row.f_usestate"
329
+ :options='usestate' placeholder='使用状态'
330
+ close-on-select></v-select>
331
+ </div>
332
+ <div class="col-sm-8 form-group" :class="[$m.f_userfiles_address.required ? 'has-error' : '']"
333
+ v-show="(formconfig && formconfig.f_userfiles_address && formconfig.f_userfiles_address.required) || !onlyshowmust"
334
+ v-if="getConfigShowItem('f_userfiles_address')">
335
+ <label for="f_userfiles_address"
336
+ class="font_normal_body">&ensp;{{getConfigLabelName('f_userfiles_address','安装地址')}}</label>
337
+ <input type="text" class="input_search" style="width:80%" v-model="row.f_userfiles_address"
338
+ v-validate:f_userfiles_address="getConfigValidate('f_userfiles_address',false)"
339
+ placeholder='安装地址'>
340
+ </div>
341
+ <div class="col-sm-4 form-group" :class="[$m.f_alarm_code.required ? 'has-error' : '']"
342
+ v-show="(formconfig && formconfig.f_alarm_code && formconfig.f_alarm_code.required) || !onlyshowmust"
343
+ v-if="getConfigShowItem('f_alarm_code')">
344
+ <label for="f_alarm_code"
345
+ class="font_normal_body">&ensp;{{getConfigLabelName('f_alarm_code','报警器编码')}}</label>
346
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_alarm_code"
347
+ v-validate:f_alarm_code="getConfigValidate('f_alarm_code',false)"
348
+ placeholder='报警器编码'>
349
+ </div>
350
+ <div class="col-sm-4 form-group" :class="[$m.f_force_measure.required ? 'has-error' : '']"
351
+ v-show="(formconfig && formconfig.f_force_measure && formconfig.f_force_measure.required) || !onlyshowmust"
352
+ v-if="getConfigShowItem('f_force_measure',false)">
353
+ <label class="font_normal_body">{{getConfigLabelName('f_force_measure','三项强制措施')}}</label>
354
+ <input type="text" v-model="$refs.measure.selectedItems" v-show="false"
355
+ v-validate:f_force_measure="getConfigValidate('f_force_measure',false)">
356
+ <v-select :value.sync="row.f_force_measure" v-model="row.f_force_measure"
357
+ :options='forceMeasure' placeholder='三项强制措施' :multiple="true"
358
+ v-ref:measure>
359
+ </v-select>
360
+ </div>
361
+ </div>
362
+ </form>
363
+ </validator>
364
+ <!--<idverify :show.sync="show" @change-con="changeVal"></idverify>-->
365
+ <modal v-if="showParame" :show.sync="showParame" v-ref:modal backdrop="false">
366
+ <header slot="modal-header" class="modal-header">
367
+ <button type="button" class="close" @click="cancel"><span>&times;</span></button>
368
+ <h3 class="modal-title" style="text-align: center;">添加参数</h3>
369
+ </header>
370
+ <article slot="modal-body" class="modal-body">
371
+ <add-json-parameter v-ref:addparamlist :gasmodel_id="userfileid" :gastype="gastype"
372
+ :gasid="gasid"></add-json-parameter>
373
+ </article>
374
+ <footer slot="modal-footer" class="modal-footer">
375
+ <button type="button" class="btn btn-primary" @click='confirmUserfiles()'>确认</button>
376
+ </footer>
377
+ </modal>
378
+ </div>
379
+ </template>
380
+
381
+ <script>
382
+ import co from 'co'
383
+ import {HttpResetClass} from 'vue-client'
384
+ import Vue from 'vue'
385
+
386
+ let meterBookGen = function * (self) {
387
+ if (self.$login.r.find(value => value == '抄表册建档')) {
388
+ self.opteratormetrbook = true
389
+ }
390
+ if (!self.f_filialeid) {
391
+ self.f_filialeid = self.$login.f.orgid
392
+ }
393
+ let temp = {
394
+ tablename: 't_meter_book',
395
+ condition: `f_book_state='有效' and f_filiale_id='${self.f_filialeid}'`
396
+ }
397
+ let http = new HttpResetClass()
398
+ let meterbooks = yield http.load('POST', 'rs/sql/saleSingleTable', {data: temp},
399
+ {resolveMsg: null, rejectMsg: '获取抄表册信息失败!!'})
400
+ if (meterbooks.data.length > 0) {
401
+ let options = []
402
+ for (let i = 0; i < meterbooks.data.length; i++) {
403
+ let tmp = {label: meterbooks.data[i].f_book_name, value: `${meterbooks.data[i].id}`}
404
+ options.push(tmp)
405
+ }
406
+ self.meterbookoptions = options
407
+ }
408
+ }
409
+ let brandChangeGen = function* (self, val) {
410
+ let beforeRecord = null
411
+
412
+ if (self.meter.f_meter_classify === '机表') {
413
+ beforeRecord = yield self.$resetpost('rs/sql/saleSingleTable', {
414
+ data: {
415
+ tablename: 't_handplan',
416
+ condition: `f_user_id = '${self.row.f_user_id}' and f_meter_state in ('已抄表','未抄表')`
417
+ }
418
+ }, {resolveMsg: null, rejectMsg: '在档案中更改气表品牌时,获取之前机表抄表信息出错!!'})
419
+ } else {
420
+ beforeRecord = yield self.$resetpost('rs/sql/saleSingleTable', {
421
+ data: {
422
+ tablename: 't_sellinggas',
423
+ condition: `f_user_id = '${self.row.f_user_id}' and f_state = '有效'`
424
+ }
425
+ }, {resolveMsg: null, rejectMsg: '在档案中更改气表品牌时,获取之前卡表收费信息出错!!'})
426
+ }
427
+ if (beforeRecord.data.length > 0) {
428
+ self.$showAlert('该气表已投入使用,如需更改请执行换表操作', 'warning', 3000)
429
+ // self.row.gasbrand = self.meter.gasbrand
430
+ self.$dispatch('success')
431
+ /* self.row.valid = bool
432
+ self.$dispatch('self-valid') */
433
+ } else {
434
+ self.row.f_whether_hairpin = self.row.gasbrand[0].f_meter_type === '机表' ? '无卡' : '未发'
435
+ }
436
+ console.log('111', self.row)
437
+ }
438
+ export default {
439
+ title: '表具信息',
440
+ data () {
441
+ return {
442
+ viewsee: false,
443
+ row: this.meter,
444
+ show: false,
445
+ field: '',
446
+ ratioshow: false,
447
+ userfileid: '',
448
+ gasid: '',
449
+ gastype: 'userfiles',
450
+ showParame: false,
451
+ selectUserFiles: '', // 选中的 userfiles
452
+ jurisdiction: this.$login.r,
453
+ positions: this.$appdata.getParam('安装位置'),
454
+ usetype: this.$appdata.getParam('使用类型'),
455
+ usestate: this.$appdata.getParam('使用状态'),
456
+ aroundmeters: this.$appdata.getParam('左右表'),
457
+ forceMeasure: this.$appdata.getParam('三项强制措施'),
458
+ garbagefee: this.$appdata.getParam('垃圾费'),
459
+ valvestate: this.$appdata.getParam('阀门状态'),
460
+ usertypes: this.$appdata.getParam('用户类型'),
461
+ gasproperties: this.meter.f_user_type && this.meter.f_user_type.length === 1 ? this.$appdata.getParam(this.meter.f_user_type[0]) : [],
462
+ pricetypes: this.$appdata.getParam('气价类型'),
463
+ meterbookoptions: [], // 抄表册选项
464
+ opteratormetrbook: false, // 抄表册操作
465
+ showindustry: false, // 是否显示工业备注
466
+ industrycomments: this.$appdata.getParam('工业备注'),
467
+ oldrow: []
468
+ }
469
+ },
470
+ props: ['f_filialeid', 'meter', 'isdecimal', 'valid', 'f_userinfo_id', 'formconfig', 'onlyshowmust'],
471
+ async ready () {
472
+ console.log('看看meter里面的数据', this.meter, this.row)
473
+ this.row = await Object.assign(this.row, this.meter, {})
474
+
475
+ this.oldrow = this.row
476
+ this.isdecimal = this.row.gasbrand.length > 0 ? this.row.gasbrand.f_isdecimal : '否'
477
+ this.row.valid = false
478
+ if (this.row.pricetype === '混合气价') {
479
+ this.ratioshow = true
480
+ }
481
+ co(meterBookGen(this))
482
+ this.$nextTick(() => {
483
+ console.log('this.row', this.row)
484
+ console.log('this.row.f_force_measure', this.row.f_force_measure)
485
+ if (this.row) {
486
+ if (this.row.f_force_measure !== undefined && Object.prototype.toString.call(this.row.f_force_measure) === '[object Array]') {
487
+ if (this.row.f_force_measure[0]) {
488
+ this.row.f_force_measure = this.row.f_force_measure[0].split(',')
489
+ }
490
+ }
491
+ }
492
+ })
493
+ },
494
+ methods: {
495
+ getConfigValidate (name, defaultVal) {
496
+ this.$resetValidation()
497
+ if (this.formconfig && this.formconfig[name]) {
498
+ let Validate = {}
499
+ if (this.formconfig[name].required) {
500
+ Object.assign(Validate, {required: true})
501
+ }
502
+ if (this.formconfig[name].minlength || this.formconfig[name].minlength === 0) {
503
+ Object.assign(Validate, {minlength: this.formconfig[name].minlength})
504
+ }
505
+ if (this.formconfig[name].maxlength) {
506
+ Object.assign(Validate, {maxlength: this.formconfig[name].maxlength})
507
+ }
508
+ return Validate
509
+ } else if (name === 'f_user_phone') {
510
+ return { minlength: 11, maxlength: 11 }
511
+ } else if (defaultVal) {
512
+ return {required: defaultVal}
513
+ }
514
+ return {}
515
+ },
516
+ getConfigShowItem (name,defaultVal = true) {
517
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].hasOwnProperty('showItem')) {
518
+ return this.formconfig[name].showItem
519
+ } else {
520
+ return defaultVal
521
+ }
522
+ },
523
+ getConfigLabelName (name, defaultVal) {
524
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].labelName) {
525
+ return this.formconfig[name].labelName
526
+ } else {
527
+ return defaultVal
528
+ }
529
+ },
530
+ getConfigPlaceholder (name, defaultVal) {
531
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].placeholder) {
532
+ return this.formconfig[name].placeholder
533
+ } else {
534
+ return defaultVal
535
+ }
536
+ },
537
+ async confirmUserfiles () {
538
+ if (this.$refs.addparamlist.confirm()) {
539
+ var paramlist = this.$refs.addparamlist.addGasParameter
540
+ await this.$resetpost('rs/logic/updateGasParam', {
541
+ data: {
542
+ id: this.selectUserFiles.f_user_id,
543
+ paramlist: paramlist,
544
+ gastype: 'userfiles'
545
+ }
546
+ }, {resolveMsg: '更新成功', rejectMsg: '更新失败'})
547
+ this.showParame = false
548
+ }
549
+ },
550
+
551
+ priceChange (val) {
552
+ if (val.length > 0) {
553
+ this.row.f_user_type = [val[0].f_user_type]
554
+ this.row.f_gasproperties = [val[0].f_gasproperties]
555
+ this.row.pricetype = val[0].f_price_type
556
+ // 展示气价备注
557
+ this.$set('row.f_price_comments', val[0].f_comments ? val[0].f_comments : '无')
558
+ // 展示价格明细
559
+ if (val[0].detailprice) {
560
+ // this.row.f_detailprice = this.$CommonService.getShowPriceDetail(val[0].detailprice)
561
+ this.$set('row.f_detailprice', this.$CommonService.getShowPriceDetail(val[0].detailprice))
562
+ }
563
+ }
564
+ },
565
+ cancel () {
566
+ this.gasid = ''
567
+ this.userfileid = ''
568
+ this.showParame = false
569
+ },
570
+ tablebaseChange () {
571
+ if (this.isdecimal === '是') {
572
+ this.$set('row.f_meter_base', (this.row.f_meter_base - 0).toFixed(4))
573
+ } else {
574
+ this.$set('row.f_meter_base', (this.row.f_meter_base - 0).toFixed(0))
575
+ }
576
+ },
577
+ brandChange (val) {
578
+ this.isdecimal = val.length > 0 ? val[0].f_isdecimal : '否'
579
+ // this.tablebaseChange()
580
+ if (this.row.f_user_id) {
581
+ co(brandChangeGen(this))
582
+ }
583
+ this.meternumberValidate()
584
+ },
585
+ userTypeChange () {
586
+ this.gasproperties = []
587
+ if (this.row.f_user_type.length === 1) {
588
+ this.gasproperties = this.$appdata.getParam(this.row.f_user_type[0])
589
+ }
590
+ },
591
+ // getPricenames(pricetype) {
592
+ // console.log('气价。,。。', pricetype, this.row.f_user_type, this.row.f_gasproperties)
593
+ // let rs = []
594
+ // if (this.row.f_user_type.length === 1 && this.row.f_gasproperties.length === 1 && pricetype.length === 1) {
595
+ // let params = {
596
+ // f_user_type: this.row.f_user_type[0],
597
+ // f_gasproperties: this.row.f_gasproperties[0],
598
+ // f_price_type: pricetype[0],
599
+ // filter: this.f_filialeid
600
+ // }
601
+ // rs = this.$GetSaleParam.getPrice(params)
602
+ // }
603
+ // if (rs.length === 0) {
604
+ // this.row.f_price_name = ''
605
+ // }
606
+ // return rs
607
+ // },
608
+ mValid (bool) {
609
+ this.row.valid = bool
610
+ this.$dispatch('self-valid')
611
+ },
612
+ // 带权限修改单值返回修改后得值和修改原因
613
+ modefiy (field) {
614
+ this.show = true
615
+ this.field = field
616
+ },
617
+ async meternumberValidate () {
618
+ // 验证表号
619
+ if (this.row.f_meternumber && this.row.gasbrand.length > 0) {
620
+ if (this.row.gasbrand[0].f_meter_type === '物联网表') {
621
+ let param = {
622
+ f_meternumber: this.row.f_meternumber,
623
+ f_gasbrand_id: this.row.gasbrand[0].id
624
+ }
625
+ if (this.row.f_userfiles_id) {
626
+ param.f_userfiles_id = this.row.f_userfiles_id
627
+ }
628
+ let res = await this.$resetpost('rs/logic/meternumberValidate', param, {
629
+ resolveMsg: null,
630
+ rejectMsg: '表号验证失败!!'
631
+ })
632
+ console.log('标号验证返回:', res)
633
+ if (res.data) {
634
+ this.row.f_meternumber = ''
635
+ this.$showAlert('表号已存在!!', 'warning', 3000)
636
+ }
637
+ }
638
+ }
639
+ }
640
+ },
641
+ watch: {
642
+ 'meter' () {
643
+ this.row = Object.assign(this.row, this.meter, {})
644
+
645
+ this.isdecimal = this.row.gasbrand.f_isdecimal
646
+ this.row.valid = false
647
+ this.showtype = this.row.gasbrand.f_meter_type
648
+ },
649
+ 'row.pricetype' (val) {
650
+ if (val == '混合气价') {
651
+ this.ratioshow = true
652
+ } else {
653
+ this.ratioshow = false
654
+ }
655
+ },
656
+ 'row.f_user_type' (val) {
657
+ if (val && val.length === 1) {
658
+ if (val[0] === '非民用') {
659
+ this.showindustry = true
660
+ } else {
661
+ this.showindustry = false
662
+ this.row.f_industry_comments = ''
663
+ }
664
+ } else {
665
+ this.showindustry = false
666
+ this.row.f_industry_comments = ''
667
+ }
668
+ }
669
+
670
+ },
671
+ computed: {
672
+
673
+ // 控制用户类型修改
674
+ permissionUserType () {
675
+ let res = false
676
+ if (this.row.f_user_id) {
677
+ res = !(this.jurisdiction.includes('民用气价修改') && this.jurisdiction.includes('非民用气价修改'))
678
+ }
679
+ return res
680
+ },
681
+
682
+ // 控制用气性质,气价类型,气价名称修改
683
+ permissionPrice () {
684
+ let res = false
685
+ if (this.row.f_user_id) {
686
+ console.log('获取权限、', this.row, this.jurisdiction)
687
+ // 变更操作
688
+ if (this.row.pricename.length > 0) {
689
+ if (this.row.f_user_type[0] === '民用') {
690
+ // 判断是否有民用气价权限
691
+ res = !this.jurisdiction.includes('民用气价修改')
692
+ } else if (this.row.f_user_type[0] === '非民用') {
693
+ // 判断是否有非民用气价权限
694
+ res = !this.jurisdiction.includes('非民用气价修改')
695
+ }
696
+ }
697
+ }
698
+ console.log('有无气价权限', res)
699
+ return res
700
+ },
701
+
702
+ getPricenames () {
703
+ let f_filialeid = this.f_filialeid
704
+ let result = []
705
+ this.$GetSaleParam.prices.forEach((item) => {
706
+ if (item.f_state === '有效' && f_filialeid == item.f_filialeid) {
707
+ let value = {
708
+ label: item.f_price_name,
709
+ value: item
710
+ }
711
+ result.push(value)
712
+ }
713
+ })
714
+ return Array.from(new Set(result))
715
+ },
716
+
717
+ adjustables () {
718
+ let arr = []
719
+ let filter = this.f_filialeid
720
+ this.$GetSaleParam.getAdjustable(filter).forEach((item) => {
721
+ let temp = {}
722
+ temp.label = `[${item.value.f_adjustable_id}]-${item.label}`
723
+ temp.value = item.value
724
+ arr.push(temp)
725
+ })
726
+ return [{label: '全部', value: ''}, ...arr]
727
+ },
728
+ inputtores () {
729
+ // return this.$login.f.f_gasman
730
+ let rs = new Array()
731
+ for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
732
+ let temp = {
733
+ label: this.$login.f.f_gasman[i].name,
734
+ value: this.$login.f.f_gasman[i].name
735
+ }
736
+ rs.push(temp)
737
+ }
738
+ return rs
739
+ },
740
+ installperson () {
741
+ // return this.$login.f.f_installman
742
+ let rs = new Array()
743
+ for (let i = 0; i < this.$login.f.f_installman.length; i++) {
744
+ let temp = {
745
+ label: this.$login.f.f_installman[i].name,
746
+ value: this.$login.f.f_installman[i].name
747
+ }
748
+ rs.push(temp)
749
+ }
750
+ return rs
751
+ },
752
+ meterbrands () {
753
+ return this.$GetSaleParam.getGasbrand()
754
+ },
755
+ aroundmeters () {
756
+ return this.$appdata.getParam('左右表')
757
+ },
758
+ positions () {
759
+ return this.$appdata.getParam('安装位置')
760
+ },
761
+ usetype () {
762
+ return this.$appdata.getParam('使用类型')
763
+ },
764
+ usestate () {
765
+ return this.$appdata.getParam('使用状态')
766
+ },
767
+ gongyetype () {
768
+ return this.$appdata.getParam('工业备注')
769
+ }
770
+ }
771
+ }
772
+ </script>
773
+ <style lang="less">
774
+ #meterInfoTest_New{
775
+ // 去掉number类型输入框的上下箭头
776
+ input[type="number"] {
777
+ &::-webkit-inner-spin-button,
778
+ &::-webkit-outer-spin-button {
779
+ -webkit-appearance: none;
780
+ margin: 0;
781
+ }
782
+
783
+ & {
784
+ -moz-appearance: textfield;
785
+ }
786
+ }
787
+ #addboxmap {
788
+ height: 300px;
789
+ }
790
+ .glyphicon-map-marker:hover {
791
+ color: red;
792
+ }
793
+ .glyphicon-map-marker {
794
+ color: blue;
795
+ cursor: pointer;
796
+ }
797
+ .col-sm-4 {
798
+ .font_normal_body {
799
+ width: 73px;
800
+ overflow: auto;
801
+ white-space: nowrap;
802
+ // 指滚动条两边的按钮
803
+ &::-webkit-scrollbar-button {
804
+ display: none;
805
+ }
806
+ // 滚动条的宽度
807
+ &::-webkit-scrollbar {
808
+ width: 5px !important;
809
+ height: 5px !important;
810
+ }
811
+ // 滚动条的设置
812
+ &::-webkit-scrollbar-thumb {
813
+ background-color: #ddd;
814
+ background-clip: padding-box;
815
+ }
816
+ &::-webkit-scrollbar-thumb:hover {
817
+ background-color: #bbb;
818
+ }
819
+ &::-webkit-scrollbar-track {
820
+ /*滚动条里面轨道*/
821
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
822
+ background: #ededed;
823
+ }
824
+ }
825
+ }
826
+ }
827
+ </style>
@@ -28,4 +28,6 @@ export default function () {
28
28
  Vue.component('disable-manage', (resolve) => { require(['./MeterDisable/DisableManage'], resolve) })
29
29
  // 表具启用
30
30
  Vue.component('enable-manage', (resolve) => { require(['./MeterEnable/EnableManage'], resolve) })
31
+ // 单个表具信息test
32
+ Vue.component('file-meter-info-new', (resolve) => { require(['./MeterinfoTest'], resolve) })
31
33
  }
@@ -470,6 +470,7 @@ let CardService = {
470
470
  f_userinfo_id: row.f_userinfo_id,
471
471
  f_serial_number: f_serial_number,
472
472
  f_user_id: row.f_user_id,
473
+ f_serial_id: model.f_serial_id,
473
474
  f_userfiles_id: row.f_userfiles_id,
474
475
  f_pregas: model.f_pregas,
475
476
  // 优惠金额