|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
|
|
- <el-tab-pane label="服务商品" name="服务商品" v-if="mainData.servicetype != '售前' && mainData.servicetype != '历史售后'">
|
|
|
|
|
- <productTable ref="product">
|
|
|
|
|
- <addProduct v-if="tool.checkAuth($route.name,'serveProduct') && mainData.status == '新建'" slot="addProduct" :data="mainData" @onSuccess="$refs.product.listData()" />
|
|
|
|
|
|
|
+ <el-tab-pane label="服务商品" name="服务商品" v-if="internalData.servicetype != '售前' && internalData.servicetype != '历史售后'">
|
|
|
|
|
+ <productTable ref="product" :data="mainData" :newQuery="newQuery">
|
|
|
|
|
+ <addProduct v-if="tool.checkAuth($route.name,'serveProduct') && internalData.status == '新建'" slot="addProduct" :data="mainData" @onSuccess="$refs.product.listData()" />
|
|
|
<template v-slot:editProduct="scope">
|
|
<template v-slot:editProduct="scope">
|
|
|
- <el-button class="inline-16" v-if="tool.checkAuth($route.name,'serveProduct') && mainData.status == '新建'" type="text" size="mini" @click="$refs.product.currentProduct=scope.data">{{$t('编 辑')}}</el-button>
|
|
|
|
|
|
|
+ <el-button class="inline-16" v-if="tool.checkAuth($route.name,'serveProduct') && internalData.status == '新建'" type="text" size="mini" @click="$refs.product.currentProduct=scope.data">{{$t('编 辑')}}</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:delProduct="scope">
|
|
<template v-slot:delProduct="scope">
|
|
|
- <delete-btn nameId="20230206162003" v-if="tool.checkAuth($route.name,'serveProduct') && mainData.status == '新建'" nameKey="sa_serviceorderitemsids" :id="scope.data.sa_serviceorderitemsid" @deleteSuccess="$refs.product.listData()"></delete-btn>
|
|
|
|
|
|
|
+ <delete-btn nameId="20230206162003" v-if="tool.checkAuth($route.name,'serveProduct') && internalData.status == '新建'" nameKey="sa_serviceorderitemsids" :id="scope.data.sa_serviceorderitemsid" @deleteSuccess="$refs.product.listData()"></delete-btn>
|
|
|
</template>
|
|
</template>
|
|
|
</productTable>
|
|
</productTable>
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
@@ -30,16 +30,27 @@ import infoDetail from '@/components/InfoDetail/index'
|
|
|
export default {
|
|
export default {
|
|
|
name: "serviceApplication",
|
|
name: "serviceApplication",
|
|
|
components:{detailInfo,productTable,addProduct,infoDetail},
|
|
components:{detailInfo,productTable,addProduct,infoDetail},
|
|
|
- props:["mainData"],
|
|
|
|
|
|
|
+ props:["mainData","newQuery"],
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
detailInfo:{},
|
|
detailInfo:{},
|
|
|
detailInfo2:{},
|
|
detailInfo2:{},
|
|
|
activeName:'',
|
|
activeName:'',
|
|
|
- internalData:{ ...this.mainData }
|
|
|
|
|
|
|
+ internalData:{ ...this.mainData },
|
|
|
|
|
+ mainDataN:{}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods:{
|
|
methods:{
|
|
|
|
|
+ async queryMain(){
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ "id":20230206091603,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_serviceorderid": this.mainData.sa_serviceorderid
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.mainDataN = res.data
|
|
|
|
|
+ this.changeDataStructure(res.data)
|
|
|
|
|
+ },
|
|
|
changeDataStructure(newData){
|
|
changeDataStructure(newData){
|
|
|
|
|
|
|
|
if (newData){
|
|
if (newData){
|
|
@@ -47,7 +58,7 @@ export default {
|
|
|
}else {
|
|
}else {
|
|
|
this.internalData = { ...this.mainData }
|
|
this.internalData = { ...this.mainData }
|
|
|
}
|
|
}
|
|
|
- console.log(this.internalData,'internalData')
|
|
|
|
|
|
|
+
|
|
|
this.activeName = this.internalData.servicetype == '售前' || this.internalData.servicetype == '历史售后'?'申请信息':'服务商品'
|
|
this.activeName = this.internalData.servicetype == '售前' || this.internalData.servicetype == '历史售后'?'申请信息':'服务商品'
|
|
|
let that = this;
|
|
let that = this;
|
|
|
this.detailInfo = [
|
|
this.detailInfo = [
|
|
@@ -132,7 +143,12 @@ export default {
|
|
|
handleClick(){}
|
|
handleClick(){}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.changeDataStructure()
|
|
|
|
|
|
|
+ if (this.newQuery){
|
|
|
|
|
+ this.queryMain()
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.changeDataStructure()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|