apply-clients 3.0.2 → 3.0.5-2

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 (66) hide show
  1. package/dist.zip +0 -0
  2. package/index.html +1 -1
  3. package/package.json +4 -3
  4. package/src/App.vue +126 -15
  5. package/src/apply.js +18 -0
  6. package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
  7. package/src/bootstrap/less/bootstrap.less +1 -2
  8. package/src/bootstrap/less/standard.less +208 -0
  9. package/src/components/Util.js +4 -0
  10. package/src/components/app_apply/FieldExploration.vue +2 -2
  11. package/src/components/app_apply/Ventilation.vue +2 -2
  12. package/src/components/image/doc.jpg +0 -0
  13. package/src/components/image/excel.jpg +0 -0
  14. package/src/components/image/pdf.jpg +0 -0
  15. package/src/components/image//345/233/276/345/261/20212.png +0 -0
  16. package/src/components/image//345/233/276/345/261/20213.png +0 -0
  17. package/src/components/image//345/233/276/345/261/20216.png +0 -0
  18. package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
  19. package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
  20. package/src/components/image//346/244/255/345/234/2062.png +0 -0
  21. package/src/components/image//346/244/255/345/234/2065.png +0 -0
  22. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
  23. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
  24. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
  25. package/src/components/image//347/273/2044.png +0 -0
  26. package/src/components/image//347/273/2045.png +0 -0
  27. package/src/components/image//347/273/2046.png +0 -0
  28. package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
  29. package/src/components/product/Function/InstallFunction.vue +9 -8
  30. package/src/components/product/Function/InstallInfoSelect.vue +98 -69
  31. package/src/components/product/Function/Service/FunctionServiceControl.vue +81 -3
  32. package/src/components/product/Function/functions/AddContract.vue +161 -139
  33. package/src/components/product/Function/functions/BuyerMessage.vue +522 -0
  34. package/src/components/product/Function/functions/InstallFee.vue +1117 -891
  35. package/src/components/product/MaterialBatchList.vue +109 -0
  36. package/src/components/product/MaterialBatchManage.vue +34 -0
  37. package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
  38. package/src/components/product/Process/ExplorationSelect.vue +208 -73
  39. package/src/components/product/Process/ExplorationUser.vue +94 -42
  40. package/src/components/product/Process/MaterialUseList.vue +159 -0
  41. package/src/components/product/Process/ModifyUserFiles.vue +15 -5
  42. package/src/components/product/Process/ProcessInfo/history_control.vue +139 -110
  43. package/src/components/product/Process/Processes/ApplyUpload.vue +279 -0
  44. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +501 -212
  45. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
  46. package/src/components/product/Process/Processes/ProjectSettlement.vue +549 -35
  47. package/src/components/product/Process/Processes/ReceiveBatch.vue +314 -168
  48. package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
  49. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +44 -16
  50. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2495 -1008
  51. package/src/components/product/Process/Processes/Upload.vue +532 -0
  52. package/src/components/product/Process/ShowBackReason.vue +1 -1
  53. package/src/components/product/ServiceView.vue +364 -124
  54. package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
  55. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
  56. package/src/components/product/Supervisory/SupervisoryControl.vue +79 -29
  57. package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
  58. package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
  59. package/src/components/product/VueUtils/Tree.vue +330 -0
  60. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
  61. package/src/main.js +2 -0
  62. package/src/stores/ApplyLoadParams.js +1 -1
  63. package/src/stores/PagedListLogic.js +173 -0
  64. package/.npmignore +0 -12
  65. package/node_modules.7z +0 -0
  66. package/yarn.lock +0 -9008
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="flex" style="height: auto">
2
+ <div class="flex col-sm-12" style="height: auto">
3
3
  <div style="height: auto" class="flex">
4
- <p class="bg-info text-center" style="padding: 8px;font-size: 20px">最终材料表
4
+ <p class="bg-info text-center" style="padding: 2px;font-size: 10px">最终材料表
5
5
  </p>
6
6
  <div class="form-inline auto" style="margin-bottom: 5px;">
7
7
  <criteria-paged :model="model" :pager="true" v-ref:paged >
@@ -10,19 +10,25 @@
10
10
  <tr>
11
11
  <th><nobr>序号</nobr></th>
12
12
  <th><nobr>材料名称</nobr></th>
13
- <th><nobr>累计使用数量</nobr></th>
13
+ <th><nobr>数量</nobr></th>
14
14
  <th><nobr>单位</nobr></th>
15
15
  <th><nobr>单价</nobr></th>
16
- <th><nobr>合计金额</nobr></th>
16
+ <th><nobr>金额</nobr></th>
17
+ <th style="padding: 0px"><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.impexcel('最终材料表')">导入</button></th>
17
18
  </tr>
18
19
  </template>
19
20
  <template partial='body'>
20
21
  <td style="text-align: center;">{{$index + 1}}</td>
21
- <td style="text-align: center;">{{row.f_batch_name}}</td>
22
- <td style="text-align: center;">{{row.f_add_receive}}</td>
23
- <td style="text-align: center;">{{row.f_batch_company}}</td>
24
- <td style="text-align: center;">{{row.f_batch_price}}</td>
25
- <td style="text-align: center;">{{row.totalprice}}</td>
22
+ <td style="text-align: center;">{{row.f_name}}</td>
23
+ <td style="text-align: center;">{{row.f_number}}</td>
24
+ <td style="text-align: center;">{{row.f_company}}</td>
25
+ <td style="text-align: center;">{{row.f_price}}</td>
26
+ <td style="text-align: center;">{{row.f_cost}}</td>
27
+ <td style="text-align: center;">
28
+ <button type="button" name="button" class="btn btn-link" v-if="$parent.$parent.$parent.showprint"
29
+ @click="$parent.$parent.$parent.deletematerial(row)">删除
30
+ </button>
31
+ </td>
26
32
  </template>
27
33
  </data-grid>
28
34
  </criteria-paged>
@@ -30,12 +36,116 @@
30
36
  </div>
31
37
 
32
38
  <div style="height: auto" class="flex">
33
- <div class="bg-info text-center" style="padding: 8px;font-size: 20px">其他成本
39
+ <p class="bg-info text-center" style="padding: 2px;font-size: 10px">土建人工
40
+ </p>
41
+ <div class="form-inline auto" style="margin-bottom: 5px;">
42
+ <criteria-paged :model="tujianmodel" :pager="true" v-ref:paged >
43
+ <data-grid :model="$parent.tujianmodel" v-ref:grid partial='list'>
44
+ <template partial='head'>
45
+ <tr>
46
+ <th><nobr>序号</nobr></th>
47
+ <th><nobr>土建类型</nobr></th>
48
+ <th><nobr>规格型号</nobr></th>
49
+ <th><nobr>单位</nobr></th>
50
+ <th><nobr>数量</nobr></th>
51
+ <th><nobr>是否计价</nobr></th>
52
+ <th><nobr>人工定额</nobr></th>
53
+ <th><nobr>系数</nobr></th>
54
+ <th><nobr>人工费报审价</nobr></th>
55
+ <th><nobr>人工费审定价</nobr></th>
56
+ <th><nobr>备注</nobr></th>
57
+ <th style="padding: 0px"><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.impexcel('土建人工')">导入</button><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.tujianAdd()">+</button></th>
58
+ </tr>
59
+ </template>
60
+ <template partial='body'>
61
+ <td style="text-align: center;">{{$index + 1}}</td>
62
+ <!--<th><nobr>土建类型</nobr></th>-->
63
+ <td style="text-align: center;">{{row.f_type}}</td>
64
+ <!--<th><nobr>规格型号</nobr></th>-->
65
+ <td style="text-align: center;">{{row.f_number}}</td>
66
+ <!--<th><nobr>单位</nobr></th>-->
67
+ <td style="text-align: center;">{{row.f_danwei}}</td>
68
+ <!--<th><nobr>数量</nobr></th>-->
69
+ <td style="text-align: center;">{{row.f_shuliang}}</td>
70
+ <!--<th><nobr>是否计价</nobr></th>-->
71
+ <td style="text-align: center;">{{row.f_ispay}}</td>
72
+ <!--<th><nobr>人工定额</nobr></th>-->
73
+ <td style="text-align: center;">{{row.f_eding}}</td>
74
+ <!--<th><nobr>系数</nobr></th>-->
75
+ <td style="text-align: center;">{{row.f_xishu}}</td>
76
+ <!--<th><nobr>人工费报审价</nobr></th>-->
77
+ <td style="text-align: center;">{{row.f_baosheng}}</td>
78
+ <!--<th><nobr>人工费审定价</nobr></th>-->
79
+ <td style="text-align: center;">{{row.f_shengding}}</td>
80
+ <!--<th><nobr>备注</nobr></th>-->
81
+ <td style="text-align: center;">{{row.f_beizhu}}</td>
82
+ <td style="text-align: center;">
83
+ <button type="button" name="button" class="btn btn-link" v-if="$parent.$parent.$parent.showprint"
84
+ @click="$parent.$parent.$parent.deleteRow('t_tujian',row)">删除
85
+ </button>
86
+ </td>
87
+ </template>
88
+ </data-grid>
89
+ </criteria-paged>
34
90
  </div>
35
- <div class="form-inline auto bg-info" style="float: right" >
36
- <div class="form-group" style="float: right">
37
- <button class="btn btn-success" @click="modify()">新增</button>
38
- </div>
91
+ </div>
92
+ <div style="height: auto" class="flex">
93
+ <p class="bg-info text-center" style="padding: 2px;font-size: 10px">安装人工
94
+ </p>
95
+ <div class="form-inline auto" style="margin-bottom: 5px;">
96
+ <criteria-paged :model="anzuangmodel" :pager="true" v-ref:paged >
97
+ <data-grid :model="$parent.anzuangmodel" v-ref:grid partial='list'>
98
+ <template partial='head'>
99
+ <tr>
100
+ <th><nobr>序号</nobr></th>
101
+ <th><nobr>安装类型</nobr></th>
102
+ <th><nobr>规格型号</nobr></th>
103
+ <th><nobr>单位</nobr></th>
104
+ <th><nobr>数量</nobr></th>
105
+ <th><nobr>是否计价</nobr></th>
106
+ <th><nobr>人工定额</nobr></th>
107
+ <th><nobr>系数</nobr></th>
108
+ <th><nobr>人工费报审价</nobr></th>
109
+ <th><nobr>人工费审定价</nobr></th>
110
+ <th><nobr>备注</nobr></th>
111
+ <th style="padding: 0px"><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.impexcel('安装人工')">导入</button><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.anzhuangAdd()">+</button></th>
112
+ </tr>
113
+ </template>
114
+ <template partial='body'>
115
+ <td style="text-align: center;">{{$index + 1}}</td>
116
+ <!--<th><nobr>土建类型</nobr></th>-->
117
+ <td style="text-align: center;">{{row.f_type}}</td>
118
+ <!--<th><nobr>规格型号</nobr></th>-->
119
+ <td style="text-align: center;">{{row.f_number}}</td>
120
+ <!--<th><nobr>单位</nobr></th>-->
121
+ <td style="text-align: center;">{{row.f_danwei}}</td>
122
+ <!--<th><nobr>数量</nobr></th>-->
123
+ <td style="text-align: center;">{{row.f_shuliang}}</td>
124
+ <!--<th><nobr>是否计价</nobr></th>-->
125
+ <td style="text-align: center;">{{row.f_ispay}}</td>
126
+ <!--<th><nobr>人工定额</nobr></th>-->
127
+ <td style="text-align: center;">{{row.f_eding}}</td>
128
+ <!--<th><nobr>系数</nobr></th>-->
129
+ <td style="text-align: center;">{{row.f_xishu}}</td>
130
+ <!--<th><nobr>人工费报审价</nobr></th>-->
131
+ <td style="text-align: center;">{{row.f_baosheng}}</td>
132
+ <!--<th><nobr>人工费审定价</nobr></th>-->
133
+ <td style="text-align: center;">{{row.f_shengding}}</td>
134
+ <!--<th><nobr>备注</nobr></th>-->
135
+ <td style="text-align: center;">{{row.f_beizhu}}</td>
136
+ <td style="text-align: center;">
137
+ <button type="button" name="button" class="btn btn-link" v-if="$parent.$parent.$parent.showprint"
138
+ @click="$parent.$parent.$parent.deleteRow('t_anzhuang',row)">删除
139
+ </button>
140
+ </td>
141
+ </template>
142
+ </data-grid>
143
+ </criteria-paged>
144
+ </div>
145
+ </div>
146
+
147
+ <div style="height: auto" class="flex">
148
+ <div class="bg-info text-center" style="padding: 2px;font-size: 10px">其他成本
39
149
  </div>
40
150
  <div class="form-inline auto" style="margin-bottom: 5px;">
41
151
  <criteria-paged :model="othermodel" :pager="true" v-ref:paged1 >
@@ -47,7 +157,7 @@
47
157
  <th><nobr>成本金额</nobr></th>
48
158
  <th><nobr>备注</nobr></th>
49
159
  <th><nobr>操作人</nobr></th>
50
- <th><nobr>操作</nobr></th>
160
+ <th style="padding: 0px"><button class="btn btn-success" v-if="$parent.$parent.$parent.showprint" @click="$parent.$parent.$parent.modify()">+</button></th>
51
161
  </tr>
52
162
  </template>
53
163
  <template partial='body'>
@@ -57,10 +167,10 @@
57
167
  <td style="text-align: center;">{{row.f_remarks}}</td>
58
168
  <td style="text-align: center;">{{row.f_material_operator}}</td>
59
169
  <td style="text-align: center;">
60
- <button type="button" name="button" class="btn btn-link"
170
+ <button type="button" name="button" class="btn btn-link" v-if="$parent.$parent.$parent.showprint"
61
171
  @click="$parent.$parent.$parent.update(row)">修正
62
172
  </button>
63
- <button type="button" name="button" class="btn btn-link"
173
+ <button type="button" name="button" class="btn btn-link" v-if="$parent.$parent.$parent.showprint"
64
174
  @click="$parent.$parent.$parent.delete(row)">移除
65
175
  </button>
66
176
  </td>
@@ -77,12 +187,16 @@
77
187
  <form class="form-horizontal">
78
188
  <div class="form-group" >
79
189
  <label for="f_cost_name" class="control-label">成本项</label>
80
- <input type="text" class="form-control col-sm-2" v-model="model.f_cost_name"
81
- placeholder='成本项'>
190
+ <!--<input type="" class="form-control col-sm-2" v-model="model.f_cost_name"-->
191
+ <!--placeholder='成本项'>-->
192
+ <input-select
193
+ readonly="readonly" :value.sync="model.f_cost_name"
194
+ v-model="model.f_cost_name"
195
+ :options='cost_name_options' :valueSingle="true"></input-select>
82
196
  </div>
83
197
  <div class="form-group">
84
198
  <label for="f_cost_money" class="control-label">成本金额</label>
85
- <input type="text" class="form-control" v-model="model.f_cost_money"
199
+ <input type="number" class="form-control" v-model="model.f_cost_money"
86
200
  placeholder='成本金额'>
87
201
  </div>
88
202
  <div class="form-group">
@@ -97,9 +211,145 @@
97
211
  <button type="button" class="btn btn-default" @click='modifyclose'>取消</button>
98
212
  </footer>
99
213
  </modal>
214
+ <modal :show.sync="showTuJianAdd" backdrop="false">
215
+ <header slot="modal-header" class="modal-header">
216
+ <h4 class="modal-title">新增土建人工成本项</h4>
217
+ </header>
218
+ <article slot="modal-body" class="modal-body">
219
+ <form class="form-horizontal">
220
+ <div class="form-group" >
221
+ <label for="f_type" class="control-label">土建类型</label>
222
+ <!--<input type="" class="form-control col-sm-2" v-model="model.f_cost_name"-->
223
+ <!--placeholder='成本项'>-->
224
+ <input type="input" class="form-control" v-model="item.f_type"
225
+ placeholder='土建类型'>
226
+ </div>
227
+ <div class="form-group">
228
+ <label for="f_number" class="control-label">规格型号</label>
229
+ <input type="input" class="form-control" v-model="item.f_number"
230
+ placeholder='规格型号'>
231
+ </div>
232
+ <div class="form-group">
233
+ <label for="f_danwei" class="control-label">单位</label>
234
+ <input type="input" class="form-control" v-model="item.f_danwei"
235
+ placeholder='单位'>
236
+ </div>
237
+ <div class="form-group">
238
+ <label for="f_cost_money" class="control-label">数量</label>
239
+ <input type="number" class="form-control" v-model="item.f_shuliang"
240
+ placeholder='数量'>
241
+ </div>
242
+ <div class="form-group">
243
+ <label for="f_cost_money" class="control-label">是否计价</label>
244
+ <input-select
245
+ readonly="item.readonly" :value.sync="item.f_ispay"
246
+ v-model="item.f_ispay" value="是"
247
+ :options='ispayOptions'
248
+ ></input-select>
249
+ </div>
250
+ <div class="form-group">
251
+ <label for="f_cost_money" class="control-label">人工定额</label>
252
+ <input type="number" class="form-control" v-model="item.f_eding"
253
+ placeholder='人工定额'>
254
+ </div>
255
+ <div class="form-group">
256
+ <label for="f_cost_money" class="control-label">系数</label>
257
+ <input type="input" class="form-control" v-model="item.f_xishu"
258
+ placeholder='系数'>
259
+ </div>
260
+ <div class="form-group">
261
+ <label for="f_cost_money" class="control-label">人工费报审价</label>
262
+ <input type="number" class="form-control" v-model="item.f_baosheng"
263
+ placeholder='人工费报审价'>
264
+ </div>
265
+ <div class="form-group">
266
+ <label for="f_cost_money" class="control-label">人工费审定价</label>
267
+ <input type="number" class="form-control" v-model="item.f_shengding"
268
+ placeholder='人工费审定价'>
269
+ </div>
270
+ <div class="form-group">
271
+ <label for="f_remarks" class="control-label">备注</label>
272
+ <input type="text" class="form-control" v-model="item.f_beizhu"
273
+ placeholder='备注'>
274
+ </div>
275
+ </form>
276
+ </article>
277
+ <footer slot="modal-footer" class="modal-footer">
278
+ <button type="button" class="btn btn-success" @click='tujianConfirm'>确认</button>
279
+ <button type="button" class="btn btn-default" @click='tujianClose'>取消</button>
280
+ </footer>
281
+ </modal>
282
+ <modal :show.sync="showAnZhuangAdd" backdrop="false">
283
+ <header slot="modal-header" class="modal-header">
284
+ <h4 class="modal-title">新增安装人工成本项</h4>
285
+ </header>
286
+ <article slot="modal-body" class="modal-body">
287
+ <form class="form-horizontal">
288
+ <div class="form-group" >
289
+ <label for="f_type" class="control-label">安装人工类型</label>
290
+ <!--<input type="" class="form-control col-sm-2" v-model="model.f_cost_name"-->
291
+ <!--placeholder='成本项'>-->
292
+ <input type="input" class="form-control" v-model="item.f_type"
293
+ placeholder='土建类型'>
294
+ </div>
295
+ <div class="form-group">
296
+ <label for="f_number" class="control-label">规格型号</label>
297
+ <input type="input" class="form-control" v-model="item.f_number"
298
+ placeholder='规格型号'>
299
+ </div>
300
+ <div class="form-group">
301
+ <label for="f_danwei" class="control-label">单位</label>
302
+ <input type="input" class="form-control" v-model="item.f_danwei"
303
+ placeholder='单位'>
304
+ </div>
305
+ <div class="form-group">
306
+ <label for="f_cost_money" class="control-label">数量</label>
307
+ <input type="number" class="form-control" v-model="item.f_shuliang"
308
+ placeholder='数量'>
309
+ </div>
310
+ <div class="form-group">
311
+ <label for="f_cost_money" class="control-label">是否计价</label>
312
+ <input-select
313
+ readonly="item.readonly" :value.sync="item.f_ispay"
314
+ v-model="item.f_ispay" value="是"
315
+ :options='ispayOptions'
316
+ ></input-select>
317
+ </div>
318
+ <div class="form-group">
319
+ <label for="f_cost_money" class="control-label">人工定额</label>
320
+ <input type="number" class="form-control" v-model="item.f_eding"
321
+ placeholder='人工定额'>
322
+ </div>
323
+ <div class="form-group">
324
+ <label for="f_cost_money" class="control-label">系数</label>
325
+ <input type="input" class="form-control" v-model="item.f_xishu"
326
+ placeholder='系数'>
327
+ </div>
328
+ <div class="form-group">
329
+ <label for="f_cost_money" class="control-label">人工费报审价</label>
330
+ <input type="number" class="form-control" v-model="item.f_baosheng"
331
+ placeholder='人工费报审价'>
332
+ </div>
333
+ <div class="form-group">
334
+ <label for="f_cost_money" class="control-label">人工费审定价</label>
335
+ <input type="number" class="form-control" v-model="item.f_shengding"
336
+ placeholder='人工费审定价'>
337
+ </div>
338
+ <div class="form-group">
339
+ <label for="f_remarks" class="control-label">备注</label>
340
+ <input type="text" class="form-control" v-model="item.f_beizhu"
341
+ placeholder='备注'>
342
+ </div>
343
+ </form>
344
+ </article>
345
+ <footer slot="modal-footer" class="modal-footer">
346
+ <button type="button" class="btn btn-success" @click='anzhuangConfirm'>确认</button>
347
+ <button type="button" class="btn btn-default" @click='anzhuangClose'>取消</button>
348
+ </footer>
349
+ </modal>
100
350
  <modal :show.sync="updateshow" backdrop="false">
101
351
  <header slot="modal-header" class="modal-header">
102
- <h4 class="modal-title">新增成本项</h4>
352
+ <h4 class="modal-title">修改成本项</h4>
103
353
  </header>
104
354
  <article slot="modal-body" class="modal-body">
105
355
  <form class="form-horizontal">
@@ -110,7 +360,7 @@
110
360
  </div>
111
361
  <div class="form-group">
112
362
  <label for="f_cost_money" class="control-label">成本金额</label>
113
- <input type="text" class="form-control" v-model="updaterow.f_cost_money"
363
+ <input type="number" class="form-control" v-model="updaterow.f_cost_money"
114
364
  placeholder='成本金额'>
115
365
  </div>
116
366
  <div class="form-group">
@@ -125,6 +375,21 @@
125
375
  <button type="button" class="btn btn-default" @click='updateclose'>取消</button>
126
376
  </footer>
127
377
  </modal>
378
+ <modal :show.sync="isShow" v-ref:modal backdrop="false">
379
+ <header slot="modal-header" class="modal-header">
380
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
381
+ <h4 class="modal-title">材料导入</h4>
382
+ </header>
383
+ <article slot="modal-body" class="modal-body">
384
+ <div class="form-group">
385
+ <file-upload class="my-file-uploader" name="materialExcelx"
386
+ action="rs/file/uploadFile" tagname="文件导入" :headers="headers" v-ref:file></file-upload>
387
+ </div>
388
+ </article>
389
+
390
+
391
+ <footer slot="modal-footer" class="modal-footer"></footer>
392
+ </modal>
128
393
  </div>
129
394
  </template>
130
395
  <script>
@@ -142,6 +407,9 @@
142
407
  self.$resetpost('rs/logic/insertcost', param).then(() => {
143
408
  // this.params.rows.splice(index, 1)
144
409
  console.log('更新成功!')
410
+ self.model.f_cost_name=''
411
+ self.model.f_cost_money=''
412
+ self.model.f_remarks=''
145
413
  self.search()
146
414
  })
147
415
  self.search()
@@ -161,6 +429,18 @@
161
429
  self.search()
162
430
  self.modifyshow = false
163
431
  }
432
+ let deletematerial = async function (self) {
433
+ let param = {
434
+ id: self.updaterow.id
435
+ }
436
+ console.log('删除此项材料', param)
437
+ self.$resetpost('rs/logic/deletematerial', param).then(() => {
438
+ // this.params.rows.splice(index, 1)
439
+ console.log('删除成功!')
440
+ self.search()
441
+ })
442
+ self.search()
443
+ }
164
444
  let update = async function (self) {
165
445
  let param = {
166
446
  id: self.updaterow.id,
@@ -179,51 +459,201 @@
179
459
  }
180
460
  export default {
181
461
  title: '工程结算',
182
- props: ['selectdata','edit'],
462
+ props: {
463
+ selectdata: {
464
+ type: Object
465
+ },
466
+ showprint: {
467
+ type: Boolean,
468
+ default: true
469
+ }
470
+ },
183
471
  data () {
184
472
  return {
473
+ importType:'',
474
+ ispayOptions:[{label:'是',value:'是'},{label:'否',value:'否'}],
475
+ showTuJianAdd:false,
476
+ item:{},
477
+ showAnZhuangAdd:false,
185
478
  model: new PagedList('rs/sql/getMaterialFinal', 8, { orderitem: '`id`'}),
186
479
  othermodel: new PagedList('rs/sql/getCost', 8, { orderitem: '`id`'}),
480
+ tujianmodel: new PagedList('rs/sql/getTuJian', 8, { orderitem: '`id`'}),
481
+ anzuangmodel: new PagedList('rs/sql/getAnZhuang', 8, { orderitem: '`id`'}),
187
482
  number:0,
188
483
  cost:0,
189
484
  all:0,
485
+ anzhuangsum:0,
486
+ tujiansum:0,
190
487
  modifyshow:false,
191
488
  updateshow:false,
192
- updaterow:null
489
+ updaterow:null,
490
+ isShow:false,
491
+ cost_name_options:this.$appdata.getParam('成本项')
193
492
  }
194
493
  },
195
494
  ready () {
196
495
  this.search()
197
496
  },
198
497
  methods: {
498
+ async deleteRow(tablename,row){
499
+ let tem = await this.$showMessage(`确认要删除这条记录吗?`, ['confirm', 'cancel'])
500
+ if(tem != 'confirm'){
501
+ return
502
+ }
503
+ row.f_state = '0'
504
+ row.f_operator=this.$login.f.name
505
+ row.f_apply_num=this.selectdata.f_apply_num
506
+ row.f_parentname=this.$login.f.f_parentname
507
+ row.f_filiale=this.$login.f.f_fengongsi
508
+
509
+ this.$resetpost('rs/logic/saveentity', {data:{tablename:tablename,parameters:row}}).then(() => {
510
+ // this.params.rows.splice(index, 1)
511
+ console.log('更新成功!')
512
+ this.search()
513
+ })
514
+ this.search()
515
+ },
516
+ tujianConfirm(){
517
+ let param = {
518
+ f_process_id: this.selectdata.f_process_id,
519
+ f_state: '1',
520
+ f_operator: this.$login.f.name,
521
+ f_apply_num:this.selectdata.f_apply_num,
522
+ f_parentname:this.$login.f.f_parentname,
523
+ f_filiale:this.$login.f.f_fengongsi,
524
+ f_date:new Date().Format("yyyy-MM-dd HH:mm:ss")
525
+ }
526
+ param = Object.assign(this.item,param)
527
+ console.log('新增成本项', param)
528
+ this.$resetpost('rs/logic/saveentity', {data:{tablename:'t_tujian',parameters:param}}).then(() => {
529
+ // this.params.rows.splice(index, 1)
530
+ console.log('更新成功!')
531
+
532
+ this.search()
533
+ })
534
+ this.search()
535
+ this.tujianClose()
536
+ },
537
+ anzhuangConfirm(){
538
+ let param = {
539
+ f_process_id: this.selectdata.f_process_id,
540
+ f_state: '1',
541
+ f_operator: this.$login.f.name,
542
+ f_apply_num:this.selectdata.f_apply_num,
543
+ f_parentname:this.$login.f.f_parentname,
544
+ f_filiale:this.$login.f.f_fengongsi,
545
+ f_date:new Date().Format("yyyy-MM-dd HH:mm:ss")
546
+ }
547
+ param = Object.assign(this.item,param)
548
+ console.log('新增成本项', param)
549
+ this.$resetpost('rs/logic/saveentity', {data:{tablename:'t_anzhuang',parameters:param}}).then(() => {
550
+ // this.params.rows.splice(index, 1)
551
+ console.log('更新成功!')
552
+
553
+ this.search()
554
+ })
555
+ this.search()
556
+ this.anzhuangClose()
557
+ },
558
+ tujianAdd(){
559
+ this.showTuJianAdd = true
560
+ },
561
+ anzhuangAdd(){
562
+ this.showAnZhuangAdd = true
563
+ },
564
+ tujianClose(){
565
+ this.showTuJianAdd = false
566
+ this.item = {}
567
+ },
568
+ anzhuangClose(){
569
+ this.showAnZhuangAdd = false
570
+ this.item = {}
571
+ },
199
572
  search () {
200
- console.log('执行查询')
573
+ console.log('执行查询',this.$login)
201
574
  let condition = ` processid = '${this.selectdata.f_process_id}'`
202
575
  let othercondition = ` f_processid = '${this.selectdata.f_process_id}'`
576
+ let tujiancondition = ` f_process_id = '${this.selectdata.f_process_id}'`
577
+ let anzuangcondition = ` f_process_id = '${this.selectdata.f_process_id}'`
203
578
  this.model.search(condition)
204
579
  this.othermodel.search(othercondition)
580
+ this.tujianmodel.search(tujiancondition)
581
+ this.anzuangmodel.search(anzuangcondition)
582
+ console.log('查询结果',this.model)
583
+ console.log('错误信息',this.model.error)
584
+ this.model.error=""
585
+ this.othermodel.error=""
586
+ this.tujianmodel.error=""
587
+ this.anzuangmodel.error=""
205
588
  this.getnumber(condition)
206
589
  },
590
+ getTuJianSum(){
591
+ let data = {
592
+ columnname: 'f_shengding',
593
+ tablename: 't_tujian',
594
+ condition: ` f_ispay='是' and f_state='1' and f_process_id = '${this.selectdata.f_process_id}'`
595
+ }
596
+ this.$resetpost('rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '土建人工和值取失败'}).then((res) => {
597
+ if (res.data.length>0){
598
+ this.tujiansum =res.data[0].f_shengding
599
+ console.log('this.tujiansum=',this.tujiansum)
600
+ this.$dispatch('refreshSum',this.number,this.cost,this.tujiansum,this.anzhuangsum)
601
+ }else{
602
+ this.tujiansum = 0
603
+ }
604
+ console.log('2222222222222222')
605
+ })
606
+ },
607
+ getAnZhuangSum(){
608
+ let data = {
609
+ columnname: 'f_shengding',
610
+ tablename: 't_anzhuang',
611
+ condition: ` f_ispay='是' and f_state='1' and f_process_id = '${this.selectdata.f_process_id}'`
612
+ }
613
+ let othercondition = ` f_processid = '${this.selectdata.f_process_id}'`
614
+ this.$resetpost('rs/sql/getSum', {data: data}, {resolveMsg: null, rejectMsg: '安装人工和值取失败'}).then((res) => {
615
+ if (res.data.length>0){
616
+ this.anzhuangsum =res.data[0].f_shengding
617
+ }else{
618
+ this.anzhuangsum = 0
619
+ }
620
+ this.getTuJianSum()
621
+ console.log('this.anzhuangsum=',this.anzhuangsum)
622
+ })
623
+ },
207
624
  getcost(){
208
625
  let othercondition = ` f_processid = '${this.selectdata.f_process_id}'`
209
626
  this.$resetpost('rs/sql/getCostAll', {data:{condition: othercondition,orderitem: `f_cost desc`}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
210
- console.log('res2',res.data[0].f_cost)
211
- if (res.data[0].f_cost){
627
+
628
+ if (res.data.length>0){
212
629
  this.cost =res.data[0].f_cost
630
+ }else{
631
+ this.cost = 0
213
632
  }
214
- console.log('2222222222222222')
633
+ this.getAnZhuangSum()
215
634
  })
216
635
  },
217
636
  getnumber(condition){
218
637
  this.$resetpost('rs/sql/getMaterialPrice', {data:{condition: condition,orderitem: `f_price desc`}}, {resolveMsg: null, rejectMsg: null}).then((res) => {
219
- console.log('res',res.data[0].f_price)
220
- if (res.data[0].f_price){
638
+ console.log('res',res)
639
+ if (res.data.length>0){
221
640
  this.number =res.data[0].f_price
641
+ }else{
642
+ this.number = 0
222
643
  }
223
644
  this.getcost()
224
645
  console.log('11111111111')
225
646
  })
226
647
  },
648
+ impexcel(titile) {
649
+ this.importType = titile
650
+ this.isShow = true
651
+ },
652
+ closeFile() {
653
+ this.isShow = false
654
+ // 将选的文件清空
655
+ this.$refs.file.$el.querySelector('input').value = ''
656
+ },
227
657
  modify(){
228
658
  this.modifyshow = true
229
659
  },
@@ -275,6 +705,14 @@
275
705
  deletecost (this)
276
706
  }
277
707
  })
708
+ },
709
+ deletematerial(row){
710
+ this.updaterow = row
711
+ this.$showMessage(`是否确认删除此条记录`, ['confirm', 'cancel']).then((res) => {
712
+ if (res === 'confirm') {
713
+ deletematerial (this)
714
+ }
715
+ })
278
716
  }
279
717
 
280
718
  },
@@ -282,16 +720,92 @@
282
720
 
283
721
  },
284
722
  events: {
285
-
723
+ onFileUpload: function (file, res) {
724
+ console.log('上传成功')
725
+ if (!this.selectdata.f_process_id) {
726
+ this.$showMessage("数据异常,导入失败")
727
+ return
728
+ }
729
+ let data = {}
730
+ if(this.importType=='安装人工'){
731
+ data = {
732
+ tablename: 't_anzhuang',
733
+ importJsonFileName:'anzhuang.json',
734
+ filepath: res.f_downloadpath,
735
+ f_state: '1',
736
+ f_date:this.$login.toStandardTimeString(),
737
+ processid: this.selectdata.f_process_id,
738
+ f_process_id: this.selectdata.f_process_id,
739
+ f_apply_num: this.selectdata.f_apply_num,
740
+ f_filiale:this.selectdata.f_filiale,
741
+ f_parentname:this.$login.f.f_parentname,
742
+ f_operator:this.$login.f.name
743
+ /* processid:this.selectdata.f_processid*/
744
+ }
745
+ console.log('即将上传的数据,',data)
746
+ this.$resetpost('rs/logic/publicImport', data, {resolveMsg: '上传成功', rejectMsg: '上传失败'}).then((res) => {
747
+ console.log('logic返回数据',res)
748
+ this.search()
749
+ this.closeFile()
750
+ })
751
+ }else if (this.importType=='土建人工'){
752
+ data = {
753
+ tablename: 't_tujian',
754
+ importJsonFileName:'tujian.json',
755
+ f_state: '1',
756
+ filepath: res.f_downloadpath,
757
+ f_date:this.$login.toStandardTimeString(),
758
+ processid: this.selectdata.f_process_id,
759
+ f_process_id: this.selectdata.f_process_id,
760
+ f_apply_num: this.selectdata.f_apply_num,
761
+ f_filiale:this.selectdata.f_filiale,
762
+ f_parentname:this.$login.f.f_parentname,
763
+ f_operator:this.$login.f.name
764
+ /* processid:this.selectdata.f_processid*/
765
+ }
766
+ console.log('即将上传的数据,',data)
767
+ this.$resetpost('rs/logic/publicImport', data, {resolveMsg: '上传成功', rejectMsg: '上传失败'}).then((res) => {
768
+ console.log('logic返回数据',res)
769
+ this.search()
770
+ this.closeFile()
771
+ })
772
+ }else if(this.importType=='最终材料表'){
773
+ data = {
774
+ tablename: 'f_material',
775
+ filepath: res.f_downloadpath,
776
+ f_batch_importdate:this.$login.toStandardTimeString(),
777
+ processid: this.selectdata.f_process_id,
778
+ f_apply_num: this.selectdata.f_apply_num,
779
+ f_filiale:this.selectdata.f_filiale,
780
+ f_parentname:this.$login.f.f_parentname,
781
+ f_material_operator:this.$login.f.name
782
+ /* processid:this.selectdata.f_processid*/
783
+ }
784
+ console.log('即将上传的数据,',data)
785
+ this.$resetpost('rs/logic/materialfinalimport', data, {resolveMsg: '上传成功', rejectMsg: '上传失败'}).then((res) => {
786
+ console.log('logic返回数据',res)
787
+ this.search()
788
+ this.closeFile()
789
+ })
790
+ }
791
+ this.importType = ''
792
+ }
286
793
  },
287
794
  watch: {
288
795
  'number' (){
289
- this.all = this.cost+this.number
290
- this.$dispatch('get-price', this.all)
796
+ this.$dispatch('get-number', this.number)
291
797
  },
292
798
  'cost' (){
293
- this.all = this.cost+this.number
294
- this.$dispatch('get-price', this.all)
799
+ this.$dispatch('get-cost', this.cost)
800
+ },
801
+ 'anzhuangsum' (){
802
+ this.$dispatch('anzhuang-sum', this.anzhuangsum)
803
+ },
804
+ 'tujiansum' (){
805
+ this.$dispatch('tujian-sum', this.tujiansum)
806
+ },
807
+ 'selectdata.f_process_id' (){
808
+ this.search()
295
809
  }
296
810
  }
297
811
  }