huangbin 4 lat temu
rodzic
commit
6541c6d543

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

@@ -1,73 +1,28 @@
 <template>
-    <!-- 履约明细-->
-    <Drawer :title="'履约明细'" :placement="'bottom'" :visible="visible" @cancel="cancel">
-        <!-- <div class="listed">
+  <!-- 履约明细-->
+  <Drawer :title="'履约明细'"
+          :placement="'bottom'"
+          :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>
-        </div>
-    </Drawer>
+      <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>
 
 <script lang="ts">
@@ -91,6 +46,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 },
@@ -107,12 +72,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 }
 }