no message
parent
4f93f73786
commit
36025a41df
|
|
@ -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', {});
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue