Browse Source

制品报废记录修改

master
zhaoxuebing 12 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) => {
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 = () => {
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',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
isTableForm: false,
isForm: false,
},
{
label: '生产线代码',
label: '返修生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
@ -503,7 +504,7 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
}
},
{
label: '工位代码',
label: '返修工位代码',
field: 'workStationCode',
sort: 'custom',
table: {

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

@ -1,5 +1,25 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
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}
@ -19,7 +39,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'jobNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show:false
},
isSearch: true
},
@ -39,6 +60,30 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
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: '执行时间',
field: 'executeTime',
@ -205,7 +250,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -307,7 +353,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -315,7 +362,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -323,7 +371,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -331,9 +380,42 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch',
sort: 'custom',
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: '从库位代码',
field: 'fromLocationCode',
@ -410,14 +492,6 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
@ -535,6 +609,22 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
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"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@buttonOperationClick="buttonOperationClick"
/>
<!-- 详情 -->
@ -69,8 +70,31 @@
:apiDelete="ProductscrapRequestDetailApi.deleteProductscrapRequestDetail"
:Echo="Echo"
@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"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@ -78,10 +102,12 @@
<script setup lang="ts">
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 ProductscrapRequestDetailApi from '@/api/wms/productscrapRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle";
import {getProductscrapBomDismantlePage} from "@/api/wms/bomDismantle";
//
defineOptions({ name: 'ProductscrapRequestMain' })
@ -94,6 +120,86 @@ const routeName = ref()
routeName.value = route.name
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) => {
tableColumns.value = val
@ -104,14 +210,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
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']
if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
}else if(formField == 'workStationCode'){
row['workStationCode'] = val[0]['code']
}else if(formField == 'processCode'){
row['processCode'] = val[0]['code']
}else if(formField == 'itemCode'){
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 {
const setV = {}
setV[formField] = val[0][searchField]
@ -148,7 +265,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
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.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -191,30 +308,37 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productscrap-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productscrap-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:productscrap-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:productscrap-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:productscrap-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:productscrap-request-main:handle'}), //
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) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} 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 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 {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 userDept = userStore.userSelfInfo.dept
@ -25,14 +44,89 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array}
*/
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: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
isForm: false,
isTable: false
},
{
label: '从库位类型范围',
@ -83,13 +177,22 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
},
{
label: '备注',
field: 'remark',
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTable: false,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '创建时间',
@ -166,37 +269,29 @@ export const ProductscrapRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
},
{
label: '部门',
field: 'departmentCode',
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
form: {
value: userDept.name,
componentProps: {
disabled: true
}
}
isTable: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
value: userDept.name,
componentProps: {
disabled: true
}
}
},
{
label: '最后更新时间',
field: 'updateTime',
@ -363,20 +458,196 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
isForm: false,
isTableForm: false,
},
{
label: '包装号',
field: 'packingNumber',
label: '来源生产线代码',
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',
table: {
width: 150
},
tableForm:{
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: '请选择包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
@ -400,8 +671,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
isTable: false,
isTableForm: false,
tableForm: {
disabled: true
}
@ -411,8 +685,11 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
isTable: false,
isTableForm: false,
tableForm: {
disabled: true
}
@ -433,10 +710,12 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
isTable: false,
isTableForm: false,
table: {
width: 150
width: 150,
show: false
},
tableForm: {
disabled: true
@ -526,7 +805,8 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
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: '备注',
field: 'remark',
@ -637,25 +906,252 @@ export const ProductscrapRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150,
fixed: 'right'
},
isTableForm:false,
}
tableForm: {
type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
},
]))
//表单校验
export const ProductscrapRequestDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
processCode: [
{ required: true, message: '请选择工序代码', trigger: 'change' }
],
itemCode: [
{ 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