1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import { REFER } from "@/components/popover-select/api";
- // 币种
- export const currency = async (prop) => {
- try {
- // try
- const { code, rows } = await REFER({
- search: prop,
- type: "CURRENCY_PARAM",
- });
- if (code === 200) {
- return rows[0] || {};
- }
- } catch (err) {
- // catch
- console.error(err);
- } finally {
- // finally
- }
- };
- // 税率
- export const tax = async (prop) => {
- try {
- // try
- const { code, rows } = await REFER({
- search: prop,
- type: "TAX_RATE_PARAM",
- });
- if (code === 200) {
- return rows[0] || {};
- }
- } catch (err) {
- // catch
- console.error(err);
- } finally {
- // finally
- }
- };
- // 单位
- export const unit = async (prop) => {
- try {
- // try
- const { code, rows } = await REFER({
- search: prop,
- type: "UNIT_PARAM",
- });
- if (code === 200) {
- return rows[0] || {};
- }
- } catch (err) {
- // catch
- console.error(err);
- } finally {
- // finally
- }
- };
|