apply-clients 3.4.2 → 3.4.4
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/android.html +23 -23
- package/build/dev-server.js +119 -119
- package/build/webpack.base.conf.js +2 -1
- package/build/webpack.dev.conf.js +12 -0
- package/dingding.html +23 -0
- package/index.html +33 -33
- package/package.json +2 -1
- package/src/AndroidApp.vue +35 -35
- package/src/DingDingApp.vue +51 -0
- package/src/android.js +21 -21
- package/src/apply.js +38 -13
- package/src/applyAndroid.js +46 -32
- package/src/applyDingDing.js +12 -0
- package/src/components/android/AppOnetomany.vue +343 -301
- package/src/components/android/AppServiceView.vue +189 -10
- package/src/components/android/AppSign.vue +19 -7
- package/src/components/android/AppTakePic.vue +143 -143
- package/src/components/android/AreaSelect/AppQrcodeReader.vue +73 -0
- package/src/components/android/AreaSelect/AppResAreaMapGroup.vue +148 -0
- package/src/components/android/AreaSelect/AppResAreaSelect.vue +108 -0
- package/src/components/android/AreaSelect/AppResAreaSelectGroup.vue +142 -0
- package/src/components/android/Function/AppFunctionServiceControl.vue +344 -0
- package/src/components/android/Function/AppInstallFunction.vue +366 -0
- package/src/components/android/Process/AppExplorationUser.vue +500 -320
- package/src/components/android/Process/AppServiceControl.vue +999 -48
- package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -0
- package/src/components/android/Process/Processes/AppBuildSign.vue +46 -0
- package/src/components/android/Process/Processes/AppChargeManagement.vue +637 -0
- package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -0
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +116 -90
- package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -0
- package/src/components/android/Process/Processes/selectApply.vue +250 -0
- package/src/components/android/Process/Processes/selectUserinfo.vue +182 -0
- package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +205 -71
- package/src/components/android/Supervisory/AppSupervisoryCart.vue +69 -34
- package/src/components/android/TaskGraph.vue +125 -125
- package/src/components/common/TabButton.vue +149 -0
- package/src/components/common/Tabs.vue +67 -0
- package/src/components/image/dwg.jpg +0 -0
- package/src/components/image/txt.jpg +0 -0
- package/src/components/image//345/221/250/345/217/243/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
- package/src/components/image//350/245/277/345/215/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
- package/src/components/image//351/203/270/345/237/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
- package/src/components/image//351/241/271/345/237/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
- package/src/components/image//351/271/277/351/202/221/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +272 -53
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
- package/src/components/product/AreaSelect/MyAreaSelect.vue +423 -0
- package/src/components/product/AreaSelect/ResAreaSelect.vue +106 -0
- package/src/components/product/AreaSelect/ResAreaSelectGroup.vue +150 -0
- package/src/components/product/AreaSelect/utils/EventListener.js +29 -0
- package/src/components/product/AreaSelect/utils/coerceBoolean.js +7 -0
- package/src/components/product/Business/BusinessApply.vue +269 -0
- package/src/components/product/Business/CivilApply.vue +269 -0
- package/src/components/product/Function/InstallFunction.vue +132 -125
- package/src/components/product/Function/InstallInfoSelect.vue +320 -292
- package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -222
- package/src/components/product/GaoDeMapComponents/GaoDeMap.vue +231 -0
- package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -0
- package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -0
- package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -0
- package/src/components/product/Install/InstallProject.vue +194 -0
- package/src/components/product/Material/MaterialDetailed.vue +262 -0
- package/src/components/product/OldApply/Handle/HandleApply.vue +337 -0
- package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -0
- package/src/components/product/OldApply/OldApply.vue +209 -0
- package/src/components/product/OldApply/OldApplyMessage.vue +420 -0
- package/src/components/product/Onetomany.vue +406 -377
- package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -0
- package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -0
- package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -0
- package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -0
- package/src/components/product/Process/ExplorationSelect.vue +495 -410
- package/src/components/product/Process/ExplorationUser.vue +189 -138
- package/src/components/product/Process/Processes/InstallationDetails.vue +25 -7
- package/src/components/product/Process/Processes/Print/printCharge.vue +41 -17
- package/src/components/product/Process/Processes/Print/printChargepc.vue +142 -0
- package/src/components/product/Process/Processes/Print/printRefund.vue +196 -0
- package/src/components/product/Process/Processes/addMaterialScience.vue +454 -0
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -207
- package/src/components/product/Process/Processes/chargeManagement.vue +20 -3
- package/src/components/product/Process/Processes/devicesManagement.vue +484 -478
- package/src/components/product/Process/Processes/selectApply.vue +2 -2
- package/src/components/product/Process/Service/ServiceControl.vue +638 -20
- package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
- package/src/components/product/Process/ShowBackReason.vue +33 -0
- package/src/components/product/ServiceView.vue +357 -7
- package/src/components/product/Stop/StopApply.vue +101 -103
- package/src/components/product/Stop/StopApplyList.vue +271 -269
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +884 -186
- package/src/components/product/Supervisory/SupervisoryControl.vue +137 -100
- package/src/components/product/Supervisory/SupervisoryList.vue +201 -30
- package/src/components/product/Supervisory/SupervisoryhCart.vue +130 -107
- package/src/components/product/VueUtils/ApplyUpload.vue +275 -273
- package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -0
- package/src/components/product/VueUtils/HighMeter.vue +208 -208
- package/src/components/product/VueUtils/ToolsPage.vue +51 -0
- package/src/components/product/VueUtils/Tree.vue +330 -0
- package/src/dingding.js +19 -0
- package/src/expandcssAndroid.less +517 -1034
- package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -731
- package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
- package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
- package/src/filiale/yuchuan/android/Sign/AppSignTask.vue +182 -182
- package/src/filiale/yuchuan/android/Sign/BuildSign.vue +50 -50
- package/src/filiale/yuchuan/android/Sign/ConstructSign.vue +50 -50
- package/src/filiale/yuchuan/android/Sign/DesignSign.vue +50 -50
- package/src/filiale/yuchuan/android/Sign/SupervisorSign.vue +50 -50
- package/src/filiale/yuchuan/android/Task/Build/BuildTsak.vue +60 -60
- package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -60
- package/src/filiale/yuchuan/android.js +14 -14
- package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
- package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
- package/src/filiale/yuchuan/pc/Print/BuildOrder/buildOrderList.vue +264 -0
- package/src/filiale/yuchuan/pc/Print/BuildOrder/printBuildOrder.vue +152 -0
- package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +149 -149
- package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +67 -67
- package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
- package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
- package/src/filiale/yuchuan/pc/Process/Processes/Print/printCharge.vue +125 -0
- package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -470
- package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1074
- package/src/filiale/yuchuan/pc/Sign/SignRecord.vue +24 -0
- package/src/filiale/yuchuan/pc/Sign/SignRecordList.vue +174 -0
- package/src/filiale/yuchuan/pc.js +20 -12
- package/src/main.js +4 -1
- package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
- package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
- package/src/components/product/Function/functions/StopInstall.vue +0 -106
|
@@ -1,650 +1,650 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-xs-12 col-xs-12 form-group app-btn">
|
|
3
|
-
<button class="btn btn-info" @click.prevent="showUserFileModal()" :disabled="mark === 1 || model.rows.length >= selectdata.f_install_count">添加用户</button>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="col-xs-12 col-xs-12">
|
|
6
|
-
<list :model="model" partial='list'>
|
|
7
|
-
<div partial class="auto app-text panel">
|
|
8
|
-
<div class="panel-body panel-self">
|
|
9
|
-
<div class="row">
|
|
10
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
|
|
11
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_code }}</p>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="row">
|
|
14
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
|
|
15
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="row">
|
|
18
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
|
|
19
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="row" v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">
|
|
22
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">单价</b></p>
|
|
23
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ $parent.$parent.selectdata.f_price }}</p>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="row" v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">
|
|
26
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">累计缴费</b></p>
|
|
27
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_cumulative_payment_money }}</p>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="row">
|
|
30
|
-
<p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
|
|
31
|
-
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_address }}</p>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="row text-right">
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</list>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<validator name="v">
|
|
41
|
-
<modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false">
|
|
42
|
-
<header slot="modal-header" class="modal-header">
|
|
43
|
-
<button type="button" class="close" @click="closeUserFile"><span>×</span></button>
|
|
44
|
-
<h4 class="modal-title">安装明细</h4>
|
|
45
|
-
</header>
|
|
46
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
47
|
-
<!-- 地址信息 -->
|
|
48
|
-
<div class="form-group col-xs-12 panel panel-info">
|
|
49
|
-
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
50
|
-
<div class="col-xs-6 text-left">地址信息</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="form-group row vertical-center">
|
|
53
|
-
<label class="col-xs-4 control-label">地  址:</label>
|
|
54
|
-
<div class="col-xs-8">
|
|
55
|
-
<input class="form-control input_view"
|
|
56
|
-
placeholder="地址"
|
|
57
|
-
v-model="useradders.f_address"
|
|
58
|
-
:value.sync="useradders.f_address"
|
|
59
|
-
:readonly="true"/>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<!-- 表具信息 -->
|
|
64
|
-
<div class="form-group col-xs-12 panel panel-info">
|
|
65
|
-
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
66
|
-
<div class="col-xs-6 text-left">表具信息</div>
|
|
67
|
-
<div class="col-xs-6 text-right">
|
|
68
|
-
<svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64"><path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path><path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path><path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path><path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path><path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path></svg>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="form-group row vertical-center" :class="[$v.gasbrand.required ? 'has-error' : '']">
|
|
72
|
-
<label class="col-xs-4 control-label">气表品牌:</label>
|
|
73
|
-
<div class="col-xs-8">
|
|
74
|
-
<input type="text" v-show="false" v-model="userfile.gasbrand.id" :value.sync="userfile.gasbrand.id" v-validate:gasbrand = "['required']" >
|
|
75
|
-
<input-select
|
|
76
|
-
class="select select_list"
|
|
77
|
-
:value.sync="userfile.gasbrand"
|
|
78
|
-
v-model="userfile.gasbrand"
|
|
79
|
-
:options="meterbrands"
|
|
80
|
-
@change="gasbrandChange()"
|
|
81
|
-
:disable="mark === 1"
|
|
82
|
-
:valueSingle="true"></input-select>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div class="form-group row vertical-center" :class="[$v.gasmodel.required ? 'has-error' : '']">
|
|
86
|
-
<label class="col-xs-4 control-label">气表型号:</label>
|
|
87
|
-
<div class="col-xs-8">
|
|
88
|
-
<input type="text" v-show="false" v-model="userfile.gasmodel.id" :value.sync="userfile.gasmodel.id" v-validate:gasmodel = "['required']" >
|
|
89
|
-
<input-select
|
|
90
|
-
class="select select_list"
|
|
91
|
-
:value.sync="userfile.gasmodel"
|
|
92
|
-
v-model="userfile.gasmodel"
|
|
93
|
-
:options.sync="userfile.gasbrand.gasmodel"
|
|
94
|
-
@change="gasmodelChange()"
|
|
95
|
-
:disable="mark === 1"
|
|
96
|
-
:valueSingle="true"></input-select>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
|
|
100
|
-
<label class="col-xs-4 control-label">表  号:</label>
|
|
101
|
-
<div class="col-xs-8">
|
|
102
|
-
<input class="form-control input_view" style=""
|
|
103
|
-
placeholder="表号" v-validate:f_meternumber = "['required']"
|
|
104
|
-
v-model="userfile.f_meternumber"
|
|
105
|
-
:value.sync="userfile.f_meternumber"
|
|
106
|
-
@change="meternumberValidate()"
|
|
107
|
-
:readonly="mark === 1"/>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div class="form-group row vertical-center">
|
|
111
|
-
<label class="col-xs-4 control-label">表 封 号:</label>
|
|
112
|
-
<div class="col-xs-8">
|
|
113
|
-
<input class="form-control input_view" style=""
|
|
114
|
-
placeholder="表封号"
|
|
115
|
-
v-model="userfile.f_metertitles"
|
|
116
|
-
:value="userfile.f_metertitles"
|
|
117
|
-
:readonly="mark === 1"/>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
<div class="form-group row vertical-center">
|
|
121
|
-
<label class="col-xs-4 control-label">表 读 数:</label>
|
|
122
|
-
<div class="col-xs-8">
|
|
123
|
-
<input class="form-control input_view" style=""
|
|
124
|
-
type="number"
|
|
125
|
-
placeholder="表读数"
|
|
126
|
-
v-model="userfile.f_meter_base"
|
|
127
|
-
:value="userfile.f_meter_base"
|
|
128
|
-
:readonly="mark === 1"/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="form-group row vertical-center">
|
|
132
|
-
<label class="col-xs-4 control-label">初始底数:</label>
|
|
133
|
-
<div class="col-xs-8">
|
|
134
|
-
<input class="form-control input_view" style=""
|
|
135
|
-
type="number"
|
|
136
|
-
v-model="userfile.f_initial_base"
|
|
137
|
-
:value="userfile.f_initial_base"
|
|
138
|
-
placeholder="初始底数"
|
|
139
|
-
:readonly="mark === 1"/>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
<div class="form-group row vertical-center">
|
|
143
|
-
<label class="col-xs-4 control-label">表  向:</label>
|
|
144
|
-
<div class="col-xs-8">
|
|
145
|
-
<input-select
|
|
146
|
-
class="select select_list"
|
|
147
|
-
:value.sync="userfile.f_aroundmeter"
|
|
148
|
-
v-model="userfile.f_aroundmeter"
|
|
149
|
-
:options="aroundmeters"
|
|
150
|
-
:disable="mark === 1"
|
|
151
|
-
:valueSingle="true"></input-select>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="form-group row vertical-center">
|
|
155
|
-
<label class="col-xs-4 control-label">安装位置:</label>
|
|
156
|
-
<div class="col-xs-8">
|
|
157
|
-
<input-select
|
|
158
|
-
class="select select_list"
|
|
159
|
-
:value.sync="userfile.f_position"
|
|
160
|
-
v-model="userfile.f_position"
|
|
161
|
-
:options="positions"
|
|
162
|
-
:disable="mark === 1"
|
|
163
|
-
:valueSingle="true"></input-select>
|
|
164
|
-
</div>
|
|
165
|
-
</div>
|
|
166
|
-
<div class="form-group row vertical-center">
|
|
167
|
-
<label class="col-xs-4 control-label">安 装 人:</label>
|
|
168
|
-
<div class="col-xs-8">
|
|
169
|
-
<input class="form-control input_view" style=""
|
|
170
|
-
v-model="userfile.f_install_person"
|
|
171
|
-
:value.sync="installperson(userfile.f_install_person)"
|
|
172
|
-
placeholder="安装人"
|
|
173
|
-
readonly/>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
<div class="form-group row vertical-center">
|
|
177
|
-
<label class="col-xs-4 control-label">安装日期:</label>
|
|
178
|
-
<div class="col-xs-8">
|
|
179
|
-
<input class="form-control input_view" style=""
|
|
180
|
-
v-model="userfile.f_install_date"
|
|
181
|
-
:value.sync="installdate(userfile.f_install_date)"
|
|
182
|
-
placeholder="安装日期"
|
|
183
|
-
readonly/>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
<!-- 设备信息 -->
|
|
188
|
-
<div class="form-group col-xs-12 panel panel-info" v-for="(i, item) in devicesinfo">
|
|
189
|
-
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
190
|
-
<div class="col-xs-6 text-left">设备{{$index+1}}信息</div>
|
|
191
|
-
<div class="col-xs-6 text-right"><button
|
|
192
|
-
class="btn btn-danger"
|
|
193
|
-
v-if="!item.id"
|
|
194
|
-
@click.prevent="deleteDevicesinfo(i)"
|
|
195
|
-
>删除</button></div>
|
|
196
|
-
</div>
|
|
197
|
-
<div class="form-group row vertical-center">
|
|
198
|
-
<label class="col-xs-4 control-label">设备品牌:</label>
|
|
199
|
-
<div class="col-xs-8">
|
|
200
|
-
<input-select
|
|
201
|
-
class="select select_list"
|
|
202
|
-
:value.sync="item.f_brand"
|
|
203
|
-
v-model="item.f_brand"
|
|
204
|
-
:options="brandList"
|
|
205
|
-
:disable="mark === 1"
|
|
206
|
-
:valueSingle="true"></input-select>
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
<div class="form-group row vertical-center">
|
|
210
|
-
<label class="col-xs-4 control-label">设备类型:</label>
|
|
211
|
-
<div class="col-xs-8">
|
|
212
|
-
<input-select
|
|
213
|
-
class="select select_list"
|
|
214
|
-
:value.sync="item.f_devices_type"
|
|
215
|
-
v-model="item.f_devices_type"
|
|
216
|
-
:options="devicesType"
|
|
217
|
-
:disable="mark === 1"
|
|
218
|
-
:valueSingle="true"></input-select>
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
<div class="form-group row vertical-center">
|
|
222
|
-
<label class="col-xs-4 control-label">生产日期:</label>
|
|
223
|
-
<div class="col-xs-8">
|
|
224
|
-
<datepicker
|
|
225
|
-
placeholder="生产日期"
|
|
226
|
-
:value.sync="item.f_make_date"
|
|
227
|
-
v-model="item.f_make_date"
|
|
228
|
-
format="yyyy-MM-dd HH:mm:ss"
|
|
229
|
-
:disabled="mark === 1">
|
|
230
|
-
</datepicker>
|
|
231
|
-
</div>
|
|
232
|
-
</div>
|
|
233
|
-
<div class="form-group row vertical-center">
|
|
234
|
-
<label class="col-xs-4 control-label">设备数量:</label>
|
|
235
|
-
<div class="col-xs-8">
|
|
236
|
-
<input class="form-control input_view" style="" type="number"
|
|
237
|
-
placeholder="设备数量"
|
|
238
|
-
v-model="item.f_devices_num"
|
|
239
|
-
:value="item.f_devices_num"
|
|
240
|
-
:readonly="mark === 1"/>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
243
|
-
<div class="form-group row vertical-center">
|
|
244
|
-
<label class="col-xs-4 control-label">安 装 人:</label>
|
|
245
|
-
<div class="col-xs-8">
|
|
246
|
-
<input class="form-control input_view" style=""
|
|
247
|
-
placeholder="安装人"
|
|
248
|
-
v-model="item.f_input_person"
|
|
249
|
-
:value.sync="installperson(item.f_input_person)"
|
|
250
|
-
readonly/>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
<div class="form-group row vertical-center">
|
|
254
|
-
<label class="col-xs-4 control-label">安装日期:</label>
|
|
255
|
-
<div class="col-xs-8">
|
|
256
|
-
<input class="form-control input_view" style=""
|
|
257
|
-
placeholder="安装日期"
|
|
258
|
-
v-model="item.f_input_date"
|
|
259
|
-
:value="installdate(item.f_input_date)"
|
|
260
|
-
readonly/>
|
|
261
|
-
</div>
|
|
262
|
-
</div>
|
|
263
|
-
</div>
|
|
264
|
-
</article>
|
|
265
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
266
|
-
<template v-if="mark !== 1">
|
|
267
|
-
<button type="button" class="btn btn-primary" @click="pushDevice">添加设备</button>
|
|
268
|
-
<button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
|
|
269
|
-
</template>
|
|
270
|
-
</footer>
|
|
271
|
-
</modal>
|
|
272
|
-
</validator>
|
|
273
|
-
|
|
274
|
-
</template>
|
|
275
|
-
<script>
|
|
276
|
-
import Vue from 'vue'
|
|
277
|
-
import {PagedList} from 'vue-client'
|
|
278
|
-
import {HttpResetClass} from 'vue-client'
|
|
279
|
-
import {isEmpty} from '../../../../../components/Util'
|
|
280
|
-
// Date格式化
|
|
281
|
-
Date.prototype.Format = function (fmt) {
|
|
282
|
-
var o = {
|
|
283
|
-
'M+': this.getMonth() + 1, // 月份
|
|
284
|
-
'd+': this.getDate(), // 日
|
|
285
|
-
'H+': this.getHours(), // 小时
|
|
286
|
-
'm+': this.getMinutes(), // 分
|
|
287
|
-
's+': this.getSeconds(), // 秒
|
|
288
|
-
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
289
|
-
'S': this.getMilliseconds() // 毫秒
|
|
290
|
-
}
|
|
291
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
292
|
-
for (var k in o) {
|
|
293
|
-
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
294
|
-
}
|
|
295
|
-
return fmt
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export default {
|
|
299
|
-
title: '安装明细',
|
|
300
|
-
props: {
|
|
301
|
-
selectdata: {
|
|
302
|
-
type: Object
|
|
303
|
-
},
|
|
304
|
-
mark: {
|
|
305
|
-
type: Number,
|
|
306
|
-
default: 0
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
data () {
|
|
310
|
-
return {
|
|
311
|
-
showUserFile: false,
|
|
312
|
-
model: {
|
|
313
|
-
rows: null
|
|
314
|
-
},
|
|
315
|
-
meterbrands: [], // 气表品牌
|
|
316
|
-
useradders: {},
|
|
317
|
-
userinfo: {},
|
|
318
|
-
userfile: {},
|
|
319
|
-
devicesinfo: [],
|
|
320
|
-
scanCodeConfig: null
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
ready () {
|
|
324
|
-
this.search()
|
|
325
|
-
this.getMeterbrands()
|
|
326
|
-
|
|
327
|
-
this.getConfig()
|
|
328
|
-
},
|
|
329
|
-
methods: {
|
|
330
|
-
deleteDevicesinfo (index) {
|
|
331
|
-
this.devicesinfo.splice(index, 1)
|
|
332
|
-
},
|
|
333
|
-
pushDevice () {
|
|
334
|
-
this.devicesinfo.push({})
|
|
335
|
-
},
|
|
336
|
-
async getConfig () {
|
|
337
|
-
let http = new HttpResetClass()
|
|
338
|
-
let res = await http.load(
|
|
339
|
-
'POST',
|
|
340
|
-
`${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
|
|
341
|
-
null,
|
|
342
|
-
{resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
|
|
343
|
-
)
|
|
344
|
-
|
|
345
|
-
this.scanCodeConfig = res.data
|
|
346
|
-
},
|
|
347
|
-
scanCode () {
|
|
348
|
-
console.log('===============扫码===================')
|
|
349
|
-
HostApp.__this__=this,
|
|
350
|
-
HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
|
|
351
|
-
},
|
|
352
|
-
getCode() {
|
|
353
|
-
let code = HostApp.getCode().data;
|
|
354
|
-
// let code = '
|
|
355
|
-
console.log('===========扫码结果=============')
|
|
356
|
-
console.log(code)
|
|
357
|
-
if (!/^\d{12}$/.test(code)) {
|
|
358
|
-
this.$showAlert('表号不符合规则', 'danger', 3000)
|
|
359
|
-
return
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// 解析厂家
|
|
363
|
-
let factory = null
|
|
364
|
-
for (const item of this.scanCodeConfig.factory) {
|
|
365
|
-
if (item.key === code.substring(0, 2)) {
|
|
366
|
-
factory = item.val
|
|
367
|
-
break
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
if (isEmpty(factory)) {
|
|
371
|
-
this.$showAlert('未知厂家!!!', 'danger', 3000)
|
|
372
|
-
return
|
|
373
|
-
}
|
|
374
|
-
console.log(factory)
|
|
375
|
-
|
|
376
|
-
// 解析运营商
|
|
377
|
-
let ips = null
|
|
378
|
-
for (const item of this.scanCodeConfig.ips) {
|
|
379
|
-
if (item.key === code.substring(4, 6)) {
|
|
380
|
-
ips = item.val
|
|
381
|
-
break
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (isEmpty(ips)) {
|
|
385
|
-
this.$showAlert('未知运营商!!!', 'danger', 3000)
|
|
386
|
-
return
|
|
387
|
-
}
|
|
388
|
-
console.log(ips)
|
|
389
|
-
|
|
390
|
-
// 表向
|
|
391
|
-
console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
|
|
392
|
-
console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
|
|
393
|
-
this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
|
|
394
|
-
|
|
395
|
-
// 顺序号
|
|
396
|
-
console.log(code.substring(7, 12))
|
|
397
|
-
if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
|
|
398
|
-
this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
|
|
399
|
-
return
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
for (const item of this.meterbrands) {
|
|
403
|
-
if (item.label === factory) {
|
|
404
|
-
this.userfile.gasbrand = item.value
|
|
405
|
-
this.gasbrandChange()
|
|
406
|
-
break
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
Vue.set(this.userfile, 'f_meternumber', code)
|
|
411
|
-
|
|
412
|
-
this.meternumberValidate()
|
|
413
|
-
},
|
|
414
|
-
// 保存档案
|
|
415
|
-
async saveUserFile() {
|
|
416
|
-
this.userinfo = {
|
|
417
|
-
f_user_name: this.selectdata.f_user_name,
|
|
418
|
-
f_user_phone: this.selectdata.f_phone,
|
|
419
|
-
f_credentials: this.selectdata.f_credentials,
|
|
420
|
-
f_idnumber: this.selectdata.f_idnumber
|
|
421
|
-
}
|
|
422
|
-
this.useradders = Object.assign({}, this.useradders, {
|
|
423
|
-
f_address_type: '特殊地址',
|
|
424
|
-
f_slice_area: this.selectdata.f_slice_area,
|
|
425
|
-
f_pcd: this.selectdata.f_pcd,
|
|
426
|
-
f_street: this.selectdata.f_street,
|
|
427
|
-
f_residential_area: this.selectdata.f_residential_area
|
|
428
|
-
})
|
|
429
|
-
|
|
430
|
-
this.userfile.devicesinfo = this.devicesinfo
|
|
431
|
-
|
|
432
|
-
let data = {
|
|
433
|
-
user: Vue.user,
|
|
434
|
-
useradders: this.useradders,
|
|
435
|
-
userinfo: this.userinfo,
|
|
436
|
-
userfile: this.userfile,
|
|
437
|
-
selectdata: this.selectdata
|
|
438
|
-
}
|
|
439
|
-
let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
|
|
440
|
-
resolveMsg: null,
|
|
441
|
-
rejectMsg: '用户档案添加失败!!!'
|
|
442
|
-
})
|
|
443
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
444
|
-
},
|
|
445
|
-
// 检查表号是否存在
|
|
446
|
-
async meternumberValidate() {
|
|
447
|
-
if (!this.userfile.f_gasbrand_id) {
|
|
448
|
-
this.userfile.f_meternumber = ''
|
|
449
|
-
this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
|
|
450
|
-
return
|
|
451
|
-
}
|
|
452
|
-
if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
|
|
453
|
-
let data = {
|
|
454
|
-
f_meternumber: this.userfile.f_meternumber,
|
|
455
|
-
f_gasbrand_id: this.userfile.f_gasbrand_id
|
|
456
|
-
}
|
|
457
|
-
if (this.userfile.f_userfiles_id) {
|
|
458
|
-
data.f_userfiles_id = this.userfile.f_userfiles_id
|
|
459
|
-
}
|
|
460
|
-
let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
|
|
461
|
-
resolveMsg: null,
|
|
462
|
-
rejectMsg: '表号验证失败!!'
|
|
463
|
-
})
|
|
464
|
-
if (res.data) {
|
|
465
|
-
this.$showAlert(`表号:${this.userfile.f_meternumber}已存在!!!`, 'warning', 3000)
|
|
466
|
-
this.userfile.f_meternumber = ''
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
// 选择气表型号
|
|
471
|
-
gasmodelChange() {
|
|
472
|
-
if (this.userfile.gasmodel) {
|
|
473
|
-
this.userfile.f_gasmodel_id = this.userfile.gasmodel.id
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
// 选择气表品牌
|
|
477
|
-
gasbrandChange() {
|
|
478
|
-
// 清空已保存的气表型号
|
|
479
|
-
this.userfile.f_gasmodel_id = null
|
|
480
|
-
this.userfile.gasmodel = null
|
|
481
|
-
|
|
482
|
-
if (this.userfile.gasbrand) {
|
|
483
|
-
// 气表品牌id
|
|
484
|
-
this.userfile.f_gasbrand_id = this.userfile.gasbrand.id
|
|
485
|
-
// 气表分类
|
|
486
|
-
this.userfile.f_meter_classify = this.userfile.gasbrand.f_meter_type
|
|
487
|
-
}
|
|
488
|
-
},
|
|
489
|
-
// 打开安装明细
|
|
490
|
-
async showUserFileModal (row) {
|
|
491
|
-
if (row) {
|
|
492
|
-
console.log('------------------修正---------------------')
|
|
493
|
-
Vue.set(this.useradders, 'f_address', row.f_address)
|
|
494
|
-
|
|
495
|
-
let http = new HttpResetClass()
|
|
496
|
-
let data = {
|
|
497
|
-
tablename: 't_userinfo',
|
|
498
|
-
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
499
|
-
}
|
|
500
|
-
let res = await http.load(
|
|
501
|
-
'POST',
|
|
502
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
503
|
-
{data: data},
|
|
504
|
-
{resolveMsg: null, rejectMsg: '档案信息查询失败!!!'}
|
|
505
|
-
)
|
|
506
|
-
this.userinfo = res.data[0]
|
|
507
|
-
|
|
508
|
-
data = {
|
|
509
|
-
tablename: 't_userfiles',
|
|
510
|
-
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
511
|
-
}
|
|
512
|
-
res = await http.load(
|
|
513
|
-
'POST',
|
|
514
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
515
|
-
{data: data},
|
|
516
|
-
{resolveMsg: null, rejectMsg: '表具信息查询失败!!!'}
|
|
517
|
-
)
|
|
518
|
-
this.userfile = res.data[0]
|
|
519
|
-
|
|
520
|
-
// 已有表具的 气表信息补充
|
|
521
|
-
for (const item of this.meterbrands) {
|
|
522
|
-
if (item.value.id == this.userfile.f_gasbrand_id) {
|
|
523
|
-
this.userfile.gasbrand = item.value
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (this.userfile.gasbrand) {
|
|
527
|
-
for (const item of this.userfile.gasbrand.gasmodel) {
|
|
528
|
-
if (item.value.id == this.userfile.f_gasmodel_id) {
|
|
529
|
-
this.userfile.gasmodel = item.value
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
data = {
|
|
535
|
-
tablename: 't_devices',
|
|
536
|
-
condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
|
|
537
|
-
}
|
|
538
|
-
res = await http.load(
|
|
539
|
-
'POST',
|
|
540
|
-
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
541
|
-
{data: data},
|
|
542
|
-
{resolveMsg: null, rejectMsg: '设备信息查询失败!!!'}
|
|
543
|
-
)
|
|
544
|
-
this.devicesinfo = res.data
|
|
545
|
-
} else {
|
|
546
|
-
console.log('-------------------添加----------------------')
|
|
547
|
-
Vue.set(this.useradders, 'f_address', `${this.selectdata.f_address}(${this.model.rows.length + 1})`)
|
|
548
|
-
}
|
|
549
|
-
this.showUserFile = true
|
|
550
|
-
},
|
|
551
|
-
// 获取气表品牌
|
|
552
|
-
async getMeterbrands() {
|
|
553
|
-
let http = new HttpResetClass()
|
|
554
|
-
let data = {
|
|
555
|
-
f_orgid: Vue.user.orgid
|
|
556
|
-
// f_orgid: 21142
|
|
557
|
-
}
|
|
558
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
|
|
559
|
-
resolveMsg: null,
|
|
560
|
-
rejectMsg: null
|
|
561
|
-
})
|
|
562
|
-
this.meterbrands = res.data
|
|
563
|
-
},
|
|
564
|
-
searchCondition (args) {
|
|
565
|
-
args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
|
|
566
|
-
|
|
567
|
-
this.model.search(args.condition, args.model)
|
|
568
|
-
},
|
|
569
|
-
// 查询
|
|
570
|
-
async search () {
|
|
571
|
-
let http = new HttpResetClass()
|
|
572
|
-
let data = {
|
|
573
|
-
condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`
|
|
574
|
-
}
|
|
575
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
|
|
576
|
-
// let res = await http.load('POST', `rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
|
|
577
|
-
resolveMsg: null,
|
|
578
|
-
rejectMsg: null
|
|
579
|
-
})
|
|
580
|
-
this.model.rows = res.data
|
|
581
|
-
},
|
|
582
|
-
// 关闭安装明细
|
|
583
|
-
closeUserFile() {
|
|
584
|
-
this.showUserFile = false
|
|
585
|
-
this.useradders = {}
|
|
586
|
-
this.userinfo = {}
|
|
587
|
-
this.userfile = {}
|
|
588
|
-
this.devicesinfo = []
|
|
589
|
-
this.search()
|
|
590
|
-
}
|
|
591
|
-
},
|
|
592
|
-
events: {
|
|
593
|
-
},
|
|
594
|
-
computed: {
|
|
595
|
-
// 安装人
|
|
596
|
-
installperson() {
|
|
597
|
-
return function (f_install_person) {
|
|
598
|
-
if (isEmpty(f_install_person)) {
|
|
599
|
-
return Vue.user.name
|
|
600
|
-
}
|
|
601
|
-
return f_install_person
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
// 安装时间
|
|
605
|
-
installdate() {
|
|
606
|
-
return function (f_install_date) {
|
|
607
|
-
if (isEmpty(f_install_date)) {
|
|
608
|
-
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
609
|
-
}
|
|
610
|
-
return f_install_date
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
|
-
// 表向
|
|
614
|
-
aroundmeters() {
|
|
615
|
-
return this.$appdata.getParam('左右表')
|
|
616
|
-
},
|
|
617
|
-
// 安装位置
|
|
618
|
-
positions() {
|
|
619
|
-
return this.$appdata.getParam('安装位置')
|
|
620
|
-
},
|
|
621
|
-
devicesType() {
|
|
622
|
-
return this.$appdata.getParam("设备类型")
|
|
623
|
-
},
|
|
624
|
-
brandList() {
|
|
625
|
-
return this.$appdata.getParam("设备品牌")
|
|
626
|
-
}
|
|
627
|
-
},
|
|
628
|
-
watch: {
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
</script>
|
|
632
|
-
<style scoped>
|
|
633
|
-
.panel-self{
|
|
634
|
-
border-radius: 10px;
|
|
635
|
-
border:1px solid #499EDF;
|
|
636
|
-
background-color: #F8F8F8;
|
|
637
|
-
}
|
|
638
|
-
.vertical-center {
|
|
639
|
-
display: flex;
|
|
640
|
-
align-items: center;
|
|
641
|
-
text-align: center;
|
|
642
|
-
}
|
|
643
|
-
/*清除model中的浮动*/
|
|
644
|
-
.clearfix:after,.clearfix:before{
|
|
645
|
-
display: table;
|
|
646
|
-
}
|
|
647
|
-
.clearfix:after{
|
|
648
|
-
clear: both;
|
|
649
|
-
}
|
|
650
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-xs-12 col-xs-12 form-group app-btn">
|
|
3
|
+
<button class="btn btn-info" @click.prevent="showUserFileModal()" :disabled="mark === 1 || model.rows.length >= selectdata.f_install_count">添加用户</button>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="col-xs-12 col-xs-12">
|
|
6
|
+
<list :model="model" partial='list'>
|
|
7
|
+
<div partial class="auto app-text panel">
|
|
8
|
+
<div class="panel-body panel-self">
|
|
9
|
+
<div class="row">
|
|
10
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户编号</b></p>
|
|
11
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_userinfo_code }}</p>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="row">
|
|
14
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户名称</b></p>
|
|
15
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_name }}</p>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="row">
|
|
18
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">客户电话</b></p>
|
|
19
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_user_phone }}</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="row" v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">
|
|
22
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">单价</b></p>
|
|
23
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ $parent.$parent.selectdata.f_price }}</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="row" v-if="$parent.$parent.selectdata.f_apply_type === '散户集体报建' || $parent.$parent.selectdata.f_apply_type === '煤改气报建'">
|
|
26
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">累计缴费</b></p>
|
|
27
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_cumulative_payment_money }}</p>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="row">
|
|
30
|
+
<p class="col-xs-3 text-left font"><b class="control-label-justify">地址信息</b></p>
|
|
31
|
+
<p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row.f_address }}</p>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="row text-right">
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</list>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<validator name="v">
|
|
41
|
+
<modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false">
|
|
42
|
+
<header slot="modal-header" class="modal-header">
|
|
43
|
+
<button type="button" class="close" @click="closeUserFile"><span>×</span></button>
|
|
44
|
+
<h4 class="modal-title">安装明细</h4>
|
|
45
|
+
</header>
|
|
46
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
47
|
+
<!-- 地址信息 -->
|
|
48
|
+
<div class="form-group col-xs-12 panel panel-info">
|
|
49
|
+
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
50
|
+
<div class="col-xs-6 text-left">地址信息</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="form-group row vertical-center">
|
|
53
|
+
<label class="col-xs-4 control-label">地  址:</label>
|
|
54
|
+
<div class="col-xs-8">
|
|
55
|
+
<input class="form-control input_view"
|
|
56
|
+
placeholder="地址"
|
|
57
|
+
v-model="useradders.f_address"
|
|
58
|
+
:value.sync="useradders.f_address"
|
|
59
|
+
:readonly="true"/>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
<!-- 表具信息 -->
|
|
64
|
+
<div class="form-group col-xs-12 panel panel-info">
|
|
65
|
+
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
66
|
+
<div class="col-xs-6 text-left">表具信息</div>
|
|
67
|
+
<div class="col-xs-6 text-right">
|
|
68
|
+
<svg @click="scanCode()" style="width: 25px;height: 25px;margin-right: 10px" t="1636095770822" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2457" width="64" height="64"><path d="M928.016126 543.908618 95.983874 543.908618c-17.717453 0-31.994625-14.277171-31.994625-31.994625S78.26642 479.919368 95.983874 479.919368l832.032253 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S945.73358 543.908618 928.016126 543.908618z" p-id="2458"></path><path d="M832.032253 928.016126 639.892491 928.016126c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c17.717453 0 31.994625-14.277171 31.994625-31.994625l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625s31.994625 14.277171 31.994625 31.994625l0 159.973123C928.016126 884.840585 884.840585 928.016126 832.032253 928.016126z" p-id="2459"></path><path d="M351.94087 928.016126l-159.973123 0c-52.980346 0-95.983874-43.003528-95.983874-95.983874l0-159.973123c0-17.717453 14.277171-31.994625 31.994625-31.994625S159.973123 654.341676 159.973123 672.05913l0 159.973123c0 17.717453 14.449185 31.994625 31.994625 31.994625l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625C383.935495 913.738955 369.658324 928.016126 351.94087 928.016126z" p-id="2460"></path><path d="M127.978498 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-52.980346 43.003528-95.983874 95.983874-95.983874l159.973123 0c17.717453 0 31.994625 14.277171 31.994625 31.994625S369.658324 159.973123 351.94087 159.973123l-159.973123 0c-17.545439 0-31.994625 14.449185-31.994625 31.994625l0 159.973123C159.973123 369.658324 145.695952 383.935495 127.978498 383.935495z" p-id="2461"></path><path d="M896.021502 383.935495c-17.717453 0-31.994625-14.277171-31.994625-31.994625l0-159.973123c0-17.545439-14.277171-31.994625-31.994625-31.994625L639.892491 159.973123c-17.717453 0-31.994625-14.277171-31.994625-31.994625s14.277171-31.994625 31.994625-31.994625l191.967747 0c52.980346 0 95.983874 43.003528 95.983874 95.983874l0 159.973123C928.016126 369.658324 913.738955 383.935495 896.021502 383.935495z" p-id="2462"></path></svg>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="form-group row vertical-center" :class="[$v.gasbrand.required ? 'has-error' : '']">
|
|
72
|
+
<label class="col-xs-4 control-label">气表品牌:</label>
|
|
73
|
+
<div class="col-xs-8">
|
|
74
|
+
<input type="text" v-show="false" v-model="userfile.gasbrand.id" :value.sync="userfile.gasbrand.id" v-validate:gasbrand = "['required']" >
|
|
75
|
+
<input-select
|
|
76
|
+
class="select select_list"
|
|
77
|
+
:value.sync="userfile.gasbrand"
|
|
78
|
+
v-model="userfile.gasbrand"
|
|
79
|
+
:options="meterbrands"
|
|
80
|
+
@change="gasbrandChange()"
|
|
81
|
+
:disable="mark === 1"
|
|
82
|
+
:valueSingle="true"></input-select>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="form-group row vertical-center" :class="[$v.gasmodel.required ? 'has-error' : '']">
|
|
86
|
+
<label class="col-xs-4 control-label">气表型号:</label>
|
|
87
|
+
<div class="col-xs-8">
|
|
88
|
+
<input type="text" v-show="false" v-model="userfile.gasmodel.id" :value.sync="userfile.gasmodel.id" v-validate:gasmodel = "['required']" >
|
|
89
|
+
<input-select
|
|
90
|
+
class="select select_list"
|
|
91
|
+
:value.sync="userfile.gasmodel"
|
|
92
|
+
v-model="userfile.gasmodel"
|
|
93
|
+
:options.sync="userfile.gasbrand.gasmodel"
|
|
94
|
+
@change="gasmodelChange()"
|
|
95
|
+
:disable="mark === 1"
|
|
96
|
+
:valueSingle="true"></input-select>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div class="form-group row vertical-center" :class="[$v.f_meternumber.required ? 'has-error' : '']">
|
|
100
|
+
<label class="col-xs-4 control-label">表  号:</label>
|
|
101
|
+
<div class="col-xs-8">
|
|
102
|
+
<input class="form-control input_view" style=""
|
|
103
|
+
placeholder="表号" v-validate:f_meternumber = "['required']"
|
|
104
|
+
v-model="userfile.f_meternumber"
|
|
105
|
+
:value.sync="userfile.f_meternumber"
|
|
106
|
+
@change="meternumberValidate()"
|
|
107
|
+
:readonly="mark === 1"/>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div class="form-group row vertical-center">
|
|
111
|
+
<label class="col-xs-4 control-label">表 封 号:</label>
|
|
112
|
+
<div class="col-xs-8">
|
|
113
|
+
<input class="form-control input_view" style=""
|
|
114
|
+
placeholder="表封号"
|
|
115
|
+
v-model="userfile.f_metertitles"
|
|
116
|
+
:value="userfile.f_metertitles"
|
|
117
|
+
:readonly="mark === 1"/>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="form-group row vertical-center">
|
|
121
|
+
<label class="col-xs-4 control-label">表 读 数:</label>
|
|
122
|
+
<div class="col-xs-8">
|
|
123
|
+
<input class="form-control input_view" style=""
|
|
124
|
+
type="number"
|
|
125
|
+
placeholder="表读数"
|
|
126
|
+
v-model="userfile.f_meter_base"
|
|
127
|
+
:value="userfile.f_meter_base"
|
|
128
|
+
:readonly="mark === 1"/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="form-group row vertical-center">
|
|
132
|
+
<label class="col-xs-4 control-label">初始底数:</label>
|
|
133
|
+
<div class="col-xs-8">
|
|
134
|
+
<input class="form-control input_view" style=""
|
|
135
|
+
type="number"
|
|
136
|
+
v-model="userfile.f_initial_base"
|
|
137
|
+
:value="userfile.f_initial_base"
|
|
138
|
+
placeholder="初始底数"
|
|
139
|
+
:readonly="mark === 1"/>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="form-group row vertical-center">
|
|
143
|
+
<label class="col-xs-4 control-label">表  向:</label>
|
|
144
|
+
<div class="col-xs-8">
|
|
145
|
+
<input-select
|
|
146
|
+
class="select select_list"
|
|
147
|
+
:value.sync="userfile.f_aroundmeter"
|
|
148
|
+
v-model="userfile.f_aroundmeter"
|
|
149
|
+
:options="aroundmeters"
|
|
150
|
+
:disable="mark === 1"
|
|
151
|
+
:valueSingle="true"></input-select>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="form-group row vertical-center">
|
|
155
|
+
<label class="col-xs-4 control-label">安装位置:</label>
|
|
156
|
+
<div class="col-xs-8">
|
|
157
|
+
<input-select
|
|
158
|
+
class="select select_list"
|
|
159
|
+
:value.sync="userfile.f_position"
|
|
160
|
+
v-model="userfile.f_position"
|
|
161
|
+
:options="positions"
|
|
162
|
+
:disable="mark === 1"
|
|
163
|
+
:valueSingle="true"></input-select>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="form-group row vertical-center">
|
|
167
|
+
<label class="col-xs-4 control-label">安 装 人:</label>
|
|
168
|
+
<div class="col-xs-8">
|
|
169
|
+
<input class="form-control input_view" style=""
|
|
170
|
+
v-model="userfile.f_install_person"
|
|
171
|
+
:value.sync="installperson(userfile.f_install_person)"
|
|
172
|
+
placeholder="安装人"
|
|
173
|
+
readonly/>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
<div class="form-group row vertical-center">
|
|
177
|
+
<label class="col-xs-4 control-label">安装日期:</label>
|
|
178
|
+
<div class="col-xs-8">
|
|
179
|
+
<input class="form-control input_view" style=""
|
|
180
|
+
v-model="userfile.f_install_date"
|
|
181
|
+
:value.sync="installdate(userfile.f_install_date)"
|
|
182
|
+
placeholder="安装日期"
|
|
183
|
+
readonly/>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
<!-- 设备信息 -->
|
|
188
|
+
<div class="form-group col-xs-12 panel panel-info" v-for="(i, item) in devicesinfo">
|
|
189
|
+
<div class="panel-heading head row" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
190
|
+
<div class="col-xs-6 text-left">设备{{$index+1}}信息</div>
|
|
191
|
+
<div class="col-xs-6 text-right"><button
|
|
192
|
+
class="btn btn-danger"
|
|
193
|
+
v-if="!item.id"
|
|
194
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
195
|
+
>删除</button></div>
|
|
196
|
+
</div>
|
|
197
|
+
<div class="form-group row vertical-center">
|
|
198
|
+
<label class="col-xs-4 control-label">设备品牌:</label>
|
|
199
|
+
<div class="col-xs-8">
|
|
200
|
+
<input-select
|
|
201
|
+
class="select select_list"
|
|
202
|
+
:value.sync="item.f_brand"
|
|
203
|
+
v-model="item.f_brand"
|
|
204
|
+
:options="brandList"
|
|
205
|
+
:disable="mark === 1"
|
|
206
|
+
:valueSingle="true"></input-select>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="form-group row vertical-center">
|
|
210
|
+
<label class="col-xs-4 control-label">设备类型:</label>
|
|
211
|
+
<div class="col-xs-8">
|
|
212
|
+
<input-select
|
|
213
|
+
class="select select_list"
|
|
214
|
+
:value.sync="item.f_devices_type"
|
|
215
|
+
v-model="item.f_devices_type"
|
|
216
|
+
:options="devicesType"
|
|
217
|
+
:disable="mark === 1"
|
|
218
|
+
:valueSingle="true"></input-select>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="form-group row vertical-center">
|
|
222
|
+
<label class="col-xs-4 control-label">生产日期:</label>
|
|
223
|
+
<div class="col-xs-8">
|
|
224
|
+
<datepicker
|
|
225
|
+
placeholder="生产日期"
|
|
226
|
+
:value.sync="item.f_make_date"
|
|
227
|
+
v-model="item.f_make_date"
|
|
228
|
+
format="yyyy-MM-dd HH:mm:ss"
|
|
229
|
+
:disabled="mark === 1">
|
|
230
|
+
</datepicker>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
<div class="form-group row vertical-center">
|
|
234
|
+
<label class="col-xs-4 control-label">设备数量:</label>
|
|
235
|
+
<div class="col-xs-8">
|
|
236
|
+
<input class="form-control input_view" style="" type="number"
|
|
237
|
+
placeholder="设备数量"
|
|
238
|
+
v-model="item.f_devices_num"
|
|
239
|
+
:value="item.f_devices_num"
|
|
240
|
+
:readonly="mark === 1"/>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
<div class="form-group row vertical-center">
|
|
244
|
+
<label class="col-xs-4 control-label">安 装 人:</label>
|
|
245
|
+
<div class="col-xs-8">
|
|
246
|
+
<input class="form-control input_view" style=""
|
|
247
|
+
placeholder="安装人"
|
|
248
|
+
v-model="item.f_input_person"
|
|
249
|
+
:value.sync="installperson(item.f_input_person)"
|
|
250
|
+
readonly/>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="form-group row vertical-center">
|
|
254
|
+
<label class="col-xs-4 control-label">安装日期:</label>
|
|
255
|
+
<div class="col-xs-8">
|
|
256
|
+
<input class="form-control input_view" style=""
|
|
257
|
+
placeholder="安装日期"
|
|
258
|
+
v-model="item.f_input_date"
|
|
259
|
+
:value="installdate(item.f_input_date)"
|
|
260
|
+
readonly/>
|
|
261
|
+
</div>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</article>
|
|
265
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
266
|
+
<template v-if="mark !== 1">
|
|
267
|
+
<button type="button" class="btn btn-primary" @click="pushDevice">添加设备</button>
|
|
268
|
+
<button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
|
|
269
|
+
</template>
|
|
270
|
+
</footer>
|
|
271
|
+
</modal>
|
|
272
|
+
</validator>
|
|
273
|
+
|
|
274
|
+
</template>
|
|
275
|
+
<script>
|
|
276
|
+
import Vue from 'vue'
|
|
277
|
+
import {PagedList} from 'vue-client'
|
|
278
|
+
import {HttpResetClass} from 'vue-client'
|
|
279
|
+
import {isEmpty} from '../../../../../components/Util'
|
|
280
|
+
// Date格式化
|
|
281
|
+
Date.prototype.Format = function (fmt) {
|
|
282
|
+
var o = {
|
|
283
|
+
'M+': this.getMonth() + 1, // 月份
|
|
284
|
+
'd+': this.getDate(), // 日
|
|
285
|
+
'H+': this.getHours(), // 小时
|
|
286
|
+
'm+': this.getMinutes(), // 分
|
|
287
|
+
's+': this.getSeconds(), // 秒
|
|
288
|
+
'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
|
|
289
|
+
'S': this.getMilliseconds() // 毫秒
|
|
290
|
+
}
|
|
291
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
|
|
292
|
+
for (var k in o) {
|
|
293
|
+
if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
|
294
|
+
}
|
|
295
|
+
return fmt
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export default {
|
|
299
|
+
title: '安装明细',
|
|
300
|
+
props: {
|
|
301
|
+
selectdata: {
|
|
302
|
+
type: Object
|
|
303
|
+
},
|
|
304
|
+
mark: {
|
|
305
|
+
type: Number,
|
|
306
|
+
default: 0
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
data () {
|
|
310
|
+
return {
|
|
311
|
+
showUserFile: false,
|
|
312
|
+
model: {
|
|
313
|
+
rows: null
|
|
314
|
+
},
|
|
315
|
+
meterbrands: [], // 气表品牌
|
|
316
|
+
useradders: {},
|
|
317
|
+
userinfo: {},
|
|
318
|
+
userfile: {},
|
|
319
|
+
devicesinfo: [],
|
|
320
|
+
scanCodeConfig: null
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
ready () {
|
|
324
|
+
this.search()
|
|
325
|
+
this.getMeterbrands()
|
|
326
|
+
|
|
327
|
+
this.getConfig()
|
|
328
|
+
},
|
|
329
|
+
methods: {
|
|
330
|
+
deleteDevicesinfo (index) {
|
|
331
|
+
this.devicesinfo.splice(index, 1)
|
|
332
|
+
},
|
|
333
|
+
pushDevice () {
|
|
334
|
+
this.devicesinfo.push({})
|
|
335
|
+
},
|
|
336
|
+
async getConfig () {
|
|
337
|
+
let http = new HttpResetClass()
|
|
338
|
+
let res = await http.load(
|
|
339
|
+
'POST',
|
|
340
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/getScanCodeConfig`,
|
|
341
|
+
null,
|
|
342
|
+
{resolveMsg: null, rejectMsg: '扫码配置获取失败!!!'}
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
this.scanCodeConfig = res.data
|
|
346
|
+
},
|
|
347
|
+
scanCode () {
|
|
348
|
+
console.log('===============扫码===================')
|
|
349
|
+
HostApp.__this__=this,
|
|
350
|
+
HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
|
|
351
|
+
},
|
|
352
|
+
getCode() {
|
|
353
|
+
let code = HostApp.getCode().data;
|
|
354
|
+
// let code = '012199312345'
|
|
355
|
+
console.log('===========扫码结果=============')
|
|
356
|
+
console.log(code)
|
|
357
|
+
if (!/^\d{12}$/.test(code)) {
|
|
358
|
+
this.$showAlert('表号不符合规则', 'danger', 3000)
|
|
359
|
+
return
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// 解析厂家
|
|
363
|
+
let factory = null
|
|
364
|
+
for (const item of this.scanCodeConfig.factory) {
|
|
365
|
+
if (item.key === code.substring(0, 2)) {
|
|
366
|
+
factory = item.val
|
|
367
|
+
break
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
if (isEmpty(factory)) {
|
|
371
|
+
this.$showAlert('未知厂家!!!', 'danger', 3000)
|
|
372
|
+
return
|
|
373
|
+
}
|
|
374
|
+
console.log(factory)
|
|
375
|
+
|
|
376
|
+
// 解析运营商
|
|
377
|
+
let ips = null
|
|
378
|
+
for (const item of this.scanCodeConfig.ips) {
|
|
379
|
+
if (item.key === code.substring(4, 6)) {
|
|
380
|
+
ips = item.val
|
|
381
|
+
break
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
if (isEmpty(ips)) {
|
|
385
|
+
this.$showAlert('未知运营商!!!', 'danger', 3000)
|
|
386
|
+
return
|
|
387
|
+
}
|
|
388
|
+
console.log(ips)
|
|
389
|
+
|
|
390
|
+
// 表向
|
|
391
|
+
console.log(code.substring(6, 7) % 2 === 0 ? '偶数' : '奇数')
|
|
392
|
+
console.log(code.substring(6, 7) % 2 === 0 ? '右表' : '左表')
|
|
393
|
+
this.userfile.f_aroundmeter = code.substring(6, 7) % 2 === 0 ? '右表' : '左表'
|
|
394
|
+
|
|
395
|
+
// 顺序号
|
|
396
|
+
console.log(code.substring(7, 12))
|
|
397
|
+
if (code.substring(7, 12) < this.scanCodeConfig.number.min || code.substring(7, 12) > this.scanCodeConfig.number.max) {
|
|
398
|
+
this.$showAlert('顺序号超出范围!!!', 'danger', 3000)
|
|
399
|
+
return
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
for (const item of this.meterbrands) {
|
|
403
|
+
if (item.label === factory) {
|
|
404
|
+
this.userfile.gasbrand = item.value
|
|
405
|
+
this.gasbrandChange()
|
|
406
|
+
break
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
Vue.set(this.userfile, 'f_meternumber', code)
|
|
411
|
+
|
|
412
|
+
this.meternumberValidate()
|
|
413
|
+
},
|
|
414
|
+
// 保存档案
|
|
415
|
+
async saveUserFile() {
|
|
416
|
+
this.userinfo = {
|
|
417
|
+
f_user_name: this.selectdata.f_user_name,
|
|
418
|
+
f_user_phone: this.selectdata.f_phone,
|
|
419
|
+
f_credentials: this.selectdata.f_credentials,
|
|
420
|
+
f_idnumber: this.selectdata.f_idnumber
|
|
421
|
+
}
|
|
422
|
+
this.useradders = Object.assign({}, this.useradders, {
|
|
423
|
+
f_address_type: '特殊地址',
|
|
424
|
+
f_slice_area: this.selectdata.f_slice_area,
|
|
425
|
+
f_pcd: this.selectdata.f_pcd,
|
|
426
|
+
f_street: this.selectdata.f_street,
|
|
427
|
+
f_residential_area: this.selectdata.f_residential_area
|
|
428
|
+
})
|
|
429
|
+
|
|
430
|
+
this.userfile.devicesinfo = this.devicesinfo
|
|
431
|
+
|
|
432
|
+
let data = {
|
|
433
|
+
user: Vue.user,
|
|
434
|
+
useradders: this.useradders,
|
|
435
|
+
userinfo: this.userinfo,
|
|
436
|
+
userfile: this.userfile,
|
|
437
|
+
selectdata: this.selectdata
|
|
438
|
+
}
|
|
439
|
+
let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/applyAddUserinfo`, {data:data}, {
|
|
440
|
+
resolveMsg: null,
|
|
441
|
+
rejectMsg: '用户档案添加失败!!!'
|
|
442
|
+
})
|
|
443
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
444
|
+
},
|
|
445
|
+
// 检查表号是否存在
|
|
446
|
+
async meternumberValidate() {
|
|
447
|
+
if (!this.userfile.f_gasbrand_id) {
|
|
448
|
+
this.userfile.f_meternumber = ''
|
|
449
|
+
this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
|
|
450
|
+
return
|
|
451
|
+
}
|
|
452
|
+
if (this.userfile.f_gasbrand_id && this.userfile.f_meternumber) {
|
|
453
|
+
let data = {
|
|
454
|
+
f_meternumber: this.userfile.f_meternumber,
|
|
455
|
+
f_gasbrand_id: this.userfile.f_gasbrand_id
|
|
456
|
+
}
|
|
457
|
+
if (this.userfile.f_userfiles_id) {
|
|
458
|
+
data.f_userfiles_id = this.userfile.f_userfiles_id
|
|
459
|
+
}
|
|
460
|
+
let res = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/logic/meterbrandsNumberValidate`, {data:data}, {
|
|
461
|
+
resolveMsg: null,
|
|
462
|
+
rejectMsg: '表号验证失败!!'
|
|
463
|
+
})
|
|
464
|
+
if (res.data) {
|
|
465
|
+
this.$showAlert(`表号:${this.userfile.f_meternumber}已存在!!!`, 'warning', 3000)
|
|
466
|
+
this.userfile.f_meternumber = ''
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
// 选择气表型号
|
|
471
|
+
gasmodelChange() {
|
|
472
|
+
if (this.userfile.gasmodel) {
|
|
473
|
+
this.userfile.f_gasmodel_id = this.userfile.gasmodel.id
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
// 选择气表品牌
|
|
477
|
+
gasbrandChange() {
|
|
478
|
+
// 清空已保存的气表型号
|
|
479
|
+
this.userfile.f_gasmodel_id = null
|
|
480
|
+
this.userfile.gasmodel = null
|
|
481
|
+
|
|
482
|
+
if (this.userfile.gasbrand) {
|
|
483
|
+
// 气表品牌id
|
|
484
|
+
this.userfile.f_gasbrand_id = this.userfile.gasbrand.id
|
|
485
|
+
// 气表分类
|
|
486
|
+
this.userfile.f_meter_classify = this.userfile.gasbrand.f_meter_type
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
// 打开安装明细
|
|
490
|
+
async showUserFileModal (row) {
|
|
491
|
+
if (row) {
|
|
492
|
+
console.log('------------------修正---------------------')
|
|
493
|
+
Vue.set(this.useradders, 'f_address', row.f_address)
|
|
494
|
+
|
|
495
|
+
let http = new HttpResetClass()
|
|
496
|
+
let data = {
|
|
497
|
+
tablename: 't_userinfo',
|
|
498
|
+
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
499
|
+
}
|
|
500
|
+
let res = await http.load(
|
|
501
|
+
'POST',
|
|
502
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
503
|
+
{data: data},
|
|
504
|
+
{resolveMsg: null, rejectMsg: '档案信息查询失败!!!'}
|
|
505
|
+
)
|
|
506
|
+
this.userinfo = res.data[0]
|
|
507
|
+
|
|
508
|
+
data = {
|
|
509
|
+
tablename: 't_userfiles',
|
|
510
|
+
condition: `f_userinfo_id = '${row.f_userinfo_id}'`
|
|
511
|
+
}
|
|
512
|
+
res = await http.load(
|
|
513
|
+
'POST',
|
|
514
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
515
|
+
{data: data},
|
|
516
|
+
{resolveMsg: null, rejectMsg: '表具信息查询失败!!!'}
|
|
517
|
+
)
|
|
518
|
+
this.userfile = res.data[0]
|
|
519
|
+
|
|
520
|
+
// 已有表具的 气表信息补充
|
|
521
|
+
for (const item of this.meterbrands) {
|
|
522
|
+
if (item.value.id == this.userfile.f_gasbrand_id) {
|
|
523
|
+
this.userfile.gasbrand = item.value
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
if (this.userfile.gasbrand) {
|
|
527
|
+
for (const item of this.userfile.gasbrand.gasmodel) {
|
|
528
|
+
if (item.value.id == this.userfile.f_gasmodel_id) {
|
|
529
|
+
this.userfile.gasmodel = item.value
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
data = {
|
|
535
|
+
tablename: 't_devices',
|
|
536
|
+
condition: `f_userfiles_id = '${this.userfile.f_userfiles_id}'`
|
|
537
|
+
}
|
|
538
|
+
res = await http.load(
|
|
539
|
+
'POST',
|
|
540
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
|
|
541
|
+
{data: data},
|
|
542
|
+
{resolveMsg: null, rejectMsg: '设备信息查询失败!!!'}
|
|
543
|
+
)
|
|
544
|
+
this.devicesinfo = res.data
|
|
545
|
+
} else {
|
|
546
|
+
console.log('-------------------添加----------------------')
|
|
547
|
+
Vue.set(this.useradders, 'f_address', `${this.selectdata.f_address}(${this.model.rows.length + 1})`)
|
|
548
|
+
}
|
|
549
|
+
this.showUserFile = true
|
|
550
|
+
},
|
|
551
|
+
// 获取气表品牌
|
|
552
|
+
async getMeterbrands() {
|
|
553
|
+
let http = new HttpResetClass()
|
|
554
|
+
let data = {
|
|
555
|
+
f_orgid: Vue.user.orgid
|
|
556
|
+
// f_orgid: 21142
|
|
557
|
+
}
|
|
558
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/getMeterbrands`, {data:data}, {
|
|
559
|
+
resolveMsg: null,
|
|
560
|
+
rejectMsg: null
|
|
561
|
+
})
|
|
562
|
+
this.meterbrands = res.data
|
|
563
|
+
},
|
|
564
|
+
searchCondition (args) {
|
|
565
|
+
args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
|
|
566
|
+
|
|
567
|
+
this.model.search(args.condition, args.model)
|
|
568
|
+
},
|
|
569
|
+
// 查询
|
|
570
|
+
async search () {
|
|
571
|
+
let http = new HttpResetClass()
|
|
572
|
+
let data = {
|
|
573
|
+
condition: `ua.f_process_id = '${this.selectdata.f_process_id}'`
|
|
574
|
+
}
|
|
575
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
|
|
576
|
+
// let res = await http.load('POST', `rs/sql/getAddresAndUserinfoAndUserfilesAmount`, {data:data}, {
|
|
577
|
+
resolveMsg: null,
|
|
578
|
+
rejectMsg: null
|
|
579
|
+
})
|
|
580
|
+
this.model.rows = res.data
|
|
581
|
+
},
|
|
582
|
+
// 关闭安装明细
|
|
583
|
+
closeUserFile() {
|
|
584
|
+
this.showUserFile = false
|
|
585
|
+
this.useradders = {}
|
|
586
|
+
this.userinfo = {}
|
|
587
|
+
this.userfile = {}
|
|
588
|
+
this.devicesinfo = []
|
|
589
|
+
this.search()
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
events: {
|
|
593
|
+
},
|
|
594
|
+
computed: {
|
|
595
|
+
// 安装人
|
|
596
|
+
installperson() {
|
|
597
|
+
return function (f_install_person) {
|
|
598
|
+
if (isEmpty(f_install_person)) {
|
|
599
|
+
return Vue.user.name
|
|
600
|
+
}
|
|
601
|
+
return f_install_person
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
// 安装时间
|
|
605
|
+
installdate() {
|
|
606
|
+
return function (f_install_date) {
|
|
607
|
+
if (isEmpty(f_install_date)) {
|
|
608
|
+
return new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
609
|
+
}
|
|
610
|
+
return f_install_date
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
// 表向
|
|
614
|
+
aroundmeters() {
|
|
615
|
+
return this.$appdata.getParam('左右表')
|
|
616
|
+
},
|
|
617
|
+
// 安装位置
|
|
618
|
+
positions() {
|
|
619
|
+
return this.$appdata.getParam('安装位置')
|
|
620
|
+
},
|
|
621
|
+
devicesType() {
|
|
622
|
+
return this.$appdata.getParam("设备类型")
|
|
623
|
+
},
|
|
624
|
+
brandList() {
|
|
625
|
+
return this.$appdata.getParam("设备品牌")
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
watch: {
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
</script>
|
|
632
|
+
<style scoped>
|
|
633
|
+
.panel-self{
|
|
634
|
+
border-radius: 10px;
|
|
635
|
+
border:1px solid #499EDF;
|
|
636
|
+
background-color: #F8F8F8;
|
|
637
|
+
}
|
|
638
|
+
.vertical-center {
|
|
639
|
+
display: flex;
|
|
640
|
+
align-items: center;
|
|
641
|
+
text-align: center;
|
|
642
|
+
}
|
|
643
|
+
/*清除model中的浮动*/
|
|
644
|
+
.clearfix:after,.clearfix:before{
|
|
645
|
+
display: table;
|
|
646
|
+
}
|
|
647
|
+
.clearfix:after{
|
|
648
|
+
clear: both;
|
|
649
|
+
}
|
|
650
|
+
</style>
|