huangbin пре 4 година
родитељ
комит
08f085620f

+ 7 - 3
src/views/manage/inventory-review/list/checkin/index.vue

@@ -34,6 +34,9 @@
         <template #inouttype="{ text }">
           <a>{{ InOutTypeName(text) }}</a>
         </template>
+        <template #buynicknameOrsellusername="{ record }">
+          <a>{{ handleName(record) }}</a>
+        </template>
 
       </a-table>
     </contextMenu>
@@ -54,7 +57,7 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 
 import { Filter, CheckinAudit, CheckinCancel, CheckinDetail } from '../../components';
 
-import { queryTableList, Ermcp3AreaStockApply } from '../setup';
+import { queryTableList, Ermcp3AreaStockApply, handleName } from '../setup';
 import { getContractTypeName, getPriceTypeName, getApplyStatusName } from '@/common/constants/enumsName';
 import { operateApplyTypeName } from '@/views/manage/finance-review/setup';
 import { InOutTypeName } from '@/views/manage/inventory-review/setup';
@@ -98,7 +101,7 @@ export default defineComponent({
             getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_stock_aduit_in', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columnfield === 'buyusernameOrsellusername') {
+                if (e.columnfield === 'buynicknameOrsellusername') {
                     item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
                         const { contracttype, buyusername, sellusername } = record;
                         if (contracttype === 1) {
@@ -108,7 +111,7 @@ export default defineComponent({
                             return buyusername.includes(value);
                         }
                     };
-                    item.filteredValue = filtered.buyusernameOrsellusername || null;
+                    item.filteredValue = filtered.buynicknameOrsellusername || null;
                 }
             });
         });
@@ -130,6 +133,7 @@ export default defineComponent({
             getPriceTypeName,
             InOutTypeName,
             getTableData,
+            handleName,
         };
     },
 });

+ 7 - 4
src/views/manage/inventory-review/list/checkout/index.vue

@@ -34,6 +34,9 @@
         <template #inouttype="{ text }">
           <a>{{ InOutTypeName(text) }}</a>
         </template>
+        <template #buynicknameOrsellusername="{ record }">
+          <a>{{ handleName(record) }}</a>
+        </template>
       </a-table>
     </contextMenu>
     <!-- 详情 -->
@@ -53,7 +56,7 @@ import { defineComponent, initData, getTableColumns, getTableEvent, getBtnList,
 
 import { CheckoutAudit, CheckoutCancel, CheckoutDetail, Filter } from '../../components';
 
-import { queryTableList, Ermcp3AreaStockApply } from '../setup';
+import { queryTableList, Ermcp3AreaStockApply, handleName } from '../setup';
 import { getContractTypeName, getPriceTypeName, getApplyStatusName } from '@/common/constants/enumsName';
 import { operateApplyTypeName } from '@/views/manage/finance-review/setup';
 import { InOutTypeName } from '@/views/manage/inventory-review/setup';
@@ -97,7 +100,7 @@ export default defineComponent({
             getTableData();
             // 注册表头信息 过滤
             registerColumn('table_pcweb_stock_aduit_out', ['contracttype', 'contractno', 'deliverygoodsname'], (e: Column, item: ColumnType, filtered: any) => {
-                if (e.columnfield === 'buyusernameOrsellusername') {
+                if (e.columnfield === 'buynicknameOrsellusername') {
                     item.onFilter = (value: string, record: Ermcp3AreaStockApply) => {
                         const { contracttype, buyusername, sellusername } = record;
                         if (contracttype === 1) {
@@ -107,14 +110,14 @@ export default defineComponent({
                             return buyusername.includes(value);
                         }
                     };
-                    item.filteredValue = filtered.buyusernameOrsellusername || null;
+                    item.filteredValue = filtered.buynicknameOrsellusername || null;
                 }
             });
         });
 
         return {
             columns,
-
+            handleName,
             expandedRowKeys,
             selectedRow,
             Rowclick,

+ 11 - 3
src/views/manage/inventory-review/list/setup.ts

@@ -4,8 +4,8 @@ import { message } from 'ant-design-vue';
 import { ref } from 'vue';
 /**
  * 获取表格列表数据
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function queryTableList(type: QueryAreaStockApplyReq) {
     // 加载状态
@@ -29,6 +29,14 @@ export function queryTableList(type: QueryAreaStockApplyReq) {
     return { loading, tableList, queryTable }
 }
 
-
+export function handleName(record: Ermcp3AreaStockApply) {
+    const { contracttype, buyusername, sellusername } = record;
+    if (contracttype === 1) {
+        // 采购
+        return sellusername ? sellusername : '--'
+    } else {
+        return buyusername ? buyusername : '--'
+    }
+}
 
 export type { Ermcp3AreaStockApply };