|
|
|
@ -13,6 +13,8 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="mainData.site" readonly style="width: 130px"></el-input> |
|
|
|
<el-button @click="getPartDetail()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'物料信息'}}</el-button> |
|
|
|
<el-button @click="changeStatus()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'更改状态'}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
@ -30,6 +32,7 @@ |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'计量单位:'"> |
|
|
|
<el-input v-model="mainData.umid" readonly style="width: 130px"></el-input> |
|
|
|
<el-button @click="tongBuOrder()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'同步工艺路线到订单'}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
@ -310,6 +313,56 @@ |
|
|
|
<!-- <el-button type="primary" @click="routingModelFlag = 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="'物料编码:'"> |
|
|
|
<el-input v-model="partData.partNo" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'物料名称:'"> |
|
|
|
<el-input v-model="partData.partDescription" readonly style="width: 260px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
|
<el-input v-model="partData.site" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'新增日期:'"> |
|
|
|
<el-input v-model="partData.createDate" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'计量单位:'"> |
|
|
|
<el-input v-model="partData.umid" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'在用:'" style="margin-left: 130px"> |
|
|
|
<el-input v-model="partData.active" readonly style="width: 130px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'客户名称:'"> |
|
|
|
<el-input v-model="partData.configurationTemplateID" readonly style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'客户产品科号:'"> |
|
|
|
<el-input v-model="partData.remark" readonly style="width: 260px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="partFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="更改状态" :close-on-click-modal="false" v-drag :visible.sync="statusFlag" width="240px" > |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'状态:'" style="margin-left: 48px"> |
|
|
|
<el-select v-model="status" style="width: 120px"> |
|
|
|
<el-option label="试验" value="试验"></el-option> |
|
|
|
<el-option label="投产" value="投产"></el-option> |
|
|
|
<el-option label="停用" value="停用"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveStatus()">保存</el-button> |
|
|
|
<el-button type="primary" @click="statusFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -329,6 +382,10 @@ |
|
|
|
getToolDesc, |
|
|
|
saveRoutingTool, |
|
|
|
deleteRoutingTool, |
|
|
|
searchPartNoData, |
|
|
|
changeRoutingStatus, |
|
|
|
checkRoutingAndOrder, |
|
|
|
changeOrderRouting, |
|
|
|
}from "@/api/base/site.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
export default { |
|
|
|
@ -346,6 +403,7 @@ |
|
|
|
currentRow2:null, |
|
|
|
currentRow:null, |
|
|
|
tagNo:'', |
|
|
|
status:'', |
|
|
|
dataListLoading: false, |
|
|
|
searchPartNo:'', |
|
|
|
height:200, |
|
|
|
@ -363,12 +421,24 @@ |
|
|
|
defaultflag:'', |
|
|
|
repairFlag:'', |
|
|
|
}, |
|
|
|
partData:{ |
|
|
|
partNo:'', |
|
|
|
partDescription:'', |
|
|
|
site:'', |
|
|
|
createDate:'', |
|
|
|
umid:'', |
|
|
|
active:'', |
|
|
|
configurationTemplateID:'', |
|
|
|
modelFlag:'', |
|
|
|
}, |
|
|
|
activeName:'first', |
|
|
|
modelFlag:false, |
|
|
|
ToolmodelFlag:false, |
|
|
|
detailmodelFlag:false, |
|
|
|
detailmodelInputFlag:false, |
|
|
|
toolmodelInputFlag:false, |
|
|
|
partFlag:false, |
|
|
|
statusFlag:false, |
|
|
|
dataList:[], |
|
|
|
dataList2:[], |
|
|
|
dataList3:[], |
|
|
|
@ -1659,30 +1729,37 @@ |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
site: this.mainData.site, |
|
|
|
partNo:this.mainData.partNo, |
|
|
|
revNo:this.mainData.revNo, |
|
|
|
itemNo:this.currentRow.itemNo, |
|
|
|
resourceID:this.currentRow4.resourceID |
|
|
|
} |
|
|
|
deleteRoutingResource(inData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.currentRow4=null; |
|
|
|
let data2={ |
|
|
|
site:this.mainData.site, |
|
|
|
partNo:this.mainData.partNo, |
|
|
|
revNo:this.currentRow.revNo, |
|
|
|
itemNo:this.currentRow.itemNo |
|
|
|
} |
|
|
|
searchUsedResource(data2).then(({data}) => { |
|
|
|
this.resourceList2 = data.rows |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
this.$confirm(`是否删除此机台?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
let inData = { |
|
|
|
site: this.mainData.site, |
|
|
|
partNo: this.mainData.partNo, |
|
|
|
revNo: this.mainData.revNo, |
|
|
|
itemNo: this.currentRow.itemNo, |
|
|
|
resourceID: this.currentRow4.resourceID |
|
|
|
} |
|
|
|
deleteRoutingResource(inData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.currentRow4 = null; |
|
|
|
let data2 = { |
|
|
|
site: this.mainData.site, |
|
|
|
partNo: this.mainData.partNo, |
|
|
|
revNo: this.currentRow.revNo, |
|
|
|
itemNo: this.currentRow.itemNo |
|
|
|
} |
|
|
|
searchUsedResource(data2).then(({data}) => { |
|
|
|
this.resourceList2 = data.rows |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
jumpWorkCenter(){ |
|
|
|
@ -1707,6 +1784,144 @@ |
|
|
|
localStorage.setItem('toolInfo', JSON.stringify(inData)) |
|
|
|
this.$router.replace('knifemold-tool-info') |
|
|
|
}, |
|
|
|
getPartDetail(){ |
|
|
|
if(this.mainData.partNo==null||this.mainData.partNo==''){ |
|
|
|
this.$alert("请选择物料编码!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
user:this.$store.state.user.name, |
|
|
|
site:this.mainData.site, |
|
|
|
partNo:this.mainData.partNo |
|
|
|
} |
|
|
|
searchPartNoData(inData).then(({data}) => { |
|
|
|
if (data.rows.length==0){ |
|
|
|
this.$alert("该物料编码不存在", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.partData = data.rows[0]; |
|
|
|
this.partFlag=true; |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeStatus(){ |
|
|
|
if(this.mainData.partNo==null||this.mainData.partNo==''){ |
|
|
|
this.$alert("请选择物料编码!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.status=this.mainData.status; |
|
|
|
this.statusFlag=true; |
|
|
|
}, |
|
|
|
saveStatus(){ |
|
|
|
if(this.status==this.mainData.status){ |
|
|
|
this.$alert("该物料状态为"+this.status+",不需要修改!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
let inData={ |
|
|
|
partNo:this.mainData.partNo, |
|
|
|
site:this.mainData.site, |
|
|
|
revNo:this.mainData.revNo, |
|
|
|
status:this.status |
|
|
|
} |
|
|
|
changeRoutingStatus(inData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.statusFlag = false |
|
|
|
searchRoutingWithPartNo(inData).then(({data}) => { |
|
|
|
if(data.rows.length>0){ |
|
|
|
if(data.rows[0].repairFlag=='Y'){ |
|
|
|
data.rows[0].repairFlag=true; |
|
|
|
}else { |
|
|
|
data.rows[0].repairFlag=false; |
|
|
|
} |
|
|
|
if(data.rows[0].defaultflag=='Y'){ |
|
|
|
data.rows[0].defaultflag=true; |
|
|
|
}else { |
|
|
|
data.rows[0].defaultflag=false; |
|
|
|
} |
|
|
|
this.mainData = data.rows[0] |
|
|
|
let data1={ |
|
|
|
site: data.rows[0].site, |
|
|
|
partNo:data.rows[0].partNo, |
|
|
|
revNo:data.rows[0].revNo, |
|
|
|
} |
|
|
|
searchRoutingDetailData(data1).then(({data}) => { |
|
|
|
this.dataList2=data.rows; |
|
|
|
}) |
|
|
|
searchRoutingToolData(data1).then(({data}) => { |
|
|
|
this.dataList3=data.rows; |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
tongBuOrder(){ |
|
|
|
if(this.mainData.partNo==null||this.mainData.partNo==''){ |
|
|
|
this.$alert("请选择物料编码!", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$confirm(`确定要把该工艺路线同步到该产品的未开工生产订单上吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let inData={ |
|
|
|
partNo:this.mainData.partNo, |
|
|
|
site:this.mainData.site, |
|
|
|
revNo:this.mainData.revNo, |
|
|
|
} |
|
|
|
checkRoutingAndOrder(inData).then(({data}) => { |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.$confirm('有'+data.obj+'个生产订单将会被同步,是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
changeOrderRouting(inData).then(({data}) =>{ |
|
|
|
if (data && data.code == 200) { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
|
|
|
|
|