Просмотр исходного кода

备件领用loding&&新需求多选牧场

Shan9312 3 недель назад
Родитель
Сommit
9f9be3fd3e

+ 41 - 6
src/views/custom/outStock/index.vue

@@ -6,10 +6,12 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="备件出库" name="first">
-        <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription" /> -->
+        <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription"  /> -->
         <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription" />
         <div class="filter-container">
-          <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
+          <!-- @change="changePastureName" -->
+          <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" class="filter-item" multiple
+              collapse-tags  collapse-tags-tooltip  >
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
@@ -150,7 +152,8 @@
           <el-select v-model="getdataListParm2.parammaps.providerId" filterable clearable style="width: 140px;" placeholder="供应商" class="filter-item">
             <el-option v-for="item in findAllProvider" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
+          <el-select v-model="getdataListParm2.parammaps.departmentId" style="width: 220px;"  multiple
+        collapse-tags  collapse-tags-tooltip  placeholder="领用部门" class="filter-item" clearable>
             <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <tree-select
@@ -1204,7 +1207,7 @@ export default {
       requestParams: [
         { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
         { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
-        { 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') }},
         { name: 'getDictByName', offset: 0, pagecount: 0, params: ['耗用类别-父'] }
@@ -1469,7 +1472,6 @@ export default {
       that.get_auto_buttons()
     })
     this.get_select_list()
-    this.get_table_data()
     this.getTypeList()
     // 获取订单号
     this.getNumberArr()
@@ -1678,13 +1680,21 @@ export default {
       GetDataByNames(this.requestParams).then(response => {
         this.findAllProvider = response.data.findAllProvider.list
         this.findAllAssetType = response.data.findAllAssetType.list
-        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPasture = response.data.findAllMainPasture.list
         this.findAllEmploye = response.data.findAllEmploye.list
         this.getDictByName = response.data.getDictByName.list
+        this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+        this.getdataListParm2.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+        this.get_table_data()
         this.getDepartDownList()
       })
     },
     getDepartDownList() {
+      this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getDepartParam).then(response => {
         this.findAllDepart = response.data.list
       })
@@ -1727,6 +1737,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 => {
         console.log('table数据', response.data.list)
         this.list = response.data.list
@@ -1758,6 +1781,18 @@ export default {
         this.getdataListParm2.parammaps.startTime = ''
         this.getdataListParm2.parammaps.stopTime = ''
       }
+
+        if (this.getdataListParm2.parammaps.pastureArr && this.getdataListParm2.parammaps.pastureArr.length > 0) {
+        const arr2 = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm2.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids2 = arr2.map((child) => { return child.id })
+        console.log(arr2,ids2,'999999')
+        this.getdataListParm2.parammaps.pastureId = ids2.toString();
+     }
+
       GetDataByName(this.getdataListParm2).then(response => {
         this.list2 = response.data.list
         this.pageNum2 = response.data.pageNum

Разница между файлами не показана из-за своего большого размера
+ 0 - 2457
src/views/custom/storage/index.vue


+ 29 - 7
src/views/custom/subscribe/index.vue

@@ -22,12 +22,15 @@
       />
     </div>
     <div class="filter-container">
+         <!-- @change="changePastureName" -->
       <el-select
-        v-model="getdataListParm.parammaps.pastureName"
-        style="width: 140px"
+        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"
@@ -2567,7 +2570,7 @@ export default {
       requestParams: [
         { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
         {
-          name: 'findAllPasture',
+          name: 'findAllMainPasture',
           offset: 0,
           pagecount: 0,
           returntype: 'Map',
@@ -2621,13 +2624,14 @@ export default {
       ],
       radioAll: '全部',
       getdataListParm: {
-        name: 'getpartpurchaseList',
+        name:'getpartpurchaseList' , // 'getpartpurchaseList',
         page: 1,
         offset: 1,
         pagecount: 10,
         returntype: 'Map',
         parammaps: {
           pastureName: Cookies.get('pasturename'),
+          pastureArr:[],
           empId: Cookies.get('employeid'),
           orderNumber: '',
           stuteSH: '',
@@ -2789,7 +2793,7 @@ export default {
       that.get_auto_buttons()
     })
     this.get_select_list()
-    this.get_table_data()
+    // this.get_table_data()
     this.getPendingList()
     this.getProviderList()
   },
@@ -2962,6 +2966,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)
@@ -5616,13 +5633,18 @@ export default {
     get_select_list() {
       GetDataByNames(this.requestParams).then((response) => {
         this.findAllProvider = response.data.findAllProvider.list
-        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPasture = response.data.findAllMainPasture.list
         this.findAllEmploye = response.data.findAllEmploye.list
         this.onlineSubscriptionList = response.data.getflexProviderList.list
+        this.getdataListParm.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
         this.getDepartDownList()
+        this.get_table_data()
       })
     },
     getDepartDownList() {
+      this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getDepartParam).then((response) => {
         this.findAllDepart = response.data.list
       })

+ 22 - 21
src/views/maintenance/maintain/index.vue

@@ -422,7 +422,7 @@
                   </template>
                 </el-table-column>
               </el-table>
-             
+
               <el-form
                 ref="seeTemp"
                 :rules="rules"
@@ -468,11 +468,11 @@
                       </el-upload>
                     </el-form-item>
                      </el-col>
-                  <!-- <el-col :span="24" style="margin-left:120px;"> 
+                  <!-- <el-col :span="24" style="margin-left:120px;">
                     <el-button type="primary" plain @click="handleSaveImg">确认上传图片</el-button>
                   </el-col> -->
                 </el-row>
-             
+
                </div>
                 <el-row>
                   <el-col>
@@ -639,7 +639,7 @@
           </el-tabs>
         </div>
 
-      
+
       </div>
       <div slot="footer" class="dialog-footer" style="bottom:5px;">
         <el-button @click="close_diago()">关闭</el-button>
@@ -1009,7 +1009,7 @@ export default {
       dialogVisibleImg: false,
       // width:'40%',
 
-     
+
       myHeight: document.documentElement.clientHeight - 85- 250,
       active: 0,
       activeList: [],
@@ -1098,7 +1098,7 @@ export default {
         parammaps: {}
       },
       collarUseTemp: {
-   
+
       },
       // 查看-领用记录table
       getCollarUseListParm: {
@@ -1240,7 +1240,7 @@ export default {
     this.getPendingList()
   },
   methods: {
-  
+
     onLoad(e) {
       const img = e.target
       let width = 0
@@ -1261,7 +1261,7 @@ export default {
 
       console.log(data, '图片确认发布到保养中')
     },
-  
+
     handlePicChange(file, fileList) {
       //  this.handlePicSuccess()
       // console.log(this.seeTemp)
@@ -1270,7 +1270,7 @@ export default {
       console.log('文件上传成功时的钩子response', response, )
       console.log('文件上传成功时的钩子file', file)
       console.log('fileList', fileList)
-  
+
       //3张图片时,关闭新增的按钮
       if (fileList.length == 3) {
         document.getElementById('uploadPic').lastChild.style.display = "none"
@@ -1296,7 +1296,7 @@ export default {
     handlePicRemove(file, fileList) {
       console.log(file, '文件列表移除文件时的钩子file---')
       console.log(fileList, '文件列表移除文件时的钩子fileList--')
-    
+
       this.seeTemp.scenePhoto1 = '-1';
       this.seeTemp.scenePhoto2 = '-1';
       this.seeTemp.scenePhoto3 = '-1';
@@ -1310,7 +1310,7 @@ export default {
         this.seeTemp.scenePhoto2 = (fileList[1].response && fileList[1].response.execresult.LastInsertId.toString()) || fileList[1].imgId
       } else if (fileList.length == 1) {
         this.seeTemp.scenePhoto1 = (fileList[0].response && fileList[0].response.execresult.LastInsertId.toString()) || fileList[0].imgId
-      } 
+      }
 
       //3张图片时,关闭新增的按钮
        if (fileList.length == 3) {
@@ -1328,7 +1328,7 @@ export default {
       this.dialogImageUrl = file.url
       this.dialogVisibleImg = true
     },
-  
+
     // handleCheck(row) {
     //   this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
     //   this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
@@ -1569,7 +1569,7 @@ export default {
         if( row.picId1 !== '-1' && row.picId1 !== '') {
           this.seeTemp.scenePhoto1 = row.picId1
           this.$set(this.fileList, 0, { name: "picImg1", url: process.env.VUE_APP_BASE_API + row.picpath1 , imgId : row.picId1 }
-          ) 
+          )
         }
          if( row.picId2 !== '-1' && row.picId2 !== '') {
           this.seeTemp.scenePhoto2 = row.picId2
@@ -1580,8 +1580,8 @@ export default {
           this.seeTemp.scenePhoto3 = row.picId3
           this.$set(this.fileList, 2, { name: "picImg3", url: process.env.VUE_APP_BASE_API + row.picpath3, imgId : row.picId3 }
           )
-        }  
-        
+        }
+
         console.log('查看-------图片2', this.fileList)
       // 流程图
       var reason = '未通过原因:' + this.seeTemp.workflowNote
@@ -1630,7 +1630,7 @@ export default {
       this.collarUseTemp = {}
       this.listCollarUse = []
       this.getCollarUse()
-      this.getOldProductsList()     
+      this.getOldProductsList()
 
       this.$nextTick(()=>{
         if(this.seeTemp.SHStatue !== 2 ||  this.fileList.length >= 3){
@@ -1676,6 +1676,7 @@ export default {
       this.getCollarUseListParm.parammaps.id = this.collarUseTemp ? this.collarUseTemp.id : ''
       this.listLoadingCollarUse = true
       if( this.getCollarUseListParm.parammaps.id == ''){
+          this.listLoadingCollarUse = false;
           return
         } else {
           GetDataByName(this.getCollarUseListParm).then(response => {
@@ -2121,7 +2122,7 @@ export default {
                     this.dialogFormVisible_See = false
                     this.get_table_data()
                     this.getPendingList()
-                   
+
                     this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
                   }
                 })
@@ -2145,7 +2146,7 @@ export default {
     // 保养审核
     handleExamine(row) {
       console.log('点击了保养审核', row, this.seeTemp, this.fileList)
-     
+
       if (row == undefined) {
         console.log('里面审核')
         this.examineTemp = this.seeTemp
@@ -2224,7 +2225,7 @@ export default {
     // 保养审核2
     handleExamine2(row) {
       console.log('点击了保养审核------99')
-    
+
       if (row == undefined) {
         this.examineTemp = this.seeTemp
         this.$set(this.seeTemp, 'isStatue', 3)
@@ -2233,7 +2234,7 @@ export default {
         this.examineTemp = Object.assign({}, row)
         this.$set(this.examineTemp, 'isStatue', 3)
         this.$set(this.examineTemp, 'workflowNote', '')
-       
+
       }
       this.dialogStatus = 'examine2'
       this.dialogFormVisible_examine = true
@@ -2405,7 +2406,7 @@ export default {
     z-index: 1;
   }
 </style>
-<style lang="scss" scoped>  
+<style lang="scss" scoped>
 ::v-deep .child-dialog{
  z-index: 3000 !important; /* 手动提升 z-index 层级 */
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов