|
|
@@ -106,6 +106,17 @@
|
|
|
</up-input>
|
|
|
</up-form-item>
|
|
|
</view>
|
|
|
+ <up-form-item prop="otheramount">
|
|
|
+ <text style="margin-right: 20rpx;">
|
|
|
+ 其他费用
|
|
|
+ </text>
|
|
|
+ <up-input v-model="form.otheramount" @change="changeAmount($event, 'otheramount')" type="digit"
|
|
|
+ placeholder="其他费用">
|
|
|
+ <template #suffix>
|
|
|
+ 元
|
|
|
+ </template>
|
|
|
+ </up-input>
|
|
|
+ </up-form-item>
|
|
|
<up-form-item label="总费用" prop="amountpay" :required="workpresetjson.amountpay == 11">
|
|
|
<up-input :disabled="true" v-model="form.amountpay" type="digit" placeholder="总费用">
|
|
|
<template #suffix>
|
|
|
@@ -189,12 +200,15 @@ function beforeleave(e) {
|
|
|
function changeAmount(e, key) {
|
|
|
let door = parseFloat(form.dooramount) || 0;
|
|
|
let acc = parseFloat(form.accessoryamount) || 0;
|
|
|
+ let other = parseFloat(form.otheramount) || 0;
|
|
|
if (key == 'dooramount') {
|
|
|
door = parseFloat(e) || 0;
|
|
|
- } else {
|
|
|
+ } else if (key == 'accessoryamount') {
|
|
|
acc = parseFloat(e) || 0;
|
|
|
+ } else if (key == 'otheramount') {
|
|
|
+ other = parseFloat(e) || 0;
|
|
|
}
|
|
|
- form.amountpay = door + acc;
|
|
|
+ form.amountpay = door + acc + other;
|
|
|
}
|
|
|
|
|
|
// 去添加配件
|
|
|
@@ -300,6 +314,7 @@ let formToContent = (form) => {
|
|
|
}
|
|
|
if (content.amount === '') content.amount = 0;
|
|
|
if (content.dooramount === '') content.dooramount = 0;
|
|
|
+ if (content.otheramount === '') content.otheramount = 0;
|
|
|
if (content.accessoryamount === '') content.accessoryamount = 0;
|
|
|
return content;
|
|
|
}
|
|
|
@@ -354,6 +369,7 @@ onLoad(() => {
|
|
|
if (workpresetjson.amountpay != 0) {
|
|
|
form.dooramount = data.dooramount || 0;
|
|
|
form.accessoryamount = data.accessoryamount || 0;
|
|
|
+ form.otheramount = data.otheramount || 0;
|
|
|
$Http.basic({
|
|
|
"id": "2025112114461803",
|
|
|
"sa_workorderid": data.sa_workorderid,
|