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. 2
      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. 26
      src/views/eam/maintainExperience/maintainExperience.data.ts
  17. 23
      src/views/eam/repairExperience/repairExperience.data.ts
  18. 3
      src/views/eam/sparePartsInLocationRecord/index.vue
  19. 158
      src/views/eam/sparePartsInLocationRecord/sparePartsInLocationRecordMain.data.ts
  20. 5
      src/views/eam/sparepartsinlocation/index.vue
  21. 632
      src/views/qms/inspectionJob/addForm.vue
  22. 3
      src/views/wms/basicDataManage/customerManage/project/project.data.ts
  23. 2
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  24. 11
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  25. 25
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  26. 2
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  27. 3
      src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue
  28. 42
      src/views/wms/basicDataManage/systemSetting/supplierUser/supplierUser.data.ts
  29. 27
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  30. 23
      src/views/wms/countManage/count/countPlanMain/index.vue
  31. 98
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  32. 17
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  33. 1
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
  34. 1
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/containerMainRequest.data.ts
  35. 15
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  36. 13
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue
  37. 1
      src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/initialContainerMainRequest.data.ts
  38. 14
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue
  39. 1
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
  40. 34
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue
  41. 1
      src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/packageoverRequestMain.data.ts
  42. 19
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue
  43. 4
      src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/transferissueRequestMain.data.ts
  44. 35
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  45. 1
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  46. 11
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  47. 7
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  48. 82
      src/views/wms/issueManage/repleinsh/repleinshJobMain/repleinshJobMain.data.ts
  49. 9
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  50. 54
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  51. 1
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  52. 34
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  53. 1
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  54. 56
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  55. 26
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts
  56. 10
      src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue
  57. 1
      src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts
  58. 10
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue
  59. 1
      src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts
  60. 10
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue
  61. 1
      src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts
  62. 24
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue
  63. 1
      src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/productputawayAssembleRequestMain.data.ts
  64. 15
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  65. 1
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  66. 14
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  67. 1
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  68. 19
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  69. 1
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  70. 4
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  71. 14
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  72. 1
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  73. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  74. 140
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  75. 529
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  76. 19
      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}

2
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>

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
},
{
label: '入库主题',
field: 'theme',
sort: 'custom',
isSearch: true
table: {
width: 110
}
},
{
label: '入库类型',
field: 'type',
label: '备件名称',
field: 'name',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string'
isSearch: true,
table: {
width: 110
}
},
{
label: '流程状态',
field: 'status',
label: '备件类型',
field: 'classification',
sort: 'custom',
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
isSearch: false,
isForm: false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictClass: 'string'
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm: false
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm: false
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '审核时间',
field: 'approveTime',
label: '计量单位',
field: 'uom',
sort: 'custom',
formatter: dateFormatter,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
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'
isTable: true,
tableForm: {
type: 'Select'
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
{
label: '生产厂家',
field: 'brand',
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')]
}
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
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: {

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

@ -4,20 +4,16 @@ 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',
},
export const MaintainExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '经验内容',
@ -29,7 +25,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
type: 'textarea',
height: 200
}
},
}
},
{
@ -37,7 +33,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
field: 'maintainNumber',
sort: 'custom',
isSearch: true,
isForm: false,
isForm: false
},
{
label: '工单类型',
@ -47,7 +43,7 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
isTable: false,
form: {
component: 'SelectV2'
},
}
},
{
label: '来源字典',
@ -90,8 +86,6 @@ export const MaintainExperience = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
]))
}
])
)

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

@ -4,21 +4,16 @@ import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const RepairExperienceRules = reactive({
name: [required],
repairNumber: [required],
repairNumber: [required]
})
export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
},
export const RepairExperience = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '经验标题',
field: 'name',
sort: 'custom',
isSearch: true,
isSearch: true
},
{
label: '维修工单编号',
@ -26,7 +21,7 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false,
isForm: false
},
{
label: '经验内容',
@ -40,7 +35,7 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
valueHtml: '',
height: 200
}
},
}
},
{
@ -112,6 +107,6 @@ export const RepairExperience = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
]))
}
])
)

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

@ -86,7 +86,7 @@ const updataTableColumns = (val) => {
//
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SparePartsInLocationRecordMainApi.getSparePartsInLocationRecordMainPage //
getListApi: SparePartsInLocationRecordDetailApi.getSparePartsInLocationRecordDetailPage //
})
//
@ -100,7 +100,6 @@ const HeadButttondata = [
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//

158
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[]>([
export const SparePartsInLocationRecordMain = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
label: '备件编号',
field: 'sparePartsCode',
sort: 'custom',
isSearch: false,
isTable: false,
isSearch: true,
isForm: false,
isDetail:false,
table: {
width: 180,
fixed: 'left'
}
},
{
label: '编号',
field: 'number',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 110
}
},
{
label: '入库主题',
field: 'theme',
label: '备件名称',
field: 'name',
sort: 'custom',
isSearch: true,
},{
label: '入库类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.PUT_IN_TYPE,
dictClass: 'string',
table: {
width: 110
}
},
{
label: '流程状态',
field: 'status',
label: '备件类型',
field: 'classification',
sort: 'custom',
isSearch: false,
isForm:false,
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM,
dictType: DICT_TYPE.PART_CLASS,
dictClass: 'string',
},
{
label: '入库申请人',
field: 'applyer',
sort: 'custom',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select'
}
},
{
label: '审核人',
field: 'approver',
sort: 'custom',
isSearch: false,
isForm:false
label: '规格型号',
field: 'specifications',
sort: 'custom'
},
{
label: '审核内容',
field: 'approveContent',
sort: 'custom',
isSearch: false,
isForm:false
label: '存放位置',
field: 'locationCode',
sort: 'custom'
},
{
label: '审核时间',
field: 'approveTime',
label: '计量单位',
field: 'uom',
sort: 'custom',
formatter: dateFormatter,
dictType: DICT_TYPE.UOM,
dictClass: 'string',
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')]
isTable: true,
tableForm: {
type: 'Select'
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
{
label: '生产厂家',
field: 'brand',
sort: 'custom'
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom'
},
{
label: '申领数量',
field: 'applyQty',
sort: 'custom'
},
{
label: '入库时间',
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')]
sort: 'custom'
}
},
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
]))
])
)
// 备件入库子表
export const SparePartsInLocationRecordDetailRules = reactive({
number: [required],
@ -133,10 +106,11 @@ export const SparePartsInLocationRecordDetailRules = reactive({
locationCode: [required],
areaCode: [required],
sparePartsCode: [required],
applyQty: [required],
applyQty: [required]
})
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
export const SparePartsInLocationRecordDetail = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '库位编号',
field: 'locationCode',
@ -250,9 +224,7 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
]))
isSearch: true
}
])
)

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

@ -363,11 +363,6 @@ const submitForm = async (formType, data) => {
data.subList = tableData.value //
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)

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

@ -1,30 +1,93 @@
<template>
<div>
<Dialog :title="dialogTitle" v-model="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
:vLoading="formLoading">
<div class="box" style="max-height: 80vh; overflow-y: auto; padding: 0px 20px" ref="mianscroll">
<el-backtop :right="40" :bottom="100" target='.box' @click="topScrollClick"/>
<Form ref="formMainRef" :rules="rules" :schema="formSchema" :is-col="true" @opensearchTable="opensearchTable" />
<Dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:close-on-click-modal="false"
:vLoading="formLoading"
>
<div
class="box"
style="max-height: 80vh; overflow-y: auto; padding: 0px 20px"
ref="mianscroll"
>
<el-backtop :right="40" :bottom="100" target=".box" @click="topScrollClick" />
<Form
ref="formMainRef"
:rules="rules"
:schema="formSchema"
:is-col="true"
@opensearchTable="opensearchTable"
/>
<div ref="boxList">
<div class="small-title">包装列表</div>
<div style="border:1px solid #dedede;margin-bottom:20px;display: flex;">
<TableForm ref="tableFormRef" style="width:100%;" :maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns" :tableFormRules="tableFormRules"
:tableData="data.packageList" :isShowButton="false" :isShowReduceButton="false" />
<div style="border: 1px solid #dedede; margin-bottom: 20px; display: flex">
<TableForm
ref="tableFormRef"
style="width: 100%"
:maxHeight="490"
:tableFields="tableAllSchemas.tableFormColumns"
:tableFormRules="tableFormRules"
:tableData="data.packageList"
:isShowButton="false"
:isShowReduceButton="false"
/>
</div>
<el-tabs v-model="editableTabsValue" class="demo-tabs" @edit="handleTabsEdit" type="border-card"
tab-position="left" :stretch="false">
<el-tab-pane v-for="item in data.subList" :key="item.name" :label="item.processDescribe" :name="item.name" v-next-focus>
</div>
<el-tabs
v-model="editableTabsValue"
class="demo-tabs"
@edit="handleTabsEdit"
type="border-card"
tab-position="left"
:stretch="false"
>
<el-tab-pane
v-for="item in data.subList"
:key="item.name"
:label="item.processDescribe"
:name="item.name"
v-next-focus
>
<template #label>
<span class="custom-tabs-label" style="display: flex; align-items: center">
<Icon
class="mr-5px"
icon="ep:circle-check-filled"
v-if="item.isPass === true"
color="#67C23A"
style="margin-top: 4px"
/>
<Icon
class="mr-5px"
icon="ep:circle-close-filled"
v-if="item.isPass === false"
color="#ff0000"
style="margin-top: 4px"
/>
<span>{{ item.processDescribe }}</span>
</span>
</template>
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input v-model="item.processCode" placeholder="根据系统生成" :disabled="true" />
<el-input
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编号">
<el-input v-model="item.inspectionFeatureCode" placeholder="根据系统生成" :disabled="true" />
<el-input
v-model="item.inspectionFeatureCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -44,172 +107,349 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.number" placeholder="根据系统生成"
:disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" />
<el-form-item
label="描述"
prop="inspectionJobCharacteristicsUpdateReqVO.description"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.description"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验方法" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode">
<el-form-item
label="检验方法"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" disabled
placeholder="请选择检验方法" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="采样过程编码" prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" disabled
placeholder="请选择采样过程编码" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty">
<el-form-item
label="样品份数"
prop="inspectionJobCharacteristicsUpdateReqVO.sampleQty"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty" disabled
placeholder="请输入样品份数" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.sampleQty"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="每份样品量" prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize">
<el-form-item
label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
>
<div style="display: flex; width: 100%">
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize" disabled
placeholder="请输入样品份数" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否允许修改特征值" prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate">
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate" disabled />
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结果录入方式" prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式" @change="resultEntryMethodChange($event, item)" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY)"
:key="dict.value" :label="dict.label" :value="dict.value" />
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" placeholder="请选择特征类型"
@change="changeFeatureType" disabled>
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
<el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
>
<el-form-item
label="上限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定下限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定目标值"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget" :disabled="true" />
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget">
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget" :disabled="true" />
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime" placeholder="请选择开始时间" style="width: 100%" value-format="x" />
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime">
<el-date-picker v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime" placeholder="请选择结束时间" style="width: 100%" value-format="x" />
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item label="评估代码" required prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode">
<el-select v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode" placeholder="请选择评估代码"
@change="changeFeatureType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-form-item
label="评估代码"
required
prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode"
placeholder="请选择评估代码"
@change="changeFeatureType"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.EVALUATION_CODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="i"
style="border: 1px solid #dedede; border-radius: 4px; padding-top: 16px; margin-bottom: 10px;">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
style="
border: 1px solid #dedede;
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
"
>
<el-row>
<!-- 汇总录入的时候显示 -->
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="合格数量" required>
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量" type="number" />
<el-input
v-model="cur.qualifiedQuantity"
placeholder="请输入合格数量"
type="number"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
>
<el-form-item label="不合格数量" required>
<el-input v-model="cur.unqualifiedQuantity" type="number" placeholder="请输入不合格数量"/>
<el-input
v-model="cur.unqualifiedQuantity"
type="number"
placeholder="请输入不合格数量"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
>
<el-form-item label="检验值" required>
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值" type="number" />
<el-input
v-model="cur.inspectionValue"
placeholder="请输入检验值"
type="number"
@blur="inspectionValueInput(item, cur)"
/>
</el-form-item>
</el-col>
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'">
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
>
<el-form-item label="选定集" required>
<el-select v-model="cur.qualitativeCode" placeholder="请选择选定集"
@change="changeQualitativeCode($event, item, cur)">
<el-option v-for="dict in item.selectedProjectRespVOList" :key="dict.dictionaryValue"
:label="dict.dictionaryLabel" :value="dict.dictionaryValue" />
<el-select
v-model="cur.qualitativeCode"
placeholder="请选择选定集"
@change="changeQualitativeCode($event, item, cur)"
>
<el-option
v-for="dict in item.selectedProjectRespVOList"
:key="dict.dictionaryValue"
:label="dict.dictionaryLabel"
:value="dict.dictionaryValue"
/>
</el-select>
</el-form-item>
</el-col>
@ -231,10 +471,18 @@
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
</template>
</Dialog>
<Dialog title="修改名称" v-model="dialogVisibleName" width="500px" :close-on-click-modal="false">
<Dialog
title="修改名称"
v-model="dialogVisibleName"
width="500px"
:close-on-click-modal="false"
>
<div style="padding: 0px 20px">
<el-form ref="nameRef" :model="nameForm">
<el-form-item :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]" prop="name">
<el-form-item
:rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]"
prop="name"
>
<el-input v-model="nameForm.name" style="width: 240px" placeholder="请输入名称" />
</el-form-item>
</el-form>
@ -311,7 +559,7 @@
type: Array,
required: true,
default: null
},
}
})
const { t } = useI18n() //
@ -416,19 +664,28 @@
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id)
data.value.packageList = await InspectionJobPackageApi.getInspectionJobPackageList(row.id)
list.forEach((item, index) => {
// editableTabsValue.value = index + 1
editableTabsValue.value = 1
item.name = index + 1
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO
item.isPass = '' //
//
allSamplePieceSize.value += parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(6))
allSamplePieceSize.value += parseFloat(
(
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) *
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)
).toFixed(6)
)
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
if (!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) {
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 2) {
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = []
for (let i = 0; i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty); i++) {
for (
let i = 0;
i < parseInt(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty);
i++
) {
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({
inspectionValue: '', //
qualitativeCode: '', //
@ -445,10 +702,14 @@
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity: parseFloat((parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) * parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)).toFixed(6)), //
qualifiedQuantity: parseFloat(
(
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty) *
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize)
).toFixed(6)
), //
unqualifiedQuantity: '0' //
}
)
})
}
}
@ -474,7 +735,7 @@
rules.value['inspectionJobCharacteristicsUpdateReqVO.estimateCode'][0].required = false
}
})
list.forEach(item => {
list.forEach((item) => {
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime = new Date()
})
data.value.subList = list
@ -483,11 +744,13 @@
第一个包装采样数量>总数量 则显示总数量
*/
for (let i = 0; i < data.value.packageList.length; i++) {
for (let i = 0; i < data.value?.packageList?.length; i++) {
if (data.value.packageList[i].sampleAmount == null) {
if (allSamplePieceSize.value > data.value.packageList[i].amount) {
data.value.packageList[i].sampleAmount = data.value.packageList[i].amount
allSamplePieceSize.value = parseFloat((allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(6))
allSamplePieceSize.value = parseFloat(
(allSamplePieceSize.value - data.value.packageList[i].amount).toFixed(6)
)
} else {
data.value.packageList[i].sampleAmount = allSamplePieceSize.value
allSamplePieceSize.value = 0
@ -634,7 +897,9 @@
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
let isPass = data.value.packageList.some(
(cur) => parseFloat(cur.sampleAmount) > parseFloat(cur.amount)
)
if (isPass) {
message.error(`采样数量不能大于数量`)
return
@ -689,7 +954,10 @@
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
if (
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
@ -697,7 +965,10 @@
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
return (
String(cur.qualifiedQuantity).indexOf('.') > -1 ||
String(cur.unqualifiedQuantity).indexOf('.') > -1
)
}
)
)
@ -705,30 +976,33 @@
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return (
parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) !=
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
)
}
)
)
}
})
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
let isEmpty1 = arrBol.some((item) => item == true)
let isEmptyNumberList = numberList.some((item) => item == true)
let isParseFloat = parseFloatList.some((item) => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
return
}
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
return
}
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
return
}
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
return
}
if (formType.value == 'create') {
//
@ -737,8 +1011,7 @@
// /
emit('submitForm', formType.value, data.value)
}
} catch {
}
} catch {}
}
const staging = async () => {
@ -753,7 +1026,9 @@
if (data.value.packageList?.length > 0) {
const validateForm1 = await tableFormRef.value.validateForm()
if (!validateForm1) return
let isPass = data.value.packageList.some(cur => parseFloat(cur.sampleAmount) > parseFloat(cur.amount))
let isPass = data.value.packageList.some(
(cur) => parseFloat(cur.sampleAmount) > parseFloat(cur.amount)
)
if (isPass) {
message.error(`采样数量不能大于数量`)
return
@ -808,7 +1083,10 @@
)
}
//
if (item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime > item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime) {
if (
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime >
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
) {
isOutweigh.push(item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime)
}
//
@ -816,7 +1094,10 @@
parseFloatList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return String(cur.qualifiedQuantity).indexOf('.') > -1 || String(cur.unqualifiedQuantity).indexOf('.') > -1
return (
String(cur.qualifiedQuantity).indexOf('.') > -1 ||
String(cur.unqualifiedQuantity).indexOf('.') > -1
)
}
)
)
@ -824,35 +1105,37 @@
numberList.push(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.some(
(cur, key) => {
return parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
return (
parseFloat(cur.qualifiedQuantity) + parseFloat(cur.unqualifiedQuantity) !=
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty)
)
}
)
)
}
})
let isEmpty1 = arrBol.some(item => item == true)
let isEmptyNumberList = numberList.some(item => item == true)
let isParseFloat = parseFloatList.some(item => item == true)
let isEmpty1 = arrBol.some((item) => item == true)
let isEmptyNumberList = numberList.some((item) => item == true)
let isParseFloat = parseFloatList.some((item) => item == true)
if (isEmpty1) {
message.error('检验工序和检验特性有字段未填写完全')
return;
return
}
if (isOutweigh?.length > 0) {
message.error('检验特性中有开始时间大于结束时间')
return;
return
}
if (isParseFloat) {
message.error('合格数量和不合格数量之和不可以是小数')
return;
return
}
if (isEmptyNumberList) {
message.error('合格数量和不合格数量之和必须等于样品份数')
return;
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value);
message.success("暂存成功")
} catch {
return
}
await InspectionJobMainApi.stagingInspectionJobMain(data.value)
message.success('暂存成功')
} catch {}
}
/** 弹窗按钮 */
@ -1031,13 +1314,115 @@
let obj = item.selectedProjectRespVOList.find((cur) => cur.dictionaryValue == e)
cur.defectLevel = obj.defectLevel
cur.estimateCode = obj.estimateCode
//
for (
let i = 0;
i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList?.length;
i++
) {
item.isPass = true
if (
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].estimateCode ==
'2'
) {
item.isPass = false
return
}
}
}
const mianscroll = ref()
const boxList = ref()
const topScrollClick = () => {
nextTick(() => {
mianscroll.value.scrollTo({ top: 550, behavior: 'smooth' });
mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' })
})
}
const inspectionValueInput = (item, cur) => {
for ( let i = 0;i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;i++) {
item.isPass = true
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
) {
item.isPass = false
return
}
// ,
if (
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
) {
item.isPass = false
return
}
// ,
if (
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
}
}
}
</script>
<style scoped>
.small-title {
@ -1060,4 +1445,7 @@
.el-backtop {
position: absolute !important;
}
.red .el-input__inner {
color: red !important;
}
</style>

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', // 查询弹窗赋值字段

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

@ -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)
})
}

42
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',

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

@ -108,11 +108,10 @@
<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'
@ -134,14 +133,16 @@ import * as WarehouseApi from '@/api/wms/warehouse'
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 * 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 {

13
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,9 +132,14 @@ 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'
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 {

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',

34
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']
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'){
row['toInventoryStatus'] = "HOLD"
newRow['toInventoryStatus'] = "HOLD"
}else if ( routeName.value == 'HoldtookRequestMain') {
row['toInventoryStatus'] = "OK"
newRow['toInventoryStatus'] = "OK"
}else if ( routeName.value == 'HoldtoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP"
newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'OktoscrapRequestMain') {
row['toInventoryStatus'] = "SCRAP"
newRow['toInventoryStatus'] = "SCRAP"
}else if ( routeName.value == 'ScraptoholdRequestMain') {
row['toInventoryStatus'] = "HOLD"
newRow['toInventoryStatus'] = "HOLD"
}else{
row['toInventoryStatus'] = val[0]['inventoryStatus']
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)
})
}
} 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)
})
}
} 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']
}else if(formField == 'itemCode'){
row[formField] = val[0][searchField]
}else if(formField == 'itemCode'){
let res = await ItembasicApi.getQueryItemCodeInfo({itemCodes:val.map(item=>item.itemCode).join(',')})
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
},
{

140
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"
@ -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)
@ -158,11 +163,20 @@ 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) {
//
}
@ -183,10 +197,10 @@ const submitFormLabel = async (formType, submitData) => {
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
@ -213,15 +227,14 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
//
const searchTableSuccess = async (formField, searchField, val, formRef, type, row) => {
console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
console.log('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']
@ -289,7 +302,8 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
// PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
masterId: val[0]['masterId']
}).then((res) => {
})
.then((res) => {
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
@ -331,7 +345,8 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
item.tableForm.isInpuFocusShow = false
}
})
}).catch((err) => {
})
.catch((err) => {
console.log(err)
})
}
@ -465,7 +480,9 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row, $index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
@ -497,7 +514,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchasereceipt-request-main:update'
}), //
}) //
// {
// label: '',
// name: 'ssbq',
@ -588,10 +605,15 @@ 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')
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,12 +727,12 @@ 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))
const subTableDFata = originTableData.value.filter(
(item) => !tableData.value.find((item1) => item1.id == item.id)
)
if (subTableDFata.length == 0) {
message.warning('暂无可选择数据!')
return
@ -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 //
@ -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) => {
@ -846,19 +873,19 @@ const submitForm = async (formType, submitData) => {
// 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;
message.warning('数量不能为0')
flag = true
return
}
})
if (flag) {
@ -881,14 +908,14 @@ const submitForm = async (formType, submitData) => {
// /
const detailValidate = (data) => {
let tag = false;
let tag = false
if (data.qty <= 0) {
message.warning('数量必须大于0')
tag = false;
return tag;
tag = false
return tag
} else {
tag = true;
return tag;
tag = true
return tag
}
}
@ -919,9 +946,9 @@ const searchFormClick = (searchData) => {
}
const detailOpenForm = (type, row) => {
console.log("type",type);
console.log("row",row);
console.log("AAAAAA",purchaseReceiptRecordNumberRef.value);
console.log('type', type)
console.log('row', row)
console.log('AAAAAA', purchaseReceiptRecordNumberRef.value)
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
if (purchaseReceiptRecordNumberRef.value == '') {
if (item.field == 'itemCode') {
@ -945,7 +972,6 @@ const detailOpenForm = (type, row) =>{
})
}
const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
@ -953,7 +979,7 @@ 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 defaultParams = { moduleName: 'purchasereturn', recordNumber: row.number }
const { tableObject: tableObjectPrint, tableMethods } = useTable({
defaultParams,
getListApi: PackageApi.getLabelDetailPage //
@ -967,7 +993,7 @@ const labelPrint = async (row) => {
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
showLabelRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
showLabelRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true)
}
// ---
@ -975,13 +1001,15 @@ const showLabelSuccess = async (formField, searchField, val, formRef, type, row)
console.log('批量打印', val)
if (val.length == 0) {
message.warning("请先选择要打印的数据!")
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 => {
})
.catch((err) => {
console.log(err)
message.error('创建标签失败')
})

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

@ -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,7 +591,60 @@ export const SupplierdeliverRequestMainRules = reactive({
* @returns {Array}
*/
export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '订单行',
field: 'poLine',
@ -640,7 +669,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
sortTableDefault:3,
sortTableDefault:2,
form: {
componentProps: {
disabled: true
@ -651,24 +680,26 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
{
label: '申请发货数量',
field: 'qty',
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:4,
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
hiddenInMain:true,
tableForm: {
disabled: true
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
disabled: false
}
},
{
@ -682,7 +713,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 180
},
sortTableDefault:7,
form: {
component: 'DatePicker',
componentProps: {
@ -698,73 +728,6 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x',
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:8,
tableForm: {
disabled: false
}
},
{
label: '发货批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
disabled: true
}
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
isTable:false,
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '已发货数量',
field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
isTable: false,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
// {
// label: '替代批次',
@ -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,14 +1099,14 @@ 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('英文字母、数字或下划线'));
callback(new Error('英文字母、数字或下划线'))
} else {
callback();
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,28 +1487,69 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
{
label: '箱规格',
label: '包装规格1',
field: 'packUnit',
isTable: true,
sort: 'custom',
form: {
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
type: 'Select',
initOptions: [{
label: '',
value: ''
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: '箱规格数量',
field: 'packQty',
},
{
label: '包装名称1',
field: 'packName',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
@ -1639,36 +1557,104 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}
},
{
label: '托规格',
label: '物料数量1',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
}
},
tableForm: {
}
},
{
label: '包装规格2',
field: 'secondPackUnit',
isTable: true,
sort: 'custom',
form: {
table: {
width: 150,
componentProps: {
disabled: true,
isSearchList: true,
searchListPlaceholder: '请选择包装',
searchField: 'packUnit',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
type: 'Select',
initOptions: [{
label: '',
value: ''
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: '托规格数量',
field: 'secondPackQty',
label: '包装名称2',
field: 'secondPackName',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '物料数量2',
field: 'secondPackQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
}
},
tableForm: {
}
},
{
label: '物料名称',
field: 'itemName',
@ -1711,7 +1697,8 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
},
]))
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
export const SupplierdeliverRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
@ -1719,30 +1706,27 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
isSearch: true,
table: {
fixed: 'left'
},
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
},
table: {}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
},
table: {}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
},
table: {}
},
{
label: '计量单位',
@ -1753,8 +1737,7 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
form: {
component: 'SelectV2'
},
table: {
},
},
]))
table: {}
}
])
)

19
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), //
@ -184,24 +187,22 @@ const buttonBaseClick = (val, item) => {
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 [

Loading…
Cancel
Save