+
驳回数量:
(rowData.unitValue==1?numInput2=Number(v.replace(/[^\d.]/g,'')) : numInput2=Number(v.replace(/[^\d]/g,'')))"
placeholder="请输入驳回数量:" clearable maxlength="20" style="width: 400px"/>
驳回原因:
-
@@ -118,17 +92,42 @@
重置
-
-
+
+
+ 入库
+
+
+ 驳回
+
+
+
+
-
+
+
入库
@@ -141,6 +140,22 @@
取消
-->
+
+
+
+
+ 是否确认驳回所选择的设备编码?
+
+
+ 驳回原因:
+
+
+
+ 确定
+ 取消
+
+
@@ -211,6 +226,8 @@ export default {
isReject: false,
keyWord:"",
maCodeList: [],
+ codeOpen: false,
+ codeRow:{}
};
},
computed: {},
@@ -237,7 +254,6 @@ export default {
this.loading = false;
});
},
-
//入库按钮
handlePass(row) {
console.log(row)
@@ -280,7 +296,7 @@ export default {
});
}
},
- //驳回按钮
+ //驳回按钮-打开弹窗
handleFail(row) {
console.log(row)
console.log(row.manageType)
@@ -297,7 +313,7 @@ export default {
this.open=true;
}
},
- //数量入库驳回入库
+ //驳回按钮-数量入库-确认驳回
rejectNumInput(){
console.log(this.rowData)
console.log(this.numInput2)
@@ -313,6 +329,7 @@ export default {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
typeId:this.rowData.typeId,
+ rejectReason:this.rejectReason,
pendingInputNum:this.rowData.pendingInputNum,
rejectNum:this.numInput2
}
@@ -325,7 +342,7 @@ export default {
});
}
},
- //查看编码列表
+ //查看编码列表-打开编码列表弹窗
handleViewCode(row){
this.rowData=row;
this.isReject=true;
@@ -348,7 +365,7 @@ export default {
}
});
},
- //重置按钮
+ //编码列表弹窗-重置按钮
resetCodeQuery(){
this.keyWord=""
this.queryCodeList()
@@ -374,15 +391,97 @@ export default {
})
.catch(() => {});
},
- //编码弹窗-单个驳回
+ //编码弹窗-单个驳回-打开驳回弹窗
rejectCodeWarehouse(codeRow){
console.log(this.rowData)
console.log(codeRow)
+ this.rejectReason="";
+ this.codeOpen=true;
+ this.codeRow=codeRow
+ // let param = {
+ // agreementId:this.rowData.agreementId,
+ // taskId:this.rowData.taskId,
+ // typeId:this.rowData.typeId,
+ // maCodeList:[{maId:codeRow.maId}]
+ // }
+ // this.$modal.confirm("是否确认驳回所选择的设备编码?")
+ // .then(function () {
+ // return rejectWarehouseApi(param);
+ // }).then((response) => {
+ // if(response.code==200){
+ // this.$modal.msgSuccess("驳回成功");
+ // this.queryCodeList();
+ // this.getTaskInfo();
+ // }
+ // })
+ // .catch(() => {});
+ },
+ //编码弹窗-单个驳回-打开驳回弹窗-确认按钮
+ confirmRejectCode(){
let param = {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
typeId:this.rowData.typeId,
- maCodeList:[{maId:codeRow.maId}]
+ rejectReason:this.rejectReason,
+ maCodeList:[{maId:this.codeRow.maId}]
+ }
+ rejectWarehouseApi(param).then((response) => {
+ if(response.code==200){
+ this.$modal.msgSuccess("驳回成功");
+ this.codeOpen=false;
+ this.queryCodeList();
+ this.getTaskInfo();
+ }
+ })
+ },
+ //是否可用勾选框
+ selectable(row) {
+ if (row.maStatus == "5") {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // 多选框选中数据
+ handleSelectionChange(selection) {
+ this.passTemp = [];
+ this.failTemp = [];
+ this.ids = selection.map((item) => item.id);
+ selection.forEach((item) => {
+ this.passTemp.push({maId:item.maId});
+ });
+ selection.forEach((item) => {
+ this.failTemp.push({maId:item.maId});
+ });
+ this.single = selection.length != 1;
+ this.multiple = !selection.length;
+ },
+ //编码弹窗-多个通过
+ handlePassAll() {
+ let param = {
+ taskId:this.rowData.taskId,
+ typeId:this.rowData.typeId,
+ maCodeList:this.passTemp
+ }
+ this.$modal.confirm("是否确认入库所选择的设备编码?")
+ .then(function () {
+ return repairInputWarehouseApi(param);
+ }).then((response) => {
+ if(response.code==200){
+ this.$modal.msgSuccess("入库成功");
+ this.queryCodeList();
+ this.getTaskInfo();
+ }
+ })
+ .catch(() => {});
+ },
+ //编码弹窗-多个驳回
+ handleFailAll() {
+ let param = {
+ agreementId:this.rowData.agreementId,
+ taskId:this.rowData.taskId,
+ typeId:this.rowData.typeId,
+ maCodeList:this.failTemp
}
this.$modal.confirm("是否确认驳回所选择的设备编码?")
.then(function () {
@@ -396,67 +495,6 @@ export default {
})
.catch(() => {});
},
- //是否可用勾选框
- selectable(row) {
- if (row.status == "0") {
- return true;
- } else {
- return false;
- }
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.passTemp = [];
- this.failTemp = [];
- this.ids = selection.map((item) => item.id);
- selection.forEach((item) => {
- this.passTemp.push({ id: item.id, status: "1",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
- unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId,
- auditId:item.id,repairId:item.repairId,maId:item.maId, });
- });
- selection.forEach((item) => {
- this.failTemp.push({ id: item.id, status: "2",specificationType: item.specificationType,machineTypeName:item.machineTypeName,
- unitName:item.unitName,repairNum:item.repairNum,repairedNum:item.repairedNum,typeId:item.typeId,taskId:item.taskId,
- auditId:item.id,repairId:item.repairId,maId:item.maId, });
- });
- this.single = selection.length != 1;
- this.multiple = !selection.length;
- console.log(this.multiple)
- },
- //多个通过
- handlePassAll() {
- if (this.ids.length == 0) {
- this.$alert("请至少勾选一条入库数据", "提示", {
- type: "warning",
- confirmButtonText: "确定",
- });
- return;
- } else {
- // auditPass(this.passTemp).then((response) => {
- // if (response.code == 200) {
- // this.$modal.msgSuccess("通过成功");
- // }
- // this.getTaskInfo();
- // });
- }
- },
- //多个驳回
- handleFailAll() {
- if (this.ids.length == 0) {
- this.$alert("请至少勾选一条入库数据", "提示", {
- type: "warning",
- confirmButtonText: "确定",
- });
- return;
- } else {
- // auditPass(this.failTemp).then((response) => {
- // if (response.code == 200) {
- // this.$modal.msgSuccess("驳回成功");
- // }
- // this.getTaskInfo();
- // });
- }
- },
},