|
|
@ -300,13 +300,13 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty" style="border-right: 0px">应收合计:</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ ysTotal }} = 工时费:{{ gsfTotal }} + 材料费:{{ clfTotal }} + 附加费:{{ fjfTotal }}</span></el-form-item> |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.receivableAmount }} = 工时费:{{ formobj.hourAmount }} + 材料费:{{ formobj.goodsAmount }} + 附加费:{{ formobj.addAmount }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty" style="border-right: 0px">实收合计:</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ ssTotal }} = 应收合计:{{ ysTotal }} - 优惠:{{ yhTotal }}</span></el-form-item> |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.actualAmount }} = 应收合计:{{ formobj.receivableAmount }} - 优惠:{{ formobj.discountAmount }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
@ -448,76 +448,6 @@ export default { |
|
|
|
rules: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 计算工时费 = 维修项目列表中所有销售价之和 |
|
|
|
gsfTotal() { |
|
|
|
let gsf = '0' |
|
|
|
if (this.formobj.sitemVos.length > 0) { |
|
|
|
this.formobj.sitemVos.forEach((e) => { |
|
|
|
if (e.serviceItem !== '') { |
|
|
|
gsf = Math.round((parseFloat(gsf) + parseFloat(e.price !== '' ? e.price : '0')) * 100) / 100 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
return gsf |
|
|
|
}, |
|
|
|
// 计算材料费 = 商品列表中所有销售价 * 数量的和 |
|
|
|
clfTotal() { |
|
|
|
let clf = '0' |
|
|
|
if (this.formobj.goodsDetailsVos.length > 0) { |
|
|
|
this.formobj.goodsDetailsVos.forEach((e) => { |
|
|
|
if (e.goodsSpuName !== '') { |
|
|
|
clf = Math.round((parseFloat(clf) + (parseFloat(e.price !== '' ? e.price : '0') * parseFloat(e.count !== '' ? e.count : '0'))) * 100) / 100 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
return clf |
|
|
|
}, |
|
|
|
// 计算附加费 == 外出费 + 厂家补助 + 施救费 + 附加项目列表中所有销售价之和 |
|
|
|
fjfTotal() { |
|
|
|
let fjf = '0' |
|
|
|
fjf = parseFloat(this.formobj.outAmount !== '' ? this.formobj.outAmount : '0') + parseFloat(this.formobj.subsidyAmount !== '' ? this.formobj.subsidyAmount : '0') + parseFloat(this.formobj.rescueAmount !== '' ? this.formobj.rescueAmount : '0') |
|
|
|
if (this.formobj.aitemVos.length > 0) { |
|
|
|
this.formobj.aitemVos.forEach((e) => { |
|
|
|
if (e.aitemName !== '') { |
|
|
|
fjf = Math.round((parseFloat(fjf) + parseFloat(e.price !== '' ? e.price : '0')) * 100) / 100 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
return fjf |
|
|
|
}, |
|
|
|
// 计算应收合计 = 工时费 + 材料费 + 附加费 + 税额 |
|
|
|
ysTotal() { |
|
|
|
let ys = '0' |
|
|
|
ys = Math.round((parseFloat(ys) + parseFloat(this.gsfTotal) + parseFloat(this.clfTotal) + parseFloat(this.fjfTotal)) * 100) / 100 |
|
|
|
return ys |
|
|
|
}, |
|
|
|
// 优惠 = 维修项目列表中的所有优惠之和 + 商品列表中所有优惠之和 |
|
|
|
yhTotal() { |
|
|
|
let yh = '0' |
|
|
|
if (this.formobj.sitemVos.length > 0) { |
|
|
|
this.formobj.sitemVos.forEach((e) => { |
|
|
|
if (e.serviceItem !== '') { |
|
|
|
yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if (this.formobj.goodsDetailsVos.length > 0) { |
|
|
|
this.formobj.goodsDetailsVos.forEach((e) => { |
|
|
|
if (e.goodsSpuName !== '') { |
|
|
|
yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
return yh |
|
|
|
}, |
|
|
|
// 计算实收合计 = 应收合计 - 优惠 |
|
|
|
ssTotal() { |
|
|
|
let ysje = '0' |
|
|
|
ysje = Math.round((parseFloat(ysje) + parseFloat(this.ysTotal) - parseFloat(this.yhTotal)) * 100) / 100 |
|
|
|
return ysje |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showInfo(row) { |
|
|
|
this.viewTitle = '维修单详情' |
|
|
|