Przeglądaj źródła

新增奶厅申购

duanxiaoduan 1 rok temu
rodzic
commit
d579db21fb
1 zmienionych plików z 25 dodań i 4 usunięć
  1. 25 4
      src/views/custom/subscribe/index.vue

+ 25 - 4
src/views/custom/subscribe/index.vue

@@ -28,6 +28,7 @@
 
         <el-button v-if="isSubscribeAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="apply_subscribe">新增</el-button>
         <el-button v-if="isSubscribeSpecial" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_specialSubscription">特殊申购</el-button>
+        <el-button v-if="isSubscribeMilk" class="filter-item" type="primary" icon="el-icon-edit" @click="handle_milkSubscription">奶厅申购</el-button>
         <el-button v-if="isSubscribeExport" v-waves class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
         <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
           <el-radio-button label="全部" />
@@ -155,8 +156,8 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="申购部门:" prop="departmentId">
-                <el-select v-model="createTemp.departmentId" placeholder="申购部门" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'" @change="changeDepart">
-                  <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" />
+                <el-select v-model="createTemp.departmentId" placeholder="申购部门" class="filter-item" style="width:100%" :disabled="dialogStatus==='update' || isMilk" @change="changeDepart">
+                  <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" :disabled="item.name== '挤奶处'" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -796,6 +797,7 @@ export default {
   data() {
     return {
       isSubscribeAdd: [],isSubscribeSpecial:[], isSubscribeExamineSBZG:[],isSubscribeTemplate: [], isSubscribeImport: [], isSubscribeExport: [], isSubscribeSee: [], isSubscribeDelete: [], isSubscribeExamineKG: [], isSubscribeExamineCG: [],isSubscribeExamineCW:[], isSubscribeExamineZG: [],sdchangzhangshenhe: [],
+      isSubscribeMilk:[],
       isokDisable: false,
       findAllProvider: [],
       findAllPasture: [],
@@ -962,6 +964,7 @@ export default {
       },
       apply_subscribeData:{},
       isApplyEx4:true,
+      isMilk:false, //标记是不是奶厅申购
       myHeight:document.documentElement.clientHeight - 85- 150
     }
   },
@@ -987,11 +990,14 @@ export default {
       const SubscribeAdd = 'customs:subscribe:add'
       const isSubscribeAdd = checkButtons(this.$store.state.user.buttons, SubscribeAdd)
       this.isSubscribeAdd = isSubscribeAdd
-      // isSubscribeSpecial
       // 特殊申购
       const SubscribeSpecial = 'customs:subscribe:special'
       const isSubscribeSpecial = checkButtons(this.$store.state.user.buttons, SubscribeSpecial)
       this.isSubscribeSpecial = isSubscribeSpecial
+      // 奶厅申购
+      const SubscribeMilk = 'customs:subscribe:milk'
+      const isSubscribeMilk = checkButtons(this.$store.state.user.buttons, SubscribeMilk)
+      this.isSubscribeMilk = isSubscribeMilk
       // 模板
       // eslint-disable-next-line no-redeclare
       const SubscribeTemplate = 'customs:subscribe:template'
@@ -1022,7 +1028,7 @@ export default {
       const SubscribeExamineKG = 'customs:subscribe:examineKG'
       const isSubscribeExamineKG = checkButtons(this.$store.state.user.buttons, SubscribeExamineKG)
       this.isSubscribeExamineKG = isSubscribeExamineKG
-// 设备主管审核
+      // 设备主管审核
       const SubscribeExamineSBZG = 'customs:subscribe:examineSBZG'
       const isSubscribeExamineSBZG = checkButtons(this.$store.state.user.buttons, SubscribeExamineSBZG)
       this.isSubscribeExamineSBZG = isSubscribeExamineSBZG
@@ -1203,6 +1209,7 @@ export default {
       this.listAdd = []
     },
     form_add() {
+      this.isMilk = false
       this.resetCreateTemp()
       this.edit = 1
       this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
@@ -1747,6 +1754,7 @@ export default {
       })
     },
     form_edit(row) {
+      this.isMilk = false
       this.edit = 0
       this.getDepartParam.parammaps.pastureId = row.pastureId
       this.getCreateDepartDownList()
@@ -1896,6 +1904,11 @@ export default {
             this.createTemp.departmentId = response.data.list[0].id
             this.createTemp.departmentName = response.data.list[0].name
           }
+          if(this.isMilk){
+            console.log('milk')
+            this.createTemp.departmentName  = '挤奶处'
+            this.createTemp.departmentId = this.createDepartList.find(obj => obj.name == this.createTemp.departmentName).id
+          }
         }
       })
     },
@@ -2496,6 +2509,14 @@ export default {
         return false
       }
     },
+    handle_milkSubscription(){
+      // 奶厅申购
+      this.form_add()
+      this.textMap.create = '奶厅申购'
+      this.dialogStatus = 'create'
+      this.isMilk = true
+      this.resetCreateTemp()
+    }
   }
 }
 </script>