|
@@ -2,24 +2,15 @@
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
|
|
- <el-form-item label="记录时间" prop="recordDate">
|
|
|
+ <el-form-item label="月份" prop="recordMonth">
|
|
|
<el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="queryParams.recordDate"
|
|
|
- type="date"
|
|
|
+ v-model="queryParams.recordMonth"
|
|
|
+ type="month"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择记录时间">
|
|
|
+ @change="handleQuery"
|
|
|
+ placeholder="选择月份">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item label="备注" prop="remarks">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.remarks"
|
|
|
- placeholder="请输入备注"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -56,23 +47,15 @@
|
|
|
v-hasPermi="['production:prdRecord:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="info"
|
|
|
- icon="el-icon-upload2"
|
|
|
- size="mini"
|
|
|
- @click="handleImport"
|
|
|
- v-hasPermi="['production:prdRecord:edit']"
|
|
|
- >导入</el-button>
|
|
|
- </el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
type="warning"
|
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
|
- @click="handleExport"
|
|
|
+ :disabled="monthChoose"
|
|
|
+ @click="handleExportMonth"
|
|
|
v-hasPermi="['production:prdRecord:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >按月导出</el-button>
|
|
|
</el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
@@ -84,8 +67,8 @@
|
|
|
<span>{{ parseTime(scope.row.recordDate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="记录人" align="center" prop="recorder" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="内容" align="center" prop="content" width="720" >
|
|
|
+<!-- <el-table-column label="记录人" align="center" prop="recorder" :show-overflow-tooltip="true"/>-->
|
|
|
+ <el-table-column label="内容" align="center" prop="content" >
|
|
|
<template slot-scope="scope">
|
|
|
<span style="white-space: pre-line;">{{ scope.row.content }}</span>
|
|
|
</template>
|
|
@@ -93,8 +76,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
+ <el-table-column label="备注" align="center" prop="remarks" width="400" />
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" width="160" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
@@ -199,7 +182,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listPrdRecord, getPrdRecord, delPrdRecord, addPrdRecord, updatePrdRecord, exportPrdRecord, importTemplate} from "@/api/production/prdRecord";
|
|
|
+import { exportPrdRecordMonth,listPrdRecord, getPrdRecord, delPrdRecord, addPrdRecord, updatePrdRecord, exportPrdRecord, importTemplate} from "@/api/production/prdRecord";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -218,8 +201,9 @@ export default {
|
|
|
single: true,
|
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
|
+ monthChoose: true,
|
|
|
// 显示搜索条件
|
|
|
- showSearch: false,
|
|
|
+ showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
// 生产记录表格数据
|
|
@@ -249,7 +233,7 @@ export default {
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 30,
|
|
|
recorder: null,
|
|
|
recordDate: null,
|
|
|
createrCode: null,
|
|
@@ -257,7 +241,8 @@ export default {
|
|
|
updaterCode: null,
|
|
|
updatedate: null,
|
|
|
deptId: null,
|
|
|
- remarks: null
|
|
|
+ remarks: null,
|
|
|
+ recordMonth: null,
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
@@ -313,13 +298,15 @@ export default {
|
|
|
updaterCode: null,
|
|
|
updatedate: null,
|
|
|
deptId: null,
|
|
|
- remarks: null
|
|
|
+ remarks: null,
|
|
|
+ items:[],
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
+ this.monthChoose = !this.queryParams.recordMonth
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
@@ -338,6 +325,7 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加生产记录";
|
|
|
+ this.form.items.push({description: ''})
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -386,7 +374,7 @@ export default {
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport(row) {
|
|
|
let param = {id:row.id}
|
|
|
- this.$confirm('是否确认导出所有生产记录数据项?', "警告", {
|
|
|
+ this.$confirm('是否确认导出本条生产记录数据项?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
@@ -395,6 +383,19 @@ export default {
|
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
|
})
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExportMonth(row) {
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ this.$confirm('是否确认导出生产记录数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return exportPrdRecordMonth(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|