|
|
|
@ -804,6 +804,9 @@
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="applyNum"
|
|
|
|
|
label="领用数量">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input size="small" v-model="scope.row.applyNum" @change="handleEdit(scope.$index,scope.row)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="150"
|
|
|
|
@ -1310,6 +1313,16 @@ export default {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 备件数量
|
|
|
|
|
handleEdit(index, row) {
|
|
|
|
|
if (row.amount < Number(row.applyNum)) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '超过库存数量!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
row.applyNum = row.amount;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 展示
|
|
|
|
|
showWork(row) {
|
|
|
|
|
this.reset();
|
|
|
|
@ -1439,7 +1452,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 删除设备-巡检项
|
|
|
|
|
delTheEquItem(e) {
|
|
|
|
|
this.form.equipmentItem.splice(e.equipmentCode, 1)
|
|
|
|
|
for (let i = 0; i < this.form.equipmentItem.length; i++) {
|
|
|
|
|
if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
|
|
|
|
|
this.form.equipmentItem.splice(i, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 选择设备确认按钮
|
|
|
|
|
confirmSelectEquBtn() {
|
|
|
|
@ -1547,6 +1564,10 @@ export default {
|
|
|
|
|
querySpareList(this.spareQuery).then(response => {
|
|
|
|
|
this.spareTotal = response.total;
|
|
|
|
|
this.spareList = response.rows;
|
|
|
|
|
// 设置库存:总量-冻结数量
|
|
|
|
|
for (let i = 0; i < this.spareList.length; i++) {
|
|
|
|
|
this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
|
|
|
|
|
}
|
|
|
|
|
this.spareLoading = false;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -1686,7 +1707,26 @@ export default {
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const orderIds = row.orderId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除保养工单编号为"' + orderIds + '"的数据项?').then(function () {
|
|
|
|
|
|
|
|
|
|
var orderCodes = '';
|
|
|
|
|
// 处理信息
|
|
|
|
|
for (let i = 0; i < this.upkeepOrderList.length; i++) {
|
|
|
|
|
for (let j = 0; j < orderIds.length; j++) {
|
|
|
|
|
if (orderIds[j] == this.upkeepOrderList[i].orderId) {
|
|
|
|
|
orderCodes = orderCodes + this.upkeepOrderList[i].orderCode + ',';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (orderCodes == '') {
|
|
|
|
|
for (let i = 0; i < this.upkeepOrderList.length; i++) {
|
|
|
|
|
if (orderIds == this.upkeepOrderList[i].orderId) {
|
|
|
|
|
orderCodes = this.upkeepOrderList[i].orderCode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$modal.confirm('是否确认删除保养工单编号为"' + orderCodes + '"的数据项?').then(function () {
|
|
|
|
|
return delUpkeepOrder(orderIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|