|
|
|
@ -92,7 +92,7 @@ |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
@ -105,6 +105,10 @@ |
|
|
|
<el-tab-pane :label="'机台'" name="third"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-button @click="jumpCalendar()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'工作日历'}}</el-button> |
|
|
|
<el-button @click="addResource()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
|
<el-button @click="editResource()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'编辑'}}</el-button> |
|
|
|
<el-button @click="deleteCalendar()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'删除'}}</el-button> |
|
|
|
<el-button @click="setResource()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'设为虚拟/常规机台'}}</el-button> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
@ -122,7 +126,7 @@ |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed" |
|
|
|
:width="item.columnWidth" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
@ -235,6 +239,51 @@ |
|
|
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="机台维护" :close-on-click-modal="false" v-drag :visible.sync="modelFlag3" width="460px" > |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'加工中心编码:'"> |
|
|
|
<el-input v-model="modelData3.workCenterNo" disabled style="width: 130px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="modelData3.site" disabled style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
<el-form-item :label="'机台编码:'"> |
|
|
|
<el-input v-model="modelData3.resourceID" :disabled="model3InputFlag" style="width: 130px" onblur="this.value=this.value.toUpperCase()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'机台名称:'"> |
|
|
|
<el-input v-model="modelData3.resourceDesc" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'效率:'"> |
|
|
|
<el-input v-model="modelData3.efficiency" type="number" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
<el-form-item :label="'利用率:'"> |
|
|
|
<el-input v-model="modelData3.utilization" type="number" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'是否在用:'"> |
|
|
|
<el-select filterable v-model="modelData3.active" style="width: 130px"> |
|
|
|
<el-option label="Y" value="Y"></el-option> |
|
|
|
<el-option label="N" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(91)"><a herf="#">工作日历编码:</a></span> |
|
|
|
<el-input v-model="modelData3.calendarID" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
<el-form-item :label="'备注:'"> |
|
|
|
<el-input v-model="modelData3.remark" style="width: 420px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="ResourceSave()">保存</el-button> |
|
|
|
<el-button type="primary" @click="modelFlag3 = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="物料编码" :close-on-click-modal="false" v-drag :visible.sync="partFlag" width="630px" > |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'物料编码:'"> |
|
|
|
@ -282,6 +331,9 @@ |
|
|
|
getProLineNoDetail, |
|
|
|
saveWorkCenterData, |
|
|
|
deleteWorkCenterData, |
|
|
|
saveResource, |
|
|
|
deleteResource, |
|
|
|
setResourceFlag |
|
|
|
}from "@/api/base/site.js" |
|
|
|
import { |
|
|
|
searchPartNoData, |
|
|
|
@ -308,6 +360,7 @@ |
|
|
|
configurationTemplateID:'', |
|
|
|
modelFlag:'', |
|
|
|
}, |
|
|
|
model3InputFlag:false, |
|
|
|
currentRow2:null, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
@ -323,6 +376,7 @@ |
|
|
|
// 导出 end |
|
|
|
activeName:'first', |
|
|
|
height: 200, |
|
|
|
modelFlag3:false, |
|
|
|
modelFlag2:false, |
|
|
|
modelFlag:false, |
|
|
|
modelInputFlag:true, |
|
|
|
@ -357,9 +411,23 @@ |
|
|
|
needSetupFlag:'', |
|
|
|
user:this.$store.state.user.name, |
|
|
|
}, |
|
|
|
modelData3:{ |
|
|
|
workCenterNo:'', |
|
|
|
site:'', |
|
|
|
resourceID:'', |
|
|
|
resourceDesc:'', |
|
|
|
efficiency:'', |
|
|
|
utilization:'', |
|
|
|
active:'', |
|
|
|
calendarID:'', |
|
|
|
remark:'', |
|
|
|
|
|
|
|
add:'', |
|
|
|
}, |
|
|
|
dataList:[], |
|
|
|
dataList2:[], |
|
|
|
dataList3:[], |
|
|
|
|
|
|
|
dataListLoading: false, |
|
|
|
buttons:{ |
|
|
|
download:'导出涉及产品', |
|
|
|
@ -854,10 +922,184 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
editResource(){ |
|
|
|
if(this.currentRow2==null){ |
|
|
|
this.$alert("请选择机台!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.modelData3={ |
|
|
|
workCenterNo:this.modelData.workCenterNo, |
|
|
|
site:this.modelData.site, |
|
|
|
resourceID:this.currentRow2.resourceID, |
|
|
|
resourceDesc:this.currentRow2.resourceDesc, |
|
|
|
efficiency:this.currentRow2.efficiency, |
|
|
|
utilization:this.currentRow2.utilization, |
|
|
|
active:this.currentRow2.active, |
|
|
|
calendarID:this.currentRow2.calendarID, |
|
|
|
remark:this.currentRow2.remark, |
|
|
|
add:1, |
|
|
|
}; |
|
|
|
this.model3InputFlag=true; |
|
|
|
this.modelFlag3=true; |
|
|
|
}, |
|
|
|
addResource(){ |
|
|
|
if(this.modelData.workCenterNo==''||this.modelData.workCenterNo==null){ |
|
|
|
this.$alert('请先选择加工中心!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
this.modelData3={ |
|
|
|
workCenterNo:this.modelData.workCenterNo, |
|
|
|
site:this.modelData.site, |
|
|
|
resourceID:'', |
|
|
|
resourceDesc:'', |
|
|
|
efficiency:'', |
|
|
|
utilization:'', |
|
|
|
active:'Y', |
|
|
|
calendarID:'', |
|
|
|
remark:'', |
|
|
|
add:0, |
|
|
|
}; |
|
|
|
this.model3InputFlag=false; |
|
|
|
this.modelFlag3=true; |
|
|
|
|
|
|
|
}, |
|
|
|
ResourceSave(){ |
|
|
|
if(this.modelData3.resourceID==''||this.modelData3.resourceID==null){ |
|
|
|
this.$alert("请输入机台编码!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.modelData3.resourceDesc==''||this.modelData3.resourceDesc==null){ |
|
|
|
this.$alert("请输入机台名称!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.modelData3.efficiency==''||this.modelData3.efficiency==null){ |
|
|
|
this.$alert("请输入效率!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.modelData3.utilization==''||this.modelData3.utilization==null){ |
|
|
|
this.$alert("请输入利用率!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.modelData3.active==''||this.modelData3.active==null){ |
|
|
|
this.$alert("请输入是否在用!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.modelData3.calendarID==''||this.modelData3.calendarID==null){ |
|
|
|
this.$alert("请输入工作日编码!",'错误',{ |
|
|
|
confirmButtonText:'确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
saveResource(this.modelData3).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.modelFlag3 = false |
|
|
|
getWorkCenterDataDetail(this.modelData).then(({data}) => { |
|
|
|
this.dataList2 = data.rows2; |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
setResource(){ |
|
|
|
if(this.currentRow2==null){ |
|
|
|
this.$alert("请选择机台!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let msg='是否将该机台设为虚拟机台?'; |
|
|
|
if(this.currentRow2.virturlFlag=='Y'){ |
|
|
|
msg='是否将该机台设为常规机台?'; |
|
|
|
} |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
setResourceFlag(this.currentRow2).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
getWorkCenterDataDetail(this.modelData).then(({data}) => { |
|
|
|
this.dataList2 = data.rows2; |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteCalendar(){ |
|
|
|
if(this.currentRow2==null){ |
|
|
|
this.$alert("请选择机台!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$confirm(`是否删除此机台?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteResource(this.currentRow2).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
getWorkCenterDataDetail(this.modelData).then(({data}) => { |
|
|
|
this.dataList2 = data.rows2; |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getBaseData(val){ |
|
|
|
if (this.tagNo === 25){ |
|
|
|
this.modelData2.proLineNo = val.ProLineNo |
|
|
|
} |
|
|
|
if (this.tagNo === 91){ |
|
|
|
this.modelData3.calendarID = val.CalendarID |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取基础数据列表 |
|
|
|
getBaseList(val){ |
|
|
|
@ -867,6 +1109,9 @@ |
|
|
|
if (val === 25){ |
|
|
|
strVal = this.modelData2.proLineNo |
|
|
|
} |
|
|
|
if (val === 91){ |
|
|
|
strVal = this.modelData3.calendarID |
|
|
|
} |
|
|
|
this.$refs.baseList.init(val,strVal) |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -875,7 +1120,7 @@ |
|
|
|
}, |
|
|
|
jumpCalendar(){ |
|
|
|
if(this.currentRow2==null){ |
|
|
|
this.$alert("请选择卷!", '错误', { |
|
|
|
this.$alert("请选择机台!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
|