|
|
@ -13,6 +13,8 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
<el-form-item :label="'工厂编号:'"> |
|
|
<el-input v-model="mainData.site" readonly style="width: 130px"></el-input> |
|
|
<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-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<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;"> |
|
|
@ -30,6 +32,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'计量单位:'"> |
|
|
<el-form-item :label="'计量单位:'"> |
|
|
<el-input v-model="mainData.umid" readonly style="width: 130px"></el-input> |
|
|
<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-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<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;"> |
|
|
@ -79,6 +82,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 +200,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> |
|
|
@ -300,6 +313,56 @@ |
|
|
<!-- <el-button type="primary" @click="routingModelFlag = false">关闭</el-button>--> |
|
|
<!-- <el-button type="primary" @click="routingModelFlag = false">关闭</el-button>--> |
|
|
<!-- </el-footer>--> |
|
|
<!-- </el-footer>--> |
|
|
</el-dialog> |
|
|
</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> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -315,6 +378,14 @@ |
|
|
searchAllResource, |
|
|
searchAllResource, |
|
|
addRoutingResource, |
|
|
addRoutingResource, |
|
|
deleteRoutingResource, |
|
|
deleteRoutingResource, |
|
|
|
|
|
getItemSelect, |
|
|
|
|
|
getToolDesc, |
|
|
|
|
|
saveRoutingTool, |
|
|
|
|
|
deleteRoutingTool, |
|
|
|
|
|
searchPartNoData, |
|
|
|
|
|
changeRoutingStatus, |
|
|
|
|
|
checkRoutingAndOrder, |
|
|
|
|
|
changeOrderRouting, |
|
|
}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 +395,7 @@ |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
selectList:[], |
|
|
resourceList1:[], |
|
|
resourceList1:[], |
|
|
resourceList2:[], |
|
|
resourceList2:[], |
|
|
currentRow4:null, |
|
|
currentRow4:null, |
|
|
@ -331,6 +403,7 @@ |
|
|
currentRow2:null, |
|
|
currentRow2:null, |
|
|
currentRow:null, |
|
|
currentRow:null, |
|
|
tagNo:'', |
|
|
tagNo:'', |
|
|
|
|
|
status:'', |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
searchPartNo:'', |
|
|
searchPartNo:'', |
|
|
height:200, |
|
|
height:200, |
|
|
@ -348,11 +421,24 @@ |
|
|
defaultflag:'', |
|
|
defaultflag:'', |
|
|
repairFlag:'', |
|
|
repairFlag:'', |
|
|
}, |
|
|
}, |
|
|
|
|
|
partData:{ |
|
|
|
|
|
partNo:'', |
|
|
|
|
|
partDescription:'', |
|
|
|
|
|
site:'', |
|
|
|
|
|
createDate:'', |
|
|
|
|
|
umid:'', |
|
|
|
|
|
active:'', |
|
|
|
|
|
configurationTemplateID:'', |
|
|
|
|
|
modelFlag:'', |
|
|
|
|
|
}, |
|
|
activeName:'first', |
|
|
activeName:'first', |
|
|
modelFlag:false, |
|
|
modelFlag:false, |
|
|
ToolmodelFlag:false, |
|
|
ToolmodelFlag:false, |
|
|
detailmodelFlag:false, |
|
|
detailmodelFlag:false, |
|
|
detailmodelInputFlag:false, |
|
|
detailmodelInputFlag:false, |
|
|
|
|
|
toolmodelInputFlag:false, |
|
|
|
|
|
partFlag:false, |
|
|
|
|
|
statusFlag:false, |
|
|
dataList:[], |
|
|
dataList:[], |
|
|
dataList2:[], |
|
|
dataList2:[], |
|
|
dataList3:[], |
|
|
dataList3:[], |
|
|
@ -361,12 +447,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 +1237,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 +1250,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) |
|
|
}) |
|
|
}) |
|
|
@ -1453,7 +1542,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){ |
|
|
@ -1462,6 +1729,12 @@ |
|
|
}) |
|
|
}) |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
this.$confirm(`是否删除此机台?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
|
|
|
|
|
|
}).then(() => { |
|
|
let inData = { |
|
|
let inData = { |
|
|
site: this.mainData.site, |
|
|
site: this.mainData.site, |
|
|
partNo: this.mainData.partNo, |
|
|
partNo: this.mainData.partNo, |
|
|
@ -1487,6 +1760,7 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
jumpWorkCenter(){ |
|
|
jumpWorkCenter(){ |
|
|
if(this.currentRow==null){ |
|
|
if(this.currentRow==null){ |
|
|
@ -1499,6 +1773,156 @@ |
|
|
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') |
|
|
|
|
|
}, |
|
|
|
|
|
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, |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
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() { |
|
|
created() { |
|
|
|
|
|
|
|
|
|