|
|
@ -42,6 +42,9 @@ |
|
|
<el-tabs v-model="activeName" > |
|
|
<el-tabs v-model="activeName" > |
|
|
<el-tab-pane :label="'明细'" name="first"> |
|
|
<el-tab-pane :label="'明细'" name="first"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
|
|
<el-button @click="addRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增'}}</el-button> |
|
|
|
|
|
<el-button @click="editRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'修改'}}</el-button> |
|
|
|
|
|
<el-button @click="deleteRoutingDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'删除'}}</el-button> |
|
|
<el-button @click="jumpWorkCenter()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'加工中心'}}</el-button> |
|
|
<el-button @click="jumpWorkCenter()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'加工中心'}}</el-button> |
|
|
<el-button @click="getPartDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'可用机台'}}</el-button> |
|
|
<el-button @click="getPartDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'可用机台'}}</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
|
@ -109,6 +112,59 @@ |
|
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
|
|
<el-button type="primary" @click="modelFlag = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="维护工艺路线明细" :close-on-click-modal="false" v-drag :visible.sync="detailmodelFlag" width="620px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
|
|
<el-form-item :label="'工序号:'"> |
|
|
|
|
|
<el-input v-model="detailData.itemNo" :disabled="detailmodelInputFlag" style="width: 130px;text-align: right" type="number"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'工序名称:'"> |
|
|
|
|
|
<el-input v-model="detailData.operationDesc" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'加工中心编码:'"> |
|
|
|
|
|
<el-input v-model="detailData.workCenterNo" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'准备时间:'"> |
|
|
|
|
|
<el-input v-model="detailData.machSetupTime" 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="detailData.machRunFactor" type="number" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'产出单位:'"> |
|
|
|
|
|
<el-select filterable v-model="detailData.factorUnit" style="width: 130px"> |
|
|
|
|
|
<el-option label="" value=""></el-option> |
|
|
|
|
|
<el-option label="单位/小时" value="单位/小时"></el-option> |
|
|
|
|
|
<el-option label="小时" value="小时"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'计价单价:'"> |
|
|
|
|
|
<el-input v-model="detailData.jjgzUnitPrice" type="number" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'单位:'"> |
|
|
|
|
|
<el-select filterable v-model="detailData.jjgzUnitFactor" style="width: 130px"> |
|
|
|
|
|
<el-option label="" value=""></el-option> |
|
|
|
|
|
<el-option label="小时" value="小时"></el-option> |
|
|
|
|
|
<el-option label="件" value="件"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</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="detailData.efficiency" type="number" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'操作工人数:'"> |
|
|
|
|
|
<el-input v-model="detailData.crewsize" type="number" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="'备注:'"> |
|
|
|
|
|
<el-input v-model="detailData.remark" style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="saveRoutingDetailData()">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="detailmodelFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -116,6 +172,7 @@ |
|
|
import { |
|
|
import { |
|
|
searchRoutingWithPartNo, |
|
|
searchRoutingWithPartNo, |
|
|
searchRoutingDetailData, |
|
|
searchRoutingDetailData, |
|
|
|
|
|
saveRoutingDetailData, |
|
|
}from "@/api/base/site.js" |
|
|
}from "@/api/base/site.js" |
|
|
export default { |
|
|
export default { |
|
|
name: "maintainProductRouting", |
|
|
name: "maintainProductRouting", |
|
|
@ -140,6 +197,8 @@ |
|
|
}, |
|
|
}, |
|
|
activeName:'first', |
|
|
activeName:'first', |
|
|
modelFlag:false, |
|
|
modelFlag:false, |
|
|
|
|
|
detailmodelFlag:false, |
|
|
|
|
|
detailmodelInputFlag:false, |
|
|
dataList:[], |
|
|
dataList:[], |
|
|
dataList2:[], |
|
|
dataList2:[], |
|
|
columnList:[ |
|
|
columnList:[ |
|
|
@ -562,6 +621,24 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
], |
|
|
], |
|
|
|
|
|
detailData:{ |
|
|
|
|
|
itemNo:'', |
|
|
|
|
|
operationDesc:'', |
|
|
|
|
|
workCenterNo:'', |
|
|
|
|
|
machSetupTime:'', |
|
|
|
|
|
machRunFactor:'', |
|
|
|
|
|
factorUnit:'', |
|
|
|
|
|
jjgzUnitPrice:'', |
|
|
|
|
|
jjgzUnitFactor:'', |
|
|
|
|
|
efficiency:'', |
|
|
|
|
|
crewsize:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
partNo:'', |
|
|
|
|
|
revNo:'', |
|
|
|
|
|
add:'', |
|
|
|
|
|
user:'', |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
@ -570,6 +647,80 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
addRoutingDetail(){ |
|
|
|
|
|
if(this.mainData.partNo==null||this.mainData.partNo==''){ |
|
|
|
|
|
this.$alert("请选择物料号!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
let size=this.dataList2.length; |
|
|
|
|
|
this. detailData={ |
|
|
|
|
|
itemNo:this.dataList2[Number(size-1)].itemNo+10, |
|
|
|
|
|
operationDesc:'', |
|
|
|
|
|
workCenterNo:'', |
|
|
|
|
|
machSetupTime:'', |
|
|
|
|
|
machRunFactor:0, |
|
|
|
|
|
factorUnit:'', |
|
|
|
|
|
jjgzUnitPrice:'', |
|
|
|
|
|
jjgzUnitFactor:'', |
|
|
|
|
|
efficiency:'', |
|
|
|
|
|
crewsize:'', |
|
|
|
|
|
remark:'', |
|
|
|
|
|
add:0, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
this.detailmodelInputFlag=false; |
|
|
|
|
|
this.detailmodelFlag=true; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
saveRoutingDetailData(){ |
|
|
|
|
|
if(this.detailData.itemNo==''||this.detailData.itemNo==null){ |
|
|
|
|
|
this.$alert("请输入工序号!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.detailData.operationDesc==''||this.detailData.operationDesc==null){ |
|
|
|
|
|
this.$alert("请输入工序名称!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.detailData.workCenterNo==''||this.detailData.workCenterNo==null){ |
|
|
|
|
|
this.$alert("请输入加工中心编码!",'错误',{ |
|
|
|
|
|
confirmButtonText:'确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
saveRoutingDetailData(this.detailData).then(({data}) => { |
|
|
|
|
|
if (data && data.code == 200) { |
|
|
|
|
|
this.detailmodelFlag = false |
|
|
|
|
|
let data1={ |
|
|
|
|
|
site: this.mainData.site, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
} |
|
|
|
|
|
searchRoutingDetailData(data1).then(({data}) => { |
|
|
|
|
|
this.dataList2=data.rows; |
|
|
|
|
|
}) |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
tableHanddle(row) { |
|
|
tableHanddle(row) { |
|
|
let data={ |
|
|
let data={ |
|
|
partNo:row.partNo, |
|
|
partNo:row.partNo, |
|
|
@ -608,6 +759,34 @@ |
|
|
this.searchRoutingWithPartNo(); |
|
|
this.searchRoutingWithPartNo(); |
|
|
this.modelFlag = true; |
|
|
this.modelFlag = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
editRoutingDetail(){ |
|
|
|
|
|
if(this.currentRow==null){ |
|
|
|
|
|
this.$alert("请选择工艺路线工序!", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
this. detailData={ |
|
|
|
|
|
itemNo:this.currentRow.itemNo, |
|
|
|
|
|
operationDesc:this.currentRow.operationDesc, |
|
|
|
|
|
workCenterNo:this.currentRow.workCenterNo, |
|
|
|
|
|
machSetupTime:this.currentRow.machSetupTime, |
|
|
|
|
|
machRunFactor:this.currentRow.machRunFactor, |
|
|
|
|
|
factorUnit:this.currentRow.factorUnit, |
|
|
|
|
|
jjgzUnitPrice:this.currentRow.jjgzUnitPrice, |
|
|
|
|
|
jjgzUnitFactor:this.currentRow.jjgzUnitFactor, |
|
|
|
|
|
efficiency:this.currentRow.efficiency, |
|
|
|
|
|
crewsize:this.currentRow.crewsize, |
|
|
|
|
|
remark:this.currentRow.remark, |
|
|
|
|
|
add:1, |
|
|
|
|
|
partNo:this.mainData.partNo, |
|
|
|
|
|
revNo:this.mainData.revNo, |
|
|
|
|
|
site:this.mainData.site, |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
this.detailmodelInputFlag=true; |
|
|
|
|
|
this.detailmodelFlag=true; |
|
|
|
|
|
}, |
|
|
searchRoutingWithPartNo() { |
|
|
searchRoutingWithPartNo() { |
|
|
let data={ |
|
|
let data={ |
|
|
partNo:this.searchPartNo |
|
|
partNo:this.searchPartNo |
|
|
|