-
-
-
+
+
+
+
+ {{ item.label }}
+
+
+
@@ -345,6 +360,7 @@
import { searchEarNumbers } from '@/api/common/sheep'
import request from '@/utils/request'
import { parseTime } from '@/utils/ruoyi'
+ import { getUserByPost } from '@/api/common/user'
const { proxy } = getCurrentInstance()
const { sheep_gender } = proxy.useDict('sheep_gender')
@@ -355,6 +371,8 @@
const total = ref(0)
const dewormList = ref([])
const daterangeDatetime = ref([])
+ const technicalOptions = ref([])
+
const queryParams = reactive({
pageNum: 1,
@@ -729,6 +747,27 @@
function handleAddDetail() {
usageDetails.value.push({ mediId: null, dosage: 0, unit: null, usageId: null,manufacturer:null,batchNumber:null })
}
+ // 获取技术员列表
+ const fetchTechnicalList = () => {
+ getUserByPost({ postCode: "techs" })
+ .then(res => {
+ if (res.code === 200 && Array.isArray(res.data)) {
+ technicalOptions.value = res.data.map(item => ({
+ // value: item.userId,
+ value: item.nickName,
+ label: item.nickName,
+ // postName: item.postName, // 保留用于下拉显示
+ // postCode: item.postCode // 保留用于逻辑判断
+ }))
+ console.log(technicalOptions.value);
+
+ } else {
+ technicalOptions.value = []
+ ElMessage.warning(res.msg || '获取技术员列表失败')
+ }
+ })
+
+ }
/* ------------------ 初始化 ------------------ */
onMounted(() => {
@@ -747,6 +786,8 @@
listMedicine().then(res => {
medicines.value = res.rows.map(item => ({ value: item.id, label: item.name }))
})
+ fetchTechnicalList()
+
})