4 changed files with 595 additions and 9 deletions
-
11src/api/yieldReport/produce_order.js
-
15src/views/modules/shopOrder/shopOrder/shopOrder.vue
-
219src/views/modules/yieldReport/com_create_recheck.vue
-
359src/views/modules/yieldReport/produce_order.vue
@ -0,0 +1,219 @@ |
|||
<template> |
|||
<div class="customer-css"> |
|||
<el-dialog :title="titleCon" v-drag |
|||
:visible.sync="createRecheckShow" |
|||
width="300px" style="height: 680px;" class="customer-dialog"> |
|||
<el-container> |
|||
<el-container style="height: 160px;"> |
|||
<el-form :inline="true" label-position="top" label-width="80px"> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item> |
|||
<span slot="label" style="" >排产日期:</span> |
|||
<el-date-picker |
|||
type="date" |
|||
v-model="pageData.scheduleDate" style="width: 100px"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item :label="'排产数量:'"> |
|||
<el-input type="number" min="0" v-model="pageData.qtytoSchedule " style="width: 100px"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row style="margin-top: -10px;"> |
|||
<el-col :span="24" > |
|||
<el-form-item :label="'开始时间:'"> |
|||
<el-date-picker style="width: 170px;" |
|||
v-model="pageData.planStartTime " |
|||
type="datetime" |
|||
placeholder=""> |
|||
</el-date-picker> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<el-form-item :label="'预计时长:'"> |
|||
<el-input type="number" controls-position="right" min="0" v-model="pageData.timeRequired " style="width: 100px"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item> |
|||
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span> |
|||
<el-input v-model="pageData.resourceId " style="width: 100px"></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
</el-row> |
|||
</el-form> |
|||
</el-container> |
|||
<el-container style="margin-left: -0px; margin-top: 20px"> |
|||
<el-form :inline="true" label-position="top" label-width="80px"> |
|||
<!-- 不良代码 和日期 --> |
|||
<el-row style="margin-top: 15px;"> |
|||
<el-col> |
|||
<el-form-item style="margin-top: 15px;"> |
|||
<el-button @click="createRecheck" type="primary" |
|||
style="margin-left: -10px; margin-bottom: 5px;"> |
|||
创建</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row style="margin-top: 15px;"> |
|||
<el-col> |
|||
<el-form-item style="margin-top: 10px;"> |
|||
<el-button type="primary" @click="closeDialog" |
|||
style="margin-left: -10px; margin-bottom: 10px;"> |
|||
关闭</el-button> |
|||
|
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</el-container> |
|||
</el-container> |
|||
|
|||
</el-dialog> |
|||
<!--列表的组件--> |
|||
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/ |
|||
import { |
|||
|
|||
soscheduleNewReinspectjob |
|||
} |
|||
from '@/api/yieldReport/produce_order.js'; |
|||
export default { |
|||
data() { |
|||
return { |
|||
titleCon: '创建重检派工单', |
|||
createRecheckShow:false, |
|||
tagNo: '', |
|||
pageData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
orderNo: '', |
|||
itemNo: '', |
|||
workCenterNo: '', |
|||
resourceId: '', |
|||
scheduledDate: '', |
|||
planStartTime:'', |
|||
qtytoSchedule: '', |
|||
timeRequired: '' |
|||
}, |
|||
operatorData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
operatorId: '', |
|||
operatorName: '', |
|||
status: '', |
|||
seqNo: '', |
|||
showFlag: false |
|||
}, |
|||
buttonTags:{ |
|||
createRollFlag: true |
|||
}, |
|||
dataListLoading: false, |
|||
} |
|||
}, |
|||
/*组件*/ |
|||
components: { |
|||
Chooselist,/*列表的组件*/ |
|||
}, |
|||
methods: { |
|||
|
|||
//初始化组件的参数 |
|||
init(row) { |
|||
this.createRecheckShow= true |
|||
|
|||
//设置参数 |
|||
this.pageData.orderNo = row.orderNo; |
|||
this.pageData.itemNo = row.itemNo; |
|||
this.pageData.seqNo = row.seqNo; |
|||
this.pageData.rollNo = row.rollNo; |
|||
this.pageData.operatorId = row.operatorId; |
|||
this.pageData.scheduleDate = row.scheduledDate; |
|||
this.pageData.workCenterNo = row.workCenterNo; |
|||
//重置时间 |
|||
this.pageData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); |
|||
}, |
|||
|
|||
/*关闭modal*/ |
|||
closeDialog(){ |
|||
//刷新报工的页面 |
|||
this.$emit('refreshPageData'); |
|||
//关闭当前的页面 |
|||
this.createRecheckShow = false |
|||
Object.assign(this.$data.pageData, this.$options.data.call(this).pageData); |
|||
}, |
|||
|
|||
|
|||
/*创建重检*/ |
|||
createRecheck(){ |
|||
if (this.pageData.qtytoSchedule<=0){ |
|||
this.$message.warning('排产数量不能小于0') |
|||
return |
|||
} |
|||
if (this.pageData.timeRequired<=0){ |
|||
this.$message.warning('预计重检时长不能小于0') |
|||
return |
|||
} |
|||
soscheduleNewReinspectjob(this.pageData).then(({data}) => { |
|||
if(data.code == 0){ |
|||
this.$message.success(data.msg); |
|||
//关闭当前的组件 |
|||
this.closeDialog(); |
|||
}else{ |
|||
this.$message.warning(data.msg); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
/*列表方法的回调*/ |
|||
getBaseData(val){ |
|||
if (this.tagNo == 88){ |
|||
this.pageData.resourceId = val.ResourceID; |
|||
} |
|||
}, |
|||
|
|||
// 获取基础数据列表 |
|||
getBaseList(val){ |
|||
this.tagNo = val |
|||
this.$nextTick(() => { |
|||
let strVal = ""; |
|||
if (val == 88){ |
|||
strVal = this.pageData.resourceId; |
|||
} |
|||
this.$refs.baseList.init(val, strVal) |
|||
}) |
|||
}, |
|||
|
|||
}, |
|||
/*监听器*/ |
|||
watch:{ |
|||
pageData: { |
|||
deep: true, |
|||
handler: function (newV, oldV) { |
|||
this.pageData.resourceId = this.pageData.resourceId.toUpperCase(); |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
// this.factoryList() |
|||
// this.getLanguageList() |
|||
} |
|||
} |
|||
|
|||
</script> |
|||
|
|||
<style scoped > |
|||
|
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue