Handy_Cao 1 년 전
부모
커밋
10fa4cfc94
4개의 변경된 파일25개의 추가작업 그리고 14개의 파일을 삭제
  1. 10 4
      src/packages/sbyj/views/market/detail/index.vue
  2. 10 5
      src/packages/sbyj/views/order/detail/index.vue
  3. 2 2
      src/types/model/goods.d.ts
  4. 3 3
      src/types/model/order.d.ts

+ 10 - 4
src/packages/sbyj/views/market/detail/index.vue

@@ -32,14 +32,14 @@
                         </div>
                     </template>
                 </Field>
-                <Field name="IsAutoAddDeposit" v-if="goods?.canAutoAddDeposit === 1">
+                <Field name="IsAutoAddDeposit" v-if="goods?.canautoadddeposit === 1">
                     <template #input>
-                        <Checkbox  shape="square" icon-size="16px" v-model="formData.IsAutoAddDeposit">允许自动补定金</Checkbox>
+                        <Checkbox shape="square" icon-size="16px" v-model="IsAutoAddDeposit">允许自动补定金</Checkbox>
                     </template>
                 </Field>
-                <Field name="IsAutoAddDeposit" v-if="goods?.canaAutoRefundDeposit === 1">
+                <Field name="IsAutoAddDeposit" v-if="goods?.canautorefunddeposit === 1">
                     <template #input>
-                        <Checkbox shape="square" icon-size="16px" v-model="formData.IsAutoRefundDeposit">允许自动退定金</Checkbox>
+                        <Checkbox shape="square" icon-size="16px" v-model="IsAutoRefundDeposit">允许自动退定金</Checkbox>
                     </template>
                 </Field>
             </Form>
@@ -188,6 +188,9 @@ const globalStore = useGlobalStore()
 const futuresStore = useFuturesStore()
 const userStore = useUserStore()
 
+const IsAutoAddDeposit = shallowRef(false)
+const IsAutoRefundDeposit = shallowRef(false)
+
 const riskType = globalStore.getSystemInfo('riskType') // 风控类型
 const formRef = shallowRef<FormInstance>()
 const goodscode = getQueryString('goodscode') ?? ''
@@ -223,6 +226,7 @@ const enableqty = (item: Model.SBYJMyOrderRsp) => {
 
 // 数量步长列表
 const qtyStepList = computed(() => {
+    console.log(goods)
     // 任务 #6013
     const param1009 = userStore.getSystemParamValue('1009') ?? 1
     return [
@@ -265,6 +269,8 @@ const onSubmit = () => {
         formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
         formData.BuildType = EBuildType.BUILDTYPE_OPEN
         formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+        formData.IsAutoAddDeposit = IsAutoAddDeposit.value ? 1 : 0
+        formData.IsAutoRefundDeposit = IsAutoRefundDeposit.value ? 1 : 0
 
         fullloading((hideLoading) => {
             formSubmit().then(() => {

+ 10 - 5
src/packages/sbyj/views/order/detail/index.vue

@@ -38,19 +38,19 @@
                     <Cell :title="getTagName() + '重量'"
                         :value="(detail.deliveryQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
                     <Cell title="订单时间" :value="detail.tradeTime" />
-                    <Cell v-if="detail.canAutoAddDeposit === 1">
+                    <Cell v-if="detail.canautoadddeposit === 1">
                         <template #title>
-                            <Checkbox shape="square" icon-size="16px" v-model="formData.IsAutoAddDeposit">允许自动补定金</Checkbox>
+                            <Checkbox shape="square" icon-size="16px" v-model="IsAutoAddDeposit">允许自动补定金</Checkbox>
                         </template>
                     </Cell>
-                    <Cell v-if="detail.canaAutoRefundDeposit === 1">
+                    <Cell v-if="detail.canautorefunddeposit === 1">
                         <template #title>
-                            <Checkbox shape="square" icon-size="16px" v-model="formData.IsAutoRefundDeposit">允许自动退定金</Checkbox>
+                            <Checkbox shape="square" icon-size="16px" v-model="IsAutoRefundDeposit">允许自动退定金</Checkbox>
                         </template>
                     </Cell>
                 </CellGroup>
             </div>
-            <template #footer>
+            <template #footer v-if="detail.canautorefunddeposit === 1 || detail.canautoadddeposit === 1">
                 <div class="g-form__footer inset">
                     <Button round block type="danger" @click="onSubmit">提交修改</Button>
                 </div>
@@ -77,6 +77,9 @@ const props = defineProps({
     }
 })
 
+const IsAutoAddDeposit = shallowRef(false)
+const IsAutoRefundDeposit = shallowRef(false)
+
 const { formData, formSubmit } = useModifyOrder()
 
 const globalStore = useGlobalStore()
@@ -109,6 +112,8 @@ const onSubmit = () => {
         formData.BuyOrSell = buyOrSell
         formData.TradeID = handleRequestBigNumber(tradeID)
         formData.MarketID = marketID
+        formData.IsAutoAddDeposit = IsAutoAddDeposit.value ? 1 : 0
+        formData.IsAutoRefundDeposit = IsAutoRefundDeposit.value ? 1 : 0
 
         fullloading((hideLoading) => {
             formSubmit().then(() => {

+ 2 - 2
src/types/model/goods.d.ts

@@ -13,8 +13,8 @@ declare namespace Model {
         audittime: string;//审核时间
         cancelaccountid: number;//注销操作员账号
         canceltime: string;//注销时间
-        canAutoAddDeposit?: number; // 允许自动补定金 是(1),否(0)
-        canaAutoRefundDeposit?: number; // 允许自动退定金 是(1),否(0)
+        canautoadddeposit?: number; // 允许自动补定金 是(1),否(0)
+        canautorefunddeposit?: number; // 允许自动退定金 是(1),否(0)
         closepricemode: number;//强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
         closepriceparam: number;//强平最新价浮动比例 - 方式为2时使用 (<1)买 上浮 (1+x)最新价卖 下浮 (1-x)最新价
         createtime: string;//创建时间

+ 3 - 3
src/types/model/order.d.ts

@@ -1471,11 +1471,11 @@ declare namespace Model {
         /// 方向 - 0:买 1:卖
         buyOrSell: number;
         // 允许自动补定金 是(1),否(0)
-        canAutoAddDeposit?: number; 
+        canautoadddeposit?: number; 
         // 允许自动退定金 是(1),否(0)
-        canaAutoRefundDeposit?: number; 
+        canautorefunddeposit?: number; 
         // 追加定金率
-        addDepositRate?: number; 
+        adddepositrate?: number; 
         /// 交易日(yyyyMMdd)
         tradeDate: string;
         /// 市场ID