apply-clients 3.4.29 → 3.4.31

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.4.29",
3
+ "version": "3.4.31",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -10,6 +10,8 @@
10
10
  <th class="textNoLineBreak">材料数量</th>
11
11
  <th class="textNoLineBreak">材料金额</th>
12
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>
13
15
  <th class="textNoLineBreak">
14
16
  <button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
15
17
  </button>
@@ -221,6 +223,8 @@
221
223
  f_material_remarks:''
222
224
  }
223
225
  ],
226
+ summoney:0,
227
+ twomoney:0,
224
228
  meterialOptions: [],
225
229
  row: {},
226
230
  bjqChecklag:[],
@@ -232,6 +236,19 @@
232
236
  this.getOnetoManyData()
233
237
  },
234
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
+ },
235
252
  sumMaterialmoney(index){
236
253
  this.materials[index].f_material_money = this.materials[index].f_material_price * this.materials[index].f_material_number
237
254
  console.log('打印',this.materials[index].f_material_money)
@@ -249,6 +266,7 @@
249
266
  {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
250
267
  )
251
268
  this.onetomany.rows = res.data
269
+ this.sumMaterialzong(this.onetomany.rows)
252
270
  },
253
271
  async openMaterialModal() {
254
272
  this.getMateralNames()
@@ -221,7 +221,7 @@
221
221
  for(var i=0;i<materials.length; i++){
222
222
  this.summoney =parseFloat(parseFloat(materials[i].f_material_money)+ parseFloat(this.summoney)).toFixed(2)
223
223
  }
224
- this.twomoney= parseFloat(parseFloat(this.summoney)- parseFloat(this.selectdata.f_sumtwo_money)).toFixed(2)
224
+ this.twomoney= parseFloat(parseFloat(this.summoney)- parseFloat(this.selectdata.f_sumtwo_money== 0 || this.selectdata.f_sumtwo_money == null || this.selectdata.f_sumtwo_money =='' ? 0: this.selectdata.f_sumtwo_money)).toFixed(2)
225
225
  console.log('打印材料总金额',this.summoney)
226
226
  if(this.selectdata.defname=='工程施工'){
227
227
  this.selectdata.f_sumtwo_money = this.summoney