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.
Files changed (130) hide show
  1. package/android.html +23 -23
  2. package/build/dev-server.js +119 -119
  3. package/build/webpack.base.conf.js +2 -1
  4. package/build/webpack.dev.conf.js +12 -0
  5. package/dingding.html +23 -0
  6. package/index.html +33 -33
  7. package/package.json +2 -1
  8. package/src/AndroidApp.vue +35 -35
  9. package/src/DingDingApp.vue +51 -0
  10. package/src/android.js +21 -21
  11. package/src/apply.js +38 -13
  12. package/src/applyAndroid.js +46 -32
  13. package/src/applyDingDing.js +12 -0
  14. package/src/components/android/AppOnetomany.vue +343 -301
  15. package/src/components/android/AppServiceView.vue +189 -10
  16. package/src/components/android/AppSign.vue +19 -7
  17. package/src/components/android/AppTakePic.vue +143 -143
  18. package/src/components/android/AreaSelect/AppQrcodeReader.vue +73 -0
  19. package/src/components/android/AreaSelect/AppResAreaMapGroup.vue +148 -0
  20. package/src/components/android/AreaSelect/AppResAreaSelect.vue +108 -0
  21. package/src/components/android/AreaSelect/AppResAreaSelectGroup.vue +142 -0
  22. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -0
  23. package/src/components/android/Function/AppInstallFunction.vue +366 -0
  24. package/src/components/android/Process/AppExplorationUser.vue +500 -320
  25. package/src/components/android/Process/AppServiceControl.vue +999 -48
  26. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -0
  27. package/src/components/android/Process/Processes/AppBuildSign.vue +46 -0
  28. package/src/components/android/Process/Processes/AppChargeManagement.vue +637 -0
  29. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -0
  30. package/src/components/android/Process/Processes/AppInstallationDetails.vue +116 -90
  31. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -0
  32. package/src/components/android/Process/Processes/selectApply.vue +250 -0
  33. package/src/components/android/Process/Processes/selectUserinfo.vue +182 -0
  34. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
  35. package/src/components/android/Supervisory/AppProcessSupervisory.vue +205 -71
  36. package/src/components/android/Supervisory/AppSupervisoryCart.vue +69 -34
  37. package/src/components/android/TaskGraph.vue +125 -125
  38. package/src/components/common/TabButton.vue +149 -0
  39. package/src/components/common/Tabs.vue +67 -0
  40. package/src/components/image/dwg.jpg +0 -0
  41. package/src/components/image/txt.jpg +0 -0
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. package/src/components/product/ApplyCharge/ApplyChargeList.vue +272 -53
  48. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  49. package/src/components/product/AreaSelect/MyAreaSelect.vue +423 -0
  50. package/src/components/product/AreaSelect/ResAreaSelect.vue +106 -0
  51. package/src/components/product/AreaSelect/ResAreaSelectGroup.vue +150 -0
  52. package/src/components/product/AreaSelect/utils/EventListener.js +29 -0
  53. package/src/components/product/AreaSelect/utils/coerceBoolean.js +7 -0
  54. package/src/components/product/Business/BusinessApply.vue +269 -0
  55. package/src/components/product/Business/CivilApply.vue +269 -0
  56. package/src/components/product/Function/InstallFunction.vue +132 -125
  57. package/src/components/product/Function/InstallInfoSelect.vue +320 -292
  58. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -222
  59. package/src/components/product/GaoDeMapComponents/GaoDeMap.vue +231 -0
  60. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -0
  61. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -0
  62. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -0
  63. package/src/components/product/Install/InstallProject.vue +194 -0
  64. package/src/components/product/Material/MaterialDetailed.vue +262 -0
  65. package/src/components/product/OldApply/Handle/HandleApply.vue +337 -0
  66. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -0
  67. package/src/components/product/OldApply/OldApply.vue +209 -0
  68. package/src/components/product/OldApply/OldApplyMessage.vue +420 -0
  69. package/src/components/product/Onetomany.vue +406 -377
  70. package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -0
  71. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -0
  72. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -0
  73. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -0
  74. package/src/components/product/Process/ExplorationSelect.vue +495 -410
  75. package/src/components/product/Process/ExplorationUser.vue +189 -138
  76. package/src/components/product/Process/Processes/InstallationDetails.vue +25 -7
  77. package/src/components/product/Process/Processes/Print/printCharge.vue +41 -17
  78. package/src/components/product/Process/Processes/Print/printChargepc.vue +142 -0
  79. package/src/components/product/Process/Processes/Print/printRefund.vue +196 -0
  80. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -0
  81. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -207
  82. package/src/components/product/Process/Processes/chargeManagement.vue +20 -3
  83. package/src/components/product/Process/Processes/devicesManagement.vue +484 -478
  84. package/src/components/product/Process/Processes/selectApply.vue +2 -2
  85. package/src/components/product/Process/Service/ServiceControl.vue +638 -20
  86. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  87. package/src/components/product/Process/ShowBackReason.vue +33 -0
  88. package/src/components/product/ServiceView.vue +357 -7
  89. package/src/components/product/Stop/StopApply.vue +101 -103
  90. package/src/components/product/Stop/StopApplyList.vue +271 -269
  91. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +884 -186
  92. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -100
  93. package/src/components/product/Supervisory/SupervisoryList.vue +201 -30
  94. package/src/components/product/Supervisory/SupervisoryhCart.vue +130 -107
  95. package/src/components/product/VueUtils/ApplyUpload.vue +275 -273
  96. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -0
  97. package/src/components/product/VueUtils/HighMeter.vue +208 -208
  98. package/src/components/product/VueUtils/ToolsPage.vue +51 -0
  99. package/src/components/product/VueUtils/Tree.vue +330 -0
  100. package/src/dingding.js +19 -0
  101. package/src/expandcssAndroid.less +517 -1034
  102. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -731
  103. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  104. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  105. package/src/filiale/yuchuan/android/Sign/AppSignTask.vue +182 -182
  106. package/src/filiale/yuchuan/android/Sign/BuildSign.vue +50 -50
  107. package/src/filiale/yuchuan/android/Sign/ConstructSign.vue +50 -50
  108. package/src/filiale/yuchuan/android/Sign/DesignSign.vue +50 -50
  109. package/src/filiale/yuchuan/android/Sign/SupervisorSign.vue +50 -50
  110. package/src/filiale/yuchuan/android/Task/Build/BuildTsak.vue +60 -60
  111. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -60
  112. package/src/filiale/yuchuan/android.js +14 -14
  113. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  114. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  115. package/src/filiale/yuchuan/pc/Print/BuildOrder/buildOrderList.vue +264 -0
  116. package/src/filiale/yuchuan/pc/Print/BuildOrder/printBuildOrder.vue +152 -0
  117. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +149 -149
  118. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +67 -67
  119. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  120. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  121. package/src/filiale/yuchuan/pc/Process/Processes/Print/printCharge.vue +125 -0
  122. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -470
  123. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1074
  124. package/src/filiale/yuchuan/pc/Sign/SignRecord.vue +24 -0
  125. package/src/filiale/yuchuan/pc/Sign/SignRecordList.vue +174 -0
  126. package/src/filiale/yuchuan/pc.js +20 -12
  127. package/src/main.js +4 -1
  128. package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
  129. package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
  130. package/src/components/product/Function/functions/StopInstall.vue +0 -106
@@ -0,0 +1,196 @@
1
+ <template>
2
+ <div style="margin-bottom: 20px" class="form-group select-overspread">
3
+ <label class="control-label-justify control-label col-sm-3">打印退费单</label>
4
+ <div class="col-sm-10">
5
+ <button class="button_search button_spacing" type="button" style="width: max-content;position: absolute" @click="showPrint = !showPrint">预览</button>
6
+ </div>
7
+ </div>
8
+
9
+ <modal :show.sync="showPrint" v-ref:modal :backdrop="false" title="打印预览">
10
+ <header slot="modal-header" class="modal-header">
11
+ <button type="button" class="close" @click="showPrint = !showPrint"><span>&times;</span></button>
12
+ <h4 class="modal-title">打印预览</h4>
13
+ </header>
14
+ <article slot="modal-body" class="modal-body clearfix">
15
+ <style id="printRefundStyle">
16
+ td{
17
+ height: 30px;
18
+ text-align: center;
19
+ }
20
+ table{
21
+ margin: auto;
22
+ width: 100%;
23
+ border-collapse:collapse;
24
+ border: 1px solid black;
25
+ }
26
+ h1,h2,h3,h4,h5,h6 {
27
+ text-align: center;
28
+ }
29
+ .orgs {
30
+ border-bottom: 2px solid;
31
+ padding: 5px;
32
+ }
33
+ .date {
34
+ float: left;
35
+ padding-left: 10px;
36
+ }
37
+ .status {
38
+ float: right;
39
+ padding-right: 10px;
40
+ }
41
+ </style>
42
+ <div id="printRefund">
43
+ <h4>
44
+ <span class="orgs">
45
+ {{selectdata.f_refund_item}}退款收到条
46
+ </span>
47
+ </h4>
48
+ <table border="1">
49
+ <tr>
50
+ <td colspan="2" style="border: none">
51
+ 开票日期:{{ new Date().Format('yyyy年MM月dd日') }}
52
+ </td>
53
+ <td colspan="2" style="border: none">
54
+ 工程编号:{{ selectdata.f_parent_apply_num }}
55
+ </td>
56
+ <td colspan="2" style="border: none">
57
+ 经办人:{{ username }}
58
+ </td>
59
+ </tr>
60
+ <tr>
61
+ <td style="width: 17%">用户姓名</td>
62
+ <td colspan="2" style="width: 33%">{{ selectdata.f_user_name }}</td>
63
+ <td style="width: 17%">联系方式</td>
64
+ <td colspan="2" style="width: 33%">{{ selectdata.f_phone }}</td>
65
+ </tr>
66
+ <tr>
67
+ <td>地址</td>
68
+ <td colspan="5">{{ selectdata.f_address }}</td>
69
+ </tr>
70
+ <tr>
71
+ <td>金额</td>
72
+ <td colspan="2">{{ selectdata.f_refund_money }}</td>
73
+ <td>金额大写</td>
74
+ <td colspan="2">{{ smalltoBIG(selectdata.f_refund_money) }}</td>
75
+ </tr>
76
+ <tr>
77
+ <td>收到人</td>
78
+ <td colspan="2"></td>
79
+ <td>代收人</td>
80
+ <td colspan="2"></td>
81
+ </tr>
82
+ <tr>
83
+ <td>备&emsp;&emsp;注</td>
84
+ <td colspan="5" style="text-align: left">
85
+ <p style="margin: 0 0 5px">1、退款收到人姓名必须为天然气开户姓名。</p>
86
+ <p style="margin: 0 0 5px">2、退款收到人办理退款时,必须携带身份证或身份证复印件进行办理,并填写退款收到条方可退款。</p>
87
+ <p style="margin: 0 0 5px">3、若退款收到人因特殊原因无法到达现场时需代办人办理退款时,必须现场联系退款用户,核实各项信息确认为代办后,代办人提供退款用户身份证复印件及本人身份证复印件方可办理退款。</p>
88
+ </td>
89
+ </tr>
90
+ </table>
91
+ </div>
92
+ </article>
93
+ <footer slot="modal-footer" class="modal-footer">
94
+ <button type="button" class="btn btn-primary" @click="print()">打印</button>
95
+ </footer>
96
+ </modal>
97
+
98
+ <print-element v-show="false" v-ref:print id='printRefund' styleid='printRefundStyle'
99
+ top='5' left='30' width='100%' height='100%'>
100
+ </print-element>
101
+ </template>
102
+
103
+ <script>
104
+ import { isEmpty } from '../../../../Util'
105
+ Date.prototype.Format = function (fmt) {
106
+ var o = {
107
+ "M+": this.getMonth() + 1, //月份
108
+ "d+": this.getDate(), //日
109
+ "H+": this.getHours(), //小时
110
+ "m+": this.getMinutes(), //分
111
+ "s+": this.getSeconds(), //秒
112
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
113
+ "S": this.getMilliseconds() //毫秒
114
+ };
115
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
116
+ for (var k in o)
117
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
118
+ return fmt;
119
+ }
120
+ export default {
121
+ title: '打印退费票据',
122
+ props: {
123
+ selectdata: {
124
+ type: Object
125
+ },
126
+ mark: {
127
+ type: Number,
128
+ default: 0
129
+ }
130
+ },
131
+ data () {
132
+ return {
133
+ showPrint: false
134
+ }
135
+ },
136
+ ready () {
137
+ },
138
+ methods: {
139
+ print () {
140
+ this.$refs.print.PrintTable()
141
+ },
142
+ // 金额转大写
143
+ smalltoBIG (n) {
144
+ let fraction = ['角', '分']
145
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
146
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']]
147
+ let head = n < 0 ? '欠' : ''
148
+ n = Math.abs(n)
149
+
150
+ let s = ''
151
+
152
+ for (var i = 0; i < fraction.length; i++) {
153
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '')
154
+ }
155
+ s = s || '整'
156
+ n = Math.floor(n)
157
+
158
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
159
+ let p = ''
160
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
161
+ p = digit[n % 10] + unit[1][j] + p
162
+ n = Math.floor(n / 10)
163
+ }
164
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s
165
+ }
166
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
167
+ }
168
+ },
169
+ computed: {
170
+ orgs () {
171
+ return this.$login.f.orgs
172
+ },
173
+ username () {
174
+ return this.$login.f.name
175
+ }
176
+ }
177
+ }
178
+ </script>
179
+
180
+ <style scoped>
181
+ .control-label-justify {
182
+ display: inline-block;
183
+ vertical-align: top;
184
+ width: 110px;
185
+ text-align: justify;
186
+ font-family: PingFang-SC-Bold;
187
+ }
188
+
189
+ .control-label-justify::after {
190
+ content: "";
191
+ display: inline-block;
192
+ width: 100%;
193
+ overflow: hidden;
194
+ height: 0;
195
+ }
196
+ </style>
@@ -0,0 +1,454 @@
1
+ <template>
2
+ <div>
3
+ <data-grid :model="onetomany" class="list_area table_sy">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单位</th>
10
+ <th class="textNoLineBreak">材料数量</th>
11
+ <th class="textNoLineBreak">材料编号</th>
12
+ <th class="textNoLineBreak">材料标识</th>
13
+ <th class="textNoLineBreak">用户编号</th>
14
+ <th class="textNoLineBreak">
15
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
16
+ <button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
17
+ @click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
18
+ <a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
19
+ href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
20
+ </th>
21
+ </tr>
22
+ </template>
23
+ <template partial='body'>
24
+ <tr>
25
+ <td style="text-align: center;">
26
+ <nobr>{{$index+1}}</nobr>
27
+ </td>
28
+ <td style="text-align: center;">
29
+ <nobr>{{row.f_material_name}}</nobr>
30
+ </td>
31
+ <td style="text-align: center;">
32
+ <nobr>{{row.f_material_style}}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{row.f_material_unit}}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{row.f_material_number}}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{row.f_bjq_sid}}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_material_code}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_userinfo_code}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
51
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
52
+ </td>
53
+ </tr>
54
+ </template>
55
+ </data-grid>
56
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
57
+ <header slot="modal-header" class="modal-header">
58
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
59
+ <h4 class="modal-title">选择文件</h4>
60
+ </header>
61
+ <article slot="modal-body" class="modal-body">
62
+ <div class="form-group">
63
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
64
+ </div>
65
+ </article>
66
+ <footer slot="modal-footer" class="modal-footer"></footer>
67
+ </modal>
68
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
69
+ :backdrop="false" :title="title">
70
+ <header slot="modal-header" class="modal-header">
71
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
72
+ <h4 class="modal-title">{{title}}</h4>
73
+ </header>
74
+ <article slot="modal-body" class="modal-body clearfix">
75
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
76
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
77
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
78
+ <div class="col-sm-6 text-right"><button
79
+ class="button_delete button_spacing"
80
+ @click.prevent="deleteDevicesinfo(i)"
81
+ v-if="title === '新增'"
82
+ >删除</button></div>
83
+ </div>
84
+ <div class="form-group col-sm-6">
85
+ <label class="col-sm-4 control-label">选择材料:</label>
86
+ <div class="col-sm-8">
87
+ <input-select
88
+ class="select select_list"
89
+ :value.sync="item.material"
90
+ v-model="item.material"
91
+ :options="meterialOptions"
92
+ :disable="mark === 1"
93
+ @change="modifyOtherValue(i)"
94
+ :valueSingle="true"></input-select>
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
98
+ <label class="col-sm-4 control-label">材料名称:</label>
99
+ <div class="col-sm-8">
100
+ <input class="form-control input_view" style="" type="text"
101
+ placeholder="材料名称"
102
+ v-model="item.f_material_name"
103
+ :value="item.f_material_name"
104
+ />
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
108
+ <label class="col-sm-4 control-label">材料型号:</label>
109
+ <div class="col-sm-8">
110
+ <input class="form-control input_view" style="" type="text"
111
+ placeholder="材料型号"
112
+ v-model="item.f_material_style"
113
+ :value="item.f_material_style"
114
+ />
115
+ </div>
116
+ </div>
117
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
118
+ <label class="col-sm-4 control-label">材料单位:</label>
119
+ <div class="col-sm-8">
120
+ <input class="form-control input_view" style="" type="text"
121
+ placeholder="材料单位"
122
+ v-model="item.f_material_unit"
123
+ :value="item.f_material_unit"
124
+ />
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
128
+ <label class="col-sm-4 control-label">材料数量:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style="" type="number"
131
+ placeholder="设备数量"
132
+ v-model="item.f_material_number"
133
+ :value="item.f_material_number"
134
+ />
135
+ </div>
136
+ </div>
137
+ <div class="form-group col-sm-6">
138
+ <label class="col-sm-4 control-label">材料编号:</label>
139
+ <div class="col-sm-8">
140
+ <input class="form-control input_view" style="" type="text"
141
+ placeholder="材料编号"
142
+ v-model="item.f_bjq_sid"
143
+ :value="item.f_bjq_sid"
144
+ />
145
+ </div>
146
+ </div>
147
+ <div class="form-group col-sm-6">
148
+ <label class="col-sm-4 control-label">材料标识:</label>
149
+ <div class="col-sm-8">
150
+ <input class="form-control input_view" style=""
151
+ placeholder="材料标识"
152
+ v-model="item.f_material_code"
153
+ :value.sync="item.f_material_code"
154
+ />
155
+ </div>
156
+ </div>
157
+
158
+ <div class="form-group col-sm-6">
159
+ <label class="col-sm-4 control-label">用户编号:</label>
160
+ <div class="col-sm-8">
161
+ <input class="form-control input_view" style=""
162
+ placeholder="用户编号"
163
+ v-model="item.f_userinfo_code"
164
+ :value.sync="item.f_userinfo_code"
165
+ />
166
+ </div>
167
+ </div>
168
+
169
+ </div>
170
+
171
+ </article>
172
+ <footer slot="modal-footer" class="modal-footer">
173
+ <template v-if="mark !== 1">
174
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
175
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
176
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
177
+ </template>
178
+ </footer>
179
+ </modal>
180
+ </div>
181
+ </template>
182
+
183
+ <script>
184
+ import {HttpResetClass} from 'vue-client'
185
+ import Vue from "vue";
186
+ export default {
187
+ name: 'addMaterialScience',
188
+ props: {
189
+ selectdata: {
190
+ type: Object
191
+ },
192
+ mark: {
193
+ type: Number,
194
+ default: 0
195
+ }
196
+ },
197
+ data () {
198
+ return {
199
+ showFile: false,
200
+ onetomany: {
201
+ rows: []
202
+ },
203
+ title:'新增',
204
+ showMaterialModal:false,
205
+ materials:[
206
+ {
207
+ material:'',
208
+ f_material_name:'',
209
+ f_material_style:'',
210
+ f_material_unit:'',
211
+ f_material_number:'',
212
+ f_bjq_sid:'',
213
+ f_material_code:'',
214
+ f_userinfo_code:''
215
+ }
216
+ ],
217
+ meterialOptions:[],
218
+ row:{},
219
+ bjqChecklag:[]
220
+ }
221
+ },
222
+ ready(){
223
+ this.getOnetoManyData()
224
+ },
225
+ methods: {
226
+ async getOnetoManyData () {
227
+ let data = {
228
+ tablename: `t_material_apply`,
229
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
230
+ }
231
+ let res = await this.$resetpost(
232
+ 'rs/sql/singleTable',
233
+ {data: data},
234
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
235
+ )
236
+ this.onetomany.rows = res.data
237
+ },
238
+ async openMaterialModal () {
239
+ this.getMateralNames()
240
+ this.title = '新增'
241
+ this.materials = [
242
+ {
243
+ material:'',
244
+ f_material_name:'',
245
+ f_material_style:'',
246
+ f_material_unit:'',
247
+ f_material_number:'',
248
+ f_bjq_sid:'',
249
+ f_material_code:'',
250
+ f_userinfo_code:''
251
+ }
252
+ ],
253
+ this.showMaterialModal = true
254
+ },
255
+ closeFile() {
256
+ this.showWork = false
257
+ this.showFile = false
258
+ // 将选的文件清空
259
+ this.$refs.file.$el.querySelector('input').value = ''
260
+ this.search()
261
+ },
262
+ deleteDevicesinfo (index) {
263
+ this.materials.splice(index, 1)
264
+ },
265
+ pushMaterial () {
266
+ this.materials.push({
267
+ material:'',
268
+ f_material_name:'',
269
+ f_material_style:'',
270
+ f_material_unit:'',
271
+ f_material_number:'',
272
+ f_bjq_sid:'',
273
+ f_material_code:'',
274
+ f_userinfo_code:''
275
+ })
276
+ },
277
+ // 获取模态框材料
278
+ async getMateralNames () {
279
+ let data = {
280
+ condition: `1=1`
281
+ }
282
+ let http = new HttpResetClass()
283
+ let res = await http.load(
284
+ 'POST',
285
+ `rs/sql/getStockMaterial`,
286
+ {data: data},
287
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
288
+ )
289
+
290
+ this.meterialOptions = res.data.map(item => {
291
+ return {
292
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
293
+ 'value': item
294
+ }
295
+ })
296
+ },
297
+ modifyOtherValue (index){
298
+ console.log("进来了",index)
299
+ console.log("dddd",this.materials[index].material)
300
+ let material = this.materials[index].material
301
+ this.materials[index].f_material_name = material.f_material_name
302
+ this.materials[index].f_material_style = material.f_material_style
303
+ this.materials[index].f_material_unit = material.f_material_unit
304
+ this.materials[index].f_material_number = material.f_material_number
305
+ this.materials[index].f_material_code = material.f_material_code
306
+ this.materials[index].f_userinfo_code = material.f_userinfo_code
307
+ },
308
+ // 新增材料
309
+ async addMaterial () {
310
+ console.log("登录信息:",this.$login.f)
311
+ this.title = '新增'
312
+ let data = {
313
+ f_process_id : this.selectdata.f_process_id,
314
+ f_operator_id: this.$login.f.id,
315
+ f_operator: this.$login.f.name,
316
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
317
+ f_orgid: this.$login.f.orgid,
318
+ f_orgname: this.$login.f.orgs,
319
+ materials:this.materials
320
+ }
321
+ //报警器流程 设备编号检验
322
+ await this.bjqCheck()
323
+ console.log("这是bjqChecklag数据:",this.bjqChecklag)
324
+ if (this.bjqChecklag.length > 0){
325
+ return
326
+ }
327
+ let res = await this.$resetpost(
328
+ `rs/logic/saveMaterials`,
329
+ data
330
+ )
331
+ this.closeMaterials()
332
+ },
333
+ async deleteMaterial (row) {
334
+ var show1 = window.confirm('您确定要删除这条记录吗?')
335
+ if(show1 != true){
336
+ this.closeMaterials()
337
+ }else{
338
+ debugger
339
+ let http = new HttpResetClass()
340
+ let res = await http.load(
341
+ 'POST',
342
+ `rs/logic/deleteMaterial`,
343
+ {data: row},
344
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
345
+ )
346
+ this.closeMaterials()
347
+ }
348
+
349
+ },
350
+ async updateMaterial (index,row) {
351
+ this.title = '修改'
352
+ this.row = row
353
+ this.getMateralNames()
354
+ this.materials = [
355
+ {
356
+ material:'',
357
+ f_material_name:row.f_material_name,
358
+ f_material_style:row.f_material_style,
359
+ f_material_unit:row.f_material_unit,
360
+ f_material_number:row.f_material_number,
361
+ f_material_code:row.f_material_code,
362
+ f_userinfo_code:row.f_userinfo_code,
363
+ f_bjq_sid: row.f_bjq_sid
364
+ }
365
+ ]
366
+ this.showMaterialModal = true
367
+ },
368
+ async updateConfirm () {
369
+ let data = this.row
370
+ data.f_material_name = this.materials[0].f_material_name
371
+ data.f_material_style = this.materials[0].f_material_style
372
+ data.f_material_unit = this.materials[0].f_material_unit
373
+ data.f_material_number = this.materials[0].f_material_number
374
+ data.f_material_code = this.materials[0].f_material_code
375
+ data.f_bjq_sid = this.materials[0].f_bjq_sid
376
+ data.f_userinfo_code = this.materials[0].f_userinfo_code
377
+ //报警器流程 设备编号检验
378
+ await this.bjqCheck()
379
+ if (this.bjqChecklag.length > 0){
380
+ return
381
+ }
382
+ let res = await this.$resetpost(
383
+ `rs/entity/t_material_apply`,
384
+ data
385
+ )
386
+ this.closeMaterials()
387
+ },
388
+ sycronizedCode(index,val){
389
+ console.log("看看:",index,val)
390
+ this.materials[index].f_material_code = val
391
+ },
392
+ closeMaterials () {
393
+ this.getOnetoManyData()
394
+ this.showMaterialModal = false
395
+ },
396
+ async bjqCheck(){
397
+ //报警器设备型号校验
398
+ this.bjqChecklag = [] //初始化
399
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
400
+ let bjqinfo = {
401
+ f_material_name : "",
402
+ f_bjq_sid: ""
403
+ }
404
+ for (const bjqinfoElement of this.materials) {
405
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
406
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
407
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
408
+ let http = new HttpResetClass()
409
+ let res = await http.load(
410
+ 'POST',
411
+ // `/rs/logic/bjqcheck`,
412
+ `ncc/rs/logic/bjqcheck`,
413
+ bjqinfo
414
+ )
415
+ if (res.data.code != 200){
416
+ this.bjqChecklag.push(res.data.code)
417
+ // this.$showMessage(res.data.msg)
418
+ Vue.showAlert(res.data.msg, 'danger', 6000)
419
+ return
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ },
426
+ events: {
427
+ 'beforeFileUpload' (file) {
428
+ this.showWork = true
429
+ },
430
+ async 'onFileUpload'(file, result) {
431
+ let data = {
432
+ selectdata: this.selectdata,
433
+ filepath: result.f_downloadpath,
434
+ user: this.$login.f
435
+ }
436
+ try {
437
+ let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
438
+ resolveMsg: null,
439
+ rejectMsg: '导入失败!!!',
440
+ silent: true
441
+ }, 0)
442
+ } catch (e) {
443
+ this.closeFile()
444
+ }
445
+ this.$dispatch('breakControl', this.selectdata)
446
+ }
447
+ },
448
+ }
449
+
450
+ </script>
451
+
452
+ <style scoped>
453
+
454
+ </style>