Browse Source

饲喂计划1

epans 1 year ago
parent
commit
e5401c3382
1 changed files with 114 additions and 53 deletions
  1. 114 53
      src/views/formulaPlan/FeedPlan.vue

+ 114 - 53
src/views/formulaPlan/FeedPlan.vue

@@ -6,28 +6,17 @@
     <el-card class="box-card">
       <!-- 搜索区域 -->
       <div class="search-bx1">
-          <el-input v-model="searchData.calf_code" placeholder="饲喂"  style="width: 180px;" class="g-mr20 g-mb20" clearable />
-          <el-input v-model="searchData.barn_name" placeholder="栏舍"  style="width: 180px;" class="g-mr20" clearable />
-          <el-input v-model="searchData.mother_code" placeholder="母号"  style="width: 180px;" class="g-mr20" clearable />
-          <el-select v-model="searchData.status" filterable placeholder="健康状态" class="g-mr20" style="width: 180px;" clearable>
+          <el-select v-model="searchData.class_id" filterable placeholder="班次" class="g-mr20  g-mb20" style="width: 180px;" clearable>
             <el-option v-for="item in healthList" :key="item.id" :label="item.value" :value="item.id" />
           </el-select>
-
-          <el-select v-model="searchData.calf_category_id" filterable placeholder="犊牛类型" class="g-mr20" style="width: 180px;" clearable>
-            <el-option v-for="item in calfTypeList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
-
-          <el-select v-model="searchData.genders" filterable placeholder="性别" class="g-mr20" style="width: 180px;" clearable>
-            <el-option v-for="item in sexList" :key="item.id" :label="item.value" :value="item.id" />
+          <el-input v-model="searchData.feed_vehicle_name" placeholder="饲喂车名称"  style="width: 180px;" class="g-mr20" clearable />
+          <el-input v-model="searchData.formula_name" placeholder="配方模板"  style="width: 180px;" class="g-mr20" clearable />
+          <el-select v-model="searchData.status" filterable placeholder="车次状态" class="g-mr20" style="width: 180px;" clearable>
+            <el-option v-for="item in healthList" :key="item.id" :label="item.value" :value="item.id" />
           </el-select>
+          <el-input v-model="searchData.barn_group_name" placeholder="饲喂栏舍组"  style="width: 180px;" class="g-mr20" clearable />
 
-          <el-input-number v-model="searchData.min_daily_weight_gain" style="width:120px;" :controls="false" placeholder="日均增重" />
-          <span style="margin:0px 8px;">至</span>
-          <el-input-number v-model="searchData.max_daily_weight_gain" style="width:120px;" class="g-mr20" :controls="false" placeholder="日均增重" />
-
-          <el-input-number v-model="searchData.min_daily_age" style="width:120px;" :controls="false" placeholder="日龄" />
-          <span style="margin:0px 8px;">至</span>
-          <el-input-number v-model="searchData.max_daily_age" style="width:120px;" class="g-mr20" :controls="false" placeholder="日龄" />
+          <el-input v-model="searchData.barn_name" placeholder="饲喂栏舍"  style="width: 180px;" class="g-mr20" clearable />
 
 
           <el-button type="primary"   @click="form_search">搜索</el-button>
@@ -35,8 +24,6 @@
           <el-button type="primary"   @click="form_add">添加</el-button>
            <!-- <el-button type="primary"   @click="form_export">导出</el-button> -->
       </div>
-
- 
       <!-- 表格 -->
       <el-table   key="0"  :data="tableList"  v-loading="tableLoading" element-loading-text="给我一点时间"    border fit>
         <el-table-column label="序号"  width="50px" align="center">
@@ -44,73 +31,58 @@
             <span>{{ scope.row.id }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="犊牛编号" min-width="150px" align="center">
+        <el-table-column label="车次" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.calf_code }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="栏舍" min-width="150px" align="center">
+        <el-table-column label="班次" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.barn_name }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="犊牛类型" min-width="150px" align="center">
+        <el-table-column label="饲喂车名称" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.calf_category_name }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="出生日期" min-width="150px" align="center">
+        <el-table-column label="容量(kg)" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.birth_date_format }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="性别" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.genders == 1">公</span>
-            <span v-if="scope.row.genders == 2">母</span>
-            <span v-else> </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="日龄" min-width="150px" align="center">
+ 
+        <el-table-column label="配方模板" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.daily_age }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="出生体重(KG)" min-width="150px" align="center">
+        <el-table-column label="饲喂时间" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.birth_weight }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="当前体重(KG)" min-width="150px" align="center">
+        <el-table-column label="饲喂栏舍组" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.current_weight }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="日均增重(KG)" min-width="150px" align="center">
+        <el-table-column label="饲喂栏舍" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.daily_weight_gain }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="母号" min-width="150px" align="center">
+        <el-table-column label="犊牛数量" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.mother_code }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="建档日期" min-width="150px" align="center">
+        <el-table-column label="计划饲喂量(kg)" min-width="150px" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.created_at_format }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="出栏日期" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.leave_barn_date_format }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="状态" min-width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.leave_barn_date_format }}</span>
-          </template>
-        </el-table-column>
+        
 
         <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
           <template slot-scope="scope">
@@ -121,7 +93,6 @@
           </template>
         </el-table-column>
       </el-table>
-
       <!-- 分页区域 -->
       <el-pagination  @size-change="change_size_page"  @current-change="change_current_page"  :current-page="searchData.page" :page-sizes="[1,5,10,20,30,50]"  :page-size="searchData.page_size" layout="total, prev, pager, next" :total="searchData.total"/>
     </el-card>
@@ -163,9 +134,33 @@
                 <el-input   v-model="addForm.mother_code"    ></el-input>  
             </el-form-item>
             <el-form-item label="备注:" prop="remark">
-              <el-input  v-model="addForm.remark" type="textarea" maxlength="200" class="filter-item" :rows="3"  />
+              <el-input  v-model="addForm.remark" type="textarea" maxlength="200"  :rows="3"  />
             </el-form-item>
 
+
+            <el-row :gutter="20">
+                <el-col :span="12">
+                  <el-table   key="0"  :data="tableListShed1"  element-loading-text="给我一点时间"  @selection-change="change_table_selection1"   border fit >
+                    <el-table-column   type="selection"   width="55">  </el-table-column>
+                    <el-table-column label="栏舍组名称" min-width="150px" align="center">
+                      <template slot-scope="scope">
+                        <span>{{ scope.row.name }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column label="犊牛数量" min-width="150px" align="center">
+                      <template slot-scope="scope">
+                        <span>{{ scope.row.name }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                </el-col> 
+                <el-col :span="12">
+                
+                </el-col> 
+            </el-row>  
+
+            
+
           
             
         </el-form>
@@ -198,13 +193,13 @@ export default {
  
 
       //接口 - 获取 - 表格
-      url_get_table:'/api/v1/ops/calf/list',
+      url_get_table:'/api/v1/ops/formula_plan/list',
       //接口 - 新增 - 表格
-      url_add_table:'/api/v1/ops/calf/add',  
+      url_add_table:'/api/v1/ops/formula_plan/add',  
       //接口 - 修改 - 表格
-      url_edit_table:'/api/v1/ops/calf/update', 
+      url_edit_table:'/api/v1/ops/formula_plan/update', 
       //接口 - 删除 - 表格
-      url_delete_table:'/api/v1/ops/calf/delete', 
+      url_delete_table:'/api/v1/ops/formula_plan', 
       
       //接口 - 下拉框 列表 
       url_get_select1:'/api/v1/ops/calf_feed/enum/list',
@@ -300,6 +295,67 @@ export default {
 
       },
 
+
+      selectList1:[],
+
+      tableListShed1:[
+      {
+          id: 1,
+          date: '2016-05-02',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1518 弄',
+          children:[{name:1,id:2},{name:1,id:2}]
+        }, {
+          id: 2,
+          date: '2016-05-04',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1517 弄'
+        }, {
+          id: 3,
+          date: '2016-05-01',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1519 弄',
+          children: [{
+              id: 31,
+              date: '2016-05-01',
+              name: '王小虎',
+              address: '上海市普陀区金沙江路 1519 弄'
+            }, {
+              id: 32,
+              date: '2016-05-01',
+              name: '王小虎',
+              address: '上海市普陀区金沙江路 1519 弄'
+          }]
+        }, {
+          id: 4,
+          date: '2016-05-03',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1516 弄'
+        }],
+        tableData1: [{
+          id: 1,
+          date: '2016-05-02',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1518 弄'
+        }, {
+          id: 2,
+          date: '2016-05-04',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1517 弄'
+        }, {
+          id: 3,
+          date: '2016-05-01',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1519 弄',
+          hasChildren: true
+        }, {
+          id: 4,
+          date: '2016-05-03',
+          name: '王小虎',
+          address: '上海市普陀区金沙江路 1516 弄'
+        }
+      ]
+
      
        
     }
@@ -632,6 +688,11 @@ export default {
        
     },
 
+    change_table_selection1(val){
+      this.selectList1 = val
+      console.log('勾选数据selectList1', this.selectList1)
+    },
+
  
     form_export() {
     //获取请求表格数据的参数