diff --git a/src/views/inventory/InventoryList.vue b/src/views/inventory/InventoryList.vue index 85d12e1..7291b0f 100644 --- a/src/views/inventory/InventoryList.vue +++ b/src/views/inventory/InventoryList.vue @@ -89,10 +89,8 @@ import { columns } from './Inventory.data'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Inventory.api'; import InventoryModal from './components/InventoryModal.vue'; - import { useUserStore } from '/@/store/modules/user'; - import { useMessage } from '/@/hooks/web/useMessage'; import { getDateByPicker } from '/@/utils'; - import { JDictSelectTag, JSearchSelect } from '@/components/Form'; + import { JDictSelectTag } from '@/components/Form'; import ItemSelect from '@/views/base/item/components/ItemSelect.vue'; import PointSelect from '@/views/base/point/components/PointSelect.vue'; import StockSelect from '@/views/base/stock/components/StockSelect.vue'; @@ -103,10 +101,8 @@ const queryParam = reactive({}); const toggleSearchStatus = ref(false); const registerModal = ref(); - const userStore = useUserStore(); - const { createMessage } = useMessage(); //注册table数据 - const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ + const { tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { title: '库存表', api: list, @@ -117,6 +113,10 @@ width: 120, fixed: 'right', }, + defSort: { + column: 'stockId', + order: 'asc', + }, beforeFetch: async (params) => { for (let key in fieldPickers) { if (queryParam[key] && fieldPickers[key]) { diff --git a/src/views/receive/asn/Asn.api.ts b/src/views/receive/asn/Asn.api.ts index 3a93fe4..6ef8215 100644 --- a/src/views/receive/asn/Asn.api.ts +++ b/src/views/receive/asn/Asn.api.ts @@ -13,6 +13,8 @@ enum Api { exportXls = '/receive/asn/exportXls', queryDataById = '/receive/asn/queryById', asnDetailList = '/receive/asn/queryAsnDetailByMainId', + receiveAsn = '/receive/asn/receiveAsn', + receiveBack = '/receive/asn/receiveBack', } /** * 导出api @@ -69,7 +71,7 @@ export const batchDelete = (params, handleSuccess) => { * @param params */ export const saveOrUpdate = (params, isUpdate) => { - let url = isUpdate ? Api.edit : Api.save; + const url = isUpdate ? Api.edit : Api.save; return defHttp.post({url: url, params}); } @@ -79,3 +81,22 @@ export const saveOrUpdate = (params, isUpdate) => { */ export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }}); +/** + * 整单入库 + * @param params + */ +export const receiveAsn = (id,handleSuccess) => { + return defHttp.get({ url: Api.receiveAsn, params: { id } }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +/** + * 回传 + * @param params + */ +export const receiveBack = (id,handleSuccess) => { + return defHttp.get({ url: Api.receiveBack, params: { id } }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; diff --git a/src/views/receive/asn/Asn.data.ts b/src/views/receive/asn/Asn.data.ts index 8c815f7..fcea597 100644 --- a/src/views/receive/asn/Asn.data.ts +++ b/src/views/receive/asn/Asn.data.ts @@ -44,7 +44,7 @@ export const columns: BasicColumn[] = [ title: '单据类型', align: 'center', dataIndex: 'orderType_dictText', - width: '80px', + width: '110px', }, { title: '需求数量', diff --git a/src/views/receive/asn/AsnList.vue b/src/views/receive/asn/AsnList.vue index a9f56e6..983ced8 100644 --- a/src/views/receive/asn/AsnList.vue +++ b/src/views/receive/asn/AsnList.vue @@ -36,13 +36,12 @@ - - + @@ -51,7 +50,29 @@