|
@@ -389,7 +389,7 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="使用人" prop="receiveId">
|
|
<el-form-item label="使用人" prop="receiveId">
|
|
- <el-select v-model="form.peopleId" placeholder="请选择使用人">
|
|
|
|
|
|
+ <el-select v-model="form.receiveId" placeholder="请选择使用人">
|
|
<el-option
|
|
<el-option
|
|
v-for="(item, i) in renYuan"
|
|
v-for="(item, i) in renYuan"
|
|
:key="i"
|
|
:key="i"
|
|
@@ -401,7 +401,11 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="出库数量" prop="putOut">
|
|
<el-form-item label="出库数量" prop="putOut">
|
|
- <el-input v-model="form.putOut" placeholder="请输入出库数量" />
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="form.putOut"
|
|
|
|
+ placeholder="请输入出库数量"
|
|
|
|
+ @blur="shuLiang"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="出库时间" prop="putTime">
|
|
<el-form-item label="出库时间" prop="putTime">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
@@ -576,12 +580,20 @@ export default {
|
|
renYuan: [],
|
|
renYuan: [],
|
|
// 耗材列表
|
|
// 耗材列表
|
|
Consumables: [],
|
|
Consumables: [],
|
|
|
|
+ // 数量
|
|
|
|
+ haoCaiShu: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 数量的判断
|
|
|
|
+ shuLiang() {
|
|
|
|
+ if (this.form.putOut > this.haoCaiShu) {
|
|
|
|
+ return this.$modal.msgWarning(`库存数量为${this.haoCaiShu}`);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 选中耗材
|
|
// 选中耗材
|
|
haocailie(data) {
|
|
haocailie(data) {
|
|
this.form.unitId = data.unitId;
|
|
this.form.unitId = data.unitId;
|
|
@@ -591,6 +603,7 @@ export default {
|
|
this.form.manufacturer = data.manufacturer;
|
|
this.form.manufacturer = data.manufacturer;
|
|
this.form.specifications = data.specifications;
|
|
this.form.specifications = data.specifications;
|
|
this.form.storeHouse = data.storeHouse;
|
|
this.form.storeHouse = data.storeHouse;
|
|
|
|
+ this.haoCaiShu = data.amount;
|
|
},
|
|
},
|
|
// 获取耗材列表
|
|
// 获取耗材列表
|
|
getHaoCai() {
|
|
getHaoCai() {
|
|
@@ -705,12 +718,18 @@ export default {
|
|
this.$refs["form"].validate((valid) => {
|
|
this.$refs["form"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
if (this.form.id != null) {
|
|
|
|
+ if (this.form.putOut > this.haoCaiShu) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
updateConsumeputout(this.form).then((response) => {
|
|
updateConsumeputout(this.form).then((response) => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ if (this.form.putOut > this.haoCaiShu) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
addConsumeputout(this.form).then((response) => {
|
|
addConsumeputout(this.form).then((response) => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -824,10 +843,10 @@ export default {
|
|
.el-select-dropdown__item.hover,
|
|
.el-select-dropdown__item.hover,
|
|
.el-select-dropdown__item:hover {
|
|
.el-select-dropdown__item:hover {
|
|
background-color: #004d86;
|
|
background-color: #004d86;
|
|
- color: #fff;
|
|
|
|
|
|
+ color: #111;
|
|
}
|
|
}
|
|
.el-select-dropdown__item {
|
|
.el-select-dropdown__item {
|
|
- color: #fff;
|
|
|
|
|
|
+ color: #111;
|
|
}
|
|
}
|
|
/* 时间选择 */
|
|
/* 时间选择 */
|
|
::v-deep .el-input--small .el-input__inner {
|
|
::v-deep .el-input--small .el-input__inner {
|