|
@@ -26,11 +26,7 @@
|
|
</header>
|
|
</header>
|
|
<section>
|
|
<section>
|
|
<article class="table">
|
|
<article class="table">
|
|
- <el-table
|
|
|
|
- :data="tableData"
|
|
|
|
- tooltip-effect="dark"
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table :data="tableData" tooltip-effect="dark" style="width: 100%">
|
|
<el-table-column prop="id" label="序号" width="80"></el-table-column>
|
|
<el-table-column prop="id" label="序号" width="80"></el-table-column>
|
|
<el-table-column prop="batchNo" label="批次号"></el-table-column>
|
|
<el-table-column prop="batchNo" label="批次号"></el-table-column>
|
|
<el-table-column label="执行时间">
|
|
<el-table-column label="执行时间">
|
|
@@ -53,10 +49,14 @@
|
|
<el-table-column prop="remark" label="备注"></el-table-column>
|
|
<el-table-column prop="remark" label="备注"></el-table-column>
|
|
<el-table-column label="操作" width="150">
|
|
<el-table-column label="操作" width="150">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button @click="onTimeChange(scope.row)" type="text" size="small">时间变更</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click="onTimeChange(scope.row)"
|
|
|
|
+ type="text"
|
|
|
|
+ size="small"
|
|
|
|
+ >时间变更</el-button>
|
|
<!-- <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
|
|
<!-- <el-popconfirm title="是否删除此设备的信息?" @onConfirm="del(scope.row)">
|
|
<el-button slot="reference" type="text" size="small">删除</el-button>
|
|
<el-button slot="reference" type="text" size="small">删除</el-button>
|
|
- </el-popconfirm> -->
|
|
|
|
|
|
+ </el-popconfirm>-->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -152,12 +152,7 @@
|
|
<el-dialog title="时间变更" :visible.sync="isShowTime" width="40%">
|
|
<el-dialog title="时间变更" :visible.sync="isShowTime" width="40%">
|
|
<el-row type="flex">
|
|
<el-row type="flex">
|
|
<el-col :span="20">
|
|
<el-col :span="20">
|
|
- <el-form
|
|
|
|
- ref="timeChange"
|
|
|
|
- :model="formData"
|
|
|
|
- :rules="rules"
|
|
|
|
- label-width="140px"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form ref="timeChange" :model="formData" :rules="rules" label-width="140px">
|
|
<el-form-item label="执行时间">
|
|
<el-form-item label="执行时间">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
v-model="formData.performTime"
|
|
v-model="formData.performTime"
|
|
@@ -169,14 +164,15 @@
|
|
|
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button @click="isShowTime=false">取 消</el-button>
|
|
<el-button @click="isShowTime=false">取 消</el-button>
|
|
- <el-button type="primary" @click="submitFormTimeChange('timeChange')">保 存</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitFormTimeChange('timeChange')"
|
|
|
|
+ >保 存</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
-
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -200,16 +196,16 @@ export default {
|
|
totalPages: 0,
|
|
totalPages: 0,
|
|
isShow: false,
|
|
isShow: false,
|
|
isShowTime: false,
|
|
isShowTime: false,
|
|
- target: this.$store.state["sheepType"][2].value, // 按钮绑定的
|
|
|
|
|
|
+ target: this.$store.state["sheepType"][2].value, // 按钮绑定的
|
|
sheepTypeArr: [this.$store.state["sheepType"][1].value],
|
|
sheepTypeArr: [this.$store.state["sheepType"][1].value],
|
|
formData: {
|
|
formData: {
|
|
target: this.$store.state["sheepType"][0].value,
|
|
target: this.$store.state["sheepType"][0].value,
|
|
batchNo: "1922",
|
|
batchNo: "1922",
|
|
- performTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
|
|
|
|
+ performTime: this.$moment().format("YYYY-MM-DD HH:mm:ss"),
|
|
number: "200",
|
|
number: "200",
|
|
medicineId: 1,
|
|
medicineId: 1,
|
|
method: "羊皮下注射",
|
|
method: "羊皮下注射",
|
|
- opeUser: this.$store.state['workerList'][0].id,
|
|
|
|
|
|
+ opeUser: this.$store.state["workerList"][0].id,
|
|
remark: "备注"
|
|
remark: "备注"
|
|
},
|
|
},
|
|
timeForm: {},
|
|
timeForm: {},
|
|
@@ -233,7 +229,12 @@ export default {
|
|
.then(res => {
|
|
.then(res => {
|
|
// 免疫程序列表
|
|
// 免疫程序列表
|
|
this.getImmunePlanList();
|
|
this.getImmunePlanList();
|
|
- this.$message.success("成功!");
|
|
|
|
|
|
+ // this.$message.success("成功!");
|
|
|
|
+ if (res.errCode) {
|
|
|
|
+ this.$message.error(res.errMsg);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.success("成功");
|
|
|
|
+ }
|
|
// this.isShow = false
|
|
// this.isShow = false
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
@@ -252,7 +253,12 @@ export default {
|
|
.then(res => {
|
|
.then(res => {
|
|
// 免疫程序列表
|
|
// 免疫程序列表
|
|
this.getImmunePlanList();
|
|
this.getImmunePlanList();
|
|
- this.$message.success("时间变更成功!");
|
|
|
|
|
|
+ // this.$message.success("时间变更成功!");
|
|
|
|
+ if (res.errCode) {
|
|
|
|
+ this.$message.error(res.errMsg);
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.success("成功");
|
|
|
|
+ }
|
|
// this.isShow = false
|
|
// this.isShow = false
|
|
})
|
|
})
|
|
.catch(err => {
|
|
.catch(err => {
|
|
@@ -292,24 +298,24 @@ export default {
|
|
},
|
|
},
|
|
add() {
|
|
add() {
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
- this.formData.target = this.target
|
|
|
|
|
|
+ this.formData.target = this.target;
|
|
this.sheepTypeArr = [this.target];
|
|
this.sheepTypeArr = [this.target];
|
|
// 有id是update 没id是add
|
|
// 有id是update 没id是add
|
|
delete this.formData.id;
|
|
delete this.formData.id;
|
|
},
|
|
},
|
|
onTimeChange(row) {
|
|
onTimeChange(row) {
|
|
- this.timeForm.id = row.id
|
|
|
|
- this.timeForm.targetDate = row.performTime
|
|
|
|
- this.isShowTime = true
|
|
|
|
|
|
+ this.timeForm.id = row.id;
|
|
|
|
+ this.timeForm.targetDate = row.performTime;
|
|
|
|
+ this.isShowTime = true;
|
|
},
|
|
},
|
|
edit(row) {
|
|
edit(row) {
|
|
- // 数据回填
|
|
|
|
|
|
+ // 数据回填
|
|
console.log(row.target);
|
|
console.log(row.target);
|
|
this.formData = row;
|
|
this.formData = row;
|
|
this.$store.state["sheepType"].forEach(item => {
|
|
this.$store.state["sheepType"].forEach(item => {
|
|
- if((row.target & item.value) == item.value) this.sheepTypeArr.push(item.value)
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ if ((row.target & item.value) == item.value)
|
|
|
|
+ this.sheepTypeArr.push(item.value);
|
|
|
|
+ });
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
},
|
|
},
|
|
// del(row) {
|
|
// del(row) {
|