提交代码

This commit is contained in:
shaoleiliu-netizen123 2026-09-10 11:04:27 +08:00
parent 0ef48c817b
commit eec8421b61
35 changed files with 533 additions and 1847 deletions

View File

@ -106,7 +106,7 @@ export function exportNccode(params:any) {
export function loadAllNcCode(deviceId?: string | number) {
const id = deviceId != null && deviceId !== '' ? `/${deviceId}` : ''
return request({
url: `/biz/ncCode/loadAllNcCode${id}`,
url: `/biz/ncCode/loadAllNcCode/${id}`,
method: 'get'
})
}

View File

@ -199,6 +199,7 @@ export interface OrderProcessPlanVO {
processList?: ProcessPlanItemVO[]
planId?:number
}

View File

@ -8,6 +8,8 @@ export interface QcitemProcess {
processId?: number
qualityItemId?:[]
page?:number
pageSize?:number

View File

@ -44,7 +44,7 @@ export interface QualityTesting {
// 质检单表 API
export const qualityTestingApi = {
// 分页查询
page(params: { page: number; pageSize: number; qcNo?: string; status?: number }) {
page(params: { page: number; pageSize: number; qcNo?: string; status?: number; assingCode?:string }) {
return request({ url: '/mes/qc/list', method: 'get', params })
},

View File

@ -1,69 +0,0 @@
import { request } from "@/utils/request";
import { update } from "three/examples/jsm/libs/tween.module.js";
export interface Station{
id?: number,
stationCode?:string,
stationName?:string,
workshopId?:number,
sectionId?:number,
remark?:string,
status?:number,
createTime?:string,
updateTime?:string
}
export const stationApi = {
page(params:{
page:number,
pageSize:number,
stationCode:any
}){
return request({
url:"biz/station/page",
method:"get",
params
})
},
create(data:Station){
return request({
url:"biz/station/add",
method:"post",
data
})
},
update(data:Station) {
return request({
url:"biz/station/update",
method:"put",
data
})
},
delete(ids:any) {
return request({
url:`/biz/station/${ids.join(",")}`,
method:"delete"
})
},
export(params?:{
ids?:string[],
stationCode:any
}){
const p:Record<string,any> = {}
if(params?.ids?.length) p.ids = params.ids.join(",")
if(params?.stationCode != undefined && params?.stationCode !== null)
console.log(params);
console.log(1111);
return request({
url:`/biz/station/export`,
method:"get",
params:p,
responseType:"blob"
})
}
}

View File

@ -104,7 +104,6 @@ export const submitLogApi = {
//加载汇报列表
loadSumbitLog(params:{assingId:number,page?:number,pageSize?:number}){
console.log(params)
return request({url:`/mes/report/loadSumbitLog`,method:'get',params})
}
}

View File

@ -358,7 +358,7 @@ import {
NGrid,
useMessage,
useDialog,
NDropdown, NTag, type DataTableColumns,
NTag, type DataTableColumns,
} from 'naive-ui'
import {
@ -366,7 +366,6 @@ import {
RefreshOutline,
AddOutline,
ArrowDownCircleOutline,
EllipsisHorizontalOutline,
CloudUploadOutline
} from '@vicons/ionicons5'
@ -388,9 +387,8 @@ import
{
multifilelist
} from '@/api/illustrated'
import {DeviceDocumentConnection, deviceDocumentConnectionApi} from "@/api/deviceDocumentConnection.ts";
import {deviceDocumentConnectionApi} from "@/api/deviceDocumentConnection.ts";
import {Device, deviceApi} from "@/api/device.ts";
import {RowData} from "naive-ui/es/data-table/src/interface";
const dialog = useDialog()
@ -405,11 +403,6 @@ const TOKEN = userStore.token
// 权限检查
const hasPermission = (permission: string) => userStore.hasPermission(permission)
//const ncDispatchRecords = ref<ncCode[]>([])
//派工状态字典
//const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
// ==================== 搜索表单 ====================
const searchForm = reactive({
page: 1,
@ -458,28 +451,6 @@ const columns = [
key:"ncContent",
minWidth:150
},
// {
// align:"center",
// title:"工作中心",
// key:"workCenter",
// minWidth:150
// },
// {
// align:"center",
// title:"设备ID",
// key:"deviceId",
// minWidth:150
// },
// {
// align:"center",
// title:"设备名称",
// key:"deviceName",
// minWidth:150
// },
{
align:"center",
title:"状态",
@ -654,18 +625,6 @@ function handlePageSizeChange(pageSize: number) {
getlist()
}
// // 加载字典选项
// async function loadDictOptions() {
// //qcCancelLoading = true
// try {
// const data = await dictDataApi.listByType('assing_status')
// qcAssingStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
// }catch {}
// }
//新增
let addModel = ref(false)
@ -681,23 +640,11 @@ let formData = reactive<any>({
deviceName:'', //设备名称
fileId:'',
status:1, //状态:1-启用 0-禁用
// isIssued:1, //是否已下发:1-已下发 0-未下发
// issueTime:null, //下发时间
// issueBy:'', //下发人
remark:'' //备注
})
const addrules = {
ncCode: [
{ required: true, message: '请输入NC代码编号', trigger: 'blur' },
// {
// validator(rule:any,value: any) {
// if(value > pauseform.qcNum){
// return new Error(`报检数量最大为${pauseform.qcNum}`)
// }
// return true
// },
// trigger: ['blur']
// }
],
ncName:[
{ required: true, message: '请输入NC代码名称', trigger: 'blur' }
@ -743,9 +690,6 @@ function addhand(type:any,row?:any) {
formData.deviceName = row.deviceName
formData.status = row.status
formData.fileId = row.fileId+','
// formData.isIssued = row.isIssued
// formData.issueTime = row.issueTime
// formData.issueBy = row.issueBy
formData.remark = row.remark
if(type == 2){
formData.ncCode = row.ncCode
@ -756,13 +700,6 @@ function addhand(type:any,row?:any) {
flist.value.splice(0)
multifilelist(row.fileId).then(rps => {
if(rps && rps.length > 0){
// flist.value.push({
// id: rps.id,
// name: rps.originalName,
// status: 'finished', // 关键:状态设为 'finished' 表示上传完成
// url: rps.url, // 用于预览
// })
flist.value = rps.map((n:any) => {
return {
id: n.id,
@ -783,10 +720,7 @@ function addhand(type:any,row?:any) {
formData.workCenter = ''
formData.deviceId = ''
formData.deviceName = ''
formData.status = 1
// formData.isIssued = ''
// formData.issueTime = ''
// formData.issueBy = ''
formData.status = 1
formData.remark = ''
formData.fileId = ''
flist.value.splice(0)
@ -839,23 +773,6 @@ function handleCheck(v:any) {
console.log(v)
}
//删除
function delhand() {
if(chearr.value.length > 0){
batchIssue(chearr.value).then(() => {
message.success('操作成功')
})
}else{
message.error('请勾选设备')
}
}
//下发任务列表
//let isstasklist = ref<any>([])
//下发设备列表
//let issequiplist = ref<any>([])
let treeData:any = []
let xfsbvalue = ref<Array<string | number>>([])
@ -867,7 +784,6 @@ function flattenTree(list: undefined | any[]) {
const result: any[] = []
function flatten(_list: any[] = []) {
_list.forEach((item) => {
//result.push(item)
if(item.childList){
flatten(item.childList)
}else{
@ -882,23 +798,6 @@ function flattenTree(list: undefined | any[]) {
//下发
let issueModel = ref(false)
// let issformData = reactive<any>({
// taskid:'',
// equis:''
// })
// const issaddrules = {
// taskid:[
// { required: true, message: '请选择下发任务', trigger: 'blur' }
// ],
// equis:[
// { required: true, message: '请选择下发设备', trigger: 'blur' }
// ]
// }
let issarr:any[] = []
let ncCode = ref<any>('')
function tranupdate(v:any) {
@ -924,7 +823,6 @@ function issuehand(row:any) {
function isssavehand() {
if(issarr.length > 0){
batchIssue({
//ncCode:ncid,
id:ncid,
ncCodeList:issarr
}).then(() => {
@ -940,10 +838,7 @@ function isssavehand() {
}
//导出
//let selectedIds = ref<any>([])
function handleExport() {
exportNccode({}).then(rps => {
const url = window.URL.createObjectURL(rps)
const link = document.createElement('a')
@ -997,9 +892,6 @@ const handleAllCheck = (val:boolean) => {
isAllCheck.value = val
}
// function rowKey(row:RowData){
// return row.id
// }
const handleUpateCheck = async (keys:Array<string | number>,)=>{
selectedDeviceIds.value = keys
loadCreateApi()

View File

@ -33,10 +33,6 @@
<template #icon><n-icon><DownloadOutline /></n-icon></template>
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
</n-button>
<!-- <n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
<template #icon><n-icon><TrashOutline /></n-icon></template>
删除
</n-button> -->
</n-space>
</div>
@ -45,8 +41,10 @@
:columns="columns"
:data="tableData"
:loading="loading"
:row-key="(row) => row.id"
:scroll-x="1200"
:row-key="(row:any) => row.id"
size="small"
:scroll-x="1500"
:single-line="true"
v-model:checked-row-keys="selectedIds"
/>
@ -227,8 +225,11 @@
<script setup lang="ts">
import { ref, reactive, h, onMounted,computed } from 'vue'
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions, NTag } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import {
NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions, NTag,
NDataTable
} from 'naive-ui'
import { SearchOutline, RefreshOutline,CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import { basicProcessPlanApi, type BasicProcessPlan } from '@/api/basicProcessPlan'
import { qcItemApi,QcItem } from '@/api/qcItem'
import {qcitemProcessApi,QcitemProcess} from '@/api/qcitemProcess'
@ -301,36 +302,39 @@ const formRules = {
// 表格列
const columns: DataTableColumns<BasicProcessPlan> = [
{ type: 'selection' },
{ title: '工序名称', key: 'name' },
{ title: '工序编码', key: 'code' },
{ title: '是否采购', key: 'procurement',
{ title: '工序名称', key: 'name',width:'150' },
{ title: '工序编码', key: 'code',width:'150' },
{ title: '是否采购', key: 'procurement',width:'150',
render(row) {
var opt = row.procurement
return h(NTag,{type: opt ? 'success' : 'error', size: 'small'},{default: () => (opt ? '是' : '否')})
}
},
{ title: '是否委外', key: 'outsource',
{ title: '是否委外', key: 'outsource',width:'150',
render(row) {
var opt = row.outsource
return h(NTag,{type: opt ? 'success' : 'error', size: 'small'},{default: () => (opt ? '是' : '否')})
}
},
{ title: '是否质检', key: 'qualityInspection',
{ title: '是否质检', key: 'qualityInspection',width:'150',
render(row) {
var opt = row.qualityInspection
return h(NTag,{type: opt ? 'success' : 'error', size: 'small'},{default: () => (opt ? '是' : '否')})
}
},
{ title: '是否直接入库', key: 'storageEntry',
{ title: '是否入库', key: 'storageEntry',width:'150',
render(row) {
var opt = row.qualityInspection
return h(NTag,{type: opt ? 'success' : 'error', size: 'small'},{default: () => (opt ? '是' : '否')})
}
},
{ title: '工作中心', key: 'sectionName' },
{ title: '生产车间', key: 'workShopName' },
{ title: '工序说明', key: 'operDescription' },
{ title: '状态', key: 'status',
{ title: '工作中心', key: 'sectionName',width:'150' },
{ title: '生产车间', key: 'workShopName',width:'150' },
{ title: '工序说明', key: 'operDescription',width:'150',ellipsis: {
tooltip: true
}
},
{ title: '状态', key: 'status', width: 180,
render(row){
if(row.status == 0){
return h(NTag, {
@ -359,16 +363,13 @@ const columns: DataTableColumns<BasicProcessPlan> = [
{
title: '操作',
key: 'actions',
width: 140,
width: 200,
fixed: 'right',
render(row) {
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, {
default: () => [h(NIcon, null, { default: () => h(CreateOutline) }), ' 编辑']
}),
// h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row) }, {
// default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除']
// }),
h(NButton, { size: 'small', quaternary: true, onClick: () => handleOpenRelateModel(row) }, {
default: () => ['关联质检项']
})
@ -426,12 +427,6 @@ function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增
function handleAdd() {
modalTitle.value = '新增基础主数据--工序表'
Object.assign(formData, defaultFormData)
modalVisible.value = true
}
// 编辑
function handleEdit(row: BasicProcessPlan) {
@ -465,44 +460,6 @@ async function handleSubmit() {
}
}
// 删除
function handleDelete(row: BasicProcessPlan) {
dialog.warning({
title: '提示',
content: '确定要删除该记录吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await basicProcessPlanApi.delete([row.id!])
message.success('删除成功')
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await basicProcessPlanApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
@ -564,7 +521,7 @@ async function loadDictOptions() {
}
//开启关联质检项抽屉
function handleOpenRelateModel(row) {
function handleOpenRelateModel(row:any) {
relatePagination.page = 1
relatePagination.pageSize = 10
relateLoading.value = true

View File

@ -7,8 +7,8 @@
<n-form-item label="叫料设备">
<n-input v-model:value="searchForm.deviceId" placeholder="请输入叫料设备" clearable />
</n-form-item>
<n-form-item label="叫料状态 1叫料中 2调度确认">
<n-select v-model:value="searchForm.status" placeholder="请选择叫料状态 1叫料中 2调度确认" clearable style="width: 150px" :options="statusOptions" />
<n-form-item label="叫料状态">
<n-select v-model:value="searchForm.status" placeholder="请选择叫料状态" clearable style="width: 150px" :options="statusOptions" />
</n-form-item>
<n-form-item>
<n-space>
@ -53,7 +53,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -155,7 +155,7 @@ const columns: DataTableColumns<CallingMaterials> = [
{ type: 'selection' },
{ title: '叫料人', key: 'userId' },
{ title: '叫料设备', key: 'deviceId' },
{ title: '叫料状态 1叫料中 2调度确认', key: 'status',
{ title: '叫料状态', key: 'status',
render(row) {
const val = row.status
const opt = statusOptions.value.find(o => o.value === val || String(o.value) === String(val))

View File

@ -50,7 +50,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -196,7 +196,6 @@ function handleSearch() {
// 重置
function handleReset() {
searchForm.id = null
handleSearch()
}

View File

@ -245,9 +245,8 @@
<script setup lang="ts">
import { ref, reactive, h, onMounted } from 'vue'
import { NButton, NSpace, NIcon, NUpload, useMessage,NTag, useDialog, type DataTableColumns, type UploadCustomRequestOptions, NDropdown, NImage } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline,DocumentTextOutline,
CashOutline as CashIcon,
import { NButton, NSpace, NIcon, NUpload, useMessage,NTag, useDialog, type DataTableColumns, type UploadCustomRequestOptions, NDropdown } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline,
EllipsisHorizontalCircle
} from '@vicons/ionicons5'
import { concessionApplyApi, DetailModel, type ConcessionApply } from '@/api/concessionApply'
@ -255,7 +254,6 @@ import { dictDataApi } from '@/api/org'
// import html2canvas from 'html2canvas'
// import { jsPDF } from 'jspdf'
import * as dd from 'dingtalk-jsapi';

View File

@ -34,10 +34,6 @@
<!-- 工具栏 -->
<div class="table-toolbar">
<n-space>
<!-- <n-button type="primary" @click="handleAdd">-->
<!-- <template #icon><n-icon><AddOutline /></n-icon></template>-->
<!-- 新增-->
<!-- </n-button>-->
<n-button @click="importModalVisible = true">
<template #icon>
<n-icon>
@ -71,7 +67,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -179,12 +175,11 @@
import {ref, reactive, h, onMounted} from 'vue'
import {
NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
NTag, NInput, NForm, NModal, NFormItem, NDescriptionsItem, NDescriptions, NFormItemGi, NInputNumber
NTag, NInput, NForm, NModal, NFormItem, NDescriptionsItem, NDescriptions, NInputNumber
} from 'naive-ui'
import {
SearchOutline,
RefreshOutline,
AddOutline,
TrashOutline,
CreateOutline,
CloudUploadOutline,
@ -192,7 +187,7 @@ import {
} from '@vicons/ionicons5'
import {STOCK_IN_STATUS_MAP, STOCK_IN_TYPE_MAP,defectiveWarehouseApi, type DefectiveWarehouse} from '@/api/defectiveWarehouse'
import {dictDataApi} from '@/api/org'
import { type StockIn, stockInApi} from "@/api/stockIn.ts";
import { type StockIn} from "@/api/stockIn.ts";
const message = useMessage()
const dialog = useDialog()
@ -325,7 +320,6 @@ function handleSearch() {
// 重置
function handleReset() {
searchForm.id = null
searchForm.status = null
handleSearch()
@ -348,17 +342,9 @@ function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增
function handleAdd() {
modalTitle.value = '新增不良品库'
Object.assign(formData, defaultFormData)
modalVisible.value = true
}
// 编辑
function handleEdit(row: DefectiveWarehouse) {
modalTitle.value = '编辑不良品库'
console.log(row)
Object.assign(formData, row)
modalVisible.value = true
}
@ -493,7 +479,6 @@ const doConfirm = async () => {
message.success("入库成功")
loadData()
} catch (error) {
console.log("确认入库异常" + error)
message.error("确认入库异常")
} finally {
confirmVisible.value = false

View File

@ -44,10 +44,6 @@
<n-button @click="goRealtimeBoard">
设备状态看板
</n-button>
<!-- <n-button @click="importModalVisible = true">
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
导入
</n-button> -->
<n-button @click="handleExport">
<template #icon>
<n-icon>
@ -72,7 +68,7 @@
:columns="columns"
:data="tableData"
:loading="loading"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1800"
v-model:checked-row-keys="selectedIds"
/>
@ -341,7 +337,7 @@ const dialog = useDialog()
const router = useRouter()
//设备Id
const deviceId = ref<number>(undefined)
const deviceId = ref<number>(null)
//设备负责人列表
const deviceManagerList = ref<{ label: string, value: any }[]>([])
@ -354,14 +350,11 @@ interface TreeNode {
}
let sectionList = reactive<TreeNode[]>([])
// const sectionList = ref<SysDept[]>([]) // 树形数据
//设备异常记录
const deviceErrorLogList = ref<DeviceAbnormalRecord[]>([])
const deviceAbnormalRecordDrawerVisible = ref<Boolean>(false) //异常记录抽屉显示
const title = ref('')
//设备下发记录
const deviceIssueRecordList = ref<[]>([])
const deviceDispatchLogDrawerVisible = ref<Boolean>(false)
//操作日志抽屉

View File

@ -50,7 +50,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"

View File

@ -47,7 +47,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -146,7 +146,7 @@ const columns: DataTableColumns<DeviceGather> = [
{ title: '设备ID', key: 'deviceId' },
{ title: '任务ID', key: 'assingWorkId' },
{ title: '设备当前生产人员id', key: 'userId' },
{ title: '采集数量.,默认1', key: 'gatherNum' },
{ title: '采集数量', key: 'gatherNum' },
{ title: '采集时间', key: 'gatherTime' },
{
title: '操作',

View File

@ -29,18 +29,6 @@
<template #icon><n-icon><AddOutline /></n-icon></template>
新增
</n-button>
<!-- <n-button @click="importModalVisible = true">
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
导入
</n-button>
<n-button @click="handleExport">
<template #icon><n-icon><DownloadOutline /></n-icon></template>
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
</n-button>
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
<template #icon><n-icon><TrashOutline /></n-icon></template>
删除
</n-button> -->
</n-space>
</div>
@ -92,7 +80,6 @@
</n-gi>
<n-gi>
<n-form-item label="订阅的设备" path="subscriptionDeviceIds">
<!-- <n-input v-model:value="formData.subscriptionDeviceIds" placeholder="请输入订阅的设备集合" /> -->
<n-select
remote
multiple
@ -270,10 +257,6 @@ errorNotificationApi.getopt().then(rps => {
rps.forEach((n:any) => {
yclist.value[n.value] = n.childList
})
// keyopt.value = rps.map((n:any) => ({
// label: n.label,
// value: n.value
// }))
})
//获取设备列表
@ -306,20 +289,9 @@ userApi.getPathList().then(rps => {
})
// const itemOptions = computed(() => {
// if (!selectedCategory.value) {
// return [] // 未选择分类时,选项列表为空
// }
// return allItems[selectedCategory.value] || []
// })
function keyupdate(v:any,n:any) {
formData.subscriptionDiscoverField = null
yiczdopt.value = n.childList
console.log(v)
console.log(n)
}
// 表单校验规则
@ -328,9 +300,6 @@ const formRules = {
// 表格列
const columns: DataTableColumns<ErrorNotification> = [
// {
// type: 'selection'
// },
{
align:"center",
title: '订阅的异常',
@ -514,7 +483,6 @@ function handleEdit(row: ErrorNotification) {
//发送方式
if(row.sendingMethod){
formData.sendingMethod = formData.sendingMethod.split(',')
//formData.sendingMethod = formData.sendingMethod.map((n:any) => n*1)
}
@ -589,42 +557,7 @@ function handleDelete(row: ErrorNotification) {
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await errorNotificationApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
try {
const params: Record<string, any> = {}
if (selectedIds.value.length > 0) params.ids = selectedIds.value
const blob = await errorNotificationApi.export(params)
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = 'ErrorNotification数据.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 下载导入模板
async function handleDownloadTemplate() {

View File

@ -53,7 +53,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"

View File

@ -19,34 +19,13 @@
</n-form>
</div>
<!-- 工具栏 -->
<!-- <div class="table-toolbar">
<n-space>
<n-button type="primary" @click="handleAdd">
<template #icon><n-icon><AddOutline /></n-icon></template>
新增
</n-button>
<n-button @click="importModalVisible = true">
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
导入
</n-button>
<n-button @click="handleExport">
<template #icon><n-icon><DownloadOutline /></n-icon></template>
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
</n-button>
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
<template #icon><n-icon><TrashOutline /></n-icon></template>
删除
</n-button>
</n-space>
</div> -->
<!-- 表格 -->
<n-data-table
:columns="columns"
:data="tableData"
:loading="loading"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
/>
@ -126,8 +105,8 @@
<script setup lang="ts">
import { ref, reactive, h, onMounted, computed } from 'vue'
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, EyeOutline, DownloadOutline } from '@vicons/ionicons5'
import { NButton, NSpace, NIcon, useMessage, useDialog, type DataTableColumns } from 'naive-ui'
import { SearchOutline, RefreshOutline, CreateOutline, EyeOutline } from '@vicons/ionicons5'
import { flowingAroundApi, type FlowingAround } from '@/api/flowingAround'
import { dictDataApi } from '@/api/org'
import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue'
@ -281,18 +260,6 @@ function handlePageSizeChange(pageSize: number) {
loadData()
}
// 选择
function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增
function handleAdd() {
modalTitle.value = '新增流转记录表'
Object.assign(formData, defaultFormData)
modalVisible.value = true
}
const modalCheckVisible = ref(false)
const modalCheckData = ref<FlowingAround>()
const modalCheckTitle = ref('')
@ -343,98 +310,6 @@ async function handleSubmit() {
}
}
// 删除
function handleDelete(row: FlowingAround) {
dialog.warning({
title: '提示',
content: '确定要删除该记录吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await flowingAroundApi.delete([row.id!])
message.success('删除成功')
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await flowingAroundApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
try {
const params: Record<string, any> = {}
if (selectedIds.value.length > 0) params.ids = selectedIds.value
const blob = await flowingAroundApi.export(params)
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '流转记录表数据.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 下载导入模板
async function handleDownloadTemplate() {
try {
const blob = await flowingAroundApi.downloadTemplate()
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '流转记录表导入模板.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 导入上传
async function handleImportUpload({ file }: UploadCustomRequestOptions) {
if (!file.file) return
try {
const result = await flowingAroundApi.importData(file.file)
if (result.fail > 0) {
dialog.warning({
title: '导入结果',
content: `成功: ${result.success} 条,失败: ${result.fail} 条\n错误信息: ${(result.errors || []).join('\n') || '无'}`,
positiveText: '确定'
})
} else {
message.success(`导入成功,共 ${result.success} 条数据`)
importModalVisible.value = false
}
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
const flowingAroundTypeOptions = ref<{ label: string; value: any }[]>([])
const confirmResultOptions = computed<any[]>(() => {

View File

@ -32,7 +32,6 @@
style="margin-bottom:15px"
/>
<div style="margin-bottom: 1px;">
<!-- <template #footer> -->
<n-space justify="end">
<n-button type="error" :disabled="kingdeeLoading" @click="reCrawlReorderForm">
重新读取数据
@ -45,7 +44,6 @@
</n-button>
<n-button @click="$emit('close-modal')">关闭</n-button>
</n-space>
<!-- </template> -->
</div>
</template>
@ -88,7 +86,6 @@ watch(() => props.kingdeeTableData, () => {
kingdeeTableData.value = (props.kingdeeTableData as KingdeeMoTableRow[]) || []
}, { deep: true })
const kingdeeModalVisible = ref(false)
/** 子组件自身操作(保存/同步)的加载状态 */
const actionLoading = ref(false)
/** 表格与按钮共用:父级查询 loading 或本地操作 loading */
@ -97,7 +94,7 @@ const kingdeeLoading = computed(() => props.loading || actionLoading.value)
type KingdeeMoTableRow = Omit<KingdeePrdMo, 'children'> & { processRoutes: KingdeeProcessRoute[] }
const kingdeeTableData = ref<KingdeeMoTableRow[]>([])
const kingdeeExpandedKeys = ref<Array<string | number>>([])
// const kingdeeCurrentProjectId = ref<number | null>(null) // 记录当前正在查询的订单ID
const kingdeeTableMaxHeight = 'min(78vh, 720px)'
const kingdeeMoScrollX = 1820
const kingdeeProcessScrollX = 1540

View File

@ -22,35 +22,13 @@
</n-form>
</div>
<!-- 工具栏 -->
<!-- <div class="table-toolbar">
<n-space>
<n-button type="primary" @click="handleAdd">
<template #icon><n-icon><AddOutline /></n-icon></template>
新增
</n-button>
<n-button @click="importModalVisible = true">
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
导入
</n-button>
<n-button @click="handleExport">
<template #icon><n-icon><DownloadOutline /></n-icon></template>
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
</n-button>
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
<template #icon><n-icon><TrashOutline /></n-icon></template>
删除
</n-button>
</n-space>
</div> -->
<!-- 表格 -->
<n-data-table
:columns="columns"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -127,7 +105,7 @@
<script setup lang="ts">
import { ref, reactive, h, onMounted } from 'vue'
import { NButton, NSpace, NSelect ,NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import { SearchOutline, RefreshOutline, TrashOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import { orderApi, type Order } from '@/api/order'
import { dictDataApi } from '@/api/org'
@ -176,17 +154,12 @@ const formRules = {
// 表格列
const columns: DataTableColumns<Order> = [
// { type: 'selection' },
// { title: 'id', key: 'id' },
{ title: '订单编号', key: 'orderNo' },
{ title: '购买人', key: 'userName' },
{ title: '商品', key: 'productName' },
{ title: '购买份额', key: 'quota' },
{ title: '总价', key: 'totalPrice' },
{ title: '创建时间', key: 'createTime' },
// { title: '修改时间', key: 'updateTime'},
// { title: '创建人', key: 'createBy' },
// { title: '更新人', key: 'updateBy' },
{ title: '购买结果', key: ' payPhotoUrl',
render(row) {
return row.payPhotoUrl ? h('img', {
@ -198,12 +171,9 @@ const columns: DataTableColumns<Order> = [
{ title: '购买状态', key: 'payStatus',
render(row) {
return h(NSelect,{
// 绑定当前行的status值(双向绑定核心)
value: row.payStatus,
// 选中值变化时,更新当前行数据
'onUpdate:value': (val) => {
row.payStatus = val
// 可在这里触发接口保存、校验等逻辑
Object.assign(formData, row)
handleAudit();
},
@ -219,9 +189,6 @@ const columns: DataTableColumns<Order> = [
fixed: 'right',
render(row) {
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [
// h(NButton, { size: 'small', quaternary: true, onClick: () => handleEdit(row) }, {
// default: () => [h(NIcon, null, { default: () => h(CreateOutline) }), ' 编辑']
// }),
h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row), disabled: row.payStatus === 2 }, {
default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除']
})
@ -276,25 +243,7 @@ function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增
function handleAdd() {
modalTitle.value = '新增订单'
Object.assign(formData, defaultFormData)
modalVisible.value = true
}
// 编辑
function handleEdit(row: Order) {
modalTitle.value = '编辑订单'
Object.assign(formData, row)
if (formData.createTime && typeof formData.createTime === 'string') {
formData.createTime = new Date(formData.createTime.replace(' ', 'T')).getTime()
}
if (formData.updateTime && typeof formData.updateTime === 'string') {
formData.updateTime = new Date(formData.updateTime.replace(' ', 'T')).getTime()
}
modalVisible.value = true
}
async function handleAudit() {
try {
@ -357,44 +306,6 @@ function handleDelete(row: Order) {
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await orderApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
try {
const params: Record<string, any> = {}
if (selectedIds.value.length > 0) params.ids = selectedIds.value
if (searchForm.orderNo != null) params.orderNo = searchForm.orderNo
const blob = await orderApi.export(params)
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '订单数据.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 下载导入模板
async function handleDownloadTemplate() {
try {

View File

@ -132,12 +132,6 @@
label-width="120px"
>
<n-grid :cols="2">
<!-- <n-gi>
<n-form-item label="生产令号" path="productionCode">
<n-input v-if="formData.id" v-model:value="formData.productionCode" placeholder="请输入生产令号" />
<n-input v-else v-model:value="formData.productionCode" @input="gongxu" placeholder="请输入生产令号" />
</n-form-item>
</n-gi> -->
<n-gi>
<n-form-item label="项目名称" path="project">
<n-input v-if="formData.id" v-model:value="formData.projectName" disabled placeholder="请选择项目" />
@ -158,8 +152,6 @@
<n-gi>
<n-form-item label="物料编码" path="code">
<n-input v-if="formData.id" v-model:value="formData.code" disabled placeholder="请选择物料编码" />
<!-- <n-input v-else v-model:value="formData.code" placeholder="请选择物料编码" /> -->
<!-- @search="wlhand"-->
<n-select
v-else
v-model:value="formData.code"
@ -220,7 +212,6 @@
</n-gi>
<n-gi>
<n-form-item label="是否采购" path="procurement">
<!-- <n-input v-model:value="formData.procurement" placeholder="请输入是否采购, 1是 0不是" /> -->
<n-radio-group v-model:value="formData.procurement" name="radiogroup">
<n-space>
<n-radio :value="1">是</n-radio>
@ -241,7 +232,6 @@
</n-gi>
<n-gi>
<n-form-item label="派工接收人" path="assingWorkList">
<!-- <n-input v-model:value="formData.assingWorkId" placeholder="请选择派工接收人" /> -->
<n-select
multiple
filterable
@ -277,12 +267,6 @@
</tr>
</thead>
<tbody class="sort-target">
<!-- <gxitem
v-for="(n,i) in planList"
:obj="n"
:index="i"
@update="gxupdata"
/> -->
<tr
v-for="(n,i) in planList"
:key="i"
@ -342,13 +326,6 @@
<n-input v-model:value="dispatchform.name" disabled />
</n-form-item>
<n-form-item label="指派员工" path="assingWorkList">
<!-- <n-select
v-model:value="dispatchform.userid"
:options="yglist"
clearable
placeholder="请选择员工"
/> -->
<!--v-model:value="dispatchform.assingWorkList"-->
<n-select
multiple
filterable
@ -361,8 +338,6 @@
@search="slehand"
@update:value="updatesle"
/>
<!-- <n-input v-model:value="dispatchform.userid" placeholder="请选择员工" /> -->
</n-form-item>
</n-form>
<template #footer>
@ -404,7 +379,7 @@
<script setup lang="ts">
import { ref, reactive, h, computed, onMounted, type HTMLAttributes } from 'vue'
import { NButton, NSpace, NIcon, NTag, useMessage, useDialog, type UploadCustomRequestOptions, type TreeOption, type DataTableColumns } from 'naive-ui'
import { NButton, NSpace, NIcon, NTag, useMessage, useDialog, type TreeOption, type DataTableColumns } from 'naive-ui'
import { SearchOutline, RefreshOutline, CreateOutline, PlayOutline, DocumentTextOutline } from '@vicons/ionicons5'
import { orderItemApi, type OrderItem } from '@/api/orderItem'
import { processRouteApi } from '@/api/processRoute'
@ -497,7 +472,6 @@ async function loadProjectTree() {
// 表格数据
const tableData = ref<any>([])
const loading = ref(false)
const selectedIds = ref<any>([])
const pagination = reactive({
page: 1,
pageSize: 10,
@ -675,7 +649,7 @@ const columns = computed(() => [
align:'center',
title: '物料编码',
key: 'code',
width:"120"
minWidth:"200"
},
{
@ -727,30 +701,12 @@ const columns = computed(() => [
return h(NTag, { type: tagType, size: 'small' }, { default: () => opt.label })
}
},
// {
// align:'center',
// title: '产品序列',
// key: 'sort',
// width:"120"
// },
{
align:'center',
title: '生产数量',
key: 'quantity',
width:"120"
},
// {
// align:'center',
// title: '是否半成品',
// key: 'sfProduct',
// width:"120"
// },
// {
// align:'center',
// title: '是否采购',
// key: 'procurement',
// width:"120"
// },
{
align:'center',
title: '开始时间',
@ -767,31 +723,13 @@ const columns = computed(() => [
align:'center',
title: '实际开始时间',
key: 'actualStartTime',
width:"120"
width:"200"
},
{
align:'center',
title: '实际结束时间',
key: 'actualEndTime',
width:"120"
},
{
align:'center',
title: '派工操作人',
key: 'assingWorkOperationName',
width:"120"
},
{
align:'center',
title: '派工接收人',
key: 'assingWorkName',
width:"200"
},
{
align:'center',
title: '派工时间',
key: 'assingWorkTime',
width:"120"
width:"200"
},
{
align:'center',
@ -922,10 +860,6 @@ function handlePageSizeChange(pageSize: number) {
loadData()
}
// 选择
function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
//工序
//根据生产令号查询工序
@ -955,33 +889,14 @@ function tuozChange() {
console.log(planList.value)
}
// function gxupdata(v:any) {
// console.log(planList.value,'planList')
// console.log(v,'gx')
// }
// 新增
function handleAdd() {
modalTitle.value = '新增生产订单'
Object.assign(formData, defaultFormData)
modalVisible.value = true
xmhand()
planList.value.splice(0)
}
//查询项目
let xmlist = ref<any>([])
let xmloading = ref(false)
async function xmhand() {
xmloading.value = true
xmlist.value = await orderItemApi.xmoptions({});
xmloading.value = false
}
let wllist = ref<any>([])
function xmselupdate(v:any,opt:any) {
planList.value.splice(0)
@ -1012,7 +927,7 @@ const kingdeeModalTitle = ref('金蝶生产订单')
const kingdeeLoading = ref(false)
const kingdeeTableData = ref<KingdeeMoTableRow[]>([])
// const kingdeeExpandedKeys = ref<Array<string | number>>([])
async function reCrawlReorderForm(id:number,reCrawl:Boolean){
kingdeeLoading.value = true
@ -1046,18 +961,6 @@ async function holdTemporarilySave(id: number, data: KingdeePrdMo[]) {
}
}
// const synchronizationSave = async (id: number, data: KingdeePrdMo[], callback:Function) => {
// try {
// await orderItemApi.synchronizationSave(id, data) .then((rps:any) =>{
// }).catch((res) => {
// callback(res)
// })
// // 接口拿到数据,调用子的回调,回传结果
// } catch (err) {
// callback(err)
// }
// }
// 同步订单和计划表(通过 callback 回传结果,供子弹等待接口完成)
async function synchronizationSave(id: number, data: KingdeePrdMo[], callback: Function) {
@ -1208,37 +1111,18 @@ function slehand(v?:any) {
}
})
}
console.log(yglist.value,'12')
loadingRef.value = false
}).catch(() => {
loadingRef.value = false
})
}
function disphand(v:any){
dispatchmodal.value = true
dispatchformRef.value?.restoreValidation()
dispatchform.id = v.id
dispatchform.name = v.name
//dispatchform.userid = ''
dispatchform.assingWorkList = ''
slehand()
}
function dispatchSubmit() {
dispatchformRef.value?.validate((v:any) => {
if(!v){
// dispatchLoading.value = true
// dispatchddbtn.value = true
// message.success('操作成功!')
// setTimeout(()=> {
// dispatchmodal.value = false
// dispatchform.value = false
// dispatchLoading.value = false
// dispatchddbtn.value = false
// loadData()
// },1000)
orderItemApi.assignWork(Object.assign({},dispatchform,{assingWorkList:dispatchform.assingWorkList.split(',')}) ).then(() => {
message.success('操作成功!')
setTimeout(()=> {
@ -1255,24 +1139,6 @@ function dispatchSubmit() {
})
}
// 删除
function handleDelete(row: OrderItem) {
dialog.warning({
title: '提示',
content: '确定要删除该记录吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await orderItemApi.delete([row.id!])
message.success('删除成功')
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 开工:生成工单
function handleStartWork(row: OrderItem) {
@ -1293,87 +1159,6 @@ function handleStartWork(row: OrderItem) {
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await orderItemApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
try {
const params: Record<string, any> = {}
if (selectedIds.value.length > 0) params.ids = selectedIds.value
if (searchForm.productionCode) params.productionCode = searchForm.productionCode
if (searchForm.code) params.code = searchForm.code
if (searchForm.projectName) params.projectName = searchForm.projectName
if (searchForm.orderCode) params.orderCode = searchForm.orderCode
if (searchForm.routeCode) params.routeCode = searchForm.routeCode
if (searchForm.workshopId) params.workshopId = searchForm.workshopId
if (searchForm.beginTime != null) params.beginTime = searchForm.beginTime
if (searchForm.endTime != null) params.endTime = searchForm.endTime
const blob = await orderItemApi.export(params)
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '生产订单数据.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 下载导入模板
async function handleDownloadTemplate() {
try {
const blob = await orderItemApi.downloadTemplate()
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '生产订单导入模板.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 导入上传
async function handleImportUpload({ file }: UploadCustomRequestOptions) {
if (!file.file) return
try {
const result = await orderItemApi.importData(file.file)
if (result.fail > 0) {
dialog.warning({
title: '导入结果',
content: `成功: ${result.success} 条,失败: ${result.fail} 条\n错误信息: ${(result.errors || []).join('\n') || '无'}`,
positiveText: '确定'
})
} else {
message.success(`导入成功,共 ${result.success} 条数据`)
importModalVisible.value = false
}
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
// 加载车间选项(来自部门,不再使用字典)
async function loadWorkshopOptions() {
try {

View File

@ -16,8 +16,6 @@ const submitList = ref<SubmitLog[]>([])
//根据工序Id加载汇报详情
async function loadReportDetail() {
try {
console.log(props.orderItemId)
const res = await submitLogApi.getOrderItemReportDetail({
page: pagination.page,
pageSize: pagination.pageSize,
@ -53,7 +51,7 @@ const columns = [
title: '汇报状态',
key: 'submitStatus',
width: 120,
render(row) {
render(row:any) {
const option = submitStatusOptions.value.find(o => o.value === row.submitStatus)
return h(NTag, { type: option.class, size: 'small' }, { default: () => option.label })
}

View File

@ -183,8 +183,6 @@ const passRate = computed(() => {
return Math.round((qualifiedQty.value / completedQty.value) * 100)
})
// const remainQty = computed(() => Math.max(0, totalQty.value - completedQty.value))
const statusTag = computed(() => {
const s = props.process.processStatus
if (s == null) return { label: '-', type: 'default' as const }

View File

@ -54,7 +54,7 @@ const columns = [
title: '汇报状态',
key: 'submitStatus',
width: 120,
render(row) {
render(row:any) {
const option = submitStatusOptions.value.find(o => o.value === row.submitStatus)
return h(NTag, { type: option.class, size: 'small' }, { default: () => option.label })
}

View File

@ -13,9 +13,6 @@
<n-form-item label="工序编码">
<n-input v-model:value="searchForm.code" placeholder="请输入工序编码" clearable />
</n-form-item>
<!-- <n-form-item label="生产订单">
<n-input v-model:value="searchForm.orderItemId" placeholder="请输入生产订单id" clearable />
</n-form-item> -->
<n-form-item>
<n-space>
<n-button type="primary" @click="handleSearch">
@ -38,21 +35,7 @@
<template #icon><n-icon><AddOutline /></n-icon></template>
新增
</n-button>
<!-- <n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete" size="small">
<template #icon><n-icon><TrashOutline /></n-icon></template>
删除
</n-button> -->
</n-space>
<!-- <n-button-group size="large">
<n-button type="success" @click="importModalVisible = true" size="small">
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
导入
</n-button>
<n-button @click="handleExport" size="small">
<template #icon><n-icon><DownloadOutline /></n-icon></template>
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
</n-button>
</n-button-group> -->
</div>
<div class="table-toolbar" style="margin-top: -8px">
@ -91,13 +74,6 @@
</template>
</n-pagination>
</div>
<!-- :pagination="pagination"
:row-key="(row:any) => row.id"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
-->
</n-card>
<!-- 新增/编辑弹窗 -->
@ -265,13 +241,6 @@
<n-input v-model:value="dispatchform.endTime" disabled />
</n-form-item>
</n-gi>
<!-- <pgitem
v-for="(n,i) in dispatchform.userlist"
:obj="n"
:index="i"
@addhand="addpgnum"
@delehand="deletenum(i)"
/> -->
<n-gi :span="24">
<pgitem
v-for="(n,i) in dispatchform.list"
@ -282,65 +251,6 @@
@addhand="addpgnum"
@delehand="deletenum(i)"
/>
<!-- <n-grid :cols="8">
<template v-for="(n,i) in dispatchform.userlist">
<n-gi :span="8">
<n-form-item
label="指派员工"
:rule="{
required: true,
message: '请选择员工',
trigger: 'blur'
}"
>
<n-select
v-model:value="n.id"
filterable
placeholder="请输入用户名称搜索"
:options="yglist"
:loading="loadingRef"
clearable
remote
:clear-filter-after-select="false"
@search="slehand"
/>
</n-form-item>
</n-gi>
<n-gi :span="8">
<n-form-item
label="数量"
:rule="{
required: true,
message: `请输入数量`,
trigger: ['input', 'blur'],
}"
>
<n-input v-model:value="n.num" />
</n-form-item>
</n-gi>
<n-gi :span="8" style="padding-left:10px;">
<n-icon
v-if="i == 0"
size="25"
style="padding-top: 5px;cursor: pointer;" color="#1060c9"
@click="addpgnum"
>
<AddOutline />
</n-icon>
<n-icon
v-else
size="18"
style="padding:7px 0 0 2px;cursor: pointer;" color="#d03050"
@click="deletenum(i)"
>
<TrashOutline />
</n-icon>
</n-gi>
</template>
</n-grid> -->
</n-gi>
</n-grid>
@ -416,9 +326,7 @@ import {
import {
SearchOutline,
RefreshOutline,
AddOutline,
TrashOutline,
//CreateOutline,
AddOutline,
CloudUploadOutline,
DownloadOutline
} from '@vicons/ionicons5'
@ -793,11 +701,6 @@ function handlePageSizeChange(pageSize: number) {
loadData()
}
// 选择
function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增
function handleAdd() {
modalTitle.value = '新增工序计划'
@ -907,8 +810,6 @@ let dispatchddbtn = ref(false)
const dispatchformRef = ref()
let loadingRef = ref(false)
function addpgnum() {
dispatchform.list.push({
userId:'',
@ -983,67 +884,6 @@ function dispatchSubmit() {
})
}
// 删除(工序计划 id)
function handleDelete(process: ProcessPlanItemVO) {
dialog.warning({
title: '提示',
content: '确定要删除该工序计划吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await orderProcessPlanApi.delete([process.planId!])
message.success('删除成功')
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 批量删除
function handleBatchDelete() {
dialog.warning({
title: '提示',
content: `确定要删除选中的 ${selectedIds.value.length} 条记录吗?`,
positiveText: '确定',
negativeText: '取消',
onPositiveClick: async () => {
try {
await orderProcessPlanApi.delete(selectedIds.value)
message.success('删除成功')
selectedIds.value = []
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
})
}
// 导出
async function handleExport() {
try {
const params: Record<string, any> = {}
if (selectedIds.value.length > 0) params.ids = selectedIds.value
if (searchForm.id != null) params.id = searchForm.id
if (searchForm.name) params.name = searchForm.name
if (searchForm.code) params.code = searchForm.code
if (searchForm.orderItemId != null) params.orderItemId = searchForm.orderItemId
const blob = await orderProcessPlanApi.export(params)
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '工序计划数据.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// 下载导入模板
async function handleDownloadTemplate() {
try {

View File

@ -66,13 +66,13 @@
</n-gi>
<n-gi :span="10">
<n-form-item
label="NC下发"
label="文件下发"
:path="`${listname}[${index}].ncId`"
>
<n-select
v-model:value="obj.ncId"
filterable
placeholder="请选择下发NC"
placeholder="请选择下发文件"
:options="ncList"
clearable
remote

View File

@ -195,7 +195,7 @@
<script setup lang="ts">
import { ref, reactive, h, computed, onMounted, watch } from 'vue'
import { NButton, NSpace, NIcon, NTag, NDatePicker, NDataTable, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline, EyeOutline, CalendarOutline } from '@vicons/ionicons5'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline, EyeOutline } from '@vicons/ionicons5'
import { orderProjectApi, type OrderProject, type KingdeePrdMo, type KingdeeProcessRoute } from '@/api/orderProject'
import { mapKingdeeMoListToTableRows } from '@/utils/kingdeeSchedule'
import { dictDataApi } from '@/api/org'
@ -693,34 +693,9 @@ async function handleKingdeeQuery(row: OrderProject,reCrawl:Boolean) {
kingdeeLoading.value = true
kingdeeTableData.value = []
kingdeeExpandedKeys.value = []
reCrawlReorderForm(row.id,reCrawl)
// try {
// const data = await orderProjectApi.getKingdeeOrder(row.id)
// kingdeeTableData.value = (Array.isArray(data) ? data : []).map((mo) => {
// const { children, ...rest } = mo
// const routes = [...(children ?? [])]
// .sort((a, b) => (a.operNumber ?? 0) - (b.operNumber ?? 0))
// .map((r) => normalizeKingdeeProcessRoute({
// ...r,
// planStartTime: r.planStartTime ?? null,
// planFinishTime: r.planFinishTime ?? null,
// }))
// return { ...rest, processRoutes: routes }
// })
// if (kingdeeTableData.value.length === 0) {
// message.info('未查询到金蝶生产订单数据')
// }
// } finally {
// kingdeeLoading.value = false
// }
reCrawlReorderForm(row.id, reCrawl)
}
// 暂存金蝶生产订单数据(草稿)
// async function holdTemporarilyCallback(id: number, data: KingdeePrdMo[]) {
// await orderProjectApi.saveKingdeeOrderDraft(id, data)
// }
// 暂存金蝶生产订单数据(草稿)
async function handleSaveDraft(id: number, data: KingdeePrdMo[]) {
try {

View File

@ -63,7 +63,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id!"
:row-key="(row:any) => row.id!"
:scroll-x="1720"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -266,8 +266,8 @@ async function copyText(text: string) {
try {
await navigator.clipboard.writeText(text)
message.success('已复制')
} catch {
message.warning('复制失败')
} catch (error){
message.warning('复制失败'+error)
}
}

View File

@ -54,7 +54,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@ -69,9 +69,6 @@
<n-form-item-gi label="mapper" path="mapperKey">
<n-select v-model:value="formData.mapperKey" filterable placeholder="请选择mapper" :options="mapperOptions" />
</n-form-item-gi>
<!-- <n-form-item-gi label="控制方法" path="controlMethod">
<n-select v-model:value="selectedMethod" filterable multiple placeholder="请选择控制方法" :options="methodOptions" />
</n-form-item-gi> -->
</n-grid>
<n-grid :cols="1" :x-gap="24">
@ -136,11 +133,10 @@
<script setup lang="ts">
import { ref, reactive, h, onMounted, watch } from 'vue'
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
import { NButton, NSpace, NIcon, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
import { permissionConfigApi, type PermissionConfig } from '@/api/permissionConfig'
import { roleApi, SysRole } from '@/api/system'
import { any, select } from 'three/tsl'
const message = useMessage()
const dialog = useDialog()
@ -312,7 +308,6 @@ function handleEdit(row: PermissionConfig) {
handleMapperClick();
permissionControl.value = JSON.parse(formData.permissionControl)
selectedMethod.value = JSON.parse(row.controlMethod)
console.log('页面打开')
modalVisible.value = true
}
@ -396,40 +391,40 @@ async function handleExport() {
}
// 下载导入模板
async function handleDownloadTemplate() {
try {
const blob = await permissionConfigApi.downloadTemplate()
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '数据权限配置导入模板.xlsx'
link.click()
window.URL.revokeObjectURL(url)
} catch (error) {
// 错误已在拦截器处理
}
}
// async function handleDownloadTemplate() {
// try {
// const blob = await permissionConfigApi.downloadTemplate()
// const url = window.URL.createObjectURL(blob)
// const link = document.createElement('a')
// link.href = url
// link.download = '数据权限配置导入模板.xlsx'
// link.click()
// window.URL.revokeObjectURL(url)
// } catch (error) {
// // 错误已在拦截器处理
// }
// }
// 导入上传
async function handleImportUpload({ file }: UploadCustomRequestOptions) {
if (!file.file) return
try {
const result = await permissionConfigApi.importData(file.file)
if (result.fail > 0) {
dialog.warning({
title: '导入结果',
content: `成功: ${result.success} 条,失败: ${result.fail} 条\n错误信息: ${(result.errors || []).join('\n') || '无'}`,
positiveText: '确定'
})
} else {
message.success(`导入成功,共 ${result.success} 条数据`)
importModalVisible.value = false
}
loadData()
} catch (error) {
// 错误已在拦截器处理
}
}
// async function handleImportUpload({ file }: UploadCustomRequestOptions) {
// if (!file.file) return
// try {
// const result = await permissionConfigApi.importData(file.file)
// if (result.fail > 0) {
// dialog.warning({
// title: '导入结果',
// content: `成功: ${result.success} 条,失败: ${result.fail} 条\n错误信息: ${(result.errors || []).join('\n') || '无'}`,
// positiveText: '确定'
// })
// } else {
// message.success(`导入成功,共 ${result.success} 条数据`)
// importModalVisible.value = false
// }
// loadData()
// } catch (error) {
// // 错误已在拦截器处理
// }
// }
const mapperOptions = ref<{ label: string; value: any }[]>([])
const methodSearchOptions = ref<{ label: string; value: any }[]>([])

View File

@ -56,7 +56,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1200"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"

View File

@ -53,13 +53,12 @@
<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue'
import {
NButton, NSpace, NIcon, NUpload, useMessage
NButton, NSpace, useMessage
} from 'naive-ui'
import {useRoute} from "vue-router";
import {qcResultDetailApi, type QcResultDetail} from "@/api/qcResultDetail.ts";
import {fileApi} from '@/api/system1'
import { qualityTestingApi} from '@/api/qualityTesting'
import router from '@/router';
import SubmitDetailPage from '@/components/SubmitDetailPage.vue';
@ -68,12 +67,6 @@ const message = useMessage()
const route = useRoute()
const qcId =ref( Number(route.params.id))
const traceCode = ref(String(route.params.traceCode))
const submitFlag = ref(route.params.submitFlag === 'true')
const title = ref(`质检编号: ${route.params.qcNo}`)

View File

@ -59,7 +59,7 @@
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="(row) => row.id"
:row-key="(row:any) => row.id"
:scroll-x="1600"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"

View File

@ -16,10 +16,6 @@
<n-form-item label="图文名称">
<n-input v-model:value="searchForm.drawingName" placeholder="请输入图文名称"/>
</n-form-item>
<!-- <n-form-item label="图文版本">-->
<!-- <n-input v-model:value="searchForm.drawingVersion" placeholder="请输入图文版本" />-->
<!-- </n-form-item> &ndash;&gt;-->
<n-space>
<n-button type="primary" @click="search">
@ -51,14 +47,7 @@
</template>
新增
</n-button>
<!-- <n-button type="error" @click="delhand" size="small">
<template #icon>
<n-icon>
<ArrowDownCircleOutline />
</n-icon>
</template>
删除
</n-button> -->
<n-button type="success" v-if="hasPermission('biz:drawingFile:export')" @click="handleExport" size="small">
<template #icon>
<n-icon>
@ -142,32 +131,6 @@
<n-input v-model:value="formData.drawingName" placeholder="请输入图文名称"/>
</n-form-item>
</n-gi>
<!-- <n-gi>
<n-form-item label="图文版本">
<n-input v-model:value="formData.drawingVersion" placeholder="请输入图文版本" />
</n-form-item>
</n-gi> -->
<!-- <n-gi>
<n-form-item path="processId" label="工序名称">
<n-select
v-model:value="selval"
filterable
placeholder="请输入工序名称搜索"
:options="yglist"
:loading="loadingRef"
clearable
remote
:clear-filter-after-select="false"
@search="slehand"
@update:value="updatesle"
/>
</n-form-item>
</n-gi> -->
<!-- <n-gi>
<n-form-item label="PLM文档">
<n-input v-model:value="formData.plmDocId" placeholder="请选择PLM文档" />
</n-form-item>
</n-gi> -->
<n-gi>
<n-form-item label="类型">
@ -349,11 +312,9 @@ import {
NButton,
NIcon,
NSpace,
NImage,
NPagination,
NGrid,
NTree,
// NGi,
NTag,
useMessage,
useDialog, type DataTableColumns,
@ -368,7 +329,6 @@ import {
} from '@vicons/ionicons5'
import {useUserStore} from '@/stores/user'
//import { dictDataApi } from '@/api/org'
import {
addDrawing,
editDrawing,
@ -378,7 +338,6 @@ import {
generateDFCode,
exportdraFile,
opertree,
//filelist,
multifilelist,
getDeviceByDrawingId
} from '@/api/illustrated'
@ -402,10 +361,6 @@ const TOKEN = userStore.token
// 权限检查
const hasPermission = (permission: string) => userStore.hasPermission(permission)
//派工状态字典
//const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
// ==================== 搜索表单 ====================
const searchForm = reactive({
page: 1,
@ -441,46 +396,6 @@ const columns = [
key: "drawingName",
minWidth: 150
},
// {
// align:"center",
// title:"图文版本",
// key:"drawingVersion",
// minWidth:150
// },
// {
// align:"center",
// title:"关联工序名称",
// key:"processName",
// minWidth:150
// },
// {
// align:"center",
// title:"关联工序编码",
// key:"processCode",
// minWidth:150
// },
// {
// align:"center",
// title:"图文缩略图",
// key:"materialCode",
// minWidth:150,
// render(row:any) {
// //filePath
// return h(NImage, {width:'50',height:'50',src:'https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg'})
// }
// },
// {
// align:"center",
// title:"PLM文档",
// key:"plmDocId",
// minWidth:150
// },
// {
// align:"center",
// title:"PLM版本号",
// key:"plmVersion",
// minWidth:150
// },
{
align: "center",
title: "状态",
@ -546,18 +461,6 @@ const columns = [
{default: () => '下发'}
))
}
// if(hasPermission('biz:nccode:add')){
// buttons.push(h(NButton, {
// size: 'small',
// type:'warning',
// ghost:true,
// onClick: () => {
// addhand(3,row)
// }},
// { default: () => '复制'}
// ))
// }
if (hasPermission('biz:drawingFile:edit')) {
buttons.push(h(NButton, {
size: 'small',
@ -581,7 +484,6 @@ const columns = [
content: `你确定删除图文编号为:${row.drawingCode}的数据`,
positiveText: '确定',
negativeText: '取消',
//draggable: true,
onPositiveClick: () => {
deleteDrawing(row.id).then(() => {
message.success('操作成功')
@ -656,19 +558,6 @@ function handlePageSizeChange(pageSize: number) {
getlist()
}
// // 加载字典选项
// async function loadDictOptions() {
// //qcCancelLoading = true
// try {
// const data = await dictDataApi.listByType('assing_status')
// qcAssingStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass }))
// }catch {}
// }
//获取工序
//工位交接
//查询用户
let loadingRef = ref(false)
let yglist = ref<any>([])
@ -695,22 +584,6 @@ function slehand(v?: any) {
})
}
function updatesle(v: any) {
if (v) {
//let varr = v.split('-')
formData.processId = v + ''
// formData.processRouteStepId = varr[0]
// formData.processCode = varr[1]
// formData.processName = varr[2]
} else {
formData.processId = ''
// formData.processRouteStepId = ''
// formData.processCode = ''
// formData.processName = ''
}
//formData.processRouteStepId = v
}
//新增
let addModel = ref(false)
@ -723,35 +596,10 @@ let formData = reactive<any>({
drawingType: 0, //0 图纸 1 文件
fileId: '', //文件id
status: 1, //状态:1-启用 0-禁用
// drawingName:'', //图文名称
// drawingVersion:'', //图文版本
// processCode:'', //工序编码
// processName:'', //工序名称
// filePath:'', //文件路径
// fileName:'', //文件名
// fileSize:'', //文件大小
// fileType:'', //文件类型
// plmDocId:'', //PLM文档ID
// plmVersion:'', //PLM版本号
// plmStatus:'', //PLM状态
// isIssued:1, //是否已下发:1-已下发 0-未下发
// issueTime:'', //下发时间
// issueBy:'', //下发人
// remark:'' //备注
})
const addrules = {
drawingCode: [
{required: true, message: '请输入图文编号', trigger: 'blur'},
// {
// validator(rule:any,value: any) {
// if(value > pauseform.qcNum){
// return new Error(`报检数量最大为${pauseform.qcNum}`)
// }
// return true
// },
// trigger: ['blur']
// }
],
processId: [
{required: true, message: '请选择工序', trigger: 'blur'}
@ -782,7 +630,6 @@ function addhand(type: any, row?: any) {
formData.value?.restoreValidation()
isstype.value = type
if (row) {
//slehand('')
formData.id = row.id
formData.drawingCode = row.drawingCode
formData.drawingName = row.drawingName
@ -893,53 +740,14 @@ function handleCheck(v: any) {
console.log(v)
}
//删除
// function delhand() {
// if(chearr.value.length > 0){
// drawingIssue(chearr.value).then(() => {
// message.success('操作成功')
// })
// }else{
// message.error('请勾选设备')
// }
// }
//下发任务列表
let isstasklist = ref<any>([])
//下发设备列表
let issequiplist = ref<any>([])
//下发
let issueModel = ref(false)
let issformData = reactive<any>({
taskid: '',
equis: ''
})
const issaddrules = {
taskid: [
{required: true, message: '请选择下发任务', trigger: 'blur'}
],
equis: [
{required: true, message: '请选择下发设备', trigger: 'blur'}
]
}
// function renderlabe() {}
// function issuehand() {
// issueModel.value = true
// // if(chearr.value.length > 0){
// // batchIssue(chearr.value).then(() => {
// // message.success('操作成功')
// // })
// // }else{
// // message.error('请勾选设备')
// // }
// }
let treeData: any = []
let xfsbvalue = ref<Array<string | number>>([])
@ -952,7 +760,6 @@ function flattenTree(list: undefined | any[]) {
function flatten(_list: any[] = []) {
_list.forEach((item) => {
//result.push(item)
if (item.childList) {
flatten(item.childList)
} else {
@ -1013,21 +820,6 @@ function isssavehand() {
}
const issformRef = ref()
// function isssavehand() {
// issformRef.value?.validate((e:any) => {
// if (!e) {
// message.success('操作成功')
// setTimeout(() => {
// getlist()
// issueModel.value = false
// },1500)
// }
// })
// }
function handleExport() {
@ -1083,10 +875,6 @@ const isAllCheck = computed({
const handleAllCheck = (val:boolean) => {
isAllCheck.value = val
}
// function rowKey(row:RowData){
// return row.id
// }
const handleUpateCheck = async (keys:Array<string | number>,)=>{
selectedDeviceIds.value = keys
loadCreateApi()
@ -1184,8 +972,6 @@ onMounted(() => {
})
}
})
//loadDictOptions()
})
</script>

View File

@ -9,46 +9,18 @@
label-placement="left"
>
<n-grid :cols="24" :x-gap="24">
<!-- <n-form-item-gi :span="6" label="工序编码">
<n-input v-model:value="searchForm.processId" placeholder="请输入工序编号" clearable />
</n-form-item-gi> -->
<n-form-item-gi :span="6" label="工序名称">
<n-input v-model:value="searchForm.processName" placeholder="请输入工序名称" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="工人名称">
<n-input v-model:value="searchForm.userName" placeholder="请输入工人名称" clearable />
</n-form-item-gi>
<!-- <n-form-item-gi :span="6" label="数里">
<n-input v-model:value="searchForm.processId" placeholder="请输入数里" clearable />
</n-form-item-gi> -->
<!-- <n-form-item-gi :span="6" label="是否返工">
<n-input v-model:value="searchForm.processId" placeholder="请选择" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="返工次数">
<n-input v-model:value="searchForm.processId" placeholder="请输入返工次数" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="完成数里">
<n-input v-model:value="searchForm.processId" placeholder="请输入完成数里" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="完成时间">
<n-input v-model:value="searchForm.processId" placeholder="请选择完成时间" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="创建时间">
<n-input v-model:value="searchForm.processId" placeholder="请选择创建时间" clearable />
</n-form-item-gi>
<n-form-item-gi :span="6" label="创建人">
<n-input v-model:value="searchForm.processId" placeholder="请输入创建人" clearable />
</n-form-item-gi> -->
<n-form-item-gi :span="6">
<n-space>
<n-button type="primary" @click="search">
<template #icon><n-icon><SearchOutline /></n-icon></template>
搜索
</n-button>
<!-- <n-button type="primary" @click="search">
<template #icon><n-icon><SearchOutline /></n-icon></template>
我的派工
</n-button> -->
<n-button @click="reset">
<template #icon><n-icon><RefreshOutline /></n-icon></template>
重置
@ -56,27 +28,6 @@
</n-space>
</n-form-item-gi>
</n-grid>
<!-- <n-form-item label="用户类型">
<n-select
v-model:value="searchForm.userType"
placeholder="请选择用户类型"
:options="userTypeOptions"
clearable
style="width: 140px"
/>
</n-form-item> -->
<!-- <n-form-item label="状态">
<n-select
v-model:value="searchForm.status"
placeholder="请选择状态"
:options="statusOptions"
clearable
style="width: 120px"
/>
</n-form-item> -->
</n-form>
</div>
@ -129,11 +80,6 @@
class="modal-form"
>
<n-grid :cols="2">
<!-- <n-gi>
<n-form-item label="工序编号" path="processName">
<n-input v-model:value="formData.processName" placeholder="请输入用户名" :disabled="!!formData.id" />
</n-form-item>
</n-gi> -->
<n-gi>
<n-form-item label="工序名称" path="processName">
<n-input v-model:value="formData.processName" placeholder="请输入工序名称" />
@ -160,11 +106,6 @@
<n-input v-model:value="formData.rework" placeholder="请输入" />
</n-form-item>
</n-gi>
<!-- <n-gi>
<n-form-item label="返工次数" path="username">
<n-input v-model:value="formData.username" placeholder="请输入用户名" :disabled="!!formData.id" />
</n-form-item>
</n-gi> -->
<n-gi>
<n-form-item label="完成数量" path="completedQuantity">
<n-input v-model:value="formData.completedQuantity" placeholder="请输入用户名" :disabled="!!formData.id" />
@ -365,7 +306,6 @@ import {
NGi,
NTag,
useMessage,
//useDialog,
type FormInst,
} from 'naive-ui'
import {
@ -378,15 +318,13 @@ import {
disworlist,
editdiswor,
transfer,
pauseresume,
//workload
pauseresume
} from '@/api/production'
import { submitLogApi } from '@/api/submitLog'
import { SysUser, userApi } from '@/api/system'
//const dialog = useDialog()
const message = useMessage()
@ -457,11 +395,6 @@ const pagination = reactive({
const columns = [
// {
// type: 'selection',
// minWidth:60
// },
{
align:"center",
title:"物料名称",
@ -508,12 +441,6 @@ const columns = [
},
minWidth:80
},
// {
// align:'center',
// title:"追溯码/批次号",
// key:"traceCode",
// minWidth:200
// },
{
align:'center',
title: '派工状态',

File diff suppressed because it is too large Load Diff