提交代码

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) { export function loadAllNcCode(deviceId?: string | number) {
const id = deviceId != null && deviceId !== '' ? `/${deviceId}` : '' const id = deviceId != null && deviceId !== '' ? `/${deviceId}` : ''
return request({ return request({
url: `/biz/ncCode/loadAllNcCode${id}`, url: `/biz/ncCode/loadAllNcCode/${id}`,
method: 'get' method: 'get'
}) })
} }

View File

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

View File

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

View File

@ -44,7 +44,7 @@ export interface QualityTesting {
// 质检单表 API // 质检单表 API
export const qualityTestingApi = { 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 }) 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}){ loadSumbitLog(params:{assingId:number,page?:number,pageSize?:number}){
console.log(params)
return request({url:`/mes/report/loadSumbitLog`,method:'get',params}) return request({url:`/mes/report/loadSumbitLog`,method:'get',params})
} }
} }

View File

@ -358,7 +358,7 @@ import {
NGrid, NGrid,
useMessage, useMessage,
useDialog, useDialog,
NDropdown, NTag, type DataTableColumns, NTag, type DataTableColumns,
} from 'naive-ui' } from 'naive-ui'
import { import {
@ -366,7 +366,6 @@ import {
RefreshOutline, RefreshOutline,
AddOutline, AddOutline,
ArrowDownCircleOutline, ArrowDownCircleOutline,
EllipsisHorizontalOutline,
CloudUploadOutline CloudUploadOutline
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
@ -388,9 +387,8 @@ import
{ {
multifilelist multifilelist
} from '@/api/illustrated' } from '@/api/illustrated'
import {DeviceDocumentConnection, deviceDocumentConnectionApi} from "@/api/deviceDocumentConnection.ts"; import {deviceDocumentConnectionApi} from "@/api/deviceDocumentConnection.ts";
import {Device, deviceApi} from "@/api/device.ts"; import {Device, deviceApi} from "@/api/device.ts";
import {RowData} from "naive-ui/es/data-table/src/interface";
const dialog = useDialog() const dialog = useDialog()
@ -405,11 +403,6 @@ const TOKEN = userStore.token
// 权限检查 // 权限检查
const hasPermission = (permission: string) => userStore.hasPermission(permission) const hasPermission = (permission: string) => userStore.hasPermission(permission)
//const ncDispatchRecords = ref<ncCode[]>([])
//派工状态字典
//const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
// ==================== 搜索表单 ==================== // ==================== 搜索表单 ====================
const searchForm = reactive({ const searchForm = reactive({
page: 1, page: 1,
@ -458,28 +451,6 @@ const columns = [
key:"ncContent", key:"ncContent",
minWidth:150 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", align:"center",
title:"状态", title:"状态",
@ -654,18 +625,6 @@ function handlePageSizeChange(pageSize: number) {
getlist() 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) let addModel = ref(false)
@ -681,23 +640,11 @@ let formData = reactive<any>({
deviceName:'', //设备名称 deviceName:'', //设备名称
fileId:'', fileId:'',
status:1, //状态:1-启用 0-禁用 status:1, //状态:1-启用 0-禁用
// isIssued:1, //是否已下发:1-已下发 0-未下发
// issueTime:null, //下发时间
// issueBy:'', //下发人
remark:'' //备注 remark:'' //备注
}) })
const addrules = { const addrules = {
ncCode: [ ncCode: [
{ required: true, message: '请输入NC代码编号', trigger: 'blur' }, { 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:[ ncName:[
{ required: true, message: '请输入NC代码名称', trigger: 'blur' } { required: true, message: '请输入NC代码名称', trigger: 'blur' }
@ -743,9 +690,6 @@ function addhand(type:any,row?:any) {
formData.deviceName = row.deviceName formData.deviceName = row.deviceName
formData.status = row.status formData.status = row.status
formData.fileId = row.fileId+',' formData.fileId = row.fileId+','
// formData.isIssued = row.isIssued
// formData.issueTime = row.issueTime
// formData.issueBy = row.issueBy
formData.remark = row.remark formData.remark = row.remark
if(type == 2){ if(type == 2){
formData.ncCode = row.ncCode formData.ncCode = row.ncCode
@ -756,13 +700,6 @@ function addhand(type:any,row?:any) {
flist.value.splice(0) flist.value.splice(0)
multifilelist(row.fileId).then(rps => { multifilelist(row.fileId).then(rps => {
if(rps && rps.length > 0){ 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) => { flist.value = rps.map((n:any) => {
return { return {
id: n.id, id: n.id,
@ -784,9 +721,6 @@ function addhand(type:any,row?:any) {
formData.deviceId = '' formData.deviceId = ''
formData.deviceName = '' formData.deviceName = ''
formData.status = 1 formData.status = 1
// formData.isIssued = ''
// formData.issueTime = ''
// formData.issueBy = ''
formData.remark = '' formData.remark = ''
formData.fileId = '' formData.fileId = ''
flist.value.splice(0) flist.value.splice(0)
@ -839,23 +773,6 @@ function handleCheck(v:any) {
console.log(v) 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 treeData:any = []
let xfsbvalue = ref<Array<string | number>>([]) let xfsbvalue = ref<Array<string | number>>([])
@ -867,7 +784,6 @@ function flattenTree(list: undefined | any[]) {
const result: any[] = [] const result: any[] = []
function flatten(_list: any[] = []) { function flatten(_list: any[] = []) {
_list.forEach((item) => { _list.forEach((item) => {
//result.push(item)
if(item.childList){ if(item.childList){
flatten(item.childList) flatten(item.childList)
}else{ }else{
@ -882,23 +798,6 @@ function flattenTree(list: undefined | any[]) {
//下发 //下发
let issueModel = ref(false) 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 issarr:any[] = []
let ncCode = ref<any>('') let ncCode = ref<any>('')
function tranupdate(v:any) { function tranupdate(v:any) {
@ -924,7 +823,6 @@ function issuehand(row:any) {
function isssavehand() { function isssavehand() {
if(issarr.length > 0){ if(issarr.length > 0){
batchIssue({ batchIssue({
//ncCode:ncid,
id:ncid, id:ncid,
ncCodeList:issarr ncCodeList:issarr
}).then(() => { }).then(() => {
@ -940,10 +838,7 @@ function isssavehand() {
} }
//导出 //导出
//let selectedIds = ref<any>([])
function handleExport() { function handleExport() {
exportNccode({}).then(rps => { exportNccode({}).then(rps => {
const url = window.URL.createObjectURL(rps) const url = window.URL.createObjectURL(rps)
const link = document.createElement('a') const link = document.createElement('a')
@ -997,9 +892,6 @@ const handleAllCheck = (val:boolean) => {
isAllCheck.value = val isAllCheck.value = val
} }
// function rowKey(row:RowData){
// return row.id
// }
const handleUpateCheck = async (keys:Array<string | number>,)=>{ const handleUpateCheck = async (keys:Array<string | number>,)=>{
selectedDeviceIds.value = keys selectedDeviceIds.value = keys
loadCreateApi() loadCreateApi()

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,18 +29,6 @@
<template #icon><n-icon><AddOutline /></n-icon></template> <template #icon><n-icon><AddOutline /></n-icon></template>
新增 新增
</n-button> </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> </n-space>
</div> </div>
@ -92,7 +80,6 @@
</n-gi> </n-gi>
<n-gi> <n-gi>
<n-form-item label="订阅的设备" path="subscriptionDeviceIds"> <n-form-item label="订阅的设备" path="subscriptionDeviceIds">
<!-- <n-input v-model:value="formData.subscriptionDeviceIds" placeholder="请输入订阅的设备集合" /> -->
<n-select <n-select
remote remote
multiple multiple
@ -270,10 +257,6 @@ errorNotificationApi.getopt().then(rps => {
rps.forEach((n:any) => { rps.forEach((n:any) => {
yclist.value[n.value] = n.childList 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) { function keyupdate(v:any,n:any) {
formData.subscriptionDiscoverField = null formData.subscriptionDiscoverField = null
yiczdopt.value = n.childList yiczdopt.value = n.childList
console.log(v)
console.log(n)
} }
// 表单校验规则 // 表单校验规则
@ -328,9 +300,6 @@ const formRules = {
// 表格列 // 表格列
const columns: DataTableColumns<ErrorNotification> = [ const columns: DataTableColumns<ErrorNotification> = [
// {
// type: 'selection'
// },
{ {
align:"center", align:"center",
title: '订阅的异常', title: '订阅的异常',
@ -514,7 +483,6 @@ function handleEdit(row: ErrorNotification) {
//发送方式 //发送方式
if(row.sendingMethod){ if(row.sendingMethod){
formData.sendingMethod = formData.sendingMethod.split(',') 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() { async function handleDownloadTemplate() {

View File

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

View File

@ -19,34 +19,13 @@
</n-form> </n-form>
</div> </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 <n-data-table
:columns="columns" :columns="columns"
:data="tableData" :data="tableData"
:loading="loading" :loading="loading"
:row-key="(row) => row.id" :row-key="(row:any) => row.id"
:scroll-x="1200" :scroll-x="1200"
/> />
@ -126,8 +105,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, h, onMounted, computed } from 'vue' import { ref, reactive, h, onMounted, computed } from 'vue'
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui' import { NButton, NSpace, NIcon, useMessage, useDialog, type DataTableColumns } from 'naive-ui'
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, EyeOutline, DownloadOutline } from '@vicons/ionicons5' import { SearchOutline, RefreshOutline, CreateOutline, EyeOutline } from '@vicons/ionicons5'
import { flowingAroundApi, type FlowingAround } from '@/api/flowingAround' import { flowingAroundApi, type FlowingAround } from '@/api/flowingAround'
import { dictDataApi } from '@/api/org' import { dictDataApi } from '@/api/org'
import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue' import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue'
@ -281,18 +260,6 @@ function handlePageSizeChange(pageSize: number) {
loadData() 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 modalCheckVisible = ref(false)
const modalCheckData = ref<FlowingAround>() const modalCheckData = ref<FlowingAround>()
const modalCheckTitle = ref('') 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 flowingAroundTypeOptions = ref<{ label: string; value: any }[]>([])
const confirmResultOptions = computed<any[]>(() => { const confirmResultOptions = computed<any[]>(() => {

View File

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

View File

@ -22,35 +22,13 @@
</n-form> </n-form>
</div> </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 <n-data-table
:columns="columns" :columns="columns"
:data="tableData" :data="tableData"
:loading="loading" :loading="loading"
:pagination="pagination" :pagination="pagination"
:row-key="(row) => row.id" :row-key="(row:any) => row.id"
:scroll-x="1200" :scroll-x="1200"
@update:page="handlePageChange" @update:page="handlePageChange"
@update:page-size="handlePageSizeChange" @update:page-size="handlePageSizeChange"
@ -127,7 +105,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, h, onMounted } from 'vue' import { ref, reactive, h, onMounted } from 'vue'
import { NButton, NSpace, NSelect ,NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui' 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 { orderApi, type Order } from '@/api/order'
import { dictDataApi } from '@/api/org' import { dictDataApi } from '@/api/org'
@ -176,17 +154,12 @@ const formRules = {
// 表格列 // 表格列
const columns: DataTableColumns<Order> = [ const columns: DataTableColumns<Order> = [
// { type: 'selection' },
// { title: 'id', key: 'id' },
{ title: '订单编号', key: 'orderNo' }, { title: '订单编号', key: 'orderNo' },
{ title: '购买人', key: 'userName' }, { title: '购买人', key: 'userName' },
{ title: '商品', key: 'productName' }, { title: '商品', key: 'productName' },
{ title: '购买份额', key: 'quota' }, { title: '购买份额', key: 'quota' },
{ title: '总价', key: 'totalPrice' }, { title: '总价', key: 'totalPrice' },
{ title: '创建时间', key: 'createTime' }, { title: '创建时间', key: 'createTime' },
// { title: '修改时间', key: 'updateTime'},
// { title: '创建人', key: 'createBy' },
// { title: '更新人', key: 'updateBy' },
{ title: '购买结果', key: ' payPhotoUrl', { title: '购买结果', key: ' payPhotoUrl',
render(row) { render(row) {
return row.payPhotoUrl ? h('img', { return row.payPhotoUrl ? h('img', {
@ -198,12 +171,9 @@ const columns: DataTableColumns<Order> = [
{ title: '购买状态', key: 'payStatus', { title: '购买状态', key: 'payStatus',
render(row) { render(row) {
return h(NSelect,{ return h(NSelect,{
// 绑定当前行的status值(双向绑定核心)
value: row.payStatus, value: row.payStatus,
// 选中值变化时,更新当前行数据
'onUpdate:value': (val) => { 'onUpdate:value': (val) => {
row.payStatus = val row.payStatus = val
// 可在这里触发接口保存、校验等逻辑
Object.assign(formData, row) Object.assign(formData, row)
handleAudit(); handleAudit();
}, },
@ -219,9 +189,6 @@ const columns: DataTableColumns<Order> = [
fixed: 'right', fixed: 'right',
render(row) { render(row) {
return h('div', { style: { display: 'flex', alignItems: 'center', gap: '8px', flexWrap: 'nowrap' } }, [ 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 }, { h(NButton, { size: 'small', quaternary: true, type: 'error', onClick: () => handleDelete(row), disabled: row.payStatus === 2 }, {
default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除'] default: () => [h(NIcon, null, { default: () => h(TrashOutline) }), ' 删除']
}) })
@ -276,25 +243,7 @@ function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as 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() { async function handleAudit() {
try { 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() { async function handleDownloadTemplate() {
try { try {

View File

@ -132,12 +132,6 @@
label-width="120px" label-width="120px"
> >
<n-grid :cols="2"> <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-gi>
<n-form-item label="项目名称" path="project"> <n-form-item label="项目名称" path="project">
<n-input v-if="formData.id" v-model:value="formData.projectName" disabled placeholder="请选择项目" /> <n-input v-if="formData.id" v-model:value="formData.projectName" disabled placeholder="请选择项目" />
@ -158,8 +152,6 @@
<n-gi> <n-gi>
<n-form-item label="物料编码" path="code"> <n-form-item label="物料编码" path="code">
<n-input v-if="formData.id" v-model:value="formData.code" disabled placeholder="请选择物料编码" /> <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 <n-select
v-else v-else
v-model:value="formData.code" v-model:value="formData.code"
@ -220,7 +212,6 @@
</n-gi> </n-gi>
<n-gi> <n-gi>
<n-form-item label="是否采购" path="procurement"> <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-radio-group v-model:value="formData.procurement" name="radiogroup">
<n-space> <n-space>
<n-radio :value="1">是</n-radio> <n-radio :value="1">是</n-radio>
@ -241,7 +232,6 @@
</n-gi> </n-gi>
<n-gi> <n-gi>
<n-form-item label="派工接收人" path="assingWorkList"> <n-form-item label="派工接收人" path="assingWorkList">
<!-- <n-input v-model:value="formData.assingWorkId" placeholder="请选择派工接收人" /> -->
<n-select <n-select
multiple multiple
filterable filterable
@ -277,12 +267,6 @@
</tr> </tr>
</thead> </thead>
<tbody class="sort-target"> <tbody class="sort-target">
<!-- <gxitem
v-for="(n,i) in planList"
:obj="n"
:index="i"
@update="gxupdata"
/> -->
<tr <tr
v-for="(n,i) in planList" v-for="(n,i) in planList"
:key="i" :key="i"
@ -342,13 +326,6 @@
<n-input v-model:value="dispatchform.name" disabled /> <n-input v-model:value="dispatchform.name" disabled />
</n-form-item> </n-form-item>
<n-form-item label="指派员工" path="assingWorkList"> <n-form-item label="指派员工" path="assingWorkList">
<!-- <n-select
v-model:value="dispatchform.userid"
:options="yglist"
clearable
placeholder="请选择员工"
/> -->
<!--v-model:value="dispatchform.assingWorkList"-->
<n-select <n-select
multiple multiple
filterable filterable
@ -361,8 +338,6 @@
@search="slehand" @search="slehand"
@update:value="updatesle" @update:value="updatesle"
/> />
<!-- <n-input v-model:value="dispatchform.userid" placeholder="请选择员工" /> -->
</n-form-item> </n-form-item>
</n-form> </n-form>
<template #footer> <template #footer>
@ -404,7 +379,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, h, computed, onMounted, type HTMLAttributes } from 'vue' 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 { SearchOutline, RefreshOutline, CreateOutline, PlayOutline, DocumentTextOutline } from '@vicons/ionicons5'
import { orderItemApi, type OrderItem } from '@/api/orderItem' import { orderItemApi, type OrderItem } from '@/api/orderItem'
import { processRouteApi } from '@/api/processRoute' import { processRouteApi } from '@/api/processRoute'
@ -497,7 +472,6 @@ async function loadProjectTree() {
// 表格数据 // 表格数据
const tableData = ref<any>([]) const tableData = ref<any>([])
const loading = ref(false) const loading = ref(false)
const selectedIds = ref<any>([])
const pagination = reactive({ const pagination = reactive({
page: 1, page: 1,
pageSize: 10, pageSize: 10,
@ -675,7 +649,7 @@ const columns = computed(() => [
align:'center', align:'center',
title: '物料编码', title: '物料编码',
key: 'code', key: 'code',
width:"120" minWidth:"200"
}, },
{ {
@ -727,30 +701,12 @@ const columns = computed(() => [
return h(NTag, { type: tagType, size: 'small' }, { default: () => opt.label }) return h(NTag, { type: tagType, size: 'small' }, { default: () => opt.label })
} }
}, },
// {
// align:'center',
// title: '产品序列',
// key: 'sort',
// width:"120"
// },
{ {
align:'center', align:'center',
title: '生产数量', title: '生产数量',
key: 'quantity', key: 'quantity',
width:"120" width:"120"
}, },
// {
// align:'center',
// title: '是否半成品',
// key: 'sfProduct',
// width:"120"
// },
// {
// align:'center',
// title: '是否采购',
// key: 'procurement',
// width:"120"
// },
{ {
align:'center', align:'center',
title: '开始时间', title: '开始时间',
@ -767,32 +723,14 @@ const columns = computed(() => [
align:'center', align:'center',
title: '实际开始时间', title: '实际开始时间',
key: 'actualStartTime', key: 'actualStartTime',
width:"120" width:"200"
}, },
{ {
align:'center', align:'center',
title: '实际结束时间', title: '实际结束时间',
key: 'actualEndTime', key: 'actualEndTime',
width:"120"
},
{
align:'center',
title: '派工操作人',
key: 'assingWorkOperationName',
width:"120"
},
{
align:'center',
title: '派工接收人',
key: 'assingWorkName',
width:"200" width:"200"
}, },
{
align:'center',
title: '派工时间',
key: 'assingWorkTime',
width:"120"
},
{ {
align:'center', align:'center',
title: '是否开工', title: '是否开工',
@ -922,10 +860,6 @@ function handlePageSizeChange(pageSize: number) {
loadData() loadData()
} }
// 选择
function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
//工序 //工序
//根据生产令号查询工序 //根据生产令号查询工序
@ -955,33 +889,14 @@ function tuozChange() {
console.log(planList.value) 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 xmlist = ref<any>([])
let xmloading = ref(false) let xmloading = ref(false)
async function xmhand() {
xmloading.value = true
xmlist.value = await orderItemApi.xmoptions({});
xmloading.value = false
}
let wllist = ref<any>([]) let wllist = ref<any>([])
function xmselupdate(v:any,opt:any) { function xmselupdate(v:any,opt:any) {
planList.value.splice(0) planList.value.splice(0)
@ -1012,7 +927,7 @@ const kingdeeModalTitle = ref('金蝶生产订单')
const kingdeeLoading = ref(false) const kingdeeLoading = ref(false)
const kingdeeTableData = ref<KingdeeMoTableRow[]>([]) const kingdeeTableData = ref<KingdeeMoTableRow[]>([])
// const kingdeeExpandedKeys = ref<Array<string | number>>([])
async function reCrawlReorderForm(id:number,reCrawl:Boolean){ async function reCrawlReorderForm(id:number,reCrawl:Boolean){
kingdeeLoading.value = true 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 回传结果,供子弹等待接口完成) // 同步订单和计划表(通过 callback 回传结果,供子弹等待接口完成)
async function synchronizationSave(id: number, data: KingdeePrdMo[], callback: Function) { 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 loadingRef.value = false
}).catch(() => { }).catch(() => {
loadingRef.value = false 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() { function dispatchSubmit() {
dispatchformRef.value?.validate((v:any) => { dispatchformRef.value?.validate((v:any) => {
if(!v){ 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(() => { orderItemApi.assignWork(Object.assign({},dispatchform,{assingWorkList:dispatchform.assingWorkList.split(',')}) ).then(() => {
message.success('操作成功!') message.success('操作成功!')
setTimeout(()=> { 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) { 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() { async function loadWorkshopOptions() {
try { try {

View File

@ -16,8 +16,6 @@ const submitList = ref<SubmitLog[]>([])
//根据工序Id加载汇报详情 //根据工序Id加载汇报详情
async function loadReportDetail() { async function loadReportDetail() {
try { try {
console.log(props.orderItemId)
const res = await submitLogApi.getOrderItemReportDetail({ const res = await submitLogApi.getOrderItemReportDetail({
page: pagination.page, page: pagination.page,
pageSize: pagination.pageSize, pageSize: pagination.pageSize,
@ -53,7 +51,7 @@ const columns = [
title: '汇报状态', title: '汇报状态',
key: 'submitStatus', key: 'submitStatus',
width: 120, width: 120,
render(row) { render(row:any) {
const option = submitStatusOptions.value.find(o => o.value === row.submitStatus) const option = submitStatusOptions.value.find(o => o.value === row.submitStatus)
return h(NTag, { type: option.class, size: 'small' }, { default: () => option.label }) 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) return Math.round((qualifiedQty.value / completedQty.value) * 100)
}) })
// const remainQty = computed(() => Math.max(0, totalQty.value - completedQty.value))
const statusTag = computed(() => { const statusTag = computed(() => {
const s = props.process.processStatus const s = props.process.processStatus
if (s == null) return { label: '-', type: 'default' as const } if (s == null) return { label: '-', type: 'default' as const }

View File

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

View File

@ -13,9 +13,6 @@
<n-form-item label="工序编码"> <n-form-item label="工序编码">
<n-input v-model:value="searchForm.code" placeholder="请输入工序编码" clearable /> <n-input v-model:value="searchForm.code" placeholder="请输入工序编码" clearable />
</n-form-item> </n-form-item>
<!-- <n-form-item label="生产订单">
<n-input v-model:value="searchForm.orderItemId" placeholder="请输入生产订单id" clearable />
</n-form-item> -->
<n-form-item> <n-form-item>
<n-space> <n-space>
<n-button type="primary" @click="handleSearch"> <n-button type="primary" @click="handleSearch">
@ -38,21 +35,7 @@
<template #icon><n-icon><AddOutline /></n-icon></template> <template #icon><n-icon><AddOutline /></n-icon></template>
新增 新增
</n-button> </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-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>
<div class="table-toolbar" style="margin-top: -8px"> <div class="table-toolbar" style="margin-top: -8px">
@ -91,13 +74,6 @@
</template> </template>
</n-pagination> </n-pagination>
</div> </div>
<!-- :pagination="pagination"
:row-key="(row:any) => row.id"
@update:page="handlePageChange"
@update:page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
-->
</n-card> </n-card>
<!-- 新增/编辑弹窗 --> <!-- 新增/编辑弹窗 -->
@ -265,13 +241,6 @@
<n-input v-model:value="dispatchform.endTime" disabled /> <n-input v-model:value="dispatchform.endTime" disabled />
</n-form-item> </n-form-item>
</n-gi> </n-gi>
<!-- <pgitem
v-for="(n,i) in dispatchform.userlist"
:obj="n"
:index="i"
@addhand="addpgnum"
@delehand="deletenum(i)"
/> -->
<n-gi :span="24"> <n-gi :span="24">
<pgitem <pgitem
v-for="(n,i) in dispatchform.list" v-for="(n,i) in dispatchform.list"
@ -282,65 +251,6 @@
@addhand="addpgnum" @addhand="addpgnum"
@delehand="deletenum(i)" @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-gi>
</n-grid> </n-grid>
@ -417,8 +327,6 @@ import {
SearchOutline, SearchOutline,
RefreshOutline, RefreshOutline,
AddOutline, AddOutline,
TrashOutline,
//CreateOutline,
CloudUploadOutline, CloudUploadOutline,
DownloadOutline DownloadOutline
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
@ -793,11 +701,6 @@ function handlePageSizeChange(pageSize: number) {
loadData() loadData()
} }
// 选择
function handleCheck(keys: Array<string | number>) {
selectedIds.value = keys as number[]
}
// 新增 // 新增
function handleAdd() { function handleAdd() {
modalTitle.value = '新增工序计划' modalTitle.value = '新增工序计划'
@ -907,8 +810,6 @@ let dispatchddbtn = ref(false)
const dispatchformRef = ref() const dispatchformRef = ref()
let loadingRef = ref(false)
function addpgnum() { function addpgnum() {
dispatchform.list.push({ dispatchform.list.push({
userId:'', 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() { async function handleDownloadTemplate() {
try { try {

View File

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

View File

@ -195,7 +195,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, h, computed, onMounted, watch } from 'vue' 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 { 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 { orderProjectApi, type OrderProject, type KingdeePrdMo, type KingdeeProcessRoute } from '@/api/orderProject'
import { mapKingdeeMoListToTableRows } from '@/utils/kingdeeSchedule' import { mapKingdeeMoListToTableRows } from '@/utils/kingdeeSchedule'
import { dictDataApi } from '@/api/org' import { dictDataApi } from '@/api/org'
@ -693,34 +693,9 @@ async function handleKingdeeQuery(row: OrderProject,reCrawl:Boolean) {
kingdeeLoading.value = true kingdeeLoading.value = true
kingdeeTableData.value = [] kingdeeTableData.value = []
kingdeeExpandedKeys.value = [] kingdeeExpandedKeys.value = []
reCrawlReorderForm(row.id,reCrawl) 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
// }
} }
// 暂存金蝶生产订单数据(草稿)
// async function holdTemporarilyCallback(id: number, data: KingdeePrdMo[]) {
// await orderProjectApi.saveKingdeeOrderDraft(id, data)
// }
// 暂存金蝶生产订单数据(草稿) // 暂存金蝶生产订单数据(草稿)
async function handleSaveDraft(id: number, data: KingdeePrdMo[]) { async function handleSaveDraft(id: number, data: KingdeePrdMo[]) {
try { try {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,10 +16,6 @@
<n-form-item label="图文名称"> <n-form-item label="图文名称">
<n-input v-model:value="searchForm.drawingName" placeholder="请输入图文名称"/> <n-input v-model:value="searchForm.drawingName" placeholder="请输入图文名称"/>
</n-form-item> </n-form-item>
<!-- <n-form-item label="图文版本">-->
<!-- <n-input v-model:value="searchForm.drawingVersion" placeholder="请输入图文版本" />-->
<!-- </n-form-item> &ndash;&gt;-->
<n-space> <n-space>
<n-button type="primary" @click="search"> <n-button type="primary" @click="search">
@ -51,14 +47,7 @@
</template> </template>
新增 新增
</n-button> </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"> <n-button type="success" v-if="hasPermission('biz:drawingFile:export')" @click="handleExport" size="small">
<template #icon> <template #icon>
<n-icon> <n-icon>
@ -142,32 +131,6 @@
<n-input v-model:value="formData.drawingName" placeholder="请输入图文名称"/> <n-input v-model:value="formData.drawingName" placeholder="请输入图文名称"/>
</n-form-item> </n-form-item>
</n-gi> </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-gi>
<n-form-item label="类型"> <n-form-item label="类型">
@ -349,11 +312,9 @@ import {
NButton, NButton,
NIcon, NIcon,
NSpace, NSpace,
NImage,
NPagination, NPagination,
NGrid, NGrid,
NTree, NTree,
// NGi,
NTag, NTag,
useMessage, useMessage,
useDialog, type DataTableColumns, useDialog, type DataTableColumns,
@ -368,7 +329,6 @@ import {
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
import {useUserStore} from '@/stores/user' import {useUserStore} from '@/stores/user'
//import { dictDataApi } from '@/api/org'
import { import {
addDrawing, addDrawing,
editDrawing, editDrawing,
@ -378,7 +338,6 @@ import {
generateDFCode, generateDFCode,
exportdraFile, exportdraFile,
opertree, opertree,
//filelist,
multifilelist, multifilelist,
getDeviceByDrawingId getDeviceByDrawingId
} from '@/api/illustrated' } from '@/api/illustrated'
@ -402,10 +361,6 @@ const TOKEN = userStore.token
// 权限检查 // 权限检查
const hasPermission = (permission: string) => userStore.hasPermission(permission) const hasPermission = (permission: string) => userStore.hasPermission(permission)
//派工状态字典
//const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
// ==================== 搜索表单 ==================== // ==================== 搜索表单 ====================
const searchForm = reactive({ const searchForm = reactive({
page: 1, page: 1,
@ -441,46 +396,6 @@ const columns = [
key: "drawingName", key: "drawingName",
minWidth: 150 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", align: "center",
title: "状态", title: "状态",
@ -546,18 +461,6 @@ const columns = [
{default: () => '下发'} {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')) { if (hasPermission('biz:drawingFile:edit')) {
buttons.push(h(NButton, { buttons.push(h(NButton, {
size: 'small', size: 'small',
@ -581,7 +484,6 @@ const columns = [
content: `你确定删除图文编号为:${row.drawingCode}的数据`, content: `你确定删除图文编号为:${row.drawingCode}的数据`,
positiveText: '确定', positiveText: '确定',
negativeText: '取消', negativeText: '取消',
//draggable: true,
onPositiveClick: () => { onPositiveClick: () => {
deleteDrawing(row.id).then(() => { deleteDrawing(row.id).then(() => {
message.success('操作成功') message.success('操作成功')
@ -656,19 +558,6 @@ function handlePageSizeChange(pageSize: number) {
getlist() 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 loadingRef = ref(false)
let yglist = ref<any>([]) 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) let addModel = ref(false)
@ -723,35 +596,10 @@ let formData = reactive<any>({
drawingType: 0, //0 图纸 1 文件 drawingType: 0, //0 图纸 1 文件
fileId: '', //文件id fileId: '', //文件id
status: 1, //状态:1-启用 0-禁用 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 = { const addrules = {
drawingCode: [ drawingCode: [
{required: true, message: '请输入图文编号', trigger: 'blur'}, {required: true, message: '请输入图文编号', trigger: 'blur'},
// {
// validator(rule:any,value: any) {
// if(value > pauseform.qcNum){
// return new Error(`报检数量最大为${pauseform.qcNum}`)
// }
// return true
// },
// trigger: ['blur']
// }
], ],
processId: [ processId: [
{required: true, message: '请选择工序', trigger: 'blur'} {required: true, message: '请选择工序', trigger: 'blur'}
@ -782,7 +630,6 @@ function addhand(type: any, row?: any) {
formData.value?.restoreValidation() formData.value?.restoreValidation()
isstype.value = type isstype.value = type
if (row) { if (row) {
//slehand('')
formData.id = row.id formData.id = row.id
formData.drawingCode = row.drawingCode formData.drawingCode = row.drawingCode
formData.drawingName = row.drawingName formData.drawingName = row.drawingName
@ -893,53 +740,14 @@ function handleCheck(v: any) {
console.log(v) 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 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 treeData: any = []
let xfsbvalue = ref<Array<string | number>>([]) let xfsbvalue = ref<Array<string | number>>([])
@ -952,7 +760,6 @@ function flattenTree(list: undefined | any[]) {
function flatten(_list: any[] = []) { function flatten(_list: any[] = []) {
_list.forEach((item) => { _list.forEach((item) => {
//result.push(item)
if (item.childList) { if (item.childList) {
flatten(item.childList) flatten(item.childList)
} else { } 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() { function handleExport() {
@ -1083,10 +875,6 @@ const isAllCheck = computed({
const handleAllCheck = (val:boolean) => { const handleAllCheck = (val:boolean) => {
isAllCheck.value = val isAllCheck.value = val
} }
// function rowKey(row:RowData){
// return row.id
// }
const handleUpateCheck = async (keys:Array<string | number>,)=>{ const handleUpateCheck = async (keys:Array<string | number>,)=>{
selectedDeviceIds.value = keys selectedDeviceIds.value = keys
loadCreateApi() loadCreateApi()
@ -1184,8 +972,6 @@ onMounted(() => {
}) })
} }
}) })
//loadDictOptions()
}) })
</script> </script>

View File

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

File diff suppressed because it is too large Load Diff