|
@@ -14,8 +14,8 @@
|
|
|
<el-button v-if="editStatus" type="primary" size="small" icon="Finished" @click="submitForm">保存</el-button>
|
|
|
<el-button v-else-if="form.verifyStatus === 0" type="warning" size="small" icon="Edit"
|
|
|
@click="editStatus = true">修改</el-button>
|
|
|
- <el-button v-show="form.verifyStatus == 3 " type="warning" size="small" icon="Finished"
|
|
|
- @click="returnZero" v-hasPermi="['business:payment:return']">退回</el-button>
|
|
|
+ <el-button v-show="form.verifyStatus == 3 " type="warning" size="small" icon="Finished" @click="returnZero"
|
|
|
+ v-hasPermi="['business:payment:return']">退回</el-button>
|
|
|
<el-button v-if="form.id && editStatus" size="small" icon="Close"
|
|
|
@click="editStatus = false">取消修改</el-button>
|
|
|
</template>
|
|
@@ -126,7 +126,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-autocomplete>
|
|
|
- <span v-else> <el-link :underline="false" type="primary" @click="handleInfo(form)">{{ form.companyName }}</el-link></span>
|
|
|
+ <span v-else> <el-link :underline="false" type="primary" @click="handleInfo(form)">{{ form.companyName
|
|
|
+ }}</el-link></span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -138,9 +139,10 @@
|
|
|
</template>
|
|
|
</el-input>
|
|
|
<span v-else style="width: 100%">
|
|
|
- <!-- <el-button class="text-overflow" type="primary" link @click="(showContractDialog(currentContract.contractId))">{{ currentContract.formNo }}</el-button> -->
|
|
|
- <!-- {{ form.contractNo }} -->
|
|
|
- <el-link :underline="false" type="primary" @click="handleContract(form)" >{{ form.contractNo }}</el-link>
|
|
|
+ <!-- <el-button class="text-overflow" type="primary" link @click="(showContractDialog(currentContract.contractId))">{{ currentContract.formNo }}</el-button> -->
|
|
|
+ <!-- {{ form.contractNo }} -->
|
|
|
+ <el-link :underline="false" type="primary" @click="handleContract(form)">{{ form.contractNo
|
|
|
+ }}</el-link>
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -218,8 +220,8 @@
|
|
|
<span>{{ rowNum(scope.row.payment) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="可支出金额" align="center" >
|
|
|
+
|
|
|
+ <el-table-column label="可支出金额" align="center">
|
|
|
<template #default="scope">
|
|
|
{{rowNum((Number(scope.row.reallyAmount) || 0) - (Number(scope.row.payment) || 0))}}
|
|
|
</template>
|
|
@@ -242,7 +244,7 @@
|
|
|
}}</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
+
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -402,9 +404,10 @@
|
|
|
savePayment,
|
|
|
listTypes,
|
|
|
listContractDetail,
|
|
|
- verifyPayment,setPaymentZero
|
|
|
+ verifyPayment, setPaymentZero
|
|
|
} from "@/api/business/financial/payment";
|
|
|
import { listSource } from "@/api/settings/source";
|
|
|
+ import { getOrder } from "@/api/business/crm/contract";
|
|
|
import { listUser } from "@/api/system/user";
|
|
|
import CustomerFormCom from "@/components/CustomerFormCom";
|
|
|
import DialogContractChoice from "@/views/dialog/DialogContractChoice.vue";
|
|
@@ -898,30 +901,47 @@
|
|
|
proxy.$refs.contractChoiceRef.open({ companyId: form.value.companyId });
|
|
|
}
|
|
|
|
|
|
- function contractChoiceHandle(info) {
|
|
|
- form.value.details = []
|
|
|
- form.value.contractId = info.id;
|
|
|
- form.value.contractNo = info.contractNo;
|
|
|
- form.value.contractAmount = info.trueAmount;
|
|
|
- form.value.payedAmount = info.paidAmount;
|
|
|
- listContractDetail({ contractId: info.id }).then((res) => {
|
|
|
- const rows = res.rows;
|
|
|
- rows.forEach((item) => {
|
|
|
- const detail = {
|
|
|
- contractId: item.contractId,
|
|
|
- contractDetailId: item.id,
|
|
|
- companyId: form.value.companyId,
|
|
|
- taskTypeId: item.taskTypeId,
|
|
|
- amount: item.amount,
|
|
|
- taskTypeName: item.taskTypeName,
|
|
|
- payment: item.payment,
|
|
|
- reallyAmount: item.reallyAmount,
|
|
|
- explain: item.explain
|
|
|
- };
|
|
|
- form.value.details.push(detail);
|
|
|
- });
|
|
|
+ async function contractChoiceHandle(info) {
|
|
|
+ // 清空之前的详情
|
|
|
+ form.value.details = [];
|
|
|
+
|
|
|
+ // 设置合同信息
|
|
|
+ form.value.contractId = info.id;
|
|
|
+ form.value.contractNo = info.contractNo;
|
|
|
+ form.value.contractAmount = info.trueAmount;
|
|
|
+ form.value.payedAmount = info.paidAmount;
|
|
|
+
|
|
|
+ try {
|
|
|
+ const orderResponse = await getOrder(info.id);
|
|
|
+ form.value.boss = orderResponse.data.boss;
|
|
|
+ form.value.party = orderResponse.data.party;
|
|
|
+
|
|
|
+ const detailResponse = await listContractDetail({ contractId: info.id });
|
|
|
+ const rows = detailResponse.rows;
|
|
|
+
|
|
|
+ // 处理每一行数据
|
|
|
+ rows.forEach((item) => {
|
|
|
+ const detail = {
|
|
|
+ contractId: item.contractId,
|
|
|
+ contractDetailId: item.id,
|
|
|
+ companyId: form.value.companyId,
|
|
|
+ taskTypeId: item.taskTypeId,
|
|
|
+ amount: item.amount,
|
|
|
+ taskTypeName: item.taskTypeName,
|
|
|
+ payment: item.payment,
|
|
|
+ reallyAmount: item.reallyAmount,
|
|
|
+ explain: item.explain
|
|
|
+ };
|
|
|
+ form.value.details.push(detail);
|
|
|
});
|
|
|
+
|
|
|
+ console.log(2323232, form.value);
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error("在 contractChoiceHandle 中发生错误:", error);
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
function handlerDelAttach(row, index) {
|
|
|
proxy.$modal
|