diff --git a/src/api/device/equTeam.js b/src/api/device/equTeam.js
index dab0dfa..3f7c0b9 100644
--- a/src/api/device/equTeam.js
+++ b/src/api/device/equTeam.js
@@ -50,3 +50,21 @@ export function getMaintenanceTeamList() {
method: 'get'
});
}
+
+// 查询班组列表
+export function listTeamMembers(query) {
+ return request({
+ url: '/device/equTeam/listTeamMembers',
+ method: 'get',
+ params: query
+ });
+}
+
+// 查询班组列表
+export function getRightList(query) {
+ return request({
+ url: '/device/equTeam/getRightList',
+ method: 'get',
+ params: query
+ });
+}
diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js
index bcd8254..deb6cb7 100644
--- a/src/api/mes/reportWork.js
+++ b/src/api/mes/reportWork.js
@@ -163,3 +163,14 @@ export function getMesListBom(query) {
// method: 'get'
// });
// }
+//获取批次
+export function getBatchList(workorderCode) {
+ const data = {
+ workorderCode
+ }
+ return request({
+ url: '/mes/reportWork/getBatchList',
+ method: 'put',
+ data: data
+ });
+}
diff --git a/src/api/wms/equipment.js b/src/api/wms/equipment.js
index a7fb092..b2751ea 100644
--- a/src/api/wms/equipment.js
+++ b/src/api/wms/equipment.js
@@ -58,3 +58,28 @@ export function getEquipmentTypeList() {
method: 'get'
});
}
+
+// 查询设备备件
+export function getSparePartsList() {
+ return request({
+ url: '/wms/equipment/getSparePartsList',
+ method: 'get'
+ });
+}
+
+// 查询设备备件右侧列表
+export function getRightSparePartsList() {
+ return request({
+ url: '/wms/equipment/getRightSparePartsList',
+ method: 'get'
+ });
+}
+
+// 绑定
+export function bindSpareParts(data) {
+ return request({
+ url: '/wms/equipment/bindSpareParts',
+ method: 'post',
+ data: data
+ });
+}
diff --git a/src/components/itemSelect/single.vue b/src/components/itemSelect/single.vue
index 90a39d0..8adb5f5 100644
--- a/src/components/itemSelect/single.vue
+++ b/src/components/itemSelect/single.vue
@@ -234,5 +234,5 @@ export default {
this.showFlag = false;
}
}
-};
+};
\ No newline at end of file
diff --git a/src/views/device/equTeam/index.vue b/src/views/device/equTeam/index.vue
index ef3acfe..f228c48 100644
--- a/src/views/device/equTeam/index.vue
+++ b/src/views/device/equTeam/index.vue
@@ -154,8 +154,9 @@
/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ form.equipmentCode
+ }}
+ {{
+ form.orderBreakdownTime
+ }}
+ {{
+ form.orderSource
+ }}
+ {{
+ form.orderTime
+ }}
+ {{
+ form.orderRepairmanName
+ }}
+ {{
+ form.orderConnection
+ }}
+ {{
+ form.orderDesc
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1030,11 +1223,11 @@ import {
} from "@/api/device/faultReport";
import ItemSelect from "./selectSingleEquipment.vue";
import ItemSelectPerson from "./selectSinglePerson.vue";
-import { Message } from 'element-ui'
+import { Message } from "element-ui";
export default {
name: "FaultReport",
- components: { ItemSelect,ItemSelectPerson },
+ components: { ItemSelect, ItemSelectPerson },
dicts: ["device_order_source"],
data() {
return {
@@ -1056,14 +1249,20 @@ export default {
total: 0,
// 故障报修表格数据
faultReportList: [],
+ //检查项表格数据
+ checkList: [],
+ //url表
+ urlLists:[],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
+ //报修显示弹出层
+ openView: false,
// 是否显示弹出层
openCheck: false,
//查看审核故障报修页面
- viewCheck:false,
+ viewCheck: false,
// 查询参数
queryParams: {
pageNum: 1,
@@ -1075,7 +1274,8 @@ export default {
orderSource: null,
orderTime: null,
orderHandle: null,
- orderRepairman: null,
+ orderRepairmanCode: null,
+ orderRepairmanName: null,
orderConnection: null,
orderStatus: null,
orderRelevance: null,
@@ -1163,8 +1363,8 @@ export default {
orderTime: [
{ required: true, message: "报修时间不能为空", trigger: "blur" },
],
- orderRepairman: [
- { required: true, message: "报修人不能为空", trigger: "blur" },
+ orderRepairmanCode: [
+ { required: true, message: "报修人编号不能为空", trigger: "blur" },
],
orderDesc: [
{ required: true, message: "故障描述不能为空", trigger: "blur" },
@@ -1193,7 +1393,9 @@ export default {
},
//人员选择
onItemSelectedPerson(obj) {
- this.form.orderRepairman = obj;
+ console.log("接收参数", obj);
+ this.form.orderRepairmanCode = obj[0].userName;
+ this.form.orderRepairmanName = obj[0].nickName;
},
//设备选择
onItemSelectedEquipment(obj) {
@@ -1288,17 +1490,76 @@ export default {
this.title = "修改故障报修";
});
},
+ /** 查看按钮操作 */
+ handleView(row) {
+ this.reset();
+ const orderId = row.orderId || this.ids;
+ getFaultReport(orderId).then((response) => {
+ this.form = response.data;
+ if (response.data.files != null) {
+ var newFiles = [];
+ response.data.files.forEach((item) => {
+ var newFile = {};
+ newFile.name = item.fileName;
+ newFile.url = item.fileAddress;
+ newFiles.push(newFile);
+ });
+ this.form.fileList = newFiles;
+ var urlLists = [];
+ this.form.fileList.forEach((item) => {
+ urlLists.push(item.url);
+ });
+ this.urlLists = urlLists ;
+ console.log("2222222222",this.urlLists)
+ }
+ this.checkList = response.data.checkList;
+ //检查项遍历
+ var standards = [];
+ this.checkList.forEach((item1) => {
+ //检查项名字
+ item1.standardList.forEach((item) => {
+ var standard = {};
+ standard.itemName = item1.itemName;
+ standard.standardName = item.standardName;
+ standard.detailUpLimit = item.detailUpLimit;
+ standard.detailDownLimit = item.detailDownLimit;
+ standard.detailUnit = item.detailUnit;
+ standard.detailReach = item.detailReach;
+ standard.actualValue = item.actualValue;
+ standard.standardType = item.standardType;
+ standards.push(standard);
+ });
+ });
+ this.checkList = standards;
+ console.log("1111111111", this.checkList);
+ this.openView = true;
+ this.title = "查看故障报修";
+ });
+ },
/** 审核按钮操作 */
handleCheck(row) {
this.reset();
const orderId = row.orderId || this.ids;
getFaultReport(orderId).then((response) => {
- if(response.data.orderStatus == "审核通过" || response.data.orderStatus == "驳回"){
+ if (response.data.files != null) {
+ var newFiles = [];
+ response.data.files.forEach((item) => {
+ var newFile = {};
+ newFile.name = item.fileName;
+ newFile.url = item.fileAddress;
+ newFiles.push(newFile);
+ });
+ this.form.fileList = newFiles;
+ }
+ if (
+ response.data.orderStatus == "审核通过" ||
+ response.data.orderStatus == "驳回"
+ ) {
Message.warning("该报修记录已审核!");
this.form = response.data;
this.viewCheck = true;
this.title = "查看审核故障报修";
- }else{
+ } else {
this.form = response.data;
this.openCheck = true;
this.title = "审核故障报修";
@@ -1307,6 +1568,9 @@ export default {
},
/** 提交按钮 */
submitForm() {
+ if (Array.isArray(this.form.fileList)) {
+ this.form.fileList = this.listToString(this.form.fileList);
+ }
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.orderId != null) {
@@ -1353,6 +1617,15 @@ export default {
})
.catch(() => {});
},
+ // 对象转成指定字符串分隔
+ listToString(list, separator) {
+ let strs = "";
+ separator = separator || ",";
+ for (let i in list) {
+ strs += list[i].url + separator;
+ }
+ return strs != "" ? strs.substr(0, strs.length - 1) : "";
+ },
/** 导出按钮操作 */
handleExport() {
this.download(
diff --git a/src/views/device/faultReport/selectSinglePerson.vue b/src/views/device/faultReport/selectSinglePerson.vue
index 05f59b1..dcd3809 100644
--- a/src/views/device/faultReport/selectSinglePerson.vue
+++ b/src/views/device/faultReport/selectSinglePerson.vue
@@ -5,7 +5,7 @@
:modal= false
width="800px"
center
- :before-close="cancelEquipmentForm"
+ :before-close="cancel"
>
@@ -34,7 +34,7 @@
重置
-
+
@@ -53,8 +53,8 @@
@@ -112,7 +112,7 @@ export default {
this.resetForm("form");
},
- handleEquipmentSelectionChange (val) {
+ handleSelectionChange (val) {
this.itemList = val;
},
@@ -133,14 +133,6 @@ export default {
);
},
- // 节点单击事件
- handleNodeClick(data) {
- console.log('id',data.id);
- this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
- console.log(this.equipmentTypeCode);
- this.handleQuery();
- },
-
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@@ -155,27 +147,20 @@ export default {
},
// 多选框选中数据
- handleEquipmentSelectionChange(selection) {
- this.ids = selection.map(item => item.nickName);
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.userId);
+ this.userCodes = selection.map(item => item.userName);
this.single = selection.length!==1;
this.multiple = !selection.length;
- console.log("多选框",this.ids);
},
- submitPersonForm() {
- const data = this.ids;
- const nickName = data.toString();
- if(data.length >1){
+ submitForm() {
+ if(this.$refs.multipleTable.selection.length > 1){
Message.warning("只能选择一个报修人,请勿选择多个!");
}else{
- if(this.queryParams.itemCodeGet == ""){
- this.queryParams.itemCodeGet = nickName;
- }
- this.selectedRows = this.queryParams.itemCodeGet;
- this.$emit('onSelected', this.selectedRows);
- this.getList();
+ this.$emit('onSelected', this.$refs.multipleTable.selection);
this.showFlag = false;
- this.queryParams.itemCodeGet = "";
+ this.getList();
}
}
}
diff --git a/src/views/device/repairOrder/index.vue b/src/views/device/repairOrder/index.vue
index 54bcc05..002bb41 100644
--- a/src/views/device/repairOrder/index.vue
+++ b/src/views/device/repairOrder/index.vue
@@ -88,12 +88,12 @@
style="width: 200px"
@keyup.enter.native="handleQuery"
>
-
+
@@ -250,13 +250,13 @@
label="维修单号"
align="center"
prop="workCode"
- width="180"
+ width="200"
/>
-
-
- {{ scope.row.workStatus == "1"?'维修结束': scope.row.workStatus == "2"?'维修中' : scope.row.workStatus == "0" ? '待维修' : '无'}}
-
+
+
+
+
-
+
@@ -1070,6 +1073,7 @@ import ItemSelectSpareParts from "./selectSpareParts.vue";
export default {
name: " RepairOrder",
components: { ItemSelect, ItemSelectPerson, ItemSelectSpareParts },
+ dicts: ["device_repair_status"],
data() {
return {
//选择设备维修班组
@@ -1153,21 +1157,6 @@ export default {
label: "不停机",
},
],
- //选择维修状态
- workStatusOption: [
- {
- workStatus: "0",
- label: "待维修",
- },
- {
- workStatus: "2",
- label: "维修中",
- },
- {
- workStatus: "1",
- label: "维修结束",
- },
- ],
// 日期范围选择快捷
pickerOptions: {
shortcuts: [
diff --git a/src/views/device/repairOrder/selectSinglePerson.vue b/src/views/device/repairOrder/selectSinglePerson.vue
index 11fe0a9..ed38ef1 100644
--- a/src/views/device/repairOrder/selectSinglePerson.vue
+++ b/src/views/device/repairOrder/selectSinglePerson.vue
@@ -159,20 +159,20 @@ export default {
// 多选框选中数据
handleEquipmentSelectionChange(selection) {
- this.ids = selection.map(item => item.nickName);
+ this.ids = selection.map(item => item.userId);
+ this.userCodes = selection.map(item => item.userNames);
this.single = selection.length!==1;
this.multiple = !selection.length;
- console.log("多选框",this.ids);
},
submitPersonForm() {
- const data = this.ids;
- const nickName = data.toString();
+ const data = this.userNames;
+ const userCodes = data.toString();
if(data.length >1){
Message.warning("只能选择一个维修人,请勿选择多个!");
}else{
if(this.queryParams.itemCodeGet == ""){
- this.queryParams.itemCodeGet = nickName;
+ this.queryParams.itemCodeGet = userCodes;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit('onSelected', this.selectedRows);
diff --git a/src/views/device/repairOrder/selectSpareParts.vue b/src/views/device/repairOrder/selectSpareParts.vue
index 1f5a6e6..6bdfebe 100644
--- a/src/views/device/repairOrder/selectSpareParts.vue
+++ b/src/views/device/repairOrder/selectSpareParts.vue
@@ -10,18 +10,7 @@
@click="handleSelectSparePartsLedger"
v-hasPermi="['device:sparePartsApplicationRecord:add']"
>新增
-
-
-
- 修改
+
-
-
+
+
@@ -54,24 +43,6 @@
-
-
- 修改
- 删除
-
-
@@ -141,42 +112,14 @@ export default {
attr1: null,
attr2: null,
attr3: null,
- factoryCode: null,
- applyTimeArray: []
+ factoryCode: null
},
- // 日期范围选择快捷
- 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]);
- }
- }]
- },
// 表单参数
form: {},
// 表单校验
rules: {
- }
+ },
+ componentKey:0
};
},
props: {
@@ -190,6 +133,7 @@ export default {
methods: {
//设备选择弹出框
handleSelectSparePartsLedger() {
+ this.$forceUpdate();
this.$refs.itemSelectSparePartsLedger.showFlag = true;
},
// 生成表头序号
@@ -235,7 +179,8 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
- factoryCode: null
+ factoryCode: null,
+ spareApplyLists : []
};
this.resetForm("form");
},
@@ -247,7 +192,6 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
- this.queryParams.applyTimeArray = [];
this.handleQuery();
},
// 多选框选中数据
@@ -294,16 +238,23 @@ export default {
},
//接收参数
selectSparePartsLedger(obj){
- console.log("接收参数",obj[0]);
+ console.log("接收参数",obj);
//备件编号、备件名称、备件规格型号、备件使用设备、备件申请数量、备件关联工单号
- this.form.spareCode = obj[0].materialCode;
- this.form.spareName = obj[0].materialDesc;
- this.form.spareModel = obj[0].spareMode;
- this.form.spareUseEquipment = this.queryParams.equipmentCode;
- this.form.spareQuantity = obj[0].spareQuantity;
- this.form.workCode = this.queryParams.workCode;
+ var spareApplyLists = [];
+ obj.forEach(item => {
+ var spareApplyList = {};
+ spareApplyList.spareCode = item.materialCode;
+ spareApplyList.spareName = item.materialDesc;
+ spareApplyList.spareModel = item.spareMode;
+ spareApplyList.spareUseEquipment = this.queryParams.equipmentCode;
+ spareApplyList.spareQuantity = item.spareQuantity;
+ spareApplyList.workCode = this.queryParams.workCode;
+ spareApplyList.storageId = item.storageId;
+ spareApplyList.amount = item.amount;
+ spareApplyLists.push(spareApplyList);
+ });
+ this.form.spareApplyLists = spareApplyLists;
addSparePartsApplicationRecord(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
diff --git a/src/views/device/repairOrder/selectSparePartsLedger.vue b/src/views/device/repairOrder/selectSparePartsLedger.vue
index 2df199a..2cac4a5 100644
--- a/src/views/device/repairOrder/selectSparePartsLedger.vue
+++ b/src/views/device/repairOrder/selectSparePartsLedger.vue
@@ -63,7 +63,7 @@
/>
@@ -71,6 +71,7 @@
+
diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue
index f0bdfa0..d52894a 100644
--- a/src/views/mes/reportWork/index.vue
+++ b/src/views/mes/reportWork/index.vue
@@ -166,9 +166,10 @@
:formatter="productCodeFormate"
/>
-
+
+
@@ -233,7 +234,7 @@
-
+
@@ -332,7 +333,6 @@
/>
-
+
+
+
+
+
+
+
+
+
+
+
+ 否
+ 是
+
+
+
@@ -386,7 +405,7 @@