更新
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-12-28 09:25:04
|
||||
* @LastEditTime: 2023-04-20 10:57:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer :visible.sync="visible" size="90%" class="drawerClass" :before-close="handleClose">
|
||||
<template slot="title">
|
||||
<h3 style="margin:10px 20px">{{ !dataForm.id ? "登记" : "修改" }}</h3>
|
||||
<h3 class="titleStyle">{{ !dataForm.id ? "登记" : "修改" }}</h3>
|
||||
</template>
|
||||
<el-collapse value="1" @change="handleChange">
|
||||
<el-collapse-item name="1">
|
||||
@@ -438,4 +438,18 @@ export default {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.titleStyle{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.titleStyle::before{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 16px;
|
||||
background-color: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-09-15 10:44:29
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2022-12-09 11:16:58
|
||||
* @LastEditTime: 2023-04-20 10:58:45
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-row :gutter="6" style="background-color:#e6f7ff;margin:-20px;padding-top:10px;margin-bottom:0">
|
||||
<el-row :gutter="6" style="background-color:#e6f7ff;padding-top:10px;margin-bottom:0">
|
||||
<el-form ref="dataForm" :model="dataForm" :rules="rules" size="small" label-width="80px">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验时间" prop="time">
|
||||
@@ -138,67 +138,27 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
:stripe="true"
|
||||
:header-cell-style="{
|
||||
background: '#eef1f6',
|
||||
color: '#606266',
|
||||
height: '56px',
|
||||
}"
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column prop="id" align="center" label="检验单号"> </el-table-column>
|
||||
<el-table-column prop="batchNumber" align="center" label="批次号"> </el-table-column>
|
||||
<el-table-column prop="inspectionStage" align="center" label="检验阶段">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
{ 1: "进货检验", 2: "过程检验", 3: "成品检验", 4: "出货检验" }[
|
||||
scope.row.inspectionStage
|
||||
]
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productName" align="center" label="产品名称"> </el-table-column>
|
||||
<el-table-column prop="machineName" align="center" label="机台"> </el-table-column>
|
||||
<el-table-column prop="workingProcedureName" align="center" label="工序"> </el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="检验时间"> </el-table-column>
|
||||
<el-table-column prop="shiftName" align="center" label="班次"> </el-table-column>
|
||||
<el-table-column prop="numberOfSamples" align="center" label="抽样数量"> </el-table-column>
|
||||
<el-table-column prop="numberOfDefects" align="center" label="缺陷数量"> </el-table-column>
|
||||
<el-table-column prop="defectiveQuantity" align="center" label="不良数量"> </el-table-column>
|
||||
<el-table-column prop="remark" align="center" label="备注"> </el-table-column>
|
||||
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">
|
||||
<el-tooltip class="item" effect="dark" content="修改" placement="top">
|
||||
<svg class="icon-svg aui-sidebar__menu-icon"><use xlink:href="#icon-编辑"></use></svg>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
style="color:red"
|
||||
size="small"
|
||||
@click="deleteHandle(scope.row.id, scope.row.id)"
|
||||
>
|
||||
<el-tooltip class="item" effect="dark" content="删除" placement="top">
|
||||
<svg class="icon-svg aui-sidebar__menu-icon"><use xlink:href="#icon-删除"></use></svg>
|
||||
</el-tooltip>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
>
|
||||
</el-pagination>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.page"
|
||||
:limit="listQuery.limit"
|
||||
:table-data="tableData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="150"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.limit"
|
||||
:page.sync="listQuery.page"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update
|
||||
:optionArr="optionArr"
|
||||
@@ -209,10 +169,73 @@
|
||||
</el-card>
|
||||
</template>
|
||||
<script>
|
||||
import processPage from "@/mixins/process-page";
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import AddOrUpdate from './components/generalOperation-add'
|
||||
import basicFilter from "@/filters/basic-filter";
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "id",
|
||||
label: "检验单号",
|
||||
},
|
||||
{
|
||||
prop: "batchNumber",
|
||||
label: "批次号",
|
||||
},
|
||||
{
|
||||
prop: "inspectionStage",
|
||||
label: "检验阶段",
|
||||
filter: basicFilter("inspectionStage"),
|
||||
},
|
||||
{
|
||||
prop: "productName",
|
||||
label: "产品名称",
|
||||
},
|
||||
{
|
||||
prop: "machineName",
|
||||
label: "机台",
|
||||
},
|
||||
{
|
||||
prop: "workingProcedureName",
|
||||
label: "工序",
|
||||
},
|
||||
{
|
||||
prop: "createTime",
|
||||
label: "检验时间",
|
||||
},
|
||||
{
|
||||
prop: "shiftName",
|
||||
label: "班次",
|
||||
},
|
||||
{
|
||||
prop: "numberOfSamples",
|
||||
label: "抽样数量",
|
||||
},
|
||||
{
|
||||
prop: "numberOfDefects",
|
||||
label: "缺陷数量",
|
||||
},
|
||||
{
|
||||
prop: "defectiveQuantity",
|
||||
label: "不良数量",
|
||||
},
|
||||
{
|
||||
prop: "remark",
|
||||
label: "备注",
|
||||
},
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: "删除",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [processPage],
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@@ -226,6 +249,9 @@ export default {
|
||||
"/basic/shift/page",
|
||||
"/sys/user/page",
|
||||
],
|
||||
tableProps,
|
||||
tableBtn,
|
||||
tableData: [],
|
||||
optionArr: {},
|
||||
time: [],
|
||||
rules: {},
|
||||
@@ -278,8 +304,8 @@ export default {
|
||||
this.$http
|
||||
.get(this.urlOptions.getDataListURL, {
|
||||
params: {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
page: this.listQuery.page,
|
||||
limit: this.listQuery.limit,
|
||||
startTime: this.time && this.time.length > 0 ? this.time[0] : "",
|
||||
endTime: this.time && this.time.length > 0 ? this.time[1] : "",
|
||||
...this.dataForm,
|
||||
@@ -288,12 +314,12 @@ export default {
|
||||
.then(({ data: res }) => {
|
||||
this.dataListLoading = false;
|
||||
if (res.code !== 0) {
|
||||
this.dataList = [];
|
||||
this.totalPage = 0;
|
||||
this.tableData = [];
|
||||
this.listQuery.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = res.data.list;
|
||||
this.totalPage = res.data.total;
|
||||
this.tableData = res.data.list;
|
||||
this.listQuery.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user