|
|
@@ -1,10 +1,12 @@
|
|
|
import { BuyOrSell } from "@/common/constants/enumCommon";
|
|
|
import { EnumRouterName } from "@/common/constants/enumRouterName";
|
|
|
-import { useVerifyListingNum, useVerifyListingBasis } from '@/hooks/form/verify';
|
|
|
+import { validateCommon } from "@/common/setup/validate";
|
|
|
+import { useVerifyListingBasis, useVerifyListingNum } from '@/hooks/form/verify';
|
|
|
import { getAccountTypeList, getCanUseMoney } from "@/services/bus/account";
|
|
|
import { getRules } from '@/services/bus/rules';
|
|
|
import { AccountListItem } from "@/services/dataCenter/interafce/account";
|
|
|
import { WrOrderQuote } from "@/services/go/wrtrade/interface";
|
|
|
+import { RuleObject } from "ant-design-vue/lib/form/interface";
|
|
|
import moment from "moment";
|
|
|
import { onBeforeUnmount, reactive, ref, UnwrapRef } from "vue";
|
|
|
import { getGoodsPrice, handleIs } from "../buy-sell-market/setup";
|
|
|
@@ -27,9 +29,11 @@ export function handleForm(selectedRow: TempWrOrderQuoteDetail) {
|
|
|
|
|
|
const { v_num } = useVerifyListingNum<FormParam, 'DelistMinQty'>(formState, 'DelistMinQty', selectedRow.minivalue);
|
|
|
const { v_basis } = useVerifyListingBasis(selectedRow, 'goodsid');
|
|
|
-
|
|
|
+ const v_price = async (rule: RuleObject, value: number) => {
|
|
|
+ return validateCommon(value, '请输入挂牌价格');
|
|
|
+ };
|
|
|
const rules = {
|
|
|
- FixedPrice: [{ required: true, message: '请输入挂牌价格', trigger: 'blur', type: 'number', }],
|
|
|
+ FixedPrice: [{ required: true, validator: v_price, trigger: 'blur', type: 'number', }],
|
|
|
OrderQty: [{ required: true, validator: v_num, trigger: 'change', type: 'number' }],
|
|
|
PriceMove: [{ required: true, validator: v_basis, trigger: 'blur', type: 'number', }],
|
|
|
accountid: [{ required: true, message: '请输入交易账号' }],
|