main
翁祖星 4 months ago
parent 242f834edb
commit 9b91001077

83
package-lock.json generated

@ -16,6 +16,7 @@
"pinia": "^2.0.12",
"qs": "^6.10.3",
"vue": "^3.2.34",
"vue-clipboard3": "^2.0.0",
"vue-router": "4"
},
"devDependencies": {
@ -627,6 +628,16 @@
"node": ">= 10.0"
}
},
"node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
@ -754,6 +765,11 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/dom-serializer": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz",
@ -1445,6 +1461,14 @@
"node": ">= 6"
}
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz",
@ -2103,6 +2127,11 @@
"node": ">=14.0.0"
}
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
@ -2237,6 +2266,11 @@
"utrie": "^1.0.2"
}
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -2371,6 +2405,14 @@
}
}
},
"node_modules/vue-clipboard3": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/vue-clipboard3/-/vue-clipboard3-2.0.0.tgz",
"integrity": "sha512-Q9S7dzWGax7LN5iiSPcu/K1GGm2gcBBlYwmMsUc5/16N6w90cbKow3FnPmPs95sungns4yvd9/+JhbAznECS2A==",
"dependencies": {
"clipboard": "^2.0.6"
}
},
"node_modules/vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.8.tgz",
@ -2884,6 +2926,16 @@
"source-map": "~0.6.0"
}
},
"clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"requires": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
@ -2982,6 +3034,11 @@
"gopd": "^1.0.1"
}
},
"delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"dom-serializer": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-1.4.1.tgz",
@ -3395,6 +3452,14 @@
"is-glob": "^4.0.1"
}
},
"good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"requires": {
"delegate": "^3.1.2"
}
},
"gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz",
@ -3847,6 +3912,11 @@
"source-map-js": ">=0.6.2 <2.0.0"
}
},
"select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"set-function-length": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/set-function-length/-/set-function-length-1.2.2.tgz",
@ -3947,6 +4017,11 @@
"utrie": "^1.0.2"
}
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -4033,6 +4108,14 @@
"@vue/shared": "3.4.27"
}
},
"vue-clipboard3": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/vue-clipboard3/-/vue-clipboard3-2.0.0.tgz",
"integrity": "sha512-Q9S7dzWGax7LN5iiSPcu/K1GGm2gcBBlYwmMsUc5/16N6w90cbKow3FnPmPs95sungns4yvd9/+JhbAznECS2A==",
"requires": {
"clipboard": "^2.0.6"
}
},
"vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.8.tgz",

@ -17,6 +17,7 @@
"pinia": "^2.0.12",
"qs": "^6.10.3",
"vue": "^3.2.34",
"vue-clipboard3": "^2.0.0",
"vue-router": "4"
},
"devDependencies": {

@ -1 +1,2 @@
export * from './useCopy';
export * from './useLoading';

@ -0,0 +1,24 @@
import useClipboard from 'vue-clipboard3';
import { errorAlert, successAlert } from '../../utils/alert';
export const useCopy = (params = { copyTip: true }) => {
const { copyTip } = params;
const { toClipboard } = useClipboard();
async function copy(val: string) {
try {
await toClipboard(val);
if (copyTip) {
successAlert('复制成功');
}
} catch (_) {
if (copyTip) {
errorAlert('复制失败');
}
}
}
return { copy };
};

@ -90,7 +90,9 @@
<!-- 收款人账户 -->
<div>
<div class="card-title">收款人账户</div>
<div class="card-title">
收款人账户<span class="m-l-12 ft-12 color-danger cursor-pointer" @click="handleCopyPayee"></span>
</div>
<div class="card-content">
<div>
<div class="card-item">
@ -154,11 +156,13 @@ import { useRoute } from 'vue-router';
import { WarningFilled } from '@element-plus/icons-vue';
import IPC from '@/components/IPC.vue';
import { useCopy } from '@/hooks';
import { getPayInfo } from '@/api';
import type { PayInfo } from '@/api';
const route = useRoute();
const { copy } = useCopy();
const payInfo = ref<PayInfo>({ Payee: {}, Payer: {} });
initPage();
@ -169,6 +173,20 @@ async function initPage() {
payInfo.value = data.PayInfo;
}
function handleCopyPayee() {
const { Payee, Remark, PayAmount } = payInfo.value;
const { BankUserName, BankCardNum, BankName } = Payee;
const copyText = [
`户名:${BankUserName}\r`,
`账号:${BankCardNum}\r`,
`开户行:${BankName}\r`,
`金额:${PayAmount}\r`,
`备注:${Remark}\r`,
].join('');
copy(copyText);
}
</script>
<style lang="scss" scoped>

@ -26,6 +26,10 @@
<div class="ca-item" @click="handleOpenCA">
<img src="@/assets/ca-sz.png" />
</div>
<div class="ca-item province" @click="handleOpenCA">
<img src="@/assets/ca-cf.jpg" />
<span>统一CA</span>
</div>
</div>
</div>
@ -231,6 +235,26 @@ async function loopGetResult() {
max-width: 100%;
object-fit: none;
}
&.province {
position: relative;
> span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: rgb(0, 104, 187);
font-size: 37px;
font-weight: bold;
white-space: nowrap;
letter-spacing: 4px;
}
> img {
opacity: 0;
}
}
}
}

@ -319,7 +319,7 @@ import { ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useLoading } from '@/hooks';
import { getOrder, generateSignFile } from '@/api';
import { getOrder, generateSignFile, getOrderPayUrl } from '@/api';
import IPC from '@/components/IPC.vue';
import {
@ -395,6 +395,18 @@ function handleModifyInvoice() {
function handleModifyInvoiceCallback(editInvoice: Invoice) {
order.value.Invoice = editInvoice;
}
async function loopGetResult() {
try {
const { data } = await getOrderPayUrl({ token: token.value });
if (data.status === 'submitted') {
return router.push({ name: 'Callback', query: { token: token.value } });
}
} catch {}
}
loopGetResult();
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save