基础资料渲染

main
key 2024-03-28 16:27:13 +08:00
parent ef262b5c2a
commit ff50304808
8 changed files with 304 additions and 204 deletions

View File

@ -73,16 +73,15 @@
</div>
</div>
<div style="height: 100%;">
<vxe-table show-overflow height="100%" :data="tableData" :border=true
<vxe-table show-overflow height="100%" :data="suppleType" :border=true
:tree-config="{ transform: true }" :scroll-y="{ gt: 20 }">
<vxe-column type="radio" title="单选" width="80" fixed="left"></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column title="状态" width="80" fixed="right" show-overflow>
<template #default="{ row }">
<vxe-button type="text">查看</vxe-button>
<!-- <vxe-button type="text" icon="vxe-icon-delete"></vxe-button> -->
{{ row.isEnable ? '启用' : '禁用' }}
</template>
</vxe-column>
</vxe-table>
@ -90,15 +89,15 @@
</div>
<div class="tab">
<div>
<vxe-table show-overflow height="100%" :data="tableData" :border=true
<vxe-table show-overflow height="100%" :data="suppleInformation" :border=true
:tree-config="{ transform: true }" :scroll-y="{ gt: 20 }">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column field="a" sortable title="编码" width=""></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="c" sortable title="类型" width=""></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column field="type" sortable title="类型" width=""></vxe-column>
<vxe-column field="d" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="isEnable" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="f" sortable title="创建时间" width=""></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
@ -122,7 +121,29 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { onMounted, reactive, ref } from 'vue'
import { SuppleInformationApi, SuppleInformationInput, SuppleTypeApi, SuppleTypeOutput } from '/@/api-services';
import { getAPI } from '/@/utils/axios-utils';
//
let suppleType = ref([] as SuppleTypeOutput[])
const getSuppleType = async () => {
let res = await getAPI(SuppleTypeApi).apiSuppleTypeListGet();
suppleType.value = res.data.result!;
}
//
let suppleInformation = ref([] as SuppleInformationInput[])
const getSuppleInformation = async () => {
let res = await getAPI(SuppleInformationApi).apiSuppleInformationPagePost();
suppleInformation.value = res.data.result?.items!;
pageVO1.total = res.data.result?.total!;
}
onMounted(() => {
getSuppleType()
getSuppleInformation()
})
const formInline = reactive({
user: '',
@ -136,18 +157,10 @@ const onSubmit = () => {
import { ref } from 'vue'
const tableData = ref([
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
</script>

View File

@ -5,20 +5,20 @@
<el-row>
<el-col :span="8">
<el-form-item label="可用状态">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="shanghai" />
<el-select v-model="formInline.isEnable" placeholder="请选择" clearable>
<el-option label="启用" value="0" />
<el-option label="禁用" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称">
<el-input v-model="formInline.user" placeholder="请输入名称" clearable />
<el-input v-model="formInline.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="编码">
<el-input v-model="formInline.user" placeholder="请输入编码" clearable />
<el-input v-model="formInline.codeNum" placeholder="请输入编码" clearable />
</el-form-item>
</el-col>
</el-row>
@ -36,17 +36,17 @@
<div class="main-table common-box">
<div class="tab">
<vxe-table show-overflow height="100%" :data="tableData" :border=true :tree-config="{ transform: true }"
<vxe-table show-overflow height="100%" :data="brandDate" :border=true :tree-config="{ transform: true }"
:scroll-y="{ gt: 20 }">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column field="a" sortable title="编码" width=""></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column field="b" sortable title="公众号" width=""></vxe-column>
<vxe-column field="f" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="f" sortable title="备注" width=""></vxe-column>
<vxe-column field="f" sortable title="创建人" width=""></vxe-column>
<vxe-column field="f" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="f" sortable title="同步时间" width=""></vxe-column>
<vxe-column field="isEnable" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="remarks" sortable title="备注" width=""></vxe-column>
<vxe-column field="createUserName" sortable title="创建人" width=""></vxe-column>
<vxe-column field="createTime" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="updateTime" sortable title="同步时间" width=""></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
<vxe-button type="text">查看</vxe-button>
@ -67,30 +67,39 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { onMounted, reactive,ref } from 'vue'
import { BrandApi, BrandOutput } from '/@/api-services';
import { getAPI } from '/@/utils/axios-utils';
//
let brandDate = ref([] as BrandOutput[])
const getBrand = async() => {
let res = await getAPI(BrandApi).apiBrandPagePost();
brandDate.value = res.data.result?.items!;
pageVO1.total = res.data.result?.total!;
}
onMounted(() => {
getBrand()
})
const formInline = reactive({
user: '',
region: '',
date: '',
name:'',//
isEnable:"",//
codeNum:'',//
})
const onSubmit = () => {
console.log('submit!')
}
import { ref } from 'vue'
const tableData = ref([
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
</script>

View File

@ -5,20 +5,20 @@
<el-row>
<el-col :span="8">
<el-form-item label="可用状态">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="shanghai" />
<el-select v-model="formInline.isEnable" placeholder="请选择" clearable>
<el-option label="启用" value="0" />
<el-option label="禁用" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称">
<el-input v-model="formInline.user" placeholder="请输入名称" clearable />
<el-input v-model="formInline.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="编码">
<el-input v-model="formInline.user" placeholder="请输入编码" clearable />
<el-input v-model="formInline.codeNum" placeholder="请输入编码" clearable />
</el-form-item>
</el-col>
</el-row>
@ -47,10 +47,9 @@
<div class="main-table common-box">
<div class="tab-hed">
<el-select v-model="formInline.region" placeholder="分类" clearable style="width: 200px;">
<el-option label="所有" value="shanghai" />
<el-option label="成品" value="shanghai" />
<el-option label="成品非追溯" value="shanghai" />
<el-select v-model="formInline.checked" placeholder="分类" clearable style="width: 200px;">
<el-option label="所有" value="0" />
<el-option :label="item.name" :value="item.id" v-for="item,index in getCustonClassDate" :key="index"/>
</el-select>
<div>
<el-button type="success" link
@ -74,26 +73,26 @@
</div>
</div>
<div class="tab">
<vxe-table show-overflow height="100%" :data="tableData" :border=true :tree-config="{ transform: true }"
<vxe-table show-overflow height="100%" :data="customDate" :border=true :tree-config="{ transform: true }"
:scroll-y="{ gt: 20 }">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column field="a" sortable title="编码" width="120"></vxe-column>
<vxe-column field="b" sortable title="名称" width="120"></vxe-column>
<vxe-column field="c" sortable title="分类" width="120"></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width="120"></vxe-column>
<vxe-column field="name" sortable title="名称" width="120"></vxe-column>
<vxe-column field="classify" sortable title="分类" width="120"></vxe-column>
<vxe-column field="d" sortable title="年龄" width="120"></vxe-column>
<vxe-column field="d" sortable title="客户扩展字段整形2" width="180"></vxe-column>
<vxe-column field="e" sortable title="联系人" width="120"></vxe-column>
<vxe-column field="f" sortable title="品牌" width="120"></vxe-column>
<vxe-column field="f" sortable title="外部编号" width="150"></vxe-column>
<vxe-column field="f" sortable title="可用状态" width="120"></vxe-column>
<vxe-column field="age" sortable title="年龄" width="120"></vxe-column>
<vxe-column field="expandField" sortable title="客户扩展字段整形2" width="180"></vxe-column>
<vxe-column field="contactse" sortable title="联系人" width="120"></vxe-column>
<vxe-column field="brand" sortable title="品牌" width="120"></vxe-column>
<vxe-column field="externalNumberf" sortable title="外部编号" width="150"></vxe-column>
<vxe-column field="isEnable" sortable title="可用状态" width="120"></vxe-column>
<vxe-column field="f" sortable title="手机" width="120"></vxe-column>
<vxe-column field="f" sortable title="微信" width="120"></vxe-column>
<vxe-column field="f" sortable title="所在地区" width="120"></vxe-column>
<vxe-column field="f" sortable title="备注" width="120"></vxe-column>
<vxe-column field="f" sortable title="创建人" width="120"></vxe-column>
<vxe-column field="f" sortable title="创建时间" width="120"></vxe-column>
<vxe-column field="f" sortable title="同步时间" width="120"></vxe-column>
<vxe-column field="createUserName" sortable title="创建人" width="120"></vxe-column>
<vxe-column field="createTime" sortable title="创建时间" width="120"></vxe-column>
<vxe-column field="updateTime" sortable title="同步时间" width="120"></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
<vxe-button type="text">查看</vxe-button>
@ -114,12 +113,39 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { onMounted, reactive,ref } from 'vue'
import { getAPI } from '/@/utils/axios-utils';
import { CustomApi, CustonClassifyApi } from '/@/api-services/api';
import { CustomOutput, CustonClassifyOutput } from '/@/api-services/models';
//
let getCustonClassDate = ref([] as CustonClassifyOutput[]);
const getCustonClass = async() => {
let res = await getAPI(CustonClassifyApi).apiCustonClassifyListGet();
getCustonClassDate.value = res.data.result!;
}
//
let customDate = ref([] as CustomOutput[]);
const getCustom = async() => {
let res = await getAPI(CustomApi).apiCustomPagePost();
customDate.value = res.data.result?.items!;
pageVO1.total = res.data.result?.total!;
}
onMounted(() => {
getCustonClass()
getCustom()
})
const formInline = reactive({
user: '',
region: '',
date: '',
name:'',//
isEnable:"",//
codeNum:'',//
checked:''
})
const onSubmit = () => {
@ -127,17 +153,14 @@ const onSubmit = () => {
}
import { ref } from 'vue'
const tableData = ref([
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
</script>

View File

@ -5,20 +5,20 @@
<el-row>
<el-col :span="8">
<el-form-item label="可用状态">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="shanghai" />
<el-select v-model="formInline.isEnable" placeholder="请选择" clearable>
<el-option label="启用" :value="true" />
<el-option label="禁用" :value="false" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称">
<el-input v-model="formInline.user" placeholder="请输入名称" clearable />
<el-input v-model="formInline.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="编码">
<el-input v-model="formInline.user" placeholder="请输入编码" clearable />
<el-input v-model="formInline.codeNum" placeholder="请输入编码" clearable />
</el-form-item>
</el-col>
</el-row>
@ -26,18 +26,18 @@
<el-col :span="8">
<el-form-item label="规格型号">
<el-input v-model="formInline.user" placeholder="请输入" clearable />
<el-input v-model="formInline.specifications" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="助记码">
<el-input v-model="formInline.user" placeholder="请输入" clearable />
<el-input v-model="formInline.simpleNumber" placeholder="请输入" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="品牌">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="海天" value="shanghai" />
<el-select v-model="formInline.brand" placeholder="请选择" clearable>
<el-option label="海天" value="0" />
</el-select>
</el-form-item>
</el-col>
@ -68,9 +68,8 @@
<div class="main-table common-box">
<div class="tab-hed">
<el-select v-model="formInline.region" placeholder="分类" clearable style="width: 200px;">
<el-option label="所有" value="shanghai" />
<el-option label="成品" value="shanghai" />
<el-option label="成品非追溯" value="shanghai" />
<el-option label="所有" value="0" />
<el-option :label="item.name" :value="item.id" v-for="item,index in fyListData" :key="index"/>
</el-select>
<div>
<el-button type="success" link
@ -96,12 +95,12 @@
<div class="tab">
<vxe-table show-overflow height="100%" :data="tableData" :border=true :tree-config="{ transform: true }"
:scroll-y="{ gt: 20 }">
<vxe-column field="a" sortable title="编码" width=""></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="c" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column field="isEnable" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="d" sortable title="仓库条码" width=""></vxe-column>
<vxe-column field="e" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="" sortable title="仓库条码" width=""></vxe-column>
<vxe-column field="createTime" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="f" sortable title="仓库扩展字符串扩展字段1" width=""></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
@ -123,53 +122,58 @@
</template>
<script setup lang="ts">
import { onMounted, reactive } from 'vue';
import {feature, getAPI } from '/@/utils/axios-utils';
import { MaterialClassifyApi } from '/@/api-services/api';
import { onMounted, reactive ,ref} from 'vue';
import {getAPI } from '/@/utils/axios-utils';
import { MaterialClassifyApi,MaterialsApi } from '/@/api-services/api';
import { MaterialsOutput } from '/@/api-services/models';
//
let fyListData = ref();
const fyListGet = async () => {
let res = await getAPI(MaterialClassifyApi).apiMaterialClassifyListGet();
console.log(res)
if(res.data.code === 200){
fyListData.value = res.data.result;
}
}
onMounted( () => {
fyListGet()
fyListGet();
MaterialsPage();
} )
//
const formInline = reactive({
user: '',
region: '',
date: '',
name:'',//
brand:'',//
isEnable:"",//
codeNum:'',//
simpleNumber:"",//
specifications:"",//
})
const tableData = ref<MaterialsOutput[]>([]);
const MaterialsPage = async () => {
let res = await getAPI(MaterialsApi).apiMaterialsPagePost({page:1,pageSize:10});
if(res.data.code === 200){
pageVO1.total = res.data.result?.total!;
tableData.value = res.data.result?.items!;
}
}
const onSubmit = () => {
console.log('submit!')
}
import { ref } from 'vue'
const tableData = ref([
{
id: 1,
a: 'default',
b: '默认仓库',
c: ' 启用',
d: '00-00-00-00-00',
e: ' 2021-05-27 03:26:52',
f: "",
},
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
</script>

View File

@ -48,20 +48,20 @@
</div>
<div class="main-table common-box">
<div class="tab">
<vxe-table show-overflow height="100%" :data="tableData" :border=true :tree-config="{ transform: true }"
<vxe-table show-overflow height="100%" :data="productionDate" :border=true :tree-config="{ transform: true }"
:scroll-y="{ gt: 20 }">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column type="seq" title="序号" width="70" sortable></vxe-column>
<vxe-column field="a" sortable title="名称" width="120"></vxe-column>
<vxe-column field="b" sortable title="编码" width="200"></vxe-column>
<vxe-column field="name" sortable title="名称" width="120"></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width="200"></vxe-column>
<vxe-column field="c" sortable title="状态" width="100"></vxe-column>
<vxe-column field="d" sortable title="仓库" width="100"></vxe-column>
<vxe-column field="e" sortable title="创建人" width="100"></vxe-column>
<vxe-column field="e" sortable title="创建时间" width="130"></vxe-column>
<vxe-column field="e" sortable title="修改人" width="100"></vxe-column>
<vxe-column field="e" sortable title="修改时间" width="120"></vxe-column>
<vxe-column field="e" sortable title="类型" width="110"></vxe-column>
<vxe-column field="e" sortable title="企业信息" width="120"></vxe-column>
<vxe-column field="createUserName" sortable title="创建人" width="100"></vxe-column>
<vxe-column field="createTime" sortable title="创建时间" width="130"></vxe-column>
<vxe-column field="updateUserName" sortable title="修改人" width="100"></vxe-column>
<vxe-column field="updateTime" sortable title="修改时间" width="120"></vxe-column>
<vxe-column field="type" sortable title="类型" width="110"></vxe-column>
<vxe-column field="information" sortable title="企业信息" width="120"></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
@ -86,9 +86,25 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { regionData } from 'element-china-area-data'
const handleChange = (value) => {
import { onMounted, reactive,ref } from 'vue'
import { regionData } from 'element-china-area-data';
import { getAPI } from '/@/utils/axios-utils';
import { ProductionApi } from '/@/api-services/api';
import { ProductionOutput } from '/@/api-services/models';
//
let productionDate = ref([] as ProductionOutput[]);
const getProduction = async () => {
let res = await getAPI(ProductionApi).apiProductionPagePost();
productionDate.value = res.data.result?.items!;
pageVO1.total = res.data.result?.total!;
}
onMounted(() => {
getProduction()
})
const handleChange = (value:any) => {
console.log(value)
}
const formInline = reactive({
@ -103,16 +119,12 @@ const onSubmit = () => {
}
let checked = ref()
import { ref } from 'vue'
const tableData = ref([
])
let checked = ref();
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
</script>

View File

@ -5,20 +5,20 @@
<el-row>
<el-col :span="8">
<el-form-item label="可用状态">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="shanghai" />
<el-select v-model="formInline.isEnable" placeholder="请选择" clearable>
<el-option label="启用" value="0" />
<el-option label="禁用" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称">
<el-input v-model="formInline.user" placeholder="请输入名称" clearable />
<el-input v-model="formInline.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="编码">
<el-input v-model="formInline.user" placeholder="请输入编码" clearable />
<el-input v-model="formInline.codeNum" placeholder="请输入编码" clearable />
</el-form-item>
</el-col>
</el-row>
@ -35,14 +35,19 @@
</div>
<div class="main-table common-box">
<div class="tab">
<vxe-table show-overflow height="100%" :data="tableData" :border=true :tree-config="{ transform: true }"
<vxe-table show-overflow height="100%" :data="warehouseDate" :border=true :tree-config="{ transform: true }"
:scroll-y="{ gt: 20 }">
<vxe-column field="a" sortable title="编码" width=""></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="c" sortable title="可用状态" width=""></vxe-column>
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column sortable title="可用状态" width="">
<template #default="{ row }">
{{ row.isEnable ? '启用' : '关闭' }}
</template>
</vxe-column>
<vxe-column field="d" sortable title="仓库条码" width=""></vxe-column>
<vxe-column field="e" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="barCode" sortable title="仓库条码" width=""></vxe-column>
<vxe-column field="createTime" sortable title="创建时间" width=""></vxe-column>
<vxe-column field="f" sortable title="仓库扩展字符串扩展字段1" width=""></vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
@ -63,41 +68,40 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { onMounted, reactive,ref } from 'vue'
import { getAPI } from '/@/utils/axios-utils';
import { WarehouseApi } from '/@/api-services/api';
import { WarehouseOutput } from '/@/api-services/models';
const formInline = reactive({
user: '',
region: '',
date: '',
name:'',//
isEnable:"",//
codeNum:'',//
})
//
let warehouseDate = ref([] as WarehouseOutput[])
const WarehousePage = async () => {
let res = await getAPI(WarehouseApi).apiWarehousePagePost();
warehouseDate.value = res.data.result?.items!;
pageVO1.total = res.data.result?.total!;
}
const onSubmit = () => {
console.log('submit!')
}
import { ref } from 'vue'
const tableData = ref([
{
id:1,
a:'default',
b:'默认仓库',
c:' 启用',
d:'00-00-00-00-00',
e:' 2021-05-27 03:26:52',
f:"",
},
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
onMounted(() => {
WarehousePage()
})
</script>
<style lang="scss" scoped>

View File

@ -5,20 +5,20 @@
<el-row>
<el-col :span="8">
<el-form-item label="可用状态">
<el-select v-model="formInline.region" placeholder="请选择" clearable>
<el-option label="启用" value="shanghai" />
<el-option label="禁用" value="shanghai" />
<el-select v-model="formInline.isEnable" placeholder="请选择" clearable>
<el-option label="启用" value="0" />
<el-option label="禁用" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="名称">
<el-input v-model="formInline.user" placeholder="请输入名称" clearable />
<el-input v-model="formInline.name" placeholder="请输入名称" clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="编码">
<el-input v-model="formInline.user" placeholder="请输入编码" clearable />
<el-input v-model="formInline.codeNum" placeholder="请输入编码" clearable />
</el-form-item>
</el-col>
</el-row>
@ -26,7 +26,7 @@
<el-col :span="8">
<el-form-item label="简码">
<el-input v-model="formInline.user" placeholder="请输入" clearable />
<el-input v-model="formInline.brevityCode" placeholder="请输入" clearable />
</el-form-item>
</el-col>
</el-row>
@ -73,15 +73,15 @@
</div>
</div>
<div style="height: 100%;">
<vxe-table show-overflow height="100%" :data="tableData" :border=true
<vxe-table show-overflow height="100%" :data="data.unitGroup" :border=true
:tree-config="{ transform: true }" :scroll-y="{ gt: 20 }">
<vxe-column type="radio" title="单选" width="80" fixed="left"></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column title="状态" width="80" fixed="right" show-overflow>
<template #default="{ row }">
<vxe-button type="text">查看</vxe-button>
{{ row.isEnable ? '启用' : '关闭' }}
<!-- <vxe-button type="text" icon="vxe-icon-delete"></vxe-button> -->
</template>
</vxe-column>
@ -90,17 +90,27 @@
</div>
<div class="tab">
<div>
<vxe-table show-overflow height="100%" :data="tableData" :border=true
<vxe-table show-overflow height="100%" :data="data.unit" :border=true
:tree-config="{ transform: true }" :scroll-y="{ gt: 20 }">
<vxe-column type="checkbox" width="60" fixed="left"></vxe-column>
<vxe-column field="a" sortable title="编码" width=""></vxe-column>
<vxe-column field="b" sortable title="名称" width=""></vxe-column>
<vxe-column field="c" sortable title="代码" width=""></vxe-column>
<vxe-column field="codeNum" sortable title="编码" width=""></vxe-column>
<vxe-column field="name" sortable title="名称" width=""></vxe-column>
<vxe-column field="code" sortable title="代码" width=""></vxe-column>
<vxe-column field="d" sortable title="可用状态" width=""></vxe-column>
<vxe-column field="e" sortable title="换算率" width=""></vxe-column>
<vxe-column field="f" sortable title="作为基本单位" width=""></vxe-column>
<vxe-column sortable title="可用状态" width="">
<template #default="{ row }">
{{ row.isEnable ? '启用' : '关闭' }}
<!-- <vxe-button type="text" icon="vxe-icon-delete"></vxe-button> -->
</template>
</vxe-column>
<vxe-column field="rate" sortable title="换算率" width=""></vxe-column>
<vxe-column field="isBaseUnit" sortable title="作为基本单位" width="">
<template #default="{ row }">
{{ row.isBaseUnit ? '是' : '否' }}
<!-- <vxe-button type="text" icon="vxe-icon-delete"></vxe-button> -->
</template>
</vxe-column>
<vxe-column title="操作" width="200" fixed="right" show-overflow>
<template #default="{ row }">
<vxe-button type="text">查看</vxe-button>
@ -124,32 +134,57 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import { onMounted, reactive, ref } from 'vue'
import { getAPI } from '/@/utils/axios-utils';
import { SysUnitApi, SysUnitGroupApi } from '/@/api-services/api';
import { SqlSugarPagedListSysUnitOutput, SysUnitGroupOutput } from '/@/api-services/models';
let data = reactive({
unit: [] as SqlSugarPagedListSysUnitOutput[],//
unitGroup: [] as SysUnitGroupOutput[],//
});
//
const unitGroup = async () => {
let res = await getAPI(SysUnitGroupApi).apiSysUnitGroupListGet();
data.unitGroup = res.data.result || [];
}
const formInline = reactive({
user: '',
region: '',
date: '',
name:'',//
isEnable:"",//
codeNum:'',//
brevityCode:'',//
})
//
const unitPage = async () => {
let res = await getAPI(SysUnitApi).apiSysUnitPagePost({page:1,pageSize:10});
data.unit = res.data.result?.items as any;
pageVO1.total = res.data.result?.total!;
}
const onSubmit = () => {
console.log('submit!')
}
import { ref } from 'vue'
const tableData = ref([
])
const pageVO1 = reactive({
currentPage: 1,
pageSize: 30,
total: 8
pageSize: 10,
total: 0
})
onMounted(() => {
unitGroup()
unitPage()
})
</script>