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

@ -6,27 +6,27 @@
* @Copyright * @Copyright
*/ */
import {postRequest, getRequest, getDownload} from '/@/lib/axios'; import {postRequest, getRequest, getDownload} from '/@/lib/axios';
import {AddressAddOrUpdateForm, AddressQueryForm,} from "/@/api/business/wms/base/address/address";
export const addressApi = { export const addressApi = {
/** /**
* @author hj * @author hj
*/ */
queryPage: (param:AddressQueryForm) => { queryPage: (param: any) => {
return postRequest('/address/queryPage', param); return postRequest('/address/queryPage', param);
}, },
/** /**
* @author hj * @author hj
*/ */
add: (param:AddressAddOrUpdateForm) => { add: (param: any) => {
return postRequest('/address/add', param); return postRequest('/address/add', param);
}, },
/** /**
* @author hj * @author hj
*/ */
update: (param:AddressAddOrUpdateForm) => { update: (param: any) => {
return postRequest('/address/update', param); return postRequest('/address/update', param);
}, },
@ -48,14 +48,14 @@ export const addressApi = {
/** /**
* @author hj * @author hj
*/ */
queryAddress: (param: object) => { queryAddress: (param: any) => {
return postRequest('/address/queryAddress', param); return postRequest('/address/queryAddress', param);
}, },
/** /**
* @author hj * @author hj
*/ */
importAddress: (file: object) => { importAddress: (file: any) => {
return postRequest('/address/importAddress', file); return postRequest('/address/importAddress', file);
}, },

View File

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