|
|
@ -72,6 +72,9 @@ |
|
|
<el-button @click="editRoutingDetail()" type="primary" :disabled="authEdit" |
|
|
<el-button @click="editRoutingDetail()" type="primary" :disabled="authEdit" |
|
|
style="margin-left: 2px;margin-top: 0px">{{ buttons.update }} |
|
|
style="margin-left: 2px;margin-top: 0px">{{ buttons.update }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
|
|
|
<el-button @click="copyItemRouting()" type="primary" :disabled="authEdit" |
|
|
|
|
|
style="margin-left: 2px;margin-top: 0px">{{ '复制' }} |
|
|
|
|
|
</el-button> |
|
|
<el-button @click="deleteRoutingDetail()" type="primary" :disabled="authDelete" |
|
|
<el-button @click="deleteRoutingDetail()" type="primary" :disabled="authDelete" |
|
|
style="margin-left: 2px;margin-top: 0px">{{ buttons.delete }} |
|
|
style="margin-left: 2px;margin-top: 0px">{{ buttons.delete }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
@ -155,7 +158,7 @@ |
|
|
<el-form-item :label="labels.partNo"> |
|
|
<el-form-item :label="labels.partNo"> |
|
|
<el-input v-model="searchPartNo" style="width: 130px"></el-input> |
|
|
<el-input v-model="searchPartNo" style="width: 130px"></el-input> |
|
|
<el-button @click="searchRoutingWithPartNo()" type="primary">{{ buttons.search }}</el-button> |
|
|
<el-button @click="searchRoutingWithPartNo()" type="primary">{{ buttons.search }}</el-button> |
|
|
<!-- <el-button @click="addRoutingHeaderModel()" :disabled="authAdd" type="primary">{{ buttons.add }}</el-button>--> |
|
|
|
|
|
|
|
|
<!-- <el-button @click="addRoutingHeaderModel()" :disabled="authAdd" type="primary">{{ buttons.add }}</el-button>--> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
@ -564,7 +567,7 @@ |
|
|
</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="saveRoutingHeaderData()">{{ buttons.save }}</el-button> |
|
|
<el-button type="primary" @click="saveRoutingHeaderData()">{{ buttons.save }}</el-button> |
|
|
<el-button type="primary" @click="routingHeaderModelFlag = false">{{buttons.close}}</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="routingHeaderModelFlag = false">{{ buttons.close }}</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
@ -593,7 +596,8 @@ import { |
|
|
saveCopyRouting, |
|
|
saveCopyRouting, |
|
|
setDefault, |
|
|
setDefault, |
|
|
saveRoutingHeaderData, |
|
|
saveRoutingHeaderData, |
|
|
deleteRoutingHeaderData |
|
|
|
|
|
|
|
|
deleteRoutingHeaderData, |
|
|
|
|
|
getPartNoRouteInMaxItemNo |
|
|
} from "@/api/base/site.js" |
|
|
} from "@/api/base/site.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import { |
|
|
import { |
|
|
@ -1635,6 +1639,62 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 复制 |
|
|
|
|
|
copyItemRouting() { |
|
|
|
|
|
if (!this.currentRow) { |
|
|
|
|
|
this.$message.warning('请选择需要复制的工序!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
// 获取 |
|
|
|
|
|
getPartNoRouteInMaxItemNo(this.currentRow).then(({data}) => { |
|
|
|
|
|
if (data.code == 0) { |
|
|
|
|
|
let maxItem = JSON.parse(JSON.stringify(this.currentRow)) |
|
|
|
|
|
maxItem.itemNo = Number(data.data) + 10 |
|
|
|
|
|
let dto = { |
|
|
|
|
|
itemNo: Number(data.data) + 10, |
|
|
|
|
|
add: 0, |
|
|
|
|
|
crewsize: maxItem.crewsize, |
|
|
|
|
|
efficiency: maxItem.efficiency, |
|
|
|
|
|
factorUnit: maxItem.factorUnit, |
|
|
|
|
|
jjgzUnitFactor: maxItem.jjgzUnitFactor, |
|
|
|
|
|
jjgzUnitPrice: maxItem.jjgzUnitPrice, |
|
|
|
|
|
machRunFactor: maxItem.machRunFactor, |
|
|
|
|
|
machSetupTime: maxItem.machSetupTime, |
|
|
|
|
|
operationDesc: maxItem.operationDesc, |
|
|
|
|
|
partNo: maxItem.partNo, |
|
|
|
|
|
remark: maxItem.remark, |
|
|
|
|
|
revNo: maxItem.revNo, |
|
|
|
|
|
site: maxItem.site, |
|
|
|
|
|
user:this.$store.state.user.name, |
|
|
|
|
|
workCenterNo: maxItem.workCenterNo, |
|
|
|
|
|
} |
|
|
|
|
|
// 保存信息 |
|
|
|
|
|
saveRoutingDetailData(dto).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}) => { |
|
|
|
|
|
if (data.total == 0) { |
|
|
|
|
|
this.dataList2 = [] |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dataList2 = data.rows; |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(this.labels.doYes) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, this.labels.error, { |
|
|
|
|
|
confirmButtonText: this.labels.true |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
editRoutingHeaderModel(row) { |
|
|
editRoutingHeaderModel(row) { |
|
|
this.routingHeaderData = { |
|
|
this.routingHeaderData = { |
|
|
partNo: row.partNo, |
|
|
partNo: row.partNo, |
|
|
@ -1862,11 +1922,11 @@ export default { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.detailData.machRunFactor<=0) { |
|
|
|
|
|
|
|
|
if (this.detailData.machRunFactor <= 0) { |
|
|
this.$message.warning('单位产出量不能小于0!') |
|
|
this.$message.warning('单位产出量不能小于0!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.detailData.crewsize<1) { |
|
|
|
|
|
|
|
|
if (this.detailData.crewsize < 1) { |
|
|
this.$message.warning('操作工人数不能少于1!') |
|
|
this.$message.warning('操作工人数不能少于1!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -1999,7 +2059,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
getSearchModal() { |
|
|
getSearchModal() { |
|
|
this.searchPartNo = ''; |
|
|
this.searchPartNo = ''; |
|
|
// this.searchRoutingWithPartNo(); |
|
|
|
|
|
|
|
|
// this.searchRoutingWithPartNo(); |
|
|
this.modelFlag = true; |
|
|
this.modelFlag = true; |
|
|
}, |
|
|
}, |
|
|
editRoutingDetail() { |
|
|
editRoutingDetail() { |
|
|
|