Browse Source

15641654654136

East 3 years ago
parent
commit
c655ffc79a

+ 1 - 0
src/store/index.js

@@ -52,6 +52,7 @@ export default new Vuex.Store({
       }).then(res => {
         if (res.data.code === 0) {
           content.commit('setManList', res.data.all)
+          console.log(res.data.all);
           // content.state.manList = res.data.all
         }
       })

+ 1 - 1
src/views/modules/basic/period.vue

@@ -263,7 +263,7 @@ export default {
         url: this.$http.adornUrl('/management/period/list'),
         method: 'get',
         params: this.$http.adornParams({
-          page: 1,
+          page: this.pageIndex,
           limit: 10,
           keyword: this.dataForm.key || undefined,
           pigstyId: this.dataForm.pigstyId || undefined,

+ 7 - 5
src/views/modules/health/hisolate.vue

@@ -150,14 +150,15 @@
             </el-input>
           </el-form-item>
           <el-form-item label="疾病名称" prop="diseaseName" >
-            <el-select v-model="dataForm.diseaseName">
+            <el-select v-model="dataForm.diseaseName" style="width: 100%">
               <el-option v-for="item in illnesList" :key="item.id" :value="item.idseaseName" :label="item.idseaseName"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="操作人" prop="doctorId">
             <el-select
                 @change="onChangeMan($event)"
-                v-model="dataForm.doctorId">
+                v-model="dataForm.doctorId"
+                style="width: 100%">
               <el-option
                   v-for="item in manList"
                   :key="item.id"
@@ -208,7 +209,7 @@ export default {
         pigCode: ''
       },
       dataRule: {
-        pigId: [
+        pigCode: [
           { required: true, message: '猪只耳标不能为空', trigger: 'blur' }
         ],
         diseaseName: [
@@ -287,7 +288,7 @@ export default {
             id: this.dataForm.id == '' ? undefined : this.dataForm.id,
             pigCode: this.dataForm.pigCode,
             diseaseName: this.dataForm.diseaseName,
-            manId: this.dataForm.manId,
+            manId: this.dataForm.doctorId,
             manName: this.dataForm.manName,
             medicalRecordId: this.dataForm.medicalRecordId
           }
@@ -313,11 +314,12 @@ export default {
       })
     },
     addOrUpdateHandle (row) {
+      console.log(row);
       this.visibleDialog = true
       this.dataForm = {
         id: row.id,
         diseaseName: row.diseaseName,
-        manId: row.manId,
+        doctorId: row.manId,
         manName: row.manName,
         medicalRecordId: row.medicalRecordId,
         pigCode: row.pigCode

+ 3 - 3
src/views/modules/pigbasic/pbentry.vue

@@ -42,7 +42,7 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item style="width: 140px">
+            <!-- <el-form-item style="width: 140px">
               <el-select placeholder="养殖状态" v-model="form.outFenceStatus">
                 <el-option
                   v-for="item in outFenceStatus"
@@ -51,7 +51,7 @@
                   :value="item.value">
                 </el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item style="width: 140px">
               <el-select 
                 placeholder="猪舍" 
@@ -363,7 +363,7 @@
             'sex': this.form.sex || undefined,
             'breed': this.form.breed || undefined,
             'healthStatus': this.form.healthStatus || (this.form.healthStatus === 0?this.form.healthStatus: undefined),
-            'outFenceStatus': this.form.outFenceStatus || (this.form.outFenceStatus === 0?this.form.outFenceStatus: undefined),
+            // 'outFenceStatus': this.form.outFenceStatus || (this.form.outFenceStatus === 0?this.form.outFenceStatus: undefined),
             'periodId': this.form.periodId || undefined,
             'pigstyId': this.form.pigstyId || undefined,
             'unitId': this.form.unitId || undefined

+ 19 - 4
src/views/modules/pigbasic/pbexit.vue

@@ -18,6 +18,16 @@
                 </el-option>
               </el-select>
             </el-form-item>
+            <el-form-item>
+              <el-date-picker
+                v-model="form.date"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </el-form-item>
             <el-form-item style="width: 140px">
               <el-select placeholder="品种" v-model="form.breed">
                 <el-option
@@ -140,7 +150,7 @@
             @selection-change="selectionChangeHandle"
             style="width: 100%;"
             size="mini"
-            height="540"
+            height="490"
             :header-cell-style="{background:'rgb(245,245,245)',color:'#000',height: '45px',fontSize: '13px',fontWeight: 'normal',borderBottom: '1px solid #ccc'}" 
             :cell-style="{color: '#888',fontSize: '13px'}">
             <el-table-column
@@ -230,12 +240,14 @@
                   查看
                 </el-button> -->
                 <el-button
+                  v-if="scope.row.outFenceStatus !== 1"
                   type="text"
                   size="medium"
                   @click="deleteHandle(scope.row)"
                   style="color: rgb(24,144,255)">
                   出栏
                 </el-button>
+                <span v-else>已出栏</span>
               </template>
             </el-table-column>
           </el-table>
@@ -271,7 +283,8 @@
           outFenceStatus: '',
           periodId: '',
           pigstyId: '',
-          unitId: ''
+          unitId: '',
+          date: null
         },
         dataList: [],
         pageIndex: 1,
@@ -362,7 +375,9 @@
             'outFenceStatus': this.form.outFenceStatus || (this.form.outFenceStatus === 0?this.form.outFenceStatus: undefined),
             'periodId': this.form.periodId || undefined,
             'pigstyId': this.form.pigstyId || undefined,
-            'unitId': this.form.unitId || undefined
+            'unitId': this.form.unitId || undefined,
+            'startDate': this.form.date? this.form.date[0]: undefined,
+            'endDate': this.form.date? this.form.date[1]: undefined
           })
         }).then(async({data}) => {
           // 猪舍List
@@ -564,7 +579,7 @@
   padding-bottom: 10px;
 }
 .rect-table {
-  margin-top: 20px;
+  margin-top: 70px;
 }
 .demo-table-expand {
   font-size: 0;