|
@@ -44,6 +44,13 @@
|
|
|
<div>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
+ v-if="item.payStatus != 0"
|
|
|
+ link
|
|
|
+ @click="handleRefund(item)"
|
|
|
+ >退款</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
link
|
|
|
v-if="item.payStatus != 30"
|
|
|
@click="handlePayment(10, item)"
|
|
@@ -102,6 +109,21 @@
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'purchasePayRecordDetailList.' + $index + '.remark'"
|
|
|
+ :rules="rules.remark"
|
|
|
+ :inline-message="true"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="row.remark"
|
|
|
+ placeholder="请输入"
|
|
|
+ type="textarea"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -118,6 +140,35 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ :title="'退款'"
|
|
|
+ v-model="dialogVisibleTwo"
|
|
|
+ width="800"
|
|
|
+ v-loading="submitLoading"
|
|
|
+ destroy-on-close
|
|
|
+ >
|
|
|
+ <byForm
|
|
|
+ :formConfig="formConfigOne"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formData.dataOne"
|
|
|
+ :rules="rulesOne"
|
|
|
+ ref="byformOne"
|
|
|
+ >
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="dialogVisibleTwo = false" size="large"
|
|
|
+ >取 消</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitFormOne()"
|
|
|
+ size="large"
|
|
|
+ :loading="submitLoading"
|
|
|
+ >
|
|
|
+ 确 定
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<el-dialog
|
|
|
v-model="dialogVisibleOne"
|
|
@@ -141,6 +192,7 @@
|
|
|
付款金额:{{ moneyFormat(activity.amount, 2) }}
|
|
|
</div>
|
|
|
<div style="margin-top: 5px">付款时间: {{ activity.payDate }}</div>
|
|
|
+ <div style="margin-top: 5px">付款备注: {{ activity.remark }}</div>
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</div>
|
|
@@ -166,6 +218,7 @@ const sourceList = ref({
|
|
|
pageSize: 10,
|
|
|
type: "",
|
|
|
keyword: "",
|
|
|
+ purchaseStatus: "30,99",
|
|
|
},
|
|
|
});
|
|
|
let dialogVisible = ref(false);
|
|
@@ -179,6 +232,13 @@ let rules = ref({
|
|
|
{ required: true, message: "请选择付款账号", trigger: "change" },
|
|
|
],
|
|
|
});
|
|
|
+let rulesOne = ref({
|
|
|
+ amount: [{ required: true, message: "请输入退款金额", trigger: "blur" }],
|
|
|
+ refundDate: [
|
|
|
+ { required: true, message: "请选择退款时间", trigger: "change" },
|
|
|
+ ],
|
|
|
+ // remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
|
|
|
+});
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const arrivalStatus = ref([
|
|
|
{
|
|
@@ -278,6 +338,16 @@ const config = computed(() => {
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "退款金额",
|
|
|
+ prop: "refundAmount",
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ render(refundAmount) {
|
|
|
+ return proxy.moneyFormat(refundAmount, 2);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "采购人",
|
|
|
prop: "purchaseName",
|
|
|
width: 150,
|
|
@@ -311,7 +381,7 @@ const config = computed(() => {
|
|
|
attrs: {
|
|
|
label: "操作",
|
|
|
slot: "btn",
|
|
|
- width: "180",
|
|
|
+ width: "200",
|
|
|
align: "center",
|
|
|
fixed: "right",
|
|
|
},
|
|
@@ -323,6 +393,7 @@ let formData = reactive({
|
|
|
data: {
|
|
|
type: "1",
|
|
|
},
|
|
|
+ dataOne: {},
|
|
|
});
|
|
|
const formOption = reactive({
|
|
|
inline: true,
|
|
@@ -331,7 +402,6 @@ const formOption = reactive({
|
|
|
rules: [],
|
|
|
});
|
|
|
const byform = ref(null);
|
|
|
-
|
|
|
let formConfig = computed(() => [
|
|
|
{
|
|
|
type: "input",
|
|
@@ -364,6 +434,13 @@ let formConfig = computed(() => [
|
|
|
disabled: true,
|
|
|
},
|
|
|
{
|
|
|
+ type: "input",
|
|
|
+ itemType: "textarea",
|
|
|
+ prop: "remark",
|
|
|
+ label: "备注",
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
type: "title",
|
|
|
title: "付款明细",
|
|
|
},
|
|
@@ -373,6 +450,47 @@ let formConfig = computed(() => [
|
|
|
label: "",
|
|
|
},
|
|
|
]);
|
|
|
+const dialogVisibleTwo = ref(false);
|
|
|
+const byformOne = ref(null);
|
|
|
+let formConfigOne = computed(() => [
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "supplyName",
|
|
|
+ label: "供应商",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "contractCode",
|
|
|
+ label: "采购单号",
|
|
|
+ disabled: true,
|
|
|
+ itemWidth: 34,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ prop: "refundDate",
|
|
|
+ label: "退款时间",
|
|
|
+ format: "YYYY-MM-DD HH:mm:ss",
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ prop: "amount",
|
|
|
+ label: "退款金额",
|
|
|
+ precision: 4,
|
|
|
+ min: 1,
|
|
|
+ controls: false,
|
|
|
+ // disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ itemType: "textarea",
|
|
|
+ prop: "remark",
|
|
|
+ label: "备注",
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+]);
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
@@ -425,6 +543,26 @@ const submitForm = () => {
|
|
|
);
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+const submitFormOne = () => {
|
|
|
+ byformOne.value.handleSubmit((valid) => {
|
|
|
+ submitLoading.value = true;
|
|
|
+ proxy.post("/purchaseRefundRecord/add", formData.dataOne).then(
|
|
|
+ (res) => {
|
|
|
+ ElMessage({
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ dialogVisibleTwo.value = false;
|
|
|
+ submitLoading.value = false;
|
|
|
+ getList();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ submitLoading.value = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+};
|
|
|
const selectData = ref([]);
|
|
|
const selectRow = (data) => {
|
|
|
selectData.value = data;
|
|
@@ -465,11 +603,24 @@ const handlePayment = (type, data) => {
|
|
|
waitAmount: x.amount,
|
|
|
alreadyAmount: x.paidAmount,
|
|
|
amount: null,
|
|
|
+ remark: "",
|
|
|
})),
|
|
|
};
|
|
|
dialogVisible.value = true;
|
|
|
};
|
|
|
|
|
|
+const handleRefund = (row) => {
|
|
|
+ formData.dataOne = {
|
|
|
+ purchaseId: row.id,
|
|
|
+ supplyName: row.supplyName,
|
|
|
+ contractCode: row.contractCode,
|
|
|
+ amount: "",
|
|
|
+ refundDate: "",
|
|
|
+ remark: "",
|
|
|
+ };
|
|
|
+ dialogVisibleTwo.value = true;
|
|
|
+};
|
|
|
+
|
|
|
const handleClickPayStatus = (row) => {
|
|
|
proxy
|
|
|
.post("/purchasePayRecordDetail/page", { purchaseId: row.id })
|