1
0
panhui 7 rokov pred
rodič
commit
50caf30f52

+ 3 - 2
src/main/vue/src/components/SubMenu.vue

@@ -99,8 +99,8 @@
                         left: this.x + this.w + 'px',
                         left: this.x + this.w + 'px',
                         height: 56 * this.c + 10 + 'px',
                         height: 56 * this.c + 10 + 'px',
                         paddingLeft: '5px',
                         paddingLeft: '5px',
-                        zIndex: 3,
-                        top: this.top + 'px'
+                        zIndex: 999,
+                        top: this.top + 'px',
                     }
                     }
                     // if (this.y + 56 * this.c + 10 > window.innerHeight) {
                     // if (this.y + 56 * this.c + 10 > window.innerHeight) {
                     //     style.top = window.innerHeight - 56 * this.c - 15 + 'px'
                     //     style.top = window.innerHeight - 56 * this.c - 15 + 'px'
@@ -286,4 +286,5 @@
         opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
         opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
         overflow: hidden;
         overflow: hidden;
     }
     }
+
 </style>
 </style>

+ 262 - 0
src/main/vue/src/pages/HandleAbortion.vue

@@ -0,0 +1,262 @@
+<template>
+    <el-container style="flex-grow:1">
+        <el-main class="containMain">
+            <div class="contentTitle">{{pageTitle}}</div>
+            <el-form ref="form" :model="formData" label-width="80px" style="margin-top:20px;">
+                <el-form-item label="" label-width="0">
+                    <el-input v-model="formData.cowID" prefix-icon="el-icon-search" style="width:300px" maxlength="8"></el-input>
+                    <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button>
+                </el-form-item>
+                <div class="sub" v-if="tableData.length>0">
+                    操作牛号:{{tableData[0].value}}
+                </div>
+                <el-form-item label="是否见胎">
+                    <el-radio-group v-model="formData.isSeenFetus">
+                        <el-radio label="0">是</el-radio>
+                        <el-radio label="1">否</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item label="流产类型">
+                    <el-select v-model="formData.unnormalCalvType" placeholder="请选择">
+                        <el-option v-for="item in ['流产']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="流产原因">
+                    <el-select v-model="formData.unnormalCalvReason" placeholder="请选择">
+                        <el-option v-for="item in reasons" v-if="reasons.length>0" :key="item['名称']" :label="item['名称']" :value="item['名称']">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+
+                <div style="margin-top:80px">
+                    <el-button @click="onSave" type="primary" style="width:98px;" size="mediu">确认提交</el-button>
+
+                </div>
+            </el-form>
+        </el-main>
+        <el-aside class="containAside" width="450px">
+            <div class="asideInfo">
+                <div class="contentTitle">牛只信息</div>
+                <el-table class="handleTable" border :data="tableData" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                    <el-table-column prop="key" label="参数">
+                    </el-table-column>
+                    <el-table-column prop="value" label="当前牛只信信息">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+    </el-container>
+
+    <!-- <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="icon" label="头像">
+                <single-upload v-model="formData.icon"></single-upload>
+            </el-form-item>
+            <el-form-item prop="username" label="用户名">
+                <el-input v-model="formData.username"></el-input>
+            </el-form-item>
+            <el-form-item prop="phone" label="手机">
+                <el-input v-model="formData.phone"></el-input>
+            </el-form-item>
+            <el-form-item prop="phone" label="密码" v-if="!$route.query.id">
+                <el-input v-model="formData.password"></el-input>
+            </el-form-item>
+            <el-form-item prop="roleId" label="角色">
+                <el-select v-model="formData.roleId" multiple placeholder="请选择" style="width: 100%;">
+                    <el-option
+                        v-for="item in roles"
+                        :key="item.id"
+                        :label="item.name"
+                        :value="item.id">
+                    </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item prop="departId" label="部门">
+                <el-cascader
+                    :options="departs"
+                    v-model="formData.departId">
+                </el-cascader>
+            </el-form-item>
+            <el-form-item prop="birthday" label="生日">
+                <el-date-picker
+                    v-model="formData.birthday"
+                    format="yyyy-MM-dd"
+                    value-format="timestamp">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item prop="createTime" label="创建时间">
+                <el-date-picker
+                    v-model="formData.createTime"
+                    type="datetime"
+                    format="yyyy-MM-dd HH:mm:ss"
+                    value-format="timestamp">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div> -->
+</template>
+<script>
+import formValidator from '../formValidator'
+import axios from 'axios'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        //流产原因
+        this.getHaleInfo('wsBreeding', 'getUnnormalCalvReason', [], 'list').then((data) => {
+            this.reasons = data
+            this.formData.unnormalCalvReason = data[0]['名称']
+        })
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                "cowID": '',
+                "isSeenFetus": '1',
+                "isAddLact": '1',
+                "unnormalCalvReason": '',
+                "unnormalCalvType": '流产',
+                "operators": '',
+                "unnormalCalvDate": '',
+                "mateDate": ''
+            },
+            reasons: [],
+            tableData: []
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'allHeight']),
+        pageTitle() {
+            return this.$route.meta.title
+        }
+    },
+    watch: {
+        'formData.reason'() {
+            setTimeout(() => {
+                this.formData.remark = this.remarks[0]
+            }, 100)
+        },
+        'formData.cowID'() {
+            if (this.formData.cowID.length != 8) {
+                return
+            }
+            this.getNowCow()
+        }
+    },
+    methods: {
+        onSave() {
+            if (!this.formData.cowID) {
+                this.$message({
+                    message: '请录入牛只牛号',
+                    type: 'warning'
+                });
+                return
+            }
+            var formData = { ...this.formData }
+            formData.operators = this.userInfo.username
+            formData.unnormalCalvDate = Date.parse(new Date())
+            formData.isSeenFetus = formData.isSeenFetus == '1' ? true : false
+            formData.isAddLact = formData.isAddLact == 1 ? true : false
+
+            this.getHaleInfo('wsBreeding', 'addUnnormalCalv', [formData], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    this.$alert(data.rtnMessage, '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.$message({
+                        message: '录入成功',
+                        type: 'success'
+                    });
+                    this.formData.cowID = ''
+                }
+            })
+        },
+        getNowCow() {
+
+            this.getCowInfo(this.formData.cowID, 1).then((data) => {
+                // console.log(data)
+                var list = []
+                Object.keys(data).forEach(item => {
+                    list.push({
+                        key: item,
+                        value: data[item]
+                    })
+                })
+
+                // console.log(list)
+
+                this.tableData = list
+
+                this.formData.mateDate = Date.parse(new Date(data['最后配种日期']))
+
+                // if (data['繁殖状态'] != '复检有胎' || data['繁殖状态'] != '初检已孕') {
+                //     this.$alert('当前牛号已经有胎,不允许录入发情信息。(可以通过数据更正方式重置上次的妊检结果为未孕或无胎,再进行操作)', '提示', {
+                //         confirmButtonText: '确定',
+                //         callback: action => {
+                //             this.formData.cowID = ''
+                //         }
+                //     });
+                // }
+            }).catch(() => {
+                this.formData.cowID = ''
+            })
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.containMain {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    padding: 15px;
+    // margin-right: 10px;
+    .contentTitle {
+        border-bottom: 1px solid #f2f4f5;
+    }
+    // min-width: 450px;
+
+    .sub {
+        font-size: 14px;
+        font-weight: 600;
+        color: rgba(102, 102, 102, 1);
+        line-height: 20px;
+        margin-bottom: 40px;
+        padding-left: 20px;
+    }
+}
+
+.contentTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    letter-spacing: 1px;
+    padding-bottom: 14px;
+}
+
+.containAside {
+    padding: 0;
+    margin-left: 10px;
+    display: flex;
+    flex-direction: column;
+    .asideInfo {
+        flex-grow: 1;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4px;
+        padding: 15px;
+    }
+}
+</style>

+ 460 - 0
src/main/vue/src/pages/HandleDryMilk.vue

@@ -0,0 +1,460 @@
+<template>
+    <el-container style="flex-grow:1" v-loading="loading">
+        <el-aside class="containAside" width="500px" style=" margin-right: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">{{pageTitle}}
+
+                    <span></span>
+                </div>
+                <div class="selectContent">
+                    <el-select v-model="task" placeholder="请选择干奶任务" style="width:180px">
+                        <el-option v-for="item in ['提前干奶','干奶预警']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                    <el-select v-model="cowshed" placeholder="请选择牛舍" style="width:180px">
+                        <el-option v-for="item in cowShedList" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+
+                    <el-button type="primary" plain @click="isBath=!isBath">{{isBath?'单头':'批量'}}</el-button>
+
+                </div>
+                <div class="tableNum">
+                    {{filitList.length}}头奶牛
+                </div>
+                <el-table class="handleTable" border :data="filitList" style="width: 100%" @selection-change="handleSelectionChange" :height='(allHeight-184)+"px"' size='small' @row-click='rowClick'>
+                    <el-table-column type="selection" v-if='isBath'>
+                    </el-table-column>
+                    <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前牛舍" label="牛舍" align="center">
+                    </el-table-column>
+                    <!-- <el-table-column prop="内容" label="内容" align="center" >
+                    </el-table-column> -->
+                    <el-table-column prop="建议干奶日期" label="建议干奶日期" min-width="100" align="center">
+                    </el-table-column>
+                    <el-table-column prop="配种日期" label="配种日期" min-width="100" align="center">
+                    </el-table-column>
+                    <el-table-column prop="预产日期" label="预产日期" min-width="100" align="center">
+                    </el-table-column>
+                    <el-table-column prop="怀孕天数" label="怀孕天数" align="center">
+                    </el-table-column>
+                    <el-table-column prop="胎次" label="胎次" align="center">
+                    </el-table-column>
+                    <el-table-column prop="盲乳个数" label="盲乳个数" align="center">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+        <el-main class="containMain">
+            <div class="contentTitle">干奶信息登记</div>
+            <el-form ref="form" :model="formData" label-width="100px" style="margin-top:20px;">
+                <el-form-item label="" label-width="0">
+                    <el-input v-model="formData.cowID" prefix-icon="el-icon-search" disabled style="width:300px"></el-input>
+                    <!-- <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button> -->
+                </el-form-item>
+                <div class="sub" v-if="tableData.length>0">
+                    操作牛号:{{tableData[0].value}}
+                </div>
+
+                <el-form-item label="干奶类型">
+                    <el-select v-model="formData.dryType" placeholder="请选择">
+                        <el-option v-for="item in ['提前干奶', '推后干奶', '正常干奶']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="是否异常干奶">
+                    <el-radio-group v-model="formData.isAbnormal">
+                        <el-radio label="0">是</el-radio>
+                        <el-radio label="1">否</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item label="异常干奶原因" v-if="formData.isAbnormal=='0'">
+                    <el-select v-model="formData.abnormalReason" placeholder="请选择">
+                        <el-option v-for="item in  ['禁配', '营养代谢性疾病', '消化系统疾病', '乳房疾病', '四肢疾病', '外科感染', '损伤', '疝']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="药物名称">
+                    <el-select v-model="formData.drugName" placeholder="请选择">
+                        <el-option v-for="item in ['安倍宁', '奶扶舒', '齐利宁', '乳炎平', '赛福魁']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="药物剂量">
+                    <el-input v-model="formData.drugDose" style="width:215px"></el-input>
+                </el-form-item>
+                <div style="margin-top:80px">
+                    <el-button @click="onSave" type="primary" style="width:98px;" size="mediu">确认提交</el-button>
+
+                </div>
+            </el-form>
+        </el-main>
+        <el-aside class="containAside" width="450px" style=" margin-left: 10px;" v-if="!isBath">
+            <div class="asideInfo">
+                <div class="contentTitle">牛只信息</div>
+                <el-table class="handleTable" border :data="tableData" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                    <el-table-column prop="key" label="参数">
+                    </el-table-column>
+                    <el-table-column prop="value" label="当前牛只信信息">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+    </el-container>
+</template>
+<script>
+import formValidator from '../formValidator'
+import axios from 'axios'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        //妊娠检查列表
+        this.getList()
+        // //配种方式
+        // this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
+        //     this.mateModes = data
+        //     this.formData.mateMode = data[0]['详细方式']
+        // })
+        // //冻精列表
+        // this.getHaleInfo('wsCow', 'getAllBullByFarmName', [
+        //     this.$store.state.farmName, true
+        // ], 'list').then((data) => {
+        //     this.bulls = data
+        // })
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                cowID: '',
+                dryDate: '',
+                currFarm: '',
+                currGroup: '',
+                mateDate: '',
+                currCategory: '',
+                dryType: '正常干奶',
+                isAbnormal: '1',
+                abnormalReason: '禁配',
+                isDrugTreated: true,
+                drugName: '安倍宁',
+                drugDose: ''
+            },
+            mateModes: [],
+            methods: ['人工观察', '计步器揭发', '同期发情'],
+            bulls: [],
+            tableData: [],
+            list: [],
+            cowshed: '',
+            task: '干奶预警',
+            isBath: false,
+            chooseList: [],
+            loading: false
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'allHeight']),
+        pageTitle() {
+            return this.$route.meta.title
+        },
+        bullMsg() {
+            var jsonp = {}
+            if (this.formData.bull) {
+                this.bulls.forEach(item => {
+                    if (item['牛号'] == this.formData.bull) {
+                        jsonp = item
+                    }
+                })
+            }
+
+            return jsonp
+
+
+        },
+        filitList() {
+            var list = []
+            if (this.cowshed) {
+                if (this.cowshed == '全部牛舍') {
+                    list = this.list
+                }
+                else {
+                    this.list.forEach(item => {
+                        if (item['当前牛舍'] == this.cowshed) {
+                            list.push(item)
+                        }
+                    })
+                }
+
+            }
+            return list
+        },
+        cowShedList() {
+            var list = ['全部牛舍']
+            this.list.forEach(item => {
+                if (list.indexOf(item['当前牛舍']) === -1) {
+                    list.push(item['当前牛舍'])
+                }
+            })
+            return list
+        },
+    },
+    watch: {
+        task() {
+            this.getList()
+            this.cowshed=''
+        }
+    },
+    methods: {
+        getList() {
+            this.getHaleInfo('wsVeterinary', 'getDryMilkTask', [this.$store.state.farmName, this.task == '提前干奶'], 'list').then((data) => {
+                console.log(data)
+                this.list = data
+
+
+
+            })
+        },
+        onSave() {
+            if (!this.formData.cowID) {
+                this.$message({
+                    message: '请录入牛只牛号',
+                    type: 'warning'
+                });
+                return
+            }
+
+            if (!this.formData.drugDose) {
+                this.$message({
+                    message: '请录入药物剂量',
+                    type: 'warning'
+                });
+                return
+            }
+
+            if (this.isBath) {
+                this.saveList(0)
+                return
+            }
+
+            var formData = { ...this.formData }
+            formData.isAbnormal = (formData.isAbnormal == '0')
+            if (!formData.isAbnormal) {
+                delete formData.abnormalReason
+            }
+
+            this.getHaleInfo('wsVeterinary', 'addDryMilk', [formData], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    this.$alert(data.rtnMessage, '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.$message({
+                        message: '录入成功',
+                        type: 'success'
+                    });
+                    this.formData.cowID = ''
+                    this.getList()
+                }
+            })
+        },
+        saveList(index) {
+            this.loading = true
+            if (index >= this.chooseList.length) {
+                this.loading = false
+                this.$alert('成功录入' + this.chooseList.length + '头干奶信息', '成功', {
+                    confirmButtonText: '确定',
+                    callback: action => {
+                        this.chooseList = []
+                        this.getList()
+                        this.formData.cowID = ''
+                    }
+                });
+                return
+            }
+            var formData = {
+                cowID: this.chooseList[index]['牛号'],
+                dryDate: Date.parse(new Date()),
+                currFarm: this.chooseList[index]['牧场'],
+                currGroup: this.chooseList[index]['当前牛舍'],
+                mateDate: Date.parse(new Date(this.chooseList[index]['配种日期'])),
+                currCategory: this.chooseList[index]['当前牛舍'],
+                dryType: this.formData.dryType,
+                isAbnormal: this.formData.isAbnormal == '0',
+                abnormalReason: this.formData.abnormalReason,
+                isDrugTreated: true,
+                drugName: this.formData.drugName,
+                drugDose: this.formData.drugDose
+            }
+
+            if (!formData.isAbnormal) {
+                delete formData.abnormalReason
+            }
+
+            this.getHaleInfo('wsVeterinary', 'addDryMilk', [formData], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    this.loading = false
+                    this.$alert(this.chooseList[index]['牛号'] + data.rtnMessage + ',已录入' + index + '头牛,录入中断', '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.chooseList = []
+                            this.getList()
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.saveList(index + 1)
+                }
+            })
+        },
+        getNowCow(row) {
+            // console.log(row)
+            var list = []
+            Object.keys(row).forEach(item => {
+                list.push({
+                    key: item,
+                    value: row[item]
+                })
+            })
+
+            // console.log(list)
+
+            this.tableData = list
+
+
+        },
+        rowClick(row) {
+            // console.log(row)
+            if (!this.isBath) {
+                // this.formData = {
+                //     cowID: row['牛号'],
+                //     geCheckMethod: '直肠检测法',
+                //     geCheckResult: '',
+                //     isReCheck: false,
+                //     operators: ''
+                // }
+                this.formData = {
+                    cowID: row['牛号'],
+                    dryDate: Date.parse(new Date()),
+                    currFarm: row['牧场'],
+                    currGroup: row['当前牛舍'],
+                    mateDate: Date.parse(new Date(row['配种日期'])),
+                    currCategory: row['当前牛舍'],
+                    dryType: '正常干奶',
+                    isAbnormal: '1',
+                    abnormalReason: '禁配',
+                    isDrugTreated: true,
+                    drugName: '安倍宁',
+                    drugDose: ''
+                }
+
+                var jsonp = { ...row }
+
+                this.getNowCow(jsonp)
+            }
+
+        },
+        handleSelectionChange(val) {
+            this.chooseList = val
+            if (val.length > 0) {
+                this.formData.cowID = val[0]['牛号'] + '...'
+            }
+            else {
+                this.formData.cowID = ''
+            }
+
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.containMain {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    padding: 15px;
+    // margin-right: 10px;
+    .contentTitle {
+        border-bottom: 1px solid #f2f4f5;
+    }
+    // min-width: 450px;
+
+    .sub {
+        font-size: 14px;
+        font-weight: 600;
+        color: rgba(102, 102, 102, 1);
+        line-height: 20px;
+        margin-bottom: 40px;
+        padding-left: 20px;
+    }
+}
+
+.contentTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    letter-spacing: 1px;
+    padding-bottom: 14px;
+    span {
+        font-size: 13px;
+        color: rgba(102, 102, 102, 1);
+        line-height: 18px;
+        margin-left: 10px;
+    }
+}
+
+.selectContent {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20px 0;
+}
+
+.tableNum {
+    font-size: 13px;
+    font-weight: bold;
+    color: rgba(102, 102, 102, 1);
+    line-height: 18px;
+    padding-bottom: 15px;
+}
+
+.containAside {
+    padding: 0;
+
+    display: flex;
+    flex-direction: column;
+    .asideInfo {
+        flex-grow: 1;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4px;
+        padding: 15px;
+    }
+}
+
+.item {
+    .item-title {
+        font-size: 14px;
+        font-weight: bold;
+
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        letter-spacing: 1px;
+    }
+
+    .text {
+        font-size: 13px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 18px;
+        letter-spacing: 1px;
+        word-wrap: break-word;
+        padding: 10px 0 15px;
+    }
+}
+</style>

+ 364 - 0
src/main/vue/src/pages/HandleInitial.vue

@@ -0,0 +1,364 @@
+<template>
+    <el-container style="flex-grow:1">
+        <el-aside class="containAside" width="500px" style=" margin-right: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">{{pageTitle}}
+
+                    <span></span>
+                </div>
+                <div class="selectContent">
+                    <el-select v-model="cowshed" placeholder="请选择牛舍" style="width:180px">
+                        <el-option v-for="item in cowShedList" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+
+                    <div style="width:180px">
+                        <el-input v-model="filitDay" placeholder="请输入配后天数" style="wdith:180px">
+                            <template slot="prepend">
+                                <i class="el-icon-arrow-right"></i>
+                            </template>
+                        </el-input>
+                    </div>
+                    <el-button type="primary" plain @click="filitDayList=filitDay">筛选</el-button>
+
+                </div>
+                <div class="tableNum">
+                    {{filitList.length}}头奶牛
+                </div>
+                <el-table class="handleTable" border :data="filitList" style="width: 100%" :height='(allHeight-184)+"px"' size='small' @row-click='rowClick'>
+                    <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前牛舍" label="牛舍" align="center">
+                    </el-table-column>
+                    <!-- <el-table-column prop="内容" label="内容" align="center" >
+                    </el-table-column> -->
+                    <el-table-column prop="最近配种日期" label="最近配种日期" min-width="100" align="center">
+                    </el-table-column>
+                    <el-table-column prop="配后天数" label="配后天数" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前胎次" label="胎次" align="center">
+                    </el-table-column>
+                    <el-table-column prop="繁殖状态" label="繁殖状态" align="center">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+        <el-main class="containMain">
+            <div class="contentTitle">初检信息登记</div>
+            <el-form ref="form" :model="formData" label-width="80px" style="margin-top:20px;">
+                <el-form-item label="" label-width="0">
+                    <el-input v-model="formData.cowID" prefix-icon="el-icon-search" style="width:300px" maxlength="8"></el-input>
+                    <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button>
+                </el-form-item>
+                <div class="sub" v-if="tableData.length>0">
+                    操作牛号:{{tableData[0].value}}
+                </div>
+
+                <el-form-item label="妊检方法">
+                    <el-select v-model="formData.geCheckMethod" placeholder="请选择">
+                        <el-option v-for="item in ['直肠检测法']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="妊检结果">
+                    <el-select v-model="formData.geCheckResult" placeholder="请选择">
+                        <el-option v-for="item in ['初检已孕','初检未孕']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <div style="margin-top:80px">
+                    <el-button @click="onSave" type="primary" style="width:98px;" size="mediu">确认保存</el-button>
+
+                </div>
+            </el-form>
+        </el-main>
+        <el-aside class="containAside" width="450px" style=" margin-left: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">牛只信息</div>
+                <el-table class="handleTable" border :data="tableData" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                    <el-table-column prop="key" label="参数">
+                    </el-table-column>
+                    <el-table-column prop="value" label="当前牛只信信息">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+    </el-container>
+</template>
+<script>
+import formValidator from '../formValidator'
+import axios from 'axios'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        //妊娠检查列表
+        this.getList()
+        // //配种方式
+        // this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
+        //     this.mateModes = data
+        //     this.formData.mateMode = data[0]['详细方式']
+        // })
+        // //冻精列表
+        // this.getHaleInfo('wsCow', 'getAllBullByFarmName', [
+        //     this.$store.state.farmName, true
+        // ], 'list').then((data) => {
+        //     this.bulls = data
+        // })
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                cowID: '',
+                geCheckMethod: '直肠检测法',
+                geCheckResult: '',
+                isReCheck: false,
+                operators: '',
+            },
+            mateModes: [],
+            methods: ['人工观察', '计步器揭发', '同期发情'],
+            bulls: [],
+            tableData: [],
+            list: [],
+            cowshed: '',
+            cowShedList: [],
+            filitDay: 40,
+            filitDayList: 40
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'allHeight']),
+        pageTitle() {
+            return this.$route.meta.title
+        },
+        bullMsg() {
+            var jsonp = {}
+            if (this.formData.bull) {
+                this.bulls.forEach(item => {
+                    if (item['牛号'] == this.formData.bull) {
+                        jsonp = item
+                    }
+                })
+            }
+
+            return jsonp
+
+
+        },
+        filitList() {
+            var list = []
+            if (this.cowshed) {
+                this.list.forEach(item => {
+                    if (item['当前牛舍'] == this.cowshed && item['配后天数'] > this.filitDayList) {
+                        list.push(item)
+                    }
+                })
+            }
+            return list
+        }
+        // cowShedList() {
+        //     var list = []
+        //     this.list.forEach(item => {
+        //         var jsonp = { ...item }
+        //         if (list.indexOf(jsonp['当前牛舍'] === -1)) {
+        //             list.push(jsonp['当前牛舍'])
+        //         }
+        //     })
+        //     return list
+        // }
+    },
+    watch: {
+        'formData.reason'() {
+            setTimeout(() => {
+                this.formData.remark = this.remarks[0]
+            }, 100)
+        },
+        'formData.cowID'() {
+            if (this.formData.cowID.length != 8) {
+                return
+            }
+            this.getNowCow()
+        }
+    },
+    methods: {
+        getList() {
+            this.getHaleInfo('wsBreeding', 'getGeCheckDataTask', [this.$store.state.farmName, 1], 'list').then((data) => {
+                console.log(data)
+                this.list = data
+
+                data.forEach(item => {
+                    if (this.cowShedList.indexOf(item['当前牛舍']) === -1) {
+                        this.cowShedList.push(item['当前牛舍'])
+                    }
+                })
+
+            })
+        },
+        onSave() {
+            if (!this.formData.cowID) {
+                this.$message({
+                    message: '请录入牛只牛号',
+                    type: 'warning'
+                });
+                return
+            }
+
+            if (!this.formData.geCheckResult) {
+                this.$message({
+                    message: '请选择妊检结果',
+                    type: 'warning'
+                });
+                return
+            }
+
+            this.formData.geCheckDate = Date.parse(new Date())
+            this.formData.operators = this.userInfo.username
+
+            this.getHaleInfo('wsBreeding', 'addGeCheckInfo', [this.formData], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    this.$alert(data.rtnMessage, '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.$message({
+                        message: '录入成功',
+                        type: 'success'
+                    });
+                    this.formData.cowID = ''
+                    this.getList()
+                }
+            })
+        },
+        getNowCow() {
+
+            this.getCowInfo(this.formData.cowID, 2).then((data) => {
+                // console.log(data)
+                var list = []
+                Object.keys(data).forEach(item => {
+                    list.push({
+                        key: item,
+                        value: data[item]
+                    })
+                })
+
+                // console.log(list)
+
+                this.tableData = list
+                // if (data['繁殖状态'] == '复检有胎' || data['繁殖状态'] == '初检已孕') {
+                //     this.$alert('当前牛号已经有胎,不允许录入初检信息,但目前允许选择冻精进行数据查看等。(可通过数据更正方式重置上次的妊检结果为未孕或无胎,再进行操作)', '提示', {
+                //         confirmButtonText: '确定',
+                //         callback: action => {
+                //             this.formData.cowID = ''
+                //         }
+                //     });
+                // }
+            }).catch(() => {
+                this.formData.cowID = ''
+            })
+
+
+        },
+        rowClick(row) {
+            this.formData = {
+                cowID: row['牛号'],
+                geCheckMethod: '直肠检测法',
+                geCheckResult: '',
+                isReCheck: false,
+                operators: ''
+            }
+
+            this.getNowCow()
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.containMain {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    padding: 15px;
+    // margin-right: 10px;
+    .contentTitle {
+        border-bottom: 1px solid #f2f4f5;
+    }
+    // min-width: 450px;
+
+    .sub {
+        font-size: 14px;
+        font-weight: 600;
+        color: rgba(102, 102, 102, 1);
+        line-height: 20px;
+        margin-bottom: 40px;
+        padding-left: 20px;
+    }
+}
+
+.contentTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    letter-spacing: 1px;
+    padding-bottom: 14px;
+    span {
+        font-size: 13px;
+        color: rgba(102, 102, 102, 1);
+        line-height: 18px;
+        margin-left: 10px;
+    }
+}
+
+.selectContent {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20px 0;
+}
+
+.tableNum {
+    font-size: 13px;
+    font-weight: bold;
+    color: rgba(102, 102, 102, 1);
+    line-height: 18px;
+    padding-bottom: 15px;
+}
+
+.containAside {
+    padding: 0;
+
+    display: flex;
+    flex-direction: column;
+    .asideInfo {
+        flex-grow: 1;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4px;
+        padding: 15px;
+    }
+}
+
+.item {
+    .item-title {
+        font-size: 14px;
+        font-weight: bold;
+
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        letter-spacing: 1px;
+    }
+
+    .text {
+        font-size: 13px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 18px;
+        letter-spacing: 1px;
+        word-wrap: break-word;
+        padding: 10px 0 15px;
+    }
+}
+</style>

+ 30 - 13
src/main/vue/src/pages/HandleMatch.vue

@@ -6,12 +6,12 @@
 
 
                     <span>{{list.length}}头奶牛</span>
                     <span>{{list.length}}头奶牛</span>
                 </div>
                 </div>
-                <el-table class="handleTable" border :data="list" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                <el-table class="handleTable" border :data="list" style="width: 100%" :height='(allHeight-70)+"px"' size='small' @row-click='rowClick'>
                     <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
                     <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="当前牛舍" label="牛舍" align="center">
                     <el-table-column prop="当前牛舍" label="牛舍" align="center">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="发情观察日期" label="发情日期" align="center">
+                    <el-table-column prop="发情观察日期" label="发情日期" align="center" min-width="100">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="繁殖状态" label="繁殖状态" align="center">
                     <el-table-column prop="繁殖状态" label="繁殖状态" align="center">
                     </el-table-column>
                     </el-table-column>
@@ -63,7 +63,7 @@
                     </div>
                     </div>
                 </el-form-item>
                 </el-form-item>
 
 
-                 <el-form-item label="配种员">
+                <el-form-item label="配种员">
                     <el-select v-model="formData.person" placeholder="请选择">
                     <el-select v-model="formData.person" placeholder="请选择">
                         <el-option v-for="item in [userInfo.username]" :key="item" :label="item" :value="item">
                         <el-option v-for="item in [userInfo.username]" :key="item" :label="item" :value="item">
                         </el-option>
                         </el-option>
@@ -96,13 +96,7 @@ import { mapState } from 'vuex'
 export default {
 export default {
     created() {
     created() {
         //配种列表
         //配种列表
-        this.getHaleInfo('wsBreeding', 'getMateDataTask', [
-            this.$store.state.farmName
-        ], 'list').then((data) => {
-            console.log(data)
-            this.list = data
-
-        })
+        this.getList()
         //配种方式
         //配种方式
         this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
         this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
             this.mateModes = data
             this.mateModes = data
@@ -124,13 +118,13 @@ export default {
                 isMate: '0',
                 isMate: '0',
                 mateMode: '',
                 mateMode: '',
                 bull: '',
                 bull: '',
-                person:'',
+                person: '',
             },
             },
             mateModes: [],
             mateModes: [],
             methods: ['人工观察', '计步器揭发', '同期发情'],
             methods: ['人工观察', '计步器揭发', '同期发情'],
             bulls: [],
             bulls: [],
             tableData: [],
             tableData: [],
-            list: []
+            list: [],
         }
         }
     },
     },
     computed: {
     computed: {
@@ -167,6 +161,15 @@ export default {
         }
         }
     },
     },
     methods: {
     methods: {
+        getList() {
+            this.getHaleInfo('wsBreeding', 'getMateDataTask', [
+                this.$store.state.farmName
+            ], 'list').then((data) => {
+                console.log(data)
+                this.list = data
+
+            })
+        },
         onSave() {
         onSave() {
             if (!this.formData.cowID) {
             if (!this.formData.cowID) {
                 this.$message({
                 this.$message({
@@ -218,6 +221,7 @@ export default {
                         type: 'success'
                         type: 'success'
                     });
                     });
                     this.formData.cowID = ''
                     this.formData.cowID = ''
+                    this.getList()
                 }
                 }
             })
             })
         },
         },
@@ -247,6 +251,19 @@ export default {
             }).catch(() => {
             }).catch(() => {
                 this.formData.cowID = ''
                 this.formData.cowID = ''
             })
             })
+
+
+        },
+        rowClick(row) {
+            this.formData = {
+                cowID: row['牛号'],
+                isMate: '0',
+                mateMode: this.mateModes['详细方式'],
+                bull: '',
+                person: '',
+            }
+
+            this.getNowCow()
         }
         }
     }
     }
 }
 }
@@ -315,7 +332,7 @@ export default {
         color: rgba(0, 0, 0, 1);
         color: rgba(0, 0, 0, 1);
         line-height: 18px;
         line-height: 18px;
         letter-spacing: 1px;
         letter-spacing: 1px;
-        word-wrap:break-word ;
+        word-wrap: break-word;
         padding: 10px 0 15px;
         padding: 10px 0 15px;
     }
     }
 }
 }

+ 364 - 0
src/main/vue/src/pages/HandleRecheck.vue

@@ -0,0 +1,364 @@
+<template>
+    <el-container style="flex-grow:1">
+        <el-aside class="containAside" width="500px" style=" margin-right: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">{{pageTitle}}
+
+                    <span></span>
+                </div>
+                <div class="selectContent">
+                    <el-select v-model="cowshed" placeholder="请选择牛舍" style="width:180px">
+                        <el-option v-for="item in cowShedList" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+
+                    <div style="width:180px">
+                        <el-input v-model="filitDay" placeholder="请输入配后天数" style="wdith:180px">
+                            <template slot="prepend">
+                                <i class="el-icon-arrow-right"></i>
+                            </template>
+                        </el-input>
+                    </div>
+                    <el-button type="primary" plain @click="filitDayList=filitDay">筛选</el-button>
+
+                </div>
+                <div class="tableNum">
+                    {{filitList.length}}头奶牛
+                </div>
+                <el-table class="handleTable" border :data="filitList" style="width: 100%" :height='(allHeight-184)+"px"' size='small' @row-click='rowClick'>
+                    <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前牛舍" label="牛舍" align="center">
+                    </el-table-column>
+                    <!-- <el-table-column prop="内容" label="内容" align="center" >
+                    </el-table-column> -->
+                    <el-table-column prop="最近配种日期" label="最近配种日期" min-width="100" align="center">
+                    </el-table-column>
+                    <el-table-column prop="配后天数" label="配后天数" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前胎次" label="胎次" align="center">
+                    </el-table-column>
+                    <el-table-column prop="繁殖状态" label="繁殖状态" align="center">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+        <el-main class="containMain">
+            <div class="contentTitle">复检信息登记</div>
+            <el-form ref="form" :model="formData" label-width="80px" style="margin-top:20px;">
+                <el-form-item label="" label-width="0">
+                    <el-input v-model="formData.cowID" prefix-icon="el-icon-search" style="width:300px" maxlength="8"></el-input>
+                    <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button>
+                </el-form-item>
+                <div class="sub" v-if="tableData.length>0">
+                    操作牛号:{{tableData[0].value}}
+                </div>
+
+                <el-form-item label="妊检方法">
+                    <el-select v-model="formData.geCheckMethod" placeholder="请选择">
+                        <el-option v-for="item in ['直肠检测法']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="妊检结果">
+                    <el-select v-model="formData.geCheckResult" placeholder="请选择">
+                        <el-option v-for="item in ['复检有胎','复检无胎']" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <div style="margin-top:80px">
+                    <el-button @click="onSave" type="primary" style="width:98px;" size="mediu">确认保存</el-button>
+
+                </div>
+            </el-form>
+        </el-main>
+        <el-aside class="containAside" width="450px" style=" margin-left: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">牛只信息</div>
+                <el-table class="handleTable" border :data="tableData" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                    <el-table-column prop="key" label="参数">
+                    </el-table-column>
+                    <el-table-column prop="value" label="当前牛只信信息">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+    </el-container>
+</template>
+<script>
+import formValidator from '../formValidator'
+import axios from 'axios'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        //妊娠检查列表
+        this.getList()
+        // //配种方式
+        // this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
+        //     this.mateModes = data
+        //     this.formData.mateMode = data[0]['详细方式']
+        // })
+        // //冻精列表
+        // this.getHaleInfo('wsCow', 'getAllBullByFarmName', [
+        //     this.$store.state.farmName, true
+        // ], 'list').then((data) => {
+        //     this.bulls = data
+        // })
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                cowID: '',
+                geCheckMethod: '直肠检测法',
+                geCheckResult: '',
+                isReCheck: true,
+                operators: '',
+            },
+            mateModes: [],
+            methods: ['人工观察', '计步器揭发', '同期发情'],
+            bulls: [],
+            tableData: [],
+            list: [],
+            cowshed: '',
+            cowShedList: [],
+            filitDay: 40,
+            filitDayList: 40
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'allHeight']),
+        pageTitle() {
+            return this.$route.meta.title
+        },
+        bullMsg() {
+            var jsonp = {}
+            if (this.formData.bull) {
+                this.bulls.forEach(item => {
+                    if (item['牛号'] == this.formData.bull) {
+                        jsonp = item
+                    }
+                })
+            }
+
+            return jsonp
+
+
+        },
+        filitList() {
+            var list = []
+            if (this.cowshed) {
+                this.list.forEach(item => {
+                    if (item['当前牛舍'] == this.cowshed && item['配后天数'] > this.filitDayList) {
+                        list.push(item)
+                    }
+                })
+            }
+            return list
+        }
+        // cowShedList() {
+        //     var list = []
+        //     this.list.forEach(item => {
+        //         var jsonp = { ...item }
+        //         if (list.indexOf(jsonp['当前牛舍'] === -1)) {
+        //             list.push(jsonp['当前牛舍'])
+        //         }
+        //     })
+        //     return list
+        // }
+    },
+    watch: {
+        'formData.reason'() {
+            setTimeout(() => {
+                this.formData.remark = this.remarks[0]
+            }, 100)
+        },
+        'formData.cowID'() {
+            if (this.formData.cowID.length != 8) {
+                return
+            }
+            this.getNowCow()
+        }
+    },
+    methods: {
+        getList() {
+            this.getHaleInfo('wsBreeding', 'getGeCheckDataTask', [this.$store.state.farmName,2], 'list').then((data) => {
+                console.log(data)
+                this.list = data
+
+                data.forEach(item => {
+                    if (this.cowShedList.indexOf(item['当前牛舍']) === -1) {
+                        this.cowShedList.push(item['当前牛舍'])
+                    }
+                })
+
+            })
+        },
+        onSave() {
+            if (!this.formData.cowID) {
+                this.$message({
+                    message: '请录入牛只牛号',
+                    type: 'warning'
+                });
+                return
+            }
+
+            if (!this.formData.geCheckResult) {
+                this.$message({
+                    message: '请选择妊检结果',
+                    type: 'warning'
+                });
+                return
+            }
+
+            this.formData.geCheckDate = Date.parse(new Date())
+            this.formData.operators = this.userInfo.username
+
+            this.getHaleInfo('wsBreeding', 'addGeCheckInfo', [this.formData], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    this.$alert(data.rtnMessage, '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.$message({
+                        message: '录入成功',
+                        type: 'success'
+                    });
+                    this.formData.cowID = ''
+                    this.getList()
+                }
+            })
+        },
+        getNowCow() {
+
+            this.getCowInfo(this.formData.cowID, 2).then((data) => {
+                // console.log(data)
+                var list = []
+                Object.keys(data).forEach(item => {
+                    list.push({
+                        key: item,
+                        value: data[item]
+                    })
+                })
+
+                // console.log(list)
+
+                this.tableData = list
+                // if (data['繁殖状态'] == '复检有胎' || data['繁殖状态'] == '初检已孕') {
+                //     this.$alert('当前牛号已经有胎,不允许录入初检信息,但目前允许选择冻精进行数据查看等。(可通过数据更正方式重置上次的妊检结果为未孕或无胎,再进行操作)', '提示', {
+                //         confirmButtonText: '确定',
+                //         callback: action => {
+                //             this.formData.cowID = ''
+                //         }
+                //     });
+                // }
+            }).catch(() => {
+                this.formData.cowID = ''
+            })
+
+
+        },
+        rowClick(row) {
+            this.formData = {
+                cowID: row['牛号'],
+                geCheckMethod: '直肠检测法',
+                geCheckResult: '',
+                isReCheck: true,
+                operators: ''
+            }
+
+            this.getNowCow()
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.containMain {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    padding: 15px;
+    // margin-right: 10px;
+    .contentTitle {
+        border-bottom: 1px solid #f2f4f5;
+    }
+    // min-width: 450px;
+
+    .sub {
+        font-size: 14px;
+        font-weight: 600;
+        color: rgba(102, 102, 102, 1);
+        line-height: 20px;
+        margin-bottom: 40px;
+        padding-left: 20px;
+    }
+}
+
+.contentTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    letter-spacing: 1px;
+    padding-bottom: 14px;
+    span {
+        font-size: 13px;
+        color: rgba(102, 102, 102, 1);
+        line-height: 18px;
+        margin-left: 10px;
+    }
+}
+
+.selectContent {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20px 0;
+}
+
+.tableNum {
+    font-size: 13px;
+    font-weight: bold;
+    color: rgba(102, 102, 102, 1);
+    line-height: 18px;
+    padding-bottom: 15px;
+}
+
+.containAside {
+    padding: 0;
+
+    display: flex;
+    flex-direction: column;
+    .asideInfo {
+        flex-grow: 1;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4px;
+        padding: 15px;
+    }
+}
+
+.item {
+    .item-title {
+        font-size: 14px;
+        font-weight: bold;
+
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        letter-spacing: 1px;
+    }
+
+    .text {
+        font-size: 13px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 18px;
+        letter-spacing: 1px;
+        word-wrap: break-word;
+        padding: 10px 0 15px;
+    }
+}
+</style>

+ 413 - 0
src/main/vue/src/pages/HandleSimultaneousMatch.vue

@@ -0,0 +1,413 @@
+<template>
+    <el-container style="flex-grow:1">
+        <el-aside class="containAside" width="500px" style=" margin-right: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">{{pageTitle}}
+
+                    <!-- <span>{{list.length}}头奶牛</span> -->
+                </div>
+                <div class="selectContent">
+                    <el-select v-model="task" placeholder="请选择同期任务" style="width:180px">
+                        <el-option v-for="item in taskList" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+
+                    <el-select v-model="cowshed" placeholder="请选择牛舍" style="width:180px">
+                        <el-option v-for="item in cowShedList" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                    <el-button type="primary" plain @click="filitDayList=filitDay">筛选</el-button>
+
+                </div>
+                <div class="tableNum">
+                    {{filitList.length}}头奶牛
+                </div>
+                <el-table class="handleTable" border :data="filitList" style="width: 100%" :height='(allHeight-184)+"px"' size='small' @row-click='rowClick'>
+                    <el-table-column prop="牛号" label="牛号" fixed="left" align="center">
+                    </el-table-column>
+                    <el-table-column prop="当前牛舍" label="牛舍" align="center">
+                    </el-table-column>
+                    <el-table-column prop="繁殖状态" label="繁殖状态" align="center" min-width="100">
+                    </el-table-column>
+                    <el-table-column prop="产后|初检后" label="产后|初检后" width="100px" align="center">
+                    </el-table-column>
+                    <el-table-column prop="最近配种日期" label="最近配种" align="center">
+                    </el-table-column>
+                    <el-table-column prop="月龄" label="月龄" align="center">
+                    </el-table-column>
+                     <el-table-column prop="父号" label="父号" width="140px"  align="center">
+                    </el-table-column>
+                     <el-table-column prop="操作方案" label="操作方案" width="200px" align="center">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+        <el-main class="containMain">
+            <div class="contentTitle">同期配种信息登记</div>
+            <el-form ref="form" :model="formData" label-width="80px" style="margin-top:20px;">
+                <el-form-item label="" label-width="0">
+                    <el-input v-model="formData.cowID" disabled prefix-icon="el-icon-search" style="width:300px" maxlength="8"></el-input>
+                    <!-- <el-button type="primary" @click="getNowCow" style="width:90px;margin-left:12px">确认</el-button> -->
+                </el-form-item>
+                <div class="sub" v-if="tableData.length>0">
+                    操作牛号:{{tableData[0].value}}
+                </div>
+                <!-- <el-form-item label="建议配种">
+                    <el-radio-group v-model="formData.isMate">
+                        <el-radio label="0">是</el-radio>
+                        <el-radio label="1">否</el-radio>
+                    </el-radio-group>
+                </el-form-item> -->
+                <el-form-item label="配种方式">
+                    <el-select v-model="formData.mateMode" placeholder="请选择">
+                        <el-option v-for="item in mateModes" :key="item['详细方式']" :label="item['详细方式']" :value="item['详细方式']">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="配种冻精">
+                    <el-select v-model="formData.bull" placeholder="请选择">
+                        <el-option v-for="item in bulls" :key="item['牛号']" :label="item['牛号']" :value="item['牛号']">
+                        </el-option>
+                    </el-select>
+
+                    <div>
+                        <el-popover placement="right" width="200" trigger="hover">
+                            <div class="conetnt">
+                                <div class="item" v-for="(item,key) in bullMsg">
+                                    <div class="item-title">{{key}}</div>
+                                    <div class="text">{{item}}</div>
+                                </div>
+                            </div>
+                            <el-button type="text" slot="reference">查看此冻精详情</el-button>
+                        </el-popover>
+                    </div>
+                </el-form-item>
+
+                <!-- <el-form-item label="配种员">
+                    <el-select v-model="formData.person" placeholder="请选择">
+                        <el-option v-for="item in [userInfo.username]" :key="item" :label="item" :value="item">
+                        </el-option>
+                    </el-select>
+                </el-form-item> -->
+
+                <div style="margin-top:80px">
+                    <el-button @click="onSave" type="primary" style="width:98px;" size="mediu">确认保存</el-button>
+
+                </div>
+            </el-form>
+        </el-main>
+        <el-aside class="containAside" width="450px" style=" margin-left: 10px;">
+            <div class="asideInfo">
+                <div class="contentTitle">牛只信息</div>
+                <el-table class="handleTable" border :data="tableData" style="width: 100%" :height='(allHeight-70)+"px"' size='small'>
+                    <el-table-column prop="key" label="参数">
+                    </el-table-column>
+                    <el-table-column prop="value" label="当前牛只信信息">
+                    </el-table-column>
+                </el-table>
+            </div>
+        </el-aside>
+    </el-container>
+</template>
+<script>
+import formValidator from '../formValidator'
+import axios from 'axios'
+import { mapState } from 'vuex'
+export default {
+    created() {
+        //配种列表
+        this.getList(1)
+        //配种方式
+        this.getHaleInfo('wsCow', 'getUserDict', ['MateMode'], 'list').then((data) => {
+            this.mateModes = data
+            this.formData.mateMode = data[0]['详细方式']
+        })
+        //冻精列表
+        this.getHaleInfo('wsCow', 'getAllBullByFarmName', [
+            this.$store.state.farmName, true
+        ], 'list').then((data) => {
+            this.bulls = data
+        })
+
+    },
+    data() {
+        return {
+            saving: false,
+            formData: {
+                cowID: '',
+                isMate: '0',
+                mateMode: '',
+                bull: '',
+                person: '',
+            },
+            mateModes: [],
+            methods: ['人工观察', '计步器揭发', '同期发情'],
+            bulls: [],
+            tableData: [],
+            list: [],
+            cowshed: '',
+            task: '产后空怀牛同期',
+            taskList: ['产后空怀牛同期', '产后尚未配种泌乳牛同期', '繁殖障碍处理', '青年牛未孕同期', '十四月龄青年牛同期', '15.2月龄青年牛同期', '血液孕检无胎牛同期']
+        }
+    },
+    computed: {
+        ...mapState(['userInfo', 'allHeight']),
+        pageTitle() {
+            return this.$route.meta.title
+        },
+        bullMsg() {
+            var jsonp = {}
+            if (this.formData.bull) {
+                this.bulls.forEach(item => {
+                    if (item['牛号'] == this.formData.bull) {
+                        jsonp = item
+                    }
+                })
+            }
+
+            return jsonp
+
+
+        },
+        taskCowList() {
+            var list = []
+            if(this.task){
+                this.list.forEach(item=>{
+                    if(item['操作方案']==this.task+'方案'){
+                        list.push(item)
+                    }
+                })
+            }
+            return list
+        },
+        cowShedList() {
+            var list = ['全部牛舍']
+            this.taskCowList.forEach(item=>{
+                if(list.indexOf(item['当前牛舍'])==-1){
+                    list.push(item['当前牛舍'])
+                }
+            })
+            return list
+        },
+        filitList() {
+            var list = []
+            if(this.cowshed){
+                if(this.cowshed=='全部牛舍'){
+                    list=this.taskCowList
+                }
+                else{
+                    this.taskCowList.forEach(item=>{
+                        if(item['当前牛舍']==this.cowshed){
+                            list.push(item)
+                        }
+                    })
+                }
+            }
+            return list
+        }
+    },
+    watch: {
+        'formData.reason'() {
+            setTimeout(() => {
+                this.formData.remark = this.remarks[0]
+            }, 100)
+        },
+        'formData.cowID'() {
+            if (this.formData.cowID.length != 8) {
+                return
+            }
+            this.getNowCow()
+        }
+    },
+    methods: {
+        getList(type) {
+            this.getHaleInfo('wsBreeding', 'getMultiMateTask', [
+                this.$store.state.farmName
+            ], 'list').then((data) => {
+                this.list = data
+
+                if (this.list.length == 0 && type == 1) {
+                    this.$alert('暂无需要处理的奶牛', '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+
+                        }
+                    });
+                }
+
+            })
+        },
+        onSave() {
+            if (!this.formData.cowID) {
+                this.$message({
+                    message: '请录入牛只牛号',
+                    type: 'warning'
+                });
+                return
+            }
+
+            if (!this.formData.bull) {
+                this.$message({
+                    message: '请选择冻精',
+                    type: 'warning'
+                });
+                return
+            }
+
+
+            this.formData.operators = this.userInfo.username
+
+            this.getHaleInfo('wsBreeding', 'addHeatingInfo', [{
+                cowID: this.formData.cowID,
+                heatingDate: Date.parse(new Date()),
+                heatingCase: this.formData.sign,
+                exposeMode: this.formData.method
+            }], 'json').then((data) => {
+                console.log(data)
+                if (data.rtnCode == -1) {
+                    // this.$message({
+                    //     message: data.rtnMessage,
+                    //     type: 'warning'
+                    // });
+                    this.$alert(data.rtnMessage, '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+                else {
+                    this.$message({
+                        message: '录入成功',
+                        type: 'success'
+                    });
+                    this.formData.cowID = ''
+                    this.getList()
+                }
+            })
+        },
+        getNowCow() {
+
+            this.getCowInfo(this.formData.cowID, 2).then((data) => {
+                // console.log(data)
+                var list = []
+                Object.keys(data).forEach(item => {
+                    list.push({
+                        key: item,
+                        value: data[item]
+                    })
+                })
+
+                // console.log(list)
+
+                this.tableData = list
+                if (data['繁殖状态'] == '复检有胎' || data['繁殖状态'] == '初检已孕') {
+                    this.$alert('当前牛号已经有胎,不允许录入配种信息,但目前允许选择冻精进行数据查看等。(可通过数据更正方式重置上次的妊检结果为未孕或无胎,再进行操作)', '提示', {
+                        confirmButtonText: '确定',
+                        callback: action => {
+                            this.formData.cowID = ''
+                        }
+                    });
+                }
+            }).catch(() => {
+                this.formData.cowID = ''
+            })
+
+
+        },
+        rowClick(row) {
+            this.formData = {
+                cowID: row['牛号'],
+                isMate: '0',
+                mateMode: this.mateModes[0]['详细方式'],
+                bull: '',
+                person: '',
+            }
+
+            this.getNowCow()
+        }
+    }
+}
+</script>
+<style lang="less" scoped>
+.containMain {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 4px;
+    padding: 15px;
+    // margin-right: 10px;
+    .contentTitle {
+        border-bottom: 1px solid #f2f4f5;
+    }
+    // min-width: 450px;
+
+    .sub {
+        font-size: 14px;
+        font-weight: 600;
+        color: rgba(102, 102, 102, 1);
+        line-height: 20px;
+        margin-bottom: 40px;
+        padding-left: 20px;
+    }
+}
+
+.contentTitle {
+    font-size: 16px;
+    font-weight: bold;
+    color: rgba(0, 0, 0, 1);
+    line-height: 22px;
+    letter-spacing: 1px;
+    padding-bottom: 14px;
+    span {
+        font-size: 13px;
+        color: rgba(102, 102, 102, 1);
+        line-height: 18px;
+        margin-left: 10px;
+    }
+}
+.selectContent {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 20px 0;
+}
+
+.tableNum {
+    font-size: 13px;
+    font-weight: bold;
+    color: rgba(102, 102, 102, 1);
+    line-height: 18px;
+    padding-bottom: 15px;
+}
+.containAside {
+    padding: 0;
+
+    display: flex;
+    flex-direction: column;
+    .asideInfo {
+        flex-grow: 1;
+        background: rgba(255, 255, 255, 1);
+        border-radius: 4px;
+        padding: 15px;
+    }
+}
+
+.item {
+    .item-title {
+        font-size: 14px;
+        font-weight: bold;
+
+        color: rgba(0, 0, 0, 1);
+        line-height: 20px;
+        letter-spacing: 1px;
+    }
+
+    .text {
+        font-size: 13px;
+        color: rgba(0, 0, 0, 1);
+        line-height: 18px;
+        letter-spacing: 1px;
+        word-wrap: break-word;
+        padding: 10px 0 15px;
+    }
+}
+</style>

+ 50 - 0
src/main/vue/src/router/index.js

@@ -367,6 +367,56 @@ const router = new Router({
                         type: '手持机录入',
                         type: '手持机录入',
                         title: '配种任务'
                         title: '配种任务'
                     }
                     }
+                },
+                {
+                    path: '/handleSimultaneousMatch',
+                    name: 'handleSimultaneousMatch',
+                    component: () =>
+                        import ('../pages/HandleSimultaneousMatch'),
+                    meta: {
+                        type: '手持机录入',
+                        title: '同期配种'
+                    }
+                },
+                {
+                    path: '/handleInitial',
+                    name: 'handleInitial',
+                    component: () =>
+                        import ('../pages/HandleInitial'),
+                    meta: {
+                        type: '手持机录入',
+                        title: '初检录入'
+                    }
+                },
+                {
+                    path: '/handleRecheck',
+                    name: 'handleRecheck',
+                    component: () =>
+                        import ('../pages/HandleRecheck'),
+                    meta: {
+                        type: '手持机录入',
+                        title: '复检录入'
+                    }
+                },
+                {
+                    path: '/handleAbortion',
+                    name: 'handleAbortion',
+                    component: () =>
+                        import ('../pages/HandleAbortion'),
+                    meta: {
+                        type: '手持机录入',
+                        title: '流产登记'
+                    }
+                },
+                {
+                    path: '/handleDryMilk',
+                    name: 'handleDryMilk',
+                    component: () =>
+                        import ('../pages/HandleDryMilk'),
+                    meta: {
+                        type: '手持机录入',
+                        title: '干奶登记'
+                    }
                 }
                 }
             ]
             ]
         },
         },