|
@@ -73,7 +73,7 @@
|
|
|
<el-dialog
|
|
|
:title="'付款'"
|
|
|
v-model="dialogVisible"
|
|
|
- width="800"
|
|
|
+ width="80%"
|
|
|
v-loading="submitLoading"
|
|
|
destroy-on-close
|
|
|
:before-close="handleClose"
|
|
@@ -89,6 +89,19 @@
|
|
|
<div style="width: 100%">
|
|
|
<el-table :data="formData.data.purchasePayRecordDetailList">
|
|
|
<el-table-column prop="code" label="采购单号" />
|
|
|
+ <el-table-column
|
|
|
+ prop="isAgreement"
|
|
|
+ label="是否合同"
|
|
|
+ :formatter="(row) => (row.isAgreement == 1 ? '是' : '否')"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ prop="paymentMethod"
|
|
|
+ label="付款方式"
|
|
|
+ :formatter="
|
|
|
+ (row) => dictValueLabel(row.paymentMethod, fundsPaymentMethod)
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <el-table-column prop="remark" label="采购备注" />
|
|
|
<el-table-column prop="waitAmount" label="采购金额" />
|
|
|
<el-table-column prop="alreadyAmount" label="已付款金额" />
|
|
|
<el-table-column prop="amount" label="付款金额" min-width="150">
|
|
@@ -410,6 +423,7 @@ const paymentStatus = ref([
|
|
|
},
|
|
|
]);
|
|
|
const alreadyPurchase = ref([]);
|
|
|
+const deptData = ref([]);
|
|
|
const selectConfig = computed(() => [
|
|
|
{
|
|
|
label: "到货状态",
|
|
@@ -426,6 +440,11 @@ const selectConfig = computed(() => [
|
|
|
prop: "purchaseUserId",
|
|
|
data: alreadyPurchase.value,
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "项目组",
|
|
|
+ prop: "deptId",
|
|
|
+ data: deptData.value,
|
|
|
+ },
|
|
|
]);
|
|
|
const config = computed(() => {
|
|
|
return [
|
|
@@ -455,6 +474,13 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "项目组",
|
|
|
+ prop: "deptName",
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "采购金额",
|
|
|
prop: "amount",
|
|
|
width: 100,
|
|
@@ -741,7 +767,22 @@ const submitFormOne = () => {
|
|
|
};
|
|
|
const selectData = ref([]);
|
|
|
const selectRow = (data) => {
|
|
|
- selectData.value = data;
|
|
|
+ if (data && data.length > 0) {
|
|
|
+ selectData.value = data.map((x) => {
|
|
|
+ if (x.victoriatouristJson) {
|
|
|
+ let obj = JSON.parse(x.victoriatouristJson);
|
|
|
+ if (obj.isAgreement) {
|
|
|
+ x.isAgreement = obj.isAgreement;
|
|
|
+ }
|
|
|
+ if (obj.paymentMethod) {
|
|
|
+ x.paymentMethod = obj.paymentMethod;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return x;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ selectData.value = [];
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const handleClose = () => {
|
|
@@ -780,6 +821,9 @@ const handlePayment = (type, data) => {
|
|
|
alreadyAmount: x.paidAmount,
|
|
|
amount: null,
|
|
|
remark: "",
|
|
|
+ isAgreement: x.isAgreement,
|
|
|
+ paymentMethod: x.paymentMethod,
|
|
|
+ remark: x.remark,
|
|
|
})),
|
|
|
};
|
|
|
dialogVisible.value = true;
|
|
@@ -867,6 +911,7 @@ const handleChangeAmount = () => {
|
|
|
formData.data.amount = parseFloat(amount).toFixed(4);
|
|
|
};
|
|
|
const accountData = ref([]);
|
|
|
+const fundsPaymentMethod = ref([]);
|
|
|
const getDict = () => {
|
|
|
proxy.get("/purchase/getPurchaseUserList").then((res) => {
|
|
|
alreadyPurchase.value = res.data.map((x) => ({
|
|
@@ -874,12 +919,26 @@ const getDict = () => {
|
|
|
value: x.userId,
|
|
|
}));
|
|
|
});
|
|
|
- proxy.getDictOne(["purchase_payment_account"]).then((res) => {
|
|
|
- accountData.value = res["purchase_payment_account"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
+ proxy.get("/purchase/getDepts").then((res) => {
|
|
|
+ deptData.value = res.data.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ label: x.deptName,
|
|
|
+ value: x.deptId,
|
|
|
}));
|
|
|
});
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .getDictOne(["purchase_payment_account", "funds_payment_method"])
|
|
|
+ .then((res) => {
|
|
|
+ accountData.value = res["purchase_payment_account"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ fundsPaymentMethod.value = res["funds_payment_method"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const handleClickContractCode = (row) => {
|