wws 1 year ago
parent fdd4824d69
commit 864ee3c2d0

@ -849,6 +849,9 @@ export default {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
if (response.data.timeArray[0] == null) {
response.data.timeArray = [];
}
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
@ -882,7 +885,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.deviceOrderList.length; i++) {
for (let j = 0; j < orderIds.length; j++) {
if (orderIds[j] == this.deviceOrderList[i].orderId) {
orderCodes = orderCodes + this.deviceOrderList[i].orderCode + ',';
}
}
}
if (orderCodes == '') {
for (let i = 0; i < this.deviceOrderList.length; i++) {
if (orderIds == this.deviceOrderList[i].orderId) {
orderCodes = this.deviceOrderList[i].orderCode;
}
}
}
this.$modal.confirm('是否确认删除计划工单编号为"' + orderCodes + '"的数据项?').then(function () {
return delDeviceOrder(orderIds);
}).then(() => {
this.getList();

@ -948,7 +948,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() {

@ -996,7 +996,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() {

@ -888,7 +888,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.spotInspectionOrderList.length; i++) {
for (let j = 0; j < orderIds.length; j++) {
if (orderIds[j] == this.spotInspectionOrderList[i].orderId) {
orderCodes = orderCodes + this.spotInspectionOrderList[i].orderCode + ',';
}
}
}
if (orderCodes == '') {
for (let i = 0; i < this.spotInspectionOrderList.length; i++) {
if (orderIds == this.spotInspectionOrderList[i].orderId) {
orderCodes = this.spotInspectionOrderList[i].orderCode;
}
}
}
this.$modal.confirm('是否确认删除点检工单编号为"' + orderCodes + '"的数据项?').then(function() {
return delSpotInspectionOrder(orderIds);
}).then(() => {
this.getList();

@ -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();

@ -523,6 +523,7 @@
width="300">
</el-table-column>
<el-table-column
v-if="false"
prop="spareOnList"
label="备件"
width="300">
@ -1314,7 +1315,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() {

Loading…
Cancel
Save