陈薪名 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 }) 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) => { export const getDetailbBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/dismantle-request-detailb/bomPage`, 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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-job-main/get-import-template' }) 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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/inventorymove-request-main/get-import-template' }) 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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/productscrap-request-main/get-import-template' }) 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 }) 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 // 导出采购索赔申请主 Excel
export const exportPurchaseclaimRequestMain = async (params) => { export const exportPurchaseclaimRequestMain = async (params) => {
return await request.download({ url: `/wms/purchaseclaim-request-main/export-excel`, 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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchaseclaim-request-main/get-import-template' }) 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) => { export const getSupplierdeliverRecordDetail = async (id: number) => {
return await request.get({ url: `/wms/supplierdeliver-record-detail/get?id=` + id }) return await request.get({ url: `/wms/supplierdeliver-record-detail/get?id=` + id })
@ -79,4 +84,4 @@ export const exportSupplierdeliverRecordDetail = async (params) => {
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierdeliver-record-detail/get-import-template' }) 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) => { export const exportSupplierinvoiceRequestMain = async (params) => {
return await request.download({ url: `/wms/supplierinvoice-request-main/export-excel`, 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 rowRef = ref()
const allSchemasRef = ref() const allSchemasRef = ref()
const multipleBol = ref(false) 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 searchDialogVisible.value = true
formFieldRef.value = formField formFieldRef.value = formField
searchFieldRef.value = searchField searchFieldRef.value = searchField
@ -84,7 +84,8 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getListApi: getPage.value // getListApi: getPage.value //
}) })
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
if (searchCondition) tableObjectRef.value.params = searchCondition if (searchCondition) tableObjectRef.value.params = searchCondition;
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
setSearchParamsRef.value = setSearchParams setSearchParamsRef.value = setSearchParams

24
src/utils/disposition/defaultButtons.ts

@ -699,6 +699,30 @@ export function mainCountAdjustRequesttBtn(option:any) {
hasPermi: '' 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){ function __defaultBtnOption(option:any,specific:any){
return { return {

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

@ -1,18 +1,22 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="CountRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="CountRequestMain.allSchemas.searchSchema"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:routeName="routeName" :routeName="routeName"
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountRequestMain.allSchemas" :allSchemas="CountRequestMain.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
@ -27,13 +31,16 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #number="{row}"> <template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -73,16 +80,34 @@
/> />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/count-request-main/import" :importTemplateData="importTemplateData" <ImportForm
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> ref="importFormRef"
url="/wms/count-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
/>
<SearchTable
ref="searchTableRef"
@searchTableSuccess="searchTableSuccess"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' 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 CountRequestMainApi from '@/api/wms/countRequestMain'
import * as CountRequestDetailApi from '@/api/wms/countRequestDetail' import * as CountRequestDetailApi from '@/api/wms/countRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { SearchTable } from '@/components/SearchTable'
// //
defineOptions({ name: 'CountRequestMain' }) defineOptions({ name: 'CountRequestMain' })
@ -102,16 +127,16 @@ const updataTableColumns = (val) => {
// //
const searchTableParams = ref([ const searchTableParams = ref([
//{ //{
// formField: 'productItemCode', // formField: 'productItemCode',
// searchTableTitle: '', // searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas, // searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage // searchTablePage: ItembasicApi.getItembasicPage
//} //}
]) ])
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { 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 = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountRequestMainApi.getCountRequestMainPage // getListApi: CountRequestMainApi.getCountRequestMainPage //
@ -150,10 +175,10 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), // // defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), // // 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.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -166,102 +191,192 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
getList() getList()
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else if (val == 'mainReCount') {
//
} else if (val == 'mainSuperviseCount') {
//
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
// //
const isShowMainButton = (row,val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
return true 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) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:count-request-main:close'}), // defaultButtons.mainListCloseBtn({
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:count-request-main:reAdd'}), // hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:submit'}), // hasPermi: 'wms:count-request-main:close'
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.mainListReAddBtn({
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:count-request-main:handle'}), // hide: isShowMainButton(row, ['5']),
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:count-request-main:update'}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // console.log(val)
if (val == 'mainClose') {
//
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
CountRequestMainApi.close(row.id).then(() => { CountRequestMainApi.close(row.id)
message.success(t('关闭成功')) .then(() => {
getList() message.success(t('关闭成功'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'mainReAdd') { // console.log(err)
})
} else if (val == 'mainReAdd') {
//
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
CountRequestMainApi.reAdd(row.id).then(() => { CountRequestMainApi.reAdd(row.id)
message.success(t('添加成功')) .then(() => {
getList() message.success(t('添加成功'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'mainSubmit') { // console.log(err)
})
} else if (val == 'mainSubmit') {
//
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
CountRequestMainApi.submit(row.id).then(() => { CountRequestMainApi.submit(row.id)
message.success(t('提交审批成功')) .then(() => {
getList() message.success(t('提交审批成功'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'mainTurnDown') { // console.log(err)
})
} else if (val == 'mainTurnDown') {
//
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
CountRequestMainApi.refused(row.id).then(() => { CountRequestMainApi.refused(row.id)
message.success(t('驳回成功')) .then(() => {
getList() message.success(t('驳回成功'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'mainApprove') { // console.log(err)
})
} else if (val == 'mainApprove') {
//
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
CountRequestMainApi.agree(row.id).then(() => { CountRequestMainApi.agree(row.id)
message.success(t('审批已通过')) .then(() => {
getList() message.success(t('审批已通过'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'mainHandle') { // console.log(err)
})
} else if (val == 'mainHandle') {
//
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
CountRequestMainApi.handle(row.id).then(() => { CountRequestMainApi.handle(row.id)
message.success(t('处理成功')) .then(() => {
getList() message.success(t('处理成功'))
}).catch(err => { getList()
console.log(err) })
}) .catch((err) => {
} else if (val == 'edit') { // 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) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.id) handleDelete(row.id)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
} }
@ -362,10 +477,10 @@ const handleExport = async () => {
} }
/** /**
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
CountRequestDetail.allSchemas.tableFormColumns.forEach(item => { CountRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) 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" <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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -82,20 +82,6 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest
import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail' import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons' 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 message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -105,54 +91,10 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns) const tableColumns = ref(InventorychangeRequestMain.allSchemas.tableColumns)
console.log(99 , routeName.value)
const fromInventoryStatus = ref()
const toInventoryStatus = ref()
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: InventorychangeRequestMainApi.getInventorychangeRequestMainPage // 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) => { const updataTableColumns = (val) => {
@ -169,11 +111,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['itemCode'] = val[0]['itemCode'] row['itemCode'] = val[0]['itemCode']
row['fromBatch'] = val[0]['batch'] row['fromBatch'] = val[0]['batch']
row['locationCode'] = val[0]['locationCode'] row['locationCode'] = val[0]['locationCode']
} else { row['fromInventoryStatus'] = val[0]['inventoryStatus']
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
} }
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) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try { try {
if (formType === 'create') { if (formType === 'create') {
console.log(data) console.log(data)

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

@ -348,34 +348,8 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
isInpuFocusShow: true, // 开启查询弹窗 disabled: 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
}]
}
} }
}, },
{ {
@ -608,7 +582,6 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
tableForm: { tableForm: {
type: 'Select' type: 'Select'
}, },
isTableForm: false,
}, },
{ {
label: '库位组代码', label: '库位组代码',

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

@ -177,7 +177,7 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { // if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行') 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') { // } else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃') InventorymoveJobMainApi.abandonInventorymoveMain(row.id)
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭') InventorymoveJobMainApi.closeInventorymoveMain(row.id)
} else if (val == 'mainJobAcc') { // } 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" <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> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -94,6 +94,56 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns) 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) => { const updataTableColumns = (val) => {
tableColumns.value = 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 = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: InventorymoveRequestMainApi.getInventorymoveRequestMainPage //
})
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
@ -195,13 +241,14 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:inventorymove-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:inventorymove-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:inventorymove-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:inventorymove-request-main:agree'}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:inventorymove-request-main:update'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:inventorymove-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:inventorymove-request-main:delete'}), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // 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') { // } 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') { // } 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') { // } 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') { // } 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') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -289,6 +374,10 @@ const handleDeleteTable = (item, index) => {
// //
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach(item => {
item.fromInventoryStatus = fromInventoryStatus.value
item.toInventoryStatus = toInventoryStatus.value
})
try { try {
if (formType === 'create') { if (formType === 'create') {
await InventorymoveRequestMainApi.createInventorymoveRequestMain(data) 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 * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' 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() // 国际化 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: '申请时间', label: '申请时间',
field: 'requestTime', field: 'requestTime',
@ -102,7 +142,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '从仓库代码', label: '从仓库代码',
field: 'fromWarehouseOde', field: 'fromWarehouseCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -375,7 +415,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const InventorymoveRequestMainRules = reactive({ export const InventorymoveRequestMainRules = reactive({
// fromWarehouseOde: [ // fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' } // { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ], // ],
// fromLocationTypes: [ // fromLocationTypes: [

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

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

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

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

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

@ -221,7 +221,7 @@
handleApp(row.id) handleApp(row.id)
} else if (val == 'mainPlanTur') { // } else if (val == 'mainPlanTur') { //
handleTur(row.id) handleTur(row.id)
}else if (val == 'genRecords') { // }else if (val == 'genRecords') { //
genRecords(row.id) genRecords(row.id)
}else if (val == 'edit') { // }else if (val == 'edit') { //
openForm('update', row) 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 width: 150
} }
}, },
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
}
},
{ {
label: '订单号', label: '订单号',
field: 'poNumber', field: 'poNumber',
@ -268,7 +260,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '原因', label: '原因',
field: 'reason', field: 'reason',
isTable: true, isTable: true,
dictType: DICT_TYPE.PURCHASE_RETURN_REASON,
dictClass: 'string', dictClass: 'string',
sort: 'custom', sort: 'custom',
table: { table: {
@ -313,25 +304,6 @@ export const PurchaseclaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 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: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -398,4 +370,4 @@ export const PurchaseclaimRecordDetailRules = reactive({
creator: [ creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' } { required: true, message: '请输入创建者', trigger: 'blur' }
], ],
}) })

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

@ -55,6 +55,7 @@
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download' import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain' import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as SupplierdeliverRecordDetailApi from '@/api/wms/supplierdeliverRecordDetail'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail' import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data' import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -79,10 +80,10 @@
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine'] row['poLine'] = val[0]['poLine']
@ -99,11 +100,10 @@
// //
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField=='asnNumber'){ if(formField=='asnNumber'){
// getBomDisassemble // getSupplierdeliverRecordDetailList
PurchasePlanDetailApi.getPurchasePlanDetailList({ SupplierdeliverRecordDetailApi.getSupplierdeliverRecordDetailList({
number: val[0]['asnNumber']}).then(res => { asnNumber: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res; if (res) tableData.value = res;
tableData.value.forEach(item=>{ tableData.value.forEach(item=>{
item.batch = item.toBatch item.batch = item.toBatch
@ -113,11 +113,6 @@
console.log(err) console.log(err)
}) })
} }
setV['ppNumber'] = val[0]['ppNumber'] setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode'] setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV) formRef.setValues(setV)
@ -128,7 +123,7 @@
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
console.log(456) console.log(456)
nextTick(() => { nextTick(() => {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
setV['poLine'] = val[0]['poLine'] setV['poLine'] = val[0]['poLine']
@ -189,14 +184,25 @@
// - // -
const buttondata = (row) => { const buttondata = (row) => {
return [ return [
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']) }), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['5']) }), //
defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['4', '5']) }), // defaultButtons.mainListPurchasePlanCloBtn({ hide: isShowMainButton(row, ['1', '2', '4']) }), //
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']) }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanAppBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']) }), // defaultButtons.mainListPlanTurBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), // 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.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), // 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) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainPurPlanOpe') { //
console.log('列表-操作按钮事件-关闭') handleOpe(row.id)
} else if (val == 'mainReAdd') { // } else if (val == 'mainPurPlanClo') {//
console.log('列表-操作按钮事件-重新添加') handleClo(row.id)
} else if (val == 'mainSubmit') { // } else if (val == 'mainPlanSub') { //
console.log('列表-操作按钮事件-提交审批') handleSub(row.id)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainPlanApp') { //
console.log('列表-操作按钮事件-驳回') handleApp(row.id)
} else if (val == 'mainApprove') { // } else if (val == 'mainPlanTur') { //
console.log('列表-操作按钮事件-审批通过') handleTur(row.id)
} else if (val == 'edit') { // }else if (val == 'genRecords') { //
genRecords(row.id)
}else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id) // const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
@ -260,6 +268,85 @@
await getList() await getList()
} catch { } } 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 () => { 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 width: 150
}, },
}, },
{
label: '替代批次',
field: 'altBatch',
table: {
width: 150
},
},
{ {
label: '原因', label: '原因',
field: 'reason', field: 'reason',
@ -436,27 +429,6 @@ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150 width: 150
}, },
}, },
{
label: '物品描述1',
field: 'itemDesc1',
table: {
width: 150
},
},
{
label: '物品描述2',
field: 'itemDesc2',
table: {
width: 150
},
},
{
label: '项目代码',
field: 'projectCode',
table: {
width: 150
},
},
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
@ -576,4 +548,4 @@ export const PurchaseclaimRequestDetailRules = reactive({
uom: [ uom: [
{ required: true, message: '请输入计量单位', trigger: 'change' } { required: true, message: '请输入计量单位', trigger: 'change' }
], ],
}) })

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

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

Loading…
Cancel
Save