Browse Source

制品报废记录修改

master
zhaoxuebing 11 months ago
parent
commit
508346f0b0
  1. 5
      src/api/wms/bomDismantle/index.ts
  2. 30
      src/api/wms/productscrapRequestMain/index.ts
  3. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  4. 118
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  5. 222
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  6. 594
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

5
src/api/wms/bomDismantle/index.ts

@ -9,3 +9,8 @@ export const getBomDismantlePage = async (params) => {
export const getBomDismantleRecordPage = async (params) => { export const getBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productrepair-record-main/bomPage`, params }) return await request.get({ url: `/wms/productrepair-record-main/bomPage`, params })
} }
// 查询制品报废申请子列表
export const getProductscrapBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
}

30
src/api/wms/productscrapRequestMain/index.ts

@ -61,3 +61,33 @@ export const exportProductscrapRequestMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/productscrap-request-main/get-import-template' }) return request.download({ url: '/wms/productscrap-request-main/get-import-template' })
} }
// 关闭-制品报废申请
export const closeProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/close?id=` + id })
}
// 重新添加-制品报废申请
export const reAddProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/reAdd?id=` + id })
}
// 提交审批-制品报废申请
export const submitProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/submit?id=` + id })
}
// 审批驳回-制品报废申请
export const refusedProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/refused?id=` + id })
}
// 审批通过-制品报废申请
export const agreeProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/agree?id=` + id })
}
// 处理-制品报废申请
export const handleProductscrapRequestMain = async (id) => {
return await request.put({ url: `/wms/productscrap-request-main/handle?id=` + id })
}

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

@ -452,13 +452,14 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
field: 'fromOwnerCode', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
{ {
label: '生产线代码', label: '返修生产线代码',
field: 'productionLineCode', field: 'productionLineCode',
sort: 'custom', sort: 'custom',
table: { table: {
@ -503,7 +504,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
} }
}, },
{ {
label: '工位代码', label: '返修工位代码',
field: 'workStationCode', field: 'workStationCode',
sort: 'custom', sort: 'custom',
table: { table: {

118
src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts

@ -1,5 +1,25 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {Team} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import * as TeamApi from "@/api/wms/team";
import {Shift} from "@/views/wms/basicDataManage/orderManage/shift/shift.data";
import * as ShiftApi from "@/api/wms/shift";
import {
Productionline
} from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data";
import * as ProductionlineApi from "@/api/wms/productionline";
import {
Workstation
} from "@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data";
import * as WorkstationApi from "@/api/wms/workstation";
import {Process} from "@/views/wms/basicDataManage/factoryModeling/process/process.data";
import * as ProcessApi from "@/api/wms/process";
import {
Productionlineitem
} from "@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data";
import * as ProductionlineitemApi from "@/api/wms/productionlineitem";
/** /**
* @returns {Array} * @returns {Array}
@ -19,7 +39,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'jobNumber', field: 'jobNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show:false
}, },
isSearch: true isSearch: true
}, },
@ -39,6 +60,30 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '班组',
field: 'team',
sort: 'custom',
table: {
width: 150
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
table: {
width: 150
}
},
{ {
label: '执行时间', label: '执行时间',
field: 'executeTime', field: 'executeTime',
@ -205,7 +250,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromWarehouseCode', field: 'fromWarehouseCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
}, },
{ {
@ -307,7 +353,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromOwnerCode', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
}, },
{ {
@ -315,7 +362,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packingNumber', field: 'packingNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
}, },
{ {
@ -323,7 +371,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber', field: 'containerNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
}, },
{ {
@ -331,9 +380,42 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
}, },
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
}
},
{ {
label: '从库位代码', label: '从库位代码',
field: 'fromLocationCode', field: 'fromLocationCode',
@ -410,14 +492,6 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -535,6 +609,22 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: true,
tableForm: {
type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
},
])) ]))
//表单校验 //表单校验

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

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@buttonOperationClick="buttonOperationClick"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -69,8 +70,31 @@
:apiDelete="ProductscrapRequestDetailApi.deleteProductscrapRequestDetail" :apiDelete="ProductscrapRequestDetailApi.deleteProductscrapRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/> />
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<TableForm
ref="tableFormRef"
class="w-[100%]"
:tableFields="ProdcutscrapBomDismantle.allSchemas.tableColumns"
:tableData="detatableDataBom.tableList"
:isShowButton="false"
:isShowReduceButton="false"
/>
<template #footer>
<ButtonBase :Butttondata="ButttondataBom" @button-base-click="buttonBaseClickBom" />
</template>
</Dialog>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productscrap-request-main/import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/productscrap-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -78,10 +102,12 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductscrapRequestMain,ProductscrapRequestMainRules,ProductscrapRequestDetail,ProductscrapRequestDetailRules } from './productscrapRequestMain.data' import { ProductscrapRequestMain,ProductscrapRequestMainRules,ProductscrapRequestDetail,ProductscrapRequestDetailRules,ProdcutscrapBomDismantle } from './productscrapRequestMain.data'
import * as ProductscrapRequestMainApi from '@/api/wms/productscrapRequestMain' import * as ProductscrapRequestMainApi from '@/api/wms/productscrapRequestMain'
import * as ProductscrapRequestDetailApi from '@/api/wms/productscrapRequestDetail' import * as ProductscrapRequestDetailApi from '@/api/wms/productscrapRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle";
import {getProductscrapBomDismantlePage} from "@/api/wms/bomDismantle";
// //
defineOptions({ name: 'ProductscrapRequestMain' }) defineOptions({ name: 'ProductscrapRequestMain' })
@ -94,6 +120,86 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProductscrapRequestMain.allSchemas.tableColumns) const tableColumns = ref(ProductscrapRequestMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const tableListBom = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getProductscrapBomDismantlePage
})
const { getList:getDetailListBom } = detatableMethodsBom
/** bom 列表 表单 按钮 */
const ButttondataBom = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
// bom
const buttonBaseClickBom = (val) => {
//
if (val == 'save') {
//
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0))
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
item.childList = tableListBom.value
}
})
console.log(157, tableData.value)
bomModelVisible.value = false
}
//
else if (val == 'close') {
bomModelVisible.value = false
}
}
// tableform
const buttonOperationClick = async (row, label, index)=> {
if (row.itemCode == '') {
message.warning('请选择物品代码!')
return
}
detatableDataBom.params.itemCode = row.itemCode
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
bomModelVisible.value = true
await getDetailListBom()
detatableDataBom.tableList.map(item => {
item.rowId = index
if(tableData.value[index].childList) {
tableData.value[index].childList.forEach(itemChild => {
if (itemChild.itemCode == item.itemCode) {
item.qty = itemChild.qty
}
})
}
})
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
masterId: row.id
}
await getDetailListBom()
}
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -104,14 +210,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] if(formField == 'productionLineCode'){
row['containerNumber'] = val[0]['containerNumber'] row['productionLineCode'] = val[0]['code']
row['itemCode'] = val[0]['itemCode'] }else if(formField == 'workStationCode'){
row['packingNumber'] = val[0]['packingNumber'] row['workStationCode'] = val[0]['code']
row['batch'] = val[0]['batch'] }else if(formField == 'processCode'){
row['uom'] = val[0]['uom'] row['processCode'] = val[0]['code']
row['inventoryStatus'] = val[0]['inventoryStatus'] }else if(formField == 'itemCode'){
row['fromLocationCode'] = val[0]['locationCode'] console.log("aaaaaaaa",val);
row['itemCode'] = val[0]['itemCode']
row['fromLocationCode'] = val[0]['rawLocationCode']
}
// row[formField] = val[0][searchField]
// row['containerNumber'] = val[0]['containerNumber']
// row['itemCode'] = val[0]['itemCode']
// row['packingNumber'] = val[0]['packingNumber']
// row['batch'] = val[0]['batch']
// row['uom'] = val[0]['uom']
// row['inventoryStatus'] = val[0]['inventoryStatus']
// row['fromLocationCode'] = val[0]['locationCode']
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -148,7 +265,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productscrap-request-main:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:productscrap-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productscrap-request-main:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:productscrap-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productscrap-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:productscrap-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -191,30 +308,37 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:productscrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:productscrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:productscrap-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productscrap-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:productscrap-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productscrap-request-main:delete'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:productscrap-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:productscrap-request-main:delete'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.id)
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -222,6 +346,66 @@ const buttonTableClick = async (val, row) => {
} }
} }
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await ProductscrapRequestMainApi.closeProductscrapRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await ProductscrapRequestMainApi.reAddProductscrapRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ProductscrapRequestMainApi.submitProductscrapRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await ProductscrapRequestMainApi.refusedProductscrapRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await ProductscrapRequestMainApi.agreeProductscrapRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await ProductscrapRequestMainApi.handleProductscrapRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {

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

@ -18,6 +18,25 @@ const queryParams = {
// 获取当前操作人的部门 // 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {Team} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import * as TeamApi from "@/api/wms/team";
import {Shift} from "@/views/wms/basicDataManage/orderManage/shift/shift.data";
import * as ShiftApi from "@/api/wms/shift";
import {
Productionline
} from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data";
import * as ProductionlineApi from "@/api/wms/productionline";
import {
Workstation
} from "@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data";
import * as WorkstationApi from "@/api/wms/workstation";
import {Process} from "@/views/wms/basicDataManage/factoryModeling/process/process.data";
import * as ProcessApi from "@/api/wms/process";
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
const userStore = useUserStore() const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept const userDept = userStore.userSelfInfo.dept
@ -25,14 +44,89 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array} * @returns {Array}
*/ */
export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择车间',
searchField: 'code',
searchTitle: '车间信息',
searchAllSchemas: Workshop.allSchemas,
searchPage: WorkshopApi.getWorkshopPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '班组',
field: 'team',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择班组',
searchField: 'code',
searchTitle: '班组信息',
searchAllSchemas: Team.allSchemas,
searchPage: TeamApi.getTeamPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择班次',
searchField: 'code',
searchTitle: '班次信息',
searchAllSchemas: Shift.allSchemas,
searchPage: ShiftApi.getShiftPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{ {
label: '从仓库代码', label: '从仓库代码',
field: 'fromWarehouseCode', field: 'fromWarehouseCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
isForm: false, isForm: false,
isTable: false
}, },
{ {
label: '从库位类型范围', label: '从库位类型范围',
@ -83,13 +177,22 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
}, },
{ {
label: '备注', label: '状态',
field: 'remark', field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isTable: false, form: {
value: '1',
componentProps: {
disabled: true
}
}
}, },
{ {
label: '创建时间', label: '创建时间',
@ -166,37 +269,29 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '部门', label: '备注',
field: 'departmentCode', field: 'remark',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { isTable: false,
value: userDept.name,
componentProps: {
disabled: true
}
}
}, },
{ {
label: '状态', label: '部门',
field: 'status', field: 'departmentCode',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
form: { form: {
value: '1', value: userDept.name,
componentProps: { componentProps: {
disabled: true disabled: true
} }
} }
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
@ -363,20 +458,196 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromOwnerCode', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
isForm: false, isForm: false,
isTableForm: false, isTableForm: false,
}, },
{ {
label: '包装号', label: '来源生产线代码',
field: 'packingNumber', field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
}]
}
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'productionLineCode',
value: 'productionLineCode',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'productionLineCode',
value: 'productionLineCode',
isMainValue: true
}]
}
}
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品关系信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
},
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150,
show: false
},
isTable: false,
isTableForm: false,
tableForm:{
isInpuFocusShow: false,
searchListPlaceholder: '请选择包装号', searchListPlaceholder: '请选择包装号',
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',
@ -400,8 +671,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber', field: 'containerNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
isTable: false,
isTableForm: false,
tableForm: { tableForm: {
disabled: true disabled: true
} }
@ -411,8 +685,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150,
show: false
}, },
isTable: false,
isTableForm: false,
tableForm: { tableForm: {
disabled: true disabled: true
} }
@ -433,10 +710,12 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inventoryStatus', field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS, dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
isTable: false,
isTableForm: false,
table: { table: {
width: 150 width: 150,
show: false
}, },
tableForm: { tableForm: {
disabled: true disabled: true
@ -526,7 +805,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select' type: 'Select',
disabled: true
} }
}, },
{ {
@ -576,17 +856,6 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
@ -637,25 +906,252 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, tableForm: {
} type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
},
])) ]))
//表单校验 //表单校验
export const ProductscrapRequestDetailRules = reactive({ export const ProductscrapRequestDetailRules = reactive({
packingNumber: [ productionLineCode: [
{ required: true, message: '请选择包装号', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],
batch: [ workStationCode: [
{ required: true, message: '请输入批次', trigger: 'blur' } { required: true, message: '请选择工位代码', trigger: 'change' }
], ],
fromLocationCode: [ processCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' } { required: true, message: '请选择工序代码', trigger: 'change' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
], ],
itemCode: [ itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],
}) })
/**
* @returns {Array} bom
*/
export const ProdcutscrapBomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '行标记',
field: 'rowId',
isTableForm: false,
isForm: false,
tableForm:{
disabled: true
},
table: {
show: false
}
},
{
label: '物品代码',
field: 'itemCode',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
tableForm:{
type: 'Select',
disabled: true
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm:{
disabled: true
}
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
}
]))

Loading…
Cancel
Save