Handy_Cao 2 vuotta sitten
vanhempi
commit
648519751f

+ 17 - 0
src/constants/order.ts

@@ -240,6 +240,23 @@ export function getPerformanceStatusName(value: number) {
 }
 
 /**
+ * 获取履约步骤状态类型列表
+ * @returns 
+ */
+export function getPerformanceStepStatusList() {
+    return getEnumTypeList('stepStatus')
+}
+
+/**
+ * 获取履约步骤状态类型名称
+ * @returns 
+ */
+export function getPerformanceStepStatusName(value: number) {
+    const enums = getPerformanceStepStatusList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
  * 获取履约类型列表
  * @returns 
  */

+ 6 - 2
src/packages/mobile/views/ballot/detail/components/delisting/index.vue

@@ -57,8 +57,12 @@ const showModal = shallowRef(true)
 const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
     OrderQty: [{
         message: '请输入数量',
-        validator: () => {
-            return !!formData.OrderQty
+        validator: (val) => {
+            const enable = props.detail.presaleqty-props.detail.presaledqty
+            if (val <= enable) {
+                return true
+            }
+            return '委托数量不能大于'+`${enable}`
         }
     }],
 }

+ 2 - 3
src/packages/mobile/views/order/list/components/presale/detail/Index.vue

@@ -11,10 +11,9 @@
                     <Cell title="认购数量" :value="selectedRow.orderqty" />
                     <Cell title="认购价" :value="selectedRow.orderprice" />
                     <Cell title="认购金额" :value="(selectedRow.orderprice * selectedRow.orderqty).toFixed(2)" />
-                    <Cell title="定金方式" :value="parsePercent(selectedRow.presaledepositvalue)" />
+                    <Cell title="定金方式" :value="selectedRow.presaledepositalgorithm === 1 ? '比率' : '固定'" />
                     <Cell title="预售定金" :value="selectedRow.freezemargin" />
                     <Cell title="发售方" :value="selectedRow.sellname" />
-                    <Cell title="起拍价" :value="selectedRow.startprice" />
                     <Cell title="开始日期" :value="formatDate(selectedRow.starttime, 'YYYY-MM-DD')" />
                     <Cell title="结束日期" :value="formatDate(selectedRow.endtime, 'YYYY-MM-DD')" />
                     <Cell title="委托状态" :value="getOrderStatusName(selectedRow.orderstatus)" />
@@ -31,7 +30,7 @@
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
-import { handleNumberValue, formatDate, parsePercent } from '@/filters'
+import { handleNumberValue, formatDate } from '@/filters'
 import { getOrderStatusName } from '@/constants/order'
 import AppModal from '@/components/base/modal/index.vue'
 

+ 8 - 8
src/packages/mobile/views/order/list/components/presale/history/index.vue

@@ -15,7 +15,7 @@
                     <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                         <div class="g-order-list__titlebar">
                             <div class="left">
-                                <h4>{{ item.goodsname }}</h4>
+                                <h4>{{ item.goodscode }}/{{ item.goodsname }}</h4>
                             </div>
                             <div class="right">
                                 <span>{{ getOrderStatusName(item.orderstatus) }}</span>
@@ -36,16 +36,16 @@
                                     <span>{{ item.sellname }}</span>
                                 </li>
                                 <li>
-                                    <span>起拍价</span>
-                                    <span>{{ item.startprice }}</span>
+                                    <span>认购金额</span>
+                                    <span>{{ handleNumberValue(item.orderprice * item.orderqty) }}</span>
                                 </li>
                                 <li>
-                                    <span>预售价</span>
-                                    <span>{{ handleNumberValue(item.tradeprice) }}</span>
+                                    <span>定金比例</span>
+                                    <span>{{ parsePercent(item.presaledepositvalue) }}</span>
                                 </li>
                                 <li>
-                                    <span>订单量</span>
-                                    <span>{{ handleNumberValue(item.tradeqty) }}</span>
+                                    <span>预售定金</span>
+                                    <span>{{ handleNumberValue(item.freezemargin) }}</span>
                                 </li>
                                 <li>
                                     <span>开始日期</span>
@@ -77,7 +77,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, ref, defineAsyncComponent } from 'vue'
-import { formatDate, handleNumberValue } from '@/filters'
+import { formatDate, handleNumberValue, parsePercent } from '@/filters'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradeOrderDetails } from '@/services/api/presale'
 import { getOrderStatusName } from '@/constants/order'

+ 8 - 8
src/packages/mobile/views/order/list/components/presale/list/Index.vue

@@ -6,7 +6,7 @@
             <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
                 <div class="g-order-list__titlebar">
                     <div class="left">
-                        <h4>{{ item.goodsname }}</h4>
+                        <h4>{{ item.goodscode }}/{{ item.goodsname }}</h4>
                     </div>
                     <div class="right">
                         <span>{{ getOrderStatusName(item.orderstatus) }}</span>
@@ -27,16 +27,16 @@
                             <span>{{ item.sellname }}</span>
                         </li>
                         <li>
-                            <span>起拍价</span>
-                            <span>{{ item.startprice }}</span>
+                            <span>认购金额</span>
+                            <span>{{ formatDecimal(item.orderprice * item.orderqty) }}</span>
                         </li>
                         <li>
-                            <span>预售价</span>
-                            <span>{{ handleNumberValue(item.tradeprice) }}</span>
+                            <span>定金比例</span>
+                            <span>{{ parsePercent(item.presaledepositvalue) }}</span>
                         </li>
                         <li>
-                            <span>订单量</span>
-                            <span>{{ handleNumberValue(item.tradeqty) }}</span>
+                            <span>预售定金</span>
+                            <span>{{ handleNumberValue(item.freezemargin) }}</span>
                         </li>
                         <li>
                             <span>开始日期</span>
@@ -65,7 +65,7 @@
 <script lang="ts" setup>
 import { shallowRef, defineAsyncComponent } from 'vue'
 import { Button } from 'vant'
-import { formatDate, handleNumberValue } from '@/filters'
+import { formatDate, handleNumberValue, parsePercent, formatDecimal } from '@/filters'
 import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradeOrderDetails } from '@/services/api/presale'

+ 15 - 4
src/packages/mobile/views/order/performance/components/detail/Index.vue

@@ -23,7 +23,16 @@
                     <Cell title="履约单号" :value="selectedRow.performanceplanid" />
                 </CellGroup>
                 <CellGroup title="执行信息">
-
+                    <Steps v-for="(item, index) in datalist" :key="index" direction="vertical">
+                        <Step>
+                            <p>{{ item.stepindex }}</p>
+                            <p>{{ getPerformanceStepStatusName(item.stepstatus) }}</p>
+                            <h4>{{ item.steptypename }}</h4>
+                            <p>{{ item.stepstatus === 2 ? `剩余${item.remaindays}天` : ((item.stepstatus === 3 || item.stepstatus === 6) ? `${item.stepdays}` : '') }}</p>
+                            <p v-if="item.stepstatus != 2">{{ formatDate(item.starttime, 'YYYY-MM-DD') }}-{{ formatDate(item.endtime, 'YYYY-MM-DD') }}</p>
+                            <p v-if="item.stepstatus === 1">{{ item.stepdays }}天</p>
+                        </Step> 
+                    </Steps>
                 </CellGroup>
             </div>
             <Form ref="formRef" class="g-form__container" @submit="toConfirm">
@@ -42,15 +51,17 @@
 
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
-import { CellGroup, Cell, Button, Dialog, Field, FieldRule, Form, FormInstance } from 'vant'
+import { CellGroup, Cell, Button, Dialog, Field, FieldRule, Form, FormInstance, Step, Steps } from 'vant'
 import { fullloading } from '@/utils/vant'
 import { formatDate, formatDecimal } from '@/filters'
 import { usePerformanceDelayApply, usePerformanceManualConfirm } from '@/business/performance'
 import { queryWrPerformancePlanStep } from '@/services/api/performance'
+import { getPerformanceStepStatusName } from '@/constants/order'
 
 import AppModal from '@/components/base/modal/index.vue'
 import { useRequest } from '@/hooks/request'
 
+
 const showModal = shallowRef(true)
 // 是否刷新父组件数据
 const refresh = shallowRef(false)
@@ -65,7 +76,7 @@ const props = defineProps({
 })
 
 const { confirmFormData, confirmSubmit } = usePerformanceManualConfirm(props.selectedRow.buyaccountid)
-const datelist = shallowRef<Model.WrPerformancePlanStep[]>([])
+const datalist = shallowRef<Model.WrPerformancePlanStep[]>([])
 const error = shallowRef(false)
 const show = shallowRef(false)
 const showDays = shallowRef(false)
@@ -89,7 +100,7 @@ const { loading } = useRequest(queryWrPerformancePlanStep, {
         planid: props.selectedRow.performanceplanid
     },
     onSuccess: (res) => {
-        datelist.value.push(...res.data)
+        datalist.value.push(...res.data)
     },
     onError: () => {
         error.value = true

+ 1 - 1
src/stores/modules/enum.ts

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['clientType', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
+const enumKeys = ['clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()