|
@ -45,8 +45,8 @@ |
|
|
:rules="PackageRules" |
|
|
:rules="PackageRules" |
|
|
:formAllSchemas="Package.allSchemas" |
|
|
:formAllSchemas="Package.allSchemas" |
|
|
:searchTableParams="searchTableParams" |
|
|
:searchTableParams="searchTableParams" |
|
|
:apiUpdate="PackageApi.updatePackage" |
|
|
:apiUpdate="BarbasicApi.updateBarbasic" |
|
|
:apiCreate="PackageApi.createPackage" |
|
|
:apiCreate="BarbasicApi.createBarbasic" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
/> |
|
|
/> |
|
@ -62,7 +62,7 @@ |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
import { Package,PackageRules } from './manufacturePackage.data' |
|
|
import { Package,PackageRules } from './manufacturePackage.data' |
|
|
import * as PackageApi from '@/api/wms/package' |
|
|
import * as BarbasicApi from '@/api/wms/barbasic' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
|
|
|
|
|
// 制造件标签 |
|
|
// 制造件标签 |
|
@ -76,29 +76,21 @@ const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
|
const tableColumns = ref(Package.allSchemas.tableColumns) |
|
|
const tableColumns = ref(Package.allSchemas.tableColumns) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* PurchasePackage regularParams = procure采购件标签记录页面 |
|
|
* PurchasePackage type = PurchaseLabel 采购件标签记录页面 |
|
|
* ManufacturePackage regularParams = manufacture 制造件标签记录页面 |
|
|
* ManufacturePackage type = MakeLabel 制造件标签记录页面 |
|
|
* UtensilPackage regularParams = utensil 器具标签记录页面 |
|
|
* UtensilPackage type = ContainerLabel 器具标签记录页面 |
|
|
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签) |
|
|
* SupplierPackage type = PurchaseLabel 供应商发货标签记录(用采购标签) |
|
|
*/ |
|
|
*/ |
|
|
const regularParams = ref(route.name == 'PurchasePackage'?'procure':route.name == 'ManufacturePackage'?'manufacture':route.name == 'UtensilPackage'?'utensil':route.name == 'SupplierPackage'?'procure':'') |
|
|
const type = ref(route.name == 'PurchasePackage'?'PurchaseLabel':route.name == 'ManufacturePackage'?'MakeLabel':route.name == 'UtensilPackage'?'ContainerLabel':route.name == 'SupplierPackage'?'PurchaseLabel':'') |
|
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
// 字段设置 更新主列表字段 |
|
|
const updataTableColumns = (val) => { |
|
|
const updataTableColumns = (val) => { |
|
|
tableColumns.value = val |
|
|
tableColumns.value = val |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查询列表页面参数设置 |
|
|
// 查询列表页面参数设置 |
|
|
const searchTableParams = ref([ |
|
|
const searchTableParams = ref([ |
|
|
//{ |
|
|
|
|
|
// formField: 'productItemCode', |
|
|
|
|
|
// searchTableTitle: '物料信息', |
|
|
|
|
|
// searchTableAllSchemas: Itembasic.allSchemas, |
|
|
|
|
|
// searchTablePage: ItembasicApi.getItembasicPage |
|
|
|
|
|
//} |
|
|
|
|
|
]) |
|
|
]) |
|
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
@ -111,9 +103,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
getListApi: PackageApi.getPackagePage // 分页接口 |
|
|
getListApi: BarbasicApi.getBarbasicPage // 分页接口 |
|
|
}) |
|
|
}) |
|
|
tableObject.params.regularParams = regularParams.value |
|
|
tableObject.params.type = type.value |
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
@ -183,7 +175,7 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
handleDelete(row.id) |
|
|
handleDelete(row.id) |
|
|
} else if (val == 'point') { // 标签打印 |
|
|
} else if (val == 'point') { // 标签打印 |
|
|
handlePoint(row.id) |
|
|
handlePoint(row.relateNumber) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -205,7 +197,7 @@ const handleDelete = async (id: number) => { |
|
|
// 删除的二次确认 |
|
|
// 删除的二次确认 |
|
|
await message.delConfirm() |
|
|
await message.delConfirm() |
|
|
// 发起删除 |
|
|
// 发起删除 |
|
|
await PackageApi.deletePackage(id) |
|
|
await BarbasicApi.deleteBarbasic(id) |
|
|
message.success(t('common.delSuccess')) |
|
|
message.success(t('common.delSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
@ -220,8 +212,8 @@ const handleExport = async () => { |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
const data = await PackageApi.exportPackage(setSearchParams) |
|
|
const data = await BarbasicApi.exportBarbasic(tableObject.params) |
|
|
download.excel(data, '包装.xlsx') |
|
|
download.excel(data, '制造件标签.xlsx') |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
@ -229,10 +221,10 @@ const handleExport = async () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL |
|
|
const src = ref(BASE_URL + '/jmreport/view/894718245021065216?token=' + getAccessToken()) |
|
|
const src = ref(BASE_URL + '/jmreport/view/899811206721347584?token=' + getAccessToken()) |
|
|
// 标签打印 |
|
|
// 标签打印 |
|
|
const handlePoint = async (id) => { |
|
|
const handlePoint = async (number) => { |
|
|
window.open(src.value+'&id='+id) |
|
|
window.open(src.value+'&number='+number) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
/** 导入 */ |
|
@ -257,7 +249,7 @@ const searchFormClick = (searchData) => { |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
filters: searchData.filters, |
|
|
filters: searchData.filters, |
|
|
regularParams:regularParams.value |
|
|
type:type.value |
|
|
} |
|
|
} |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|