sale-client 3.6.236-mx → 3.6.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ #Tue Jan 23 18:15:26 CST 2024
2
+ gradle.version=5.2.1
Binary file
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.236-mx",
3
+ "version": "3.6.236",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,409 @@
1
+ <template>
2
+ <div class="auto">
3
+ <modal :show.sync="show_devices" width="80%" title="表具设备信息" v-ref:modal large backdrop="false">
4
+ <header slot="modal-header" class="modal-header">
5
+ <span class="glyphicon glyphicon-remove closebtn" @click="closeModal"></span>
6
+ </header>
7
+ <article slot="modal-body" class="modal-body" style="height: auto" v-show="!showTable">
8
+ <div class="flex-row flex-deviceinfo">
9
+ <div class="flex-row flex-two-info panel panel-default" v-for="(index,row) in devicesinfo">
10
+ <avatar-upload :img-src.sync="row.img.content" :filename.sync="row.img.filename"></avatar-upload>
11
+ <form class="form-horizontal select-overspread " style="flex: 1;">
12
+ <div style="margin-top: 2%">
13
+ <img style="margin-top: -2px;margin-left: 2px" src="../../../static/images/lefticon/矩形1183.png">
14
+ <a style="font-size: 16px;font-weight: 500;">设备基本信息</a>&nbsp;<a
15
+ style="color: #999999;text-decoration: none"></a>
16
+ </div>
17
+ <div class="row auto" style="margin-top: 10px;margin-left: 10px;">
18
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
19
+ <label class="font_normal_body">设备类型</label>
20
+ <v-select :value.sync="row.f_devices_type" v-model="row.f_devices_type"
21
+ :options='devicetypes' placeholder='设备类型' :value-single="true"
22
+ close-on-select></v-select>
23
+ </div>
24
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
25
+ <label class=" font_normal_body">设备编号</label>
26
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_no"
27
+ @blur="devicesNoBlur(index)"
28
+ placeholder='设备编号' v-next-el="{id: $index+'brand'}">
29
+ </div>
30
+ </div>
31
+ <div class="row auto" style="margin-left: 10px;">
32
+ <div class="col-sm-6 form-group" style="padding-right: 5px;"
33
+ :class="[!row.f_brand && (row.f_devices_type == '壁挂炉' || row.f_devices_type == '热水器') ? 'has-error' : '']">
34
+ <label class="font_normal_body">设备品牌</label>
35
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_brand" placeholder='设备品牌'
36
+ v-next-el="{id: $index+'devicesmodel'}" :id="$index+'brand'">
37
+ </div>
38
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
39
+ <label class="font_normal_body">设备型号</label>
40
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_model"
41
+ placeholder='设备型号' :id="$index+'devicesmodel'">
42
+ </div>
43
+ </div>
44
+ <div class="row auto" style="margin-left: 10px;">
45
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
46
+ <label class="font_normal_body">施工单位</label>
47
+ <v-select :value.sync="row.f_builderunit" v-model="row.f_builderunit"
48
+ :options='builders' placeholder='施工单位' :value-single="true"
49
+ close-on-select></v-select>
50
+ <!--<input type="text" class="input_search" style="width:60%" v-model="row.f_builderunit"-->
51
+ <!--placeholder='施工单位'>-->
52
+ </div>
53
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
54
+ <label class="font_normal_body">联系电话</label>
55
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_builder_phone"
56
+ placeholder='施工单位联系方式'>
57
+ </div>
58
+ </div>
59
+ <div class="row auto" style="margin-left: 10px;">
60
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
61
+ <label class="font_normal_body">安装人&nbsp;&nbsp;&nbsp;</label>
62
+ <!-- <input type="text" class="input_search" style="width:60%" v-model="row.f_input_person"-->
63
+ <!-- placeholder='安装人'>-->
64
+ <v-select :value.sync="row.f_input_person" v-model="row.f_input_person"
65
+ :options='installperson' placeholder='安装人'
66
+ close-on-select></v-select>
67
+ </div>
68
+ <div class="col-sm-6 form-group" style="padding-right: 5px;"
69
+ :class="[row.f_devices_type == '壁挂炉' && row.f_input_date == '' ? 'has-error' : '']">
70
+ <label class="font_normal_body">安装日期</label>
71
+ <datepicker placeholder="安装日期" style="width: 60%"
72
+ v-model="row.f_input_date"
73
+ :value.sync="row.f_input_date"
74
+ :format="'yyyy-MM-dd'">
75
+ </datepicker>
76
+ </div>
77
+ </div>
78
+ <div class="row auto" style="margin-left: 10px;">
79
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
80
+ <label class="font_normal_body">生产日期</label>
81
+ <datepicker placeholder="生产日期" style="width: 60%"
82
+ v-model="row.f_make_date"
83
+ :value.sync="row.f_make_date"
84
+ :onchange="expireDate($index)"
85
+ :format="'yyyy-MM-dd'">
86
+ </datepicker>
87
+ </div>
88
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
89
+ <label class="font_normal_body">使用年限</label>
90
+ <input type="number" class="input_search" style="width: 60%" v-model="row.f_service_life"
91
+ :value.sync="row.f_service_life"
92
+ :onchange="expireDate($index)">
93
+ </div>
94
+ </div>
95
+ <div class="row auto" style="margin-left: 10px;">
96
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" v-if="devicesinfoShow">
97
+ <label class="font_normal_body">到期日期</label>
98
+ <input type="test" class="input_search" style="width: 60%" v-model="row.f_expire_date"
99
+ :value.sync="row.f_expire_date"
100
+ placeholder="到期日期" disabled></input>
101
+ </div>
102
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
103
+ <label class="font_normal_body">设备数量</label>
104
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_num"
105
+ :value.sync="row.f_devices_num"
106
+ placeholder='设备数量' :id="$index+'devicesmodel'">
107
+ </div>
108
+ </div>
109
+ <div class="row auto" style="margin-left: 10px;">
110
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
111
+ <label class="font_normal_body" title="用户设备状态">设备状态</label>
112
+ <v-select :value.sync="row.f_userinfodevices_state" v-model="row.f_userinfodevices_state"
113
+ :options='userdevicestate' placeholder='设备状态' :value-single="true"
114
+
115
+ close-on-select></v-select>
116
+ </div>
117
+ <div class="col-sm-6 form-group" style="padding-right: 5px;"
118
+ >
119
+ <label class="font_normal_body">购买方式</label>
120
+ <v-select :value.sync="row.watchpurchase" v-model="row.watchpurchase"
121
+ :options='WatchPurchases' placeholder='购买方式' :value-single="true"
122
+ close-on-select></v-select>
123
+ </div>
124
+ </div>
125
+ <div class="row auto" style="margin-left: 10px;">
126
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
127
+ <label class="font_normal_body">安装方式</label>
128
+ <v-select :value.sync="row.f_install_type" v-model="row.f_install_type"
129
+ :options='installtype' placeholder='安装方式' :value-single="true"
130
+ close-on-select></v-select>
131
+ </div>
132
+ <div style="" class="col-sm-6 form-group">
133
+ <label for="f_comments" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备&nbsp;&nbsp;&nbsp;注</label>
134
+ <input class="input_search" style="width:60%" v-model="row.f_comments"/>
135
+ </div>
136
+ </div>
137
+ <div>
138
+ <img style="margin-top: -2px;margin-left: 2px" src="../../../static/images/lefticon/矩形1183.png">
139
+ <a style="font-size: 16px;font-weight: 500;">连接管信息</a>&nbsp;<a
140
+ style="color: #999999;text-decoration: none"></a>
141
+ </div>
142
+ <div class="row auto" style="margin-left: 10px;">
143
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
144
+ <label class="font_normal_body">管道类型</label>
145
+ <v-select :value.sync="row.f_pipe_type" v-model="row.f_pipe_type"
146
+ :options='pipetypes' placeholder='管道类型' :value-single="true"
147
+ close-on-select></v-select>
148
+ </div>
149
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
150
+ <label class="font_normal_body" title="连接管安装日期">安装日期</label>
151
+ <datepicker placeholder="连接管安装日期" style="width: 60%"
152
+ v-model="row.f_pipeinstall_date"
153
+ :value.sync="row.f_pipeinstall_date"
154
+ :onchange="ljgexpireDate($index)"
155
+ :format="'yyyy-MM-dd'">
156
+ </datepicker>
157
+ </div>
158
+ </div>
159
+ <div class="row auto" style="margin-left: 10px;">
160
+ <div class="col-sm-6 form-group" style="padding-right: 5px;">
161
+ <label class="font_normal_body">使用年限</label>
162
+ <input type="number" class="input_search" style="width: 60%" v-model="row.f_service_liferg"
163
+ :value.sync="row.f_service_liferg"
164
+ :onchange="ljgexpireDate($index)">
165
+ </div>
166
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" v-if="ljgDevicesinfoShow">
167
+ <label class="font_normal_body" title="连接管到期日期">到期日期</label>
168
+ <datepicker placeholder="连接管到期日期" style="width: 60%"
169
+ v-model="row.f_pipeexpire_date"
170
+ :value.sync="row.f_pipeexpire_date"
171
+ :format="'yyyy-MM-dd'">
172
+ </datepicker>
173
+ </div>
174
+ </div>
175
+ </form>
176
+ <img :src="imgdelete" alt="图片加载失败" class="img-rounded"
177
+ style="width: 60px;padding: 20px;margin-left: -15px;cursor: pointer;"
178
+ @click="deleteDevice($index, row)">
179
+ </div>
180
+ <div class="panel panel-default flex-two-info text-center" style="line-height: 164px;">
181
+ <img :src="imgadd" alt="图片加载失败1" class="img-rounded"
182
+ style="width: 60px;padding: 10px;cursor: pointer;"
183
+ @click="addDevice()">
184
+ </div>
185
+ </div>
186
+ <div class="row">
187
+ <div class="text-right">
188
+ <button @click="showTableBtn()" class="button_search button_spacing">列表显示
189
+ </button>
190
+ </div>
191
+ </div>
192
+ </article>
193
+ <article slot="modal-body" class="modal-body" style="height: auto" v-show="showTable">
194
+ <div class="row">
195
+ <div class=" text-center">
196
+ <table class="table table-striped table-bordered">
197
+ <tr align="center">
198
+ <th style="text-align: center">序号</th>
199
+ <th style="text-align: center">设备类型</th>
200
+ <th style="text-align: center">设备编号</th>
201
+ <th style="text-align: center">设备品牌</th>
202
+ <th style="text-align: center">设备型号</th>
203
+ <th style="text-align: center">管道类型</th>
204
+ <th style="text-align: center">安装人</th>
205
+ <th style="text-align: center">安装方式</th>
206
+ <th style="text-align: center">安装日期</th>
207
+ <th style="text-align: center">生产日期</th>
208
+ <th style="text-align: center">设备状态</th>
209
+ <th style="text-align: center">备注</th>
210
+ <th style="text-align: center">操作</th>
211
+ </tr>
212
+ <tr style="text-align: center" v-for="row in devicesinfo">
213
+ <td style="text-align: center;">{{ $index + 1 }}</td>
214
+
215
+ <td style="text-align: center">{{row.f_devices_type}}</td>
216
+ <td style="text-align:center">{{row.f_devices_no}}</td>
217
+ <td style="text-align: center">{{row.f_brand}}</td>
218
+ <td style="text-align: center">{{row.f_devices_model}}</td>
219
+ <td style="text-align: center">{{row.f_pipe_type}}</td>
220
+ <td style="text-align:center">{{row.f_input_person}}</td>
221
+ <td style="text-align:center">{{row.f_install_type}}</td>
222
+ <td style="text-align:center">{{row.f_input_date}}</td>
223
+ <td style="text-align:center">{{row.f_make_date}}</td>
224
+ <td style="text-align:center">{{row.f_userinfodevices_state}}</td>
225
+ <td style="text-align:center">{{row.f_comments}}</td>
226
+ <td style="text-align: center">
227
+ <img :src="imgdelete" alt="图片加载失败" class="img-rounded"
228
+ style="width: 60px;padding: 20px;margin-left: -15px;cursor: pointer;"
229
+ @click="deleteDevice($index, row)">
230
+ </td>
231
+ </tr>
232
+ </table>
233
+ </div>
234
+ </div>
235
+ <div class="row">
236
+ <div class="text-right">
237
+ <button @click="showTableBtn()" class="button_search button_spacing">添加表具设备
238
+ </button>
239
+ </div>
240
+ </div>
241
+ </article>
242
+
243
+ <footer slot="modal-footer" class="modal-footer">
244
+ </footer>
245
+ </modal>
246
+ </div>
247
+
248
+ </template>
249
+
250
+ <script>
251
+ import moment from 'moment'
252
+ export default {
253
+ title: '表具设备信息',
254
+ data () {
255
+ return {
256
+ showTable: false,
257
+ imgdelete: '/images/mainicon/deletedevice.png',
258
+ imgadd: '/images/mainicon/adddevice.png',
259
+ devicetypes: this.$appdata.getParam('设备类型'),
260
+ pipetypes: this.$appdata.getParam('管道类型'),
261
+ WatchPurchases: this.$appdata.getParam('购买方式'),
262
+ installperson: this.$appdata.getParam('安装人'),
263
+ installtype: this.$appdata.getParam('安装方式'),
264
+ userdevicestate: this.$appdata.getParam('用户设备状态'),
265
+ builders: this.$appdata.getParam('施工单位'),
266
+ f_make_date: '',
267
+ f_expire_date: '',
268
+ f_service_life: 0,
269
+ devicesinfoShow: true,
270
+ ljgDevicesinfoShow: true
271
+ }
272
+ },
273
+ props: {
274
+ devicesinfo: {
275
+ type: Array
276
+ },
277
+ show_devices: {
278
+ type: Boolean,
279
+ default: false
280
+ },
281
+ f_input_person: {
282
+ type: String,
283
+ default: undefined
284
+ }
285
+ },
286
+ computed: {
287
+ // installperson () {
288
+ // // return this.$login.f.f_installman
289
+ // let rs = new Array()
290
+ // for (let i = 0; i < this.$login.f.f_installman.length; i++) {
291
+ // let temp = {
292
+ // label: this.$login.f.f_installman[i].name,
293
+ // value: this.$login.f.f_installman[i].name
294
+ // }
295
+ // rs.push(temp)
296
+ // }
297
+ // return rs
298
+ // },
299
+ },
300
+ ready () {
301
+ },
302
+ methods: {
303
+ showTableBtn () {
304
+ this.showTable = !this.showTable
305
+ console.log('表具信息', this.devicesinfo)
306
+ },
307
+ expireDate (index) {
308
+ if (this.devicesinfo[index].f_make_date && this.devicesinfo[index].f_service_life) {
309
+ var b = new Date(this.devicesinfo[index].f_make_date)
310
+ var year = (b.getFullYear() - 0) + (this.devicesinfo[index].f_service_life - 0)
311
+ var month = (b.getMonth() - 0) + 1
312
+ var day = b.getDate()
313
+ // this.$set(this.devicesinfo, index, {f_expire_date: year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day)})
314
+ this.devicesinfo[index].f_expire_date = year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day)
315
+ this.devicesinfoShow = false
316
+ this.$nextTick(() => {
317
+ this.devicesinfoShow = true
318
+ })
319
+ }
320
+ },
321
+ ljgexpireDate (index) {
322
+ if (this.devicesinfo[index].f_pipeinstall_date && this.devicesinfo[index].f_service_liferg) {
323
+ var b = new Date(this.devicesinfo[index].f_pipeinstall_date)
324
+ var year = (b.getFullYear() - 0) + (this.devicesinfo[index].f_service_liferg - 0)
325
+ var month = (b.getMonth() - 0) + 1
326
+ var day = b.getDate()
327
+ // this.$set(this.devicesinfo, index, {f_expire_date: year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day)})
328
+ this.devicesinfo[index].f_pipeexpire_date = year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day)
329
+ this.ljgDevicesinfoShow = false
330
+ this.$nextTick(() => {
331
+ this.ljgDevicesinfoShow = true
332
+ })
333
+ }
334
+ },
335
+ deleteDevice (index, row) {
336
+ console.log('删除的信息', row)
337
+ if (row.id) {
338
+ this.$showMessage('此操作无法还原,是否确定要删除此设备?', ['confirm', 'cancel']).then((res) => {
339
+ if (res === 'confirm') {
340
+ this.$resetpost('rs/logic/deletedevices', {param: row}, {
341
+ resolveMsg: `成功删除此设备`,
342
+ rejectMsg: '删除设备失败'
343
+ }).then((res) => {
344
+ this.devicesinfo.splice(index, 1)
345
+ })
346
+ }
347
+ })
348
+ } else {
349
+ this.devicesinfo.splice(index, 1)
350
+ }
351
+ },
352
+ addDevice () {
353
+ console.log('设备信息', this.devicesinfo)
354
+ this.devicesinfo.push({
355
+ f_devices_type: '家用灶具',
356
+ f_input_person: this.f_input_person,
357
+ f_userinfodevices_state: '正常',
358
+ f_input_date: this.$login.toStandardTimeString()
359
+ })
360
+ },
361
+ closeModal () {
362
+ let cannotclose = false
363
+ let deleteData = []
364
+ for (let [index, row] of this.devicesinfo.entries()) {
365
+ switch (row.f_devices_type) {
366
+ case '壁挂炉':
367
+ if (!(row.f_brand && row.f_input_person && row.f_input_date && row.watchpurchase)) {
368
+ deleteData.push(index)
369
+ cannotclose = true
370
+ }
371
+ break
372
+ case '热水器':
373
+ if (!(row.f_brand)) {
374
+ deleteData.push(index)
375
+ cannotclose = true
376
+ }
377
+ break
378
+ }
379
+ }
380
+ if (cannotclose) {
381
+ this.$showMessage('新增设备有必填项没有填写,如果此时退出当前页面数据会丢失,请确定是否退出?', ['confirm', 'cancel']).then(async (res) => {
382
+ if (res === 'confirm') {
383
+ for (let i = deleteData.length - 1; i >= 0; i--) {
384
+ this.devicesinfo.splice(deleteData[i], 1)
385
+ }
386
+ this.show_devices = false
387
+ }
388
+ })
389
+ } else {
390
+ this.show_devices = false
391
+ }
392
+ }
393
+ }
394
+ }
395
+ </script>
396
+ <style lang="less">
397
+ .flex-deviceinfo {
398
+ padding: 0px 20px;
399
+ justify-content: space-between;
400
+ height: auto;
401
+ flex-wrap: wrap;
402
+ }
403
+
404
+ .flex-two-info {
405
+ margin-bottom: 10px;
406
+ align-items: center;
407
+ width: 48%;
408
+ }
409
+ </style>
@@ -0,0 +1,6 @@
1
+ // 汉中汉投
2
+ import Vue from 'vue'
3
+ export default function () {
4
+ // 表具设备信息
5
+ Vue.component('file-user-device-info', (resolve) => { require(['./UserDeviceInfoTest'], resolve) })
6
+ }