12
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="班组" prop="group">
|
||||
<el-select v-model="queryParams.group" filterable placeholder="请选择班组" @change="chouseGroup">
|
||||
<el-option v-for="item in groupOptions" :key="item.id" :label="`${item.groupCode}-${item.groupName}`" :value="item.id" />
|
||||
<el-option v-for="item in groupOptions" :key="item.id" :label="`${item.groupCode}-${item.groupName}`" :value="item.groupCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="线别" prop="route">
|
||||
@@ -101,7 +101,7 @@ function resetQuery() {
|
||||
//班组查询
|
||||
const persionIds = ref([])
|
||||
function chouseGroup(val) {
|
||||
GetPersonsList({ group_schedule_id: val }).then((res) => {
|
||||
GetPersonsList({ group_code: val }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
const _persionIds = res.data
|
||||
persionIds.value = _persionIds.map((item) => {
|
||||
|
||||
@@ -212,6 +212,7 @@ const { proxy } = getCurrentInstance()
|
||||
const groupOptions = ref([])
|
||||
function getGroupOptionsDict() {
|
||||
getGroupOptions().then((res) => {
|
||||
|
||||
groupOptions.value = res.data.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
@@ -219,6 +220,7 @@ function getGroupOptionsDict() {
|
||||
value: item.groupCode
|
||||
}
|
||||
})
|
||||
console.log(groupOptions.value)
|
||||
})
|
||||
}
|
||||
getGroupOptionsDict()
|
||||
@@ -383,20 +385,26 @@ function handleBindGroup() {
|
||||
// 已绑定人员
|
||||
const bindPersionShow = ref(false)
|
||||
const selectGroupScheduleId = ref('')
|
||||
const ChouseRowGroupCode = ref('')
|
||||
function handleBindPersion(row) {
|
||||
ChouseRowGroupCode.value = row.groupCode
|
||||
selectGroupScheduleId.value = row.id
|
||||
persionBindDataList.value = []
|
||||
getBindPersionList()
|
||||
routeId.value = row.fkBelongRouteCode
|
||||
persionBindDataList.value = []
|
||||
getBindPersionList(row)
|
||||
bindPersionShow.value = true
|
||||
}
|
||||
const persionBindLoading = ref(false)
|
||||
const persionBindDataList = ref([])
|
||||
const bindPersionTotal = ref(0)
|
||||
const queryBindPersionParams = ref({ pageNum: 1, pageSize: 10, status: 1 })
|
||||
function getBindPersionList() {
|
||||
function getBindPersionList(row) {
|
||||
persionBindLoading.value = true
|
||||
SearchPersonBindGroup({ group_schedule_id: selectGroupScheduleId.value }).then((res) => {
|
||||
const parmas = {
|
||||
schedule_date: proxy.$dayjs(selectDate.value).format('YYYY-MM-DD hh:mm:ss'),
|
||||
group_code:ChouseRowGroupCode.value
|
||||
}
|
||||
SearchPersonBindGroup(parmas).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
// persionBindDataList.value = data.result
|
||||
@@ -411,6 +419,8 @@ function getBindPersionList() {
|
||||
function handlePersionDelete(row) {
|
||||
// 解绑
|
||||
const parms = {
|
||||
schedule_date: proxy.$dayjs(selectDate.value).format('YYYY-MM-DD hh:mm:ss'),
|
||||
group_code:ChouseRowGroupCode.value,
|
||||
group_schedule_id: selectGroupScheduleId.value,
|
||||
person_id: row.id
|
||||
}
|
||||
@@ -436,7 +446,8 @@ function addBindPersion() {
|
||||
}
|
||||
function getNotBindPersionList() {
|
||||
persionNotBindLoading.value = true
|
||||
queryNotBindPersionParams.value.group_schedule_id = selectGroupScheduleId.value
|
||||
queryNotBindPersionParams.value.group_code = ChouseRowGroupCode.value
|
||||
queryNotBindPersionParams.value.schedule_date = proxy.$dayjs(selectDate.value).format('YYYY-MM-DD hh:mm:ss')
|
||||
SearchPersonNotBindGroup(queryNotBindPersionParams.value).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
@@ -458,6 +469,8 @@ function resetNotBindPersionParamsQuery() {
|
||||
}
|
||||
function handleGroupAddPersion(row) {
|
||||
const parms = {
|
||||
schedule_date:proxy.$dayjs(selectDate.value).format('YYYY-MM-DD hh:mm:ss'),
|
||||
group_code:ChouseRowGroupCode.value,
|
||||
group_schedule_id: selectGroupScheduleId.value,
|
||||
person_id: row.id
|
||||
}
|
||||
|
||||
@@ -52,11 +52,11 @@ const total = ref(0)
|
||||
const loading = ref(false)
|
||||
function getTableList() {
|
||||
loading.value = true
|
||||
if (props.PersonList.length === 0) {
|
||||
proxy.$message.error('人员列表为空')
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
// if (props.PersonList.length === 0) {
|
||||
// proxy.$message.error('人员列表为空')
|
||||
// loading.value = false
|
||||
// return
|
||||
// }
|
||||
if (props.RouteId.length === 0) {
|
||||
proxy.$message.error('产线数据为空')
|
||||
loading.value = false
|
||||
|
||||
Reference in New Issue
Block a user