领料申请出库数量判断
This commit is contained in:
parent
b998cf5b55
commit
acc549943f
|
|
@ -136,7 +136,7 @@
|
||||||
v-model="scope.row.preNum"
|
v-model="scope.row.preNum"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:min="1"
|
:min="1" @input="checkNum(scope.row)"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -341,13 +341,12 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.projectInfoList();
|
this.projectInfoList();//单位工程下拉选
|
||||||
this.equipmentType();
|
this.equipmentType();//机具类型下拉选
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
console.log("isEdit", this.isEdit);
|
console.log("isEdit", this.isEdit);
|
||||||
this.taskId = this.editTaskId;
|
this.taskId = this.editTaskId;
|
||||||
this.id = this.editId;
|
this.id = this.editId;
|
||||||
|
|
||||||
this.getTaskInfo();
|
this.getTaskInfo();
|
||||||
this.equipmentType();
|
this.equipmentType();
|
||||||
}
|
}
|
||||||
|
|
@ -457,10 +456,20 @@ export default {
|
||||||
for (let z of deviceTypeList) {
|
for (let z of deviceTypeList) {
|
||||||
if (z.data.typeId === i) {
|
if (z.data.typeId === i) {
|
||||||
const obj = JSON.parse(JSON.stringify(z.data));
|
const obj = JSON.parse(JSON.stringify(z.data));
|
||||||
// obj.supplierId = ''
|
|
||||||
|
|
||||||
obj.preNum = 1;
|
obj.preNum = 1;
|
||||||
tempList.push(obj);
|
if(obj.storageNum==0){
|
||||||
|
let index = this.deviceType.length;
|
||||||
|
if(index==1){
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.deviceType=[]; // 可选,如果你想要重置选中状态
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.deviceType=this.deviceType.splice(0,1)
|
||||||
|
}
|
||||||
|
this.$modal.msgError("所选物资规格类型库存量为0!");
|
||||||
|
}else{
|
||||||
|
tempList.push(obj);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -501,9 +510,16 @@ export default {
|
||||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||||
// this.loading = false;
|
// this.loading = false;
|
||||||
});
|
});
|
||||||
await this.projectInfoList();
|
// await this.projectInfoList();
|
||||||
|
},
|
||||||
|
checkNum(row) {
|
||||||
|
let maxNum = row.storageNum
|
||||||
|
if (row.preNum <= 1) {
|
||||||
|
row.preNum = 1
|
||||||
|
} else if (row.preNum >= maxNum) {
|
||||||
|
row.preNum = maxNum-1
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//单位,工程树结构数据获取父
|
//单位,工程树结构数据获取父
|
||||||
treeParentsById(list, id) {
|
treeParentsById(list, id) {
|
||||||
for (let i in list) {
|
for (let i in list) {
|
||||||
|
|
@ -735,7 +751,7 @@ export default {
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// console.log(row.id)
|
console.log(row)
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除所选择的数据项?")
|
.confirm("是否确认删除所选择的数据项?")
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -746,8 +762,9 @@ export default {
|
||||||
this.propsKey++;
|
this.propsKey++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log(this.equipmentList)
|
||||||
this.equipmentList.forEach((item, index) => {
|
this.equipmentList.forEach((item, index) => {
|
||||||
if (item.id == row.id) {
|
if (item.typeId == row.typeId) {
|
||||||
this.equipmentList.splice(index, 1);
|
this.equipmentList.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1097,13 +1097,20 @@ export default {
|
||||||
|
|
||||||
saveCodeOut() {
|
saveCodeOut() {
|
||||||
console.log(this.maCodeList)
|
console.log(this.maCodeList)
|
||||||
let param = { leaseOutDetailsList: this.maCodeList };
|
console.log(this.outNum)
|
||||||
submitOut(param).then((response) => {
|
if(this.maCodeList.length==0){
|
||||||
this.$modal.msgSuccess("出库成功");
|
this.$modal.msgError("请先勾选设备编码!");
|
||||||
this.openCode = false;
|
}else if(this.maCodeList.length>this.outNum){
|
||||||
this.handleQueryOutInfo();
|
this.$modal.msgError("出库编码数量不可大于待出库数量!");
|
||||||
this.handleQuery();
|
}else{
|
||||||
});
|
let param = { leaseOutDetailsList: this.maCodeList };
|
||||||
|
submitOut(param).then((response) => {
|
||||||
|
this.$modal.msgSuccess("出库成功");
|
||||||
|
this.openCode = false;
|
||||||
|
this.handleQueryOutInfo();
|
||||||
|
this.handleQuery();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleCodeOutQuery() {},
|
handleCodeOutQuery() {},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue