Commit 57115abd by wuqian

入库单6.3

parent 7c048fda
...@@ -227,7 +227,6 @@ export function factoryWarehouseInventoryPrint(data: PrintData) { ...@@ -227,7 +227,6 @@ export function factoryWarehouseInventoryPrint(data: PrintData) {
data, data,
) )
} }
export function createPositionApi(data: positionInfo) { export function createPositionApi(data: positionInfo) {
return axios.post<never, BaseRespData<never>>( return axios.post<never, BaseRespData<never>>(
'/factoryWarehouseLocation/add', '/factoryWarehouseLocation/add',
...@@ -305,9 +304,15 @@ export function deleteWarehouseInventory(ids: string) { ...@@ -305,9 +304,15 @@ export function deleteWarehouseInventory(ids: string) {
}, },
) )
} }
// 入库单 // 入库单
export function InRecordBatchCheckPrintApi(ids: string) {
return axios.get<never, BaseRespData<never[]>>(
'factory/warehouseInRecord/batchCheckPrint',
{
params: { ids },
},
)
}
export function warehouseInRecordListPageApi( export function warehouseInRecordListPageApi(
data: warehouseSearchForm, data: warehouseSearchForm,
currentPage: number, currentPage: number,
......
...@@ -47,6 +47,8 @@ export interface InterWarehouseBase { ...@@ -47,6 +47,8 @@ export interface InterWarehouseBase {
createTime?: string | null createTime?: string | null
updateTime?: string | null updateTime?: string | null
rejectReason?: string | null rejectReason?: string | null
number?: number | string | null
supplierItemNo?: string | null
} }
// 主表列表ts // 主表列表ts
export interface InterWarehousePage extends InterWarehouseBase {} export interface InterWarehousePage extends InterWarehouseBase {}
...@@ -70,8 +72,6 @@ export interface InterProductList { ...@@ -70,8 +72,6 @@ export interface InterProductList {
buyStored?: number | null //入库数量 buyStored?: number | null //入库数量
outCount?: number | null //出库数量 outCount?: number | null //出库数量
usableInventory?: number | null //可用库存数量 usableInventory?: number | null //可用库存数量
// rejectsAmount?: number
// rejectsReason?: string
remark?: string | null remark?: string | null
skuImage?: string skuImage?: string
skuName?: string skuName?: string
......
...@@ -108,6 +108,7 @@ export function checkUpdateParams( ...@@ -108,6 +108,7 @@ export function checkUpdateParams(
removeList = arr1.map((item) => item['id'] as IdType) removeList = arr1.map((item) => item['id'] as IdType)
} }
if (isBackKeyName) { if (isBackKeyName) {
console.log(isBackKeyName)
// 将列表直接添加到 params 顶层 // 将列表直接添加到 params 顶层
if (addList.length > 0) params['addList'] = addList || undefined if (addList.length > 0) params['addList'] = addList || undefined
if (updateList.length > 0) if (updateList.length > 0)
......
...@@ -333,7 +333,12 @@ ...@@ -333,7 +333,12 @@
label="SKU名称" label="SKU名称"
prop="skuName" prop="skuName"
/> />
<ElTableColumn
show-overflow-tooltip
align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
...@@ -504,6 +509,12 @@ ...@@ -504,6 +509,12 @@
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="可用库存数量" label="可用库存数量"
prop="usableInventory" prop="usableInventory"
/> />
...@@ -611,7 +622,12 @@ ...@@ -611,7 +622,12 @@
label="SKU名称" label="SKU名称"
prop="warehouseSku" prop="warehouseSku"
/> />
<ElTableColumn
show-overflow-tooltip
align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
...@@ -740,7 +756,7 @@ ...@@ -740,7 +756,7 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="productNumber" prop="productNo"
label="货号 " label="货号 "
></el-table-column> ></el-table-column>
<el-table-column align="center" prop="number" label="打印数量"> <el-table-column align="center" prop="number" label="打印数量">
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
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="searchForm.orderNumber"
clearable clearable
...@@ -71,14 +71,6 @@ ...@@ -71,14 +71,6 @@
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="searchForm.sku"
...@@ -87,11 +79,11 @@ ...@@ -87,11 +79,11 @@
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="searchForm.id"
clearable clearable
placeholder="请输入ID" placeholder="请输入入库单ID"
style="width: 160px" style="width: 160px"
/> />
</ElFormItem> </ElFormItem>
...@@ -267,6 +259,7 @@ ...@@ -267,6 +259,7 @@
align="center" align="center"
></ElTableColumn> ></ElTableColumn>
<ElTableColumn <ElTableColumn
v-if="nodeCode === 'PENDING_SUBMIT'"
width="100" width="100"
align="center" align="center"
header-align="center" header-align="center"
...@@ -333,7 +326,12 @@ ...@@ -333,7 +326,12 @@
label="SKU名称" label="SKU名称"
prop="skuName" prop="skuName"
/> />
<ElTableColumn
show-overflow-tooltip
align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
...@@ -537,7 +535,12 @@ ...@@ -537,7 +535,12 @@
label="SKU名称" label="SKU名称"
prop="skuName" prop="skuName"
/> />
<ElTableColumn
show-overflow-tooltip
align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn align="center" label="入库数量" prop="buyStored"> <ElTableColumn align="center" label="入库数量" prop="buyStored">
<template #default="{ row }"> <template #default="{ row }">
<el-input <el-input
...@@ -610,7 +613,7 @@ ...@@ -610,7 +613,7 @@
clearable clearable
size="small" size="small"
></el-input> ></el-input>
<el-popover placement="top-start" width="900" trigger="click"> <el-popover placement="top-start" width="1000" trigger="click">
<div v-if="skuData.length > 0" style="height: 50vh"> <div v-if="skuData.length > 0" style="height: 50vh">
<ElTable size="small" :data="skuData" height="100%" border> <ElTable size="small" :data="skuData" height="100%" border>
<ElTableColumn <ElTableColumn
...@@ -646,7 +649,12 @@ ...@@ -646,7 +649,12 @@
label="SKU名称" label="SKU名称"
prop="sku" prop="sku"
/> />
<ElTableColumn
show-overflow-tooltip
align="center"
label="货号"
prop="productNo"
/>
<ElTableColumn <ElTableColumn
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
...@@ -751,7 +759,7 @@ ...@@ -751,7 +759,7 @@
</template> </template>
</ElDialog> </ElDialog>
<el-dialog v-model="showPrintDialog" title="打印参数设置"> <el-dialog v-model="showPrintDialog" title="打印参数设置">
<el-table height="400px" :data="selections" border> <el-table height="400px" :data="printData" border>
<el-table-column <el-table-column
width="60" width="60"
align="center" align="center"
...@@ -770,13 +778,13 @@ ...@@ -770,13 +778,13 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="locationCode" prop="locationName"
label="库位编码" label="库位编码"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="productNumber" prop="supplierItemNo"
label="货号 " label="货号"
></el-table-column> ></el-table-column>
<el-table-column align="center" prop="number" label="打印数量"> <el-table-column align="center" prop="number" label="打印数量">
<template #default="{ row }"> <template #default="{ row }">
...@@ -819,9 +827,10 @@ import { ...@@ -819,9 +827,10 @@ import {
rejectInRecordApi, rejectInRecordApi,
LogListData, LogListData,
warehouseInfo, warehouseInfo,
InRecordBatchCheckPrintApi,
factoryWarehouseInventoryPrint,
} from '@/api/warehouse' } from '@/api/warehouse'
// factoryWarehouseInventoryPrint, import { filePath } from '@/api/axios.ts'
// import { filePath } from '@/api/axios.ts'
import BigNumber from 'bignumber.js' import BigNumber from 'bignumber.js'
import { ref, onMounted, watch, nextTick } from 'vue' import { ref, onMounted, watch, nextTick } from 'vue'
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
...@@ -1021,35 +1030,54 @@ const getTreeNum = async () => { ...@@ -1021,35 +1030,54 @@ const getTreeNum = async () => {
} }
} }
const showPrintDialog = ref(false) const showPrintDialog = ref(false)
const printData = ref([])
const printProductTag = async () => { const printProductTag = async () => {
if (!selections.value.length) { if (!selections.value.length) {
return ElMessage.warning('请选择要操作的数据') return ElMessage.warning('请选择要操作的数据')
} }
const str = selections.value.map((el: InterWarehousePage) => el.id).join(',')
try {
const res = await InRecordBatchCheckPrintApi(str)
if (res.code === 200) {
printData.value = res.data
showPrintDialog.value = true showPrintDialog.value = true
// selections.value.forEach((el:InterWarehousePage) => { } else {
// el.number = '' ElMessage.error(res.message)
// }) }
} catch (e) {
console.error(e)
}
console.log(selections.value, '@', printData.value)
} }
async function handlePrintProductTag() { async function handlePrintProductTag() {
// const flag = selections.value.every((el:InterWarehousePage) => el.number && el.number != '0') const flag = printData.value.every(
// if (!flag) { (el: InterWarehousePage) => el.number && el.number != '0',
// return ElMessage.warning('打印数量需大于0') )
// } if (!flag) {
// const list = selections.value.map((item:InterWarehousePage) => { return ElMessage.warning('打印数量需大于0')
// return { }
// skuName: item.skuName, const list = printData.value.map(
// warehouseSku: item.warehouseSku, ({
// supplierItemNo: item.productNumber, skuName = '',
// number: item.number, warehouseSku = '',
// locationName: item.locationCode, supplierItemNo = '',
// } number = '',
// }) locationName = '',
// const res = await factoryWarehouseInventoryPrint({ }) => ({
// list, skuName,
// code: 'PT002', warehouseSku,
// }) supplierItemNo,
// showPrintDialog.value = false number,
// window.open(filePath + res.message, '_blank') locationName,
}),
)
const res = await factoryWarehouseInventoryPrint({
list,
code: 'PT002',
})
showPrintDialog.value = false
window.open(filePath + res.message, '_blank')
} }
// 前端导入Excel // 前端导入Excel
const excelFieldMap: Record<string, keyof InterProductList> = { const excelFieldMap: Record<string, keyof InterProductList> = {
...@@ -1098,9 +1126,9 @@ const handleExport = () => { ...@@ -1098,9 +1126,9 @@ const handleExport = () => {
exportVisible.value = true exportVisible.value = true
} }
const submitExportForm = () => { const submitExportForm = () => {
// if (exportForm.value.resource === '') { if (exportForm.value.resource === '') {
// return ElMessage.error('请选择导出类型') return ElMessage.error('请选择导出类型')
// } }
// let purchaseIds = [], // let purchaseIds = [],
// otherIds = [], // otherIds = [],
// total = 0, // total = 0,
...@@ -1532,8 +1560,8 @@ const upSection = async () => { ...@@ -1532,8 +1560,8 @@ const upSection = async () => {
{ {
productList: 'warehouseSku', productList: 'warehouseSku',
}, },
false,
) )
try { try {
await updateInRecordApi(result) await updateInRecordApi(result)
newDialogVisible.value = false newDialogVisible.value = false
......
...@@ -143,7 +143,7 @@ getWarehouse() ...@@ -143,7 +143,7 @@ getWarehouse()
<el-table-column align="center" prop="skuName" label="商品名称"></el-table-column> <el-table-column align="center" prop="skuName" label="商品名称"></el-table-column>
<el-table-column align="center" prop="warehouseSku" label="商品SKU"></el-table-column> <el-table-column align="center" prop="warehouseSku" label="商品SKU"></el-table-column>
<el-table-column align="center" prop="locationCode" label="库位编码"></el-table-column> <el-table-column align="center" prop="locationCode" label="库位编码"></el-table-column>
<el-table-column align="center" prop="productNumber" label="货号 "></el-table-column> <el-table-column align="center" prop="productNo" label="货号 "></el-table-column>
<el-table-column align="center" prop="number" label="打印数量"> <el-table-column align="center" prop="number" label="打印数量">
<template #default="{row}"> <template #default="{row}">
<el-input <el-input
...@@ -178,7 +178,7 @@ getWarehouse() ...@@ -178,7 +178,7 @@ getWarehouse()
</el-form-item> </el-form-item>
<el-form-item label="货号"> <el-form-item label="货号">
<el-input <el-input
v-model="searchForm.productNumber" style="width: 140px;" placeholder="请输入货号" v-model="searchForm.productNo" style="width: 140px;" placeholder="请输入货号"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="库存数"> <el-form-item label="库存数">
...@@ -242,7 +242,7 @@ getWarehouse() ...@@ -242,7 +242,7 @@ getWarehouse()
<el-table-column align="center" prop="locationCode" label="库位" width="160"></el-table-column> <el-table-column align="center" prop="locationCode" label="库位" width="160"></el-table-column>
<el-table-column align="center" prop="warehouseSku" label="商品SKU" width="180"></el-table-column> <el-table-column align="center" prop="warehouseSku" label="商品SKU" width="180"></el-table-column>
<el-table-column align="center" prop="skuName" label="商品名称" width="250"></el-table-column> <el-table-column align="center" prop="skuName" label="商品名称" width="250"></el-table-column>
<el-table-column align="center" prop="productNumber" label="货号" width="150"></el-table-column> <el-table-column align="center" prop="productNo" label="货号" width="150"></el-table-column>
<el-table-column align="center" prop="unit" label="单位" width="80"></el-table-column> <el-table-column align="center" prop="unit" label="单位" width="80"></el-table-column>
<el-table-column align="center" prop="price" label="商品成本价(¥)" width="160"></el-table-column> <el-table-column align="center" prop="price" label="商品成本价(¥)" width="160"></el-table-column>
<el-table-column align="center" prop="usableInventory" label="可用数量" width="120"></el-table-column> <el-table-column align="center" prop="usableInventory" label="可用数量" width="120"></el-table-column>
......
...@@ -12,7 +12,7 @@ export default defineConfig({ ...@@ -12,7 +12,7 @@ export default defineConfig({
host: true, host: true,
proxy: { proxy: {
"/api": { "/api": {
target: "http://10.168.31.230:8060" target: "http://10.168.31.116:8060"
} }
} }
}, },
......
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