apply-clients 3.4.91 → 3.4.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +133 -133
- package/package.json +117 -117
- package/src/App.vue +26 -21
- package/src/components/android/Ignition/VentilationIgnition.vue +312 -312
- package/src/components/android/Ignition/VentilationIgnitionHandle.vue +353 -353
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +476 -476
- package/src/components/product/Function/InstallInfoSelect.vue +326 -326
- package/src/components/product/Ignition/IgnitionListManage.vue +420 -420
- package/src/components/product/Material/MaterialDetailed.vue +268 -268
- package/src/components/product/Material/Materiallist.vue +74 -74
- package/src/components/product/Material/Materialmanger.vue +58 -58
- package/src/components/product/Process/ExplorationSelect.vue +491 -491
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +203 -203
- package/src/components/product/Process/ShowBackReason.vue +40 -40
- package/src/components/product/Stop/StopApplyList.vue +278 -278
- package/src/components/product/Supervisory/SupervisoryControl.vue +140 -140
- package/src/filiale/hongda/pc/printChargepc.vue +114 -114
- package/src/filiale/hongda/pc/printactivatecard.vue +151 -151
- package/src/filiale/linzhou/pc/ApplyChargeList.vue +486 -486
- package/src/filiale/linzhou/pc/ServiceControl.vue +1968 -1968
- package/src/filiale/linzhou/pc/devicesManagement.vue +494 -494
- package/src/filiale/linzhou/pc.js +10 -10
- package/src/filiale/qianneng/android/AppAddMaterialScience.vue +477 -477
- package/src/filiale/qianneng/android/AppExplorationUser.vue +447 -447
- package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
- package/src/filiale/qianneng/android/AppServiceView.vue +761 -761
- package/src/filiale/qianneng/android/AppSign.vue +152 -152
- package/src/filiale/qianneng/android/AppTakePic.vue +140 -140
- package/src/filiale/qianneng/android.js +12 -12
- package/src/filiale/qianneng/pc/ApplyUpload.vue +290 -290
- package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
- package/src/filiale/qianneng/pc/ExplorationUser.vue +189 -189
- package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
- package/src/filiale/qianneng/pc/ServiceView.vue +1118 -1121
- package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
- package/src/filiale/qianneng/pc/SupervisoryhCart.vue +127 -127
- package/src/filiale/qianneng/pc/addMaterialScience.vue +464 -464
- package/src/filiale/qianneng/pc/addressAndUserinfoManagement.vue +389 -389
- package/src/filiale/qianneng/pc/devicesManagement.vue +484 -484
- package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
- package/src/filiale/qianneng/pc.js +26 -26
- package/src/filiale/yangchunboneng/pc/ApplyChargeList.vue +516 -0
- package/src/filiale/yangchunboneng/pc.js +13 -12
- package/src/main.js +23 -23
|
@@ -1,464 +1,464 @@
|
|
|
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
|
-
<nobr>
|
|
16
|
-
<button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
|
|
17
|
-
<button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
18
|
-
@click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
|
|
19
|
-
<a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
20
|
-
href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
|
|
21
|
-
</nobr>
|
|
22
|
-
</th>
|
|
23
|
-
</tr>
|
|
24
|
-
</template>
|
|
25
|
-
<template partial='body'>
|
|
26
|
-
<tr>
|
|
27
|
-
<td style="text-align: center;">
|
|
28
|
-
<nobr>{{$index+1}}</nobr>
|
|
29
|
-
</td>
|
|
30
|
-
<td style="text-align: center;">
|
|
31
|
-
<nobr>{{row.f_material_name}}</nobr>
|
|
32
|
-
</td>
|
|
33
|
-
<td style="text-align: center;">
|
|
34
|
-
<nobr>{{row.f_material_style}}</nobr>
|
|
35
|
-
</td>
|
|
36
|
-
<td style="text-align: center;">
|
|
37
|
-
<nobr>{{row.f_material_unit}}</nobr>
|
|
38
|
-
</td>
|
|
39
|
-
<td style="text-align: center;">
|
|
40
|
-
<nobr>{{row.f_material_price}}</nobr>
|
|
41
|
-
</td>
|
|
42
|
-
<td style="text-align: center;">
|
|
43
|
-
<nobr>{{row.f_material_number}}</nobr>
|
|
44
|
-
</td>
|
|
45
|
-
<td style="text-align: center;">
|
|
46
|
-
<nobr>{{row.f_bjq_sid}}</nobr>
|
|
47
|
-
</td>
|
|
48
|
-
<td style="text-align: center;">
|
|
49
|
-
<nobr>{{row.f_material_code}}</nobr>
|
|
50
|
-
</td>
|
|
51
|
-
<td style="text-align: center;">
|
|
52
|
-
<nobr>
|
|
53
|
-
<button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
|
|
54
|
-
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
|
|
55
|
-
</nobr>
|
|
56
|
-
</td>
|
|
57
|
-
</tr>
|
|
58
|
-
</template>
|
|
59
|
-
</data-grid>
|
|
60
|
-
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
61
|
-
<header slot="modal-header" class="modal-header">
|
|
62
|
-
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
63
|
-
<h4 class="modal-title">选择文件</h4>
|
|
64
|
-
</header>
|
|
65
|
-
<article slot="modal-body" class="modal-body">
|
|
66
|
-
<div class="form-group">
|
|
67
|
-
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
68
|
-
</div>
|
|
69
|
-
</article>
|
|
70
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
71
|
-
</modal>
|
|
72
|
-
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
73
|
-
:backdrop="false" :title="title">
|
|
74
|
-
<header slot="modal-header" class="modal-header">
|
|
75
|
-
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
76
|
-
<h4 class="modal-title">{{title}}</h4>
|
|
77
|
-
</header>
|
|
78
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
79
|
-
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
80
|
-
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
81
|
-
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
82
|
-
<div class="col-sm-6 text-right"><button
|
|
83
|
-
class="button_delete button_spacing"
|
|
84
|
-
@click.prevent="deleteDevicesinfo(i)"
|
|
85
|
-
v-if="title === '新增'"
|
|
86
|
-
>删除</button></div>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="form-group col-sm-6">
|
|
89
|
-
<label class="col-sm-4 control-label">选择材料:</label>
|
|
90
|
-
<div class="col-sm-8">
|
|
91
|
-
<input-select
|
|
92
|
-
class="select select_list"
|
|
93
|
-
:value.sync="item.material"
|
|
94
|
-
v-model="item.material"
|
|
95
|
-
:options="meterialOptions"
|
|
96
|
-
:disable="mark === 1"
|
|
97
|
-
@change="modifyOtherValue(i)"
|
|
98
|
-
:valueSingle="true"></input-select>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
102
|
-
<label class="col-sm-4 control-label">材料名称:</label>
|
|
103
|
-
<div class="col-sm-8">
|
|
104
|
-
<input class="form-control input_view" style="" type="text"
|
|
105
|
-
placeholder="材料名称"
|
|
106
|
-
v-model="item.f_material_name"
|
|
107
|
-
:value="item.f_material_name"
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
112
|
-
<label class="col-sm-4 control-label">材料型号:</label>
|
|
113
|
-
<div class="col-sm-8">
|
|
114
|
-
<input class="form-control input_view" style="" type="text"
|
|
115
|
-
placeholder="材料型号"
|
|
116
|
-
v-model="item.f_material_style"
|
|
117
|
-
:value="item.f_material_style"
|
|
118
|
-
/>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="form-group col-sm-6" :class="[item.f_material_price ? '' : 'has-error']">
|
|
122
|
-
<label class="col-sm-4 control-label">材料单价:</label>
|
|
123
|
-
<div class="col-sm-8">
|
|
124
|
-
<input class="form-control input_view" style="" type="text"
|
|
125
|
-
placeholder="材料单位"
|
|
126
|
-
v-model="item.f_material_price"
|
|
127
|
-
:value="item.f_material_price"
|
|
128
|
-
/>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
132
|
-
<label class="col-sm-4 control-label">材料单位:</label>
|
|
133
|
-
<div class="col-sm-8">
|
|
134
|
-
<input class="form-control input_view" style="" type="text"
|
|
135
|
-
placeholder="材料单位"
|
|
136
|
-
v-model="item.f_material_unit"
|
|
137
|
-
:value="item.f_material_unit"
|
|
138
|
-
/>
|
|
139
|
-
</div>
|
|
140
|
-
</div>
|
|
141
|
-
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
142
|
-
<label class="col-sm-4 control-label">材料数量:</label>
|
|
143
|
-
<div class="col-sm-8">
|
|
144
|
-
<input class="form-control input_view" style="" type="number"
|
|
145
|
-
placeholder="设备数量"
|
|
146
|
-
v-model="item.f_material_number"
|
|
147
|
-
:value="item.f_material_number"
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="form-group col-sm-6">
|
|
152
|
-
<label class="col-sm-4 control-label">材料编号:</label>
|
|
153
|
-
<div class="col-sm-8">
|
|
154
|
-
<input class="form-control input_view" style="" type="text"
|
|
155
|
-
placeholder="材料编号"
|
|
156
|
-
v-model="item.f_bjq_sid"
|
|
157
|
-
:value="item.f_bjq_sid"
|
|
158
|
-
/>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
<div class="form-group col-sm-6">
|
|
162
|
-
<label class="col-sm-4 control-label">材料标识:</label>
|
|
163
|
-
<div class="col-sm-8">
|
|
164
|
-
<input class="form-control input_view" style=""
|
|
165
|
-
placeholder="材料标识"
|
|
166
|
-
v-model="item.f_material_code"
|
|
167
|
-
:value.sync="item.f_material_code"
|
|
168
|
-
/>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
|
|
172
|
-
<div class="form-group col-sm-6">
|
|
173
|
-
<label class="col-sm-4 control-label">用户编号:</label>
|
|
174
|
-
<div class="col-sm-8">
|
|
175
|
-
<input class="form-control input_view" style=""
|
|
176
|
-
placeholder="用户编号"
|
|
177
|
-
v-model="item.f_userinfo_code"
|
|
178
|
-
:value.sync="item.f_userinfo_code"
|
|
179
|
-
/>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
</div>
|
|
184
|
-
|
|
185
|
-
</article>
|
|
186
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
187
|
-
<template v-if="mark !== 1">
|
|
188
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
189
|
-
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
|
|
190
|
-
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
|
|
191
|
-
</template>
|
|
192
|
-
</footer>
|
|
193
|
-
</modal>
|
|
194
|
-
</div>
|
|
195
|
-
</template>
|
|
196
|
-
|
|
197
|
-
<script>
|
|
198
|
-
import {HttpResetClass} from 'vue-client'
|
|
199
|
-
import Vue from "vue";
|
|
200
|
-
import {isEmpty} from '../../../components/Util'
|
|
201
|
-
export default {
|
|
202
|
-
name: 'addMaterialScience',
|
|
203
|
-
props: {
|
|
204
|
-
selectdata: {
|
|
205
|
-
type: Object
|
|
206
|
-
},
|
|
207
|
-
mark: {
|
|
208
|
-
type: Number,
|
|
209
|
-
default: 0
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
data () {
|
|
213
|
-
return {
|
|
214
|
-
showFile: false,
|
|
215
|
-
onetomany: {
|
|
216
|
-
rows: []
|
|
217
|
-
},
|
|
218
|
-
title:'新增',
|
|
219
|
-
showMaterialModal:false,
|
|
220
|
-
materials:[
|
|
221
|
-
{
|
|
222
|
-
material:'',
|
|
223
|
-
f_material_name:'',
|
|
224
|
-
f_material_style:'',
|
|
225
|
-
f_material_unit:'',
|
|
226
|
-
f_material_price:'',
|
|
227
|
-
f_material_number:'',
|
|
228
|
-
f_bjq_sid:'',
|
|
229
|
-
f_material_code:'',
|
|
230
|
-
f_userinfo_code:''
|
|
231
|
-
}
|
|
232
|
-
],
|
|
233
|
-
meterialOptions:[],
|
|
234
|
-
row:{}
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
ready(){
|
|
238
|
-
this.getOnetoManyData()
|
|
239
|
-
},
|
|
240
|
-
methods: {
|
|
241
|
-
async getOnetoManyData () {
|
|
242
|
-
let data = {
|
|
243
|
-
tablename: `t_material_apply`,
|
|
244
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
245
|
-
}
|
|
246
|
-
let res = await this.$resetpost(
|
|
247
|
-
'rs/sql/apply_singleTable',
|
|
248
|
-
{data: data},
|
|
249
|
-
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
250
|
-
)
|
|
251
|
-
this.onetomany.rows = res.data
|
|
252
|
-
},
|
|
253
|
-
async openMaterialModal () {
|
|
254
|
-
this.getMateralNames()
|
|
255
|
-
this.title = '新增'
|
|
256
|
-
this.materials = [
|
|
257
|
-
{
|
|
258
|
-
material:'',
|
|
259
|
-
f_material_name:'',
|
|
260
|
-
f_material_style:'',
|
|
261
|
-
f_material_unit:'',
|
|
262
|
-
f_material_price:'',
|
|
263
|
-
f_material_number:'',
|
|
264
|
-
f_bjq_sid:'',
|
|
265
|
-
f_material_code:'',
|
|
266
|
-
f_userinfo_code:''
|
|
267
|
-
}
|
|
268
|
-
],
|
|
269
|
-
this.showMaterialModal = true
|
|
270
|
-
},
|
|
271
|
-
closeFile() {
|
|
272
|
-
this.showWork = false
|
|
273
|
-
this.showFile = false
|
|
274
|
-
// 将选的文件清空
|
|
275
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
276
|
-
this.search()
|
|
277
|
-
},
|
|
278
|
-
deleteDevicesinfo (index) {
|
|
279
|
-
this.materials.splice(index, 1)
|
|
280
|
-
},
|
|
281
|
-
pushMaterial () {
|
|
282
|
-
this.materials.push({
|
|
283
|
-
material:'',
|
|
284
|
-
f_material_name:'',
|
|
285
|
-
f_material_style:'',
|
|
286
|
-
f_material_unit:'',
|
|
287
|
-
f_material_price:'',
|
|
288
|
-
f_material_number:'',
|
|
289
|
-
f_bjq_sid:'',
|
|
290
|
-
f_material_code:'',
|
|
291
|
-
f_userinfo_code:''
|
|
292
|
-
})
|
|
293
|
-
},
|
|
294
|
-
// 获取模态框材料
|
|
295
|
-
async getMateralNames () {
|
|
296
|
-
let data = {
|
|
297
|
-
condition: `1=1`
|
|
298
|
-
}
|
|
299
|
-
let http = new HttpResetClass()
|
|
300
|
-
let res = await http.load(
|
|
301
|
-
'POST',
|
|
302
|
-
`rs/sql/getStockMaterial`,
|
|
303
|
-
{data: data},
|
|
304
|
-
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
305
|
-
)
|
|
306
|
-
|
|
307
|
-
this.meterialOptions = res.data.map(item => {
|
|
308
|
-
return {
|
|
309
|
-
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
|
|
310
|
-
'value': item
|
|
311
|
-
}
|
|
312
|
-
})
|
|
313
|
-
},
|
|
314
|
-
modifyOtherValue (index){
|
|
315
|
-
console.log("进来了",index)
|
|
316
|
-
console.log("dddd",this.materials[index].material)
|
|
317
|
-
let material = this.materials[index].material
|
|
318
|
-
this.materials[index].f_material_name = material.f_material_name
|
|
319
|
-
this.materials[index].f_material_style = material.f_material_style
|
|
320
|
-
this.materials[index].f_material_unit = material.f_material_unit
|
|
321
|
-
this.materials[index].f_material_price = material.f_material_price
|
|
322
|
-
this.materials[index].f_material_number = material.f_material_number
|
|
323
|
-
this.materials[index].f_material_code = material.f_material_code
|
|
324
|
-
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
325
|
-
},
|
|
326
|
-
// 新增材料
|
|
327
|
-
async addMaterial () {
|
|
328
|
-
console.log("登录信息:",this.$login.f)
|
|
329
|
-
this.title = '新增'
|
|
330
|
-
let data = {
|
|
331
|
-
f_process_id : this.selectdata.f_process_id,
|
|
332
|
-
f_operator_id: this.$login.f.id,
|
|
333
|
-
f_operator: this.$login.f.name,
|
|
334
|
-
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
335
|
-
f_orgid: this.$login.f.orgid,
|
|
336
|
-
f_orgname: this.$login.f.orgs,
|
|
337
|
-
materials:this.materials
|
|
338
|
-
}
|
|
339
|
-
let res = await this.$resetpost(
|
|
340
|
-
`rs/logic/applysaveMaterials`,
|
|
341
|
-
data
|
|
342
|
-
)
|
|
343
|
-
console.log(this.materials)
|
|
344
|
-
this.saveContract(this.materials)
|
|
345
|
-
},
|
|
346
|
-
async deleteMaterial (row) {
|
|
347
|
-
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
348
|
-
if(show1 != true){
|
|
349
|
-
this.closeMaterials()
|
|
350
|
-
}else{
|
|
351
|
-
debugger
|
|
352
|
-
let http = new HttpResetClass()
|
|
353
|
-
let res = await http.load(
|
|
354
|
-
'POST',
|
|
355
|
-
`rs/logic/deleteMaterial`,
|
|
356
|
-
{data: row},
|
|
357
|
-
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
358
|
-
)
|
|
359
|
-
this.closeMaterials()
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
},
|
|
363
|
-
async updateMaterial (index,row) {
|
|
364
|
-
this.title = '修改'
|
|
365
|
-
this.row = row
|
|
366
|
-
this.getMateralNames()
|
|
367
|
-
this.materials = [
|
|
368
|
-
{
|
|
369
|
-
material:'',
|
|
370
|
-
f_material_name:row.f_material_name,
|
|
371
|
-
f_material_style:row.f_material_style,
|
|
372
|
-
f_material_price:row.f_material_price,
|
|
373
|
-
f_material_unit:row.f_material_unit,
|
|
374
|
-
f_material_number:row.f_material_number,
|
|
375
|
-
f_material_code:row.f_material_code,
|
|
376
|
-
f_userinfo_code:row.f_userinfo_code,
|
|
377
|
-
f_bjq_sid: row.f_bjq_sid
|
|
378
|
-
}
|
|
379
|
-
]
|
|
380
|
-
this.showMaterialModal = true
|
|
381
|
-
},
|
|
382
|
-
async updateConfirm () {
|
|
383
|
-
let data = this.row
|
|
384
|
-
data.f_material_name = this.materials[0].f_material_name
|
|
385
|
-
data.f_material_style = this.materials[0].f_material_style
|
|
386
|
-
data.f_material_unit = this.materials[0].f_material_unit
|
|
387
|
-
data.f_material_price = this.materials[0].f_material_price
|
|
388
|
-
data.f_material_number = this.materials[0].f_material_number
|
|
389
|
-
data.f_material_code = this.materials[0].f_material_code
|
|
390
|
-
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
391
|
-
data.f_userinfo_code = this.materials[0].f_userinfo_code
|
|
392
|
-
|
|
393
|
-
let res = await this.$resetpost(
|
|
394
|
-
`rs/entity/t_material_apply`,
|
|
395
|
-
data
|
|
396
|
-
)
|
|
397
|
-
this.closeMaterials()
|
|
398
|
-
},
|
|
399
|
-
sycronizedCode(index,val){
|
|
400
|
-
console.log("看看:",index,val)
|
|
401
|
-
this.materials[index].f_material_code = val
|
|
402
|
-
},
|
|
403
|
-
closeMaterials () {
|
|
404
|
-
this.getOnetoManyData()
|
|
405
|
-
this.showMaterialModal = false
|
|
406
|
-
},
|
|
407
|
-
// 添加材料之后,直接追加金额
|
|
408
|
-
async saveContract(materials) {
|
|
409
|
-
if (isEmpty(this.selectdata.f_contract_money)) {
|
|
410
|
-
this.$showAlert('请先录入主合同金额!!!', 'warning', 3000)
|
|
411
|
-
return
|
|
412
|
-
}
|
|
413
|
-
let num = 0
|
|
414
|
-
for (let i = 0;i < materials.length;i++){
|
|
415
|
-
num += materials[i].f_material_price * materials[i].f_material_number
|
|
416
|
-
}
|
|
417
|
-
let contract = {
|
|
418
|
-
f_contract_number:this.selectdata.f_contract_money,
|
|
419
|
-
f_contract_type: '材料费',
|
|
420
|
-
f_contract_money: num,
|
|
421
|
-
f_remarks: this.$login.f.name + '录入材料费用'
|
|
422
|
-
}
|
|
423
|
-
let http = new HttpResetClass()
|
|
424
|
-
let data = {
|
|
425
|
-
contract: contract,
|
|
426
|
-
user: this.$login.f,
|
|
427
|
-
selectdata: this.selectdata
|
|
428
|
-
}
|
|
429
|
-
let res = await http.load('POST', 'rs/logic/addApplyContract', {data: data}, {
|
|
430
|
-
resolveMsg: null,
|
|
431
|
-
rejectMsg: '添加失败'
|
|
432
|
-
})
|
|
433
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
|
-
events: {
|
|
437
|
-
'beforeFileUpload' (file) {
|
|
438
|
-
this.showWork = true
|
|
439
|
-
},
|
|
440
|
-
async 'onFileUpload'(file, result) {
|
|
441
|
-
let data = {
|
|
442
|
-
selectdata: this.selectdata,
|
|
443
|
-
filepath: result.f_downloadpath,
|
|
444
|
-
user: this.$login.f
|
|
445
|
-
}
|
|
446
|
-
try {
|
|
447
|
-
let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
|
|
448
|
-
resolveMsg: null,
|
|
449
|
-
rejectMsg: '导入失败!!!',
|
|
450
|
-
silent: true
|
|
451
|
-
}, 0)
|
|
452
|
-
} catch (e) {
|
|
453
|
-
this.closeFile()
|
|
454
|
-
}
|
|
455
|
-
this.$dispatch('breakControl', this.selectdata)
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
</script>
|
|
461
|
-
|
|
462
|
-
<style scoped>
|
|
463
|
-
|
|
464
|
-
</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">材料标识</th>
|
|
14
|
+
<th class="textNoLineBreak">
|
|
15
|
+
<nobr>
|
|
16
|
+
<button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加</button>
|
|
17
|
+
<button type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
18
|
+
@click="$parent.$parent.showFile = !$parent.$parent.showFile">导入</button>
|
|
19
|
+
<a type="button" class="btn btn-info head-but" v-if="$parent.$parent.mark === 0"
|
|
20
|
+
href="/apply/download/excel/材料明细.xlsx" download>模板下载</a>
|
|
21
|
+
</nobr>
|
|
22
|
+
</th>
|
|
23
|
+
</tr>
|
|
24
|
+
</template>
|
|
25
|
+
<template partial='body'>
|
|
26
|
+
<tr>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{$index+1}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>{{row.f_material_name}}</nobr>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<nobr>{{row.f_material_style}}</nobr>
|
|
35
|
+
</td>
|
|
36
|
+
<td style="text-align: center;">
|
|
37
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center;">
|
|
40
|
+
<nobr>{{row.f_material_price}}</nobr>
|
|
41
|
+
</td>
|
|
42
|
+
<td style="text-align: center;">
|
|
43
|
+
<nobr>{{row.f_material_number}}</nobr>
|
|
44
|
+
</td>
|
|
45
|
+
<td style="text-align: center;">
|
|
46
|
+
<nobr>{{row.f_bjq_sid}}</nobr>
|
|
47
|
+
</td>
|
|
48
|
+
<td style="text-align: center;">
|
|
49
|
+
<nobr>{{row.f_material_code}}</nobr>
|
|
50
|
+
</td>
|
|
51
|
+
<td style="text-align: center;">
|
|
52
|
+
<nobr>
|
|
53
|
+
<button type="button" class="button_search button_spacing" @click="$parent.$parent.updateMaterial($index,row)">修改</button>
|
|
54
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除</button>
|
|
55
|
+
</nobr>
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
</template>
|
|
59
|
+
</data-grid>
|
|
60
|
+
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
61
|
+
<header slot="modal-header" class="modal-header">
|
|
62
|
+
<button type="button" class="close" @click="closeFile"><span>×</span></button>
|
|
63
|
+
<h4 class="modal-title">选择文件</h4>
|
|
64
|
+
</header>
|
|
65
|
+
<article slot="modal-body" class="modal-body">
|
|
66
|
+
<div class="form-group">
|
|
67
|
+
<file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
68
|
+
</div>
|
|
69
|
+
</article>
|
|
70
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
71
|
+
</modal>
|
|
72
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
73
|
+
:backdrop="false" :title="title">
|
|
74
|
+
<header slot="modal-header" class="modal-header">
|
|
75
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
76
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
77
|
+
</header>
|
|
78
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
79
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
80
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
81
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
82
|
+
<div class="col-sm-6 text-right"><button
|
|
83
|
+
class="button_delete button_spacing"
|
|
84
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
85
|
+
v-if="title === '新增'"
|
|
86
|
+
>删除</button></div>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="form-group col-sm-6">
|
|
89
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
90
|
+
<div class="col-sm-8">
|
|
91
|
+
<input-select
|
|
92
|
+
class="select select_list"
|
|
93
|
+
:value.sync="item.material"
|
|
94
|
+
v-model="item.material"
|
|
95
|
+
:options="meterialOptions"
|
|
96
|
+
:disable="mark === 1"
|
|
97
|
+
@change="modifyOtherValue(i)"
|
|
98
|
+
:valueSingle="true"></input-select>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
102
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
103
|
+
<div class="col-sm-8">
|
|
104
|
+
<input class="form-control input_view" style="" type="text"
|
|
105
|
+
placeholder="材料名称"
|
|
106
|
+
v-model="item.f_material_name"
|
|
107
|
+
:value="item.f_material_name"
|
|
108
|
+
/>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
112
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
113
|
+
<div class="col-sm-8">
|
|
114
|
+
<input class="form-control input_view" style="" type="text"
|
|
115
|
+
placeholder="材料型号"
|
|
116
|
+
v-model="item.f_material_style"
|
|
117
|
+
:value="item.f_material_style"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div class="form-group col-sm-6" :class="[item.f_material_price ? '' : 'has-error']">
|
|
122
|
+
<label class="col-sm-4 control-label">材料单价:</label>
|
|
123
|
+
<div class="col-sm-8">
|
|
124
|
+
<input class="form-control input_view" style="" type="text"
|
|
125
|
+
placeholder="材料单位"
|
|
126
|
+
v-model="item.f_material_price"
|
|
127
|
+
:value="item.f_material_price"
|
|
128
|
+
/>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
132
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
133
|
+
<div class="col-sm-8">
|
|
134
|
+
<input class="form-control input_view" style="" type="text"
|
|
135
|
+
placeholder="材料单位"
|
|
136
|
+
v-model="item.f_material_unit"
|
|
137
|
+
:value="item.f_material_unit"
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
142
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
143
|
+
<div class="col-sm-8">
|
|
144
|
+
<input class="form-control input_view" style="" type="number"
|
|
145
|
+
placeholder="设备数量"
|
|
146
|
+
v-model="item.f_material_number"
|
|
147
|
+
:value="item.f_material_number"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
<div class="form-group col-sm-6">
|
|
152
|
+
<label class="col-sm-4 control-label">材料编号:</label>
|
|
153
|
+
<div class="col-sm-8">
|
|
154
|
+
<input class="form-control input_view" style="" type="text"
|
|
155
|
+
placeholder="材料编号"
|
|
156
|
+
v-model="item.f_bjq_sid"
|
|
157
|
+
:value="item.f_bjq_sid"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="form-group col-sm-6">
|
|
162
|
+
<label class="col-sm-4 control-label">材料标识:</label>
|
|
163
|
+
<div class="col-sm-8">
|
|
164
|
+
<input class="form-control input_view" style=""
|
|
165
|
+
placeholder="材料标识"
|
|
166
|
+
v-model="item.f_material_code"
|
|
167
|
+
:value.sync="item.f_material_code"
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div class="form-group col-sm-6">
|
|
173
|
+
<label class="col-sm-4 control-label">用户编号:</label>
|
|
174
|
+
<div class="col-sm-8">
|
|
175
|
+
<input class="form-control input_view" style=""
|
|
176
|
+
placeholder="用户编号"
|
|
177
|
+
v-model="item.f_userinfo_code"
|
|
178
|
+
:value.sync="item.f_userinfo_code"
|
|
179
|
+
/>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
</article>
|
|
186
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
187
|
+
<template v-if="mark !== 1">
|
|
188
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
189
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()" :disabled="!$v.valid">确认添加</button>
|
|
190
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()" :disabled="!$v.valid">确认修改</button>
|
|
191
|
+
</template>
|
|
192
|
+
</footer>
|
|
193
|
+
</modal>
|
|
194
|
+
</div>
|
|
195
|
+
</template>
|
|
196
|
+
|
|
197
|
+
<script>
|
|
198
|
+
import {HttpResetClass} from 'vue-client'
|
|
199
|
+
import Vue from "vue";
|
|
200
|
+
import {isEmpty} from '../../../components/Util'
|
|
201
|
+
export default {
|
|
202
|
+
name: 'addMaterialScience',
|
|
203
|
+
props: {
|
|
204
|
+
selectdata: {
|
|
205
|
+
type: Object
|
|
206
|
+
},
|
|
207
|
+
mark: {
|
|
208
|
+
type: Number,
|
|
209
|
+
default: 0
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
data () {
|
|
213
|
+
return {
|
|
214
|
+
showFile: false,
|
|
215
|
+
onetomany: {
|
|
216
|
+
rows: []
|
|
217
|
+
},
|
|
218
|
+
title:'新增',
|
|
219
|
+
showMaterialModal:false,
|
|
220
|
+
materials:[
|
|
221
|
+
{
|
|
222
|
+
material:'',
|
|
223
|
+
f_material_name:'',
|
|
224
|
+
f_material_style:'',
|
|
225
|
+
f_material_unit:'',
|
|
226
|
+
f_material_price:'',
|
|
227
|
+
f_material_number:'',
|
|
228
|
+
f_bjq_sid:'',
|
|
229
|
+
f_material_code:'',
|
|
230
|
+
f_userinfo_code:''
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
meterialOptions:[],
|
|
234
|
+
row:{}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
ready(){
|
|
238
|
+
this.getOnetoManyData()
|
|
239
|
+
},
|
|
240
|
+
methods: {
|
|
241
|
+
async getOnetoManyData () {
|
|
242
|
+
let data = {
|
|
243
|
+
tablename: `t_material_apply`,
|
|
244
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
245
|
+
}
|
|
246
|
+
let res = await this.$resetpost(
|
|
247
|
+
'rs/sql/apply_singleTable',
|
|
248
|
+
{data: data},
|
|
249
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
250
|
+
)
|
|
251
|
+
this.onetomany.rows = res.data
|
|
252
|
+
},
|
|
253
|
+
async openMaterialModal () {
|
|
254
|
+
this.getMateralNames()
|
|
255
|
+
this.title = '新增'
|
|
256
|
+
this.materials = [
|
|
257
|
+
{
|
|
258
|
+
material:'',
|
|
259
|
+
f_material_name:'',
|
|
260
|
+
f_material_style:'',
|
|
261
|
+
f_material_unit:'',
|
|
262
|
+
f_material_price:'',
|
|
263
|
+
f_material_number:'',
|
|
264
|
+
f_bjq_sid:'',
|
|
265
|
+
f_material_code:'',
|
|
266
|
+
f_userinfo_code:''
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
this.showMaterialModal = true
|
|
270
|
+
},
|
|
271
|
+
closeFile() {
|
|
272
|
+
this.showWork = false
|
|
273
|
+
this.showFile = false
|
|
274
|
+
// 将选的文件清空
|
|
275
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
276
|
+
this.search()
|
|
277
|
+
},
|
|
278
|
+
deleteDevicesinfo (index) {
|
|
279
|
+
this.materials.splice(index, 1)
|
|
280
|
+
},
|
|
281
|
+
pushMaterial () {
|
|
282
|
+
this.materials.push({
|
|
283
|
+
material:'',
|
|
284
|
+
f_material_name:'',
|
|
285
|
+
f_material_style:'',
|
|
286
|
+
f_material_unit:'',
|
|
287
|
+
f_material_price:'',
|
|
288
|
+
f_material_number:'',
|
|
289
|
+
f_bjq_sid:'',
|
|
290
|
+
f_material_code:'',
|
|
291
|
+
f_userinfo_code:''
|
|
292
|
+
})
|
|
293
|
+
},
|
|
294
|
+
// 获取模态框材料
|
|
295
|
+
async getMateralNames () {
|
|
296
|
+
let data = {
|
|
297
|
+
condition: `1=1`
|
|
298
|
+
}
|
|
299
|
+
let http = new HttpResetClass()
|
|
300
|
+
let res = await http.load(
|
|
301
|
+
'POST',
|
|
302
|
+
`rs/sql/getStockMaterial`,
|
|
303
|
+
{data: data},
|
|
304
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
this.meterialOptions = res.data.map(item => {
|
|
308
|
+
return {
|
|
309
|
+
'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}--${item.f_material_code}`,
|
|
310
|
+
'value': item
|
|
311
|
+
}
|
|
312
|
+
})
|
|
313
|
+
},
|
|
314
|
+
modifyOtherValue (index){
|
|
315
|
+
console.log("进来了",index)
|
|
316
|
+
console.log("dddd",this.materials[index].material)
|
|
317
|
+
let material = this.materials[index].material
|
|
318
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
319
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
320
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
321
|
+
this.materials[index].f_material_price = material.f_material_price
|
|
322
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
323
|
+
this.materials[index].f_material_code = material.f_material_code
|
|
324
|
+
this.materials[index].f_userinfo_code = material.f_userinfo_code
|
|
325
|
+
},
|
|
326
|
+
// 新增材料
|
|
327
|
+
async addMaterial () {
|
|
328
|
+
console.log("登录信息:",this.$login.f)
|
|
329
|
+
this.title = '新增'
|
|
330
|
+
let data = {
|
|
331
|
+
f_process_id : this.selectdata.f_process_id,
|
|
332
|
+
f_operator_id: this.$login.f.id,
|
|
333
|
+
f_operator: this.$login.f.name,
|
|
334
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
335
|
+
f_orgid: this.$login.f.orgid,
|
|
336
|
+
f_orgname: this.$login.f.orgs,
|
|
337
|
+
materials:this.materials
|
|
338
|
+
}
|
|
339
|
+
let res = await this.$resetpost(
|
|
340
|
+
`rs/logic/applysaveMaterials`,
|
|
341
|
+
data
|
|
342
|
+
)
|
|
343
|
+
console.log(this.materials)
|
|
344
|
+
this.saveContract(this.materials)
|
|
345
|
+
},
|
|
346
|
+
async deleteMaterial (row) {
|
|
347
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
348
|
+
if(show1 != true){
|
|
349
|
+
this.closeMaterials()
|
|
350
|
+
}else{
|
|
351
|
+
debugger
|
|
352
|
+
let http = new HttpResetClass()
|
|
353
|
+
let res = await http.load(
|
|
354
|
+
'POST',
|
|
355
|
+
`rs/logic/deleteMaterial`,
|
|
356
|
+
{data: row},
|
|
357
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
358
|
+
)
|
|
359
|
+
this.closeMaterials()
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
},
|
|
363
|
+
async updateMaterial (index,row) {
|
|
364
|
+
this.title = '修改'
|
|
365
|
+
this.row = row
|
|
366
|
+
this.getMateralNames()
|
|
367
|
+
this.materials = [
|
|
368
|
+
{
|
|
369
|
+
material:'',
|
|
370
|
+
f_material_name:row.f_material_name,
|
|
371
|
+
f_material_style:row.f_material_style,
|
|
372
|
+
f_material_price:row.f_material_price,
|
|
373
|
+
f_material_unit:row.f_material_unit,
|
|
374
|
+
f_material_number:row.f_material_number,
|
|
375
|
+
f_material_code:row.f_material_code,
|
|
376
|
+
f_userinfo_code:row.f_userinfo_code,
|
|
377
|
+
f_bjq_sid: row.f_bjq_sid
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
this.showMaterialModal = true
|
|
381
|
+
},
|
|
382
|
+
async updateConfirm () {
|
|
383
|
+
let data = this.row
|
|
384
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
385
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
386
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
387
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
388
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
389
|
+
data.f_material_code = this.materials[0].f_material_code
|
|
390
|
+
data.f_bjq_sid = this.materials[0].f_bjq_sid
|
|
391
|
+
data.f_userinfo_code = this.materials[0].f_userinfo_code
|
|
392
|
+
|
|
393
|
+
let res = await this.$resetpost(
|
|
394
|
+
`rs/entity/t_material_apply`,
|
|
395
|
+
data
|
|
396
|
+
)
|
|
397
|
+
this.closeMaterials()
|
|
398
|
+
},
|
|
399
|
+
sycronizedCode(index,val){
|
|
400
|
+
console.log("看看:",index,val)
|
|
401
|
+
this.materials[index].f_material_code = val
|
|
402
|
+
},
|
|
403
|
+
closeMaterials () {
|
|
404
|
+
this.getOnetoManyData()
|
|
405
|
+
this.showMaterialModal = false
|
|
406
|
+
},
|
|
407
|
+
// 添加材料之后,直接追加金额
|
|
408
|
+
async saveContract(materials) {
|
|
409
|
+
if (isEmpty(this.selectdata.f_contract_money)) {
|
|
410
|
+
this.$showAlert('请先录入主合同金额!!!', 'warning', 3000)
|
|
411
|
+
return
|
|
412
|
+
}
|
|
413
|
+
let num = 0
|
|
414
|
+
for (let i = 0;i < materials.length;i++){
|
|
415
|
+
num += materials[i].f_material_price * materials[i].f_material_number
|
|
416
|
+
}
|
|
417
|
+
let contract = {
|
|
418
|
+
f_contract_number:this.selectdata.f_contract_money,
|
|
419
|
+
f_contract_type: '材料费',
|
|
420
|
+
f_contract_money: num,
|
|
421
|
+
f_remarks: this.$login.f.name + '录入材料费用'
|
|
422
|
+
}
|
|
423
|
+
let http = new HttpResetClass()
|
|
424
|
+
let data = {
|
|
425
|
+
contract: contract,
|
|
426
|
+
user: this.$login.f,
|
|
427
|
+
selectdata: this.selectdata
|
|
428
|
+
}
|
|
429
|
+
let res = await http.load('POST', 'rs/logic/addApplyContract', {data: data}, {
|
|
430
|
+
resolveMsg: null,
|
|
431
|
+
rejectMsg: '添加失败'
|
|
432
|
+
})
|
|
433
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
events: {
|
|
437
|
+
'beforeFileUpload' (file) {
|
|
438
|
+
this.showWork = true
|
|
439
|
+
},
|
|
440
|
+
async 'onFileUpload'(file, result) {
|
|
441
|
+
let data = {
|
|
442
|
+
selectdata: this.selectdata,
|
|
443
|
+
filepath: result.f_downloadpath,
|
|
444
|
+
user: this.$login.f
|
|
445
|
+
}
|
|
446
|
+
try {
|
|
447
|
+
let res = await this.$resetpost(`rs/logic/importMaterial`, {data: data}, {
|
|
448
|
+
resolveMsg: null,
|
|
449
|
+
rejectMsg: '导入失败!!!',
|
|
450
|
+
silent: true
|
|
451
|
+
}, 0)
|
|
452
|
+
} catch (e) {
|
|
453
|
+
this.closeFile()
|
|
454
|
+
}
|
|
455
|
+
this.$dispatch('breakControl', this.selectdata)
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
</script>
|
|
461
|
+
|
|
462
|
+
<style scoped>
|
|
463
|
+
|
|
464
|
+
</style>
|