<template>
|
<el-dialog
|
width="75%"
|
title="工单产出批次"
|
top="15vh"
|
:visible.sync="innerVisible"
|
append-to-body
|
@close="$emit('update:currshowlist', false)"
|
:show="currshowlist"
|
class="part-dialog"
|
>
|
<div>
|
<el-table
|
class="out-put-batch-table"
|
:data="outPutBatchList"
|
style="width: 100%;"
|
height="500px"
|
border
|
highlight-current-row
|
@row-click="outPutBatchRowClick"
|
stripe
|
ref="outPutBatchTable"
|
>
|
<el-table-column align="center" width="55" label="单选">
|
<template slot-scope="scope">
|
<el-checkbox
|
class="out-put-batch-single-checkbox"
|
v-model="scope.row.commonChecked"
|
disabled
|
></el-checkbox>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="otcCustomerOrderNo"
|
align="center"
|
label="OTC订单号"
|
show-overflow-tooltip
|
>
|
<template slot-scope="scope">
|
<span>{{ scope.row.otcCustomerOrderNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="otcLineNo"
|
align="center"
|
label="OTC行项号"
|
show-overflow-tooltip
|
>
|
</el-table-column>
|
<el-table-column
|
prop="snNo"
|
align="center"
|
label="SN号"
|
show-overflow-tooltip
|
>
|
</el-table-column>
|
<el-table-column prop="qty" align="center" label="段长">
|
</el-table-column>
|
<el-table-column prop="selfNo" align="center" label="自编号">
|
</el-table-column>
|
<el-table-column prop="print" align="center" label="印字">
|
</el-table-column>
|
<el-table-column prop="direction" align="center" label="去向">
|
</el-table-column>
|
<el-table-column prop="section" align="center" label="区间">
|
</el-table-column>
|
<el-table-column prop="begining" align="center" label="始端">
|
</el-table-column>
|
<el-table-column prop="ending" align="center" label="终端">
|
</el-table-column>
|
<el-table-column prop="purpose" align="center" label="用途">
|
</el-table-column>
|
<el-table-column prop="endClassification" align="center" label="端别">
|
</el-table-column>
|
<el-table-column prop="company" align="center" label="公司名称">
|
</el-table-column>
|
<el-table-column prop="crccNumber" align="center" label="CRCC号">
|
</el-table-column>
|
<el-table-column
|
prop="finishedProductSpecification"
|
align="center"
|
label="成品规格型号"
|
>
|
</el-table-column>
|
<el-table-column prop="ymd" align="center" label="年月日">
|
</el-table-column>
|
</el-table>
|
</div>
|
<div slot="footer" class="dialog-footer">
|
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button type="primary" @click="confirmData">确定</el-button>
|
</div>
|
</el-dialog>
|
</template>
|
<script>
|
import { getByOperationTaskIds } from '@/api/plan/operationtaskproduce'
|
export default {
|
props: {
|
currshowlist: {
|
type: Boolean,
|
default: false
|
},
|
optaskId: {
|
type: Number,
|
default: 0
|
}
|
},
|
data() {
|
return {
|
innerVisible: false,
|
outPutBatchList: [],
|
currOutPutBatch: null
|
}
|
},
|
watch: {
|
currshowlist() {
|
this.innerVisible = this.currshowlist
|
this.outPutBatchList = []
|
if (this.currshowlist) {
|
this.$nextTick(() => {
|
// 根据工单,查询工单对应的产出批次
|
getByOperationTaskIds([this.optaskId]).then((response) => {
|
const resData = response.data.data
|
const resCode = response.data.code
|
if (resCode === 0) {
|
this.outPutBatchList = resData[this.optaskId]
|
}
|
})
|
})
|
}
|
}
|
},
|
methods: {
|
confirmData() {
|
if (this.currOutPutBatch != null) {
|
this.$emit('selectOutPutBatch', this.currOutPutBatch)
|
}
|
this.innerVisible = false
|
},
|
outPutBatchRowClick(row, column) {
|
this.outPutBatchList.forEach((item) => {
|
if (row.id !== item.id) {
|
item.commonChecked = false
|
}
|
})
|
if (row.commonChecked) {
|
row.commonChecked = false
|
this.currOutPutBatch = null
|
this.$refs.outPutBatchTable.setCurrentRow()
|
} else {
|
row.commonChecked = true
|
this.currOutPutBatch = row
|
this.$refs.outPutBatchTable.setCurrentRow(row)
|
}
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
.out-put-batch-table >>> .el-table__header th {
|
color: #666666;
|
}
|
|
.out-put-batch-table >>> th {
|
padding: 3px 0px;
|
height: 31px;
|
}
|
.out-put-batch-table >>> td {
|
padding: 1px 0 0 0;
|
}
|
.out-put-batch-single-checkbox
|
>>> .el-checkbox__input.is-disabled.is-checked
|
.el-checkbox__inner {
|
background-color: #006eff;
|
border-color: #006eff;
|
}
|
.out-put-batch-single-checkbox
|
>>> .el-checkbox__input.is-disabled
|
.el-checkbox__inner {
|
background-color: #ffffff;
|
cursor: pointer;
|
}
|
.out-put-batch-single-checkbox >>> .el-checkbox__inner::after {
|
border: 1px solid #fff !important;
|
border-left: 0 !important;
|
border-top: 0 !important;
|
cursor: pointer !important;
|
}
|
</style>
|