parent
ce5225592c
commit
79f7da57f8
File diff suppressed because one or more lines are too long
@ -1,130 +1,135 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog title="详情"
|
||||||
title="详情"
|
:close-on-click-modal="false" append-to-body
|
||||||
:close-on-click-modal="false"
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||||
append-to-body
|
width="600px">
|
||||||
:visible.sync="visible"
|
<el-row :gutter="15" class="">
|
||||||
class="JNPF-dialog JNPF-dialog_center"
|
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||||
lock-scroll
|
<template v-if="!loading">
|
||||||
width="600px"
|
<el-col :span="12" >
|
||||||
>
|
<jnpf-form-tip-item label="编码"
|
||||||
<el-row :gutter="15" class="">
|
prop="code" >
|
||||||
<el-form
|
<p>{{dataForm.code}}</p>
|
||||||
ref="formRef"
|
</jnpf-form-tip-item>
|
||||||
:model="dataForm"
|
</el-col>
|
||||||
size="small"
|
<el-col :span="12" >
|
||||||
label-width="100px"
|
<jnpf-form-tip-item label="名称"
|
||||||
label-position="right"
|
prop="name" >
|
||||||
>
|
<p>{{dataForm.name}}</p>
|
||||||
<template v-if="!loading">
|
</jnpf-form-tip-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<jnpf-form-tip-item label="编码" prop="code">
|
<el-col :span="12" >
|
||||||
<p>{{ dataForm.code }}</p>
|
<jnpf-form-tip-item label="规格"
|
||||||
</jnpf-form-tip-item>
|
prop="spec" >
|
||||||
</el-col>
|
<p>{{dataForm.spec}}</p>
|
||||||
<el-col :span="12">
|
</jnpf-form-tip-item>
|
||||||
<jnpf-form-tip-item label="名称" prop="name">
|
</el-col>
|
||||||
<p>{{ dataForm.name }}</p>
|
<el-col :span="12" >
|
||||||
</jnpf-form-tip-item>
|
<jnpf-form-tip-item label="库存单位"
|
||||||
</el-col>
|
prop="unit" >
|
||||||
<el-col :span="12">
|
<p>{{ dataForm.unit }} </p>
|
||||||
<jnpf-form-tip-item label="规格" prop="spec">
|
</jnpf-form-tip-item>
|
||||||
<p>{{ dataForm.spec }}</p>
|
</el-col>
|
||||||
</jnpf-form-tip-item>
|
<el-col :span="24" >
|
||||||
</el-col>
|
<jnpf-form-tip-item label="描述"
|
||||||
<el-col :span="12">
|
prop="description" >
|
||||||
<jnpf-form-tip-item label="库存单位" prop="unit">
|
<p>{{dataForm.description}}</p>
|
||||||
<p>{{ dataForm.unit }}</p>
|
</jnpf-form-tip-item>
|
||||||
</jnpf-form-tip-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="24" >
|
||||||
<el-col :span="24">
|
<jnpf-form-tip-item label="图片"
|
||||||
<jnpf-form-tip-item label="备注" prop="remak">
|
prop="photo" >
|
||||||
<p>{{ dataForm.remak }}</p>
|
<JnpfUploadImg v-model="dataForm.photo"
|
||||||
</jnpf-form-tip-item>
|
disabled
|
||||||
</el-col>
|
detailed :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0" >
|
||||||
</template>
|
</JnpfUploadImg>
|
||||||
</el-form>
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="visible = false"> 取 消</el-button>
|
<el-button @click="visible = false"> 取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import request from "@/utils/request";
|
import request from '@/utils/request'
|
||||||
|
|
||||||
import { getConfigData } from "@/api/onlineDev/visualDev";
|
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||||
import jnpf from "@/utils/jnpf";
|
import jnpf from '@/utils/jnpf'
|
||||||
import Detail from "@/views/basic/dynamicModel/list/detail";
|
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||||
import { thousandsFormat } from "@/components/Generator/utils/index";
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||||
export default {
|
export default {
|
||||||
components: { Detail },
|
components: { Detail},
|
||||||
props: [],
|
props: [],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: "",
|
id :'',
|
||||||
code: "",
|
code : '',
|
||||||
name: "",
|
name : '',
|
||||||
spec: "",
|
spec : '',
|
||||||
unit: "",
|
unit : "",
|
||||||
remak: "",
|
description : '',
|
||||||
creatorTime: "",
|
creatorTime : "",
|
||||||
creatorUserId: "",
|
creatorUserId : "",
|
||||||
lastModifyTime: "",
|
lastModifyTime : "",
|
||||||
lastModifyUserId: "",
|
lastModifyUserId : "",
|
||||||
},
|
photo : [],
|
||||||
unitOptions: [
|
},
|
||||||
{ fullName: "克", id: "1" },
|
unitOptions:[{"fullName":"克","id":"1"},{"fullName":"千克","id":"2"},{"fullName":"吨","id":"3"}],
|
||||||
{ fullName: "千克", id: "2" },
|
unitProps:{"label":"fullName","value":"id" },
|
||||||
{ fullName: "吨", id: "3" },
|
|
||||||
],
|
|
||||||
unitProps: { 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;
|
|
||||||
},
|
|
||||||
|
|
||||||
init(id) {
|
|
||||||
this.dataForm.id = id || 0;
|
|
||||||
this.visible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (this.dataForm.id) {
|
|
||||||
this.loading = true;
|
|
||||||
request({
|
|
||||||
url: "/api/scm/NxProduct/detail/" + this.dataForm.id,
|
|
||||||
method: "get",
|
|
||||||
}).then((res) => {
|
|
||||||
this.dataInfo(res.data);
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
},
|
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
|
||||||
|
},
|
||||||
|
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || 0;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if(this.dataForm.id){
|
||||||
|
this.loading = true
|
||||||
|
request({
|
||||||
|
url: '/api/scm/NxProduct/detail/'+this.dataForm.id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue