提交 04e6c9f5 authored 作者: 刘旭's avatar 刘旭

完成产品日志页面

上级 2d0c0201
...@@ -17,20 +17,17 @@ const routes: Array<RouteRecordRaw> = [ ...@@ -17,20 +17,17 @@ const routes: Array<RouteRecordRaw> = [
}, },
], ],
}, },
// { {
// path: '/manage', path: '/manage',
// component: Layout, component: Layout,
// children: [ children: [
// { {
// path: '/manage/configMap', path: '/manage/fieldConfiguration',
// name: 'configMap', name: 'configMap',
// component: () => import("@/views/manage/configMap.vue"), component: () => import("@/views/manage/fieldConfiguration.vue"),
// props: { },
// id: 0 ]
// } },
// },
// ]
// },
{ {
path: "/login", path: "/login",
name: "login", name: "login",
......
...@@ -2,6 +2,7 @@ import { request } from "../../config"; ...@@ -2,6 +2,7 @@ import { request } from "../../config";
// 金蝶通用配置列表 // 金蝶通用配置列表
export function getCommonConfig( export function getCommonConfig(
platformProductRelationId: number,
pageNo?: number, pageNo?: number,
pageSize?: number, pageSize?: number,
name?: string, name?: string,
...@@ -10,7 +11,7 @@ export function getCommonConfig( ...@@ -10,7 +11,7 @@ export function getCommonConfig(
return request({ return request({
url: "/api/kingdee/common/config/list", url: "/api/kingdee/common/config/list",
method: "get", method: "get",
params: { pageNo, pageSize, name, operation }, params: { platformProductRelationId, pageNo, pageSize, name, operation },
}); });
} }
......
...@@ -45,3 +45,34 @@ export function getThirdPartyLog( ...@@ -45,3 +45,34 @@ export function getThirdPartyLog(
params: { pageNo, pageSize, dateFrom, dateTo, name, flag, queueId }, params: { pageNo, pageSize, dateFrom, dateTo, name, flag, queueId },
}); });
} }
// 产品日志
export function getProductLog(
platformProductRelationId: number,
pageNo?: number,
pageSize?: number,
dateFrom?: string,
dateTo?: string,
name?: string,
flag?: any,
costTimeFrom?: number,
costTimeTo?: number,
queueId?: string,
) {
return request({
url: "/api/product/log/list",
method: "get",
params: {
platformProductRelationId,
pageNo,
pageSize,
dateFrom,
dateTo,
name,
flag,
costTimeFrom,
costTimeTo,
queueId
},
});
}
\ No newline at end of file
...@@ -3,6 +3,7 @@ export type SearchState = { ...@@ -3,6 +3,7 @@ export type SearchState = {
kingdeeSearch: Object; kingdeeSearch: Object;
thirdPartySearch: Object; thirdPartySearch: Object;
monitoringSearch: Object; monitoringSearch: Object;
productSearch: Object;
}; };
//定义state //定义state
...@@ -10,6 +11,7 @@ export const state: SearchState = { ...@@ -10,6 +11,7 @@ export const state: SearchState = {
kingdeeSearch: {}, kingdeeSearch: {},
thirdPartySearch: {}, thirdPartySearch: {},
monitoringSearch: {}, monitoringSearch: {},
productSearch: {},
}; };
//定义mutations //定义mutations
export const mutations = { export const mutations = {
...@@ -17,6 +19,10 @@ export const mutations = { ...@@ -17,6 +19,10 @@ export const mutations = {
state.kingdeeSearch = data; state.kingdeeSearch = data;
}, },
setproductSearch(state: SearchState, data: Object) {
state.productSearch = data;
},
setThirdPartySearch(state: SearchState, data: Object) { setThirdPartySearch(state: SearchState, data: Object) {
state.thirdPartySearch = data; state.thirdPartySearch = data;
}, },
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
<el-input v-model="fieidForm.entryPrimaryKeyField" placeholder="请输入单据分录主键字段" /> <el-input v-model="fieidForm.entryPrimaryKeyField" placeholder="请输入单据分录主键字段" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col></el-col> -->
<el-col :span="8" v-if="fieidForm.operation === '2' || fieidForm.operation === 'MES->ERP'"> <el-col :span="8" v-if="fieidForm.operation === '2' || fieidForm.operation === 'MES->ERP'">
<el-form-item label="分录标识" prop="entryName"> <el-form-item label="分录标识" prop="entryName">
<!-- :prop="fieidForm.operation === '1' && fieidForm.operation === 'MES->ERP' ? '' : 'entryName'" --> <!-- :prop="fieidForm.operation === '1' && fieidForm.operation === 'MES->ERP' ? '' : 'entryName'" -->
...@@ -109,6 +108,9 @@ import { ElMessage, ElMessageBox } from 'element-plus'; ...@@ -109,6 +108,9 @@ 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,
}, },
...@@ -163,7 +165,7 @@ const onConfirm = () => { ...@@ -163,7 +165,7 @@ const onConfirm = () => {
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.currentPage, props.pageSize) emits('initCommonConfig', props.platformProductRelationId, props.currentPage, props.pageSize)
ElMessage({ type: 'success', message: '添加成功' }) ElMessage({ type: 'success', message: '添加成功' })
} }
}) })
...@@ -171,7 +173,7 @@ const onConfirm = () => { ...@@ -171,7 +173,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.currentPage, props.pageSize) emits('initCommonConfig', props.platformProductRelationId, props.currentPage, props.pageSize)
ElMessage({ type: 'success', message: '更新成功' }) ElMessage({ type: 'success', message: '更新成功' })
} }
}) })
......
...@@ -32,12 +32,13 @@ ...@@ -32,12 +32,13 @@
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" :currentPage="currentPage" :pageSize="pageSize" /> <new-field ref="newFieldRef" @initCommonConfig="initCommonConfig" :kingdeeCommonConfigId="kingdeeCommonConfigId"
:currentPage="currentPage" :pageSize="pageSize" />
<config-map ref="configMapRef" :kingdeeCommonConfigId="kingdeeCommonConfigId" /> <config-map ref="configMapRef" :kingdeeCommonConfigId="kingdeeCommonConfigId" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { getCommonConfig, deleteCommonConfig } from '@/services/api/systemApi/fieldConfiguration/commonConfig' import { getCommonConfig, deleteCommonConfig } from '@/services/api/systemApi/fieldConfiguration/commonConfig'
import newField from './components/fieldConfiguration/newField.vue'; import newField from './components/fieldConfiguration/newField.vue';
...@@ -51,17 +52,23 @@ const currentPage = ref(1) ...@@ -51,17 +52,23 @@ const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
const total = ref(0) const total = ref(0)
const kingdeeCommonConfigId = ref() // 配置字段id const kingdeeCommonConfigId = ref() // 配置字段id
const platformProductRelationId: any = sessionStorage.getItem('platformProductRelationId') // 产品id
onMounted(() => {
initCommonConfig(platformProductRelationId, currentPage.value, pageSize.value)
})
const handleSizeChange = (value: number) => { const handleSizeChange = (value: number) => {
pageSize.value = value pageSize.value = value
initCommonConfig(currentPage.value, pageSize.value) initCommonConfig(platformProductRelationId, currentPage.value, pageSize.value)
} }
const handleCurrentChange = (value: number) => { const handleCurrentChange = (value: number) => {
currentPage.value = value currentPage.value = value
initCommonConfig(value, pageSize.value) initCommonConfig(platformProductRelationId, currentPage.value, pageSize.value)
} }
const showFieid = () => { const showFieid = () => {
newFieldRef.value.fieldTitle = '新增字段' newFieldRef.value.fieldTitle = '新增字段'
newFieldRef.value.updateCount = 0 newFieldRef.value.updateCount = 0
...@@ -102,7 +109,7 @@ const handleDelete = (id: number) => { ...@@ -102,7 +109,7 @@ const handleDelete = (id: number) => {
.then(() => { .then(() => {
deleteCommonConfig(id).then((res: any) => { deleteCommonConfig(id).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
initCommonConfig(currentPage.value, pageSize.value) initCommonConfig(platformProductRelationId, currentPage.value, pageSize.value)
ElMessage({ type: 'success', message: '删除成功' }) ElMessage({ type: 'success', message: '删除成功' })
} }
}) })
...@@ -110,18 +117,16 @@ const handleDelete = (id: number) => { ...@@ -110,18 +117,16 @@ const handleDelete = (id: number) => {
} }
// 通用配置列表数据 // 通用配置列表数据
const initCommonConfig = (pageNo?: number, pageSize?: number, name?: string) => { const initCommonConfig = (id: number, pageNo?: number, pageSize?: number, name?: string) => {
getCommonConfig(pageNo, pageSize, name).then((res: any) => { getCommonConfig(id, pageNo, pageSize, name).then((res: any) => {
if (res.code === 200) { if (res.code === 200) {
fieidData.value = res.data.records fieidData.value = res.data.records
total.value = res.data.total total.value = res.data.total
loading.value = false loading.value = false
console.log(res, '通用配置列表数据');
} }
}) })
} }
initCommonConfig(currentPage.value, pageSize.value)
</script> </script>
<style scoped> <style scoped>
......
...@@ -64,7 +64,9 @@ ...@@ -64,7 +64,9 @@
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import { getPlatformProductList, createPlatformProduct, deletePlatformProduct, getDictItemList } from '@/services/api/platformProducts' import { getPlatformProductList, createPlatformProduct, deletePlatformProduct, getDictItemList } from '@/services/api/platformProducts'
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { useRouter } from 'vue-router';
const router = useRouter();
const options = ref([] as any) // select 数据源 const options = ref([] as any) // select 数据源
const showDialog = ref(false) const showDialog = ref(false)
const productAfterCode = ref() // 第一个选择产品 const productAfterCode = ref() // 第一个选择产品
...@@ -107,9 +109,10 @@ const selectBeforeProducts = () => { ...@@ -107,9 +109,10 @@ const selectBeforeProducts = () => {
} }
// 选择场景 // 选择场景
const selectScene = (id: number) => { const selectScene = (id: string) => {
console.log('选择场景'); console.log('选择场景', id);
sessionStorage.setItem('platformProductRelationId', id)
router.push({ path: '/manage/fieldConfiguration' }); //调用router.push()
} }
// 删除产品 // 删除产品
......
差异被折叠。
...@@ -2,6 +2,7 @@ import { ref, onMounted } from "vue"; ...@@ -2,6 +2,7 @@ import { ref, onMounted } from "vue";
import { import {
getkingdeeLog, getkingdeeLog,
getThirdPartyLog, getThirdPartyLog,
getProductLog
} from "@/services/api/systemApi/log/logApi"; } from "@/services/api/systemApi/log/logApi";
export const usekingdeeLogTableList = () => { export const usekingdeeLogTableList = () => {
...@@ -50,3 +51,27 @@ export const useThirdPartyTableList = () => { ...@@ -50,3 +51,27 @@ export const useThirdPartyTableList = () => {
pageSize, pageSize,
}; };
}; };
export const useproductLogTableList = () => {
const tableList = ref([]);
const total = ref(0);
// 当前页数
const currentPage = ref(1);
// 每页条数
const pageSize = ref(10);
const loading = ref(true);
const platformProductRelationId = 1
onMounted(async () => {
const res = await getProductLog(platformProductRelationId, currentPage.value, pageSize.value);
tableList.value = res.data.records;
total.value = res.data.total;
loading.value = false;
});
return {
tableList,
total,
loading,
currentPage,
pageSize,
};
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论