|
@@ -63,12 +63,14 @@
|
|
|
|
|
|
<article v-show="btnFlag==2">
|
|
<article v-show="btnFlag==2">
|
|
<el-table
|
|
<el-table
|
|
|
|
+ ref="multipleTableCreateBatch"
|
|
:data="tableData_2"
|
|
:data="tableData_2"
|
|
tooltip-effect="dark"
|
|
tooltip-effect="dark"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
|
|
+ :row-key="getRowKeys"
|
|
>
|
|
>
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
|
|
+ <el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
|
|
<el-table-column prop="id" label="种母羊编码" width="100"></el-table-column>
|
|
<el-table-column prop="id" label="种母羊编码" width="100"></el-table-column>
|
|
<el-table-column label="入场时间" width="200">
|
|
<el-table-column label="入场时间" width="200">
|
|
<template v-slot="scope">
|
|
<template v-slot="scope">
|
|
@@ -113,8 +115,9 @@
|
|
|
|
|
|
<el-row type="flex" justify="end" style="margin-top: 20px">
|
|
<el-row type="flex" justify="end" style="margin-top: 20px">
|
|
<el-col :span="14">
|
|
<el-col :span="14">
|
|
|
|
+ <el-button @click="toggleSelection()">取消选择</el-button>
|
|
<el-button type="primary" plain @click="add">
|
|
<el-button type="primary" plain @click="add">
|
|
- 生产批次
|
|
|
|
|
|
+ 生成批次
|
|
<i class="el-icon-arrow-right el-icon--right"></i>
|
|
<i class="el-icon-arrow-right el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -130,7 +133,7 @@
|
|
</article>
|
|
</article>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <el-dialog title="新增/编辑" :visible.sync="isShow" width="40%">
|
|
|
|
|
|
+ <el-dialog title="生成批次" :visible.sync="isShow" width="40%">
|
|
<el-row type="flex">
|
|
<el-row type="flex">
|
|
<el-col :span="20">
|
|
<el-col :span="20">
|
|
<el-form ref="addBatch" :model="formData" :rules="rules" label-width="140px">
|
|
<el-form ref="addBatch" :model="formData" :rules="rules" label-width="140px">
|
|
@@ -146,7 +149,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="isShow=false">取 消</el-button>
|
|
<el-button @click="isShow=false">取 消</el-button>
|
|
- <el-button type="primary" @click="submitForm('addBatch')">保 存</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="submitForm('addBatch')">生 成</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -156,8 +159,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { reqBatchList, reqAddBatch } from "@/api/production.js";
|
|
|
|
-import { reqSeedSheepList } from "@/api/breed.js";
|
|
|
|
|
|
+import { reqBatchList, reqAddBatch, reqSeedEweSheepList } from "@/api/production.js";
|
|
|
|
|
|
const pageSize = 10;
|
|
const pageSize = 10;
|
|
const rules = {};
|
|
const rules = {};
|
|
@@ -181,6 +183,9 @@ export default {
|
|
feeder: null
|
|
feeder: null
|
|
},
|
|
},
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
|
|
+ getRowKeys(row) {
|
|
|
|
+ return row.id;
|
|
|
|
+ },
|
|
rules
|
|
rules
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -202,14 +207,14 @@ export default {
|
|
this.getBatchList();
|
|
this.getBatchList();
|
|
// 获取种羊档案列表
|
|
// 获取种羊档案列表
|
|
this.getSeedSheepList();
|
|
this.getSeedSheepList();
|
|
- this.$message.success("成功!");
|
|
|
|
|
|
+ this.$message.success("成功11!");
|
|
// 清空选项
|
|
// 清空选项
|
|
this.toggleSelection();
|
|
this.toggleSelection();
|
|
this.isShow = false;
|
|
this.isShow = false;
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
console.log(err);
|
|
console.log(err);
|
|
- this.$message.error("失败!");
|
|
|
|
|
|
+ this.$message.error("失败22!");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
return false;
|
|
return false;
|
|
@@ -233,7 +238,7 @@ export default {
|
|
},
|
|
},
|
|
// 获取种羊档案列表
|
|
// 获取种羊档案列表
|
|
getSeedSheepList() {
|
|
getSeedSheepList() {
|
|
- reqSeedSheepList({
|
|
|
|
|
|
+ reqSeedEweSheepList({
|
|
searchStr: this.search_2,
|
|
searchStr: this.search_2,
|
|
pageSize,
|
|
pageSize,
|
|
pageNum: this.pageNum_2
|
|
pageNum: this.pageNum_2
|
|
@@ -253,10 +258,10 @@ export default {
|
|
toggleSelection(rows) {
|
|
toggleSelection(rows) {
|
|
if (rows) {
|
|
if (rows) {
|
|
rows.forEach(row => {
|
|
rows.forEach(row => {
|
|
- this.$refs.multipleTable.toggleRowSelection(row);
|
|
|
|
|
|
+ this.$refs.multipleTableCreateBatch.toggleRowSelection(row);
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
|
|
|
+ this.$refs.multipleTableCreateBatch.clearSelection();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 创建批次
|
|
// 创建批次
|