Browse Source

Merge branch 'master_hella' into master_hella_20240701

master_hella_20240701
陈薪名 4 months ago
parent
commit
f1cca992e8
  1. 24
      src/api/eam/sparePartsOutLocationRecordDetail/index.ts
  2. 2
      src/components/BasicForm/src/BasicForm.vue
  3. 3
      src/components/Detail/src/Detail.vue
  4. 2
      src/components/Form/src/Form.vue
  5. 7
      src/components/RouterSearch/index.vue
  6. 6
      src/components/Tabs/src/Tabs.vue
  7. 9
      src/layout/components/CategoryHeader.vue
  8. 2
      src/layout/components/Message/src/Message.vue
  9. 16
      src/layout/components/ToolHeader.vue
  10. 4
      src/layout/components/UserInfo/src/UserInfo.vue
  11. 4
      src/layout/components/useRenderLayout.tsx
  12. 133
      src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts
  13. 2
      src/views/eam/SparePartsOutLocationRecord/index.vue
  14. 15
      src/views/eam/itemAccounts/index.vue
  15. 3
      src/views/eam/itemAccounts/itemAccounts.data.ts
  16. 42
      src/views/eam/maintainExperience/maintainExperience.data.ts
  17. 59
      src/views/eam/repairExperience/repairExperience.data.ts
  18. 5
      src/views/eam/sparePartsInLocationRecord/index.vue
  19. 172
      src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts
  20. 5
      src/views/eam/sparepartsinlocation/index.vue
  21. 830
      src/views/qms/inspectionJob/addForm.vue
  22. 3
      src/views/wms/basicDataManage/customerManage/project/project.data.ts
  23. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  24. 11
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  25. 25
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  26. 2
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  27. 3
      src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue
  28. 42
      src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
  29. 27
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  30. 37
      src/views/wms/countManage/count/countPlanMain/index.vue
  31. 98
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  32. 17
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  33. 1
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
  34. 1
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts
  35. 15
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  36. 13
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  37. 1
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts
  38. 14
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  39. 1
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
  40. 34
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue
  41. 1
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
  42. 19
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  43. 4
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
  44. 35
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  45. 1
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  46. 11
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  47. 7
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  48. 82
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  49. 9
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  50. 54
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  51. 1
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  52. 34
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  53. 1
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  54. 56
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  55. 26
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  56. 10
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  57. 1
      src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
  58. 10
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  59. 1
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  60. 10
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  61. 1
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  62. 24
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue
  63. 1
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts
  64. 15
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  65. 1
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  66. 14
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  67. 1
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  68. 19
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  69. 1
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  70. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  71. 14
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  72. 1
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  73. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  74. 256
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  75. 549
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  76. 21
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

24
src/api/eam/sparePartsOutLocationRecordDetail/index.ts

@ -28,45 +28,49 @@ export const getSparePartsOutLocationDetailRecordPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
const data = { ...params } const data = { ...params }
return await request.post({ url: '/eam/spare-parts-in-location-main-record/senior', data }) return await request.post({ url: '/eam/spare-parts-out-location-detail-record/senior', data })
} else { } else {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/page`, params }) return await request.get({ url: `/eam/spare-parts-out-location-detail-record/page`, params })
} }
} }
// 查询备件入库记录主详情 // 查询备件入库记录主详情
export const getSparePartsOutLocationDetailRecord = async (id: number) => { export const getSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.get({ url: `/eam/spare-parts-in-location-main-record/get?id=` + id }) return await request.get({ url: `/eam/spare-parts-out-location-detail-record/get?id=` + id })
} }
// 新增备件入库记录主 // 新增备件入库记录主
export const createSparePartsOutLocationDetailRecord = async ( export const createSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO data: SparePartsOutLocationRecordDetailVO
) => { ) => {
return await request.post({ url: `/eam/spare-parts-in-location-main-record/create`, data }) return await request.post({ url: `/eam/spare-parts-out-location-detail-record/create`, data })
} }
// 修改备件入库记录主 // 修改备件入库记录主
export const updateSparePartsOutLocationDetailRecord = async ( export const updateSparePartsOutLocationDetailRecord = async (
data: SparePartsInLocationMainRecordVO data: SparePartsOutLocationRecordDetailVO
) => { ) => {
return await request.put({ url: `/eam/spare-parts-in-location-main-record/update`, data }) return await request.put({ url: `/eam/spare-parts-out-location-detail-record/update`, data })
} }
// 删除备件入库记录主 // 删除备件入库记录主
export const deleteSparePartsOutLocationDetailRecord = async (id: number) => { export const deleteSparePartsOutLocationDetailRecord = async (id: number) => {
return await request.delete({ url: `/eam/spare-parts-in-location-main-record/delete?id=` + id }) return await request.delete({
url: `/eam/spare-parts-out-location-detail-record/delete?id=` + id
})
} }
// 导出备件入库记录主 Excel // 导出备件入库记录主 Excel
export const exportSparePartsOutLocationDetailRecord = async (params) => { export const exportSparePartsOutLocationDetailRecord = async (params) => {
return await request.download({ return await request.download({
url: `/eam/spare-parts-in-location-main-record/export-excel`, url: `/eam/spare-parts-out-location-detail-record/export-excel`,
params params
}) })
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/eam/spare-parts-in-location-main-record/get-import-template' }) return request.download({
url: '/eam/spare-parts-out-location-detail-record/get-import-template'
})
} }

2
src/components/BasicForm/src/BasicForm.vue

@ -139,7 +139,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import ButtonBase from '@/components/XButton/src/ButtonBase.vue' import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import TableForm from '@/components/TableForm/src/TableForm.vue' import TableForm from '@/components/TableForm/src/TableForm.vue'
import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue' import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCountPlan.vue'
import {DICT_TYPE, getStrDictOptions} from '@/utils/dict'
import { tableFormBlurVer,FormBlur,getListByBottonInput } from '@/api/wms/business/business' import { tableFormBlurVer,FormBlur,getListByBottonInput } from '@/api/wms/business/business'
const props = defineProps({ const props = defineProps({
// //

3
src/components/Detail/src/Detail.vue

@ -625,6 +625,9 @@ const titleNameRef = ref()
const titleValueRef = ref() const titleValueRef = ref()
const count =ref(0) 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) => {
if(tabRef.value){
tabRef.value.changeCurrent(0)
}
annexTableData.value = [] annexTableData.value = []
titleNameRef.value = titleName titleNameRef.value = titleName
titleValueRef.value = titleValue titleValueRef.value = titleValue

2
src/components/Form/src/Form.vue

@ -272,6 +272,7 @@ export default defineComponent({
}} }}
onBlur={(e)=>{onBlur(item.field, e)}} onBlur={(e)=>{onBlur(item.field, e)}}
onChange={(e)=>{onChange(item.field, e)}}
v-slots={{ v-slots={{
suffix: () => ( suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{ <ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
@ -324,6 +325,7 @@ export default defineComponent({
}} }}
onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}} onBlur={(e)=>{onBlur(item.field,formModel.value[item.field])}}
onChange={(e)=>{onChange(item.field,formModel.value[item.field])}}
disabled={item?.componentProps?.enterSearch?false:true} v-slots={{ disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => ( suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{ <ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{

7
src/components/RouterSearch/index.vue

@ -17,8 +17,8 @@
/> />
</el-select> --> </el-select> -->
</ElDialog> </ElDialog>
<div v-else class="custom-hover" @click.stop="showTopSearch = !showTopSearch"> <div v-else class="custom-hover custom-hover1" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" /> <Icon icon="ep:search" color="#ffffff"/>
<el-select <el-select
filterable filterable
:reserve-keyword="false" :reserve-keyword="false"
@ -170,4 +170,7 @@ defineExpose({
.w-220px { .w-220px {
width: 220px !important; width: 220px !important;
} }
.custom-hover1{
background-color: transparent;
}
</style> </style>

6
src/components/Tabs/src/Tabs.vue

@ -32,7 +32,13 @@ const change = (item, index) => {
current.value = index current.value = index
emit('change',item,index) emit('change',item,index)
} }
const changeCurrent = (index) =>{
change(props.tabsList[index],index)
}
const emit = defineEmits(['change']) const emit = defineEmits(['change'])
defineExpose({ changeCurrent})
</script> </script>

9
src/layout/components/CategoryHeader.vue

@ -9,6 +9,8 @@ import { ElMenu, ElMenuItem } from 'element-plus'
import { usePermissionStore } from '@/store/modules/permission' import { usePermissionStore } from '@/store/modules/permission'
import { hasOneShowingChild } from '@/layout/components/Menu/src/helper' import { hasOneShowingChild } from '@/layout/components/Menu/src/helper'
import { useRenderMenuTitle } from '@/layout/components/Menu/src/components/useRenderMenuTitle' import { useRenderMenuTitle } from '@/layout/components/Menu/src/components/useRenderMenuTitle'
import ToolHeader from './ToolHeader.vue'
// //
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls, variables } = useDesign() const { getPrefixCls, variables } = useDesign()
@ -101,6 +103,7 @@ export default defineComponent({
} }
}} }}
</ElMenu> </ElMenu>
<ToolHeader class="tool-header"></ToolHeader>
</div> </div>
) )
} }
@ -127,7 +130,11 @@ $prefix-cls: #{$namespace}-tool-header;
left:0; left:0;
z-index: 999; z-index: 999;
} }
.tool-header{
position: absolute;
right: 0px;
top: 0px;
}
} }
.categoryheader{ .categoryheader{
padding-left: 20px; padding-left: 20px;

2
src/layout/components/Message/src/Message.vue

@ -62,7 +62,7 @@ onBeforeUnmount(() => {
<ElPopover :width="400" placement="bottom" trigger="click"> <ElPopover :width="400" placement="bottom" trigger="click">
<template #reference> <template #reference>
<ElBadge :is-dot="unreadCount > 0" class="item"> <ElBadge :is-dot="unreadCount > 0" class="item">
<Icon :size="18" class="cursor-pointer" icon="ep:bell" @click="getList" /> <Icon :size="18" class="cursor-pointer" color="#ffffff" icon="ep:bell" @click="getList" />
</ElBadge> </ElBadge>
</template> </template>
<ElTabs v-model="activeName"> <ElTabs v-model="activeName">

16
src/layout/components/ToolHeader.vue

@ -54,28 +54,28 @@ export default defineComponent({
'dark:bg-[var(--el-bg-color)]' 'dark:bg-[var(--el-bg-color)]'
]} ]}
> >
{layout.value !== 'top' ? ( {/* {layout.value !== 'top' ? (
<div class="h-full flex items-center"> <div class="h-full flex items-center">
{hamburger.value && layout.value !== 'cutMenu' ? ( {hamburger.value && layout.value !== 'cutMenu' ? (
<Collapse class="custom-hover" color="var(--top-header-text-color)"></Collapse> <Collapse class="custom-hover" color="var(--top-header-text-color)"></Collapse>
) : undefined} ) : undefined}
{breadcrumb.value ? <Breadcrumb class="lt-md:hidden"></Breadcrumb> : undefined} {breadcrumb.value ? <Breadcrumb class="lt-md:hidden"></Breadcrumb> : undefined}
</div> </div>
) : undefined} ) : undefined} */}
<div class="h-full flex items-center"> <div class="h-full flex items-center">
{search.value ? (<RouterSearch isModal={false} />) : undefined} {search.value ? (<RouterSearch isModal={false} />) : undefined}
{screenfull.value ? ( {/* {screenfull.value ? (
<Screenfull class="custom-hover" color="var(--top-header-text-color)"></Screenfull> <Screenfull class="custom-hover" color="var(--top-header-text-color)"></Screenfull>
) : undefined} ) : undefined} */}
{size.value ? ( {/* {size.value ? (
<SizeDropdown class="custom-hover" color="var(--top-header-text-color)"></SizeDropdown> <SizeDropdown class="custom-hover" color="var(--top-header-text-color)"></SizeDropdown>
) : undefined} ) : undefined} */}
{locale.value ? ( {/* {locale.value ? (
<LocaleDropdown <LocaleDropdown
class="custom-hover" class="custom-hover"
color="var(--top-header-text-color)" color="var(--top-header-text-color)"
></LocaleDropdown> ></LocaleDropdown>
) : undefined} ) : undefined} */}
{message.value ? ( {message.value ? (
<Message class="custom-hover" color="var(--top-header-text-color)"></Message> <Message class="custom-hover" color="var(--top-header-text-color)"></Message>
) : undefined} ) : undefined}

4
src/layout/components/UserInfo/src/UserInfo.vue

@ -54,7 +54,7 @@ const toDocument = () => {
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click"> <ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<div class="flex items-center"> <div class="flex items-center">
<ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" /> <ElAvatar :src="avatar" alt="" class="w-[calc(var(--logo-height)-25px)] rounded-[50%]" />
<span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden"> <span class="pl-[5px] text-14px text-[var(--top-header-text-color)] <lg:hidden" style="color:#ffffff">
{{ userName }} {{ userName }}
</span> </span>
</div> </div>
@ -62,7 +62,7 @@ const toDocument = () => {
<ElDropdownMenu> <ElDropdownMenu>
<ElDropdownItem> <ElDropdownItem>
<Icon icon="ep:tools" /> <Icon icon="ep:tools" />
<div @click="toProfile">{{ t('common.profile') }}</div> <div @click="toProfile" >{{ t('common.profile') }}</div>
</ElDropdownItem> </ElDropdownItem>
<!-- <ElDropdownItem> <!-- <ElDropdownItem>
<Icon icon="ep:menu" /> <Icon icon="ep:menu" />

4
src/layout/components/useRenderLayout.tsx

@ -114,14 +114,14 @@ export const useRenderLayout = () => {
style="transition: all var(--transition-time-02);width:100%;" style="transition: all var(--transition-time-02);width:100%;"
> >
<ToolHeader {/* <ToolHeader
class={[ class={[
'bg-[var(--top-header-bg-color)]', 'bg-[var(--top-header-bg-color)]',
{ {
'layout-border__bottom': !tagsView.value 'layout-border__bottom': !tagsView.value
} }
]} ]}
></ToolHeader> ></ToolHeader> */}
{tagsView.value ? ( {tagsView.value ? (
<TagsView class="layout-border__bottom layout-border__top"></TagsView> <TagsView class="layout-border__bottom layout-border__top"></TagsView>

133
src/views/eam/SparePartsOutLocationRecord/SparePartsOutLocationRecord.data.ts

@ -11,113 +11,88 @@ import { dateFormatter } from '@/utils/formatTime'
export const SparePartsOutLocationRecordMain = useCrudSchemas( export const SparePartsOutLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([ reactive<CrudSchema[]>([
{ {
label: '编号', label: '备件编号',
field: 'number', field: 'sparePartsCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false isForm: false,
table: {
width: 180,
fixed: 'left'
}
}, },
{ {
label: '出库编号', label: '备件名称',
field: 'requestNumber', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false table: {
}, width: 110
{ }
label: '入库主题',
field: 'theme',
sort: 'custom',
isSearch: true
}, },
{ {
label: '入库类型', label: '备件名称',
field: 'type', field: 'name',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE, isSearch: true,
dictClass: 'string' table: {
width: 110
}
}, },
{ {
label: '流程状态', label: '备件类型',
field: 'status', field: 'classification',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm: false, isTable: true,
tableForm: {
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM, type: 'Select'
dictClass: 'string' }
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false
}, },
{ {
label: '审核人', label: '规格型号',
field: 'approver', field: 'specifications',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm: false
}, },
{ {
label: '审核内容', label: '存放位置',
field: 'approveContent', field: 'locationCode',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm: false
}, },
{ {
label: '审核时间', label: '计量单位',
field: 'approveTime', field: 'uom',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm: false, isTable: true,
search: { tableForm: {
component: 'DatePicker', type: 'Select'
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
} }
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '生产厂家',
} field: 'brand',
sort: 'custom'
}, },
{ {
label: '入库时间', label: '申请单号',
field: 'createTime', field: 'requestNumber',
sort: 'custom', sort: 'custom'
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}, },
isForm: false, {
detail: { label: '申领数量',
dateFormat: 'YYYY-MM-DD HH:mm:ss' field: 'applyQty',
} sort: 'custom'
}, },
{ {
label: '备注', label: '出库时问',
field: 'remark', field: 'createTime',
sort: 'custom', sort: 'custom'
isSearch: false
} }
]) ])
) )

2
src/views/eam/SparePartsOutLocationRecord/index.vue

@ -153,7 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
// //
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SparePartsOutLocationRecordMainApi.getSparePartsOutLocationRecordMainPage // getListApi: SparePartsOutLocationRecordDetailApi.getSparePartsOutLocationDetailRecordPage //
}) })
// //

15
src/views/eam/itemAccounts/index.vue

@ -60,20 +60,7 @@
<SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" /> <SearchTable ref="searchTableRef" @searchTableSuccess="submitItem" />
<!-- 详情 --> <!-- 详情 -->
<DetailLedger <Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
ref="detailRef"
:isBasic="true"
:allSchemas="ItemAccounts.allSchemas"
:subTabs="subTabList"
:operationRecordList="operationRecordList"
@handleOperationTabsChange="handleOperationTabsChange"
:detailAllSchemas="detailAllSchemas"
:apiPage="apiPage"
:dialogApiPage="dialogApiPage"
:dialogAllSchemas="dialogAllSchemas"
:dynamicInfoFields="dynamicInfoFields"
funcCode="tool_mould_file"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm

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

@ -22,6 +22,9 @@ export const ItemAccounts = useCrudSchemas(
field: 'itemNumber', field: 'itemNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 200
},
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {

42
src/views/eam/maintainExperience/maintainExperience.data.ts

@ -4,32 +4,28 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const MaintainExperienceRules = reactive({ export const MaintainExperienceRules = reactive({
name: [required], name: [required],
maintainNumber: [required], maintainNumber: [required]
}) })
export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const MaintainExperience = useCrudSchemas(
{ reactive<CrudSchema[]>([
label: 'id',
field: 'id',
sort: 'custom',
},
{ {
label: '经验标题', label: '经验标题',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '经验内容', label: '经验内容',
field: 'content', field: 'content',
sort: 'custom', sort: 'custom',
isTable:true, isTable: true,
form: { form: {
componentProps: { componentProps: {
type: 'textarea', type: 'textarea',
height: 200 height: 200
} }
}, }
}, },
{ {
@ -37,7 +33,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintainNumber', field: 'maintainNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false
}, },
{ {
label: '工单类型', label: '工单类型',
@ -47,7 +43,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false, isTable: false,
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, }
}, },
{ {
label: '来源字典', label: '来源字典',
@ -56,7 +52,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '保养类型', label: '保养类型',
@ -65,21 +61,21 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '设备/工装编号', label: '设备/工装编号',
field: 'equipmentCode', field: 'equipmentCode',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '设备/工装名称', label: '设备/工装名称',
field: 'equipmentName', field: 'equipmentName',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -87,11 +83,9 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
detail:{ detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
} }
}, }
])
)
]))

59
src/views/eam/repairExperience/repairExperience.data.ts

@ -4,21 +4,16 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验 // 表单校验
export const RepairExperienceRules = reactive({ export const RepairExperienceRules = reactive({
name: [required], name: [required],
repairNumber: [required], repairNumber: [required]
}) })
export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([ export const RepairExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
{ {
label: '经验标题', label: '经验标题',
field: 'name', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, },
{ {
label: '维修工单编号', label: '维修工单编号',
@ -26,21 +21,21 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false
}, },
{ {
label: '经验内容', label: '经验内容',
field: 'content', field: 'content',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
form: { form: {
component: 'Input', component: 'Input',
componentProps: { componentProps: {
type:'textarea', type: 'textarea',
valueHtml: '', valueHtml: '',
height: 200 height: 200
} }
}, }
}, },
{ {
@ -50,7 +45,7 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES, dictType: DICT_TYPE.EAM_MAINTENANCE_SOURCES,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '报修类型', label: '报修类型',
@ -59,30 +54,30 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_TYPE, dictType: DICT_TYPE.DEVICE_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '设备/工装编号', label: '设备/工装编号',
field: 'equipmentCode', field: 'equipmentCode',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '设备/工装名称', label: '设备/工装名称',
field: 'equipmentName', field: 'equipmentName',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '故障时间', label: '故障时间',
field: 'faultTime', field: 'faultTime',
formatter: dateFormatter, formatter: dateFormatter,
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false, isForm: false,
detail:{ detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
} }
}, },
@ -91,16 +86,16 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
field: 'faultType', field: 'faultType',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm:false isForm: false
}, },
{ {
label: '创建人', label: '创建人',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
isSearch:false, isSearch: false,
isForm:false, isForm: false,
isTable:false, isTable: false,
isDetail:false isDetail: false
}, },
{ {
label: '创建时间', label: '创建时间',
@ -108,10 +103,10 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
isSearch:false, isSearch: false,
detail:{ detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
} }
}, }
])
])) )

5
src/views/eam/sparePartsInLocationRecord/index.vue

@ -86,7 +86,7 @@ const updataTableColumns = (val) => {
// //
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SparePartsInLocationRecordMainApi.getSparePartsInLocationRecordMainPage // getListApi: SparePartsInLocationRecordDetailApi.getSparePartsInLocationRecordDetailPage //
}) })
// //
@ -100,12 +100,11 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'refresh') { if (val == 'refresh') {
// //
getList() getList()
} else if (val == 'filtrate') { } else if (val == 'filtrate') {

172
src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts

@ -3,129 +3,102 @@ import { dateFormatter } from '@/utils/formatTime'
import * as ItemAccountsApi from '@/api/eam/itemAccounts' import * as ItemAccountsApi from '@/api/eam/itemAccounts'
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
// 表单校验 // 表单校验
export const SparePartsInLocationRecordMainRules = reactive({ export const SparePartsInLocationRecordMainRules = reactive({
number: [required], number: [required],
theme: [required], theme: [required],
type: [required], type: [required]
}) })
// 备件入库主表 // 备件入库主表
export const SparePartsInLocationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: 'id', label: '备件编号',
field: 'id', field: 'sparePartsCode',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: true,
isTable: false,
isForm: false, isForm: false,
isDetail:false, table: {
width: 180,
fixed: 'left'
}
}, },
{ {
label: '编号', label: '备件名称',
field: 'number', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, table: {
width: 110
}
}, },
{ {
label: '入库主题', label: '备件名称',
field: 'theme', field: 'name',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
},{ table: {
label: '入库类型', width: 110
field: 'type', }
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
}, },
{ {
label: '流程状态', label: '备件类型',
field: 'status', field: 'classification',
sort: 'custom', sort: 'custom',
isSearch: false, dictType: DICT_TYPE.PART_CLASS,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string', dictClass: 'string',
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false, isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
}, },
{ {
label: '审核人', label: '规格型号',
field: 'approver', field: 'specifications',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm:false
}, },
{ {
label: '审核内容', label: '存放位置',
field: 'approveContent', field: 'locationCode',
sort: 'custom', sort: 'custom'
isSearch: false,
isForm:false
}, },
{ {
label: '审核时间', label: '计量单位',
field: 'approveTime', field: 'uom',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm:false, isTable: true,
search: { tableForm: {
component: 'DatePicker', type: 'Select'
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
form: { {
component: 'DatePicker', label: '生产厂家',
componentProps: { field: 'brand',
type: 'datetime', sort: 'custom'
valueFormat: 'x'
}
}, },
detail: { {
dateFormat: 'YYYY-MM-DD HH:mm:ss' label: '申请单号',
field: 'requestNumber',
sort: 'custom'
}, },
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
}, },
{ {
label: '入库时间', label: '出库时问',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom'
formatter: dateFormatter,
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, ])
isForm: false, )
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
]))
// 备件入库子表 // 备件入库子表
export const SparePartsInLocationRecordDetailRules = reactive({ export const SparePartsInLocationRecordDetailRules = reactive({
number: [required], number: [required],
@ -133,10 +106,11 @@ export const SparePartsInLocationRecordDetailRules = reactive({
locationCode: [required], locationCode: [required],
areaCode: [required], areaCode: [required],
sparePartsCode: [required], sparePartsCode: [required],
applyQty: [required], applyQty: [required]
}) })
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SparePartsInLocationRecordDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '库位编号', label: '库位编号',
field: 'locationCode', field: 'locationCode',
@ -187,7 +161,7 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
disabled: true disabled: true
} }
}, },
tableForm:{ tableForm: {
disabled: true disabled: true
} }
}, },
@ -203,7 +177,7 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
disabled: true disabled: true
} }
}, },
tableForm:{ tableForm: {
disabled: true disabled: true
} }
}, },
@ -215,13 +189,13 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
tableForm: { tableForm: {
disabled: true disabled: true
}, },
form:{ form: {
componentProps:{ componentProps: {
disabled: true disabled: true
} }
}, },
isDetail:false, isDetail: false,
isTable:false isTable: false
}, },
{ {
label: '申领数量', label: '申领数量',
@ -244,15 +218,13 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
} }
}, },
isForm: false, isForm: false,
isTableForm:false isTableForm: false
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true
}, }
])
])) )

5
src/views/eam/sparepartsinlocation/index.vue

@ -363,11 +363,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
console.log(formRef.value) console.log(formRef.value)
formRef.value.formLoading = true formRef.value.formLoading = true
let isHave = data.subList.some(item=>item.applyQty>item.currentQty)
if(isHave){
message.warning('申领数量不能大于库存数量')
return
}
try { try {
if (formType === 'create') { if (formType === 'create') {
await SparePartsInLocationMainApi.createSparePartsInLocationMain(data) await SparePartsInLocationMainApi.createSparePartsInLocationMain(data)

830
src/views/qms/inspectionJob/addForm.vue

File diff suppressed because it is too large

3
src/views/wms/basicDataManage/customerManage/project/project.data.ts

@ -205,6 +205,9 @@ export const ProjectRules = reactive({
name: [ name: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
customerCode: [
{ required: true,message: '请输入客户代码', trigger: 'blur' }
],
remark: [ remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } { max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],

2
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -52,7 +52,7 @@
:tableData="tableData" :tableData="tableData"
:apiUpdate="ItemareaApi.updateItemarea" :apiUpdate="ItemareaApi.updateItemarea"
:apiCreate="ItemareaApi.createItemarea" :apiCreate="ItemareaApi.createItemarea"
:isBusiness="true" :isBusiness="false"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true" :isShowReduceButtonSelection="true"

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

@ -95,6 +95,17 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
isForm:false, isForm:false,
isDetail:false isDetail:false
}, },
{
label: '包装类型',
field: 'packType',
dictType: DICT_TYPE.PACK_UNIT_TYPE,
dictClass: 'string',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{ {
label: '包装数量', label: '包装数量',
field: 'packQty', field: 'packQty',

25
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -29,7 +29,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm ref="basicFormRef" <BasicForm ref="basicFormRef"
:isOpenSearchTable="false" :isOpenSearchTable="true"
fieldTableColumn="itemCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="RelegateRequestMainRules" :rules="RelegateRequestMainRules"
@ -93,15 +93,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'itemCode') { if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode'] val.forEach(item=>{
row['uom'] = val[0]['uom'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['qty'] = val[0]['qty'] newRow['itemCode'] = item['itemCode']
row['fromBatch'] = val[0]['batch'] newRow['uom'] = item['uom']
row['fromPackingNumber'] = val[0]['packingNumber'] newRow['qty'] = item['qty']
row['toBatch'] = val[0]['batch'] newRow['fromBatch'] = item['batch']
row['toPackingNumber'] = val[0]['packingNumber'] newRow['fromPackingNumber'] = item['packingNumber']
row['fromLocationCode'] = val[0]['locationCode'] newRow['toBatch'] = item['batch']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['toPackingNumber'] = item['packingNumber']
newRow['fromLocationCode'] = item['locationCode']
newRow['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
})
} else if (formField == 'downItemCode') { } else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code'] row['downItemCode'] = val[0]['code']
} else if (formField == 'toLocationCode') { } else if (formField == 'toLocationCode') {

2
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

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

3
src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue

@ -184,6 +184,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'userName'){
setV['userId'] = val[0]['id']
}
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }

42
src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts

@ -15,7 +15,7 @@ export const User = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '用户名称', label: '用户名称',
field: 'username', field: 'userName',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -58,7 +58,8 @@ export const User = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const SupplierUserRules = reactive({ export const SupplierUserRules = reactive({
userId: [required], // userId: [required],
userName: [required],
supplierCode: [required], supplierCode: [required],
status: [required], status: [required],
concurrencyStamp: [required], concurrencyStamp: [required],
@ -75,11 +76,37 @@ export const SupplierUser = useCrudSchemas(reactive<CrudSchema[]>([
label: '用户ID', label: '用户ID',
field: 'userId', field: 'userId',
sort: 'custom', sort: 'custom',
isForm: false,
isSearch: true, isSearch: true,
// tableForm:{
// isInpuFocusShow: true,
// searchListPlaceholder: '请选用户信息',
// searchField: 'username',
// searchTitle: '用户信息',
// searchAllSchemas: User.allSchemas,
// searchPage: UserApi.getUserPage
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// dialogWidth:'1025px',//搜索出来弹窗的宽度
// isSearchList: true,
// searchListPlaceholder: '请选用户信息',
// searchField: 'username',
// searchTitle: '用户信息',
// searchAllSchemas: User.allSchemas,
// searchPage: UserApi.getUserPage
// }
// }
},
{
label: '用户账号',
field: 'userName',
sort: 'custom',
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选用户信息', searchListPlaceholder: '请选用户信息',
searchField: 'id', searchField: 'username',
searchTitle: '用户信息', searchTitle: '用户信息',
searchAllSchemas: User.allSchemas, searchAllSchemas: User.allSchemas,
searchPage: UserApi.getUserPage searchPage: UserApi.getUserPage
@ -90,18 +117,13 @@ export const SupplierUser = useCrudSchemas(reactive<CrudSchema[]>([
dialogWidth:'1025px',//搜索出来弹窗的宽度 dialogWidth:'1025px',//搜索出来弹窗的宽度
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选用户信息', searchListPlaceholder: '请选用户信息',
searchField: 'id', searchField: 'username',
searchTitle: '用户信息', searchTitle: '用户信息',
searchAllSchemas: User.allSchemas, searchAllSchemas: User.allSchemas,
searchPage: UserApi.getUserPage searchPage: UserApi.getUserPage
} }
}
}, },
{ isSearch: true,
label: '用户账号',
field: 'userName',
sort: 'custom',
isForm: false,
}, },
{ {
label: '用户昵称', label: '用户昵称',

27
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -102,21 +102,24 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
},
{
label: '限值',
field: 'limitedValue',
sort: 'custom',
table: {
width: 150
},
form: { form: {
component: 'InputNumber', value: 'BY_INEVNEOTY'
componentProps:{
disabled:false
}
} }
}, },
// {
// label: '限值',
// field: 'limitedValue',
// sort: 'custom',
// table: {
// width: 150
// },
// form: {
// component: 'InputNumber',
// componentProps:{
// disabled:false
// }
// }
// },
{ {
label: '物料忽略名单', label: '物料忽略名单',
field: 'ignoreListOfItem', field: 'ignoreListOfItem',

37
src/views/wms/countManage/count/countPlanMain/index.vue

@ -108,40 +108,41 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { import {
CountPlanMain,
CountPlanMainRules,
CountPlanDetail, CountPlanDetail,
CountPlanDetailRules, CountPlanDetailRules,
// CountPlanMain1 CountPlanMain,
CountPlanMainRules,
} from './countPlanMain.data' } from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain' import * as CountPlanMainApi from '@/api/wms/countPlanMain'
import * as CountPlanDetailApi from '@/api/wms/countPlanDetail' import * as CountPlanDetailApi from '@/api/wms/countPlanDetail'
import { Owner } from '@/views/wms/basicDataManage/orderManage/owner/owner.data' import {Owner} from '@/views/wms/basicDataManage/orderManage/owner/owner.data'
import * as OwnerApi from '@/api/wms/owner' import * as OwnerApi from '@/api/wms/owner'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import {Supplier} from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' import {Customer} from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as CustomerApi from '@/api/wms/customer' import * as CustomerApi from '@/api/wms/customer'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import {Itembasic} from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data' import {Warehouse} from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
import * as WarehouseApi from '@/api/wms/warehouse' import * as WarehouseApi from '@/api/wms/warehouse'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data' import {Area} from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as AreaApi from '@/api/wms/areabasic' import * as AreaApi from '@/api/wms/areabasic'
import { Locationgroup } from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data' import {
Locationgroup
} from '@/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data'
import * as LocationgroupApi from '@/api/wms/locationgroup' import * as LocationgroupApi from '@/api/wms/locationgroup'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import {Location} from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' import {DICT_TYPE, getStrDictOptions} from '@/utils/dict'
import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue' import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue'
// //
@ -410,12 +411,12 @@ const openForm = async (type: string, row?: any) => {
} }
] // ] //
row = row ? row : {} row = row ? row : {}
row.dimension = 'BY_INEVNEOTY' // row.dimension = 'BY_INEVNEOTY'
  CountPlanMain.allSchemas.formSchema.forEach((item) => { CountPlanMain.allSchemas.formSchema.forEach((item) => {
    if (item.field == 'crontab') { if (item.field == 'crontab') {
      item.componentProps.disabled = true item.componentProps.disabled = true
    } }
  }) })
formRef.value.open(type, row) formRef.value.open(type, row)
// Promise.all([getOwnerAllList(), // Promise.all([getOwnerAllList(),

98
src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts

@ -79,22 +79,22 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '出库事务类型', // label: '出库事务类型',
field: 'outTransactionType', // field: 'outTransactionType',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '入库事务类型', // label: '入库事务类型',
field: 'inTransactionType', // field: 'inTransactionType',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
@ -200,17 +200,17 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '接口类型', // label: '接口类型',
field: 'interfaceType', // field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE, // dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -312,9 +312,9 @@ export const CountRecordMainRules = reactive({
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
interfaceType: [ // interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' } // { required: true, message: '请选择接口类型', trigger: 'change' }
], // ],
number: [ number: [
{ required: true, message: '请输入单据号', trigger: 'blur' } { required: true, message: '请输入单据号', trigger: 'blur' }
], ],
@ -420,14 +420,14 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '盘点描述', // label: '盘点描述',
field: 'countDescription', // field: 'countDescription',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
@ -533,17 +533,17 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '接口类型', // label: '接口类型',
field: 'interfaceType', // field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE, // dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string', // dictClass: 'string',
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

17
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -42,7 +42,7 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
:isOpenSearchTable="false" :isOpenSearchTable="true"
fieldTableColumn="soLine" fieldTableColumn="soLine"
@success="getList" @success="getList"
:rules="SaleShipmentMainRules" :rules="SaleShipmentMainRules"
@ -111,11 +111,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'soLine') { if(formField == 'soLine') {
row['soLine'] = val[0]['lineNumber'] val.forEach(item=>{
row['soNumber'] = val[0]['number'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['itemCode'] = val[0]['itemCode'] newRow['soLine'] = item['lineNumber']
row['projectCode'] = val[0]['projectCode'] newRow['soNumber'] = item['number']
row['uom'] = val[0]['uom'] newRow['itemCode'] = item['itemCode']
newRow['projectCode'] = item['projectCode']
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
}else if(formField == 'fromLocationCode'){ }else if(formField == 'fromLocationCode'){
row['fromLocationCode'] = val[0]['defaultLocationCode'] row['fromLocationCode'] = val[0]['defaultLocationCode']
} }

1
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -339,6 +339,7 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行', searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber', searchField: 'lineNumber',

1
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts

@ -357,6 +357,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber', field: 'containerNumber',
sort: 'custom', sort: 'custom',
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择器具号', searchListPlaceholder: '请选择器具号',
searchField: 'itemCode', searchField: 'itemCode',

15
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="containerNumber"
@success="getList" @success="getList"
:rules="ContainerMainRequestRules" :rules="ContainerMainRequestRules"
:formAllSchemas="ContainerMainRequest.allSchemas" :formAllSchemas="ContainerMainRequest.allSchemas"
@ -155,10 +157,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'containerNumber') { if(formField == 'containerNumber') {
row['containerNumber'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] val.forEach(item=>{
row['fromLocationCode'] = val[0]['locationCode'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['fromInventoryStatus'] = val[0]['inventoryStatus'] newRow['containerNumber'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['fromLocationCode'] = item['locationCode']
newRow['fromInventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
})
}else if(formField == 'toLocationCode'){ }else if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code'] row['toLocationCode'] = val[0]['code']
}else { }else {

13
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="containerNumber"
@success="getList" @success="getList"
:rules="ContainerMainRequestRules" :rules="ContainerMainRequestRules"
:formAllSchemas="ContainerMainRequest.allSchemas" :formAllSchemas="ContainerMainRequest.allSchemas"
@ -130,9 +132,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'containerNumber') { if(formField == 'containerNumber') {
row['containerNumber'] = val[0]['code'] val.forEach(item=>{
row['uom'] = val[0]['uom'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['toInventoryStatus'] = 'OK' newRow['containerNumber'] = item['code']
newRow['uom'] = item['uom']
newRow['toInventoryStatus'] = 'OK'
tableData.value.push(newRow)
})
}else if(formField == 'toLocationCode'){ }else if(formField == 'toLocationCode'){
row['toLocationCode'] = val[0]['code'] row['toLocationCode'] = val[0]['code']
}else { }else {

1
src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts

@ -358,6 +358,7 @@ export const ContainerDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber', field: 'containerNumber',
sort: 'custom', sort: 'custom',
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择器具号', searchListPlaceholder: '请选择器具号',
searchField: 'itemCode', searchField: 'itemCode',

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="InventoryinitRequestMainRules" :rules="InventoryinitRequestMainRules"
:formAllSchemas="InventoryinitRequestMain.allSchemas" :formAllSchemas="InventoryinitRequestMain.allSchemas"
@ -111,20 +113,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField]
if(formField=='itemCode'){ if(formField=='itemCode'){
// //
row['uom'] = val[0]['uom'] val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
}else if(formField=='packUnit'){ }else if(formField=='packUnit'){
//1 //1
row[formField] = val[0][searchField]
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
}else if(formField=='secondPackUnit'){ }else if(formField=='secondPackUnit'){
//2 //2
row[formField] = val[0][searchField]
row['secondPackUnit'] = val[0]['packUnit'] row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty'] row['secondPackQty'] = val[0]['packQty']
}else if(formField == 'balancePackUnit'){ }else if(formField == 'balancePackUnit'){
// //
row[formField] = val[0][searchField]
row['balancePackUnit'] = val[0]['packUnit'] row['balancePackUnit'] = val[0]['packUnit']
} }
} else { } else {

1
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts

@ -394,6 +394,7 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,
enterSearch:true, enterSearch:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',

34
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="PackageoverRequestMainRules" :rules="PackageoverRequestMainRules"
:formAllSchemas="PackageoverRequestMain.allSchemas" :formAllSchemas="PackageoverRequestMain.allSchemas"
@ -105,19 +107,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if (formField == 'itemCode') { if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] val.forEach(item=>{
row['qty'] = val[0]['qty'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['batch'] = val[0]['batch'] newRow['itemCode'] = item['itemCode']
row['fromLocationCode'] = val[0]['locationCode'] newRow['uom'] = item['uom']
row['toLocationCode'] = val[0]['locationCode'] newRow['qty'] = item['qty']
row['fromLocationGroupCode'] = val[0]['locationGroupCode'] newRow['batch'] = item['batch']
row['toLocationGroupCode'] = val[0]['locationGroupCode'] newRow['fromLocationCode'] = item['locationCode']
row['fromAreaCode'] = val[0]['areaCode'] newRow['toLocationCode'] = item['locationCode']
row['toAreaCode'] = val[0]['areaCode'] newRow['fromLocationGroupCode'] = item['locationGroupCode']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['toLocationGroupCode'] = item['locationGroupCode']
row['fromPackUnit'] = val[0]['packUnit'] newRow['fromAreaCode'] = item['areaCode']
row['fromPackQty'] = val[0]['packQty'] newRow['toAreaCode'] = item['areaCode']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromPackUnit'] = item['packUnit']
newRow['fromPackQty'] = item['packQty']
tableData.value.push(newRow)
})
} else if (formField == 'toPackUnit') { } else if (formField == 'toPackUnit') {
row['toPackUnit'] = val[0]['packUnit'] row['toPackUnit'] = val[0]['packUnit']
row['toPackQty'] = val[0]['packQty'] row['toPackQty'] = val[0]['packQty']

1
src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts

@ -452,6 +452,7 @@ export const PackageoverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段

19
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="packingNumber"
@success="getList" @success="getList"
:rules="TransferissueRequestMainRules" :rules="TransferissueRequestMainRules"
:formAllSchemas="TransferissueRequestMain.allSchemas" :formAllSchemas="TransferissueRequestMain.allSchemas"
@ -112,12 +114,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if (formField == 'packingNumber') { if (formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber'] val.forEach(item=>{
row['containerNumber'] = val[0]['containerNumber'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['batch'] = val[0]['batch'] newRow['packingNumber'] = item['packingNumber']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['containerNumber'] = item['containerNumber']
row['fromLocationCode'] = val[0]['locationCode'] newRow['batch'] = item['batch']
row['itemCode'] = val[0]['itemCode'] newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
newRow['itemCode'] = item['itemCode']
tableData.value.push(newRow)
})
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }

4
src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts

@ -619,6 +619,7 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号', searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber', searchField: 'packingNumber',
@ -692,7 +693,8 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select' type: 'Select',
disabled: true,
} }
}, },
{ {

35
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -60,6 +60,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@onEnter="onEnter" @onEnter="onEnter"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -84,6 +85,8 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { IssueRequestMain,IssueRequestMainRules,IssueRequestDetail,IssueRequestDetailRules } from './issueRequestMain.data' import { IssueRequestMain,IssueRequestMainRules,IssueRequestDetail,IssueRequestDetailRules } from './issueRequestMain.data'
import * as IssueRequestMainApi from '@/api/wms/issueRequestMain' import * as IssueRequestMainApi from '@/api/wms/issueRequestMain'
@ -106,7 +109,16 @@ const tableColumns = ref([...IssueRequestMain.allSchemas.tableColumns,...IssueRe
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const onChange = async (field,value) => {
console.log('onChange',field,value)
if (field == 'workshopCode') {
//
const setV = {}
setV['productionLineCode'] = ''
setV['workStationCode'] = ''
formRef.value.formRef.setValues(setV)
}
}
const onEnter = async (field,value) => { const onEnter = async (field,value) => {
if (field == 'productionLineCode') { if (field == 'productionLineCode') {
//线 //线
@ -120,6 +132,22 @@ const onEnter = async (field,value) => {
setV['workStationCode'] = res.list[0].code setV['workStationCode'] = res.list[0].code
formRef.value.formRef.setValues(setV) formRef.value.formRef.setValues(setV)
} }
}else if(field == 'workshopCode'){
//
formRef.value.opensearchTable('productionLineCode', 'code', '生产线信息', Productionline.allSchemas, ProductionlineApi.getProductionlinePage,[
{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'workshopCode',
value: value,
action: '==',
isSearch: true,
isMainValue: false
}])
} }
} }
// //
@ -150,6 +178,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['fromWarehouseCode'] = val[0]['code'] setV['fromWarehouseCode'] = val[0]['code']
setV['toWarehouseCode'] = val[0]['code'] setV['toWarehouseCode'] = val[0]['code']
} }
if (formField == 'workshopCode') {
//
setV['productionLineCode'] = ''
setV['workStationCode'] = ''
}
if (formField == 'productionLineCode') { if (formField == 'productionLineCode') {
//线 //线
let res = await WorkstationApi.getWorkstationPage({ let res = await WorkstationApi.getWorkstationPage({

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductionreturnRequestMainRules" :rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas" :formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -209,8 +211,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}) })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code'] //
row['fromLocationCode'] = val[0]['rawLocationCode'] val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
} else if(formField == 'packUnit') { } else if(formField == 'packUnit') {
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']

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

@ -491,6 +491,9 @@ export const ProductionreturnRequestMainRules = reactive({
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间', trigger: 'change' } { required: true, message: '请选择车间', trigger: 'change' }
], ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
}) })
/** /**
@ -1101,7 +1104,7 @@ export const ProductionreturnRequestDetailRules = reactive({
*/ */
export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '生产线代码', label: '标签生产线代码',
field: 'productionLineCodePackage', field: 'productionLineCodePackage',
sort: 'custom', sort: 'custom',
table: { table: {
@ -1123,7 +1126,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
} }
}, },
{ {
label: '供应商代码', label: '标签供应商代码',
field: 'supplierItemCode', field: 'supplierItemCode',
sort: 'custom', sort: 'custom',
table: { table: {

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

@ -477,15 +477,15 @@ export const RepleinshJobMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '物料号', // label: '物料号',
field: 'code', // field: 'code',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
}, // },
{ {
label: '来源库位', label: '来源库位',
field: 'fromLocationCode', field: 'fromLocationCode',
@ -513,18 +513,18 @@ export const RepleinshJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false, isTable: false,
}, },
{ // {
label: '单位', // label: '单位',
field: 'unit', // field: 'unit',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT, // dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
}, // },
{ {
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
@ -716,26 +716,26 @@ export const RepleinshJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{ // {
label: '采购订单号', // label: '采购订单号',
field: 'poNumber', // field: 'poNumber',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
hiddenInMain:true, // hiddenInMain:true,
sortTableDefault:2, // sortTableDefault:2,
}, // },
{ // {
label: '订单行', // label: '订单行',
field: 'poLine', // field: 'poLine',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
hiddenInMain:true, // hiddenInMain:true,
sortTableDefault:2, // sortTableDefault:2,
}, // },
{ {
label: '从库位代码', label: '从库位代码',
field: 'fromLocationCode', field: 'fromLocationCode',

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

@ -642,8 +642,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
sortSearchDefault:1000, sortSearchDefault:1000,
isSearch: true, isSearch: true,
sortTableDefault:1100, sortTableDefault:1100,
// isTableForm: false, isTableForm: false,
}, },
// { // {
@ -894,9 +893,9 @@ export const RepleinshRequestDetailRules = reactive({
// inventoryStatus: [ // inventoryStatus: [
// { required: true, message: '请选择库存状态', trigger: 'change' } // { required: true, message: '请选择库存状态', trigger: 'change' }
// ], // ],
toLocationCode: [ // toLocationCode: [
{ required: true, message: '请输入到库位代码', trigger: 'blur' } // { required: true, message: '请输入到库位代码', trigger: 'blur' }
], // ],
itemCode: [ itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' } { required: true, message: '请输入物料代码', trigger: 'blur' }
], ],

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

@ -53,6 +53,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
@success="getList" @success="getList"
:rules="InventorychangeRequestMainRules" :rules="InventorychangeRequestMainRules"
:formAllSchemas="InventorychangeRequestMain.allSchemas" :formAllSchemas="InventorychangeRequestMain.allSchemas"
@ -130,30 +132,34 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField=='toOwnerCode'){ if(formField=='toOwnerCode'){
// //
row['toOwnerCode'] = val[0]['code'] row['toOwnerCode'] = val[0]['code']
}else{ }else if(formField == 'fromPackingNumber'){
row[formField] = val[0][searchField] val.forEach(item=>{
row['fromPackingNumber'] = val[0]['packingNumber'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['toPackingNumber'] = val[0]['packingNumber'] newRow[formField] = item[searchField]
row['fromBatch'] = val[0]['batch'] newRow['fromPackingNumber'] = item['packingNumber']
row['toBatch'] = val[0]['batch'] newRow['toPackingNumber'] = item['packingNumber']
row['fromInventoryStatus'] = val[0]['inventoryStatus'] newRow['fromBatch'] = item['batch']
row['toInventoryStatus'] = val[0]['inventoryStatus'] newRow['toBatch'] = item['batch']
row['fromContainerNumber'] = val[0]['containerNumber'] newRow['fromInventoryStatus'] = item['inventoryStatus']
row['toContainerNumber'] = val[0]['containerNumber'] newRow['toInventoryStatus'] = item['inventoryStatus']
row['fromQty'] = val[0]['qty'] newRow['fromContainerNumber'] = item['containerNumber']
row['toQty'] = val[0]['qty'] newRow['toContainerNumber'] = item['containerNumber']
row['fromOwnerCode'] = val[0]['ownerCode'] newRow['fromQty'] = item['qty']
row['fromAltBatch'] = val[0]['altBatch'] newRow['toQty'] = item['qty']
row['toAltBatch'] = val[0]['altBatch'] newRow['fromOwnerCode'] = item['ownerCode']
row['fromArriveDate'] = val[0]['arriveDate'] newRow['fromAltBatch'] = item['altBatch']
row['toArriveDate'] = val[0]['arriveDate'] newRow['toAltBatch'] = item['altBatch']
row['fromProduceDate'] = val[0]['produceDate'] newRow['fromArriveDate'] = item['arriveDate']
row['toProduceDate'] = val[0]['produceDate'] newRow['toArriveDate'] = item['arriveDate']
row['fromExpireDate'] = val[0]['expireDate'] newRow['fromProduceDate'] = item['produceDate']
row['toExpireDate'] = val[0]['expireDate'] newRow['toProduceDate'] = item['produceDate']
row['itemCode'] = val[0]['itemCode'] newRow['fromExpireDate'] = item['expireDate']
row['locationCode'] = val[0]['locationCode'] newRow['toExpireDate'] = item['expireDate']
row['uom'] = val[0]['uom'] newRow['itemCode'] = item['itemCode']
newRow['locationCode'] = item['locationCode']
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
} }
} else { } else {

1
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -383,6 +383,7 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号', searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber', searchField: 'packingNumber',

34
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -329,26 +331,32 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){ if(formField == 'fromPackingNumber'){
row['fromPackingNumber'] = val[0]['packingNumber']
row['fromContainerNumber'] = val[0]['containerNumber'] val.forEach(item=>{
row['itemCode'] = val[0]['itemCode'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['fromBatch'] = val[0]['batch'] newRow['fromPackingNumber'] = item['packingNumber']
row['fromInventoryStatus'] = val[0]['inventoryStatus'] newRow['fromContainerNumber'] = item['containerNumber']
row['fromLocationCode'] = val[0]['locationCode'] newRow['itemCode'] = item['itemCode']
row['uom'] = val[0]['uom'] newRow['fromBatch'] = item['batch']
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
newRow['qty'] = item['packQty']
if(routeName.value == 'OktoholdRequestMain'){ if(routeName.value == 'OktoholdRequestMain'){
row['toInventoryStatus'] = "HOLD" newRow['toInventoryStatus'] = "HOLD"
}else if ( routeName.value == 'HoldtookRequestMain') { }else if ( routeName.value == 'HoldtookRequestMain') {
row['toInventoryStatus'] = "OK" newRow['toInventoryStatus'] = "OK"
}else if ( routeName.value == 'HoldtoscrapRequestMain') { }else if ( routeName.value == 'HoldtoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP" newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'OktoscrapRequestMain') { }else if ( routeName.value == 'OktoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP" newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'ScraptoholdRequestMain') { }else if ( routeName.value == 'ScraptoholdRequestMain') {
row['toInventoryStatus'] = "HOLD" newRow['toInventoryStatus'] = "HOLD"
}else{ }else{
row['toInventoryStatus'] = val[0]['inventoryStatus'] newRow['toInventoryStatus'] = item['inventoryStatus']
} }
tableData.value.push(newRow)
})
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }

1
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -545,6 +545,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号', searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber', searchField: 'packingNumber',

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

@ -40,6 +40,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="basicFormRef" ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLine"
@submitForm="submitForm" @submitForm="submitForm"
:isBusiness="true" :isBusiness="true"
:rules="ProcessproductionRequestMainRules" :rules="ProcessproductionRequestMainRules"
@ -54,6 +56,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true" :isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@onEnter="onEnter"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -87,6 +90,8 @@
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProcessproductionRequestMain,ProcessproductionRequestMainRules,ProcessproductionRequestDetail,ProcessproductionRequestDetailRules } from './processproductionRequestMain.data' import { ProcessproductionRequestMain,ProcessproductionRequestMainRules,ProcessproductionRequestDetail,ProcessproductionRequestDetailRules } from './processproductionRequestMain.data'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain' import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain'
import * as ProcessproductionRequestDetailApi from '@/api/wms/processproductionRequestDetail' import * as ProcessproductionRequestDetailApi from '@/api/wms/processproductionRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -109,7 +114,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField === 'productionLine'){ if(formField === 'productionLine'){
row['productionLine']=val[0]['productionLineCode'] val.forEach(item=>{
// if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return
const newRow = JSON.parse(JSON.stringify(tableFormKeys))
newRow['productionLine'] = item['productionLineCode']
tableData.value.push(newRow)
})
} }
if(formField === 'processCode'){ if(formField === 'processCode'){
row['processCode']=val[0]['code'] row['processCode']=val[0]['code']
@ -226,7 +236,9 @@ const handleClose = async (id: number) => {
message.success(t('common.closeSuccess')) message.success(t('common.closeSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 重新添加按钮操作 */ /** 重新添加按钮操作 */
@ -238,7 +250,9 @@ const handleReAdd = async (id: number) => {
message.success(t('common.reAddSuccess')) message.success(t('common.reAddSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 提交按钮操作 */ /** 提交按钮操作 */
@ -250,7 +264,9 @@ const handleSubmit = async (id: number) => {
message.success(t('common.submitSuccess')) message.success(t('common.submitSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 审批驳回按钮操作 */ /** 审批驳回按钮操作 */
@ -262,7 +278,9 @@ const handleRefused = async (id: number) => {
message.success(t('common.refusedSuccess')) message.success(t('common.refusedSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 审批通过按钮操作 */ /** 审批通过按钮操作 */
@ -274,7 +292,9 @@ const handleAgree = async (id: number) => {
message.success(t('common.agreeSuccess')) message.success(t('common.agreeSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 处理按钮操作 */ /** 处理按钮操作 */
@ -286,7 +306,9 @@ const handleHandle = async (id: number) => {
message.success(t('common.handleSuccess')) message.success(t('common.handleSuccess'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} catch {} } catch {
tableObject.loading = false
}
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -428,6 +450,26 @@ const handleDeleteTable = (item, index) => {
tableData.value.splice(itemIndex, 1) tableData.value.splice(itemIndex, 1)
} }
} }
const onEnter = async (field,value) => {
if (field == 'itemCode') {
//
basicFormRef.value.opensearchTable('productionLine', 'productionLineCode', '生产线物料关系信息', Productionlineitem.allSchemas, ProductionlineitemApi.getProductionlineitemPage,[
{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'itemCode',
value: value,
action: '==',
isSearch: true,
isMainValue: false
}])
}
}
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter(item => !selection.includes(item))
} }

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

@ -265,12 +265,32 @@ export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]
} }
} }
])) ]))
// 完工数量校验
const validateCompletedQuantity= (rule: any, value: any, callback: any) => {
if (Number(value)>0) {
callback();
} else {
callback(new Error('完工数量不能为0'));
}
}
// 报废数量校验
const validateScrapQuantity= (rule: any, value: any, callback: any) => {
if (Number(value)>0) {
callback();
} else {
callback(new Error('完工数量不能为0'));
}
}
// 表单校验 // 表单校验
export const ProcessproductionRequestMainRules = reactive({ export const ProcessproductionRequestMainRules = reactive({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }], itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }], completedQuantity: [
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }], { required: true, message: '完工数量不能为空', trigger: 'change' },
{ validator: validateCompletedQuantity, trigger: 'change' }
],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' },
{ validator: validateScrapQuantity, trigger: 'change' }
],
}) })

10
src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionMainRules" :rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas" :formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
row[formField] = val[0][searchField] val.forEach(item=>{
row['uom'] = val[0]['uom'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
if(formField == 'workshop'){ if(formField == 'workshop'){

1
src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts

@ -635,6 +635,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
multiple: true,
enterSearch:true, enterSearch:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本

10
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionMainRules" :rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas" :formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
row[formField] = val[0][searchField] val.forEach(item=>{
row['uom'] = val[0]['uom'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
if(formField == 'workshop'){ if(formField == 'workshop'){

1
src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts

@ -627,6 +627,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
multiple:true,
enterSearch:true, enterSearch:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本

10
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductionMainRules" :rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas" :formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{ // }).catch(err =>{
// console.log(err); // console.log(err);
// }) // })
row[formField] = val[0][searchField] val.forEach(item=>{
row['uom'] = val[0]['uom'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
if(formField == 'workshop'){ if(formField == 'workshop'){

1
src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts

@ -628,6 +628,7 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
tableForm:{ tableForm:{
multiple:true,
enterSearch:true, enterSearch:true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本

24
src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductputawayRequestMainRules" :rules="ProductputawayRequestMainRules"
:formAllSchemas="ProductputawayRequestMain.allSchemas" :formAllSchemas="ProductputawayRequestMain.allSchemas"
@ -87,7 +89,7 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa
import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail' import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
// //
defineOptions({ name: 'ProductputawayRequestMain' }) defineOptions({ name: 'ProductputawayRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -108,14 +110,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] val.forEach(item=>{
row['poLine'] = val[0]['itemCode'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
row['packingNumber'] = val[0]['packingNumber'] newRow[formField] = item[searchField]
row['containerNumber'] = val[0]['containerNumber'] newRow['poLine'] = item['itemCode']
row['batch'] = val[0]['batch'] newRow['packingNumber'] = item['packingNumber']
row['uom'] = val[0]['uom'] newRow['containerNumber'] = item['containerNumber']
row['inventoryStatus'] = val[0]['inventoryStatus'] newRow['batch'] = item['batch']
row['fromLocationCode'] = val[0]['locationCode'] newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
tableData.value.push(newRow)
})
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts

@ -447,6 +447,7 @@ export const ProductputawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本

15
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -201,15 +203,24 @@ const searchTableSuccess = (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']
row[formField] = val[0][searchField]
}else if(formField == 'packUnit'){ }else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') { }else if (formField == 'itemCode') {
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
}
//
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
tableData.value.push(newRow)
})
}
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -615,6 +615,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',

14
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -202,15 +204,23 @@ const searchTableSuccess = (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']
row[formField] = val[0][searchField]
}else if(formField == 'packUnit'){ }else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit'] row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty'] row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') { }else if (formField == 'itemCode') {
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf() row['produceDate'] = dayjs().valueOf()
}
//
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
tableData.value.push(newRow)
})
}
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -616,6 +616,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',

19
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -140,6 +142,7 @@ import {
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
// //
//
defineOptions({ name: 'ProductreceiptRequestMain' }) defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -187,21 +190,31 @@ const updataTableColumns = (val) => {
// //
const searchTableSuccess = async (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = async (formField, searchField, val, formRef, type, row ) => {
console.log(formField, searchField, val, formRef, type, row)
nextTick(async () => { nextTick(async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
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']
}else if(formField == 'itemCode'){ row[formField] = val[0][searchField]
}else if(formField == 'itemCode'){
let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')}) let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')})
if(res.length>0){ if(res.length>0){
row['uom'] = res[0]['uom'] row['uom'] = res[0]['uom']
} }
row[formField] = val[0][searchField]
console.log('获取计量单位',res) console.log('获取计量单位',res)
}else{
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
newRow[formField] = item[searchField]
tableData.value.push(newRow)
})
} }
//
row[formField] = val[0][searchField]
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]

1
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -523,6 +523,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', searchListPlaceholder: '请选择生产线代码',
searchField: 'code', searchField: 'code',

4
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -566,7 +566,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},{ },{
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请选择返修生产线代码!',
isMainValue: true isMainValue: true
}] }]
}, },
@ -586,7 +586,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
},{ },{
key: 'productionLineCode', key: 'productionLineCode',
value: 'productionLineCode', value: 'productionLineCode',
message: '请填写生产线代码!', message: '请选择返修生产线代码!',
isMainValue: true isMainValue: true
}] }]
} }

14
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList" @success="getList"
:rules="ProductscrapRequestMainRules" :rules="ProductscrapRequestMainRules"
:formAllSchemas="ProductscrapRequestMain.allSchemas" :formAllSchemas="ProductscrapRequestMain.allSchemas"
@ -83,6 +85,7 @@
<!-- BOM弹窗列表 --> <!-- BOM弹窗列表 -->
<BasicForm <BasicForm
ref="detailBomRef" ref="detailBomRef"
@success="getList" @success="getList"
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas" :tableAllSchemas="ProdcutscrapBomScrap.allSchemas"
:tableFormRules="ProdcutscrapBomScrapRules" :tableFormRules="ProdcutscrapBomScrapRules"
@ -118,7 +121,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle" import * as BomDismantleApi from "@/api/wms/bomDismantle"
import * as BomApi from "@/api/wms/bom"; import * as BomApi from "@/api/wms/bom";
// //
defineOptions({ name: 'ProductscrapRequestMain' }) defineOptions({ name: 'ProductscrapRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -300,8 +303,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'productionLineCode'){ if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code'] row['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){ }else if(formField == 'workStationCode'){
row['workStationCode'] = val[0]['code'] val.forEach(item=>{
row['fromLocationCode'] = val[0]['rawLocationCode'] const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['workStationCode'] = item['code']
newRow['fromLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
}else if(formField == 'processCode'){ }else if(formField == 'processCode'){
row['processCode'] = val[0]['code'] row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){ }else if(formField == 'itemCode'){

1
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -551,6 +551,7 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm:{ tableForm:{
multiple: true,
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本 searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -622,6 +622,8 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
action: '==', // 查询拼接条件 action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isFormModel:true, isFormModel:true,
required:true,
message:'请选择采购订单号',
isMainValue: false isMainValue: false
}, },
{ {

256
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue

@ -2,7 +2,10 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="[...PurchasereturnRequestMain.allSchemas.searchSchema,...PurchasereturnRequestDetail.allSchemas.searchSchema]" :schema="[
...PurchasereturnRequestMain.allSchemas.searchSchema,
...PurchasereturnRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -21,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"
@ -37,9 +41,9 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row,$index }"> <template #action="{ row, $index }">
<ButtonBase <ButtonBase
:Butttondata="butttondata(row,$index)" :Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)" @button-base-click="buttonTableClick($event, row)"
/> />
</template> </template>
@ -87,8 +91,8 @@
:detailValidate="detailValidate" :detailValidate="detailValidate"
/> />
<!-- 创建标签 --> <!-- 创建标签 -->
<BasicForm <BasicForm
ref="formLabelRef" ref="formLabelRef"
@success="getList" @success="getList"
:tableAllSchemas="PurchasereReturnRequestDetailLabel.allSchemas" :tableAllSchemas="PurchasereReturnRequestDetailLabel.allSchemas"
@ -101,7 +105,7 @@
@searchTableSuccess="searchTableSuccessLabel" @searchTableSuccess="searchTableSuccessLabel"
/> />
<!-- 标签打印 --> <!-- 标签打印 -->
<SearchTable style="width:905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" /> <SearchTable style="width: 905px" ref="showLabelRef" @searchTableSuccess="showLabelSuccess" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
ref="importFormRef" ref="importFormRef"
@ -129,9 +133,7 @@ import * as PurchasereturnRequestMainApi from '@/api/wms/purchasereturnRequestMa
import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail' import * as PurchasereturnRequestDetailApi from '@/api/wms/purchasereturnRequestDetail'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { import { SupplierdeliverRequestPackage } from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
SupplierdeliverRequestPackage
} from '../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
import * as PackageApi from '@/api/wms/package' import * as PackageApi from '@/api/wms/package'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import * as BalanceApi from '@/api/wms/balance' import * as BalanceApi from '@/api/wms/balance'
@ -142,11 +144,14 @@ defineOptions({ name: 'PurchasereturnRequestMain' })
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
const genLabelId = ref(); //ID const genLabelId = ref() //ID
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...PurchasereturnRequestMain.allSchemas.tableColumns,...PurchasereturnRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([
...PurchasereturnRequestMain.allSchemas.tableColumns,
...PurchasereturnRequestDetail.allSchemas.tableMainColumns
])
const isShowButton = ref(true) const isShowButton = ref(true)
@ -154,16 +159,25 @@ const isShowButton = ref(true)
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
const onEnter = async (field,value)=>{ const onEnter = async (field, value) => {
console.log(field,value) console.log(field, value)
if('supplierCode'==field){ if ('supplierCode' == field) {
// //
formRef.value.opensearchTable('purchaseReceiptRecordNumber', 'number', '采购收货记录', PurchasereceiptRecordMain1.allSchemas, PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,[{ formRef.value.opensearchTable(
'purchaseReceiptRecordNumber',
'number',
'采购收货记录',
PurchasereceiptRecordMain1.allSchemas,
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,
[
{
key: 'supplierCode', key: 'supplierCode',
value: 'supplierCode', value: 'supplierCode',
isMainValue: true isMainValue: true
}]) }
}else if('purchaseReceiptRecordNumber' == field){ ]
)
} else if ('purchaseReceiptRecordNumber' == field) {
// //
} }
} }
@ -171,22 +185,22 @@ const onEnter = async (field,value)=>{
// //
const isCreateLabel = ref(false) const isCreateLabel = ref(false)
const formLabelRef = ref() const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({ const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: PurchasereturnRequestDetailApi.getPurchasereturnRequestDetailPage getListApi: PurchasereturnRequestDetailApi.getPurchasereturnRequestDetailPage
}) })
const { getList:getDetailList } = detatableMethods const { getList: getDetailList } = detatableMethods
// //
const submitFormLabel = async (formType, submitData) => { const submitFormLabel = async (formType, submitData) => {
let data = {...submitData} let data = { ...submitData }
if(data.masterId){ if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
try { try {
console.log("formType==",formType) console.log('formType==', formType)
console.log("data==",data) console.log('data==', data)
data.subList = detatableData.tableList data.subList = detatableData.tableList
console.log("detatableData",detatableData) console.log('detatableData', detatableData)
await message.confirm(t('ts.是否为此数据生成标签?')) await message.confirm(t('ts.是否为此数据生成标签?'))
await PurchasereturnRequestMainApi.genLabel(data) //genLabelId.value await PurchasereturnRequestMainApi.genLabel(data) //genLabelId.value
isCreateLabel.value = true isCreateLabel.value = true
@ -212,16 +226,15 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
} }
// //
const searchTableSuccess = async(formField, searchField, val, formRef, type, row) => { const searchTableSuccess = async (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) console.log('searchTableSuccess123', val)
console.log('searchTableSuccess123',val) nextTick(async () => {
nextTick( async () => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
if(formField=='purchaseReceiptRecordNumber'){//-- if (formField == 'purchaseReceiptRecordNumber') {
//--
row['supplierCode'] = val[0]['supplierCode'] row['supplierCode'] = val[0]['supplierCode']
row['poNumber'] = val[0]['poNumber'] row['poNumber'] = val[0]['poNumber']
row['poLine'] = val[0]['poLine'] row['poLine'] = val[0]['poLine']
@ -257,14 +270,14 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
row['singlePrice'] = val[0]['singlePrice'] row['singlePrice'] = val[0]['singlePrice']
row['amount'] = val[0]['amount'] row['amount'] = val[0]['amount']
row['projectCode'] = val[0]['projectCode'] row['projectCode'] = val[0]['projectCode']
}else if(formField == 'itemCode'){ } else if (formField == 'itemCode') {
row['batch'] = val[0]['toBatch'] row['batch'] = val[0]['toBatch']
row['containerNumber'] = val[0]['toContainerNumber'] row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
// row['fromLocationCode'] = val[0]['fromLocationCode'] // row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode'] row['toLocationCode'] = val[0]['toLocationCode']
}else if(formField=='fromLocationCode'){ } else if (formField == 'fromLocationCode') {
// let params = { // let params = {
// itemCode: row.itemCode, // itemCode: row.itemCode,
// batch: row.batch, // batch: row.batch,
@ -273,12 +286,12 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
// let aa = await BalanceApi.getSumByConditions(params); // let aa = await BalanceApi.getSumByConditions(params);
// console.log('23423423',aa); // console.log('23423423',aa);
// row['inventoryBalance'] = aa// // row['inventoryBalance'] = aa//
}else if(formField=='packingNumber'){ } else if (formField == 'packingNumber') {
row['inventoryBalance'] = val[0]['qty']// row['inventoryBalance'] = val[0]['qty'] //
} }
} else { } else {
const setV = {} const setV = {}
if(formField == 'purchaseReceiptRecordNumber'){ if (formField == 'purchaseReceiptRecordNumber') {
// isShowButton.value = false // isShowButton.value = false
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['purchaseReceiptRecordNumber'] = val[0]['number'] setV['purchaseReceiptRecordNumber'] = val[0]['number']
@ -289,7 +302,8 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
// PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({ // PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({ PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
masterId: val[0]['masterId'] masterId: val[0]['masterId']
}).then((res) => { })
.then((res) => {
if (res) tableData.value = res if (res) tableData.value = res
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
item.batch = item.toBatch item.batch = item.toBatch
@ -331,11 +345,12 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
item.tableForm.isInpuFocusShow = false item.tableForm.isInpuFocusShow = false
} }
}) })
}).catch((err) => { })
.catch((err) => {
console.log(err) console.log(err)
}) })
} }
if(formField == 'supplierCode'){ if (formField == 'supplierCode') {
// isShowButton.value = true // isShowButton.value = true
setV['supplierCode'] = val[0]['code'] setV['supplierCode'] = val[0]['code']
// setV['purchaseReceiptRecordNumber'] = '' // setV['purchaseReceiptRecordNumber'] = ''
@ -349,7 +364,7 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
if(formField == 'poLine' || formField == 'itemCode'){ if (formField == 'poLine' || formField == 'itemCode') {
console.log(val) console.log(val)
setV['poLine'] = val[0]['poLine'] setV['poLine'] = val[0]['poLine']
setV['poNumber'] = val[0]['poNumber'] setV['poNumber'] = val[0]['poNumber']
@ -387,7 +402,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['amount'] = val[0]['amount'] setV['amount'] = val[0]['amount']
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']
if(formField == 'itemCode'){ if (formField == 'itemCode') {
setV['batch'] = val[0]['toBatch'] setV['batch'] = val[0]['toBatch']
setV['containerNumber'] = val[0]['toContainerNumber'] setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber'] setV['containerNumber'] = val[0]['containerNumber']
@ -395,7 +410,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
// setV['fromLocationCode'] = val[0]['fromLocationCode'] // setV['fromLocationCode'] = val[0]['fromLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode'] // setV['toLocationCode'] = val[0]['toLocationCode']
} }
}else { } else {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
} }
formRef.setValues(setV) formRef.setValues(setV)
@ -439,7 +454,7 @@ const buttonBaseClick = (val, item) => {
handleExport() handleExport()
} else if (val == 'refresh') { } else if (val == 'refresh') {
// //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({ searchFormClick({
filters: tableObject.params.filters filters: tableObject.params.filters
}) })
@ -464,9 +479,11 @@ const isShowMainButton = (row, val) => {
} }
// - // -
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']
if(findIndex>-1&&findIndex<$index){ ? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return [] return []
} }
return [ return [
@ -497,7 +514,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchasereceipt-request-main:update' hasPermi: 'wms:purchasereceipt-request-main:update'
}), // }) //
// { // {
// label: '', // label: '',
// name: 'ssbq', // name: 'ssbq',
@ -535,14 +552,14 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { } else if (val == 'edit') {
// //
openForm('update', row) openForm('update', row)
} else if(val == 'ssbq'){ } else if (val == 'ssbq') {
// //
detatableData.params = { detatableData.params = {
masterId:row.masterId masterId: row.masterId
} }
genLabelId.value = row.masterId genLabelId.value = row.masterId
await getDetailList() await getDetailList()
formLabelRef.value.open('create', row, null,'createLabel')// createLabel formLabelRef.value.open('create', row, null, 'createLabel') // createLabel
} else if (val == 'point') { } else if (val == 'point') {
// //
labelPrint(row) labelPrint(row)
@ -555,25 +572,25 @@ const openForm = async (type: string, row?: number) => {
originTableData.value = [] // originTableData.value = [] //
tableData.value = [] // tableData.value = [] //
isShowButton.value = true isShowButton.value = true
if(type == 'create'){ if (type == 'create') {
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') { if (item.field == 'supplierCode') {
item.componentProps.disabled = true item.componentProps.disabled = true
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
} }
if(item.field == 'purchaseReceiptRecordNumber'){ if (item.field == 'purchaseReceiptRecordNumber') {
item.componentProps.disabled = true item.componentProps.disabled = true
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
} }
}) })
} }
if(type == 'update'){ if (type == 'update') {
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') { if (item.field == 'supplierCode') {
item.componentProps.disabled = true item.componentProps.disabled = true
item.componentProps.isSearchList = false item.componentProps.isSearchList = false
} }
if(item.field == 'purchaseReceiptRecordNumber'){ if (item.field == 'purchaseReceiptRecordNumber') {
item.componentProps.disabled = true item.componentProps.disabled = true
item.componentProps.isSearchList = false item.componentProps.isSearchList = false
} }
@ -588,11 +605,16 @@ const { wsCache } = useCache()
const detailRef = ref() const detailRef = ref()
const purchaseReceiptRecordNumberRef = ref() const purchaseReceiptRecordNumberRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber; purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
PurchasereturnRequestDetail.allSchemas.tableColumns = PurchasereturnRequestDetail.allSchemas.tableColumns.filter(item=>item.field!='inventoryBalance') PurchasereturnRequestDetail.allSchemas.tableColumns =
detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain') PurchasereturnRequestDetail.allSchemas.tableColumns.filter(
(item) => item.field != 'inventoryBalance'
)
detailRef.value.openDetail(row, titleName, titleValue, 'requestPurchasereturnMain')
} }
/** 关闭按钮操作 */ /** 关闭按钮操作 */
@ -603,7 +625,8 @@ const handleClose = async (id: number) => {
await PurchasereturnRequestMainApi.closePurchasereturnRequestMain(id) await PurchasereturnRequestMainApi.closePurchasereturnRequestMain(id)
message.success(t('common.closeSuccess')) message.success(t('common.closeSuccess'))
await getList() await getList()
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -616,7 +639,8 @@ const handleReAdd = async (id: number) => {
await PurchasereturnRequestMainApi.reAddPurchasereturnRequestMain(id) await PurchasereturnRequestMainApi.reAddPurchasereturnRequestMain(id)
message.success(t('common.reAddSuccess')) message.success(t('common.reAddSuccess'))
await getList() await getList()
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -629,7 +653,8 @@ const handleAgree = async (id: number) => {
await PurchasereturnRequestMainApi.agreePurchasereturnRequestMain(id) await PurchasereturnRequestMainApi.agreePurchasereturnRequestMain(id)
message.success(t('common.agreeSuccess')) message.success(t('common.agreeSuccess'))
await getList() await getList()
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -642,7 +667,8 @@ const handleRefused = async (id: number) => {
await PurchasereturnRequestMainApi.refusedPurchasereturnRequestMain(id) await PurchasereturnRequestMainApi.refusedPurchasereturnRequestMain(id)
message.success(t('common.refusedSuccess')) message.success(t('common.refusedSuccess'))
await getList() await getList()
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -655,7 +681,8 @@ const handleHandle = async (id: number) => {
await PurchasereturnRequestMainApi.handlePurchasereturnRequestMain(id) await PurchasereturnRequestMainApi.handlePurchasereturnRequestMain(id)
message.success(t('common.handleSuccess')) message.success(t('common.handleSuccess'))
await getList() await getList()
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -680,7 +707,9 @@ const handleExport = async () => {
await message.exportConfirm() await message.exportConfirm()
// //
exportLoading.value = true exportLoading.value = true
const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(tableObject.params) const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(
tableObject.params
)
download.excel(data, '采购退货申请主.xlsx') download.excel(data, '采购退货申请主.xlsx')
} catch { } catch {
} finally { } finally {
@ -698,13 +727,13 @@ PurchasereturnRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
const tableData = ref([]) const tableData = ref([])
const originTableData = ref([]) const originTableData = ref([])
const searchTableRef = ref() const searchTableRef = ref()
// //
const handleAddTable = () => { const handleAddTable = () => {
const subTableDFata = originTableData.value.filter(
const subTableDFata = originTableData.value.filter(item=> !tableData.value.find(item1=>item1.id == item.id)) (item) => !tableData.value.find((item1) => item1.id == item.id)
if(subTableDFata.length==0){ )
if (subTableDFata.length == 0) {
message.warning('暂无可选择数据!') message.warning('暂无可选择数据!')
return return
} }
@ -718,7 +747,7 @@ const handleAddTable = () => {
loading: false, loading: false,
// //
pageSize: subTableDFata.length, pageSize: subTableDFata.length,
params:null, params: null,
// //
sort: { sort: {
order: '', // order: '', //
@ -728,7 +757,7 @@ const handleAddTable = () => {
total: subTableDFata.length, total: subTableDFata.length,
// //
tableList: subTableDFata, tableList: subTableDFata,
currentRow:null currentRow: null
} }
const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns
@ -736,7 +765,7 @@ const handleAddTable = () => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
searchTableRef.value.openData("采购收货记录单号",tableObject,{tableColumns},true) searchTableRef.value.openData('采购收货记录单号', tableObject, { tableColumns }, true)
// searchTableRef.value.open( // searchTableRef.value.open(
// ('', // ('',
// // _searchTableAllSchemas, // // _searchTableAllSchemas,
@ -750,7 +779,6 @@ const handleAddTable = () => {
// ) // )
// ) // )
// console.log(subTableDFata) // console.log(subTableDFata)
// const {tableObject, tableMethods } = useTable({ // const {tableObject, tableMethods } = useTable({
// getListApi: getPage.value // // getListApi: getPage.value //
@ -799,12 +827,12 @@ const handleAddTable = () => {
} }
const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => {
console.log(val) console.log(val)
tableData.value = [...tableData.value,...val] tableData.value = [...tableData.value, ...val]
} }
// //
const handleDeleteTable = (item, index, formRef) => { const handleDeleteTable = (item, index, formRef) => {
let itemIndex = tableData.value.indexOf(item) let itemIndex = tableData.value.indexOf(item)
if(itemIndex>-1){ if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1) tableData.value.splice(itemIndex, 1)
} }
if (tableData.value.length == 0) { if (tableData.value.length == 0) {
@ -814,11 +842,10 @@ const handleDeleteTable = (item, index, formRef) => {
item.componentProps.disabled = false item.componentProps.disabled = false
} }
}) })
} }
} }
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter((item) => !selection.includes(item))
if (tableData.value.length == 0) { if (tableData.value.length == 0) {
isShowButton.value = true isShowButton.value = true
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => { PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
@ -837,31 +864,31 @@ const tableSelectionDelete = (selection) => {
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = {...submitData} let data = { ...submitData }
if(data.masterId){ if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
console.log('submitForm',tableData.value) console.log('submitForm', tableData.value)
// if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){ // if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){
// message.warning("退") // message.warning("退")
// return; // return;
// } // }
if(tableData.value.find(item=>Number(item.qty)>Number(item.inventoryBalance))){ if (tableData.value.find((item) => Number(item.qty) > Number(item.inventoryBalance))) {
message.warning("退货数量不能大于库存余额") message.warning('退货数量不能大于库存余额')
return; return
} }
data.subList = tableData.value // data.subList = tableData.value //
try { try {
if (formType === 'create') { if (formType === 'create') {
let flag = false; let flag = false
data.subList.forEach((item) => { data.subList.forEach((item) => {
if(item.qty == 0){ if (item.qty == 0) {
message.warning("数量不能为0") message.warning('数量不能为0')
flag = true; flag = true
return; return
} }
}) })
if(flag){ if (flag) {
formRef.value.formLoading = false formRef.value.formLoading = false
return return
} }
@ -881,14 +908,14 @@ const submitForm = async (formType, submitData) => {
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = false; let tag = false
if(data.qty <= 0){ if (data.qty <= 0) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
tag = false; tag = false
return tag; return tag
}else { } else {
tag = true; tag = true
return tag; return tag
} }
} }
@ -918,26 +945,26 @@ const searchFormClick = (searchData) => {
getList() // getList() //
} }
const detailOpenForm = (type, row) =>{ const detailOpenForm = (type, row) => {
console.log("type",type); console.log('type', type)
console.log("row",row); console.log('row', row)
console.log("AAAAAA",purchaseReceiptRecordNumberRef.value); console.log('AAAAAA', purchaseReceiptRecordNumberRef.value)
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => { PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
if(purchaseReceiptRecordNumberRef.value == ''){ if (purchaseReceiptRecordNumberRef.value == '') {
if (item.field == 'itemCode') { if (item.field == 'itemCode') {
item.form.componentProps.disabled = true item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true item.form.componentProps.isSearchList = true
} }
if(item.field == 'poLine'){ if (item.field == 'poLine') {
item.form.componentProps.disabled = true item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false item.form.componentProps.isSearchList = false
} }
}else{ } else {
if (item.field == 'itemCode') { if (item.field == 'itemCode') {
item.form.componentProps.disabled = true item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false item.form.componentProps.isSearchList = false
} }
if(item.field == 'poLine'){ if (item.field == 'poLine') {
item.form.componentProps.disabled = true item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true item.form.componentProps.isSearchList = true
} }
@ -945,7 +972,6 @@ const detailOpenForm = (type, row) =>{
}) })
} }
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
@ -953,35 +979,37 @@ const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAcces
const showLabelRef = ref() const showLabelRef = ref()
const labelPrint = async (row) => { const labelPrint = async (row) => {
tableObject.loading = true tableObject.loading = true
const defaultParams = {'moduleName':'purchasereturn','recordNumber':row.number} const defaultParams = { moduleName: 'purchasereturn', recordNumber: row.number }
const {tableObject:tableObjectPrint ,tableMethods} = useTable({ const { tableObject: tableObjectPrint, tableMethods } = useTable({
defaultParams, defaultParams,
getListApi: PackageApi.getLabelDetailPage // getListApi: PackageApi.getLabelDetailPage //
}) })
// //
const { getList:getListPrint } = tableMethods const { getList: getListPrint } = tableMethods
getListPrint() getListPrint()
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
showLabelRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) showLabelRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true)
} }
// --- // ---
const showLabelSuccess = async (formField, searchField, val, formRef, type, row) => { const showLabelSuccess = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val) console.log('批量打印', val)
if(val.length == 0){ if (val.length == 0) {
message.warning("请先选择要打印的数据!") message.warning('请先选择要打印的数据!')
return return
} }
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(','))
.then((res) => {
console.log(res) console.log(res)
window.open(src.value + '&asn_number=' + res) window.open(src.value + '&asn_number=' + res)
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
}) })

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

@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier' import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
@ -9,7 +9,7 @@ import { validateHanset, validateEmail } from '@/utils/validator'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index' import * as ItemPackageApi from '@/api/wms/itempackage/index'
import {validateInteger} from '@/utils/validator' import { validateInteger } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -21,15 +21,15 @@ const queryParams = {
const data = await getRequestsettingApi.getRequestsettingPage(queryParams) const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {} const requestsettingData = data?.list[0] || {}
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { tr } from 'element-plus/es/locale' import { tr } from 'element-plus/es/locale'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到 // id 转str 否则form回显匹配不到
userDept.id = userDept.id.toString() userDept.id = userDept.id.toString()
const userDeptArray:any = [userDept] const userDeptArray: any = [userDept]
/** /**
* @returns {Array} * @returns {Array}
@ -556,18 +556,10 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验 //表单校验
export const SupplierdeliverRequestMainRules = reactive({ export const SupplierdeliverRequestMainRules = reactive({
supplierCode: [ supplierCode: [{ required: true, message: '请输入供应商代码', trigger: 'blur' }],
{ required: true, message: '请输入供应商代码', trigger: 'blur' } ppNumber: [{ required: true, message: '请输入要货计划单号', trigger: 'blur' }],
], asnNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
ppNumber: [ contactName: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
{ required: true, message: '请输入要货计划单号', trigger: 'blur' }
],
asnNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactName: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [ contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' } { validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' }
@ -576,36 +568,20 @@ export const SupplierdeliverRequestMainRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' } { validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' }
], ],
carrierCode: [ carrierCode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } transferMode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
], vehiclePlateNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
transferMode: [ remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } planArriveTime: [{ required: true, message: '请输入计划到货时间', trigger: 'blur' }],
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
planArriveTime: [
{ required: true, message: '请输入计划到货时间', trigger: 'blur' }
],
// departmentCode: [ // departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' } // { required: true, message: '请输入部门', trigger: 'blur' }
// ], // ],
autoCommit: [ autoCommit: [{ required: true, message: '请选择是否自动提交', trigger: 'change' }],
{ required: true, message: '请选择是否自动提交', trigger: 'change' } autoAgree: [{ required: true, message: '请选择是否自动通过', trigger: 'change' }],
], autoExecute: [{ required: true, message: '请选择是否自动执行', trigger: 'change' }],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [ directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
], ]
// businessType: [ // businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' } // { required: true, message: '请输入业务类型', trigger: 'blur' }
// ], // ],
@ -615,7 +591,60 @@ export const SupplierdeliverRequestMainRules = reactive({
* @returns {Array} * @returns {Array}
*/ */
export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{ {
label: '订单行', label: '订单行',
field: 'poLine', field: 'poLine',
@ -640,7 +669,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:3, sortTableDefault:2,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
@ -651,24 +680,26 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
} }
}, },
{ {
label: '申请发货数量', label: '批次',
field: 'qty', field: 'batch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:4, hiddenInMain:true,
form: { tableForm: {
component: 'InputNumber', disabled: true
componentProps: {
min: 1,
precision: 6
} }
}, },
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
tableForm: { tableForm: {
type: 'InputNumber', disabled: false
min: 1,
precision: 6
} }
}, },
{ {
@ -682,7 +713,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 180 width: 180
}, },
sortTableDefault:7,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -698,73 +728,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x', valueFormat: 'x',
} }
}, },
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:8,
tableForm: {
disabled: false
}
},
{
label: '发货批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
disabled: true
}
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
isTable:false,
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '已发货数量',
field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
isTable: false,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
// { // {
// label: '替代批次', // label: '替代批次',
@ -811,7 +774,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
hiddenInMain:true, hiddenInMain:true,
field: 'expireDate', field: 'expireDate',
formatter: dateFormatter2, formatter: dateFormatter2,
isTableForm:false,
detail: { detail: {
dateFormat: 'YYYY-MM-DD' dateFormat: 'YYYY-MM-DD'
}, },
@ -838,27 +800,27 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
disabled: true disabled: true
} }
}, },
// { {
// label: '发货数量', label: '发货数量',
// field: 'qty', field: 'qty',
// sort: 'custom', sort: 'custom',
// table: { table: {
// width: 150 width: 150
// }, },
// sortTableDefault:2, sortTableDefault:2,
// form: { form: {
// component: 'InputNumber', component: 'InputNumber',
// componentProps: { componentProps: {
// min: 1, min: 1,
// precision: 6 precision: 6
// } }
// }, },
// tableForm: { tableForm: {
// type: 'InputNumber', type: 'InputNumber',
// min: 1, min: 1,
// precision: 6 precision: 6
// } }
// }, },
{ {
label: '订单数量', label: '订单数量',
field: 'orderQty', field: 'orderQty',
@ -866,7 +828,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150 width: 150
}, },
hiddenInMain:true, hiddenInMain:true,
isTableForm: false,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
@ -967,7 +928,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
sortTableDefault:5, sortTableDefault:3,
table: { table: {
width: 150 width: 150
}, },
@ -976,73 +937,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
type: 'Select' type: 'Select'
} }
}, },
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
sortTableDefault:10,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
// isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'flag',
value: 1,
isMainValue: false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled:true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'flag',
value: 1,
isMainValue: false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{ {
label: '从货主代码', label: '从货主代码',
field: 'fromOwnerCode', field: 'fromOwnerCode',
@ -1183,7 +1078,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTable: false,
hiddenInMain:true, hiddenInMain:true,
table: { table: {
width: 150 width: 150
@ -1205,14 +1099,14 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
// 批次校验 // 批次校验
const validateBatch = (rule: any, value: any, callback: any) => { const validateBatch = (rule: any, value: any, callback: any) => {
const reg = /^[_a-zA-Z0-9]+$/; const reg = /^[_a-zA-Z0-9]+$/
if (value == '' || value == undefined || value == null) { if (value == '' || value == undefined || value == null) {
callback(); callback()
} else { } else {
if (!reg.test(value)) { if (!reg.test(value)) {
callback(new Error('英文字母、数字或下划线')); callback(new Error('英文字母、数字或下划线'))
} else { } else {
callback(); callback()
} }
} }
} }
@ -1231,46 +1125,29 @@ export const SupplierdeliverRequestDetailRules = reactive({
// { required: true, message: '请输入包装号', trigger: 'blur' } // { required: true, message: '请输入包装号', trigger: 'blur' }
// ], // ],
qty:[ qty:[
{ required: true, message: '请输入发货数量1', trigger: 'change' }, { required: true, message: '请输入发货数量', trigger: 'change' },
// { validator: validateQty, trigger: 'change' },
], ],
batch: [ batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }, { required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' } { validator: validateBatch, trigger: 'change' }
], ],
produceDate: [ produceDate: [{ required: true, message: '请输入生产日期', trigger: 'blur' }],
{ required: true, message: '请输入生产日期', trigger: 'blur' }
],
packQty: [ packQty: [
{ required: true, message: '请输入包装数量', trigger: 'blur' }, { required: true, message: '请输入包装数量', trigger: 'blur' }
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
poNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
poLine: [
{ required: true, message: '请选择订单行', trigger: 'change' }
],
packUnit: [
{ required: true, message: '请选择包装规格', trigger: 'change' }
],
secondPackUnit: [
{ required: false, message: '请选择包装规格2', trigger: 'change' }
], ],
poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }],
poLine: [{ required: true, message: '请选择订单行', trigger: 'change' }],
packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }],
secondPackUnit: [{ required: false, message: '请选择包装规格2', trigger: 'change' }],
secondPackQty: [ secondPackQty: [
{ required: false, message: '请输入包装数量2', trigger: 'blur' }, { required: false, message: '请输入包装数量2', trigger: 'blur' }
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' } // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
], ],
convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }],
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
// secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}] // secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
}) })
@ -1610,21 +1487,77 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
{ {
label: '箱规格', label: '包装规格1',
field: 'packUnit', field: 'packUnit',
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
form: { table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}, },
tableForm: { tableForm: {
type: 'Select', disabled: true,
initOptions: [{ isInpuFocusShow: true,
label: '', searchListPlaceholder: '请选择包装',
value: '' searchField: 'itemCode',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isTableRowValue: true,
isMainValue:false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
} }
},{ },
label: '箱规格数量', {
label: '包装名称1',
field: 'packName',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物料数量1',
field: 'packQty', field: 'packQty',
sort: 'custom', sort: 'custom',
table: { table: {
@ -1635,26 +1568,81 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
tableForm: { tableForm: {
disabled:true
} }
}, },
{ {
label: '托规格', label: '包装规格2',
field: 'secondPackUnit', field: 'secondPackUnit',
isTable: true, isTable: true,
sort: 'custom', sort: 'custom',
form: { table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
}, },
tableForm: { tableForm: {
type: 'Select', clearable: true,
initOptions: [{ disabled: true,
label: '', isInpuFocusShow: true,
value: '' searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isTableRowValue: true,
isMainValue:false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}] }]
} }
}, },
{ {
label: '托规格数量', label: '包装名称2',
field: 'secondPackName',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物料数量2',
field: 'secondPackQty', field: 'secondPackQty',
sort: 'custom', sort: 'custom',
table: { table: {
@ -1665,10 +1653,8 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
} }
}, },
tableForm: { tableForm: {
disabled:true
} }
}, },
{ {
label: '物料名称', label: '物料名称',
field: 'itemName', field: 'itemName',
@ -1711,7 +1697,8 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}, },
])) ]))
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{ {
label: '包装号', label: '包装号',
field: 'number', field: 'number',
@ -1719,30 +1706,27 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
isSearch: true, isSearch: true,
table: { table: {
fixed: 'left' fixed: 'left'
}
}, },
}, {
{
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {}
}, },
}, {
{
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: { table: {}
},
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {}
},
}, },
{ {
label: '计量单位', label: '计量单位',
@ -1753,8 +1737,7 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
form: { form: {
component: 'SelectV2' component: 'SelectV2'
}, },
table: { table: {}
}, }
}, ])
)
]))

21
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -125,6 +125,9 @@ import * as SupplierinvoiceRecordDetailApi from '@/api/wms/supplierinvoiceRecord
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail' import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
import * as PackageApi from "@/api/wms/package";
import {getAccessToken} from "@/utils/auth";
import {getJmreportBaseUrl} from "@/utils/systemParam";
// //
defineOptions({ name: 'SupplierinvoiceRecordMain' }) defineOptions({ name: 'SupplierinvoiceRecordMain' })
@ -151,7 +154,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), //
// defaultButtons.mainLisSelectiontPointBtn(null), // defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -180,28 +183,26 @@ const buttonBaseClick = (val, item) => {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // }else { //
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
const BASE_URL = getJmreportBaseUrl()
const srcPoint = ref(BASE_URL + '/jmreport/view/970564557155733504?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{ const handleSelectionPoint = async ()=>{
let rows:any = [] let rows:any = []
selectionRows.value.forEach(item=>{ selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
}) })
if(rows.length==0){ if(rows.length==0){
message.warning('至少选择一条数据!')
return return
} }
console.log('批量打印',rows.join(',')) console.log('批量打印',rows.join(','))
// let getLoading = ElLoading.service({ window.open(srcPoint.value+'&ids='+rows.join(','))
// lock: true,
// text: 'loading...',
// background: 'rgba(0, 0, 0, 0.7)'
// })
// getLoading?.close()
} }
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
return [ return [

Loading…
Cancel
Save