Browse Source

生成退料

master
陈薪名 12 months ago
parent
commit
1b1ece9eb4
  1. 67
      src/api/wms/productionreturnRequestDetailNo/index.ts
  2. 37
      src/api/wms/productionreturnRequestMain/index.ts
  3. 67
      src/api/wms/productionreturnRequestMainNo/index.ts
  4. 26
      src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts
  5. 125
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  6. 503
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  7. 367
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  8. 804
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

67
src/api/wms/productionreturnRequestDetailNo/index.ts

@ -0,0 +1,67 @@
import request from '@/config/axios'
export interface ProductionreturnRequestDetailVO {
productionLineCode: string
workStationCode: string
inventoryStatus: string
fromOwnerCode: string
packingNumber: string
containerNumber: string
batch: string
fromLocationCode: string
number: string
itemCode: string
remark: string
createTime: Date
creator: string
itemName: string
itemDesc1: string
itemDesc2: string
projectCode: string
qty: number
uom: string
updateTime: Date
updater: string
toOwnerCode: string
}
// 查询生产退料申请子列表
export const getProductionreturnRequestDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-request-detail/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-request-detail/page`, params })
}
}
// 查询生产退料申请子详情
export const getProductionreturnRequestDetail = async (id: number) => {
return await request.get({ url: `/wms/productionreturn-request-detail/get?id=` + id })
}
// 新增生产退料申请子
export const createProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => {
return await request.post({ url: `/wms/productionreturn-request-detail/create`, data })
}
// 修改生产退料申请子
export const updateProductionreturnRequestDetail = async (data: ProductionreturnRequestDetailVO) => {
return await request.put({ url: `/wms/productionreturn-request-detail/update`, data })
}
// 删除生产退料申请子
export const deleteProductionreturnRequestDetail = async (id: number) => {
return await request.delete({ url: `/wms/productionreturn-request-detail/delete?id=` + id })
}
// 导出生产退料申请子 Excel
export const exportProductionreturnRequestDetail = async (params) => {
return await request.download({ url: `/wms/productionreturn-request-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productionreturn-request-detail/get-import-template' })
}

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

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

67
src/api/wms/productionreturnRequestMainNo/index.ts

@ -0,0 +1,67 @@
import request from '@/config/axios'
export interface ProductionreturnRequestMainVO {
workshopCode: string
fromWarehouseCode: string
fromLocationTypes: string
fromAreaCodes: string
number: string
businessType: string
remark: string
createTime: Date
creator: string
requestTime: Date
dueTime: Date
departmentCode: string
status: string
updateTime: Date
updater: string
toWarehouseCode: string
toLocationTypes: string
toAreaCodes: string
autoCommit: string
autoAgree: string
autoExecute: string
directCreateRecord: string
}
// 查询生产退料申请主列表
export const getProductionreturnRequestMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-request-main/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-request-main/page`, params })
}
}
// 查询生产退料申请主详情
export const getProductionreturnRequestMain = async (id: number) => {
return await request.get({ url: `/wms/productionreturn-request-main/get?id=` + id })
}
// 新增生产退料申请主
export const createProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => {
return await request.post({ url: `/wms/productionreturn-request-main/create`, data })
}
// 修改生产退料申请主
export const updateProductionreturnRequestMain = async (data: ProductionreturnRequestMainVO) => {
return await request.put({ url: `/wms/productionreturn-request-main/update`, data })
}
// 删除生产退料申请主
export const deleteProductionreturnRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/productionreturn-request-main/delete?id=` + id })
}
// 导出生产退料申请主 Excel
export const exportProductionreturnRequestMain = async (params) => {
return await request.download({ url: `/wms/productionreturn-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productionreturn-request-main/get-import-template' })
}

26
src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts

@ -14,7 +14,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
field: 'code',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isSearch: true
@ -23,9 +22,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
label: '名称',
field: 'name',
sort: 'custom',
table: {
width: 150
},
isSearch: true
},
{
@ -36,9 +32,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '是否可用',
@ -48,9 +41,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: 'TRUE',
@ -69,9 +59,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -91,9 +78,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -112,9 +96,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
@ -131,17 +112,11 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTable: false
},
@ -151,7 +126,6 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
}
}

125
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -67,13 +67,9 @@
:apiUpdate="ProductionreturnRequestDetailApi.updateProductionreturnRequestDetail"
:apiPage="ProductionreturnRequestDetailApi.getProductionreturnRequestDetailPage"
:apiDelete="ProductionreturnRequestDetailApi.deleteProductionreturnRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -104,18 +100,30 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
if(formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
if(formField == 'itemCode') {
// row['packingNumber'] = val[0]['packingNumber']
// row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = val[0]['qty']
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty') {
item.tableForm.max = val[0]['qty']
}
})
} else if(formField == 'workStationCode') {
row['workStationCode'] = val[0]['code']
row['fromLocationCode'] = val[0]['rawLocationCode']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
tableData.value = [] //
formRef.setValues(setV)
}
})
@ -137,10 +145,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({
getListApi: ProductionreturnRequestMainApi.getProductionreturnRequestMainPage //
})
@ -150,28 +154,18 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productionreturn-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productionreturn-request-main:import'}), //
defaultButtons.defaultAddBtn({hasPermi:'wms:productionreturn-request-main:create'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productionreturn-request-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') { //
handleExport()
} else if (val == 'refresh') { //
@ -194,31 +188,66 @@ 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:productionreturn-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productionreturn-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productionreturn-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productionreturn-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productionreturn-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productionreturn-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productionreturn-request-main:handle'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productionreturn-request-main:update'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productionreturn-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:productionreturn-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
ProductionreturnRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
ProductionreturnRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要重新添加吗?')
ProductionreturnRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要重新添加吗?')
ProductionreturnRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
ProductionreturnRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
ProductionreturnRequestMainApi.handle(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
@ -288,6 +317,8 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
// 退 isOK
data.isOK = true
try {
if (formType === 'create') {
await ProductionreturnRequestMainApi.createProductionreturnRequestMain(data)
@ -304,23 +335,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) => {
tableObject.params = {
@ -333,6 +347,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await ProductionreturnRequestMainApi.importTemplate()
})
</script>

503
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts

@ -59,36 +59,6 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}
},
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库位类型范围',
field: 'fromLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '单据号',
field: 'number',
@ -101,53 +71,22 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
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
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
value: '1',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
disabled: true
}
},
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false
}
},
{
label: '申请时间',
@ -193,23 +132,21 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
},
},
{
label: '部门',
field: 'departmentCode',
label: '从库位类型范围',
field: 'fromLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
value: userDept.name,
componentProps: {
disabled: true
}
}
isForm: false,
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
label: '到库位类型范围',
field: 'toLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
@ -217,43 +154,34 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
isForm: false,
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 180
width: 150
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
isForm: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false
isForm: false,
},
{
label: '最后更新者',
field: 'updater',
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: false
isForm: false,
},
{
label: '到仓库代码',
@ -265,27 +193,37 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
isForm: false,
},
{
label: '到库位类型范围',
field: 'toLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isForm: false,
isTable: false
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
form: {
value: userDept.name,
componentProps: {
disabled: true
}
}
},
{
label: '自动提交',
field: 'autoCommit',
@ -366,6 +304,68 @@ export const ProductionreturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
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',
}
},
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '最后更新时间',
field: 'updateTime',
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: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '操作',
field: 'action',
@ -436,6 +436,10 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
}]
}
},
@ -450,6 +454,10 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
}]
},
},
@ -473,6 +481,14 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
},{
key: 'productionLineCode',
value: 'productionLineCode',
isMainValue: true
}]
}
},
@ -487,46 +503,36 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'workshopCode',
value: 'workshopCode',
isMainValue: true
},{
key: 'productionLineCode',
value: 'productionLineCode',
isMainValue: true
}]
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
disabled: true
},
isTableForm: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '包装号',
field: 'packingNumber',
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
@ -535,41 +541,100 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号', // 输入框占位文本
searchField: 'packingNumber', // 查询弹窗赋值字段
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'locationCode',
value: 'fromLocationCode',
isMainValue: true
}]
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装号', // 输入框占位文本
searchField: 'packingNumber', // 查询弹窗赋值字段
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
searchPage: BalanceApi.getBalancePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'locationCode',
value: 'fromLocationCode',
isMainValue: true
}]
},
},
// {
// label: '包装号',
// field: 'packingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
// {
// label: '器具号',
// field: 'containerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// disabled: true
// },
// form: {
// componentProps: {
// disabled: true
// }
// }
// },
{
label: '器具号',
field: 'containerNumber',
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
isTableForm: false,
isForm: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '批次',
field: 'batch',
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
@ -584,8 +649,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
@ -594,27 +659,37 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isForm: false,
},
{
label: '单据号',
field: 'number',
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
isForm: false,
},
{
label: '物品代码',
field: 'itemCode',
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -624,59 +699,48 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
}
},
{
label: '备注',
field: 'remark',
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
tableForm: {
disabled: true
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
disabled: true
}
},
isTableForm: false,
isForm: false
}
},
{
label: '创建者',
field: 'creator',
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
isForm: false,
},
{
label: '物品名称',
field: 'itemName',
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品描述1',
field: 'itemDesc1',
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
@ -685,8 +749,8 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isForm: false,
},
{
label: '物品描述2',
field: 'itemDesc2',
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
@ -695,48 +759,45 @@ export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '数量',
field: 'qty',
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 150
width: 180
},
form: {
component: 'InputNumber',
component: 'DatePicker',
componentProps: {
min: 1,
precision: 6
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
isTableForm: false,
isForm: false
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
isTableForm: false,
isForm: false
},
{
label: '最后更新时间',

367
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -0,0 +1,367 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductionreturnRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductionreturnRequestMain.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 #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="ProductionreturnRequestMainRules"
:formAllSchemas="ProductionreturnRequestMain.allSchemas"
:tableAllSchemas="ProductionreturnRequestDetail.allSchemas"
:tableFormRules="ProductionreturnRequestDetailRules"
:tableData="tableData"
:apiUpdate="ProductionreturnRequestMainNoApi.updateProductionreturnRequestMain"
:apiCreate="ProductionreturnRequestMainNoApi.createProductionreturnRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="ProductionreturnRequestMain.allSchemas"
:detailAllSchemas="ProductionreturnRequestDetail.allSchemas"
:detailAllSchemasRules="ProductionreturnRequestDetailRules"
:apiCreate="ProductionreturnRequestDetailNoApi.createProductionreturnRequestDetail"
:apiUpdate="ProductionreturnRequestDetailNoApi.updateProductionreturnRequestDetail"
:apiPage="ProductionreturnRequestDetailNoApi.getProductionreturnRequestDetailPage"
:apiDelete="ProductionreturnRequestDetailNoApi.deleteProductionreturnRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" :url="importFormUrlRef" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules,ProductionreturnRequestDetail,ProductionreturnRequestDetailRules } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'
import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
// 退
defineOptions({ name: 'ProductionreturnRequestMainNo' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductionreturnRequestMain.allSchemas.tableColumns)
const importFormUrlRef = ref('/wms/productionreturn-request-main/import')
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
if(formField == 'packingNumber') {
row['packingNumber'] = val[0]['packingNumber']
row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch']
row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom']
} else {
row[formField] = val[0][searchField]
}
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
if(formField == 'packingNumber') {
setV['packingNumber'] = val[0]['packingNumber']
setV['containerNumber'] = val[0]['containerNumber']
setV['batch'] = val[0]['batch']
setV['itemCode'] = val[0]['itemCode']
setV['uom'] = val[0]['uom']
} else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
})
}
const { tableObject, tableMethods } = useTable({
getListApi: ProductionreturnRequestMainNoApi.getProductionreturnRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
{
label: '新增合格',
name: 'xzhg',
hide: false,
type: 'primary',
icon: 'ep:plus',
color: '',
hasPermi:'wms:productionreturn-request-main:create'
},
{
label: '新增不合格',
name: 'xzbhg',
hide: false,
type: 'primary',
icon: 'ep:plus',
color: '',
hasPermi:'wms:productionreturn-request-main:create'
},
{
label: '导入合格',
name: 'drhg',
hide: false,
type: 'warning',
icon: 'ep:upload',
color: '',
hasPermi:'wms:productionreturn-request-main:import'
},
{
label: '导入不合格',
name: 'drbhg',
hide: false,
type: 'warning',
icon: 'ep:upload',
color: '',
hasPermi:'wms:productionreturn-request-main:import'
},
defaultButtons.defaultExportBtn({hasPermi:'wms:productionreturn-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'xzhg') { //
openForm('create')
} else if (val == 'xzbhg') { //
openForm('create')
} else if (val == 'drhg') { //
handleImport()
} else if (val == 'drbhg') { //
importFormUrlRef.value = '/wms/productionreturn-request-main/importNO'
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
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:productionreturn-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:productionreturn-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await ProductionreturnRequestMainNoApi.deleteProductionreturnRequestMain(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 ProductionreturnRequestMainNoApi.exportProductionreturnRequestMain(setSearchParams)
download.excel(data, '生产退料申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await ProductionreturnRequestMainNoApi.createProductionreturnRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductionreturnRequestMainNoApi.updateProductionreturnRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = 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 ProductionreturnRequestMainNoApi.importTemplate()
})
</script>

804
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -0,0 +1,804 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as BalanceApi from '@/api/wms/balance'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = {
pageSize:10,
pageNo:1,
code:'MaterialReturnRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
/**
* @returns {Array} 退
*/
export const ProductionreturnRequestMain = 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: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库位类型范围',
field: 'fromLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '从库区代码范围',
field: 'fromAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150,
fixed: 'left'
},
isForm: false,
isSearch: true,
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
isTable: false
},
{
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',
}
},
isForm: false
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '申请时间',
field: 'requestTime',
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: 'dueTime',
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',
}
},
},
{
label: '部门',
field: 'departmentCode',
sort: 'custom',
table: {
width: 150
},
form: {
value: userDept.name,
componentProps: {
disabled: true
}
}
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '最后更新时间',
field: 'updateTime',
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: 'updater',
sort: 'custom',
table: {
width: 150
},
isForm: false
},
{
label: '到仓库代码',
field: 'toWarehouseCode',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '到库位类型范围',
field: 'toLocationTypes',
dictType: DICT_TYPE.LOCATION_TYPE,
dictClass: 'string',
isSearch: true,
isTable: true,
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '到库区代码范围',
field: 'toAreaCodes',
sort: 'custom',
table: {
width: 150
},
isForm: false,
},
{
label: '自动提交',
field: 'autoCommit',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoCommit,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
}
}
},
{
label: '自动通过',
field: 'autoAgree',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoAgree,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
}
}
},
{
label: '自动执行',
field: 'autoExecute',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.autoExecute,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
}
}
},
{
label: '直接生成记录',
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
form: {
component: 'Switch',
value: requestsettingData.directCreateRecord,
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
}
]))
//表单校验
export const ProductionreturnRequestMainRules = reactive({
// fromWarehouseCode: [
// { required: true, message: '请输入从仓库代码', trigger: 'blur' }
// ],
// fromLocationTypes: [
// { required: true, message: '请选择从库位类型范围', trigger: 'change' }
// ],
// toWarehouseCode: [
// { required: true, message: '请输入到仓库代码', trigger: 'blur' }
// ],
// toLocationTypes: [
// { required: true, message: '请选择到库位类型范围', trigger: 'change' }
// ],
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
})
/**
* @returns {Array} 退
*/
export const ProductionreturnRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '到货主代码',
field: 'toOwnerCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择包装号', // 输入框占位文本
searchField: 'packingNumber', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
}
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择包装号', // 输入框占位文本
searchField: 'packingNumber', // 查询弹窗赋值字段
searchTitle: '库存余额信息', // 查询弹窗标题
searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类
searchPage: BalanceApi.getBalancePage // 查询弹窗所需分页方法
},
},
{
label: '器具号',
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
},
form: {
componentProps: {
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: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
field: 'updateTime',
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: 'updater',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
//表单校验
export const ProductionreturnRequestDetailRules = reactive({
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
// fromLocationCode: [
// { required: true, message: '请输入从库位代码', trigger: 'blur' }
// ],
itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' }
],
})
Loading…
Cancel
Save