This commit is contained in:
2025-07-07 19:31:29 +08:00
parent b083567241
commit b19e50f135
9 changed files with 34 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import dayjs from "dayjs";
import {throttle} from "lodash"; import {throttle} from "lodash";
import {useSystemStore} from "../../pinia/SystemStore/index.js"; import {useSystemStore} from "../../pinia/SystemStore/index.js";
import UploadSlot from "../upload/UploadSlot.vue"; import UploadSlot from "../upload/UploadSlot.vue";
import useUploadLength from "../../hooks/useUploadLength.js";
const SystemStore = useSystemStore(); const SystemStore = useSystemStore();
const emits = defineEmits(['success']); const emits = defineEmits(['success']);
@@ -33,6 +34,11 @@ const form = reactive({
images: [], images: [],
}); });
useUploadLength({
array: form.images,
length: 5,
});
const {loading, pagination, initFetchData, fetchData} = useTableQuery({ const {loading, pagination, initFetchData, fetchData} = useTableQuery({
parameter: po, parameter: po,
api: SystemStore.isRoot ? Api.admin.getExchangeLogIntervention : Api.merchant.getExchangeLog, api: SystemStore.isRoot ? Api.admin.getExchangeLogIntervention : Api.merchant.getExchangeLog,

View File

@@ -16,6 +16,7 @@ const upload = (e) => {
const createInput = () => { const createInput = () => {
const input = document.createElement('input'); const input = document.createElement('input');
input.type = 'file'; input.type = 'file';
input.multiple = true;
input.onchange = upload; input.onchange = upload;
input.style.display = 'none'; input.style.display = 'none';
document.body.append(input); document.body.append(input);

View File

@@ -0,0 +1,17 @@
import {watch} from "vue";
import {Message} from "@arco-design/web-vue";
const useUploadLength = ({array, length}) => {
watch(
() => array,
(val) => {
if (val.length > length) {
Message.warning(`最多可上传${length}`);
val.length = length;
}
},
{deep: true,}
)
}
export default useUploadLength;

View File

@@ -61,7 +61,7 @@ const success = async () => {
const {msg, code} = await Api.admin.passTask(form); const {msg, code} = await Api.admin.passTask(form);
if (code === 1) Message.success(msg); if (code === 1) Message.success(msg);
emits('success'); emits('success');
visible.value = true; visible.value = false;
} }
</script> </script>

View File

@@ -119,6 +119,7 @@ const checkChange = (checked, record) => {
const plTaskChildren = async () => { const plTaskChildren = async () => {
const {msg} = await Api.admin.plTaskChildren(selectedKeys.value); const {msg} = await Api.admin.plTaskChildren(selectedKeys.value);
Message.success(msg); Message.success(msg);
selectedKeys.value.length = 0;
await fetchData(); await fetchData();
} }
</script> </script>

View File

@@ -135,12 +135,14 @@ const refuseExchange = async (id) => {
const passExchangeAll = async () => { const passExchangeAll = async () => {
const {msg} = await Api.admin.passExchange(selectedKeys.value); const {msg} = await Api.admin.passExchange(selectedKeys.value);
Message.success(msg); Message.success(msg);
selectedKeys.value.length = 0;
await fetchData(); await fetchData();
} }
const refuseExchangeAll = async () => { const refuseExchangeAll = async () => {
const {msg} = await Api.admin.refuseExchange(selectedKeys.value); const {msg} = await Api.admin.refuseExchange(selectedKeys.value);
Message.success(msg); Message.success(msg);
selectedKeys.value.length = 0;
await fetchData(); await fetchData();
} }
</script> </script>

View File

@@ -155,12 +155,14 @@ const refuseExchange = async (id) => {
const passExchangeAll = async () => { const passExchangeAll = async () => {
const {msg} = await Api.admin.passExchange(selectedKeys.value); const {msg} = await Api.admin.passExchange(selectedKeys.value);
Message.success(msg); Message.success(msg);
selectedKeys.value.length = 0;
await fetchData(); await fetchData();
} }
const refuseExchangeAll = async () => { const refuseExchangeAll = async () => {
const {msg} = await Api.admin.refuseExchange(selectedKeys.value); const {msg} = await Api.admin.refuseExchange(selectedKeys.value);
Message.success(msg); Message.success(msg);
selectedKeys.value.length = 0;
await fetchData(); await fetchData();
} }
</script> </script>

View File

@@ -159,7 +159,7 @@ const getStatus = () => Promise.resolve({
data: [ data: [
{ {
id: 0, id: 0,
name: '处理', name: '处理',
color: 'green', color: 'green',
}, },
{ {

View File

@@ -64,16 +64,16 @@ const success = async () => {
{{ detail.account }} {{ detail.account }}
</a-form-item> </a-form-item>
<a-form-item label="提现金额"> <a-form-item label="提现金额">
{{ detail.money }} {{ detail.money?.toFixed(2) }}
</a-form-item> </a-form-item>
<a-form-item label="提现手续费"> <a-form-item label="提现手续费">
{{ detail.process }} {{ detail.process?.toFixed(2) }}
</a-form-item> </a-form-item>
<a-form-item label="到账金额"> <a-form-item label="到账金额">
{{ detail.real_money }} {{ detail.real_money }}
</a-form-item> </a-form-item>
</a-form> </a-form>
<div class="info">手续费率为1%由三方代账公司收取</div> <div class="info">手续费率为{{ detail.ratio }}%由三方代账公司收取</div>
</a-modal> </a-modal>
</template> </template>