qymljy 3 месяцев назад
Родитель
Сommit
009c71c6c8

+ 9 - 2
src/HDrpManagement/serveBillMag/modules/detail.vue

@@ -71,6 +71,8 @@
         <serviceApplication  ref="serviceApplicationRef" v-if="mainData" :mainData="mainData"></serviceApplication>
       </div>
       <div slot="slot1">
+<!--        <serviceWorkOrder ref="serviceWorkOrderRef" v-if="mainData" :mainData="mainData" :nodes="nodes"-->
+<!--                          :team_name="team_name" :team_phone_number="team_phone_number"></serviceWorkOrder>-->
       </div>
       <div slot="slot2" >
       </div>
@@ -87,6 +89,7 @@ import workBill from './workBill/index'
 import productTable from './product/index'
 import addProduct from './product/add'
 import serviceApplication from '../components/serviceApplication'
+import serviceWorkOrder from '@/HDrpManagement/serveWorkBill/modules/serviceWorkOrder/index'
 export default {
   name: "detail",
   data() {
@@ -100,7 +103,10 @@ export default {
       nowUserid:JSON.parse(sessionStorage.getItem('active_account')).userid,
       usertype:JSON.parse(sessionStorage.getItem('active_account')).usertype,
       submitDis:true,
-      hrData:''
+      hrData:'',
+      nodes: [],
+      team_name:'',
+      team_phone_number:'',
     }
   },
   components:{
@@ -110,7 +116,8 @@ export default {
     workBill,
     productTable,
     addProduct,
-    serviceApplication
+    serviceApplication,
+    serviceWorkOrder
   },
   methods:{
     hrMain(data){

+ 5 - 2
src/HDrpManagement/serveWorkBill/components/teamSelect.vue

@@ -27,11 +27,14 @@
           :layout="tablecols"
           :data="teamList"
           :custom="true"
-          height="500px"
+          height="calc(100vh - 260px)"
           @upDateData="upDateData"
         >
           <template v-slot:customcol="scope">
-            <div>{{ $t(scope.column.data[scope.column.columnname]) }}</div>
+            <div v-if="scope.column.columnname == 'isleader'">
+              {{ $t(scope.column.data[scope.column.columnname]?'服务主管':'服务人员') }}
+            </div>
+            <div v-else>{{ $t(scope.column.data[scope.column.columnname]) || '--' }}</div>
           </template>
         </selectTable>
         <div class="container normal-panel" style="text-align: right">

+ 57 - 0
src/HDrpManagement/serveWorkBill/modules/checkBill/add.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <el-button
+        size="small"
+        type="primary"
+        @click="addBtn"
+    >{{ $t("新 建") }}</el-button
+    >
+    <el-drawer
+        :title="$t('新建确认单')"
+        :visible.sync="drawerVisible"
+        size="700px"
+        direction="rtl"
+        append-to-body
+        @close="onClose">
+      <div class="drawer__panel" style="margin-bottom: -10px">
+        <el-descriptions :title="$t(`单据信息`)">
+          <el-descriptions-item :label="$t(`服务申请单号`)"><span style="color: #666">{{$t()}}</span></el-descriptions-item>
+        </el-descriptions>
+        <el-descriptions :title="$t(`应用信息`)">
+          <el-descriptions-item :label="$t(`服务申请单号`)"><span style="color: #666">kooriookami</span></el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div class="drawer__panel" style="margin-bottom: -10px">
+        2222
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  props:["mainData"],
+  data(){
+    return {
+      drawerVisible:false
+    }
+  },
+  methods:{
+    addBtn(){
+      this.drawerVisible = true
+      console.log(this.mainData,'mainData数据')
+    },
+    onClose(){
+      this.drawerVisible = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+/deep/.el-descriptions__body {
+  color: #999999;
+  background-color: #fff;
+}
+</style>

+ 4 - 2
src/HDrpManagement/serveWorkBill/modules/checkBill/index.vue

@@ -14,6 +14,7 @@
         clearable
       >
       </el-input>
+      <add :mainData="mainData"></add>
     </div>
     <div style="margin-top: 15px">
       <tableLayout
@@ -64,9 +65,10 @@
 
 <script>
 import printTable from "./printTable";
+import add from "./add"
 export default {
-  props: ["data"],
-  components: { printTable },
+  props: ["data","mainData"],
+  components: { printTable,add },
   data() {
     return {
       tableHieght: "calc(100vh - 380px)",

+ 5 - 4
src/HDrpManagement/serveWorkBill/modules/serviceWorkOrder/index.vue

@@ -18,7 +18,7 @@
         <materials :data="mainData"></materials>
       </el-tab-pane>
       <el-tab-pane label="服务确认单" name="服务确认单">
-        <checkBill ref="checkBillRef">
+        <checkBill ref="checkBillRef" :mainData="mainData">
           <template v-slot:download="scope">
             <el-button
                 v-if="tool.checkAuth($route.name, 'checkBillDetail')"
@@ -38,7 +38,7 @@
         >
           <selectTeam ref="team" @teamChange="teamChange" slot="add">
             <el-button
-                v-if="tool.checkAuth($route.name, 'teamHandle') && mainData.status !== '已完成'"
+                v-if="(mainData.isServerMag || mainData.isleader) && mainData.status !== '已完成'"
                 class="button-new-tag"
                 size="small"
                 type="primary"
@@ -57,7 +57,7 @@
         <Items :data="mainData"></Items>
       </el-tab-pane>
       <el-tab-pane label="服务确认单" name="服务确认单">
-        <checkBill ref="checkBillRef">
+        <checkBill ref="checkBillRef" :mainData="mainData">
           <template v-slot:download="scope">
             <el-button
                 v-if="tool.checkAuth($route.name, 'checkBillDetail')"
@@ -73,10 +73,11 @@
         <teamList
             ref="teamList"
             :data="mainData.team"
+            :mainData="mainData"
         >
           <selectTeam ref="team" @teamChange="teamChange" slot="add">
             <el-button
-                v-if="mainData.isServerMag || mainData.isleader"
+                v-if="(mainData.isServerMag || mainData.isleader) && mainData.status !== '已完成'"
                 class="button-new-tag"
                 size="small"
                 type="primary"

+ 3 - 4
src/HDrpManagement/serveWorkBill/modules/teamList/index.vue

@@ -44,7 +44,7 @@
         <el-table-column :label="$t('操作')">
           <template slot-scope="scope">
             <el-button
-              :disabled="!tool.checkAuth($route.name, 'teamHandle') || status == '已完成'"
+              :disabled="!tool.checkAuth($route.name, 'teamHandle') || mainData.status == '已完成'"
               class="inline-16"
               size="mini"
               type="text"
@@ -53,8 +53,7 @@
             >
             <el-button
               :disabled="
-                !!scope.row.isleader ||
-                !tool.checkAuth($route.name, 'teamHandle') || status == '已完成'
+                !mainData.isServerMag || scope.row.isleader || mainData.status == '已完成'
               "
               size="mini"
               type="text"
@@ -70,7 +69,7 @@
 
 <script>
 export default {
-  props: ["status"],
+  props: ["status","mainData"],
   data() {
     return {
       teamList: [],

+ 85 - 2
src/HDrpManagement/serviceImprovement/modules/detail.vue

@@ -1,10 +1,93 @@
 <template>
-
+  <div>
+    <basicDetails
+        ref="details"
+        :titleText="mainData.billno"
+        :editData="mainData"
+        :mainAreaData="mainAreaData"
+        turnPageId="2026013111220102"
+        idname="sa_service_improvementid"
+        ownertable="sa_service_improvement"
+        tabName="tab2"
+        SalesmanQ="不执行"
+        tags=""
+        :tabs="['服务申请','服务工单','服务改善']"
+        @pageChange="pageChange"
+        @onEditSuccess="queryMainData($route.query.id)">
+      <div slot="slot0" >
+        <serviceApplication  ref="serviceApplicationRef" v-if="mainData" :mainData="mainData"></serviceApplication>
+      </div>
+      <div slot="slot1">
+      </div>
+      <div slot="slot2" >
+      </div>
+    </basicDetails>
+  </div>
 </template>
 
 <script>
+import serviceApplication from "@/HDrpManagement/serveBillMag/components/serviceApplication";
 export default {
-  name: "detail"
+  name: "detail",
+  components:{
+    serviceApplication
+  },
+  data(){
+    return {
+      mainData:{},
+      mainAreaData:{},
+    }
+  },
+  methods:{
+    async queryMainData(){
+      const res = await this.$api.requested({
+        "id": 2026013111234002,
+        "content": {
+          "sa_service_improvementid": this.$route.query.id
+        },
+      })
+      this.mainData = res.data
+      this.changeDataStructure()
+    },
+    changeDataStructure(){
+      let that = this
+      this.mainAreaData = [
+        {label:'改善单号',value:this.mainData.billno},
+        {label:'改善类别',value:this.mainData.type},
+        {label:'状态',value:this.mainData.status,
+          style:function () {
+            let style = that.tool.getStatusColor(that.mainData.status)
+            return style
+          }
+        },
+        {label:'工单号',value:this.mainData.billno_workorder},
+        {label:'申请单号',value:this.mainData.billno_serviceorder},
+        {label:'客诉大类',value:this.mainData.class2},
+        {label:'分析负责人',value:this.mainData.userid_analysis},
+        {label:'真因分析时间',value:this.mainData.submitdate},
+        {label:'责任部门',value:this.mainData.depname_charge},
+        {label:'方案发布人',value:this.mainData.sendby},
+        {label:'方案发布时间',value:this.mainData.senddate},
+        {label:'改善计划周期',value:this.mainData.planned_cycle},
+        {label:'改善实际周期',value:this.mainData.actual_cycle},
+        {label:'改善方案进度',value:this.mainData.progress},
+        {label:'改善结果',value:this.mainData.result},
+        {label:'创建时间',value:this.mainData.createdate},
+        {label:'完成时间',value:this.mainData.finishdate},
+        {label:'备注',value:this.mainData.remarks},
+      ]
+    },
+    // 监听切换数据,上一页,下一页
+    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)
+    },
+  },
+  mounted() {
+    this.queryMainData()
+  }
 }
 </script>