|
|
@@ -0,0 +1,376 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <basicDetails
|
|
|
+ ref="details"
|
|
|
+ :titleText="mainData.billno"
|
|
|
+ :editData="mainData"
|
|
|
+ :mainAreaData="mainAreaData"
|
|
|
+ turnPageId="20230206091703"
|
|
|
+ idname="sa_serviceorderid"
|
|
|
+ ownertable="sa_serviceorder"
|
|
|
+ :delApiId="20230206091803"
|
|
|
+ :statusCheck="[{key:'status',value:'已受理'},{key:'status',value:'已中止'}]"
|
|
|
+ :status="mainData.status"
|
|
|
+ :delHide="mainData.status !== '新建' || submitDis"
|
|
|
+ tags=""
|
|
|
+ :tabs="['服务申请']"
|
|
|
+ @hrMain="hrMain"
|
|
|
+ @pageChange="pageChange"
|
|
|
+ @onEditSuccess="queryMainData($route.query.id)"
|
|
|
+ >
|
|
|
+ <div slot="tags"></div>
|
|
|
+ <div slot="customOperation">
|
|
|
+ <Edit
|
|
|
+ v-if="tool.checkAuth($route.name,'update') && ((mainData.status == '新建' && isworker == 0) || isworker == 1) && mainData.status != '已受理' && mainData.status != '已中止'"
|
|
|
+ class="inline-16"
|
|
|
+ :data="mainData"
|
|
|
+ @onSuccess="queryMainData"
|
|
|
+ />
|
|
|
+ <changeBill
|
|
|
+ v-if="
|
|
|
+ mainData.status == '已提交' &&
|
|
|
+ tool.checkAuth($route.name, 'changeBill')
|
|
|
+ "
|
|
|
+ class="inline-16"
|
|
|
+ @onSuccess="queryMainData"
|
|
|
+ :data="mainData"
|
|
|
+ ></changeBill>
|
|
|
+ <customBtn
|
|
|
+ btnName="提交"
|
|
|
+ message="确认提交当前服务申请单吗?"
|
|
|
+ idName="20230206101403"
|
|
|
+ keyName="sa_serviceorderid"
|
|
|
+ :id="$route.query.id"
|
|
|
+ :paramData="[{ key: 'issumbit', value: 1 }]"
|
|
|
+ @onSuccess="queryMainData"
|
|
|
+ :disabled="(hrid == 0 && usertype == 0) && submitDis"
|
|
|
+ class="inline-16"
|
|
|
+ v-if="
|
|
|
+ mainData.status == '新建' && tool.checkAuth($route.name, 'submit')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <customBtn
|
|
|
+ btnName="退回"
|
|
|
+ message="确认退回当前服务申请单吗?"
|
|
|
+ idName="20230206101403"
|
|
|
+ keyName="sa_serviceorderid"
|
|
|
+ :id="$route.query.id"
|
|
|
+ :paramData="[{ key: 'issumbit', value: 0 }]"
|
|
|
+ :dialog="true"
|
|
|
+ :checkString="true"
|
|
|
+ dialogTitle="请输入退回原因"
|
|
|
+ dialogKey="backreason"
|
|
|
+ @onSuccess="queryMainData"
|
|
|
+ errorMessage="退回原因不可为空"
|
|
|
+ class="inline-16"
|
|
|
+ v-if="
|
|
|
+ mainData.status == '已提交' &&
|
|
|
+ tool.checkAuth($route.name, 'resubmit')
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <customBtn
|
|
|
+ btnName="中止"
|
|
|
+ message="确认中止当前服务申请单吗?"
|
|
|
+ idName="2026012414051502"
|
|
|
+ keyName="sa_serviceorderid"
|
|
|
+ :id="$route.query.id"
|
|
|
+ :dialog="true"
|
|
|
+ :checkString="true"
|
|
|
+ dialogTitle="请输入中止原因"
|
|
|
+ dialogKey="abortreason"
|
|
|
+ @onSuccess="queryMainData"
|
|
|
+ errorMessage="中止原因不可为空"
|
|
|
+ class="inline-16"
|
|
|
+ v-if="mainData.status == '已提交' && tool.checkAuth($route.name,'suspension')"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div slot="slot0">
|
|
|
+<!-- <detailInfo :more="true" :data="detailInfo"></detailInfo>-->
|
|
|
+ <serviceApplication
|
|
|
+ :detailInfo="detailInfo" :mainData="mainData" :detailInfo2="detailInfo2"
|
|
|
+ :activeName="mainData.servicetype == '售前' || mainData.servicetype == '历史售后'?'申请信息':'服务商品'">
|
|
|
+ </serviceApplication>
|
|
|
+ </div>
|
|
|
+ <div slot="slot2">
|
|
|
+ <workBill ref="workBill">
|
|
|
+ <!-- <template v-slot:delProduct="scope">
|
|
|
+ <delete-btn nameId="20230206162003" nameKey="sa_serviceorderitemsids" :id="scope.data.sa_serviceorderid" @deleteSuccess="$refs.workBill.listData()"></delete-btn>
|
|
|
+ </template> -->
|
|
|
+ </workBill>
|
|
|
+ </div>
|
|
|
+ <div slot="slot1">
|
|
|
+ <workBill
|
|
|
+ ref="workBill"
|
|
|
+ v-if="
|
|
|
+ mainData.servicetype == '售前' || mainData.servicetype == '历史售后'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ </workBill>
|
|
|
+ <productTable ref="product" v-else>
|
|
|
+ <addProduct
|
|
|
+ v-if="
|
|
|
+ tool.checkAuth($route.name, 'serveProduct') &&
|
|
|
+ mainData.status == '新建'
|
|
|
+ "
|
|
|
+ slot="addProduct"
|
|
|
+ :data="mainData"
|
|
|
+ @onSuccess="$refs.product.listData()"
|
|
|
+ />
|
|
|
+ <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
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <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>
|
|
|
+ </template>
|
|
|
+ </productTable>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </basicDetails>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import detailInfo from "@/components/detailInfo/index";
|
|
|
+import changeBill from "../components/changeBill";
|
|
|
+import Edit from "../components/edit";
|
|
|
+
|
|
|
+import workBill from "./workBill/index";
|
|
|
+import productTable from "./product/index";
|
|
|
+import addProduct from "./product/add";
|
|
|
+import serviceApplication from "@/HDrpManagement/serveBillMag/components/serviceApplication";
|
|
|
+export default {
|
|
|
+ name: "detail",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ mainData: {},
|
|
|
+ mainAreaData: {},
|
|
|
+ detailInfo: [],
|
|
|
+ detailInfo2:[],
|
|
|
+ isworker:'',
|
|
|
+ hrid:JSON.parse(sessionStorage.getItem('active_account')).hrid,
|
|
|
+ nowUserid:JSON.parse(sessionStorage.getItem('active_account')).userid,
|
|
|
+ usertype:JSON.parse(sessionStorage.getItem('active_account')).usertype,
|
|
|
+ submitDis:true,
|
|
|
+ hrData:''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ detailInfo,
|
|
|
+ changeBill,
|
|
|
+ Edit,
|
|
|
+ workBill,
|
|
|
+ productTable,
|
|
|
+ addProduct,
|
|
|
+ serviceApplication
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ hrMain(data){
|
|
|
+ this.hrData = data
|
|
|
+ this.submitDis = true
|
|
|
+ this.isworker = data.isworker
|
|
|
+ if (data.hrid == this.mainData.saler_hrid){
|
|
|
+ this.submitDis = false
|
|
|
+ }else {
|
|
|
+ this.proxyData(this.mainData.saler_userid)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async proxyData(userid){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":20230302174201,
|
|
|
+ "content": {
|
|
|
+ "leaderuserid": userid,
|
|
|
+ "isproxy":1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ res.data.forEach(item => {
|
|
|
+ if (item.userid == this.nowUserid && item.editable){
|
|
|
+ this.submitDis = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async queryMainData(id) {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ id: 20230206091603,
|
|
|
+ content: {
|
|
|
+ sa_serviceorderid: this.$route.query.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ this.mainData = res.data;
|
|
|
+
|
|
|
+ this.changeDataStructure();
|
|
|
+ this.hrMain(this.hrData)
|
|
|
+ },
|
|
|
+ changeDataStructure() {
|
|
|
+ let that = this;
|
|
|
+ this.mainAreaData = [
|
|
|
+ {label:'单号',value:this.mainData.billno ? this.mainData.billno : ''},
|
|
|
+ {label:'单据日期',value:this.mainData.billdate ? this.mainData.billdate : ''},
|
|
|
+ {label:'状态',value:this.mainData.status ?this.$t(this.mainData.status) : '',
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.status)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'企业名称',value:this.mainData.enterprisename ? this.mainData.enterprisename : ''},
|
|
|
+ {label:'企业编码',value:this.mainData.agentnum ? this.mainData.agentnum : ''},
|
|
|
+ {label:'省市县',value:`${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`},
|
|
|
+ {label:'详细地址',value:this.mainData.address ? this.mainData.address : ''},
|
|
|
+ {label:'关联订单',value:this.mainData.sonum ? this.mainData.sonum : ''},
|
|
|
+ {label:'服务类型',value:this.mainData.servicetype ? this.mainData.servicetype : '',
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.servicetype)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'现场联系人',value:this.mainData.scenecontact ? this.mainData.scenecontact : ''},
|
|
|
+ {label:'身份备注',value:this.mainData.scenecontactrole ? this.mainData.scenecontactrole : ''},
|
|
|
+ {label:'现场联系电话',value:this.mainData.scenecontactphonenumber ? this.mainData.scenecontactphonenumber : ''},
|
|
|
+ {label:'应用系统',value:this.mainData.class1 ? this.mainData.class1 : ''},
|
|
|
+ {label:'客诉大类',value:this.mainData.class2 ? this.mainData.class2 : ''},
|
|
|
+ {label:'服务开始日期',value:this.mainData.begdate ? this.mainData.begdate.slice(0,this.mainData.begdate.indexOf(' ')) : ''},
|
|
|
+ {label:'服务结束日期',value:this.mainData.enddate ? this.mainData.enddate.slice(0,this.mainData.enddate.indexOf(' ')) : ''},
|
|
|
+ {label:'问题描述',value:this.mainData.reason ? this.mainData.reason : ''},
|
|
|
+ {label:'业务员',value:this.mainData.saler_name ? this.mainData.saler_name : ''},
|
|
|
+ {label:'业务员电话',value:this.mainData.saler_phonenumber ? this.mainData.saler_phonenumber : ''},
|
|
|
+ {label:'项目名称',value:this.mainData.projectnote ? this.mainData.projectnote : ''},
|
|
|
+ {label:'历史服务次数',value:this.mainData.historicalservicesqty ? this.mainData.historicalservicesqty : ''},
|
|
|
+ {label:'工单状态',value:this.mainData.status_workorder ? this.mainData.status_workorder : '',
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.status_workorder)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'工单完成时间',value:this.mainData.finishdate_workorder ? this.mainData.finishdate_workorder : ''},
|
|
|
+ {label:'异常类型',value:this.mainData.exception_type ? this.mainData.exception_type : ''},
|
|
|
+ {label:'服务等级',value:this.mainData.service_level ? this.mainData.service_level : '',
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.service_level)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'评估意见',value:this.mainData.evaluation_comment ? this.mainData.evaluation_comment : ''},
|
|
|
+ {label:'备注',value:this.mainData.remarks ? this.mainData.remarks : ''},
|
|
|
+ ];
|
|
|
+ this.detailInfo = [
|
|
|
+ {
|
|
|
+ title: "基本信息",
|
|
|
+ info: [
|
|
|
+ {label:'申请单号',value:this.mainData.billno},
|
|
|
+ {label:'单据日期',value:this.mainData.billdate},
|
|
|
+ {label:'状态',value:this.$t(this.mainData.status),
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.status)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'企业名称',value:this.mainData.enterprisename},
|
|
|
+ {label:'企业编号',value:this.mainData.agentnum},
|
|
|
+ {label:'省市县',value:`${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`},
|
|
|
+ {label:'详细地址',value:this.mainData.address ? this.mainData.address : ''},
|
|
|
+ {label:'关联订单',value:this.mainData.sonum},
|
|
|
+ {label:'服务类型',value:this.mainData.servicetype,
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.servicetype)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'现场联系人',value:this.mainData.scenecontact},
|
|
|
+ {label:'身份备注',value:this.mainData.scenecontactrole},
|
|
|
+ {label:'现场联系人电话',value:this.mainData.scenecontactphonenumber},
|
|
|
+ {label:'应用系统',value:this.mainData.class1},
|
|
|
+ {label:'客诉大类',value:this.mainData.class2},
|
|
|
+ {label:'问题描述',value:this.mainData.reason},
|
|
|
+ {label:'服务开始日期',value:this.mainData.begdate ? this.mainData.begdate.slice(0,this.mainData.begdate.indexOf(' ')) : ''},
|
|
|
+ {label:'服务结束日期',value:this.mainData.enddate ? this.mainData.enddate.slice(0,this.mainData.enddate.indexOf(' ')) : ''},
|
|
|
+ {label:'项目名称',value:this.mainData.projectnote ? this.mainData.projectnote : ''},
|
|
|
+ {label:'业务员',value:this.mainData.saler_name ? this.mainData.saler_name : ''},
|
|
|
+ {label:'业务员电话',value:this.mainData.saler_phonenumber ? this.mainData.saler_phonenumber : ''},
|
|
|
+ {label:'异常类型',value:this.mainData.exception_type ? this.mainData.exception_type : ''},
|
|
|
+ {label:'服务等级',value:this.mainData.service_level ? this.mainData.service_level : '',
|
|
|
+ style:function () {
|
|
|
+ let style = that.tool.getStatusColor(that.mainData.service_level)
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {label:'评估意见',value:this.mainData.evaluation_comment ? this.mainData.evaluation_comment : ''},
|
|
|
+ {label:'历史服务次数',value:this.mainData.historicalservicesqty ? this.mainData.historicalservicesqty : ''},
|
|
|
+ {label:'备注',value:this.mainData.remarks ? this.mainData.remarks : ''},
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "系统信息",
|
|
|
+ info: [
|
|
|
+ {label:'创建时间',value:this.mainData.createdate},
|
|
|
+ {label:'最近编辑时间',value:this.mainData.changedate},
|
|
|
+ {label:'提交时间',value:this.mainData.submitdate},
|
|
|
+ {label:'创建人',value:this.mainData.createby},
|
|
|
+ {label:'最近编辑人',value:this.mainData.changeby},
|
|
|
+ {label:'提交人',value:this.mainData.submitby},
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ this.detailInfo2 = [
|
|
|
+ {
|
|
|
+ title:'确认信息',
|
|
|
+ info: [
|
|
|
+ {label:'供应方',value:this.mainData.supplier}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title:'系统信息',
|
|
|
+ info: [
|
|
|
+ {label:'最近编辑人',value:this.mainData.changeby},
|
|
|
+ {label:'最近编辑时间',value:this.mainData.changedate},
|
|
|
+ {label:'转单人',value:this.mainData.transformer},
|
|
|
+ {label:'转单时间',value:this.mainData.transdate},
|
|
|
+ {label:'退回原因',value:this.mainData.backreason},
|
|
|
+ {label:'中止时间',value:this.mainData.abortdate},
|
|
|
+ {label:'中止原因',value:this.mainData.abortreason}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ // 监听切换数据,上一页,下一页
|
|
|
+ pageChange(id, rowindex, tabIndex) {
|
|
|
+ this.flag = false;
|
|
|
+ tabIndex = this.$route.query.tabIndex;
|
|
|
+ this.$router.replace({
|
|
|
+ path: "/serveBillDetail",
|
|
|
+ query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
|
|
|
+ });
|
|
|
+ this.queryMainData(id);
|
|
|
+ },
|
|
|
+ onSuccess() {
|
|
|
+ this.visible = false;
|
|
|
+ this.queryMainData(this.$route.query.id);
|
|
|
+ this.$emit("onSuccess");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.queryMainData(this.$route.query.id);
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+</style>
|