ruanqi 3 years ago
parent
commit
9b87ec1cb3
  1. 7
      src/api/production/schedule.js
  2. 657
      src/views/modules/schedule/sOScheduleRoutingChange.vue
  3. 37
      src/views/modules/schedule/schedule.vue
  4. 422
      src/views/modules/schedule/searchSOScheduleRouting.vue

7
src/api/production/schedule.js

@ -9,3 +9,10 @@ export const getWorkCenterOperatorList = data => createAPI(`/schedule/getWorkCen
export const getAvailableResourceList = data => createAPI(`/schedule/getAvailableResourceList`,'post',data)
export const scheduleForShopOrder = data => createAPI(`/schedule/scheduleForShopOrder`,'post',data)
export const schedulesForShopOrder = data => createAPI(`/schedule/schedulesForShopOrder`,'post',data)
export const getSOScheduleRoutingData = data => createAPI(`/schedule/getSOScheduleRoutingData`,'post',data)
export const closeSchedule = data => createAPI(`/schedule/closeSchedule`,'post',data)
export const openSchedule = data => createAPI(`/schedule/openSchedule`,'post',data)
export const cancelSchedule = data => createAPI(`/schedule/cancelSchedule`,'post',data)
export const circulationSchedule = data => createAPI(`/schedule/circulationSchedule`,'post',data)

657
src/views/modules/schedule/sOScheduleRoutingChange.vue

@ -0,0 +1,657 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'生产订单号'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心编码'">
<el-input v-model="searchData.sWorkCenterNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工序编号'">
<el-input v-model="searchData.itemNo" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item :label="'派工日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'至: '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
<el-input v-model="searchData.sResourceID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'班次'">
<el-select v-model="searchData.sShiftNo" 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-form-item :label="'是否关闭'">
<el-select v-model="searchData.closedFlag" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop=""
header-align="center"
align="center"
width="140"
label="操作">
<template slot-scope="scope" class="foo_container">
<a v-if="scope.row.closedFlag==='Y'&&scope.row.qtyRequired>scope.row.qtyReported&&scope.row.circulationSeqNo===null" type="text" size="small" @click="openSchedule(scope.row)">开启</a>
<a v-if="scope.row.closedFlag==='N'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="closeSchedule(scope.row)">关闭</a>
<a v-if="scope.row.circulationSeqNo===null" type="text" size="small" @click="cancelAsk(scope.row)">取消</a>
<a v-if="scope.row.circulationSeqNo===null" type="text" size="small" @click="circulationModel(scope.row)">流转</a>
<a v-if="scope.row.circulationSeqNo!=null" type="text" size="small" >派工单已流转</a>
</template>
</el-table-column>
<el-table-column
prop="seqNo"
header-align="center"
align="right"
min-width="70"
label="派工单号">
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
min-width="100"
label="生产订单号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="left"
min-width="70"
label="工序号">
</el-table-column>
<el-table-column
prop="itemDesc"
header-align="center"
align="left"
min-width="160"
label="工序名称">
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
min-width="80"
label="派工数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
min-width="80"
label="报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
min-width="80"
label="合格数量">
</el-table-column>
<el-table-column
prop="closedFlag"
header-align="center"
align="left"
min-width="80"
label="是否关闭">
</el-table-column>
<el-table-column
prop="sScheduledDate"
header-align="center"
align="left"
min-width="80"
label="派工日期">
</el-table-column>
<el-table-column
prop="operatorName"
header-align="center"
align="left"
min-width="80"
label="操作员姓名">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="80"
label="产品编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="200"
label="产品名称">
</el-table-column>
<el-table-column
prop="sResourceID"
header-align="center"
align="left"
min-width="70"
label="机台ID">
</el-table-column>
<el-table-column
prop="sShiftNo"
header-align="center"
align="left"
min-width="70"
label="班次">
</el-table-column>
<el-table-column
prop="sWorkCenterNo"
header-align="center"
align="left"
min-width="100"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="circulationSeqNo"
header-align="center"
align="right"
min-width="90"
label="流转派工单号">
</el-table-column>
<el-table-column
prop="circulationQty"
header-align="center"
align="right"
min-width="80"
label="流转数量">
</el-table-column>
</el-table>
<el-dialog title="流转派工单" :close-on-click-modal="false" v-drag :visible.sync="circulationFlag" width="600px">
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: -5px;">
<el-form-item :label="'派工单号:'">
<el-input v-model="circulationData.seqNo" ref="start" type="number" style="width: 130px;" readonly></el-input>
</el-form-item>
<el-form-item :label="'派工日期:'">
<!-- <el-input v-model="circulationData.sScheduledDate" ref="start" type="number" style="width: 130px;" readonly></el-input>-->
<el-date-picker
style="width: 130px"
v-model="circulationData.sScheduledDate"
type="date"
value-format="yyyy-MM-dd"
readonly
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'未完成数量:'">
<el-input v-model="circulationData.circulationQty" ref="start" type="number" style="width: 130px;" readonly></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: 5px;">
<el-form-item :label="'流转日期:'">
<el-date-picker
style="width: 130px"
v-model="circulationData.circulationDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="派工机台:">
<el-select v-model="circulationData.sResourceID" style="width: 130px"
placeholder="请选择">
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.resourceDesc"
:value="item.resourceID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="派工班次:">
<el-select v-model="circulationData.sShiftNo" style="width: 130px"
placeholder="请选择">
<el-option v-for="item in shiftList " :key="index" :label="item.shiftDesc"
:value="item.shiftNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="派工人员:">
<el-select v-model="circulationData.operatorId" style="width: 130px"
placeholder="请选择">
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorID">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="doCirculation()">流转</el-button>
<el-button type="primary" @click="circulationFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getSOScheduleRoutingData,
closeSchedule,
openSchedule,
cancelSchedule,
getAvailableResourceList,
getWorkCenterOperatorList,
circulationSchedule,
} from '@/api/production/schedule.js'
import {
getShiftData,
} from "@/api/base/site.js"
import Chooselist from '@/views/modules/common/Chooselist'
// import {
// printSeqNoLabel,
// } from "@/views/modules/production/print_seqNo_label.js"
export default {
name: 'sOScheduleRoutingChange',
components: {
Chooselist
},
data () {
return {
setUp: {
reviewFlag: false,
saveButton: false,
readonlyFlag: false,
disabled: false
},
saveHeaderData: {
site: '',
seqNo: '',
itemNo: '',
partNo: '',
partDescription: '',
operationDesc: '',
workCenterNo: '',
workCenterDesc: '',
operatorId: '',
operatorName: '',
planStartTime: '',
planFinishTime: '',
qtyReported: 0,
qtyApprove: 0,
qtyRework: 0,
operatorId2: '',
operatorIdName2: '',
scrapReason: '',
preparationTime: 0,
manufacturingTime: 0,
cleaningTime: 0,
shutdownReason: '',
remark: '',
userId:'',
},
sopFlag:false,
site: this.$store.state.user.site,
operatorType: 0,
// start
exportData: [],
exportDataStandard: {
'派工单号': 'seqNo',
'关联单号': 'orderNo',
'工序号': 'itemNo',
'工序名称': 'itemDesc',
'派工数量': 'qtyRequired',
'报工数量': 'qtyReported',
'合格数量': 'qtyApprove',
'派工日期': 'sScheduledDate',
'操作员姓名': 'operatorName',
'产品编码': 'partNo',
'产品名称': 'partDesc',
'机台ID': 'sResourceID',
'班次': 'sShiftNo',
'加工中心': 'sWorkCenterNo',
},
exportName: '派工单列表' + this.getStrDate(),
exportHeader: ['派工单列表'],
exportFooter: [],
exportDefaultValue: '这一行这一列没有数据',
// end
height: 200,
tableData: [],
date1: '',
searchData: {
orderNo: '',
sWorkCenterNo: '',
partNo: '',
site: this.$store.state.user.site,
itemNo:'',
startDate:'',
endDate:'',
operatorName:'',
sResourceID:'',
sShiftNo:'',
closedFlag:'',
},
photoUrl:'',
sopData:{
site:'',
partNo:'',
},
partDescription:'',
fileTitle:'',
fileName:'',
num:1,
currentData:'',
photoDatas:[],
uploadImg:[],
showviewer: false,
url: '',
height2:600,
circulationFlag:false,
availableResourceList:[],
operatorIdList:[],
circulationData:{
site:'',
seqNo:'',
sScheduledDate:'',
circulationQty:'',
circulationDate:'',
sResourceID:'',
sShiftNo:'',
operatorId:'',
},
shiftList:[],
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
this.height2 = window.innerHeight -100
})
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 24) {
strVal = this.searchData.sWorkCenterNo
}
if (val === 5) {
strVal = this.searchData.partNo
}
if (val === 26) {
strVal = this.searchData.operatorName
}
if (val === 88) {
strVal = this.searchData.sResourceID
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 24) {
this.searchData.sWorkCenterNo = val.WorkCenterNo
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
}
if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID
}
},
search () {
getSOScheduleRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows
})
},
createExportData () {
return this.tableData
},
startDownload () {
// this.exportData = this.dataList
},
finishDownload () {
},
getStrDate () {
let dd = new Date()
let Y = dd.getFullYear()
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 100
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 100
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
return Y + M + D + H + MM + S
},
closeSchedule(row){
this.$confirm(`确定关闭此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
closeSchedule(row).then(({data}) => {
if (data && data.code === 0) {
row.closedFlag='Y'
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
openSchedule(row){
this.$confirm(`确定开启此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
openSchedule(row).then(({data}) => {
if (data && data.code === 0) {
row.closedFlag='N'
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
cancelAsk(row){
this.$confirm(`确定开启此派工单`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelSchedule(row).then(({data}) => {
if (data && data.code === 0) {
this.search();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
circulationModel(row){
this.getAvailableResourceList(row)
this.getWorkCenterOperatorList(row);
let data={
site:this.$store.state.user.site
}
getShiftData(data).then(({data}) => {
this.shiftList = data.rows
})
this.circulationData.seqNo=row.seqNo;
this.circulationData.sScheduledDate=row.sScheduledDate;
this.circulationData.circulationQty=row.qtyRequired-row.qtyApprove;
this.circulationData.site=row.site;
this.circulationData.circulationDate='';
this.circulationData.sResourceID='';
this.circulationData.sShiftNo='';
this.circulationData.operatorId='';
this.circulationFlag=true;
},
doCirculation(){
if(this.circulationData.circulationDate==''||this.circulationData.circulationDate==null){
this.$alert('请选择流转日期!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.circulationData.sResourceID==''||this.circulationData.sResourceID==null){
this.$alert('请选择机台!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.circulationData.sShiftNo==''||this.circulationData.sShiftNo==null){
this.$alert('请选择班次!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.circulationData.operatorId==''||this.circulationData.operatorId==null){
this.$alert('请选择操作员!', '错误', {
confirmButtonText: '确定'
})
return false;
}
circulationSchedule(this.circulationData).then(({data}) => {
if (data && data.code === 0) {
this.circulationFlag=false;
this.search ();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
getWorkCenterOperatorList(row){
let inData={
site:row.site,
workCenterNo:row.sWorkCenterNo,
}
getWorkCenterOperatorList(inData).then(({data}) => {
this.operatorIdList = data.rows;
})
},
getAvailableResourceList(row){
let inData={
site:row.site,
workCenterNo:row.sWorkCenterNo,
}
getAvailableResourceList(inData).then(({data}) => {
this.availableResourceList = data.rows;
})
},
},
created () {
}
}
</script>
<style scoped>
.input_left{
text-align: left;
}
.input_reight{
text-align: right;
}
/deep/ input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type='number'] {
-moz-appearance: textfield !important;
}
</style>

37
src/views/modules/schedule/schedule.vue

@ -131,7 +131,7 @@
prop="operationDesc"
header-align="center"
align="left"
width="160"
min-width="160"
label="工序名称">
</el-table-column>
<el-table-column
@ -145,7 +145,7 @@
prop="partDesc"
header-align="center"
align="left"
width="200"
min-width="200"
label="物料名称">
</el-table-column>
<el-table-column
@ -249,8 +249,9 @@
<el-form-item label="派工班次:">
<el-select v-model="schedulingModalData.shiftNo" style="width: 120px"
placeholder="请选择">
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
<el-option v-for="item in shiftList " :key="index" :label="item.shiftDesc"
:value="item.shiftNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="派工人员:">
@ -329,8 +330,9 @@
<template slot-scope="scope">
<el-select v-model="scope.row.shiftNo" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
<el-option v-for="item in shiftList " :key="index" :label="item.shiftDesc"
:value="item.shiftNo">
</el-option>
</el-select>
</template>
</el-table-column>
@ -393,8 +395,9 @@
<el-form-item label="派工班次:">
<el-select v-model="schedulesModalData.shiftNo" style="width: 120px"
placeholder="请选择">
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
<el-option v-for="item in shiftList " :key="index" :label="item.shiftDesc"
:value="item.shiftNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="派工人员:">
@ -419,7 +422,7 @@
prop="orderNo"
header-align="center"
align="left"
width="120"
min-width="120"
label="生产订单号">
</el-table-column>
<el-table-column
@ -433,7 +436,7 @@
prop="operationDesc"
header-align="center"
align="left"
width="160"
min-width="160"
label="工序名称">
</el-table-column>
<el-table-column
@ -461,7 +464,7 @@
prop="partDesc"
header-align="center"
align="left"
width="200"
min-width="200"
label="物料名称">
</el-table-column>
<el-table-column
@ -496,7 +499,9 @@
scheduleForShopOrder,
schedulesForShopOrder,
} from "@/api/production/schedule.js"
import {
getShiftData,
} from "@/api/base/site.js"
export default {
name: 'schedule',
components: {
@ -573,6 +578,7 @@
schedulesModalFlag:false,
schedulesModalTableData:[],
tagNo:'',
shiftList:[],
}
},
mounted() {
@ -658,7 +664,12 @@
this.schedulingModalTableData = []
this.getAvailableResourceList(row)
this.getWorkCenterOperatorList(row);
let data={
site:this.$store.state.user.site
}
getShiftData(data).then(({data}) => {
this.shiftList = data.rows
})
this.scheduledModalFlag = true
},
addPlans () {

422
src/views/modules/schedule/searchSOScheduleRouting.vue

@ -0,0 +1,422 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'生产订单号'">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心编码'">
<el-input v-model="searchData.sWorkCenterNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码</a></span>
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工序编号'">
<el-input v-model="searchData.itemNo" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item :label="'派工日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'至: '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">操作员姓名</a></span>
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item >
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台ID</a></span>
<el-input v-model="searchData.sResourceID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'班次'">
<el-select v-model="searchData.sShiftNo" 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-form-item :label="'是否关闭'">
<el-select v-model="searchData.closedFlag" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop=""
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="toPrint(scope.row)">打印</a>
</template>
</el-table-column>
<el-table-column
prop="seqNo"
header-align="center"
align="left"
min-width="70"
label="派工单号">
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
min-width="100"
label="生产订单号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="left"
min-width="70"
label="工序号">
</el-table-column>
<el-table-column
prop="itemDesc"
header-align="center"
align="left"
min-width="160"
label="工序名称">
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
min-width="80"
label="派工数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
min-width="80"
label="报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
min-width="80"
label="合格数量">
</el-table-column>
<el-table-column
prop="closedFlag"
header-align="center"
align="left"
min-width="80"
label="是否关闭">
</el-table-column>
<el-table-column
prop="sScheduledDate"
header-align="center"
align="left"
min-width="80"
label="派工日期">
</el-table-column>
<el-table-column
prop="operatorName"
header-align="center"
align="left"
min-width="80"
label="操作员姓名">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="80"
label="产品编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="200"
label="产品名称">
</el-table-column>
<el-table-column
prop="sResourceID"
header-align="center"
align="left"
min-width="70"
label="机台ID">
</el-table-column>
<el-table-column
prop="sShiftNo"
header-align="center"
align="left"
min-width="70"
label="班次">
</el-table-column>
<el-table-column
prop="sWorkCenterNo"
header-align="center"
align="left"
min-width="100"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="circulationSeqNo"
header-align="center"
align="right"
min-width="90"
label="流转派工单号">
</el-table-column>
<el-table-column
prop="circulationQty"
header-align="center"
align="right"
min-width="80"
label="流转数量">
</el-table-column>
</el-table>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getSOScheduleRoutingData,
} from '@/api/production/schedule.js'
import Chooselist from '@/views/modules/common/Chooselist'
// import {
// printSeqNoLabel,
// } from "@/views/modules/production/print_seqNo_label.js"
export default {
name: 'searchSOScheduleRouting',
components: {
Chooselist
},
data () {
return {
setUp: {
reviewFlag: false,
saveButton: false,
readonlyFlag: false,
disabled: false
},
saveHeaderData: {
site: '',
seqNo: '',
itemNo: '',
partNo: '',
partDescription: '',
operationDesc: '',
workCenterNo: '',
workCenterDesc: '',
operatorId: '',
operatorName: '',
planStartTime: '',
planFinishTime: '',
qtyReported: 0,
qtyApprove: 0,
qtyRework: 0,
operatorId2: '',
operatorIdName2: '',
scrapReason: '',
preparationTime: 0,
manufacturingTime: 0,
cleaningTime: 0,
shutdownReason: '',
remark: '',
userId:'',
},
sopFlag:false,
site: this.$store.state.user.site,
operatorType: 0,
// start
exportData: [],
exportDataStandard: {
'派工单号': 'seqNo',
'关联单号': 'orderNo',
'工序号': 'itemNo',
'工序名称': 'itemDesc',
'派工数量': 'qtyRequired',
'报工数量': 'qtyReported',
'合格数量': 'qtyApprove',
'派工日期': 'sScheduledDate',
'操作员姓名': 'operatorName',
'产品编码': 'partNo',
'产品名称': 'partDesc',
'机台ID': 'sResourceID',
'班次': 'sShiftNo',
'加工中心': 'sWorkCenterNo',
},
exportName: '派工单列表' + this.getStrDate(),
exportHeader: ['派工单列表'],
exportFooter: [],
exportDefaultValue: '这一行这一列没有数据',
// end
height: 200,
tableData: [],
date1: '',
searchData: {
orderNo: '',
sWorkCenterNo: '',
partNo: '',
site: this.$store.state.user.site,
itemNo:'',
startDate:'',
endDate:'',
operatorName:'',
sResourceID:'',
sShiftNo:'',
closedFlag:'',
},
photoUrl:'',
sopData:{
site:'',
partNo:'',
},
partDescription:'',
fileTitle:'',
fileName:'',
num:1,
currentData:'',
photoDatas:[],
uploadImg:[],
showviewer: false,
url: '',
height2:600,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
this.height2 = window.innerHeight -100
})
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 24) {
strVal = this.searchData.sWorkCenterNo
}
if (val === 5) {
strVal = this.searchData.partNo
}
if (val === 26) {
strVal = this.searchData.operatorName
}
if (val === 88) {
strVal = this.searchData.sResourceID
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 24) {
this.searchData.sWorkCenterNo = val.WorkCenterNo
} else if (this.tagNo === 5) {
this.searchData.partNo = val.PartNo
}
if (this.tagNo === 26) {
this.searchData.operatorName = val.OperatorName
}
if (this.tagNo === 88) {
this.searchData.sResourceID = val.ResourceID
}
},
search () {
getSOScheduleRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows
})
},
createExportData () {
return this.tableData
},
startDownload () {
// this.exportData = this.dataList
},
finishDownload () {
},
getStrDate () {
let dd = new Date()
let Y = dd.getFullYear()
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 100
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 100
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
return Y + M + D + H + MM + S
},
toPrint(row){
let array=[];
let data={
seqNo:row.seqNo,
}
array.push(row)
printSeqNoLabel(array)
},
},
created () {
}
}
</script>
<style scoped>
.input_left{
text-align: left;
}
.input_reight{
text-align: right;
}
/deep/ input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
input[type='number'] {
-moz-appearance: textfield !important;
}
</style>
Loading…
Cancel
Save