perf(feed): 技术员输入方式更变为下拉选择列表
所有页面技术员输入方式更变为下拉选择列表 修复文件引用名称问题 perf(feed): 技术员输入方式更变为下拉选择列表 所有页面技术员输入方式更变为下拉选择列表 修复文件引用名称问题
This commit is contained in:
@@ -72,8 +72,16 @@
|
|||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body
|
||||||
v-if="openModel === 'add' || openModel === 'edit'">
|
v-if="openModel === 'add' || openModel === 'edit'">
|
||||||
<el-form ref="FeedListRef" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="FeedListRef" :model="form" :rules="rules" label-width="100px">
|
||||||
<el-form-item label="饲草班人员" prop="zookeeper">
|
<!-- <el-form-item label="饲草班人员" prop="zookeeper">
|
||||||
<el-input v-model="form.zookeeper" placeholder="请输入饲草班人员名称" />
|
<el-input v-model="form.zookeeper" placeholder="请输入饲草班人员名称" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="技术员">
|
||||||
|
<el-select v-model="form.zookeeper" filterable clearable placeholder="请输入饲草班人员姓名" style="width: 100%"
|
||||||
|
@change="handleTechnicalChange">
|
||||||
|
<el-option v-for="item in technicalOptions" :key="item.value" :label="item.label" :value="item.value">
|
||||||
|
<span style="float: left">{{ item.label }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="配料日期" prop="deployDate">
|
<!-- <el-form-item label="配料日期" prop="deployDate">
|
||||||
<el-date-picker clearable v-model="form.deployDate" type="date" value-format="YYYY-MM-DD"
|
<el-date-picker clearable v-model="form.deployDate" type="date" value-format="YYYY-MM-DD"
|
||||||
@@ -143,7 +151,7 @@
|
|||||||
|
|
||||||
<script setup name="FeedList">
|
<script setup name="FeedList">
|
||||||
import { listFeedList, getFeedList, delFeedList, addFeedList, updateFeedList } from "@/api/feed/FeedList"
|
import { listFeedList, getFeedList, delFeedList, addFeedList, updateFeedList } from "@/api/feed/FeedList"
|
||||||
|
import { getUserByPost } from '@/api/common/user'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const FeedListList = ref([])
|
const FeedListList = ref([])
|
||||||
@@ -295,5 +303,32 @@
|
|||||||
}, `FeedList_${new Date().getTime()}.xlsx`)
|
}, `FeedList_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|
||||||
|
// 获取技术员列表
|
||||||
|
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(() => {
|
||||||
|
fetchTechnicalList() //在onMounted()函数中调用获取技术员列表的函数
|
||||||
|
})
|
||||||
getList()
|
getList()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -135,8 +135,17 @@
|
|||||||
<el-input v-model="form.ratioAfternoon" placeholder="下午比例" style="width: 100px;" />
|
<el-input v-model="form.ratioAfternoon" placeholder="下午比例" style="width: 100px;" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="饲草班人员" prop="Zookeeper">
|
<!-- <el-form-item label="饲草班人员" prop="Zookeeper">
|
||||||
<el-input v-model="form.zookeeper" placeholder="请输入饲草班人员" />
|
<el-input v-model="form.zookeeper" placeholder="请输入饲草班人员" />
|
||||||
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<el-form-item label="技术员">
|
||||||
|
<el-select v-model="form.zookeeper" filterable clearable placeholder="请输入技术员姓名" style="width: 100%"
|
||||||
|
@change="handleTechnicalChange">
|
||||||
|
<el-option v-for="item in technicalOptions" :key="item.value" :label="item.label" :value="item.value">
|
||||||
|
<span style="float: left">{{ item.label }}</span>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划日期" prop="planDate">
|
<el-form-item label="计划日期" prop="planDate">
|
||||||
<el-date-picker clearable v-model="form.planDate" type="date" value-format="YYYY-MM-DD"
|
<el-date-picker clearable v-model="form.planDate" type="date" value-format="YYYY-MM-DD"
|
||||||
@@ -168,7 +177,7 @@
|
|||||||
import { listFeedPlan, getFeedPlan, delFeedPlan, addFeedPlan, updateFeedPlan } from "@/api/feed/FeedPlan"
|
import { listFeedPlan, getFeedPlan, delFeedPlan, addFeedPlan, updateFeedPlan } from "@/api/feed/FeedPlan"
|
||||||
import { listFormulaManagement } from "@/api/feed/FormulaManagement";
|
import { listFormulaManagement } from "@/api/feed/FormulaManagement";
|
||||||
import { listSheepfold } from "@/api/produce/manage_sheep/trans_group.js";
|
import { listSheepfold } from "@/api/produce/manage_sheep/trans_group.js";
|
||||||
import { get } from "@vueuse/core";
|
import { getUserByPost } from '@/api/common/user'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const FeedPlanList = ref([])
|
const FeedPlanList = ref([])
|
||||||
@@ -416,6 +425,35 @@
|
|||||||
}, `FeedPlan_${new Date().getTime()}.xlsx`)
|
}, `FeedPlan_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const technicalOptions = ref([]) //自定义技术员数组变量
|
||||||
|
|
||||||
|
// 获取技术员列表
|
||||||
|
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(() => {
|
||||||
|
fetchTechnicalList() //在onMounted()函数中调用获取技术员列表的函数
|
||||||
|
})
|
||||||
getList()
|
getList()
|
||||||
// 获取配方编码字典
|
// 获取配方编码字典
|
||||||
getFormulaDict()
|
getFormulaDict()
|
||||||
|
|||||||
@@ -201,7 +201,7 @@
|
|||||||
import { listFeedStatistic, getFeedStatistic, delFeedStatistic, addFeedStatistic, updateFeedStatistic, initFeedStatistic } from "@/api/feed/FeedStatistic"
|
import { listFeedStatistic, getFeedStatistic, delFeedStatistic, addFeedStatistic, updateFeedStatistic, initFeedStatistic } from "@/api/feed/FeedStatistic"
|
||||||
import { listFormulaManagement } from "@/api/feed/FormulaManagement"
|
import { listFormulaManagement } from "@/api/feed/FormulaManagement"
|
||||||
import { listSheepfold } from "@/api/produce/manage_sheep/trans_group.js";
|
import { listSheepfold } from "@/api/produce/manage_sheep/trans_group.js";
|
||||||
import { listMaterial } from "@/api/feed/Material"
|
import { listMaterial } from "@/api/feed/material"
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|||||||
@@ -282,7 +282,7 @@
|
|||||||
import { listFormulaManagement, getFormulaManagement, delFormulaManagement, addFormulaManagement, updateFormulaManagement } from "@/api/feed/FormulaManagement"
|
import { listFormulaManagement, getFormulaManagement, delFormulaManagement, addFormulaManagement, updateFormulaManagement } from "@/api/feed/FormulaManagement"
|
||||||
import { ref, reactive, toRefs, getCurrentInstance } from 'vue'
|
import { ref, reactive, toRefs, getCurrentInstance } from 'vue'
|
||||||
import { listFormulaList, getFormulaList, delFormulaList, addFormulaList, updateFormulaList } from "@/api/feed/FormulaList"
|
import { listFormulaList, getFormulaList, delFormulaList, addFormulaList, updateFormulaList } from "@/api/feed/FormulaList"
|
||||||
import { listMaterial } from "@/api/feed/Material"
|
import { listMaterial } from "@/api/feed/material"
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { pres_status } = proxy.useDict('pres_status')
|
const { pres_status } = proxy.useDict('pres_status')
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Material">
|
<script setup name="Material">
|
||||||
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from "@/api/feed/Material"
|
import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from "@/api/feed/material"
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { material_type } = proxy.useDict('material_type')
|
const { material_type } = proxy.useDict('material_type')
|
||||||
|
|||||||
Reference in New Issue
Block a user