|
@@ -1,9 +1,39 @@
|
|
<template>
|
|
<template>
|
|
<div class="deliveryRoom">
|
|
<div class="deliveryRoom">
|
|
|
|
+ <h2 style="margin-bottom: 20px;padding-bottom:7px;border-bottom:2px solid #ddd">厂房信息</h2>
|
|
|
|
+ <header style="margin-bottom:20px">
|
|
|
|
+ <el-row type="flex" :gutter="20" align="middle">
|
|
|
|
+ <el-col :span="3">
|
|
|
|
+ <el-input v-model="S_form.area" placeholder="请输入厂房号"></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="3">
|
|
|
|
+ <el-select v-model="S_form.area" placeholder="请选择栋舍">
|
|
|
|
+ <el-option label="选项一" :value="1"></el-option>
|
|
|
|
+ <el-option label="选项二" :value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="3">
|
|
|
|
+ <el-select v-model="S_form.area" placeholder="请选择区域">
|
|
|
|
+ <el-option label="选项一" :value="1"></el-option>
|
|
|
|
+ <el-option label="选项二" :value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="2">
|
|
|
|
+ <el-button type="primary" @click="getBasicsInfoList">查找</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="2">
|
|
|
|
+ <el-button type="primary" @click="add">新增</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </header>
|
|
<section class="section">
|
|
<section class="section">
|
|
<ul class="ul">
|
|
<ul class="ul">
|
|
-
|
|
|
|
- <li @click="toDetail(item.type, '产房00'+(index+1))" class="li" v-for="(item, index) in list" :key="index">
|
|
|
|
|
|
+ <li
|
|
|
|
+ @click="toDetail(item.type, '产房00'+(index+1))"
|
|
|
|
+ class="li"
|
|
|
|
+ v-for="(item, index) in list"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
<h5>产房00{{ index+1 }}</h5>
|
|
<h5>产房00{{ index+1 }}</h5>
|
|
<img class="img" :src="typeImgUrl[item.type - 1]" />
|
|
<img class="img" :src="typeImgUrl[item.type - 1]" />
|
|
<p v-if="item.type == 1" class="info fontC">空床时间{{ 4 }}天</p>
|
|
<p v-if="item.type == 1" class="info fontC">空床时间{{ 4 }}天</p>
|
|
@@ -26,14 +56,13 @@
|
|
<span class="title">母猪耳标:</span>
|
|
<span class="title">母猪耳标:</span>
|
|
<span class="content">{{ item.id }}</span>
|
|
<span class="content">{{ item.id }}</span>
|
|
</p>
|
|
</p>
|
|
- <p class="p">
|
|
|
|
|
|
+ <p class="p">
|
|
<span class="title">产子时间:</span>
|
|
<span class="title">产子时间:</span>
|
|
<span class="content">2020-07-20</span>
|
|
<span class="content">2020-07-20</span>
|
|
</p>
|
|
</p>
|
|
<p class="p">
|
|
<p class="p">
|
|
<span class="title">仔猪日龄:</span>
|
|
<span class="title">仔猪日龄:</span>
|
|
<span class="content">10天</span>
|
|
<span class="content">10天</span>
|
|
-
|
|
|
|
</p>
|
|
</p>
|
|
<p class="p">
|
|
<p class="p">
|
|
<span class="title">产仔数:</span>
|
|
<span class="title">产仔数:</span>
|
|
@@ -59,19 +88,84 @@
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</li>
|
|
-
|
|
|
|
</ul>
|
|
</ul>
|
|
- <el-row type="flex" justify="center">
|
|
|
|
- <el-col :span="8" class="pagination">
|
|
|
|
|
|
+ <el-row type="flex" justify="center" style="margin-top: 20px;">
|
|
|
|
+ <el-col :span="6" class="pagination">
|
|
<el-pagination
|
|
<el-pagination
|
|
@current-change="pageChange"
|
|
@current-change="pageChange"
|
|
background
|
|
background
|
|
layout="prev, pager, next"
|
|
layout="prev, pager, next"
|
|
- :page-count="1"
|
|
|
|
|
|
+ :page-count="500"
|
|
></el-pagination>
|
|
></el-pagination>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</section>
|
|
</section>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="新增" :visible.sync="isShow" width="40%">
|
|
|
|
+ <el-row type="flex">
|
|
|
|
+ <el-col :span="20">
|
|
|
|
+ <el-form
|
|
|
|
+ ref="addDeliveryRoom"
|
|
|
|
+ :model="formData"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-width="140px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="名称">
|
|
|
|
+ <el-input v-model="formData.name"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="有效期/单位">
|
|
|
|
+ <el-row type="flex" :gutter="20">
|
|
|
|
+ <el-col :span="10">
|
|
|
|
+ <el-input v-model.number="formData.periodOfValidity"></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6">
|
|
|
|
+ <el-select v-model="formData.unit" placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in $store.state['periodOfValidityUnit']"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="库存/规格">
|
|
|
|
+ <el-row type="flex" :gutter="20">
|
|
|
|
+ <el-col :span="10">
|
|
|
|
+ <el-input v-model.number="formData.safeThreshold"></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6">
|
|
|
|
+ <el-input v-model="formData.specifications"></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="厂家">
|
|
|
|
+ <el-input v-model="formData.factory"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="用法">
|
|
|
|
+ <el-input type="textarea" autosize v-model="formData.usageIntro"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="注意事项">
|
|
|
|
+ <el-input type="textarea" autosize v-model="formData.note"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="状态">
|
|
|
|
+ <el-radio-group v-model="formData.status">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="item in $store.state['drugStatus']"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.value"
|
|
|
|
+ >{{ item.label }}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button @click="isShow=false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="submitForm('addDeliveryRoom')">保 存</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -82,10 +176,11 @@ import typeImgUrl_2 from "@/assets/deliveryRoom_2.jpg";
|
|
import typeImgUrl_3 from "@/assets/deliveryRoom_3.jpg";
|
|
import typeImgUrl_3 from "@/assets/deliveryRoom_3.jpg";
|
|
import typeImgUrl_4 from "@/assets/deliveryRoom_4.jpg";
|
|
import typeImgUrl_4 from "@/assets/deliveryRoom_4.jpg";
|
|
|
|
|
|
-// import { reqDeliveryRoomList } from "@/api/deliveryRoomManagement.js"
|
|
|
|
|
|
+// import { reqDeliveryRoomList } from "@/api/deliveryRoomManagement.js"tuodan
|
|
|
|
|
|
// 每页数据条数
|
|
// 每页数据条数
|
|
const pageSize = 10;
|
|
const pageSize = 10;
|
|
|
|
+const rules = {};
|
|
|
|
|
|
let list = [
|
|
let list = [
|
|
{
|
|
{
|
|
@@ -123,26 +218,52 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
list,
|
|
list,
|
|
- typeImgUrl: [
|
|
|
|
- typeImgUrl_1,
|
|
|
|
- typeImgUrl_2,
|
|
|
|
- typeImgUrl_3,
|
|
|
|
- typeImgUrl_4
|
|
|
|
- ],
|
|
|
|
|
|
+ isShow: false,
|
|
|
|
+ rules,
|
|
pageSize,
|
|
pageSize,
|
|
- page: 1
|
|
|
|
|
|
+ page: 1,
|
|
|
|
+ S_form: {},
|
|
|
|
+ formData: {
|
|
|
|
+ name: ""
|
|
|
|
+ },
|
|
|
|
+ typeImgUrl: [typeImgUrl_1, typeImgUrl_2, typeImgUrl_3, typeImgUrl_4]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- },
|
|
|
|
|
|
+ created() {},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ submitForm(formName) {
|
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ // reqAddMOutStore(this.formData)
|
|
|
|
+ // .then(res => {
|
|
|
|
+ // // 物料出库列表
|
|
|
|
+ // this.getMOutStoreList();
|
|
|
|
+ // if (res.errCode) {
|
|
|
|
+ // this.$message.error(res.errMsg);
|
|
|
|
+ // } else {
|
|
|
|
+ // this.$message.success("成功");
|
|
|
|
+ // }
|
|
|
|
+ // // this.isShow = false
|
|
|
|
+ // })
|
|
|
|
+ // .catch(err => {
|
|
|
|
+ // console.log(err);
|
|
|
|
+ // this.$message.error("失败!");
|
|
|
|
+ // });
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
toDetail(type, roomNum) {
|
|
toDetail(type, roomNum) {
|
|
// if(type == 1) {
|
|
// if(type == 1) {
|
|
// this.$message.warning("产床为空!")
|
|
// this.$message.warning("产床为空!")
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
- this.$router.push({path: "Detail",query: {type,roomNum}})
|
|
|
|
|
|
+ this.$router.push({ path: "Detail", query: { type, roomNum } });
|
|
|
|
+ },
|
|
|
|
+ getBasicsInfoList() {},
|
|
|
|
+ add() {
|
|
|
|
+ this.isShow = true;
|
|
},
|
|
},
|
|
pageChange(p) {
|
|
pageChange(p) {
|
|
console.log(p);
|
|
console.log(p);
|
|
@@ -157,27 +278,29 @@ export default {
|
|
.deliveryRoom {
|
|
.deliveryRoom {
|
|
.section {
|
|
.section {
|
|
background-color: #eee;
|
|
background-color: #eee;
|
|
|
|
+ padding: 10px 10px 20px 10px;
|
|
|
|
+ border-radius: 10px;
|
|
.ul {
|
|
.ul {
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
-
|
|
|
|
|
|
+
|
|
.li {
|
|
.li {
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
border: 2px solid #fff;
|
|
border: 2px solid #fff;
|
|
- padding: 5px;
|
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
+ padding: 6px;
|
|
margin: 6px;
|
|
margin: 6px;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
width: 200px;
|
|
width: 200px;
|
|
- height: 420px;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ height: 430px;
|
|
|
|
+
|
|
h5 {
|
|
h5 {
|
|
text-align: center;
|
|
text-align: center;
|
|
font-size: 30px;
|
|
font-size: 30px;
|
|
color: #424242;
|
|
color: #424242;
|
|
- background-color: #D2E4F0;
|
|
|
|
|
|
+ background-color: #d2e4f0;
|
|
}
|
|
}
|
|
.img {
|
|
.img {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -207,16 +330,12 @@ export default {
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .li:hover{
|
|
|
|
- border: 2px solid #32ADF4;
|
|
|
|
|
|
+ .li:hover {
|
|
|
|
+ border: 2px solid #32adf4;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
// border: 1px solid #00f;
|
|
// border: 1px solid #00f;
|
|
-
|
|
|
|
-.pagination {
|
|
|
|
- margin-top: 5px;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|