Browse Source

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

master_hella_20240701
宋国强 8 months ago
parent
commit
bd411891d2
  1. 37
      src/api/home/index.ts
  2. 5
      src/api/wms/inventoryinitRecordDetail/index.ts
  3. 5
      src/utils/dict.ts
  4. 217
      src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts
  5. 55
      src/views/eam/equipmentReportRepairRequest/index.vue
  6. 1
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  7. 23
      src/views/wms/basicDataManage/factoryModeling/dock/index.vue
  8. 59
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue
  9. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  10. 2
      src/views/wms/reportList/index.vue

37
src/api/home/index.ts

@ -20,3 +20,40 @@ export const getProductData = async () => {
return await request.get({ url: `/wms/index/indexProduct` })
}
// 超期库存预警
export const getOverdueBalance = async (params) => {
return await request.get({ url: `/wms/index/pageOverdueBalance`,params })
}
// 呆滞库存预警
export const getStagnantBalance = async (params) => {
return await request.get({ url: `/wms/index/pageStagnantBalance` ,params})
}
// 高低储预警
export const getWarningBalance = async (params) => {
return await request.get({ url: `/wms/index/pageWarningBalance` ,params})
}
// 本月退货明细
export const getPurchasereturnRecordMonth = async (params) => {
return await request.get({ url: `/wms/index/pagePurchasereturnRecordMonth`,params })
}
// 本月索赔明细
export const getPurchaseclaimRecordMonth = async (params) => {
return await request.get({ url: `/wms/index/pagePurchaseclaimRecordMonth`,params })
}
// 今日生产计划
export const getProductionToday = async (params) => {
return await request.get({ url: `/wms/index/pageProductionToday`,params })
}
// 线边安全库存
export const getSafeLocation = async (params) => {
return await request.get({ url: `/wms/index/pageSafeLocation`,params })
}
// 待上架成品库存
export const getProductputawayJobDetail = async (params) => {
return await request.get({ url: `/wms/index/pageProductputawayJobDetail`,params })
}

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

@ -72,4 +72,9 @@ export const exportInventoryinitRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventoryinit-record-detail/get-import-template' })
}
// 批量打印
export const printLabelBatchByIdSelection = async (data: any) => {
return await request.post({ url: `/wms/inventoryinit-record-main/printLabelBatchById` ,data})
}

5
src/utils/dict.ts

@ -354,7 +354,8 @@ export enum DICT_TYPE {
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期
EAM_ORDER_STATUS = 'eam_order_status',
EAM_PLAN_STATUS = 'eam_plan_status',
EAM_ORDER_STATUS = 'eam_order_status',// 保养工单状态
EAM_PLAN_STATUS = 'eam_plan_status', // 保养计划状态
EAM_REPAIR_STATUS = 'eam_repair_status', // 报修状态
OFF_BACK_STATUS = 'off_back_status'
}

217
src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts

@ -1,5 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
// 表单校验
export const EquipmentReportRepairRequestRules = reactive({
@ -9,7 +13,9 @@ export const EquipmentReportRepairRequestRules = reactive({
urgency: [required],
repairmaner: [required],
status: [required],
concurrencyStamp: [required]
shutDown:[required],
repairPhone:[required],
available:[required],
})
export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]>([
@ -17,7 +23,9 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
label: '报修编号',
field: 'number',
sort: 'custom',
isSearch: true
isSearch: true,
isForm: false,
isDetail:true,
},
{
label: '类型',
@ -25,16 +33,32 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
isSearch: false,
},
{
label: '设备工装编号',
label: '设备工装编号',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '设备信息', // 查询弹窗标题
searchListPlaceholder: '请选择 设备编号', // 输入框占位文本
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchField: 'code', // 查询弹窗赋值字段
searchPage: EquipmentItemApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
multiple:true,
searchCondition: [{
key: 'status',
value: 'NORMAL',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
},
{
label: '紧急程度',
@ -51,15 +75,12 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
dictType: DICT_TYPE.FAILURE_REASON,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '故障描述',
field: 'describing',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '是否停机',
@ -76,119 +97,115 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive<CrudSchema[]
label: '报修图片',
field: 'images',
sort: 'custom',
isSearch: true
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
isSearch: false,
},
// {
// label: '所属厂区编号',
// field: 'factoryAreaCode',
// sort: 'custom',
// isSearch: false,
// },
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true
isSearch: false,
required: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '车间', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '报修人',
field: 'repairmaner',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
isSearch: false,
},
{
label: '报修人联系电话',
field: 'repairPhone',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '报修状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
}
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: true,
form: {
component: 'Editor',
componentProps: {
valueHtml: '',
height: 200
}
}
},
{
label: '审核时间',
field: 'approveTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
}
},
{
label: '自动审核',
field: 'autoExamine',
sort: 'custom',
isSearch: true
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
isSearch: true
},
{
label: '自动确认',
field: 'autoVerify',
sort: 'custom',
isSearch: true
dictType: DICT_TYPE.EAM_REPAIR_STATUS,
dictClass: 'string',
isSearch: false,
isForm: false,
},
// {
// label: '审核人',
// field: 'approver',
// sort: 'custom',
// isSearch: false,
// },
// {
// label: '审核内容',
// field: 'approveContent',
// sort: 'custom',
// isSearch: false,
// },
// {
// label: '审核时间',
// field: 'approveTime',
// sort: 'custom',
// formatter: dateFormatter,
// isSearch: 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: 'autoExamine',
// sort: 'custom',
// isSearch: true
// },
// {
// label: '自动通过',
// field: 'autoAgree',
// sort: 'custom',
// isSearch: true
// },
// {
// label: '自动确认',
// field: 'autoVerify',
// sort: 'custom',
// isSearch: true
// },
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
isSearch: false,
},
{
label: '是否可用',

55
src/views/eam/equipmentReportRepairRequest/index.vue

@ -48,6 +48,7 @@
:apiCreate="EquipmentReportRepairRequestApi.createEquipmentReportRepairRequest"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
@ -65,6 +66,11 @@ 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'
import {Maintenance} from "@/views/eam/maintenance/maintenance.data";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts";
defineOptions({ name: 'EquipmentReportRepairRequest' })
@ -99,9 +105,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentReportRepairRequest:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentReportRepairRequest:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentReportRepairRequest:export'}), //
defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentReportRepairRequest:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentReportRepairRequest:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentReportRepairRequest:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +139,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentReportRepairRequest:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentReportRepairRequest:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentReportRepairRequest:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentReportRepairRequest:delete'}), //
]
// -
@ -149,6 +155,17 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "create"){
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((item) => {
if(item.field == 'status'){
}
})
}else{
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((item) => {
if(item.field == 'status'){
}
})
}
basicFormRef.value.open(type, row)
}
@ -226,6 +243,34 @@ const importSuccess = () => {
getList()
}
const onChange = (field, item) => {
//
if(field == 'type' && item == 'DEVICE'){
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = EquipmentAccounts.allSchemas
items.componentProps.searchPage = EquipmentItemApi.getEquipmentAccountsPage
}
})
}
//
if(field == 'type' && item == 'EQUIPMENT'){
EquipmentReportRepairRequest.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
items.componentProps.searchAllSchemas = ToolAccounts.allSchemas
items.componentProps.searchPage = ToolItemApi.getToolAccountsPage
}
})
}
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

1
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -80,6 +80,7 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

23
src/views/wms/basicDataManage/factoryModeling/dock/index.vue

@ -48,6 +48,7 @@
:apiCreate="DockApi.createDock"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onEnter="onEnter"
/>
<!-- 详情 -->
@ -66,6 +67,8 @@ 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'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
defineOptions({ name: 'Dock' })
@ -164,6 +167,26 @@ const openForm = (type: string, row?: any) => {
}
basicFormRef.value.open(type, row)
}
const onEnter = async (field,value)=>{
console.log('onEnter',field,value)
if('defaultLocationCode'==field){
//
basicFormRef.value.opensearchTable('itemCode', 'code', '库位信息', Location.allSchemas, LocationApi.getLocationPage,[{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'code',
value: value,
action: '==',
isSearch: true,
isMainValue: false
}])
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {

59
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...InventoryinitRecordMain.allSchemas.searchSchema,...InventoryinitRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...InventoryinitRecordMain.allSchemas.searchSchema,...InventoryinitRecordDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" />
</ContentWrap>
<!-- 列表头部 -->
@ -17,7 +17,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table ref="tableRef" v-clientTable
:selection="true"
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -27,6 +28,7 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -68,6 +70,8 @@ import * as InventoryinitRecordMainApi from '@/api/wms/inventoryinitRecordMain'
import * as InventoryinitRecordDetailApi from '@/api/wms/inventoryinitRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { getAccessToken } from '@/utils/auth'
//
defineOptions({ name: 'InventoryinitRecordMain' })
@ -94,6 +98,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:inventoryinit-record-main:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -120,6 +125,8 @@ const buttonBaseClick = (val, item) => {
getList()
}
} else if (val == 'filtrate') { //
} else if (val=='selection_point'){//
handleSelectionPoint()
} else { //
console.log('其他按钮', item)
}
@ -171,7 +178,55 @@ const searchFormClick = (searchData) => {
}
getList() //
}
const searchList = (model)=>{
selectionRows.value = []
setSearchParams(model)
}
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
console.log('批量打印',rows.join(','))
let getLoading = ElLoading.service({
lock: true,
text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)'
})
InventoryinitRecordDetailApi.printLabelBatchByIdSelection(rows.join(",")).then(res => {
console.log('批量打印res',res);
getLoading?.close()
if(res.zzLabel){
//
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.zzLabel)
}
if (res.cgLabel) {
//
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
}).catch(err => {
console.log(err)
getLoading?.close()
})
}
/** 初始化 **/
onMounted(async () => {
getList()

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="[...PurchasePlanMain.allSchemas.searchSchema,...PurchasePlanDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="searchList" />
<Search :schema="[...PurchasePlanMain.allSchemas.searchSchema,...PurchasePlanDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" />
</ContentWrap>
<!-- 列表头部 -->

2
src/views/wms/reportList/index.vue

@ -9,7 +9,7 @@
import { getAccessToken } from '@/utils/auth'
// const url = ref('http://localhost:12080/jmreport/view/881686740529258496')
const route = useRoute() //
debugger
const str = route.path.split('/')[3]
const url = ref(import.meta.env.VITE_JMREPORT_BASE_URL + '/jmreport/view/'+ str+ '?token='+ getAccessToken())
console.log(url);

Loading…
Cancel
Save