修改维修提交
This commit is contained in:
parent
95fbe0176c
commit
e2c11c0b5d
@ -80,7 +80,7 @@
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0">
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3">
|
||||
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||
<span class="name">不良现象</span>
|
||||
<div class="text">
|
||||
@ -91,21 +91,24 @@
|
||||
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||
<span class="name">SLA不达标原因</span>
|
||||
<div class="text">
|
||||
<el-input :size="size" v-model="item.sla_non_compliance_reason" placeholder="SLA不达标原因"></el-input>
|
||||
<el-input :size="size" v-model="item.sla_non_compliance_reason"
|
||||
placeholder="SLA不达标原因"></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0">
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3">
|
||||
<el-col :span="12" :lg="12" :md="12" :xs="24">
|
||||
<span class="name">现场步骤分析</span>
|
||||
<div class="text">
|
||||
<el-input type="textarea" :size="size" v-model="item.analysis_steps" placeholder="现场步骤分析"></el-input>
|
||||
<el-input type="textarea" :size="size" v-model="item.analysis_steps"
|
||||
placeholder="现场步骤分析"></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="btnAdd" v-if="item.repair_action === 1">
|
||||
<div class="cardBody">
|
||||
<sc-table ref="table" :data="params.repair_info" style="width: 100%;" :hidePagination="true" :hideDo="true" :hideEmpty="true" :size="size">
|
||||
<sc-table ref="table" :data="params.repair_info" style="width: 100%;" :hidePagination="true"
|
||||
:hideDo="true" :hideEmpty="true" :size="size">
|
||||
<sc-table-column type="index" label="序号" width="65"></sc-table-column>
|
||||
<sc-table-column prop="new_part_mpn" label="部件MPN" :show-overflow-tooltip="true" width="240">
|
||||
<template #default="scope">
|
||||
@ -133,40 +136,41 @@
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<info-save-dialog ref="saveDialog" v-if="dialog.save" @success="handleSaveSuccess" @closed="dialog.save=false"></info-save-dialog>
|
||||
<info-save-dialog ref="saveDialog" v-if="dialog.save" @success="handleSaveSuccess"
|
||||
@closed="dialog.save=false"></info-save-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import infoSaveDialog from "@/views/order/components/infoSave";
|
||||
export default {
|
||||
import infoSaveDialog from "@/views/order/components/infoSave";
|
||||
export default {
|
||||
name: "repairAction",
|
||||
components:{
|
||||
components: {
|
||||
infoSaveDialog
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
size:'small',
|
||||
dialog:{
|
||||
save:false,
|
||||
data() {
|
||||
return {
|
||||
size: 'small',
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
params:{
|
||||
order_id:Number(this.$route.query.order_id),
|
||||
repair_id:Number(this.$route.query.id),
|
||||
repair_info:[
|
||||
params: {
|
||||
order_id: Number(this.$route.query.order_id),
|
||||
repair_id: Number(this.$route.query.id),
|
||||
repair_info: [
|
||||
{
|
||||
new_part_mpn:"",
|
||||
new_part_sn:"",
|
||||
sla:"",
|
||||
sla_non_compliance_reason:"",
|
||||
confirmed_defects:"",
|
||||
analysis_steps:"",
|
||||
repair_action:""
|
||||
new_part_mpn: "",
|
||||
new_part_sn: "",
|
||||
sla: "",
|
||||
sla_non_compliance_reason: "",
|
||||
confirmed_defects: "",
|
||||
analysis_steps: "",
|
||||
repair_action: 3
|
||||
}
|
||||
]
|
||||
},
|
||||
info:{
|
||||
is_verify_erp_inventory:false,
|
||||
component_info:[],
|
||||
info: {
|
||||
is_verify_erp_inventory: false,
|
||||
component_info: [],
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -176,13 +180,13 @@ export default {
|
||||
unmounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
methods: {
|
||||
async getInfo() {
|
||||
let params = {
|
||||
order_id:this.params.order_id
|
||||
order_id: this.params.order_id
|
||||
}
|
||||
const res = await this.$API.orders.order.repair.info.post(params);
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.info = res.data;
|
||||
|
||||
await this.repairing();
|
||||
@ -190,66 +194,102 @@ export default {
|
||||
},
|
||||
async repairing() {
|
||||
let params = {
|
||||
repair_id:this.info.id
|
||||
repair_id: this.info.id
|
||||
}
|
||||
await this.$API.orders.order.repair.repairing.post(params);
|
||||
},
|
||||
handleSaveSuccess(){
|
||||
handleSaveSuccess() {
|
||||
|
||||
},
|
||||
async submit() {
|
||||
const res = await this.$API.orders.order.repair.submit.post(this.params);
|
||||
if(res.code == 200){
|
||||
console.log(res.data)
|
||||
let data = this.$TOOL.objCopy(this.params)
|
||||
data.repair_info.forEach(item => {
|
||||
if (item.repair_action === 2) {
|
||||
delete item.new_part_mpn
|
||||
delete item.new_part_sn
|
||||
delete item.sla
|
||||
} else if (item.repair_action === 3) {
|
||||
delete item.new_part_mpn
|
||||
delete item.new_part_sn
|
||||
delete item.sla
|
||||
delete item.confirmed_defects
|
||||
delete item.sla_non_compliance_reason
|
||||
delete item.analysis_steps
|
||||
}
|
||||
});
|
||||
const res = await this.$API.orders.order.repair.submit.post(data);
|
||||
if (res.code == 200) {
|
||||
this.$message.success('操作成功')
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.mainView{background: #fff;}
|
||||
.title{color: #222;font-weight: 600;}
|
||||
.boxListBorderBottom{
|
||||
.mainView {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #222;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.boxListBorderBottom {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding-bottom: 5px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.boxList{
|
||||
|
||||
.boxList {
|
||||
margin-top: 15px;
|
||||
.el-row{
|
||||
|
||||
.el-row {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.el-col{
|
||||
|
||||
.el-col {
|
||||
margin: 0 0 12px 0;
|
||||
padding: 0;
|
||||
}
|
||||
.flexCol{
|
||||
|
||||
.flexCol {
|
||||
padding: 5px 12px 6px 12px;
|
||||
}
|
||||
}
|
||||
.name{
|
||||
|
||||
.name {
|
||||
color: #555;
|
||||
display: inline-block;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
.btnBox{
|
||||
|
||||
.btnBox {
|
||||
text-align: right;
|
||||
}
|
||||
.cardBody{
|
||||
|
||||
.cardBody {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.flexCol{
|
||||
display: flex;align-items: center;
|
||||
.name{
|
||||
|
||||
.flexCol {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
margin-bottom: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.text{
|
||||
|
||||
.text {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.btnAdd{margin-top: 15px;}
|
||||
|
||||
.btnAdd {
|
||||
margin-top: 15px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user