修改前端代码
This commit is contained in:
parent
7b02625a1c
commit
e6927f4649
@ -395,8 +395,6 @@ const columns: DataTableColumns<ConcessionApply> = [
|
|||||||
{ title: '审批状态', key: 'approveStatus',align:"center",minWidth:"150" },
|
{ title: '审批状态', key: 'approveStatus',align:"center",minWidth:"150" },
|
||||||
{ title: '审批结果', key: 'approveResult',align:"center",minWidth:"150",
|
{ title: '审批结果', key: 'approveResult',align:"center",minWidth:"150",
|
||||||
render(row:any){
|
render(row:any){
|
||||||
console.log(row.approveResult);
|
|
||||||
|
|
||||||
if(row.approveResult == '待审批') return h(NTag, { type: 'default', size: 'small' }, { default: () => row.approveResult })
|
if(row.approveResult == '待审批') return h(NTag, { type: 'default', size: 'small' }, { default: () => row.approveResult })
|
||||||
if(row.approveResult == '已驳回') return h(NTag, { type: 'error', size: 'small' }, { default: () => row.approveResult })
|
if(row.approveResult == '已驳回') return h(NTag, { type: 'error', size: 'small' }, { default: () => row.approveResult })
|
||||||
if(row.approveResult == '已通过') return h(NTag, { type: 'success', size: 'small' }, { default: () => row.approveResult })
|
if(row.approveResult == '已通过') return h(NTag, { type: 'success', size: 'small' }, { default: () => row.approveResult })
|
||||||
@ -650,25 +648,8 @@ async function loadDictOptions() {
|
|||||||
} catch {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTimelineType = (type) => {
|
|
||||||
console.log(type);
|
|
||||||
|
|
||||||
const map = {
|
function getApproveResultColor(status:string) {
|
||||||
'START_PROCESS_INSTANCE': 'info', //发起-蓝色
|
|
||||||
'AGREE': 'success',//通过-绿色
|
|
||||||
'REFUSE': 'error',//驳回-红色
|
|
||||||
'TERMINATE_PROCESS_INSTANCE':'warning',//撤回-橙黄
|
|
||||||
'grey':'default', //兼容grey
|
|
||||||
'info':'default'
|
|
||||||
}
|
|
||||||
return map[type] || 'default'
|
|
||||||
}
|
|
||||||
const getTitleAttribute = (item) =>{
|
|
||||||
return item.username +" "+item.operationResult
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function getApproveResultColor(status) {
|
|
||||||
switch(status){
|
switch(status){
|
||||||
case '已通过':
|
case '已通过':
|
||||||
return "green"
|
return "green"
|
||||||
@ -679,11 +660,6 @@ function getApproveResultColor(status) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getRemark=(item) =>{
|
|
||||||
console.log(item.remark);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function downloadOutline() {
|
async function downloadOutline() {
|
||||||
const model = detailModel.value
|
const model = detailModel.value
|
||||||
if (!model) {
|
if (!model) {
|
||||||
@ -827,7 +803,7 @@ async function downloadOutline() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function handleCancel(row) {
|
async function handleCancel(row:any) {
|
||||||
|
|
||||||
dialog.warning({
|
dialog.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
@ -502,7 +502,7 @@ const columns = [
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
title: '是否采购',
|
title: '是否采购',
|
||||||
key: 'procurement',
|
key: 'procurement',
|
||||||
render(row) {
|
render(row:any) {
|
||||||
const val = row.procurement
|
const val = row.procurement
|
||||||
const opt = procurementOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = procurementOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
return opt ? opt.label : (val ?? '-')
|
return opt ? opt.label : (val ?? '-')
|
||||||
@ -513,7 +513,7 @@ const columns = [
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
title: '是否委外',
|
title: '是否委外',
|
||||||
key: 'outsource',
|
key: 'outsource',
|
||||||
render(row) {
|
render(row:any) {
|
||||||
const val = row.outsource
|
const val = row.outsource
|
||||||
const opt = outsourceOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = outsourceOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
return opt ? opt.label : (val ?? '-')
|
return opt ? opt.label : (val ?? '-')
|
||||||
@ -542,7 +542,7 @@ const columns = [
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
title: '是否质检',
|
title: '是否质检',
|
||||||
key: 'qualityInspection',
|
key: 'qualityInspection',
|
||||||
render(row) {
|
render(row:any) {
|
||||||
const val = row.qualityInspection
|
const val = row.qualityInspection
|
||||||
const opt = qualityInspectionOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = qualityInspectionOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
return opt ? opt.label : (val ?? '-')
|
return opt ? opt.label : (val ?? '-')
|
||||||
@ -553,7 +553,7 @@ const columns = [
|
|||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
title: '是否直接入库',
|
title: '是否直接入库',
|
||||||
key: 'storageEntry',
|
key: 'storageEntry',
|
||||||
render(row) {
|
render(row:any) {
|
||||||
const val = row.storageEntry
|
const val = row.storageEntry
|
||||||
const opt = storageEntryOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = storageEntryOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
return opt ? opt.label : (val ?? '-')
|
return opt ? opt.label : (val ?? '-')
|
||||||
@ -565,7 +565,7 @@ const columns = [
|
|||||||
key: 'actions',
|
key: 'actions',
|
||||||
width: 140,
|
width: 140,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
render(row) {
|
render(row:any) {
|
||||||
|
|
||||||
const buttons:any = []
|
const buttons:any = []
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,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"
|
||||||
@ -54,9 +54,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, h, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import { NButton, NSpace, NIcon, NUpload, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions } from 'naive-ui'
|
import { NButton, NSpace, NIcon, type DataTableColumns} from 'naive-ui'
|
||||||
import { SearchOutline, RefreshOutline, AddOutline, TrashOutline, CreateOutline, CloudUploadOutline, DownloadOutline } from '@vicons/ionicons5'
|
import { SearchOutline, RefreshOutline } from '@vicons/ionicons5'
|
||||||
import { qcResultDetailApi, type QcResultDetail } from '@/api/qcResultDetail'
|
import { qcResultDetailApi, type QcResultDetail } from '@/api/qcResultDetail'
|
||||||
import { dictDataApi } from '@/api/org'
|
import { dictDataApi } from '@/api/org'
|
||||||
|
|
||||||
|
|||||||
@ -213,7 +213,7 @@
|
|||||||
:columns="detailColumns"
|
:columns="detailColumns"
|
||||||
:data="detailTableData"
|
:data="detailTableData"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:row-key="(row) => row.id"
|
:row-key="(row:any) => row.id"
|
||||||
:scroll-x="700"
|
:scroll-x="700"
|
||||||
max-height="320"
|
max-height="320"
|
||||||
:pagination="{ pageSize:4 }"
|
:pagination="{ pageSize:4 }"
|
||||||
@ -245,15 +245,9 @@ import { qualityTestingApi, type QualityTesting } from '@/api/qualityTesting'
|
|||||||
import {assingReworkApi} from '@/api/assingRework'
|
import {assingReworkApi} from '@/api/assingRework'
|
||||||
import { dictDataApi } from '@/api/org'
|
import { dictDataApi } from '@/api/org'
|
||||||
|
|
||||||
import {Language} from "@xterm/xterm/src/vs/base/common/platform.ts";
|
|
||||||
|
|
||||||
import {fileApi} from '@/api/system1'
|
|
||||||
|
|
||||||
import value = Language.value;
|
|
||||||
import {QcResultDetail} from "@/api/qcResultDetail.ts";
|
import {QcResultDetail} from "@/api/qcResultDetail.ts";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import dd from 'dingtalk-jsapi'
|
|
||||||
import { env } from 'echarts'
|
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const dialog = useDialog()
|
const dialog = useDialog()
|
||||||
@ -274,7 +268,7 @@ const pagination = reactive({
|
|||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const searchForm = reactive({
|
const searchForm = reactive({
|
||||||
qcNo: null as number | null,
|
qcNo: null as string | null,
|
||||||
status: null as number | null,
|
status: null as number | null,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -290,7 +284,7 @@ const infoIsCollapse = ref(false)
|
|||||||
const detailIsCollapse = ref(true)
|
const detailIsCollapse = ref(true)
|
||||||
|
|
||||||
//提交判定明细
|
//提交判定明细
|
||||||
const submitDetailModalVisible = ref(false)
|
// const submitDetailModalVisible = ref(false)
|
||||||
const traceCodeShow = ref(false)
|
const traceCodeShow = ref(false)
|
||||||
//提交明细/部分提交明细标识
|
//提交明细/部分提交明细标识
|
||||||
const submitFlag = ref<Boolean>()
|
const submitFlag = ref<Boolean>()
|
||||||
@ -334,10 +328,10 @@ const infoDataMapping = {
|
|||||||
inspectTime: '质检时间',
|
inspectTime: '质检时间',
|
||||||
traceType: '追溯类型'
|
traceType: '追溯类型'
|
||||||
}
|
}
|
||||||
const infoDataMap = new Map(Object.entries(infoDataMapping))
|
|
||||||
const mappedInfoList = ref<Array<{ label: string; key: string; value: any }>>([])
|
const mappedInfoList = ref<Array<{ label: string; key: string; value: any }>>([])
|
||||||
//详情列表名
|
//详情列表名
|
||||||
const detailColumns: DataTableColumns<Object> = [
|
const detailColumns: DataTableColumns<QcResultDetail> = [
|
||||||
{
|
{
|
||||||
title: '判定类型',
|
title: '判定类型',
|
||||||
key: 'resultType',
|
key: 'resultType',
|
||||||
@ -403,7 +397,7 @@ const detailTableData = ref<Object[]>([])
|
|||||||
|
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const defaultFormData: QualityTesting = {
|
const defaultFormData: QualityTesting = {
|
||||||
qcNo: '',
|
qcNo: undefined,
|
||||||
sourceType: undefined,
|
sourceType: undefined,
|
||||||
sourceId: undefined,
|
sourceId: undefined,
|
||||||
orderId: undefined,
|
orderId: undefined,
|
||||||
@ -417,38 +411,38 @@ const defaultFormData: QualityTesting = {
|
|||||||
}
|
}
|
||||||
const formData = reactive<QualityTesting>({ ...defaultFormData })
|
const formData = reactive<QualityTesting>({ ...defaultFormData })
|
||||||
|
|
||||||
const defaultFormDetailData:QcResultDetail = {
|
// const defaultFormDetailData:QcResultDetail = {
|
||||||
qcId: undefined,
|
// qcId: undefined,
|
||||||
resultType: undefined,
|
// resultType: undefined,
|
||||||
qty: 0,
|
// qty: 0,
|
||||||
traceCode: undefined,
|
// traceCode: undefined,
|
||||||
defectCode: undefined,
|
// defectCode: undefined,
|
||||||
handleAction: undefined,
|
// handleAction: undefined,
|
||||||
actionStatus: undefined
|
// actionStatus: undefined
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
const formDetailOKData = reactive<QcResultDetail>({ ...defaultFormDetailData, resultType: 1,handleAction:'下一道工序',actionStatus:1 })
|
// const formDetailOKData = reactive<QcResultDetail>({ ...defaultFormDetailData, resultType: 1,handleAction:'下一道工序',actionStatus:1 })
|
||||||
const formDetailScrapData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 2,handleAction:'报废次品',actionStatus:1 })
|
// const formDetailScrapData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 2,handleAction:'报废次品',actionStatus:1 })
|
||||||
const formDetailReworkData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 3,handleAction:'返工',actionStatus:1 })
|
// const formDetailReworkData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 3,handleAction:'返工',actionStatus:1 })
|
||||||
const formDetailConcessionData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 4,handleAction:'让步接收',actionStatus:1 })
|
// const formDetailConcessionData = reactive<QcResultDetail>({ ...defaultFormDetailData,resultType: 4,handleAction:'让步接收',actionStatus:1 })
|
||||||
|
|
||||||
const assingWorkDisabled = ref(true)
|
const assingWorkDisabled = ref(true)
|
||||||
|
|
||||||
const assingWork = ref<{ label: string; value: any }[]>([])
|
const assingWork = ref<{ label: string; value: any }[]>([])
|
||||||
|
|
||||||
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
||||||
const statusOptions = ref<{ label: string; value: any }[]>([])
|
const statusOptions = ref<{ label: string; value: any;class:any}[]>([])
|
||||||
//质检状态字典
|
//质检状态字典
|
||||||
const qcStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//业务来源字典
|
//业务来源字典
|
||||||
const qcSourceTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcSourceTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//追溯状态字段
|
//追溯状态字段
|
||||||
const qcTraceTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcTraceTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//判定类型
|
//判定类型
|
||||||
const qcResultTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcResultTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//动作执行状态
|
//动作执行状态
|
||||||
const qcActionStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcActionStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
const formRules = {
|
const formRules = {
|
||||||
sourceType: [{ required: true, type: 'number', message: '请选择来源类型:1工序汇报/2委外/3手工', trigger: 'change' }],
|
sourceType: [{ required: true, type: 'number', message: '请选择来源类型:1工序汇报/2委外/3手工', trigger: 'change' }],
|
||||||
@ -577,7 +571,7 @@ function handleSearch() {
|
|||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
function handleReset() {
|
function handleReset() {
|
||||||
searchForm.id = null
|
searchForm.qcNo = null
|
||||||
searchForm.status = null
|
searchForm.status = null
|
||||||
|
|
||||||
handleSearch()
|
handleSearch()
|
||||||
@ -699,7 +693,7 @@ async function handleExport() {
|
|||||||
try {
|
try {
|
||||||
const params: Record<string, any> = {}
|
const params: Record<string, any> = {}
|
||||||
if (selectedIds.value.length > 0) params.ids = selectedIds.value
|
if (selectedIds.value.length > 0) params.ids = selectedIds.value
|
||||||
if (searchForm.id != null) params.id = searchForm.id
|
if (searchForm.qcNo != null) params.id = searchForm.qcNo
|
||||||
if (searchForm.status != null) params.status = searchForm.status
|
if (searchForm.status != null) params.status = searchForm.status
|
||||||
const blob = await qualityTestingApi.export(params)
|
const blob = await qualityTestingApi.export(params)
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
@ -837,12 +831,12 @@ function formatDisplayValue(key: string, value: any): string {
|
|||||||
async function loadAssignWorkOrder() {
|
async function loadAssignWorkOrder() {
|
||||||
const data = await assingReworkApi.allList()
|
const data = await assingReworkApi.allList()
|
||||||
console.log(data)
|
console.log(data)
|
||||||
assingWork.value = data.map(d => ({ label: d.assingCode, value: (Number(d.id) || d.id) }))
|
assingWork.value = data.map((d:any) => ({ label: d.assingCode, value: (Number(d.id) || d.id) }))
|
||||||
console.log(assingWork)
|
console.log(assingWork)
|
||||||
}
|
}
|
||||||
|
|
||||||
//提交判定明细
|
//提交判定明细
|
||||||
function submitResultDetail(row) {
|
function submitResultDetail(row:any) {
|
||||||
|
|
||||||
if (row.traceType != 1) {
|
if (row.traceType != 1) {
|
||||||
traceCodeShow.value = true
|
traceCodeShow.value = true
|
||||||
@ -856,36 +850,14 @@ function submitResultDetail(row) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function handleSubmitResultDetail() {
|
|
||||||
|
|
||||||
formDetailConcessionData.files = uploadFiles.value
|
|
||||||
|
|
||||||
const submitParam = [
|
|
||||||
formDetailOKData,
|
|
||||||
formDetailScrapData,
|
|
||||||
formDetailReworkData,
|
|
||||||
formDetailConcessionData]
|
|
||||||
console.log(submitParam);
|
|
||||||
|
|
||||||
submitFlag.value? await qualityTestingApi.submit(submitParam) : await qualityTestingApi.submitBF(submitParam)
|
|
||||||
|
|
||||||
message.success('提交成功')
|
|
||||||
submitDetailModalVisible.value = false
|
|
||||||
loadData()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//提交部分判定明细
|
//提交部分判定明细
|
||||||
function submitBFResultDetail(row) {
|
function submitBFResultDetail(row:any) {
|
||||||
|
|
||||||
|
|
||||||
if (row.traceType != 1) {
|
if (row.traceType != 1) {
|
||||||
traceCodeShow.value = true
|
traceCodeShow.value = true
|
||||||
}
|
}
|
||||||
submitFlag.value = false
|
submitFlag.value = false
|
||||||
|
|
||||||
|
|
||||||
//version-2
|
|
||||||
let path = `/qc/submitDetail/${row.qcNo}/${row.id}/${submitFlag.value}/${traceCodeShow.value}`
|
let path = `/qc/submitDetail/${row.qcNo}/${row.id}/${submitFlag.value}/${traceCodeShow.value}`
|
||||||
router.push(path)
|
router.push(path)
|
||||||
|
|
||||||
@ -893,13 +865,13 @@ function submitBFResultDetail(row) {
|
|||||||
|
|
||||||
|
|
||||||
//查询判定明细
|
//查询判定明细
|
||||||
function queryResultDetail(row) {
|
function queryResultDetail(row:any) {
|
||||||
let path = `detail/${row.id}`;
|
let path = `detail/${row.id}`;
|
||||||
router.push(path)
|
router.push(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
//质检撤回
|
//质检撤回
|
||||||
function handleCancelQuality(row) {
|
function handleCancelQuality(row:any) {
|
||||||
dialog.warning({
|
dialog.warning({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要撤回ID:'+row.id+'质检记录吗?',
|
content: '确定要撤回ID:'+row.id+'质检记录吗?',
|
||||||
|
|||||||
@ -134,7 +134,6 @@
|
|||||||
multiple
|
multiple
|
||||||
directory-dnd
|
directory-dnd
|
||||||
:max="5"
|
:max="5"
|
||||||
:action="null"
|
|
||||||
:custom-request="()=>{}"
|
:custom-request="()=>{}"
|
||||||
@change="handleUploadChange"
|
@change="handleUploadChange"
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
@ -173,19 +172,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, h, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import {
|
import {
|
||||||
NButton, NSpace, NIcon, NUpload,NTag, useMessage, useDialog, type DataTableColumns, type UploadCustomRequestOptions,
|
NButton, NSpace, NIcon, NUpload, useMessage
|
||||||
NDropdown
|
|
||||||
} from 'naive-ui'
|
} from 'naive-ui'
|
||||||
|
|
||||||
import {useRoute} from "vue-router";
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
import {QcResultDetail} from "@/api/qcResultDetail.ts";
|
import {QcResultDetail} from "@/api/qcResultDetail.ts";
|
||||||
import {fileApi} from '@/api/system1'
|
import {fileApi} from '@/api/system1'
|
||||||
import { qualityTestingApi, type QualityTesting } from '@/api/qualityTesting'
|
import { qualityTestingApi} from '@/api/qualityTesting'
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
|
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const qcId =ref( Number(route.params.id))
|
const qcId =ref( Number(route.params.id))
|
||||||
|
|||||||
@ -211,6 +211,7 @@ const pagination = reactive({
|
|||||||
// 搜索表单
|
// 搜索表单
|
||||||
const searchForm = reactive({
|
const searchForm = reactive({
|
||||||
page:pagination.page as number,
|
page:pagination.page as number,
|
||||||
|
assingStatus:undefined
|
||||||
})
|
})
|
||||||
|
|
||||||
// 弹窗
|
// 弹窗
|
||||||
@ -229,13 +230,13 @@ const reportDetailVisible = ref(false)
|
|||||||
|
|
||||||
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
// 字典选项(下拉框/单选框/复选框关联字典时使用)
|
||||||
//判定状态字典
|
//判定状态字典
|
||||||
const qcResultTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcResultTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//业务来源字典
|
//业务来源字典
|
||||||
const qcSourceTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcSourceTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//质检状态字典
|
//质检状态字典
|
||||||
const qcStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//派工状态字典
|
//派工状态字典
|
||||||
const qcAssingStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcAssingStatusOptions = ref<{ label: string; value: any ;class:any}[]>([])
|
||||||
// 表单校验规则
|
// 表单校验规则
|
||||||
const formRules = {
|
const formRules = {
|
||||||
}
|
}
|
||||||
@ -280,7 +281,7 @@ const columns: DataTableColumns<SubmitLog> = [
|
|||||||
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: () => handleViewReport(row) }, {
|
h(NButton, { size: 'small', quaternary: true, onClick: () => handleViewReport(row) }, {
|
||||||
default: () => [h(NIcon, null, { default: () => h(null) }), ' 汇报信息']
|
default: () => ['汇报信息']
|
||||||
}),
|
}),
|
||||||
// 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) }), ' 编辑']
|
||||||
@ -300,7 +301,7 @@ const submitColumns = ref([
|
|||||||
{ title: "提交时间", key: "submitCreateTime" },
|
{ title: "提交时间", key: "submitCreateTime" },
|
||||||
{ title: "提交数量", key: "quantity" },
|
{ title: "提交数量", key: "quantity" },
|
||||||
{ title: "单据状态", key: "submitStatus",
|
{ title: "单据状态", key: "submitStatus",
|
||||||
render: (row) => {
|
render: (row:any) => {
|
||||||
const val = row.submitStatus
|
const val = row.submitStatus
|
||||||
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
if (!opt) return val ?? '-'
|
if (!opt) return val ?? '-'
|
||||||
@ -335,7 +336,7 @@ function handleSearch() {
|
|||||||
|
|
||||||
// 重置
|
// 重置
|
||||||
function handleReset() {
|
function handleReset() {
|
||||||
searchForm.assingStatus = null
|
searchForm.assingStatus = undefined
|
||||||
|
|
||||||
handleSearch()
|
handleSearch()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,8 +92,8 @@ const statisticTypeOptions = ref<{ label: string; value: any }[]>([])
|
|||||||
|
|
||||||
//统计属性
|
//统计属性
|
||||||
const searchForm =reactive({
|
const searchForm =reactive({
|
||||||
type: null as string,
|
type:undefined as any,
|
||||||
timestamp: null as string
|
timestamp: undefined as any
|
||||||
})
|
})
|
||||||
|
|
||||||
const stats = reactive({
|
const stats = reactive({
|
||||||
|
|||||||
@ -396,13 +396,13 @@ const userStore = useUserStore()
|
|||||||
const hasPermission = (permission: string) => userStore.hasPermission(permission)
|
const hasPermission = (permission: string) => userStore.hasPermission(permission)
|
||||||
|
|
||||||
//判定状态字典
|
//判定状态字典
|
||||||
const qcResultTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcResultTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//业务来源字典
|
//业务来源字典
|
||||||
const qcSourceTypeOptions = ref<{ label: string; value: any }[]>([])
|
const qcSourceTypeOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//质检状态字典
|
//质检状态字典
|
||||||
const qcStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
//派工状态字典
|
//派工状态字典
|
||||||
const qcAssingStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
|
|
||||||
//汇报详情
|
//汇报详情
|
||||||
const infoIsCollapse = ref(false)
|
const infoIsCollapse = ref(false)
|
||||||
@ -418,7 +418,7 @@ const submitColumns = ref([
|
|||||||
{ title: "提交时间", key: "submitCreateTime" },
|
{ title: "提交时间", key: "submitCreateTime" },
|
||||||
{ title: "提交数量", key: "quantity" },
|
{ title: "提交数量", key: "quantity" },
|
||||||
{ title: "单据状态", key: "submitStatus",
|
{ title: "单据状态", key: "submitStatus",
|
||||||
render: (row) => {
|
render: (row:any) => {
|
||||||
const val = row.submitStatus
|
const val = row.submitStatus
|
||||||
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
const opt = qcResultTypeOptions.value.find(o => o.value === val || String(o.value) === String(val))
|
||||||
if (!opt) return val ?? '-'
|
if (!opt) return val ?? '-'
|
||||||
|
|||||||
@ -199,7 +199,7 @@ const hasPermission = (permission: string) => userStore.hasPermission(permission
|
|||||||
|
|
||||||
|
|
||||||
//派工状态字典
|
//派工状态字典
|
||||||
const qcAssingStatusOptions = ref<{ label: string; value: any }[]>([])
|
const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([])
|
||||||
|
|
||||||
// ==================== 搜索表单 ====================
|
// ==================== 搜索表单 ====================
|
||||||
const searchForm = reactive({
|
const searchForm = reactive({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user