linwenxin 6 miesięcy temu
rodzic
commit
5acca1cc51

+ 1 - 1
src/views/workOrder/workOrderPool/detail.vue

@@ -126,7 +126,7 @@ export default {
 
 <style lang="scss" scoped>
 .yemiansize {
-  height: calc(100vh - 140px) !important;
+  height: calc(100vh - 85px) !important;
   overflow: hidden;
 
   & > ::v-deep .el-tabs:nth-child(1) {

+ 2 - 2
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/index.vue

@@ -42,7 +42,7 @@
     <div>
       <div style="box-sizing: border-box; padding: 10px 10px 0" v-if="id">
         <!-- 关闭 -->
-        <close-button />
+        <!-- <close-button /> -->
         <!-- 1,保存  -->
         <commitSave v-if="~btnRestrict.indexOf(1)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 2,过程反馈  -->
@@ -73,7 +73,7 @@
         <orderReject v-if="~btnRestrict.indexOf(9)" :orderInfo="orderInfo" :orderType="orderType" />
         <!-- 10,激活工单 -->
         <activateOrder v-if="~btnRestrict.indexOf(10)" :orderInfo="orderInfo" :orderType="orderType" />
-        <cloneWorkOrderBtn v-if="~btnRestrict.indexOf(20)" :orderInfo="orderInfo" :orderType="orderType" />
+        <!-- <cloneWorkOrderBtn v-if="~btnRestrict.indexOf(20)" :orderInfo="orderInfo" :orderType="orderType" /> -->
       </div>
       <div style="box-sizing: border-box; padding: 10px 10px 0" v-else>
         <!-- 关闭 -->

+ 139 - 121
src/views/workOrder/workOrderPool/index.vue

@@ -1,60 +1,87 @@
 <template>
-  <!-- 工单池 -->
-  <template-page
-    v-if="showTableBool"
-    ref="pageRef"
-    :getList="getList"
-    :operation="operation()"
-    :exportList="exportList"
-    :optionsEvensGroup="optionsEvensGroup"
-    :columnParsing="columnParsing"
-    :tableAttributes="tableAttributes"
-    :tableEvents="tableEvents"
-    :moreParameters="moreParameters"
-    :screeningAnalysis="screeningAnalysis"
-    :filterMethod="filterMethod"
-    :replaceOrNotMap="true"
-    :defaultSearchData="defaultSearchData"
-  >
-    <div slot="moreSearch">
-      <div style="margin-bottom: 10px">
-        <span
-          style="
-            font-size: 12px;
-            font-weight: 400;
-            text-align: left;
-            color: #666;
-            line-height: 28px;
-            margin-right: 10px;
-          "
-          >选择年份</span
+  <div style="width: 100%; height: 100%; position: relative">
+    <!-- 工单池 -->
+    <template-page
+      v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '') && showTableBool"
+      ref="pageRef"
+      :getList="getList"
+      :operation="operation()"
+      :exportList="exportList"
+      :optionsEvensGroup="optionsEvensGroup"
+      :columnParsing="columnParsing"
+      :tableAttributes="tableAttributes"
+      :tableEvents="tableEvents"
+      :moreParameters="moreParameters"
+      :screeningAnalysis="screeningAnalysis"
+      :filterMethod="filterMethod"
+      :replaceOrNotMap="true"
+      :defaultSearchData="defaultSearchData"
+    >
+      <div slot="moreSearch">
+        <div style="margin-bottom: 10px">
+          <span
+            style="
+              font-size: 12px;
+              font-weight: 400;
+              text-align: left;
+              color: #666;
+              line-height: 28px;
+              margin-right: 10px;
+            "
+            >选择年份</span
+          >
+          <el-date-picker
+            style="width: 130px"
+            v-model="value1"
+            format="yyyy"
+            size="mini"
+            type="year"
+            placeholder="选择日期"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <!-- 创建工单 -->
+      <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
+        <el-dialog
+          title="创建工单"
+          width="100%"
+          :modal="false"
+          :visible.sync="createFormBool"
+          :before-close="handleClose"
         >
-        <el-date-picker
-          style="width: 130px"
-          v-model="value1"
-          format="yyyy"
-          size="mini"
-          type="year"
-          placeholder="选择日期"
+          <workOrderInfo :workOrderType="workOrderType" v-if="createFormBool" :cloneWorkOrder="cloneWorkOrder" />
+        </el-dialog>
+      </div>
+      <!-- 批量预约/改约 -->
+      <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
+        <el-dialog
+          title="批量约单"
+          width="100%"
+          :modal="false"
+          :visible.sync="rescheduleBool"
+          :before-close="rescheduleClose"
         >
-        </el-date-picker>
+          <Reschedule v-if="rescheduleBool" :recordSelected="recordSelected" @close="rescheduleClose" />
+        </el-dialog>
       </div>
-    </div>
-    <!-- 创建工单 -->
-    <div class="cartographer_big">
-      <el-dialog
-        title="创建工单"
-        width="100%"
-        :modal="false"
-        :visible.sync="createFormBool"
-        :before-close="handleClose"
-      >
-        <workOrderInfo :workOrderType="workOrderType" v-if="createFormBool" :cloneWorkOrder="cloneWorkOrder" />
-      </el-dialog>
-    </div>
+      <!-- 批量派工/改派 -->
+      <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
+        <el-dialog
+          title="批量派单"
+          width="100%"
+          :modal="false"
+          :visible.sync="reassignmentBool"
+          :before-close="reassignmentClose"
+        >
+          <Reassignment v-if="reassignmentBool" :recordSelected="recordSelected" @close="reassignmentClose" />
+        </el-dialog>
+      </div>
+    </template-page>
     <!-- 工单详情 -->
-    <div class="cartographer_big">
+    <div class="cartographer_big haidhead__" v-if="!!~['detail'].indexOf(pageType) && pageCode != ''">
       <el-dialog
+        class="noinonnlinin"
         :title="'工单详情-' + id"
         width="100%"
         :modal="false"
@@ -64,31 +91,7 @@
         <Detail v-if="detailFormBool" :id="id" :workOrderType="workOrderType" />
       </el-dialog>
     </div>
-    <!-- 批量预约/改约 -->
-    <div class="cartographer_big">
-      <el-dialog
-        title="批量约单"
-        width="100%"
-        :modal="false"
-        :visible.sync="rescheduleBool"
-        :before-close="rescheduleClose"
-      >
-        <Reschedule v-if="rescheduleBool" :recordSelected="recordSelected" @close="rescheduleClose" />
-      </el-dialog>
-    </div>
-    <!-- 批量派工/改派 -->
-    <div class="cartographer_big">
-      <el-dialog
-        title="批量派单"
-        width="100%"
-        :modal="false"
-        :visible.sync="reassignmentBool"
-        :before-close="reassignmentClose"
-      >
-        <Reassignment v-if="reassignmentBool" :recordSelected="recordSelected" @close="reassignmentClose" />
-      </el-dialog>
-    </div>
-  </template-page>
+  </div>
 </template>
 
 <script>
@@ -127,7 +130,7 @@ export default {
       // 创建表单
       createFormBool: false,
       // 详情
-      detailFormBool: false,
+      detailFormBool: true,
       // 批量改约
       rescheduleBool: false,
       // 批量派工/改派
@@ -313,31 +316,39 @@ export default {
   created() {
     this.initFun()
     EventBus.$on('handleOrderClone', () => {
-      this.handleClose()
+      if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
+        this.handleClose()
+      }
     })
     EventBus.$on('cloneWorkOrder', data => {
-      this.handleClose(() => {
-        this.cloneWorkOrder = data
-        this.workOrderType = data.saleType
-        this.createFormBool = false
-        this.$nextTick(() => {
-          this.createFormBool = true
+      if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
+        this.handleClose(() => {
+          this.cloneWorkOrder = data
+          this.workOrderType = data.saleType
+          this.createFormBool = false
+          this.$nextTick(() => {
+            this.createFormBool = true
+          })
         })
-      })
+      }
     })
-    // 获取工单类型
-    listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }).then(res => {
-      var obj = {}
-      res.data.records.map(item => {
-        if (!obj[item.orderSmallTypeText]) {
-          obj[item.orderSmallTypeText] = {
-            value: item.orderSmallTypeText,
-            label: item.orderSmallTypeText
-          }
+    if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
+      // 获取工单类型
+      listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }).then(
+        res => {
+          var obj = {}
+          res.data.records.map(item => {
+            if (!obj[item.orderSmallTypeText]) {
+              obj[item.orderSmallTypeText] = {
+                value: item.orderSmallTypeText,
+                label: item.orderSmallTypeText
+              }
+            }
+          })
+          this.orderTypeList = Object.values(obj)
         }
-      })
-      this.orderTypeList = Object.values(obj)
-    })
+      )
+    }
   },
   methods: {
     initFun() {
@@ -510,33 +521,24 @@ export default {
     operation() {
       return this.operationBtn({
         edit: {
-          // conditions: ({ row, index, column }) => {
-          //   return !row.isImport
-          // },
           click: ({ row, index, column }) => {
-            this.id = row.id
-            this.workOrderType = Number(
-              Object.entries(row?.selectMapData?.saleType || {}).find(([key, val]) => val == row.saleType)?.[0] || 1
-            )
-            this.$nextTick(() => {
-              this.detailFormBool = true
+            this.$router.push({
+              name: 'workOrderPool',
+              params: {
+                pageName: row.id,
+                pageType: 'detail',
+                pageCode: row.id
+              }
             })
+            // this.id = row.id
+            // this.workOrderType = Number(
+            //   Object.entries(row?.selectMapData?.saleType || {}).find(([key, val]) => val == row.saleType)?.[0] || 1
+            // )
+            // this.$nextTick(() => {
+            //   this.detailFormBool = true
+            // })
           }
         }
-        // view: {
-        //   conditions: ({ row, index, column }) => {
-        //     return row.isImport
-        //   },
-        //   click: ({ row, index, column }) => {
-        //     this.id = row.id
-        //     this.workOrderType = Number(
-        //       Object.entries(row?.selectMapData?.saleType || {}).find(([key, val]) => val == row.saleType)?.[0] || 1
-        //     )
-        //     this.$nextTick(() => {
-        //       this.detailFormBool = true
-        //     })
-        //   }
-        // }
       })
     },
 
@@ -573,4 +575,20 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.haidhead__ {
+  ::v-deep .noinonnlinin {
+    & > div > .el-dialog__header {
+      display: none !important;
+    }
+    & > div > .el-dialog__body {
+      width: 100%;
+      height: 100% !important;
+      position: relative;
+      box-sizing: border-box;
+      padding: 0px;
+      overflow-y: auto;
+    }
+  }
+}
+</style>