123
This commit is contained in:
@@ -9,9 +9,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- :model属性用于表单验证使用 比如下面的el-form-item 的 prop属性用于对表单值进行验证操作 -->
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth"
|
||||
v-show="showSearch" @submit.native.prevent>
|
||||
|
||||
<el-form :model="queryParams" size="small" label-position="right" inline ref="queryForm" :label-width="labelWidth" v-show="showSearch" @submit.native.prevent>
|
||||
<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>
|
||||
@@ -20,23 +18,23 @@
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['business:qcBackEndservicestatistics:add']" plain icon="el-icon-plus"
|
||||
size="mini" @click="handleAdd">新增</el-button>
|
||||
<el-button type="primary" v-hasPermi="['business:qcBackEndservicestatistics:add']" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" :disabled="single" v-hasPermi="['business:qcBackEndservicestatistics:edit']" plain
|
||||
icon="el-icon-edit" size="mini" @click="handleUpdate">修改</el-button>
|
||||
<el-button type="success" :disabled="single" v-hasPermi="['business:qcBackEndservicestatistics:edit']" plain icon="el-icon-edit" size="mini" @click="handleUpdate"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:qcBackEndservicestatistics:delete']" plain
|
||||
icon="el-icon-delete" size="mini" @click="handleDelete">删除</el-button>
|
||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:qcBackEndservicestatistics:delete']" plain icon="el-icon-delete" size="mini" @click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 数据区域 -->
|
||||
<el-table :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table :scrollbar="true" :data="dataList" v-loading="loading" ref="table" border highlight-current-row @sort-change="sortChange" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column prop="id" label="序号" align="center" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="workOrder" label="工单号" align="center" :show-overflow-tooltip="true" />
|
||||
@@ -80,25 +78,34 @@
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" v-hasPermi="['business:qcBackEndservicestatistics:edit']" type="success"
|
||||
icon="el-icon-edit" title="编辑" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button size="mini" v-hasPermi="['business:qcBackEndservicestatistics:delete']" type="danger"
|
||||
icon="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-hasPermi="['business:qcBackEndservicestatistics:edit']"
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
title="编辑"
|
||||
@click="handleUpdate(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-hasPermi="['business:qcBackEndservicestatistics:delete']"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
@click="handleDelete(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
<pagination class="mt10" background :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改质量BackEnd统计报表业务模块对话框 -->
|
||||
<el-dialog :title="title" :lock-scroll="false" :visible.sync="open">
|
||||
<el-form ref="form" :model="form" :rules="rules" :label-width="formLabelWidth">
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="序号" prop="id">
|
||||
<el-input-number v-model.number="form.id" controls-position="right" placeholder="请输入序号"
|
||||
:disabled="title == '修改数据'" />
|
||||
<el-input-number v-model.number="form.id" controls-position="right" placeholder="请输入序号" :disabled="title == '修改数据'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -153,8 +160,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="是否一次合格" prop="isOnetime">
|
||||
<el-radio-group v-model="form.isOnetime">
|
||||
<el-radio v-for="item in isOnetimeOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{
|
||||
item.dictLabel }}</el-radio>
|
||||
<el-radio v-for="item in isOnetimeOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -162,8 +168,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="是否返工件" prop="isBack">
|
||||
<el-radio-group v-model="form.isBack">
|
||||
<el-radio v-for="item in isBackOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{
|
||||
item.dictLabel }}</el-radio>
|
||||
<el-radio v-for="item in isBackOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -171,8 +176,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="是否抛光件" prop="isPolish">
|
||||
<el-radio-group v-model="form.isPolish">
|
||||
<el-radio v-for="item in isPolishOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{
|
||||
item.dictLabel }}</el-radio>
|
||||
<el-radio v-for="item in isPolishOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -180,8 +184,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="是否外部件" prop="isOut">
|
||||
<el-radio-group v-model="form.isOut">
|
||||
<el-radio v-for="item in isOutOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{
|
||||
item.dictLabel }}</el-radio>
|
||||
<el-radio v-for="item in isOutOptions" :key="item.dictValue" :label="parseInt(item.dictValue)">{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -255,8 +258,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="系统类别" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择系统类别">
|
||||
<el-option v-for="item in typeOptions" :key="item.dictValue" :label="item.dictLabel"
|
||||
:value="item.dictValue"></el-option>
|
||||
<el-option v-for="item in typeOptions" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -264,8 +266,7 @@
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="系统状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="item in statusOptions" :key="item.dictValue" :label="item.dictValue">{{ item.dictLabel
|
||||
}}</el-radio>
|
||||
<el-radio v-for="item in statusOptions" :key="item.dictValue" :label="item.dictValue">{{ item.dictLabel }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -299,7 +300,6 @@
|
||||
<el-date-picker v-model="form.updatedTime" type="datetime" placeholder="选择日期时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -307,7 +307,6 @@
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -317,14 +316,14 @@ import {
|
||||
delQcBackEndServiceStatistics,
|
||||
updateQcBackEndServiceStatistics,
|
||||
getQcBackEndServiceStatistics,
|
||||
} from '@/api/qualityManagement/BackEnd/qcBackEndServiceStatistics.js';
|
||||
} from '@/api/qualityManagement/BackEnd/qcBackEndServiceStatistics.js'
|
||||
|
||||
export default {
|
||||
name: "qcBackEndservicestatistics",
|
||||
name: 'qcBackEndservicestatistics',
|
||||
data() {
|
||||
return {
|
||||
labelWidth: "100px",
|
||||
formLabelWidth: "100px",
|
||||
labelWidth: '100px',
|
||||
formLabelWidth: '100px',
|
||||
// 选中id数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@@ -343,7 +342,7 @@ export default {
|
||||
sortType: undefined,
|
||||
},
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title: '',
|
||||
// 操作类型 1、add 2、edit
|
||||
opertype: 0,
|
||||
// 是否显示弹出层
|
||||
@@ -403,35 +402,32 @@ export default {
|
||||
btnSubmitVisible: true,
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "序号不能为空", trigger: "blur" }
|
||||
],
|
||||
id: [{ required: true, message: '序号不能为空', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 列表数据查询
|
||||
this.getList();
|
||||
this.getList()
|
||||
|
||||
var dictParams = [
|
||||
];
|
||||
var dictParams = []
|
||||
},
|
||||
methods: {
|
||||
// 查询数据
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listQcBackEndServiceStatistics(this.queryParams).then(res => {
|
||||
this.loading = true
|
||||
listQcBackEndServiceStatistics(this.queryParams).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.dataList = res.data.result;
|
||||
this.total = res.data.totalNum;
|
||||
this.loading = false;
|
||||
this.dataList = res.data.result
|
||||
this.total = res.data.totalNum
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 重置数据表单
|
||||
reset() {
|
||||
@@ -467,130 +463,130 @@ export default {
|
||||
createdTime: undefined,
|
||||
updatedBy: undefined,
|
||||
updatedTime: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
// 重置查询操作
|
||||
resetQuery() {
|
||||
this.timeRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
this.timeRange = []
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.ids = selection.map((item) => item.id)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length;
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 自定义排序
|
||||
sortChange(column) {
|
||||
if (column.prop == null || column.order == null) {
|
||||
this.queryParams.sort = undefined;
|
||||
this.queryParams.sortType = undefined;
|
||||
this.queryParams.sort = undefined
|
||||
this.queryParams.sortType = undefined
|
||||
} else {
|
||||
this.queryParams.sort = column.prop;
|
||||
this.queryParams.sortType = column.order;
|
||||
this.queryParams.sort = column.prop
|
||||
this.queryParams.sortType = column.order
|
||||
}
|
||||
|
||||
this.handleQuery();
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加";
|
||||
this.opertype = 1;
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
this.opertype = 1
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const Ids = row.id || this.ids;
|
||||
const Ids = row.id || this.ids
|
||||
|
||||
this.$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delQcBackEndServiceStatistics(Ids);
|
||||
return delQcBackEndServiceStatistics(Ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleQuery();
|
||||
this.msgSuccess("删除成功");
|
||||
this.handleQuery()
|
||||
this.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
this.reset()
|
||||
const id = row.id || this.ids
|
||||
getQcBackEndServiceStatistics(id).then((res) => {
|
||||
const { code, data } = res;
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
this.open = true;
|
||||
this.title = "修改数据";
|
||||
this.opertype = 2;
|
||||
this.open = true
|
||||
this.title = '修改数据'
|
||||
this.opertype = 2
|
||||
|
||||
this.form = {
|
||||
...data,
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 是否一次合格字典翻译
|
||||
isOnetimeFormat(row, column) {
|
||||
return this.selectDictLabel(this.isOnetimeOptions, row.isOnetime);
|
||||
return this.selectDictLabel(this.isOnetimeOptions, row.isOnetime)
|
||||
},
|
||||
// 是否返工件字典翻译
|
||||
isBackFormat(row, column) {
|
||||
return this.selectDictLabel(this.isBackOptions, row.isBack);
|
||||
return this.selectDictLabel(this.isBackOptions, row.isBack)
|
||||
},
|
||||
// 是否抛光件字典翻译
|
||||
isPolishFormat(row, column) {
|
||||
return this.selectDictLabel(this.isPolishOptions, row.isPolish);
|
||||
return this.selectDictLabel(this.isPolishOptions, row.isPolish)
|
||||
},
|
||||
// 是否外部件字典翻译
|
||||
isOutFormat(row, column) {
|
||||
return this.selectDictLabel(this.isOutOptions, row.isOut);
|
||||
return this.selectDictLabel(this.isOutOptions, row.isOut)
|
||||
},
|
||||
// 系统类别字典翻译
|
||||
typeFormat(row, column) {
|
||||
return this.selectDictLabel(this.typeOptions, row.type);
|
||||
return this.selectDictLabel(this.typeOptions, row.type)
|
||||
},
|
||||
// 系统状态字典翻译
|
||||
statusFormat(row, column) {
|
||||
return this.selectDictLabel(this.statusOptions, row.status);
|
||||
return this.selectDictLabel(this.statusOptions, row.status)
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(JSON.stringify(this.form));
|
||||
console.log(JSON.stringify(this.form))
|
||||
|
||||
if (this.form.id != undefined && this.opertype === 2) {
|
||||
updateQcBackEndServiceStatistics(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
.catch((err) => {
|
||||
//TODO 错误逻辑
|
||||
});
|
||||
})
|
||||
} else {
|
||||
addQcBackEndServiceStatistics(this.form)
|
||||
.then((res) => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
.catch((err) => {
|
||||
//TODO 错误逻辑
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
<vxe-table
|
||||
size="mini"
|
||||
ref="xTable"
|
||||
class="mytable-scrollbar"
|
||||
border
|
||||
:scrollbar="true"
|
||||
height="860px"
|
||||
:data="dataList"
|
||||
:loading="loading"
|
||||
@@ -481,4 +483,43 @@ export default {
|
||||
justify-content: space-around;
|
||||
font-size: var(--statistics-font-size);
|
||||
}
|
||||
|
||||
.mytable-scrollbar {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* 穿透scoped样式 */
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar-track,
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar-corner {
|
||||
background-color: #f0f2f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar-thumb {
|
||||
background-color: #c0c4cc;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #a0a4ac;
|
||||
}
|
||||
|
||||
::v-deep .mytable-scrollbar::-webkit-scrollbar-thumb:active {
|
||||
background-color: #80848c;
|
||||
}
|
||||
|
||||
/* 暗黑模式 */
|
||||
::v-deep .dark-mode .mytable-scrollbar::-webkit-scrollbar-track,
|
||||
::v-deep .dark-mode .mytable-scrollbar::-webkit-scrollbar-corner {
|
||||
background-color: #2e2e33;
|
||||
}
|
||||
|
||||
::v-deep .dark-mode .mytable-scrollbar::-webkit-scrollbar-thumb {
|
||||
background-color: #505053;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user