临时提交(编辑报表)
This commit is contained in:
parent
d1f542a841
commit
6deb632756
|
@ -180,3 +180,8 @@ aside {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.edit-title {
|
||||||
|
border-left:3px solid #6F2023;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
|
@ -2,152 +2,147 @@
|
||||||
<!--版本更新内容:添加prop属性,修复多选-->
|
<!--版本更新内容:添加prop属性,修复多选-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible="show" width="80%" top="2vh" @open="open" @close="close"
|
<el-dialog :title="title" :visible="show" width="80%" top="2vh" @open="open" @close="close" :append-to-body="true">
|
||||||
:append-to-body="true">
|
<price
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
|
||||||
<el-form-item label="部门" prop="deptId">
|
|
||||||
<dept-tree-select v-model="queryParams.deptId" width="215px" @change="handleQuery"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable @change="handleQuery">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.price_status"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="类别" prop="category">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.category"
|
|
||||||
placeholder="请输入类别"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="大小" prop="size">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.size"
|
|
||||||
placeholder="请输入大小"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="工序" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入工序名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="子工序" prop="subName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.subName"
|
|
||||||
placeholder="请输入子工序名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="图案" prop="pattern">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.pattern"
|
|
||||||
placeholder="请输入图案"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="规格" prop="spec">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.spec"
|
|
||||||
placeholder="请输入规格"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="单位" prop="unit">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.unit"
|
|
||||||
placeholder="请输入单位"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.remark"
|
|
||||||
placeholder="请输入备注"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分类" prop="classify">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.classify"
|
|
||||||
placeholder="请输入分类"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="创建人" prop="createBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.createBy"
|
|
||||||
placeholder="请输入创建人名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="审核人" prop="verifyBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.verifyBy"
|
|
||||||
placeholder="请输入审核人名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="更新人" prop="updateBy">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.updateBy"
|
|
||||||
placeholder="请输入更新人名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="禁用状态" prop="disabled">
|
|
||||||
<el-radio-group v-model="queryParams.disabled" @change="handleQuery">
|
|
||||||
<el-radio :label="null">全部</el-radio>
|
|
||||||
<el-radio :label="false">启用</el-radio>
|
|
||||||
<el-radio :label="true">禁用</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-table
|
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="tableData"
|
enable-select
|
||||||
v-loading="loadTable"
|
:enable-multiple="multiple"
|
||||||
@row-click="changeSelection"
|
@row-click="changeSelection"
|
||||||
@row-dblclick="select"
|
@row-dblclick="select"
|
||||||
@select-all="selectionAll"
|
@select-all="selectionAll"
|
||||||
@select="changeSelection"
|
@select="changeSelection"
|
||||||
highlight-current-row
|
/>
|
||||||
>
|
|
||||||
<el-table-column align="center" type="selection" v-if="multiple"/>
|
|
||||||
<el-table-column label="#" type="index" align="center"/>
|
|
||||||
<el-table-column label="部门" prop="deptName"/>
|
|
||||||
|
|
||||||
</el-table>
|
<!-- <el-form :model="queryParams" ref="queryForm" size="small" v-show="showSearch" :inline="true" label-width="68px">-->
|
||||||
<pagination
|
<!-- <el-form-item label="部门" prop="deptId">-->
|
||||||
:limit.sync="queryParams.pageSize"
|
<!-- <dept-tree-select v-model="queryParams.deptId" width="215px" @change="handleQuery"/>-->
|
||||||
:page.sync="queryParams.pageNum"
|
<!-- </el-form-item>-->
|
||||||
:total="total"
|
<!-- <el-form-item label="类别" prop="category">-->
|
||||||
@pagination="getList">
|
<!-- <el-input-->
|
||||||
</pagination>
|
<!-- v-model="queryParams.category"-->
|
||||||
|
<!-- placeholder="请输入类别"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="大小" prop="size">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.size"-->
|
||||||
|
<!-- placeholder="请输入大小"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="工序" prop="name">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.name"-->
|
||||||
|
<!-- placeholder="请输入工序名称"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="子工序" prop="subName">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.subName"-->
|
||||||
|
<!-- placeholder="请输入子工序名称"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="图案" prop="pattern">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.pattern"-->
|
||||||
|
<!-- placeholder="请输入图案"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="规格" prop="spec">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.spec"-->
|
||||||
|
<!-- placeholder="请输入规格"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="备注" prop="remark">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.remark"-->
|
||||||
|
<!-- placeholder="请输入备注"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="分类" prop="classify">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.classify"-->
|
||||||
|
<!-- placeholder="请输入分类"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item>-->
|
||||||
|
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
||||||
|
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
|
||||||
|
<!-- <el-row>-->
|
||||||
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>-->
|
||||||
|
<!-- </el-row>-->
|
||||||
|
|
||||||
|
<!-- <el-table-->
|
||||||
|
<!-- ref="multipleTable"-->
|
||||||
|
<!-- :data="tableData"-->
|
||||||
|
<!-- v-loading="loadTable"-->
|
||||||
|
<!-- @row-click="changeSelection"-->
|
||||||
|
<!-- @row-dblclick="select"-->
|
||||||
|
<!-- @select-all="selectionAll"-->
|
||||||
|
<!-- @select="changeSelection"-->
|
||||||
|
<!-- highlight-current-row-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-table-column align="center" type="selection" v-if="multiple"/>-->
|
||||||
|
<!-- <el-table-column label="#" type="index" align="center"/>-->
|
||||||
|
<!-- <template v-for="column of showColumns">-->
|
||||||
|
<!-- <el-table-column-->
|
||||||
|
<!-- :key="column.key"-->
|
||||||
|
<!-- :label="column.label"-->
|
||||||
|
<!-- :prop="column.key"-->
|
||||||
|
<!-- :align="column.align"-->
|
||||||
|
<!-- :min-width="column.minWidth"-->
|
||||||
|
<!-- :sortable="column.sortable"-->
|
||||||
|
<!-- :show-overflow-tooltip="column.overflow"-->
|
||||||
|
<!-- :width="column.width"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <template slot-scope="d">-->
|
||||||
|
<!-- <template v-if="column.key === 'priceId'">-->
|
||||||
|
<!-- {{d.row[column.key]}}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else-if="column.key === 'status'">-->
|
||||||
|
<!-- <dict-tag :options="dict.type.price_status" :value="d.row[column.key]"/>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else-if="column.key === 'disabled'">-->
|
||||||
|
<!-- <boolean-tag :value="d.row.disabled" true-text="禁用" true-type="danger" false-text="启用" false-type="success" />-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else-if="column.key === 'quantity'">-->
|
||||||
|
<!-- {{d.row.quantity | fix2 | dv}} 个-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else-if="column.key === 'price'">-->
|
||||||
|
<!-- {{d.row.price | dv}} 元-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template v-else>-->
|
||||||
|
<!-- {{d.row[column.key] | dv}}-->
|
||||||
|
<!-- </template>``-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table>-->
|
||||||
|
<!-- <pagination-->
|
||||||
|
<!-- :limit.sync="queryParams.pageSize"-->
|
||||||
|
<!-- :page.sync="queryParams.pageNum"-->
|
||||||
|
<!-- :total="total"-->
|
||||||
|
<!-- @pagination="getList">-->
|
||||||
|
<!-- </pagination>-->
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button type="primary" @click="submit()">确定</el-button>
|
<el-button type="primary" @click="submit()">确定</el-button>
|
||||||
|
@ -161,11 +156,14 @@ import { mapGetters } from 'vuex'
|
||||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||||
import Price from "@/views/yh/price/index.vue";
|
import Price from "@/views/yh/price/index.vue";
|
||||||
import {listPrice} from "@/api/yh/price";
|
import {listPrice} from "@/api/yh/price";
|
||||||
|
import BooleanTag from "@/components/BooleanTag/index.vue";
|
||||||
|
import {$showColumns} from "@/utils/mixins";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PriceDialog",
|
name: "PriceDialog",
|
||||||
|
mixins: [$showColumns],
|
||||||
dicts: ['price_status'],
|
dicts: ['price_status'],
|
||||||
components: {Price, DeptTreeSelect},
|
components: {BooleanTag, Price, DeptTreeSelect},
|
||||||
props: {
|
props: {
|
||||||
// 标题
|
// 标题
|
||||||
title: {
|
title: {
|
||||||
|
@ -203,12 +201,37 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
showSearch: true,
|
||||||
loadTable: false,
|
loadTable: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
queryParams: {},
|
queryParams: {},
|
||||||
total: 0,
|
total: 0,
|
||||||
row: null,
|
row: null,
|
||||||
selected: [],
|
selected: [],
|
||||||
|
columns: [
|
||||||
|
{key: 'priceId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'deptName', visible: true, label: '部门', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'status', visible: true, label: '状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'category', visible: true, label: '类别', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'size', visible: true, label: '大小', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'name', visible: true, label: '工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'subName', visible: true, label: '子工序', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'pattern', visible: true, label: '图案', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'spec', visible: true, label: '规格', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'price', visible: true, label: '单价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'unit', visible: true, label: '单位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'classify', visible: true, label: '分类', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
{key: 'quantity', visible: true, label: '生产数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: true, align: 'center', width: null},
|
||||||
|
{key: 'createBy', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'verifyBy', visible: true, label: '审核人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'verifyTime', visible: true, label: '审核时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'updateId', visible: true, label: '更新人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'updateTime', visible: true, label: '更新时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'disabled', visible: true, label: '禁用状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
|
{key: 'disabledTime', visible: true, label: '禁用时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
59
src/components/EditHeader/index.vue
Normal file
59
src/components/EditHeader/index.vue
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
<template>
|
||||||
|
<div class="header-box">
|
||||||
|
<div class="back" @click="$emit('back')" v-if="showBack">
|
||||||
|
<i class="el-icon-arrow-left"/>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
{{title}}
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<slot/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "EditHeader",
|
||||||
|
props: {
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
showBack: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.header-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 48px;
|
||||||
|
background-color: #fff;
|
||||||
|
line-height: 48px;
|
||||||
|
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
||||||
|
display: flex;
|
||||||
|
.back {
|
||||||
|
padding: 0 1em;
|
||||||
|
transition: .25s;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.back:hover {
|
||||||
|
background-color: #f1f1f1;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin:0 2em;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
padding-right: 2em;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -71,7 +71,26 @@ export const constantRoutes = [
|
||||||
component: () => import('@/views/index'),
|
component: () => import('@/views/index'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||||
}
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/edit',
|
||||||
|
component: Layout,
|
||||||
|
hidden: true,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: 'report/add',
|
||||||
|
component: () => import('@/views/yh/report/edit.vue'),
|
||||||
|
name: 'ReportEdit',
|
||||||
|
meta: { title: '新增报表', noCache: false}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'report/:reportId/update',
|
||||||
|
component: () => import('@/views/yh/report/edit.vue'),
|
||||||
|
name: 'ReportEdit',
|
||||||
|
meta: { title: '编辑报表', noCache: false}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,6 +65,7 @@ export const $showColumns = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 隐藏列
|
||||||
hideColumn(columns) {
|
hideColumn(columns) {
|
||||||
if (this.columns != null) {
|
if (this.columns != null) {
|
||||||
this.columns.filter(item => columns.includes(item.key))
|
this.columns.filter(item => columns.includes(item.key))
|
||||||
|
@ -73,6 +74,7 @@ export const $showColumns = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 删除列
|
||||||
removeColumn(columns) {
|
removeColumn(columns) {
|
||||||
if (columns != null) {
|
if (columns != null) {
|
||||||
columns.forEach(column => {
|
columns.forEach(column => {
|
||||||
|
@ -85,3 +87,22 @@ export const $showColumns = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表选择
|
||||||
|
*/
|
||||||
|
export const $listSelect = {
|
||||||
|
props: {
|
||||||
|
// 开启选择模式
|
||||||
|
enableSelect: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggleRowSelection(row, flag) {
|
||||||
|
console.log("toggleRowSelection", row, flag)
|
||||||
|
this.$refs.table.toggleRowSelection(row, flag);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8" v-if="!enableSelect">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -153,8 +153,11 @@
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
:default-sort="defaultSort"
|
:default-sort="defaultSort"
|
||||||
@sort-change="onSortChange"
|
@sort-change="onSortChange"
|
||||||
|
v-on="$listeners"
|
||||||
|
:highlight-current-row="enableSelect"
|
||||||
|
ref="table"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" v-if="enableMultiple" />
|
||||||
<template v-for="column of showColumns">
|
<template v-for="column of showColumns">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:key="column.key"
|
:key="column.key"
|
||||||
|
@ -318,7 +321,7 @@ import {
|
||||||
disablePrice,
|
disablePrice,
|
||||||
cancelPrice, enablePrice
|
cancelPrice, enablePrice
|
||||||
} from "@/api/yh/price";
|
} from "@/api/yh/price";
|
||||||
import { $showColumns} from '@/utils/mixins';
|
import {$listSelect, $showColumns} from '@/utils/mixins';
|
||||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||||
import BooleanTag from "@/components/BooleanTag/index.vue";
|
import BooleanTag from "@/components/BooleanTag/index.vue";
|
||||||
import {PriceStatus} from "@/utils/constants";
|
import {PriceStatus} from "@/utils/constants";
|
||||||
|
@ -333,7 +336,7 @@ const defaultSort = {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Price",
|
name: "Price",
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns, $listSelect],
|
||||||
dicts: ['price_status'],
|
dicts: ['price_status'],
|
||||||
components: {FormCol, VerifyPriceDialog, BooleanTag, DeptTreeSelect},
|
components: {FormCol, VerifyPriceDialog, BooleanTag, DeptTreeSelect},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -341,6 +344,12 @@ export default {
|
||||||
return PriceStatus
|
return PriceStatus
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
enableMultiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
gutter: 8,
|
gutter: 8,
|
||||||
|
@ -363,16 +372,16 @@ export default {
|
||||||
{key: 'price', visible: true, label: '单价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'price', visible: true, label: '单价', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'unit', visible: true, label: '单位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'unit', visible: true, label: '单位', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'classify', visible: true, label: '分类', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'classify', visible: true, label: '分类', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
{key: 'quantity', visible: true, label: '生产数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'quantity', visible: false, label: '生产数量', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: true, align: 'center', width: null},
|
{key: 'remark', visible: true, label: '备注', minWidth: null, sortable: true, overflow: true, align: 'center', width: null},
|
||||||
{key: 'createBy', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'createBy', visible: true, label: '创建人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'createTime', visible: true, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'createTime', visible: false, label: '创建时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'verifyBy', visible: true, label: '审核人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'verifyBy', visible: true, label: '审核人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'verifyTime', visible: true, label: '审核时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
{key: 'verifyTime', visible: false, label: '审核时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'updateId', visible: true, label: '更新人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'updateId', visible: true, label: '更新人', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'updateTime', visible: true, label: '更新时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'updateTime', visible: false, label: '更新时间', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'disabled', visible: true, label: '禁用状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
{key: 'disabled', visible: true, label: '禁用状态', minWidth: null, sortable: true, overflow: false, align: 'center', width: "100"},
|
||||||
{key: 'disabledTime', visible: true, label: '禁用时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
{key: 'disabledTime', visible: false, label: '禁用时间', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
|
||||||
],
|
],
|
||||||
// 排序方式
|
// 排序方式
|
||||||
orderSorts: ['ascending', 'descending', null],
|
orderSorts: ['ascending', 'descending', null],
|
||||||
|
|
58
src/views/yh/report/components/EditIncome.vue
Normal file
58
src/views/yh/report/components/EditIncome.vue
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<template>
|
||||||
|
<el-table :data="data">
|
||||||
|
<el-table-column type="index" width="80" label="#"/>
|
||||||
|
<el-table-column label="用户" align="center">
|
||||||
|
<template scope="d">
|
||||||
|
<el-form-item label-width="0" :prop="`${prop}[${d.index}].userId`" :rules="rules.userId">
|
||||||
|
<el-input v-model="d.row.userId"/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column width="200">
|
||||||
|
<template #header>
|
||||||
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addRow">添加一行</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "EditIncome",
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
prop: {
|
||||||
|
type: String,
|
||||||
|
default: 'incomeList',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addRow() {
|
||||||
|
this.data.push({
|
||||||
|
userId: null,
|
||||||
|
income: null,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
136
src/views/yh/report/edit.vue
Normal file
136
src/views/yh/report/edit.vue
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<edit-header :title="title">
|
||||||
|
<el-button type="primary" @click="submitForm" icon="el-icon-check">提交</el-button>
|
||||||
|
</edit-header>
|
||||||
|
|
||||||
|
<div class="app-container" v-loading="loading">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<div class="edit-title">基础信息</div>
|
||||||
|
<el-row>
|
||||||
|
<form-col :span="span" label="部门" prop="deptId">
|
||||||
|
<dept-tree-select v-model="form.deptId"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="选择单价" prop="priceId">
|
||||||
|
<price-input v-model="form.priceId"/>
|
||||||
|
</form-col>
|
||||||
|
<form-col :span="span" label="完成数量" prop="num">
|
||||||
|
<el-input v-model="form.num" placeholder="请输入工序完成数量" :min="1" type="number"/>
|
||||||
|
</form-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<div class="edit-title">工资详情</div>
|
||||||
|
<edit-income :data="form.incomeList" :rules="incomeRules"/>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
|
import PriceInput from "@/components/Business/Price/PriceInput.vue";
|
||||||
|
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||||
|
import {addReport, getReport, updateReport} from "@/api/yh/report";
|
||||||
|
import EditHeader from "@/components/EditHeader/index.vue";
|
||||||
|
import EditIncome from "@/views/yh/report/components/EditIncome.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ReportEdit",
|
||||||
|
components: {EditIncome, EditHeader, DeptTreeSelect, PriceInput, FormCol},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: null,
|
||||||
|
loading: false,
|
||||||
|
gutter: 16,
|
||||||
|
span: 6,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
deptId: [
|
||||||
|
{ required: true, message: "部门不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
num: [
|
||||||
|
{ required: true, message: "工序完成数量不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
priceId: [
|
||||||
|
{ required: true, message: "单价不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
},
|
||||||
|
incomeRules: {
|
||||||
|
userId: [
|
||||||
|
{ required: true, message: "员工不能为空", trigger: "change" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.form.reportId = this.$route.params.reportId;
|
||||||
|
if (this.form.reportId == null) {
|
||||||
|
this.title = "新增报表";
|
||||||
|
this.reset();
|
||||||
|
} else {
|
||||||
|
this.title = "修改报表";
|
||||||
|
this.getDetail(this.form.reportId);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDetail(reportId) {
|
||||||
|
this.loading = true;
|
||||||
|
getReport(reportId).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.reportId != null) {
|
||||||
|
updateReport(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addReport(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
reportId: null,
|
||||||
|
deptId: null,
|
||||||
|
num: null,
|
||||||
|
status: null,
|
||||||
|
priceId: null,
|
||||||
|
priceCategory: null,
|
||||||
|
priceSize: null,
|
||||||
|
priceName: null,
|
||||||
|
priceSubName: null,
|
||||||
|
pricePattern: null,
|
||||||
|
priceSpec: null,
|
||||||
|
pricePrice: null,
|
||||||
|
priceUnit: null,
|
||||||
|
priceClassify: null,
|
||||||
|
priceQuantity: null,
|
||||||
|
createTime: null,
|
||||||
|
createId: null,
|
||||||
|
createBy: null,
|
||||||
|
verifyTime: null,
|
||||||
|
verifyId: null,
|
||||||
|
verifyBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
updateId: null,
|
||||||
|
updateBy: null,
|
||||||
|
incomeList: []
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -197,60 +197,6 @@
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改报表对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-row>
|
|
||||||
<form-col :span="span" label="部门" prop="deptId">
|
|
||||||
<dept-tree-select v-model="form.deptId"/>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="完成数量" prop="num">
|
|
||||||
<el-input v-model="form.num" placeholder="请输入工序完成数量" :min="1" type="number"/>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="选择单价" prop="priceId">
|
|
||||||
<price-input v-model="form.priceId"/>
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价ID" prop="priceId">
|
|
||||||
<el-input v-model="form.priceId" placeholder="请输入单价ID" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价类别" prop="priceCategory">
|
|
||||||
<el-input v-model="form.priceCategory" placeholder="请输入单价类别" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价大小" prop="priceSize">
|
|
||||||
<el-input v-model="form.priceSize" placeholder="请输入单价大小" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="工序" prop="priceName">
|
|
||||||
<el-input v-model="form.priceName" placeholder="请输入单价工序名称" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="子工序" prop="priceSubName">
|
|
||||||
<el-input v-model="form.priceSubName" placeholder="请输入单价子工序名称" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价图案" prop="pricePattern">
|
|
||||||
<el-input v-model="form.pricePattern" placeholder="请输入单价图案" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价规格" prop="priceSpec">
|
|
||||||
<el-input v-model="form.priceSpec" placeholder="请输入单价规格" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价单价(元)" prop="pricePrice">
|
|
||||||
<el-input v-model="form.pricePrice" placeholder="请输入单价单价(元)" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价单位" prop="priceUnit">
|
|
||||||
<el-input v-model="form.priceUnit" placeholder="请输入单价单位" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="单价分类" prop="priceClassify">
|
|
||||||
<el-input v-model="form.priceClassify" placeholder="请输入单价分类" />
|
|
||||||
</form-col>
|
|
||||||
<form-col :span="span" label="生产数量倍数" prop="priceQuantity">
|
|
||||||
<el-input v-model="form.priceQuantity" placeholder="请输入单价生产数量倍数" />
|
|
||||||
</form-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -260,6 +206,7 @@ import { $showColumns } from '@/utils/mixins';
|
||||||
import FormCol from "@/components/FormCol/index.vue";
|
import FormCol from "@/components/FormCol/index.vue";
|
||||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||||
import PriceInput from "@/components/Business/Price/PriceInput.vue";
|
import PriceInput from "@/components/Business/Price/PriceInput.vue";
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
|
|
||||||
// 默认排序字段
|
// 默认排序字段
|
||||||
const defaultSort = {
|
const defaultSort = {
|
||||||
|
@ -272,10 +219,11 @@ export default {
|
||||||
mixins: [$showColumns],
|
mixins: [$showColumns],
|
||||||
dicts: ['report_status'],
|
dicts: ['report_status'],
|
||||||
components: {PriceInput, DeptTreeSelect, FormCol},
|
components: {PriceInput, DeptTreeSelect, FormCol},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['deptId'])
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
gutter: 8,
|
|
||||||
span: 24,
|
|
||||||
// 字段列表
|
// 字段列表
|
||||||
columns: [
|
columns: [
|
||||||
{key: 'reportId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
{key: 'reportId', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
|
||||||
|
@ -346,35 +294,6 @@ export default {
|
||||||
updateId: null,
|
updateId: null,
|
||||||
updateBy: null
|
updateBy: null
|
||||||
},
|
},
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
deptId: [
|
|
||||||
{ required: true, message: "部门ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
num: [
|
|
||||||
{ required: true, message: "工序完成数量不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
status: [
|
|
||||||
{ required: true, message: "状态不能为空", trigger: "change" }
|
|
||||||
],
|
|
||||||
priceId: [
|
|
||||||
{ required: true, message: "单价ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
priceName: [
|
|
||||||
{ required: true, message: "单价工序名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
pricePrice: [
|
|
||||||
{ required: true, message: "单价单价(元)不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
createTime: [
|
|
||||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
createBy: [
|
|
||||||
{ required: true, message: "创建人名称不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -401,41 +320,6 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
reportId: null,
|
|
||||||
deptId: null,
|
|
||||||
num: null,
|
|
||||||
status: null,
|
|
||||||
priceId: null,
|
|
||||||
priceCategory: null,
|
|
||||||
priceSize: null,
|
|
||||||
priceName: null,
|
|
||||||
priceSubName: null,
|
|
||||||
pricePattern: null,
|
|
||||||
priceSpec: null,
|
|
||||||
pricePrice: null,
|
|
||||||
priceUnit: null,
|
|
||||||
priceClassify: null,
|
|
||||||
priceQuantity: null,
|
|
||||||
createTime: null,
|
|
||||||
createId: null,
|
|
||||||
createBy: null,
|
|
||||||
verifyTime: null,
|
|
||||||
verifyId: null,
|
|
||||||
verifyBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
updateId: null,
|
|
||||||
updateBy: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
@ -454,39 +338,11 @@ export default {
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.$router.push(`/edit/report/add`)
|
||||||
this.open = true;
|
|
||||||
this.title = "添加报表";
|
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.$router.push(`/edit/report/${row.reportId}/update`)
|
||||||
const reportId = row.reportId || this.ids
|
|
||||||
getReport(reportId).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改报表";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.reportId != null) {
|
|
||||||
updateReport(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addReport(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user