修改bug
This commit is contained in:
@ -7,8 +7,7 @@
|
||||
<el-form :model="state.queryForm" :inline="true">
|
||||
<el-form-item label="版本号" prop="versions">
|
||||
<el-select v-model="state.queryForm.versions" placeholder="选择版本号">
|
||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions"
|
||||
:value="item.versions" />
|
||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="表名" prop="sheet">
|
||||
@ -25,13 +24,23 @@
|
||||
<el-form-item>
|
||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false">
|
||||
<template #trigger>
|
||||
<el-button v-if="Object.keys(state.versionsData).length === 0 || state.versionsData.status == 'cancel' ||state.versionsData.status == 'back'" type="primary">导入excel</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
Object.keys(state.versionsData).length === 0 || state.versionsData.status == 'cancel' || state.versionsData.status == 'back'
|
||||
"
|
||||
type="primary"
|
||||
>导入excel</el-button
|
||||
>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit"
|
||||
@click="clickApprovalSheet()">审核</el-button>
|
||||
<el-button v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
|
||||
icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button>
|
||||
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
|
||||
<el-button
|
||||
v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
|
||||
icon="view"
|
||||
@click="lookApprovalFlow()"
|
||||
type="warning"
|
||||
>查看流程</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@ -39,36 +48,47 @@
|
||||
<el-form :model="state.queryForm" :inline="true">
|
||||
<el-form-item label="版本号" prop="versions">
|
||||
<el-select v-model="state.queryForm.versions" placeholder="选择版本号" @change="handleChangeVersion">
|
||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions"
|
||||
:value="item.versions" />
|
||||
<el-option v-for="item in state.options" :key="item.versions" :label="item.versions" :value="item.versions" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px;">
|
||||
<el-upload ref="uploadRef" class="upload-demo" :http-request="importExcel" :show-file-list="false" style="margin-right: 10px">
|
||||
<template #trigger>
|
||||
<el-button type="primary">导入excel</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit"
|
||||
@click="clickApprovalSheet()">审核</el-button>
|
||||
<el-button v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
|
||||
icon="view" @click="lookApprovalFlow()" type="warning">查看流程</el-button>
|
||||
<el-button v-if="state.versionsData.status == 'draft'" type="primary" con="edit" @click="clickApprovalSheet()">审核</el-button>
|
||||
<el-button
|
||||
v-if="state.versionsData.status == 'waiting' || state.versionsData.status == 'finish'"
|
||||
icon="view"
|
||||
@click="lookApprovalFlow()"
|
||||
type="warning"
|
||||
>查看流程</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-table v-if="index < 3" :ref="(el) => (tableRef[index] = el)" :data="state.tableData"
|
||||
v-loading="state.loading.list" stripe :row-class-name="state.tableData.length === 0 ? 'table-null' : ''"
|
||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" lazy border
|
||||
:default-expand-all="true">
|
||||
<el-table
|
||||
v-if="index < 3"
|
||||
:ref="(el) => (tableRef[index] = el)"
|
||||
:data="state.tableData"
|
||||
v-loading="state.loading.list"
|
||||
stripe
|
||||
:row-class-name="state.tableData.length === 0 ? 'table-null' : ''"
|
||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)"
|
||||
row-key="id"
|
||||
lazy
|
||||
border
|
||||
:default-expand-all="true"
|
||||
>
|
||||
<el-table-column prop="num" label="编号" />
|
||||
<el-table-column prop="name" label="工程或费用名称" />
|
||||
<el-table-column prop="unit" label="单位" />
|
||||
<el-table-column prop="specification" label="规格" />
|
||||
<el-table-column prop="unit" label="单位" />
|
||||
<el-table-column prop="quantity" label="数量" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
</el-table>
|
||||
<el-table v-if="index == 3" :data="state.tableData"
|
||||
style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" border>
|
||||
<el-table v-if="index == 3" :data="state.tableData" style="width: 100%; margin-bottom: 20px; height: calc(100vh - 305px)" row-key="id" border>
|
||||
<el-table-column prop="num" label="编号" />
|
||||
<el-table-column prop="name" label="名称" />
|
||||
<el-table-column prop="specification" label="规格" />
|
||||
@ -126,7 +146,7 @@ const state = reactive({
|
||||
});
|
||||
// tab切换
|
||||
const handleTabChange = (tab) => {
|
||||
console.log('tab',tab);
|
||||
console.log('tab', tab);
|
||||
state.tableData = [];
|
||||
state.options = [];
|
||||
state.sheets = [];
|
||||
@ -164,7 +184,7 @@ async function getVersionNums(isSheet = true) {
|
||||
// if (state.work_order_type == 3) {
|
||||
state.versionsData = state.options[0] || [];
|
||||
console.log('state.versionsData', state.versionsData);
|
||||
// console.log('state.versionsData', state.versionsData);
|
||||
// console.log('state.versionsData', state.versionsData);
|
||||
// }
|
||||
// 等待表名加载完成
|
||||
console.log(isSheet, state.sheets.length);
|
||||
@ -308,7 +328,7 @@ function handleArr(arr, flag, table) {
|
||||
function clickApprovalSheet(row) {
|
||||
proxy.$tab.closePage(proxy.$route);
|
||||
proxy.$router.push({
|
||||
path: `/approval/billofQuantities/indexEdit`+state.work_order_type,
|
||||
path: `/approval/billofQuantities/indexEdit` + state.work_order_type,
|
||||
query: {
|
||||
id: state.queryForm.versions,
|
||||
type: 'update'
|
||||
@ -318,7 +338,7 @@ function clickApprovalSheet(row) {
|
||||
// 审核流程
|
||||
function lookApprovalFlow(row) {
|
||||
proxy.$router.push({
|
||||
path: `/approval/billofQuantities/indexEdit`+state.work_order_type,
|
||||
path: `/approval/billofQuantities/indexEdit` + state.work_order_type,
|
||||
query: {
|
||||
id: state.queryForm.versions,
|
||||
type: 'view'
|
||||
|
Reference in New Issue
Block a user