|
|
@ -48,10 +48,12 @@ |
|
|
placeholder="选择日期"> |
|
|
placeholder="选择日期"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'操作员姓名'"> |
|
|
|
|
|
|
|
|
<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-input v-model="searchData.operatorName" style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'机台ID'"> |
|
|
|
|
|
|
|
|
<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-input v-model="searchData.sResourceID" style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'班次'"> |
|
|
<el-form-item :label="'班次'"> |
|
|
@ -85,16 +87,16 @@ |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
border |
|
|
border |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
<!-- <el-table-column--> |
|
|
|
|
|
<!-- prop=""--> |
|
|
|
|
|
<!-- header-align="center"--> |
|
|
|
|
|
<!-- align="center"--> |
|
|
|
|
|
<!-- min-width="50"--> |
|
|
|
|
|
<!-- label="操作">--> |
|
|
|
|
|
<!-- <template slot-scope="scope" class="foo_container">--> |
|
|
|
|
|
<!-- <a type="text" size="small" @click="initReportModal(scope.row)">报告</a>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
min-width="60" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope" class="foo_container"> |
|
|
|
|
|
<a type="text" size="small" @click="cancelJob(scope.row)">取消派工单</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="seqNo" |
|
|
prop="seqNo" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
@ -216,7 +218,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getSOScheduleRoutingData |
|
|
getSOScheduleRoutingData |
|
|
, saveGenerateReportForSchedule |
|
|
|
|
|
|
|
|
, cancelJob |
|
|
} from '@/api/production/generateReport.js' |
|
|
} from '@/api/production/generateReport.js' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
|
|
|
|
|
@ -337,34 +339,33 @@ |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
let strVal = '' |
|
|
let strVal = '' |
|
|
if (val === 24) { |
|
|
if (val === 24) { |
|
|
strVal = this.searchData.workCenterNo |
|
|
|
|
|
} else if (val === 26) { |
|
|
|
|
|
this.operatorType = type |
|
|
|
|
|
if (type === 1) { |
|
|
|
|
|
strVal = this.saveHeaderData.operatorId |
|
|
|
|
|
} else if (type === 2) { |
|
|
|
|
|
strVal = this.saveHeaderData.operatorId2 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
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) |
|
|
this.$refs.baseList.init(val, strVal) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/* 列表方法的回调 */ |
|
|
/* 列表方法的回调 */ |
|
|
getBaseData (val) { |
|
|
getBaseData (val) { |
|
|
console.log(val) |
|
|
|
|
|
if (this.tagNo === 24) { |
|
|
if (this.tagNo === 24) { |
|
|
this.searchData.workCenterNo = val.WorkCenterNo |
|
|
|
|
|
} else if (this.tagNo === 26) { |
|
|
|
|
|
if (this.operatorType === 1) { |
|
|
|
|
|
this.saveHeaderData.operatorId = val.OperatorID |
|
|
|
|
|
this.saveHeaderData.operatorName = val.OperatorName |
|
|
|
|
|
} else if (this.operatorType === 2) { |
|
|
|
|
|
this.saveHeaderData.operatorId2 = val.OperatorID |
|
|
|
|
|
this.saveHeaderData.operatorIdName2 = val.OperatorName |
|
|
|
|
|
} |
|
|
|
|
|
} else if (this.tagNo === 5) { |
|
|
|
|
|
|
|
|
this.searchData.sWorkCenterNo = val.WorkCenterNo |
|
|
|
|
|
} else if (this.tagNo === 5) { |
|
|
this.searchData.partNo = val.PartNo |
|
|
this.searchData.partNo = val.PartNo |
|
|
} |
|
|
} |
|
|
|
|
|
if (this.tagNo === 26) { |
|
|
|
|
|
this.searchData.operatorName = val.OperatorName |
|
|
|
|
|
} |
|
|
|
|
|
if (this.tagNo === 88) { |
|
|
|
|
|
this.searchData.sResourceID = val.ResourceID |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
search () { |
|
|
search () { |
|
|
@ -392,7 +393,32 @@ |
|
|
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|
|
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|
|
return Y + M + D + H + MM + S |
|
|
return Y + M + D + H + MM + S |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
cancelJob(row){ |
|
|
|
|
|
if(row.qtyReported>0){ |
|
|
|
|
|
this.$alert('该派工单已经有报工无法取消!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
this.$confirm(`确定取消此派工单`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
cancelJob(row).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.search (); |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
|