Browse Source

2024/1/15 派工单对接模具

master
zelian_wu 2 years ago
parent
commit
51655132bb
  1. 3
      src/api/production/generateReport.js
  2. 63
      src/views/modules/production/generateReport.vue
  3. 58
      src/views/modules/production/soscheduleRouting.vue
  4. 1
      src/views/modules/sys/log.vue

3
src/api/production/generateReport.js

@ -54,3 +54,6 @@ export const printDefectCard=data => createAPI(`dailyPlan/printDefectCard`, 'pos
export const getOrderView=data => createAPI(`dailyPlan/getOrderView`, 'post', data)
export const selectSFDCToolHist = data =>createAPI(`dailyPlan/selectToolHist`,'post',data)
export const selectToolingHist = data =>createAPI(`dailyPlan/selectToolingHist`,'post',data)

63
src/views/modules/production/generateReport.vue

@ -384,7 +384,7 @@
<el-button type="primary" @click="continueModalFlag = false">取消</el-button>
</el-footer>
</el-dialog>
<el-dialog class="big" @close="closeDialog" :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="报告信息" :visible.sync="setUp.reviewFlag" width="615px">
<el-dialog class="big" @close="closeDialog" top="10vh" :close-on-click-modal="false" :close-on-press-escape="false" v-drag title="报告信息" :visible.sync="setUp.reviewFlag" width="615px">
<el-form :inline="true" label-position="top">
<el-form-item label="派工单号">
<el-input style="width: 130px;" :disabled="setUp.disabled" onkeyup="this.value = this.value.toUpperCase()" v-model="saveHeaderData.seqNo"></el-input>
@ -461,7 +461,7 @@
<el-form-item label="不合格/缺失数量" >
<el-input type="number" class="input_left" style="width: 178px;" v-model="saveHeaderData.qtyUnApprove" @blur="qtyReportedBlur()"></el-input>
</el-form-item>
<el-form-item label="生产模数" >
<el-form-item label="生产模数" v-if="false">
<el-input type="number" style="width: 178px;" v-model="moQty" @blur="moQtyBlur()"></el-input>
</el-form-item>
@ -530,6 +530,18 @@
<el-input style="width: 560px;" v-model="saveHeaderData.remark"></el-input>
</el-form-item>
</el-form>
<el-table
height="150"
:data="toolHistList"
border>
<el-table-column label="工具实例" prop="toolInstanceID"></el-table-column>
<el-table-column label="工具名称" prop="toolDescription"></el-table-column>
<el-table-column label="生产模数">
<template slot-scope="{row,$index}">
<el-input type="number" v-model="row.finishQty"></el-input>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="SOPModal()" type="primary">查看SOP</el-button>
<el-button @click="setUp.reviewFlag = false">取消</el-button>
@ -589,8 +601,8 @@
printTransNoLabel,
} from "@/views/modules/print/print_transNo_label.js"
import {
getSOScheduleRoutingData
, saveGenerateReportForSchedule,
getSOScheduleRoutingData,
saveGenerateReportForSchedule,
searchReportedQty,
searchSeqNo,
startSeqNo,
@ -598,6 +610,7 @@
continueWork,
getTvList,
getBadCodeList,
selectSFDCToolHist
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
import {
@ -614,6 +627,7 @@
},
data () {
return {
toolHistList:[],//
cavity:'',
setUp: {
reviewFlag: false,
@ -860,6 +874,18 @@
if(this.saveHeaderData.acceptQty==null||this.saveHeaderData.acceptQty==''){
this.saveHeaderData.acceptQty=0
}
//
if (this.toolHistList.length > 0){
if (!this.toolHistList.some(item => item.finishQty && item.finishQty !== 0)) {
this.$alert('至少填写一条工具的生产模数!', '错误信息', {
confirmButtonText: '确定'
})
return
}
this.saveHeaderData.toolingHistDataList = this.toolHistList
this.saveHeaderData.createBy = this.$store.state.user.name
}
this.setUp.saveButton=true;
saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => {
this.setUp.saveButton = false
@ -943,6 +969,7 @@
initReportModal (row) {
this.scanSeqNo=row.seqNo
this.searchSeqNo()
this.selectSFDCToolHist(row)
},
closeDialog () {
Object.assign(this.$data.saveHeaderData, this.$options.data.call(this).saveHeaderData)
@ -952,6 +979,28 @@
this.tableData = data.rows
})
},
selectSFDCToolHist(row){
let params = {
site:row.site,
orderNo:row.orderNo,
itemNo:row.itemNo,
seqNo:row.seqNo,
finishFlag:"N"
}
selectSFDCToolHist(params).then(({data})=>{
if (data && data.code === 0){
this.toolHistList = data.rows
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch((error)=>{
this.$alert(error, '错误', {
confirmButtonText: '确定'
})
})
},
createExportData () {
return this.tableData
},
@ -1163,7 +1212,7 @@
this.liLunQty ='';
this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00')
this.selectSFDCToolHist(this.saveHeaderData)
searchReportedQty(this.saveHeaderData).then(({data}) => {
if(data.code===0) {
this.cavity= data.row.cavity
@ -1426,4 +1475,8 @@
font-size: 17px;
font-weight: bold;
}
.big /deep/ .el-table .cell{
height: auto !important;
}
</style>

58
src/views/modules/production/soscheduleRouting.vue

@ -102,16 +102,16 @@
border
style="width: 100%">
<el-table-column
prop=""
header-align="center"
align="center"
min-width="250"
align="left"
min-width="320"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="toPrint(scope.row)">打印</a>
<a type="text" size="small" @click="printPartCard(scope.row)">物料标识卡</a>
<a type="text" v-if="scope.row.scheduleType=='日计划派工单'" size="small" @click="printProductCard(scope.row)">生产指令单</a>
<a v-if="scope.row.circulationSeqNo==null" type="text" size="small" @click="cancelJob(scope.row)">取消派工单</a>
<a type="text" size="small" @click="toolingHist(scope.row)">模具使用记录</a>
</template>
</el-table-column>
<el-table-column
@ -318,6 +318,22 @@
label="流转数量">
</el-table-column>
</el-table>
<!--模具使用记录-->
<el-dialog :close-on-click-modal="false" title="模具使用记录" :visible.sync="toolHistDialog" width="60%">
<el-table
height="500"
:data="toolHistList"
border>
<el-table-column label="序号" prop="histSeqNo"></el-table-column>
<el-table-column label="工具实例" prop="toolInstanceID"></el-table-column>
<el-table-column label="工具名称" prop="toolDescription"></el-table-column>
<el-table-column label="生产数量" prop="finishQty"></el-table-column>
<el-table-column label="报告日期" prop="reportDate"></el-table-column>
<el-table-column label="报告人" prop="reportedby"></el-table-column>
<el-table-column label="开始使用时间" prop="startDate"></el-table-column>
<el-table-column label="结束使用时间" prop="finishDate"></el-table-column>
</el-table>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -325,9 +341,11 @@
<script>
import {
getSOScheduleRoutingData
, cancelJob,
getPartCardPrintData,getLiuHuaPrintData
getSOScheduleRoutingData,
cancelJob,
getPartCardPrintData,
getLiuHuaPrintData,
selectSFDCToolHist
} from '@/api/production/generateReport.js'
import Chooselist from '@/views/modules/common/Chooselist'
import {
@ -346,6 +364,8 @@
},
data () {
return {
toolHistList:[],//使
toolHistDialog:false,
setUp: {
reviewFlag: false,
saveButton: false,
@ -590,6 +610,32 @@
}
})
},
toolingHist(row){
let params = {
site:row.site,
orderNo:row.orderNo,
itemNo:row.itemNo,
seqNo:row.seqNo,
finishFlag:"Y"
}
this.selectSFDCToolHist(params)
},
selectSFDCToolHist(params){
selectSFDCToolHist(params).then(({data})=>{
if (data && data.code === 0){
this.toolHistList = data.rows
this.toolHistDialog = true;
}else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
}).catch((error)=>{
this.$alert(error, '错误', {
confirmButtonText: '确定'
})
})
}
},
created () {
}

1
src/views/modules/sys/log.vue

@ -22,6 +22,7 @@
width="80"
label="ID">
</el-table-column>
<el-table-column
prop="username"
header-align="center"

Loading…
Cancel
Save