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" :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() //
} }

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

@ -7,107 +7,54 @@ export const PackageRules = reactive({
itemCode: [required], itemCode: [required],
itemName: [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[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签模板',
field: 'itemDesc2', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '批次', label: '标签状态',
field: 'batch', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', 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: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +63,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, 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: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', type: 'datetime',
valueFormat: 'x' dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
}, },
table: {
width: 180,
},
}, },
{ {
label: '计量单位', label: '最后打印人ID',
field: 'uom', field: 'lastPrintUserId',
sort: 'custom', 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: '仓库代码', label: '最后打印人用户名',
field: 'toWarehouseCode', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
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,
},
}, },
{ {
label: '操作', label: '操作',

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

@ -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 './purchasePackage.data' 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' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// //
@ -78,12 +78,12 @@ 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) => {
@ -111,9 +111,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
@ -205,7 +205,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 +220,8 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await PackageApi.exportPackage(tableObject.params) 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 +229,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/894703223549108224?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/899807302088564736?token=' + getAccessToken())
// //
const handlePoint = async (row) => { 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 = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters, filters: searchData.filters,
regularParams:regularParams.value type:type.value
} }
getList() // getList() //
} }

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

@ -7,107 +7,53 @@ export const PackageRules = reactive({
itemCode: [required], itemCode: [required],
itemName: [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[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '物品名称', label: '标签模板',
field: 'itemName', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签状态',
field: 'itemDesc2', field: 'status',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', 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: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +62,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, 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: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', 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: '标包单位', label: '最后打印人ID',
field: 'stdPackUnit', field: 'lastPrintUserId',
sort: 'custom', sort: 'custom'
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
}, },
{ {
label: '仓库代码', label: '最后打印人用户名',
field: 'toWarehouseCode', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
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,
},
}, },
{ {
label: '操作', label: '操作',
@ -417,4 +100,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ]))

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

@ -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 './utensilPackage.data' 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' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// //
@ -78,12 +78,12 @@ 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) => {
@ -111,9 +111,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 +183,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)
} }
} }
@ -205,7 +205,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 +220,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 +229,10 @@ const handleExport = async () => {
} }
const BASE_URL = 'http://dev.ccwin-in.com:25110' 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) => { const handlePoint = async (row) => {
window.open(src.value+'&id='+id) window.open(src.value+'&number='+row.relateNumber)
} }
/** 导入 */ /** 导入 */
@ -257,7 +257,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() //
} }

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[]>([ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '包装号', label: '标签号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {
width: 150,
fixed: 'left' fixed: 'left'
}, }
}, },
{ {
label: '物料代码', label: '标签类型',
field: 'itemCode', field: 'type',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_TYPE,
width: 150, dictClass: 'string'
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '物品描述2', label: '标签模板',
field: 'itemDesc2', field: 'template',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '批次', label: '标签状态',
field: 'batch', field: 'status',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { dictType: DICT_TYPE.LABEL_STATUS,
width: 150, dictClass: 'string'
},
}, },
{ {
label: '替代批次', label: '关联号',
field: 'altBatch', field: 'relateNumber',
sort: 'custom', sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '生产日期', label: '标签条码字符串',
field: 'produceDate', field: 'barcodeString',
sort: 'custom', 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: { table: {
width: 180, width: 170,
}, }
}, },
{ {
label: '有效期(日)', label: '打印次数',
field: 'validityDays', field: 'printTimes',
sort: 'custom', sort: 'custom',
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -116,297 +74,34 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
}, },
value: 0 value: 0
}, },
table: {
width: 150,
},
}, },
{ {
label: '失效日期', label: '最后打印时间',
field: 'expireDate', field: 'lastPrintTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, 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: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width:'100%'},
type: 'datetime', 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: '重量', label: '最后打印人ID',
field: 'weight', field: 'lastPrintUserId',
sort: 'custom', sort: 'custom'
table: {
width: 150,
},
}, },
{ {
label: '面积', label: '最后打印人用户名',
field: 'area', field: 'lastPrintUserName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 170,
}, }
},
{
label: '体积',
field: 'volume',
sort: 'custom',
table: {
width: 150,
},
}, },
{ {
label: '操作', label: '操作',
@ -417,4 +112,4 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' fixed: 'right'
} }
} }
])) ]))
Loading…
Cancel
Save