From b259962512adbade2c9d592ce5321e616e9da6e2 Mon Sep 17 00:00:00 2001
From: shaoleiliu-netizen123 <480188199@qq.com>
Date: Thu, 16 Jul 2026 11:28:08 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E4=BD=8D=20=20?=
=?UTF-8?q?=E6=8F=90=E5=89=8D=E6=98=8E=E7=BB=86=E5=85=AC=E5=85=B1=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/SubmitDetailPage.vue | 84 ++++++++++++
src/components/SumbitDetailCard.vue | 138 ++++++++++++++++++++
src/views/biz/device/index.vue | 37 +++---
src/views/biz/flowingAround/assingWork.vue | 17 ++-
src/views/biz/flowingAround/index.vue | 16 ++-
src/views/biz/orderProcessPlan/board.vue | 14 +-
src/views/biz/orderProcessPlan/pgitem.vue | 30 ++++-
src/views/biz/qualityTesting/index.vue | 23 ++--
src/views/biz/station/index.vue | 118 ++++++++++-------
src/views/production/dispatchwork/index.vue | 38 ++++++
src/views/production/myassigtask/index.vue | 131 ++++++++++++++-----
11 files changed, 518 insertions(+), 128 deletions(-)
create mode 100644 src/components/SubmitDetailPage.vue
create mode 100644 src/components/SumbitDetailCard.vue
diff --git a/src/components/SubmitDetailPage.vue b/src/components/SubmitDetailPage.vue
new file mode 100644
index 0000000..734250c
--- /dev/null
+++ b/src/components/SubmitDetailPage.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/SumbitDetailCard.vue b/src/components/SumbitDetailCard.vue
new file mode 100644
index 0000000..ac2c1f6
--- /dev/null
+++ b/src/components/SumbitDetailCard.vue
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue
index 2ff0169..f89c3a1 100644
--- a/src/views/biz/device/index.vue
+++ b/src/views/biz/device/index.vue
@@ -63,15 +63,6 @@
-
-
-
-
-
+
+
@@ -148,7 +145,6 @@ import { NButton, NSpace,NTag, NIcon, NUpload, useMessage, useDialog, type DataT
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import { deviceApi, type Device } from '@/api/device'
-import { stationApi, type Station } from '@/api/station'
import { dictDataApi } from '@/api/org'
import {sectionApi, type Section} from '@/api/section'
@@ -193,7 +189,8 @@ const defaultFormData: Device = {
manufactureDate: undefined,
workshopId: '',
remark: '',
- status:''
+ status:0,
+ deviceFlag:'mes_equipment'
}
const formData = reactive({ ...defaultFormData })
@@ -201,6 +198,8 @@ const formData = reactive({ ...defaultFormData })
const deviceTypeList = ref<{ label: string; value: any ;class:any}[]>([])
const statusList = ref<{ label: string; value: any ;class:any}[]>([])
+const deviceFlagList = ref<{ label: string; value: any ;class:any}[]>([])
+
// 表单校验规则
const formRules = {
}
@@ -248,7 +247,8 @@ async function loadData() {
const res = await deviceApi.page({
page: pagination.page,
pageSize: pagination.pageSize,
- deviceCode:searchForm.deviceCode
+ deviceCode:searchForm.deviceCode,
+ deviceFlag:"mes_equipment"
})
tableData.value = res.list
pagination.itemCount = res.total
@@ -297,12 +297,7 @@ function handleAdd() {
// 编辑
function handleEdit(row: Device) {
modalTitle.value = '编辑设备表'
- console.log(row);
-
Object.assign(formData, row)
- if (formData.manufactureDate && typeof formData.manufactureDate === 'string') {
- formData.manufactureDate = new Date(formData.manufactureDate.replace(' ', 'T')).getTime()
- }
modalVisible.value = true
}
@@ -432,6 +427,10 @@ async function loadDictOptions() {
const data = await dictDataApi.listByType("sys_status")
statusList.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
}catch {}
+ try {
+ const data = await dictDataApi.listByType("mes_device_flag")
+ deviceFlagList.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
+ }catch {}
}
diff --git a/src/views/biz/flowingAround/assingWork.vue b/src/views/biz/flowingAround/assingWork.vue
index 5e92e3f..4fe2e80 100644
--- a/src/views/biz/flowingAround/assingWork.vue
+++ b/src/views/biz/flowingAround/assingWork.vue
@@ -7,7 +7,10 @@
-
+
@@ -17,12 +20,14 @@
import { ref, reactive, h, defineProps, onMounted, watch} from 'vue';
import { info } from '@/api/production'
- const props = defineProps<{
+const props = defineProps<{
id: number;
- num: number
+ num: number;
+ qcNumDisabled:boolean
}>();
-const emit = defineEmits(['updateWidth'])
+const emit = defineEmits(['updateWidth','updateQcNum'])
+
let pauseform = reactive({
id:'',
@@ -38,6 +43,10 @@ async function loadData(){
}
+function handleQcNumChange(){
+ emit('updateQcNum', pauseform.qcNum)
+}
+
watch(() => props.id, (val: number)=>{
loadData();
})
diff --git a/src/views/biz/flowingAround/index.vue b/src/views/biz/flowingAround/index.vue
index cf8d556..1ec62ff 100644
--- a/src/views/biz/flowingAround/index.vue
+++ b/src/views/biz/flowingAround/index.vue
@@ -95,7 +95,16 @@
-
+
+
@@ -109,6 +118,7 @@ import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline,
import { flowingAroundApi, type FlowingAround } from '@/api/flowingAround'
import { dictDataApi } from '@/api/org'
import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue'
+import SubmitDetailPage from '@/components/SubmitDetailPage.vue'
const message = useMessage()
const dialog = useDialog()
@@ -226,7 +236,7 @@ async function loadData() {
}
-let parentWidth = ref('width: 40%;')
+let parentWidth = ref('width: 20%;')
function handleUpdateWidth(width:string){
@@ -273,6 +283,8 @@ const modalCheckData = ref()
const modalCheckTitle = ref('')
//查看提交数据
function handleView(row: FlowingAround){
+ console.log(row);
+
modalCheckTitle.value = '提交详情'
modalCheckData.value = row
modalCheckVisible.value = true
diff --git a/src/views/biz/orderProcessPlan/board.vue b/src/views/biz/orderProcessPlan/board.vue
index 4e7a7fe..1c1161a 100644
--- a/src/views/biz/orderProcessPlan/board.vue
+++ b/src/views/biz/orderProcessPlan/board.vue
@@ -402,7 +402,7 @@ const dispatchLoading = ref(false)
const dispatchformRef = ref()
const dispatchform = reactive({
id: '', name: '', beginTime: '', endTime: '', quantity: '',
- list: [{ sectionId:'',deviceId:'',userId: '', quantity: '' }],
+ list: [{ sectionId:'',deviceList:'',userList: '', quantity: '' }],
})
const dispatchrules = {}
@@ -606,11 +606,13 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
dispatchform.beginTime = entity.beginTime
dispatchform.endTime = entity.endTime
dispatchform.quantity = entity.quantity
- dispatchform.list = [{ sectionId:'',deviceId:'',userId: '', quantity: '' }]
+ dispatchform.orderItemId = entity.orderItemId
+ dispatchform.sort = entity.sort
+ dispatchform.list = [{ sectionId:'',deviceList:'',userList: '', quantity: '' }]
}
function addpgnum() {
- dispatchform.list.push({ sectionId:'',deviceId:'',userId: '', quantity: '' })
+ dispatchform.list.push({ sectionId:'',deviceList:'',userList: '', quantity: '' })
}
function deletenum(index: number) {
@@ -619,13 +621,17 @@ function deletenum(index: number) {
function dispatchSubmit() {
let total = 0
- dispatchform.list.forEach((n: any) => { total += Number(n.quantity) || 0 })
+ dispatchform.list.forEach((n: any) => {
+ total += Number(n.quantity) || 0
+ })
+
dispatchformRef.value?.validate((v: boolean) => {
if (v) return
if (total !== Number(dispatchform.quantity)) {
message.error('派工总数量需等于生产总数', { duration: 4000 })
return
}
+
dispatchLoading.value = true
orderProcessPlanApi.assignWork(dispatchform).then(() => {
message.success('派工成功')
diff --git a/src/views/biz/orderProcessPlan/pgitem.vue b/src/views/biz/orderProcessPlan/pgitem.vue
index 718bbec..93754c2 100644
--- a/src/views/biz/orderProcessPlan/pgitem.vue
+++ b/src/views/biz/orderProcessPlan/pgitem.vue
@@ -27,19 +27,28 @@
= [
// { title: '关联生产订单ID', key: 'orderId' },
// { title: '关联工序计划ID', key: 'processId' },
// { title: '物料ID', key: 'itemId' },
+ { title: '追溯码', key: 'traceCode',align: 'center' },
{ title: '报检总数', key: 'totalQty',align: 'center' },
{ title: '已检验数量', key: 'inspectQty',align: 'center' },
{ title: '质检状态', key: 'status',align: 'center',
@@ -508,12 +509,12 @@ const columns: DataTableColumns = [
{ label: '查看详情', key: 'view' },
{ type: 'divider' }, // 分割线
{ label: '提交判定明细', key: 'submitResultDetail',show:row.status == 1 },
- { type: 'divider',show:row.status == 1 }, // 分割线
- { label: '提交部分判定明细', key: 'submitBFResultDetail',show:(row.status == 1 || row.status == 2) },
+ // { type: 'divider',show:row.status == 1 }, // 分割线
+ // { label: '提交部分判定明细', key: 'submitBFResultDetail',show:(row.status == 1 || row.status == 2) },
{ type: 'divider',show:(row.status == 1 || row.status == 2) }, // 分割线
{ label: '查询判定明细', key: 'queryResultDetail' },
- { type: 'divider' }, // 分割线
- { label: '质检撤回', key: 'cancelQuality' },
+ // { type: 'divider' }, // 分割线
+ // { label: '质检撤回', key: 'cancelQuality' },
],
// 下拉菜单项点击事件
onSelect: (key: string) => {
@@ -524,15 +525,15 @@ const columns: DataTableColumns = [
case 'submitResultDetail':
submitResultDetail(row)
break
- case 'submitBFResultDetail':
- submitBFResultDetail(row)
- break
+ // case 'submitBFResultDetail':
+ // submitBFResultDetail(row)
+ // break
case 'queryResultDetail':
queryResultDetail(row)
break
- case 'cancelQuality':
- handleCancelQuality(row)
- break
+ // case 'cancelQuality':
+ // handleCancelQuality(row)
+ // break
}
}
}, {
@@ -844,7 +845,7 @@ function submitResultDetail(row:any) {
submitFlag.value = true
- let path = `/qc/submitDetail/${row.qcNo}/${row.id}/${submitFlag.value}/${traceCodeShow.value}`
+ let path = `/qc/submitDetail/${row.qcNo}/${row.id}/${submitFlag.value}/${row.traceCode}`
router.push(path)
}
diff --git a/src/views/biz/station/index.vue b/src/views/biz/station/index.vue
index 4f01338..8c6b4ec 100644
--- a/src/views/biz/station/index.vue
+++ b/src/views/biz/station/index.vue
@@ -4,8 +4,8 @@
@@ -174,7 +171,7 @@ import {
// NGi,
NTag,
useMessage,
- //useDialog,
+ useDialog,
//type FormInst,
} from 'naive-ui'
@@ -191,8 +188,11 @@ import {
} from '@/api/production'
import PlmModelDrawer from '@/components/PlmModelDrawer.vue'
import type { PlmModelOpenContext } from '@/api/plmModel'
+import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue'
+import { qualityTestingApi, type QualityTesting } from '@/api/qualityTesting'
+import SumbitDetailCard from '@/components/SumbitDetailCard.vue'
-//const dialog = useDialog()
+const dialog = useDialog()
const message = useMessage()
@@ -431,7 +431,7 @@ const columns = [
align:'center',
title: '操作',
key: 'actions',
- width: 100,
+ width: 250,
fixed: 'right',
render(row:any) {
const buttons:any = []
@@ -442,7 +442,7 @@ const columns = [
type:'primary',
ghost:true,
onClick: () => { handlpause(row) } },
- { default: () => '报检'}
+ { default: () => '完工汇报'}
))
}
buttons.push(h(NButton, {
@@ -452,6 +452,13 @@ const columns = [
onClick: () => openPlmModel(row),
}, { default: () => '模型' }))
+ buttons.push(h(NButton, {
+ size: 'small',
+ type: 'info',
+ ghost: true,
+ onClick: ()=> cancelQuality(row)
+ }, { default: () => '质检撤回' }))
+
return buttons.length > 0 ? h(NSpace, {justify:'center'}, { default: () => buttons }) : '-'
}
}
@@ -506,7 +513,9 @@ let gxobg = reactive({})
let pausemodal = ref(false)
let pauseform = reactive({
id:'',
- qcNum:''
+ qcNum:'',
+ okData:undefined,
+ scrapData:undefined
})
const pauseformRef = ref()
@@ -542,13 +551,39 @@ function handlpause(n:any) {
pauseformRef.value?.restoreValidation()
pauseform.id = n.id
//pauseform.qcNum = `${n.quantity}`
- pauseform.qcNum = n.quantity-(n.completedQuantity ?? 0)
+ // pauseform.qcNum = n.quantity-(n.completedQuantity ?? 0)
+}
+
+function checkPauseSumbit():boolean {
+ if(pauseform.id == null) {
+ message.error("参数id为空")
+ return false
+ }
+
+ if(pauseform.qcNum == null || pauseform.qcNum == '') {
+ message.error("质检数量不能为空")
+ return false
+ }
+
+ //检查合格数量和报废数量总和是不是等于提交总数
+ const checkNum = pauseform.okData?.qty + pauseform.scrapData?.qty
+
+ if(checkNum != pauseform.qcNum) {
+ message.error("汇报数量总和不等于提交数量")
+ return false
+ }
+ return true
}
function pauseSubmit() {
- pauseformRef.value?.validate((v:any) => {
- if(!v){
- pauseLoading.value = true
+
+ var pass = checkPauseSumbit();
+
+ console.log(pass);
+
+ if(!pass) return
+
+ pauseLoading.value = true
pauseisedbtn.value = true
inspectio(Object.assign({},pauseform,{qcNum:pauseform.qcNum*1})).then(() => {
message.success('操作成功!')
@@ -561,11 +596,22 @@ function pauseSubmit() {
}).catch(() => {
pauseLoading.value = false
pauseisedbtn.value = false
- })
- }
})
}
+function handleUpdateQcNum(qcNum:number) {
+ pauseform.qcNum = qcNum
+}
+
+function handleSubmitDetail(submitDetail:any){
+ pauseform.okData = submitDetail.okData
+ pauseform.scrapData = submitDetail.scrapData
+ console.log(pauseform);
+
+
+
+}
+
// 加载字典选项
async function loadDictOptions() {
try {
@@ -588,10 +634,27 @@ async function loadDictOptions() {
// }
// })
// }
-onMounted(() => {
-
- getlist()
+function cancelQuality(row:any) {
+ dialog.warning({
+ title: '提示',
+ content: '确定要撤回质检记录吗?',
+ positiveText: '确定',
+ negativeText: '取消',
+ onPositiveClick: async () => {
+ try {
+ await qualityTestingApi.cancel(row.id)
+ message.success('撤回成功')
+ getlist()
+ } catch (error) {
+ console.log("撤回失败"+error)
+ }
+ }
+ })
+}
+
+onMounted(() => {
+ getlist()
loadDictOptions()
})