Browse Source

拆解申请

master
陈薪名 12 months ago
parent
commit
e5a5778209
  1. 5
      src/api/wms/bomDismantle/index.ts
  2. 4
      src/api/wms/dismantleRequestDetailb/index.ts
  3. 37
      src/api/wms/productdismantleRequestMain/index.ts
  4. 232
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  5. 463
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.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 getDetailbBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/dismantle-request-detailb/bomPage`, params })
}

4
src/api/wms/dismantleRequestDetailb/index.ts

@ -41,8 +41,8 @@ export const createDismantleRequestDetailb = async (data: DismantleRequestDetail
} }
// 修改制品拆解申请子 // 修改制品拆解申请子
export const updateDismantleRequestDetailb = async (data: DismantleRequestDetailbVO) => { export const updateDismantleRequestDetailb = async (id, data) => {
return await request.put({ url: `/wms/dismantle-request-detailb/update`, data }) return await request.post({ url: `/wms/dismantle-request-detailb/update?id=`+id, data })
} }
// 删除制品拆解申请子 // 删除制品拆解申请子

37
src/api/wms/productdismantleRequestMain/index.ts

@ -57,10 +57,45 @@ export const deleteProductdismantleRequestMain = async (id: number) => {
// 导出制品拆解申请主 Excel // 导出制品拆解申请主 Excel
export const exportProductdismantleRequestMain = async (params) => { export const exportProductdismantleRequestMain = async (params) => {
return await request.download({ url: `/wms/productdismantle-request-main/export-excel`, params }) if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productdismantle-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/productdismantle-request-main/export-excel`, params })
}
} }
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/productdismantle-request-main/get-import-template' }) return request.download({ url: '/wms/productdismantle-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/productdismantle-request-main/handle?id=' + id })
} }

232
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -54,6 +54,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@buttonOperationClick="buttonOperationClick"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -67,21 +68,42 @@
:apiUpdate="ProductdismantleRequestDetailApi.updateProductdismantleRequestDetaila" :apiUpdate="ProductdismantleRequestDetailApi.updateProductdismantleRequestDetaila"
:apiPage="ProductdismantleRequestDetailApi.getProductdismantleRequestDetailaPage" :apiPage="ProductdismantleRequestDetailApi.getProductdismantleRequestDetailaPage"
:apiDelete="ProductdismantleRequestDetailApi.deleteProductdismantleRequestDetaila" :apiDelete="ProductdismantleRequestDetailApi.deleteProductdismantleRequestDetaila"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/> />
<!-- 导入 --> <!-- bom列表 -->
<ImportForm ref="importFormRef" url="/wms/productdismantle-request-main/import" :importTemplateData="importTemplateData" <Dialog
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> :title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<TableForm
ref="tableFormRef"
class="w-[100%]"
:tableFields="BomDismantle.allSchemas.tableColumns"
:tableData="detatableDataBom.tableList"
:isShowButton="false"
:isShowReduceButton="false"
/>
<template #footer>
<ButtonBase :Butttondata="ButttondataBom" @button-base-click="buttonBaseClickBom" />
</template>
</Dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductdismantleRequestMain,ProductdismantleRequestMainRules,ProductdismantleRequestDetaila,ProductdismantleRequestDetailaRules } from './productdismantleRequestMain.data' import { ProductdismantleRequestMain,ProductdismantleRequestMainRules,ProductdismantleRequestDetaila,ProductdismantleRequestDetailaRules,BomDismantle } from './productdismantleRequestMain.data'
import * as ProductdismantleRequestMainApi from '@/api/wms/productdismantleRequestMain' import * as ProductdismantleRequestMainApi from '@/api/wms/productdismantleRequestMain'
import * as ProductdismantleRequestDetailApi from '@/api/wms/productdismantleRequestDetaila' import * as ProductdismantleRequestDetailApi from '@/api/wms/productdismantleRequestDetaila'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from '@/api/wms/bomDismantle'
import * as dismantleRequestDetailbApi from '@/api/wms/dismantleRequestDetailb'
// //
@ -95,6 +117,96 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProductdismantleRequestMain.allSchemas.tableColumns) const tableColumns = ref(ProductdismantleRequestMain.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 lsBomSave = ref()
const rowId = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getDetailbBomDismantlePage
})
const { getList:getDetailListBom } = detatableMethodsBom
/** bom 列表 表单 按钮 */
const ButttondataBom = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
// bom
const buttonBaseClickBom = async (val) => {
//
if (val == 'save') {
// bom
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0))
if (lsBomSave.value) {
//
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
item.childList = tableListBom.value
}
})
} else {
// bom
await dismantleRequestDetailbApi.updateDismantleRequestDetailb(rowId.value, tableListBom.value)
message.success(t('common.updateSuccess'))
}
bomModelVisible.value = false
}
//
else if (val == 'close') {
bomModelVisible.value = false
}
}
// tableform bom
const buttonOperationClick = async (row, label, index)=> {
if (row.itemCode == '') {
message.warning('请选择物品代码!')
return
}
detatableDataBom.params.itemCode = row.itemCode
detatableDataBom.params.masterId = ''
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
}
rowId.value = row.id
await getDetailListBom()
}
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -111,6 +223,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packingNumber'] = val[0]['packingNumber'] row['packingNumber'] = val[0]['packingNumber']
row['batch'] = val[0]['batch'] row['batch'] = val[0]['batch']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['qty'] = val[0]['qty']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode'] row['fromLocationCode'] = val[0]['locationCode']
row['produceDate'] = val[0]['produceDate'] row['produceDate'] = val[0]['produceDate']
@ -135,6 +248,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['packingNumber'] = val[0]['packingNumber'] setV['packingNumber'] = val[0]['packingNumber']
setV['batch'] = val[0]['batch'] setV['batch'] = val[0]['batch']
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
setV['qty'] = val[0]['qty']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['fromLocationCode'] = val[0]['locationCode'] setV['fromLocationCode'] = val[0]['locationCode']
setV['produceDate'] = val[0]['produceDate'] setV['produceDate'] = val[0]['produceDate']
@ -143,10 +257,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
}) })
} }
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: ProductdismantleRequestMainApi.getProductdismantleRequestMainPage // getListApi: ProductdismantleRequestMainApi.getProductdismantleRequestMainPage //
}) })
@ -156,28 +266,17 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productdismantle-request-main:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:productdismantle-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productdismantle-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productdismantle-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:productdismantle-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
openForm('create') openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
@ -199,31 +298,68 @@ 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:productdismantle-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productdismantle-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productdismantle-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productdismantle-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productdismantle-request-main:handle'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:productdismantle-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productdismantle-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productdismantle-request-main:delete'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productdismantle-request-main:update'}), //
] // defaultButtons.mainListDeleteBtn({hasPermi:'wms:productdismantle-request-main:delete'}), //
]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') await message.confirm('确认要关闭吗?')
ProductdismantleRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') await message.confirm('确认要重新添加吗?')
ProductdismantleRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') await message.confirm('确认要提交审批吗?')
ProductdismantleRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') await message.confirm('确认要驳回吗?')
ProductdismantleRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') await message.confirm('确认要审批通过吗?')
ProductdismantleRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
ProductdismantleRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -233,14 +369,18 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
// / Detailb
lsBomSave.value = true
formRef.value.open(type, row) formRef.value.open(type, row)
} }
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
lsBomSave.value = false
detailRef.value.openDetail(row, titleName, titleValue) detailRef.value.openDetail(row, titleName, titleValue)
} }
@ -310,23 +450,6 @@ const submitForm = async (formType, data) => {
} }
} }
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '制品拆解申请主导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {
@ -339,6 +462,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await ProductdismantleRequestMainApi.importTemplate()
}) })
</script> </script>

463
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -421,24 +421,15 @@ export const ProductdismantleRequestMainRules = reactive({
// fromAreaCodes: [ // fromAreaCodes: [
// { required: true, message: '请选择从库区代码范围', trigger: 'change' } // { required: true, message: '请选择从库区代码范围', trigger: 'change' }
// ], // ],
departmentCode: [ workshopCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请选择车间', trigger: 'change' }
], ],
autoCommit: [ team: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择班组', trigger: 'change' }
], ],
autoAgree: [ shift: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' } { required: true, message: '请选择班次', trigger: 'change' }
], ],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
}) })
/** /**
@ -599,6 +590,42 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
} }
} }
}, },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps:{
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'InputNumber',
min: 1,
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
}
},
{ {
label: '器具号', label: '器具号',
field: 'containerNumber', field: 'containerNumber',
@ -606,6 +633,11 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps:{
disabled: true
}
},
tableForm: { tableForm: {
disabled: true disabled: true
} }
@ -617,6 +649,11 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps:{
disabled: true
}
},
tableForm: { tableForm: {
disabled: true disabled: true
} }
@ -639,6 +676,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
disabled: true
} }
}, },
tableForm: { tableForm: {
@ -665,6 +703,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
disabled: true
} }
}, },
tableForm: { tableForm: {
@ -683,6 +722,11 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps:{
disabled: true
}
},
tableForm: { tableForm: {
disabled: true, disabled: true,
type: 'Select' type: 'Select'
@ -728,6 +772,11 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
form: {
componentProps:{
disabled: true
}
},
tableForm: { tableForm: {
disabled: true disabled: true
} }
@ -746,58 +795,7 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
} }
} }
}, },
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
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',
}
},
isTableForm: false,
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{ {
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
@ -838,39 +836,67 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
{ {
label: '数量', label: '计量单位',
field: 'qty', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm:{ form: {
type: 'InputNumber', componentProps:{
min: 1, disabled: true
precision: 6 }
},
tableForm: {
type: 'Select',
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
}, },
form: { form: {
component: 'InputNumber', component: 'DatePicker',
componentProps: { componentProps: {
min: 1, style:{width:'100%'},
precision: 6 type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
} }
} },
isTableForm: false,
isForm: false
}, },
{ {
label: '计量单位', label: '创建者',
field: 'uom', field: 'creator',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { isTableForm: false,
type: 'Select' isForm: false
}
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -914,7 +940,12 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
width: 150, width: 150,
fixed: 'right' fixed: 'right'
}, },
isTableForm:false, isTableForm:true,
tableForm: {
type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
} }
])) ]))
@ -923,27 +954,15 @@ export const ProductdismantleRequestDetailaRules = reactive({
productionLineCode: [ productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } { required: true, message: '请选择生产线代码', trigger: 'change' }
], ],
// packingNumber: [ packingNumber: [
// { required: true, message: '请选择包装号', trigger: 'change' } { required: true, message: '请选择包装号', trigger: 'change' }
// ], ],
batch: [ batch: [
{ required: true, message: '请输入批次', trigger: 'blur' } { required: true, message: '请输入批次', trigger: 'blur' }
], ],
// produceDate: [ workStationCode: [
// { required: true, message: '请选择生产日期', trigger: 'change' } { required: true, message: '请选择工位代码', trigger: 'change' }
// ], ],
// expireDate: [
// { required: true, message: '请选择到货日期', trigger: 'change' }
// ],
// inventoryStatus: [
// { required: true, message: '请选择库存状态', trigger: 'change' }
// ],
// stdPackQty: [
// { required: true, message: '请输入标包数量', trigger: 'blur' }
// ],
// stdPackUnit: [
// { required: true, message: '请选择标包单位', trigger: 'change' }
// ],
itemCode: [ itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],
@ -1111,4 +1130,238 @@ export const DismantleRequestDetailbRules = reactive({
creator: [ creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' } { required: true, message: '请输入创建者', trigger: 'blur' }
], ],
}) })
/**
* @returns {Array} bom
*/
export const BomDismantle = 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,
show: false
},
isTableForm: false,
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180,
show: false
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isTableForm: false,
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150,
show: false
},
isTableForm: false,
tableForm:{
disabled: true
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180,
show: false
},
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,
show: false
},
tableForm:{
disabled: true
}
}
]))
Loading…
Cancel
Save