Browse Source

制品收货

master
陈薪名 12 months ago
parent
commit
b567b54f32
  1. 27
      src/api/wms/productreceiptJobMain/index.ts
  2. 118
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue
  3. 20
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts
  4. 57
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  5. 13
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  6. 5
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

27
src/api/wms/productreceiptJobMain/index.ts

@ -75,10 +75,35 @@ export const deleteProductreceiptJobMain = async (id: number) => {
// 导出制品收货任务主 Excel
export const exportProductreceiptJobMain = async (params) => {
return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params })
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({ url: `/wms/productreceipt-job-main/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/productreceipt-job-main/export-excel`, params })
}
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productreceipt-job-main/get-import-template' })
}
// 承接发料任务
export const acceptProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/accept?id=` + id })
}
// 放弃发料任务
export const abandonProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/abandon?id=` + id })
}
// 关闭发料任务
export const closeProductreceiptMain = async (id) => {
return await request.put({ url: `/wms/productreceipt-job-main/close?id=` + id })
}
// 执行发料任务
export const executeProductreceiptMain = async (data) => {
return await request.put({ url: `/wms/productreceipt-job-main/execute`, data})
}

118
src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue

@ -90,12 +90,6 @@ const updataTableColumns = (val) => {
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
@ -103,29 +97,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: ProductreceiptJobMainApi.getProductreceiptJobMainPage //
@ -177,20 +156,101 @@ const butttondata = (row) => {
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainJobExe') { //
console.log('列表-操作按钮事件-执行')
let aaa = {
"id": "1809190001478278226",
"requestNumber": "REC4620231212-0011",
"productionPlanNumber": "WP20231212-0002",
"workShopCode": "work2",
"team": "7",
"shift": "8",
"details": null,
"requestTime": 1702376849000,
"requestDueTime": null,
"status": "2",
"expiredTime": null,
"updateTime": 1702376904000,
"updater": "超级管理员",
"jobStageStatus": null,
"priority": null,
"priorityIncrement": null,
"departmentCode": "103",
"acceptUserId": "1",
"acceptTime": 1702376913000,
"completeUserId": "1",
"completeTime": 1702377036000,
"toWarehouseCode": null,
"toAreaCodes": "",
"fromLocationTypes": "WIP",
"toLocationTypes": "WIP",
"number": "JOB2120231212-0001",
"businessType": "ProductReceipt",
"remark": null,
"createTime": 1702376904000,
"creator": "超级管理员",
"autoComplete": "FALSE",
"allowModifyLocation": "FALSE",
"allowModifyQty": "TRUE",
"allowBiggerQty": "TRUE",
"allowSmallerQty": "TRUE",
"allowModifyInventoryStatus": "TRUE",
"allowContinuousScanning": "TRUE",
"allowPartialComplete": "TRUE",
"allowModifyBatch": "FALSE",
"allowModifyPackingNumber": "FALSE",
"inInventoryStatuses": "OK",
"outInventoryStatuses": "OK",
"concurrencyStamp": null,
subList: [
{
"id": "1809190000003953999",
"productionLineCode": "line4",
"workStationCode": "station4",
"processCode": null,
"packingNumber": "PN-00113",
"containerNumber": null,
"batch": "20231212",
"produceDate": null,
"expireDate": null,
"inventoryStatus": "OK",
"woNumber": null,
"woLine": null,
"stdPackQty": 8,
"stdPackUnit": "BOX",
"itemCode": "item01",
"itemName": "物品01",
"itemDesc1": "",
"itemDesc2": "",
"projectCode": "xm01",
"qty": 2,
"uom": "EA",
"number": "JOB2120231212-0001",
"remark": null,
"createTime": 1702376904000,
"creator": "1",
"toOwnerCode": null,
handleQty: 10,
toPackingNumber: '12',
toContainerNumber: '001',
toBatch: '21',
toInventoryStatus: 'OK',
toLocationCode: 'H03',
}
]
}
ProductreceiptJobMainApi.executeProductreceiptMain(aaa)
} else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃')
ProductreceiptJobMainApi.abandonProductreceiptMain(row.id)
} else if (val == 'mainJobClo') { //
console.log('列表-操作按钮事件-关闭')
ProductreceiptJobMainApi.closeProductreceiptMain(row.id)
} else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接')
ProductreceiptJobMainApi.acceptProductreceiptMain(row.id)
}
}
@ -208,8 +268,8 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(setSearchParams)
download.excel(data, '制品收货任务.xlsx')
const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params)
download.excel(data, '制品收货任务.xlsx')
} catch {
} finally {
exportLoading.value = false

20
src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts

@ -522,16 +522,16 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 120,
// fixed: 'right'
// },
// }
]))
//表单校验

57
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -57,15 +57,39 @@
:detailAllSchemas="ProductreceiptRecordDetail.allSchemas"
:detailAllSchemasRules="ProductreceiptRecordDetailRules"
:apiPage="ProductreceiptRecordDetailApi.getProductreceiptRecordDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<Table
:columns="BackflushRecordDetailb.allSchemas.tableColumns"
:data="detatableDataBom.tableList"
:loading="detatableDataBom.loading"
:pagination="{
total: detatableDataBom.total
}"
v-model:pageSize="detatableDataBom.pageSize"
v-model:currentPage="detatableDataBom.currentPage"
v-model:sort="detatableDataBom.sort"
/>
</Dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules } from './productreceiptRecordMain.data'
import { ProductreceiptRecordMain,ProductreceiptRecordMainRules,ProductreceiptRecordDetail,ProductreceiptRecordDetailRules, BackflushRecordDetailb } from './productreceiptRecordMain.data'
import * as ProductreceiptRecordMainApi from '@/api/wms/productreceiptRecordMain'
import * as ProductreceiptRecordDetailApi from '@/api/wms/productreceiptRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb'
//
defineOptions({ name: 'ProductreceiptRecordMain' })
@ -77,6 +101,25 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductreceiptRecordMain.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 { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BackflushRecordDetailbApi.getBackflushRecordDetailbPage
})
const { getList:getDetailListBom } = detatableMethodsBom
//
const updataTableColumns = (val) => {
@ -158,6 +201,18 @@ const searchFormClick = (searchData) => {
getList() //
}
// 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()
}
}
/** 初始化 **/
onMounted(async () => {
getList()

13
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -336,7 +336,7 @@ export const ProductreceiptRecordMainRules = reactive({
export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '生产线代码',
field: 'productionLineCode',
field: 'productionlineCode',
sort: 'custom',
table: {
width: 150
@ -636,6 +636,17 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false ,
table: {
width: 150,
fixed: 'right'
},
isTableForm:false,
}
]))
//表单校验

5
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -67,7 +67,6 @@
:apiUpdate="ProductreceiptRequestDetailApi.updateProductreceiptRequestDetail"
:apiPage="ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage"
:apiDelete="ProductreceiptRequestDetailApi.deleteProductreceiptRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
@ -193,10 +192,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: ProductreceiptRequestMainApi.getProductreceiptRequestMainPage //
})

Loading…
Cancel
Save