Browse Source

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

master_hella_20240701
ljlong_2630 6 months ago
parent
commit
28f40d56e3
  1. 17
      README.md
  2. 5
      src/api/eam/equipmentMaintenanceDetail/index.ts
  3. 5
      src/api/eam/equipmentMaintenanceMain/index.ts
  4. 9
      src/api/wms/productreceiptRecordMain/index.ts
  5. 15
      src/components/BasicForm/src/BasicForm.vue
  6. 8
      src/components/TableForm/src/TableForm.vue
  7. 8
      src/hooks/web/useMessage.ts
  8. 26
      src/utils/disposition/defaultButtons.ts
  9. 272
      src/views/eam/equipmentMaintenanceMain/DetailEam.vue
  10. 128
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts
  11. 136
      src/views/eam/equipmentMaintenanceMain/index.vue
  12. 7
      src/views/eam/equipmentMaintenanceRecordMain/equipmentMaintenanceRecordMain.data.ts
  13. 6
      src/views/eam/maintenance/maintenance.data.ts
  14. 1
      src/views/error/404.vue
  15. 4
      src/views/qms/sampleCode/sampleCode.data.ts
  16. 1
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  17. 5
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  18. 16
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  19. 61
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts
  20. 95
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue
  21. 22
      src/views/wms/inventoryManage/balance/index.vue
  22. 2
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  23. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue
  24. 2
      src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue
  25. 2
      src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts
  26. 4
      src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts
  27. 20
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  28. 2
      src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts
  29. 4
      src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts
  30. 3
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  31. 4
      src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts
  32. 18
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  33. 51
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  34. 114
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  35. 202
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  36. 1
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts
  37. 18
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  38. 98
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptReport/index.vue
  39. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  40. 8
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  41. 13
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

17
README.md

@ -21,6 +21,23 @@ form: {
message: '请选择生产线信息!', // 当前置条件为空时 弹出信息提示 message: '请选择生产线信息!', // 当前置条件为空时 弹出信息提示
isMainValue: true // 表示查询条件是主表的字段的值 isMainValue: true // 表示查询条件是主表的字段的值
}, },
{
key: 'customerCode', // 查询列表中字段
value: 'customerCode', // 指查询具体值
action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
message: '请选择客户代码!', // 前置添加没填的提示语
},
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isTableRowValue: true, //查询当前searchTable表中行数据的值
isMainValue:false
},
{ {
key:'available', // 查询列表中字段 key:'available', // 查询列表中字段
value:'TRUE', // 指查询具体值 value:'TRUE', // 指查询具体值

5
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 }) 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) => { export const updateEquipmentMaintenanceDetail = async (data: EquipmentMaintenanceDetailVO) => {
return await request.put({ url: `/eam/equipment-maintenance-detail/update`, data }) return await request.put({ url: `/eam/equipment-maintenance-detail/update`, data })

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

@ -79,6 +79,11 @@ export const updateEnableCode = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/ables` , data }) 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) => { export const executeMaintenanceOrder = async (data: EquipmentMainPartVO) => {
return await request.post({ url: `/eam/equipment-maintenance-main/execute`, data }) return await request.post({ url: `/eam/equipment-maintenance-main/execute`, data })

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

@ -111,3 +111,12 @@ export const exportProductreceiptRecordAssembleMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-record-main/get-import-template' }) 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 })
}

15
src/components/BasicForm/src/BasicForm.vue

@ -96,6 +96,7 @@
@inputNumberChange="inputNumberChange" @inputNumberChange="inputNumberChange"
@tableFormSelectOnBlur="tableFormSelectOnBlur" @tableFormSelectOnBlur="tableFormSelectOnBlur"
@formFormDateChange="formFormDateChange" @formFormDateChange="formFormDateChange"
@clearInput='clearInput'
> >
<template v-slot="{row}"> <template v-slot="{row}">
<slot :row="row"></slot> <slot :row="row"></slot>
@ -396,6 +397,12 @@ const opensearchTable = (
if (searchCondition[i].isSearch) { if (searchCondition[i].isSearch) {
if (searchCondition[i].isFormModel) { if (searchCondition[i].isFormModel) {
//formModel //formModel
if(searchCondition[i].required){
if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) {
message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!')
return
}
}
filters.push({ filters.push({
action: searchCondition[i].action, action: searchCondition[i].action,
column: searchCondition[i].key, column: searchCondition[i].key,
@ -437,6 +444,7 @@ const opensearchTable = (
searchDetailSchemas searchDetailSchemas
) )
} }
// searchTable // searchTable
const changeDialogWidth = (width)=>{ const changeDialogWidth = (width)=>{
searchTableRef.value.changeDialogWidth(width) searchTableRef.value.changeDialogWidth(width)
@ -644,7 +652,8 @@ const emit = defineEmits([
'inputNumberChange', 'inputNumberChange',
'formFormDateChange', 'formFormDateChange',
'footButtonClick', 'footButtonClick',
'clearSearchInput' 'clearSearchInput',
'clearInput'
]) ])
// //
const formSelectChange = (field, val, row) => { const formSelectChange = (field, val, row) => {
@ -713,12 +722,16 @@ const inpuFocus = (headerItem, row, index) => {
headerItem.tableForm?.searchDetailSchemas headerItem.tableForm?.searchDetailSchemas
) )
} }
const clearInput = (field, row, index) => {
emit('clearInput',field, row, index)
}
/** /**
* 监听改变事件 * 监听改变事件
* @param field 当前操作字段 * @param field 当前操作字段
* @param cur 改变后值 * @param cur 改变后值
*/ */
const onChange = (field, cur) => { const onChange = (field, cur) => {
console.log(2222222222222)
emit('onChange', field, cur, formRef) emit('onChange', field, cur, formRef)
} }

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

@ -69,6 +69,7 @@
style="flex:1" style="flex:1"
@blur="inputStringBlur(headerItem.field, row[headerItem.field], row)" @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-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>
<el-form-item v-if="headerItem?.tableForm?.type == 'slot'"> <el-form-item v-if="headerItem?.tableForm?.type == 'slot'">
@ -414,7 +415,8 @@ const emit = defineEmits([
'buttonOperationClick', 'buttonOperationClick',
'inputStringBlur', 'inputStringBlur',
'tableFormSelectOnBlur', 'tableFormSelectOnBlur',
'formFormDateChange' 'formFormDateChange',
'clearInput'
]) ])
// | type = radio | type = select // | type = radio | type = select
const initSelectOptions = (item) => { const initSelectOptions = (item) => {
@ -511,7 +513,9 @@ const inpuFocus = (headerItem, row, index)=>{
const inputStringBlur = (field, val,row) => { const inputStringBlur = (field, val,row) => {
emit('inputStringBlur', field, val,row) emit('inputStringBlur', field, val,row)
} }
const clearInput= (field, row, index) => {
emit('clearInput',field, row, index)
}
//table //table
const buttonOperationClick = (row, label, index)=> { const buttonOperationClick = (row, label, index)=> {
emit("buttonOperationClick", row, label, index); emit("buttonOperationClick", row, label, index);

8
src/hooks/web/useMessage.ts

@ -59,6 +59,14 @@ export const useMessage = () => {
type: 'warning' 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) { delConfirm(content?: string, tip?: string) {
return ElMessageBox.confirm( return ElMessageBox.confirm(

26
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) { export function mainListExecuteBtn(option:any) {
return __defaultBtnOption(option,{ 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) { export function mainListBindBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

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

@ -2,17 +2,18 @@
<div> <div>
<el-drawer <el-drawer
v-model="isShowDrawer" v-model="isShowDrawer"
title="详情" :title="t(`ts.详情`).replace('ts.','')"
direction="rtl" direction="rtl"
size="80%" size="80%"
v-loading="detailLoading" v-loading="detailLoading"
> >
<template #header> <template #header>
<div class="font-size-18px"> <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> </div>
</template> </template>
<ContentWrap v-if="!isBasic"> <Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<ContentWrap v-if="!isBasic" v-show="tabsList[current].label=='主数据'">
<Descriptions <Descriptions
:data="detailData" :data="detailData"
labelClassName="label-class-name" labelClassName="label-class-name"
@ -24,11 +25,9 @@
width="200px" width="200px"
/> />
</ContentWrap> </ContentWrap>
<Tabs ref="tabRef" :tabsList="tabsList" :current="current" @change="change" />
<div class="flex"> <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 <TableHead
v-if="!isBasic" v-if="!isBasic"
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@ -54,6 +53,7 @@
:pagination="{ total: tableObjectRef.total }" :pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize" v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage" v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort"
> >
<!-- <template #action="{ row }"> <!-- <template #action="{ row }">
<ButtonBase <ButtonBase
@ -70,6 +70,7 @@
:pagination="{ total: tableObjectRef.total }" :pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize" v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage" v-model:currentPage="tableObjectRef.currentPage"
v-model:sort="tableObjectRef.sort"
> >
<template #photos="{ row }"> <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> <div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> </template>
@ -96,24 +97,69 @@
</template> </template>
</DetailTable> </DetailTable>
</ContentWrap> </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'}"> <ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label=='附件'" <Annex
:annexData="annexData" :annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess" @handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess" @deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data" :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" :remarksData="remarksData"
class="mt-20px" class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess" @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" /> <ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" :key="count"/>
</ElScrollbar> </ElScrollbar>
</ContentWrap> </ContentWrap>
</div> </div>
@ -121,7 +167,7 @@
<!-- 表格弹窗 --> <!-- 表格弹窗 -->
<SearchTable ref="searchTableRef" @search-table-success="searchTableSuccess1" /> <SearchTable ref="searchTableRef" @search-table-success="searchTableSuccess1" />
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicFormQmsNumber <BasicForm
ref="formRef" ref="formRef"
@success="submitForm" @success="submitForm"
:rules="detailAllSchemasRules" :rules="detailAllSchemasRules"
@ -140,7 +186,6 @@
@onChange="detailBasicFormOnChange" @onChange="detailBasicFormOnChange"
@onBlur="onBlur" @onBlur="onBlur"
@formFormDateChange="formFormDateChange" @formFormDateChange="formFormDateChange"
:myFuncTypeSign="myFuncTypeSign"
/> />
</div> </div>
</template> </template>
@ -154,12 +199,15 @@ import Tabs from '@/components/Tabs/src/Tabs.vue'
import * as RemarkApi from '@/api/wms/remark' import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file' import * as FileApi from '@/api/wms/file'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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 TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
import {
EquipmentMaintenanceDetail, EquipmentMaintenanceDetailRules,
} from "@/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data";
defineOptions({ name: 'DetailQmsNumber' }) defineOptions({ name: 'Detail' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -177,6 +225,24 @@ const props = defineProps({
required: true, required: true,
default: null default: null
}, },
//tab
annexTable: {
type: Array,
required: false,
default: ()=>[]
},
//tab
annexAlias: {
type: Object,
required: false,
default: ()=>({
label: '附件',
showDownload:false,
showPreview:false,
hiddenDelete:false
})
},
// //
isBasic: { isBasic: {
type: Boolean, type: Boolean,
@ -311,16 +377,15 @@ const props = defineProps({
required: false, required: false,
default: false default: false
}, },
// //
myFuncTypeSign:{ otherHeadButttonData:{
type: String, type:Array,
required: false, required: false,
default: null default: () => []
}, }
}) })
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
const myFuncTypeSign = props.myFuncTypeSign
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
if (props.isBasic == true) { if (props.isBasic == true) {
@ -342,8 +407,16 @@ 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] tabsList.value = [...tabsList?.value,...otherList]
if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) { if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) {
@ -352,6 +425,13 @@ if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.leng
prop: 'Detail' prop: 'Detail'
}) })
} }
if(!props.isBasic){
tabsList.value.unshift({
label: '主数据',
prop: 'Descriptions'
})
}
// Tabs // Tabs
const tabRef = ref() const tabRef = ref()
@ -372,6 +452,8 @@ const remarkHeight = computed(() => {
const annexData = reactive({ const annexData = reactive({
annexList: [] annexList: []
}) })
// //
const annexTableData = ref<Array<any>>([])
// //
const remarksData = reactive({ const remarksData = reactive({
@ -393,6 +475,48 @@ const getFileList = async () => {
detailLoading.value = false 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 = () => { const handleAnnexSuccess = () => {
getFileList() getFileList()
@ -403,6 +527,11 @@ const deleteAnnexSuccess = async () => {
getFileList() getFileList()
getChangeRecordList() getChangeRecordList()
} }
/** 追加的附件 */
const updateAnnexTableHandle = () => {
getAnnexFileList(detailData.value)
getChangeRecordList()
}
// Tabs // Tabs
const current = ref(0) const current = ref(0)
@ -420,7 +549,7 @@ const change = (item, index) => {
const masterParmas = ref({ const masterParmas = ref({
masterId: '', //id masterId: '', //id
number: '', // number: '', //
status: '', // status: '' //
}) })
// //
@ -455,17 +584,23 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat
const formRef = ref() const formRef = ref()
const titleNameRef = ref() const titleNameRef = ref()
const titleValueRef = ref() const titleValueRef = ref()
const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName titleNameRef.value = titleName
titleValueRef.value = titleValue titleValueRef.value = titleValue
remarksData.data = {
tableId: row.masterId||row.id,
tableName: tableName
}
count.value++
// //
if (!props.isBasic) { if (!props.isBasic) {
// id // id
masterParmas.value.masterId = row.id masterParmas.value.masterId = row.masterId||row.id
masterParmas.value.number = row.number masterParmas.value.number = row.number
masterParmas.value.status = row.status masterParmas.value.status = row.status
tableObjectRef.value.params = { tableObjectRef.value.params = {
masterId: row.id masterId: row.masterId||row.id
} }
await getList() await getList()
} }
@ -474,9 +609,10 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
detailLoading.value = true detailLoading.value = true
try { try {
detailData.value = row detailData.value = row
// getRemarkList() getRemarkList()
// getFileList() getFileList()
// getChangeRecordList() getAnnexFileList(row)
getChangeRecordList()
// //
let detailButtonFilter: any = [] let detailButtonFilter: any = []
let detailButtonAdd: any = [] let detailButtonAdd: any = []
@ -502,7 +638,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defaultButtons.defaultFilterBtn(null) // defaultButtons.defaultFilterBtn(null) //
] ]
} }
HeadButttondata.value = [...HeadButttondata.value,...props.otherHeadButttonData]
let detailButtonEdit: any = [] let detailButtonEdit: any = []
let detailButtonDelete: any = [] let detailButtonDelete: any = []
if (props.detailButtonIsShowEdit) { if (props.detailButtonIsShowEdit) {
@ -564,11 +700,6 @@ detailAllSchemasRef.value = props.detailAllSchemas
// //
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
// if (val.indexOf(row.status) > -1) {
// return false
// } else {
// return true
// }
return false return false
} }
@ -613,6 +744,7 @@ const buttonBaseClick = (val, item) => {
} else { } else {
// //
console.log('其他按钮', item) console.log('其他按钮', item)
emit('buttonBaseClick',val, item)
} }
} }
@ -643,8 +775,6 @@ const opensearchTable = (
} }
} }
} }
console.log(searchCondition)
console.log(_searchCondition)
searchTableRef.value.open( searchTableRef.value.open(
searchTitle, searchTitle,
searchAllSchemas, searchAllSchemas,
@ -694,8 +824,71 @@ const buttonTableClick = async (val, row) => {
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value) 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 // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
@ -710,6 +903,7 @@ const submitForm = async (formType, data) => {
await props.apiUpdate(data) await props.apiUpdate(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
emit('handleMainFefresh')
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
await getList() await getList()
@ -740,7 +934,8 @@ const emit = defineEmits([
'openImage', 'openImage',
'onBlur', 'onBlur',
'detailBasicFormOnChange', 'detailBasicFormOnChange',
'formFormDateChange' 'formFormDateChange',
'buttonBaseClick'
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
@ -752,6 +947,7 @@ const handleDelete = async (id: number) => {
await props.apiDelete(id) await props.apiDelete(id)
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
emit('handleMainFefresh')
// //
await getList() await getList()
updateKey.value += 1 updateKey.value += 1

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 * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop"; 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({ export const EquipmentMaintenanceMainRules = reactive({
@ -240,12 +243,6 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '工段编号',
field: 'workshopSectionCode',
sort: 'custom',
isSearch: true,
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -355,7 +352,56 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
export const EquipmentMaintenanceDetailRules = reactive({ export const EquipmentMaintenanceDetailRules = reactive({
number: [required], 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[]>([ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -373,38 +419,41 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form:{
componentProps: {
disabled: true
}
}
}, },
{ {
label: '主表id', label: '主表id',
field: 'masterId', field: 'masterId',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form:{
componentProps: {
disabled: true
}
}
}, },
{ {
label: '人数', label: '人数',
field: 'peoples', field: 'peoples',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: true,
}, },
{ {
label: '预计分钟', label: '预计分钟',
field: 'estimatedMinutes', field: 'estimatedMinutes',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '实际分钟', label: '实际分钟',
field: 'actualMinutes', field: 'actualMinutes',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
}, },
{ {
label: '责任人多选', label: '责任人多选',
@ -445,25 +494,43 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'result', field: 'result',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
dictType: DICT_TYPE.IS_COMPLETED,
dictClass: 'string',
}, },
{ {
label: '保养名称', label: '保养名称',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, 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: '保养内容', // label: '保养内容',
field: 'content', // field: 'content',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ // {
label: '保养部位', // label: '保养部位',
field: 'equipmentParts', // field: 'equipmentParts',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -508,7 +575,10 @@ export const EquipmentMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>(
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
dictType: DICT_TYPE.TRUE_FALSE, dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
}, },

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

@ -55,10 +55,19 @@
<Detail ref="detailRef" <Detail ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="EquipmentMaintenanceMain.allSchemas" :allSchemas="EquipmentMaintenanceMain.allSchemas"
:detailAllSchemasRules="EquipmentMaintenanceDetailRules"
:detailAllSchemas="EquipmentMaintenanceDetail.allSchemas" :detailAllSchemas="EquipmentMaintenanceDetail.allSchemas"
:apiPage="EquipmentMaintenanceDetailApi.getEquipmentMaintenanceDetailPage" :apiPage="EquipmentMaintenanceDetailApi.getEquipmentMaintenanceDetailPage"
:apiCreate="EquipmentMaintenanceDetailApi.createItemEquipmentMaintenanceDetail"
:apiUpdate="EquipmentMaintenanceDetailApi.updateEquipmentMaintenanceDetail"
:apiDelete="EquipmentMaintenanceDetailApi.deleteEquipmentMaintenanceDetail"
:detailButtonIsShowAdd=statusBtn
:detailButtonIsShowEdit=statusBtn
:detailButtonIsShowDelete=statusBtn
@handleMainFefresh="handleMainFefresh"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
@detailBasicFormOnChange="detailBasicFormOnChange"
:key="count"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -67,30 +76,28 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' 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 EquipmentMaintenanceMainApi from '@/api/eam/equipmentMaintenanceMain'
import * as EquipmentMaintenanceDetailApi from '@/api/eam/equipmentMaintenanceDetail' import * as EquipmentMaintenanceDetailApi from '@/api/eam/equipmentMaintenanceDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.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 {Maintenance} from "@/views/eam/maintenance/maintenance.data";
import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data"; import {EquipmentAccounts} from "@/views/eam/equipmentAccounts/equipmentAccounts.data";
import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import * as EquipmentItemApi from "@/api/eam/equipmentAccounts";
import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data";
import * as ToolItemApi from "@/api/eam/toolAccounts"; import * as ToolItemApi from "@/api/eam/toolAccounts";
import * as ReworkBatchApi from "@/api/mes/reworkBatch";
import {mainListExecuteBtn} from "@/utils/disposition/defaultButtons";
defineOptions({ name: 'EquipmentMaintenanceMain' }) defineOptions({ name: 'EquipmentMaintenanceMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(EquipmentMaintenanceMain.allSchemas.tableColumns) const tableColumns = ref(EquipmentMaintenanceMain.allSchemas.tableColumns)
const statusBtn = ref(false);
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
@ -167,9 +174,10 @@ const isShowStatusButton = (row,val) => {
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), // defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceMain:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceMain:delete'}), // defaultButtons.mainListReceiveOrderBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListReceiveBtn({hide: isShowStatusButton(row,['3']),hasPermi:'eam:maintenance:update'}), //
defaultButtons.mainListExecuteBtn({hide: isShowStatusButton(row,['4']),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.mainListEnableBtn({hide:isShowMainButton(row,['FALSE']),hasPermi:'eam:maintenance:update'}),
defaultButtons.mainListDisableBtn({hide:isShowMainButton(row,['TRUE']),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) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} else if (val == 'receive') { // } else if (val == 'receive') { //
handleReceive(row.id) handleReceive(row.id)
} else if (val == 'execute') { // } else if (val == 'execute') { //
handleExecute(row.id) 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 basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
@ -232,9 +250,30 @@ const formsSuccess = async (formType,data) => {
getList() 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 detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { 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') detailRef.value.openDetail(row, titleName, titleValue, 'basicEquipmentMaintenanceMain')
} }
@ -255,7 +294,7 @@ const handleDelete = async (id: number) => {
const handleReceive = async (id: number) => { const handleReceive = async (id: number) => {
try { try {
// //
await message.delConfirm('是否领取所选中任务?'); await message.delConfirm('是否接单?');
const params = ref({ const params = ref({
id: '', id: '',
status:'', status:'',
@ -263,8 +302,8 @@ const handleReceive = async (id: number) => {
params.value.id = id params.value.id = id
params.value.status = '4' params.value.status = '4'
// //
await EquipmentMaintenanceMainApi.executeMaintenanceOrder(params.value) await EquipmentMaintenanceMainApi.updateMaintenanceOrder(params.value)
message.success(t('领取成功')) message.success(t('接单成功'))
// //
await getList() await getList()
} catch {} } catch {}
@ -289,6 +328,53 @@ const handleExecute = async (id: number) => {
} catch {} } 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) => { const handleEnable = async (id: number) => {
try { try {
@ -320,13 +406,34 @@ const handleDisable = async (id: number) => {
} catch {} } 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) => { const onChange = (field, item) => {
console.log(field)
console.log(item)
// //
if(field == 'type' && item == 'DEVICE'){ if(field == 'type' && item == 'DEVICE'){
Maintenance.allSchemas.formSchema.forEach((items) => { Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') { if (items.field == 'equipmentCode') {
//
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
equipmentCode:'' equipmentCode:''
}) })
@ -339,6 +446,7 @@ const onChange = (field, item) => {
if(field == 'type' && item == 'EQUIPMENT'){ if(field == 'type' && item == 'EQUIPMENT'){
Maintenance.allSchemas.formSchema.forEach((items) => { Maintenance.allSchemas.formSchema.forEach((items) => {
if (items.field == 'equipmentCode') { if (items.field == 'equipmentCode') {
console.log(basicFormRef.value.formRef)
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
equipmentCode:'' equipmentCode:''
}) })

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

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

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: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

1
src/views/error/404.vue

@ -1,5 +1,6 @@
<template> <template>
<Error @error-click="push('/')" /> <Error @error-click="push('/')" />
<div>哈哈哈哈</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
defineOptions({ name: 'Error404' }) defineOptions({ name: 'Error404' })

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

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

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

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

5
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -47,6 +47,11 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
isTable: true, isTable: true,
table: { table: {
width: 120 width: 120
},form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true
}
} }
}, },
{ {

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

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

61
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts

@ -78,6 +78,32 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isSearch: true, isSearch: true,
}, },
{
label: '客户代码',
field: 'customerCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{ {
label: '发货记录单号', label: '发货记录单号',
field: 'deliverRecordNumber', field: 'deliverRecordNumber',
@ -107,35 +133,22 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
action: 'betweeen', // 查询拼接条件 action: 'betweeen', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
}
}
}, },
{ {
label: '客户代码', key: 'customerCode', // 查询列表中字段
field: 'customerCode', value: 'customerCode', // 指查询具体值
sort: 'custom', action: '==', // 查询拼接条件
table: { isSearch: true, // 使用自定义拼接条件
width: 150 isFormModel:true, // filters中添加筛选的数据--取于formModel
}, required:true, // 前置添加必有
isSearch: true, message: '请选择客户代码!', // 前置添加没填的提示语
form: { isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
// labelMessage: '信息提示说明!!!', }
componentProps: { ]
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
} }
}, },
{ {
label: '发货计划单号', label: '发货计划单号',
field: 'deliverPlanNumber', field: 'deliverPlanNumber',

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

@ -57,8 +57,11 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
:isShowButton = isShowButton @onEnter="onEnter"
/> />
<!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -88,6 +91,7 @@
:isShowReduceButton="false" :isShowReduceButton="false"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
/> />
<!-- 标签打印 --> <!-- 标签打印 -->
<SearchTable style="width:905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" /> <SearchTable style="width:905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
@ -104,6 +108,7 @@ import { CustomerreturnRequestMain,CustomerreturnRequestMainRules,Customerreturn
import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain' import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain'
import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail' import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data'
import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail' import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail'
import { import {
SupplierdeliverRequestPackage SupplierdeliverRequestPackage
@ -123,13 +128,39 @@ const genLabelId = ref(); //主表ID
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns])
const isShowButton = ref(true)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const onEnter = async (field,value)=>{
console.log('onEnter',field,value)
const dateTime = new Date().getTime()
if(field=='customerCode'){
//---
formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPage,[{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'createTime', //
value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, //
action: 'betweeen', //
isSearch: true, // 使
isMainValue: false // false isMainValue: true
},
{
key: 'customerCode', //
value: 'customerCode', //
action: '==', //
isSearch: true, // 使
isFormModel:true,
isMainValue: false // false isMainValue: true
}
],undefined,undefined,null,true,DeliverRecordDetail.allSchemas)
}
}
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
@ -168,13 +199,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'deliverRecordNumber') { if(formField == 'deliverRecordNumber') {
setV['deliverRecordNumber'] = val[0]['number'] setV['deliverRecordNumber'] = val[0]['number']
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] setV['deliverPlanNumber'] = val[0]['deliverPlanNumber']
setV['customerCode'] = val[0]['customerCode'] // setV['customerCode'] = val[0]['customerCode']
setV['customerDockCode'] = val[0]['customerDockCode'] setV['customerDockCode'] = val[0]['customerDockCode']
if(setV['deliverRecordNumber'] != null){
isShowButton.value = false
}
// //
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']}) DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['masterId']})
.then(res => { .then(res => {
res.list.forEach(obj => { res.list.forEach(obj => {
@ -190,7 +219,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}) })
}) })
if (res) tableData.value = res.list if (res) {
tableData.value = [...res.list]
originTableData.value = [...res.list]
}
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
message.error('错误') message.error('错误')
@ -449,6 +481,7 @@ const labelPrint = async (row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {
originTableData.value = []
if(type == "update"){ if(type == "update"){
CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'deliverRecordNumber'){ if(item.field == 'deliverRecordNumber'){
@ -558,10 +591,52 @@ CustomerreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
const originTableData = ref([])
const searchTableRef = ref()
// //
// const handleAddTable = () => {
// tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
// }
const handleAddTable = () => { const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) console.log('originTableData.value',originTableData.value)
console.log('tableData.value',tableData.value)
const subTableDFata = originTableData.value.filter(item=> !tableData.value.find(item1=>item1.id == item.id))
if(subTableDFata.length==0){
message.warning('暂无可选择数据!')
return
}
const tableObject = {
//
currentPage: 1,
//
exportLoading: false,
//
loading: false,
//
pageSize: subTableDFata.length,
params:null,
//
sort: {
order: '', //
prop: '' //
},
//
total: subTableDFata.length,
//
tableList: subTableDFata,
currentRow:null
}
const tableColumns = CustomerreturnRequestDetail.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("收货明细",tableObject,{tableColumns},true)
}
const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => {
console.log(val)
tableData.value = [...tableData.value,...val]
} }
// //
const handleDeleteTable = (item, index) => { const handleDeleteTable = (item, index) => {

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

@ -193,17 +193,17 @@ const handleSelectionPoint = async ()=>{
} }
// - // -
const butttondata = [ const butttondata = [
{ // {
label: '标签信息', // label: '',
name: 'bqxx', // name: 'bqxx',
hide: false, // hide: false,
type: 'primary', // type: 'primary',
icon: '', // icon: '',
color: '', // color: '',
link: true, // link: true,
float:'right', // float:'right',
hasPermi: '' // hasPermi: ''
}, // },
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:balance:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:balance:delete'}), // // 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 tableObject.loading = true
await InventoryinitRequestMainApi.handleInventoryinitRequestMain(id) await InventoryinitRequestMainApi.handleInventoryinitRequestMain(id)
message.success(t('common.handleSuccess')) message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList() await getList()
} catch {} } catch {}
tableObject.loading = false
} }

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue

@ -57,7 +57,7 @@
:allSchemas="UnplannedissueRecordMain.allSchemas" :allSchemas="UnplannedissueRecordMain.allSchemas"
:detailAllSchemas="UnplannedissueRecordDetail.allSchemas" :detailAllSchemas="UnplannedissueRecordDetail.allSchemas"
:detailAllSchemasRules="UnplannedissueRecordDetailRules" :detailAllSchemasRules="UnplannedissueRecordDetailRules"
:apiPage="UnplannedissueRecordDetailApi.getUnplannedissueRecordDetailPage" :apiPage="UnplannedissueRecordDetailApi.getUnplannedissueRecordDetailPageSpare"
/> />
</template> </template>

2
src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue

@ -69,7 +69,7 @@
:detailAllSchemasRules="UnplannedissueRequestDetailRules" :detailAllSchemasRules="UnplannedissueRequestDetailRules"
:apiCreate="UnplannedissueRequestDetailApi.createUnplannedissueRequestDetail" :apiCreate="UnplannedissueRequestDetailApi.createUnplannedissueRequestDetail"
:apiUpdate="UnplannedissueRequestDetailApi.updateUnplannedissueRequestDetail" :apiUpdate="UnplannedissueRequestDetailApi.updateUnplannedissueRequestDetail"
:apiPage="UnplannedissueRequestDetailApi.getUnplannedissueRequestDetailPage" :apiPage="UnplannedissueRequestDetailApi.getUnplannedissueRequestDetailPageSpare"
:apiDelete="UnplannedissueRequestDetailApi.deleteUnplannedissueRequestDetail" :apiDelete="UnplannedissueRequestDetailApi.deleteUnplannedissueRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"

2
src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts

@ -748,6 +748,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -757,6 +758,7 @@ export const IssueJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {

4
src/views/wms/issueManage/issue/issueRecordMain/issueRecordMain.data.ts

@ -21,7 +21,7 @@ export const IssueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status', field: 'status',
dictType: DICT_TYPE.JOB_STATUS, dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -507,6 +507,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -516,6 +517,7 @@ export const IssueRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:3, sortTableDefault:3,
}, },
{ {

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

@ -455,24 +455,6 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'right' 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({ export const IssueRequestMainRules = reactive({
@ -745,6 +727,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:1, sortTableDefault:1,
}, },
{ {
@ -754,6 +737,7 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {

2
src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/productionreceiptJobMain.data.ts

@ -683,6 +683,7 @@ export const ProductionreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -692,6 +693,7 @@ export const ProductionreceiptJobDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {

4
src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/productionreceiptRecordMain.data.ts

@ -21,7 +21,7 @@ export const ProductionreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>
field: 'status', field: 'status',
dictType: DICT_TYPE.JOB_STATUS, dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -491,6 +491,7 @@ export const ProductionreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -500,6 +501,7 @@ export const ProductionreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:3, sortTableDefault:3,
}, },
{ {

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

@ -665,7 +665,6 @@ export const RepleinshJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
sortTableDefault:5, sortTableDefault:5,
}, },
{ {
@ -724,6 +723,7 @@ export const RepleinshJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -733,6 +733,7 @@ export const RepleinshJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {

4
src/views/wms/issueManage/repleinsh/repleinshRecordMain/repleinshRecordMain.data.ts

@ -21,7 +21,7 @@ export const RepleinshRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status', field: 'status',
dictType: DICT_TYPE.JOB_STATUS, dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: false,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -478,6 +478,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:2, sortTableDefault:2,
}, },
{ {
@ -487,6 +488,7 @@ export const RepleinshRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
sortTableDefault:3, sortTableDefault:3,
}, },
{ {

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

@ -17,7 +17,8 @@ const { t } = useI18n() // 国际化
const queryParams = { const queryParams = {
pageSize:10, pageSize:10,
pageNo:1, pageNo:1,
code:'RepleinmentRequest' code:'RepleinmentRequest',
businessTypeCode: 'Repleinment'
} }
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{} const requestsettingData =data?.list[0]||{}
@ -518,7 +519,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
isSearch: true,
sortTableDefault:6, sortTableDefault:6,
sortSearchDefault:4, sortSearchDefault:4,
}, },
@ -530,7 +530,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTableForm: false, isTableForm: false,
isSearch: true,
sortTableDefault:5, sortTableDefault:5,
sortSearchDefault:3, sortSearchDefault:3,
}, },
@ -544,7 +543,12 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
value: 'OK', value: 'OK',
componentProps: { componentProps: {
disabled: true disabled: true,
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
} }
}, },
table: { table: {
@ -564,7 +568,6 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isTableForm: false, isTableForm: false,
isSearch: true,
}, },
{ {
label: '单据号', label: '单据号',
@ -618,6 +621,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
},{
key : 'businessTypeCode',
value: queryParams.businessTypeCode
}] }]
}, },
}, },
@ -758,6 +764,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
isTableForm: false, isTableForm: false,
sortTableDefault:1, sortTableDefault:1,
}, },
@ -768,6 +775,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
hiddenInMain:true,
isTableForm: false, isTableForm: false,
sortTableDefault:2, sortTableDefault:2,
}, },

51
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -1,7 +1,14 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...InventorychangeRequestMain.allSchemas.searchSchema,...InventorychangeRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="[
...InventorychangeRequestMain.allSchemas.searchSchema,
...InventorychangeRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -17,7 +24,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -34,7 +42,10 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row, $index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -74,8 +85,15 @@
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData" <ImportForm
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> ref="importFormRef"
url="/wms/inventorychange-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -411,14 +429,23 @@ const flag = ref()
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false const duplicateItems = tableData.value.filter((item, index) => {
tableData.value.forEach(item => { return tableData.value.findIndex((el) => el.itemCode === item.itemCode) !== index;
let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber)) });
if(rs.length > 1) isExist = true // tableData.value.forEach(item => {
}) // let rs = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber && filterItem.itemCode!=item.itemCode))
if (isExist) { // // let same = tableData.value.filter(filterItem => (filterItem.packingNumber == item.packingNumber && filterItem.itemCode==item.itemCode))
// // debugger
// // if(same.length!=tableData.value.length) isSameExist = true
// if(rs.length > 1) isExist = true
// })
// if (isSameExist) {
// formRef.value.formLoading = false
// return message.warning('1')
// }
if (duplicateItems.length>0) {
formRef.value.formLoading = false formRef.value.formLoading = false
return message.warning('包装号重复') return message.warning('物料代码重复')
} }
data.subList.forEach(obj => { data.subList.forEach(obj => {
if(obj.toQty == 0){ if(obj.toQty == 0){

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

@ -21,16 +21,14 @@
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
:pagination="{ :pagination="{total: tableObject.total}"
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize" v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.code }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row,$index }">
@ -42,15 +40,20 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
@success="formsSuccess" @submitForm="submitForm"
:isBusiness="true"
:rules="ProcessproductionRequestMainRules" :rules="ProcessproductionRequestMainRules"
:formAllSchemas="ProcessproductionRequestMain.allSchemas" :formAllSchemas="ProcessproductionRequestMain.allSchemas"
:apiUpdate="ProcessproductionRequestMainApi.updateProcessproductionRequestMain" :apiUpdate="ProcessproductionRequestMainApi.updateProcessproductionRequestMain"
:apiCreate="ProcessproductionRequestMainApi.createProcessproductionRequestMain" :apiCreate="ProcessproductionRequestMainApi.createProcessproductionRequestMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="true"
:tableAllSchemas="ProcessproductionRequestDetail.allSchemas" :tableAllSchemas="ProcessproductionRequestDetail.allSchemas"
:tableFormRules="ProcessproductionRequestDetailRules" :tableFormRules="ProcessproductionRequestDetailRules"
@searchTableSuccess="searchTableSuccess"
:tableData="tableData"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -69,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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -94,11 +105,26 @@ routeName.value = route.name
const tableColumns = ref([...ProcessproductionRequestMain.allSchemas.tableColumns,...ProcessproductionRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([...ProcessproductionRequestMain.allSchemas.tableColumns,...ProcessproductionRequestDetail.allSchemas.tableMainColumns])
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') {
if(formField === 'productionLine'){
row['productionLine']=val[0]['productionLineCode']
}
if(formField === 'processCode'){
row['processCode']=val[0]['code']
}
if(formField === 'locationCode'){
row['locationCode']=val[0]['code']
}
if(formField === 'componentItemCode'){
row['componentItemCode']=val[0]['componentItemCode']
}
}else{
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}
}) })
} }
@ -107,7 +133,6 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: ProcessproductionRequestDetailApi.getProcessproductionRequestDetailPage // getListApi: ProcessproductionRequestDetailApi.getProcessproductionRequestDetailPage //
}) })
@ -123,14 +148,6 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
@ -149,7 +166,6 @@ const buttonBaseClick = (val, item) => {
} }
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
@ -162,7 +178,6 @@ const butttondata = (row,$index) => {
] ]
} }
const buttondataTable = ref() const buttondataTable = ref()
// - // -
@ -181,20 +196,27 @@ const openForm = (type: string, row?: any) => {
} }
// form //
const formsSuccess = async (formType,data) => { const submitForm = async (formType, data) => {
var isHave =ProcessproductionRequestMain.allSchemas.formSchema.some(function (item) { data.subList = tableData.value //
return item.field === 'activeTime' || item.field === 'expireTime'; try {
}); if (formType === 'create') {
if(isHave){ if(data.subList.length == 0){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ message.warning("请添加子列表数据")
message.error('失效时间要大于生效时间')
return; return;
} }
let flag = false;
data.subList.forEach((item) => {
if(item.componentItemcodeQty == 0){
message.warning("子物料数量不能为0")
flag = true;
return;
}
})
if(flag){
basicFormRef.value.formLoading = false
return
} }
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ProcessproductionRequestMainApi.createProcessproductionRequestMain(data) await ProcessproductionRequestMainApi.createProcessproductionRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
@ -202,7 +224,11 @@ const formsSuccess = async (formType,data) => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
//
getList() getList()
} finally {
basicFormRef.value.formLoading = false
}
} }
// //
@ -277,6 +303,28 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
}) })
} }
/**
* tableForm方法
*/
const tableFormKeys = {}
ProcessproductionRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -4,23 +4,21 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as ProcessApi from '@/api/wms/process'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
import { fa } from 'element-plus/es/locale' import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
isTable:false,
isTableForm:false,
},
{ {
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 200
}, },
isForm: false, isForm: false,
isSearch: true, isSearch: true,
@ -60,7 +58,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
}, },
}, },
@ -75,7 +73,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 0,
precision: 6 precision: 6
}, },
}, },
@ -120,6 +118,8 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm:false, isForm:false,
isTableForm:false,
isDetail:false,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -143,6 +143,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false, isForm: false,
isDetail:false,
}, },
{ {
label: '扩展属性', label: '扩展属性',
@ -159,6 +160,7 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false, isForm: false,
isDetail:false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -171,11 +173,13 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
isSearch: false, isSearch: false,
isForm: false, isForm: false,
isTable:false, isTable:false,
isDetail:false,
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isDetail:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'
@ -188,8 +192,6 @@ export const ProcessproductionRequestMainRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }], itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }], completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }], scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }],
available: [required],
concurrencyStamp: [required],
}) })
@ -205,6 +207,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isForm:false,
hiddenInMain:true, hiddenInMain:true,
}, },
{ {
@ -219,7 +222,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
@ -239,7 +242,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
multiple:true, multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'productionLineCode', // 查询弹窗赋值字段
searchTitle: '生产线物料关系信息', // 查询弹窗标题 searchTitle: '生产线物料关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法 searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
@ -262,6 +265,43 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage,
searchCondition: [{
key: 'productionLineCode',
value: 'productionLine',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage,
searchCondition: [{
key: 'productionLineCode',
value: 'productionLine',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}, },
{ {
label: '库位代码', label: '库位代码',
@ -270,6 +310,37 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}, },
{ {
label: '子物料代码', label: '子物料代码',
@ -279,6 +350,45 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
message: '请填写物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
message: '请填写物料代码!',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
}, },
{ {
label: '批次', label: '批次',
@ -295,21 +405,42 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
},
}, },
{ {
label: '生效日期', label: '生效日期',
field: 'effectiveDate', field: 'effectiveDate',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, detail: {
dateFormat: 'YYYY-MM-DD'
},
table: {
width: 150
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
type: 'datetime', style: {width: '100%'},
valueFormat: 'x' type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
} }
}, },
table: { tableForm:{
width: 150 type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
}, },
}, },
{ {
@ -318,6 +449,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isTable:false, isTable:false,
isTableForm:false, isTableForm:false,
isForm:false,
table: { table: {
width: 150 width: 150
}, },
@ -345,6 +477,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
isTableForm: false, isTableForm: false,
table: { table: {
width: 150 width: 150
@ -371,6 +504,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
isTableForm: false, isTableForm: false,
table: { table: {
width: 150 width: 150
@ -382,6 +516,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
isTableForm: false, isTableForm: false,
}, },
{ {
@ -390,6 +525,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
isTableForm: false, isTableForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
@ -402,6 +538,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isTable:false, isTable:false,
isForm: false,
isTableForm: false, isTableForm: false,
}, },
{ {
@ -411,6 +548,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
hiddenInMain:true, hiddenInMain:true,
isTable:false, isTable:false,
isTableForm:false, isTableForm:false,
isForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -420,6 +558,8 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTable:false,
isTableForm:false,
hiddenInMain:true, hiddenInMain:true,
table: { table: {
width: 150, width: 150,
@ -430,5 +570,25 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
// 表单校验 // 表单校验
export const ProcessproductionRequestDetailRules = reactive({ export const ProcessproductionRequestDetailRules = reactive({
productionLine: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
processCode: [
{ required: true, message: '请选择工序代码', trigger: 'change' }
],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],
componentItemCode:[
{ required: true, message: '请选择子物料代码', trigger: 'change' }
],
componentItemcodeQty:[
{ required: true, message: '请输入子物料数量', trigger: 'change' }
],
batch:[
{ required: true, message: '请输入批次', trigger: 'change' }
],
effectiveDate:[
{ required: true, message: '请输入生效日期', trigger: 'change' }
],
}) })

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

@ -1273,6 +1273,7 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
label: '数量', label: '数量',
field: 'qty', field: 'qty',
tableForm: { tableForm: {
disabled: true,
type: 'InputNumber', type: 'InputNumber',
min: 0, min: 0,
precision: 6 precision: 6

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

@ -177,12 +177,15 @@ const butttondata = (row,$index) => {
return [] return []
} }
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) => { const buttonTableClick = async (val, row) => {
if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}
} }
// //
const { wsCache } = useCache() const { wsCache } = useCache()
@ -194,6 +197,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue,'recordProductreceiptMain') 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 exportLoading = ref(false) //
const handleExport = async () => { const handleExport = async () => {

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

@ -28,6 +28,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// //
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
import {queryQualityInspection} from '@/api/wms/supplierdeliverInspectionDetail' import {queryQualityInspection} from '@/api/wms/supplierdeliverInspectionDetail'
import Annex from '@/components/Annex/src/Annex.vue' import Annex from '@/components/Annex/src/Annex.vue'
defineOptions({ name: 'purchasereceiptReport' }) defineOptions({ name: 'purchasereceiptReport' })
@ -45,9 +46,104 @@ onMounted(() => {
const getAnnexList = async () => { const getAnnexList = async () => {
let res = await queryQualityInspection(route.query.asnNumber as string) let res = await queryQualityInspection(route.query.asnNumber as string)
reportAnnex.annexList = res.fileList 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 = { subDetailTableData.value = {
tableList: res.inspectionDetailRespVOList, 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)) console.log('tableColumns',JSON.stringify(subDetailTableData.value.tableColumns))
} }

2
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -280,7 +280,7 @@ const buttonTableClick = async (val, row) => {
} }
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/954878108028801024?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/955350408322154496?token=' + getAccessToken())
const handleDocumentPrint = async (row) => { const handleDocumentPrint = async (row) => {
window.open(src.value+'&id='+row.masterId) window.open(src.value+'&id='+row.masterId)
} }

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

@ -132,6 +132,7 @@
@searchTableSuccess="searchTableSuccessLabel" @searchTableSuccess="searchTableSuccessLabel"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
:isShowReduceButton="false" :isShowReduceButton="false"
@clearInput='clearInput'
/> />
<!-- 上传质量报告 --> <!-- 上传质量报告 -->
<BasicForm <BasicForm
@ -342,6 +343,7 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
if (formField == 'secondPackUnit') { if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit'] row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty'] row['secondPackQty'] = val[0]['packQty']
SupplierdeliverRequestDetailRules.secondPackQty[0].required = true
} }
} }
}) })
@ -797,6 +799,12 @@ const submitFormLabel = async (formType, data) => {
formLabelRef.value.dialogVisible = false 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 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: [ packUnit: [
{ required: true, message: '请选择包装规格', trigger: 'change' } { 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: [ convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' } { required: true, message: '请输入转换率', trigger: 'blur' }
], ],
@ -1123,7 +1130,7 @@ export const SupplierdeliverRequestDetailRules = reactive({
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] // secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
}) })
export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
@ -1157,6 +1164,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
type: 'date', type: 'date',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'x', valueFormat: 'x',
} }
}, },
tableForm: { tableForm: {
@ -1526,7 +1534,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
tableForm: { tableForm: {
// disabled: true,
} }
}, },
{ {
@ -1561,6 +1568,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
tableForm: { tableForm: {
clearable: true,
disabled: true, disabled: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择包装', searchListPlaceholder: '请选择包装',
@ -1595,7 +1603,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
tableForm: { tableForm: {
// disabled: true,
} }
}, },
{ {

Loading…
Cancel
Save