Merge branch 'master' of https://git.evo-techina.com/sgc/mes-vue
This commit is contained in:
commit
e56f0900c6
@ -143,6 +143,7 @@ export interface ProcessPlanItemVO {
|
||||
|
||||
assignWorkList?: AssignWorkItem[]
|
||||
|
||||
reportedQuantity?: number | null
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ export interface AssingWork {
|
||||
id:number,
|
||||
processId:number,
|
||||
processName:number,
|
||||
processCode?:string,
|
||||
userId:string,
|
||||
quantity:number,
|
||||
rework:number,
|
||||
@ -22,6 +23,11 @@ export interface AssingWork {
|
||||
workshopId:number,
|
||||
sectionId:number,
|
||||
deviceId:number,
|
||||
deviceName?:string,
|
||||
workshopName?:string,
|
||||
sectionName?:string,
|
||||
materialCode?:string,
|
||||
materialName?:string,
|
||||
traceId:number,
|
||||
qcNum:number
|
||||
}
|
||||
@ -65,7 +71,15 @@ export function pauseresume(data:any) {
|
||||
}
|
||||
|
||||
//我的派工任务
|
||||
export function mytasks(params:{page:number,pageSize:number,processName:string}) {
|
||||
export function mytasks(params:{
|
||||
page:number
|
||||
pageSize:number
|
||||
processName?:string
|
||||
processId?:number | string
|
||||
assingCode?:string
|
||||
materialCode?:string
|
||||
materialName?:string
|
||||
}) {
|
||||
return request({
|
||||
url: `/mes/dispatch/my-tasks`,
|
||||
method: 'get',
|
||||
|
||||
@ -46,13 +46,26 @@
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
:pagination="pagination"
|
||||
:row-key="(row) => row.id"
|
||||
:scroll-x="1200"
|
||||
/>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
:item-count="pagination.itemCount"
|
||||
:page-sizes="[2,10, 20, 50, 100]"
|
||||
show-size-picker
|
||||
show-quick-jumper
|
||||
@update:page="handlePageChange"
|
||||
@update:page-size="handlePageSizeChange"
|
||||
@update:checked-row-keys="handleCheck"
|
||||
/>
|
||||
>
|
||||
<template #prefix>
|
||||
共 {{ pagination.itemCount }} 条
|
||||
</template>
|
||||
</n-pagination>
|
||||
</div>
|
||||
</n-card>
|
||||
|
||||
<!-- 新增/编辑弹窗 -->
|
||||
@ -181,6 +194,8 @@ const formRules = {
|
||||
// 表格列
|
||||
const columns: DataTableColumns<FlowingAround> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '物料名称', key: 'materialName' },
|
||||
{ title: '物料编码', key: 'materialCode' },
|
||||
{ title: '当前序ID', key: 'currentlyPrefaceName' },
|
||||
{ title: '下一序ID', key: 'nextPrefaceName' },
|
||||
{ title: '业务来源', key: 'businessName' },
|
||||
|
||||
@ -28,12 +28,12 @@
|
||||
<div class="card-stats">
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">完成</span>
|
||||
<span class="stat-value">{{ completedQty }} / {{ totalQty }}</span>
|
||||
<span class="stat-value">{{ reportedQuantity }} / {{ totalQty }}</span>
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">合格 / 不合格</span>
|
||||
<span class="stat-value">
|
||||
<em class="ok">{{ qualifiedQty }}</em>
|
||||
<em class="ok">{{ completedQty }}</em>
|
||||
<span class="sep">/</span>
|
||||
<em class="bad">{{ scrapQty }}</em>
|
||||
</span>
|
||||
@ -155,6 +155,7 @@ const emit = defineEmits<{
|
||||
submitDetail: [process: ProcessPlanItemVO]
|
||||
}>()
|
||||
|
||||
const reportedQuantity = computed(() => props.process.reportedQuantity ?? 0)
|
||||
const totalQty = computed(() => props.process.quantity ?? 0)
|
||||
const completedQty = computed(() => props.process.completedQty ?? 0)
|
||||
const scrapQty = computed(() => props.process.scrapQty ?? 0)
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
clearable
|
||||
remote
|
||||
:clear-filter-after-select="false"
|
||||
@change="loadNc"
|
||||
/>
|
||||
</n-form-item>
|
||||
</n-gi>
|
||||
@ -192,11 +193,11 @@ async function loadSection() {
|
||||
}
|
||||
|
||||
//加载下发数据
|
||||
async function loadNc() {
|
||||
const res = await loadAllNcCode()
|
||||
async function loadNc(row) {
|
||||
const res = await loadAllNcCode(row)
|
||||
ncList.value = res.map((n: any) => {
|
||||
return {
|
||||
label: n.ncName,
|
||||
label: n.name,
|
||||
value: n.id
|
||||
}
|
||||
})
|
||||
@ -206,6 +207,5 @@ async function loadNc() {
|
||||
|
||||
loadSection()
|
||||
slehand()
|
||||
loadNc()
|
||||
|
||||
</script>
|
||||
@ -50,6 +50,7 @@
|
||||
|
||||
<!-- 表格 -->
|
||||
<n-data-table
|
||||
remote
|
||||
:columns="columns"
|
||||
:data="tableData"
|
||||
:loading="loading"
|
||||
|
||||
@ -480,15 +480,28 @@ const formRules = {
|
||||
const columns: DataTableColumns<QualityTesting> = [
|
||||
// { type: 'selection' },
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center' },
|
||||
{ title: '来源类型', key: 'sourceType',align: 'center',
|
||||
render(row) {
|
||||
const val = row.sourceType
|
||||
const opt = qcSourceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
{
|
||||
title: '物料名称',
|
||||
key: 'materialName',
|
||||
align: 'center',
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
key: 'materialCode',
|
||||
align: 'center',
|
||||
width: 120
|
||||
},
|
||||
// { title: '来源类型', key: 'sourceType',align: 'center',
|
||||
// render(row) {
|
||||
// const val = row.sourceType
|
||||
// const opt = qcSourceTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
// if (!opt) return val ?? '-'
|
||||
|
||||
// return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
// }
|
||||
// },
|
||||
{ title: '业务来源', key: 'businessName',align: 'center'},
|
||||
// { title: '来源业务ID(汇报单/派工单等)', key: 'sourceId' },
|
||||
// { title: '关联生产订单ID', key: 'orderId' },
|
||||
// { title: '关联工序计划ID', key: 'processId' },
|
||||
|
||||
@ -1,16 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="toolbar">
|
||||
<n-space>
|
||||
<n-button
|
||||
size="small"
|
||||
:disabled="tableLoading || !AssingWorkTableData.length"
|
||||
@click="AssingWorkToggleExpandAll"
|
||||
>
|
||||
{{ AssingWorkAllExpanded ? '全部收起' : '全部展开' }}
|
||||
</n-button>
|
||||
</n-space>
|
||||
</div>
|
||||
<n-scrollbar x-scrollable>
|
||||
<n-data-table
|
||||
v-model:expanded-row-keys="AssingWorkExpandedKeys"
|
||||
@ -18,7 +7,7 @@
|
||||
:data="AssingWorkTableData"
|
||||
:loading="tableLoading"
|
||||
:row-key="RowKey"
|
||||
:scroll-x="1800"
|
||||
:scroll-x="1700"
|
||||
:max-height="1000"
|
||||
size="small"
|
||||
style="margin-bottom:15px"
|
||||
@ -26,7 +15,15 @@
|
||||
/>
|
||||
</n-scrollbar>
|
||||
|
||||
<div class="pagination-container" style="display: flex; justify-content: flex-end; margin-top: 12px">
|
||||
<div class="pagination-container">
|
||||
<n-button
|
||||
size="small"
|
||||
quaternary
|
||||
:disabled="tableLoading || !AssingWorkTableData.length"
|
||||
@click="AssingWorkToggleExpandAll"
|
||||
>
|
||||
{{ AssingWorkAllExpanded ? '全部收起' : '全部展开' }}
|
||||
</n-button>
|
||||
<n-pagination
|
||||
v-model:page="pagination.page"
|
||||
v-model:page-size="pagination.pageSize"
|
||||
@ -135,6 +132,9 @@ const AssingWorkTableData = ref<AssingWork[]>([])
|
||||
const AssingWorkExpandedKeys = ref<Array<string |number>>([])
|
||||
|
||||
const processName = ref<string>()
|
||||
const assingCode = ref<string>()
|
||||
const materialCode = ref<string>()
|
||||
const materialName = ref<string>()
|
||||
|
||||
|
||||
//派工详情弹窗
|
||||
@ -153,7 +153,7 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
align:"center",
|
||||
title:"派工编号",
|
||||
key:"assingCode",
|
||||
minWidth:150,
|
||||
width: 170,
|
||||
render(row:any) {
|
||||
return h(
|
||||
'a',
|
||||
@ -175,21 +175,74 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '工序名称',
|
||||
key: 'processName',
|
||||
minWidth: 200
|
||||
title: '物料编码',
|
||||
key: 'materialCode',
|
||||
width: 120,
|
||||
ellipsis: { tooltip: true },
|
||||
render(row:any) {
|
||||
return row.materialCode || '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '物料名称',
|
||||
key: 'materialName',
|
||||
width: 140,
|
||||
ellipsis: { tooltip: true },
|
||||
render(row:any) {
|
||||
return row.materialName || '-'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
align:'center',
|
||||
title: '工序名称',
|
||||
key: 'processName',
|
||||
width: 120,
|
||||
ellipsis: { tooltip: true }
|
||||
},
|
||||
/*{
|
||||
align:'center',
|
||||
title: '工序编号',
|
||||
key: 'processCode',
|
||||
minWidth: 200
|
||||
width: 100
|
||||
}, */
|
||||
{
|
||||
align:'center',
|
||||
title: '是否质检',
|
||||
key: 'qualityInspection',
|
||||
width: 90,
|
||||
render(row) {
|
||||
var opt = row.qualityInspection
|
||||
if (opt == 0) {
|
||||
return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" })
|
||||
}
|
||||
if (opt == 1) {
|
||||
return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" })
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '是否入库',
|
||||
key: 'storageEntry',
|
||||
width: 90,
|
||||
render(row) {
|
||||
var opt = row.storageEntry
|
||||
if (opt == 0) {
|
||||
return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" })
|
||||
}
|
||||
if (opt == 1) {
|
||||
return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" })
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
align:'center',
|
||||
title: '派工状态',
|
||||
key: 'assingStatus',
|
||||
minWidth: 150,
|
||||
width: 90,
|
||||
render(row:any) {
|
||||
const val = row.assingStatus
|
||||
const opt = qcAssingStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
@ -215,31 +268,32 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
align:'center',
|
||||
title: '工位/设备',
|
||||
key: 'deviceName',
|
||||
minWidth: 200
|
||||
width: 110,
|
||||
ellipsis: { tooltip: true }
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '数量',
|
||||
minWidth: 100,
|
||||
width: 70,
|
||||
key: 'quantity'
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '完成数量',
|
||||
key: 'completedQuantity',
|
||||
minWidth: 150
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '完成时间',
|
||||
key: 'completedTime',
|
||||
minWidth: 180
|
||||
width: 160
|
||||
},
|
||||
{
|
||||
align:'center',
|
||||
title: '状态',
|
||||
key: 'status',
|
||||
minWidth: 100,
|
||||
width: 80,
|
||||
render(row:any) {
|
||||
if(row.status == 0){
|
||||
return h(NTag, {
|
||||
@ -278,7 +332,7 @@ const AssingWorkColumns :DataTableColumns<AssingWork> = [
|
||||
align:'center',
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
width: 250,
|
||||
width: 180,
|
||||
fixed: 'right',
|
||||
render(row:any) {
|
||||
const buttons:any = []
|
||||
@ -402,25 +456,34 @@ function handlePageSizeChange(pageSize: number) {
|
||||
}
|
||||
|
||||
// //获取列表数据
|
||||
function getlist() {
|
||||
try{
|
||||
mytasks({
|
||||
page:pagination.page,
|
||||
pageSize:pagination.pageSize,
|
||||
processName:processName.value
|
||||
}).then((rps:any) => {
|
||||
AssingWorkTableData.value = rps.records
|
||||
pagination.itemCount = rps.total
|
||||
async function getlist() {
|
||||
tableLoading.value = true
|
||||
try {
|
||||
const rps: any = await mytasks({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
processName: processName.value || undefined,
|
||||
assingCode: assingCode.value || undefined,
|
||||
materialCode: materialCode.value || undefined,
|
||||
materialName: materialName.value || undefined,
|
||||
})
|
||||
}catch(error) {
|
||||
console.log(error);
|
||||
|
||||
AssingWorkTableData.value = rps?.records ?? []
|
||||
pagination.itemCount = rps?.total ?? 0
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
tableLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const loadTableData = async(params:Record<string,any>) => {
|
||||
processName.value = params.processName
|
||||
getlist()
|
||||
const loadTableData = async (params: Record<string, any> = {}) => {
|
||||
processName.value = params.processName || undefined
|
||||
assingCode.value = params.assingCode || undefined
|
||||
materialCode.value = params.materialCode || undefined
|
||||
materialName.value = params.materialName || undefined
|
||||
pagination.page = 1
|
||||
AssingWorkExpandedKeys.value = []
|
||||
await getlist()
|
||||
}
|
||||
|
||||
|
||||
@ -628,8 +691,11 @@ defineExpose({
|
||||
|
||||
|
||||
<style scoped>
|
||||
.toolbar {
|
||||
margin-bottom: 12px;
|
||||
.pagination-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.pgClass {
|
||||
font-weight: bold;
|
||||
|
||||
@ -47,14 +47,42 @@
|
||||
</template>
|
||||
</n-pagination>
|
||||
</div>
|
||||
|
||||
<!--质检详情弹窗-->
|
||||
<n-modal v-model:show="showAssingWorkDetail" title="派工详情" style="width: 1000px" >
|
||||
<n-card hoverable>
|
||||
<template #header>
|
||||
<div style="display:flex;justify-content:space-between;align-items:center;width:100%">
|
||||
<span>明细列表</span>
|
||||
<n-button text @click="detailIsCollapse = !detailIsCollapse">
|
||||
<n-icon :component="detailIsCollapse ? ArrowDownOutline : ArrowUpOutline" />
|
||||
</n-button>
|
||||
</div>
|
||||
</template>
|
||||
<n-data-table
|
||||
v-show="!detailIsCollapse"
|
||||
:columns="detailColumns"
|
||||
:data="detailTableData"
|
||||
:row-key="(row:any) => row.id"
|
||||
:scroll-x="700"
|
||||
max-height="320"
|
||||
:pagination="{ pageSize:4 }"
|
||||
/>
|
||||
</n-card>
|
||||
</n-modal>
|
||||
|
||||
|
||||
|
||||
</n-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { NCard, NDataTable, NGi,NTag, NGrid,DataTableColumns} from "naive-ui";
|
||||
import {NCard, NDataTable, NGi, NTag, NGrid, DataTableColumns, NIcon, NButton} from "naive-ui";
|
||||
import {onMounted, ref, h, reactive} from "vue";
|
||||
import { dictDataApi } from '@/api/org'
|
||||
|
||||
import {QualityTesting,qualityTestingApi} from "@/api/qualityTesting.ts";
|
||||
import {ArrowDownOutline, ArrowUpOutline} from "@vicons/ionicons5";
|
||||
import type {QcResultDetail} from "@/api/qcResultDetail.ts";
|
||||
|
||||
const props =defineProps(
|
||||
{
|
||||
@ -76,7 +104,27 @@ const qcStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
//汇报信息表格
|
||||
const reportRecordsColums:DataTableColumns<QualityTesting> = [
|
||||
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center' },
|
||||
{ title: '质检编号', key: 'qcNo',align: 'center',
|
||||
render(row:any) {
|
||||
return h(
|
||||
'a',
|
||||
{
|
||||
class:"route-code-link",
|
||||
href: 'javascript:;',
|
||||
style:{
|
||||
color: '#2080f0',
|
||||
textDecoration: 'underline',
|
||||
cursor: 'pointer',
|
||||
},
|
||||
onClick: (e: MouseEvent) => {
|
||||
viewQualityResultDetail(row)
|
||||
}
|
||||
},
|
||||
row.qcNo
|
||||
|
||||
)
|
||||
}
|
||||
},
|
||||
{ title: '来源类型', key: 'sourceType',align: 'center',
|
||||
render(row) {
|
||||
const val = row.sourceType
|
||||
@ -109,6 +157,14 @@ async function loadDictOptions() {
|
||||
const data = await dictDataApi.listByType('qc_status')
|
||||
qcStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_result_type')
|
||||
qcResultTypeOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
}catch {}
|
||||
try {
|
||||
const data = await dictDataApi.listByType('qc_action_status')
|
||||
qcActionStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class: d.listClass }))
|
||||
}catch {}
|
||||
}
|
||||
|
||||
|
||||
@ -134,6 +190,80 @@ function handlePageSizeChange(pageSize: number) {
|
||||
loadQualityTestingList()
|
||||
}
|
||||
|
||||
const showAssingWorkDetail = ref<Boolean>(false)
|
||||
const detailIsCollapse = ref(false)
|
||||
|
||||
const detailColumns: DataTableColumns<QcResultDetail> = [
|
||||
{
|
||||
title: '判定类型',
|
||||
key: 'resultType',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
render: (row) => {
|
||||
const val = row.resultType
|
||||
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '判定数量',
|
||||
key: 'qty',
|
||||
align: 'center',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '批次号',
|
||||
key: 'traceCode',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.traceCode
|
||||
return val ?? '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '不良代码',
|
||||
key: 'defectCode',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.defectCode
|
||||
return val ?? '-'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '后续动作',
|
||||
key: 'handleAction',
|
||||
width: 80,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '动作执行状态',
|
||||
key: 'actionStatus',
|
||||
width: 80,
|
||||
align: 'center',
|
||||
render: (row) => {
|
||||
const val = row.actionStatus
|
||||
const opt = qcActionStatusOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||
if (!opt) return val ?? '-'
|
||||
|
||||
return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label })
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
const detailTableData = ref<Object[]>([])
|
||||
const qcResultTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
//动作执行状态
|
||||
const qcActionStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||
|
||||
function viewQualityResultDetail(row) {
|
||||
showAssingWorkDetail.value = true
|
||||
detailTableData.value = row.qcResultDetailList
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
loadDictOptions()
|
||||
loadQualityTestingList()
|
||||
|
||||
@ -77,6 +77,8 @@ const pagination = reactive({
|
||||
const reportRecordsColums:DataTableColumns<SubmitLog> = [
|
||||
|
||||
{ title: '汇报数量', key: 'quantity',align: 'center'},
|
||||
{ title: '合格数量', key: 'qualifiedQty',align: 'center'},
|
||||
{ title: '报废数量', key: 'scrapQty',align: 'center'},
|
||||
{ title: '汇报人', key: 'userName',align: 'center' },
|
||||
{ title: '派工状态', key: 'submitStatus',align: 'center',
|
||||
render: (row) => {
|
||||
|
||||
@ -9,22 +9,24 @@
|
||||
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-form-item-gi :span="4" label="派工编号">
|
||||
<n-input v-model:value="searchForm.assingCode" placeholder="请输入派工编号" clearable />
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi :span="4" label="物料编码">
|
||||
<n-input v-model:value="searchForm.materialCode" placeholder="请输入物料编码" clearable />
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi :span="4" label="物料名称">
|
||||
<n-input v-model:value="searchForm.materialName" placeholder="请输入物料名称" clearable />
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi :span="4" label="工序名称">
|
||||
<n-input v-model:value="searchForm.processName" placeholder="请输入工序名称" clearable />
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi :span="6">
|
||||
<n-form-item-gi :span="4">
|
||||
<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>
|
||||
重置
|
||||
@ -263,6 +265,9 @@ const searchForm = reactive({
|
||||
pageSize: 20,
|
||||
processId:'',
|
||||
processName:'',
|
||||
assingCode:'',
|
||||
materialCode:'',
|
||||
materialName:'',
|
||||
})
|
||||
|
||||
|
||||
@ -489,23 +494,31 @@ const columns = [
|
||||
|
||||
//搜索数据
|
||||
function search() {
|
||||
treeTableRef.value?.loadTableData({...searchForm})
|
||||
treeTableRef.value?.loadTableData({
|
||||
processName: searchForm.processName,
|
||||
assingCode: searchForm.assingCode,
|
||||
materialCode: searchForm.materialCode,
|
||||
materialName: searchForm.materialName,
|
||||
})
|
||||
}
|
||||
|
||||
//重置
|
||||
function reset() {
|
||||
searchForm.processId =''
|
||||
searchForm.processId = ''
|
||||
searchForm.processName = ''
|
||||
treeTableRef.value?.loadTableData({...searchForm})
|
||||
searchForm.assingCode = ''
|
||||
searchForm.materialCode = ''
|
||||
searchForm.materialName = ''
|
||||
treeTableRef.value?.loadTableData({})
|
||||
}
|
||||
|
||||
//获取列表数据
|
||||
function getlist() {
|
||||
searchForm.page = pagination.page
|
||||
searchForm.pageSize = pagination.pageSize
|
||||
mytasks(searchForm).then((rps:any) => {
|
||||
datalist.value = rps.records
|
||||
pagination.itemCount = rps.total
|
||||
treeTableRef.value?.loadTableData({
|
||||
processName: searchForm.processName,
|
||||
assingCode: searchForm.assingCode,
|
||||
materialCode: searchForm.materialCode,
|
||||
materialName: searchForm.materialName,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user