陈薪名 11 months ago
parent
commit
f3cc832062
  1. 20
      src/api/wms/bomDismantle/index.ts
  2. 20
      src/api/wms/inventorymoveJobMain/index.ts
  3. 30
      src/api/wms/inventorymoveRequestMain/index.ts
  4. 32
      src/api/wms/productscrapRequestMain/index.ts
  5. 26
      src/api/wms/purchaseclaimRequestMain/index.ts
  6. 7
      src/api/wms/supplierdeliverRecordDetail/index.ts
  7. 5
      src/api/wms/supplierinvoiceRequestMain/index.ts
  8. 5
      src/components/SearchTable/src/SearchTable.vue
  9. 24
      src/utils/disposition/defaultButtons.ts
  10. 293
      src/views/wms/countManage/count/countRequestMain/index.vue
  11. 73
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue
  12. 31
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  13. 91
      src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue
  14. 123
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue
  15. 44
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts
  16. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  17. 110
      src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
  18. 346
      src/views/wms/productionManage/productscrap/productscrapRecordMain/productscrapRecordMain.data.ts
  19. 222
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  20. 596
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts
  21. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts
  22. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  23. 30
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts
  24. 143
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue
  25. 30
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts
  26. 24
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

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

@ -10,6 +10,26 @@ export const getBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productrepair-record-main/bomPage`, params })
}
// 查询制品报废申请子列表
export const getProductscrapBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
}
// 查询制品报废申请子列表
export const getProductscrapBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productscrap-record-main/bomPage`, params })
}
// 查询制品报废申请子列表
export const getProductscrapBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/productscrap-request-main/bomPage`, params })
}
// 查询制品报废申请子列表
export const getProductscrapBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productscrap-record-main/bomPage`, params })
}
// 查询制品拆解申请子列表
export const getDetailbBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/dismantle-request-detailb/bomPage`, params })

20
src/api/wms/inventorymoveJobMain/index.ts

@ -80,4 +80,24 @@ export const exportInventorymoveJobMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-job-main/get-import-template' })
}
// 承接库存转移任务
export const acceptInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/accept?id=` + id })
}
// 放弃库存转移任务
export const abandonInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/abandon?id=` + id })
}
// 关闭库存转移任务
export const closeInventorymoveMain = async (id) => {
return await request.put({ url: `/wms/inventorymove-job-main/close?id=` + id })
}
// 执行库存转移任务
export const executeInventorymoveMain = async (data) => {
return await request.put({ url: `/wms/inventorymove-job-main/execute`, data})
}

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

@ -64,4 +64,34 @@ export const exportInventorymoveRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template' })
}
// 关闭
export const close = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/close?id=' + id })
}
// 重新添加
export const reAdd = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/reAdd?id=' + id })
}
// 提交审批
export const submit = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/submit?id=' + id })
}
// 驳回
export const refused = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/refused?id=' + id })
}
// 审批通过
export const agree = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/agree?id=' + id })
}
// 处理
export const handle = (id) => {
return request.put({ url: '/wms/inventorymove-request-main/handle?id=' + id })
}

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

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

26
src/api/wms/purchaseclaimRequestMain/index.ts

@ -51,6 +51,30 @@ export const deletePurchaseclaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseclaim-request-main/delete?id=` + id })
}
// 打开供应商发货申请主
export const opePurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/open?id=` + id })
}
// 关闭供应商发货申请主
export const cloPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/close?id=` + id })
}
// 提交审批供应商发货申请主
export const subPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/sub?id=` + id })
}
// 审批通过供应商发货申请主
export const appPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/app?id=` + id })
}
// 驳回供应商发货申请主
export const rejPurchaseclaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/rej?id=` + id })
}
// 处理
export const genRecordsPurchaseclaimRequestMain = async (id) => {
return await request.post({ url: `/wms/purchaseclaim-request-main/genRecords?id=` + id })
}
// 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, params })
@ -59,4 +83,4 @@ export const exportPurchaseclaimRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseclaim-request-main/get-import-template' })
}
}

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

@ -51,6 +51,11 @@ export const getSupplierdeliverRecordDetailPage = async (params) => {
}
}
// 查询采供应商发货记录子列表
export const getSupplierdeliverRecordDetailList = async (params) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/allList`, params })
}
// 查询供应商发货记录子详情
export const getSupplierdeliverRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/get?id=` + id })
@ -79,4 +84,4 @@ export const exportSupplierdeliverRecordDetail = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-detail/get-import-template' })
}
}

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

@ -55,8 +55,3 @@ export const deleteSupplierinvoiceRequestMain = async (id: number) => {
export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-main/get-import-template' })
}

5
src/components/SearchTable/src/SearchTable.vue

@ -67,7 +67,7 @@ const typeRef = ref()
const rowRef = ref()
const allSchemasRef = ref()
const multipleBol = ref(false)
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any ) => {
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => {
searchDialogVisible.value = true
formFieldRef.value = formField
searchFieldRef.value = searchField
@ -84,7 +84,8 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getListApi: getPage.value //
})
tableObjectRef.value = tableObject
if (searchCondition) tableObjectRef.value.params = searchCondition
if (searchCondition) tableObjectRef.value.params = searchCondition;
//
const { getList, setSearchParams } = tableMethods
setSearchParamsRef.value = setSearchParams

24
src/utils/disposition/defaultButtons.ts

@ -699,6 +699,30 @@ export function mainCountAdjustRequesttBtn(option:any) {
hasPermi: ''
})
}
// 主列表-重盘
export function mainReCountBtn(option:any) {
return __defaultBtnOption(option,{
label: '重盘',
name: 'mainReCount',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-监盘
export function mainSuperviseCountBtn(option:any) {
return __defaultBtnOption(option,{
label: '监盘',
name: 'mainSuperviseCount',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {

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

@ -1,18 +1,22 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="CountRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search
:schema="CountRequestMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CountRequestMain.allSchemas"
/>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CountRequestMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
@ -27,13 +31,16 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{row}">
<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)" />
<ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
@ -73,16 +80,34 @@
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/count-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<ImportForm
ref="importFormRef"
url="/wms/count-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
<SearchTable
ref="searchTableRef"
@searchTableSuccess="searchTableSuccess"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CountRequestMain,CountRequestMainRules,CountRequestDetail,CountRequestDetailRules } from './countRequestMain.data'
import {
CountRequestMain,
CountRequestMainRules,
CountRequestDetail,
CountRequestDetailRules
} from './countRequestMain.data'
import * as CountRequestMainApi from '@/api/wms/countRequestMain'
import * as CountRequestDetailApi from '@/api/wms/countRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { SearchTable } from '@/components/SearchTable'
//
defineOptions({ name: 'CountRequestMain' })
@ -102,16 +127,16 @@ const updataTableColumns = (val) => {
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
@ -137,7 +162,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: CountRequestMainApi.getCountRequestMainPage //
@ -150,10 +175,10 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:count-request-main:export'}), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:count-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
@ -166,102 +191,192 @@ const HeadButttondata = [
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') { //
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') { //
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') { //
} else if (val == 'refresh') {
//
getList()
} else if (val == 'filtrate') { //
} else { //
} else if (val == 'filtrate') {
//
} else if (val == 'mainReCount') {
//
} else if (val == 'mainSuperviseCount') {
//
} else {
//
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
//
const isShowReCountMainButton = (row, val) => {
if (row.jobStatus1 == 3 && (row.jobStatus2 == null || row.jobStatus2 == 3)) {
return false
} else {
return true
}
}
const searchTableRef = ref()
// -
const butttondata = (row) => {
return [
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'}), //
]
return [
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'
}), //
defaultButtons.mainReCountBtn({
hide: isShowReCountMainButton(row, ['1']),
hasPermi: 'wms:count-request-main:reCount'
}), //
defaultButtons.mainSuperviseCountBtn({
hide: isShowReCountMainButton(row, ['1']),
hasPermi: 'wms:count-request-main:supervise'
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log(val)
if (val == 'mainClose') {
//
await message.confirm('确认要关闭吗?')
CountRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
CountRequestMainApi.close(row.id)
.then(() => {
message.success(t('关闭成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainReAdd') {
//
await message.confirm('确认要重新添加吗?')
CountRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
CountRequestMainApi.reAdd(row.id)
.then(() => {
message.success(t('添加成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainSubmit') {
//
await message.confirm('确认要提交审批吗?')
CountRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
CountRequestMainApi.submit(row.id)
.then(() => {
message.success(t('提交审批成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainTurnDown') {
//
await message.confirm('确认要驳回吗?')
CountRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
CountRequestMainApi.refused(row.id)
.then(() => {
message.success(t('驳回成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainApprove') {
//
await message.confirm('确认要审批通过吗?')
CountRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
CountRequestMainApi.agree(row.id)
.then(() => {
message.success(t('审批已通过'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainHandle') {
//
await message.confirm('确认要处理吗?')
CountRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
CountRequestMainApi.handle(row.id)
.then(() => {
message.success(t('处理成功'))
getList()
})
.catch((err) => {
console.log(err)
})
} else if (val == 'mainReCount') {
//
// CountRequestMainApi.handle(row.id).then(() => {
// message.success(t(''))
// getList()
// }).catch(err => {
// console.log(err)
// })
console.log(CountRequestDetail.allSchemas)
console.log(CountRequestDetailApi.getCountRequestDetailPage)
console.log('formField','')
console.log('formField','')
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'','','','',row,{masterId:row.id})
} else if (val == 'mainSuperviseCount') {
//
// CountRequestMainApi.handle(row.id).then(() => {
// message.success(t(''))
// getList()
// }).catch(err => {
// console.log(err)
// })
} else if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'delete') { //
} else if (val == 'delete') {
//
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
@ -362,10 +477,10 @@ const handleExport = async () => {
}
/**
* tableForm方法
*/
* tableForm方法
*/
const tableFormKeys = {}
CountRequestDetail.allSchemas.tableFormColumns.forEach(item => {
CountRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])

73
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue

@ -72,7 +72,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorychange-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -82,20 +82,6 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
//
defineOptions({ name: 'OktoholdRequestMain' })
//
// defineOptions({ name: 'HoldtookRequestMain' })
// //
// defineOptions({ name: 'HoldtoscrapRequestMain' })
// //
// defineOptions({ name: 'OktoscrapRequestMain' })
// //
// defineOptions({ name: 'ScraptoholdRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
@ -105,54 +91,10 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
@ -169,11 +111,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['itemCode']
row['fromBatch'] = val[0]['batch']
row['locationCode'] = val[0]['locationCode']
} else {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
row['fromInventoryStatus'] = val[0]['inventoryStatus']
}
console.log(116, row)
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
@ -372,10 +315,6 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
console.log(data)

31
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -348,34 +348,8 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
tableForm: {
disabled: true
}
},
{
@ -608,7 +582,6 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: {
type: 'Select'
},
isTableForm: false,
},
{
label: '库位组代码',

91
src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue

@ -177,7 +177,7 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
@ -185,12 +185,95 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": 3,
"requestNumber": "REQ3720231215-0003",
"useOnTheWayLocation": "TRUE",
"fromWarehouseCode": "W1",
"requestTime": 1702604632000,
"requestDueTime": 1703952000000,
"status": "1",
"expiredTime": 1703952000000,
"updateTime": 1702607543000,
"updater": "1",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "研发部门",
"acceptUserId": null,
"acceptTime": null,
"completeUserId": null,
"completeTime": null,
"fromLocationTypes": "SCRAP",
"toLocationTypes": "SCRAP",
"number": "JOB1120231215-0005",
"businessType": "OkToHoldJob",
"remark": "主备注",
"createTime": 1702607543000,
"creator": "1",
"creatorName": null,
"toWarehouseCode": "W1",
"fromAreaCodes": "L-R-001",
"toAreaCodes": "L-R-001",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
subList: [{
"id": "1809190000225116835",
"itemCode": "testCF",
"itemName": "陈放测试物品",
"itemDesc1": "测试用",
"itemDesc2": "测试用",
"projectCode": "5",
"qty": 1,
"uom": "EA",
"number": "JOB1120231215-0005",
"remark": "子备注",
"createtime": null,
"creator": "1",
"packingNumber": "testCF",
"containerNumber": null,
"batch": "20230808",
"inventoryStatus": "OK",
"poNumber": null,
"poLine": null,
"fromLocationCode": "Loc_testCF",
"toLocationCode": "L-R-001-001-1-01",
"fromOwnerCode": null,
"toOwnerCode": null,
recordList: [{
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
supplierCode: '31213',
},{
handleQty: 22,
toPackingNumber: 'M20230421000005',
toContainerNumber: '001',
toBatch: '20230808',
toInventoryStatus: 'OK',
toLocationCode: 'SFG',
supplierCode: '31213',
}]
}]
}
InventorymoveJobMainApi.executeInventorymoveMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
InventorymoveJobMainApi.closeInventorymoveMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
InventorymoveJobMainApi.acceptInventorymoveMain(row.id)
}
}

123
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue

@ -73,7 +73,7 @@
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/inventorymove-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :fromInventoryStatus= "fromInventoryStatus" :toInventoryStatus="toInventoryStatus" />
</template>
<script setup lang="ts">
@ -94,6 +94,56 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
/**
* OktoholdRequestMain 合格转隔离
*/
if ( routeName.value == 'OktoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "HOLD"
} else if ( routeName.value == 'HoldtookRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'OK'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "OK"
} else if ( routeName.value == 'HoldtoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'HOLD',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'HOLD'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'OktoscrapRequestMain') {
tableObject.params = {
fromInventoryStatus: 'OK',
toInventoryStatus:'SCRAP'
}
fromInventoryStatus.value = 'OK'
toInventoryStatus.value = "SCRAP"
} else if ( routeName.value == 'ScraptoholdRequestMain') {
tableObject.params = {
fromInventoryStatus: 'SCRAP',
toInventoryStatus:'HOLD'
}
fromInventoryStatus.value = 'SCRAP'
toInventoryStatus.value = "HOLD"
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -142,10 +192,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: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
@ -195,13 +241,14 @@ 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:inventorymove-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), //
]
}
@ -210,15 +257,53 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
InventorymoveRequestMainApi.close(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
InventorymoveRequestMainApi.reAdd(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
InventorymoveRequestMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要驳回吗?')
InventorymoveRequestMainApi.refused(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
await message.confirm('确认要审批通过吗?')
InventorymoveRequestMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
InventorymoveRequestMainApi.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') { //
@ -289,6 +374,10 @@ const handleDeleteTable = (item, index) => {
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try {
if (formType === 'create') {
await InventorymoveRequestMainApi.createInventorymoveRequestMain(data)

44
src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts

@ -8,6 +8,9 @@ import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import * as WarehouseApi from '@/api/wms/warehouse'
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -57,6 +60,43 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择从仓库代码',
searchField: 'code',
searchTitle: '仓库基础信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择从仓库代码',
searchField: 'code',
searchTitle: '仓库基础信息',
searchAllSchemas: Warehouse.allSchemas,
searchPage: WarehouseApi.getWarehousePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '申请时间',
field: 'requestTime',
@ -102,7 +142,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
},
{
label: '从仓库代码',
field: 'fromWarehouseOde',
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
@ -375,7 +415,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验
export const InventorymoveRequestMainRules = reactive({
// fromWarehouseOde: [
// fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ],
// fromLocationTypes: [

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

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

110
src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue

@ -47,6 +47,7 @@
:tableAllSchemas="ProductscrapRecordDetail.allSchemas"
:tableFormRules="ProductscrapRecordDetailRules"
:isBusiness="true"
@buttonOperationClick="buttonOperationClick"
/>
<!-- 详情 -->
@ -57,15 +58,41 @@
:detailAllSchemas="ProductscrapRecordDetail.allSchemas"
:detailAllSchemasRules="ProductscrapRecordDetailRules"
:apiPage="ProductscrapRecordDetailApi.getProductscrapRecordDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<TableForm
ref="tableFormRef"
class="w-[100%]"
:tableFields="ProdcutscrapRecordBomDismantle.allSchemas.tableColumns"
:tableData="detatableDataBom.tableList"
:isShowButton="false"
:isShowReduceButton="false"
/>
<template #footer>
<ButtonBase :Butttondata="ButttondataBom" @button-base-click="buttonBaseClickBom" />
</template>
</Dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductscrapRecordMain,ProductscrapRecordMainRules,ProductscrapRecordDetail,ProductscrapRecordDetailRules } from './productscrapRecordMain.data'
import { ProductscrapRecordMain,ProductscrapRecordMainRules,ProductscrapRecordDetail,ProductscrapRecordDetailRules,ProdcutscrapRecordBomDismantle } from './productscrapRecordMain.data'
import * as ProductscrapRecordMainApi from '@/api/wms/productscrapRecordMain'
import * as ProductscrapRecordDetailApi from '@/api/wms/productscrapRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle";
import {getProductscrapBomDismantleRecordPage} from "@/api/wms/bomDismantle";
//
defineOptions({ name: 'ProductscrapRecordMain' })
@ -78,6 +105,87 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductscrapRecordMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const tableListBom = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getProductscrapBomDismantleRecordPage
})
const { getList:getDetailListBom } = detatableMethodsBom
// tableform
const buttonOperationClick = async (row, label, index)=> {
if (row.itemCode == '') {
message.warning('请选择物品代码!')
return
}
detatableDataBom.params.itemCode = row.itemCode
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
bomModelVisible.value = true
await getDetailListBom()
detatableDataBom.tableList.map(item => {
item.rowId = index
if(tableData.value[index].childList) {
tableData.value[index].childList.forEach(itemChild => {
if (itemChild.itemCode == item.itemCode) {
item.qty = itemChild.qty
}
})
}
})
}
/** bom 列表 表单 按钮 */
const ButttondataBom = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
// bom
const buttonBaseClickBom = (val) => {
//
if (val == 'save') {
//
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0))
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
item.childList = tableListBom.value
}
})
console.log(157, tableData.value)
bomModelVisible.value = false
}
//
else if (val == 'close') {
bomModelVisible.value = false
}
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
}
await getDetailListBom()
}
}
//
const updataTableColumns = (val) => {
tableColumns.value = val

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

@ -1,5 +1,25 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data";
import * as WorkshopApi from "@/api/wms/workshop";
import {Team} from "@/views/wms/basicDataManage/orderManage/team/team.data";
import * as TeamApi from "@/api/wms/team";
import {Shift} from "@/views/wms/basicDataManage/orderManage/shift/shift.data";
import * as ShiftApi from "@/api/wms/shift";
import {
Productionline
} from "@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data";
import * as ProductionlineApi from "@/api/wms/productionline";
import {
Workstation
} from "@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data";
import * as WorkstationApi from "@/api/wms/workstation";
import {Process} from "@/views/wms/basicDataManage/factoryModeling/process/process.data";
import * as ProcessApi from "@/api/wms/process";
import {
Productionlineitem
} from "@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data";
import * as ProductionlineitemApi from "@/api/wms/productionlineitem";
/**
* @returns {Array}
@ -19,7 +39,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'jobNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show:false
},
isSearch: true
},
@ -39,6 +60,30 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '车间代码',
field: 'workshopCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '班组',
field: 'team',
sort: 'custom',
table: {
width: 150
}
},
{
label: '班次',
field: 'shift',
sort: 'custom',
table: {
width: 150
}
},
{
label: '执行时间',
field: 'executeTime',
@ -205,7 +250,8 @@ export const ProductscrapRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromWarehouseCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -307,7 +353,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'fromOwnerCode',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -315,7 +362,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -323,7 +371,8 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'containerNumber',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
@ -331,9 +380,42 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch',
sort: 'custom',
table: {
width: 150
width: 150,
show: false
},
},
{
label: '来源生产线代码',
field: 'productionLineCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '来源工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '工序代码',
field: 'processCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
@ -410,14 +492,6 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '备注',
field: 'remark',
@ -535,6 +609,22 @@ export const ProductscrapRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: true,
tableForm: {
type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
},
]))
//表单校验
@ -569,4 +659,230 @@ export const ProductscrapRecordDetailRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})
/**
* @returns {Array} bom record记录页面
*/
export const ProdcutscrapRecordBomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '行标记',
field: 'rowId',
isTableForm: false,
isForm: false,
tableForm:{
disabled: true
},
table: {
show: false
}
},
{
label: '物品代码',
field: 'itemCode',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
tableForm:{
type: 'Select',
disabled: true
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
tableForm:{
disabled: true
}
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
}
]))

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

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

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

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

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -1100,9 +1100,9 @@ export const PurchasereturnRequestDetailRules = reactive({
// poLine: [
// { required: true, message: '请输入订单行', trigger: 'blur' }
// ],
reason: [
{ required: true, message: '请选择原因', trigger: 'change' }
],
// reason: [
// { required: true, message: '请选择原因', trigger: 'change' }
// ],
itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' }
],

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -221,7 +221,7 @@
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
openForm('update', row)

30
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/purchaseclaimRecordMain.data.ts

@ -240,14 +240,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
}
},
{
label: '订单号',
field: 'poNumber',
@ -268,7 +260,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因',
field: 'reason',
isTable: true,
dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string',
sort: 'custom',
table: {
@ -313,25 +304,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
}
},
{
label: '接口类型',
field: 'interfaceType',
dictType: DICT_TYPE.INTERFACE_TYPE,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
}
},
{
label: '任务明细ID',
field: 'jobDetailId',
sort: 'custom',
table: {
width: 150
}
},
{
label: '是否可用',
field: 'available',
@ -398,4 +370,4 @@ export const PurchaseclaimRecordDetailRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})

143
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -55,6 +55,7 @@
import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -79,10 +80,10 @@
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
@ -99,11 +100,10 @@
//
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='asnNumber'){
// getBomDisassemble
PurchasePlanDetailApi.getPurchasePlanDetailList({
number: val[0]['asnNumber']}).then(res => {
// getSupplierdeliverRecordDetailList
SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({
asnNumber: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
@ -113,11 +113,6 @@
console.log(err)
})
}
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
@ -128,7 +123,7 @@
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
console.log(456)
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['poLine'] = val[0]['poLine']
@ -189,14 +184,25 @@
// -
const buttondata = (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.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
//
{
label: '处理',
name: 'genRecords',
hide: isShowMainButton(row, ['3']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
},
]
}
@ -211,17 +217,19 @@
// -
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') { //
if (val == 'mainPurPlanOpe') { //
handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {//
handleClo(row.id)
} else if (val == 'mainPlanSub') { //
handleSub(row.id)
} else if (val == 'mainPlanApp') { //
handleApp(row.id)
} else if (val == 'mainPlanTur') { //
handleTur(row.id)
}else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
@ -260,6 +268,85 @@
await getList()
} catch { }
}
/** 关闭按钮操作 */
const handleClo = async (id : number) => {
try {
//
await message.confirm('是否关闭所选中数据?')
//
await PurchaseclaimRequestMainApi.cloPurchaseclaimRequestMain(id)
message.success(t('关闭成功!'))
//
await getList()
} catch { }
}
/** 打开按钮操作 */
const handleOpe = async (id : number) => {
try {
//
await message.confirm('是否打开所选中数据?')
//
await PurchaseclaimRequestMainApi.opePurchaseclaimRequestMain(id)
message.success(t('打开成功!'))
//
await getList()
} catch { }
}
/** 提交审批按钮操作 */
const handleSub = async (id : number) => {
try {
//
await message.confirm('是否提交审批所选中数据?')
//
await PurchaseclaimRequestMainApi.subPurchaseclaimRequestMain(id)
message.success(t('提交审批成功!'))
//
await getList()
} catch { }
}
/** 审批通过按钮操作 */
const handleApp = async (id : number) => {
try {
//
await message.confirm('是否审批通过所选中数据?')
//
await PurchaseclaimRequestMainApi.appPurchaseclaimRequestMain(id)
message.success(t('审批通过成功!'))
//
await getList()
} catch { }
}
/** 驳回按钮操作 */
const handleTur = async (id : number) => {
try {
//
await message.confirm('是否驳回所选中数据?')
//
await PurchaseclaimRequestMainApi.rejPurchaseclaimRequestMain(id)
message.success(t('驳回成功!'))
//
await getList()
} catch { }
}
/** 处理按钮操作 */
const genRecords = async (id : number) => {
try {
//
await message.confirm('是否处理所选中数据?')
//
await PurchaseclaimRequestMainApi.genRecordsPurchaseclaimRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const handleExport = async () => {

30
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/purchaseclaimRequestMain.data.ts

@ -375,13 +375,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '替代批次',
field: 'altBatch',
table: {
width: 150
},
},
{
label: '原因',
field: 'reason',
@ -436,27 +429,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '物品描述1',
field: 'itemDesc1',
table: {
width: 150
},
},
{
label: '物品描述2',
field: 'itemDesc2',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
table: {
width: 150
},
},
{
label: '数量',
field: 'qty',
@ -576,4 +548,4 @@ export const PurchaseclaimRequestDetailRules = reactive({
uom: [
{ required: true, message: '请输入计量单位', trigger: 'change' }
],
})
})

24
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -71,10 +71,6 @@
:apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail"
:Echo="Echo"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/supplierinvoice-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -150,7 +146,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:supplierinvoice-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:supplierinvoice-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -303,23 +299,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 = {
@ -332,6 +311,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>

Loading…
Cancel
Save