|
|
@ -79,6 +79,7 @@ |
|
|
<el-button @click="addRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
<el-button @click="addRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
<el-button @click="editRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'修改'}}</el-button> |
|
|
<el-button @click="editRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'修改'}}</el-button> |
|
|
<el-button @click="deleteRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'删除'}}</el-button> |
|
|
<el-button @click="deleteRoutingTool()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'删除'}}</el-button> |
|
|
|
|
|
<el-button @click="jumpToolInfo()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'工具信息'}}</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
:height="height" |
|
|
:height="height" |
|
|
@ -196,36 +197,45 @@ |
|
|
<el-button type="primary" @click="detailmodelFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="detailmodelFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<el-dialog title="维护工艺路线工具" :close-on-click-modal="false" v-drag :visible.sync="ToolmodelFlag" width="500px"> |
|
|
|
|
|
|
|
|
<el-dialog title="维护工艺路线工具" :close-on-click-modal="false" v-drag :visible.sync="ToolmodelFlag" width="480px"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form-item :label="'工序号:'"> |
|
|
<el-form-item :label="'工序号:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-select v-model="toolData.itemNo" @change="getOperationDesc()" :disabled="toolmodelInputFlag" style="width: 130px" placeholder="请选择"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="(item,index) in selectList" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
:label="item.label" |
|
|
|
|
|
:value="item.value" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'工序名称:'"> |
|
|
<el-form-item :label="'工序名称:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="toolData.operationDesc" disabled style="width: 130px;text-align: right" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'工具编号:'"> |
|
|
|
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item > |
|
|
|
|
|
<span slot="label" style="" @click="getBaseList(70)"><a herf="#">工具编号:</a></span> |
|
|
|
|
|
<el-input v-model="toolData.toolID" @change="getToolDesc()" :disabled="toolmodelInputFlag" style="width: 130px;text-align: right" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form-item :label="'工具名称:'"> |
|
|
<el-form-item :label="'工具名称:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="toolData.toolDescription" disabled style="width: 130px;text-align: right" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'规格型号:'"> |
|
|
<el-form-item :label="'规格型号:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 270px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="toolData.spec" disabled style="width: 275px;text-align: right" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form-item :label="'工具数量:'"> |
|
|
<el-form-item :label="'工具数量:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="toolData.toolQty" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'备注:'"> |
|
|
<el-form-item :label="'备注:'"> |
|
|
<el-input v-model="toolData.itemNo" :disabled="detailmodelInputFlag" style="width: 270px;text-align: right" type="number"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="toolData.remark" style="width: 275px;text-align: right" ></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
<el-button type="primary" @click="saveToolData()">保存</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="saveRoutingTool()">保存</el-button> |
|
|
<el-button type="primary" @click="ToolmodelFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="ToolmodelFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -315,6 +325,10 @@ |
|
|
searchAllResource, |
|
|
searchAllResource, |
|
|
addRoutingResource, |
|
|
addRoutingResource, |
|
|
deleteRoutingResource, |
|
|
deleteRoutingResource, |
|
|
|
|
|
getItemSelect, |
|
|
|
|
|
getToolDesc, |
|
|
|
|
|
saveRoutingTool, |
|
|
|
|
|
deleteRoutingTool, |
|
|
}from "@/api/base/site.js" |
|
|
}from "@/api/base/site.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
export default { |
|
|
export default { |
|
|
@ -324,6 +338,7 @@ |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
selectList:[], |
|
|
resourceList1:[], |
|
|
resourceList1:[], |
|
|
resourceList2:[], |
|
|
resourceList2:[], |
|
|
currentRow4:null, |
|
|
currentRow4:null, |
|
|
@ -353,6 +368,7 @@ |
|
|
ToolmodelFlag:false, |
|
|
ToolmodelFlag:false, |
|
|
detailmodelFlag:false, |
|
|
detailmodelFlag:false, |
|
|
detailmodelInputFlag:false, |
|
|
detailmodelInputFlag:false, |
|
|
|
|
|
toolmodelInputFlag:false, |
|
|
dataList:[], |
|
|
dataList:[], |
|
|
dataList2:[], |
|
|
dataList2:[], |
|
|
dataList3:[], |
|
|
dataList3:[], |
|
|
@ -361,12 +377,14 @@ |
|
|
partNo:'', |
|
|
partNo:'', |
|
|
revNo:'', |
|
|
revNo:'', |
|
|
itemNo:'', |
|
|
itemNo:'', |
|
|
site:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
|
|
|
operationDesc:'', |
|
|
|
|
|
toolID:'', |
|
|
|
|
|
toolDescription:'', |
|
|
|
|
|
spec:'', |
|
|
|
|
|
toolQty:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
user:'', |
|
|
|
|
|
add:'', |
|
|
}, |
|
|
}, |
|
|
columnList:[ |
|
|
columnList:[ |
|
|
{ |
|
|
{ |
|
|
@ -1149,8 +1167,9 @@ |
|
|
if (this.tagNo === 24){ |
|
|
if (this.tagNo === 24){ |
|
|
this.detailData.workCenterNo = val.WorkCenterNo |
|
|
this.detailData.workCenterNo = val.WorkCenterNo |
|
|
} |
|
|
} |
|
|
if (this.tagNo === 91){ |
|
|
|
|
|
this.modelData3.calendarID = val.CalendarID |
|
|
|
|
|
|
|
|
if (this.tagNo === 70){ |
|
|
|
|
|
this.toolData.toolID = val.ToolID |
|
|
|
|
|
this.getToolDesc(); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取基础数据列表 |
|
|
// 获取基础数据列表 |
|
|
@ -1161,8 +1180,8 @@ |
|
|
if (val === 24){ |
|
|
if (val === 24){ |
|
|
strVal = this.detailData.workCenterNo |
|
|
strVal = this.detailData.workCenterNo |
|
|
} |
|
|
} |
|
|
if (val === 91){ |
|
|
|
|
|
strVal = this.modelData3.calendarID |
|
|
|
|
|
|
|
|
if (val === 70){ |
|
|
|
|
|
strVal = this.toolData.toolID |
|
|
} |
|
|
} |
|
|
this.$refs.baseList.init(val,strVal) |
|
|
this.$refs.baseList.init(val,strVal) |
|
|
}) |
|
|
}) |
|
|
@ -1197,7 +1216,7 @@ |
|
|
this.detailmodelFlag=true; |
|
|
this.detailmodelFlag=true; |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
saveRoutingDetailData(){ |
|
|
|
|
|
|
|
|
saveRoutingDetailData(){ |
|
|
if(this.detailData.itemNo==''||this.detailData.itemNo==null){ |
|
|
if(this.detailData.itemNo==''||this.detailData.itemNo==null){ |
|
|
this.$alert("请输入工序号!",'错误',{ |
|
|
this.$alert("请输入工序号!",'错误',{ |
|
|
confirmButtonText:'确定' |
|
|
confirmButtonText:'确定' |
|
|
@ -1453,7 +1472,185 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
addRoutingTool(){ |
|
|
addRoutingTool(){ |
|
|
|
|
|
|
|
|
|
|
|
if(this.mainData.partNo==null||this.mainData.partNo==''){ |
|
|
|
|
|
this.$alert("请选择物料号!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
this.toolData={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
itemNo:'', |
|
|
|
|
|
operationDesc:'', |
|
|
|
|
|
toolID:'', |
|
|
|
|
|
toolDescription:'', |
|
|
|
|
|
spec:'', |
|
|
|
|
|
toolQty:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
add:0, |
|
|
|
|
|
}; |
|
|
|
|
|
this.selectList=[]; |
|
|
|
|
|
let data={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
} |
|
|
|
|
|
getItemSelect(data).then(({data}) => { |
|
|
|
|
|
let list=data.rows; |
|
|
|
|
|
for (let i = 0; i <list.length ; i++) { |
|
|
|
|
|
let resultData = { |
|
|
|
|
|
value:list[i].itemNo, |
|
|
|
|
|
label:list[i].itemNo |
|
|
|
|
|
} |
|
|
|
|
|
this.selectList.push(resultData); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.toolmodelInputFlag=false; |
|
|
|
|
|
this.ToolmodelFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
editRoutingTool(){ |
|
|
|
|
|
if(this.currentRow2==null){ |
|
|
|
|
|
this.$alert("请选择工具!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
this.toolData={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
itemNo:this.currentRow2.itemNo, |
|
|
|
|
|
operationDesc:this.currentRow2.operationDesc, |
|
|
|
|
|
toolID:this.currentRow2.toolID, |
|
|
|
|
|
toolDescription:this.currentRow2.toolDescription, |
|
|
|
|
|
spec:this.currentRow2.spec, |
|
|
|
|
|
toolQty:this.currentRow2.toolQty, |
|
|
|
|
|
remark:this.currentRow2.remark, |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
add:1, |
|
|
|
|
|
}; |
|
|
|
|
|
this.getOperationDesc(); |
|
|
|
|
|
this.toolmodelInputFlag=true; |
|
|
|
|
|
this.ToolmodelFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
saveRoutingTool(){ |
|
|
|
|
|
if(this.toolData.itemNo==''||this.toolData.itemNo==null){ |
|
|
|
|
|
this.$alert("请选择工序号!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.toolData.toolID==''||this.toolData.toolID==null){ |
|
|
|
|
|
this.$alert("请输入工具编号!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.toolData.toolQty==''||this.toolData.toolQty==null){ |
|
|
|
|
|
this.$alert("请输入工具数量!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
saveRoutingTool(this.toolData).then(({data}) => { |
|
|
|
|
|
this.currentRow2=null; |
|
|
|
|
|
if (data && data.code == 200) { |
|
|
|
|
|
this.ToolmodelFlag = false |
|
|
|
|
|
let data1={ |
|
|
|
|
|
site: this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
} |
|
|
|
|
|
searchRoutingToolData(data1).then(({data}) => { |
|
|
|
|
|
this.dataList3=data.rows; |
|
|
|
|
|
}) |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
deleteRoutingTool(){ |
|
|
|
|
|
if(this.currentRow2==null){ |
|
|
|
|
|
this.$alert("请选择工具!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(`是否删除此工具信息?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
let delDate={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
itemNo:this.currentRow2.itemNo, |
|
|
|
|
|
toolID:this.currentRow2.toolID, |
|
|
|
|
|
} |
|
|
|
|
|
deleteRoutingTool(delDate).then(({data}) => { |
|
|
|
|
|
this.currentRow2=null; |
|
|
|
|
|
if (data && data.code == 200) { |
|
|
|
|
|
this.ToolmodelFlag = false |
|
|
|
|
|
let data1={ |
|
|
|
|
|
site: this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
} |
|
|
|
|
|
searchRoutingToolData(data1).then(({data}) => { |
|
|
|
|
|
this.dataList3=data.rows; |
|
|
|
|
|
}) |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '删除成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getOperationDesc(){ |
|
|
|
|
|
let data={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
itemNo:this.toolData.itemNo |
|
|
|
|
|
} |
|
|
|
|
|
getItemSelect(data).then(({data}) => { |
|
|
|
|
|
if(data.rows.length>0){ |
|
|
|
|
|
this.toolData.operationDesc=data.rows[0].operationDesc |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getToolDesc(){ |
|
|
|
|
|
let data={ |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
toolID:this.toolData.toolID |
|
|
|
|
|
} |
|
|
|
|
|
getToolDesc(data).then(({data}) => { |
|
|
|
|
|
if(data.rows.length>0){ |
|
|
|
|
|
this.toolData.toolDescription=data.rows[0].toolDescription |
|
|
|
|
|
this.toolData.spec=data.rows[0].spec |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
deleteResource(){ |
|
|
deleteResource(){ |
|
|
if(this.currentRow4==null){ |
|
|
if(this.currentRow4==null){ |
|
|
@ -1499,6 +1696,17 @@ |
|
|
localStorage.setItem('workCenterNo', JSON.stringify(inData)) |
|
|
localStorage.setItem('workCenterNo', JSON.stringify(inData)) |
|
|
this.$router.replace('base-workCenter') |
|
|
this.$router.replace('base-workCenter') |
|
|
}, |
|
|
}, |
|
|
|
|
|
jumpToolInfo(){ |
|
|
|
|
|
if(this.currentRow2==null){ |
|
|
|
|
|
this.$alert("请选择工具!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
let inData={site:this.$store.state.user.site,toolId:this.currentRow2.toolID,toolDescription:this.currentRow2.toolDescription}; |
|
|
|
|
|
localStorage.setItem('toolInfo', JSON.stringify(inData)) |
|
|
|
|
|
this.$router.replace('knifemold-tool-info') |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|
|
|
|
|
|
|