浏览代码

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

zhou.xiaoning 2 年之前
父节点
当前提交
6bac97acbf

+ 1 - 1
src/business/bank/index.ts

@@ -159,7 +159,7 @@ export function useDoBankSign() {
         AccountType: 1,
         IsForce: 0,
         AgentCertType: 0,
-        BankCardType: 0,
+        BankCardType: 0, 
         BankAccountType: 1,
         extend_info: JSON.stringify({ "sex": 1 }),
         AccountCode: accountStore.accountId.toString(),

+ 1 - 1
src/packages/mobile/views/order/list/components/listingorder/detail/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="挂牌委托单" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="挂牌委托信息">
                     <Cell title="商品代码/名称" :value="selectedRow.wrstandardcode + '/' + selectedRow.wrstandardname" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />

+ 1 - 4
src/packages/mobile/views/order/list/components/listingtrade/detail/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="挂牌成交单" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="挂牌成交信息">
                     <Cell title="商品代码/名称" :value="selectedRow.wrstandardcode + '/' + selectedRow.wrstandardname" />
                     <Cell title="仓库" :value="selectedRow.warehousename" />
@@ -19,9 +19,6 @@
                     <Cell title="成交单号" :value="selectedRow.wrtradedetailid" />
                 </CellGroup>
             </div>
-            <div v-else>
-                <Empty />
-            </div>
         </app-view>
     </app-modal>
 </template>

+ 1 - 1
src/packages/mobile/views/order/list/components/pricingorder/detail/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="详细" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="挂牌点价委托信息">
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />

+ 1 - 4
src/packages/mobile/views/order/list/components/pricingtrade/detail/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="详细" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="挂牌点价成交信息">
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode+'/'+selectedRow.goodsname"/>
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
@@ -19,9 +19,6 @@
                     <Cell title="成交单号" :value="selectedRow.tradeid" />
                 </CellGroup>
             </div>
-            <div v-else>
-                <Empty />
-            </div>
         </app-view>
     </app-modal>
 </template>

+ 1 - 1
src/packages/mobile/views/order/list/components/swaporder/detail/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="掉期委托单" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="掉期委托信息">
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
                     <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />

+ 1 - 1
src/packages/mobile/views/order/performance/components/breach/Index.vue

@@ -70,7 +70,7 @@ const formRules: { [key in keyof Proto.PerformanceContractedApplyReq]?: FieldRul
 
 const contracted = () => {
     dialog({
-        message: '确认要违约申请吗?',
+        message: '确认要提交违约申请吗?',
         showCancelButton: true,
     }).then(() => {
         /// PerformancePlanID

+ 52 - 25
src/packages/mobile/views/order/performance/components/detail/Index.vue

@@ -1,11 +1,11 @@
 <!-- 我的订单- 我的履约 - 详情 -->
 <template>
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
-        <app-view class="g-form" v-model="loading">
+        <app-view class="g-form">
             <template #header>
                 <app-navbar title="履约详情" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="履约信息">
                     <Cell title="类型" :value="selectedRow.typename" />
                     <Cell title="商品" :value="selectedRow.wrstandardname" />
@@ -23,16 +23,21 @@
                     <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>
+                    <div class="planstep-info" v-for="(item, index) in dataList" :key="index">
+                        <div class="planstep-info__up" :style="styles(item.stepstatus)">
+                            <p class="stepindex">{{ item.stepindex }}</p>
+                            <p class="steptypename">{{ item.steptypename }}</p>
+                            <p class="stepstatus">{{ getPerformanceStepStatusName(item.stepstatus) }}</p>
+                        </div>
+                        <div class="planstep-info__mid">
+                            <p class="starttime" v-if="item.stepstatus != 2">{{ handleNoneValue(item.starttime) }}</p>
+                            <p class="remaindays">{{ remaindays(item) }}</p>
+                            <p class="endtime" v-if="item.stepstatus != 2">{{ handleNoneValue(item.endtime) }}</p>
+                        </div>
+                        <div class="planstep-info__dwn" v-if="item.stepstatus === 1">
+                            <p class="remaindays">{{ item.stepdays }}天</p>
+                        </div>
+                    </div>
                 </CellGroup>
             </div>
             <Form ref="formRef" class="g-form__container" @submit="toConfirm">
@@ -51,9 +56,9 @@
 
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
-import { CellGroup, Cell, Button, Dialog, Field, FieldRule, Form, FormInstance, Step, Steps } from 'vant'
+import { CellGroup, Cell, Button, Dialog, Field, FieldRule, Form, FormInstance } from 'vant'
 import { fullloading } from '@/utils/vant'
-import { formatDate, formatDecimal } from '@/filters'
+import { formatDate, formatDecimal, handleNoneValue } from '@/filters'
 import { usePerformanceDelayApply, usePerformanceManualConfirm } from '@/business/performance'
 import { queryWrPerformancePlanStep } from '@/services/api/performance'
 import { getPerformanceStepStatusName } from '@/constants/order'
@@ -61,7 +66,6 @@ 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)
@@ -76,13 +80,39 @@ const props = defineProps({
 })
 
 const { confirmFormData, confirmSubmit } = usePerformanceManualConfirm(props.selectedRow.buyaccountid)
-const datalist = shallowRef<Model.WrPerformancePlanStep[]>([])
-const error = shallowRef(false)
 const show = shallowRef(false)
 const showDays = shallowRef(false)
 const remark = shallowRef('')
 const dialogTitle = shallowRef('是否要手动执行步骤?')
 
+const styles= (status: number) => {
+    let backgroundColor = '#2794ff'
+    if (status === 2) {
+        backgroundColor = '#2794ff'
+    } else if ([3, 6].includes(status)) {
+        backgroundColor = '#89c5ff'
+    } else {
+        backgroundColor = '#dde3e8'
+    }
+
+    return {
+        backgroundColor
+    }
+}
+
+const remaindays = (item: Model.WrPerformancePlanStep) => {
+    let days = ''
+    if ([2].includes(item.stepstatus)) {
+        days = `剩余${item.remaindays}天`
+    }
+    else if ([3, 6].includes(item.stepstatus)) {
+        days = `${item.stepdays}`
+    } else {
+        days = ''
+    }
+    return days
+}
+
 // 表单验证规则
 const formRules: { [key in keyof Proto.PerformanceDelayApplyReq | 'remark' ]?: FieldRule[] } = {
     delaydays: [{
@@ -95,16 +125,10 @@ const formRules: { [key in keyof Proto.PerformanceDelayApplyReq | 'remark' ]?: F
     }],
 }
 
-const { loading } = useRequest(queryWrPerformancePlanStep, {
+const { dataList } = useRequest(queryWrPerformancePlanStep, {
     params: {
         planid: props.selectedRow.performanceplanid
     },
-    onSuccess: (res) => {
-        datalist.value.push(...res.data)
-    },
-    onError: () => {
-        error.value = true
-    }
 })
 
 const showConfirm = (showDelay: boolean) => {
@@ -154,5 +178,8 @@ const closed = (isRefresh = false) => {
 defineExpose({
     closed,
 })
+</script>
 
-</script>
+<style lang="less">
+@import './index.less';
+</style>

+ 49 - 0
src/packages/mobile/views/order/performance/components/detail/index.less

@@ -0,0 +1,49 @@
+.planstep-info {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    align-content: center;
+    border: 0.5px solid #387BDC;
+    border-radius: 10px;
+    color: #333;
+    font-size: 0.25rem;
+    margin: 15px 10px;
+
+    &__up, &__mid, &__dwn {
+      width: 100%;
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: center;
+      align-content: center;
+      text-align: center;
+      padding: 10px 0px;
+
+      :nth-child(1){
+        margin-left: 10px;
+      }
+
+      :nth-last-child(1) {
+        margin-right: 10px;
+      }
+    }
+
+    &__up {
+      color: #fff;
+      border-radius: 10px 10px 0px 0px;
+    }
+
+    .stepindex {
+      width: 25px;
+      height: 25px;
+      border-radius: 50%;
+      background-color: #fff;
+      color: #666;
+      text-align: center;
+      display: flex;
+      flex-direction: row;
+      justify-content: center;
+      align-items: center;
+    }
+  }

+ 1 - 1
src/packages/mobile/views/order/performance/components/modify/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="formSubmit">
                 <CellGroup title="履约信息">
-                    <Field name="Contract" label="联络信息" type="textarea" autosize v-model="Contract" placeholder="请输入联络信息" :rules="formRules.Contract" />
+                    <Field name="Contract" label="联络信息" type="textarea" autosize :maxlength="50" v-model="Contract" placeholder="请输入联络信息" :rules="formRules.Contract" />
                     <Field name="Receive" label="收货地址" type="textarea" autosize v-model="Receive" :rules="formRules.Receive" placeholder="请输入收货地址" right-icon="add-o" @click-right-icon="showContact = true" />
                     <Field name="Receipt" label="发票信息" type="textarea" autosize v-model="Receipt" placeholder="必填" :rules="formRules.Receipt" right-icon="add-o" @click-right-icon="showReceipt = true" />
                 </CellGroup>

+ 1 - 1
src/packages/mobile/views/order/position/components/goods/close/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="订单持仓 - 转让" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="持仓信息">
                     <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />

+ 1 - 1
src/packages/mobile/views/order/position/components/goods/delivery/Index.vue

@@ -5,7 +5,7 @@
             <template #header>
                 <app-navbar title="订单持仓 - 交收" @back="closed" />
             </template>
-            <div v-if="props" class="order-detail__container g-form__container">
+            <div class="order-detail__container g-form__container">
                 <CellGroup title="持仓信息">
                     <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="持仓方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />

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

@@ -9,8 +9,8 @@
                 <CellGroup title="预售持仓信息">
                     <Cell title="商品代码/名称" :value="`${selectedRow.goodscode}/${selectedRow.goodsname}`" />
                     <Cell title="发售方" :value="selectedRow.sellname" />
-                    <Cell title="开始日期" :value="formatDate(selectedRow.starttime)" />
-                    <Cell title="结束日期" :value="formatDate(selectedRow.endtime)" />
+                    <Cell title="开始日期" :value="formatDate(selectedRow.starttime, 'YYYY-MM-DD')" />
+                    <Cell title="结束日期" :value="formatDate(selectedRow.endtime, 'YYYY-MM-DD')" />
                     <Cell title="认购数量" :value="selectedRow.tradeqty" />
                     <Cell title="预售价" :value="selectedRow.openprice" />
                     <Cell title="总货款" :value="selectedRow.tradeamount" />