parent
ab86d9b39e
commit
21248cd4c0
File diff suppressed because one or more lines are too long
@ -1,182 +1,165 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack"
|
||||
content="详情"/>
|
||||
<div class="options">
|
||||
<el-button @click="goBack">取 消</el-button>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="JNPF-preview-main">
|
||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||
<div class="JNPF-common-page-header">
|
||||
<el-page-header @back="goBack" content="详情" />
|
||||
<div class="options">
|
||||
<el-button @click="goBack">取 消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
|
||||
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="生产日期" prop="manufactureTime">
|
||||
<p>{{ dataForm.manufactureTime }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="设备编码" prop="deviceCode">
|
||||
<p>{{ dataForm.deviceCode }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="设备名称" prop="deviceName">
|
||||
<p>{{ dataForm.deviceName }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="顺序号" prop="sort">
|
||||
<JnpfNumber v-model="dataForm.sort" placeholder="顺序号" disabled :min="1" :step="1">
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="班次" prop="post">
|
||||
<p>{{ dataForm.post }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="开始时间" prop="startTime">
|
||||
<p>{{ dataForm.startTime }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="结束时间" prop="endTime">
|
||||
<p>{{ dataForm.endTime }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="产品编码" prop="productCode">
|
||||
<p>{{ dataForm.productCode }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="产品名称" prop="productName">
|
||||
<p>{{ dataForm.productName }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="规格型号" prop="models">
|
||||
<p>{{ dataForm.models }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="计量单位" prop="measurementUnit">
|
||||
<p>{{ dataForm.measurementUnit }}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<jnpf-form-tip-item label="计量数量" prop="planNumber">
|
||||
<JnpfNumber v-model="dataForm.planNumber" placeholder="请输入计量数量" disabled :step="1">
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
|
||||
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||
<template v-if="!loading">
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="生产日期"
|
||||
prop="manufactureTime" >
|
||||
<p>{{dataForm.manufactureTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="设备编码"
|
||||
prop="deviceCode" >
|
||||
<p>{{dataForm.deviceCode}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="设备名称"
|
||||
prop="deviceName" >
|
||||
<p>{{dataForm.deviceName}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="顺序号"
|
||||
prop="sort" >
|
||||
<JnpfNumber v-model="dataForm.sort"
|
||||
placeholder="顺序号" disabled
|
||||
:min="1" :step="1" >
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="班次"
|
||||
prop="post" >
|
||||
<p>{{ dataForm.post }} </p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="开始时间"
|
||||
prop="startTime" >
|
||||
<p>{{dataForm.startTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="结束时间"
|
||||
prop="endTime" >
|
||||
<p>{{dataForm.endTime}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="产品编码"
|
||||
prop="productCode" >
|
||||
<p>{{dataForm.productCode}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="产品名称"
|
||||
prop="productName" >
|
||||
<p>{{dataForm.productName}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="规格型号"
|
||||
prop="models" >
|
||||
<p>{{dataForm.models}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="计量单位"
|
||||
prop="measurementUnit" >
|
||||
<p>{{dataForm.measurementUnit}}</p>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<jnpf-form-tip-item label="计量数量"
|
||||
prop="planNumber" >
|
||||
<JnpfNumber v-model="dataForm.planNumber"
|
||||
placeholder="请输入计量数量" disabled
|
||||
:step="1" >
|
||||
</JnpfNumber>
|
||||
</jnpf-form-tip-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</div>
|
||||
</transition>
|
||||
</transition>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { Detail},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
detailVisible: false,
|
||||
loading: false,
|
||||
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||
import jnpf from '@/utils/jnpf'
|
||||
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||
export default {
|
||||
components: { Detail },
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
detailVisible: false,
|
||||
loading: false,
|
||||
|
||||
dataForm: {
|
||||
id :'',
|
||||
manufactureTime : '',
|
||||
deviceCode : "",
|
||||
deviceName : '',
|
||||
sort : 1,
|
||||
post : "1",
|
||||
startTime : '',
|
||||
endTime : '',
|
||||
productCode : '',
|
||||
productName : '',
|
||||
models : '',
|
||||
measurementUnit : '',
|
||||
planNumber : '',
|
||||
id: '',
|
||||
manufactureTime: '',
|
||||
deviceCode: "",
|
||||
deviceName: '',
|
||||
sort: 1,
|
||||
post: "1",
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
productCode: '',
|
||||
productName: '',
|
||||
models: '',
|
||||
measurementUnit: '',
|
||||
planNumber: '',
|
||||
},
|
||||
postOptions:[{"fullName":"旺季白班","id":"1"},{"fullName":"旺季晚班","id":"2"}],
|
||||
postProps:{"label":"fullName","value":"id" },
|
||||
postOptions: [{ "fullName": "旺季白班", "id": "1" }, { "fullName": "旺季晚班", "id": "2" }],
|
||||
postProps: { "label": "fullName", "value": "id" },
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() { },
|
||||
methods: {
|
||||
toDetail(defaultValue, modelId) {
|
||||
if (!defaultValue) return
|
||||
getConfigData(modelId).then(res => {
|
||||
if (!res.data || !res.data.formData) return
|
||||
let formData = JSON.parse(res.data.formData)
|
||||
formData.popupType = 'general'
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||
})
|
||||
})
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
toDetail(defaultValue, modelId) {
|
||||
if (!defaultValue) return
|
||||
getConfigData(modelId).then(res => {
|
||||
if (!res.data || !res.data.formData) return
|
||||
let formData = JSON.parse(res.data.formData)
|
||||
formData.popupType = 'general'
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/YysDayPackage/detail/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
|
||||
goBack() {
|
||||
this.$emit('refresh')
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/YysDayPackage/detail/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in new issue