|
|
@ -174,11 +174,16 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
|
<el-form-item label="创建时间" prop="createTime">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker
|
|
|
|
v-model="queryParams.createTime"
|
|
|
|
v-model="queryParams.createTimeArray"
|
|
|
|
type="date"
|
|
|
|
type="daterange"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
align="right"
|
|
|
|
placeholder="请选择创建时间">
|
|
|
|
unlink-panels
|
|
|
|
|
|
|
|
range-separator="至"
|
|
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
:picker-options="pickerOptions">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="更新人" prop="updateBy">
|
|
|
|
<el-form-item label="更新人" prop="updateBy">
|
|
|
@ -190,11 +195,16 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="更新时间" prop="updateTime">
|
|
|
|
<el-form-item label="更新时间" prop="updateTime">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker
|
|
|
|
v-model="queryParams.updateTime"
|
|
|
|
v-model="queryParams.updateTimeArray"
|
|
|
|
type="date"
|
|
|
|
type="daterange"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
align="right"
|
|
|
|
placeholder="请选择更新时间">
|
|
|
|
unlink-panels
|
|
|
|
|
|
|
|
range-separator="至"
|
|
|
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
|
|
:picker-options="pickerOptions">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
@ -259,6 +269,7 @@
|
|
|
|
<el-table-column width="150" label="计划编码" align="center" prop="planCode"/>
|
|
|
|
<el-table-column width="150" label="计划编码" align="center" prop="planCode"/>
|
|
|
|
<el-table-column width="150" label="计划名称" align="center" prop="planName"/>
|
|
|
|
<el-table-column width="150" label="计划名称" align="center" prop="planName"/>
|
|
|
|
<el-table-column label="车间" align="center" prop="planWorkshop"/>
|
|
|
|
<el-table-column label="车间" align="center" prop="planWorkshop"/>
|
|
|
|
|
|
|
|
<el-table-column width="150" label="工作中心" align="center" prop="workCenterName"/>
|
|
|
|
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
|
|
|
|
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
|
|
|
|
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName"/>
|
|
|
|
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName"/>
|
|
|
|
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode"/>
|
|
|
|
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode"/>
|
|
|
@ -336,7 +347,7 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改保养计划对话框 -->
|
|
|
|
<!-- 添加或修改保养计划对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
|
|
|
<el-dialog v-loading="planLoading" :title="title" :visible.sync="open" width="900px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
<el-form-item v-if="false" label="计划编码" prop="planCode">
|
|
|
|
<el-form-item v-if="false" label="计划编码" prop="planCode">
|
|
|
|
<el-input v-model="form.planCode" placeholder="请输入计划编码"/>
|
|
|
|
<el-input v-model="form.planCode" placeholder="请输入计划编码"/>
|
|
|
@ -365,8 +376,8 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="工作中心:">
|
|
|
|
<el-form-item label="车间:">
|
|
|
|
<el-select v-model="form.planWorkshop" placeholder="工作中心" clearable>
|
|
|
|
<el-select v-model="form.planWorkshop" placeholder="请选择车间" clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in workCenterList"
|
|
|
|
v-for="item in workCenterList"
|
|
|
|
:key="item.factoryCode"
|
|
|
|
:key="item.factoryCode"
|
|
|
@ -821,13 +832,43 @@ import {
|
|
|
|
updateUpkeepPlan,
|
|
|
|
updateUpkeepPlan,
|
|
|
|
formatEquItem, setSpareList, querySpareList
|
|
|
|
formatEquItem, setSpareList, querySpareList
|
|
|
|
} from "@/api/device/upkeepPlan";
|
|
|
|
} from "@/api/device/upkeepPlan";
|
|
|
|
import {delPlan, getEquList, getPersonList, getWorkCenter, initUpdatePlanInfo} from "@/api/device/plan";
|
|
|
|
import {delPlan, getEquList, getPersonList, getWorkCenter, initUpdatePlanInfo, listPlan} from "@/api/device/plan";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "UpkeepPlan",
|
|
|
|
name: "UpkeepPlan",
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable'],
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
// 日期范围选择快捷
|
|
|
|
|
|
|
|
pickerOptions: {
|
|
|
|
|
|
|
|
shortcuts: [{
|
|
|
|
|
|
|
|
text: '最近一周',
|
|
|
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
|
|
|
const end = new Date();
|
|
|
|
|
|
|
|
const start = new Date();
|
|
|
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
text: '最近一个月',
|
|
|
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
|
|
|
const end = new Date();
|
|
|
|
|
|
|
|
const start = new Date();
|
|
|
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
text: '最近三个月',
|
|
|
|
|
|
|
|
onClick(picker) {
|
|
|
|
|
|
|
|
const end = new Date();
|
|
|
|
|
|
|
|
const start = new Date();
|
|
|
|
|
|
|
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
|
|
|
|
|
picker.$emit('pick', [start, end]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 加载
|
|
|
|
|
|
|
|
planLoading: false,
|
|
|
|
// 选中的备件
|
|
|
|
// 选中的备件
|
|
|
|
selOnSpare: [],
|
|
|
|
selOnSpare: [],
|
|
|
|
// 申领数量
|
|
|
|
// 申领数量
|
|
|
@ -928,7 +969,9 @@ export default {
|
|
|
|
createBy: null,
|
|
|
|
createBy: null,
|
|
|
|
createTime: null,
|
|
|
|
createTime: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateTime: null
|
|
|
|
updateTime: null,
|
|
|
|
|
|
|
|
createTimeArray: [],
|
|
|
|
|
|
|
|
updateTimeArray: [],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {
|
|
|
|
form: {
|
|
|
@ -1284,13 +1327,21 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 下一步
|
|
|
|
// 下一步
|
|
|
|
stepNext() {
|
|
|
|
stepNext() {
|
|
|
|
|
|
|
|
if (this.form.planWorkshop == null) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '请选择车间!',
|
|
|
|
|
|
|
|
type: 'warning'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
this.upkeepSteps++;
|
|
|
|
this.upkeepSteps++;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 查询保养计划列表 */
|
|
|
|
/** 查询保养计划列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
listUpkeepPlan(this.queryParams).then(response => {
|
|
|
|
listPlan(this.queryParams).then(response => {
|
|
|
|
this.upkeepPlanList = response.rows;
|
|
|
|
this.upkeepPlanList = response.rows;
|
|
|
|
|
|
|
|
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1358,6 +1409,9 @@ export default {
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
resetQuery() {
|
|
|
|
resetQuery() {
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
|
|
|
// 重置日期范围
|
|
|
|
|
|
|
|
this.queryParams.createTimeArray = [];
|
|
|
|
|
|
|
|
this.queryParams.updateTimeArray = [];
|
|
|
|
this.handleQuery();
|
|
|
|
this.handleQuery();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
@ -1420,11 +1474,13 @@ export default {
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
this.planLoading = true;
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
console.log("这里时修改后")
|
|
|
|
console.log("这里时修改后")
|
|
|
|
console.log(this.form)
|
|
|
|
console.log(this.form)
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
|
|
|
|
this.planLoading = false;
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
@ -1432,6 +1488,7 @@ export default {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
addUpkeepPlan(this.form).then(response => {
|
|
|
|
addUpkeepPlan(this.form).then(response => {
|
|
|
|
|
|
|
|
this.planLoading = false;
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|