更新维修部分
This commit is contained in:
parent
4ef28a6979
commit
1bd9b9eabf
@ -158,8 +158,8 @@
|
||||
<el-col :span="25" :lg="24">
|
||||
<el-form-item label="验证ERP库存" prop="is_verify_erp_inventory">
|
||||
<el-radio-group v-model="form.is_verify_erp_inventory">
|
||||
<el-radio :value="true">是</el-radio>
|
||||
<el-radio :value="false">否</el-radio>
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -17,13 +17,25 @@
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="cardBody">
|
||||
<template v-if="info.business_status<5">
|
||||
<sc-table ref="table" :data="info.component_info" style="width: 100%;" :hidePagination="true" :hideDo="true" :hideEmpty="true" :size="size">
|
||||
<sc-table-column prop="component_serial_no" label="部件SN/Sp" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column prop="component_manufacturer" label="部件厂商" :show-overflow-tooltip="true" width="130"></sc-table-column>
|
||||
<sc-table-column prop="component_model" label="部件型号" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column prop="component_pn" label="部件PN/Sp" :show-overflow-tooltip="true" width="150"></sc-table-column>
|
||||
<sc-table-column prop="bd_backup_count" label="甚于BD数" :show-overflow-tooltip="true" width="120"></sc-table-column>
|
||||
<sc-table-column align="center" prop="component_serial_no" label="部件SN/Sp" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column align="center" prop="component_manufacturer" label="部件厂商" :show-overflow-tooltip="true" width="130"></sc-table-column>
|
||||
<sc-table-column align="center" prop="component_model" label="部件型号" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column align="center" prop="component_pn" label="部件PN/Sp" :show-overflow-tooltip="true" width="150"></sc-table-column>
|
||||
<sc-table-column align="center" prop="bd_backup_count" label="甚于BD数" :show-overflow-tooltip="true" width="120"></sc-table-column>
|
||||
</sc-table>
|
||||
</template>
|
||||
<template v-else>
|
||||
<sc-table ref="table" :data="repair_records" style="width: 100%;" :hidePagination="true" :hideDo="true" :hideEmpty="true" :size="size">
|
||||
<sc-table-column align="center" prop="part_mpn" label="部件MPN" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column align="center" prop="part_sn" label="部件SN" :show-overflow-tooltip="true" width="130"></sc-table-column>
|
||||
<sc-table-column align="center" prop="sla" label="部件SLA" :show-overflow-tooltip="true" width="160"></sc-table-column>
|
||||
<sc-table-column align="center" prop="confirmed_defects" label="不良现象" :show-overflow-tooltip="true" width="150"></sc-table-column>
|
||||
<sc-table-column align="center" prop="sla_non_compliance_reason" label="SLA不达标原因" :show-overflow-tooltip="true" width="120"></sc-table-column>
|
||||
<sc-table-column align="center" prop="analysis_steps" label="现场步骤分析" :show-overflow-tooltip="true" width="120"></sc-table-column>
|
||||
</sc-table>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -51,6 +63,7 @@ export default {
|
||||
is_verify_erp_inventory:false,
|
||||
component_info:[]
|
||||
},
|
||||
repair_records:[],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -78,6 +91,9 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
if(res.data.business_status>4){
|
||||
this.repair_records = res.data.repair_records;
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
@ -68,11 +68,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item,index) in params.repair_info" :key="index">
|
||||
<el-row style="margin: 0">
|
||||
<el-row style="margin: 0" v-if="index==0">
|
||||
<el-col :span="24" class="flexCol">
|
||||
<span class="name">维修动作</span>
|
||||
<span class="text">
|
||||
<el-radio-group v-model="item.repair_action" :size="size">
|
||||
<el-radio-group v-model="item.repair_action" @change="repairAction" :size="size" :disabled="info.repair_order && info.repair_order.repair_status=== 4">
|
||||
<el-radio :value="1" :label="1">更换</el-radio>
|
||||
<el-radio :value="2" :label="2">修复</el-radio>
|
||||
<el-radio :value="3" :label="3">无需修复</el-radio>
|
||||
@ -80,7 +80,7 @@
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3">
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
||||
<el-col :span="6" :lg="6" :md="8" :xs="24">
|
||||
<span class="name">不良现象</span>
|
||||
<div class="text">
|
||||
@ -96,7 +96,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3">
|
||||
<el-row :gutter="24" style="margin: 0" v-if="item.repair_action != 3 && index==0">
|
||||
<el-col :span="12" :lg="12" :md="12" :xs="24">
|
||||
<span class="name">现场步骤分析</span>
|
||||
<div class="text">
|
||||
@ -105,38 +105,42 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="btnAdd" v-if="item.repair_action === 1">
|
||||
<div class="btnAdd" v-if="item.repair_action != 3 && index==0">
|
||||
<div class="cardBody">
|
||||
<sc-table ref="table" :data="params.repair_info" style="width: 100%;" :hidePagination="true"
|
||||
:hideDo="true" :hideEmpty="true" :size="size">
|
||||
<sc-table-column prop="new_part_mpn" label="部件MPN" :show-overflow-tooltip="true" width="240">
|
||||
<el-table-column prop="m_ascription" align="left" label="部件类型" :show-overflow-tooltip="true" width="80">
|
||||
<template #default="scope">
|
||||
<el-input :size="size" v-model="scope.row.new_part_mpn" placeholder="部件MPN"></el-input>
|
||||
{{scope.row.m_ascription===1?'旧部件':'新部件'}}
|
||||
</template>
|
||||
</sc-table-column>
|
||||
<sc-table-column prop="new_part_sn" label="部件SN" :show-overflow-tooltip="true" width="240">
|
||||
</el-table-column>
|
||||
<el-table-column prop="part_mpn" label="部件MPN" :show-overflow-tooltip="true" width="240">
|
||||
<template #default="scope">
|
||||
<el-input :size="size" v-model="scope.row.new_part_sn" placeholder="部件SN"></el-input>
|
||||
<el-input :size="size" v-model="scope.row.part_mpn" placeholder="部件MPN"></el-input>
|
||||
</template>
|
||||
</sc-table-column>
|
||||
<sc-table-column prop="sla" label="部件SLA" :show-overflow-tooltip="true" width="240">
|
||||
</el-table-column>
|
||||
<el-table-column prop="part_sn" label="部件SN" :show-overflow-tooltip="true" width="240">
|
||||
<template #default="scope">
|
||||
<el-input :size="size" v-model="scope.row.part_sn" placeholder="部件SN"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sla" label="部件SLA" :show-overflow-tooltip="true" width="240">
|
||||
<template #default="scope">
|
||||
<el-input :size="size" v-model="scope.row.sla" placeholder="部件SLA"></el-input>
|
||||
</template>
|
||||
</sc-table-column>
|
||||
</el-table-column>
|
||||
</sc-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnBox">
|
||||
<el-button type="primary" @click="submit" :size="size">提交维修</el-button>
|
||||
<el-button type="primary" @click="submit" :size="size" v-if="!info.repair_order || info.repair_order.repair_status!== 4">提交维修</el-button>
|
||||
</div>
|
||||
</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>
|
||||
@ -157,8 +161,19 @@
|
||||
repair_id: Number(this.$route.query.id),
|
||||
repair_info: [
|
||||
{
|
||||
new_part_mpn: "",
|
||||
new_part_sn: "",
|
||||
m_ascription:1, // 1 旧部件 2 新部件
|
||||
part_mpn: "",
|
||||
part_sn: "",
|
||||
sla: "",
|
||||
sla_non_compliance_reason: "",
|
||||
confirmed_defects: "",
|
||||
analysis_steps: "",
|
||||
repair_action: 3
|
||||
},
|
||||
{
|
||||
m_ascription:2,
|
||||
part_mpn: "",
|
||||
part_sn: "",
|
||||
sla: "",
|
||||
sla_non_compliance_reason: "",
|
||||
confirmed_defects: "",
|
||||
@ -187,29 +202,62 @@
|
||||
const res = await this.$API.orders.order.repair.info.post(params);
|
||||
if (res.code == 200) {
|
||||
this.info = res.data;
|
||||
this.params.repair_info[0].part_mpn = res.data.component_pn;
|
||||
this.params.repair_info[0].part_sn = res.data.device_sn;
|
||||
|
||||
if(res.data.repair_records && res.data.repair_records.length>0){
|
||||
this.params.repair_info = res.data.repair_records;
|
||||
}
|
||||
|
||||
if(res.data.repair_order && (res.data.repair_order.repair_status===1 || res.data.repair_order.repair_status===2)){
|
||||
await this.repairing();
|
||||
}
|
||||
}
|
||||
},
|
||||
async repairing() {
|
||||
let params = {
|
||||
repair_id: this.info.id
|
||||
repair_id: this.info.repair_order?this.info.repair_order.id:""
|
||||
}
|
||||
await this.$API.orders.order.repair.repairing.post(params);
|
||||
},
|
||||
repairAction(e){
|
||||
if(e===1){
|
||||
const un_repair_action = this.params.repair_info.find(em=>em.m_ascription===2);
|
||||
if(!un_repair_action){
|
||||
this.params.repair_info.push({
|
||||
m_ascription:2,
|
||||
part_mpn: "",
|
||||
part_sn: "",
|
||||
sla: "",
|
||||
sla_non_compliance_reason: "",
|
||||
confirmed_defects: "",
|
||||
analysis_steps: "",
|
||||
repair_action: 3
|
||||
})
|
||||
}
|
||||
}else if(e===2){
|
||||
this.params.repair_info = this.params.repair_info.filter(em=>em.m_ascription===1);
|
||||
}
|
||||
},
|
||||
handleSaveSuccess() {
|
||||
|
||||
},
|
||||
async submit() {
|
||||
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
|
||||
let data = this.$TOOL.objCopy(this.params);
|
||||
data.repair_info.forEach((em)=>{
|
||||
em.repair_action = data.repair_info[0].repair_action;
|
||||
em.analysis_steps = data.repair_info[0].analysis_steps;
|
||||
em.confirmed_defects = data.repair_info[0].confirmed_defects;
|
||||
em.sla_non_compliance_reason = data.repair_info[0].sla_non_compliance_reason;
|
||||
})
|
||||
const repair_action_num = data.repair_info[0].repair_action;
|
||||
data.repair_info.forEach((item,index) => {
|
||||
if(repair_action_num!=1 && index!==0){
|
||||
data.repair_info.splice(index,1);
|
||||
}
|
||||
if (item.repair_action === 3) {
|
||||
delete item.part_mpn
|
||||
delete item.part_sn
|
||||
delete item.sla
|
||||
delete item.confirmed_defects
|
||||
delete item.sla_non_compliance_reason
|
||||
@ -217,7 +265,7 @@
|
||||
}
|
||||
});
|
||||
const res = await this.$API.orders.order.repair.submit.post(data);
|
||||
if (res.code == 200) {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('操作成功')
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,5 +1,13 @@
|
||||
<template>
|
||||
<el-container class="mainBox mainHeaderNoBorderPadding">
|
||||
<el-header class="header">
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" :disabled="selection.length!==1" :size="size" icon="sc-icon-MaintenanceSetup" @click="upkeep">执行维修</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<div class="flowPath">
|
||||
<flow :list="flowList"/>
|
||||
@ -226,6 +234,10 @@ export default {
|
||||
this.$refs.saveDialog.open()
|
||||
})
|
||||
},
|
||||
upkeep(){
|
||||
const row = this.selection[0];
|
||||
eventBus.$emit('tagClose','/order/repair-action',{id:row.id,order_id:row.order_id});
|
||||
},
|
||||
// 执行维修
|
||||
table_upkeep(row){
|
||||
eventBus.$emit('tagClose','/order/repair-action',{id:row.id,order_id:row.order_id});
|
||||
@ -277,7 +289,10 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainBox{
|
||||
padding:10px 0 0 0;
|
||||
padding: 0;
|
||||
.header{
|
||||
padding: 0 10px;
|
||||
}
|
||||
.searchMain{
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
|
||||
312
src/views/order/repairListDown/index.vue
Normal file
312
src/views/order/repairListDown/index.vue
Normal file
@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<el-container class="mainBox mainHeaderNoBorderPadding">
|
||||
<el-header class="header">
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" :disabled="selection.length!==1" :size="size" icon="sc-icon-MaintenanceSetup" @click="upkeep">执行维修</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<div class="flowPath">
|
||||
<flow :list="flowList"/>
|
||||
</div>
|
||||
<div class="searchMain searchMainNoTop">
|
||||
<scTableSearch ref="scSearch" :searchList="list.column" :paramsData="params" :searchShow="searchShow" @fetchSelectData="getSelectData" @changeHeaderData="getHeaderData"></scTableSearch>
|
||||
|
||||
<div class="searchItem searchBtn" v-if="searchHeaderShow">
|
||||
<el-button :size="size" :icon="searchShow?'el-icon-ArrowUpBold':'el-icon-ArrowDownBold'" @click="searchShowClick">{{searchShow?'收起':'更多'}}</el-button>
|
||||
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
||||
<el-button :size="size" type="info" icon="el-icon-RefreshRight" @click="reset">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<scTable ref="table" :apiObj="list.apiObj" :column="list.column" :params="params" row-key="id" stripe border :size="size" @selection-change="selectionChange" @columnBack="columnBack">
|
||||
<el-table-column type="selection" align="center" width="40"></el-table-column>
|
||||
<template #repair_status="scope">
|
||||
<span v-for="(item,ind) in setMap.statusList" :key="ind">
|
||||
<span :style="{color:item.value==1?`var(--el-order-color-1)`:item.value==2?`var(--el-order-color-2)`:item.value==3?`var(--el-order-color-3)`:item.value==4?`var(--el-order-color-4)`:`var(--el-order-color-100)`}"
|
||||
v-if="item.value == scope.row.repair_status">{{item.label}}</span>
|
||||
</span>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-dropdown>
|
||||
<el-button class="noBorderBtn" icon="el-icon-more" :size="size"></el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item icon="sc-icon-MaintenanceSetup" @click="table_upkeep(scope.row)">执行维修</el-dropdown-item>
|
||||
<el-dropdown-item icon="sc-icon-See" @click="table_show(scope.row, 'see')">工单详情</el-dropdown-item>
|
||||
<el-dropdown-item icon="sc-icon-OrderLog" @click="table_logs(scope.row)" divided>工单日志</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import flow from '../orderList/components/flow'
|
||||
import {eventBus} from "@/utils/eventBus";
|
||||
|
||||
export default {
|
||||
name:"repairListDown",
|
||||
components: {
|
||||
flow,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
size:'small',
|
||||
flowList:[
|
||||
{name:'维修确认',left:false,right:true},
|
||||
{name:'维修中',left:true,right:true},
|
||||
{name:'维修完成',left:true,right:false},
|
||||
],
|
||||
dialog: {
|
||||
save: false,
|
||||
show: false,
|
||||
},
|
||||
setMap:{
|
||||
statusList:[],
|
||||
},
|
||||
list: {
|
||||
apiObj: this.$API.orders.order.repair.list,
|
||||
column: [],
|
||||
},
|
||||
selection: [],
|
||||
exportShow:false,
|
||||
searchShow:false,
|
||||
searchHeaderShow:false,
|
||||
filterMap:{
|
||||
data:{}
|
||||
},
|
||||
params: {
|
||||
repair_status:{
|
||||
operator:"in",
|
||||
value:[4]
|
||||
}
|
||||
},
|
||||
countParams:this.$store.state.msg.repair_count
|
||||
}
|
||||
},
|
||||
provide(){
|
||||
return{
|
||||
filterUploadClick:this.filterClick,
|
||||
filterUploadParams:this.filterParams,
|
||||
filterTagClose:this.tagClose,
|
||||
filterModelParams:this.filterModelParams,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'list.column':{
|
||||
handler(val){
|
||||
this.searchHeaderShow = val.length>0 && val.some(em=>em.is_search);
|
||||
},
|
||||
immediate:false,
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
filterModelParams(){
|
||||
return this.filterMap
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getStatusList();
|
||||
// 获取新消息
|
||||
eventBus.$on('sockBack', this.getWsResult);
|
||||
},
|
||||
unmounted() {
|
||||
// 获取新消息
|
||||
eventBus.$off('sockBack', this.getWsResult);
|
||||
},
|
||||
methods: {
|
||||
getWsResult(res){
|
||||
if(res.data && res.data.type == 23){
|
||||
this.$store.commit('set_repair_count',res.data.list_repair_info.repair_count);
|
||||
this.countParams = res.data.list_repair_info.repair_count;
|
||||
}
|
||||
},
|
||||
|
||||
async getStatusList() {
|
||||
const res = await this.$API.orders.order.repair.status.post();
|
||||
if (res.code == 200) {
|
||||
this.setMap.statusList = res.data;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 表格检索开始
|
||||
* */
|
||||
columnBack(val){
|
||||
val.forEach(item=>{
|
||||
if(item.prop === "repair_status"){
|
||||
item.data = this.setMap.statusList;
|
||||
}
|
||||
})
|
||||
this.list.column = val;
|
||||
},
|
||||
async filterClick(item) {
|
||||
let {data, params} = item;
|
||||
let filterParams = Object.assign(this.params,params);
|
||||
this.filterMap.data = filterParams;
|
||||
let searchParams = this.$TOOL.objCopy(this.params);
|
||||
searchParams.field = ""
|
||||
if (typeof data.prop === 'string') {
|
||||
searchParams.field = data.prop;
|
||||
} else {
|
||||
searchParams.field = data.prop[0];
|
||||
}
|
||||
if (data.search_type == 'select' || data.search_type == 'checkbox') {
|
||||
await this.getField(data,searchParams);
|
||||
}
|
||||
},
|
||||
filterParams(params){
|
||||
let filterParams = Object.assign(this.params,params);
|
||||
this.filterMap.data = filterParams;
|
||||
this.upSearch();
|
||||
},
|
||||
tagClose(params){
|
||||
let filterParams = Object.assign(this.params,params);
|
||||
this.filterMap.data = filterParams;
|
||||
},
|
||||
searchShowClick(){
|
||||
this.searchShow = !this.searchShow;
|
||||
eventBus.$emit('close-all-popovers');
|
||||
},
|
||||
getHeaderData(params){
|
||||
this.params = params;
|
||||
this.filterMap.data = params;
|
||||
},
|
||||
async getSelectData(item) {
|
||||
let {data, params} = item;
|
||||
this.params = params; // 列表需要的参数
|
||||
this.filterMap.data = params; // 表头组件需要转 才能传的参数
|
||||
let searchParams = this.$TOOL.objCopy(params);
|
||||
searchParams.field = ""
|
||||
if (typeof data.prop === 'string') {
|
||||
searchParams.field = data.prop;
|
||||
} else {
|
||||
searchParams.field = data.prop[0];
|
||||
}
|
||||
if (data.search_type == 'select' || data.search_type == 'checkbox') {
|
||||
await this.getField(data,searchParams)
|
||||
}
|
||||
},
|
||||
async getField(data,searchParams) {
|
||||
const res = await this.$API.orders.order.repair.field.post(searchParams);
|
||||
if (res.code == 200) {
|
||||
if (res.data && res.data.length > 0) {
|
||||
res.data.forEach(item => {
|
||||
if (data.prop === 'repair_status') {
|
||||
this.setMap.statusList.forEach(em => {
|
||||
if (em.value === item[data.prop]) {
|
||||
item.label = em.label;
|
||||
item.value = em.value;
|
||||
}
|
||||
})
|
||||
} else {
|
||||
item.label = item[data.prop];
|
||||
item.value = item[data.prop];
|
||||
}
|
||||
})
|
||||
}
|
||||
this.list.column.forEach(item => {
|
||||
if (item.prop == data.prop) {
|
||||
item.data = res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/** 表格检索结束 */
|
||||
|
||||
//添加
|
||||
add(){
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open()
|
||||
})
|
||||
},
|
||||
upkeep(){
|
||||
const row = this.selection[0];
|
||||
eventBus.$emit('tagClose','/order/repair-action',{id:row.id,order_id:row.order_id});
|
||||
},
|
||||
// 执行维修
|
||||
table_upkeep(row){
|
||||
eventBus.$emit('tagClose','/order/repair-action',{id:row.id,order_id:row.order_id});
|
||||
},
|
||||
//查看
|
||||
table_show(row){
|
||||
eventBus.$emit('tagClose','/order/order-info',{id:row.order_id});
|
||||
},
|
||||
// 工单日志
|
||||
table_logs(row){
|
||||
eventBus.$emit('tagClose','/order/order-logs',{id:row.id,type:2});
|
||||
},
|
||||
// 删除
|
||||
async table_del(row){
|
||||
this.$confirm(`确定删除 ${row.name} 吗?`, '提示', {
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const reqData = {id: row.id};
|
||||
const res = await this.$API.system.company.delete.post(reqData);
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success("删除成功")
|
||||
}else{
|
||||
await this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
}).catch(()=>{})
|
||||
},
|
||||
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection){
|
||||
this.selection = selection;
|
||||
},
|
||||
upSearch(){
|
||||
this.$refs.table.upData(this.params);
|
||||
},
|
||||
reset(){
|
||||
this.params = {
|
||||
repair_status:{
|
||||
operator:"in",
|
||||
value:[4]
|
||||
}
|
||||
};
|
||||
this.filterMap.data = {};
|
||||
this.$refs.scSearch.reload();
|
||||
eventBus.$emit('reset-popovers');
|
||||
this.$refs.table.reload(this.params);
|
||||
},
|
||||
handleSaveSuccess(){
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainBox{
|
||||
padding: 0;
|
||||
.header{
|
||||
padding: 0 10px;
|
||||
}
|
||||
.searchMain{
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.scTable{
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
.logoCell{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user