Browse Source

采购 制造 器具标签修改

master
陈薪名 11 months ago
parent
commit
dbf2241756
  1. 44
      src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue
  2. 382
      src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts
  3. 32
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  4. 383
      src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts
  5. 36
      src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue
  6. 371
      src/views/wms/basicDataManage/labelManage/utensilPackage/utensilPackage.data.ts

44
src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
:apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -62,7 +62,7 @@
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
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'
//
@ -76,29 +76,21 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
* PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage type = ContainerLabel 器具标签记录页面
* 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) => {
tableColumns.value = val
}
//
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({
getListApi: PackageApi.getPackagePage //
getListApi: BarbasicApi.getBarbasicPage //
})
tableObject.params.regularParams = regularParams.value
tableObject.params.type = type.value
//
const { getList, setSearchParams } = tableMethods
@ -183,7 +175,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
handlePoint(row.relateNumber)
}
}
@ -205,7 +197,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -220,8 +212,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams)
download.excel(data, '包装.xlsx')
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '制造件标签.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -229,10 +221,10 @@ const handleExport = async () => {
}
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) => {
window.open(src.value+'&id='+id)
const handlePoint = async (number) => {
window.open(src.value+'&number='+number)
}
/** 导入 */
@ -257,7 +249,7 @@ const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
type:type.value
}
getList() //
}

382
src/views/wms/basicDataManage/labelManage/manufacturePackage/manufacturePackage.data.ts

@ -7,107 +7,54 @@ export const PackageRules = reactive({
itemCode: [required],
itemName: [required],
})
export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +63,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
label: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '仓库代码',
field: 'toWarehouseCode',
label: '最后打印人用户名',
field: 'lastPrintUserName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',

32
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
:apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -62,7 +62,7 @@
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './purchasePackage.data'
import * as PackageApi from '@/api/wms/package'
import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
@ -78,12 +78,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
* PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage type = ContainerLabel 器具标签记录页面
* 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) => {
@ -111,9 +111,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage //
getListApi: BarbasicApi.getBarbasicPage //
})
tableObject.params.regularParams = regularParams.value
tableObject.params.type = type.value
//
const { getList, setSearchParams } = tableMethods
@ -205,7 +205,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -220,8 +220,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(tableObject.params)
download.excel(data, '包装.xlsx')
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '采购件标签.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -229,10 +229,10 @@ const handleExport = async () => {
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/894703223549108224?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/899807302088564736?token=' + getAccessToken())
//
const handlePoint = async (row) => {
window.open(src.value+'&id='+row.id)
window.open(src.value+'&number='+row.relateNumber)
}
/** 导入 */
@ -257,7 +257,7 @@ const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
type:type.value
}
getList() //
}

383
src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts

@ -7,107 +7,53 @@ export const PackageRules = reactive({
itemCode: [required],
itemName: [required],
})
export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
},
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品名称',
field: 'itemName',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +62,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
label: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '仓库代码',
field: 'toWarehouseCode',
label: '最后打印人用户名',
field: 'lastPrintUserName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '面积',
field: 'area',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',
@ -417,4 +100,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
]))

36
src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue

@ -45,8 +45,8 @@
:rules="PackageRules"
:formAllSchemas="Package.allSchemas"
:searchTableParams="searchTableParams"
:apiUpdate="PackageApi.updatePackage"
:apiCreate="PackageApi.createPackage"
:apiUpdate="BarbasicApi.updateBarbasic"
:apiCreate="BarbasicApi.createBarbasic"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
@ -62,7 +62,7 @@
import download from '@/utils/download'
import { getAccessToken } from '@/utils/auth'
import { Package,PackageRules } from './utensilPackage.data'
import * as PackageApi from '@/api/wms/package'
import * as BarbasicApi from '@/api/wms/barbasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
@ -78,12 +78,12 @@ const tableColumns = ref(Package.allSchemas.tableColumns)
/**
* PurchasePackage regularParams = procure采购件标签记录页面
* ManufacturePackage regularParams = manufacture 制造件标签记录页面
* UtensilPackage regularParams = utensil 器具标签记录页面
* SupplierPackage regularParams = procure 供应商发货标签记录(用采购标签)
* PurchasePackage type = PurchaseLabel 采购件标签记录页面
* ManufacturePackage type = MakeLabel 制造件标签记录页面
* UtensilPackage type = ContainerLabel 器具标签记录页面
* 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) => {
@ -111,9 +111,9 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
}
const { tableObject, tableMethods } = useTable({
getListApi: PackageApi.getPackagePage //
getListApi: BarbasicApi.getBarbasicPage //
})
tableObject.params.regularParams = regularParams.value
tableObject.params.type = type.value
//
const { getList, setSearchParams } = tableMethods
@ -183,7 +183,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
handlePoint(row)
}
}
@ -205,7 +205,7 @@ const handleDelete = async (id: number) => {
//
await message.delConfirm()
//
await PackageApi.deletePackage(id)
await BarbasicApi.deleteBarbasic(id)
message.success(t('common.delSuccess'))
//
await getList()
@ -220,8 +220,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PackageApi.exportPackage(setSearchParams)
download.excel(data, '包装.xlsx')
const data = await BarbasicApi.exportBarbasic(tableObject.params)
download.excel(data, '器具标签.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -229,10 +229,10 @@ const handleExport = async () => {
}
const BASE_URL = 'http://dev.ccwin-in.com:25110'
const src = ref(BASE_URL + '/jmreport/view/881303562245316608?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/899807302088564736?token=' + getAccessToken())
//
const handlePoint = async (id) => {
window.open(src.value+'&id='+id)
const handlePoint = async (row) => {
window.open(src.value+'&number='+row.relateNumber)
}
/** 导入 */
@ -257,7 +257,7 @@ const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters,
regularParams:regularParams.value
type:type.value
}
getList() //
}

371
src/views/wms/basicDataManage/labelManage/utensilPackage/utensilPackage.data.ts

@ -21,93 +21,51 @@ export const Package2 = useCrudSchemas(reactive<CrudSchema[]>([
]))
export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
label: '标签号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 150,
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
label: '标签类型',
field: 'type',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_TYPE,
dictClass: 'string'
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '标签模板',
field: 'template',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
label: '标签状态',
field: 'status',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
dictType: DICT_TYPE.LABEL_STATUS,
dictClass: 'string'
},
{
label: '替代批次',
field: 'altBatch',
label: '关联号',
field: 'relateNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产日期',
field: 'produceDate',
label: '标签条码字符串',
field: 'barcodeString',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
table: {
width: 180,
},
width: 170,
}
},
{
label: '有效期(日)',
field: 'validityDays',
label: '打印次数',
field: 'printTimes',
sort: 'custom',
form: {
component: 'InputNumber',
@ -116,297 +74,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
},
value: 0
},
table: {
width: 150,
},
},
{
label: '失效日期',
field: 'expireDate',
label: '最后打印时间',
field: 'lastPrintTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
table: {
width: 180,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '替代计量单位',
field: 'altUom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '替代数量',
field: 'altQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '标包单位',
field: 'stdPackUnit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
{
label: '仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '月台代码',
field: 'toDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '库位代码',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '供应商物品代码',
field: 'supplierItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '采购计划单号',
field: 'rpNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
table: {
width: 182,
},
},
{
label: '生产订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班组代码',
field: 'teamCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '班次代码',
field: 'shiftCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户月台代码',
field: 'customerDockCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '客户物品代码',
field: 'customerItemCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单号',
field: 'soNumber',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '销售订单行',
field: 'soLine',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '质量等级',
field: 'eqLevel',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '货主代码',
field: 'ownerCode',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '重量',
field: 'weight',
sort: 'custom',
table: {
width: 150,
},
label: '最后打印人ID',
field: 'lastPrintUserId',
sort: 'custom'
},
{
label: '面积',
field: 'area',
label: '最后打印人用户名',
field: 'lastPrintUserName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
width: 170,
}
},
{
label: '操作',
@ -417,4 +112,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
]))
Loading…
Cancel
Save