fix:车间设置中的“负责人”选择框改为系统组件。设备台账添加TAB栏“点检记录”“保养记录”“维修记录”。
This commit is contained in:
parent
6725a90a74
commit
caac47f68a
@ -42,3 +42,12 @@ export function delCheckplan(planId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据设备编码和计划类型查询设备点检计划头列表
|
||||||
|
export function getCheckPlan(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/checkplan/getCheckPlan',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -42,3 +42,12 @@ export function delRepair(repairId) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据设备编码查询设备维修单列表
|
||||||
|
export function getRepairList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/mes/dv/repair/getRepairList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
82
src/views/mes/dv/machinery/components/Checkplan.vue
Normal file
82
src/views/mes/dv/machinery/components/Checkplan.vue
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="checkplanList">
|
||||||
|
<el-table-column label="计划编码" align="center" prop="planCode" :show-overflow-tooltip="true"></el-table-column>
|
||||||
|
<el-table-column label="计划名称" align="center" width="200px" prop="planName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="频率" align="center" prop="cycleType">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.cycleCount}}
|
||||||
|
<dict-tag :options="dict.type.mes_cycle_type" :value="scope.row.cycleType"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination-->
|
||||||
|
<!-- v-show="total>0"-->
|
||||||
|
<!-- :total="total"-->
|
||||||
|
<!-- :page.sync="queryParams.pageNum"-->
|
||||||
|
<!-- :limit.sync="queryParams.pageSize"-->
|
||||||
|
<!-- @pagination="getList"-->
|
||||||
|
<!-- />-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {getCheckPlan} from "@/api/mes/dv/checkplan";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CheckPlan",
|
||||||
|
dicts: ['mes_cycle_type','mes_order_status','dv_plan_type'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 点检 / 保养数据
|
||||||
|
checkplanList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOpen(query) {
|
||||||
|
this.queryParams.planType = query.planType
|
||||||
|
this.queryParams.machineryCode = query.machineryCode
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getCheckPlan(this.queryParams).then(response => {
|
||||||
|
this.checkplanList = response.data;
|
||||||
|
// this.checkplanList = response.rows;
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
80
src/views/mes/dv/machinery/components/Repair.vue
Normal file
80
src/views/mes/dv/machinery/components/Repair.vue
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-table v-loading="loading" :data="repairList">
|
||||||
|
<el-table-column label="维修单编号" width="120px" align="center" prop="repairCode" />
|
||||||
|
<el-table-column label="维修单名称" width="150px" align="center" prop="repairName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="报修日期" align="center" prop="requireDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.requireDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修完成日期" align="center" prop="finishDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.finishDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="验收日期" align="center" prop="confirmDate" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.confirmDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修结果" align="center" prop="repairResult">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_repair_result" :value="scope.row.repairResult"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="维修人员" align="center" prop="acceptedBy" />
|
||||||
|
<el-table-column label="验收人员" align="center" prop="confirmBy" />
|
||||||
|
<el-table-column label="单据状态" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination-->
|
||||||
|
<!-- v-show="total>0"-->
|
||||||
|
<!-- :total="total"-->
|
||||||
|
<!-- :page.sync="queryParams.pageNum"-->
|
||||||
|
<!-- :limit.sync="queryParams.pageSize"-->
|
||||||
|
<!-- @pagination="getList"-->
|
||||||
|
<!-- />-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRepairList} from "@/api/mes/dv/repair";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Repair",
|
||||||
|
dicts: ['mes_repair_result', 'mes_order_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 点检 / 保养数据
|
||||||
|
repairList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getOpen(query) {
|
||||||
|
this.queryParams.machineryCode = query.machineryCode
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getRepairList(this.queryParams).then(response => {
|
||||||
|
this.repairList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -263,6 +263,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<el-tabs type="border-card" v-model="activeName" v-if="optType != 'add'" @tab-click="handleActive">
|
||||||
|
<el-tab-pane label="点检记录" name="check">
|
||||||
|
<CheckPlan ref="checkList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="保养记录" name="maintenance">
|
||||||
|
<CheckPlan ref="maintenanceList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="维修记录" name="repair">
|
||||||
|
<Repair ref="repairList" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@ -309,16 +320,19 @@ import {genCode} from "@/api/system/autocode/rule"
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
import BarcodeImg from "@/components/barcodeImg/index.vue";
|
||||||
|
import CheckPlan from "@/views/mes/dv/machinery/components/Checkplan.vue"
|
||||||
|
import Repair from "@/views/mes/dv/machinery/components/Repair.vue"
|
||||||
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
||||||
import { option } from "runjs";
|
import { option } from "runjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Machinery",
|
name: "Machinery",
|
||||||
dicts: ['sys_yes_no','mes_machinery_status'],
|
dicts: ['sys_yes_no','mes_machinery_status'],
|
||||||
components: { Treeselect,BarcodeImg },
|
components: { Treeselect,BarcodeImg, CheckPlan, Repair },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
activeName: "check",
|
||||||
//自动生成编码
|
//自动生成编码
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
@ -346,8 +360,6 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
// 设备类型名称
|
// 设备类型名称
|
||||||
machineryTypeName: undefined,
|
machineryTypeName: undefined,
|
||||||
//自动生成物料编码标识
|
|
||||||
autoGenFlag: false,
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
@ -425,6 +437,21 @@ export default {
|
|||||||
this.getTreeselect();
|
this.getTreeselect();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleActive (tab) {
|
||||||
|
const query = {}
|
||||||
|
query.machineryCode = this.form.machineryCode
|
||||||
|
if (tab.name == "check") {
|
||||||
|
query.planType = "CHECK"
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
|
}
|
||||||
|
if (tab.name == "maintenance") {
|
||||||
|
query.planType = "MAINTEN"
|
||||||
|
this.$refs.maintenanceList.getOpen(query)
|
||||||
|
}
|
||||||
|
if (tab.name == "repair") {
|
||||||
|
this.$refs.repairList.getOpen(query)
|
||||||
|
}
|
||||||
|
},
|
||||||
changeWorkshop(val) {
|
changeWorkshop(val) {
|
||||||
const workshop = this.workshopOptions.filter(item => item.workshopId == val)
|
const workshop = this.workshopOptions.filter(item => item.workshopId == val)
|
||||||
this.form.workshopId = workshop[0].workshopId
|
this.form.workshopId = workshop[0].workshopId
|
||||||
@ -532,8 +559,14 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "查看设备信息";
|
this.title = "查看设备信息";
|
||||||
this.optType = "view";
|
this.optType = "view";
|
||||||
|
this.activeName = "check"
|
||||||
|
const query = {
|
||||||
|
machineryCode: this.form.machineryCode,
|
||||||
|
planType: "CHECK"
|
||||||
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.barcodeImg.getBarcode();
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -561,8 +594,14 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改设备";
|
this.title = "修改设备";
|
||||||
this.optType = "edit";
|
this.optType = "edit";
|
||||||
|
this.activeName = "check"
|
||||||
|
const query = {
|
||||||
|
machineryCode: this.form.machineryCode,
|
||||||
|
planType: "CHECK"
|
||||||
|
}
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$refs.barcodeImg.getBarcode();
|
this.$refs.barcodeImg.getBarcode();
|
||||||
|
this.$refs.checkList.getOpen(query)
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -148,6 +148,7 @@
|
|||||||
<el-form-item label="负责人" prop="charge">
|
<el-form-item label="负责人" prop="charge">
|
||||||
<el-input v-model="form.charge" readonly @click.native="handleCharge" placeholder="请输入负责人" />
|
<el-input v-model="form.charge" readonly @click.native="handleCharge" placeholder="请输入负责人" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<UserSingleSelect ref="userSelect" @onSelected="onUserSelected"></UserSingleSelect>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -188,40 +189,6 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 选择 -->
|
|
||||||
<el-dialog :title="userTitle" :visible.sync="userOpen" width="960px" @close="cacelUser" append-to-body>
|
|
||||||
<el-table
|
|
||||||
ref="singleTable"
|
|
||||||
v-loading="loading"
|
|
||||||
:data="userList"
|
|
||||||
highlight-current-row
|
|
||||||
@current-change="handleCurrentChange">
|
|
||||||
<el-table-column label="用户编号" align="center" key="userId" prop="userId" />
|
|
||||||
<el-table-column label="用户名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" />
|
|
||||||
<el-table-column label="状态" align="center" key="status" />
|
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="userTotal>0"
|
|
||||||
:total="userTotal"
|
|
||||||
:page.sync="userQuery.pageNum"
|
|
||||||
:limit.sync="userQuery.pageSize"
|
|
||||||
@pagination="getUserList"
|
|
||||||
/>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm" v-if="optType !='view'">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -231,21 +198,17 @@ import {genCode} from "@/api/system/autocode/rule"
|
|||||||
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
import BarcodeImg from "@/components/barcodeImg/index.vue"
|
||||||
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
import {getBarcodeUrl} from "@/api/mes/wm/barcode";
|
||||||
import {listUser} from "@/api/system/user";
|
import {listUser} from "@/api/system/user";
|
||||||
|
import UserSingleSelect from "@/components/userSelect/single.vue";
|
||||||
export default {
|
export default {
|
||||||
components:{BarcodeImg},
|
components:{UserSingleSelect, BarcodeImg},
|
||||||
name: "Workshop",
|
name: "Workshop",
|
||||||
dicts: ['sys_yes_no'],
|
dicts: ['sys_yes_no'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userTotal: 0,
|
|
||||||
userTitle: '用户选择',
|
|
||||||
userOpen: false,
|
|
||||||
autoGenFlag:false,
|
autoGenFlag:false,
|
||||||
optType: undefined,
|
optType: undefined,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 用户数据
|
|
||||||
userList: [],
|
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
@ -301,44 +264,22 @@ export default {
|
|||||||
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
userQuery: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cacelUser(row) {
|
|
||||||
this.$refs.singleTable.setCurrentRow(row);
|
|
||||||
this.userOpen = false
|
|
||||||
},
|
|
||||||
/** 选择用户 */
|
/** 选择用户 */
|
||||||
handleCurrentChange(val) {
|
onUserSelected(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.form.charge = val.nickName
|
this.form.charge = val.nickName
|
||||||
this.form.chargeId = val.userId
|
this.form.chargeId = val.userId
|
||||||
this.cacelUser()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 点击负责人输入框 */
|
/** 点击负责人输入框 */
|
||||||
handleCharge() {
|
handleCharge() {
|
||||||
this.userOpen = true
|
this.$refs.userSelect.showFlag = true;
|
||||||
this.userQuery.pageNum = 1
|
|
||||||
this.userQuery.pageSize = 10
|
|
||||||
this.getUserList()
|
|
||||||
},
|
|
||||||
/** 查询用户列表 */
|
|
||||||
getUserList() {
|
|
||||||
this.loading = true;
|
|
||||||
listUser(this.userQuery, this.dateRange).then(response => {
|
|
||||||
this.userList = response.rows;
|
|
||||||
this.userTotal = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
/** 查询车间列表 */
|
/** 查询车间列表 */
|
||||||
getList() {
|
getList() {
|
||||||
|
Loading…
Reference in New Issue
Block a user