|
@@ -15,8 +15,7 @@ const { logout } = useNav();
|
|
|
defineOptions({
|
|
|
name: "invoiceApply"
|
|
|
});
|
|
|
-console.log(useUserStoreHook().getMenuActions("invoiceApply"));
|
|
|
-// const aa=ref([].push(useUserStoreHook().))
|
|
|
+const powers = ref([]);
|
|
|
const initform = {
|
|
|
inv_in: "", //客户公司
|
|
|
inv_out: "", //业务企业公司
|
|
@@ -102,143 +101,149 @@ async function resetForm() {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- onSearch();
|
|
|
+ powers.value = useUserStoreHook().getMenuActions("invoiceApply");
|
|
|
+ if (powers.value.some(i => i == "001")) {
|
|
|
+ onSearch();
|
|
|
+ }
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div class="main">
|
|
|
- <div class="bg-white p-4">
|
|
|
- <el-row :gutter="10" class="pb-4">
|
|
|
- <el-col :span="5">
|
|
|
- <el-select
|
|
|
- v-model="form.status"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="发票申请状态"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(si, sii) in statusList"
|
|
|
- :key="'status' + si.value + sii"
|
|
|
- :label="si.label"
|
|
|
- :value="si.value"
|
|
|
+ <div v-if="powers.some(i => i == '001')">
|
|
|
+ <div class="bg-white p-4">
|
|
|
+ <el-row :gutter="10" class="pb-4">
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-select
|
|
|
+ v-model="form.status"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="发票申请状态"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(si, sii) in statusList"
|
|
|
+ :key="'status' + si.value + sii"
|
|
|
+ :label="si.label"
|
|
|
+ :value="si.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-select
|
|
|
+ v-model="form.inv_type"
|
|
|
+ style="width: 100%"
|
|
|
+ placeholder="发票类型"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(si, sii) in inv_type_list"
|
|
|
+ :key="'status' + si.value + sii"
|
|
|
+ :label="si.label"
|
|
|
+ :value="si.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <IntervalTime
|
|
|
+ v-model:startValue="form.start"
|
|
|
+ v-model:endValue="form.end"
|
|
|
+ @timeChange="timeChange"
|
|
|
+ /></el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-input
|
|
|
+ v-model="form.apply_name"
|
|
|
+ placeholder="申请人"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
/>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="5">
|
|
|
- <el-select
|
|
|
- v-model="form.inv_type"
|
|
|
- style="width: 100%"
|
|
|
- placeholder="发票类型"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(si, sii) in inv_type_list"
|
|
|
- :key="'status' + si.value + sii"
|
|
|
- :label="si.label"
|
|
|
- :value="si.value"
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-input
|
|
|
+ v-model="form.inv_in"
|
|
|
+ placeholder="企业客户名称"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-input
|
|
|
+ v-model="form.inv_out"
|
|
|
+ placeholder="业务企业公司"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
/>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="10">
|
|
|
- <IntervalTime
|
|
|
- v-model:startValue="form.start"
|
|
|
- v-model:endValue="form.end"
|
|
|
- @timeChange="timeChange"
|
|
|
- /></el-col>
|
|
|
- <el-col :span="4">
|
|
|
- <el-input
|
|
|
- v-model="form.apply_name"
|
|
|
- placeholder="申请人"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="10">
|
|
|
- <el-col :span="10">
|
|
|
- <el-input
|
|
|
- v-model="form.inv_in"
|
|
|
- placeholder="企业客户名称"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- />
|
|
|
- </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ :icon="useRenderIcon('search')"
|
|
|
+ :loading="loading"
|
|
|
+ class="fl"
|
|
|
+ @click="resetSearch"
|
|
|
+ >
|
|
|
+ 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ :icon="useRenderIcon('refresh')"
|
|
|
+ class="fl"
|
|
|
+ @click="resetForm()"
|
|
|
+ >
|
|
|
+ 重置
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
|
|
|
- <el-col :span="10">
|
|
|
- <el-input
|
|
|
- v-model="form.inv_out"
|
|
|
- placeholder="业务企业公司"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="4">
|
|
|
+ <TableProBar
|
|
|
+ title="发票申请管理"
|
|
|
+ :loading="loading"
|
|
|
+ :dataList="dataList"
|
|
|
+ @refresh="onSearch"
|
|
|
+ >
|
|
|
+ <template #buttons>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- :icon="useRenderIcon('search')"
|
|
|
- :loading="loading"
|
|
|
- class="fl"
|
|
|
- @click="resetSearch"
|
|
|
+ :icon="useRenderIcon('add')"
|
|
|
+ @click="editItem('')"
|
|
|
>
|
|
|
- 搜索
|
|
|
+ 新增发票申请
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
- :icon="useRenderIcon('refresh')"
|
|
|
- class="fl"
|
|
|
- @click="resetForm()"
|
|
|
+ </template>
|
|
|
+ <template v-slot="{ size, checkList }">
|
|
|
+ <PureTable
|
|
|
+ border
|
|
|
+ align="left"
|
|
|
+ showOverflowTooltip
|
|
|
+ table-layout="auto"
|
|
|
+ :size="size"
|
|
|
+ :data="dataList"
|
|
|
+ :columns="columns"
|
|
|
+ :checkList="checkList"
|
|
|
+ :pagination="pagination"
|
|
|
+ :paginationSmall="size === 'small' ? true : false"
|
|
|
+ :header-cell-style="{ background: '#fafafa', color: '#606266' }"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
>
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <template #operation="{ row }">
|
|
|
+ <el-button
|
|
|
+ class="reset-margin"
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ :size="size"
|
|
|
+ @click="editItem(row.id)"
|
|
|
+ :icon="useRenderIcon('eye-view')"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </PureTable>
|
|
|
+ </template>
|
|
|
+ </TableProBar>
|
|
|
</div>
|
|
|
-
|
|
|
- <TableProBar
|
|
|
- title="发票申请管理"
|
|
|
- :loading="loading"
|
|
|
- :dataList="dataList"
|
|
|
- @refresh="onSearch"
|
|
|
- >
|
|
|
- <template #buttons>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- :icon="useRenderIcon('add')"
|
|
|
- @click="editItem('')"
|
|
|
- >
|
|
|
- 新增发票申请
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- <template v-slot="{ size, checkList }">
|
|
|
- <PureTable
|
|
|
- border
|
|
|
- align="left"
|
|
|
- showOverflowTooltip
|
|
|
- table-layout="auto"
|
|
|
- :size="size"
|
|
|
- :data="dataList"
|
|
|
- :columns="columns"
|
|
|
- :checkList="checkList"
|
|
|
- :pagination="pagination"
|
|
|
- :paginationSmall="size === 'small' ? true : false"
|
|
|
- :header-cell-style="{ background: '#fafafa', color: '#606266' }"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- >
|
|
|
- <template #operation="{ row }">
|
|
|
- <el-button
|
|
|
- class="reset-margin"
|
|
|
- link
|
|
|
- type="primary"
|
|
|
- :size="size"
|
|
|
- @click="editItem(row.id)"
|
|
|
- :icon="useRenderIcon('eye-view')"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </PureTable>
|
|
|
- </template>
|
|
|
- </TableProBar>
|
|
|
+ <NoAuth v-else />
|
|
|
</div>
|
|
|
</template>
|
|
|
|