|
|
@@ -1,3 +1,46 @@
|
|
|
-export function handleFromState() {
|
|
|
+import { reactive, UnwrapRef } from 'vue';
|
|
|
+import { FormState } from "./interface";
|
|
|
|
|
|
+export function handleFromState() {
|
|
|
+ const formState: UnwrapRef<FormState> = reactive({
|
|
|
+ ContractNo: '', // 现货合同编号
|
|
|
+ ContractType: 1, // int32 现货合同类型-1:采购-1:销售
|
|
|
+ BizType: 1, // uint32 业务类型 - 1:套保 2:套利
|
|
|
+ BuyUserID: 0, // uint64 采购方ID
|
|
|
+ SellUserID: 0,// uint64 客户ID
|
|
|
+ ContractAttachment: new Uint8Array(),// bytes 合同附件
|
|
|
+ DeliveryGoodsID: undefined, // 现货品种ID
|
|
|
+ WrStandardID: undefined, // uint64 现货商品ID
|
|
|
+ SpotGoodsBrandID: undefined, // uint64 现货品牌ID
|
|
|
+ ConvertFactor: undefined,// double 标仓系数
|
|
|
+ SpotGoodsDesc: '', // string 商品型号
|
|
|
+ PriceType: 1, // uint32 定价类型-1:一口价2:点价3:暂定价
|
|
|
+ Qty: null, // double 数量
|
|
|
+ Price: null,// double 价格暂定价[1:一口价、3:暂定价]
|
|
|
+ Amount: null, // double 金额[1:一口价、3:暂定价]
|
|
|
+ DeliveryStartDate: '', // string 交收期(开始)
|
|
|
+ DeliveryEndDate: '', // string 交收期(结束)
|
|
|
+ ContractMargin: null, // double 合同保证金
|
|
|
+ SaleUserID: undefined, // uint64 业务员ID
|
|
|
+ MerUserID: undefined, // uint64 跟单员ID
|
|
|
+ AccountID: undefined, // uint64 期货账户ID
|
|
|
+ Remark: '' // string 合同备注
|
|
|
+ })
|
|
|
+ // 合同类型
|
|
|
+ const contractType = [
|
|
|
+ { key: 1, value: '采购' },
|
|
|
+ { key: -1, value: '销售' },
|
|
|
+ ];
|
|
|
+ // 定价类型
|
|
|
+ const priceType = [
|
|
|
+ { key: 1, value: '一口价' },
|
|
|
+ { key: 2, value: '点价' },
|
|
|
+ { key: 3, value: '暂定价' },
|
|
|
+ ];
|
|
|
+ // 业务类型
|
|
|
+ const businessType = [
|
|
|
+ { key: 1, value: '套保' },
|
|
|
+ { key: 2, value: '套利' },
|
|
|
+ ];
|
|
|
+ return { formState, contractType, priceType, businessType }
|
|
|
}
|