提交 9b961483 authored 作者: 刘旭's avatar 刘旭

优化

上级 d424b2cb
...@@ -114,9 +114,6 @@ import { ElMessage, ElMessageBox } from 'element-plus'; ...@@ -114,9 +114,6 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import { addCommonConfig, putCommonConfig } from '@/services/api/systemApi/fieldConfiguration/commonConfig' import { addCommonConfig, putCommonConfig } from '@/services/api/systemApi/fieldConfiguration/commonConfig'
const props = defineProps({ const props = defineProps({
platformProductRelationId: {
type: Number,
},
currentPage: { currentPage: {
type: Number, type: Number,
}, },
...@@ -169,11 +166,13 @@ watch(() => fieidForm.value, () => { ...@@ -169,11 +166,13 @@ watch(() => fieidForm.value, () => {
const onConfirm = () => { const onConfirm = () => {
fieidRef.value?.validate((valid: boolean, fields: any) => { fieidRef.value?.validate((valid: boolean, fields: any) => {
if (valid) { if (valid) {
const platformProductRelationId = sessionStorage.getItem('platformProductRelationId')
if (fieldTitle.value === '新增字段') { if (fieldTitle.value === '新增字段') {
fieidForm.value = { ...{ platformProductRelationId }, ...fieidForm.value }
addCommonConfig(fieidForm.value).then((res: any) => { addCommonConfig(fieidForm.value).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
clear() clear()
emits('initCommonConfig', props.platformProductRelationId, props.currentPage, props.pageSize) emits('initCommonConfig', platformProductRelationId, props.currentPage, props.pageSize)
ElMessage({ type: 'success', message: '添加成功' }) ElMessage({ type: 'success', message: '添加成功' })
} }
}) })
...@@ -181,7 +180,7 @@ const onConfirm = () => { ...@@ -181,7 +180,7 @@ const onConfirm = () => {
putCommonConfig(fieidForm.value).then((res: any) => { putCommonConfig(fieidForm.value).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
clear() clear()
emits('initCommonConfig', props.platformProductRelationId, props.currentPage, props.pageSize) emits('initCommonConfig', platformProductRelationId, props.currentPage, props.pageSize)
ElMessage({ type: 'success', message: '更新成功' }) ElMessage({ type: 'success', message: '更新成功' })
} }
}) })
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
layout="->, total, sizes, prev, pager, next, jumper" :total="total" hide-on-single-page layout="->, total, sizes, prev, pager, next, jumper" :total="total" hide-on-single-page
@size-change="handleSizeChange" @current-change="handleCurrentChange" style="margin-top: 20px;" /> @size-change="handleSizeChange" @current-change="handleCurrentChange" style="margin-top: 20px;" />
</div> </div>
<new-field ref="newFieldRef" @initCommonConfig="initCommonConfig" :kingdeeCommonConfigId="kingdeeCommonConfigId" <new-field ref="newFieldRef" @initCommonConfig="initCommonConfig" :currentPage="currentPage" :pageSize="pageSize" />
:currentPage="currentPage" :pageSize="pageSize" />
<config-map ref="configMapRef" :kingdeeCommonConfigId="kingdeeCommonConfigId" /> <config-map ref="configMapRef" :kingdeeCommonConfigId="kingdeeCommonConfigId" />
</template> </template>
......
...@@ -110,7 +110,6 @@ const selectBeforeProducts = () => { ...@@ -110,7 +110,6 @@ const selectBeforeProducts = () => {
// 选择场景 // 选择场景
const selectScene = (id: string) => { const selectScene = (id: string) => {
console.log('选择场景', id);
sessionStorage.setItem('platformProductRelationId', id) sessionStorage.setItem('platformProductRelationId', id)
router.push({ path: '/manage/fieldConfiguration' }); //调用router.push() router.push({ path: '/manage/fieldConfiguration' }); //调用router.push()
} }
...@@ -150,8 +149,8 @@ const onConfirm = () => { ...@@ -150,8 +149,8 @@ const onConfirm = () => {
productAfterCode: productAfterCode.value, productAfterCode: productAfterCode.value,
productBeforeCode: productBeforeCode.value productBeforeCode: productBeforeCode.value
} }
localStorage.setItem('productAfterCode', productAfterCode.value) // sessionStorage.setItem('productAfterCode', productAfterCode.value)
localStorage.setItem('productBeforeCode', productBeforeCode.value) // sessionStorage.setItem('productBeforeCode', productBeforeCode.value)
createPlatformProduct(data).then((res: any) => { createPlatformProduct(data).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
init() init()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论