Browse Source

Merge branch 'master_hella' into master_hella_20240701

master_hella_20240701
陈薪名 2 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. 164
      src/views/eam/maintainExperience/maintainExperience.data.ts
  17. 205
      src/views/eam/repairExperience/repairExperience.data.ts
  18. 7
      src/views/eam/sparePartsInLocationRecord/index.vue
  19. 392
      src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts
  20. 49
      src/views/eam/sparepartsinlocation/index.vue
  21. 2028
      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. 15
      src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue
  28. 44
      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. 23
      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. 48
      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. 288
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  75. 623
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  76. 23
      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) {
delete params.isSearch
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 {
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) => {
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 (
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 (
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) => {
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
export const exportSparePartsOutLocationDetailRecord = async (params) => {
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
})
}
// 下载用户导入模板
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 TableForm from '@/components/TableForm/src/TableForm.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'
const props = defineProps({
//

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

@ -625,6 +625,9 @@ const titleNameRef = ref()
const titleValueRef = ref()
const count =ref(0)
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
if(tabRef.value){
tabRef.value.changeCurrent(0)
}
annexTableData.value = []
titleNameRef.value = titleName
titleValueRef.value = titleValue

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

@ -272,6 +272,7 @@ export default defineComponent({
}}
onBlur={(e)=>{onBlur(item.field, e)}}
onChange={(e)=>{onChange(item.field, e)}}
v-slots={{
suffix: () => (
<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])}}
onChange={(e)=>{onChange(item.field,formModel.value[item.field])}}
disabled={item?.componentProps?.enterSearch?false:true} v-slots={{
suffix: () => (
<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> -->
</ElDialog>
<div v-else class="custom-hover" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" />
<div v-else class="custom-hover custom-hover1" @click.stop="showTopSearch = !showTopSearch">
<Icon icon="ep:search" color="#ffffff"/>
<el-select
filterable
:reserve-keyword="false"
@ -170,4 +170,7 @@ defineExpose({
.w-220px {
width: 220px !important;
}
.custom-hover1{
background-color: transparent;
}
</style>

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

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

9
src/layout/components/CategoryHeader.vue

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

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

@ -62,7 +62,7 @@ onBeforeUnmount(() => {
<ElPopover :width="400" placement="bottom" trigger="click">
<template #reference>
<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>
</template>
<ElTabs v-model="activeName">

16
src/layout/components/ToolHeader.vue

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

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

@ -54,7 +54,7 @@ const toDocument = () => {
<ElDropdown class="custom-hover" :class="prefixCls" trigger="click">
<div class="flex items-center">
<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 }}
</span>
</div>
@ -62,7 +62,7 @@ const toDocument = () => {
<ElDropdownMenu>
<ElDropdownItem>
<Icon icon="ep:tools" />
<div @click="toProfile">{{ t('common.profile') }}</div>
<div @click="toProfile" >{{ t('common.profile') }}</div>
</ElDropdownItem>
<!-- <ElDropdownItem>
<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%;"
>
<ToolHeader
{/* <ToolHeader
class={[
'bg-[var(--top-header-bg-color)]',
{
'layout-border__bottom': !tagsView.value
}
]}
></ToolHeader>
></ToolHeader> */}
{tagsView.value ? (
<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(
reactive<CrudSchema[]>([
{
label: '编号',
field: 'number',
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: true,
isForm: false
isForm: false,
table: {
width: 180,
fixed: 'left'
}
},
{
label: '出库编号',
field: 'requestNumber',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
table: {
width: 110
}
},
{
label: '入库主题',
field: 'theme',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true
isSearch: true,
table: {
width: 110
}
},
{
label: '入库类型',
field: 'type',
label: '备件类型',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string'
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: false,
isForm: false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string'
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '审核人',
field: 'approver',
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isForm: false
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm: false
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
{
label: '审核时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
{
label: '入库时间',
field: 'createTime',
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: 'applyQty',
sort: 'custom'
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false
label: '出库时问',
field: 'createTime',
sort: 'custom'
}
])
)

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

@ -153,7 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
//
const Echo = []
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" />
<!-- 详情 -->
<DetailLedger
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"
/>
<Detail ref="detailRef" :isBasic="true" :allSchemas="ItemAccounts.allSchemas" />
<!-- 导入 -->
<ImportForm

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

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

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

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

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

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

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

@ -44,7 +44,7 @@
</template>
</Table>
</ContentWrap>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -86,7 +86,7 @@ const updataTableColumns = (val) => {
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SparePartsInLocationRecordMainApi.getSparePartsInLocationRecordMainPage //
getListApi: SparePartsInLocationRecordDetailApi.getSparePartsInLocationRecordDetailPage //
})
//
@ -100,12 +100,11 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'refresh') {
if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') {

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

@ -3,129 +3,102 @@ import { dateFormatter } from '@/utils/formatTime'
import * as ItemAccountsApi from '@/api/eam/itemAccounts'
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data'
// 表单校验
export const SparePartsInLocationRecordMainRules = reactive({
number: [required],
theme: [required],
type: [required],
type: [required]
})
// 备件入库主表
export const SparePartsInLocationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isSearch: false,
isTable: false,
isForm: false,
isDetail:false,
},
{
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '入库主题',
field: 'theme',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
},
{
label: '流程状态',
field: 'status',
sort: 'custom',
isSearch: false,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string',
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false,
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm:false
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm:false
},
{
label: '审核时间',
field: 'approveTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: false,
isForm: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')]
export const SparePartsInLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 180,
fixed: 'left'
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
{
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 110
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
width: 110
}
},
},
{
label: '入库时间',
field: 'createTime',
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')]
{
label: '备件类型',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
]))
{
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
},
{
label: '出库时问',
field: 'createTime',
sort: 'custom'
}
])
)
// 备件入库子表
export const SparePartsInLocationRecordDetailRules = reactive({
number: [required],
@ -133,24 +106,42 @@ export const SparePartsInLocationRecordDetailRules = reactive({
locationCode: [required],
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
applyQty: [required]
})
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
export const SparePartsInLocationRecordDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '库位编号',
field: 'locationCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -160,99 +151,80 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
searchField: 'itemNumber', // 查询弹窗赋值字段
searchTitle: '备件信息', // 查询弹窗标题
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
disabled: true
}
]
}
},
{
label: '库区编号',
field: 'areaCode',
sort: 'custom',
isSearch: false,
form: {
componentProps: {
},
tableForm: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
{
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
tableForm:{
disabled: true
}
},
{
label: '库存数量',
field: 'currentQty',
sort: 'custom',
isSearch: false,
tableForm: {
disabled: true
{
label: '库存数量',
field: 'currentQty',
sort: 'custom',
isSearch: false,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
},
isDetail: false,
isTable: false
},
form:{
componentProps:{
disabled: true
}
{
label: '申领数量',
field: 'applyQty',
sort: 'custom',
isSearch: false
},
isDetail:false,
isTable:false
},
{
label: '申领数量',
field: 'applyQty',
sort: 'custom',
isSearch: false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
isTableForm: false
},
isForm: false,
isTableForm:false
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
]))
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true
}
])
)

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

@ -132,29 +132,29 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
console.log(11, val[0])
if (type == 'tableForm') {
if (formField == 'locationCode') {
row['locationCode'] = val[0].locationNumber
row['areaCode'] = val[0].areaNumber
row['sparePartsCode'] = val[0].itemNumber
row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
}
} else {
if (formField == 'locationCode') {
setV['locationCode'] = val[0].locationNumber
setV['areaCode'] = val[0].areaNumber
setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
console.log(11, val[0])
if (type == 'tableForm') {
if (formField == 'locationCode') {
row['locationCode'] = val[0].locationNumber
row['areaCode'] = val[0].areaNumber
row['sparePartsCode'] = val[0].itemNumber
row['currentQty'] = val[0].qty
row['isRadeIn'] = val[0].isRadeIn
}
} else {
if (formField == 'locationCode') {
setV['locationCode'] = val[0].locationNumber
setV['areaCode'] = val[0].areaNumber
setV['sparePartsCode'] = val[0].itemNumber
setV['currentQty'] = val[0].qty
setV['isRadeIn'] = val[0].isRadeIn
}
formRef.setValues(setV)
})
}
formRef.setValues(setV)
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
@ -363,11 +363,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
console.log(formRef.value)
formRef.value.formLoading = true
let isHave = data.subList.some(item=>item.applyQty>item.currentQty)
if(isHave){
message.warning('申领数量不能大于库存数量')
return
}
try {
if (formType === 'create') {
await SparePartsInLocationMainApi.createSparePartsInLocationMain(data)

2028
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: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
customerCode: [
{ required: true,message: '请输入客户代码', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],

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

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

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

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

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

@ -29,7 +29,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="basicFormRef"
:isOpenSearchTable="false"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="RelegateRequestMainRules"
@ -93,15 +93,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['fromBatch'] = val[0]['batch']
row['fromPackingNumber'] = val[0]['packingNumber']
row['toBatch'] = val[0]['batch']
row['toPackingNumber'] = val[0]['packingNumber']
row['fromLocationCode'] = val[0]['locationCode']
row['inventoryStatus'] = val[0]['inventoryStatus']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['qty'] = item['qty']
newRow['fromBatch'] = item['batch']
newRow['fromPackingNumber'] = item['packingNumber']
newRow['toBatch'] = item['batch']
newRow['toPackingNumber'] = item['packingNumber']
newRow['fromLocationCode'] = item['locationCode']
newRow['inventoryStatus'] = item['inventoryStatus']
tableData.value.push(newRow)
})
} else if (formField == 'downItemCode') {
row['downItemCode'] = val[0]['code']
} 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: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -318,6 +319,7 @@ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
},
tableForm:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

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

@ -55,11 +55,11 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="SupplierUser.allSchemas" />
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/wms/supplier-user/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
<ImportForm
ref="importFormRef"
url="/wms/supplier-user/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
@ -99,7 +99,7 @@ const onInput = (field,value) => {
}
}
//
const searchTableParams = ref([
@ -184,6 +184,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'userName'){
setV['userId'] = val[0]['id']
}
formRef.setValues(setV)
})
}

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

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

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

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

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

@ -108,40 +108,41 @@
<script setup lang="ts">
import download from '@/utils/download'
import {
CountPlanMain,
CountPlanMainRules,
CountPlanDetail,
CountPlanDetailRules,
// CountPlanMain1
CountPlanMain,
CountPlanMainRules,
} from './countPlanMain.data'
import * as CountPlanMainApi from '@/api/wms/countPlanMain'
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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 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'
//
@ -410,12 +411,12 @@ const openForm = async (type: string, row?: any) => {
}
] //
row = row ? row : {}
row.dimension = 'BY_INEVNEOTY'
  CountPlanMain.allSchemas.formSchema.forEach((item) => {
    if (item.field == 'crontab') {
      item.componentProps.disabled = true
    }
  })
// row.dimension = 'BY_INEVNEOTY'
CountPlanMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'crontab') {
item.componentProps.disabled = true
}
})
formRef.value.open(type, row)
// 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
},
},
{
label: '出库事务类型',
field: 'outTransactionType',
sort: 'custom',
table: {
width: 150
},
},
{
label: '入库事务类型',
field: 'inTransactionType',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '出库事务类型',
// field: 'outTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '入库事务类型',
// field: 'inTransactionType',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '申请时间',
field: 'requestTime',
@ -200,17 +200,17 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '创建时间',
field: 'createTime',
@ -312,9 +312,9 @@ export const CountRecordMainRules = reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
interfaceType: [
{ required: true, message: '请选择接口类型', trigger: 'change' }
],
// interfaceType: [
// { required: true, message: '请选择接口类型', trigger: 'change' }
// ],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
@ -420,14 +420,14 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '盘点描述',
field: 'countDescription',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '盘点描述',
// field: 'countDescription',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '批次',
field: 'batch',
@ -533,17 +533,17 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '接口类型',
// field: 'interfaceType',
// dictType: DICT_TYPE.INTERFACE_TYPE,
// dictClass: 'string',
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '创建时间',
field: 'createTime',

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

@ -42,7 +42,7 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="false"
:isOpenSearchTable="true"
fieldTableColumn="soLine"
@success="getList"
:rules="SaleShipmentMainRules"
@ -111,11 +111,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'soLine') {
row['soLine'] = val[0]['lineNumber']
row['soNumber'] = val[0]['number']
row['itemCode'] = val[0]['itemCode']
row['projectCode'] = val[0]['projectCode']
row['uom'] = val[0]['uom']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['soLine'] = item['lineNumber']
newRow['soNumber'] = item['number']
newRow['itemCode'] = item['itemCode']
newRow['projectCode'] = item['projectCode']
newRow['uom'] = item['uom']
tableData.value.push(newRow)
})
}else if(formField == 'fromLocationCode'){
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
},
tableForm:{
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="PackageoverRequestMainRules"
:formAllSchemas="PackageoverRequestMain.allSchemas"
@ -105,19 +107,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') {
//
if (formField == 'itemCode') {
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['batch'] = val[0]['batch']
row['fromLocationCode'] = val[0]['locationCode']
row['toLocationCode'] = val[0]['locationCode']
row['fromLocationGroupCode'] = val[0]['locationGroupCode']
row['toLocationGroupCode'] = val[0]['locationGroupCode']
row['fromAreaCode'] = val[0]['areaCode']
row['toAreaCode'] = val[0]['areaCode']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromPackUnit'] = val[0]['packUnit']
row['fromPackQty'] = val[0]['packQty']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['itemCode']
newRow['uom'] = item['uom']
newRow['qty'] = item['qty']
newRow['batch'] = item['batch']
newRow['fromLocationCode'] = item['locationCode']
newRow['toLocationCode'] = item['locationCode']
newRow['fromLocationGroupCode'] = item['locationGroupCode']
newRow['toLocationGroupCode'] = item['locationGroupCode']
newRow['fromAreaCode'] = item['areaCode']
newRow['toAreaCode'] = item['areaCode']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromPackUnit'] = item['packUnit']
newRow['fromPackQty'] = item['packQty']
tableData.value.push(newRow)
})
} else if (formField == 'toPackUnit') {
row['toPackUnit'] = val[0]['packUnit']
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:{
multiple:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="packingNumber"
@success="getList"
:rules="TransferissueRequestMainRules"
:formAllSchemas="TransferissueRequestMain.allSchemas"
@ -112,12 +114,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') {
//
if (formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['packingNumber'] = item['packingNumber']
newRow['containerNumber'] = item['containerNumber']
newRow['batch'] = item['batch']
newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
newRow['itemCode'] = item['itemCode']
tableData.value.push(newRow)
})
} else {
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
},
tableForm:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber',
@ -692,7 +693,8 @@ export const TransferissueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
tableForm: {
type: 'Select'
type: 'Select',
disabled: true,
}
},
{

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

@ -60,6 +60,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onEnter="onEnter"
@onChange="onChange"
/>
<!-- 详情 -->
@ -84,6 +85,8 @@
<script setup lang="ts">
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 { IssueRequestMain,IssueRequestMainRules,IssueRequestDetail,IssueRequestDetailRules } from './issueRequestMain.data'
import * as IssueRequestMainApi from '@/api/wms/issueRequestMain'
@ -106,7 +109,16 @@ const tableColumns = ref([...IssueRequestMain.allSchemas.tableColumns,...IssueRe
const updataTableColumns = (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) => {
if (field == 'productionLineCode') {
//线
@ -120,6 +132,22 @@ const onEnter = async (field,value) => {
setV['workStationCode'] = res.list[0].code
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['toWarehouseCode'] = val[0]['code']
}
if (formField == 'workshopCode') {
//
setV['productionLineCode'] = ''
setV['workStationCode'] = ''
}
if (formField == 'productionLineCode') {
//线
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: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas"
@ -209,8 +211,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
}
} 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') {
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']

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

@ -491,6 +491,9 @@ export const ProductionreturnRequestMainRules = reactive({
workshopCode: [
{ 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[]>([
{
label: '生产线代码',
label: '标签生产线代码',
field: 'productionLineCodePackage',
sort: 'custom',
table: {
@ -1123,7 +1126,7 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive<CrudSc
}
},
{
label: '供应商代码',
label: '标签供应商代码',
field: 'supplierItemCode',
sort: 'custom',
table: {

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

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

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

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

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

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

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

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

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

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

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

@ -40,6 +40,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLine"
@submitForm="submitForm"
:isBusiness="true"
:rules="ProcessproductionRequestMainRules"
@ -54,6 +56,7 @@
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@onEnter="onEnter"
/>
<!-- 详情 -->
@ -87,6 +90,8 @@
import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
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 ProcessproductionRequestDetailApi from '@/api/wms/processproductionRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -109,7 +114,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
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'){
row['processCode']=val[0]['code']
@ -226,7 +236,9 @@ const handleClose = async (id: number) => {
message.success(t('common.closeSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 重新添加按钮操作 */
@ -238,7 +250,9 @@ const handleReAdd = async (id: number) => {
message.success(t('common.reAddSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 提交按钮操作 */
@ -250,7 +264,9 @@ const handleSubmit = async (id: number) => {
message.success(t('common.submitSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 审批驳回按钮操作 */
@ -262,7 +278,9 @@ const handleRefused = async (id: number) => {
message.success(t('common.refusedSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 审批通过按钮操作 */
@ -274,7 +292,9 @@ const handleAgree = async (id: number) => {
message.success(t('common.agreeSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 处理按钮操作 */
@ -286,7 +306,9 @@ const handleHandle = async (id: number) => {
message.success(t('common.handleSuccess'))
tableObject.loading = false
await getList()
} catch {}
} catch {
tableObject.loading = false
}
}
/** 添加/修改操作 */
@ -428,6 +450,26 @@ const handleDeleteTable = (item, index) => {
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) => {
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({
itemCode: [{ required: true, message: '物料代码不能为空', trigger: 'change' }],
completedQuantity: [{ required: true, message: '完工数量不能为空', trigger: 'change' }],
scrapQuantity: [{ required: true, message: '报废数量不能为空', trigger: 'change' }],
completedQuantity: [
{ 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
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
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 {
const setV = {}
if(formField == 'workshop'){

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
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 {
const setV = {}
if(formField == 'workshop'){

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas"
@ -114,8 +116,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// }).catch(err =>{
// console.log(err);
// })
row[formField] = val[0][searchField]
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 {
const setV = {}
if(formField == 'workshop'){

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductputawayRequestMainRules"
:formAllSchemas="ProductputawayRequestMain.allSchemas"
@ -87,7 +89,7 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa
import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
//
defineOptions({ name: 'ProductputawayRequestMain' })
const message = useMessage() //
@ -108,14 +110,18 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['itemCode']
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow['poLine'] = item['itemCode']
newRow['packingNumber'] = item['packingNumber']
newRow['containerNumber'] = item['containerNumber']
newRow['batch'] = item['batch']
newRow['uom'] = item['uom']
newRow['inventoryStatus'] = item['inventoryStatus']
newRow['fromLocationCode'] = item['locationCode']
tableData.value.push(newRow)
})
} else {
const setV = {}
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
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -201,15 +203,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') {
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
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)
})
}
//
row[formField] = val[0][searchField]
} else {
const setV = {}
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
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -202,15 +204,23 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if(formField == 'packUnit'){
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') {
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
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)
})
}
//
row[formField] = val[0][searchField]
} else {
const setV = {}
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
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="productionLineCode"
@success="getList"
:rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -140,6 +142,7 @@ import {
import { getJmreportBaseUrl } from '@/utils/systemParam'
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() //
@ -187,21 +190,31 @@ const updataTableColumns = (val) => {
//
const searchTableSuccess = async (formField, searchField, val, formRef, type, row ) => {
console.log(formField, searchField, val, formRef, type, row)
nextTick(async () => {
if (type == 'tableForm') {
if (formField == 'secondPackUnit') {
row['secondPackUnit'] = val[0]['packUnit']
row['secondPackQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if(formField == 'itemCode'){
let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')})
if(res.length>0){
row['uom'] = res[0]['uom']
}
row[formField] = val[0][searchField]
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 {
const setV = {}
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
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码',
searchField: 'code',

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

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

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

@ -42,6 +42,8 @@
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
@success="getList"
:rules="ProductscrapRequestMainRules"
:formAllSchemas="ProductscrapRequestMain.allSchemas"
@ -83,6 +85,7 @@
<!-- BOM弹窗列表 -->
<BasicForm
ref="detailBomRef"
@success="getList"
:tableAllSchemas="ProdcutscrapBomScrap.allSchemas"
:tableFormRules="ProdcutscrapBomScrapRules"
@ -118,7 +121,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle"
import * as BomApi from "@/api/wms/bom";
//
//
defineOptions({ name: 'ProductscrapRequestMain' })
const message = useMessage() //
@ -300,8 +303,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
}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 == 'processCode'){
row['processCode'] = val[0]['code']
}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
},
tableForm:{
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段

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

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

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

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

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

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

23
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 { CACHE_KEY, useCache } from '@/hooks/web/useCache'
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' })
@ -151,7 +154,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-record-main:export'}), //
// defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -180,28 +183,26 @@ const buttonBaseClick = (val, item) => {
getList()
}
} else if (val == 'filtrate') { //
} else { //
}else { //
console.log('其他按钮', item)
}
}
const BASE_URL = getJmreportBaseUrl()
const srcPoint = ref(BASE_URL + '/jmreport/view/970564557155733504?token=' + getAccessToken())
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.id)]
})
if(rows.length==0){
message.warning('至少选择一条数据!')
return
}
console.log('批量打印',rows.join(','))
// let getLoading = ElLoading.service({
// lock: true,
// text: 'loading...',
// background: 'rgba(0, 0, 0, 0.7)'
// })
// getLoading?.close()
window.open(srcPoint.value+'&ids='+rows.join(','))
}
// -
const butttondata = (row,$index) => {
return [
@ -310,4 +311,4 @@ onMounted(async () => {
color:var(--el-color-danger);
font-weight:700;
}
</style>
</style>

Loading…
Cancel
Save