no message
							parent
							
								
									4f93f73786
								
							
						
					
					
						commit
						36025a41df
					
				| 
						 | 
					@ -5,28 +5,28 @@
 | 
				
			||||||
 * @Date:      2024-12-26 15:35:23
 | 
					 * @Date:      2024-12-26 15:35:23
 | 
				
			||||||
 * @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);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,7 +63,7 @@ export const addressApi = {
 | 
				
			||||||
     * 导出  @author  hj
 | 
					     * 导出  @author  hj
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    exportAddress: () => {
 | 
					    exportAddress: () => {
 | 
				
			||||||
        return getDownload('/address/exportAddress',{});
 | 
					        return getDownload('/address/exportAddress', {});
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue