|
@@ -5,7 +5,8 @@
|
|
|
<el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
|
|
|
</div>
|
|
|
<div class="filter-container">
|
|
|
- <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
|
|
|
+ <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" multiple
|
|
|
+ collapse-tags collapse-tags-tooltip class="filter-item" @change="changePastureName">
|
|
|
<el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
|
|
|
</el-select>
|
|
|
<el-input v-model="getdataListParm.parammaps.applyCode" clearable placeholder="领用单号" style="width: 200px;" class="filter-item" />
|
|
@@ -548,7 +549,7 @@ export default {
|
|
|
myHeight:document.documentElement.clientHeight - 85- 250,
|
|
|
findAllPasture: [], findAllDepart: [], findAllEmploye: [], createDepartList: [], edit: 0,
|
|
|
requestParams: [
|
|
|
- { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
|
|
|
+ { name: 'findAllMainPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
|
|
|
{ name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
|
|
|
{ name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }}
|
|
|
],
|
|
@@ -575,7 +576,7 @@ export default {
|
|
|
radioAll: '全部',
|
|
|
getdataListParm: {
|
|
|
name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
|
|
|
- parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
|
|
|
+ parammaps: { pastureName: Cookies.get('pasturename'), applyCode: this.$route.query.applyCode, applyType: '', pastureArr:[], statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', loginId: Cookies.get('employeid'), menu: 'Receive', logindeptId: Cookies.get('departmentid'), loginpastureId: Cookies.get('pastureid') }
|
|
|
},
|
|
|
tableKey: 0,
|
|
|
listLoading: true,
|
|
@@ -770,6 +771,19 @@ export default {
|
|
|
this.getdataListParm.parammaps.startTime = ''
|
|
|
this.getdataListParm.parammaps.stopTime = ''
|
|
|
}
|
|
|
+
|
|
|
+ // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
|
|
|
+ if (this.getdataListParm.parammaps.pastureArr && this.getdataListParm.parammaps.pastureArr.length > 0) {
|
|
|
+ const arr = this.findAllPasture.filter((item) => {
|
|
|
+ if (this.getdataListParm.parammaps.pastureArr.includes(item.name)) {
|
|
|
+ return item
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const ids = arr.map((child) => { return child.id })
|
|
|
+ console.log(arr,ids,'999999')
|
|
|
+ this.getdataListParm.parammaps.pastureId = ids.toString();
|
|
|
+ }
|
|
|
+
|
|
|
GetDataByName(this.getdataListParm).then(response => {
|
|
|
if (response.data.list !== null) {
|
|
|
console.log('table数据', response.data.list)
|
|
@@ -1318,8 +1332,11 @@ export default {
|
|
|
},
|
|
|
get_select_list() {
|
|
|
GetDataByNames(this.requestParams).then(response => {
|
|
|
- this.findAllPasture = response.data.findAllPasture.list
|
|
|
+ this.findAllPasture = response.data.findAllMainPasture.list
|
|
|
this.findAllEmploye = response.data.findAllEmploye.list
|
|
|
+ this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
|
|
|
+ return item.name
|
|
|
+ })
|
|
|
this.getDepartDownList()
|
|
|
})
|
|
|
},
|