Browse Source

commit 对手方解决

xkwg 4 years ago
parent
commit
87689f07d1

+ 19 - 0
src/views/information/spot-contract/setup.ts

@@ -87,6 +87,25 @@ export function getContractTypeName(type: number): string{
     return result
     return result
 }
 }
 
 
+/**
+ * 获取对手方名称
+ * @param type 采购 / 销售
+ * @param buyName 买方
+ * @param sellName 卖方
+ */
+export function getAnalogueName(type: number, buyName: string, sellName: string){
+    let result = "--";
+    switch (type){
+        case 1:
+            result = sellName
+            break;
+        case -1:
+            result = buyName
+            break;
+    }
+    return result
+}
+
 
 
 /************** 接口相关提示 **************** /
 /************** 接口相关提示 **************** /
  *
  *

+ 7 - 1
src/views/manage/business-review/list/someprice/index.vue

@@ -33,6 +33,11 @@
                 <template #contractstatus="{ text }">
                 <template #contractstatus="{ text }">
                     <a>{{ getContractStatusName(text) }}</a>
                     <a>{{ getContractStatusName(text) }}</a>
                 </template>
                 </template>
+
+                <template #buyusernameOrsellusername="{ record }">
+                    <a>{{ getAnalogueName(record.contracttype, record.buyusername, record.sellusername) }}</a>
+                </template>
+
             </a-table>
             </a-table>
         </contextMenu>
         </contextMenu>
         <!-- 点价记录详情 -->
         <!-- 点价记录详情 -->
@@ -62,7 +67,7 @@ import {Filter, SomepriceDetail, SomepriceAudit, SomepriceCancel} from '../../co
 import {queryTableList, getFilterTableCB, QryBusinessDjRsp} from './setup';
 import {queryTableList, getFilterTableCB, QryBusinessDjRsp} from './setup';
 import {getPriceTypeName} from "@/views/business/purchase/setup";
 import {getPriceTypeName} from "@/views/business/purchase/setup";
 import {getApplyStatusName} from "@/views/manage/business-review/setup";
 import {getApplyStatusName} from "@/views/manage/business-review/setup";
-import {getContractStatusName, getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getAnalogueName, getContractStatusName, getContractTypeName} from "@/views/information/spot-contract/setup";
 
 
 export default defineComponent({
 export default defineComponent({
     name: 'business-review-dj',
     name: 'business-review-dj',
@@ -112,6 +117,7 @@ export default defineComponent({
             getApplyStatusName,
             getApplyStatusName,
             getContractTypeName,
             getContractTypeName,
             getContractStatusName,
             getContractStatusName,
+            getAnalogueName,
         };
         };
     },
     },
 });
 });