소스 검색

分支合并线上最新代码-冲突

Shan9312 1 주 전
부모
커밋
bdd67bc31a

+ 5 - 4
.env.development

@@ -5,14 +5,15 @@ ENV = 'development'
 # VUE_APP_BASE_API = '/dev-api'
 # 线上正式地址
 #  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
-#  白少后台本地
-# 白少后台本地
-# VUE_APP_BASE_API = 'http://192.168.1.56:8082/'
+
+
 
 
 # 线上测试
 VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
-# VUE_APP_BASE_API = 'http://10.0.11.163:8082/'
+
+# 白少后台本地
+# VUE_APP_BASE_API = 'http://192.168.1.233:8082/'
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 

BIN
dist-测试-现代-1101.zip


BIN
dist-测试-现代-1102.zip


BIN
dist-测试-现代牧业-1029.zip


BIN
dist-测试.zip


BIN
dist-现代-正式-20241112.zip


BIN
dist-现代-测试-1111.zip


BIN
dist-现代-测试-2-1111.zip


BIN
dist-现代-测试-20241105.zip


BIN
dist-现代牧业-正式-20241111.zip


BIN
dist.zip


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
dist/index.html


+ 19 - 1
src/api/common.js

@@ -381,4 +381,22 @@ export function saveImgIds(data) {
     method: 'post',
     data
   })
-}
+}
+
+// 主牧场修改
+export function editMainPasture(data) {
+  return request({
+    url: '/authdata/mainpasture/edit',
+    method: 'post',
+    data
+  })
+}
+
+// 查询主牧场
+export function getMainPastur(data) {
+  return request({
+    url: '/authdata/mainpasture/list',
+    method: 'get',
+    params: data
+  })
+}

+ 1 - 1
src/permission.js

@@ -7,7 +7,7 @@ import { getToken, removeToken } from '@/utils/auth' // get token from cookie
 import Cookies from 'js-cookie'
 import getPageTitle from '@/utils/get-page-title'
 // 1为单点登录,其他不是
-Cookies.set('sso', 0)
+Cookies.set('sso', 1)
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 
 const whiteList = ['/login'] // no redirect whitelist

+ 6 - 6
src/router/index.js

@@ -68,14 +68,14 @@ export const constantRoutes = [
   },
 
   // {
-  //   path: '/spotCheck',
+  //   path: '/ranchAccompany',
   //   component: Layout,
-  //   redirect: '/spotCheck',
+  //   redirect: '/ranchAccompany',
   //   children: [{
-  //     path: 'spotCheck',
-  //     name: 'spotCheck',
-  //     component: () => import('@/views/report/spotCheck/index.vue'),
-  //     meta: { title: '点检率', icon: '', affix: true }
+  //     path: 'ranchAccompany',
+  //     name: 'ranchAccompany',
+  //     component: () => import('@/views/basic/ranchAccompany/index.vue'),
+  //     meta: { title: '主牧场配置', icon: '', affix: true }
   //   }]
   // }
 

+ 1 - 0
src/store/getters.js

@@ -6,6 +6,7 @@ const getters = {
   name: state => state.user.name,
   roles: state => state.user.roles,
   buttons: state => state.user.buttons,
+  mainpasture: state => state.user.mainpasture,
   pastureid: state => state.user.pastureid,
   pasturename: state => state.user.pasturename,
   pasturenumber: state => state.user.pasturenumber,

+ 9 - 1
src/store/modules/user.js

@@ -10,6 +10,7 @@ const state = {
   name: '',
   avatar: '',
   pastureid: '',
+  mainpasture:'',
   pasturename: '',
   pasturenumber: '',
   employename: '',
@@ -42,6 +43,10 @@ const mutations = {
     Cookies.set('pastureid', pastureid)
     state.pastureid = pastureid
   },
+  SET_MAINPASTURE: (state, mainpasture) => {
+    Cookies.set('mainpasture', mainpasture)
+    state.mainpasture = mainpasture
+  },
   SET_PASTURENAME: (state, pasturename) => {
     Cookies.set('pasturename', pasturename)
     state.pasturename = pasturename
@@ -173,6 +178,7 @@ const actions = {
               Cookies.remove('employename')
               Cookies.remove('employeid')
               Cookies.remove('pastureid')
+              Cookies.remove('mainpasture')
               removeToken()
               resetRouter()
               resolve()
@@ -202,7 +208,9 @@ const actions = {
 
         GetDataByName({ 'name': 'findByUserPastureName', 'parammaps': { 'jwt_username': username }}).then(response => {
           if (response.data.list.length > 0) {
+            console.log(response.data.list[0],'99999999====')
             commit('SET_PASTUREID', response.data.list[0].pastureId)
+            commit('SET_MAINPASTURE', response.data.list[0].mainpasture)
             commit('SET_PASTURENAME', response.data.list[0].pastureName)
             commit('SET_PASTURENUMBER', response.data.list[0].pastureNumber)
             commit('SET_EMPLOYEID', response.data.list[0].employeId)
@@ -212,7 +220,7 @@ const actions = {
             commit('SET_DEPIDS', response.data.list[0].depIds)
             Cookies.set('gempid', response.data.list[0].employeId)
             Cookies.set('gdepartmentname', response.data.list[0].departmentName)
-
+            Cookies.set('mainpasture', response.data.list[0].mainpasture)
             Cookies.set('gshebquanx','0')
             // 接口判断是不是设备主管权限
             GetDataByName({ 'name': 'getIsDirectorOfEquipment', 'parammaps': { 'empId': response.data.list[0].employeId }}).then(response => {

+ 3 - 9
src/views/asset/basics/index.vue

@@ -1187,7 +1187,7 @@
                   ref="license"
                   v-model="createTemp.license"
                   placeholder="物联网编码"
-                  :disabled="dialogStatus == 'update' && isEditWork"
+
                 />
               </el-form-item>
             </el-col>
@@ -1199,25 +1199,19 @@
                   ref="duration"
                   v-model="createTemp.duration"
                   placeholder="标准工作时长"
-                  :disabled="dialogStatus == 'update' && isEditWork"
+
                 />
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="工作类别" prop="work">
-                <!-- <el-input
-                  ref="duration"
-                  v-model="createTemp.work"
-                  placeholder="工作类别"
-                  :disabled="dialogStatus == 'update' && isEditWork"
-                /> -->
+
                 <el-select
                   v-model="createTemp.work"
                   clearable
                   placeholder="工作类别"
                   class="filter-item"
                   style="width: 120px"
-                  :disabled="dialogStatus == 'update' && isEditWork"
                 >
                   <!-- TODO: -->
                   <el-option

+ 472 - 0
src/views/basic/ranchAccompany/index.vue

@@ -0,0 +1,472 @@
+<template>
+  <div class="app-container">
+    <div class="app-container">
+      <div class="filter-container">
+        <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="form_add"> 新增 </el-button>
+      </div>
+      <el-table
+        v-loading="listLoading"
+        element-loading-text="给我一点时间"
+        :data="list"
+        border
+        fit
+        highlight-current-row
+        style="width: 100%;"
+        :row-style="rowStyle"
+        :cell-style="cellStyle"
+        class="elTable"
+        row-key="id"
+        :tree-props="{children: 'list'}"
+        :max-height="myHeight"
+      >
+        <el-table-column label="序号" type="index" width="50" />
+        <el-table-column label="牧场名称" header-align="center" min-width="150px">
+          <template slot-scope="scope">
+            <span>{{ scope.row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="牧场编号" header-align="center" min-width="110px">
+          <template slot-scope="scope">
+            <span>{{ scope.row.pastureNumber }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="说明" min-width="150px" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.remark }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" align="center" width="260" class-name="small-padding fixed-width" fixed="right">
+          <template slot-scope="{row}">
+            <el-button type="primary" size="mini" @click="form_edit(row,1)"> 编辑 </el-button>
+            <el-button v-if="row.status!='已删'" size="mini" type="danger" @click="form_edit(row,2)"> 删除 </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
+        <el-form ref="dataForm" :rules="rules" :model="deptform" label-position="left" label-width="100px" style="width: 50%; margin-left:50px;">
+          <el-form-item  label="上级层级:" prop="mainPastrue">
+            <tree-select
+              :disabled="disabled"
+              :height="300"
+              :width="300"
+              size="small"
+              :data="parentDept"
+              :default-props="defaultProps"
+              :node-key="nodeKey"
+              :checked-keys="defaultCheckedKeys"
+              @popoverHide="popoverHide"
+              :clearable="true"
+            />
+          </el-form-item>
+          <el-form-item label="牧场名称:" prop="pastureId"  >
+            <el-select v-model="deptform.pastureId" placeholder="牧场:"  @change="getCode" >
+              <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+            </el-select>
+          </el-form-item>
+          <!-- <el-form-item label="牧场名称:" prop="pastureId" v-else >
+            <el-input
+              ref="pastureNumber"
+              v-model="deptform.pastureName"
+              placeholder="牧场名称"
+              disabled
+            />
+          </el-form-item> -->
+          <el-form-item label="牧场编号:" prop="pastureNumber">
+            <el-input
+              ref="pastureNumber"
+              v-model="deptform.pastureNumber"
+              placeholder="自动填入编号"
+              disabled
+            />
+          </el-form-item>
+
+
+          <el-form-item label="说明: " prop="remark">
+            <el-input
+              ref="remark"
+              v-model="deptform.remark"
+              :autosize="{ minRows: 2, maxRows: 4}"
+              type="textarea"
+              placeholder="请输入"
+            />
+          </el-form-item>
+
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <!-- <el-button v-if="dialogStatus==='create'" ref="createb" type="success" @click="add_dialog_save_again()"> 确认新增 </el-button> -->
+          <el-button type="primary" @click="form_addConfirm('提交成功')"> 确认提交 </el-button>
+          <el-button @click="dialogFormVisible = false;get_table_data()"> 关闭 </el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import TreeSelect from '@/components/TreeSelect'
+import waves from '@/directive/waves' // waves directive
+import { isIntegerZero } from '@/utils/validate'
+import { PostDataByName, editMainPasture,getMainPastur, GetDataByName, transData, failproccess ,GetDataByNames} from '@/api/common'
+import { MessageBox } from 'element-ui'
+import Cookies from 'js-cookie'
+
+export default {
+  name: 'Dept',
+  components: { TreeSelect },
+  directives: { waves },
+  data() {
+    return {
+      myHeight:document.documentElement.clientHeight - 85- 150,
+      disabled: false,
+      tableKey: 0,
+      list: [],
+      findAllPasture: [],
+      parentDept: [],
+      listLoading: true,
+      requestParam: {
+        name: 'createdept'
+      },
+      requestParamDel: {},
+      deptform: {
+        remark: '',
+        mainPastrue: '',
+        isMain:"",
+        pastureId:""
+      },
+     requestParams: [{ name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {'id': Cookies.get('pastureid') }},
+      ],
+     requestParams1: [{ name: 'getPastureIsMain', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {  }},
+    ],
+      getDeptListParm: { name: 'getdeptlistrecu',
+        idname: 'id',
+        params: [-1] },
+      getDeptParm: { name: 'getdeptrecu',
+        idname: 'value',
+        params: [-1] },
+      getDepartListParm: { name: 'getalldeptname' },
+      rules: {
+        pastureName: [{  required: true, message: '牧场名称必填', trigger: 'blur' }],
+        mainPastrue: [{ required: true, message: '上层级名称必填', trigger: 'blur' }]
+      },
+      dialogFormVisible: false,
+      parentDeptVisible: true,
+      dialogStatus: '',
+      textMap: {
+        update: '编辑',
+        create: '新增'
+      },
+      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+      cellStyle: { padding: 0 + 'px' },
+      defaultProps: {
+        children: 'list',
+        label: 'name'
+      },
+      nodeKey: 'id',
+      defaultCheckedKeys: [],
+      type: '',
+      mainPastrue:[]
+    }
+  },
+  created() {
+    this.get_table_data()
+    this.get_select_list()
+
+  },
+  methods: {
+    // 编号
+    getCode(val) {
+      const obj = this.findAllPasture.find((item) => { return item.id == val })
+      console.log(obj,'obj')
+      this.deptform.pastureNumber = obj.pastureNumber;
+      this.deptform.pastureName = obj.name;
+      // this.dataform.pastureId = obj.id;
+    },
+    // 牧场
+     get_select_list() {
+      GetDataByNames(this.requestParams).then(response => {
+        this.findAllPasture = response.data.findAllPasture.list
+        console.log(this.findAllPasture,'hss')
+      })
+    },
+
+    get_mainPas_list() {
+      GetDataByNames(this.requestParams1).then(response => {
+        this.parentDept = response.data.getPastureIsMain.list
+        //  this.parentDept = this.list
+        console.log(  this.parentDept,response.data,'0++++')
+      })
+    },
+
+    popoverHide(checkedIds, checkedData) {
+      console.log(checkedIds, checkedData)
+      this.deptform.mainPastrue = checkedIds
+      // this.deptform.pastureId = checkedData.pastureId
+    },
+    deptenter() {
+      this.$nextTick(() => {
+        this.$refs['remark'].focus()
+      })
+    },
+    get_table_data() {
+      this.listLoading = true
+      getMainPastur().then(response => {
+        if (response.data.list !== null) {
+          this.list = transData(response.data, 'id', 'list')
+        }
+        setTimeout(() => {
+          this.listLoading = false
+        }, 10)
+      })
+      this.get_mainPas_list()
+    },
+    // getDeptList() {
+    //   getRecuData(this.getDeptParm).then(response => {
+    //     this.parentDept = response.data
+    //   })
+    // },
+    resetRequestParam() {
+      this.deptform.isMain = ''
+      this.deptform.mainPastrue = ''
+      this.deptform.pastureId = ''
+      this.deptform.remark = ''
+      this.deptform.pastureName = ''
+      this.deptform.pastureNumber = ''
+    },
+    form_add() {
+      this.resetRequestParam()
+      this.dialogStatus = 'create'
+      this.parentDeptVisible = true
+      this.dialogFormVisible = true
+      if (this.list.length > 0) {
+        this.defaultCheckedKeys = [this.list[0].id]
+        this.deptform.mainPastrue = this.list[0].id
+        // this.deptform.pastureId = this.list[0].id
+      } else {
+        this.deptform.mainPastrue = 0
+      }
+      // this.$nextTick(() => {
+      //   this.$refs['dataForm'].clearValidate()
+      // })
+    },
+    // add_dialog_save() {
+    //   this.$refs['dataForm'].validate((valid) => {
+    //     if (valid) {
+    //       this.requestParam.name = 'createdept'
+    //       this.requestParam.parammaps = {}
+    //       this.requestParam.parammaps.pastureNumber = this.deptform.pastureNumber
+    //       this.requestParam.parammaps.KCcode = this.deptform.KCcode
+    //       this.requestParam.parammaps.pastureId = this.deptform.pastureId
+    //       this.requestParam.parammaps.mainPastrue = this.deptform.mainPastrue
+    //       this.requestParam.parammaps.deptname = this.deptform.deptname
+    //       this.requestParam.parammaps.remark = this.deptform.remark
+    //       this.requestParam.parammaps.sort = this.deptform.sort
+    //       this.requestParam.parammaps.enable = this.deptform.enable
+    //       this.requestParam.parammaps.isPasture = this.deptform.isPasture
+    //       this.requestParam.parammaps.costCenter_code = this.deptform.costCenter_code
+    //       PostDataByName(this.requestParam).then(response => {
+    //         if (response.msg !== 'fail') {
+    //           this.get_table_data()
+    //           this.dialogFormVisible = false
+    //           this.$notify({
+    //             title: '成功',
+    //             message: '新增成功',
+    //             type: 'success',
+    //             duration: 2000
+    //           })
+    //         } else {
+    //           failproccess(response, this.$notify)
+    //         }
+    //       })
+    //     }
+    //   })
+    // },
+    // add_dialog_save_again() {
+    //   this.$refs['dataForm'].validate((valid) => {
+    //     if (valid) {
+    //       this.requestParam.name = 'createdept'
+    //       this.requestParam.parammaps = {}
+    //       this.requestParam.parammaps.pastureNumber = this.deptform.pastureNumber
+    //       this.requestParam.parammaps.KCcode = this.deptform.KCcode
+    //       this.requestParam.parammaps.pastureId = this.deptform.pastureId
+    //       this.requestParam.parammaps.mainPastrue = this.deptform.mainPastrue
+    //       this.requestParam.parammaps.deptname = this.deptform.deptname
+    //       this.requestParam.parammaps.remark = this.deptform.remark
+    //       this.requestParam.parammaps.sort = this.deptform.sort
+    //       this.requestParam.parammaps.enable = this.deptform.enable
+    //       this.requestParam.parammaps.isPasture = this.deptform.isPasture
+    //       this.requestParam.parammaps.costCenter_code = this.deptform.costCenter_code
+    //       PostDataByName(this.requestParam).then(() => {
+    //         this.$nextTick(() => {
+    //           this.$refs['deptname'].focus()
+    //         })
+    //         this.get_table_data()
+    //         this.requestParam = {
+    //           name: 'createdept',
+    //           params: []
+    //         }
+    //         this.deptform.id = ''
+    //         this.deptform.deptname = ''
+    //         this.deptform.remark = ''
+    //         this.deptform.costCenter_code = ''
+    //         this.deptform.sort = '0'
+    //         this.deptform.enable = '1'
+    //         this.deptform.isPasture = '0'
+
+    //         this.$notify({
+    //           title: '成功',
+    //           message: '新增成功',
+    //           type: 'success',
+    //           duration: 2000
+    //         })
+    //       })
+    //     }
+    //   })
+    // },
+    form_addConfirm(type) {
+      if (this.type != 'del') {
+        // 如果 主牧场 和 子牧场 相同 ,则 isMain =1;
+         this.deptform.isMain = (this.deptform.mainPastrue &&  this.deptform.mainPastrue !== this.deptform.pastureId )? 0 : 1
+         this.deptform.mainPastrue = this.deptform.isMain == 1 ? 0 : this.deptform.mainPastrue
+       }
+      editMainPasture(this.deptform).then((res) => {
+        const { data } = res;
+        if (data == true) {
+          this.$notify({
+            title: '提示',
+            message: type,
+            type: 'success',
+            duration: 2000
+          })
+        } else {
+          this.$notify({
+            title: '提示',
+            message: data,
+            type: 'success',
+            duration: 2000
+          })
+        }
+       this.get_table_data()
+       this.dialogFormVisible = false
+       this.type = '';
+
+      })
+
+    },
+    form_edit(row, type) {
+      console.log(row,type,'000')
+      if (type != 1) {
+        this.type = 'del';
+        this.$confirm('此操作将永久删除牧场配置, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.resetRequestParam()
+          this.deptform.isMain = 0
+          this.deptform.mainPastrue = 0
+          this.deptform.pastureId = row.id
+          this.form_addConfirm('删除成功')
+
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          });
+        });
+      } else {
+        this.type = 'edit';
+        this.deptform.pastureId = row.id
+        this.deptform.pastureName = row.name
+        this.deptform.pastureNumber = row.pastureNumber
+        this.deptform.remark = row.remark
+        this.deptform.mainPastrue = 0
+        this.dialogStatus = 'update'
+        this.dialogFormVisible = true
+        this.parentDeptVisible = true
+        // this.$nextTick(() => {
+        //   this.$refs['dataForm'].clearValidate()
+        //   this.$refs['deptname'].focus()
+        // })
+          console.log(this.deptform,'001')
+      }
+    },
+    edit_dialog_save() {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.requestParam.name = 'updatedept'
+          this.requestParam.params = []
+          this.requestParam.params[0] = this.deptform.pastureNumber
+          this.requestParam.params[1] = this.deptform.KCcode
+          this.requestParam.params[2] = this.deptform.mainPastrue
+          this.requestParam.params[3] = this.deptform.deptname
+          this.requestParam.params[4] = this.deptform.remark
+          this.requestParam.params[5] = this.deptform.sort
+          this.requestParam.params[6] = this.deptform.enable
+          this.requestParam.params[7] = this.deptform.isPasture
+          this.requestParam.params[8] = this.deptform.costCenter_code
+          this.requestParam.params[9] = this.deptform.id
+
+          PostDataByName(this.requestParam).then(() => {
+            this.get_table_data()
+            this.dialogFormVisible = false
+            this.$notify({
+              title: '成功',
+              message: '修改成功',
+              type: 'success',
+              duration: 2000
+            })
+          })
+        }
+      })
+    },
+    handleEnableChange(index, row) {
+      this.requestParam.name = 'updatedept'
+      this.requestParam.params = []
+      if (row.sort === null) {
+        row.sort = '0'
+      }
+      this.requestParam.params[0] = row.pastureNumber
+      this.requestParam.params[1] = row.KCcode
+      this.requestParam.params[2] = row.mainPastrue
+      this.requestParam.params[3] = row.deptname
+      this.requestParam.params[4] = row.remark
+      this.requestParam.params[5] = row.sort
+      this.requestParam.params[6] = row.enable
+      this.requestParam.params[7] = row.isPasture
+      this.requestParam.params[8] = row.costCenter_code
+          this.requestParam.params[9] = row.id
+      PostDataByName(this.requestParam).then(() => {
+        this.$notify({
+          title: '成功',
+          message: '修改成功',
+          type: 'success',
+          duration: 2000
+        })
+      })
+    },
+    form_delete(row) {
+      MessageBox.confirm('部门名称:' + row.deptname, '确认删除?', {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.requestParamDel.name = 'deletedept'
+        this.requestParamDel.params = []
+        this.requestParamDel.params[0] = row.id
+        PostDataByName(this.requestParamDel).then(() => {
+          this.get_table_data()
+          this.dialogFormVisible = false
+          this.$notify({
+            title: '成功',
+            message: '删除成功',
+            type: 'success',
+            duration: 2000
+          })
+        })
+      })
+    }
+  }
+}
+</script>

+ 18 - 3
src/views/console/user/index.vue

@@ -2,6 +2,19 @@
   <div class="app-container">
     <div class="app-container">
       <div class="filter-container">
+        <el-select
+          v-model="getdataListParm.parammaps.pastureName"
+          placeholder="牧场"
+          style="width:120px"
+          class="filter-item"
+        >
+          <el-option
+            v-for="item in findAllPasture"
+            :key="item.id"
+            :label="item.name"
+            :value="item.name"
+          />
+        </el-select>
         <el-input v-model="getdataListParm.parammaps.empCode" placeholder="用户名" style="width: 140px;" class="filter-item" />
         <el-input v-model="getdataListParm.parammaps.empname" placeholder="姓名" style="width: 140px;" class="filter-item" />
         <el-input v-model="getdataListParm.parammaps.roleName" placeholder="角色" style="width: 140px;" class="filter-item" />
@@ -25,6 +38,8 @@
         @sort-change="tableSort"
         :max-height="myHeight"
       >
+        <el-table-column label="牧场" prop="pastureName"  header-align="center" width="120px" align="center">
+        </el-table-column>
         <el-table-column label="用户名称" header-align="center" width="120px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.username }}</span>
@@ -200,6 +215,7 @@ export default {
   directives: { waves },
   data() {
     return {
+      findAllPasture: [],
       myHeight:document.documentElement.clientHeight - 85- 200,
       isUserDelete:[],isUserResetpassword:[],isUserEdit:[],isUserRole:[],isUserAdd:[],
       tableKey: 0,
@@ -214,7 +230,7 @@ export default {
         { name: 'getEmpall', offset: 0, pagecount: 0, params: [] },
         { name: 'getMaintenanceTypeList', offset: 0, pagecount: 0, params: [] },
         { name: 'getMcsAccounts', offset: 0, pagecount: 0, params: [] },
-
+        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }}
       ],
       requestFilterParams: { returntype: 'Map', parammaps: {}},
       UpdateDataRelationParam: { name: '', dataname: '', datavalue: '', valuename: '', values: [] },
@@ -292,9 +308,8 @@ export default {
         this.rolelist = response.data.getRoleall.list
         this.emplist = response.data.getEmpall.list
         this.repairmanTypeList = response.data.getMaintenanceTypeList.list
-
         this.viedoAccountList = response.data.getMcsAccounts.list
-
+        this.findAllPasture = response.data.findAllPasture.list
 
         GetDataByName(this.getdataListParm).then(response => {
           this.list = response.data.list

+ 7 - 0
src/views/custom/custom/index.vue

@@ -308,6 +308,7 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+                <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -349,6 +350,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -396,6 +399,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
@@ -434,6 +439,8 @@
                 @sort-change="tableSort2"
                 :max-height="myHeight"
               >
+               <el-table-column label="牧场" prop="pastureName" min-width="110px" align="center" />
+
                 <el-table-column label="序号" width="100px" align="center" type="index">
                   <template slot-scope="scope">
                     <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>

+ 67 - 16
src/views/custom/outStock/index.vue

@@ -6,10 +6,10 @@
     </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: #409EFF;" @click="handleDescription" />
         <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="牧场" class="filter-item" multiple
+              collapse-tags  filterable 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" />
@@ -19,9 +19,6 @@
           <el-select v-model="getdataListParm.parammaps.departmentId" style="width: 140px;" placeholder="领用部门" class="filter-item" clearable>
             <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
-          <!-- <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
-            <el-option v-for="item in easStatus.easStatusList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select> -->
           <el-select v-model="getdataListParm.parammaps.sapStatus" style="width: 150px;" clearable placeholder="SAP上传状态" class="filter-item">
             <el-option v-for="item in easStatus.sapStatusList" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
@@ -141,7 +138,8 @@
       </el-tab-pane>
       <el-tab-pane label="出库记录" name="second">
         <div class="filter-container">
-          <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+          <el-select v-model="getdataListParm2.parammaps.pastureArr" multiple
+              collapse-tags  filterable collapse-tags-tooltip filterable  style="width: 220px;" placeholder="牧场" class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm2.parammaps.useForm" placeholder="出库单号" style="width: 200px;" class="filter-item" />
@@ -150,7 +148,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  filterable collapse-tags-tooltip filterable  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
@@ -1122,6 +1121,7 @@ export default {
   data() {
     return {
       numList: [], // 青贮出库订单号
+      parueidIndex: '', // 当前赛场的id
       myHeight: document.documentElement.clientHeight - 85 - 250,
       isSap: 1,
       isSrm: 1,
@@ -1204,7 +1204,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: ['耗用类别-父'] }
@@ -1256,7 +1256,8 @@ export default {
           useForm: '',
           useType: '',
           easStatus: '',
-          sapStatus: ''
+          sapStatus: '',
+          pastureArr:[],
         }
       },
       list: [],
@@ -1282,7 +1283,8 @@ export default {
           providerId: '',
           pastureName: Cookies.get('pasturename'),
           assetCode: '',
-          eqName: ''
+          eqName: '',
+          pastureArr:[],
         }
       },
       requestParam: {
@@ -1469,17 +1471,15 @@ export default {
       that.get_auto_buttons()
     })
     this.get_select_list()
-    this.get_table_data()
     this.getTypeList()
-    // 获取订单号
-    this.getNumberArr()
+
   },
 
   methods: {
     // 获取订单号数据
-    async getNumberArr() {
+    async getNumberArr(id) {
       const params = {
-        pastureId: Cookies.get('pastureid')
+        pastureId: id
       }
       const data = await getNumList(params)
       this.numList = data.data
@@ -1678,13 +1678,25 @@ 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()
+
+        this.parueidIndex = response.data.findAllMainPasture.list[0].id || Cookies.get('pastureid')
+        // 获取订单号
+        this.getNumberArr(this.parueidIndex)
       })
     },
     getDepartDownList() {
+      this.getDepartParam.parammaps.pastureId = Cookies.get('pastureid')
       GetDataByName(this.getDepartParam).then(response => {
         this.findAllDepart = response.data.list
       })
@@ -1711,8 +1723,21 @@ export default {
     },
     changePasture(item) {
       this.getDepartParam.parammaps.pastureId = item
+      this.requestUseForm.parammaps.pastureId = item
       this.edit = 1
       this.getCreateDepartDownList()
+      const arr = [
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': item } },
+        // { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': item }},
+      ]
+      GetDataByNames(arr).then(response => {
+        console.log('下拉框数据', response.data)
+        this.findAllEmploye = response.data.findAllEmploye.list
+        // this.findAllDepart = response.data.findAllDepart.list
+      })
+      // 获取订单号
+      this.getNumberArr(item)
+      this.getNumber()
     },
     changeDepart(item) {
       this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
@@ -1727,6 +1752,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 +1796,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();
+     }
+     this.getdataListParm2.parammaps.departmentId = this.getdataListParm2.parammaps.departmentId.toString();
       GetDataByName(this.getdataListParm2).then(response => {
         this.list2 = response.data.list
         this.pageNum2 = response.data.pageNum
@@ -1912,6 +1962,7 @@ export default {
       })
       this.getCreateNumber()
     },
+
     getCreateNumber() {
       GetDataByName(this.getParmCreateNumber).then(response => {
         this.$nextTick(() => {

+ 98 - 9
src/views/custom/purchase/index.vue

@@ -234,7 +234,8 @@
       <el-tab-pane v-if="isDistributionManagement" label="配单管理" name="fouth">
         <div class="DistributionManagement">
           <div class="filter-container">
-            <el-select v-model="getdataListParm4.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+            <el-select v-model="getdataListParm4.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item"  multiple
+        collapse-tags  collapse-tags-tooltip filterable >
               <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             <el-input v-model="getdataListParm4.parammaps.matchCode" placeholder="配单号" clearable style="width: 200px;" class="filter-item" />
@@ -591,7 +592,8 @@
       <el-tab-pane label="采购单管理" name="second">
         <div class="purchaseOrderManagement">
           <div class="filter-container">
-            <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+            <el-select v-model="getdataListParm2.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item" multiple
+        collapse-tags filterable 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="getdataListParm2.parammaps.buyeCode" placeholder="采购单号" clearable style="width: 200px;" class="filter-item" />
@@ -681,6 +683,7 @@
               </template>
             </el-table-column>
             <el-table-column label="srm错误" prop="srmError" min-width="110px" align="center" />
+              <el-table-column label="sap错误" prop="sapError" min-width="110px" align="center" />
             <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width" fixed="right">
               <template slot-scope="{row}">
                 <el-button v-if="isPurchaseSee" type="primary" size="mini" @click="form_see2(row)">查看</el-button>
@@ -859,7 +862,8 @@
       <el-tab-pane label="采购明细" name="third">
         <div class="procurementDetails">
           <div class="filter-container">
-            <el-select v-model="getdataListParm3.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+            <el-select v-model="getdataListParm3.parammaps.pastureArr" style="width: 210px;" placeholder="牧场" class="filter-item"  multiple
+        collapse-tags filterable 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="getdataListParm3.parammaps.partCode" placeholder="备件编号" style="width: 200px;" class="filter-item" />
@@ -999,7 +1003,8 @@
       <el-tab-pane label="采购退货" name="fifth">
         <div class="procurementDetails">
           <div class="filter-container">
-            <el-select v-model="getdataListParm5.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+            <el-select v-model="getdataListParm5.parammaps.pastureArr" style="width: 220px;" placeholder="牧场" class="filter-item"  multiple
+        collapse-tags filterable 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="getdataListParm5.parammaps.buyeCode" placeholder="采购单号" style="width: 140px;" class="filter-item" />
@@ -1265,14 +1270,14 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="供应商:" prop="providerId">
-                <el-select v-model="createTemp5.providerId" filterable placeholder="供应商" style="width:100%" @change="changeProvider5">
+                <el-select v-model="createTemp5.providerId" filterable placeholder="供应商" style="width: 220px;" @change="changeProvider5">
                   <el-option v-for="item in findAllProvider5" :key="item.id" clearable :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="牧场:" prop="pastureId">
-                <el-select v-model="createTemp5.pastureId" placeholder="牧场" class="filter-item" style="width:100%">
+                <el-select v-model="createTemp5.pastureId" placeholder="牧场" class="filter-item" style="width: 220px;">
                   <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
@@ -1281,7 +1286,7 @@
           <el-row>
             <el-col :span="8">
               <el-form-item label="录入人:" prop="employeId">
-                <el-select v-model="createTemp5.employeId" placeholder="录入人" class="filter-item" style="width:100%">
+                <el-select v-model="createTemp5.employeId" placeholder="录入人" class="filter-item" style="width: 220px;">
                   <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
@@ -1504,7 +1509,7 @@ export default {
       requestParams: [
         { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'getDepartmentNY', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { 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: 'findAllProvider', offset: 0, pagecount: 0, params: [] }
 
       ],
@@ -1555,6 +1560,7 @@ export default {
         pagecount: 50,
         returntype: 'Map',
         parammaps: {
+          pastureArr:[],
           providerName: '',
           buyeCode: '',
           inputDatetime: '',
@@ -1577,6 +1583,7 @@ export default {
         pagecount: 50,
         returntype: 'Map',
         parammaps: {
+          pastureArr:[],
           pastureName: Cookies.get('pasturename'),
           providerName: '',
           partCode: '',
@@ -1629,6 +1636,7 @@ export default {
         pagecount: 50,
         returntype: 'Map',
         parammaps: {
+          pastureArr:[],
           pastureName: Cookies.get('pasturename'),
           matchCode: '',
           statue: '',
@@ -1663,6 +1671,7 @@ export default {
         pagecount: 50,
         returntype: 'Map',
         parammaps: {
+          pastureArr:[],
           pastureName: Cookies.get('pasturename'),
           providerName: '',
           partCode: '',
@@ -2177,10 +2186,22 @@ export default {
     get_select_list() {
       GetDataByNames(this.requestParams).then(response => {
         this.findAllEmploye = response.data.findAllEmploye.list
-        this.findAllPasture = response.data.findAllPasture.list
+        this.findAllPasture = response.data.findAllMainPasture.list
         this.deptNameList = response.data.getDepartmentNY.list
         this.findAllProvider5 = response.data.findAllProvider.list
         this.findAllProvider = response.data.findAllProvider.list
+        this.getdataListParm2.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+         this.getdataListParm3.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+         this.getdataListParm4.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
+          this.getdataListParm5.parammaps.pastureArr = this.findAllPasture.map(item => {
+          return item.name
+        })
         console.log(this.deptNameList)
       })
     },
@@ -2201,6 +2222,19 @@ export default {
         console.log(response)
         this.partData = response.data.list
       })
+         // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm1.parammaps.pastureArr && this.getdataListParm1.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm1.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm1.parammaps.pastureId = ids.toString();
+      }
+
+
       GetDataByName(this.getdataListParm1).then(response => {
         console.log('this.list1', response.data.list)
         if (response.data.list === null) {
@@ -2607,6 +2641,20 @@ export default {
         this.getdataListParm2.parammaps.startTime = ''
         this.getdataListParm2.parammaps.stopTime = ''
       }
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm2.parammaps.pastureArr && this.getdataListParm2.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm2.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm2.parammaps.pastureId = ids.toString();
+      }
+
+
       GetDataByName(this.getdataListParm2).then(response => {
         this.list2 = response.data.list
         this.pageNum2 = response.data.pageNum
@@ -3036,6 +3084,20 @@ export default {
         this.getdataListParm3.parammaps.startTime = ''
         this.getdataListParm3.parammaps.stopTime = ''
       }
+
+
+      // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm3.parammaps.pastureArr && this.getdataListParm3.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm3.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm3.parammaps.pastureId = ids.toString();
+      }
+
       GetDataByName(this.getdataListParm3).then(response => {
         this.list3 = response.data.list
         this.pageNum3 = response.data.pageNum
@@ -3104,6 +3166,19 @@ export default {
     get_table_data5() {
       this.listLoading5 = true
 
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm5.parammaps.pastureArr && this.getdataListParm5.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm5.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm5.parammaps.pastureId = ids.toString();
+      }
+
+
       GetDataByName(this.getdataListParm5).then(response => {
         this.list5 = response.data.list
         this.pageNum5 = response.data.pageNum
@@ -3133,6 +3208,20 @@ export default {
         this.getdataListParm4.parammaps.startTime = ''
         this.getdataListParm4.parammaps.stopTime = ''
       }
+
+        // 对于多选的牧场,根据数组的名称来转换 pastureArr =》 pastureId TODO:
+      if (this.getdataListParm4.parammaps.pastureArr && this.getdataListParm4.parammaps.pastureArr.length > 0) {
+        const arr = this.findAllPasture.filter((item) => {
+          if (this.getdataListParm4.parammaps.pastureArr.includes(item.name)) {
+            return item
+          }
+        })
+        const ids = arr.map((child) => { return child.id })
+        console.log(arr,ids,'999999')
+        this.getdataListParm4.parammaps.pastureId = ids.toString();
+      }
+
+
       GetDataByName(this.getdataListParm4).then(response => {
         this.list4 = response.data.list
         this.pageNum4 = response.data.pageNum

+ 41 - 8
src/views/custom/receive/index.vue

@@ -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 filterable 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') }}
       ],
@@ -574,8 +575,8 @@ export default {
       collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' },{ id: '3', name: '委外维修' }],
       radioAll: '全部',
       getdataListParm: {
-        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 50, 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') }
+        name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+        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)
@@ -788,6 +802,18 @@ export default {
 
     changeAll() {
       console.log(this.radioAll)
+       // 对于多选的牧场,根据数组的名称来转换 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();
+      }
+      console.log(this.getdataListParm.parammaps,'this.getdataListParm.parammaps')
       if (this.radioAll === '全部') {
         this.getdataListParm.name = 'getBigpartapplyList'
         this.getdataListParm.offset = 1
@@ -796,7 +822,9 @@ export default {
           applyCode: '', applyType: '', statue: '', departmentId: '', inputDatetime: '', startTime: '', stopTime: '', menu: 'Receive',
           loginId: Cookies.get('employeid'),
           logindeptId: Cookies.get('departmentid'),
-          loginpastureId: Cookies.get('pastureid')
+          loginpastureId: Cookies.get('pastureid'),
+          pastureId: this.getdataListParm.parammaps.pastureId || Cookies.get('pastureid'),
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
         }
         this.get_table_data()
       } else if (this.radioAll === '待处理') {
@@ -804,6 +832,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -816,7 +845,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
           deptId: Cookies.get('departmentid')
         }
         this.get_table_data()
@@ -825,6 +854,7 @@ export default {
         this.getdataListParm.offset = 1
         this.getdataListParm.parammaps = {
           pastureName: this.getdataListParm.parammaps.pastureName,
+          pastureArr :this.getdataListParm.parammaps.pastureArr,
           applyCode: this.getdataListParm.parammaps.applyCode,
           applyType: this.getdataListParm.parammaps.applyType,
           statue: this.getdataListParm.parammaps.statue,
@@ -837,7 +867,7 @@ export default {
           logindeptId: Cookies.get('departmentid'),
           loginpastureId: Cookies.get('pastureid'),
           empId: Cookies.get('employeid'),
-          pastureId: Cookies.get('pastureid'),
+          pastureId:this.getdataListParm.parammaps.pastureId ||  Cookies.get('pastureid'),
           deptId: Cookies.get('departmentid')
         }
         this.get_table_data()
@@ -1318,8 +1348,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()
       })
     },

+ 65 - 14
src/views/custom/storage/index.vue

@@ -7,12 +7,13 @@
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="备件入库" name="first">
         <div class="filter-container">
-          <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+          <el-select v-model="getdataListParm.parammaps.pastureArr" style="width: 220px;" placeholder="牧场"  multiple
+        collapse-tags  filterable collapse-tags-tooltip  class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm.parammaps.laidCode" placeholder="入库单号" style="width: 200px;" class="filter-item" />
           <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
-          <el-select v-model="getdataListParm.parammaps.laidType" clearable placeholder="入库方式" class="filter-item" style="width: 120px;">
+          <el-select v-model="getdataListParm.parammaps.laidType" clearable placeholder="入库方式" class="filter-item" style="width: 120px;" >
             <el-option v-for="item in laidTypes" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
           <!-- <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
@@ -132,7 +133,8 @@
       </el-tab-pane>
       <el-tab-pane label="入库记录" name="second">
         <div class="filter-container">
-          <el-select v-model="getdataListParm2.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item">
+          <el-select v-model="getdataListParm2.parammaps.pastureArr" style="width: 220px;"   multiple
+        collapse-tags  filterable collapse-tags-tooltip  placeholder="牧场" class="filter-item">
             <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
           </el-select>
           <el-input v-model="getdataListParm2.parammaps.laidCode" placeholder="入库单号" style="width: 200px;" class="filter-item" />
@@ -253,8 +255,11 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="牧场:" prop="pastureId">
-                <el-select v-model="storage.pastureId" placeholder="牧场" class="filter-item" style="width:100%">
-                  <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+                <el-select v-model="storage.pastureId" placeholder="牧场" class="filter-item" style="width:100%" @change="handleChageOrder">
+                  <el-option v-for="item in findAllPasture"
+                   :key="item.id"
+                   :label="item.name"
+                   :value="item.id" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -767,7 +772,7 @@ export default {
       getDictByName: [],
       requestParams: [
         { name: 'findAllProviderByCt', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { 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: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
         { name: 'getDictByName', offset: 0, pagecount: 0, params: ['资产状态'] },
         { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] }
@@ -885,8 +890,9 @@ export default {
         laidType: 0,
         providerId: '',
         storageTime: parseTime(new Date(), '{y}-{m}-{d}'),
-        empId: this.$store.state.user.employeid,
-        pastureId: this.$store.state.user.pastureid
+        empId: this.$store.state.user.employeid ||  Cookies.get('employeid'),
+        pastureId: this.$store.state.user.pastureid ||  Cookies.get('pastureid'),
+        departmentId: Cookies.get('departmentid'),
       },
       TotalAmount: 0,
       orderPart: {},
@@ -1008,8 +1014,8 @@ export default {
 
   created() {
     this.get_select_list()
-    this.get_table_data()
-    this.get_table_data2()
+    // this.get_table_data()
+    // this.get_table_data2()
     const that = this
     GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
       that.buttons = response.data.list
@@ -1094,10 +1100,17 @@ export default {
       GetDataByNames(this.requestParams).then(response => {
         console.log('下拉框数据', response.data)
         this.findAllProvider = response.data.findAllProviderByCt.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.findAllProvider2 = response.data.findAllProvider.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()
       })
     },
     get_table_data() {
@@ -1109,6 +1122,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
@@ -1139,6 +1165,19 @@ 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 => {
         console.log('table数据', response.data.list)
         this.list2 = response.data.list
@@ -1255,14 +1294,26 @@ export default {
       this.storage.laidCode = ''
       this.dialogStatus = 'create'
       this.dialogFormVisible = true
-      this.storage.pastureId = Cookies.get('pastureid')
-      this.storage.employeId = Cookies.get('employeid')
-      console.log(this.storage)
+      this.storage.pastureId = Number(Cookies.get('pastureid'))
+      this.storage.pastureName = Cookies.get('pasturename')
+      this.storage.employeId = Number(Cookies.get('employeid'))
+      console.log(this.storage.pastureId ,'666')
       this.$nextTick(() => {
         this.$refs['temp'].clearValidate()
       })
       this.getCreateNumber()
     },
+    handleChageOrder(val) {
+      const arr = [
+        { name: 'findAllProviderByCt', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': val } },
+        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': val } },
+      ]
+      GetDataByNames(arr).then(response => {
+        console.log('下拉框数据', response.data)
+        this.findAllProvider = response.data.findAllProviderByCt.list
+        this.findAllEmploye = response.data.findAllEmploye.list
+      })
+    },
     getCreateNumber() {
       GetDataByName(this.getParmCreateNumber).then(response => {
         this.$nextTick(() => {

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 540 - 535
src/views/custom/subscribe/index.vue


+ 1 - 1
src/views/maintenance/maintain/index.vue

@@ -1676,7 +1676,7 @@ export default {
       this.getCollarUseListParm.parammaps.id = this.collarUseTemp ? this.collarUseTemp.id : ''
       this.listLoadingCollarUse = true
       if( this.getCollarUseListParm.parammaps.id == ''){
-          this.listLoadingCollarUse = false
+          this.listLoadingCollarUse = false;
           return
         } else {
           GetDataByName(this.getCollarUseListParm).then(response => {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.