apply-clients 3.4.63 → 3.4.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/build/dev-server.js +119 -119
  2. package/dist-android/static/18.js +2 -2
  3. package/dist-android/static/18.js.map +1 -1
  4. package/dist-android/static/19.js +2 -2
  5. package/dist-android/static/19.js.map +1 -1
  6. package/dist-android/static/24.js +2 -2
  7. package/dist-android/static/24.js.map +1 -1
  8. package/dist-android/static/25.js +2 -2
  9. package/dist-android/static/25.js.map +1 -1
  10. package/dist-android/static/26.js +2 -2
  11. package/dist-android/static/26.js.map +1 -1
  12. package/dist-android/static/28.js +2 -2
  13. package/dist-android/static/28.js.map +1 -1
  14. package/dist-android/static/30.js +2 -2
  15. package/dist-android/static/30.js.map +1 -1
  16. package/dist-android/static/34.js +2 -2
  17. package/dist-android/static/34.js.map +1 -1
  18. package/dist-android/static/43.js +2 -2
  19. package/dist-android/static/43.js.map +1 -1
  20. package/dist-android/static/47.js +2 -2
  21. package/dist-android/static/47.js.map +1 -1
  22. package/dist-android/static/50.js +2 -2
  23. package/dist-android/static/50.js.map +1 -1
  24. package/dist-android/static/52.js +2 -2
  25. package/dist-android/static/52.js.map +1 -1
  26. package/dist-android/static/53.js +2 -2
  27. package/dist-android/static/53.js.map +1 -1
  28. package/dist-android/static/54.js +2 -2
  29. package/dist-android/static/54.js.map +1 -1
  30. package/dist-android/static/60.js +2 -2
  31. package/dist-android/static/60.js.map +1 -1
  32. package/dist-android/static/63.js +2 -2
  33. package/dist-android/static/63.js.map +1 -1
  34. package/dist-android/static/64.js +2 -2
  35. package/dist-android/static/64.js.map +1 -1
  36. package/dist-android/static/78.js +2 -2
  37. package/dist-android/static/78.js.map +1 -1
  38. package/dist-android/static/83.js +2 -2
  39. package/dist-android/static/83.js.map +1 -1
  40. package/dist-android/static/84.js +2 -2
  41. package/dist-android/static/84.js.map +1 -1
  42. package/dist-android/static/86.js +2 -2
  43. package/dist-android/static/86.js.map +1 -1
  44. package/dist-android/static/87.js +2 -2
  45. package/dist-android/static/87.js.map +1 -1
  46. package/dist-android/static/89.js +2 -2
  47. package/dist-android/static/89.js.map +1 -1
  48. package/dist-android/static/97.js +2 -2
  49. package/dist-android/static/97.js.map +1 -1
  50. package/dist-android/static/app.js +80 -80
  51. package/dist-android/static/app.js.map +1 -1
  52. package/dist.7z +0 -0
  53. package/package.json +1 -1
  54. package/src/components/android/AppSign.vue +154 -154
  55. package/src/components/android/AppTakePic.vue +143 -143
  56. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
  57. package/src/components/android/Process/AppServiceControl.vue +1708 -1708
  58. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -477
  59. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -519
  60. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  61. package/src/components/android/Supervisory/AppSupervisoryCart.vue +156 -156
  62. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -537
  63. package/src/components/product/ApplyCharge/ApplyChargeList.vue +470 -470
  64. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -445
  65. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -454
  66. package/src/components/product/Process/Processes/chargeManagement.vue +656 -656
  67. package/src/components/product/Process/Processes/devicesManagement.vue +484 -484
  68. package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
  69. package/src/components/product/Process/Service/ServiceControl.vue +18 -41
  70. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  71. package/src/components/product/Process/ShowBackReason.vue +33 -33
  72. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +882 -882
  73. package/src/components/product/VueUtils/ApplyUpload.vue +287 -287
  74. package/src/filiale/gehua/pc/ServiceControl.vue +1938 -1938
  75. package/src/filiale/gehua/pc/SupervisoryServiceControl.vue +890 -890
  76. package/src/filiale/guangxi/android/Process/Processes/AppAddMaterialScience.vue +520 -520
  77. package/src/filiale/guangxi/android/Process/Processes/AppDevicesManagement.vue +519 -519
  78. package/src/filiale/guangxi/android/Process/Processes/AppServiceControl.vue +1708 -1708
  79. package/src/filiale/guangxi/android/Process/Processes/AppSupplementalAgreement.vue +298 -298
  80. package/src/filiale/guangxi/pc/ApplyCharge/ApplyChargeList.vue +470 -470
  81. package/src/filiale/guangxi/pc/ApplyCharge/chargeManagement.vue +724 -724
  82. package/src/filiale/guangxi/pc/Process/Service/ServiceControl.vue +1922 -1922
  83. package/src/filiale/guangxi/pc/Process/Service/ShowBackReason.vue +33 -33
  84. package/src/filiale/guangxi/pc/Process/Service/SupervisoryServiceControl.vue +891 -891
  85. package/src/filiale/guangxi/pc/Process/Service/addMaterialScience.vue +517 -517
  86. package/src/filiale/guangxi/pc/Process/ShowBackReason.vue +33 -33
  87. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -735
  88. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  89. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  90. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  91. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  92. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  93. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -621
  94. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1108
@@ -1,520 +1,520 @@
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">材料总金额:{{$parent.$parent.summoney}}</th>
14
- <th class="textNoLineBreak" v-if="$parent.$parent.selectdata.defname=='通气点火'">点火材料金额:{{$parent.$parent.twomoney}}</th>
15
- <th class="textNoLineBreak">
16
- <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
17
- </button>
18
- </th>
19
- </tr>
20
- </template>
21
- <template partial='body'>
22
- <tr>
23
- <td style="text-align: center;">
24
- <nobr>{{$index+1}}</nobr>
25
- </td>
26
- <td style="text-align: center;">
27
- <nobr>{{row.f_material_name}}</nobr>
28
- </td>
29
- <td style="text-align: center;">
30
- <nobr>{{row.f_material_unit}}</nobr>
31
- </td>
32
- <td style="text-align: center;">
33
- <nobr>{{row.f_material_price}}</nobr>
34
- </td>
35
- <td style="text-align: center;">
36
- <nobr>{{row.f_material_number}}</nobr>
37
- </td>
38
- <td style="text-align: center;">
39
- <nobr>{{row.f_material_money}}</nobr>
40
- </td>
41
- <td style="text-align: center;">
42
- <nobr>{{row.f_material_remarks}}</nobr>
43
- </td>
44
- <td style="text-align: center;">
45
- <!-- <button type="button" class="button_search button_spacing"-->
46
- <!-- @click="$parent.$parent.updateMaterial($index,row)">修改-->
47
- <!-- </button>-->
48
- <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
49
- </button>
50
- </td>
51
- </tr>
52
- </template>
53
- </data-grid>
54
- <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
55
- :backdrop="false" :title="title">
56
- <header slot="modal-header" class="modal-header">
57
- <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
58
- <h4 class="modal-title">{{title}}</h4>
59
- </header>
60
- <article slot="modal-body" class="modal-body clearfix">
61
- <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
62
- <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
63
- <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
64
- <div class="col-sm-6 text-right">
65
- <button
66
- class="button_delete button_spacing"
67
- @click.prevent="deleteDevicesinfo(i)"
68
- v-if="title === '新增'"
69
- >删除
70
- </button>
71
- </div>
72
- </div>
73
- <div class="form-group col-sm-6">
74
- <label class="col-sm-4 control-label">选择材料:</label>
75
- <div class="col-sm-8">
76
- <input-select
77
- class="select select_list"
78
- :value.sync="item.material"
79
- v-model="item.material"
80
- :options="meterialOptions"
81
- :disable="mark === 1"
82
- @change="modifyOtherValue(i)"
83
- :valueSingle="true"></input-select>
84
- </div>
85
- </div>
86
- <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
87
- <label class="col-sm-4 control-label">材料名称:</label>
88
- <div class="col-sm-8">
89
- <input class="form-control input_view" style="" type="text"
90
- placeholder="材料名称"
91
- v-model="item.f_material_name"
92
- :value="item.f_material_name"
93
- />
94
- </div>
95
- </div>
96
- <div class="form-group col-sm-6" :class="[item.f_material_price ? '' : 'has-error']">
97
- <label class="col-sm-4 control-label">材料单价:</label>
98
- <div class="col-sm-8">
99
- <input class="form-control input_view" style="" type="text"
100
- placeholder="材料单价"
101
- v-model="item.f_material_price"
102
- :value="item.f_material_price"
103
- />
104
- </div>
105
- </div>
106
- <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
107
- <label class="col-sm-4 control-label">材料单位:</label>
108
- <div class="col-sm-8">
109
- <input class="form-control input_view" style="" type="text"
110
- placeholder="材料单位"
111
- v-model="item.f_material_unit"
112
- :value="item.f_material_unit"
113
- />
114
- </div>
115
- </div>
116
- <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
117
- <label class="col-sm-4 control-label">材料数量:</label>
118
- <div class="col-sm-8">
119
- <input class="form-control input_view" style="" type="number"
120
- placeholder="设备数量"
121
- v-model="item.f_material_number"
122
- :value="item.f_material_number"
123
- @change="sumMaterialmoney(i)"
124
- />
125
- </div>
126
- </div>
127
- <div class="form-group col-sm-6">
128
- <label class="col-sm-4 control-label">材料金额:</label>
129
- <div class="col-sm-8">
130
- <input class="form-control input_view" style="" type="text"
131
- placeholder="材料金额"
132
- v-model="item.f_material_money"
133
- :value="item.f_material_money"
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=""
141
- placeholder="材料备注"
142
- v-model="item.f_material_remarks"
143
- :value.sync="item.f_material_remarks"
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
-
151
- </div>
152
- </div>
153
- <div class="form-group col-sm-6">
154
- <label class="col-sm-4 control-label"></label>
155
- <div class="col-sm-8">
156
-
157
- </div>
158
- </div>
159
- <div class="form-group col-sm-6">
160
- <label class="col-sm-4 control-label"></label>
161
- <div class="col-sm-8">
162
-
163
- </div>
164
- </div>
165
- <div class="form-group col-sm-6">
166
- <label class="col-sm-4 control-label"></label>
167
- <div class="col-sm-8">
168
-
169
- </div>
170
- </div>
171
- <div class="form-group col-sm-6">
172
- <label class="col-sm-4 control-label"></label>
173
- <div class="col-sm-8">
174
-
175
- </div>
176
- </div>
177
- <div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
178
- <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
179
- </div>
180
- </div>
181
- </article>
182
- <footer slot="modal-footer" class="modal-footer">
183
- <template v-if="mark !== 1">
184
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
185
- <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
186
- :disabled="!$v.valid">确认添加
187
- </button>
188
- <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
189
- :disabled="!$v.valid">确认修改
190
- </button>
191
- </template>
192
- </footer>
193
- </modal>
194
- </div>
195
- </template>
196
-
197
- <script>
198
- import Vue from 'vue'
199
- import {HttpResetClass} from 'vue-client'
200
-
201
- export default {
202
- name: 'addMaterialScience',
203
- props: {
204
- selectdata: {
205
- type: Object
206
- }
207
- },
208
- data() {
209
- return {
210
- onetomany: {
211
- rows: []
212
- },
213
- title: '新增',
214
- showMaterialModal: false,
215
- materials: [
216
- {
217
- material:'',
218
- f_material_name:'',
219
- f_material_unit:'',
220
- f_material_price:'',
221
- f_material_number:'',
222
- f_material_money:'',
223
- f_material_remarks:''
224
- }
225
- ],
226
- summoney:0,
227
- twomoney:0,
228
- meterialOptions: [],
229
- row: {},
230
- bjqChecklag:[],
231
- fmaterialname:{},
232
- isShow:[false]
233
- }
234
- },
235
- ready() {
236
- this.getOnetoManyData()
237
- },
238
- methods: {
239
- sumMaterialzong(materials){
240
- debugger
241
- this.summoney=0
242
- for(var i=0;i<materials.length; i++){
243
- this.summoney =parseFloat(parseFloat(materials[i].f_material_money)+ parseFloat(this.summoney)).toFixed(2)
244
- }
245
- this.twomoney= parseFloat(parseFloat(this.summoney)- parseFloat(this.selectdata.f_sumtwo_money)).toFixed(2)
246
- console.log('打印材料总金额',this.summoney)
247
- if(this.selectdata.defname=='工程施工'){
248
- this.selectdata.f_sumtwo_money = this.summoney
249
- console.log('打印首次材料金额',this.selectdata.f_sumtwo_money)
250
- }
251
- },
252
- sumMaterialmoney(index){
253
- this.materials[index].f_material_money = this.materials[index].f_material_price * this.materials[index].f_material_number
254
- console.log('打印',this.materials[index].f_material_money)
255
- },
256
- async getOnetoManyData () {
257
- let http = new HttpResetClass()
258
- let data = {
259
- tablename: `t_material_detail`,
260
- condition: `f_process_id='${this.selectdata.f_process_id}'`
261
- }
262
- let res = await http.load(
263
- 'POST',
264
- `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable?aaa=123`,
265
- {data: data},
266
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
267
- )
268
- this.onetomany.rows = res.data
269
- this.sumMaterialzong(this.onetomany.rows)
270
- },
271
- async openMaterialModal() {
272
- this.getMateralNames()
273
- this.title = '新增'
274
- this.materials = [
275
- {
276
- material:'',
277
- f_material_name:'',
278
- f_material_unit:'',
279
- f_material_price:'',
280
- f_material_number:'',
281
- f_material_money:'',
282
- f_material_remarks:''
283
- }
284
- ],
285
- this.showMaterialModal = true
286
- this.isShow = [false]
287
- },
288
- deleteDevicesinfo(index) {
289
- this.materials.splice(index, 1)
290
- this.isShow.splice(index, 1)
291
- },
292
- pushMaterial() {
293
- this.materials.push({
294
- material:'',
295
- f_material_name:'',
296
- f_material_unit:'',
297
- f_material_price:'',
298
- f_material_number:'',
299
- f_material_money:'',
300
- f_material_remarks:''
301
- })
302
- this.isShow.push(false)
303
- },
304
- // 获取模态框材料
305
- async getMateralNames() {
306
- let data = {
307
- condition: `1=1`
308
- }
309
- let http = new HttpResetClass()
310
- let res = await http.load(
311
- 'POST',
312
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
313
- {data: data},
314
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
315
- )
316
-
317
- this.meterialOptions = res.data.map(item => {
318
- return {
319
- 'label': `${item.f_material_name}`,
320
- 'value': item
321
- }
322
- })
323
- },
324
- modifyOtherValue(index) {
325
- console.log("进来了", index)
326
- console.log("dddd", this.materials[index].material)
327
- let material = this.materials[index].material
328
- this.materials[index].f_material_name = material.f_material_name
329
- this.materials[index].f_material_unit = material.f_material_unit
330
- this.materials[index].f_material_price = material.f_material_price
331
- this.materials[index].f_material_number = material.f_material_number
332
- this.materials[index].f_material_money = material.f_material_money
333
- if (material.f_material_name === "报警器-汉威") {
334
- this.isShow[index] = true
335
- } else {
336
- this.isShow[index] = false
337
- }
338
- this.isShow.splice(0, 1, this.isShow[0])
339
- },
340
- // 新增材料
341
- async addMaterial() {
342
- this.title = '新增'
343
- var mater_Code=this.getProjectNum() + Math.floor(Math.random() * 10000)
344
- let data = {
345
- selectdata: this.selectdata,
346
- f_process_id: this.selectdata.f_process_id,
347
- f_operator_id: Vue.user.id,
348
- f_operator: Vue.user.name,
349
- f_department_name:Vue.user.f_department_name,
350
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
351
- f_orgid: Vue.user.orgid,
352
- f_orgname: Vue.user.orgs,
353
- f_material_code:mater_Code,
354
- materials: this.materials
355
- }
356
-
357
- //报警器流程 设备编号检验
358
- await this.bjqCheck()
359
- if (this.bjqChecklag.length > 0) {
360
- return
361
- }
362
-
363
- let http = new HttpResetClass()
364
- let res = await http.load(
365
- 'POST',
366
- `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
367
- data
368
- )
369
- if(res.data == 200){
370
- this.contractMoney = 0
371
- for(var i=0;i<this.materials.length; i++){
372
- this.contractMoney =parseFloat(parseFloat(this.materials[i].f_material_money)+ parseFloat(this.contractMoney)).toFixed(2)
373
- }
374
- let contractbu={
375
- f_process_id :this.selectdata.f_process_id,//项目节点编号
376
- f_apply_num : this.selectdata.f_apply_num, //项目编号
377
- f_contract_number:mater_Code, //协议编号
378
- f_contract_type: '材料代购', //协议类型
379
- f_contract_money:this.contractMoney , //协议金额
380
- f_contract_time:new Date().Format('yyyy-MM-dd HH:mm:ss'),//协议创造时间
381
- f_contract_status: '有效', //协议是否有效
382
- f_remarks :'材料代购', //备注
383
- f_operator:this.$login.f.name, //操作人
384
- f_date :new Date().Format('yyyy-MM-dd HH:mm:ss'),//操作时间
385
- f_department : this.$login.f.f_department_name, //部门
386
- f_filiale :this.$login.f.orgs //组织名称
387
- }
388
- let data1 ={
389
- contract:contractbu
390
- }
391
- let http1 = new HttpResetClass()
392
- let res = await http1.load(
393
- 'POST',
394
- `${this.$androidUtil.getProxyUrl()}/rs/logic/NewAddMaterContract`,
395
- {data: data1},
396
- {resolveMsg: null, rejectMsg: '补充协议成功!!!'}
397
- )
398
- this.closeMaterials()
399
- }
400
- },
401
- getProjectNum () {
402
- const projectTime = new Date() // 当前中国标准时间
403
- const Year = projectTime.getFullYear() // 获取当前年份 支持IE和火狐浏览器.
404
- const Month = projectTime.getMonth() + 1 // 获取中国区月份
405
- const Day = projectTime.getDate() // 获取几号
406
- var CurrentDate = Year
407
- if (Month >= 10) { // 判断月份和几号是否大于10或者小于10
408
- CurrentDate += Month
409
- } else {
410
- CurrentDate += '0' + Month
411
- }
412
- if (Day >= 10) {
413
- CurrentDate += Day
414
- } else {
415
- CurrentDate += '0' + Day
416
- }
417
- return CurrentDate
418
- },
419
- async deleteMaterial(row) {
420
- debugger
421
- var show1 = window.confirm('您确定要删除这条记录吗?')
422
- if(show1 != true){
423
- this.closeMaterials()
424
- }else{
425
- let http = new HttpResetClass()
426
- let res = await http.load(
427
- 'POST',
428
- `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
429
- {data: row},
430
- {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
431
- )
432
- this.closeMaterials()
433
- }
434
- }
435
- ,
436
- async updateMaterial(index, row) {
437
- this.title = '修改'
438
- this.row = row
439
- this.getMateralNames()
440
- this.materials = [
441
- {
442
- material: '',
443
- f_material_name:row.f_material_name,
444
- f_material_unit:row.f_material_unit,
445
- f_material_price:row.f_material_price,
446
- f_material_number:row.f_material_number,
447
- f_material_money:row.f_material_money,
448
- f_material_remarks: row.f_material_remarks
449
- }
450
- ]
451
- this.showMaterialModal = true
452
- },
453
- async updateConfirm() {
454
- let data = this.row
455
- data.f_material_name = this.materials[0].f_material_name
456
- data.f_material_unit = this.materials[0].f_material_unit
457
- data.f_material_price = this.materials[0].f_material_price
458
- data.f_material_number = this.materials[0].f_material_number
459
- data.f_material_money = this.materials[0].f_material_money
460
- data.f_material_remarks = this.materials[0].f_material_remarks
461
-
462
- //报警器流程 设备编号检验
463
- await this.bjqCheck()
464
- if (this.bjqChecklag.length > 0){
465
- return
466
- }
467
-
468
- let http = new HttpResetClass()
469
- let res = await http.load(
470
- 'POST',
471
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_detail`,
472
- data
473
- )
474
- this.closeMaterials()
475
- },
476
- sycronizedCode(index,val){
477
- console.log("看看:",index,val)
478
- this.materials[index].f_material_code = val
479
- },
480
- closeMaterials() {
481
- this.getOnetoManyData()
482
- this.showMaterialModal = false
483
- },
484
- async bjqCheck(){
485
- //报警器设备型号校验
486
- this.bjqChecklag = [] //初始化
487
- if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
488
- let bjqinfo = {
489
- f_material_name : "",
490
- f_bjq_sid: ""
491
- }
492
- for (const bjqinfoElement of this.materials) {
493
- bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
494
- bjqinfo.f_material_name = bjqinfoElement.f_material_name
495
- if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
496
- let http = new HttpResetClass()
497
- let res = await http.load(
498
- 'POST',
499
- // `/rs/logic/bjqcheck`,
500
- `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
501
- bjqinfo
502
- )
503
- if (res.data.code != 200){
504
- this.bjqChecklag.push(res.data.code)
505
- //this.$showMessage(res.data.msg)
506
- Vue.showAlert(res.data.msg, 'danger', 6000)
507
- return
508
- }
509
- }
510
- }
511
- }
512
- }
513
- }
514
- }
515
-
516
- </script>
517
-
518
- <style scoped>
519
-
520
- </style>
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">材料总金额:{{$parent.$parent.summoney}}</th>
14
+ <th class="textNoLineBreak" v-if="$parent.$parent.selectdata.defname=='通气点火'">点火材料金额:{{$parent.$parent.twomoney}}</th>
15
+ <th class="textNoLineBreak">
16
+ <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
17
+ </button>
18
+ </th>
19
+ </tr>
20
+ </template>
21
+ <template partial='body'>
22
+ <tr>
23
+ <td style="text-align: center;">
24
+ <nobr>{{$index+1}}</nobr>
25
+ </td>
26
+ <td style="text-align: center;">
27
+ <nobr>{{row.f_material_name}}</nobr>
28
+ </td>
29
+ <td style="text-align: center;">
30
+ <nobr>{{row.f_material_unit}}</nobr>
31
+ </td>
32
+ <td style="text-align: center;">
33
+ <nobr>{{row.f_material_price}}</nobr>
34
+ </td>
35
+ <td style="text-align: center;">
36
+ <nobr>{{row.f_material_number}}</nobr>
37
+ </td>
38
+ <td style="text-align: center;">
39
+ <nobr>{{row.f_material_money}}</nobr>
40
+ </td>
41
+ <td style="text-align: center;">
42
+ <nobr>{{row.f_material_remarks}}</nobr>
43
+ </td>
44
+ <td style="text-align: center;">
45
+ <!-- <button type="button" class="button_search button_spacing"-->
46
+ <!-- @click="$parent.$parent.updateMaterial($index,row)">修改-->
47
+ <!-- </button>-->
48
+ <button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
49
+ </button>
50
+ </td>
51
+ </tr>
52
+ </template>
53
+ </data-grid>
54
+ <modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
55
+ :backdrop="false" :title="title">
56
+ <header slot="modal-header" class="modal-header">
57
+ <button type="button" class="close" @click="closeMaterials"><span>&times;</span></button>
58
+ <h4 class="modal-title">{{title}}</h4>
59
+ </header>
60
+ <article slot="modal-body" class="modal-body clearfix">
61
+ <div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
62
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
63
+ <div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
64
+ <div class="col-sm-6 text-right">
65
+ <button
66
+ class="button_delete button_spacing"
67
+ @click.prevent="deleteDevicesinfo(i)"
68
+ v-if="title === '新增'"
69
+ >删除
70
+ </button>
71
+ </div>
72
+ </div>
73
+ <div class="form-group col-sm-6">
74
+ <label class="col-sm-4 control-label">选择材料:</label>
75
+ <div class="col-sm-8">
76
+ <input-select
77
+ class="select select_list"
78
+ :value.sync="item.material"
79
+ v-model="item.material"
80
+ :options="meterialOptions"
81
+ :disable="mark === 1"
82
+ @change="modifyOtherValue(i)"
83
+ :valueSingle="true"></input-select>
84
+ </div>
85
+ </div>
86
+ <div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
87
+ <label class="col-sm-4 control-label">材料名称:</label>
88
+ <div class="col-sm-8">
89
+ <input class="form-control input_view" style="" type="text"
90
+ placeholder="材料名称"
91
+ v-model="item.f_material_name"
92
+ :value="item.f_material_name"
93
+ />
94
+ </div>
95
+ </div>
96
+ <div class="form-group col-sm-6" :class="[item.f_material_price ? '' : 'has-error']">
97
+ <label class="col-sm-4 control-label">材料单价:</label>
98
+ <div class="col-sm-8">
99
+ <input class="form-control input_view" style="" type="text"
100
+ placeholder="材料单价"
101
+ v-model="item.f_material_price"
102
+ :value="item.f_material_price"
103
+ />
104
+ </div>
105
+ </div>
106
+ <div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
107
+ <label class="col-sm-4 control-label">材料单位:</label>
108
+ <div class="col-sm-8">
109
+ <input class="form-control input_view" style="" type="text"
110
+ placeholder="材料单位"
111
+ v-model="item.f_material_unit"
112
+ :value="item.f_material_unit"
113
+ />
114
+ </div>
115
+ </div>
116
+ <div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
117
+ <label class="col-sm-4 control-label">材料数量:</label>
118
+ <div class="col-sm-8">
119
+ <input class="form-control input_view" style="" type="number"
120
+ placeholder="设备数量"
121
+ v-model="item.f_material_number"
122
+ :value="item.f_material_number"
123
+ @change="sumMaterialmoney(i)"
124
+ />
125
+ </div>
126
+ </div>
127
+ <div class="form-group col-sm-6">
128
+ <label class="col-sm-4 control-label">材料金额:</label>
129
+ <div class="col-sm-8">
130
+ <input class="form-control input_view" style="" type="text"
131
+ placeholder="材料金额"
132
+ v-model="item.f_material_money"
133
+ :value="item.f_material_money"
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=""
141
+ placeholder="材料备注"
142
+ v-model="item.f_material_remarks"
143
+ :value.sync="item.f_material_remarks"
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
+
151
+ </div>
152
+ </div>
153
+ <div class="form-group col-sm-6">
154
+ <label class="col-sm-4 control-label"></label>
155
+ <div class="col-sm-8">
156
+
157
+ </div>
158
+ </div>
159
+ <div class="form-group col-sm-6">
160
+ <label class="col-sm-4 control-label"></label>
161
+ <div class="col-sm-8">
162
+
163
+ </div>
164
+ </div>
165
+ <div class="form-group col-sm-6">
166
+ <label class="col-sm-4 control-label"></label>
167
+ <div class="col-sm-8">
168
+
169
+ </div>
170
+ </div>
171
+ <div class="form-group col-sm-6">
172
+ <label class="col-sm-4 control-label"></label>
173
+ <div class="col-sm-8">
174
+
175
+ </div>
176
+ </div>
177
+ <div v-if=" (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建')">
178
+ <app-qrcode-reader :istype = fmaterialname :index = i v-show="isShow[i]"></app-qrcode-reader>
179
+ </div>
180
+ </div>
181
+ </article>
182
+ <footer slot="modal-footer" class="modal-footer">
183
+ <template v-if="mark !== 1">
184
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
185
+ <button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
186
+ :disabled="!$v.valid">确认添加
187
+ </button>
188
+ <button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
189
+ :disabled="!$v.valid">确认修改
190
+ </button>
191
+ </template>
192
+ </footer>
193
+ </modal>
194
+ </div>
195
+ </template>
196
+
197
+ <script>
198
+ import Vue from 'vue'
199
+ import {HttpResetClass} from 'vue-client'
200
+
201
+ export default {
202
+ name: 'addMaterialScience',
203
+ props: {
204
+ selectdata: {
205
+ type: Object
206
+ }
207
+ },
208
+ data() {
209
+ return {
210
+ onetomany: {
211
+ rows: []
212
+ },
213
+ title: '新增',
214
+ showMaterialModal: false,
215
+ materials: [
216
+ {
217
+ material:'',
218
+ f_material_name:'',
219
+ f_material_unit:'',
220
+ f_material_price:'',
221
+ f_material_number:'',
222
+ f_material_money:'',
223
+ f_material_remarks:''
224
+ }
225
+ ],
226
+ summoney:0,
227
+ twomoney:0,
228
+ meterialOptions: [],
229
+ row: {},
230
+ bjqChecklag:[],
231
+ fmaterialname:{},
232
+ isShow:[false]
233
+ }
234
+ },
235
+ ready() {
236
+ this.getOnetoManyData()
237
+ },
238
+ methods: {
239
+ sumMaterialzong(materials){
240
+ debugger
241
+ this.summoney=0
242
+ for(var i=0;i<materials.length; i++){
243
+ this.summoney =parseFloat(parseFloat(materials[i].f_material_money)+ parseFloat(this.summoney)).toFixed(2)
244
+ }
245
+ this.twomoney= parseFloat(parseFloat(this.summoney)- parseFloat(this.selectdata.f_sumtwo_money)).toFixed(2)
246
+ console.log('打印材料总金额',this.summoney)
247
+ if(this.selectdata.defname=='工程施工'){
248
+ this.selectdata.f_sumtwo_money = this.summoney
249
+ console.log('打印首次材料金额',this.selectdata.f_sumtwo_money)
250
+ }
251
+ },
252
+ sumMaterialmoney(index){
253
+ this.materials[index].f_material_money = this.materials[index].f_material_price * this.materials[index].f_material_number
254
+ console.log('打印',this.materials[index].f_material_money)
255
+ },
256
+ async getOnetoManyData () {
257
+ let http = new HttpResetClass()
258
+ let data = {
259
+ tablename: `t_material_detail`,
260
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
261
+ }
262
+ let res = await http.load(
263
+ 'POST',
264
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
265
+ {data: data},
266
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
267
+ )
268
+ this.onetomany.rows = res.data
269
+ this.sumMaterialzong(this.onetomany.rows)
270
+ },
271
+ async openMaterialModal() {
272
+ this.getMateralNames()
273
+ this.title = '新增'
274
+ this.materials = [
275
+ {
276
+ material:'',
277
+ f_material_name:'',
278
+ f_material_unit:'',
279
+ f_material_price:'',
280
+ f_material_number:'',
281
+ f_material_money:'',
282
+ f_material_remarks:''
283
+ }
284
+ ],
285
+ this.showMaterialModal = true
286
+ this.isShow = [false]
287
+ },
288
+ deleteDevicesinfo(index) {
289
+ this.materials.splice(index, 1)
290
+ this.isShow.splice(index, 1)
291
+ },
292
+ pushMaterial() {
293
+ this.materials.push({
294
+ material:'',
295
+ f_material_name:'',
296
+ f_material_unit:'',
297
+ f_material_price:'',
298
+ f_material_number:'',
299
+ f_material_money:'',
300
+ f_material_remarks:''
301
+ })
302
+ this.isShow.push(false)
303
+ },
304
+ // 获取模态框材料
305
+ async getMateralNames() {
306
+ let data = {
307
+ condition: `1=1`
308
+ }
309
+ let http = new HttpResetClass()
310
+ let res = await http.load(
311
+ 'POST',
312
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
313
+ {data: data},
314
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
315
+ )
316
+
317
+ this.meterialOptions = res.data.map(item => {
318
+ return {
319
+ 'label': `${item.f_material_name}`,
320
+ 'value': item
321
+ }
322
+ })
323
+ },
324
+ modifyOtherValue(index) {
325
+ console.log("进来了", index)
326
+ console.log("dddd", this.materials[index].material)
327
+ let material = this.materials[index].material
328
+ this.materials[index].f_material_name = material.f_material_name
329
+ this.materials[index].f_material_unit = material.f_material_unit
330
+ this.materials[index].f_material_price = material.f_material_price
331
+ this.materials[index].f_material_number = material.f_material_number
332
+ this.materials[index].f_material_money = material.f_material_money
333
+ if (material.f_material_name === "报警器-汉威") {
334
+ this.isShow[index] = true
335
+ } else {
336
+ this.isShow[index] = false
337
+ }
338
+ this.isShow.splice(0, 1, this.isShow[0])
339
+ },
340
+ // 新增材料
341
+ async addMaterial() {
342
+ this.title = '新增'
343
+ var mater_Code=this.getProjectNum() + Math.floor(Math.random() * 10000)
344
+ let data = {
345
+ selectdata: this.selectdata,
346
+ f_process_id: this.selectdata.f_process_id,
347
+ f_operator_id: Vue.user.id,
348
+ f_operator: Vue.user.name,
349
+ f_department_name:Vue.user.f_department_name,
350
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
351
+ f_orgid: Vue.user.orgid,
352
+ f_orgname: Vue.user.orgs,
353
+ f_material_code:mater_Code,
354
+ materials: this.materials
355
+ }
356
+
357
+ //报警器流程 设备编号检验
358
+ await this.bjqCheck()
359
+ if (this.bjqChecklag.length > 0) {
360
+ return
361
+ }
362
+
363
+ let http = new HttpResetClass()
364
+ let res = await http.load(
365
+ 'POST',
366
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
367
+ data
368
+ )
369
+ if(res.data == 200){
370
+ this.contractMoney = 0
371
+ for(var i=0;i<this.materials.length; i++){
372
+ this.contractMoney =parseFloat(parseFloat(this.materials[i].f_material_money)+ parseFloat(this.contractMoney)).toFixed(2)
373
+ }
374
+ let contractbu={
375
+ f_process_id :this.selectdata.f_process_id,//项目节点编号
376
+ f_apply_num : this.selectdata.f_apply_num, //项目编号
377
+ f_contract_number:mater_Code, //协议编号
378
+ f_contract_type: '材料代购', //协议类型
379
+ f_contract_money:this.contractMoney , //协议金额
380
+ f_contract_time:new Date().Format('yyyy-MM-dd HH:mm:ss'),//协议创造时间
381
+ f_contract_status: '有效', //协议是否有效
382
+ f_remarks :'材料代购', //备注
383
+ f_operator:this.$login.f.name, //操作人
384
+ f_date :new Date().Format('yyyy-MM-dd HH:mm:ss'),//操作时间
385
+ f_department : this.$login.f.f_department_name, //部门
386
+ f_filiale :this.$login.f.orgs //组织名称
387
+ }
388
+ let data1 ={
389
+ contract:contractbu
390
+ }
391
+ let http1 = new HttpResetClass()
392
+ let res = await http1.load(
393
+ 'POST',
394
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/NewAddMaterContract`,
395
+ {data: data1},
396
+ {resolveMsg: null, rejectMsg: '补充协议成功!!!'}
397
+ )
398
+ this.closeMaterials()
399
+ }
400
+ },
401
+ getProjectNum () {
402
+ const projectTime = new Date() // 当前中国标准时间
403
+ const Year = projectTime.getFullYear() // 获取当前年份 支持IE和火狐浏览器.
404
+ const Month = projectTime.getMonth() + 1 // 获取中国区月份
405
+ const Day = projectTime.getDate() // 获取几号
406
+ var CurrentDate = Year
407
+ if (Month >= 10) { // 判断月份和几号是否大于10或者小于10
408
+ CurrentDate += Month
409
+ } else {
410
+ CurrentDate += '0' + Month
411
+ }
412
+ if (Day >= 10) {
413
+ CurrentDate += Day
414
+ } else {
415
+ CurrentDate += '0' + Day
416
+ }
417
+ return CurrentDate
418
+ },
419
+ async deleteMaterial(row) {
420
+ debugger
421
+ var show1 = window.confirm('您确定要删除这条记录吗?')
422
+ if(show1 != true){
423
+ this.closeMaterials()
424
+ }else{
425
+ let http = new HttpResetClass()
426
+ let res = await http.load(
427
+ 'POST',
428
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
429
+ {data: row},
430
+ {resolveMsg: null, rejectMsg: '材料删除失败!!!'}
431
+ )
432
+ this.closeMaterials()
433
+ }
434
+ }
435
+ ,
436
+ async updateMaterial(index, row) {
437
+ this.title = '修改'
438
+ this.row = row
439
+ this.getMateralNames()
440
+ this.materials = [
441
+ {
442
+ material: '',
443
+ f_material_name:row.f_material_name,
444
+ f_material_unit:row.f_material_unit,
445
+ f_material_price:row.f_material_price,
446
+ f_material_number:row.f_material_number,
447
+ f_material_money:row.f_material_money,
448
+ f_material_remarks: row.f_material_remarks
449
+ }
450
+ ]
451
+ this.showMaterialModal = true
452
+ },
453
+ async updateConfirm() {
454
+ let data = this.row
455
+ data.f_material_name = this.materials[0].f_material_name
456
+ data.f_material_unit = this.materials[0].f_material_unit
457
+ data.f_material_price = this.materials[0].f_material_price
458
+ data.f_material_number = this.materials[0].f_material_number
459
+ data.f_material_money = this.materials[0].f_material_money
460
+ data.f_material_remarks = this.materials[0].f_material_remarks
461
+
462
+ //报警器流程 设备编号检验
463
+ await this.bjqCheck()
464
+ if (this.bjqChecklag.length > 0){
465
+ return
466
+ }
467
+
468
+ let http = new HttpResetClass()
469
+ let res = await http.load(
470
+ 'POST',
471
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_detail`,
472
+ data
473
+ )
474
+ this.closeMaterials()
475
+ },
476
+ sycronizedCode(index,val){
477
+ console.log("看看:",index,val)
478
+ this.materials[index].f_material_code = val
479
+ },
480
+ closeMaterials() {
481
+ this.getOnetoManyData()
482
+ this.showMaterialModal = false
483
+ },
484
+ async bjqCheck(){
485
+ //报警器设备型号校验
486
+ this.bjqChecklag = [] //初始化
487
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
488
+ let bjqinfo = {
489
+ f_material_name : "",
490
+ f_bjq_sid: ""
491
+ }
492
+ for (const bjqinfoElement of this.materials) {
493
+ bjqinfo.f_bjq_sid = bjqinfoElement.f_bjq_sid
494
+ bjqinfo.f_material_name = bjqinfoElement.f_material_name
495
+ if (bjqinfo.f_material_name.substr(0,3) === '报警器'){
496
+ let http = new HttpResetClass()
497
+ let res = await http.load(
498
+ 'POST',
499
+ // `/rs/logic/bjqcheck`,
500
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqcheck`,
501
+ bjqinfo
502
+ )
503
+ if (res.data.code != 200){
504
+ this.bjqChecklag.push(res.data.code)
505
+ //this.$showMessage(res.data.msg)
506
+ Vue.showAlert(res.data.msg, 'danger', 6000)
507
+ return
508
+ }
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+
516
+ </script>
517
+
518
+ <style scoped>
519
+
520
+ </style>