修试入库接口对接
This commit is contained in:
parent
e34ac6f1b0
commit
3dd85bd679
|
|
@ -26,6 +26,24 @@ export function getCodeListApi(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//修试入库-通过
|
||||||
|
export function repairInputWarehouseApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair_input_details/warehouse',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修试入库-驳回
|
||||||
|
export function rejectWarehouseApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/repair_input_details/reject',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// //修试审核二级-通过,驳回
|
// //修试审核二级-通过,驳回
|
||||||
// export function auditPass(data) {
|
// export function auditPass(data) {
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@
|
||||||
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
|
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="预入库数量" align="center" prop="pendingInputNum" :show-overflow-tooltip="true"/>
|
<el-table-column label="预入库数量" align="center" prop="repairNum" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="待入库数量" align="center" prop="repairNum" :show-overflow-tooltip="true"/>
|
<el-table-column label="待入库数量" align="center" prop="pendingInputNum" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="已入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true" />
|
<el-table-column label="已入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="被驳回数量" align="center" prop="rejectNum" :show-overflow-tooltip="true" />
|
<el-table-column label="被驳回数量" align="center" prop="rejectNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true">
|
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true">
|
||||||
|
|
@ -55,25 +55,16 @@
|
||||||
<div v-if="scope.row.manageType==1">数量管理</div>
|
<div v-if="scope.row.manageType==1">数量管理</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.status == '0'" style="color: #e6a23c">
|
<dict-tag :options="dict.type.repair_end_task_status" :value="scope.row.status"/>
|
||||||
{{ "待入库" }}
|
</template>
|
||||||
</div>
|
|
||||||
<div v-if="scope.row.status == '1'" style="color: #67c23a">
|
|
||||||
{{ "已入库" }}
|
|
||||||
</div>
|
|
||||||
<div v-if="scope.row.status == '2'" style="color: #f56c6c">
|
|
||||||
{{ "已驳回" }}
|
|
||||||
</div>
|
|
||||||
<!-- <div v-else style="color: red;"></div> -->
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" style="margin-bottom: 10px" type="success" v-if="scope.row.status == '0'" @click="handlePass(scope.row)">入库</el-button>
|
<el-button size="mini" style="margin-bottom: 10px" type="success" v-if="scope.row.status == '0'" @click="handlePass(scope.row)">入库</el-button>
|
||||||
<el-button size="mini" type="danger" v-if="scope.row.status == '0'" @click="handleFail(scope.row)">驳回</el-button>
|
<el-button size="mini" type="danger" v-if="scope.row.status == '0'" @click="handleFail(scope.row)">驳回</el-button>
|
||||||
<div v-if="scope.row.status != '0'">-</div>
|
<el-button size="mini" v-if="scope.row.status == '1'&&scope.row.manageType==0" @click="handleViewCode(scope.row)">查看</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -140,8 +131,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" size="mini" @click="">入库</el-button>
|
<el-button type="primary" size="mini" @click="codeWarehouse(scope.row)" v-if="!isReject&&scope.row.maStatus!='1'">入库</el-button>
|
||||||
<el-button size="mini" type="danger" @click="">驳回</el-button>
|
<el-button size="mini" type="danger" @click="rejectCodeWarehouse(scope.row)" v-if="scope.row.maStatus!='1'">驳回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -149,21 +140,19 @@
|
||||||
<el-button type="primary" size="mini" @click="saveDevCode">保存</el-button>
|
<el-button type="primary" size="mini" @click="saveDevCode">保存</el-button>
|
||||||
<el-button type="normal" size="mini" @click="open=false">取消</el-button>
|
<el-button type="normal" size="mini" @click="open=false">取消</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getTestedDetailListApi,getCodeListApi
|
getTestedDetailListApi,getCodeListApi,repairInputWarehouseApi,rejectWarehouseApi
|
||||||
} from "@/api/repair/testedInBound";
|
} from "@/api/repair/testedInBound";
|
||||||
import { auditPass } from "@/api/repair/testExamine";
|
import { auditPass } from "@/api/repair/testExamine";
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
dicts: ["ma_machine_status"],
|
dicts: ["ma_machine_status","repair_end_task_status"],
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -219,6 +208,7 @@ export default {
|
||||||
numOpen2: false,
|
numOpen2: false,
|
||||||
// 是否显示弹出层-编码
|
// 是否显示弹出层-编码
|
||||||
open: false,
|
open: false,
|
||||||
|
isReject: false,
|
||||||
keyWord:"",
|
keyWord:"",
|
||||||
maCodeList: [],
|
maCodeList: [],
|
||||||
};
|
};
|
||||||
|
|
@ -248,7 +238,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//单个通过
|
//入库按钮
|
||||||
handlePass(row) {
|
handlePass(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
console.log(row.manageType)
|
console.log(row.manageType)
|
||||||
|
|
@ -258,20 +248,11 @@ export default {
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
}else{//编码-打开
|
}else{//编码-打开
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
this.open=true;
|
this.isReject=false;
|
||||||
this.keyWord=""
|
this.keyWord=""
|
||||||
this.queryCodeList()
|
this.queryCodeList()
|
||||||
|
this.open=true;
|
||||||
}
|
}
|
||||||
// this.$modal
|
|
||||||
// .confirm("是否确认通过所选择的数据项?")
|
|
||||||
// .then(function () {
|
|
||||||
// return auditPass(param);
|
|
||||||
// })
|
|
||||||
// .then(() => {
|
|
||||||
// this.getTaskInfo();
|
|
||||||
// this.$modal.msgSuccess("通过成功");
|
|
||||||
// })
|
|
||||||
// .catch(() => {});
|
|
||||||
},
|
},
|
||||||
//数量入库确认入库
|
//数量入库确认入库
|
||||||
saveNumInput(){
|
saveNumInput(){
|
||||||
|
|
@ -279,15 +260,27 @@ export default {
|
||||||
console.log(this.numInput)
|
console.log(this.numInput)
|
||||||
if(this.numInput<=0){
|
if(this.numInput<=0){
|
||||||
this.$modal.msgError("入库数量需大于0!");
|
this.$modal.msgError("入库数量需大于0!");
|
||||||
|
}else if(this.numInput>this.rowData.pendingInputNum){
|
||||||
|
this.$modal.msgError("入库数量不能大于预入库数量!");
|
||||||
|
this.numInput = this.rowData.pendingInputNum;
|
||||||
}else{
|
}else{
|
||||||
//数量入库接口
|
//数量入库接口
|
||||||
|
let param = {
|
||||||
|
taskId:this.rowData.taskId,
|
||||||
|
typeId:this.rowData.typeId,
|
||||||
|
pendingInputNum:this.rowData.pendingInputNum,
|
||||||
|
inputNum:this.numInput
|
||||||
|
}
|
||||||
|
repairInputWarehouseApi(param).then((response) => {
|
||||||
|
if(response.code==200){
|
||||||
|
this.$modal.msgSuccess("入库成功");
|
||||||
|
this.numOpen=false;
|
||||||
|
this.getTaskInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//单个驳回
|
//驳回按钮
|
||||||
handleFail(row) {
|
handleFail(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
console.log(row.manageType)
|
console.log(row.manageType)
|
||||||
|
|
@ -298,9 +291,10 @@ export default {
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
}else{//编码-打开
|
}else{//编码-打开
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
this.open=true;
|
this.isReject=true;
|
||||||
this.keyWord=""
|
this.keyWord=""
|
||||||
this.queryCodeList()
|
this.queryCodeList()
|
||||||
|
this.open=true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//数量入库驳回入库
|
//数量入库驳回入库
|
||||||
|
|
@ -310,14 +304,34 @@ export default {
|
||||||
console.log(this.rejectReason)
|
console.log(this.rejectReason)
|
||||||
if(this.numInput2<=0){
|
if(this.numInput2<=0){
|
||||||
this.$modal.msgError("驳回数量需大于0!");
|
this.$modal.msgError("驳回数量需大于0!");
|
||||||
|
}else if(this.numInput2>this.rowData.pendingInputNum){
|
||||||
|
this.$modal.msgError("驳回数量不能大于预入库数量!");
|
||||||
|
this.numInput2 = this.rowData.pendingInputNum;
|
||||||
}else{
|
}else{
|
||||||
//数量驳回接口
|
//数量驳回接口
|
||||||
|
let param = {
|
||||||
|
taskId:this.rowData.taskId,
|
||||||
|
typeId:this.rowData.typeId,
|
||||||
|
pendingInputNum:this.rowData.pendingInputNum,
|
||||||
|
inputNum:this.numInput2
|
||||||
|
}
|
||||||
|
rejectWarehouseApi(param).then((response) => {
|
||||||
|
if(response.code==200){
|
||||||
|
this.$modal.msgSuccess("驳回成功");
|
||||||
|
this.numOpen2=false;
|
||||||
|
this.getTaskInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//查看编码列表
|
||||||
|
handleViewCode(row){
|
||||||
|
this.rowData=row;
|
||||||
|
this.isReject=true;
|
||||||
|
this.keyWord=""
|
||||||
|
this.queryCodeList()
|
||||||
|
this.open=true;
|
||||||
|
},
|
||||||
//查询编码列表
|
//查询编码列表
|
||||||
queryCodeList(){
|
queryCodeList(){
|
||||||
console.log(this.rowData)
|
console.log(this.rowData)
|
||||||
|
|
@ -338,20 +352,46 @@ export default {
|
||||||
this.keyWord=""
|
this.keyWord=""
|
||||||
this.queryCodeList()
|
this.queryCodeList()
|
||||||
},
|
},
|
||||||
|
//编码弹窗-单个入库
|
||||||
|
codeWarehouse(codeRow){
|
||||||
|
console.log(this.rowData)
|
||||||
|
console.log(codeRow)
|
||||||
|
let param = {
|
||||||
|
taskId:this.rowData.taskId,
|
||||||
|
typeId:this.rowData.typeId,
|
||||||
|
maCodeList:[{maId:codeRow.maId}]
|
||||||
|
}
|
||||||
|
this.$modal.confirm("是否确认入库所选择的设备编码?")
|
||||||
|
.then(function () {
|
||||||
|
return repairInputWarehouseApi(param);
|
||||||
|
}).then((response) => {
|
||||||
|
if(response.code==200){
|
||||||
|
this.$modal.msgSuccess("入库成功");
|
||||||
|
this.queryCodeList();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
//编码弹窗-单个驳回
|
||||||
|
rejectCodeWarehouse(codeRow){
|
||||||
|
console.log(this.rowData)
|
||||||
|
console.log(codeRow)
|
||||||
|
let param = {
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
//是否可用勾选框
|
//是否可用勾选框
|
||||||
selectable(row) {
|
selectable(row) {
|
||||||
if (row.status == "0") {
|
if (row.status == "0") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue