no message

main
HUOJIN\霍先森 2025-04-20 18:17:09 +08:00
parent 4f93f73786
commit 36025a41df
2 changed files with 18 additions and 21 deletions

View File

@ -5,28 +5,28 @@
* @Date: 2024-12-26 15:35:23
* @Copyright
*/
import {postRequest, getRequest,getDownload} from '/@/lib/axios';
import {AddressAddOrUpdateForm, AddressQueryForm,} from "/@/api/business/wms/base/address/address";
import {postRequest, getRequest, getDownload} from '/@/lib/axios';
export const addressApi = {
/**
* @author hj
*/
queryPage: (param:AddressQueryForm) => {
queryPage: (param: any) => {
return postRequest('/address/queryPage', param);
},
/**
* @author hj
*/
add: (param:AddressAddOrUpdateForm) => {
add: (param: any) => {
return postRequest('/address/add', param);
},
/**
* @author hj
*/
update: (param:AddressAddOrUpdateForm) => {
update: (param: any) => {
return postRequest('/address/update', param);
},
@ -48,14 +48,14 @@ export const addressApi = {
/**
* @author hj
*/
queryAddress: (param: object) => {
queryAddress: (param: any) => {
return postRequest('/address/queryAddress', param);
},
/**
* @author hj
*/
importAddress: (file: object) => {
importAddress: (file: any) => {
return postRequest('/address/importAddress', file);
},
@ -63,7 +63,7 @@ export const addressApi = {
* @author hj
*/
exportAddress: () => {
return getDownload('/address/exportAddress',{});
return getDownload('/address/exportAddress', {});
}
};

View File

@ -168,7 +168,7 @@
</template>
<script setup lang="ts">
import {reactive, ref, onMounted} from 'vue';
import {message, Modal, UploadFile, TableColumnType} from 'ant-design-vue';
import {message, Modal, UploadFile} from 'ant-design-vue';
import {SmartLoading} from '/@/components/framework/smart-loading';
import {addressApi} from '/@/api/business/wms/base/address/address-api';
import {PAGE_SIZE_OPTIONS} from '/@/constants/common-const';
@ -178,17 +178,16 @@ import AddressForm from '/@/views/business/wms/base/address/address-form.vue';
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
import AddressSelect from "/@/views/business/wms/base/address/address-select.vue";
import {fileApi} from "/@/api/support/file-api";
import {AddressAddOrUpdateForm, AddressQueryForm, AddressTableDate} from "/@/api/business/wms/base/address/address";
// ---------------------------- ----------------------------
// loading
const tableLoading = ref(false);
//
const tableData = ref(<AddressTableDate[]>[]);
const tableData = ref([]);
//
const total = ref(0);
//
const columns = ref<TableColumnType<AddressTableDate>[]>([
const columns = ref([
{
title: '收货地址id',
dataIndex: 'addressId',
@ -230,12 +229,12 @@ const columns = ref<TableColumnType<AddressTableDate>[]>([
// ---------------------------- ----------------------------
// form
const queryFormState: AddressQueryForm = {
const queryFormState = {
addressId: undefined, //
pageNum: 1,
pageSize: 10,
};
const queryForm = reactive<AddressQueryForm>({...queryFormState});
const queryForm = reactive({...queryFormState});
//
function resetQuery() {
@ -252,10 +251,8 @@ function onSearch() {
}
//
function changeAddressSelect(selectValue: { addressId: number }) {
if (selectValue) {
queryForm.addressId = selectValue.addressId;
}
function changeAddressSelect(selectValue: any) {
queryForm.addressId = selectValue?.addressId;
}
//
@ -276,13 +273,13 @@ async function queryData() {
// ---------------------------- / ----------------------------
const formRef = ref();
function showForm(data: AddressAddOrUpdateForm) {
function showForm(data:any) {
formRef.value.show(data);
}
// ---------------------------- ----------------------------
//
function onDelete(data: AddressTableDate) {
function onDelete(data:any) {
Modal.confirm({
title: '提示',
content: '确定要删除选吗?',
@ -298,7 +295,7 @@ function onDelete(data: AddressTableDate) {
}
//
async function requestDelete(data:AddressTableDate) {
async function requestDelete(data:any) {
SmartLoading.show();
try {
await addressApi.delete(data.addressId);