<template>
|
<el-dialog :visible.sync="visible" :title="$t('view')" :close-on-click-modal="false"
|
:close-on-press-escape="false" width="50%">
|
<el-form :model="dataForm" ref="dataForm">
|
<el-row>
|
<el-col :span="12">
|
<el-form-item prop="lsh" label="流水号" label-width="120px">
|
<el-input disabled v-model="dataForm.lsh" readonly></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item :label="type === 'monthly' ? '月份' : '年份'" prop="ny" label-width="120px">
|
<el-date-picker
|
style="width: 100%"
|
readonly
|
v-if="type === 'monthly'"
|
v-model="dataForm.ny"
|
type="month"
|
value-format="yyyy-MM"
|
placeholder="选择月">
|
</el-date-picker>
|
<el-date-picker
|
style="width: 100%"
|
readonly
|
v-if="type === 'yearly'"
|
v-model="dataForm.ny"
|
type="year"
|
value-format="yyyy"
|
placeholder="选择年">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="12">
|
<el-form-item label="编制人" prop="bzr" label-width="120px">
|
<el-input v-model="dataForm.bzr" readonly></el-input>
|
</el-form-item>
|
</el-col>
|
<el-col :span="12">
|
<el-form-item label="编制时间" prop="bzsj" label-width="120px">
|
<el-date-picker
|
style="width: 100%"
|
readonly
|
v-model="dataForm.bzsj"
|
type="date"
|
value-format="yyyy-MM-dd"
|
placeholder="选择编制时间">
|
</el-date-picker>
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row style="margin-top: 1%">
|
<el-table
|
v-loading="detListLoading"
|
:data="dataForm.detList"
|
style="width: 100%;"
|
border>
|
<el-table-column type="index" header-align="center" align="center" width="50" label="序号"></el-table-column>
|
<el-table-column prop="mzName" header-align="center" align="center" label="煤种"></el-table-column>
|
<el-table-column prop="dw" header-align="center" align="center" label="单位"></el-table-column>
|
<el-table-column prop="cl" header-align="center" align="center" label="产量"></el-table-column>
|
<el-table-column prop="hf" header-align="center" align="center" label="灰分(Ad%)"></el-table-column>
|
<el-table-column prop="lf" header-align="center" align="center" label="硫分(St,d%)"></el-table-column>
|
<el-table-column prop="sf" header-align="center" align="center" label="水分(Mt%)"></el-table-column>
|
<el-table-column prop="mbrz" header-align="center" align="center" label="目标热值(Kcal/Kg)"></el-table-column>
|
</el-table>
|
</el-row>
|
</el-form>
|
<template slot="footer">
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
</template>
|
</el-dialog>
|
</template>
|
|
<script>
|
import debounce from 'lodash/debounce'
|
import DictSelectTag from '@/components/dict/dict-select-tag'
|
import {myMessage} from "@/utils/myMessage";
|
import {getYM, getYMD} from '@/utils/dateUtils'
|
|
export default {
|
components: {
|
DictSelectTag
|
},
|
props: {
|
type: ''
|
},
|
data() {
|
return {
|
visible: false,
|
dataForm: {
|
id: '',
|
unit2: '',
|
ssdw: '',
|
lsh: '',
|
jhlb: this.type,
|
ny: getYM(new Date()),
|
bzr: '',
|
bzsj: getYMD(new Date()),
|
sslb: '',
|
detList: []
|
},
|
detListLoading: false
|
}
|
},
|
methods: {
|
init() {
|
this.visible = true
|
this.$nextTick(() => {
|
this.$refs['dataForm'].resetFields()
|
this.dataForm.detList = []
|
this.dataForm.bzr = this.$store.state.user.realName
|
if (this.dataForm.id) {
|
this.getInfo()
|
}
|
})
|
},
|
// 获取信息
|
getInfo() {
|
this.$http.get(`/iailab-iems-coal-proddisp/wash/plan/info/${this.dataForm.id}`).then(({data: res}) => {
|
if (res.code !== 0) {
|
return this.$message.error(res.msg)
|
}
|
this.dataForm = {
|
...this.dataForm,
|
...res.info
|
}
|
}).catch(() => {
|
})
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
.myCol {
|
margin-bottom: 0px
|
}
|
</style>
|