huangbin 4 лет назад
Родитель
Сommit
604cc4857c

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

@@ -651,9 +651,9 @@ export function getPerformanceTypeName(type: number, haswr: number) {
             break
         case 2:
             result = '预售仓单'
-            if(haswr === 1){
+            if (haswr === 1) {
                 result = '仓单贸易'
-            }else{
+            } else {
                 result = '仓单预售'
             }
             break
@@ -1232,4 +1232,34 @@ export function getOperateTypeName(type: number) {
             break;
     }
     return result
+}
+
+// 获取议价单申请状态
+//1:待确认 2:已确认 3:已拒绝 4:已撤销 5:系统撤销 6:处理失败 7:确认中
+export function getBarmaginApplyStatus(status: number) {
+    let result = '--'
+    switch (status) {
+        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
+    }
+    return result
 }

+ 7 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/components/bargain_detail/index.vue

@@ -15,7 +15,11 @@
                    :loading="loading"
                    :expandIconAsCell="false"
                    rowKey="applyprice"
-                   :data-source="tableList"></a-table>
+                   :data-source="tableList">
+            <template #applystatus="{ text }">
+              <span>{{ getBarmaginApplyStatus(text) }}</span>
+            </template>
+          </a-table>
         </div>
         <a-row :gutter="24"
                type="flex"
@@ -58,6 +62,7 @@ import { wrBargainNoAgree, wrBargainBack } from '@/services/proto/WrBargain';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { WrBargainBackReq, WrBargainNoAgreeReq } from '@/services/proto/WrBargain/interface';
 import Long from 'long';
+import { getBarmaginApplyStatus } from '@/common/constants/enumsName';
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_bargain_detail,
@@ -121,6 +126,7 @@ export default defineComponent({
             refuse,
             cancel,
             cancelAction,
+            getBarmaginApplyStatus,
         };
     },
 });

+ 1 - 1
src/views/order/pre_sale_warehouse_receipt/components/pre_sale_warehouse_receipt_bargain/setup.ts

@@ -26,7 +26,7 @@ export function getSpotWarrantBargainDetailColumns(selectedRow: QueryWrTradeBarg
         { title: '数量', key: 'applyqty', dataIndex: 'applyqty', align: 'center' },
         { title: '价格', key: 'applyprice', dataIndex: 'applyprice', align: 'center' },
         { title: '时间', key: 'applytime', dataIndex: 'applytime', align: 'center', slots: { customRender: 'applytime' } },
-        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center' },
+        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center', slots: { customRender: 'applystatus' } },
     ];
     function isMy() {
         return selectedRow.userid === getUserId();

+ 7 - 1
src/views/order/spot_warran/components/spot_warrant_bargain/components/bargain_detail/index.vue

@@ -15,7 +15,11 @@
                    :loading="loading"
                    :expandIconAsCell="false"
                    rowKey="applyprice"
-                   :data-source="tableList">></a-table>
+                   :data-source="tableList">
+            <template #applystatus="{ text }">
+              <span>{{ getBarmaginApplyStatus(text) }}</span>
+            </template>
+          </a-table>
         </div>
         <a-row :gutter="24"
                type="flex"
@@ -58,6 +62,7 @@ import { wrBargainNoAgree, wrBargainBack } from '@/services/proto/WrBargain';
 import { _closeModal } from '@/common/setup/modal/modal';
 import { WrBargainBackReq, WrBargainNoAgreeReq } from '@/services/proto/WrBargain/interface';
 import Long from 'long';
+import { getBarmaginApplyStatus } from '@/common/constants/enumsName';
 
 export default defineComponent({
     name: ModalEnum.spot_warrant_bargain_detail,
@@ -121,6 +126,7 @@ export default defineComponent({
             refuse,
             cancelAction,
             cancel,
+            getBarmaginApplyStatus,
         };
     },
 });

+ 2 - 2
src/views/order/spot_warran/components/spot_warrant_bargain/setup.ts

@@ -26,7 +26,7 @@ export function getSpotWarrantBargainDetailColumns(selectedRow: QueryWrTradeBarg
         { title: '数量', key: 'applyqty', dataIndex: 'applyqty', align: 'center' },
         { title: '价格', key: 'applyprice', dataIndex: 'applyprice', align: 'center' },
         { title: '时间', key: 'applytime', dataIndex: 'applytime', align: 'center', slots: { customRender: 'applytime' } },
-        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center' },
+        { title: '状态', key: 'applystatus', dataIndex: 'applystatus', align: 'center', slots: { customRender: 'applystatus' } },
     ];
     function isMy() {
         return selectedRow.userid === getUserId();
@@ -35,4 +35,4 @@ export function getSpotWarrantBargainDetailColumns(selectedRow: QueryWrTradeBarg
         return isMy() ? columns : [...columns, { title: '议价人', key: 'username', dataIndex: 'username', align: 'center' }]
     }
     return { isMy, getColums }
-}
+}