报工撤销功能

master
zhaoxiaolin 11 months ago
parent 8770232d15
commit 5a010d1829

@ -153,6 +153,18 @@ export function reportSap(workorderCode) {
data: data
});
}
//报工撤销按钮
export function reportSapCancel(workorderCode) {
const data = {
workorderCode
}
return request({
url: '/mes/reportWork/reportSapCancel',
method: 'put',
data: data
});
}
// 查询物料管理列表

@ -127,7 +127,17 @@
v-hasPermi="['mes:reportWork:edit']"
>报工SAP</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-s-claim"
size="mini"
:disabled="single"
@click="handleReportCancel"
v-hasPermi="['mes:reportWork:edit']"
>撤销报工SAP</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
@ -625,7 +635,7 @@
<script>
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,
updateReportWork,reportSap,getBatchList,
updateReportWork,reportSap,getBatchList,reportSapCancel,
getReportList,getReportSAPList,submitReportPS,submitReportPSSAP,getCKList} from "@/api/mes/reportWork";
import { getConsumeList,submitConsumePS,submitReportInfo} from "@/api/mes/reportWorkConsume";
import ReportWorkConsume from "./reportWorkConsume.vue";
@ -1061,6 +1071,25 @@ export default {
});
},
/**报工撤销sap。报工状态回退**/
handleReportCancel(){
this.loading = true;
let sr = this.selectRow[0];
const code = sr.workorderCode;
let _this = this;
this.$modal.confirm('是否确认工单"' + code + '"的数据项撤销sap报工').then(function() {
reportSapCancel(code).then(response => {
if(response !=null && response.code ==200){
_this.$modal.msgSuccess("报工撤销成功");
}
_this.loading = false;
});
}).then(() => {
}).catch(() => {
});
},
/** 报工详情按钮操作 */
handleReportHz(row) {
@ -1137,14 +1166,7 @@ export default {
/** 报工损耗按钮操作 */
handleConsumeHz(row) {
this.reset();
let sr = row;
if(sr.uploadStatus =='sap报工成功'){
this.optType = 'view'
}else{
this.optType = ''
}
let sr = this.selectRow[0];
this.queryParams.workorderCode = sr.workorderCode;
//
this.queryParams.parentOrder = '0';

@ -94,7 +94,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['quality:unqualified:edit']"
>提交OA</el-button>
>发起OA流程</el-button>
</el-col>
<el-col :span="1.5">
<el-button
@ -161,28 +161,26 @@
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="检验任务编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="来料批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批次号" />
<el-input v-model="form.incomeBatchNo" placeholder="请输入来料批次号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
<el-input v-model="form.orderNo" placeholder="请输入订单号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
</el-input>
<el-input v-model="form.materialName" placeholder="请选择物料名称"/>
</el-form-item>
</el-col>
@ -207,7 +205,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="收货数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
@ -226,9 +224,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="组织名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择组织名称">
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
</el-input>
<el-input v-model="form.supplierName" placeholder="请选择组织名称"/>
</el-form-item>
</el-col>
<el-col :span="8">
@ -251,7 +247,6 @@
<el-col :span="8">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
@ -266,9 +261,16 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检测时间" prop="createTime">
<el-input v-model="form.createTime" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="不合格描述" prop="checkLoc">
<el-form-item label="不合格描述" prop="remark">
<el-input type="textarea" autosize placeholder="请输入内容" v-model="form.remark"></el-input>
</el-form-item>
</el-col>
@ -331,6 +333,9 @@ export default {
form: {},
//
rules: {
remark: [
{ required: true, message: "不良描述不能为空", trigger: "blur" }
],
},
checkTypeList:[],
checkTypes:[]
@ -441,20 +446,12 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateUnqualified(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addUnqualified(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess("提交OA成功");
this.open = false;
this.getList();
});
}
}
});
},
getCheckTypeList(val){

Loading…
Cancel
Save