snow 2 years ago
parent
commit
7976d99627

+ 2 - 2
src/views/invoice/query/columns.tsx

@@ -93,8 +93,8 @@ export function useColumns() {
     },
     {
       label: "买方公司名称",
-      width: "180px",
-      prop: "buyer_name"
+      prop: "buyer_name",
+      width: "180px"
     },
     {
       label: "卖方公司名称",

+ 2 - 8
src/views/invoice/query/components/purchase.vue

@@ -25,19 +25,13 @@ const form = reactive({
 
 const dataList = ref([]);
 const loading = ref(true);
-const { xsColumns, cgColumns } = useColumns();
+const { cgColumns } = useColumns();
 const { push } = useRouter();
 
 const formRef = ref<FormInstance>();
 
 const { currentCompany } = useCompany();
 
-const columns = computed(() => {
-  console.log(cgColumns.value);
-
-  return formData.value.type === "0" ? xsColumns.value : cgColumns.value;
-});
-
 const toPath = computed(() => "/purchase/ticketReturnDetail");
 
 const pagination = reactive<PaginationProps>({
@@ -160,7 +154,7 @@ onMounted(() => {
       <ElTable :data="dataList" border v-loading="loading">
         <ElTableColumn
           show-overflow-tooltip
-          v-for="(c, index) in columns"
+          v-for="(c, index) in cgColumns"
           :width="c.width"
           :min-width="c?.minWidth"
           :key="index"