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