update 巡检待确认
Dieser Commit ist enthalten in:
Ursprung
4d1b72fae7
Commit
99b225e3dc
@ -21,10 +21,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item
|
||||
label="部门"
|
||||
prop="departmentId"
|
||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
||||
<el-form-item label="部门" prop="departmentId">
|
||||
<el-select
|
||||
v-model="dataForm.departmentId"
|
||||
:placeholder="`请选择部门`">
|
||||
|
@ -29,41 +29,20 @@
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养计划单号" prop="maintainOrderNumber">
|
||||
<!-- :rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入保养计划单号',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]" -->
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.maintainOrderNumber"
|
||||
disabled
|
||||
:placeholder="`请输入保养计划单号`" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保养计划名称" prop="planName">
|
||||
<el-input
|
||||
v-model="form.planName"
|
||||
placeholder="请输入保养计划名称"
|
||||
disabled />
|
||||
v-model="form.name"
|
||||
placeholder="请输入巡检单名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="departmentId">
|
||||
<!-- :rules="[
|
||||
{ required: true, message: '请选择部门', trigger: 'blur' },
|
||||
]" -->
|
||||
<el-select
|
||||
v-model="form.departmentId"
|
||||
:placeholder="`请选择部门`"
|
||||
filterable
|
||||
clearable
|
||||
disabled
|
||||
filterable>
|
||||
:placeholder="`请选择部门`">
|
||||
<el-option
|
||||
v-for="opt in departmentOptions"
|
||||
:key="opt.value"
|
||||
@ -74,18 +53,42 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产线" prop="lineId">
|
||||
<!-- :rules="[
|
||||
{ required: true, message: '请选择产线', trigger: 'blur' },
|
||||
]" -->
|
||||
<el-form-item label="班次" prop="groupClass">
|
||||
<el-select
|
||||
v-model="form.lineId"
|
||||
:placeholder="`请选择产线`"
|
||||
disabled
|
||||
v-model="form.groupClass"
|
||||
filterable
|
||||
clearable
|
||||
multiple
|
||||
style="width: 100%"
|
||||
placeholder="请选择班次">
|
||||
<el-option
|
||||
v-for="d in groupOptions"
|
||||
:key="d.value"
|
||||
:label="d.label"
|
||||
:value="d.label" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="巡检人"
|
||||
prop="checkPerson"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择巡检人',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]">
|
||||
<el-select
|
||||
v-model="form.checkPerson"
|
||||
:placeholder="`请选择巡检人`"
|
||||
multiple
|
||||
clearable
|
||||
filterable>
|
||||
<el-option
|
||||
v-for="opt in lineOptions"
|
||||
v-for="opt in inspectorOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
@ -94,112 +97,25 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划保养人员" prop="maintainer">
|
||||
<el-select
|
||||
v-model="form.planMaintainWorker"
|
||||
placeholder="请选择计划保养人员"
|
||||
disabled
|
||||
clearable
|
||||
filterable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划开始时间" prop="planStartTime">
|
||||
<el-form-item label="巡检时间" prop="planStartTime">
|
||||
<el-date-picker
|
||||
v-model="form.planStartTime"
|
||||
type="datetime"
|
||||
disabled
|
||||
placeholder="请选择计划开始时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="计划结束时间" prop="planEndTime">
|
||||
<el-date-picker
|
||||
v-model="form.planEndTime"
|
||||
type="datetime"
|
||||
disabled
|
||||
placeholder="请选择计划结束时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="实际开始时间"
|
||||
prop="startTime"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择实际开始时间',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]">
|
||||
<el-date-picker
|
||||
v-model="form.startTime"
|
||||
type="datetime"
|
||||
placeholder="请选择实际开始时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="实际结束时间"
|
||||
prop="endTime"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择实际结束时间',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]">
|
||||
<el-date-picker
|
||||
v-model="form.endTime"
|
||||
type="datetime"
|
||||
placeholder="请选择实际结束时间"
|
||||
value-format="timestamp"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="实际保养人员"
|
||||
prop="maintainWorker"
|
||||
:rules="[
|
||||
{
|
||||
required: true,
|
||||
message: '请选择实际保养人员',
|
||||
trigger: 'blur',
|
||||
},
|
||||
]">
|
||||
<el-select
|
||||
v-model="form.maintainWorker"
|
||||
:placeholder="`请选择实际保养人员`"
|
||||
multiple
|
||||
clearable
|
||||
filterable>
|
||||
<el-option
|
||||
v-for="opt in maintainerOptions"
|
||||
:key="opt.value"
|
||||
:label="opt.label"
|
||||
:value="opt.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" :placeholder="`请输入备注`" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<SmallTitle>保养内容</SmallTitle>
|
||||
<SmallTitle>巡检内容</SmallTitle>
|
||||
|
||||
<div style="margin-top: 12px; position: relative">
|
||||
<SearchBar
|
||||
@ -212,7 +128,7 @@
|
||||
<div style="position: absolute; top: -40px; right: 0">
|
||||
<el-button @click="handleAddAttr" type="text">
|
||||
<i class="el-icon-plus"></i>
|
||||
添加属性
|
||||
添加内容
|
||||
</el-button>
|
||||
</div>
|
||||
<base-table
|
||||
@ -302,9 +218,8 @@ export default {
|
||||
btnLoading: false,
|
||||
form: {},
|
||||
formLoading: false,
|
||||
lineList: [],
|
||||
maintainerList: [],
|
||||
departmentList: [],
|
||||
inspectorOptions: [],
|
||||
attrTableProps: [
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
@ -312,11 +227,11 @@ export default {
|
||||
},
|
||||
{
|
||||
prop: 'program',
|
||||
label: '保养项目',
|
||||
label: '巡检项目',
|
||||
},
|
||||
{
|
||||
prop: 'maintenanceDes',
|
||||
label: '保养描述',
|
||||
label: '巡检结果',
|
||||
},
|
||||
],
|
||||
attrList: [],
|
||||
@ -405,6 +320,7 @@ export default {
|
||||
},
|
||||
],
|
||||
row: null,
|
||||
groupOptions: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -415,25 +331,11 @@ export default {
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
lineOptions() {
|
||||
return (this.lineList || []).map((item) => ({
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
},
|
||||
maintainerOptions() {
|
||||
return (this.maintainerList || []).map((item) => ({
|
||||
id: item.id,
|
||||
label: item.name,
|
||||
value: item.name,
|
||||
}));
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getList('maintainer');
|
||||
this.getList('department');
|
||||
this.getList('line');
|
||||
this.getList('groupClass');
|
||||
this.getList('inspector');
|
||||
},
|
||||
methods: {
|
||||
handleSearchBarBtnClick(btn) {
|
||||
@ -480,10 +382,11 @@ export default {
|
||||
},
|
||||
|
||||
init(row) {
|
||||
console.log('row', row);
|
||||
this.visible = true;
|
||||
this.row = row;
|
||||
this.getInfo(row);
|
||||
this.getAttrList(row);
|
||||
// this.getInfo(row);
|
||||
// this.getAttrList(row);
|
||||
},
|
||||
|
||||
async getInfo(row) {
|
||||
@ -521,22 +424,42 @@ export default {
|
||||
|
||||
async getList(source = 'department') {
|
||||
const urls = [
|
||||
'/base/core-production-line/listAll',
|
||||
'/base/core-department/listAll',
|
||||
'/base/core-worker/listAll',
|
||||
'/base/group-classes/listAll',
|
||||
];
|
||||
let res;
|
||||
switch (source) {
|
||||
case 'department':
|
||||
res = await this.$axios(urls[1]);
|
||||
res = await this.$axios(urls[0]);
|
||||
this.departmentList = res.data || [];
|
||||
break;
|
||||
case 'maintainer':
|
||||
res = await this.$axios(urls[2]);
|
||||
this.maintainerList = res.data || [];
|
||||
case 'inspector':
|
||||
let inspectorList = [];
|
||||
const userlist = await this.$axios({
|
||||
url: '/system/user/page',
|
||||
params: { pageNo: 1, pageSize: 100 },
|
||||
});
|
||||
if (userlist.code == 0) {
|
||||
inspectorList = inspectorList.concat(
|
||||
(userlist.data?.list || []).map((item) => ({
|
||||
label: item.username,
|
||||
value: item.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
||||
if (workerlist.code == 0) {
|
||||
inspectorList = inspectorList.concat(
|
||||
workerlist.data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}))
|
||||
);
|
||||
}
|
||||
this.inspectorOptions = inspectorList;
|
||||
break;
|
||||
case 'line':
|
||||
res = await this.$axios(urls[0]);
|
||||
case 'groupClass':
|
||||
res = await this.$axios(urls[1]);
|
||||
this.lineList = res.data || [];
|
||||
break;
|
||||
}
|
||||
|
@ -57,11 +57,18 @@
|
||||
@confirm="handleSubmit">
|
||||
<add ref="add" @refreshDataList="successSubmit" />
|
||||
</base-dialog>
|
||||
|
||||
<!-- 添加巡检,查看详情 -->
|
||||
<addOrUpdata
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList" />
|
||||
|
||||
<edit
|
||||
ref="content-edit"
|
||||
v-if="editOpen"
|
||||
@refreshDataList="getList"
|
||||
@destroy="editOpen = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -71,13 +78,15 @@ import addOrUpdata from './add-or-updata.vue';
|
||||
import add from './Content-add.vue';
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import CheckOrderListTable from './CheckOrderListTable.vue';
|
||||
import edit from './Content-edit.vue';
|
||||
|
||||
export default {
|
||||
name: 'SpecialEquipmentCheckConfig',
|
||||
components: { addOrUpdata, add, CheckOrderListTable },
|
||||
components: { addOrUpdata, add, edit, CheckOrderListTable },
|
||||
mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
editOpen: false,
|
||||
addOrUpdateVisible: false,
|
||||
addOrEditTitle: '',
|
||||
searchBarKeys: ['name'],
|
||||
@ -307,7 +316,12 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 编辑 */
|
||||
handleEdit(row) {},
|
||||
handleEdit(row) {
|
||||
this.editOpen = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['content-edit'].init(row);
|
||||
});
|
||||
},
|
||||
/** 确认巡检单 */
|
||||
handleConfirm(row) {},
|
||||
/** 删除巡检单 */
|
||||
@ -376,5 +390,3 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren