From 01ee694a3bb8048372fc793a8de314d70b688b35 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 18 十月 2026 22:36:21 +0800
Subject: [PATCH] 修改了工位
---
src/views/ecg/checktype/index.vue | 248 ++++++++++++++++++-------------------------------
1 files changed, 92 insertions(+), 156 deletions(-)
diff --git a/src/views/ecg/checktype/index.vue b/src/views/ecg/checktype/index.vue
index 84681eb..a34e9ec 100644
--- a/src/views/ecg/checktype/index.vue
+++ b/src/views/ecg/checktype/index.vue
@@ -1,123 +1,23 @@
<template>
<ContentWrap>
<!-- 鎼滅储宸ヤ綔鏍� -->
- <el-form
- class="-mb-15px"
- :model="queryParams"
- ref="queryFormRef"
- :inline="true"
- label-width="68px"
- >
- <el-form-item label="妫�鏌ョ被鍨嬪悕" prop="name">
- <el-input
- v-model="queryParams.name"
- placeholder="璇疯緭鍏ユ鏌ョ被鍨嬪悕"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="妫�鏌ョ被鍨嬪��" prop="value">
- <el-input
- v-model="queryParams.value"
- placeholder="璇疯緭鍏ユ鏌ョ被鍨嬪��"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="鍏佽鍑嗗涓汉鏁�" prop="readyNum">
- <el-input
- v-model="queryParams.readyNum"
- placeholder="璇疯緭鍏ュ厑璁稿噯澶囦腑浜烘暟"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
- <el-date-picker
- v-model="queryParams.createTime"
- value-format="YYYY-MM-DD HH:mm:ss"
- type="daterange"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
- class="!w-220px"
- />
- </el-form-item>
- <el-form-item label="鍙彿鍒�" prop="callingColumn">
- <el-input
- v-model="queryParams.callingColumn"
- placeholder="璇疯緭鍏ュ彨鍙峰垪"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="鏄惁鏄剧ず鎮h�呮潯鐮�" prop="displayBarcode">
- <el-input
- v-model="queryParams.displayBarcode"
- placeholder="璇疯緭鍏ユ槸鍚︽樉绀烘偅鑰呮潯鐮�"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="鏄惁闇�瑕佺‘璐�" prop="expenseRecognition">
- <el-input
- v-model="queryParams.expenseRecognition"
- placeholder="璇疯緭鍏ユ槸鍚﹂渶瑕佺‘璐�"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="鏃舵棰勭害瑙勫畾浜烘暟" prop="timeslotBookNum">
- <el-input
- v-model="queryParams.timeslotBookNum"
- placeholder="璇疯緭鍏ユ椂娈甸绾﹁瀹氫汉鏁�"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="姣忔椂娈甸鐣欎汉鏁�" prop="timeslotReservedNum">
- <el-input
- v-model="queryParams.timeslotReservedNum"
- placeholder="璇疯緭鍏ユ瘡鏃舵棰勭暀浜烘暟"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
- </el-form-item>
- <el-form-item label="浜插拰鐨勬鏌ョ被鍨�" prop="affinityCheckTypes">
- <el-input
- v-model="queryParams.affinityCheckTypes"
- placeholder="璇疯緭鍏ヤ翰鍜岀殑妫�鏌ョ被鍨�"
- clearable
- @keyup.enter="handleQuery"
- class="!w-240px"
- />
+ <el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="80px">
+ <el-form-item label="椤圭洰鍚嶇О" prop="name">
+ <el-input v-model="queryParams.name" placeholder="璇疯緭鍏ユ鏌ラ」鐩悕绉�" clearable @keyup.enter="handleQuery"
+ class="!w-240px" />
</el-form-item>
<el-form-item>
- <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 鎼滅储</el-button>
- <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 閲嶇疆</el-button>
- <el-button
- type="primary"
- plain
- @click="openForm('create')"
- v-hasPermi="['ecg:check-type:create']"
- >
+ <el-button @click="handleQuery">
+ <Icon icon="ep:search" class="mr-5px" /> 鎼滅储
+ </el-button>
+ <el-button @click="resetQuery">
+ <Icon icon="ep:refresh" class="mr-5px" /> 閲嶇疆
+ </el-button>
+ <el-button type="primary" plain @click="openForm('create')" v-hasPermi="['ecg:check-type:create']">
<Icon icon="ep:plus" class="mr-5px" /> 鏂板
</el-button>
- <el-button
- type="success"
- plain
- @click="handleExport"
- :loading="exportLoading"
- v-hasPermi="['ecg:check-type:export']"
- >
+ <el-button type="success" plain @click="handleExport" :loading="exportLoading"
+ v-hasPermi="['ecg:check-type:export']">
<Icon icon="ep:download" class="mr-5px" /> 瀵煎嚭
</el-button>
</el-form-item>
@@ -127,80 +27,93 @@
<!-- 鍒楄〃 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
- <el-table-column label="id" align="center" prop="id" />
- <el-table-column label="妫�鏌ョ被鍨嬪悕" align="center" prop="name" width="180px"/>
- <el-table-column label="妫�鏌ョ被鍨嬪��" align="center" prop="value" />
- <el-table-column label="鍏佽鍑嗗涓汉鏁�" align="center" prop="readyNum" />
-<!-- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" :formatter="dateFormatter" width="180px />-->
- <el-table-column label="闇�瑕佽澶囬鐢�" align="center" prop="needDevReady">
+ <!-- 闇�姹�9锛氫笉鍐嶆樉绀烘暟鎹簱 id锛涙敼涓烘樉绀�**鍙紪杈�**鐨勩�屾帓搴忓簭鍙枫�嶏紙瓒婂皬瓒婇潬鍓嶏級 -->
+ <el-table-column label="搴忓彿" align="center" prop="sort" width="130px">
<template #default="scope">
- {{scope.row.needDevReady === 0 ? "涓嶉渶瑕�":"闇�瑕�"}}
+ <el-input-number v-model="scope.row.sort" :min="0" :controls="false" size="small" style="width: 100%"
+ @change="handleSortChange(scope.row)" />
</template>
</el-table-column>
- <el-table-column label="鍙彿鍒�" align="center" prop="callingColumn" />
- <el-table-column label="鏄惁鏄剧ず鎮h�呮潯鐮�" align="center" prop="displayBarcode" />
- <el-table-column label="鏄惁闇�瑕佺‘璐�" align="center" prop="expenseRecognition" />
- <el-table-column label="鏃舵棰勭害瑙勫畾浜烘暟" align="center" prop="timeslotBookNum" />
- <el-table-column label="姣忔椂娈甸鐣欎汉鏁�" align="center" prop="timeslotReservedNum" />
- <el-table-column label="棰勭害娉ㄦ剰浜嬮」" align="center" prop="notes" />
- <el-table-column label="搴忓彿鍓嶇紑" align="center" prop="seqPrefix" />
- <el-table-column label="浜插拰鐨勬鏌ョ被鍨�" align="center" prop="affinityCheckTypes" >
+ <el-table-column label="椤圭洰鍚嶇О" align="center" prop="name" width="180px" />
+ <el-table-column label="椤圭洰缂栫爜" align="center" prop="value" />
+ <el-table-column label="浜插拰椤圭洰" align="center" prop="affinityCheckTypes">
<template #default="scope">
<div v-for="(checkType, subIndex) in scope.row.affinityCheckTypes" :key="subIndex">
- {{getCheckTypeName(checkType)}}
+ {{ getCheckTypeName(checkType) }}
</div>
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" align="center" min-width="120px">
+ <!-- <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" :formatter="dateFormatter" width="180px />-->
+ <el-table-column label="璁惧棰嗙敤" align="center" prop="needDevReady">
<template #default="scope">
- <el-button
- link
- type="primary"
- @click="openForm('update', scope.row.id)"
- v-hasPermi="['ecg:check-type:update']"
- >
+ {{ scope.row.needDevReady === 0 ? "涓嶉渶瑕�" : "闇�瑕�" }}
+ </template>
+ </el-table-column>
+ <!-- 闇�姹傦細搴撻噷瀛樼殑鏄� 0/1锛岀洿鎺ユ覆鏌撲細鏄剧ず鏁板瓧锛岃繖閲屾寜涓枃灞曠ず锛堜笌涓婁竴鍒椼�岃澶囬鐢ㄣ�嶅啓娉曚竴鑷达級 -->
+ <el-table-column label="闇�瑕佺‘璐�" align="center" prop="expenseRecognition">
+ <template #default="scope">
+ {{ scope.row.expenseRecognition === 1 ? "闇�瑕�" : "涓嶉渶瑕�" }}
+ </template>
+ </el-table-column>
+ <el-table-column label="鏃舵棰勭害浜烘暟" align="center" prop="timeslotBookNum" />
+ <el-table-column label="鏃舵棰勭暀浜烘暟" align="center" prop="timeslotReservedNum" />
+ <!-- 鎺掗槦瑙勫垯锛坈heck_type.seq_rule锛夛細搴撻噷鏄� 0/1/2锛屾寜瀛楀吀 ecg_seq_rule 鏄剧ず涓枃锛�
+ 鏈厤缃�(null) 鏃跺悗绔寜銆屾椂娈靛彿銆嶅鐞嗭紝杩欓噷鏄惧紡鎻愮ず锛岄伩鍏嶅嚭鐜扮┖鐧藉崟鍏冩牸 -->
+ <el-table-column label="鎺掗槦瑙勫垯" align="center" prop="seqRule">
+ <template #default="scope">
+ <span v-if="scope.row.seqRule === null || scope.row.seqRule === undefined">鏃舵鍙凤紙榛樿锛�</span>
+ <dict-tag v-else :type="DICT_TYPE.ECG_SEQ_RULE" :value="scope.row.seqRule" />
+ </template>
+ </el-table-column>
+ <el-table-column label="搴忓彿鍓嶇紑" align="center" prop="seqPrefix" />
+ <el-table-column label="鍊欒瘖浜烘暟" align="center" prop="readyNum" />
+ <el-table-column label="澶у睆鏄剧ず鍒�" align="center" prop="callingColumn" />
+ <!-- <el-table-column label="鎮h�呮潯鐮�" align="center" prop="displayBarcode" /> -->
+ <el-table-column label="娉ㄦ剰浜嬮」" align="center" prop="notes" />
+ <el-table-column label="鎿嶄綔" align="center" min-width="200px" fixed="right">
+ <template #default="scope">
+ <el-button link type="primary" @click="openForm('update', scope.row.id)"
+ v-hasPermi="['ecg:check-type:update']">
缂栬緫
</el-button>
- <el-button
- link
- type="danger"
- @click="handleDelete(scope.row.id)"
- v-hasPermi="['ecg:check-type:delete']"
- >
+ <el-button link type="primary" @click="openQueueSequenceForm(scope.row)"
+ v-hasPermi="['ecg:check-type:update']">
+ 棰勭害鏃舵
+ </el-button>
+ <el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['ecg:check-type:delete']">
鍒犻櫎
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 鍒嗛〉 -->
- <Pagination
- :total="total"
- v-model:page="queryParams.pageNo"
- v-model:limit="queryParams.pageSize"
- @pagination="getList"
- />
+ <Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
+ @pagination="getList" />
</ContentWrap>
<!-- 琛ㄥ崟寮圭獥锛氭坊鍔�/淇敼 -->
<CheckTypeForm ref="formRef" @success="getList" />
+
+ <!-- 棰勭害鏃舵缁存姢寮圭獥锛氱淮鎶よ妫�鏌ラ」鐩悇鏃舵鐨勫彇鍙疯鍒欙紙澧�/鍒�/鏀癸級 -->
+ <QueueSequenceForm ref="queueSequenceFormRef" />
</template>
<script setup lang="ts">
-import {dateFormatter, dateFormatter2} from '@/utils/formatTime'
+import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download'
import { CheckTypeApi, CheckTypeVO } from '@/api/ecg/checktype'
+import { DICT_TYPE } from '@/utils/dict'
import CheckTypeForm from './CheckTypeForm.vue'
-import {useCheckTypeStore} from "@/store/modules/checkType";
-import {getCheckTypeName} from "../../../utils/checkTypeFormatter";
+import QueueSequenceForm from './QueueSequenceForm.vue'
+import { useCheckTypeStore } from "@/store/modules/checkType";
+import { getCheckTypeName } from "../../../utils/checkTypeFormatter";
-/** 妫�鏌ョ被鍨� 鍒楄〃 */
+/** 妫�鏌ラ」鐩� 鍒楄〃 */
defineOptions({ name: 'CheckType' })
const message = useMessage() // 娑堟伅寮圭獥
const { t } = useI18n() // 鍥介檯鍖�
-
const checkTypeStore = useCheckTypeStore();
-
const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
const list = ref<CheckTypeVO[]>([]) // 鍒楄〃鐨勬暟鎹�
const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
@@ -221,6 +134,29 @@
})
const queryFormRef = ref() // 鎼滅储鐨勮〃鍗�
const exportLoading = ref(false) // 瀵煎嚭鐨勫姞杞戒腑
+
+/** 棰勭害鏃舵缁存姢寮圭獥 */
+const queueSequenceFormRef = ref()
+/** 鎵撳紑銆岄绾︽椂娈点�嶇淮鎶ゅ脊绐楋紙浼犲叆鏁磋锛屼究浜庢樉绀烘鏌ラ」鐩悕绉帮級 */
+const openQueueSequenceForm = (row: CheckTypeVO) => {
+ queueSequenceFormRef.value.open(row)
+}
+
+/**
+ * 闇�姹�9锛氬垪琛ㄥ唴鐩存帴淇敼銆屾帓搴忓簭鍙枫�嶅悗淇濆瓨銆�
+ *
+ * 浠呮彁浜� id 涓� sort 涓や釜瀛楁 鈥斺�� 鍚庣 update 涓恒�屾寜闈炵┖瀛楁鏇存柊銆嶏紝
+ * 鍏朵綑瀛楁浼� null 涓嶄細琚鐩栵紝閬垮厤鎶婃暣琛屾暟鎹洖鍐欓�犳垚鎰忓銆�
+ */
+const handleSortChange = async (row: CheckTypeVO) => {
+ try {
+ await CheckTypeApi.updateCheckType({ id: row.id, sort: row.sort } as CheckTypeVO)
+ message.success('鎺掑簭宸叉洿鏂�')
+ await getList() // 閲嶆柊鎷夊彇锛屼娇鍒楄〃椤哄簭鎸夋柊鐨� sort 鎺掑ソ
+ } catch {
+ await getList() // 澶辫触鏃跺洖婊氭樉绀�
+ }
+}
/** 鏌ヨ鍒楄〃 */
const getList = async () => {
@@ -262,7 +198,7 @@
message.success(t('common.delSuccess'))
// 鍒锋柊鍒楄〃
await getList()
- } catch {}
+ } catch { }
}
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
@@ -273,7 +209,7 @@
// 鍙戣捣瀵煎嚭
exportLoading.value = true
const data = await CheckTypeApi.exportCheckType(queryParams)
- download.excel(data, '妫�鏌ョ被鍨�.xls')
+ download.excel(data, '妫�鏌ラ」鐩�.xls')
} catch {
} finally {
exportLoading.value = false
--
Gitblit v1.9.3