yejiaxing 12 months ago
parent
commit
8bd3167225
  1. 7
      src/api/wms/countJobMain/index.ts
  2. 35
      src/api/wms/countPlanMain/index.ts
  3. 32
      src/api/wms/countRequestMain/index.ts
  4. 67
      src/api/wms/productionreturnRequestDetailNo/index.ts
  5. 37
      src/api/wms/productionreturnRequestMain/index.ts
  6. 67
      src/api/wms/productionreturnRequestMainNo/index.ts
  7. 7
      src/api/wms/purchasereceiptJobMain/index.ts
  8. 7
      src/api/wms/purchasereceiptRequestMain/index.ts
  9. 2
      src/components/Form/src/Form.vue
  10. 26
      src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts
  11. 18
      src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts
  12. 18
      src/views/wms/countManage/count/countJobMain/index.vue
  13. 83
      src/views/wms/countManage/count/countPlanMain/index.vue
  14. 90
      src/views/wms/countManage/count/countRequestMain/index.vue
  15. 33
      src/views/wms/issueManage/issue/issueRequestMain/index.vue
  16. 63
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  17. 125
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  18. 503
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts
  19. 367
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  20. 804
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  21. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
  22. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

7
src/api/wms/countJobMain/index.ts

@ -79,4 +79,9 @@ export const exportCountJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/count-job-main/get-import-template' })
}
}
// 关闭盘点任务主
export const closeCountJobMain = (id: number) => {
return request.download({ url: '/wms/count-job-main/close?id=' + id })
}

35
src/api/wms/countPlanMain/index.ts

@ -66,4 +66,39 @@ export const exportCountPlanMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/count-plan-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/count-plan-main/close?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/count-plan-main/submit?id=' + id })
}
// 打开
export const open = (id) => {
return request.put({ url: '/wms/count-plan-main/open?id=' + id })
}
// 驳回
export const reject = (id) => {
return request.put({ url: '/wms/count-plan-main/reject?id=' + id })
}
// 通过
export const agree = (id) => {
return request.put({ url: '/wms/count-plan-main/agree?id=' + id })
}
// 发布
export const publish = (id) => {
return request.put({ url: '/wms/count-plan-main/publish?id=' + id })
}
// 重置
export const resetting = (id) => {
return request.put({ url: '/wms/count-plan-main/resetting?id=' + id })
}

32
src/api/wms/countRequestMain/index.ts

@ -61,4 +61,34 @@ export const exportCountRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/count-request-main/get-import-template' })
}
}
// 关闭盘点申请主 Excel
export const closeCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/close?id=` + id })
}
// 重新添加盘点申请主 Excel
export const reAddCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/reAdd?id=` + id })
}
// 提交盘点申请主 Excel
export const submitCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/submit?id=` + id })
}
// 审批通过盘点申请主 Excel
export const agreeCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/agree?id=` + id })
}
// 审批驳回盘点申请主 Excel
export const refusedCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/refused?id=` + id })
}
// 处理盘点申请主 Excel
export const handleCountRequestMain = async (id) => {
return await request.put({ url: `/wms/count-request-main/handle?id=` + id })
}

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

7
src/api/wms/purchasereceiptJobMain/index.ts

@ -80,7 +80,12 @@ export const deletePurchasereceiptJobMain = async (id: number) => {
// 导出采购收货任务主 Excel
export const exportPurchasereceiptJobMain = async (params) => {
return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-job-main/export-excel`, params })
}
}
// 下载用户导入模板

7
src/api/wms/purchasereceiptRequestMain/index.ts

@ -64,7 +64,12 @@ export const deletePurchasereceiptRequestMain = async (id: number) => {
// 导出采购收货申请主 Excel
export const exportPurchasereceiptRequestMain = async (params) => {
return await request.download({ url: `/wms/purchasereceipt-request-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/purchasereceipt-request-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/purchasereceipt-request-main/export-excel`, params })
}
}
// 下载用户导入模板

2
src/components/Form/src/Form.vue

@ -228,7 +228,7 @@ export default defineComponent({
formItemSlotsSearchList[item.field] = () => {
return (
<>
<ElTooltip placement="top" content={formModel.value[item.field]} visible={formModel.value[item.field]}>
<ElTooltip placement="top" content={formModel.value[item.field]} >
<ElInput class={'myInput'} v-model={formModel.value[item.field]} placeholder={item?.componentProps?.searchListPlaceholder} disabled={true} />
</ElTooltip>
<ElButton icon={Search} onClick={()=>{

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

18
src/views/wms/basicDataManage/strategySetting/rule/rule.data.ts

@ -26,12 +26,12 @@ export const Rule = useCrudSchemas(reactive<CrudSchema[]>([
}
},
},
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch:true
},
// {
// label: '代码',
// field: 'code',
// sort: 'custom',
// isSearch:true
// },
{
label: '名称',
field: 'name',
@ -68,9 +68,9 @@ export const RuleRules = reactive({
priority: [
{ required: true, message: '请输入优先级', trigger: 'blur' }
],
code: [
{ required: true, message: '请输入代码', trigger: 'blur' }
],
// code: [
// { required: true, message: '请输入代码', trigger: 'blur' }
// ],
configuration: [
{ required: true, message: '请输入配置', trigger: 'blur' }
],

18
src/views/wms/countManage/count/countJobMain/index.vue

@ -174,9 +174,9 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-job-main:close'}), //
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -188,12 +188,22 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await CountJobMainApi.closeCountJobMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {

83
src/views/wms/countManage/count/countPlanMain/index.vue

@ -53,7 +53,7 @@
:tableData="tableData"
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
:isBusiness="true"
:isBusiness="false"
fromeWhere="countPlan"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@ -204,14 +204,14 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), //
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-plan-main:open'}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:count-plan-main:close'}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:submit'}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:reject'}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-plan-main:agree'}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-plan-main:publish'}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:count-plan-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-plan-main:update'}), //
]
}
@ -219,16 +219,61 @@ const butttondata = (row) => {
// -
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('列表-操作按钮事件-审批通过')
if (val == 'mainPlanOpe') { //
CountPlanMainApi.open(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanClo') { //
await message.confirm('确认要关闭吗?')
CountPlanMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanSub') { //
await message.confirm('确认要提交审批吗?')
CountPlanMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?')
CountPlanMainApi.reject(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?')
CountPlanMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?')
CountPlanMainApi.publish(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?')
CountPlanMainApi.resetting(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') { //

90
src/views/wms/countManage/count/countRequestMain/index.vue

@ -192,34 +192,32 @@ 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:count-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:count-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:count-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:count-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:update'}), //
]
}
// -
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') { //
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
@ -230,6 +228,66 @@ const openForm =async (type: string, row?: number) => {
formRef.value.open(type, row)
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await CountRequestMainApi.closeCountRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await CountRequestMainApi.reAddCountRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await CountRequestMainApi.agreeCountRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await CountRequestMainApi.refusedCountRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await CountRequestMainApi.handleCountRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await CountRequestMainApi.submitCountRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {

33
src/views/wms/issueManage/issue/issueRequestMain/index.vue

@ -68,6 +68,7 @@
:apiPage="IssueRequestDetailApi.getIssueRequestDetailPage"
:apiDelete="IssueRequestDetailApi.deleteIssueRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
:detailValidate="detailValidate"
/>
<!-- 导入 -->
@ -294,7 +295,13 @@ const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
// 线
let tableForm = JSON.parse(JSON.stringify(tableFormKeys))
if (tableData.value.length > 0) {
tableForm.productionLineCode = tableData.value[0].productionLineCode
tableForm.workStationCode = tableData.value[0].workStationCode
}
tableData.value.push(tableForm)
}
//
const handleDeleteTable = (item, index) => {
@ -304,6 +311,23 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
// 线
if (tableData.value.length > 0) {
let productionLineCode = tableData.value[0].productionLineCode
let workStationCode = tableData.value[0].workStationCode
for(var i=0;i<tableData.value.length;i++) {
if(productionLineCode !== tableData.value[i].productionLineCode){
message.warning('子表数据:生产线存在不同数据,请修改成统一数据!')
formRef.value.formLoading = false
return;
}
if(workStationCode !== tableData.value[i].workStationCode){
message.warning('子表数据:工位存在不同数据,请修改成统一数据!')
formRef.value.formLoading = false
return;
}
}
}
try {
if (formType === 'create') {
await IssueRequestMainApi.createIssueRequestMain(data)
@ -320,6 +344,13 @@ const submitForm = async (formType, data) => {
}
}
// /
const detailValidate = async (data) => {
// let rs = false
// TODO: /线
return true
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {

63
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -14,6 +14,9 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -34,24 +37,6 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array}
*/
export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
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: 'workshopCode',
@ -76,6 +61,24 @@ export const IssueRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
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: 'fromWarehouseCode',
@ -596,15 +599,11 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isInpuFocusShow: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
@ -615,15 +614,11 @@ export const IssueRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '生产线物品信息', // 查询弹窗标题
searchAllSchemas: Productionlineitem.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineitemApi.getProductionlineitemPage, // 查询弹窗所需分页方法
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productionLineCode',
value:'productionLineCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false

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

2
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue

@ -210,7 +210,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(setSearchParams)
const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(tableObject.params)
download.excel(data, '采购收货任务主.xlsx')
} catch {
} finally {

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

@ -297,7 +297,7 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(setSearchParams)
const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params)
download.excel(data, '采购收货申请主.xlsx')
} catch {
} finally {

Loading…
Cancel
Save