提交代码
This commit is contained in:
parent
5e20f8868a
commit
c257821ca8
@ -146,6 +146,10 @@ export interface ProcessPlanItemVO {
|
||||
assignWorkList?: AssignWorkItem[]
|
||||
|
||||
reportedQuantity?: number | null
|
||||
|
||||
patchNum?: number | null
|
||||
|
||||
refillNum?:number | null
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -965,7 +965,7 @@ const deviceDocumentConnection = reactive<any>({})
|
||||
const connectionLoading = ref<boolean>(false)
|
||||
const connectionPagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 2,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
|
||||
@ -398,11 +398,15 @@
|
||||
<span>{{dispatchform.quantity}}</span>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-grid :cols="2">
|
||||
<n-grid :cols="3">
|
||||
<n-gi>
|
||||
<span class="pgClass">已完成:</span>
|
||||
<span>{{dispatchform.completedQty ?? 0}}</span>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<span class="pgClass">补料数:</span>
|
||||
<span>{{dispatchform.refillNum ?? 0}}</span>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<span class="pgClass">已派工:</span>
|
||||
<span>{{dispatchform.assignedQty ?? 0}}</span>
|
||||
@ -414,7 +418,7 @@
|
||||
<span style="color: #2080f0; font-weight: 600">{{dispatchform.remainQty}}</span>
|
||||
</n-gi>
|
||||
<n-gi>
|
||||
<span class="hint-inline" style="color:#999;font-size:12px">待派 = 计划 − 已派工</span>
|
||||
<span class="hint-inline" style="color:#999;font-size:12px">待派 = (计划+补料) − 已派工</span>
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
<n-grid :cols="2">
|
||||
@ -1402,12 +1406,13 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
const planQty = Number(entity.quantity) || 0
|
||||
const completedQty = Number(process.completedQty) || 0
|
||||
// 与后端 checkOverProcessNum 一致:可派 = 计划 + 补料 − 已派工数量
|
||||
const assignedQty = (process.assignWorkList ?? []).reduce(
|
||||
(s, a) => s + (Number(a.quantity) || 0),
|
||||
0,
|
||||
)
|
||||
// const assignedQty = (process.assignWorkList ?? []).reduce(
|
||||
// (s, a) => s + (Number(a.quantity) || 0),
|
||||
// 0,
|
||||
// )
|
||||
const patchNum = Number(process.patchNum) || 0
|
||||
const refillNum = Number(process.refillNum) || 0
|
||||
const remainQty = Math.max(0, planQty + refillNum - assignedQty)
|
||||
const remainQty = Math.max(0, planQty + refillNum - patchNum)
|
||||
dispatchmodal.value = true
|
||||
dispatchformRef.value?.restoreValidation()
|
||||
dispatchform.id = entity.id
|
||||
@ -1418,12 +1423,13 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
// quantity 保持工序计划总数,提交时不能改掉计划数量
|
||||
dispatchform.quantity = entity.quantity
|
||||
dispatchform.completedQty = completedQty
|
||||
dispatchform.assignedQty = assignedQty
|
||||
dispatchform.assignedQty = patchNum
|
||||
dispatchform.remainQty = remainQty
|
||||
dispatchform.orderItemId = entity.orderItemId
|
||||
dispatchform.sort = entity.sort
|
||||
dispatchform.sectionId = entity.sectionId ?? process.sectionId ?? null
|
||||
dispatchform.workshopId = entity.workshopId ?? process.workshopId ?? order?.workshopId ?? null
|
||||
dispatchform.refillNum = refillNum
|
||||
dispatchform.list = [{ sectionId: '', deviceId: '', quantity: remainQty > 0 ? String(remainQty) : '', ncId: '' }]
|
||||
}
|
||||
|
||||
|
||||
@ -1039,7 +1039,7 @@ const deviceDocumentConnection = ref<DeviceDocumentConnection>({})
|
||||
const connectionLoading = ref<boolean>(false)
|
||||
const connectionPagination = reactive({
|
||||
page: 1,
|
||||
pageSize: 2,
|
||||
pageSize: 10,
|
||||
itemCount: 0,
|
||||
showSizePicker: true,
|
||||
pageSizes: [10, 20, 50]
|
||||
|
||||
@ -169,7 +169,8 @@ const defaultBaseInfo = ref({
|
||||
processName:undefined,
|
||||
processCode:undefined,
|
||||
assingCode:undefined,
|
||||
logOrQuality:undefined
|
||||
logOrQuality:undefined,
|
||||
workOrderCode:undefined
|
||||
})
|
||||
|
||||
const baseInfo = ref({...defaultBaseInfo})
|
||||
@ -186,7 +187,7 @@ const processName = ref<string>()
|
||||
const assingCode = ref<string>()
|
||||
const materialCode = ref<string>()
|
||||
const materialName = ref<string>()
|
||||
|
||||
const workOrderCode = ref<string>()
|
||||
|
||||
//派工详情弹窗
|
||||
const showAssingWorkDetail = ref<boolean>(false)
|
||||
@ -268,6 +269,37 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
])
|
||||
}
|
||||
},
|
||||
{
|
||||
align: 'center',
|
||||
align:'center',
|
||||
title: '是否入库',
|
||||
key: 'storageEntry',
|
||||
width: 90,
|
||||
render(row) {
|
||||
var opt = row.storageEntry
|
||||
if (opt == 0) {
|
||||
return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" })
|
||||
}
|
||||
if (opt == 1) {
|
||||
return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '返工任务',
|
||||
key: 'rework',
|
||||
width: 90,
|
||||
render(row) {
|
||||
var opt = row.rework
|
||||
if (opt == 0) {
|
||||
return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" })
|
||||
}
|
||||
if (opt == 1) {
|
||||
return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '派工状态',
|
||||
|
||||
@ -141,9 +141,7 @@ const detailColumns: DataTableColumns<QcResultDetail> = [
|
||||
}
|
||||
},
|
||||
{ title: '判定数量', key: 'qty', align: 'center', width: 90, render: (row) => dash(row.qty) },
|
||||
{ title: '批次号', key: 'traceCode', align: 'center', render: (row) => dash(row.traceCode) },
|
||||
{ title: '不良代码', key: 'defectCode', align: 'center', render: (row) => dash(row.defectCode) },
|
||||
{ title: '后续动作', key: 'handleAction', align: 'center', render: (row) => dash(row.handleAction) },
|
||||
{ title: '批次号', key: 'traceCode', align: 'center',width:180, render: (row) => dash(row.traceCode) },
|
||||
{
|
||||
title: '状态',
|
||||
key: 'actionStatus',
|
||||
|
||||
@ -74,7 +74,7 @@ const pagination = reactive({
|
||||
const reportRecordsColums: DataTableColumns<SubmitLog> = [
|
||||
{ title: '汇报数量', key: 'quantity', align: 'center', width: 90, render: (row) => dash(row.quantity) },
|
||||
{ title: '合格数量', key: 'qualifiedQty', align: 'center', width: 90, render: (row: any) => dash(row.qualifiedQty) },
|
||||
{ title: '报废数量', key: 'scrapQty', align: 'center', width: 90, render: (row: any) => dash(row.scrapQty) },
|
||||
{ title: '报废数量', key: 'scrapeQty', align: 'center', width: 90, render: (row: any) => dash(row.scrapeQty) },
|
||||
{
|
||||
title: '暂停时间',
|
||||
key: 'pauseSeconds',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user