diff --git a/src/api/orderProcessPlan.ts b/src/api/orderProcessPlan.ts
index ec1f2ec..121e686 100644
--- a/src/api/orderProcessPlan.ts
+++ b/src/api/orderProcessPlan.ts
@@ -143,6 +143,7 @@ export interface ProcessPlanItemVO {
assignWorkList?: AssignWorkItem[]
+ reportedQuantity?: number | null
}
diff --git a/src/api/production.ts b/src/api/production.ts
index 6949e0d..7037443 100644
--- a/src/api/production.ts
+++ b/src/api/production.ts
@@ -4,6 +4,7 @@ export interface AssingWork {
id:number,
processId:number,
processName:number,
+ processCode?:string,
userId:string,
quantity:number,
rework:number,
@@ -22,6 +23,11 @@ export interface AssingWork {
workshopId:number,
sectionId:number,
deviceId:number,
+ deviceName?:string,
+ workshopName?:string,
+ sectionName?:string,
+ materialCode?:string,
+ materialName?:string,
traceId:number,
qcNum:number
}
@@ -65,7 +71,15 @@ export function pauseresume(data:any) {
}
//我的派工任务
-export function mytasks(params:{page:number,pageSize:number,processName:string}) {
+export function mytasks(params:{
+ page:number
+ pageSize:number
+ processName?:string
+ processId?:number | string
+ assingCode?:string
+ materialCode?:string
+ materialName?:string
+}) {
return request({
url: `/mes/dispatch/my-tasks`,
method: 'get',
diff --git a/src/views/biz/flowingAround/index.vue b/src/views/biz/flowingAround/index.vue
index 318d919..b5aefac 100644
--- a/src/views/biz/flowingAround/index.vue
+++ b/src/views/biz/flowingAround/index.vue
@@ -46,13 +46,26 @@
:columns="columns"
:data="tableData"
:loading="loading"
- :pagination="pagination"
:row-key="(row) => row.id"
:scroll-x="1200"
- @update:page="handlePageChange"
- @update:page-size="handlePageSizeChange"
- @update:checked-row-keys="handleCheck"
/>
+
+
@@ -181,6 +194,8 @@ const formRules = {
// 表格列
const columns: DataTableColumns = [
{ type: 'selection' },
+ { title: '物料名称', key: 'materialName' },
+ { title: '物料编码', key: 'materialCode' },
{ title: '当前序ID', key: 'currentlyPrefaceName' },
{ title: '下一序ID', key: 'nextPrefaceName' },
{ title: '业务来源', key: 'businessName' },
diff --git a/src/views/biz/orderProcessPlan/components/ProcessCard.vue b/src/views/biz/orderProcessPlan/components/ProcessCard.vue
index 8fe8511..812080e 100644
--- a/src/views/biz/orderProcessPlan/components/ProcessCard.vue
+++ b/src/views/biz/orderProcessPlan/components/ProcessCard.vue
@@ -28,12 +28,12 @@
完成
- {{ completedQty }} / {{ totalQty }}
+ {{ reportedQuantity }} / {{ totalQty }}
合格 / 不合格
- {{ qualifiedQty }}
+ {{ completedQty }}
/
{{ scrapQty }}
@@ -155,6 +155,7 @@ const emit = defineEmits<{
submitDetail: [process: ProcessPlanItemVO]
}>()
+const reportedQuantity = computed(() => props.process.reportedQuantity ?? 0)
const totalQty = computed(() => props.process.quantity ?? 0)
const completedQty = computed(() => props.process.completedQty ?? 0)
const scrapQty = computed(() => props.process.scrapQty ?? 0)
diff --git a/src/views/biz/orderProcessPlan/pgitem.vue b/src/views/biz/orderProcessPlan/pgitem.vue
index f06bc41..b9a37ff 100644
--- a/src/views/biz/orderProcessPlan/pgitem.vue
+++ b/src/views/biz/orderProcessPlan/pgitem.vue
@@ -37,6 +37,7 @@
clearable
remote
:clear-filter-after-select="false"
+ @change="loadNc"
/>
@@ -192,11 +193,11 @@ async function loadSection() {
}
//加载下发数据
-async function loadNc() {
- const res = await loadAllNcCode()
+async function loadNc(row) {
+ const res = await loadAllNcCode(row)
ncList.value = res.map((n: any) => {
return {
- label: n.ncName,
+ label: n.name,
value: n.id
}
})
@@ -206,6 +207,5 @@ async function loadNc() {
loadSection()
slehand()
-loadNc()
\ No newline at end of file
diff --git a/src/views/biz/orderProject/index.vue b/src/views/biz/orderProject/index.vue
index 509d8c5..515d0f8 100644
--- a/src/views/biz/orderProject/index.vue
+++ b/src/views/biz/orderProject/index.vue
@@ -50,6 +50,7 @@
= [
// { type: 'selection' },
{ title: '质检编号', key: 'qcNo',align: 'center' },
- { title: '来源类型', key: 'sourceType',align: 'center',
- render(row) {
- const val = row.sourceType
- const opt = qcSourceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
- if (!opt) return val ?? '-'
-
- return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
- }
+ {
+ title: '物料名称',
+ key: 'materialName',
+ align: 'center',
+ width: 150
},
+ {
+ title: '物料编码',
+ key: 'materialCode',
+ align: 'center',
+ width: 120
+ },
+ // { title: '来源类型', key: 'sourceType',align: 'center',
+ // render(row) {
+ // const val = row.sourceType
+ // const opt = qcSourceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
+ // if (!opt) return val ?? '-'
+
+ // return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
+ // }
+ // },
+ { title: '业务来源', key: 'businessName',align: 'center'},
// { title: '来源业务ID(汇报单/派工单等)', key: 'sourceId' },
// { title: '关联生产订单ID', key: 'orderId' },
// { title: '关联工序计划ID', key: 'processId' },
diff --git a/src/views/production/componets/AssingWorkTreeTable.vue b/src/views/production/componets/AssingWorkTreeTable.vue
index 9a84a36..06c927d 100644
--- a/src/views/production/componets/AssingWorkTreeTable.vue
+++ b/src/views/production/componets/AssingWorkTreeTable.vue
@@ -1,16 +1,5 @@
-
-
-
- {{ AssingWorkAllExpanded ? '全部收起' : '全部展开' }}
-
-
-
-
+
@@ -135,6 +132,9 @@ const AssingWorkTableData = ref
([])
const AssingWorkExpandedKeys = ref>([])
const processName = ref()
+const assingCode = ref()
+const materialCode = ref()
+const materialName = ref()
//派工详情弹窗
@@ -153,7 +153,7 @@ const AssingWorkColumns :DataTableColumns = [
align:"center",
title:"派工编号",
key:"assingCode",
- minWidth:150,
+ width: 170,
render(row:any) {
return h(
'a',
@@ -175,21 +175,74 @@ const AssingWorkColumns :DataTableColumns = [
},
{
align:'center',
- title: '工序名称',
- key: 'processName',
- minWidth: 200
+ title: '物料编码',
+ key: 'materialCode',
+ width: 120,
+ ellipsis: { tooltip: true },
+ render(row:any) {
+ return row.materialCode || '-'
+ }
},
{
+ align:'center',
+ title: '物料名称',
+ key: 'materialName',
+ width: 140,
+ ellipsis: { tooltip: true },
+ render(row:any) {
+ return row.materialName || '-'
+ }
+ },
+
+ {
+ align:'center',
+ title: '工序名称',
+ key: 'processName',
+ width: 120,
+ ellipsis: { tooltip: true }
+ },
+ /*{
align:'center',
title: '工序编号',
key: 'processCode',
- minWidth: 200
+ width: 100
+ }, */
+ {
+ align:'center',
+ title: '是否质检',
+ key: 'qualityInspection',
+ width: 90,
+ render(row) {
+ var opt = row.qualityInspection
+ 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: '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: 'assingStatus',
- minWidth: 150,
+ width: 90,
render(row:any) {
const val = row.assingStatus
const opt = qcAssingStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
@@ -215,31 +268,32 @@ const AssingWorkColumns :DataTableColumns = [
align:'center',
title: '工位/设备',
key: 'deviceName',
- minWidth: 200
+ width: 110,
+ ellipsis: { tooltip: true }
},
{
align:'center',
title: '数量',
- minWidth: 100,
+ width: 70,
key: 'quantity'
},
{
align:'center',
title: '完成数量',
key: 'completedQuantity',
- minWidth: 150
+ width: 80
},
{
align:'center',
title: '完成时间',
key: 'completedTime',
- minWidth: 180
+ width: 160
},
{
align:'center',
title: '状态',
key: 'status',
- minWidth: 100,
+ width: 80,
render(row:any) {
if(row.status == 0){
return h(NTag, {
@@ -278,7 +332,7 @@ const AssingWorkColumns :DataTableColumns = [
align:'center',
title: '操作',
key: 'action',
- width: 250,
+ width: 180,
fixed: 'right',
render(row:any) {
const buttons:any = []
@@ -402,25 +456,34 @@ function handlePageSizeChange(pageSize: number) {
}
// //获取列表数据
-function getlist() {
- try{
- mytasks({
- page:pagination.page,
- pageSize:pagination.pageSize,
- processName:processName.value
- }).then((rps:any) => {
- AssingWorkTableData.value = rps.records
- pagination.itemCount = rps.total
- })
- }catch(error) {
- console.log(error);
-
+async function getlist() {
+ tableLoading.value = true
+ try {
+ const rps: any = await mytasks({
+ page: pagination.page,
+ pageSize: pagination.pageSize,
+ processName: processName.value || undefined,
+ assingCode: assingCode.value || undefined,
+ materialCode: materialCode.value || undefined,
+ materialName: materialName.value || undefined,
+ })
+ AssingWorkTableData.value = rps?.records ?? []
+ pagination.itemCount = rps?.total ?? 0
+ } catch (error) {
+ console.error(error)
+ } finally {
+ tableLoading.value = false
}
}
-const loadTableData = async(params:Record) => {
- processName.value = params.processName
- getlist()
+const loadTableData = async (params: Record = {}) => {
+ processName.value = params.processName || undefined
+ assingCode.value = params.assingCode || undefined
+ materialCode.value = params.materialCode || undefined
+ materialName.value = params.materialName || undefined
+ pagination.page = 1
+ AssingWorkExpandedKeys.value = []
+ await getlist()
}
@@ -628,8 +691,11 @@ defineExpose({