Browse Source

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

master_hella_20240701
songguoqiang 6 months ago
parent
commit
b8a548f3fb
  1. 3
      .env
  2. 7
      src/api/eam/equipmentMaintenanceDetail/index.ts
  3. 7
      src/api/eam/equipmentMaintenanceMain/index.ts
  4. 61
      src/api/eam/equipmentShutdown/index.ts
  5. 72
      src/api/eam/equipmentSigning/index.ts
  6. 7
      src/api/system/user/index.ts
  7. 30
      src/api/wms/processproductionRequestMain/index.ts
  8. 9
      src/api/wms/productreceiptRecordMain/index.ts
  9. 9
      src/components/BasicForm/src/BasicForm.vue
  10. 20
      src/components/Detail/src/DetailLedger.vue
  11. 2
      src/components/TableDetail/src/TableDetail.vue
  12. 8
      src/components/TableForm/src/TableForm.vue
  13. 2
      src/components/XButton/src/ButtonBase.vue
  14. 8
      src/hooks/web/useMessage.ts
  15. 2
      src/layout/components/Menu/src/components/useRenderMenuTitle.tsx
  16. 1
      src/locales/en-US.ts
  17. 3
      src/locales/zh-CN.ts
  18. 8
      src/styles/index.scss
  19. 4
      src/utils/dict.ts
  20. 28
      src/utils/disposition/defaultButtons.ts
  21. 3
      src/views/eam/equipmentAccounts/equipmentAccounts.data.ts
  22. 324
      src/views/eam/equipmentMaintenanceMain/DetailEam.vue
  23. 128
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts
  24. 136
      src/views/eam/equipmentMaintenanceMain/index.vue
  25. 7
      src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts
  26. 112
      src/views/eam/equipmentShutdown/equipmentShutdown.data.ts
  27. 244
      src/views/eam/equipmentShutdown/index.vue
  28. 343
      src/views/eam/equipmentSigning/equipmentSigning.data.ts
  29. 128
      src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts
  30. 156
      src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts
  31. 10
      src/views/eam/equipmentTransferRecord/index.vue
  32. 6
      src/views/eam/maintenance/maintenance.data.ts
  33. 9
      src/views/qms/dynamicRule/index.vue
  34. 8
      src/views/qms/inspectionScheme/index.vue
  35. 4
      src/views/qms/sampleCode/sampleCode.data.ts
  36. 7
      src/views/qms/selectedSet/index.vue
  37. 4
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  38. 18
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  39. 10
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  40. 2
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  41. 22
      src/views/wms/inventoryManage/balance/index.vue
  42. 2
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  43. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  44. 6
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  45. 18
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  46. 19
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  47. 18
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  48. 6
      src/views/wms/productionManage/processproduction/processproductionRecord/index.vue
  49. 35
      src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts
  50. 142
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  51. 40
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  52. 9
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  53. 20
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  54. 98
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue
  55. 8
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  56. 13
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

3
.env

@ -15,6 +15,3 @@ VITE_APP_CAPTCHA_ENABLE=true
# 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
# 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

7
src/api/eam/equipmentMaintenanceDetail/index.ts

@ -43,6 +43,11 @@ export const createEquipmentMaintenanceDetail = async (data: EquipmentMaintenanc
return await request.post({ url: `/eam/equipment-maintenance-detail/create`, data })
}
// 新增设备保养工单 通过主表添加
export const createItemEquipmentMaintenanceDetail = async (data: EquipmentMaintenanceDetailVO) => {
return await request.post({ url: `/eam/equipment-maintenance-detail/createItem`, data })
}
// 修改设备保养工单子
export const updateEquipmentMaintenanceDetail = async (data: EquipmentMaintenanceDetailVO) => {
return await request.put({ url: `/eam/equipment-maintenance-detail/update`, data })
@ -61,4 +66,4 @@ export const exportEquipmentMaintenanceDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-maintenance-detail/get-import-template' })
}
}

7
src/api/eam/equipmentMaintenanceMain/index.ts

@ -79,7 +79,12 @@ export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/ables` , data })
}
// 执行保养工单
// 修改保养工单状态
export const updateMaintenanceOrder = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/updateOrder`, data })
}
//执行保养工单
export const executeMaintenanceOrder = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/execute`, data })
}

61
src/api/eam/equipmentShutdown/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface EquipmentShutdownVO {
id: number
equipmentCode: string
operationDate: Date
operationer: string
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
status: string
shutdownCause: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备停机记录列表
export const getEquipmentShutdownPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/equipment-shutdown/senior', data })
} else {
return await request.get({ url: `/eam/equipment-shutdown/page`, params })
}
}
// 查询设备停机记录详情
export const getEquipmentShutdown = async (id: number) => {
return await request.get({ url: `/eam/equipment-shutdown/get?id=` + id })
}
// 新增设备停机记录
export const createEquipmentShutdown = async (data: EquipmentShutdownVO) => {
return await request.post({ url: `/eam/equipment-shutdown/create`, data })
}
// 修改设备停机记录
export const updateEquipmentShutdown = async (data: EquipmentShutdownVO) => {
return await request.put({ url: `/eam/equipment-shutdown/update`, data })
}
// 删除设备停机记录
export const deleteEquipmentShutdown = async (id: number) => {
return await request.delete({ url: `/eam/equipment-shutdown/delete?id=` + id })
}
// 导出设备停机记录 Excel
export const exportEquipmentShutdown = async (params) => {
return await request.download({ url: `/eam/equipment-shutdown/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-shutdown/get-import-template' })
}

72
src/api/eam/equipmentSigning/index.ts

@ -0,0 +1,72 @@
import request from '@/config/axios'
export interface EquipmentSigningVO {
id: number
equipmentCode: string
operationDate: Date
operationer: string
operationDept: string
telephone: string
supplierCode: string
supplierPeople: string
supplierTelephone: string
status: string
approver: number
approveContent: string
approveTime: Date
autoExamine: string
autoAgree: string
directCreateRecord: string
storageLocation: string
factoryAreaCode: string
workshopCode: string
workshopSectionCode: string
departmentCode: string
remark: string
siteId: string
available: string
deletionTime: Date
deleterId: byte[]
concurrencyStamp: number
}
// 查询设备到货签收记录列表
export const getEquipmentSigningPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/equipment-signing/senior', data })
} else {
return await request.get({ url: `/eam/equipment-signing/page`, params })
}
}
// 查询设备到货签收记录详情
export const getEquipmentSigning = async (id: number) => {
return await request.get({ url: `/eam/equipment-signing/get?id=` + id })
}
// 新增设备到货签收记录
export const createEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.post({ url: `/eam/equipment-signing/create`, data })
}
// 修改设备到货签收记录
export const updateEquipmentSigning = async (data: EquipmentSigningVO) => {
return await request.put({ url: `/eam/equipment-signing/update`, data })
}
// 删除设备到货签收记录
export const deleteEquipmentSigning = async (id: number) => {
return await request.delete({ url: `/eam/equipment-signing/delete?id=` + id })
}
// 导出设备到货签收记录 Excel
export const exportEquipmentSigning = async (params) => {
return await request.download({ url: `/eam/equipment-signing/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/eam/equipment-signing/get-import-template' })
}

7
src/api/system/user/index.ts

@ -97,3 +97,10 @@ export const forgetPassword = (data : UserVO) => {
export const updatePassword = (data : UserVO) => {
return request.put({ url: '/system/user/updatePassword', data })
}
// 查询用户详情
export const getUserListByDeptIds = (data : Array<number>) => {
return request.post({ url: '/system/user/getUserListByDeptIds', data })
}

30
src/api/wms/processproductionRequestMain/index.ts

@ -54,4 +54,34 @@ export const exportProcessproductionRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/processproduction-request-main/get-import-template' })
}
// 关闭
export const closeProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/close?id=` + id })
}
// 重新添加
export const reAddProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/reAdd?id=` + id })
}
// 提交审批
export const submitProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/submit?id=` + id })
}
// 审批驳回
export const refusedProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/refused?id=` + id })
}
// 审批通过
export const agreeProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/agree?id=` + id })
}
// 处理
export const handleProcessproductionRequestMain = async (id) => {
return await request.put({ url: `/wms/processproduction-request-main/handle?id=` + id })
}

9
src/api/wms/productreceiptRecordMain/index.ts

@ -110,4 +110,13 @@ export const exportProductreceiptRecordAssembleMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-record-main/get-import-template' })
}
// 创建上架申请
export const createPutawayRequest = async (number:string) => {
return await request.post({ url: `/wms/productreceipt-record-main/createPutawayRequest?number=`+number })
}
// 创建检验申请
export const createInspectRequest = async (number:string) => {
return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number })
}

9
src/components/BasicForm/src/BasicForm.vue

@ -96,6 +96,7 @@
@inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange"
@clearInput='clearInput'
>
<template v-slot="{row}">
<slot :row="row"></slot>
@ -443,6 +444,7 @@ const opensearchTable = (
searchDetailSchemas
)
}
// searchTable
const changeDialogWidth = (width)=>{
searchTableRef.value.changeDialogWidth(width)
@ -650,7 +652,8 @@ const emit = defineEmits([
'inputNumberChange',
'formFormDateChange',
'footButtonClick',
'clearSearchInput'
'clearSearchInput',
'clearInput'
])
//
const formSelectChange = (field, val, row) => {
@ -719,12 +722,16 @@ const inpuFocus = (headerItem, row, index) => {
headerItem.tableForm?.searchDetailSchemas
)
}
const clearInput = (field, row, index) => {
emit('clearInput',field, row, index)
}
/**
* 监听改变事件
* @param field 当前操作字段
* @param cur 改变后值
*/
const onChange = (field, cur) => {
console.log(2222222222222)
emit('onChange', field, cur, formRef)
}

20
src/components/Detail/src/DetailLedger.vue

@ -216,6 +216,23 @@
@onBlur="onBlur"
@formFormDateChange="formFormDateChange"
/>
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="600"
:maxHeight="900"
:style="{height:'600px'}"
>
<Table
v-if="true"
:columns="dialogAllSchemasRef.tableColumns.filter(column => column.field !== 'action')"
:data="dialogTableObjectRef.tableList"
:loading="dialogTableObjectRef.loading"
:pagination="{ total: dialogTableObjectRef.total }"
v-model:pageSize="dialogTableObjectRef.pageSize"
v-model:currentPage="dialogTableObjectRef.currentPage"
/>
</Dialog>
</div>
</template>
@ -1123,6 +1140,7 @@ const dialogUploadNumber = ref()
const dialogUploadBusiCode = ref()
const dialogFormKey = ref(0)
const openDialog = async(row: any, titleName: any, titleValue: any) => {
debugger
const { tableObject, tableMethods } = useTable({
getListApi: props.dialogApiPage, //
defaultParams: getDialogParams(row)
@ -1140,7 +1158,7 @@ const openDialog = async(row: any, titleName: any, titleValue: any) => {
function getDialogParams(row: any) {
return {
number: row.number
'masterId': row.id
}
}

2
src/components/TableDetail/src/TableDetail.vue

@ -1,7 +1,7 @@
<template>
<!-- 详情 -->
<div class="expandTable" :style="{width:width}" style="padding:10px"> <!-- 列表头部 -->
<Table style="width:100%;border:1px solid red"
<Table style="width:100%;"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"

8
src/components/TableForm/src/TableForm.vue

@ -69,6 +69,7 @@
style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)"
/>
<Icon icon="ep:circle-close" v-if="headerItem?.tableForm?.isInpuFocusShow && headerItem?.tableForm?.disabled&& headerItem?.tableForm?.clearable" style='position:absolute;right:50px;cursor: pointer;' @click="clearInput(headerItem.field,row,index)"/>
<el-button :key="headerItem.field+$index+'button'" v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
</el-form-item>
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
@ -414,7 +415,8 @@ const emit = defineEmits([
'buttonOperationClick',
'inputStringBlur',
'tableFormSelectOnBlur',
'formFormDateChange'
'formFormDateChange',
'clearInput'
])
// | type = radio | type = select
const initSelectOptions = (item) => {
@ -511,7 +513,9 @@ const inpuFocus = (headerItem, row, index)=>{
const inputStringBlur = (field, val,row) => {
emit('inputStringBlur', field, val,row)
}
const clearInput= (field, row, index) => {
emit('clearInput',field, row, index)
}
//table
const buttonOperationClick = (row, label, index)=> {
emit("buttonOperationClick", row, label, index);

2
src/components/XButton/src/ButtonBase.vue

@ -11,7 +11,7 @@
@click="buttonBaseClick(item.name, item, $event)"
>
<Icon v-if="item.icon" :icon="item.icon" class="mr-1px" />
{{ item.label }}
<span :style="{width:item.width+'px'||'auto'}" :class="[item.width?'ellipsis':'']">{{ item.label }}</span>
</el-button>
<!-- 设置按钮 -->
<el-popover

8
src/hooks/web/useMessage.ts

@ -59,6 +59,14 @@ export const useMessage = () => {
type: 'warning'
})
},
// 确认窗体
confirmPassword(content: string, tip?: string) {
return ElMessageBox.confirm(content, tip ? tip : t('common.confirmTitle'), {
confirmButtonText: t('通过'),
cancelButtonText: t('不通过'),
type: 'warning'
})
},
// 删除窗体
delConfirm(content?: string, tip?: string) {
return ElMessageBox.confirm(

2
src/layout/components/Menu/src/components/useRenderMenuTitle.tsx

@ -9,7 +9,7 @@ export const useRenderMenuTitle = () => {
return icon ? (
<>
<Icon icon={meta.icon}></Icon>
<span class="v-menu__title">{t(`ts.${title}` as string).replace('ts.','')}</span>
<span class="v-menu__title ellipsis">{t(`ts.${title}` as string).replace('ts.','')}</span>
</>
) : (
<span class="v-menu__title">{t(`ts.${title}` as string).replace('ts.','')}</span>

1
src/locales/en-US.ts

@ -994,6 +994,7 @@ export default {
:'Refusal',
:'Approve',
:'Demand forecast master data',
:'Demand forecast master data leads into the template',
:'Create a supplier shipping request',
'是否重新打开所选中数据?':'Do you want to reopen the selected data?',
'请先上传自检报告!':'Please upload the self-test report first!',

3
src/locales/zh-CN.ts

@ -79,7 +79,7 @@ export default {
},
error: {
noPermission: `抱歉,您无权访问此页面。`,
pageError: '抱歉,您访问的页面不存在',
pageError: '抱歉,您访问的页面不存在',
networkError: '抱歉,服务器报告错误。',
returnToHome: '返回首页'
},
@ -994,6 +994,7 @@ export default {
:'驳回',
:'审批通过',
:'要货预测主',
:'要货预测主导入模版',
:'创建供应商发货申请',
'是否重新打开所选中数据?':'是否重新打开所选中数据?',
'请先上传自检报告!':'请先上传自检报告!',

8
src/styles/index.scss

@ -33,3 +33,11 @@
border-left-color: var(--el-color-primary);
}
}
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
word-break: break-all;
}

4
src/utils/dict.ts

@ -348,9 +348,9 @@ export enum DICT_TYPE {
SUBJECT = 'subject', //科目
REGION = 'region', //区域
PART_CLASS = 'part_class', //备件分类
FAILURE_DEGREE = 'failure_degree', // 紧急程度
FAILURE_DEGREE = 'failure_degree', // 故障紧急程度
FAILURE_REASON = 'failure_reason', //故障类型
REPAIR_DEGREE = 'repair_degree', //
REPAIR_DEGREE = 'repair_degree', //维修紧急程度
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期

28
src/utils/disposition/defaultButtons.ts

@ -325,6 +325,19 @@ export function mainListReceiveBtn(option:any) {
})
}
// 主列表-接单按钮
export function mainListReceiveOrderBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.接单`).replace('ts.', ''),
name: 'receive',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-执行按钮
export function mainListExecuteBtn(option:any) {
return __defaultBtnOption(option,{
@ -351,6 +364,19 @@ export function mainListFinishBtn(option:any) {
})
}
// 主列表-验证按钮
export function mainListValidateBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.验证`).replace('ts.', ''),
name: 'validate',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-绑定
export function mainListBindBtn(option:any) {
return __defaultBtnOption(option,{
@ -526,6 +552,7 @@ export function mainListPlanUploadQualityReportBtn(option:any) {
name: 'mainPlanUploadQualityReport',
hide: false,
type: 'primary',
width:86,
color: '',
link: true, // 文本展现按钮
hasPermi: ''
@ -987,6 +1014,7 @@ function __defaultBtnOption(option:any,specific:any){
hide:option && option.hide ? option.hide : specific.hide,
link:option && option.link ? option.link : specific.link,
hasPermi:option && option.hasPermi ? option.hasPermi : specific.hasPermi,
width:option && option.width ? option.width : specific.width,
...option
}
}

3
src/views/eam/equipmentAccounts/equipmentAccounts.data.ts

@ -1,8 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { validateHanset, validateNum, validateNum100 } from '@/utils/validator'
import { validateHanset, validateNum } from '@/utils/validator'
import { EquipmentSupplier } from '@/views/eam/equipmentSupplier/equipmentSupplier.data'
import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier'
import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data'

324
src/components/Detail/src/DetailQmsNumber.vue → src/views/eam/equipmentMaintenanceMain/DetailEam.vue

@ -2,17 +2,18 @@
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
:title="t(`ts.详情`).replace('ts.','')"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ t(`ts.${titleNameRef}`).replace('ts.','') }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<ContentWrap v-if="!isBasic" v-show="tabsList[current].label=='主数据'">
<Descriptions
:data="detailData"
labelClassName="label-class-name"
@ -24,11 +25,9 @@
width="200px"
/>
</ContentWrap>
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'"> <!-- 列表头部 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAlias.label&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
@ -54,6 +53,7 @@
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort"
>
<!-- <template #action="{ row }">
<ButtonBase
@ -70,9 +70,10 @@
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort"
>
<template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> </template>
<template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> </template>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@ -96,32 +97,77 @@
</template>
</DetailTable>
</ContentWrap>
<!-- other附件组件:如质检明细 -->
<div v-for="(annexItem ,index) in annexTableData" :key="index" v-show="annexItem.label==tabsList[current].label" class="w-[100%]" :style="{height:annexItem.hasSubDetail?'100%':remarkHeight+'px'}">
<ContentWrap class="w-[100%]">
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
:fileType="annexItem.fileType"
:showPreview="annexItem.showPreview"
:showDownload = "annexItem.showDownload"
:hiddenDelete = "annexItem.hiddenDelete"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
/>
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-if="annexItem.subDetailTableData">
<Table
v-if="!isBasic && fromeWhere != 'countPlan'"
:align="annexItem.align?annexItem.align:'center'"
:columns="annexItem.subDetailTableData.tableColumns"
:data="annexItem.subDetailTableData.tableList"
:loading="annexItem.subDetailTableData.loading"
:pagination="{ total: annexItem.subDetailTableData.tableList.length }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort"
/>
</ContentWrap>
</div>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label=='附件'"
<Annex
:annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
:key="count"
/>
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='备注'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 备注组件 -->
<Remarks v-show="tabsList[current].label=='备注'"
<Remarks
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
:key="count"
/>
</ElScrollbar>
</ContentWrap>
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<!-- 变更记录组件 -->
<ChangeRecord v-show="tabsList[current].label=='变更记录'" :changeRecordData="changeRecordData" class="mt-20px" />
</ElScrollbar>
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
</ElScrollbar>
</ContentWrap>
</div>
</el-drawer>
<!-- 表格弹窗 -->
<SearchTable ref="searchTableRef" @search-table-success="searchTableSuccess1" />
<!-- 表单弹窗添加/修改 -->
<BasicFormQmsNumber
<BasicForm
ref="formRef"
@success="submitForm"
:rules="detailAllSchemasRules"
@ -140,7 +186,6 @@
@onChange="detailBasicFormOnChange"
@onBlur="onBlur"
@formFormDateChange="formFormDateChange"
:myFuncTypeSign="myFuncTypeSign"
/>
</div>
</template>
@ -154,12 +199,15 @@ import Tabs from '@/components/Tabs/src/Tabs.vue'
import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicFormQmsNumber from '@/components/BasicForm/src/BasicFormQmsNumber.vue'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { SearchTable } from '@/components/SearchTable'
import {
EquipmentMaintenanceDetail, EquipmentMaintenanceDetailRules,
} from "@/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data";
defineOptions({ name: 'DetailQmsNumber' })
defineOptions({ name: 'Detail' })
const message = useMessage() //
const { t } = useI18n() //
@ -177,6 +225,24 @@ const props = defineProps({
required: true,
default: null
},
//tab
annexTable: {
type: Array,
required: false,
default: ()=>[]
},
//tab
annexAlias: {
type: Object,
required: false,
default: ()=>({
label: '附件',
showDownload:false,
showPreview:false,
hiddenDelete:false
})
},
//
isBasic: {
type: Boolean,
@ -311,16 +377,15 @@ const props = defineProps({
required: false,
default: false
},
//
myFuncTypeSign:{
type: String,
//
otherHeadButttonData:{
type:Array,
required: false,
default: null
},
default: () => []
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const myFuncTypeSign = props.myFuncTypeSign
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
if (props.isBasic == true) {
@ -342,23 +407,38 @@ if (props.isBasic == true) {
}
}
const otherList = []
const otherList = [...props.annexTable,{
label:props.annexAlias.label,
prop:'Annex'
},{
label:'备注',
prop:'Remarks'
},{
label:'变更记录',
prop:'ChangeRecord'
}]
tabsList.value = [...tabsList?.value,...otherList]
if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) {
tabsList.value.unshift({
label: '明细',
prop: 'Detail'
label: '明细',
prop: 'Detail'
})
}
if(!props.isBasic){
tabsList.value.unshift({
label: '主数据',
prop: 'Descriptions'
})
}
// Tabs
// Tabs
const tabRef = ref()
//
const scrollbar = ref()
const scrollbar = ref()
//
const remarkHeight = computed(() => {
const remarkHeight = computed(() => {
const tab = unref(tabRef)
const tabTop = tab?.$el.getBoundingClientRect().top
const tabHeight = tab?.$el.getBoundingClientRect().height
@ -372,6 +452,8 @@ const remarkHeight = computed(() => {
const annexData = reactive({
annexList: []
})
// //
const annexTableData = ref<Array<any>>([])
//
const remarksData = reactive({
@ -393,6 +475,48 @@ const getFileList = async () => {
detailLoading.value = false
}
}
//
const getAnnexFileList = async (row) => {
props.annexTable?.forEach(async (item) => {
let requstData = {...remarksData.data,tableName: item?.tableName}
if(item?.queryParams){
item?.queryParams?.forEach(queryItem => {
requstData[queryItem.queryField] = row[queryItem.rowField]
});
}
const annexList = await FileApi.getFileList(requstData)
const annexData = annexTableData.value.find(annex=>annex.label === item.label)
if(annexData){
annexData.annexList = annexList
}else{
annexTableData.value.push({
align:item.align,
label: item.label,
tableName: item?.tableName || '',
annexList,
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData,
fileType:item.fileType||['apk','doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg'],
showPreview:item.showPreview||false, //
showDownload:item.showDownload||false, //
hiddenDelete:item.hiddenDelete || false, //
})
if(item?.subDetailTableData){
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({
getListApi: item.subDetailTableData.getSubList //
})
const {getList:getSubList} = subTableMethods
subTableObject.params= {}
item.subDetailTableData.queryParams.forEach(queryItem => {
subTableObject.params[queryItem.queryField] = row[queryItem.rowField]
});
await getSubList()
item.subDetailTableData.tableList = subTableObject.tableList
console.log('subTableObject',annexTableData.value)
}
}
})
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
@ -403,6 +527,11 @@ const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
/** 追加的附件 */
const updateAnnexTableHandle = () => {
getAnnexFileList(detailData.value)
getChangeRecordList()
}
// Tabs
const current = ref(0)
@ -413,14 +542,14 @@ const change = (item, index) => {
// // --
scrollbar.value.scrollTo({ top: 0});
}
}
//
const masterParmas = ref({
masterId: '', //id
number: '', //
status: '', //
status: '' //
})
//
@ -455,17 +584,23 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
remarksData.data = {
tableId: row.masterId||row.id,
tableName: tableName
}
count.value++
//
if (!props.isBasic) {
// id
masterParmas.value.masterId = row.id
masterParmas.value.masterId = row.masterId||row.id
masterParmas.value.number = row.number
masterParmas.value.status = row.status
tableObjectRef.value.params = {
masterId: row.id
masterId: row.masterId||row.id
}
await getList()
}
@ -474,9 +609,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
detailLoading.value = true
try {
detailData.value = row
// getRemarkList()
// getFileList()
// getChangeRecordList()
getRemarkList()
getFileList()
getAnnexFileList(row)
getChangeRecordList()
//
let detailButtonFilter: any = []
let detailButtonAdd: any = []
@ -502,7 +638,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defaultButtons.defaultFilterBtn(null) //
]
}
HeadButttondata.value = [...HeadButttondata.value,...props.otherHeadButttonData]
let detailButtonEdit: any = []
let detailButtonDelete: any = []
if (props.detailButtonIsShowEdit) {
@ -564,11 +700,6 @@ detailAllSchemasRef.value = props.detailAllSchemas
//
const isShowMainButton = (row, val) => {
// if (val.indexOf(row.status) > -1) {
// return false
// } else {
// return true
// }
return false
}
@ -588,13 +719,13 @@ const buttonBaseClick = (val, item) => {
})
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
)
}else{
openForm('create')
@ -613,6 +744,7 @@ const buttonBaseClick = (val, item) => {
} else {
//
console.log('其他按钮', item)
emit('buttonBaseClick',val, item)
}
}
@ -643,8 +775,6 @@ const opensearchTable = (
}
}
}
console.log(searchCondition)
console.log(_searchCondition)
searchTableRef.value.open(
searchTitle,
searchAllSchemas,
@ -674,13 +804,13 @@ const buttonTableClick = async (val, row) => {
}
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
)
}else{
openForm('update', row)
@ -694,8 +824,71 @@ const buttonTableClick = async (val, row) => {
}
/** 添加/修改操作 */
const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value)
emit('detailOpenForm', type, row, masterParmas.value)
emit('detailOpenForm', type, row)
if(type == "create"){
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if(item.field == 'peoples'){
item.componentProps.disabled = true
EquipmentMaintenanceDetailRules.peoples[0].required = false
}
if(item.field == 'estimatedMinutes'){
EquipmentMaintenanceDetailRules.estimatedMinutes[0].required = true
}
if(item.field == 'actualMinutes'){
item.componentProps.disabled = true
EquipmentMaintenanceDetailRules.actualMinutes[0].required = false
}
if(item.field == 'completionTime'){
item.componentProps.disabled = true
}
if(item.field == 'result'){
item.componentProps.disabled = true
EquipmentMaintenanceDetailRules.result[0].required = false
}
if(item.field == 'uncompletedCause'){
item.componentProps.disabled = true
EquipmentMaintenanceDetailRules.uncompletedCause[0].required = false
}
if(item.field == 'name'){
EquipmentMaintenanceDetailRules.name[0].required = true
}
})
}else{
row.peoples = row.peoples.toString()
row.estimatedMinutes = row.estimatedMinutes.toString()
row.actualMinutes = row.actualMinutes.toString()
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((item) => {
if(item.field == 'peoples'){
console.log(item);
item.componentProps.disabled = false
EquipmentMaintenanceDetailRules.peoples[0].required = true
}
if(item.field == 'estimatedMinutes'){
EquipmentMaintenanceDetailRules.estimatedMinutes[0].required = false
}
if(item.field == 'actualMinutes'){
item.componentProps.disabled = false
EquipmentMaintenanceDetailRules.actualMinutes[0].required = true
}
if(item.field == 'completionTime'){
item.componentProps.disabled = false
}
if(item.field == 'result'){
item.componentProps.disabled = false
EquipmentMaintenanceDetailRules.result[0].required = true
}
if(item.field == 'uncompletedCause'){
item.componentProps.disabled = false
EquipmentMaintenanceDetailRules.uncompletedCause[0].required = false
}
if(item.field == 'name'){
EquipmentMaintenanceDetailRules.name[0].required = true
}
})
}
}
// form
const submitForm = async (formType, data) => {
@ -710,6 +903,7 @@ const submitForm = async (formType, data) => {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
emit('handleMainFefresh')
formRef.value.dialogVisible = false
//
await getList()
@ -740,7 +934,8 @@ const emit = defineEmits([
'openImage',
'onBlur',
'detailBasicFormOnChange',
'formFormDateChange'
'formFormDateChange',
'buttonBaseClick'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
@ -752,6 +947,7 @@ const handleDelete = async (id: number) => {
await props.apiDelete(id)
tableObject.loading = false
message.success(t('common.delSuccess'))
emit('handleMainFefresh')
//
await getList()
updateKey.value += 1
@ -796,16 +992,16 @@ const openImage=(item)=>{
* @param field 当前操作字段
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
}
/**
* 监听失焦事件
* @param field 当前操作字段
* @param e
* @param e
*/
const onBlur = (field, e) => {
const onBlur = (field, e) => {
emit('onBlur', field, e)
}

128
src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts

@ -4,6 +4,9 @@ import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {MaintenanceItem} from "@/views/eam/maintenanceItem/maintenanceItem.data";
import * as ItemApi from "@/api/eam/maintenanceItem";
import {validateroundNumber} from "@/utils/validator";
// 表单校验
export const EquipmentMaintenanceMainRules = reactive({
@ -240,12 +243,6 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
@ -355,7 +352,56 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
export const EquipmentMaintenanceDetailRules = reactive({
number: [required],
contents: [required],
masterId: [required],
peoples: [
{
required:false ,
message:'该项为必填项',
tagger:['blur']
},
{
validator:validateroundNumber,
message: '请输入正确的正整数',
trigger: 'blur'}],
estimatedMinutes: [
{
required:false ,
message:'该项为必填项',
tagger:['blur']
},
{
validator:validateroundNumber,
message: '请输入正确的正整数',
trigger: 'blur'}],
actualMinutes: [
{
required:false ,
message:'该项为必填项',
tagger:['blur']
},
{
validator:validateroundNumber,
message: '请输入正确的正整数',
trigger: 'blur'}],
completionTime: [required],
// [
// {
// required:false ,
// message:'该项为必填项',
// tagger:['blur']
// }],
result: [
{
required:false ,
message:'该项为必填项',
tagger:['blur']
}],
name: [required],
uncompletedCause:[{
required:false ,
message:'该项为必填项',
tagger:['blur','change']
}]
})
export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -373,38 +419,41 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'number',
sort: 'custom',
isSearch: true,
form:{
componentProps: {
disabled: true
}
}
},
{
label: '主表id',
field: 'masterId',
sort: 'custom',
isSearch: true,
form:{
componentProps: {
disabled: true
}
}
},
{
label: '人数',
field: 'peoples',
sort: 'custom',
isSearch: true,
isForm: true,
},
{
label: '预计分钟',
field: 'estimatedMinutes',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '实际分钟',
field: 'actualMinutes',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '责任人多选',
@ -445,25 +494,43 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'result',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string',
},
{
label: '保养名称',
label: '保养名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择 类别编码',
searchTitle: '保养项信息', // 查询弹窗标题
searchAllSchemas: MaintenanceItem.allSchemas, // 查询弹窗所需类
searchField: 'name', // 查询弹窗赋值字段
searchPage: ItemApi.getMaintenanceItemPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '=='
}]
}
}
},
{
label: '保养内容',
field: 'content',
sort: 'custom',
isSearch: true,
},
{
label: '保养部位',
field: 'equipmentParts',
sort: 'custom',
isSearch: true,
},
// {
// label: '保养内容',
// field: 'content',
// sort: 'custom',
// isSearch: true,
// },
// {
// label: '保养部位',
// field: 'equipmentParts',
// sort: 'custom',
// isSearch: true,
// },
{
label: '创建时间',
field: 'createTime',
@ -508,7 +575,10 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
},

136
src/views/eam/equipmentMaintenanceMain/index.vue

@ -55,10 +55,19 @@
<Detail ref="detailRef"
:isBasic="false"
:allSchemas="EquipmentMaintenanceMain.allSchemas"
:detailAllSchemasRules="EquipmentMaintenanceDetailRules"
:detailAllSchemas="EquipmentMaintenanceDetail.allSchemas"
:apiPage="EquipmentMaintenanceDetailApi.getEquipmentMaintenanceDetailPage"
:apiCreate="EquipmentMaintenanceDetailApi.createItemEquipmentMaintenanceDetail"
:apiUpdate="EquipmentMaintenanceDetailApi.updateEquipmentMaintenanceDetail"
:apiDelete="EquipmentMaintenanceDetailApi.deleteEquipmentMaintenanceDetail"
:detailButtonIsShowAdd=statusBtn
:detailButtonIsShowEdit=statusBtn
:detailButtonIsShowDelete=statusBtn
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail"
@detailBasicFormOnChange="detailBasicFormOnChange"
:key="count"
/>
<!-- 导入 -->
@ -67,30 +76,28 @@
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentMaintenanceMain,EquipmentMaintenanceMainRules,EquipmentMaintenanceDetail } from './equipmentMaintenanceMain.data'
import { EquipmentMaintenanceMain,EquipmentMaintenanceMainRules,EquipmentMaintenanceDetail,EquipmentMaintenanceDetailRules } from './equipmentMaintenanceMain.data'
import * as EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import * as EquipmentMaintenanceDetailApi from '@/api/eam/equipmentMaintenanceDetail'
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 Detail from '@/views/eam/equipmentMaintenanceMain/DetailEam.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";
import * as ReworkBatchApi from "@/api/mes/reworkBatch";
import {mainListExecuteBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'EquipmentMaintenanceMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(EquipmentMaintenanceMain.allSchemas.tableColumns)
const statusBtn = ref(false);
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -167,9 +174,10 @@ const isShowStatusButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceMain:delete'}), //
defaultButtons.mainListReceiveBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListFinishBtn({hide: isShowStatusButton(row,['5']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListValidateBtn({hide: isShowStatusButton(row,['6']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'eam:maintenance:update'}),
]
@ -181,13 +189,23 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'receive') { //
} else if (val == 'receive') { //
handleReceive(row.id)
} else if (val == 'execute') { //
handleExecute(row.id)
} else if (val == 'finish') { //
handleFinish(row.id)
} else if (val == 'validate') { //
handleValidate(row.id)
}
}
let count = ref(0)
const handleMainFefresh = async()=>{
count.value++
getList()
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
@ -232,9 +250,30 @@ const formsSuccess = async (formType,data) => {
getList()
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
let result = '';
for (var i = 0; i < val.length; i++) {
result += val[i].name + ',';
}
if(result.endsWith(',')){
result = result.substring(0,result.length -1)
}
setV[formField] = result;
formRef.setValues(setV)
})
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
if('5' === row.status){
statusBtn.value=true
}else {
statusBtn.value=false
}
detailRef.value.openDetail(row, titleName, titleValue, 'basicEquipmentMaintenanceMain')
}
@ -255,7 +294,7 @@ const handleDelete = async (id: number) => {
const handleReceive = async (id: number) => {
try {
//
await message.delConfirm('是否领取所选中任务?');
await message.delConfirm('是否接单?');
const params = ref({
id: '',
status:'',
@ -263,8 +302,8 @@ const handleReceive = async (id: number) => {
params.value.id = id
params.value.status = '4'
//
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
message.success(t('领取成功'))
await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('接单成功'))
//
await getList()
} catch {}
@ -289,6 +328,53 @@ const handleExecute = async (id: number) => {
} catch {}
}
/** 完成按钮操作 */
const handleFinish = async (id: number) => {
try {
//
await message.delConfirm('是否完成所选中工单?');
const params = ref({
id: '',
status:'',
})
params.value.id = id
params.value.status = '5'
//
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value)
message.success(t('工单已完成'))
//
await getList()
} catch {}
}
/** 验证按钮操作 */
const handleValidate = async (id: number) => {
try {
const params = ref({
id: '',
status:'',
})
//
message.confirmPassword(t('')).then(async () => {
params.value.id = id
params.value.status = '7'
await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
}).catch (async () => {
params.value.id = id
params.value.status = '5'
await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('工单已流转'))
//
await getList()
})
} catch {}
}
/** 启用 */
const handleEnable = async (id: number) => {
try {
@ -320,13 +406,34 @@ const handleDisable = async (id: number) => {
} catch {}
}
const detailBasicFormOnChange = (field, item) => {
//
if(field == 'result' && item == '1'){
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((items) => {
if (items.field == 'uncompletedCause') {
EquipmentMaintenanceDetailRules.uncompletedCause[0].required = true
}
})
}
//
if(field == 'result' && item == '0'){
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((items) => {
if (items.field == 'uncompletedCause') {
EquipmentMaintenanceDetailRules.uncompletedCause[0].required = false
detailRef.value.formRef.formRef.setValues({
uncompletedCause:''
})
}
})
}
}
const onChange = (field, item) => {
console.log(field)
console.log(item)
//
if(field == 'type' && item == 'DEVICE'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
//
basicFormRef.value.formRef.setValues({
equipmentCode:''
})
@ -339,6 +446,7 @@ const onChange = (field, item) => {
if(field == 'type' && item == 'EQUIPMENT'){
Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') {
console.log(basicFormRef.value.formRef)
basicFormRef.value.formRef.setValues({
equipmentCode:''
})

7
src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts

@ -45,12 +45,9 @@ export const EquipmentMaintenanceRecordMain = useCrudSchemas(reactive<CrudSchema
label: '班次枚举',
field: 'classes',
sort: 'custom',
dictType: DICT_TYPE.SHIFT_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// dictType: DICT_TYPE.SHIFT_TYPE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
},
{
label: '保养计划工单',

112
src/views/eam/equipmentShutdown/equipmentShutdown.data.ts

@ -0,0 +1,112 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const EquipmentShutdownRules = reactive({
equipmentCode: [required],
operationDate: [required],
concurrencyStamp: [required]
})
export const EquipmentShutdown = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '设备编码',
field: 'equipmentCode',
sort: 'custom',
isSearch: true
},
{
label: '操作日期',
field: 'operationDate',
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: 'operationer',
sort: 'custom',
isSearch: true
},
// {
// label: '所属厂区编号',
// field: 'factoryAreaCode',
// sort: 'custom',
// isSearch: true
// },
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: true
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: false
},
{
label: '是否停机',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
form: {
component: 'Radio'
}
},
{
label: '设备停机原因',
field: 'shutdownCause',
sort: 'custom',
isSearch: false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

244
src/views/eam/equipmentShutdown/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="EquipmentShutdown.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="EquipmentShutdown.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="EquipmentShutdownRules"
:formAllSchemas="EquipmentShutdown.allSchemas"
:apiUpdate="EquipmentShutdownApi.updateEquipmentShutdown"
:apiCreate="EquipmentShutdownApi.createEquipmentShutdown"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="EquipmentShutdown.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/equipment-shutdown/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { EquipmentShutdown,EquipmentShutdownRules } from './equipmentShutdown.data'
import * as EquipmentShutdownApi from '@/api/eam/equipmentShutdown'
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: 'EquipmentShutdown' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(EquipmentShutdown.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: EquipmentShutdownApi.getEquipmentShutdownPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'eam:equipment-shutdown:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:equipment-shutdown:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipment-shutdown: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:'eam:equipment-shutdown:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-shutdown: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 =EquipmentShutdown.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 EquipmentShutdownApi.createEquipmentShutdown(data)
message.success(t('common.createSuccess'))
} else {
await EquipmentShutdownApi.updateEquipmentShutdown(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, 'basicEquipmentShutdown')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await EquipmentShutdownApi.deleteEquipmentShutdown(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 EquipmentShutdownApi.exportEquipmentShutdown(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 EquipmentShutdownApi.importTemplate()
})
</script>

343
src/views/eam/equipmentSigning/equipmentSigning.data.ts

@ -0,0 +1,343 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import { handleTreeToComponentOptions } from '@/utils/tree'
import * as DeptApi from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data'
import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts'
export interface User {
id: number,
nickname: string
}
const deptList = ref<Tree[]>([]) // 树形结构
const workshopNoPage = await WorkshopApi.getWorkshopNoPage({})
const userList = ref<User[]>([])
// 加载部门树(默认格式)
deptList.value = handleTreeToComponentOptions(await DeptApi.getSimpleDeptList())
// 表单校验
export const EquipmentSigningRules = reactive({
equipmentCode: [required],
operationDate: [required],
operationer: [required],
operationDept: [required],
supplierCode: [required],
status: [required],
storageLocation: [required],
concurrencyStamp: [required]
})
export const EquipmentSigning = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '设备编码',
field: 'equipmentCode',
sort: 'custom',
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择设备', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '设备信息', // 查询弹窗标题
searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类
searchPage: EquipmentAccountsApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '验收日期',
field: 'operationDate',
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: 'operationDept',
sort: 'custom',
isSearch: true,
form: {
component: 'TreeSelect',
componentProps: { // 假设deptList是部门数据列表
data: deptList,
disabled: false,
placeholder: "请选择部门",
filterable: true,
multiple: false,
}
}
},
{
label: '验收人',
field: 'operationer',
sort: 'custom',
isSearch: true,
form: {
component: 'Select',
componentProps: { // 假设deptList是部门数据列表
options: [],
optionsAlias: {
valueField: 'id',
labelField: 'nickname'
},
disabled: false,
placeholder: "请先选择部门",
filterable: true,
multiple: false,
}
}
},
{
label: '验收人联系方式',
field: 'telephone',
sort: 'custom',
isSearch: false
},
{
label: '供应商编号',
field: 'supplierCode',
sort: 'custom',
isSearch: true
},
{
label: '供应商联系人',
field: 'supplierPeople',
sort: 'custom',
isSearch: true
},
{
label: '供应商联系方式',
field: 'supplierTelephone',
sort: 'custom',
isSearch: false
},
// {
// label: '流程状态',
// field: 'status',
// sort: 'custom',
// isSearch: true,
// dictType: DICT_TYPE.JOB_STATUS,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// form: {
// component: 'Select'
// }
// },
// {
// label: '审核人',
// field: 'approver',
// sort: 'custom',
// isSearch: true,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
// {
// label: '审核内容',
// field: 'approveContent',
// sort: 'custom',
// isSearch: false,
// form: {
// component: 'Input',
// componentProps: {
// type: 'textarea',
// valueHtml: '',
// height: 200
// }
// }
// },
// {
// 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',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '自动通过',
// field: 'autoAgree',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
// {
// label: '直接生成记录',
// field: 'directCreateRecord',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '存放位置描述',
field: 'storageLocation',
sort: 'custom',
isSearch: false,
form: {
component: 'Input',
componentProps: {
type: 'textarea',
placeholder: '请输入存放位置描述'
}
}
},
// {
// label: '所属厂区编号',
// field: 'factoryAreaCode',
// sort: 'custom',
// isSearch: false
// },
{
label: '车间编号',
field: 'workshopCode',
sort: 'custom',
isSearch: 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: 'lineCode',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '工序编号',
field: 'processCode',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '工位编号',
field: 'workstationCode',
sort: 'custom',
isSearch: true,
form: {
component: 'Select'
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: true,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

128
src/views/eam/equipmentSpotCheckRecordDetail/equipmentSpotCheckRecordDetail.data.ts

@ -10,34 +10,28 @@ export const EquipmentSpotCheckRecordDetailRules = reactive({
})
export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '点检工单号',
field: 'number',
sort: 'custom',
isSearch: true
},
{
label: '主表',
field: 'masterId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
// {
// label: '主表',
// field: 'masterId',
// sort: 'custom',
// isSearch: false,
// form: {
// component: 'InputNumber',
// value: 0
// }
// },
{
label: '完成时间',
field: 'completionTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -58,27 +52,27 @@ export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive<CrudSchema
label: '未完成原因',
field: 'uncompletedCause',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '结果枚举',
field: 'result',
sort: 'custom',
dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true
dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false
},
{
label: '名称自动带出',
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '点检内容自动带出',
label: '点检内容',
field: 'content',
sort: 'custom',
isSearch: true,
isSearch: false,
form: {
component: 'Editor',
componentProps: {
@ -88,38 +82,16 @@ export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive<CrudSchema
}
},
{
label: '点检部位自动带出',
label: '点检部位',
field: 'equipmentParts',
sort: 'custom',
isSearch: true
},
{
label: '点检方法自动带出',
label: '点检方法',
field: 'methods',
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: 'departmentCode',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '备注',
@ -127,66 +99,22 @@ export const EquipmentSpotCheckRecordDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom',
isSearch: true
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
sort: 'custom',
formatter: dateFormatter,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
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',
component: 'Switch',
value: 'TRUE',
componentProps: {
type: 'datetime',
valueFormat: 'x'
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除人',
field: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
{
label: '操作',
field: 'action',

156
src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts

@ -8,12 +8,6 @@ export const EquipmentTransferRecordRules = reactive({
})
export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false
},
{
label: '设备编码',
field: 'equipmentCode',
@ -24,19 +18,19 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '设备类型枚举',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
}
dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false,
form: {
component: 'Select'
}
},
{
label: '操作日期',
field: 'operationDate',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
@ -57,14 +51,14 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作人',
field: 'operationer',
sort: 'custom',
isSearch: true
},
{
label: '原所属厂区编号',
field: 'beforeFactoryAreaCode',
sort: 'custom',
isSearch: true
isSearch: false
},
// {
// label: '原所属厂区编号',
// field: 'beforeFactoryAreaCode',
// sort: 'custom',
// isSearch: false
// },
{
label: '原地点',
field: 'beforeLocation',
@ -81,7 +75,7 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '原工段编号',
field: 'beforeWorkshopSectionCode',
sort: 'custom',
isSearch: true
isSearch: false
},
{
label: '现地点',
@ -89,12 +83,12 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true
},
{
label: '所属厂区编号',
field: 'factoryAreaCode',
sort: 'custom',
isSearch: true
},
// {
// label: '所属厂区编号',
// field: 'factoryAreaCode',
// sort: 'custom',
// isSearch: true
// },
{
label: '车间编号',
field: 'workshopCode',
@ -105,96 +99,24 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '工段编号',
field: 'workshopSectionCode',
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: 'departmentCode',
sort: 'custom',
isSearch: true
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
},
{
label: '地点',
field: 'siteId',
sort: 'custom',
isSearch: true
},
{
label: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '删除时间',
field: 'deletionTime',
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: 'deleterId',
sort: 'custom',
isSearch: true
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
}
},
isSearch: false
},
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
// isSearch: false,
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '操作',
field: 'action',

10
src/views/eam/equipmentTransferRecord/index.vue

@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:equipmentTransferRecord:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:equipmentTransferRecord:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:equipmentTransferRecord:export'}), //
defaultButtons.defaultAddBtn({hasPermi:'eam:equipment-transfer-record:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'eam:equipment-transfer-record:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'eam:equipment-transfer-record:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:equipmentTransferRecord:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:equipmentTransferRecord:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'eam:equipment-transfer-record:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipment-transfer-record:delete'}), //
]
// -

6
src/views/eam/maintenance/maintenance.data.ts

@ -248,12 +248,6 @@ export const Maintenance = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',

9
src/views/qms/dynamicRule/index.vue

@ -70,10 +70,10 @@
:apiPage="InspectionStageApi.getInspectionStagePage"
:apiDelete="InspectionStageApi.deleteInspectionStage"
:detailValidate="detailValidate"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowEdit=true
:detailButtonIsShowAdd=true
:detailButtonIsShowDelete=true
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowEdit="checkPermi(['qms:inspection-stage:update'])"
:detailButtonIsShowAdd="checkPermi(['qms:inspection-stage:create'])"
:detailButtonIsShowDelete="checkPermi(['qms:inspection-stage:delete'])"
@detailOpenForm="detailOpenForm"
myFuncTypeSign="InspectionStage"
/>
@ -91,6 +91,7 @@ import * as InspectionStageApi from '@/api/qms/inspectionStage'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import UploadFile from '@/components/UploadFile/src/UploadFile.vue'
import { checkPermi } from '@/utils/permission'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'

8
src/views/qms/inspectionScheme/index.vue

@ -89,7 +89,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'qms:type-template:create'}), //
defaultButtons.defaultAddBtn({hasPermi:'qms:inspection-scheme:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'qms:inspection-scheme:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
@ -131,9 +131,9 @@ const isShowMainButton = (row,val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'qms:type-template:update'}),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:type-template:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:type-template:disable'}),
defaultButtons.mainListEditBtn({hasPermi: 'qms:inspection-scheme:update'}),
defaultButtons.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'qms:inspection-scheme:enable'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),hasPermi:'qms:inspection-scheme:disable'}),
]
}

4
src/views/qms/sampleCode/sampleCode.data.ts

@ -19,7 +19,7 @@ export const SampleCodeRules = reactive({
const samplingSchemeList = await getSamplingScheme()
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '采样方案',
label: '采样方案编码',
field: 'code',
sort: 'custom',
isSearch: true,
@ -28,7 +28,7 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
options: samplingSchemeList,
optionsAlias: {
labelField: 'description',
labelField: 'code',
valueField: 'code'
},
}

7
src/views/qms/selectedSet/index.vue

@ -72,9 +72,9 @@
:apiDelete="SelectedProjectApi.deleteSelectedProject"
:detailValidate="detailValidate"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowEdit=true
:detailButtonIsShowAdd=true
:detailButtonIsShowDelete=true
:detailButtonIsShowEdit="checkPermi(['qms:selected-project:update'])"
:detailButtonIsShowAdd="checkPermi(['qms:selected-project:create'])"
:detailButtonIsShowDelete="checkPermi(['qms:selected-project:delete'])"
@detailOpenForm="detailOpenForm"
@detailBasicFormOnChange="detailBasiFormOnChange"
:detailButtonIsShowFilter="false"
@ -94,6 +94,7 @@ import * as SelectedProjectApi from '@/api/qms/selectedProject'
import * as DictDataApi from '@/api/system/dict/dict.data'
import component from 'virtual:svg-icons-register'
import * as DictTypeApi from '@/api/system/dict/dict.type'
import { checkPermi } from '@/utils/permission'
// import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue'

4
src/views/wms/basicDataManage/itemManage/itempackage/index.vue

@ -210,7 +210,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['uom'] = val[0]['uom']
if('itemCode'==formField){
setV['uom'] = val[0]['uom']
}
formRef.setValues(setV)
})
}

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

@ -14,14 +14,14 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '父包装代码',
field: 'parentCode',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '父包装代码',
// field: 'parentCode',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '包装名称',
field: 'name',
@ -566,4 +566,4 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
}
}
]))
]))

10
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -674,19 +674,23 @@ const buttonBaseClick = (val, item) => {
//
const getFormSupplierList = async () => {
options.originSupplierList = await getSupplierList()
options.originSupplierList = await getSupplierList(null)
options.supplierList = [...options.originSupplierList]
}
//
const getFormCustomerList = async () => {
options.originSupplierList = await getCustomerList()
options.originSupplierList = await getCustomerList(null)
options.supplierList = [...options.originSupplierList]
}
const filterMethod = (query: string) => {
if (query) {
options.supplierList = options.originSupplierList.filter((item) => {
return item.name.includes(query)
if(item.name==''){
return item.code.includes(query)
}else{
return item.name.includes(query)
}
})
} else {
options.supplierList = [...options.originSupplierList]

2
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -203,7 +203,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['customerDockCode'] = val[0]['customerDockCode']
//
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']})
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['masterId']})
.then(res => {
res.list.forEach(obj => {

22
src/views/wms/inventoryManage/balance/index.vue

@ -193,17 +193,17 @@ const handleSelectionPoint = async ()=>{
}
// -
const butttondata = [
{
label: '标签信息',
name: 'bqxx',
hide: false,
type: 'primary',
icon: '',
color: '',
link: true,
float:'right',
hasPermi: ''
},
// {
// label: '',
// name: 'bqxx',
// hide: false,
// type: 'primary',
// icon: '',
// color: '',
// link: true,
// float:'right',
// hasPermi: ''
// },
defaultButtons.mainListPointBtn(null), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), //

2
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue

@ -285,9 +285,9 @@ const handleHandle = async (id: number) => {
tableObject.loading = true
await InventoryinitRequestMainApi.handleInventoryinitRequestMain(id)
message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList()
} catch {}
tableObject.loading = false
}

1
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -190,6 +190,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else {
row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom']
row['singlePrice'] = val[0]['price']
}
} else if(formField === 'costcentreCode'){
row['costcentreCode'] = val[0]['costcentreCode']

6
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -532,6 +532,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
label: '包装号',
field: 'packingNumber',
sort: 'custom',
isTableForm:false,
table: {
width: 150
},
@ -543,6 +544,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
label: '器具号',
field: 'containerNumber',
sort: 'custom',
isTableForm:false,
table: {
width: 150
},
@ -581,7 +583,8 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
width: 150
},
tableForm: {
type: 'Select'
type: 'Select',
disabled: true
}
},
{
@ -602,6 +605,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
type: 'InputNumber',
min: 0,
precision: 6,
disabled: true
},
},
{

18
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -455,24 +455,6 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right'
},
},
{
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:7,
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:8,
},
]))
export const IssueRequestMainRules = reactive({

19
src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts

@ -658,16 +658,15 @@ export const RepleinshJobMainRules = reactive({
* @returns {Array}
*/
export const RepleinshJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
sortTableDefault:5,
},
// {
// label: '包装号',
// field: 'packingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:5,
// },
{
label: '包装规格',
field: 'packUnit',

18
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -17,7 +17,8 @@ const { t } = useI18n() // 国际化
const queryParams = {
pageSize:10,
pageNo:1,
code:'RepleinmentRequest'
code:'RepleinmentRequest',
businessTypeCode: 'Repleinment'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
@ -31,7 +32,7 @@ import {getLocationPageRepleinsh} from "@/api/wms/location";
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
@ -518,7 +519,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
isTableForm: false,
isForm: false,
isSearch: true,
sortTableDefault:6,
sortSearchDefault:4,
},
@ -530,7 +530,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTableForm: false,
isSearch: true,
sortTableDefault:5,
sortSearchDefault:3,
},
@ -544,7 +543,12 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
value: 'OK',
componentProps: {
disabled: true
disabled: true,
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
table: {
@ -564,7 +568,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isTableForm: false,
isSearch: true,
},
{
label: '单据号',
@ -618,6 +621,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key : 'businessTypeCode',
value: queryParams.businessTypeCode
}]
},
},

6
src/views/wms/productionManage/processproduction/processproductionRecord/index.vue

@ -28,9 +28,9 @@
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>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row,$index }">

35
src/views/wms/productionManage/processproduction/processproductionRecord/processproductionRecordMain.data.ts

@ -9,7 +9,7 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
isSearch: true,
table: {
width: 150
width: 200
},
},
{
@ -18,7 +18,7 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
isSearch: true,
table: {
width: 150
width: 200
},
},
{
@ -69,11 +69,23 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 150
width: 180
},
isForm: false,
isTable:false,
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '删除时间',
@ -81,6 +93,8 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isTableForm:false,
isDetail:false,
table: {
width: 150
},
@ -106,6 +120,8 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
field: 'deleterId',
sort: 'custom',
isSearch: false,
isTableForm:false,
isDetail:false,
table: {
width: 150
},
@ -117,6 +133,8 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
isSearch: false,
isTable: false,
isTableForm:false,
isDetail:false,
table: {
width: 150
},
@ -127,6 +145,8 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
isSearch: false,
isTable: false,
isTableForm:false,
isDetail:false,
form: {
component: 'InputNumber',
value: 0
@ -141,12 +161,16 @@ export const ProcessproductionRecordMain = useCrudSchemas(reactive<CrudSchema[]>
sort: 'custom',
isTable: false,
isSearch: false,
isTableForm:false,
isDetail:false,
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
isTableForm:false,
isDetail:false,
table: {
width: 150,
fixed: 'right'
@ -174,6 +198,7 @@ export const ProcessproductionRecordDetail = useCrudSchemas(reactive<CrudSchema[
label: '单据号',
field: 'number',
sort: 'custom',
hiddenInMain:true,
isSearch: false,
table: {
width: 150

142
src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

@ -72,7 +72,15 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/request/processproduction-request-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<ImportForm
ref="importFormRef"
url="/wms/processproduction-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template>
<script setup lang="ts">
@ -158,6 +166,16 @@ const buttonBaseClick = (val, item) => {
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -165,8 +183,14 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListEditBtn({hasPermi:'wms:processproduction-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:processproduction-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:processproduction-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:processproduction-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:processproduction-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:processproduction-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:processproduction-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:processproduction-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:processproduction-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:processproduction-request-main:delete'}), //
]
}
@ -174,19 +198,116 @@ const buttondataTable = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
if (val == 'mainClose') { //
handleClose(row.masterId)
} else if(val == 'mainReAdd'){//
handleReAdd(row.masterId)
} else if(val == 'mainSubmit'){ //
handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { //
handleRefused(row.masterId)
} else if (val == 'mainApprove') { //
handleAgree(row.masterId)
} else if (val == 'mainHandle') { //
handleHandle(row.masterId)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
tableObject.loading = true
await ProcessproductionRequestMainApi.closeProcessproductionRequestMain(id)
message.success(t('common.closeSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
tableObject.loading = true
await ProcessproductionRequestMainApi.reAddProcessproductionRequestMain(id)
message.success(t('common.reAddSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true
await ProcessproductionRequestMainApi.submitProcessproductionRequestMain(id)
message.success(t('common.submitSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
tableObject.loading = true
await ProcessproductionRequestMainApi.refusedProcessproductionRequestMain(id)
message.success(t('common.refusedSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
tableObject.loading = true
await ProcessproductionRequestMainApi.agreeProcessproductionRequestMain(id)
message.success(t('common.agreeSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
tableObject.loading = true
await ProcessproductionRequestMainApi.handleProcessproductionRequestMain(id)
message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList()
} catch {}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProcessproductionRequestMainApi.deleteProcessproductionRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
//
const submitForm = async (formType, data) => {
@ -233,19 +354,6 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicProcessproductionRequestMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProcessproductionRequestMainApi.deleteProcessproductionRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

40
src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

@ -23,6 +23,25 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isForm: false,
isSearch: true,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
isForm: false,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
@ -107,8 +126,23 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
isTable:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
isForm: false
},
{
label: '删除时间',
@ -181,7 +215,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isForm: false,
isDetail:false,
table: {
width: 150,
width: 230,
fixed: 'right'
}
}

9
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -45,7 +45,7 @@ const queryParams = {
// id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept]
/**
* @returns {Array}
*/
@ -833,7 +833,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
}
}
},
{
label: '物料名称',
field: 'itemName',
@ -874,7 +874,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
isTableForm: false,
isForm: false,
},
{
label: '计量单位',
field: 'uom',
@ -1059,7 +1059,7 @@ export const ProductdismantleRequestDetailaRules = reactive({
],
bomVersion: [
{ required: true, message: '请选择Bom版本', trigger: 'change' }
],
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
@ -1273,6 +1273,7 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量',
field: 'qty',
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 6

20
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -177,12 +177,15 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
]
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
]
}
// -
const buttonTableClick = async (val, row) => {
if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}
}
//
const { wsCache } = useCache()
@ -194,6 +197,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue,'recordProductreceiptMain')
}
/** 生成到货检验申请按钮操作 */
const handleCreateInspectRequest = async (number:string) => {
try{
await message.confirm(t('ts.确认生成到货检验申请吗?'))
tableObject.loading = true
await ProductreceiptRecordMainApi.createInspectRequest(number)
message.success(t('ts.到货检验申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {

98
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue

@ -28,6 +28,7 @@
</template>
<script lang="ts" setup>
//
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import {queryQualityInspection} from '@/api/wms/supplierdeliverInspectionDetail'
import Annex from '@/components/Annex/src/Annex.vue'
defineOptions({ name: 'purchasereceiptReport' })
@ -45,9 +46,104 @@ onMounted(() => {
const getAnnexList = async () => {
let res = await queryQualityInspection(route.query.asnNumber as string)
reportAnnex.annexList = res.fileList
let tableColumns = [
{
"label": "物料代码",
"field": "itemCode",
"sort": "custom",
"isForm": false,
"isSearch": true,
"form": {
"componentProps": {
"disabled": true
}
},
"tableForm": {
"disabled": true
}
},
{
"label": "供应商批次",
"field": "batch",
"sort": "custom",
"isForm": false,
"isSearch": true,
"form": {
"componentProps": {
"disabled": true
}
},
"tableForm": {
"disabled": true
}
},
{
"label": "发货数量",
"field": "planQty",
"sort": "custom",
"isForm": false,
"isSearch": true,
"form": {
"componentProps": {
"disabled": true
}
},
"tableForm": {
"disabled": true,
"type": "InputNumber",
"min": 0,
"precision": 6
}
},
{
"width": 150,
"label": "计量单位",
"field": "uom",
"dictType": "uom",
"dictClass": "string",
"isTable": true,
"isForm": false,
"sort": "custom",
"table": {
"width": 150
},
"tableForm": {
"type": "Select",
"disabled": true
},
"form": {
"componentProps": {
"disabled": true
}
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
isTable: false,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
}
]
subDetailTableData.value = {
tableList: res.inspectionDetailRespVOList,
tableColumns:[{"label":"物料代码","field":"itemCode","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"供应商批次","field":"batch","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true}},{"label":"发货数量","field":"planQty","sort":"custom","isForm":false,"isSearch":true,"form":{"componentProps":{"disabled":true}},"tableForm":{"disabled":true,"type":"InputNumber","min":0,"precision":6}},{"width":150,"label":"计量单位","field":"uom","dictType":"uom","dictClass":"string","isTable":true,"isForm":false,"sort":"custom","table":{"width":150},"tableForm":{"type":"Select","disabled":true},"form":{"componentProps":{"disabled":true}}},{"label":"创建时间","field":"createTime","sort":"custom","isSearch":true,"search":{"component":"DatePicker","componentProps":{"valueFormat":"YYYY-MM-DD HH:mm:ss","type":"daterange","defaultTime":["2000-12-31T16:00:00.000Z","2001-01-01T15:59:59.000Z"]}},"isTableForm":false,"isForm":false}],
tableColumns:tableColumns
}
console.log('tableColumns',JSON.stringify(subDetailTableData.value.tableColumns))
}

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

@ -132,6 +132,7 @@
@searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel"
:isShowReduceButton="false"
@clearInput='clearInput'
/>
<!-- 上传质量报告 -->
<BasicForm
@ -342,6 +343,7 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
SupplierdeliverRequestDetailRules.secondPackQty[0].required = true
}
}
})
@ -797,6 +799,12 @@ const submitFormLabel = async (formType, data) => {
formLabelRef.value.dialogVisible = false
}
}
const clearInput = async (field,row,index) => {
row[field]=''
row['secondPackQty']=''
SupplierdeliverRequestDetailRules.secondPackQty[0].required = false
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL

13
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -1114,6 +1114,13 @@ export const SupplierdeliverRequestDetailRules = reactive({
packUnit: [
{ required: true, message: '请选择包装规格', trigger: 'change' }
],
secondPackUnit: [
{ required: false, message: '请选择包装规格2', trigger: 'change' }
],
secondPackQty: [
{ required: false, message: '请输入包装数量2', trigger: 'blur' },
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
@ -1123,7 +1130,7 @@ export const SupplierdeliverRequestDetailRules = reactive({
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
// secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
})
export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
@ -1157,6 +1164,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm: {
@ -1526,7 +1534,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
tableForm: {
// disabled: true,
}
},
{
@ -1561,6 +1568,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
tableForm: {
clearable: true,
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装',
@ -1595,7 +1603,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
tableForm: {
// disabled: true,
}
},
{

Loading…
Cancel
Save