Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

master_hella_20240701
zhousq 6 months ago
parent
commit
fbbba54fda
  1. 1
      package.json
  2. 60
      src/api/mes/itemRequestMain/index.ts
  3. 11
      src/api/wms/balance/index.ts
  4. 5
      src/api/wms/supplierdeliverInspectionDetail/index.ts
  5. 10
      src/components/Form/src/Form.vue
  6. 15
      src/components/Form/src/helper.ts
  7. 10
      src/components/Table/src/Table.vue
  8. 261
      src/locales/en-US.ts
  9. 269
      src/locales/zh-CN.ts
  10. 145
      src/utils/disposition/defaultButtons.ts
  11. 162
      src/views/home/components/material.vue
  12. 116
      src/views/home/components/produce.vue
  13. 146
      src/views/home/components/product.vue
  14. 156
      src/views/home/components/supplierIndex.vue
  15. 244
      src/views/mes/itemRequestMain/index.vue
  16. 170
      src/views/mes/itemRequestMain/itemRequestMain.data.ts
  17. 116
      src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
  18. 3
      src/views/qms/basicDataManage/inspectionTemplate/index.vue
  19. 41
      src/views/qms/inspection/inspectionJob/addForm.vue
  20. 17
      src/views/qms/inspection/inspectionJob/detail.vue
  21. 96
      src/views/qms/inspection/inspectionRecord/detail.vue
  22. 2
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  23. 4
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  24. 1
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  25. 8
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  26. 2
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  27. 28
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  28. 36
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts
  29. 21
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

1
package.json

@ -8,6 +8,7 @@
"dev": "vite",
"wyf": "vite --mode wyf",
"test": "vite build --mode test",
"test-scp": "vite build --mode test-scp",
"hella8": "vite build --mode hella8",
"hella9": "vite build --mode hella9",
"hella13": "vite build --mode hella13",

60
src/api/mes/itemRequestMain/index.ts

@ -0,0 +1,60 @@
import request from '@/config/axios'
export interface ItemRequestMainVO {
deleteTime: Date
id: number
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
planDayCode: string
workBillNo: string
batchCode: string
requestBillNo: string
workstationCode: string
productCode: string
processCode: string
requestType: string
}
// 查询叫料申请单主列表
export const getItemRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/item-request-main/senior', data })
} else {
return await request.get({ url: `/mes/item-request-main/page`, params })
}
}
// 查询叫料申请单主详情
export const getItemRequestMain = async (id: number) => {
return await request.get({ url: `/mes/item-request-main/get?id=` + id })
}
// 新增叫料申请单主
export const createItemRequestMain = async (data: ItemRequestMainVO) => {
return await request.post({ url: `/mes/item-request-main/create`, data })
}
// 修改叫料申请单主
export const updateItemRequestMain = async (data: ItemRequestMainVO) => {
return await request.put({ url: `/mes/item-request-main/update`, data })
}
// 删除叫料申请单主
export const deleteItemRequestMain = async (id: number) => {
return await request.delete({ url: `/mes/item-request-main/delete?id=` + id })
}
// 导出叫料申请单主 Excel
export const exportItemRequestMain = async (params) => {
return await request.download({ url: `/mes/item-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/item-request-main/get-import-template' })
}

11
src/api/wms/balance/index.ts

@ -83,6 +83,17 @@ export const getBalancePageByBusinessType = async (params) => {
}
// 查询库存余额列表根据业务类型
export const getBalancePageByBusinessTypeByItemType = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/balance/seniorBusinessTypeByItemType', data })
} else {
return await request.get({ url: `/wms/balance/pageBusinessTypeByItemType`, params })
}
}
// 备件出库查询库存余额列表
export const getBalancePageSpare = async (params) => {
if (params.isSearch) {

5
src/api/wms/supplierdeliverInspectionDetail/index.ts

@ -28,6 +28,11 @@ export const getSupplierdeliverInspectionDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-inspection-detail/get?id=` + id })
}
// 查询供应商发货申请质子列表
export const getSupplierdeliverDetailInfo = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-inspection-detail/queryByMasterId?masterId=` + id })
}
// 新增供应商发货申请质检信息子
export const createSupplierdeliverInspectionDetail = async (data: SupplierdeliverInspectionDetailVO) => {
return await request.post({ url: `/wms/supplierdeliver-inspection-detail/create`, data })

10
src/components/Form/src/Form.vue

@ -22,6 +22,7 @@ import { FormProps } from './types'
import { Icon } from '@/components/Icon'
import { FormSchema, FormSetPropsType } from '@/types/form'
import { Search,CircleClose } from '@element-plus/icons-vue'
const { t } = useI18n()
const { getPrefixCls } = useDesign()
@ -321,8 +322,15 @@ export default defineComponent({
}
}
}
let labelName = item.label || ''
if(item.label){
labelName = t(`ts.${item.label}`)
if(labelName === 'ts.' + item.label){
labelName = item.label
}
}
return (
<ElFormItem {...(item.formItemProps || {})} prop={item.field} label={item.label || ''}>
<ElFormItem {...(item.formItemProps || {})} prop={item.field} label={labelName}>
{{
...formItemSlots,
default: () => {

15
src/components/Form/src/helper.ts

@ -14,9 +14,20 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => {
const { t } = useI18n()
const textMap = ['Input', 'Autocomplete', 'InputNumber', 'InputPassword']
const selectMap = ['Select', 'SelectV2', 'TimePicker', 'DatePicker', 'TimeSelect', 'TimeSelect']
let labelName = schema.label || ''
if(schema.label){
labelName = t(`ts.${schema.label}`)
if(labelName === 'ts.' + schema.label){
labelName = ' '+schema.label
}else{
labelName = ' ' + labelName
}
}
if (textMap.includes(schema?.component as string)) {
return {
placeholder: t('common.inputText') + schema.label
placeholder: t('common.inputText') + labelName
}
}
if (selectMap.includes(schema?.component as string)) {
@ -34,7 +45,7 @@ export const setTextPlaceholder = (schema: FormSchema): PlaceholderModel => {
}
} else {
return {
placeholder: t('common.selectText') + schema.label
placeholder: t('common.selectText') + labelName
}
}
}

10
src/components/Table/src/Table.vue

@ -6,6 +6,7 @@ import { setIndex } from './helper'
import { getSlot } from '@/utils/tsxHelper'
import type { TableProps } from './types'
import { set } from 'lodash-es'
const { t } = useI18n()
import { Pagination, TableColumn, TableSetPropsType, TableSlotDefault } from '@/types/table'
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()
@ -281,6 +282,11 @@ export default defineComponent({
updateSort(columns)
return [...[renderTableExpand()], ...[renderTableSelection()]].concat(
(columnsChildren || columns).map((v) => {
const zhName = v.label || '';//
let labelName = t(`ts.${v.label}`)
if(labelName === 'ts.' + zhName){
labelName = zhName
}
//
if (v.type === 'index') {
return (
@ -294,7 +300,7 @@ export default defineComponent({
align={v.align || align}
border={v.border || border}
headerAlign={v.headerAlign || headerAlign}
label={v.label}
label={labelName}
width="65px"
></ElTableColumn>
)
@ -320,7 +326,7 @@ export default defineComponent({
v?.formatter?.(data.row, data.column, data.row[v.field], data.$index) ||
data.row[v.field],
// @ts-ignore
header: () => getSlot(slots, `${v.field}-header`) || v.label
header: () => getSlot(slots, `${v.field}-header`) || labelName
}}
</ElTableColumn>
)

261
src/locales/en-US.ts

@ -467,5 +467,266 @@ export default {
btn_zoom_in: 'Zoom in',
btn_zoom_out: 'Zoom out',
preview: 'Preivew'
},
home:{
number_orders: 'Number of orders',
number_planned_shipments: 'Number of planned shipments',
number_invoices: 'Number of invoices',
invoice_trend_month: 'Invoice trend for this month',
TOP10_parts_shipped_month: 'TOP10 parts shipped this month',
number_open: 'Nmuber of open',
number_open_plans: 'Number of Open Plans',
number_unreceived_orders: 'Number of Unreceived Orders',
number_total_order: 'Total Order Number',
number_all_plans: 'Number of All Plans',
number_orders_received: 'Number of Orders Received',
single: 'Single',
latest_news : 'Latest News',
number : 'Number',
user_type : 'User Type',
user_number : 'User Number',
template_coding : 'Template Coding',
sender_number : 'Sender Number',
template_content : 'Template Content',
template_parameters : 'Template Parameters',
template_type : 'Template Type',
read : 'Read',
read_time : 'Read Time',
create_time : 'Create Time',
latest_deduction_details: 'Latest Deduction Details',
title: 'Title',
publisher: 'Publisher',
publish_date: 'Publish Date',
month_return_detials:'This month\'s return detials',
document_number:'Document number',
source_package_number:'Source Package Number',
destination_package_number:'Destination Package Number',
source_appliance_number:'Source Appliance Number',
destination_appliance_number:'Destination Appliance Number',
source_batch:'Source Batch',
destination_batch:'Destination Batch',
replace_batch:'Replace batch',
source_location_code:'Source Location Code',
destination_location_code:'Destination Location Code',
source_location_group_code:'Source Location Group Code',
destination_location_group_code:'Destination Location Group Code',
source_location_area_code:'Source Location Area Code',
destination_location_area_code:'Destination Location Area Code',
source_shipper_code:'Source Shipper Code',
destination_shipper_code:'Destination Shipper Code',
inventory_state:'Inventory State',
order_number:'Order Number',
order_line:'Order Line',
cause:'Cause',
unit_price:'Unit Price',
money:'Money',
material_code:'Material Code',
material_name:'Material Name',
material_description1:'Material Description1',
material_description2:'Material Description2',
amount:'Amount',
measuring_unit:'Measuring Unit',
item_cde:'Item Code',
comment:'Comment',
creater:'Creater',
claim_details_month:'Claim Details for This Month',
batch:'Batch',
today_arrival_plan_shipped : 'Today\'s arrival plan(Shipped)',
material_preparation_plan_today_issued: 'Material preparation plan today(Issued)',
call_material_today_issued : 'Call for material today(Issued)',
pcs : 'pcs',
free_library_bits_or_total_library_bits : 'Free library bits/Total library bits',
slack_stock_warning : 'Slack stock warning',
package_number : 'Package Number',
appliance_code : 'Appliance Code',
location_code : 'Location Code',
warehouse_code : 'Warehouse Code',
location_group_code : 'Location Group Code',
location_area_code : 'Location Area Code',
erp_location_code : 'ERP Location Code',
arrival_date : 'Arrival Date',
production_date : 'Production Date',
expiry_date : 'Expiry Date',
shipper_code : 'Shipper Code',
lock_quantity : 'Lock Quantity',
available_quantity : 'Available Quantity',
warehouse_entry_time : 'Warehouse Entry Time',
overstock_warning : 'Overstock warning',
high_and_low_storage_warning : 'High and low storage warning',
waiting_tasks : 'Waiting Tasks',
purchase_return_tasks : 'Purchase Return Tasks',
product_putway_tasks : 'Product Putway Tasks',
purchase_and_receive_tasks : 'Purchase and Receive Tasks',
production_receipt_tasks : 'Production Receipt Tasks',
production_return_tasks : 'Production Return Tasks',
supplement_materials_tasks : 'Supplement Materials Tasks',
product_receiving_tasks : 'Product Receiving Tasks',
send_materials_tasks : 'Send Materials Tasks',
today_production_plan : 'Today\'s production plan',
sequence : 'Sequence',
workshop : 'Workshop',
prouduction_line : 'Prouduction Line',
schedule : 'Schedule',
teams_and_groups : 'Teams and Groups',
intended_date : 'Intended Date',
start_date : 'Start Date',
ending_date : 'Ending Date',
business_type : 'Business Type',
line_side_safety_stock : 'Line side safety stock',
type : 'Type',
laneway : 'Laneway',
goods_shelf : 'Goods Shelf',
line : 'Line',
column : 'Column',
stock_priority : 'Stock Priority',
maximum_load_bearing : 'Maximum Load Bearing',
maximum_area : 'Maximum Area',
maximum_volume : 'Maximum Volume',
user_group_code : 'User Group Code',
inventory_of_finished_products_waiting_to_be_putway : 'Inventory of finished products waiting to be putway',
source_warehouse_code : 'Source Warehouse Code',
apply_time : 'Apply Time',
request_cut_off_time : 'Request cut-off Time',
state : 'State',
department : 'Department',
undertaker_user_name : 'Undertaker User Name',
undertake_time : 'Undertake Time',
source_location_type_range : 'Source Location Type Range',
destination_location_type_range : 'Destination Location Type Range',
destination_warehouse_code : 'Destination Warehouse Code',
source_location_area_code_range : 'Source Location Area Code Range',
destination_location_area_code_range : 'Destination Location Area Code Range',
auto_ccomplete : 'Auto-complete',
modifiable_location : 'Modifiable Location',
modifiable_amount : 'Modifiable Amount',
allow_greater_than_recommended : 'Allow greater than recommended',
allow_less_than_recommended : 'Allow less than recommended',
allow_modify_location_state : 'Allow modify Location state',
allow_continuous_scanning : 'Allow continuous scanning',
allow_partly_completed : 'Allow partly completed',
modifiable_batch : 'Modifiable Batch',
modifiable_casecode : 'Modifiable Casecode',
expiration_time: 'Expiration Time',
effective_time : 'Effective Time',
code : 'Code',
name : 'Name',
},
ts: {
:'Code',
:'All',
:'Standard',
:'Out-source',
:'Others',
:'Others',
:'Available',
:'Type',
:'Name',
:'Yes',
:'No',
:'Supplier Code',
:'Material Code',
:'Document Number',
:'Order Type',
:'State',
:'Purchase Order Number',
:'Schedule',
:'Discrete',
:'Get ready',
:'Punblish',
:'Close',
:'Finished',
:'Invoice number',
:'Source Batch',
:'Destination Batch',
:'Source Package Number',
:'Destination Package Number',
:'Source Appliance Number',
:'Destination Appliance Number',
: 'Abbreviation',
:'Address',
:'Country',
:'City',
:'Phone',
:'Fax',
:'Postcode',
:'Contact',
:'Contact Email',
:'Bank',
:'Currency Kind',
:'Tax rate',
:'Effective Time',
:'Expiration Time',
:'Supplier material code',
:'Supplier measuring Unit',
:'Conversion Rate',
:'Default receiving warehouse location',
:'Creater',
:'Creater',
:'Create Time',
:'Comment',
:'Currency',
:'Price',
:'Order Date',
:'Line Number',
:'Operations',
:'Measuring Unit',
// ------
// 客户代码:'Customer Code',
},
btn:{
:'Query',
:'Reset',
:'Add',
:'Import',
:'Export',
:'Refresh',
:'Filter',
:'Settings',
:'Confirm',
:'Cancel',
:'Operations',
:'Edit',
:'Delete',
:'Add Attachment',
:'Add Filter',
:'Close',
:'Open',
:'Save',
:'Punblish',
//--------
// 单据打印:'Document Print',
// 上传质量报告:'Upload Quality Report',
// 打印标签:'Print Label',
// 发货:'Delivery',
// 生成标签:'Generate Label',
// 发送到货检验申请:'Send Arrival Inspection Application',
// 生成采购上架申请:'Generate Purchase Putaway Application',
// 生成生产计划单:'Generate Production Plan',
// 提交审批:'Submit Approval',
// 审核通过:'Approve',
// 作废:'Invalid',
//--------
// 生成采购收货申请:'Generate Purchase Receiving Application',
// 生成采购退货申请:'Generate Purchase Return Application',
// 生成生产收货申请:'Generate Production Receiving Application',
// 生成生产退货申请:'Generate Production Return Application',
// 生成生产计划:'Generate Production Plan',
// 上传:'Upload',
// 打印:'Print',
// 打印预览:'Print Preview',
// 打印设置:'Print Settings',
// 打印预览设置:'Print Preview
// 上传图片:'Upload Image',
// 上传文件:'Upload File',
// 上传视频:'Upload Video',
// 上传音频:'Upload Audio',
// 上传其他:'Upload Other',
// 上传图片:'Upload Image',
// 上传文件:'Upload File',
// 上传视频:'Upload Video',
// 上传音频:'Upload Audio',
// 上传其他:'Upload Other',
}
}

269
src/locales/zh-CN.ts

@ -460,5 +460,274 @@ export default {
btn_zoom_in: '放大',
btn_zoom_out: '缩小',
preview: '预览'
},
home:{
number_orders: '订单数',
number_planned_shipments: '要货计划数',
number_invoices: '发货单数',
invoice_trend_month: '本月发货单趋势',
TOP10_parts_shipped_month: '本月发货零件Top10',
number_open: '开放订单数',
number_open_plans: '开放计划数',
number_unreceived_orders: '未收货订单数',
number_total_order: '全部订单数',
number_all_plans: '全部计划数',
number_orders_received: '已收货订单数',
single: '单',
latest_news : '最新消息',
number : '编号',
user_type : '用户类型',
user_number : '用户编号',
template_coding : '模板编码',
sender_number : '发送人名称',
template_content : '模板内容',
template_parameters : '模板参数',
template_type : '模板类型',
read : '是否已读',
read_time : '阅读时间',
create_time : '创建时间',
latest_deduction_details: '最新扣分明细',
title: '标题',
publisher: '发布人',
publish_date: '发布日期',
month_return_detials:'本月退货明细',
document_number:'单据号',
source_package_number:'从包装号',
destination_package_number:'到包装号',
source_appliance_number:'从器具号',
destination_appliance_number:'到器具号',
source_batch:'从批次',
destination_batch:'到批次',
replace_batch:'替代批次',
source_location_code:'从库位代码',
destination_location_code:'到库位代码',
source_location_group_code:'从库位组代码',
destination_location_group_code:'到库位组代码',
source_location_area_code:'从库区代码',
destination_location_area_code:'到库区代码',
source_shipper_code:'从货主代码',
destination_shipper_code:'到货主代码',
inventory_state:'库存状态',
order_number:'订单号',
order_line:'订单行',
cause:'原因',
unit_price:'单价',
money:'金额',
material_code:'物料代码',
material_name:'物料名称',
material_description1:'物料描述1',
material_description2:'物料描述2',
amount:'数量',
measuring_unit:'计量单位',
item_code:'项目代码',
comment:'备注',
creater:'创建者',
claim_details_month:'本月索赔明细',
batch:'批次',
today_arrival_plan_shipped : '今日到货计划(已发货)',
material_preparation_plan_today_issued:'今日备料计划(已发料)',
call_material_today_issued:'今日叫料请求(已发料)',
'pcs' : '个',
free_library_bits_or_total_library_bits : '空闲库位数/总库位数',
slack_stock_warning : '呆滞库存预警',
package_number : '包装号',
appliance_code : '器具代码',
location_code : '库位代码',
warehouse_code : '仓库代码',
location_group_code : '库位组代码',
location_area_code : '库区代码',
erp_location_code : 'ERP库位代码',
arrival_date : '到货日期',
production_date : '生产日期',
expiry_date : '失效日期',
shipper_code : '货主代码',
lock_quantity : '锁定数量',
available_quantity : '可用数量',
warehouse_entry_time : '入库时间',
overstock_warning : '超期库存预警',
high_and_low_storage_warning : '高低储预警',
waiting_tasks : '待处理任务',
purchase_return_tasks : '采购退货任务',
product_putway_tasks : '制品上架任务',
purchase_and_receive_tasks : '采购收货任务',
production_receipt_tasks : '生产收料任务',
production_return_tasks : '生产退料',
supplement_materials_tasks : '补料任务',
product_receiving_tasks : '制品收货任务',
send_materials_tasks : '发料任务',
today_production_plan : '今日生产计划',
sequence : '顺序',
workshop : '车间',
prouduction_line : '生产线',
schedule : '班次',
teams_and_groups : '班组',
intended_date : '计划日期',
start_date : '开始日期',
ending_date : '结束日期',
business_type : '业务类型',
line_side_safety_stock : '线边安全库存',
type : '类型',
laneway : '巷道',
goods_shelf : '货架',
line : '行',
column : '列',
stock_priority : '备货优先级',
maximum_load_bearing : '最大承重',
maximum_area : '最大面积',
maximum_volume : '最大体积',
user_group_code : '用户组代码',
inventory_of_finished_products_waiting_to_be_putway : '待上架成品库存',
source_warehouse_code : '从仓库代码',
apply_time : '申请时间',
request_cut_off_time : '要求截止时间',
state : '状态',
department : '部门',
undertaker_user_name : '承接人用户名',
undertake_time : '承接时间',
source_location_type_range : '从库位类型范围',
destination_location_type_range : '到库位类型范围',
destination_warehouse_code : '到仓库代码',
source_location_area_code_range : '从库区代码范围',
destination_location_area_code_range : '到库区代码范围',
auto_complete : '自动完成',
modifiable_location : '允许修改库位',
modifiable_amount : '允许修改数量',
allow_greater_than_recommended : '允许大于推荐数量',
allow_less_than_recommended : '允许小于推荐数量',
allow_modify_location_state : '允许修改库存状态',
allow_continuous_scanning : '允许连续扫描',
allow_partly_completed : '允许部分完成',
modifiable_batch : '允许修改批次',
modifiable_casecode : '允许修改箱码',
expiration_time: '失效时间',
effective_time : '生效时间',
code : '代码',
name : '名称',
},
ts: {
: '代码',
: 'All',
: '标准',
: '委外',
:'其它',
:'其他',
: '是否可用',
: '类型',
: '名称',
: '是',
: '否',
: '供应商代码',
:'物料代码',
:'单据号',
:'订单类型',
:'状态',
:'采购订单号',
:'日程',
:'离散',
:'准备',
:'发布',
:'关闭',
:'已完成',
:'发货单号',
:'从批次',
:'到批次',
:'从包装号',
:'到包装号',
:'从器具号',
:'到器具号',
: '简称',
:'地址',
:'国家',
:'城市',
:'电话',
:'传真',
:'邮编',
:'联系人',
:'联系人邮件',
:'银行',
:'币种',
:'税率',
:'生效时间',
:'失效时间',
:'供应商物料代码',
:'供应商计量单位',
:'转换率',
:'默认收货库位',
:'创建人',
:'创建者',
:'创建时间',
:'备注',
:'货币',
:'价格',
:'订单日期',
:'行号',
:'操作',
:'计量单位',
},
btn:{
:'查询',
:'重置',
:'新增',
:'导入',
:'导出',
:'刷新',
:'筛选',
:'设置',
:'确定',
:'取消',
:'操作',
:'编辑',
:'删除',
:'添加附件',
:'添加筛选条件',
:'关闭',
:'关闭',
:'关闭',
:'发布',
//////
:'启用',
:'禁用',
:'中止',
:'领取',
:'完成',
:'绑定',
:'重新添加',
:'下架',
:'修改',
:'不接受',
:'接受',
:'承接',
:'放弃',
:'收货',
:'包装',
:'打印标签',
:'批量打印',
:'生成采购收货申请',
:'单据打印',
:'发送到货检验申请',
:'生成采购上架申请',
:'生成盘点调整申请',
:'重盘',
:'监盘',
:'解冻',
:'更新检验记录',
使:'使用决策'
}
}

145
src/utils/disposition/defaultButtons.ts

@ -4,11 +4,12 @@
* @param {*} option
* @returns
*/
const { t } = useI18n()
// 新增按钮
export function defaultAddBtn(option:any) {
return __defaultBtnOption(option,{
label: '新增',
label: t(`btn.新增`).replace('btn.', ''),
name: 'add',
hide: false,
type: 'primary',
@ -21,7 +22,7 @@ export function defaultAddBtn(option:any) {
// 导入按钮
export function defaultImportBtn(option:any) {
return __defaultBtnOption(option,{
label: '导入',
label: t(`btn.导入`).replace('btn.', ''),
name: 'import',
hide: false,
type: 'warning',
@ -34,7 +35,7 @@ export function defaultImportBtn(option:any) {
// 导出按钮
export function defaultExportBtn(option:any) {
return __defaultBtnOption(option,{
label: '导出',
label: t(`btn.导出`).replace('btn.', ''),
name: 'export',
hide: false,
type: 'success',
@ -78,7 +79,7 @@ export function defaultExportBtn(option:any) {
// 刷新按钮
export function defaultFreshBtn(option:any) {
return __defaultBtnOption(option,{
label: '刷新',
label: t(`btn.刷新`).replace('btn.', ''),
name: 'refresh',
hide: false,
type: 'primary',
@ -92,7 +93,7 @@ export function defaultFreshBtn(option:any) {
// 重置按钮
export function defaultResetBtn(option:any) {
return __defaultBtnOption(option,{
label: '重置',
label: t(`btn.重置`).replace('btn.', ''),
name: 'reset',
hide: false,
type: 'info',
@ -106,7 +107,7 @@ export function defaultResetBtn(option:any) {
// 字段设置
export function defaultSetBtn(option:any) {
return __defaultBtnOption(option,{
label: '设置',
label: t(`btn.设置`).replace('btn.', ''),
name: 'set',
hide: false,
type: 'info',
@ -120,7 +121,7 @@ export function defaultSetBtn(option:any) {
// 筛选按钮
export function defaultFilterBtn(option:any) {
return __defaultBtnOption(option,{
label: '筛选',
label: t(`btn.筛选`).replace('btn.', ''),
name: 'filtrate',
hide: false,
type: 'info',
@ -134,7 +135,7 @@ export function defaultFilterBtn(option:any) {
// 筛选——查询按钮
export function defaultSearchBtn(option:any) {
return __defaultBtnOption(option,{
label: '搜索',
label: t(`btn.搜索`).replace('btn.', ''),
name: 'search',
hide: false,
type: 'primary',
@ -148,7 +149,7 @@ export function defaultSearchBtn(option:any) {
// 筛选——重置按钮
export function defaultSearchResetBtn(option:any) {
return __defaultBtnOption(option,{
label: '重置',
label: t(`btn.重置`).replace('btn.', ''),
name: 'searchReset',
hide: false,
type: 'info',
@ -162,7 +163,7 @@ export function defaultSearchResetBtn(option:any) {
// form表单-保存按钮
export function formSaveBtn(option:any) {
return __defaultBtnOption(option,{
label: '保存',
label: t(`btn.保存`).replace('btn.', ''),
name: 'save',
hide: false,
type: 'primary',
@ -176,7 +177,7 @@ export function formSaveBtn(option:any) {
// form表单-关闭按钮
export function formCloseBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'close',
hide: false,
icon: 'ep:close',
@ -189,7 +190,7 @@ export function formCloseBtn(option:any) {
// drawer抽屉头部-编辑按钮
export function drawerEditBtn(option:any) {
return __defaultBtnOption(option,{
label: '编辑',
label: t(`btn.编辑`).replace('btn.', ''),
name: 'edit',
hide: false,
type: 'warning',
@ -202,7 +203,7 @@ export function drawerEditBtn(option:any) {
// drawer抽屉头部-删除按钮
export function drawerDeleteBtn(option:any) {
return __defaultBtnOption(option,{
label: '删除',
label: t(`btn.删除`).replace('btn.', ''),
name: 'delete',
hide: false,
type: 'danger',
@ -228,7 +229,7 @@ export function drawerDeleteBtn(option:any) {
// 主列表-编辑按钮
export function mainListEditBtn(option:any) {
return __defaultBtnOption(option,{
label: '编辑',
label: t(`btn.编辑`).replace('btn.', ''),
name: 'edit',
hide: false,
type: 'warning',
@ -241,7 +242,7 @@ export function mainListEditBtn(option:any) {
// 主列表-删除按钮
export function mainListDeleteBtn(option:any) {
return __defaultBtnOption(option,{
label: '删除',
label: t(`btn.删除`).replace('btn.', ''),
name: 'delete',
hide: false,
type: 'danger',
@ -252,7 +253,7 @@ export function mainListDeleteBtn(option:any) {
}
export function mainListEnableBtn(option:any) {
return __defaultBtnOption(option,{
label: '启用',
label: t(`btn.启用`).replace('btn.', ''),
name: 'enable',
hide: false,
type: 'danger',
@ -263,7 +264,7 @@ export function mainListEnableBtn(option:any) {
}
export function mainListDisableBtn(option:any) {
return __defaultBtnOption(option,{
label: '禁用',
label: t(`btn.禁用`).replace('btn.', ''),
name: 'disable',
hide: false,
type: 'danger',
@ -275,7 +276,7 @@ export function mainListDisableBtn(option:any) {
// 主列表-中止按钮1
export function mainListSuspend1Btn(option:any) {
return __defaultBtnOption(option,{
label: '中止',
label: t(`btn.中止`),
name: 'suspend',
hide: false,
type: 'danger',
@ -288,7 +289,7 @@ export function mainListSuspend1Btn(option:any) {
// 主列表-中止按钮2
export function mainListSuspend2Btn(option:any) {
return __defaultBtnOption(option,{
label: '中止',
label: t(`btn.中止`).replace('btn.', ''),
name: 'suspend',
hide: false,
type: 'danger',
@ -301,7 +302,7 @@ export function mainListSuspend2Btn(option:any) {
// 主列表-领取按钮
export function mainListReceiveBtn(option:any) {
return __defaultBtnOption(option,{
label: '领取',
label: t(`btn.领取`).replace('btn.', ''),
name: 'receive',
hide: false,
type: 'primary',
@ -314,7 +315,7 @@ export function mainListReceiveBtn(option:any) {
// 主列表-完成按钮
export function mainListFinishBtn(option:any) {
return __defaultBtnOption(option,{
label: '完成',
label: t(`btn.完成`).replace('btn.', ''),
name: 'finish',
hide: false,
type: 'primary',
@ -327,7 +328,7 @@ export function mainListFinishBtn(option:any) {
// 主列表-绑定
export function mainListBindBtn(option:any) {
return __defaultBtnOption(option,{
label: '绑定',
label: t(`btn.绑定`).replace('btn.', ''),
name: 'bind',
hide: false,
type: 'primary',
@ -339,7 +340,7 @@ export function mainListBindBtn(option:any) {
// 主列表-申请流程-关闭按钮
export function mainListCloseBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'mainClose',
hide: false,
type: 'danger',
@ -352,7 +353,7 @@ export function mainListCloseBtn(option:any) {
// 主列表-申请流程-重新添加按钮
export function mainListReAddBtn(option:any) {
return __defaultBtnOption(option,{
label: '重新添加',
label: t(`btn.重新添加`).replace('btn.', ''),
name: 'mainReAdd',
hide: false,
type: 'warning',
@ -365,7 +366,7 @@ export function mainListReAddBtn(option:any) {
// 主列表-申请流程-提交审批按钮
export function mainListSubmitBtn(option:any) {
return __defaultBtnOption(option,{
label: '提交审批',
label: t(`btn.提交审批`).replace('btn.', ''),
name: 'mainSubmit',
hide: false,
type: 'primary',
@ -378,7 +379,7 @@ export function mainListSubmitBtn(option:any) {
// 主列表-申请流程-驳回按钮
export function mainListTurnDownBtn(option:any) {
return __defaultBtnOption(option,{
label: '驳回',
label: t(`btn.驳回`).replace('btn.', ''),
name: 'mainTurnDown',
hide: false,
type: 'danger',
@ -391,7 +392,7 @@ export function mainListTurnDownBtn(option:any) {
// 主列表-申请流程-审批通过按钮
export function mainListApproveBtn(option:any) {
return __defaultBtnOption(option,{
label: '审批通过',
label: t(`btn.审批通过`).replace('btn.', ''),
name: 'mainApprove',
hide: false,
type: 'primary',
@ -404,7 +405,7 @@ export function mainListApproveBtn(option:any) {
// 主列表-申请流程-处理按钮
export function mainListHandleBtn(option:any) {
return __defaultBtnOption(option,{
label: '处理',
label: t(`btn.处理`).replace('btn.', ''),
name: 'mainHandle',
hide: false,
type: 'primary',
@ -417,7 +418,7 @@ export function mainListHandleBtn(option:any) {
// 主列表-订单流程-发布按钮
export function mainListOrderPubBtn(option:any) {
return __defaultBtnOption(option,{
label: '发布',
label: t(`btn.发布`).replace('btn.', ''),
name: 'mainOrderPub',
hide: false,
type: 'success',
@ -430,7 +431,7 @@ export function mainListOrderPubBtn(option:any) {
// 主列表-订单流程-关闭按钮
export function mainListOrderCloBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'mainOrderClo',
hide: false,
type: 'danger',
@ -443,7 +444,7 @@ export function mainListOrderCloBtn(option:any) {
// 主列表-订单流程-打开按钮
export function mainListOrderOpeBtn(option:any) {
return __defaultBtnOption(option,{
label: '打开',
label: t(`btn.打开`).replace('btn.', ''),
name: 'mainOrderOpe',
hide: false,
type: 'warning',
@ -456,7 +457,7 @@ export function mainListOrderOpeBtn(option:any) {
// 主列表-订单流程-下架按钮
export function mainListOrderWitBtn(option:any) {
return __defaultBtnOption(option,{
label: '下架',
label: t(`btn.下架`).replace('btn.', ''),
name: 'mainOrderWit',
hide: false,
type: 'danger',
@ -469,7 +470,7 @@ export function mainListOrderWitBtn(option:any) {
// 主列表-计划流程-打开按钮
export function mainListPlanOpeBtn(option:any) {
return __defaultBtnOption(option,{
label: '打开',
label: t(`btn.打开`).replace('btn.', ''),
name: 'mainPlanOpe',
hide: false,
type: 'warning',
@ -482,7 +483,7 @@ export function mainListPlanOpeBtn(option:any) {
// 主列表-计划流程-关闭按钮
export function mainListPlanCloBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'mainPlanClo',
hide: false,
type: 'danger',
@ -495,7 +496,7 @@ export function mainListPlanCloBtn(option:any) {
// 主列表-上传质量报告
export function mainListPlanUploadQualityReportBtn(option:any) {
return __defaultBtnOption(option,{
label: '上传质量报告',
label: t(`btn.上传质量报告`).replace('btn.', ''),
name: 'mainPlanUploadQualityReport',
hide: false,
type: 'primary',
@ -508,7 +509,7 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
// 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option:any) {
return __defaultBtnOption(option,{
label: '提交审批',
label: t(`btn.提交审批`).replace('btn.', ''),
name: 'mainPlanSub',
hide: false,
type: 'primary',
@ -521,7 +522,7 @@ export function mainListPlanSubBtn(option:any) {
// 主列表-计划流程-驳回按钮
export function mainListPlanTurBtn(option:any) {
return __defaultBtnOption(option,{
label: '驳回',
label: t(`btn.驳回`).replace('btn.', ''),
name: 'mainPlanTur',
hide: false,
type: 'danger',
@ -534,7 +535,7 @@ export function mainListPlanTurBtn(option:any) {
// 主列表-计划流程-重置按钮
export function mainListPlanResBtn(option:any) {
return __defaultBtnOption(option,{
label: '重置',
label: t(`btn.重置`).replace('btn.', ''),
name: 'mainPlanRes',
hide: false,
type: 'danger',
@ -547,7 +548,7 @@ export function mainListPlanResBtn(option:any) {
// 主列表-计划流程-审批通过按钮
export function mainListPlanAppBtn(option:any) {
return __defaultBtnOption(option,{
label: '审批通过',
label: t(`btn.审批通过`).replace('btn.', ''),
name: 'mainPlanApp',
hide: false,
type: 'primary',
@ -560,7 +561,7 @@ export function mainListPlanAppBtn(option:any) {
// 主列表-计划流程-发布按钮
export function mainListPlanPubBtn(option:any) {
return __defaultBtnOption(option,{
label: '发布',
label: t(`btn.发布`).replace('btn.', ''),
name: 'mainPlanPub',
hide: false,
type: 'success',
@ -573,7 +574,7 @@ export function mainListPlanPubBtn(option:any) {
// 主列表-计划流程-执行按钮
export function mainListPlanComBtn(option:any) {
return __defaultBtnOption(option,{
label: '执行',
label: t(`btn.执行`).replace('btn.', ''),
name: 'mainPlanCom',
hide: false,
type: 'danger',
@ -586,7 +587,7 @@ export function mainListPlanComBtn(option:any) {
// 主列表-要货计划流程-修改按钮
export function mainListPurchasePlanModBtn(option:any) {
return __defaultBtnOption(option,{
label: '修改',
label: t(`btn.修改`).replace('btn.', ''),
name: 'mainPurPlanMod',
hide: false,
type: 'danger',
@ -599,7 +600,7 @@ export function mainListPurchasePlanModBtn(option:any) {
// 主列表-要货计划流程-下架按钮
export function mainListPurchasePlanWitBtn(option:any) {
return __defaultBtnOption(option,{
label: '下架',
label: t(`btn.下架`),
name: 'mainPurPlanWit',
hide: false,
type: 'danger',
@ -612,7 +613,7 @@ export function mainListPurchasePlanWitBtn(option:any) {
// 主列表-要货计划流程-不接受按钮
export function mainListPurchasePlanRejBtn(option:any) {
return __defaultBtnOption(option,{
label: '不接受',
label: t(`btn.不接受`).replace('btn.', ''),
name: 'mainPurPlanRej',
hide: false,
type: 'danger',
@ -625,7 +626,7 @@ export function mainListPurchasePlanRejBtn(option:any) {
// 主列表-要货计划流程-接受按钮
export function mainListPurchasePlanAccBtn(option:any) {
return __defaultBtnOption(option,{
label: '接受',
label: t(`btn.接受`).replace('btn.', ''),
name: 'mainPurPlanAcc',
hide: false,
type: 'primary',
@ -638,7 +639,7 @@ export function mainListPurchasePlanAccBtn(option:any) {
// 主列表-要货计划流程-发布按钮
export function mainListPurchasePlanPubBtn(option:any) {
return __defaultBtnOption(option,{
label: '发布',
label: t(`btn.发布`).replace('btn.', ''),
name: 'mainPurPlanPub',
hide: false,
type: 'success',
@ -651,7 +652,7 @@ export function mainListPurchasePlanPubBtn(option:any) {
// 主列表-要货计划流程-关闭按钮
export function mainListPurchasePlanCloBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'mainPurPlanClo',
hide: false,
type: 'danger',
@ -664,7 +665,7 @@ export function mainListPurchasePlanCloBtn(option:any) {
// 主列表-要货计划流程-打开按钮
export function mainListPurchasePlanOpeBtn(option:any) {
return __defaultBtnOption(option,{
label: '打开',
label: t(`btn.打开`).replace('btn.', ''),
name: 'mainPurPlanOpe',
hide: false,
type: 'warning',
@ -677,7 +678,7 @@ export function mainListPurchasePlanOpeBtn(option:any) {
// 主列表-任务流程-承接按钮
export function mainListJobAccBtn(option:any) {
return __defaultBtnOption(option,{
label: '承接',
label: t(`btn.承接`).replace('btn.', ''),
name: 'mainJobAcc',
hide: false,
type: 'success',
@ -690,7 +691,7 @@ export function mainListJobAccBtn(option:any) {
// 主列表-任务流程-关闭按钮
export function mainListJobCloBtn(option:any) {
return __defaultBtnOption(option,{
label: '关闭',
label: t(`btn.关闭`).replace('btn.', ''),
name: 'mainJobClo',
hide: false,
type: 'danger',
@ -703,7 +704,7 @@ export function mainListJobCloBtn(option:any) {
// 主列表-任务流程-放弃按钮
export function mainListJobAbaBtn(option:any) {
return __defaultBtnOption(option,{
label: '放弃',
label: t(`btn.放弃`).replace('btn.', ''),
name: 'mainJobAba',
hide: false,
type: 'danger',
@ -716,7 +717,7 @@ export function mainListJobAbaBtn(option:any) {
// 主列表-任务流程-执行按钮
export function mainListJobExeBtn(option:any) {
return __defaultBtnOption(option,{
label: '执行',
label: t(`btn.执行`).replace('btn.', ''),
name: 'mainJobExe',
hide: false,
type: 'primary',
@ -729,7 +730,7 @@ export function mainListJobExeBtn(option:any) {
// 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已)
export function mainListJobRecBtn(option:any) {
return __defaultBtnOption(option,{
label: '收货',
label: t(`btn.收货`).replace('btn.', ''),
name: 'mainJobExe',
hide: false,
type: 'primary',
@ -741,7 +742,7 @@ export function mainListJobRecBtn(option:any) {
// 主列表-包装按钮
export function mainListPackageBtn(option:any) {
return __defaultBtnOption(option,{
label: '包装',
label: t(`btn.包装`).replace('btn.', ''),
name: 'mainPackage',
hide: false,
type: 'primary',
@ -753,7 +754,7 @@ export function mainListPackageBtn(option:any) {
// 主列表-打印
export function mainListPointBtn(option:any) {
return __defaultBtnOption(option,{
label: '打印标签',
label: t(`btn.打印标签`).replace('btn.', ''),
name: 'point',
hide: false,
type: 'primary',
@ -765,7 +766,7 @@ export function mainListPointBtn(option:any) {
// 主列表-批量打印
export function mainLisSelectiontPointBtn(option:any) {
return __defaultBtnOption(option,{
label: '批量打印',
label: t(`btn.批量打印`).replace('btn.', ''),
name: 'selection_point',
hide: false,
type: 'primary',
@ -778,7 +779,7 @@ export function mainLisSelectiontPointBtn(option:any) {
// 主列表-生成采购收货申请
export function mainListGenerateApplicationBtn(option:any) {
return __defaultBtnOption(option,{
label: '生成采购收货申请',
label: t(`btn.生成采购收货申请`).replace('btn.', ''),
name: 'generateApplication',
hide: false,
type: 'primary',
@ -790,7 +791,7 @@ export function mainListGenerateApplicationBtn(option:any) {
// 主列表-打印
export function mainListDocumentPrintBtn(option:any) {
return __defaultBtnOption(option,{
label: '单据打印',
label: t(`btn.单据打印`).replace('btn.', ''),
name: 'documentPrint',
hide: false,
type: 'primary',
@ -802,7 +803,7 @@ export function mainListDocumentPrintBtn(option:any) {
// 主列表-生成到货检验申请
export function mainInspectRequestBtn(option:any) {
return __defaultBtnOption(option,{
label: '发送到货检验申请',
label: t(`btn.发送到货检验申请`).replace('btn.', ''),
name: 'inspectRequest',
hide: false,
type: 'primary',
@ -814,7 +815,7 @@ export function mainInspectRequestBtn(option:any) {
// 主列表-生成采购上架申请
export function mainPutawayRequestBtn(option:any) {
return __defaultBtnOption(option,{
label: '生成采购上架申请',
label: t(`btn.生成采购上架申请`).replace('btn.', ''),
name: 'putawayRequest',
hide: false,
type: 'primary',
@ -826,7 +827,7 @@ export function mainPutawayRequestBtn(option:any) {
// 主列表-生成盘点调整申请
export function mainCountAdjustRequesttBtn(option:any) {
return __defaultBtnOption(option,{
label: '生成盘点调整申请',
label: t(`btn.生成盘点调整申请`).replace('btn.', ''),
name: 'countAdjustRequest',
hide: false,
type: 'primary',
@ -838,7 +839,7 @@ export function mainCountAdjustRequesttBtn(option:any) {
// 主列表-重盘
export function mainReCountBtn(option:any) {
return __defaultBtnOption(option,{
label: '重盘',
label: t(`btn.重盘`).replace('btn.', ''),
name: 'mainReCount',
hide: false,
type: 'primary',
@ -850,7 +851,7 @@ export function mainReCountBtn(option:any) {
// 主列表-监盘
export function mainSuperviseCountBtn(option:any) {
return __defaultBtnOption(option,{
label: '监盘',
label: t(`btn.监盘`).replace('btn.', ''),
name: 'mainSuperviseCount',
hide: false,
type: 'primary',
@ -862,7 +863,7 @@ export function mainSuperviseCountBtn(option:any) {
// 主列表-解冻
export function mainThawRequesttBtn(option:any) {
return __defaultBtnOption(option,{
label: '解冻',
label: t(`btn.解冻`).replace('btn.', ''),
name: 'mainThaw',
hide: false,
type: 'primary',
@ -874,7 +875,7 @@ export function mainThawRequesttBtn(option:any) {
// 主列表-更新检验记录
export function mainUpdataRecodeBtn(option:any) {
return __defaultBtnOption(option,{
label: '更新检验记录',
label: t(`btn.更新检验记录`).replace('btn.', ''),
name: 'updataRecode',
hide: false,
type: 'primary',
@ -886,7 +887,7 @@ export function mainUpdataRecodeBtn(option:any) {
// 主列表-使用决策
export function mainApplyDecisionBtn(option:any) {
return __defaultBtnOption(option,{
label: '使用决策',
label: t(`btn.使用决策`).replace('btn.', ''),
name: 'applyDecision',
hide: false,
type: 'primary',
@ -895,6 +896,18 @@ export function mainApplyDecisionBtn(option:any) {
hasPermi: ''
})
}
// 主列表-复制
export function mainCopyBtn(option:any) {
return __defaultBtnOption(option,{
label: '复制',
name: 'copy',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

162
src/views/home/components/material.vue

@ -4,84 +4,84 @@
<div class="data">
<div class="small-data-item small-data-item1">
<div class="small-data-item-txt">
<div>今日到货计划(已发货)</div>
<div>{{materialData?.preparetoissueTodayCount}}<span></span></div>
<div>{{ t('home.today_arrival_plan_shipped') }}</div>
<div>{{materialData?.preparetoissueTodayCount}}<span>{{ t('home.single') }}</span></div>
</div>
<img src="../../../assets/imgs/icon1.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item2 ml-14px">
<div class="small-data-item-txt">
<div>今日备料计划(已发料)</div>
<div>{{materialData?.preparetoissueTodayCount}}<span></span></div>
<div>{{ t('home.material_preparation_plan_today_issued') }}</div>
<div>{{materialData?.preparetoissueTodayCount}}<span>{{ t('home.single') }}</span></div>
</div>
<img src="../../../assets/imgs/icon5.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item3 ml-14px">
<div class="small-data-item-txt">
<div>今日叫料请求(已发料)</div>
<div>{{materialData?.issueRequestTodayCount}}<span></span></div>
<div>{{ t('home.call_material_today_issued') }}</div>
<div>{{materialData?.issueRequestTodayCount}}<span>{{ t('home.single') }}</span></div>
</div>
<img src="../../../assets/imgs/icon6.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item4 ml-14px">
<div class="small-data-item-txt">
<div>空闲库位数/总库位数</div>
<div style="font-size: 20px;">{{materialData?.freeLocationCount}}<span></span>/{{materialData?.totalLocationCount}}<span></span></div>
<div>{{ t('home.free_library_bits_or_total_library_bits') }}</div>
<div style="font-size: 20px;">{{materialData?.freeLocationCount}}<span>{{ t('home.pcs') }}</span>/{{materialData?.totalLocationCount}}<span>{{ t('home.pcs') }}</span></div>
</div>
<img src="../../../assets/imgs/icon3.png" alt="" class="img" />
</div>
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">呆滞库存预警</div>
<div class="title">{{ t('home.slack_stock_warning')}}</div>
<el-table
:data="materialData?.stagnantBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="180px" />
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -89,55 +89,55 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">超期库存预警</div>
<div class="title">{{ t('home.overstock_warning') }}</div>
<el-table
:data="materialData?.overdueBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="180px" />
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -147,55 +147,55 @@
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">高低储预警</div>
<div class="title">{{ t('home.high_and_low_storage_warning') }}</div>
<el-table
:data="materialData?.warningBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="180px" />
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -203,7 +203,7 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">待处理任务</div>
<div class="title">{{ t('home.waiting_tasks') }}</div>
<Echart :options="barOptions" :height="280" :key="lineIndex" />
</div>
</div>
@ -216,6 +216,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { barOptions } from '../echarts-data'
const { t } = useI18n()
const lineIndex = ref(0)
const materialData = ref()
@ -237,10 +239,10 @@ const getJobCharts = async () => {
'xAxis.data',
Object.keys( materialData.value.jobCount)
)
set(barOptionsData, 'legend.data', ['待处理任务'])
set(barOptionsData, 'legend.data', [t('home.waiting_tasks')])
set(barOptionsData, 'series', [
{
name:'待处理任务',
name: t('home.waiting_tasks'),
data: Object.values( materialData.value.jobCount),
type: 'bar',
barMaxWidth:30

116
src/views/home/components/produce.vue

@ -3,62 +3,62 @@
<div class="row">
<div class="two-row">
<div class="data1 w-[47.3%]">
<div class="title">今日生产计划</div>
<div class="title">{{ t('home.today_production_plan')}}</div>
<el-table
:data="produceData?.productionTodayList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="number" label="单据号" width="180" />
<el-table-column prop="displayOrder" label="顺序" width="170" />
<el-table-column prop="workshop" label="车间" width="170" />
<el-table-column prop="productionLine" label="生产线" width="170" />
<el-table-column prop="shift" label="班次" width="170" />
<el-table-column prop="team" label="班组" width="170" />
<el-table-column prop="planDate" label="计划日期" width="170"
<el-table-column prop="number" :label="t('home.document_number')" width="180" />
<el-table-column prop="displayOrder" :label="t('home.sequence')" width="170" />
<el-table-column prop="workshop" :label="t('home.workshop')" width="170" />
<el-table-column prop="productionLine" :label="t('home.prouduction_line')" width="170" />
<el-table-column prop="shift" :label="t('home.schedule')" width="170" />
<el-table-column prop="team" :label="t('home.teams_and_groups')" width="170" />
<el-table-column prop="planDate" :label="t('home.intended_date')" width="170"
><template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="beginTime" label="开始日期" width="170"
<el-table-column prop="beginTime" :label="t('home.start_date')" width="170"
><template #default="scope">
<span>{{ formatDate(scope.row.beginTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="endTime" label="结束日期" width="170"
<el-table-column prop="endTime" :label="t('home.ending_date')" width="170"
><template #default="scope">
<span>{{ formatDate(scope.row.endTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="businessType" label="业务类型" />
<el-table-column prop="businessType" :label="t('home.business_type')" />
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">线边安全库存</div>
<div class="title">{{ t('home.line_side_safety_stock') }}</div>
<el-table :data="produceData?.safeLocationList" style="width: 100%" stripe height="240px">
<el-table-column prop="code" label="代码" width="180" />
<el-table-column prop="name" label="名称" width="180" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180" />
<el-table-column prop="areaCode" label="库区代码" width="180" />
<el-table-column prop="locationGroupCode" label="库位组代码" width="180" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180" />
<el-table-column prop="type" label="类型" width="180" />
<el-table-column prop="aisle" label="巷道" width="180" />
<el-table-column prop="shelf" label="货架" width="180" />
<el-table-column prop="locationRow" label="行" width="180" />
<el-table-column prop="locationColum" label="列" width="180" />
<el-table-column prop="pickPriority" label="备货优先级" width="180" />
<el-table-column prop="maxWeight" label="最大承重" width="180" />
<el-table-column prop="maxArea" label="最大面积" width="180" />
<el-table-column prop="maxVolume" label="最大体积" width="180" />
<el-table-column prop="userGroupCode" label="用户组代码" width="180" />
<el-table-column prop="activeTime" label="生效时间" width="170">
<el-table-column prop="code" :label="t('home.code')" width="180" />
<el-table-column prop="name" :label="t('home.name')" width="180" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180" />
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180" />
<el-table-column prop="type" :label="t('home.type')" width="180" />
<el-table-column prop="aisle" :label="t('home.laneway')" width="180" />
<el-table-column prop="shelf" :label="t('home.goods_shelf')" width="180" />
<el-table-column prop="locationRow" :label="t('home.line')" width="180" />
<el-table-column prop="locationColum" :label="t('home.column')" width="180" />
<el-table-column prop="pickPriority" :label="t('home.stock_priority')" width="180" />
<el-table-column prop="maxWeight" :label="t('home.maximum_load_bearing')" width="180" />
<el-table-column prop="maxArea" :label="t('home.maximum_area')" width="180" />
<el-table-column prop="maxVolume" :label="t('home.maximum_volume')" width="180" />
<el-table-column prop="userGroupCode" :label="t('home.user_group_code')" width="180" />
<el-table-column prop="activeTime" :label="t('home.effective_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireTime" label="失效时间" width="170">
<el-table-column prop="expireTime" :label="t('home.expiration_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span>
</template>
@ -68,86 +68,86 @@
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">待上架成品库存</div>
<div class="title">{{t('home.inventory_of_finished_products_waiting_to_be_putway')}}</div>
<el-table
:data="produceData?.productputawayJobDetailList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="number" label="单据号" width="180" />
<el-table-column prop="fromWarehouseCode" label="从仓库代码" width="180" />
<el-table-column prop="requestTime" label="申请时间" width="170">
<el-table-column prop="number" :label="t('home.document_number')" width="180" />
<el-table-column prop="fromWarehouseCode" :label="t('home.source_warehouse_code')" width="180" />
<el-table-column prop="requestTime" :label="t('home.apply_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.requestTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="requestDueTime" label="要求截止时间" width="170">
<el-table-column prop="requestDueTime" :label="t('home.request_cut_off_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.requestDueTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="140"/>
<el-table-column prop="departmentCode" label="部门" />
<el-table-column prop="acceptUserId" label="承接人用户名" width="170" />
<el-table-column prop="acceptTime" label="承接时间" width="170">
<el-table-column prop="status" :label="t('home.status')" width="140"/>
<el-table-column prop="departmentCode" :label="t('home.department')" />
<el-table-column prop="acceptUserId" :label="t('home.undertaker_user_name')" width="170" />
<el-table-column prop="acceptTime" :label="t('home.undertake_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.acceptTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="fromLocationTypes" label="从库位类型范围" width="170"/>
<el-table-column prop="toLocationTypes" label="到库位类型范围" width="170" />
<el-table-column prop="toWarehouseCode" label="到仓库代码" width="170"/>
<el-table-column prop="fromAreaCodes" label="从库区代码范围" width="170"/>
<el-table-column prop="toAreaCodes" label="到库区代码范围" width="170"/>
<el-table-column prop="autoComplete" label="自动完成" width="120">
<el-table-column prop="fromLocationTypes" :label="t('home.source_location_type_range')" width="170"/>
<el-table-column prop="toLocationTypes" :label="t('home.destination_location_type_range')" width="170" />
<el-table-column prop="toWarehouseCode" :label="t('home.destination_warehouse_code')" width="170"/>
<el-table-column prop="fromAreaCodes" :label="t('home.source_location_area_code_range')" width="170"/>
<el-table-column prop="toAreaCodes" :label="t('home.destination_location_area_code_range')" width="170"/>
<el-table-column prop="autoComplete" :label="t('home.auto_complete')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.autoComplete, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowModifyLocation" label="允许修改库位" width="120">
<el-table-column prop="allowModifyLocation" :label="t('home.modifiable_location')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowModifyLocation, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowModifyQty" label="允许修改数量" width="120">
<el-table-column prop="allowModifyQty" :label="t('home.modifiable_amount')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowModifyQty, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowBiggerQty" label="允许大于推荐数量" width="140">
<el-table-column prop="allowBiggerQty" :label="t('home.allow_greater_than_recommended')" width="140">
<template #default="scope">
<span>{{ formatter(scope.row.allowBiggerQty, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowSmallerQty" label="允许小于推荐数量" width="140">
<el-table-column prop="allowSmallerQty" :label="t('home.allow_less_than_recommended')" width="140">
<template #default="scope">
<span>{{ formatter(scope.row.allowSmallerQty, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowModifyInventoryStatus" label="允许修改库存状态" width="140">
<el-table-column prop="allowModifyInventoryStatus" :label="t('home.allow_modify_location_state')" width="140">
<template #default="scope">
<span>{{
formatter(scope.row.allowModifyInventoryStatus, DICT_TYPE.TRUE_FALSE)
}}</span>
</template>
</el-table-column>
<el-table-column prop="allowContinuousScanning" label="允许连续扫描" width="120">
<el-table-column prop="allowContinuousScanning" :label="t('home.allow_continuous_scanning')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowContinuousScanning, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowPartialComplete" label="允许部分完成" width="120">
<el-table-column prop="allowPartialComplete" :label="t('home.allow_partly_completed')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowPartialComplete, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowModifyBatch" label="允许修改批次" width="120">
<el-table-column prop="allowModifyBatch" :label="t('home.modifiable_batch')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowModifyBatch, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
</el-table-column>
<el-table-column prop="allowModifyPackingNumber" label="允许修改箱码" width="120">
<el-table-column prop="allowModifyPackingNumber" :label="t('home.modifiable_casecode')" width="120">
<template #default="scope">
<span>{{ formatter(scope.row.allowModifyPackingNumber, DICT_TYPE.TRUE_FALSE) }}</span>
</template>
@ -155,7 +155,7 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">待处理任务</div>
<div class="title">{{t('home.waiting_tasks')}}</div>
<Echart :options="barOptions" :height="280" :key="lineIndex" />
</div>
</div>
@ -168,6 +168,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { barOptions } from '../echarts-data'
const { t } = useI18n()
const lineIndex = ref(0)
const produceData = ref()
//
@ -188,10 +190,10 @@ const getJobCharts = async () => {
'xAxis.data',
Object.keys( produceData.value.jobCount)
)
set(barOptionsData, 'legend.data', ['待处理任务'])
set(barOptionsData, 'legend.data', [t('home.waiting_tasks')])
set(barOptionsData, 'series', [
{
name:'待处理任务',
name:t('home.waiting_tasks'),
data: Object.values( produceData.value.jobCount),
type: 'bar',
barMaxWidth:30

146
src/views/home/components/product.vue

@ -4,63 +4,63 @@
<div class="data">
<div class="small-data-item small-data-item1">
<div class="small-data-item-txt">
<div>今日到货计划(已发货)</div>
<div>{{ productData?.deliverPlanTodayCount || 0 }}<span></span></div>
<div>{{ t('home.today_arrival_plan_shipped') }}</div>
<div>{{ productData?.deliverPlanTodayCount || 0 }}<span>{{t('home.single')}}</span></div>
</div>
<img src="../../../assets/imgs/icon1.png" alt="" class="img" />
</div>
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">呆滞库存预警</div>
<div class="title">{{ t('home.slack_stock_warning') }}</div>
<el-table
:data="productData?.stagnantBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="180px" />
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -68,55 +68,55 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">超期库存预警</div>
<div class="title">{{ t('home.overstock_warning') }}</div>
<el-table
:data="productData?.overdueBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="'home.measuring_unit'" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="180px" />
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -126,55 +126,55 @@
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">高低储预警</div>
<div class="title">{{ t('home.high_and_low_storage_warning') }}</div>
<el-table
:data="productData?.warningBalanceList"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="itemCode" label="物料代码" width="180px" />
<el-table-column prop="batch" label="批次" width="180px" />
<el-table-column prop="packingNumber" label="包装号" width="180px" />
<el-table-column prop="containerNumber" label="器具代码" width="180px" />
<el-table-column prop="qty" label="数量" width="180px" />
<el-table-column prop="uom" label="计量单位" width="180px">
<el-table-column prop="itemCode" :label="t('home.material_code')" width="180px" />
<el-table-column prop="batch" :label="t('home.batch')" width="180px" />
<el-table-column prop="packingNumber" :label="t('home.package_number')" width="180px" />
<el-table-column prop="containerNumber" :label="t('home.appliance_code')" width="180px" />
<el-table-column prop="qty" :label="t('home.amount')" width="180px" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="180px">
<template #default="scope">
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="locationCode" label="库位代码" width="180px" />
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" />
<el-table-column prop="locationCode" :label="t('home.location_code')" width="180px" />
<el-table-column prop="warehouseCode" :label="t('home.warehouse_code')" width="180px" />
<el-table-column prop="inventoryStatus" label="库存状态" width="180px">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" />
<el-table-column prop="areaCode" label="库区代码" width="180px" />
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" />
<el-table-column prop="locationGroupCode" :label="t('home.location_group_code')" width="180px" />
<el-table-column prop="areaCode" :label="t('home.location_area_code')" width="180px" />
<el-table-column prop="erpLocationCode" :label="t('home.erp_location_code')" width="180px" />
<el-table-column prop="altBatch" label="替代批次" width="180px" />
<el-table-column prop="arriveDate" label="到货日期" width="180px">
<el-table-column prop="arriveDate" :label="t('home.arrival_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="produceDate" label="生产日期" width="180px">
<el-table-column prop="produceDate" :label="t('home.production_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="expireDate" label="失效日期" width="180px">
<el-table-column prop="expireDate" :label="t('home.expiry_date')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
</el-table-column>
<el-table-column prop="ownerCode" label="货主代码" width="180px" />
<el-table-column prop="lockedQty" label="锁定数量" width="180px" />
<el-table-column prop="usableQty" label="可用数量" width="180px" />
<el-table-column prop="singlePrice" label="单价" width="180px" />
<el-table-column prop="amount" label="金额" width="180px" />
<el-table-column prop="putInTime" label="入库时间" width="180px">
<el-table-column prop="ownerCode" :label="t('home.shipper_code')" width="180px" />
<el-table-column prop="lockedQty" :label="t('home.lock_quantity')" width="180px" />
<el-table-column prop="usableQty" :label="t('home.available_quantity')" width="180px" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="180px" />
<el-table-column prop="amount" :label="t('home.money')" width="180px" />
<el-table-column prop="putInTime" :label="t('home.warehouse_entry_time')" width="180px">
<template #default="scope">
<span>{{ formatDate(scope.row.planDate) }}</span>
</template>
@ -182,7 +182,7 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">待处理任务</div>
<div class="title">{{ t('home.waiting_tasks') }}</div>
<Echart :options="barOptions" :height="280" :key="lineIndex" />
</div>
</div>
@ -195,6 +195,8 @@ import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { set } from 'lodash-es'
import { EChartsOption } from 'echarts'
import { barOptions } from '../echarts-data'
const { t } = useI18n()
const lineIndex = ref(0)
//
const productData = ref()
@ -215,10 +217,10 @@ const getJobCharts = async () => {
'xAxis.data',
Object.keys( productData.value.jobCount)
)
set(barOptionsData, 'legend.data', ['待处理任务'])
set(barOptionsData, 'legend.data', [t('home.waiting_tasks')])
set(barOptionsData, 'series', [
{
name:'待处理任务',
name:t('home.waiting_tasks'),
data: Object.values( productData.value.jobCount),
type: 'bar',
barMaxWidth:30

156
src/views/home/components/supplierIndex.vue

@ -3,57 +3,57 @@
<div class="one-row">
<div class="data">
<div class="data-item">
<div class="small-title">订单数</div>
<div class="small-title">{{ t('home.number_orders') }}</div>
<div class="small-data">
<div class="small-data-item small-data-item1">
<div class="small-data-item-txt">
<div>{{ supplierData?.openPurchaseCount || 0 }}<span></span></div>
<div>开放订单数</div>
<div>{{ supplierData?.openPurchaseCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{ t('home.number_open') }}</div>
</div>
<img src="../../../assets/imgs/icon1.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item2 ml-14px">
<div class="small-data-item-txt">
<div>{{ supplierData?.allPurchaseCount || 0 }}<span></span></div>
<div>全部订单数</div>
<div>{{ supplierData?.allPurchaseCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{ t('home.number_total_order') }}</div>
</div>
<img src="../../../assets/imgs/icon5.png" alt="" class="img" />
</div>
</div>
</div>
<div class="data-item ml-14px">
<div class="small-title">要货计划数</div>
<div class="small-title">{{t('home.number_planned_shipments')}}</div>
<div class="small-data">
<div class="small-data-item small-data-item3">
<div class="small-data-item-txt">
<div>{{ supplierData?.openPurchasePlanCount || 0 }}<span></span></div>
<div>开放计划数</div>
<div>{{ supplierData?.openPurchasePlanCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{t('home.number_open_plans')}}</div>
</div>
<img src="../../../assets/imgs/icon6.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item4 ml-14px">
<div class="small-data-item-txt">
<div>{{ supplierData?.allPurchasePlanCount || 0 }}<span></span></div>
<div>全部计划数</div>
<div>{{ supplierData?.allPurchasePlanCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{t('home.number_all_plans')}}</div>
</div>
<img src="../../../assets/imgs/icon3.png" alt="" class="img" />
</div>
</div>
</div>
<div class="data-item ml-14px">
<div class="small-title">发货单数</div>
<div class="small-title">{{t('home.number_invoices')}}</div>
<div class="small-data">
<div class="small-data-item small-data-item5">
<div class="small-data-item-txt">
<div>{{ supplierData?.notTakeSupplierdeliverCount || 0 }}<span></span></div>
<div>未收货订单数</div>
<div>{{ supplierData?.notTakeSupplierdeliverCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{t('home.number_unreceived_orders')}}</div>
</div>
<img src="../../../assets/imgs/icon4.png" alt="" class="img" />
</div>
<div class="small-data-item small-data-item6 ml-14px">
<div class="small-data-item-txt">
<div>{{ supplierData?.takeSupplierdeliverCount || 0 }}<span></span></div>
<div>已收货订单数</div>
<div>{{ supplierData?.takeSupplierdeliverCount || 0 }}<span>{{ t('home.single') }}</span></div>
<div>{{t('home.number_orders_received')}}</div>
</div>
<img src="../../../assets/imgs/icon2.png" alt="" class="img" />
</div>
@ -62,36 +62,36 @@
</div>
<div class="two-row mt-14px">
<div class="data1 w-[65%]">
<div class="title">本月发货单趋势</div>
<div class="title">{{t('home.invoice_trend_month')}}</div>
<Echart :options="lineOptions" :height="280" :key="lineIndex" />
</div>
<div class="data1 w-[35%] ml-14px">
<div class="title">本月发货零件TOP10</div>
<div class="title">{{t('home.TOP10_parts_shipped_month')}}</div>
<Echart :options="pieOptions" :height="280" :key="lineIndex" />
</div>
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">最新消息</div>
<div class="title">{{t('home.latest_news')}}</div>
<el-table :data="notaicList" style="width: 100%" stripe height="240px">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="用户类型" align="center" prop="userType">
<el-table-column :label="t('home.number')" align="center" prop="id" />
<el-table-column :label="t('home.user_type')" align="center" prop="userType">
<template #default="scope">
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType" />
</template>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" width="80" />
<el-table-column label="模板编码" align="center" prop="templateCode" width="80" />
<el-table-column label="发送人名称" align="center" prop="templateNickname" width="180" />
<el-table-column :label="t('home.user_number')" align="center" prop="userId" width="80" />
<el-table-column :label="t('home.template_coding')" align="center" prop="templateCode" width="80" />
<el-table-column :label="t('home.sender_number')" align="center" prop="templateNickname" width="180" />
<el-table-column
label="模版内容"
:label="t('home.template_content')"
align="center"
prop="templateContent"
width="200"
show-overflow-tooltip
/>
<el-table-column
label="模版参数"
:label="t('home.template_parameters')"
align="center"
prop="templateParams"
width="180"
@ -99,7 +99,7 @@
>
<template #default="scope"> {{ scope.row.templateParams }}</template>
</el-table-column>
<el-table-column label="模版类型" align="center" prop="templateType" width="120">
<el-table-column :label="t('home.template_type')" align="center" prop="templateType" width="120">
<template #default="scope">
<dict-tag
:type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE"
@ -107,20 +107,20 @@
/>
</template>
</el-table-column>
<el-table-column label="是否已读" align="center" prop="readStatus" width="100">
<el-table-column :label="t('home.read')" align="center" prop="readStatus" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.readStatus" />
</template>
</el-table-column>
<el-table-column
label="阅读时间"
:label="t('home.read_time')"
align="center"
prop="readTime"
width="180"
:formatter="dateFormatter"
/>
<el-table-column
label="创建时间"
:label="t('home.create_time')"
align="center"
prop="createTime"
width="180"
@ -137,91 +137,91 @@
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">最新扣分明细</div>
<div class="title">{{ t('home.latest_deduction_details')}}</div>
<el-table :data="tableData" style="width: 100%" stripe height="240px">
<el-table-column prop="title" label="标题" />
<el-table-column prop="name" label="发布人" />
<el-table-column prop="date" label="发布日期" />
<el-table-column prop="title" :label="t('home.title')" />
<el-table-column prop="name" :label="t('home.publisher')" />
<el-table-column prop="date" :label="t('home.publish_date')" />
</el-table>
</div>
</div>
<div class="two-row mt-14px">
<div class="data1 w-[47.3%]">
<div class="title">本月退货明细</div>
<div class="title">{{t('home.month_return_detials')}}</div>
<el-table
:data="supplierData?.purchasereturnRecordMonth"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="number" label="单据号" width="180" />
<el-table-column prop="fromPackingNumber" label="从包装号" width="180" />
<el-table-column prop="toPackingNumber" label="到包装号" width="180" />
<el-table-column prop="fromContainerNumber" label="从器具号" width="120" />
<el-table-column prop="toContainerNumber" label="到器具号" width="120" />
<el-table-column prop="fromBatch" label="从批次" width="120" />
<el-table-column prop="toBatch" label="到批次" width="120" />
<el-table-column prop="altBatch" label="替代批次" width="120" />
<el-table-column prop="fromLocationCode" label="从库位代码" width="120" />
<el-table-column prop="toLocationCode" label="到库位代码" width="120" />
<el-table-column prop="fromLocationGroupCode" label="从库位组代码" width="120" />
<el-table-column prop="toLocationGroupCode" label="到库位组代码" width="120" />
<el-table-column prop="fromAreaCode" label="从库区代码" width="120" />
<el-table-column prop="toAreaCode" label="到库区代码" width="120" />
<el-table-column prop="fromOwnerCode" label="从货主代码" width="120" />
<el-table-column prop="toOwnerCode" label="到货主代码" width="120" />
<el-table-column prop="inventoryStatus" label="库存状态" width="120">
<el-table-column prop="number" :label="t('home.document_number')" width="180" />
<el-table-column prop="fromPackingNumber" :label="t('home.source_package_number')" width="180" />
<el-table-column prop="toPackingNumber" :label="t('home.destination_package_number')" width="180" />
<el-table-column prop="fromContainerNumber" :label="t('home.source_appliance_number')" width="120" />
<el-table-column prop="toContainerNumber" :label="t('home.destination_appliance_number')" width="120" />
<el-table-column prop="fromBatch" :label="t('home.source_batch')" width="120" />
<el-table-column prop="toBatch" :label="t('home.destination_batch')" width="120" />
<el-table-column prop="altBatch" :label="t('home.replace_batch')" width="120" />
<el-table-column prop="fromLocationCode" :label="t('home.source_location_code')" width="120" />
<el-table-column prop="toLocationCode" :label="t('home.destination_location_code')" width="120" />
<el-table-column prop="fromLocationGroupCode" :label="t('home.source_location_group_code')" width="120" />
<el-table-column prop="toLocationGroupCode" :label="t('home.destination_location_group_code')" width="120" />
<el-table-column prop="fromAreaCode" :label="t('home.source_location_area_code')" width="120" />
<el-table-column prop="toAreaCode" :label="t('home.destination_location_area_code')" width="120" />
<el-table-column prop="fromOwnerCode" :label="t('home.source_shipper_code')" width="120" />
<el-table-column prop="toOwnerCode" :label="t('home.destination_shipper_code')" width="120" />
<el-table-column prop="inventoryStatus" :label="t('home.inventory_state')" width="120">
<template #default="scope">
{{ formatter(scope.row.inventoryStatus,DICT_TYPE.INVENTORY_STATUS) }}
</template>
</el-table-column>
<el-table-column prop="poNumber" label="订单号" width="120" />
<el-table-column prop="poline" label="订单行" width="120" />
<el-table-column prop="reason" label="原因" width="120" />
<el-table-column prop="singlePrice" label="单价" width="120" />
<el-table-column prop="amount" label="金额" width="120" />
<el-table-column prop="itemCode" label="物料代码" width="160" />
<el-table-column prop="itemName" label="物料名称" width="120" />
<el-table-column prop="itemDesc1" label="物料描述1" width="120" />
<el-table-column prop="itemDesc2" label="物料描述2" width="120" />
<el-table-column prop="qty" label="数量" width="120" />
<el-table-column prop="uom" label="计量单位" width="120">
<el-table-column prop="poNumber" :label="t('home.order_number')" width="120" />
<el-table-column prop="poline" :label="t('home.order_line')" width="120" />
<el-table-column prop="reason" :label="t('home.cause')" width="120" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="120" />
<el-table-column prop="amount" :label="t('home.money')" width="120" />
<el-table-column prop="itemCode" :label="t('home.material_code')" width="160" />
<el-table-column prop="itemName" :label="t('home.material_name')" width="120" />
<el-table-column prop="itemDesc1" :label="t('home.material_description1')" width="120" />
<el-table-column prop="itemDesc2" :label="t('home.material_description2')" width="120" />
<el-table-column prop="qty" :label="t('home.amount')" width="120" />
<el-table-column prop="uom" :label="t('home.measuring_unit')" width="120">
<template #default="scope">
{{ formatter(scope.row.uom,DICT_TYPE.UOM) }}
</template>
</el-table-column>
<el-table-column prop="projectCode" label="项目代码" width="120" />
<el-table-column prop="remark" label="备注" width="120" />
<el-table-column prop="createTime" label="创建时间" width="170">
<el-table-column prop="projectCode" :label="t('home.item_code')" width="120" />
<el-table-column prop="remark" :label="t('home.comment')" width="120" />
<el-table-column prop="createTime" :label="t('home.create_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="creator" label="创建者" width="120" />
<el-table-column prop="creator" :label="t('home.creater')" width="120" />
</el-table>
</div>
<div class="data1 w-[47.3%]">
<div class="title">本月索赔明细</div>
<div class="title">{{t('home.claim_details_month')}}</div>
<el-table
:data="supplierData?.purchasereturnRecordMonth"
style="width: 100%"
stripe
height="240px"
>
<el-table-column prop="number" label="单据号" width="180" />
<el-table-column prop="fromBatch" label="批次" width="120" />
<el-table-column prop="poNumber" label="订单号" width="120" />
<el-table-column prop="poline" label="订单行" width="120" />
<el-table-column prop="reason" label="原因" width="120" />
<el-table-column prop="singlePrice" label="单价" width="120" />
<el-table-column prop="amount" label="金额" width="120" />
<el-table-column prop="number" :label="t('home.document_number')" width="180" />
<el-table-column prop="fromBatch" :label="t('home.batch')" width="120" />
<el-table-column prop="poNumber" :label="t('home.order_number')" width="120" />
<el-table-column prop="poline" :label="t('home.order_line')" width="120" />
<el-table-column prop="reason" :label="t('home.cause')" width="120" />
<el-table-column prop="singlePrice" :label="t('home.unit_price')" width="120" />
<el-table-column prop="amount" :label="t('home.money')" width="120" />
<el-table-column prop="code" label="代码" width="160" />
<el-table-column prop="createTime" label="创建时间" width="170">
<el-table-column prop="createTime" :label="t('home.create_time')" width="170">
<template #default="scope">
<span>{{ formatDate(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="creator" label="创建者" width="120" />
<el-table-column prop="creator" :label="t('home.creater')" width="120" />
</el-table>
</div>
</div>
@ -284,10 +284,10 @@ const getInvoiceCharts = async () => {
'xAxis.data',
supplierData.value.supplierdeliverMonthCount.map((v) => v.date)
)
set(lineOptionsData, 'legend.data', ['本月发货单趋势'])
set(lineOptionsData, 'legend.data', [t('home.invoice_trend_month')])
set(lineOptionsData, 'series', [
{
name: '本月发货单趋势',
name: t('home.invoice_trend_month'),
smooth: true,
type: 'line',
itemStyle: {},

244
src/views/mes/itemRequestMain/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ItemRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ItemRequestMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ItemRequestMainRules"
:formAllSchemas="ItemRequestMain.allSchemas"
:apiUpdate="ItemRequestMainApi.updateItemRequestMain"
:apiCreate="ItemRequestMainApi.createItemRequestMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemRequestMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/item-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ItemRequestMain,ItemRequestMainRules } from './itemRequestMain.data'
import * as ItemRequestMainApi from '@/api/mes/itemRequestMain'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'MesItemRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ItemRequestMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: ItemRequestMainApi.getItemRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
//defaultButtons.defaultAddBtn({hasPermi:'mes:itemRequestMain:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'mes:itemRequestMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:itemRequestMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:itemRequestMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:itemRequestMain:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ItemRequestMain.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ItemRequestMainApi.createItemRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await ItemRequestMainApi.updateItemRequestMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicItemRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ItemRequestMainApi.deleteItemRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await ItemRequestMainApi.exportItemRequestMain(tableObject.params)
download.excel(data, '叫料申请单主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '叫料申请单主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ItemRequestMainApi.importTemplate()
})
</script>

170
src/views/mes/itemRequestMain/itemRequestMain.data.ts

@ -0,0 +1,170 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const ItemRequestMainRules = reactive({
concurrencyStamp: [required],
})
export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '删除时间',
field: 'deleteTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
search: {
component: 'DatePicker',
componentProps: {
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'
}
},
},
{
label: '主键',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '删除用户名',
field: 'deleter',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '计划编码',
field: 'planDayCode',
sort: 'custom',
isSearch: true,
},
{
label: '工单编码',
field: 'workBillNo',
sort: 'custom',
isSearch: true,
},
{
label: '批次编码',
field: 'batchCode',
sort: 'custom',
isSearch: true,
},
{
label: '申请单号',
field: 'requestBillNo',
sort: 'custom',
isSearch: true,
},
{
label: '工位编码',
field: 'workstationCode',
sort: 'custom',
isSearch: true,
},
{
label: '产品编码',
field: 'productCode',
sort: 'custom',
isSearch: true,
},
{
label: '工序编码',
field: 'processCode',
sort: 'custom',
isSearch: true,
},
{
label: '类型(1:叫料、2:补料)',
field: 'requestType',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

116
src/views/qms/basicDataManage/inspectionTemplate/addForm.vue

@ -562,30 +562,99 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
}
formType.value = type
if (row) {
data.value = JSON.parse(JSON.stringify(row))
data.value.version = String(data.value.version)
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
//
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
console.log(row)
//
if(formType.value == 'create'){
data.value ={
code: '',
description:row.description,
version:String(row.version),
dynamicUpdateCode:row.dynamicUpdateCode,
dynamicUpdateName:row.dynamicUpdateName,
process: []
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
let arr = []
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
console.log(item.inspectionCharacteristicsBaseVO)
let obj = {
description:item.description,
inspectionCharCode:item.inspectionCharCode,
inspectionCode:item.inspectionCode,
sequenceCode:item.sequenceCode,
name : index + 1,
inspectionCharacteristicsBaseVO:{
description:item.inspectionCharacteristicsBaseVO.description,
featureType:item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName,
isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate,
isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection,
quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping,
quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal,
quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping,
quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit,
quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget,
quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit,
quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode,
quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName,
quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget,
quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom,
resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod,
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode,
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName,
}
}
//
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
arr.push(obj)
})
data.value.process = arr
}else{
data.value = JSON.parse(JSON.stringify(row))
data.value.version = String(data.value.version)
let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
//
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
}
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true
} else {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
})
data.value.process = list
}
} else {
data.value = {
code: '',
@ -643,7 +712,6 @@ const buttonBaseClick1 = (val) => {
sequenceCode: '',
inspectionCharCode: '',
inspectionCharacteristicsBaseVO: {
describe: '',
inspectionMethodCode: '',
samplingProcessCode: '',
isCanUpdate: '',

3
src/views/qms/basicDataManage/inspectionTemplate/index.vue

@ -138,6 +138,7 @@ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi: 'qms:programme-template:update'}),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:programme-template:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:programme-template:disable'}),
defaultButtons.mainCopyBtn({hasPermi:'qms:programme-template:copy'}),
]
}
@ -151,6 +152,8 @@ const buttonTableClick = async (val, row) => {
handleEnable(row.id)
}else if (val == 'disable') {
handleDisable(row.id)
}else if (val == 'copy') {
openForm('create', row)
}
}

41
src/views/qms/inspection/inspectionJob/addForm.vue

@ -8,7 +8,7 @@
<TableForm ref="tableFormRef" style="width:100%;" :maxHeight = "490" :tableFields="tableAllSchemas.tableFormColumns" :tableFormRules="tableFormRules" :tableData="data.packageList" :isShowButton="false" :isShowReduceButton="false" />
</div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card" tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processCode" :name="item.name">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
@ -64,10 +64,17 @@
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model=" item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled placeholder="请输入样品份数" />
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate">
@ -316,7 +323,7 @@ const rules = ref({
],
qualifiedQuantity: [{ required: true, message: '请输入选择结束时间', trigger: 'blur' }]
})
const allSamplePieceSize = ref(0)
/** 打开弹窗 */
let tabIndex = 1
const open = async (type: string, row?: any, masterParmas?: any, titleName?: any) => {
@ -326,6 +333,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
dialogTitle.value = t('action.' + type)
}
formType.value = type
allSamplePieceSize.value =0//0
if (row) {
data.value = JSON.parse(JSON.stringify(row))
// console.log(data.value)//
@ -337,6 +345,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
editableTabsValue.value = index + 1
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
//
allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(2))
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 0) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
@ -384,8 +395,25 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
console.log(22,allSamplePieceSize.value )
data.value.subList = list
/**
设置采样数量默认第一个包装采样数量<总数量显示数量字段第二个包装和剩下的总数量对比以此类推
第一个包装采样数量>总数量 则显示总数量
*/
for(let i = 0; i<data.value.packageList.length;i++){
if(allSamplePieceSize.value>data.value.packageList[i].amount){
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(2))
}else{
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value=0
// return;
}
}
// data.value.packageList.forEach(item=>{
// })
dialogVisible.value = true
nextTick(() => {
formMainRef.value.setValues(row)
@ -522,7 +550,12 @@ const submitForm = async () => {
console.log(11,data.value.packageList)
if(data.value.packageList?.length>0){
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
if (!validateForm1) return
let isPass = data.value.packageList.some(cur=>parseFloat(cur.sampleAmount)>parseFloat(cur.amount))
if(isPass){
message.error(`采样数量不能大于数量`)
return
}
// let number = 0
// data.value.packageList.forEach(cur=>{
// number += parseFloat(cur.sampleAmount)

17
src/views/qms/inspection/inspectionJob/detail.vue

@ -11,7 +11,7 @@
</ContentWrap>
<ContentWrap>
<el-tabs v-model="editableTabsValue" class="demo-tabs" type="border-card" tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processCode" :name="item.name">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" ref="formProcessRef">
<el-row :gutter="20">
@ -59,6 +59,21 @@
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsRespVO.samplePieceSize">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsRespVO.samplePieceSize" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsRespVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsRespVO.isCanUpdate" disabled />

96
src/views/qms/inspection/inspectionRecord/detail.vue

@ -76,47 +76,61 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="检验方法"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请输入检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请输入采样过程"
/>
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请输入动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-form-item
label="检验方法"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.inspectionMethodName"
disabled
placeholder="请输入检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程"
prop="inspectionRecordCharacteristicsRespVO.inspectionMethod"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName"
disabled
placeholder="请输入采样过程"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionRecordCharacteristicsRespVO.samplingProcessCode">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.samplingProcessName" disabled placeholder="请选择采样过程编码" />
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionRecordCharacteristicsRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionRecordCharacteristicsRespVO.sampleQty" disabled placeholder="请输入样品份数" />
</div>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item
label="动态修改规则编码"
prop="inspectionRecordCharacteristicsRespVO.dynamicUpdateCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionRecordCharacteristicsRespVO.dynamicUpdateName"
disabled
placeholder="请输入动态修改规则编码"
/>
</div>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"

2
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -82,7 +82,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '单位',
field: 'unit',
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
table: {

4
src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

@ -94,9 +94,9 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
}
},
{
label: '包装单位',
label: '计量单位', // 发料申请 与当前物料计量单位做匹配 : 原PACK_UNIT 修改:UOM
field: 'uom',
dictType: DICT_TYPE.PACK_UNIT,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',

1
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -581,6 +581,7 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
let isZC = true //
data.subList.forEach(item => {
item.productionLineCode = data.productionLineCode
if (item.qty % item.packQty !== 0) {
isZC = false
}

8
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -914,8 +914,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 120
},
isTable:false,
isTableForm: false,
isTable:true,
isTableForm: true,
tableForm:{
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
@ -964,8 +964,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
table: {
width: 120
},
isTable:false,
isTableForm: false,
isTable:true,
isTableForm: true,
tableForm:{
disabled: true
},

2
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -122,6 +122,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
tableData.value.push(newRow)
})
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}

28
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -323,14 +323,14 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
 searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
        searchCondition: [{
          key: 'businessType',
          value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
        },{
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值
action: 'isNotStr', // 查询拼接条件
@ -346,13 +346,13 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePageByBusinessType, // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalancePageByBusinessTypeByItemType, // 查询弹窗所需分页方法
searchCondition: [{
key: 'businessType',
value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
key: 'businessType',
value: businessTypeData.code,
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
},{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值

36
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data.ts

@ -26,6 +26,14 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
sort: 'custom',
isForm:false,
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '供应商批次',
@ -33,6 +41,14 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
sort: 'custom',
isForm:false,
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '发货数量',
@ -40,11 +56,19 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
sort: 'custom',
isForm:false,
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 6
}
},
},
{
label: '计量单位',
@ -58,8 +82,14 @@ export const SupplierdeliverInspectionDetail = useCrudSchemas(reactive<CrudSchem
width: 150
},
tableForm: {
type: 'Select'
}
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '备注',

21
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -143,7 +143,8 @@
@handleAddTable="handleAddQualityReport"
@handleDeleteTable="handleDeleteQualityReport"
@submitForm="submitFormUploadQualityReport"
:isShowReduceButton="true"
:isShowReduceButton="false"
:isShowButton="false"
>
<template #SupplierdeliverInspectionDetail>
<span>1111</span>
@ -642,10 +643,17 @@ const handleUploadQualityReport = async (row) => {
}
ploadQualityReportRef.value.open('create', null, {masterId:row.masterId},'上传质检报告','上传质检报告')// createLabel
const tableFormKeys = {}
SupplierdeliverInspectionDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
uploadQualityReportTableData.value = [tableFormKeys]
await SupplierdeliverInspectionDetailApi.getSupplierdeliverDetailInfo(row.masterId).then(res => {
if(res){
// console.log(":",res)
uploadQualityReportTableData.value = res;
}
})
//uploadQualityReportTableData.value = [tableFormKeys]
}
const submitFormUploadQualityReport = async (formType, data) => {
@ -712,6 +720,7 @@ const handleTur = async (id: number) => {
/** 处理按钮操作 */
const genRecords = async (id: number) => {
let getLoading = null
try {
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(async res => {
if(!res){
@ -720,7 +729,11 @@ const genRecords = async (id: number) => {
}else{
//
await message.confirm('是否处理所选中数据?')
tableObject.loading = true
getLoading = ElLoading.service({
lock: true,
text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)'
})
//
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
message.success(t('处理成功!'))
@ -734,7 +747,7 @@ const genRecords = async (id: number) => {
console.log("自检报告校验异常",err)
})
} catch {}finally{
tableObject.loading = false
getLoading?.close()
}
}

Loading…
Cancel
Save