Browse Source

单据详情

master
zhangli 1 year ago
parent
commit
9da637c36a
  1. 5
      src/components/Descriptions/src/Descriptions.vue
  2. 36
      src/components/Detail/src/Detail.vue
  3. 2
      src/components/Form/src/helper.ts
  4. 1
      src/views/wms/itembasic/ItembasicForm.vue
  5. 4
      src/views/wms/itembasic/index.vue

5
src/components/Descriptions/src/Descriptions.vue

@ -22,6 +22,8 @@ const props = defineProps({
collapse: propTypes.bool.def(true),
columns: propTypes.number.def(1),
width: propTypes.string.def('50px'),
labelAlign: propTypes.string.def('right'),
labelClassName: propTypes.string.def(''),
schema: {
type: Array as PropType<DescriptionsSchema[]>,
default: () => []
@ -109,7 +111,8 @@ const toggleClick = () => {
v-for="item in schema"
:key="item.field"
v-bind="getBindItemValue(item)"
label-align="right"
:label-align="labelAlign"
:label-class-name="labelClassName"
:width="width"
>
<template #label>

36
src/components/Detail/src/Detail.vue

@ -1,10 +1,12 @@
<template>
<el-drawer v-model="isShowDrawer" title="详情" direction="rtl" size="80%" v-loading="detailLoading">
<div class="custom-class">
<ContentWrap>
<el-drawer v-model="isShowDrawer" title="详情" direction="rtl" size="80%" v-loading="detailLoading" >
<template #header>
<div class="font-size-18px">
{{ detailData.code }} <span class="ml-20px font-size-16px">{{ detailData.name }}</span>
</div>
</template>
<ContentWrap>
<Descriptions :data="detailData" labelClassName="label-class-name" label-align="left" direction="vertical" :column="8" :schema="ItemBasic.allSchemas.detailSchema" :columns="2" width="200px"/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex" v-if="current == 0">
@ -24,12 +26,15 @@
<ImportForm ref="importFormRef" :importTemplateData="importTemplateData" @success="importSuccess" />
</div>
<ContentWrap v-else>
<Table :columns="ItemBasic.allSchemas.tableColumns" :data="tableObject.tableList" :loading="tableObject.loading"
:pagination="{
total: tableObject.total
}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" />
<Table
:columns="ItemBasic.allSchemas.tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{total: tableObject.total}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
/>
</ContentWrap>
</div>
</el-drawer>
</template>
@ -42,11 +47,8 @@ import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import Tabs from '@/components/Tabs/src/Tabs.vue'
import { ItemBasic } from '@/utils/disposition/tableColumns.ts'
import { ItemBasicTabsList } from '@/utils/disposition/tabsList.ts'
import { getItembasic } from '@/api/wms/itembasic'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as UserApi from '@/api/system/user'
const isShowDrawer = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(ItemBasicTabsList)))
@ -177,10 +179,14 @@ const openDetail = async (id?: number) => {
}
defineExpose({ openDetail }) // open
</script>
<style scoped lang="scss">
.custom-class{
<style lang="scss">
.el-drawer__body{
background: #f5f5f5!important;
margin: -20px;
padding: 20px;
}
::v-deep(.label-class-name){
color: #dedede;
}
</style>
<style scoped lang="scss">
</style>

2
src/components/Form/src/helper.ts

@ -21,8 +21,6 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => {
}
if (selectMap.includes(schema?.component as string)) {
// 一些范围选择器
console.log('type=' +schema?.componentProps?.type);
const twoTextMap = ['datetimerange', 'daterange', 'monthrange', 'datetimerange', 'daterange']
if (
twoTextMap.includes(

1
src/views/wms/itembasic/ItembasicForm.vue

@ -117,7 +117,6 @@ const Butttondata = [
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
console.log(417, item)
}
//
else if (val == 'close') {

4
src/views/wms/itembasic/index.vue

@ -44,10 +44,6 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import { ItemBasic } from '@/utils/disposition/tableColumns'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
const router = useRouter() //
console.log(ItembasicApi.importUrl);
// tableObject
// tableMethods
// https://doc.iocoder.cn/vue3/crud-schema/

Loading…
Cancel
Save