Commit b13106f6 by wuqian

入库单查询

parent 57115abd
...@@ -9,6 +9,7 @@ import { ...@@ -9,6 +9,7 @@ import {
ILocation, ILocation,
AnyObject, AnyObject,
InterProductList, InterProductList,
ExportInWarehouseInfo
} from '@/types/api/warehouse' } from '@/types/api/warehouse'
export interface LogListData { export interface LogListData {
createTime: string createTime: string
...@@ -80,7 +81,7 @@ export interface WarehouseInventory { ...@@ -80,7 +81,7 @@ export interface WarehouseInventory {
occupyInventory: string occupyInventory: string
inventoryStart: string inventoryStart: string
inventoryEnd: string inventoryEnd: string
productNumber: string productNo: string
freezeInventory: string freezeInventory: string
inventory: string inventory: string
usableInventoryStart: string usableInventoryStart: string
...@@ -313,6 +314,12 @@ export function InRecordBatchCheckPrintApi(ids: string) { ...@@ -313,6 +314,12 @@ export function InRecordBatchCheckPrintApi(ids: string) {
}, },
) )
} }
export function warehouseInRecordInventory(data: ExportInWarehouseInfo) {
return axios.post<never, BasePaginationData<never>>(
'factory/warehouseInRecord/inventory',
data,
)
}
export function warehouseInRecordListPageApi( export function warehouseInRecordListPageApi(
data: warehouseSearchForm, data: warehouseSearchForm,
currentPage: number, currentPage: number,
......
...@@ -3,11 +3,11 @@ export type AnyObject = { ...@@ -3,11 +3,11 @@ export type AnyObject = {
} }
export interface warehouseSearchForm { export interface warehouseSearchForm {
billStatus?: string billStatus?: string
batchNumber?: string
createTimeEnd?: string createTimeEnd?: string
createTimeStart?: string createTimeStart?: string
orderNumber?: string inNo?: string
sku?: string outNo?: string
warehouseSku?: string
warehouseId?: number | string warehouseId?: number | string
id?: number id?: number
} }
...@@ -56,6 +56,11 @@ export interface InterWarehousePage extends InterWarehouseBase {} ...@@ -56,6 +56,11 @@ export interface InterWarehousePage extends InterWarehouseBase {}
export interface InterWarehouseDetail extends InterWarehouseBase { export interface InterWarehouseDetail extends InterWarehouseBase {
productList: InterProductList[] productList: InterProductList[]
} }
export interface ExportInWarehouseInfo extends warehouseSearchForm {
total?: number
idList?: string | number[]
showDetail?: boolean
}
export interface InterWarehouseTree { export interface InterWarehouseTree {
id?: number id?: number
code?: string | null code?: string | null
......
...@@ -63,35 +63,27 @@ ...@@ -63,35 +63,27 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="单号"> <ElFormItem label="出库单号">
<ElInput <ElInput
v-model="searchForm.orderNumber" v-model.trim="searchForm.outNo"
clearable clearable
placeholder="请输入出库单号" placeholder="请输入出库单号"
style="width: 160px" style="width: 160px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem label="交货单号">
<ElInput
v-model="searchForm.batchNumber"
clearable
placeholder="请输入交货单号"
style="width: 160px"
/>
</ElFormItem>
<ElFormItem style="margin-right: 10px" label="SKU"> <ElFormItem style="margin-right: 10px" label="SKU">
<ElInput <ElInput
v-model="searchForm.sku" v-model.trim="searchForm.warehouseSku"
clearable clearable
placeholder="请输入SKU" placeholder="请输入SKU"
style="width: 160px" style="width: 160px"
/> />
</ElFormItem> </ElFormItem>
<ElFormItem style="margin-right: 10px" label="ID"> <ElFormItem style="margin-right: 10px" label="出库单ID">
<ElInput <ElInput
v-model="searchForm.id" v-model.trim="searchForm.id"
clearable clearable
placeholder="请输入ID" placeholder="请输入出库单ID"
style="width: 160px" style="width: 160px"
/> />
</ElFormItem> </ElFormItem>
...@@ -439,7 +431,7 @@ ...@@ -439,7 +431,7 @@
label-width="90px" label-width="90px"
> >
<ElFormItem label="出库单号" prop="account"> <ElFormItem label="出库单号" prop="account">
<ElInput v-model="editForm.outNo" clearable disabled /> <ElInput v-model.trim="editForm.outNo" clearable disabled />
</ElFormItem> </ElFormItem>
<ElFormItem label="工厂:" prop="factoryCode"> <ElFormItem label="工厂:" prop="factoryCode">
<span>{{ editForm.factoryCode }}</span> <span>{{ editForm.factoryCode }}</span>
...@@ -463,7 +455,7 @@ ...@@ -463,7 +455,7 @@
</ElFormItem> </ElFormItem>
<ElFormItem label="备注" prop="remark" style="width: 45%"> <ElFormItem label="备注" prop="remark" style="width: 45%">
<ElInput <ElInput
v-model="editForm.remark" v-model.trim="editForm.remark"
placeholder="请输入备注" placeholder="请输入备注"
clearable clearable
/> />
...@@ -571,7 +563,7 @@ ...@@ -571,7 +563,7 @@
prop="remark" prop="remark"
> >
<template #default="{ row }"> <template #default="{ row }">
<ElInput v-model="row.remark" clearable size="small" /> <ElInput v-model.trim="row.remark" clearable size="small" />
</template> </template>
</ElTableColumn> </ElTableColumn>
</ElTable> </ElTable>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</ElFormItem> </ElFormItem>
<ElFormItem label="入库单号"> <ElFormItem label="入库单号">
<ElInput <ElInput
v-model="searchForm.orderNumber" v-model.trim="searchForm.inNo"
clearable clearable
placeholder="请输入入库单号" placeholder="请输入入库单号"
style="width: 160px" style="width: 160px"
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</ElFormItem> </ElFormItem>
<ElFormItem style="margin-right: 10px" label="SKU"> <ElFormItem style="margin-right: 10px" label="SKU">
<ElInput <ElInput
v-model="searchForm.sku" v-model="searchForm.warehouseSku"
clearable clearable
placeholder="请输入SKU" placeholder="请输入SKU"
style="width: 160px" style="width: 160px"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</ElFormItem> </ElFormItem>
<ElFormItem style="margin-right: 10px" label="入库单ID"> <ElFormItem style="margin-right: 10px" label="入库单ID">
<ElInput <ElInput
v-model="searchForm.id" v-model.trim="searchForm.id"
clearable clearable
placeholder="请输入入库单ID" placeholder="请输入入库单ID"
style="width: 160px" style="width: 160px"
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
label-width="90px" label-width="90px"
> >
<ElFormItem label="入库单号" prop="account"> <ElFormItem label="入库单号" prop="account">
<ElInput v-model="editForm.inNo" clearable disabled /> <ElInput v-model.trim="editForm.inNo" clearable disabled />
</ElFormItem> </ElFormItem>
<ElFormItem label="工厂:" prop="factoryCode"> <ElFormItem label="工厂:" prop="factoryCode">
<span>{{ editForm.factoryCode }}</span> <span>{{ editForm.factoryCode }}</span>
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
</ElFormItem> </ElFormItem>
<ElFormItem label="备注" prop="remark" style="width: 45%"> <ElFormItem label="备注" prop="remark" style="width: 45%">
<ElInput <ElInput
v-model="editForm.remark" v-model.trim="editForm.remark"
placeholder="请输入备注" placeholder="请输入备注"
clearable clearable
/> />
...@@ -598,7 +598,7 @@ ...@@ -598,7 +598,7 @@
prop="remark" prop="remark"
> >
<template #default="{ row }"> <template #default="{ row }">
<ElInput v-model="row.remark" clearable size="small" /> <ElInput v-model.trim="row.remark" clearable size="small" />
</template> </template>
</ElTableColumn> </ElTableColumn>
</ElTable> </ElTable>
...@@ -829,6 +829,7 @@ import { ...@@ -829,6 +829,7 @@ import {
warehouseInfo, warehouseInfo,
InRecordBatchCheckPrintApi, InRecordBatchCheckPrintApi,
factoryWarehouseInventoryPrint, factoryWarehouseInventoryPrint,
warehouseInRecordInventory,
} from '@/api/warehouse' } from '@/api/warehouse'
import { filePath } from '@/api/axios.ts' import { filePath } from '@/api/axios.ts'
import BigNumber from 'bignumber.js' import BigNumber from 'bignumber.js'
...@@ -1002,7 +1003,7 @@ const { ...@@ -1002,7 +1003,7 @@ const {
}, },
page, page,
pageSize, pageSize,
).then((res) => res.data) as never, ).then((res) => res.data),
}) })
const setCostPrice = (item: InterProductList) => { const setCostPrice = (item: InterProductList) => {
...@@ -1047,8 +1048,6 @@ const printProductTag = async () => { ...@@ -1047,8 +1048,6 @@ const printProductTag = async () => {
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
console.log(selections.value, '@', printData.value)
} }
async function handlePrintProductTag() { async function handlePrintProductTag() {
const flag = printData.value.every( const flag = printData.value.every(
...@@ -1125,106 +1124,42 @@ const exportForm = ref({ ...@@ -1125,106 +1124,42 @@ const exportForm = ref({
const handleExport = () => { const handleExport = () => {
exportVisible.value = true exportVisible.value = true
} }
const submitExportForm = () => { const submitExportForm = async () => {
if (exportForm.value.resource === '') { if (exportForm.value.resource === '') {
return ElMessage.error('请选择导出类型') return ElMessage.error('请选择导出类型')
} }
// let purchaseIds = [], let purchaseIds = ''
// otherIds = [], let exportTotal: number | undefined = undefined
// total = 0, const params: AnyObject = {}
// params = {} const resourceType = Number(exportForm.value.resource)
// if (exportForm.value.resource === 0) { if (resourceType === 0) {
// purchaseIds = userData.value purchaseIds = tableData.value
// .filter((el) => el.dataType === 0) .map((el: InterWarehousePage) => el.id)
// .map((el) => el.id) .join(',')
// .join(',') } else if (resourceType === 1) {
// otherIds = userData.value purchaseIds = selections.value
// .filter((el) => el.dataType === 1) .map((el: InterWarehousePage) => el.id)
// .map((el) => el.id) .join(',')
// .join(',') } else if (resourceType === 2) {
// } else if (exportForm.value.resource === 1) { purchaseIds = ''
// purchaseIds = selections.value exportTotal = total.value
// .filter((el) => el.dataType === 0) params.billStatus = nodeCode.value == 'all' ? 'all' : nodeCode.value
// .map((el) => el.id) }
// .join(',') params.idList = purchaseIds
// otherIds = selections.value if (exportTotal !== undefined) {
// .filter((el) => el.dataType === 1) params.total = exportTotal
// .map((el) => el.id) }
// .join(',') try {
// } else { const res = await warehouseInRecordInventory({
// purchaseIds = '' showDetail: exportForm.value.delivery,
// otherIds = '' ...params,
// // total = this.paginationOptions.total ...searchForm.value,
// } })
// params = { window.open(filePath + res.message, '_blank')
// purchaseIds, exportVisible.value = false
// otherIds, } catch (e) {
// total, exportVisible.value = false
// } }
// if (exportForm.value.resource !== 2) {
// delete params.total
// } else {
// // params.billStatus = this.billStatus
// // params.type = this.treeType || ''
// // params.otherStatus = this.otherStatus
// if (
// this.treeLabel.indexOf(this.$t('待入库')) !== -1 ||
// this.treeLabel.indexOf(this.$t('已入库')) !== -1
// ) {
// params.purchaseAll = true
// params.otherAll = true
// }
// if (
// this.treeLabel.indexOf(this.$t('采购')) !== -1 ||
// this.treeLabel.indexOf(this.$t('生产')) !== -1
// ) {
// params.purchaseAll = true
// }
// if (this.treeLabel.indexOf(this.$t('其他')) !== -1) {
// params.otherAll = true
// }
// if (this.treeLabel.indexOf(this.$t('归档')) !== -1) {
// params.purchaseAll = true
// }
// if (this.treeLabel.indexOf(this.$t('作废')) !== -1) {
// params.purchaseAll = true
// params.otherAll = true
// }
// }
// const loading = this.$loading({
// background: 'rgba(0, 0, 0, 0.3)',
// })
// Axios.post(
// window.apiHostSetting.VUE_APP_API_URL +
// 'api/purchaseStoreBill/exportPurchaseExcel',
// {
// includeSku: exportForm.value.delivery,
// ...params,
// ...this.searchForm,
// },
// {
// headers: {
// 'jwt-token': localStorage.getItem('token'),
// },
// },
// )
// .then((res) => {
// console.log(filePath)
// window.open(filePath + res.data.message)
// exportVisible.value = false
// })
// .finally(() => {
// loading.close()
// })
// try {
// const res = await exportOrder({
// ids: selection.value.map((el) => el.id),
// status: statusCode.value,
// })
// window.open(filePath + res.message)
// } catch (e) {
// // showError(e)
// }
} }
const getWarehouseList = async () => { const getWarehouseList = async () => {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment