|
@@ -12,9 +12,8 @@
|
|
|
</el-tabs>
|
|
|
<el-button type="primary" icon="el-icon-plus" size="small" @click.stop="rowAdd" :loading="buttonLoading"
|
|
|
:disabled="disabled">录入明细</el-button>
|
|
|
- <!--<el-button type="warning" size="small" @click.stop="billingDetails('收费')" :loading="buttonLoading" :disabled="-->
|
|
|
- <!-- (financeDisabled && disabled) || selectionList.length == 0-->
|
|
|
- <!--" v-if="selectTab === 1&&billingShow">生成账单</el-button>-->
|
|
|
+ <el-button type="warning" size="small" @click.stop="billingDetails('收费')" :loading="buttonLoading" :disabled="(financeDisabled && disabled) || selectionList.length == 0
|
|
|
+ " v-if="selectTab === 1 && billingShow">生成账单</el-button>
|
|
|
<el-button type="warning" size="small" @click.stop="billingDetails('申请')" :loading="buttonLoading" :disabled="(financeDisabled && disabled) || selectionList.length == 0
|
|
|
" v-if="selectTab === 2 && billingShow">申请付费</el-button>
|
|
|
</template>
|
|
@@ -50,24 +49,29 @@
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{ row,index }">
|
|
|
<el-input-number v-if="row.$cellEdit" v-model="row.price" placeholder="请输入" size="small" :controls="false"
|
|
|
- :precision="2" @input="countChange(row)" style="width: 100%" :min="paramValue==0?0:'-Infinity'"></el-input-number>
|
|
|
+ :precision="2" @input="countChange(row)" style="width: 100%"
|
|
|
+ :min="paramValue == 0 ? 0 : '-Infinity'"></el-input-number>
|
|
|
<span v-else>{{ row.price | micrometerFormat2 }}</span>
|
|
|
</template>
|
|
|
<template slot="quantity" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.$cellEdit && !isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
|
|
|
- :controls="false" :precision="0" @input="countChange(row)" style="width: 100%" :min="paramValue==0?0:'-Infinity'"></el-input-number>
|
|
|
+ :controls="false" :precision="0" @input="countChange(row)" style="width: 100%"
|
|
|
+ :min="paramValue == 0 ? 0 : '-Infinity'"></el-input-number>
|
|
|
<el-input-number v-if="row.$cellEdit && isDecimal" v-model="row.quantity" size="small" placeholder="请输入"
|
|
|
- :controls="false" :precision="6" @input="countChange(row)" style="width: 100%" :min="paramValue==0?0:'-Infinity'"></el-input-number>
|
|
|
+ :controls="false" :precision="6" @input="countChange(row)" style="width: 100%"
|
|
|
+ :min="paramValue == 0 ? 0 : '-Infinity'"></el-input-number>
|
|
|
<span v-else>{{ row.quantity | decimalFormat2 }}</span>
|
|
|
</template>
|
|
|
<template slot="amount" slot-scope="{ row }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" placeholder="请输入"
|
|
|
- :controls="false" :precision="2" @input="countChange(row)" style="width: 100%" :min="paramValue==0?0:'-Infinity'"></el-input-number>
|
|
|
+ <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" placeholder="请输入" :controls="false"
|
|
|
+ :precision="2" @input="countChange(row)" style="width: 100%"
|
|
|
+ :min="paramValue == 0 ? 0 : '-Infinity'"></el-input-number>
|
|
|
<span v-else>{{ row.amount | micrometerFormat2 }}</span>
|
|
|
</template>
|
|
|
<template slot="exchangeRate" slot-scope="{ row }">
|
|
|
<el-input-number v-if="row.$cellEdit" v-model="row.exchangeRate" size="small" :controls="false" :precision="6"
|
|
|
- @change="rateChange(row)" style="width: 100%" placeholder="请输入" :min="paramValue==0?0:'-Infinity'"></el-input-number>
|
|
|
+ @change="rateChange(row)" style="width: 100%" placeholder="请输入"
|
|
|
+ :min="paramValue == 0 ? 0 : '-Infinity'"></el-input-number>
|
|
|
<span v-else>{{ row.exchangeRate }}</span>
|
|
|
</template>
|
|
|
<template slot="currency" slot-scope="{ row }">
|
|
@@ -137,7 +141,7 @@ import _ from "lodash";
|
|
|
import ApplyPayment from "../finance/applyPayment";
|
|
|
import {
|
|
|
applyLoan,
|
|
|
- paymentApply
|
|
|
+ generateBills
|
|
|
} from "@/api/financialManagement/paymentRequest";
|
|
|
import { contrastList } from "@/util/contrastData";
|
|
|
import { allCropList, paramserviceDetail } from "@/api/basicData/customerInformation";
|
|
@@ -822,12 +826,34 @@ export default {
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(() => {
|
|
|
+ let obj = {}
|
|
|
+ let id = null
|
|
|
+ let itemIds = []
|
|
|
+ for(let i=0;i<this.selectionList.length;i++){
|
|
|
+ // if()
|
|
|
+ if(i==0){
|
|
|
+ id = this.selectionList[i].pid
|
|
|
+ }
|
|
|
+ itemIds.push(this.selectionList[i].id)
|
|
|
+ }
|
|
|
+ // this.selectionList.forEach(e => {
|
|
|
+ // id = e.pid
|
|
|
+ // itemIds.push(e.id)
|
|
|
+ // })
|
|
|
+ if (!id) {
|
|
|
+ return this.$message.error("请保存费用明细在操作");
|
|
|
+ }
|
|
|
+ obj = {
|
|
|
+ billId: id,
|
|
|
+ ids: itemIds.join(',')
|
|
|
+ }
|
|
|
+
|
|
|
this.buttonLoading = true;
|
|
|
- paymentApply(data)
|
|
|
- .then(res => {
|
|
|
+ generateBills(obj).then(res => {
|
|
|
if (res.data.success) {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.$emit("afterFinance");
|
|
|
+ this.$emit('retrieve')
|
|
|
}
|
|
|
})
|
|
|
.finally(() => {
|