wupengfei
14 小时以前 a686faf1c2132f55e40119df28ce9f6e46206b74
src/views/ServiceChargeManage/ServiceChargeManage.vue
@@ -55,7 +55,7 @@
        :columns="ServiceChargeManageColumns"
        :operationBtns="operationBtns"
      >
        <template #operationBtn-uploadBtn="{ row }">
        <!-- <template #operationBtn-uploadBtn="{ row }">
          <BlFileUpload
            v-model:file-url="editForm.settlementUrl"
            ref="uploadRef"
@@ -84,7 +84,7 @@
          >
            <el-button text type="primary" class="pro-table-operation-btn">重新上传</el-button>
          </BlFileUpload>
        </template>
        </template> -->
      </ProTableV2>
    </AppContainer>
    <UploadStatementDialog v-bind="dialogProps" />
@@ -127,36 +127,36 @@
});
const operationBtns = defineOperationBtns([
  {
    data: {
      enCode: 'uploadBtn',
      name: '上传',
    },
    extraProps: {
      hide: (row: API.GetSettlementTasksQueryResultItem) =>
        row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait,
    },
  },
  {
    data: {
      enCode: 'reUploadBtn',
      name: '重新上传',
    },
    extraProps: {
      hide: (row: API.GetSettlementTasksQueryResultItem) =>
        !(
          row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed &&
          row.settlementStatus === EnumTaskSettlementStatus.Wait
        ),
    },
  },
  // {
  //   data: {
  //     enCode: 'uploadBtn',
  //     name: '上传',
  //   },
  //   extraProps: {
  //     hide: (row: API.GetSettlementTasksQueryResultItem) =>
  //       row.settlementOrderStatus !== EnumTaskSettlementOrderStatus.Wait,
  //   },
  // },
  // {
  //   data: {
  //     enCode: 'reUploadBtn',
  //     name: '重新上传',
  //   },
  //   extraProps: {
  //     hide: (row: API.GetSettlementTasksQueryResultItem) =>
  //       !(
  //         row.settlementOrderStatus === EnumTaskSettlementOrderStatus.Completed &&
  //         row.settlementStatus === EnumTaskSettlementStatus.Wait
  //       ),
  //   },
  // },
  {
    data: {
      enCode: 'settleBtn',
      name: '结算',
    },
    emits: {
      onClick: (role: API.GetSettlementTasksQueryResultItem) => openSettleDialog(role),
      onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role, 'settlement'),
    },
    extraProps: {
      hide: (role: API.GetSettlementTasksQueryResultItem) =>
@@ -185,7 +185,7 @@
      name: '详情',
    },
    emits: {
      onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role.id),
      onClick: (role: API.GetSettlementTasksQueryResultItem) => goDetail(role),
    },
    extraProps: {
      hide: (role: API.GetSettlementTasksQueryResultItem) =>
@@ -288,7 +288,7 @@
});
async function handleAddOrEdit() {
  goDetail(editForm.id, editForm.settlementUrl[0]?.path);
  goSettlementDetail(editForm.id, editForm.settlementUrl[0]?.path);
}
const {
@@ -348,11 +348,11 @@
  row: API.GetSettlementTasksQueryResultItem
) {
  if (response.path) {
    goDetail(row.id, response.path);
    goSettlementDetail(row.id, response.path);
  }
}
async function goDetail(id: string, url?: string) {
async function goSettlementDetail(id: string, url?: string) {
  await router.push({
    name: 'ServiceChargeDetail',
    params: {
@@ -365,6 +365,18 @@
  editForm.settlementUrl = [] as UploadUserFile[];
}
function goDetail(row: API.GetSettlementTasksQueryResultItem, settlement?: string) {
  router.push({
    name: 'ServiceChargeDetail',
    params: {
      id: row?.id ?? '',
    },
    query: {
      settlement: settlement ? settlement : '',
    },
  });
}
function handleExport(val) {
  console.log('val: ', val);
}