Handy_Cao 1 gadu atpakaļ
vecāks
revīzija
932046380e
1 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  1. 9 4
      src/packages/sbyj/views/order/detail/index.vue

+ 9 - 4
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="canautoadddeposit">
                         <template #title>
                             <Checkbox shape="square" icon-size="16px" v-model="IsAutoAddDeposit">允许自动补定金</Checkbox>
                         </template>
                     </Cell>
-                    <Cell v-if="detail.canautorefunddeposit === 1">
+                    <Cell v-if="canautorefunddeposit">
                         <template #title>
                             <Checkbox shape="square" icon-size="16px" v-model="IsAutoRefundDeposit">允许自动退定金</Checkbox>
                         </template>
                     </Cell>
                 </CellGroup>
             </div>
-            <template #footer v-if="detail.canautorefunddeposit === 1 || detail.canautoadddeposit === 1">
+            <template #footer v-if="canautorefunddeposit || canautoadddeposit">
                 <div class="g-form__footer inset">
                     <Button round block type="danger" @click="onSubmit">提交修改</Button>
                 </div>
@@ -65,7 +65,7 @@ import { CellGroup, Cell, Button, Checkbox } from 'vant'
 import { parsePercent, handlePriceColor, formatDecimal, handleRequestBigNumber } from '@/filters'
 import { BuyOrSell } from '@/constants/order'
 import { getGoodsUnitName } from '@/constants/unit'
-import { useGlobalStore } from '@/stores'
+import { useGlobalStore, useFuturesStore } from '@/stores'
 import { useModifyOrder } from '@/business/trade'
 import { fullloading, dialog } from '@/utils/vant'
 import AppModal from '@/components/base/modal/index.vue'
@@ -83,12 +83,17 @@ const IsAutoRefundDeposit = shallowRef(false)
 const { formData, formSubmit } = useModifyOrder()
 
 const globalStore = useGlobalStore()
+const futuresStore = useFuturesStore()
 const riskType = globalStore.getSystemInfo('riskType') // 风控类型
 const showModal = shallowRef(true)
 const refresh = shallowRef(false) // 是否刷新父组件数据
 
+const goods = futuresStore.getGoods(props.selectedRow.goodsCode)
 const detail = computed(() => props.selectedRow.tHDetailEx)
 
+const canautorefunddeposit = detail.value.canautorefunddeposit === 1 || goods?.canautorefunddeposit === 1
+const canautoadddeposit = detail.value.canautoadddeposit === 1 || goods?.canautoadddeposit === 1
+
 // 获取标签名称
 const getTagName = () => {
     return props.selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '提料' : '交料'