소스 검색

解决冲突

marymelisa 4 년 전
부모
커밋
3b59966845

+ 32 - 0
src/common/constants/enumsName.ts

@@ -903,6 +903,38 @@ export function getScfContractTypeName(type: number) {
     return result
 }
 
+// <!-- 结算方式 1:按日结息 3:按月结息-->
+export function getInterestSettleModeName(type: number) {
+    let result = "--"
+    switch (type) {
+        case 1:
+            result = '按日结息'
+            break
+        case 3:
+            result = '按月结息'
+            break
+    }
+    return result
+}
+
+//    interestratemode: number;//利率方式 - 1:年利率 2:日利率 3:日固定值
+export function getInterestrateModeName(mode: number ,value: number) {
+    let result = "--"
+    switch (mode) {  // 1:年利率
+        case 1:
+            result = (value * 100).toFixed(2).toString()
+            break
+        case 2: //  2:日利率
+            result =  (value * 10000).toFixed(2).toString()
+            break
+        case 3: // 日固定值
+            result = value.toFixed(2).toString()
+            break;
+    }
+    return result
+}
+
+
 
 /**
  * 资金操作类型

+ 18 - 1
src/views/order/financing_manager/components/financing_manager_apply_order/index.vue

@@ -33,6 +33,16 @@
       <template #createtime="{ record }">
         <a>{{ formatTime(record.createtime) }}</a>
       </template>
+
+    <!-- 结算方式 1:按日结息 3:按月结息-->
+        <template #interestsettlemode="{ record }">
+            <a>{{ getInterestSettleModeName(record.interestsettlemode) }}</a>
+        </template>
+        <!-- 费用 -->
+        <template #interestsettlevalue="{ record }">
+            <a>{{ getInterestrateModeName(record.interestratemode, record.interestrate) }}</a>
+        </template>
+
     </a-table>
     <component :is="componentId"
                v-if="componentId"
@@ -52,7 +62,12 @@ import { ComposeOrderTableParam } from '@/common/setup/table/interface';
 import { formatTime } from '@/common/methods';
 import Bus from '@/utils/eventBus/index';
 import { expandIcon } from '@/common/setup/table/clolumn';
-import { getApplyStatusFinanceName, getFinanceTypeName } from '@/common/constants/enumsName';
+import {
+    getApplyStatusFinanceName,
+    getFinanceTypeName,
+    getInterestrateModeName,
+    getInterestSettleModeName
+} from '@/common/constants/enumsName';
 import { BtnList as BtnListType } from '@/common/components/btnList/interface';
 
 export default defineComponent({
@@ -95,6 +110,8 @@ export default defineComponent({
             getFinanceTypeName,
             getApplyStatusFinanceName,
             handleBtnList,
+            getInterestrateModeName,
+            getInterestSettleModeName,
         };
     },
 });

+ 98 - 67
src/views/order/performance_information/components/components/detail/index.vue

@@ -7,71 +7,25 @@
         :visible="visible"
         @cancel="cancel"
     >
-        <!-- <div class="listed">
-      <div class="condition">
-        <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
-        <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
-        <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
-      </div>
-        </div>-->
-        <div class="performanceSteps">
-            <a-steps v-model:current="current" class="commonSteps" direction="vertical">
-                <a-step status="finish">
-                    <template #title>
-                        <div class="block">
-                            <div class="line">
-                                <div class="num">1</div>
-                                <div class="desc">买方30%货款</div>
-                                <div class="day">T+30</div>
-                                <CaretRightOutlined class="arrowRight" />
-                            </div>
-                            <div class="tip">已完成</div>
-                        </div>
-                    </template>
-                </a-step>
-                <a-step status="finish">
-                    <template #title>
-                        <div class="block">
-                            <div class="line">
-                                <div class="num">2</div>
-                                <div class="desc">卖方发货</div>
-                                <div class="day">T+3</div>
-                                <CaretRightOutlined class="arrowRight" />
-                            </div>
-                            <div class="tip">已完成</div>
-                        </div>
-                    </template>
-                </a-step>
-                <a-step status="process">
-                    <template #title>
-                        <div class="block">
-                            <div class="line">
-                                <div class="num">3</div>
-                                <div class="desc">买方70%货款</div>
-                                <div class="day">T+10</div>
-                                <CaretRightOutlined class="arrowRight" />
-                            </div>
-                            <div class="tip">2日后扣款</div>
-                        </div>
-                    </template>
-                </a-step>
-                <a-step status="wait">
-                    <template #title>
-                        <div class="block">
-                            <div class="line">
-                                <div class="num">4</div>
-                                <div class="desc">卖方开票</div>
-                                <div class="day">T+1</div>
-                                <CaretRightOutlined class="arrowRight" />
-                            </div>
-                            <div class="tip">未开始</div>
-                        </div>
-                    </template>
-                </a-step>
-            </a-steps>
-            <div class="btns">
-                <a-button class="closeBtn" @click="cancel">关闭</a-button>
+        <div class="listed">
+            <div class="condition">
+                <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
+                <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
+                <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
             </div>
+            <a-table
+                class="dialogTable"
+                :columns="columns"
+                :data-source="performancePlanStepList"
+                :pagination="false"
+            >
+                <template #isauto="{ text }">
+                    <span>{{text ? '是' : '否'}}</span>
+                </template>
+                <template #handlestatus="{ text }">
+                    <span>{{getStatus(text)}}</span>
+                </template>
+            </a-table>
         </div>
     </Drawer>
 </template>
@@ -97,6 +51,16 @@ import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
 import { CaretRightOutlined } from '@ant-design/icons-vue';
 import { handlePerformancePlanStep } from '../setup';
 
+const columns = [
+    { title: '履约步骤', dataIndex: 'steptypename', key: 'steptypename', align: 'center' },
+    // { title: '天数', dataIndex: 'applytime', key: 'applytime', align: 'center' },
+    { title: '剩余天数', dataIndex: 'remaindays', key: 'remaindays', align: 'center' },
+    { title: '步骤值(%)', dataIndex: 'stepvalue', key: 'stepvalue', align: 'center' },
+    { title: '距离上一步', dataIndex: 'stepdays', key: 'stepdays', align: 'center' },
+    { title: '自动', dataIndex: 'isauto', key: 'isauto', align: 'center', slots: { customRender: 'isauto' } },
+    { title: '当前状态', dataIndex: 'handlestatus', key: 'handlestatus', align: 'center', slots: { customRender: 'handlestatus' } },
+];
+
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_detail,
     components: { Drawer, CaretRightOutlined },
@@ -113,12 +77,79 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
-        const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
-        const current = ref<number>(0);
+        const { performancePlanStepList } = handlePerformancePlanStep(props.selectedRow);
+        function getStatus(type: number) {
+            //处理状态 - 1:开始 2:结束 3:冻结请求 4:冻结返回成功 5:冻结返回失败 6:扣款请求 7:扣款返回成功 8:扣款返回失败 9:仓单转移请求 1number;
+            //:仓单转移返回成功 11:仓单转移返回失败 12:加钱请求 13:加钱返回成功 14:加钱返回失败 15:解冻仓单头寸请求 16:解冻仓单头寸返回成功 17:解冻仓单头寸返回失败 18:解冻库位请求 19:解冻库位返回成功 2number;
+            //:解冻库位返回失败
+            let result = '--';
+            switch (type) {
+                case 1:
+                    result = '开始';
+                    break;
+                case 2:
+                    result = '结束';
+                    break;
+                case 3:
+                    result = '冻结请求';
+                    break;
+                case 4:
+                    result = '冻结返回成功';
+                    break;
+                case 5:
+                    result = '冻结返回失败';
+                    break;
+                case 6:
+                    result = '扣款请求';
+                    break;
+                case 7:
+                    result = '扣款返回成功';
+                    break;
+                case 8:
+                    result = '扣款返回失败';
+                    break;
+                case 9:
+                    result = '仓单转移请求';
+                    break;
+                case 10:
+                    result = '仓单转移返回成功';
+                    break;
+                case 11:
+                    result = '仓单转移返回失败';
+                    break;
+                case 12:
+                    result = '加钱请求';
+                    break;
+                case 13:
+                    result = '加钱返回成功';
+                    break;
+                case 14:
+                    result = '加钱返回失败';
+                    break;
+                case 15:
+                    result = '解冻仓单头寸请求';
+                    break;
+                case 16:
+                    result = '解冻仓单头寸返回成功';
+                    break;
+                case 17:
+                    result = '解冻仓单头寸返回失败';
+                    break;
+                case 18:
+                    result = '解冻库位请求';
+                    break;
+                case 19:
+                    result = '解冻库位返回成功';
+                    break;
+            }
+            return result;
+        }
         return {
             visible,
             cancel,
-            current,
+            performancePlanStepList,
+            columns,
+            getStatus,
         };
     },
 });

+ 3 - 2
src/views/order/performance_information/components/components/setup.ts

@@ -1,20 +1,21 @@
 import { queryWrPerformancePlanStep } from "@/services/go/wrtrade";
 import { QueryWrPerformancePlanStepReq, WrPerformancePlan, WrPerformancePlanStep } from "@/services/go/wrtrade/interface";
 import { ref } from "vue";
-import Long from "long";
 
 // 获取当前履约步骤
 export function handlePerformancePlanStep(selectedRow: WrPerformancePlan) {
     const performancePlanStep = ref<WrPerformancePlanStep>()
+    const performancePlanStepList = ref<WrPerformancePlanStep[]>([])
 
     const stepamount = ref<string>('--')
     const param: QueryWrPerformancePlanStepReq = { planid: selectedRow.performanceplanid, curstepid: selectedRow.curstepid }
     queryWrPerformancePlanStep(param).then(res => {
         console.log('获取当前履约步骤', res)
         if (res.length) {
+            performancePlanStepList.value = res;
             performancePlanStep.value = res[0]
             stepamount.value = res[0].stepamount.toFixed(2).toString()
         }
     })
-    return { performancePlanStep , stepamount}
+    return { performancePlanStep, stepamount, performancePlanStepList }
 }