Reviewed-on: http://git.picaiba.com/mt-fe-group/yudao-dev/pulls/213pull/218/head
@@ -2,7 +2,7 @@ | |||||
* @Author: zwq | * @Author: zwq | ||||
* @Date: 2021-11-18 14:16:25 | * @Date: 2021-11-18 14:16:25 | ||||
* @LastEditors: DY | * @LastEditors: DY | ||||
* @LastEditTime: 2024-02-21 09:04:48 | |||||
* @LastEditTime: 2024-02-27 15:38:04 | |||||
* @Description: | * @Description: | ||||
--> | --> | ||||
<template> | <template> | ||||
@@ -322,14 +322,14 @@ export default { | |||||
this.listQuery.total = response.data.total; | this.listQuery.total = response.data.total; | ||||
}); | }); | ||||
}, | }, | ||||
init(id, isdetail) { | |||||
init(row, isdetail) { | |||||
this.initData(); | this.initData(); | ||||
this.isdetail = isdetail || false; | this.isdetail = isdetail || false; | ||||
this.dataForm.id = id || undefined; | |||||
this.isedit = id ? true : false; | |||||
this.dataForm.id = row.id || undefined; | |||||
this.isedit = row?.id && row?.externalCode ? true : false; | |||||
console.log('你好', this.isedit) | console.log('你好', this.isedit) | ||||
this.visible = true; | this.visible = true; | ||||
if (id) { | |||||
if (row) { | |||||
this.idAttrShow = true | this.idAttrShow = true | ||||
} else { | } else { | ||||
this.idAttrShow = false | this.idAttrShow = false | ||||
@@ -340,7 +340,7 @@ export default { | |||||
if (this.dataForm.id) { | if (this.dataForm.id) { | ||||
// 获取产品详情 | // 获取产品详情 | ||||
this.urlOptions.infoURL(id).then(response => { | |||||
this.urlOptions.infoURL(this.dataForm.id).then(response => { | |||||
this.dataForm = response.data | this.dataForm = response.data | ||||
// this.dataForm.area = response.data.area || 0 | // this.dataForm.area = response.data.area || 0 | ||||
// this.dataForm.weight = response.data.weight || 0 | // this.dataForm.weight = response.data.weight || 0 | ||||
@@ -74,9 +74,7 @@ export default { | |||||
this.$nextTick(() => { | this.$nextTick(() => { | ||||
this.$refs['dataForm'].resetFields(); | this.$refs['dataForm'].resetFields(); | ||||
if (this.dataForm.id) { | if (this.dataForm.id) { | ||||
getCoreProductAttr({ | |||||
id: this.dataForm.id | |||||
}).then((res) => { | |||||
getCoreProductAttr(this.dataForm.id).then((res) => { | |||||
const { name, value } = res.data; | const { name, value } = res.data; | ||||
this.dataForm.name = name; | this.dataForm.name = name; | ||||
this.dataForm.value = value; | this.dataForm.value = value; | ||||
@@ -141,6 +141,22 @@ export default { | |||||
}, | }, | ||||
created() {}, | created() {}, | ||||
methods: { | methods: { | ||||
//tableBtn点击 | |||||
handleClick(val) { | |||||
if (val.type === "edit") { | |||||
this.addOrUpdateVisible = true; | |||||
this.addOrEditTitle = "编辑"; | |||||
this.$nextTick(() => { | |||||
this.$refs.addOrUpdate.init(val.data); | |||||
}); | |||||
} else if (val.type === "delete") { | |||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data) | |||||
} else if (val.type === "change") { | |||||
this.changeStatus(val.data.id) | |||||
} else { | |||||
this.otherMethods(val) | |||||
} | |||||
}, | |||||
// 删除 | // 删除 | ||||
deleteHandle(id, name, index) { | deleteHandle(id, name, index) { | ||||
this.$confirm(`是否确认删除产品名称为"${name}"的数据项`, "提示", { | this.$confirm(`是否确认删除产品名称为"${name}"的数据项`, "提示", { | ||||
@@ -168,7 +184,7 @@ export default { | |||||
this.addOrUpdateVisible = true; | this.addOrUpdateVisible = true; | ||||
this.addOrEditTitle = "详情"; | this.addOrEditTitle = "详情"; | ||||
this.$nextTick(() => { | this.$nextTick(() => { | ||||
this.$refs.addOrUpdate.init(val.data.id, true); | |||||
this.$refs.addOrUpdate.init(val.data, true); | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
@@ -121,7 +121,6 @@ | |||||
<el-select | <el-select | ||||
v-model="dataForm.roomNameDict" | v-model="dataForm.roomNameDict" | ||||
filterable | filterable | ||||
:disabled="isdetail || isedit" | |||||
style="width: 100%" | style="width: 100%" | ||||
placeholder="请选择车间名称"> | placeholder="请选择车间名称"> | ||||
<el-option | <el-option | ||||
@@ -282,6 +281,7 @@ export default { | |||||
this.urlOptions.createURL(this.dataForm).then(response => { | this.urlOptions.createURL(this.dataForm).then(response => { | ||||
this.$modal.msgSuccess("新增成功"); | this.$modal.msgSuccess("新增成功"); | ||||
this.visible = false; | this.visible = false; | ||||
this.$emit("refreshDataList"); | |||||
// this.$confirm('是否添加预使用主原料信息?', '提示', { | // this.$confirm('是否添加预使用主原料信息?', '提示', { | ||||
// confirmButtonText: '确定', | // confirmButtonText: '确定', | ||||
// cancelButtonText: '取消', | // cancelButtonText: '取消', | ||||
@@ -2,7 +2,7 @@ | |||||
* @Author: zwq | * @Author: zwq | ||||
* @Date: 2021-11-18 14:16:25 | * @Date: 2021-11-18 14:16:25 | ||||
* @LastEditors: DY | * @LastEditors: DY | ||||
* @LastEditTime: 2024-02-27 08:58:08 | |||||
* @LastEditTime: 2024-02-27 09:41:00 | |||||
* @Description: | * @Description: | ||||
--> | --> | ||||
<template> | <template> | ||||
@@ -428,9 +428,9 @@ export default { | |||||
status: 1 | status: 1 | ||||
}).then(response => { | }).then(response => { | ||||
this.$modal.msgSuccess("新增成功"); | this.$modal.msgSuccess("新增成功"); | ||||
// this.idAttrShow = true | |||||
this.idAttrShow = true | |||||
this.dataForm.id = response.data | this.dataForm.id = response.data | ||||
this.visible = false; | |||||
// this.visible = false; | |||||
this.$emit("refreshDataList"); | this.$emit("refreshDataList"); | ||||
}); | }); | ||||
}); | }); | ||||
@@ -31,44 +31,6 @@ | |||||
:limit.sync="queryParams.pageSize" | :limit.sync="queryParams.pageSize" | ||||
@pagination="getList" /> | @pagination="getList" /> | ||||
<!-- 对话框(添加) --> | |||||
<!-- <base-dialog | |||||
:dialogTitle="title" | |||||
:dialogVisible="open" | |||||
width="60%" | |||||
@close="cancel" | |||||
@cancel="cancel" | |||||
@confirm="submitForm"> | |||||
<DialogFormUnplanned | |||||
v-if="open" | |||||
ref="form" | |||||
v-model="form" | |||||
:disabled="mode == 'detail'" /> | |||||
<el-row v-if="mode === 'detail'" slot="footer" type="flex" justify="end"> | |||||
<el-col :span="12"> | |||||
<el-button size="small" class="btnTextStyle" @click="cancel"> | |||||
关闭 | |||||
</el-button> | |||||
</el-col> | |||||
</el-row> | |||||
</base-dialog> --> | |||||
<!-- 编辑 --> | |||||
<!-- <UnplannedEditDrawer | |||||
ref="unplanned" | |||||
v-if="openUnplannedDrawer" | |||||
@refreshDataList="getList" | |||||
@destroy="openUnplannedDrawer = false" /> | |||||
<PlannedEditDrawer | |||||
ref="planned" | |||||
v-if="openPlannedDrawer" | |||||
@refreshDataList="getList" | |||||
@destroy="openPlannedDrawer = false" /> | |||||
<RecordDetail | |||||
v-if="recordDetailVisible" | |||||
ref="recordDetailDrawer" | |||||
@destroy="recordDetailVisible = false" /> --> | |||||
<add-or-update | <add-or-update | ||||
v-if="addOrUpdateVisible" | v-if="addOrUpdateVisible" | ||||
ref="addOrUpdate" | ref="addOrUpdate" | ||||
@@ -80,16 +42,12 @@ | |||||
import AddOrUpdate from './add-or-updata'; | import AddOrUpdate from './add-or-updata'; | ||||
import moment from 'moment'; | import moment from 'moment'; | ||||
import basicPageMixin from '@/mixins/lb/basicPageMixin'; | import basicPageMixin from '@/mixins/lb/basicPageMixin'; | ||||
// import DialogFormUnplanned from './WaitingList--add--unplanned.vue'; | |||||
// import UnplannedEditDrawer from './WaitingListUnplanned--edit.vue'; | |||||
// import PlannedEditDrawer from './WaitingListPlanned--edit.vue'; | |||||
import { | import { | ||||
exportCheckOrderExcel, | exportCheckOrderExcel, | ||||
} from '@/api/equipment/base/maintain/record'; | } from '@/api/equipment/base/maintain/record'; | ||||
import WaitingListTable from './WaitingListTable.vue'; | import WaitingListTable from './WaitingListTable.vue'; | ||||
// import RecordDetail from './Record--detail.vue'; | |||||
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); | |||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); | |||||
const btn = { | const btn = { | ||||
name: 'tableBtn', | name: 'tableBtn', | ||||
@@ -160,9 +118,7 @@ export default { | |||||
plain: true, | plain: true, | ||||
}, | }, | ||||
{ | { | ||||
type: this.$auth.hasPermi('equipment:check-setting:export') | |||||
? 'button' | |||||
: '', | |||||
type: 'button', | |||||
btnName: '导出', | btnName: '导出', | ||||
name: 'export', | name: 'export', | ||||
plain: true, | plain: true, | ||||
@@ -118,10 +118,10 @@ export default { | |||||
// : undefined, | // : undefined, | ||||
].filter((v) => v), | ].filter((v) => v), | ||||
tableProps: [ | tableProps: [ | ||||
{ prop: 'configName', label: '巡检单名称' }, | |||||
{ prop: 'equipmentName', label: '部门' }, | |||||
{ prop: 'actualTime1', label: '巡检时间', filter: parseTime }, | |||||
{ prop: 'actualTime', label: '班次' }, | |||||
{ prop: 'name', label: '巡检单名称' }, | |||||
{ prop: 'department', label: '部门' }, | |||||
{ prop: 'actualCheckTime', label: '巡检时间', filter: parseTime }, | |||||
{ prop: 'groupClass', label: '班次' }, | |||||
{ prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn }, | { prop: 'opt', label: '巡检内容', name: '详情', subcomponent: btn }, | ||||
{ prop: 'remark', label: '备注' } | { prop: 'remark', label: '备注' } | ||||
// { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] }, | // { prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', 'PDA'][val] }, | ||||
@@ -542,13 +542,13 @@ export default { | |||||
params.pageNo = undefined; | params.pageNo = undefined; | ||||
params.pageSize = undefined; | params.pageSize = undefined; | ||||
this.$modal | this.$modal | ||||
.confirm('是否确认导出所有保养记录?') | |||||
.confirm('是否确认导出所有待确认的保养记录?') | |||||
.then(() => { | .then(() => { | ||||
this.exportLoading = true; | this.exportLoading = true; | ||||
return exportMaintainLogExcel(params); | return exportMaintainLogExcel(params); | ||||
}) | }) | ||||
.then((response) => { | .then((response) => { | ||||
this.$download.excel(response, '设备保养记录.xls'); | |||||
this.$download.excel(response, '设备保养待确认记录.xls'); | |||||
this.exportLoading = false; | this.exportLoading = false; | ||||
}) | }) | ||||
.catch(() => {}); | .catch(() => {}); | ||||
@@ -2,7 +2,7 @@ | |||||
* @Author: zwq | * @Author: zwq | ||||
* @Date: 2021-11-18 14:16:25 | * @Date: 2021-11-18 14:16:25 | ||||
* @LastEditors: DY | * @LastEditors: DY | ||||
* @LastEditTime: 2024-02-23 15:28:46 | |||||
* @LastEditTime: 2024-02-27 10:33:31 | |||||
* @Description: | * @Description: | ||||
--> | --> | ||||
<template> | <template> | ||||
@@ -92,7 +92,14 @@ | |||||
</el-col> | </el-col> | ||||
<el-col :span="8"> | <el-col :span="8"> | ||||
<el-form-item label="计划保养人员" prop="maintainer"> | <el-form-item label="计划保养人员" prop="maintainer"> | ||||
<el-input v-model="dataForm.maintainer" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入计划保养人员" /> | |||||
<el-select v-model="dataForm.maintainer" placeholder="请选择计划保养人员" style="width: 100%;" :disabled="isdetail" multiple filterable> | |||||
<el-option | |||||
v-for="item in personList" | |||||
:key="item.id" | |||||
:label="item.name" | |||||
:value="item.name"> | |||||
</el-option> | |||||
</el-select> | |||||
</el-form-item> | </el-form-item> | ||||
</el-col> | </el-col> | ||||
</el-row> | </el-row> | ||||
@@ -107,6 +114,7 @@ | |||||
<script> | <script> | ||||
import basicAdd from '../../../../core/mixins/basic-add'; | import basicAdd from '../../../../core/mixins/basic-add'; | ||||
// import { getCoreProductAttrPage, deleteCoreProductAttr } from "@/api/base/coreProduct"; | // import { getCoreProductAttrPage, deleteCoreProductAttr } from "@/api/base/coreProduct"; | ||||
import { getWorkerList } from '@/api/base/worker' | |||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment"; | import { getCoreDepartmentList } from "@/api/base/coreDepartment"; | ||||
import { createPlan, updatePlan, getCode, getPlan } from '@/api/equipment/base/maintain/planconfig'; | import { createPlan, updatePlan, getCode, getPlan } from '@/api/equipment/base/maintain/planconfig'; | ||||
import { getCorePLList } from '@/api/base/coreProductionLine'; | import { getCorePLList } from '@/api/base/coreProductionLine'; | ||||
@@ -144,6 +152,7 @@ export default { | |||||
}, | }, | ||||
menuOptions: [], | menuOptions: [], | ||||
proLineList: [], | proLineList: [], | ||||
personList: [], | |||||
visible: false, | visible: false, | ||||
isdetail: false, | isdetail: false, | ||||
isedit: false, | isedit: false, | ||||
@@ -178,6 +187,9 @@ export default { | |||||
// 产线列表 | // 产线列表 | ||||
const resline = await getCorePLList(); | const resline = await getCorePLList(); | ||||
this.proLineList = resline.data; | this.proLineList = resline.data; | ||||
// 保养人员 | |||||
const personres = await getWorkerList() | |||||
this.personList = personres.data || [] | |||||
}, | }, | ||||
getList() { | getList() { | ||||
// 获取产品属性列表 | // 获取产品属性列表 | ||||
@@ -194,7 +206,6 @@ export default { | |||||
this.isdetail = isdetail || false; | this.isdetail = isdetail || false; | ||||
this.dataForm.id = id || undefined; | this.dataForm.id = id || undefined; | ||||
this.isedit = id ? true : false; | this.isedit = id ? true : false; | ||||
console.log('你好22', id) | |||||
this.visible = true; | this.visible = true; | ||||
// if (id) { | // if (id) { | ||||
// this.idAttrShow = true | // this.idAttrShow = true | ||||
@@ -209,12 +220,6 @@ export default { | |||||
// 获取计划详情 | // 获取计划详情 | ||||
this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => { | this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => { | ||||
this.dataForm = response.data | this.dataForm = response.data | ||||
// if (this.dataForm.materialType !== undefined) { | |||||
// this.dataForm.materialType = String(this.dataForm.materialType) | |||||
// } | |||||
// if (this.dataForm.productType !== undefined) { | |||||
// this.dataForm.productType = String(this.dataForm.productType) | |||||
// } | |||||
}); | }); | ||||
// 获取产品属性列表 | // 获取产品属性列表 | ||||
// this.getList(); | // this.getList(); | ||||
@@ -259,7 +264,10 @@ export default { | |||||
} | } | ||||
// 修改的提交 | // 修改的提交 | ||||
if (this.dataForm.id) { | if (this.dataForm.id) { | ||||
this.urlOptions.updateURL(this.dataForm).then(response => { | |||||
this.urlOptions.updateURL({ | |||||
...this.dataForm, | |||||
maintainer: this.dataForm.maintainer.join(',') | |||||
}).then(response => { | |||||
this.$modal.msgSuccess("修改成功"); | this.$modal.msgSuccess("修改成功"); | ||||
this.visible = false; | this.visible = false; | ||||
this.$emit("refreshDataList"); | this.$emit("refreshDataList"); | ||||
@@ -267,11 +275,14 @@ export default { | |||||
return; | return; | ||||
} | } | ||||
// 添加的提交 | // 添加的提交 | ||||
this.urlOptions.createURL(this.dataForm).then(response => { | |||||
this.urlOptions.createURL({ | |||||
...this.dataForm, | |||||
maintainer: this.dataForm.maintainer.join(',') | |||||
}).then(response => { | |||||
this.$modal.msgSuccess("新增成功"); | this.$modal.msgSuccess("新增成功"); | ||||
// this.idAttrShow = true | // this.idAttrShow = true | ||||
this.dataForm.id = response.data | this.dataForm.id = response.data | ||||
// this.visible = false; | |||||
this.visible = false; | |||||
this.$emit("refreshDataList"); | this.$emit("refreshDataList"); | ||||
}); | }); | ||||
}); | }); | ||||