Browse Source

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

master_hella_20240701
yufei0306 11 months ago
parent
commit
cc953111ee
  1. 113
      src/api/mes/workstation/index.ts
  2. 59
      src/api/wms/agvLocationrelation/index.ts
  3. 65
      src/api/wms/mesBarCode/index.ts
  4. 2
      src/utils/validator.ts
  5. 681
      src/views/mes/workstation/components/Detail.vue
  6. 160
      src/views/mes/workstation/components/TableHead.vue
  7. 113
      src/views/mes/workstation/index.vue
  8. 60
      src/views/mes/workstation/workstation.data.ts
  9. 151
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  10. 267
      src/views/wms/agvManage/agvLocationrelation/index.vue
  11. 1
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  12. 13
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  13. 61
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  14. 62
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  15. 39
      src/views/wms/inventoryManage/balance/balance.data.ts
  16. 244
      src/views/wms/mes/mesBarCode/index.vue
  17. 174
      src/views/wms/mes/mesBarCode/mesBarCode.data.ts
  18. 116
      src/views/wms/productionManage/productredress/productredressJobMain/index.vue
  19. 578
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  20. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  21. 194
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  22. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  23. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  24. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  25. 15
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

113
src/api/mes/workstation/index.ts

@ -48,8 +48,7 @@ export const exportWorkstation = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' })
}
// 查询班组列表
}// 查询班组列表
export const getTeamPage = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
@ -61,6 +60,35 @@ export const getTeamPage = async (params) => {
return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params })
}
}
// 查询选择班组列表
export const checkTeamPageList = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/team/senior', data })
} else {
return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params })
}
}
// 添加班组关联
export const createTeamRelation = async (workstationCode,teamCodes:string[]) => {
const data = {
workstationCode : workstationCode,
teamCodes : teamCodes
}
return await request.post({ url: `/mes/team/createRelation`, data })
}
// 删除班组关联
export const deleteTeamRelation = async (workstationCode,teamCodes:string[]) => {
const data = {
workstationCode : workstationCode,
teamCodes : teamCodes
}
return await request.post({ url: `/mes/team/deleteRelation`, data })
}
export const getEquipmentPage = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
@ -72,6 +100,35 @@ export const getEquipmentPage = async (params) => {
return await request.get({ url: `/mes/equipment/pageListByWorkstationCode`, params })
}
}
// 查询选择设备列表
export const checkEquipmentPageList = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/equipment/senior', data })
} else {
return await request.get({ url: `/mes/equipment/pageCheckListByWorkstationCode`, params })
}
}
// 添加设备关联
export const createEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => {
const data = {
workstationCode : workstationCode,
equipmentCodes : equipmentCodes
}
return await request.post({ url: `/mes/team/createRelation`, data })
}
// 删除设备关联
export const deleteEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => {
const data = {
workstationCode : workstationCode,
equipmentCodes : equipmentCodes
}
return await request.post({ url: `/mes/team/deleteRelation`, data })
}
export const getProcessPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -81,6 +138,32 @@ export const getProcessPage = async (params) => {
return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params })
}
}
export const checkProcessPageList = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params })
}
}
// 添加工序关联
export const createProcessRelation = async (workstationCode,processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/createRelation`, data })
}
// 删除工序关联
export const deleteProcessRelation = async (workstationCode,processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/deleteRelation`, data })
}
export const getProductionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
@ -90,3 +173,29 @@ export const getProductionPage = async (params) => {
return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params })
}
}
export const checkProductionPageList = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params })
}
}
// 添加产品关联
export const createProductionRelation = async (workstationCode,productionCodes:string[]) => {
const data = {
workstationCode : workstationCode,
productionCodes : productionCodes
}
return await request.post({ url: `/mes/production-process/createRelation`, data })
}
// 删除产品关联
export const deleteProductionRelation = async (workstationCode,productionCodes:string[]) => {
const data = {
workstationCode : workstationCode,
productionCodes : productionCodes
}
return await request.post({ url: `/mes/production-process/deleteRelation`, data })
}

59
src/api/wms/agvLocationrelation/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface AgvLocationrelationVO {
id: number
reqCode: string
positionCode: string
positionArea: string
wmsArea: string
wmsPosition: string
available: string
remark: string
}
// 查询AGV库位转换列表
export const getAgvLocationrelationPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/agv-locationrelation/senior', data })
} else {
return await request.get({ url: `/wms/agv-locationrelation/page`, params })
}
}
// 查询AGV库位转换详情
export const getAgvLocationrelation = async (id: number) => {
return await request.get({ url: `/wms/agv-locationrelation/get?id=` + id })
}
// 新增AGV库位转换
export const createAgvLocationrelation = async (data: AgvLocationrelationVO) => {
return await request.post({ url: `/wms/agv-locationrelation/create`, data })
}
// 修改AGV库位转换
export const updateAgvLocationrelation = async (data: AgvLocationrelationVO) => {
return await request.put({ url: `/wms/agv-locationrelation/update`, data })
}
// 删除AGV库位转换
export const deleteAgvLocationrelation = async (id: number) => {
return await request.delete({ url: `/wms/agv-locationrelation/delete?id=` + id })
}
// 导出AGV库位转换 Excel
export const exportAgvLocationrelation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/agv-locationrelation/export-excel-senior', data })
} else {
return await request.download({ url: `/wms/agv-locationrelation/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/agv-locationrelation/get-import-template' })
}

65
src/api/wms/mesBarCode/index.ts

@ -0,0 +1,65 @@
import request from '@/config/axios'
export interface MesBarCodeVO {
id: number
plat: number
counter: string
sign: string
option: string
lowerLim: string
upperLimit: string
itac: string
type: string
lengthBc: number
posMat: string
lengthMat: number
posRevlv: string
partNumber: string
packLabel: string
oesLabel: string
checkRvl: string
days: number
available: string
remark: string
}
// 查询生产条码清单列表
export const getMesBarCodePage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/mes-bar-code/senior', data })
} else {
return await request.get({ url: `/wms/mes-bar-code/page`, params })
}
}
// 查询生产条码清单详情
export const getMesBarCode = async (id: number) => {
return await request.get({ url: `/wms/mes-bar-code/get?id=` + id })
}
// 新增生产条码清单
export const createMesBarCode = async (data: MesBarCodeVO) => {
return await request.post({ url: `/wms/mes-bar-code/create`, data })
}
// 修改生产条码清单
export const updateMesBarCode = async (data: MesBarCodeVO) => {
return await request.put({ url: `/wms/mes-bar-code/update`, data })
}
// 删除生产条码清单
export const deleteMesBarCode = async (id: number) => {
return await request.delete({ url: `/wms/mes-bar-code/delete?id=` + id })
}
// 导出生产条码清单 Excel
export const exportMesBarCode = async (params) => {
return await request.download({ url: `/wms/mes-bar-code/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/mes-bar-code/get-import-template' })
}

2
src/utils/validator.ts

@ -729,7 +729,7 @@ function trim(str) {
//校验只可输入大小写字母及数字
export function validateYS(rule, value, callback) {
if (value) {
const regs = /^[a-zA-Z0-9-_]+$/
const regs = /^[a-zA-Z0-9-_.]+$/
if(regs.test(value)){
callback()
} else {

681
src/views/mes/workstation/components/Detail.vue

@ -0,0 +1,681 @@
<template>
<div>
<el-drawer
v-model="isShowDrawer"
title="详情"
direction="rtl"
size="80%"
v-loading="detailLoading"
>
<template #header>
<div class="font-size-18px">
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span>
</div>
</template>
<ContentWrap v-if="!isBasic">
<Descriptions
:data="detailData"
labelClassName="label-class-name"
label-align="left"
direction="vertical"
:column="8"
:schema="allSchemas.detailSchema"
:columns="2"
width="200px"
/>
</ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas"
/>
<!-- 默认单表展现 -->
<Descriptions
v-if="isBasic && !tabsExtend"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
/>
<!-- 单表切换tabs 展现table -->
<Table
v-if="isBasic && tabsExtend"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<!-- <template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template> -->
</Table>
<Table
v-if="!isBasic && fromeWhere != 'countPlan'"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:loading="tableObjectRef.loading"
:pagination="{ total: tableObjectRef.total }"
v-model:pageSize="tableObjectRef.pageSize"
v-model:currentPage="tableObjectRef.currentPage"
>
<template #photos="{ row }">
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div>
</template>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
<DetailTable
v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer"
:columns="detailAllSchemasRef.tableColumns"
:data="tableObjectRef.tableList"
:allList="allList"
:countScopeType="countScopeType"
:key="updateKey"
>
<template #action="{ row }">
<ButtonBase
:Butttondata="buttondata"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</DetailTable>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件组件 -->
<Annex
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
/>
<!-- 备注组件 -->
<Remarks
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
/>
<!-- 变更记录组件 -->
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" />
</ContentWrap>
</div>
</el-drawer>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="submitForm"
:rules="detailAllSchemasRules"
:formAllSchemas="detailAllSchemas"
:isBusiness="false"
:apiUpdate="apiUpdate"
:apiCreate="apiCreate"
:fromeWhere="fromeWhere"
:isDetail="true"
@searchTableSuccess="searchTableSuccess"
:detailData="detailData"
@submitForm="submitForm"
@selectChangeDetail="selectChangeDetail"
:formTypeDetail="formTypeDetail"
:countPlanAllList="countPlanAllList"
@onChange="detailBasicFormOnChange"
@onBlur="onBlur"
@formFormDateChange="formFormDateChange"
/>
</div>
</template>
<script lang="ts" setup>
import Annex from '@/components/Annex/src/Annex.vue'
import Remarks from '@/components/Remarks/src/Remarks.vue'
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue'
import Tabs from '@/components/Tabs/src/Tabs.vue'
import * as RemarkApi from '@/api/wms/remark'
import * as FileApi from '@/api/wms/file'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from './TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
defineOptions({ name: 'Detail' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
routeName.value = routeName.value.substring(0, routeName.value.length - 4) + 'Detail'
const updateKey = ref(0)
const addRef = ref()
const props = defineProps({
//
tabs: {
type: Object,
required: true,
default: null
},
//
isBasic: {
type: Boolean,
required: false,
default: false
},
//
allSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemas: {
type: Object,
required: true,
default: null
},
//
detailAllSchemasRules: {
type: Object,
required: true,
default: null
},
// API
apiCreate: {
type: Function,
required: false,
default: null
},
// API
apiUpdate: {
type: Function,
required: false,
default: null
},
// API
apiPage: {
type: Function,
required: false,
default: null
},
// API
apiDelete: {
type: Function,
required: false,
default: null
},
//
detailValidate: {
type: Function,
required: false,
default: null
},
// countPlan
fromeWhere: {
type: String,
required: false,
default: ''
},
//
allList: {
type: Object,
required: true,
default: null
},
//
countScopeType: {
type: Array,
required: false,
default: null
},
//
formTypeDetail: {
type: String,
required: false,
default: 'InputString'
},
//
countPlanAllList: {
type: Array,
required: false,
default: null
},
//
buttondataTable: {
type: Array,
required: false,
default: ()=>{
return []
}
},
// tabs table false
tabsExtend: {
type: Boolean,
required: false,
default: false
},
// tableObject
tableObjectExtend: {
type: Array,
required: false,
default: null
},
//
detailButtonIsShowFilter:{
type: Boolean,
required: false,
default: true
},
//
detailButtonIsShowAdd:{
type: Boolean,
required: false,
default: true
},
//
detailButtonIsShowEdit:{
type: Boolean,
required: false,
default: true
},
//
detailButtonIsShowDelete:{
type: Boolean,
required: false,
default: true
}
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
if (props.isBasic == true) {
if (tabsList.value && tabsList.value.length > 0) {
tabsList.value.unshift({
label: '详情',
prop: 'Detail'
})
}
} else {
if (tabsList.value && tabsList.value.length > 0) {
} else {
tabsList.value = [
{
label: '明细',
prop: 'Detail'
}
]
}
}
if (tabsList.value) {
}
//
const annexData = reactive({
annexList: []
})
//
const remarksData = reactive({
remarksList: [],
data: {}
})
//
const changeRecordData = reactive({
changeRecordList: []
})
const detailData = ref({}) //
//
const getFileList = async () => {
detailLoading.value = true
try {
annexData.annexList = await FileApi.getFileList(remarksData.data)
} finally {
detailLoading.value = false
}
}
/** 添加附件 */
const handleAnnexSuccess = () => {
getFileList()
getChangeRecordList()
}
//
const deleteAnnexSuccess = async () => {
getFileList()
getChangeRecordList()
}
// Tabs
const current = ref(0)
const change = (item, index) => {
current.value = index
emit('changeTabs', item)
}
//
const masterParmas = ref({
masterId: '', //id
number: '', //
status: '' //
})
//
const HeadButttondata = ref()
// -
const buttondata = ref()
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
const titleValueRef = ref()
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName
titleValueRef.value = titleValue
remarksData.data = {
tableId: row.id,
tableName: tableName
}
//
if (!props.isBasic) {
// id
masterParmas.value.masterId = row.id
masterParmas.value.number = row.number
masterParmas.value.status = row.status
tableObjectRef.value.params = {
masterId: row.id
}
await getList()
}
isShowDrawer.value = true
if (row) {
detailLoading.value = true
try {
detailData.value = row
getRemarkList()
getFileList()
getChangeRecordList()
//
let detailButtonFilter: any = []
let detailButtonAdd: any = []
if (props.detailButtonIsShowFilter) {
//
detailButtonFilter = [
defaultButtons.defaultFilterBtn(null)
]
}
if (props.detailButtonIsShowAdd) {
//
detailButtonAdd = [
defaultButtons.defaultAddBtn({
hide: isShowMainButton(row, ['1'])
})
]
}
HeadButttondata.value = [...detailButtonFilter,...detailButtonAdd]
let detailButtonEdit: any = []
let detailButtonDelete: any = []
if (props.detailButtonIsShowEdit) {
//
detailButtonEdit = [
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1'])
})
]
}
if (props.detailButtonIsShowDelete) {
//
detailButtonDelete = [
defaultButtons.mainListDeleteBtn({
hide: isShowMainButton(row, ['1'])
})
]
}
buttondata.value = [...detailButtonEdit,...detailButtonDelete,...props.buttondataTable]
} finally {
detailLoading.value = false
}
}
}
defineExpose({ openDetail, formRef }) // open
//
const getRemarkList = async () => {
detailLoading.value = true
try {
remarksData.remarksList = await RemarkApi.getRemarkPage(remarksData.data)
} finally {
detailLoading.value = false
}
}
//
const remarksSubmitScuess = async (remark) => {
detailLoading.value = false
getRemarkList()
getChangeRecordList()
}
//
const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data)
}
const tableObjectRef = ref()
const tableMethodsRef = ref()
const detailAllSchemasRef = ref()
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
detailAllSchemasRef.value = props.detailAllSchemas
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const { getList } = tableMethodsRef.value
//
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
//
// const updataTableColumns = (val) => {
// detailAllSchemas.tableColumns.value = val
// }
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
} else {
emit('tableFormButton',val, row)
}
}
/** 添加/修改操作 */
const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value)
emit('detailOpenForm', type, row)
}
// form
const submitForm = async (formType, data) => {
try {
// detailValidate
const rs = (await props.detailValidate) ? await props.detailValidate(data) : true
if (!rs) return
if (formType === 'create') {
await props.apiCreate(data)
message.success(t('common.createSuccess'))
} else {
await props.apiUpdate(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
await getList()
updateKey.value += 1
} finally {
formRef.value.formLoading = false
}
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const emit = defineEmits([
'searchTableSuccessDetail',
'changeTabs',
'selectChangeDetail',
'detailOpenForm',
'tableFormButton',
'openImage',
'onBlur',
'detailBasicFormOnChange',
'formFormDateChange'
])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await props.apiDelete(id)
tableObject.loading = false
message.success(t('common.delSuccess'))
//
await getList()
updateKey.value += 1
} catch {}
}
//
const searchFormClick = async (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params = {
isSearch: true,
filters: searchData.filters
? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
}
detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
await getList()
updateKey.value += 1
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
// ? searchData.filters
// : [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }]
// }
// getList() //
}
//
const selectChangeDetail = (field, val) => {
emit('selectChangeDetail', field, val)
}
//
const openImage=(item)=>{
emit('openImage', item)
}
/**
* 监听改变事件
* @param field 当前操作字段
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
}
/**
* 监听失焦事件
* @param field 当前操作字段
* @param e
*/
const onBlur = (field, e) => {
emit('onBlur', field, e)
}
//
const formFormDateChange = (field, val,row, index) => {
emit('formFormDateChange', field, val,row, index)
}
//
watch(
() => props.apiPage,
() => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage //
})
tableObject.params.masterId = masterParmas.value.masterId
detailAllSchemasRef.value = props.detailAllSchemas
if (props.tableObjectExtend) {
props.tableObjectExtend.forEach(item => {
tableObject.params[item.key] = item.value
})
}
tableObjectRef.value = tableObject
tableMethodsRef.value = tableMethods
const { getList } = tableMethods
getList()
}
)
</script>
<style lang="scss">
.el-drawer__body {
background: #f5f5f5 !important;
}
::v-deep(.label-class-name) {
color: #dedede;
}
</style>
<style scoped lang="scss"></style>

160
src/views/mes/workstation/components/TableHead.vue

@ -0,0 +1,160 @@
<template>
<div class="tableNavBtnsContent" ref="tableNavBtnsContent_Ref">
<div class="searchBox">
<div class="tableNavLeftBtns">
<ButtonBase
:Butttondata="buttonsLeft"
@button-base-click="buttonBaseClick"
/>
</div>
<div class="tableNavRightBtns">
<!-- 右侧按钮 -->
<ButtonBase :Butttondata="buttonsRight" @button-base-click="buttonBaseClick" @updata-table-columns="updataTableColumns"
:allSchemas="allSchemas" ref="rowDropRef"/>
</div>
</div>
<slot></slot>
</div>
<!-- 字段设置弹窗 -->
<!-- <rowDrop
ref="rowDropRef"
@updata-table-columns="updataTableColumns"
:allSchemas="allSchemas"
/> -->
<!-- 高级筛选 -->
<SearchHigh
ref="searchHigh_Ref"
class="searchHighClass"
:routeName="routeName"
:masterId="masterId"
:showPrimaryBaseButton="false"
@search-form-click="searchFormClick"
:isHighExcludePrimary="false"
:primarySearchCustomButton="[]"
:highSearchCustomButton="[]"
:allSchemas="allSchemas"
/>
</template>
<script setup>
import ButtonBase from '@/components/XButton/src/ButtonBase.vue'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import rowDrop from "@/components/rowDrop/index.vue"
const props = defineProps({
HeadButttondata: {
type: Array,
default: () => {
return []
}
},
// name
routeName: {
type: String,
default: ''
},
//
masterId: {
type: String,
default: ''
},
allSchemas: {
type: Object,
default: null
}
})
const buttonsLeft = ref([])
const buttonsRight = ref([])
const tableNavBtnsContent_Ref = ref()
//
const updataTableColumns = (val) => {
emit('updataTableColumns', val)
}
// const defaultButtons = inject('global').defaultButtons
//
const buttonsLeftOrRight = () => {
buttonsRight.value = []
buttonsLeft.value = []
// ()
// let _primarySearchOption = primarySearch[props.vueName]
// let _highSearchOption = highSearch[props.vueName]
// if(_primarySearchOption || _highSearchOption){
// buttonsRight.value.push(defaultButtons.defaultFilterBtn())
// }
//
props.HeadButttondata.forEach(item=>{
if(item.float && item.float == 'right'){
buttonsRight.value.push(item)
}else{
buttonsLeft.value.push(item)
}
})
}
buttonsLeftOrRight()
watch(
() => props.HeadButttondata,
() => {
buttonsLeftOrRight()
}
)
//
const emit = defineEmits([
'buttonBaseClick',
'updataTableColumns',
'searchFormClick'
])
//
const rowDropRef = ref()
const buttonBaseClick = (val, item) => {
//
if (val == 'set') {
rowDropRef.value.popoverVisible = !rowDropRef.value.popoverVisible
} else if (val == 'filtrate') {
searchHigh_Ref.value.popoverVisible = true
} else {
emit('buttonBaseClick', val, item)
}
}
const quicklySearchDom_Ref = ref()
//
const searchHigh_Ref = ref(false)
//
const searchFormClick = (searchData) => {
emit('searchFormClick', searchData)
searchHigh_Ref.value.popoverVisible = false
}
defineExpose({
tableNavBtnsContent_Ref,
quicklySearchDom_Ref
})
</script>
<style lang="scss" scoped>
.tableNavBtnsContent{
padding-bottom: 10px;
.searchBox{
display: flex;
justify-content: space-between;
}
.tableNavLeftBtns{
display: flex;
margin-left: -5px;
}
.tableNavRightBtns{
display: flex;
margin-left: 10px;
margin-right: -5px;
}
}
</style>

113
src/views/mes/workstation/index.vue

@ -58,9 +58,50 @@
:detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage"
:tabs="TabsList"
:detailButtonIsShowAdd = "true"
:detailButtonIsShowDelete="true"
@changeTabs="changeTabs"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- 记录子包装弹窗 -->
<BasicForm
ref="teamRef"
@success="getList"
:tableAllSchemas="Team.allSchemas"
:tableData="selectTeamListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="equipmentListRef"
@success="getList"
:tableAllSchemas="Equipment.allSchemas"
:tableData="selectEquipmentListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="processListRef"
@success="getList"
:tableAllSchemas="Process.allSchemas"
:tableData="selectProcessListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="productionListRef"
@success="getList"
:tableAllSchemas="Production.allSchemas"
:tableData="selectProductionListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -81,18 +122,15 @@ import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from './components/Detail.vue'
import {
getEquipmentPage,
getProcessPage,
getProductionPage,
goalParams,
params
} from "@/api/mes/workstation";
defineOptions({ name: 'Workstation' })
const message = useMessage() //
const { t } = useI18n() //
const teamRef = ref()
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
@ -283,4 +321,65 @@ const changeTabs = (data) =>{
detailAllSchemas.value = Production.allSchemas
}
}
const buttondataTable = ref([{
label: '取消关联',
name: 'viewParentPickingNumber',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
const teamListRef = ref()
const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({
getListApi: WorkstationApi.checkTeamPageList
})
const { getList:selectTeamList } = selectTeamListTableMethods
const equipmentListRef = ref()
const { tableObject: selectEquipmentListTableData, tableMethods: selectEquipmentListTableMethods } = useTable({
getListApi: WorkstationApi.checkEquipmentPageList
})
const { getList:selectEquipmentList } = selectEquipmentListTableMethods
const processListRef = ref()
const { tableObject: selectProcessListTableData, tableMethods: processListTableMethods } = useTable({
getListApi: WorkstationApi.checkProcessPageList
})
const { getList:selectProcessListList } = processListTableMethods
const productionListRef = ref()
const { tableObject: selectProductionListTableData, tableMethods: productionListTableMethods } = useTable({
getListApi: WorkstationApi.checkProductionPageList
})
const { getList:selectProductionList } = productionListTableMethods
const tableFormButton = async (val , row) => {
if(val == 'Team'){
selectTeamListTableData.params = {
workstationCode:row.workstationCode
}
await selectTeamList()
teamListRef.value.open('create', row, null,'viewDetail')//
}else if(val == 'Equipment'){
selectEquipmentListTableData.params = {
workstationCode:row.workstationCode
}
await selectEquipmentList()
equipmentListRef.value.open('create', row, null,'viewDetail')//
}else if(val == 'Process'){
selectProcessListTableData.params = {
workstationCode:row.workstationCode
}
await selectProcessListList()
processListRef.value.open('create', row, null,'viewDetail')//
}else if(val == 'Production'){
selectProductionListTableData.params = {
workstationCode:row.workstationCode
}
await selectProductionList()
productionListRef.value.open('create', row, null,'viewDetail')//
}
}
</script>

60
src/views/mes/workstation/workstation.data.ts

@ -105,6 +105,33 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
}
]))
export const Team = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
export const TeamSelect = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
@ -134,6 +161,17 @@ export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true
}
]))
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
@ -150,6 +188,17 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))
export const Production = useCrudSchemas(reactive<CrudSchema[]>([
@ -166,5 +215,16 @@ export const Production = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:true,
}
]))

151
src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts

@ -0,0 +1,151 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
// 表单校验
export const AgvLocationrelationRules = reactive({
positionCode: [
{ required: true, message: '请填写AGV点位', trigger: 'change' }
],
positionArea: [
{ required: true, message: '请填写AGV库区', trigger: 'change' }
],
wmsArea: [
{ required: true, message: '请填写WMS库区', trigger: 'change' }
],
wmsPosition: [
{ required: true, message: '请填写WMS库位', trigger: 'change' }
]
})
export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'reqCode',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: 'AGV点位',
field: 'positionCode',
sort: 'custom',
isSearch: false,
},
{
label: 'AGV库区',
field: 'positionArea',
sort: 'custom',
isSearch: false,
},
{
label: 'WMS库区',
field: 'wmsArea',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库区代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库区信息', // 查询弹窗标题
searchAllSchemas: Area.allSchemas, // 查询弹窗所需类
searchPage: AreaApi.getAreaPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: 'WMS库位',
field: 'wmsPosition',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaCode',
value: "wmsArea",
message: '请选择库区代码!',
isMainValue: true
}]
}
}
},
{
label: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
isSearch: false,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: false,
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

267
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -0,0 +1,267 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="AgvLocationrelation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #reqCode="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.reqCode)">
<span>{{ row.reqCode }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="AgvLocationrelationRules"
:formAllSchemas="AgvLocationrelation.allSchemas"
:apiUpdate="AgvLocationrelationApi.updateAgvLocationrelation"
:apiCreate="AgvLocationrelationApi.createAgvLocationrelation"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="true"
:allSchemas="AgvLocationrelation.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/agv-locationrelation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { AgvLocationrelation,AgvLocationrelationRules } from './agvLocationrelation.data'
import * as AgvLocationrelationApi from '@/api/wms/agvLocationrelation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'AgvLocationrelation' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(AgvLocationrelation.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: AgvLocationrelationApi.getAgvLocationrelationPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:agv-locationrelation:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:agv-locationrelation:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:agv-locationrelation:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:agv-locationrelation:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:agv-locationrelation:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = true
}
if (item.field == 'positionArea') {
item.componentProps.disabled = true
}
})
}else {
AgvLocationrelation.allSchemas.formSchema.forEach((item) => {
if (item.field == 'positionCode') {
item.componentProps.disabled = false
}
if (item.field == 'positionArea') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =AgvLocationrelation.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await AgvLocationrelationApi.createAgvLocationrelation(data)
message.success(t('common.createSuccess'))
} else {
await AgvLocationrelationApi.updateAgvLocationrelation(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicAgvLocationrelation')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await AgvLocationrelationApi.deleteAgvLocationrelation(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await AgvLocationrelationApi.importTemplate()
})
</script>

1
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -109,7 +109,6 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '原料库位',
field: 'rawLocationCode',

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

@ -130,9 +130,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['areaCode'] = val[0]['code']
setV['areaType'] = val[0]['type']
}else if(formField == 'inPackUnit') {
setV['inPackUnit'] = val[0]['code']
setV['inPackUnit'] = val[0]['packUnit']
}else if(formField == 'outPackUnit') {
setV['outPackUnit'] = val[0]['code']
setV['outPackUnit'] = val[0]['packUnit']
}else if(formField == 'itemCode') {
setV['itemCode'] = val[0]['code']
}else{
@ -229,7 +229,7 @@ const butttondata = (row) => {
row.status = "1"
return [
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:itemarea:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:itemarea:delete'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:itemarea:delete'}), //
]
}
@ -252,12 +252,19 @@ const openForm =async (type: string, row?: number) => {
if (item.field == 'areaCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}
if (item.field == 'itemCode') {
item.componentProps.isSearchList = false,
item.componentProps.disabled = true
}})
}else {
Itemarea.allSchemas.formSchema.forEach((item) => {
if (item.field == 'areaCode') {
item.componentProps.isSearchList = true
}
if (item.field == 'itemCode') {
item.componentProps.isSearchList = true
}
})
}
tableData.value = [] //

61
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -7,14 +7,12 @@ import { Itembasic } from '../itembasic/itembasic.data'
import * as AreaApi from '@/api/wms/areabasic'
import { Area } from '../../factoryModeling/areabasic/areabasic.data'
import * as LocationgroupApi from '@/api/wms/locationgroup'
import { Locationgroup } from '../../factoryModeling/locationgroup/locationgroup.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '../../factoryModeling/location/location.data'
import * as PackageunitApi from '@/api/wms/packageunit'
import { Packageunit } from '../packageunit/packageunit.data'
import * as ItempackageApi from '@/api/wms/itempackage'
import { Itempackaging } from '../itempackage/itempackage.data'
import { t } from '@/hooks/web/useI18n'
export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
{
@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}]
}
}
@ -122,15 +124,19 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '包装规格基础信息', // 查询弹窗标题
searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类
searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'itemCode',
value: 'itemCode',
message: "请选择物料代码",
isMainValue: true
}]
}
}
@ -206,7 +212,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -309,7 +315,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -361,7 +367,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -377,10 +383,10 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
}
},
},
@ -395,7 +401,8 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
},
},
@ -422,7 +429,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -641,12 +648,6 @@ export const ItemareaRules = reactive({
outPackUnit: [
{ required: true, message: '请选择出库包装规格', trigger: 'change' }
],
needReceive: [
{ required: true, message: '请选择需要接受确认', trigger: 'change' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
manageMode: [
{ required: true, message: '请选择管理精度', trigger: 'change' }
],

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

@ -4,8 +4,7 @@ import { fa } from 'element-plus/es/locale'
import * as PackageunitApi from '@/api/wms/packageunit'
import { Select } from '@element-plus/icons-vue/dist/types'
//新增时针对父包装代码copy出的实体
export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装代码',
field: 'code',
@ -21,7 +20,7 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
}
},
},
{
label: '包装名称',
@ -85,7 +84,7 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: true,
isSearch: false,
table: {
width: 150
},
@ -278,7 +277,25 @@ export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
}
]))
export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验
export const PackageunitRules = reactive({
code: [
{ required: true, message: '请输入包装代码', trigger: 'change' }
],
name: [
{ required: true, message: '请输入包装名称', trigger: 'change' }
],
type: [
{ required: true, message: '请选择包装类型', trigger: 'change' }
],
desc: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ required: true, message: '请输入包装描述', trigger: 'change' }
],
})
//新增时针对父包装代码copy出的实体
export const PackageunitCopy = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装代码',
field: 'code',
@ -294,21 +311,6 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择父包装代码',
searchField: 'code',
searchTitle: '包装规格信息',
searchAllSchemas: PackageunitCopy.allSchemas,
searchPage: PackageunitApi.getPackageunitPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
@ -373,7 +375,7 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isSearch: false,
isSearch: true,
table: {
width: 150
},
@ -565,21 +567,3 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
}
}
]))
// 表单校验
export const PackageunitRules = reactive({
code: [
{ required: true, message: '请输入包装代码', trigger: 'change' }
],
name: [
{ required: true, message: '请输入包装名称', trigger: 'change' }
],
type: [
{ required: true, message: '请选择包装类型', trigger: 'change' }
],
desc: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ required: true, message: '请输入包装描述', trigger: 'change' }
],
})

39
src/views/wms/inventoryManage/balance/balance.data.ts

@ -39,6 +39,7 @@ export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTable:false
},
{
label: '数量',
@ -63,55 +64,55 @@ export const Balance = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '库区类型',
field: 'areaType',
label: '库位代码',
field: 'locationCode',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
isSearch: true,
},
{
label: '包装规格',
field: 'packUnit',
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '包装数量',
field: 'packQty',
label: '库区类型',
field: 'areaType',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isTable: true,
table: {
width: 150
},
},
{
label: '库位代码',
field: 'locationCode',
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '仓库代码',
field: 'warehouseCode',
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '仓库代码',
field: 'warehouseCode',
sort: 'custom',
table: {
width: 150

244
src/views/wms/mes/mesBarCode/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="MesBarCode.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="MesBarCode.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="MesBarCodeRules"
:formAllSchemas="MesBarCode.allSchemas"
:apiUpdate="MesBarCodeApi.updateMesBarCode"
:apiCreate="MesBarCodeApi.createMesBarCode"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="MesBarCode.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/mes-bar-code/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { MesBarCode,MesBarCodeRules } from './mesBarCode.data'
import * as MesBarCodeApi from '@/api/wms/mesBarCode'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'MesBarCode' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(MesBarCode.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: MesBarCodeApi.getMesBarCodePage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:mes-bar-code:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:mes-bar-code:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:mes-bar-code:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:mesBarCode:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:mesBarCode:delete'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =MesBarCode.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await MesBarCodeApi.createMesBarCode(data)
message.success(t('common.createSuccess'))
} else {
await MesBarCodeApi.updateMesBarCode(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicMesBarCode')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await MesBarCodeApi.deleteMesBarCode(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await MesBarCodeApi.exportMesBarCode(tableObject.params)
download.excel(data, '生产条码清单.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '生产条码清单导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await MesBarCodeApi.importTemplate()
})
</script>

174
src/views/wms/mes/mesBarCode/mesBarCode.data.ts

@ -0,0 +1,174 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MesBarCodeRules = reactive({
available: [required],
})
export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: 'Plnt',
field: 'plat',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Counter',
field: 'counter',
sort: 'custom',
isSearch: true,
},
{
label: 'SIGN',
field: 'sign',
sort: 'custom',
isSearch: true,
},
{
label: 'Option',
field: 'option',
sort: 'custom',
isSearch: true,
},
{
label: 'Lower Lim.',
field: 'lowerLim',
sort: 'custom',
isSearch: true,
},
{
label: 'UpperLimit',
field: 'upperLimit',
sort: 'custom',
isSearch: true,
},
{
label: 'ITAC',
field: 'itac',
sort: 'custom',
isSearch: true,
},
{
label: 'Type',
field: 'type',
sort: 'custom',
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: 'Length BC',
field: 'lengthBc',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. mat',
field: 'posMat',
sort: 'custom',
isSearch: true,
},
{
label: 'Length mat',
field: 'lengthMat',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. revlv',
field: 'posRevlv',
sort: 'custom',
isSearch: true,
},
{
label: 'Part number',
field: 'partNumber',
sort: 'custom',
isSearch: true,
},
{
label: 'Pack Label',
field: 'packLabel',
sort: 'custom',
isSearch: true,
},
{
label: 'OES-Label',
field: 'oesLabel',
sort: 'custom',
isSearch: true,
},
{
label: 'Check Rvl',
field: 'checkRvl',
sort: 'custom',
isSearch: true,
},
{
label: 'Days',
field: 'days',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
isSearch: true,
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

116
src/views/wms/productionManage/productredress/productredressJobMain/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
<template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
@ -38,33 +38,26 @@
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="ProductredressJobMainRules"
:formAllSchemas="ProductredressJobMain.allSchemas"
:apiUpdate="ProductredressJobMainApi.updateProductredressJobMain"
:apiCreate="ProductredressJobMainApi.createProductredressJobMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="ProductredressJobMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productredress-job-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ProductredressJobMain.allSchemas"
:detailAllSchemas="ProductredressJobDetail.allSchemas"
:detailAllSchemasRules="ProductredressJobDetailRules"
:apiCreate="ProductredressJobDetailApi.createProductredressJobDetail"
:apiUpdate="ProductredressJobDetailApi.updateProductredressJobDetail"
:apiPage="ProductredressJobDetailApi.getProductredressJobDetailPage"
:apiDelete="ProductredressJobDetailApi.deleteProductredressJobDetail"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductredressJobMain,ProductredressJobMainRules } from './productredressJobMain.data'
import { ProductredressJobMain,ProductredressJobMainRules,ProductredressJobDetail, ProductredressJobDetailRules } from './productredressJobMain.data'
import * as ProductredressJobMainApi from '@/api/wms/productredressJobMain'
import * as ProductredressJobDetailApi from '@/api/wms/productredressJobDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'ProductredressJobMain' })
@ -76,15 +69,6 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductredressJobMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -99,29 +83,15 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productredressJobMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productredressJobMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productredressJobMain:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productredress-job-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
@ -133,8 +103,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:productredressJobMain:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredressJobMain:delete'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productredress-job-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productredress-job-main:delete'}), //
]
// -
@ -152,29 +122,13 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =ProductredressJobMain.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await ProductredressJobMainApi.createProductredressJobMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductredressJobMainApi.updateProductredressJobMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/**
* tableForm方法
*/
const tableFormKeys = {}
ProductredressJobDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
/** 详情操作 */
const detailRef = ref()
@ -211,21 +165,6 @@ const handleExport = async () => {
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '制品回收任务主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
@ -238,7 +177,6 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProductredressJobMainApi.importTemplate()
})
</script>

578
src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts

@ -7,517 +7,667 @@ export const ProductredressJobMainRules = reactive({
export const ProductredressJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180,
fixed: 'left'
},
isForm: false,
isSearch: true,
},
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180,
},
{
label: '生产计划单号',
field: 'productionPlanNumber',
sort: 'custom',
isSearch: true,
},
{
label: '车间代码',
field: 'workShopCode',
sort: 'custom',
},
{
label: '班组',
field: 'team',
sort: 'custom',
},
{
label: '班次',
field: 'shift',
label: '状态',
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
{
label: '明细',
field: 'details',
sort: 'custom',
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '申请时间',
field: 'requestTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '要求截止时间',
field: 'requestDueTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
form: {
component: 'Radio'
},
isForm: false
},
{
label: '过期时间',
field: 'expiredTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '最后更新者Id',
field: 'updater',
sort: 'custom',
isForm: false,
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isForm: false,
},
{
label: '状态',
field: 'jobStageStatus',
sort: 'custom',
form: {
component: 'Radio'
},
isForm: false
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
isTable:false,
},
{
label: '优先级增量',
field: 'priorityIncrement',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
},
isForm:false,
isTable:false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
{
label: '用户组',
field: 'userGroupCode',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '承接人用户ID',
field: 'acceptUserId',
sort: 'custom',
table: {
width: 180
},
isForm:false,
isTable:false,
},
{
label: '承接人用户名',
field: 'acceptUserName',
sort: 'custom',
table: {
width: 180
},
},
{
label: '承接时间',
field: 'acceptTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '完成人用户ID',
field: 'completeUserId',
sort: 'custom',
table: {
width: 180
},
isForm:false,
isTable:false,
},
{
label: '完成人用户名',
field: 'completeUserName',
sort: 'custom',
table: {
width: 180
},
},
{
label: '完成时间',
field: 'completeTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '从库区类型范围',
field: 'fromAreaTypes',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '到库区类型范围',
field: 'toAreaTypes',
sort: 'custom',
},
{
label: '单据号',
field: 'number',
sort: 'custom',
},
{
label: '收货类型',
field: 'type',
sort: 'custom',
form: {
component: 'SelectV2'
},
isForm:false,
isTable:false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
form: {
component: 'SelectV2'
},
isForm:false,
isTable:false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '创建者id',
field: 'creator',
sort: 'custom',
isForm: false,
isForm:false,
isTable:false,
},
{
label: '自动完成',
field: 'autoComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许修改库位',
field: 'allowModifyLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许修改数量',
field: 'allowModifyQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许大于推荐数量',
field: 'allowBiggerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许小于推荐数量',
field: 'allowSmallerQty',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许修改库存状态',
field: 'allowModifyInventoryStatus',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
form: {
component: 'Radio'
},
isForm:false,
isTable:false,
},
{
label: '允许连续扫描',
field: 'allowContinuousScanning',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许部分完成',
field: 'allowPartialComplete',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许修改批次',
field: 'allowModifyBatch',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '允许修改箱码',
field: 'allowModifyPackingNumber',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '入库库存状态范围',
field: 'inInventoryStatuses',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '出库库存状态范围',
field: 'outInventoryStatuses',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const ProductredressJobDetailRules = reactive({
})
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '生产线代码',
field: 'productionLineCode',
label: '创建时间',
field: 'createTime',
sort: 'custom',
isSearch: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 180
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
isForm: false
},
{
label: '器具号',
field: 'containerNumber',
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isForm: false,
},
{
label: '生产日期',
field: 'produceDate',
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
{
label: '过期日期',
field: 'expireDate',
sort: 'custom',
formatter: dateFormatter,
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
valueFormat: 'x'
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
]))
// 表单校验
export const ProductredressJobDetailRules = reactive({
})
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
form: {
component: 'Radio'
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '订单号',
field: 'woNumber',
sort: 'custom',
},
{
label: '订单行',
field: 'woLine',
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 180
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
},
{
label: '包装规格',
field: 'packUnit',
label: '批次',
field: 'batch',
sort: 'custom',
},
table: {
width: 150
},
},
// {
// label: '生产日期',
// field: 'produceDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '过期日期',
// field: 'expireDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
table: {
width: 150
},
},
{
label: '主表ID',
field: 'masterId',
label: '包装规格',
field: 'packUnit',
sort: 'custom',
form: {
component: 'InputNumber',
value: 0
table: {
width: 150
},
},
{
label: '单据号',
field: 'number',
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '单据号',
// field: 'number',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '备注',
field: 'remark',
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
table: {
width: 150
},
},
{
label: '订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建者Id',
label: '创建者',
field: 'creator',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '最后更新时间',
field: 'updateTime',
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
},
{
label: '最后更新者Id',
label: '最后更新者',
field: 'updater',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '到货主代码',
field: 'toOwnerCode',
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isForm: false
}
]))

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -131,6 +131,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packQty'] = val[0]['packQty']
row['packUnit'] = val[0]['packUnit']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['toLocationCode'] = val[0]['locationCode']
}
//
row[formField] = val[0][searchField]
@ -155,6 +156,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['packQty'] = val[0]['packQty']
setV['packUnit'] = val[0]['packUnit']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['toLocationCode'] = val[0]['locationCode']
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)

194
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -112,42 +112,61 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'toWarehouseCode',
sort: 'custom',
isForm:false,
table: {
width: 150
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
isForm:false,
table: {
width: 150
},
},
{
label: '自动提交',
field: 'autoCommit',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '自动通过',
field: 'autoAgree',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '自动执行',
field: 'autoExecute',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '直接生成记录',
field: 'directCreateRecord',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '备注',
@ -158,31 +177,44 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '到库区类型范围',
field: 'toAreaTypes',
sort: 'custom',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
isForm:false,
isTable:false,
},
{
label: '入库库存状态范围',
field: 'inInventoryStatuses',
sort: 'custom',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '出库库存状态范围',
field: 'outInventoryStatuses',
sort: 'custom',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isForm:false,
isTable:false,
},
{
label: '创建者用户名',
label: '创建者',
field: 'creator',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '创建时间',
@ -207,10 +239,13 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false
},
{
label: '最后更新者用户名',
label: '最后更新者',
field: 'updater',
sort: 'custom',
isForm: false,
table: {
width: 150
},
},
{
label: '最后更新时间',
@ -239,7 +274,7 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 180,
fixed: 'right'
}
}
@ -250,90 +285,6 @@ export const ProductredressRequestDetailRules = reactive({
})
export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '生产线代码',
// field: 'productionLineCode',
// sort: 'custom',
// isSearch: true,
// },
// {
// label: '工位代码',
// field: 'workStationCode',
// sort: 'custom',
// },
// {
// label: '目标库位',
// field: 'toLocationCode',
// sort: 'custom',
// },
// {
// label: '工序代码',
// field: 'processCode',
// sort: 'custom',
// },
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// },
// {
// label: '生产日期',
// field: 'produceDate',
// sort: 'custom',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '过期日期',
// field: 'expireDate',
// formatter: dateFormatter,
// detail: {
// dateFormat: 'YYYY-MM-DD HH:mm:ss'
// },
// sort: 'custom',
// table: {
// width: 180
// },
// form: {
// component: 'DatePicker',
// componentProps: {
// style: {width: '100%'},
// type: 'datetime',
// dateFormat: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'x',
// }
// },
// isForm: false
// },
// {
// label: '订单号',
// field: 'woNumber',
// sort: 'custom',
// },
// {
// label: '订单行',
// field: 'woLine',
// sort: 'custom',
// },
// {
// label: 'BOM版本',
// field: 'bomVersion',
@ -343,6 +294,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isForm: false,
isTableForm: false,
},
@ -370,7 +324,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值
action: '!=', // 查询拼接条件
action: 'isNotStr', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
@ -391,7 +345,7 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},{
key: 'packingNumber', // 查询列表中字段
value: '', // 指查询具体值
action: '!=', // 查询拼接条件
action: 'isNotStr', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}]
@ -401,6 +355,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
},
@ -408,6 +365,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
},
@ -415,6 +375,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
},
@ -422,6 +385,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
},
@ -429,6 +395,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -442,6 +411,25 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '计量单位',
field: 'uom',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '库位',
field: 'toLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -455,6 +443,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -469,6 +460,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -482,6 +476,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -495,6 +492,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '包装规格',
field: 'packUnit',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -508,6 +508,9 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '库存状态',
field: 'inventoryStatus',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
@ -521,11 +524,17 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建者用户名',
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
@ -553,9 +562,12 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isForm: false
},
{
label: '最后更新者用户名',
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTableForm: false,
},

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -158,8 +158,8 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:!row.inspectRequestFlag}),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:!row.putawayRequestFlag}),//
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag === false }),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag === false }),//
]
}

3
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -305,6 +305,9 @@ export const PurchasePlanMainRules = reactive({
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],
deliveryDate: [
{ required: true, message: '请选择送达时间', trigger: 'change' }
],
status: [
{ required: true, message: '请选择状态', trigger: 'change' }
],

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

@ -283,7 +283,6 @@ const isShowMainButtonLabel = (row, val) => {
const butttondata = (row) => {
return [
defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
@ -314,7 +313,8 @@ const butttondata = (row) => {
color: '',
hasPermi: '',
link: true //
}
},
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4','3']) }), //
]
}

15
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -106,7 +106,7 @@
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
const searchTableSuccess = (formField, searchField, val, searchFormRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
@ -121,13 +121,24 @@
row['amount'] = val[0]['amount']
}
} else {
console.log(searchFormRef.formModel);
const setV = {}
if(formField == 'recordNumber'){
setV['recordNumber'] = val[0]['number']
setV['asnBillNum'] = val[0]['asnNumber']
let params = {
'billType':searchFormRef.formModel.billType,
'recordNumber':val[0]['number']
}
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{
console.log("返回结果:",res)
})
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
searchFormRef.setValues(setV)
}
})
}

Loading…
Cancel
Save