Browse Source

2024-4-1

master_hella_20240701
zhousq 8 months ago
parent
commit
9189b41acd
  1. 3
      .eslintrc.js
  2. 61
      src/api/mes/holidaySetting/index.ts
  3. 83
      src/api/mes/workstation/index.ts
  4. 53
      src/api/qms/samplingProcess/index.ts
  5. 59
      src/api/wms/agvLocationrelation/index.ts
  6. 65
      src/api/wms/mesBarCode/index.ts
  7. 6
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  8. 6
      src/components/Annex/src/Annex.vue
  9. 19
      src/components/BasicForm/src/BasicForm.vue
  10. 4
      src/components/ChangeRecord/src/ChangeRecord.vue
  11. 159
      src/components/Detail/src/Detail.vue
  12. 30
      src/components/Form/src/Form.vue
  13. 6
      src/components/Remarks/src/Remarks.vue
  14. 16
      src/components/Table/src/Table.vue
  15. 14
      src/layout/components/useRenderLayout.tsx
  16. 7
      src/utils/dict.ts
  17. 178
      src/views/mes/holidaySetting/holidaySetting.data.ts
  18. 245
      src/views/mes/holidaySetting/index.vue
  19. 4
      src/views/mes/jobcalendar/index.vue
  20. 23
      src/views/mes/workstation/components/Detail.vue
  21. 160
      src/views/mes/workstation/components/TableHead.vue
  22. 64
      src/views/mes/workstation/index.vue
  23. 6
      src/views/mes/workstation/workstation.data.ts
  24. 267
      src/views/qms/basicDataManage/inspectionTemplate/index.vue
  25. 244
      src/views/qms/samplingProcess/index.vue
  26. 84
      src/views/qms/samplingProcess/samplingProcess.data.ts
  27. 151
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  28. 10
      src/views/wms/agvManage/agvLocationrelation/index.vue
  29. 40
      src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts
  30. 1
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  31. 1
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  32. 35
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  33. 42
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  34. 233
      src/views/wms/buttMesManage/mesBarCode/index.vue
  35. 209
      src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts
  36. 69
      src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue
  37. 9
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  38. 9
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  39. 23
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts
  40. 39
      src/views/wms/inventoryManage/balance/balance.data.ts
  41. 9
      src/views/wms/inventoryManage/package/package.data.ts
  42. 21
      src/views/wms/inventoryManage/transaction/transaction.data.ts
  43. 3
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  44. 22
      src/views/wms/issueManage/issue/issueJobMain/issueJobMain.data.ts
  45. 116
      src/views/wms/productionManage/productredress/productredressJobMain/index.vue
  46. 588
      src/views/wms/productionManage/productredress/productredressJobMain/productredressJobMain.data.ts
  47. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue
  48. 194
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts
  49. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  50. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  51. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
  52. 48
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  53. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  54. 34
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  55. 66
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

3
.eslintrc.js

@ -1,5 +1,6 @@
// @ts-check
const { defineConfig } = require('eslint-define-config')
const { off } = require('process')
module.exports = defineConfig({
root: true,
env: {
@ -26,6 +27,8 @@ module.exports = defineConfig({
'@unocss'
],
rules: {
//'indent':['off',2],
//"@typescript-eslint/no-this-alias":["off"],
'vue/script-setup-uses-vars': 'error',
'vue/no-reserved-component-names': 'off',
'vue/no-setup-props-destructure': 'off',

61
src/api/mes/holidaySetting/index.ts

@ -0,0 +1,61 @@
import request from '@/config/axios'
export interface HolidaySettingVO {
id: number
textOne: string
textTwo: string
textThree: string
textFour: string
textFive: string
deleteTime: Date
status: string
concurrencyStamp: number
remark: string
deleter: string
siteId: number
changeEmplId: number
holidayDate: Date
holidayFlag: string
holidayName: string
}
// 查询节假日设置列表
export const getHolidaySettingPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/holidaySetting/senior', data })
} else {
return await request.get({ url: `/mes/holidaySetting/page`, params })
}
}
// 查询节假日设置详情
export const getHolidaySetting = async (id: number) => {
return await request.get({ url: `/mes/holidaySetting/get?id=` + id })
}
// 新增节假日设置
export const createHolidaySetting = async (data: HolidaySettingVO) => {
return await request.post({ url: `/mes/holidaySetting/create`, data })
}
// 修改节假日设置
export const updateHolidaySetting = async (data: HolidaySettingVO) => {
return await request.put({ url: `/mes/holidaySetting/update`, data })
}
// 删除节假日设置
export const deleteHolidaySetting = async (id: number) => {
return await request.delete({ url: `/mes/holidaySetting/delete?id=` + id })
}
// 导出节假日设置 Excel
export const exportHolidaySetting = async (params) => {
return await request.download({ url: `/mes/holidaySetting/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/mes/holidaySetting/get-import-template' })
}

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

@ -50,7 +50,6 @@ 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
if (params.isSearch) {
delete params.isSearch
@ -62,7 +61,6 @@ export const getTeamPage = async (params) => {
}
// 查询选择班组列表
export const checkTeamPageList = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
@ -73,24 +71,23 @@ export const checkTeamPageList = async (params) => {
}
}
// 添加班组关联
export const createTeamRelation = async (workstationCode,teamCodes:string[]) => {
export const createTeamRelation = async (teamCodes:string[]) => {
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.workstationCode,
teamCodes : teamCodes
}
return await request.post({ url: `/mes/team/createRelation`, data })
}
// 删除班组关联
export const deleteTeamRelation = async (workstationCode,teamCodes:string[]) => {
export const deleteTeamRelation = async (teamCodes:string[]) => {
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.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
if (params.isSearch) {
delete params.isSearch
@ -102,7 +99,6 @@ export const getEquipmentPage = async (params) => {
}
// 查询选择设备列表
export const checkEquipmentPageList = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
@ -113,89 +109,96 @@ export const checkEquipmentPageList = async (params) => {
}
}
// 添加设备关联
export const createEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => {
export const createEquipmentRelation = async (equipmentCodes:string[]) => {
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.workstationCode,
equipmentCodes : equipmentCodes
}
return await request.post({ url: `/mes/team/createRelation`, data })
return await request.post({ url: `/mes/equipment/createRelation`, data })
}
// 删除设备关联
export const deleteEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => {
export const deleteEquipmentRelation = async (equipmentCodes:string[]) => {
debugger
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.workstationCode,
equipmentCodes : equipmentCodes
}
return await request.post({ url: `/mes/team/deleteRelation`, data })
return await request.post({ url: `/mes/equipment/deleteRelation`, data })
}
export const getProcessPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
return await request.post({ url: '/mes/workstation-process/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params })
return await request.get({ url: `/mes/workstation-process/pageListByWorkstationCode`, params })
}
}
export const checkProcessPageList = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
return await request.post({ url: '/mes/workstation-process/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params })
return await request.get({ url: `/mes/workstation-process/pageCheckListByWorkstationCode`, params })
}
}
// 添加工序关联
export const createProcessRelation = async (workstationCode,processCodes:string[]) => {
export const createProcessRelation = async (processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/createRelation`, data })
return await request.post({ url: `/mes/workstation-process/createRelation`, data })
}
// 删除工序关联
export const deleteProcessRelation = async (workstationCode,processCodes:string[]) => {
export const deleteProcessRelation = async (processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/deleteRelation`, data })
return await request.post({ url: `/mes/workstation-process/deleteRelation`, data })
}
export const getProductionPage = async (params) => {
export const getOperstepsPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
return await request.post({ url: '/strategy/workstation-opersteps/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params })
return await request.get({ url: `/strategy/workstation-opersteps/pageListByWorkstationCode`, params })
}
}
export const checkProductionPageList = async (params) => {
export const checkOperstepsPageList = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/production-process/senior', data })
return await request.post({ url: '/strategy/workstation-opersteps/senior', data })
} else {
return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params })
return await request.get({ url: `/strategy/workstation-opersteps/pageCheckListByWorkstationCode`, params })
}
}
// 添加产品关联
export const createProductionRelation = async (workstationCode,productionCodes:string[]) => {
// 添加操作步骤关联
export const createOperstepsRelation = async (processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
productionCodes : productionCodes
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/createRelation`, data })
return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data })
}
// 删除产品关联
export const deleteProductionRelation = async (workstationCode,productionCodes:string[]) => {
// 删除操作步骤关联
export const deleteOperstepsRelation = async (processCodes:string[]) => {
const data = {
workstationCode : workstationCode,
productionCodes : productionCodes
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/production-process/deleteRelation`, data })
return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data })
}

53
src/api/qms/samplingProcess/index.ts

@ -0,0 +1,53 @@
import request from '@/config/axios'
export interface SamplingProcessVO {
id: number
code: string
describe: string
sampleType: string
evaluationMode: string
sampleSize: number
sampleProgCode: number
available: string
}
// 查询采样过程列表
export const getSamplingProcessPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/qms/sampling-process/senior', data })
} else {
return await request.get({ url: `/qms/sampling-process/page`, params })
}
}
// 查询采样过程详情
export const getSamplingProcess = async (id: number) => {
return await request.get({ url: `/qms/sampling-process/get?id=` + id })
}
// 新增采样过程
export const createSamplingProcess = async (data: SamplingProcessVO) => {
return await request.post({ url: `/qms/sampling-process/create`, data })
}
// 修改采样过程
export const updateSamplingProcess = async (data: SamplingProcessVO) => {
return await request.put({ url: `/qms/sampling-process/update`, data })
}
// 删除采样过程
export const deleteSamplingProcess = async (id: number) => {
return await request.delete({ url: `/qms/sampling-process/delete?id=` + id })
}
// 导出采样过程 Excel
export const exportSamplingProcess = async (params) => {
return await request.download({ url: `/qms/sampling-process/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/qms/sampling-process/get-import-template' })
}

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

6
src/api/wms/supplierinvoiceRequestDetail/index.ts

@ -39,6 +39,12 @@ export const getPoNumber = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumber`, params})
}
// 查询供应商发票明细数据
export const getPoNumberPoLineInfo = async (params) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/getPoNumberPoLineInfo`, params})
}
// 查询供应商发票申请子详情
export const getSupplierinvoiceRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierinvoice-request-detail/get?id=` + id })

6
src/components/Annex/src/Annex.vue

@ -2,7 +2,7 @@
<template>
<div class="annex">
<div class="title flex items-center">
<div class="title-txt">附件</div>
<!-- <div class="title-txt">附件</div> -->
<UploadFile :isShowFile="false" :isShowTip="false" title="添加附件" :upData="upData"
@update:modelValue="handleAnnexSuccess" />
</div>
@ -72,8 +72,8 @@ const downFile = (item)=>{
<style scoped lang="scss">
.title {
border-bottom: 1px solid #dedede;
justify-content: space-between;
justify-content: flex-end;
.title-txt {
width: 80px;
text-align: center;

19
src/components/BasicForm/src/BasicForm.vue

@ -259,7 +259,13 @@ const props = defineProps({
type: Array,
required: false,
default: null
}
},
//
isOpenSearchTable:{
type: Boolean,
required: false,
default: false
},
})
const { t } = useI18n() //
@ -565,7 +571,16 @@ const handleDeleteTable = (row, index) => {
}
//
const handleAddTable = () => {
emit('handleAddTable')
if(props.isOpenSearchTable){
const tableFormKeys = {}
tableAllSchemas.value.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
inpuFocus(tableAllSchemas.value.tableFormColumns[0],tableFormKeys,0)
}else{
emit('handleAddTable')
}
}
//
const inpuFocus = (headerItem, row, index) => {

4
src/components/ChangeRecord/src/ChangeRecord.vue

@ -1,9 +1,9 @@
<!-- 变更记录组件 -->
<template>
<div class="annex">
<div class="title flex items-center">
<!-- <div class="title flex items-center">
<div class="title-txt">变更记录</div>
</div>
</div> -->
<div class="list">
<el-steps direction="vertical" class="mt-16px" :space="90">
<el-step v-for="(item, index) in changeRecordData.changeRecordList" :key="index">

159
src/components/Detail/src/Detail.vue

@ -28,8 +28,7 @@
<Tabs :tabsList="tabsList" :current="current" @change="change" />
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[73%]">
<!-- 列表头部 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!='附件'&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'"> <!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
@ -73,8 +72,7 @@
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>
<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"
@ -98,25 +96,27 @@
</template>
</DetailTable>
</ContentWrap>
<ContentWrap class="w-[27%] ml-16px">
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label=='附件'||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'">
<!-- 附件组件 -->
<Annex
<Annex v-show="tabsList[current].label=='附件'"
:annexData="annexData"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
/>
<!-- 备注组件 -->
<Remarks
<Remarks v-show="tabsList[current].label=='备注'"
:remarksData="remarksData"
class="mt-20px"
@remarksSubmitScuess="remarksSubmitScuess"
/>
<!-- 变更记录组件 -->
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" />
</ContentWrap>
<ChangeRecord v-show="tabsList[current].label=='变更记录'" :changeRecordData="changeRecordData" class="mt-20px" /> </ContentWrap>
</div>
</el-drawer>
<!-- 表格弹窗 -->
<SearchTable ref="searchTableRef" @search-table-success="searchTableSuccess1" />
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@ -152,6 +152,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { SearchTable } from '@/components/SearchTable'
defineOptions({ name: 'Detail' })
@ -298,7 +299,13 @@ const props = defineProps({
type: Boolean,
required: false,
default: true
}
},
//
isOpenSearchTable:{
type: Boolean,
required: false,
default: false
},
})
const isShowDrawer = ref(false)
const detailLoading = ref(false)
@ -322,7 +329,25 @@ if (props.isBasic == true) {
]
}
}
if (tabsList.value) {
const otherList = [{
label:'附件',
prop:'Annex'
},{
label:'备注',
prop:'Remarks'
},{
label:'变更记录',
prop:'ChangeRecord'
}]
tabsList.value = [...tabsList?.value,...otherList]
if (!tabsList.value || tabsList.value && tabsList.value.length == otherList.length) {
tabsList.value.unshift({
label: '明细',
prop: 'Detail'
})
}
//
@ -380,6 +405,29 @@ const HeadButttondata = ref()
// -
const buttondata = ref()
/** 表格弹窗 */
const initModel = (schema: FormSchema[], formModel: Recordable) => {
const model: Recordable = { ...formModel }
schema.map((v) => {
// hidden
if (v.hidden) {
delete model[v.field]
} else if (v.component && v.component !== 'Divider') {
const hasField = Reflect.has(model, v.field)
//
model[v.field] = hasField ? model[v.field] : v.value !== void 0 ? v.value : ''
}
})
return model
}
const searchTableRef = ref()
//
const searchTableFormModel = ref<Recordable>({})
if(props.isOpenSearchTable){
searchTableFormModel.value = initModel(props.detailAllSchemas.formSchema, unref(searchTableFormModel))
}
const searchTableFormType = ref('') // create - update -
/** 打开弹窗 */
const formRef = ref()
const titleNameRef = ref()
@ -511,7 +559,26 @@ const { getList } = tableMethodsRef.value
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
if(props.isOpenSearchTable){
searchTableFormType.value = 'create'
//
searchTableFormModel.value = Object.assign(unref(searchTableFormModel), {
masterId: masterParmas.value.masterId,
number: masterParmas.value.number
})
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
)
}else{
openForm('create')
}
} else if (val == 'import') {
//
handleImport()
@ -529,6 +596,48 @@ const buttonBaseClick = (val, item) => {
}
}
// --> isOpenSearchTable === true
const opensearchTable = (
formField,
searchField,
searchTitle,
searchAllSchemas,
searchPage,
searchCondition,
multiple,
type,
row
) => {
const _searchCondition = {}
//
if (searchCondition && searchCondition.length > 0) {
//
for (var i=0; i< searchCondition.length; i++ ) {
// row
if (searchCondition[i].isMainValue) {
_searchCondition[searchCondition[i].key] = detailData
? detailData.value[searchCondition[i].value]
: ''
}else{
_searchCondition[searchCondition[i].key] = searchCondition[i].value
}
}
}
console.log(searchCondition)
console.log(_searchCondition)
searchTableRef.value.open(
searchTitle,
searchAllSchemas,
searchPage,
formField,
searchField,
multiple,
type,
row,
_searchCondition
)
}
//
// const updataTableColumns = (val) => {
// detailAllSchemas.tableColumns.value = val
@ -538,7 +647,24 @@ const buttonBaseClick = (val, item) => {
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
if(props.isOpenSearchTable){
searchTableFormType.value = 'update'
if (row?.id || row?.masterId) {
searchTableFormModel.value = Object.assign(unref(searchTableFormModel), row)
}
const item = props.detailAllSchemas.formSchema[0]
opensearchTable(
item.field, item?.componentProps?.searchField,
item?.componentProps?.searchTitle,
item?.componentProps?.searchAllSchemas,
item?.componentProps?.searchPage,
item?.componentProps?.searchCondition,
item?.componentProps?.multiple,
undefined,undefined
)
}else{
openForm('update', row)
}
} else if (val == 'delete') {
//
handleDelete(row.id)
@ -573,6 +699,13 @@ const submitForm = async (formType, data) => {
}
}
const searchTableSuccess1 = (formField, searchField, val, formRef) => {
searchTableFormModel.value[formField] = val.map(item=>item[searchField]).join(',')
console.log('searchTableSuccess1',searchTableFormModel)
submitForm(searchTableFormType.value,searchTableFormModel.value)
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)

30
src/components/Form/src/Form.vue

@ -21,7 +21,7 @@ import { set } from 'lodash-es'
import { FormProps } from './types'
import { Icon } from '@/components/Icon'
import { FormSchema, FormSetPropsType } from '@/types/form'
import { Search } from '@element-plus/icons-vue'
import { Search,CircleClose } from '@element-plus/icons-vue'
const { getPrefixCls } = useDesign()
@ -245,7 +245,18 @@ export default defineComponent({
return (
<>
<ElTooltip placement="top" content={formModel.value[item.field]} >
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} />
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
formModel.value[item.field] = []
}else{
formModel.value[item.field] = ''
}
}}>
</ElButton>
)
}}/>
</ElTooltip>
<ElButton icon={Search} onClick={()=>{
opensearchTable(
@ -263,7 +274,20 @@ export default defineComponent({
formItemSlotsSearchList[item.field] = () => {
return (
<>
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} />
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} v-slots={{
suffix: () => (
<ElButton type="text" icon={CircleClose} style="color:var(--el-button-text-color)" onClick={()=>{
if(Array.isArray(formModel.value[item.field])){
formModel.value[item.field] = []
}else{
formModel.value[item.field] = ''
}
}}>
</ElButton>
)
}}>
</ElInput>
<ElButton icon={Search} onClick={()=>{
opensearchTable(
item.field, item?.componentProps?.searchField,

6
src/components/Remarks/src/Remarks.vue

@ -1,9 +1,9 @@
<!-- 备注组件 -->
<template>
<div class="annex">
<div class="title flex items-center">
<div class="annex" >
<!-- <div class="title flex items-center">
<div class="title-txt">备注</div>
</div>
</div> -->
<div class="list">
<div class="item flex items-start" v-for="(item, index) in remarksData.remarksList" :key="index">
<div class="user-icon mt-4px">

16
src/components/Table/src/Table.vue

@ -1,5 +1,5 @@
<script lang="tsx">
import { ElTable, ElTableColumn, ElPagination } from 'element-plus'
import { ElTable, ElTableColumn, ElPagination,ElAffix } from 'element-plus'
import { defineComponent, PropType, ref, computed, unref, watch, onMounted } from 'vue'
import { propTypes } from '@/utils/propTypes'
import { setIndex } from './helper'
@ -310,15 +310,17 @@ export default defineComponent({
append: () => getSlot(slots, 'append')
}}
</ElTable>
{unref(getProps).pagination ? (
// update by Pagination
<ElPagination
v-model:pageSize={pageSizeRef.value}
v-model:currentPage={currentPageRef.value}
class="float-right mb-15px mt-15px"
{...unref(pagination)}
></ElPagination>
<ElPagination
v-model:pageSize={pageSizeRef.value}
v-model:currentPage={currentPageRef.value}
class="float-right mb-15px mt-15px"
{...unref(pagination)}
></ElPagination>
) : undefined}
</div>
)
}

14
src/layout/components/useRenderLayout.tsx

@ -8,6 +8,7 @@ import AppView from './AppView.vue'
import ToolHeader from './ToolHeader.vue'
import { ElScrollbar } from 'element-plus'
import { useDesign } from '@/hooks/web/useDesign'
import RouterSearch from '@/components/RouterSearch/index.vue'
const { getPrefixCls } = useDesign()
@ -34,6 +35,8 @@ const mobile = computed(() => appStore.getMobile)
// 固定菜单
const fixedMenu = computed(() => appStore.getFixedMenu)
// 搜索图片
const search = computed(() => appStore.search)
export const useRenderLayout = () => {
const renderClassic = () => {
@ -58,6 +61,17 @@ export const useRenderLayout = () => {
style="transition: all var(--transition-time-02);"
></Logo>
) : undefined}
{/* {search.value && !appStore.getCollapse? (<div class={[
prefixCls,
'h-[var(--top-tool-height)] relative px-[var(--top-tool-p-x)] flex items-center justify-between'
]}> <RouterSearch class={[
'bg-[var(--left-menu-bg-color)] relative',
{
'!pl-0': mobile.value && collapse.value,
'w-[var(--left-menu-min-width)]': appStore.getCollapse,
'w-[var(--left-menu-max-width)]': !appStore.getCollapse
}
]} isModal={false} /> </div>) : undefined} */}
<Menu class={[{ '!h-[calc(100%-var(--logo-height))]': logo.value }]}></Menu>
</div>
<div

7
src/utils/dict.ts

@ -279,10 +279,17 @@ export enum DICT_TYPE {
PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型
DELIVER_TYPE="deliver_type",//发货类型
BILL_TYPE="bill_type", // 发票类型
<<<<<<< HEAD
// ========== 业务 - mes ==========
MESDO_STATUS= 'mes_do_status', // 工单执行状态
MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单)
MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式
MES_PLANDO_STATUS='mes_plando_status' //计划执行状
=======
//========== QMS ==========
SAMPLING_TYPE = "sampling_type", // 取样类型
EVALUATION_MODE = "evaluation_mode", // 评估模式
>>>>>>> 72b46e7de60b264bc2bea8a7463404c272959046
}

178
src/views/mes/holidaySetting/holidaySetting.data.ts

@ -0,0 +1,178 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const HolidaySettingRules = reactive({
concurrencyStamp: [required],
})
export const HolidaySetting = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '备用字段一',
field: 'textOne',
sort: 'custom',
isSearch: true,
},
{
label: '备用字段二',
field: 'textTwo',
sort: 'custom',
isSearch: true,
},
{
label: '备用字段三',
field: 'textThree',
sort: 'custom',
isSearch: true,
},
{
label: '备用字段四',
field: 'textFour',
sort: 'custom',
isSearch: true,
},
{
label: '备用字段五',
field: 'textFive',
sort: 'custom',
isSearch: true,
},
{
label: '删除时间',
field: 'deleteTime',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
form: {
component: 'Radio'
},
},
{
label: '并发乐观锁',
field: 'concurrencyStamp',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '备注',
field: 'remark',
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: 'deleter',
sort: 'custom',
isSearch: true,
},
{
label: '位置ID',
field: 'siteId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '更改ID',
field: 'changeEmplId',
sort: 'custom',
isSearch: true,
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '节假日日期',
field: 'holidayDate',
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')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '节假日类型',
field: 'holidayFlag',
sort: 'custom',
isSearch: true,
},
{
label: '节假日名称',
field: 'holidayName',
sort: 'custom',
isSearch: true,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

245
src/views/mes/holidaySetting/index.vue

@ -0,0 +1,245 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="HolidaySetting.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="HolidaySetting.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="HolidaySettingRules"
:formAllSchemas="HolidaySetting.allSchemas"
:apiUpdate="HolidaySettingApi.updateHolidaySetting"
:apiCreate="HolidaySettingApi.createHolidaySetting"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="HolidaySetting.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/holidaySetting/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { HolidaySetting,HolidaySettingRules } from './holidaySetting.data'
import * as HolidaySettingApi from '@/api/mes/holidaySetting'
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: 'MesHolidaySetting' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(HolidaySetting.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: HolidaySettingApi.getHolidaySettingPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:holidaySetting:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:holidaySetting:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:holidaySetting: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:'mes:holidaySetting:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:holidaySetting: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 =HolidaySetting.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 HolidaySettingApi.createHolidaySetting(data)
message.success(t('common.createSuccess'))
} else {
await HolidaySettingApi.updateHolidaySetting(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, 'basicHolidaySetting')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await HolidaySettingApi.deleteHolidaySetting(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 HolidaySettingApi.exportHolidaySetting(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 HolidaySettingApi.importTemplate()
})
</script>
./holidaySetting.data

4
src/views/mes/jobcalendar/index.vue

@ -5,6 +5,4 @@
<script lang="ts" setup>
import { ref } from 'vue'
const value = ref(new Date())
</script>
</script>

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

@ -138,6 +138,7 @@
@onBlur="onBlur"
@formFormDateChange="formFormDateChange"
/>
</div>
</template>
@ -150,7 +151,7 @@ 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 TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
defineOptions({ name: 'Detail' })
@ -163,7 +164,7 @@ 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: {
@ -429,6 +430,12 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}
HeadButttondata.value = [...detailButtonFilter,...detailButtonAdd]
//
if (routeName.value.indexOf('Job') > -1) {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}
let detailButtonEdit: any = []
let detailButtonDelete: any = []
@ -506,6 +513,12 @@ const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') {
//
getList()
@ -529,7 +542,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row)
} else if (val == 'delete') {
//
handleDelete(row.id)
handleDelete(row.code)
} else {
emit('tableFormButton',val, row)
}
@ -584,7 +597,7 @@ const handleDelete = async (id: number) => {
await message.delConfirm()
tableObject.loading = true
//
await props.apiDelete(id)
await props.apiDelete([id])
tableObject.loading = false
message.success(t('common.delSuccess'))
//
@ -638,7 +651,7 @@ const openImage=(item)=>{
/**
* 监听失焦事件
* @param field 当前操作字段
* @param e
* @param e
*/
const onBlur = (field, e) => {
emit('onBlur', field, e)

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

@ -1,160 +0,0 @@
<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>

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

@ -58,13 +58,16 @@
:detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage"
:tabs="TabsList"
:apiDelete=tabsDeleteApi
@changeTabs="changeTabs"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false"
/>
<!-- 记录子包装弹窗 -->
<BasicForm
ref="teamRef"
ref="teamListRef"
@success="getList"
:tableAllSchemas="Team.allSchemas"
:tableData="selectTeamListTableData.tableList"
@ -94,10 +97,10 @@
:isShowFooterButtton="false"
/>
<BasicForm
ref="productionListRef"
ref="operstepsListRef"
@success="getList"
:tableAllSchemas="Production.allSchemas"
:tableData="selectProductionListTableData.tableList"
:tableAllSchemas="Opersteps.allSchemas"
:tableData="selectOperstepsListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
@ -112,7 +115,7 @@ import download from '@/utils/download'
import {
Equipment,
Process,
Production,
Opersteps,
TabsList,
Team,
Workstation,
@ -122,12 +125,12 @@ 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 {
goalParams,
} from "@/api/mes/workstation";
import Detail from './components/Detail.vue'
defineOptions({ name: 'Workstation' })
let tabsDeleteApi = WorkstationApi.deleteTeamRelation
const message = useMessage() //
const { t } = useI18n() //
const teamRef = ref()
@ -174,7 +177,6 @@ const HeadButttondata = [
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
@ -310,27 +312,31 @@ const changeTabs = (data) =>{
if(data.prop == 'Team'){
apiPage.value = WorkstationApi.getTeamPage
detailAllSchemas.value = Team.allSchemas
tabsDeleteApi = WorkstationApi.deleteTeamRelation
}else if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = Equipment.allSchemas
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
}else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = Process.allSchemas
}else if(data.prop == 'Production'){
apiPage.value = WorkstationApi.getProductionPage
detailAllSchemas.value = Production.allSchemas
tabsDeleteApi = WorkstationApi.deleteProcessRelation
}else if(data.prop == 'Opersteps'){
apiPage.value = WorkstationApi.getOperstepsPage
detailAllSchemas.value = Opersteps.allSchemas
tabsDeleteApi = WorkstationApi.deleteOperstepsRelation
}
}
const buttondataTable = ref([{
label: '取消关联',
name: 'viewParentPickingNumber',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// 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
@ -349,11 +355,11 @@ const { tableObject: selectProcessListTableData, tableMethods: processListTableM
})
const { getList:selectProcessListList } = processListTableMethods
const productionListRef = ref()
const { tableObject: selectProductionListTableData, tableMethods: productionListTableMethods } = useTable({
getListApi: WorkstationApi.checkProductionPageList
const operstepsListRef = ref()
const { tableObject: selectOperstepsListTableData, tableMethods: OperstepsListTableMethods } = useTable({
getListApi: WorkstationApi.checkOperstepsPageList
})
const { getList:selectProductionList } = productionListTableMethods
const { getList:selectOperstepsList } = OperstepsListTableMethods
const tableFormButton = async (val , row) => {
if(val == 'Team'){
@ -375,11 +381,11 @@ const tableFormButton = async (val , row) => {
await selectProcessListList()
processListRef.value.open('create', row, null,'viewDetail')//
}else if(val == 'Production'){
selectProductionListTableData.params = {
selectOperstepsListTableData.params = {
workstationCode:row.workstationCode
}
await selectProductionList()
productionListRef.value.open('create', row, null,'viewDetail')//
await selectOperstepsList()
operstepsListRef.value.open('create', row, null,'viewDetail')//
}
}
</script>

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

@ -18,8 +18,8 @@ export const TabsList = [{
prop: 'Process',
},
{
label: "产品",
prop: 'Production',
label: "操作步骤",
prop: 'Opersteps',
}
]
@ -201,7 +201,7 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true,
}
]))
export const Production = useCrudSchemas(reactive<CrudSchema[]>([
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',

267
src/views/qms/basicDataManage/inspectionTemplate/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>

244
src/views/qms/samplingProcess/index.vue

@ -0,0 +1,244 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="SamplingProcess.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="SamplingProcess.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="SamplingProcessRules"
:formAllSchemas="SamplingProcess.allSchemas"
:apiUpdate="SamplingProcessApi.updateSamplingProcess"
:apiCreate="SamplingProcessApi.createSamplingProcess"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SamplingProcess.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/qms/sampling-process/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { SamplingProcess,SamplingProcessRules } from './samplingProcess.data'
import * as SamplingProcessApi from '@/api/qms/samplingProcess'
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: 'SamplingProcess' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(SamplingProcess.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: SamplingProcessApi.getSamplingProcessPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:samplingProcess:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:samplingProcess:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:samplingProcess: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:samplingProcess:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:samplingProcess: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 =SamplingProcess.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 SamplingProcessApi.createSamplingProcess(data)
message.success(t('common.createSuccess'))
} else {
await SamplingProcessApi.updateSamplingProcess(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, 'basicSamplingProcess')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SamplingProcessApi.deleteSamplingProcess(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 SamplingProcessApi.exportSamplingProcess(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 SamplingProcessApi.importTemplate()
})
</script>

84
src/views/qms/samplingProcess/samplingProcess.data.ts

@ -0,0 +1,84 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const SamplingProcessRules = reactive({
code: [required],
sampleType: [required],
evaluationMode: [required],
available: [required],
})
export const SamplingProcess = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'id',
field: 'id',
sort: 'custom',
isTable: false,
isForm: false,
},
{
label: '编码',
field: 'code',
sort: 'custom',
isSearch: true,
},
{
label: '描述',
field: 'describe',
sort: 'custom',
isSearch: true,
},
{
label: '取样类型',
field: 'sampleType',
sort: 'custom',
dictType: DICT_TYPE.SAMPLING_TYPE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isSearch: true,
form: {
component: 'SelectV2'
},
},
{
label: '评估模式',
field: 'evaluationMode',
sort: 'custom',
dictType: DICT_TYPE.EVALUATION_MODE,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
},
{
label: '样品量',
field: 'sampleSize',
sort: 'custom',
},
{
label: '采样方案编码',
field: 'sampleProgCode',
sort: 'custom',
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

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'
}
}
]))

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

@ -0,0 +1,10 @@
<template>
<ContentWrap>
11
</ContentWrap>
</template>
<script setup lang="ts">
</script>

40
src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts

@ -138,24 +138,25 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
}]
}
}
isForm:false
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// action: '==',
// isSearch: true,
// isMainValue: false
// }]
// }
// }
},
{
label: '是否可用',
@ -308,9 +309,6 @@ export const CustomerdockRules = reactive({
customerCode: [
{ required: true, message: '请输入客户代码', trigger: 'blur' }
],
defaultLocationCode: [
{ required: true, message: '请输入默认库位', trigger: 'blur' }
],
available: [
{ required: true, message: '请选择是否可用', trigger: 'change' }
],

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

@ -68,6 +68,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {

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

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

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

@ -44,6 +44,7 @@
ref="formRef"
@success="getList"
:rules="ItemareaRules"
:isOpenSearchTable="true"
:formAllSchemas="Itemarea.allSchemas"
:tableAllSchemas="ItemareaDetail.allSchemas"
:tableFormRules="ItemareaDetailRules"
@ -63,6 +64,7 @@
<!-- 详情 -->
<Detail
ref="detailRef"
:isOpenSearchTable="true"
:isBasic="false"
:allSchemas="Itemarea.allSchemas"
:detailAllSchemas="ItemareaDetail.allSchemas"
@ -74,6 +76,7 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm"
/>
@ -116,11 +119,16 @@ const updataTableColumns = (val) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'locationCode') {
row['locationCode'] = val[0]['code']
}else{
row[formField] = val[0][searchField]
}
val.forEach(item=>{
const newRow = {...row}
if(formField == 'locationCode') {
newRow['locationCode'] = item['code']
}else{
newRow[formField] = item[searchField]
}
tableData.value.push(newRow)
})
}else{
const setV = {}
if(formField == 'areaCode') {
@ -128,9 +136,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{
@ -145,7 +153,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
formRef?.setValues(setV)
})
}
@ -227,7 +235,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'}), //
]
}
@ -250,12 +258,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 = [] //
@ -288,7 +303,7 @@ const handleDelete = async (id: number) => {
await message.delConfirm()
tableObject.loading = true
//
await ItemareaDetailApi.deleteItemareaDetail(id)
await ItemareaApi.deleteItemarea(id)
tableObject.loading = false
message.success(t('common.delSuccess'))
//

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

@ -96,7 +96,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
@ -125,7 +125,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchField: 'packUnit', // 查询弹窗赋值字段
searchTitle: '物料包装信息', // 查询弹窗标题
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法
@ -212,7 +212,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -315,7 +315,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -383,11 +383,10 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: 'TRUE',
}
},
},
@ -402,7 +401,8 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
},
},
@ -414,7 +414,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'FALSE',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -429,7 +429,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
form: {
component: 'Switch',
value: 'TRUE',
value: 'FALSE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
@ -648,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' }
],
@ -663,19 +657,12 @@ export const ItemareaRules = reactive({
* @returns {Array}
*/
export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库位组',
field: 'locationGroupCode',
sort: 'custom',
isForm: false,
isTableForm: false,
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
tableForm:{
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -697,6 +684,7 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
multiple:true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
@ -715,6 +703,14 @@ export const ItemareaDetail = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '库位组',
field: 'locationGroupCode',
sort: 'custom',
isForm: false,
isTableForm: false,
},
{
label: '备注',
field: 'remark',

233
src/views/wms/buttMesManage/mesBarCode/index.vue

@ -0,0 +1,233 @@
<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 #plnt="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.plnt)">
<span>{{ row.plnt }}</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:mes-bar-code:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:mes-bar-code: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) => {
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>

209
src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts

@ -0,0 +1,209 @@
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: 'Plnt',
field: 'plnt',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Counter',
field: 'counter',
sort: 'custom',
table: {
width: 150
},
isSearch:true
},
{
label: 'SIGN',
field: 'sign',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Option',
field: 'option',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Lower Lim.',
field: 'lowerLim',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'UpperLimit',
field: 'upperLimit',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'ITAC',
field: 'itac',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Type',
field: 'type',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Length BC',
field: 'lengthBc',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. mat',
field: 'posMat',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Length mat',
field: 'lengthMat',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. revlv',
field: 'posRevlv',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Part number',
field: 'partNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Pack Label',
field: 'packLabel',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'OES-Label',
field: 'oesLabel',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Check Rvl',
field: 'checkRvl',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Days',
field: 'days',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
table: {
width: 120
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
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',
table: {
width: 120
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

69
src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue

@ -191,42 +191,42 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
 if (val == 'mainJobExe') { //
let aaa = {
"id": 3,
"requestNumber": "REQ1720240326-0012",
"id": 4,
"requestNumber": "REQ1720240401-0001",
"deliverPlanNumber": "",
"customerDeliverNumber": "CUST20240326-00000012",
"customerCode": "KHV",
"customerDockCode": "YTV4",
"customerDeliverNumber": "CUST20240401-00000001",
"customerCode": "30003432",
"customerDockCode": "916",
"deliverDock": null,
"carrierCode": "",
"transferMode": "",
"vehiclePlateNumber": "",
"fromWarehouseCode": null,
"toWarehouseCode": "CKV",
"requestTime": 1711443936000,
"toWarehouseCode": "",
"requestTime": 1711936069000,
"requestDueTime": null,
"status": "2",
"status": "1",
"expiredTime": null,
"updateTime": 1711443936000,
"updateTime": 1711936069000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityincrement": null,
"departmentCode": "100",
"acceptUserId": "1",
"acceptTime": 1711443941000,
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromAreaTypes": "FG,STOCK_UP",
"fromAreaTypes": "FG,STOCK_UP,SEMI",
"toAreaTypes": "CUST,THIRD_PARTY",
"number": "JOB2420240326-0013",
"number": "JOB2420240401-0001",
"businessType": "Deliver",
"remark": "",
"createTime": 1711443936000,
"createTime": 1711936069000,
"creator": "超级管理员",
"ruleUserId": null,
"fromAreaCodes": "FG",
"toAreaCodes": "CUST,ZTQ",
"fromAreaCodes": "",
"toAreaCodes": "",
"fromDockCode": null,
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
@ -241,44 +241,43 @@ const buttonTableClick = async (val, row) => {
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": 1,
"useOnTheWayLocation": null,
"subList": [{
"id": 3,
"id": 6,
"soNumber": null,
"soLine": null,
"packingNumber": null,
"batch": "2024021801",
"batch": "20240329",
"inventoryStatus": "OK",
"ownerCode": null,
"containerNumber": null,
"fromLocationCode": "FG",
"toLocationCode": "SFK",
"itemCode": "vvcs-zhj1",
"itemName": "测试物件",
"itemDesc1": "水冷系-散热器",
"itemDesc2": "水冷系-散热器",
"projectCode": "PJ001",
"qty": 11,
"uom": "PC",
"number": "JOB2420240326-0013",
"fromLocationCode": "W70-240-10",
"toLocationCode": "3041",
"itemCode": "399.960-12",
"itemName": "远光内侧反射镜(镀铝)右灯",
"itemDesc1": null,
"itemDesc2": null,
"projectCode": null,
"qty": 1,
"uom": "EA",
"number": "JOB2420240401-0001",
"remark": "",
"createTime": 1711443936000,
"createTime": 1711936070000,
"creator": "超级管理员",
"toPackingNumber": null,
"toContainerNumber": null,
"toBatch": null,
"handleQty": null,
"toInventoryStatus": null,
"updateTime": 1711443936000,
"updateTime": 1711936070000,
"updater": "超级管理员",
"onTheWayLocationCode": "FHZTK",
"onTheWayLocationCode": "914",
recordList: [{
handleQty: 11,
handleQty: 1,
toPackingNumber: null,
toContainerNumber: null,
toBatch: '2024021801',
toBatch: '20240329',
toInventoryStatus: 'OK',
toLocationCode: "SFK",
toLocationCode: "3041",
supplierCode: '31213',
}]
}

9
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -213,15 +213,6 @@ export const DeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '发货库区类型',
field: 'deliverType',
sort: 'custom',
dictType: DICT_TYPE.DELIVER_TYPE,
table: {
width: 150
},
},
{
label: '车牌号',
field: 'vehiclePlateNumber',

9
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -90,7 +90,6 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail'
import {DeliverRequestDetail} from '../../deliver/deliverRequestMain/deliverRequestMain.data'
//
defineOptions({ name: 'StockupMainRequest' })
@ -119,12 +118,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const setV = {}
setV[formField] = val[0][searchField]
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['itemCode'] = val[0]['itemCode']
if(formField == 'itemCode') {
row['itemCode'] = val[0]['code']
row['uom'] = val[0]['uom']
}
if(formField == 'toLocationCode'){

23
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -9,10 +9,10 @@ import { DeliverPlanMain } from '../../deliverplan/deliverPlanMain/deliverPlanMa
import * as locationApi from '@/api/wms/location'
import { Location } from '../../../basicDataManage/factoryModeling/location/location.data'
import * as confgiApi from '@/api/infra/config'
import * as ItemBasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../../basicDataManage/itemManage/itembasic/itembasic.data'
import * as WorkstationApi from '@/api/wms/workstation'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -23,10 +23,9 @@ const queryParams = {
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
const confgiDataOne = await confgiApi.queryByKey("Stockup-areaType")
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { ItemBasic } from '@/utils/disposition/formFields'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
// id 转str 否则form回显匹配不到
@ -573,7 +572,7 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchField: 'code',
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItemBasicApi.getItembasicPage,
@ -679,11 +678,16 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'location',
searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas,
searchPage: locationApi.getLocationPage,
searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}]
},
form: {
@ -693,11 +697,16 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'location',
searchTitle: '库位基础信息',
searchAllSchemas: Location.allSchemas,
searchPage: locationApi.getLocationPage,
searchPage: WorkstationApi.selectAreaTypeToLocation,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'areaType',
value: confgiDataOne.areaType,
isMainValue: false
}]
}
}

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

9
src/views/wms/inventoryManage/package/package.data.ts

@ -18,6 +18,15 @@ export const Package = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left'
},
},
{
label: '父包装号',
field: 'parentNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180,
},
},
{
label: '物料代码',
field: 'itemCode',

21
src/views/wms/inventoryManage/transaction/transaction.data.ts

@ -33,14 +33,7 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作员',
field: 'worker',
sort: 'custom',
table: {
width: 150
},
},
{
label: '业务类型',
field: 'businessType',
@ -53,8 +46,10 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
label: '记录号',
field: 'recordNumber',
sort: 'custom',
isTable: true,
isSearch: true,
table: {
width: 150
width: 180
},
},
{
@ -312,6 +307,14 @@ export const Transaction = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作员',
field: 'worker',
sort: 'custom',
table: {
width: 150
},
},
]))
// 表单校验

3
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -378,6 +378,9 @@ export const UnplannedreceiptRequestMainRules = reactive({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
dueTime: [
{ required: true, message: '请输入截止时间', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],

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

@ -19,6 +19,7 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
table: {
width: 180
},
@ -47,6 +48,24 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '生产线代码',
field: 'detailProductionLineCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '工位代码',
field: 'detailWorkStationCode',
sort: 'custom',
isSearch: true,
table: {
width: 150
},
},
{
label: '申请时间',
field: 'requestTime',
@ -140,7 +159,6 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -238,7 +256,6 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromAreaTypes',
dictType: DICT_TYPE.AREA_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
@ -321,7 +338,6 @@ export const IssueJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'useOnTheWayLocation',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {

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>

588
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',
label: '状态',
field: 'status',
dictType: DICT_TYPE.JOB_STATUS,
dictClass: 'string',
isSearch: true,
},
{
label: '车间代码',
field: 'workShopCode',
sort: 'custom',
},
{
label: '班组',
field: 'team',
sort: 'custom',
},
{
label: '班次',
field: 'shift',
sort: 'custom',
},
{
label: '明细',
field: 'details',
isTable: true,
sort: 'custom',
table: {
width: 150
},
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',
},
{
label: '用户组',
field: 'userGroupCode',
sort: 'custom',
table: {
width: 150
},
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',
sort: 'custom',
isSearch: true,
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
},
{
label: '批次',
field: 'batch',
sort: 'custom',
},
{
label: '生产日期',
field: 'produceDate',
label: '创建时间',
field: 'createTime',
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: 'expireDate',
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
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
},
]))
// 表单校验
export const ProductredressJobDetailRules = reactive({
})
export const ProductredressJobDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '库存状态',
field: 'inventoryStatus',
label: '包装号',
field: 'packingNumber',
sort: 'custom',
form: {
component: 'Radio'
table: {
width: 180
},
},
{
label: '到库位代码',
field: 'toLocationCode',
sort: 'custom',
},
{
label: '订单号',
field: 'woNumber',
sort: 'custom',
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
},
{
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',
},
{
label: '操作',
field: 'action',
isForm: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
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 }),//
]
}

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

@ -184,8 +184,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
} else {
const setV = {}
if(formField == 'supplierCode'){
setV['supplierCode'] = val[0]['code']
}
setV[formField] = val[0][searchField]
setV['supplierCode'] = val[0]['code']
formRef.setValues(setV)
}
})

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

@ -231,10 +231,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
})
}
if(formField == 'supplierCode'){
isShowButton.value = true
// isShowButton.value = true
setV['supplierCode'] = val[0]['code']
setV['purchaseReceiptRecordNumber'] = ''
tableData.value = []
// setV['purchaseReceiptRecordNumber'] = ''
// tableData.value = []
}
formRef.setValues(setV)
}

48
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -7,8 +7,6 @@ import {
PurchasereceiptRecordDetail,
PurchasereceiptRecordMain
} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail'
import { Supplier } from "@/views/wms/basicDataManage/supplierManage/supplier/supplier.data";
import * as SupplierApi from "@/api/wms/supplier";
@ -47,6 +45,25 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isSearch: true,
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form:{
componentProps:{
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
}
}
},
{
label: '采购收货记录单号',
field: 'purchaseReceiptRecordNumber',
@ -67,6 +84,11 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
}]
}
}
@ -89,25 +111,6 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
isForm: false,
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form:{
componentProps:{
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage // 查询弹窗所需分页方法
}
}
},
{
label: '承运商',
field: 'carrierCode',
@ -443,6 +446,9 @@ export const PurchasereturnRequestMainRules = reactive({
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
purchaseReceiptRecordNumber: [
{ required: true, message: '请输入采购收货记录单号', trigger: 'blur' }
],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
],

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']) }), //
]
}

34
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,43 @@
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']
}
let orderNoFlag = false;
SupplierinvoiceRequestDetailApi.getPoNumber(params).then(res =>{
console.log("返回结果:",res)
if(res.length == 0){
orderNoFlag = true
return
}
let options = [];
for(let i=0;i<res.length;i++){
let option = {
label:res[i],
value:res[i]
}
options.push(option)
}
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(item => {
if (item.field == 'poNumber') {
item.componentProps.options = options
}
})
})
if(orderNoFlag){
message.error("选择的记录单号没有订单")
return;
}
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
searchFormRef.setValues(setV)
}
})
}

66
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -235,12 +235,12 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
form: {
component: 'Select',
componentProps:{
options:[{lablel:'',value:''}]
options:[{label:'',value:''}]
}
},
tableForm: {
type: 'Select',
options:[{lablel:'',value:''}]
options:[{label:'',value:''}]
}
},
{
@ -561,12 +561,8 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
},
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
label: '订单行',
field: 'poLine',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -575,7 +571,27 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber
searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [
{
key: 'recordNumber',
value: 'recordNumber',
message: '请填写单号!',
isMainValue: true
},
{
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
},
{
key: 'poNumber',
value: 'poNumber',
message: '请选择订单号',
isMainValue: true
}
]
}
},
tableForm: {
@ -584,33 +600,27 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
searchField: 'number',
searchTitle: '订单号信息',
searchAllSchemas: PurchaseReceiptOrReturnRecordDetail.allSchemas,
searchPage: supplierinvoiceRequestDetailApi.getPoNumber,
searchPage: supplierinvoiceRequestDetailApi.getPoNumberPoLineInfo,
searchCondition: [
{
key: 'number',
key: 'recordNumber',
value: 'recordNumber',
message: '请填写单号!',
isMainValue: true
}
,
},
{
key: 'recordType',
value: 'recordType',
key: 'billType',
value: 'billType',
message: '请填写单号类型!',
isMainValue: true
}]
}
},
{
label: '订单行',
field: 'poLine',
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
},
{
key: 'poNumber',
value: 'poNumber',
message: '请选择订单号',
isMainValue: true
}
]
}
},
{

Loading…
Cancel
Save