From 92ff846fb659c62037a32b1d8c15eae9df9d9b54 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期一, 18 九月 2023 13:24:30 +0800
Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430

---
 src/views/eam/RepairOrderList.vue |  842 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 842 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue
new file mode 100644
index 0000000..e4c38fa
--- /dev/null
+++ b/src/views/eam/RepairOrderList.vue
@@ -0,0 +1,842 @@
+<template>
+  <a-card
+    title="缁翠慨宸ュ崟"
+    :bordered="false"
+  >
+    <div class="table-page-search-wrapper">
+      <a-form
+        layout="inline"
+        @keyup.enter.native="searchQuery"
+      >
+        <a-row :gutter="24">
+          <a-col
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
+          >
+            <a-form-item label="宸ュ崟鐘舵��">
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨宸ュ崟鐘舵��"
+                :triggerChange="true"
+                dictCode="repair_order_status"
+                v-model="queryParam.status"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
+          >
+            <a-form-item label="鍗曟嵁鍙�">
+              <a-input
+                placeholder="璇疯緭鍏ュ崟鎹彿"
+                v-model="queryParam.num"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col
+            :xl="6"
+            :lg="7"
+            :md="8"
+            :sm="24"
+          >
+            <a-form-item label="璁惧缂栫爜">
+              <a-input
+                placeholder="璇疯緭鍏ヨ澶囩紪鐮�"
+                v-model="queryParam.equipmentNum"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <span
+              style="float: left;overflow: hidden;"
+              class="table-page-search-submitButtons"
+            >
+              <a
+                @click="handleToggleSearch"
+                style="margin-left: 8px"
+              >
+                {{ toggleSearchStatus ? '鏌ヨ鏉′欢鏀惰捣' : '璇︾粏鏌ヨ' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+
+        <template v-if="toggleSearchStatus">
+          <a-row :gutter="24">
+            <a-col
+              :xl="6"
+              :lg="7"
+              :md="8"
+              :sm="24"
+            >
+              <a-form-item label="璁惧鍚嶇О">
+                <a-input
+                  placeholder="璇疯緭鍏ヨ澶囧悕绉�"
+                  v-model="queryParam.equipmentName"
+                ></a-input>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </template>
+      </a-form>
+    </div>
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-dropdown>
+        <a-menu slot="overlay">
+          <a-menu-item
+            key="1"
+            @click="handleAddPre(1)"
+          ><a-icon type="smile" />鑷缓</a-menu-item>
+          <a-menu-item
+            key="2"
+            @click="handleAddPre(2)"
+          ><a-icon type="copy" />鍙傜収淇濅慨鏁呴殰鍗�</a-menu-item>
+          <a-menu-item
+            key="2"
+            @click="handleAddPre(3)"
+          ><a-icon type="copy" />鍙傜収椤圭洰鎬х淮淇�</a-menu-item>
+        </a-menu>
+        <a-button
+          type="primary"
+          icon="plus"
+        >鏂板</a-button>
+      </a-dropdown>
+
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+        style="margin-right: 5px"
+      >鏌ヨ</a-button>
+      <a-button
+        @click="searchReset"
+        icon="reload"
+      >閲嶇疆</a-button>
+      <a-button
+        hidden
+        type="primary"
+        icon="plus"
+        @click="handleDispatch()"
+        :disabled="selectionRows.length==0"
+      >娲惧伐</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">瀵煎叆</a-button>
+      </a-upload> -->
+      <!-- 楂樼骇鏌ヨ鍖哄煙 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> -->
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+      <div
+        class="ant-alert ant-alert-info"
+        style="margin-bottom: 16px;"
+      >
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+        <a
+          style="margin-left: 24px"
+          @click="onClearSelected"
+        >娓呯┖</a>
+      </div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        class="j-table-force-nowrap"
+        :scroll="{ x: 'calc(2700px + 50%)', y: 900 }"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange"
+        :customRow="clickThenSelect"
+      >
+        <!-- :rowSelection="rowSelection" -->
+
+        <span
+          slot="num"
+          slot-scope="text, record"
+        >
+
+
+          <a
+            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
+            class="lot"
+            @click="handleOrderExe(record)"
+          ><j-ellipsis :value="text" :length="15"/></a>
+          <span v-else> <j-ellipsis :value="text" :length="15"/></span>
+        </span>
+
+        <!-- <span
+          slot="action"
+          slot-scope="text, record"
+        >
+          <a-popconfirm
+            title="纭畾涓嬪彂鍚�?"
+            @confirm="() => handleDistribute(record)"
+          >
+            <a v-if="record.status=='0'">涓嬪彂</a>
+          </a-popconfirm>
+          <a-divider
+            type="vertical"
+            v-if="record.status=='0'"
+          />
+          <a-popconfirm
+            title="纭畾鎾ゅ洖鍚�?"
+            @confirm="() => handleWithdraw(record)"
+          >
+            <a v-if="record.status=='1'">鎾ゅ洖</a>
+          </a-popconfirm>
+          <a-divider
+            type="vertical"
+            v-if="record.status=='1'"
+          />
+          <a-popconfirm
+            title="纭畾棰嗗彇鍚�?"
+            @confirm="() => handleReceive(record)"
+          >
+            <a v-if="record.status=='1'">棰嗗彇</a>
+          </a-popconfirm>
+          <a-divider
+            type="vertical"
+            v-if="record.status=='1'"
+          />
+          <a
+            v-if="record.status === '2' || record.status === '3' ||record.status === '4'"
+            @click="handleOrderExe(record)"
+          >鎵ц</a>
+          <a-divider
+            type="vertical"
+            v-if="record.status === '2' || record.status === '3' ||record.status === '4'"
+          />
+          <a
+            @click="handleEditPre(record)"
+            v-if="record.status=='0'"
+          >缂栬緫</a>
+          <a-divider
+            type="vertical"
+            v-if="record.status=='0'"
+          />
+          <a-dropdown v-if="record.status=='0'">
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm
+                  title="纭畾鍒犻櫎鍚�?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span> -->
+        <span
+          slot="action"
+          slot-scope="text, record"
+        >
+          <a-popconfirm
+            title="纭畾涓嬪彂宸ュ崟鍚�?"
+            @confirm="() => handleDistribute(record)"
+          >
+            <a v-if="record.status == '0'">涓嬪彂</a>
+          </a-popconfirm>
+          <a-divider
+            v-if="record.status == '0'"
+            type="vertical"
+          />
+          <a-popconfirm
+            title="纭畾鎾ゅ洖宸ュ崟鍚�?"
+            @confirm="() => handleWithdraw(record)"
+          >
+            <a v-if="record.status == '1'">鎾ゅ洖</a>
+          </a-popconfirm>
+          <a-divider
+            v-if="record.status == '1'"
+            type="vertical"
+          />
+          <a-popconfirm
+            title="纭畾棰嗗彇宸ュ崟鍚�?"
+            @confirm="() => handleReceive(record)"
+          >
+            <a v-if="record.status == '1' && record.dispatchMethod == '2'">棰嗗彇</a>
+          </a-popconfirm>
+          <a
+            v-if="record.status == '1' && record.dispatchMethod == '1'  "
+            @click="handleAssignOrder(record)"
+          >娲惧伐</a>
+          <a
+            v-if="record.status == '2' && record.dispatchMethod != null "
+            @click="handleAssignOrder(record)"
+          >鏀规淳</a>
+          <a-divider
+            v-if="record.status == '1' || record.status == '2' "
+            type="vertical"
+          />
+          <a
+            v-if="record.status === '2' || record.status === '3' "
+            @click="handleOrderExe(record)"
+          >鎵ц</a>
+          <a-divider
+            v-if="record.status === '2' || record.status === '3' "
+            type="vertical"
+          />
+          <a
+            v-if="record.status === '0'"
+            @click="handleEditPre(record)"
+          >缂栬緫</a>
+          <a-divider
+            v-if="record.status === '0'"
+            type="vertical"
+          />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">璇︽儏</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm
+                  title="纭畾鍒犻櫎鍚�?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a v-if="record.status === '0'">鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <a-tabs
+      type="card"
+      defaultActiveKey="1"
+    >
+      <a-tab-pane
+        tab="鏁呴殰鎻忚堪"
+        key="1"
+      >
+        <FaultDescriptionList ref="FaultDescriptionList" />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="缁翠慨瑕佹眰"
+        key="2"
+      >
+        <RepairOrderDetailList
+          :mainId="repairOrderDetailMainId"
+          :addStatus="sonsAddStatus"
+        />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="璁″垝鐢ㄦ枡"
+        key="3"
+        forceRender
+      >
+        <RepairOrderPlanMaterialList
+          :addStatus="sonsAddStatus"
+          :mainId="repairOrderPlanMaterialMainId"
+        />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="鍗遍櫓闃叉帶"
+        key="4"
+        forceRender
+      >
+        <RepairOrderRiskPreventionList
+          :addStatus="sonsAddStatus"
+          :mainId="repairOrderRiskPreventionMainId"
+        />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="浣滀笟鎸囧涔�"
+        key="5"
+        forceRender
+      >
+        <EquipmentDocumentList
+          :addStatus="sonsAddStatus"
+          :mainId="equipmentDocumentMainId"
+        />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="瀹為檯鐢ㄦ枡"
+        key="6"
+        forceRender
+        v-if="!sonsAddStatus&&selectedRowKeys.length!=0"
+      >
+        <RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="瀹為檯宸ユ椂"
+        key="7"
+        forceRender
+        v-if="!sonsAddStatus&&selectedRowKeys.length!=0"
+      >
+        <RepairOrderActualWorkHoursList :mainId="repairOrderActualWorkHoursMainId" />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="鏁呴殰鍒嗘瀽"
+        key="8"
+        forceRender
+        v-if="!sonsAddStatus&&selectedRowKeys.length!=0"
+      >
+        <RepairOrderFaultAnalysisList :mainId="repairOrderFaultAnalysisMainId" />
+      </a-tab-pane>
+    </a-tabs>
+    <repairOrder-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+      :isSelfCreate="isSelfCreate"
+    ></repairOrder-modal>
+    <repair-order-assign-task
+      ref="RepairOrderAssignModal"
+      @ok="modalFormOk"
+    >
+    </repair-order-assign-task>
+    <repair-order-excute-drawer
+      ref="repairOrderExcuteDrawer"
+      @ok="modalFormOk"
+      :repairOrder="excuteRepairOrder"
+    >
+    </repair-order-excute-drawer>
+  </a-card>
+</template>
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import RepairOrderModal from './modules/repairorder/RepairOrderModal'
+import { getAction } from '@/api/manage'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import RepairOrderDetailList from './RepairOrderDetailList'
+import RepairOrderRiskPreventionList from './RepairOrderRiskPreventionList'
+import RepairOrderFaultAnalysisList from './RepairOrderFaultAnalysisList'
+import RepairOrderPlanMaterialList from './RepairOrderPlanMaterialList'
+import RepairOrderActualMaterialList from './RepairOrderActualMaterialList'
+import RepairOrderActualWorkHoursList from './RepairOrderActualWorkHoursList'
+import EquipmentDocumentList from './RepairOrderEquipmentDocumentList'
+import '@/assets/less/TableExpand.less'
+import { putAction } from '../../api/manage'
+import RepairOrderAssignTask from './modules/repairorder/RepairOrderAssignTask.vue'
+import RepairOrderExcuteDrawer from './modules/repairorder/repairOrderExcuteDrawer.vue'
+import FaultDescriptionList from './FaultDescriptionList'
+export default {
+  name: "RepairOrderList",
+  mixins: [JeecgListMixin],
+  components: {
+    JEllipsis,
+    RepairOrderDetailList,
+    RepairOrderRiskPreventionList,
+    RepairOrderFaultAnalysisList,
+    RepairOrderPlanMaterialList,
+    RepairOrderActualMaterialList,
+    RepairOrderActualWorkHoursList,
+    EquipmentDocumentList,
+    RepairOrderModal,
+    RepairOrderAssignTask,
+    RepairOrderExcuteDrawer,
+    FaultDescriptionList
+  },
+  data() {
+    return {
+      description: '缁翠慨宸ュ崟绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          align: "center",
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1;
+          }
+        },
+        {
+          title: '鐘舵��',
+          align: "center",
+          dataIndex: 'status_dictText'
+        },
+        {
+          title: '鍗曟嵁鍙�',
+          align: "center",
+          dataIndex: 'num',
+          scopedSlots: { customRender: 'num' }
+        },
+        {
+          title: '涓氬姟绫诲瀷',
+          align: "center",
+          dataIndex: 'businessType_dictText'
+        },
+        {
+          title: '璁惧缂栫爜',
+          align: "center",
+          dataIndex: 'equipmentNum'
+        },
+        {
+          title: '璁惧鍚嶇О',
+          align: "center",
+          dataIndex: 'equipmentName'
+        },
+        {
+          title: '璁惧鍨嬪彿',
+          align: "center",
+          dataIndex: 'equipmentModel'
+        },
+        {
+          title: '浣跨敤閮ㄩ棬',
+          align: "center",
+          dataIndex: 'departId_dictText'
+        },
+        {
+          title: '绱ф�ョ▼搴�',
+          align: "center",
+          dataIndex: 'urgency_dictText'
+        },
+        {
+          title: '缁翠繚鏂瑰紡',
+          align: "center",
+          dataIndex: 'maintenanceMethod_dictText'
+        },
+        {
+          title: '濮斿鍗曚綅',
+          align: "center",
+          dataIndex: 'outsourcingUnitName'
+        },
+        {
+          title: '璐d换鐝粍',
+          align: "center",
+          dataIndex: 'teamId_dictText'
+        },
+        {
+          title: '璐d换浜�',
+          align: "center",
+          dataIndex: 'responsibilityId_dictText'
+        },
+        {
+          title: '娲惧伐鏂瑰紡',
+          align: "center",
+          dataIndex: 'dispatchMethod_dictText'
+        },
+        // {
+        //   title: '鐗圭璁惧',
+        //   align: "center",
+        //   dataIndex: 'specificEquipment_dictText'
+        // },
+        {
+          title: '鏁呴殰鎻忚堪',
+          align: "center",
+          dataIndex: 'faultDescription'
+        },
+        // {
+        //   title: '鏁呴殰鏃堕棿',
+        //   align: "center",
+        //   dataIndex: 'faultTime'
+        // },
+        // {
+        //   title: '鏁呴殰鐓х墖',
+        //   align: "center",
+        //   dataIndex: 'photo',
+        //   scopedSlots: { customRender: 'imgSlot' }
+        // },
+        // {
+        //   title: '鏄惁鍋滄満',
+        //   align: "center",
+        //   dataIndex: 'isStop_dictText'
+        // },
+        {
+          title: '宸ユ椂瀹氶',
+          align: "center",
+          dataIndex: 'workingHourQuota'
+        },
+        {
+          title: '瀹為檯宸ユ椂',
+          align: "center",
+          dataIndex: 'actualHour'
+        },
+        {
+          title: '璁″垝寮�濮嬫椂闂�',
+          align: "center",
+          dataIndex: 'planStartTime'
+        },
+        {
+          title: '璁″垝缁撴潫鏃堕棿',
+          align: "center",
+          dataIndex: 'planEndTime'
+        },
+        {
+          title: '瀹為檯寮�濮嬫椂闂�',
+          align: "center",
+          dataIndex: 'actualStartTime'
+        },
+        {
+          title: '瀹為檯缁撴潫鏃堕棿',
+          align: "center",
+          dataIndex: 'actualEndTime'
+        },
+        {
+          title: '鍒涘缓浜�',
+          align: "center",
+          dataIndex: 'createBy'
+        },
+        {
+          title: '鍒涘缓鏃堕棿',
+          align: "center",
+          dataIndex: 'createTime'
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: "center",
+          fixed: "right",
+          width: 230,
+          scopedSlots: { customRender: 'action' },
+        }
+      ],
+      url: {
+        list: "/eam/repairOrder/list",
+        delete: "/eam/repairOrder/delete",
+        deleteBatch: "/eam/repairOrder/deleteBatch",
+        exportXlsUrl: "/eam/repairOrder/exportXls",
+        importExcelUrl: "eam/repairOrder/importExcel",
+        orderDistribute: "eam/repairOrder/distribute",
+        orderWithdraw: "eam/repairOrder/withdraw",
+        orderDispatch: "eam/repairOrder/dispatch",
+        orderReceive: "eam/repairOrder/receive",
+        orderStart: "eam/repairOrder/start"
+      },
+      /* 鍒嗛〉鍙傛暟 */
+      ipagination: {
+        current: 1,
+        pageSize: 5,
+        pageSizeOptions: ['5', '10', '50'],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      selectedMainId: '',
+      // superFieldList: [],
+      repairOrderDetailMainId: '',
+      repairOrderRiskPreventionMainId: '',
+      repairOrderFaultAnalysisMainId: '',
+      repairOrderPlanMaterialMainId: '',
+      repairOrderActualMaterialMainId: '',
+      repairOrderActualWorkHoursMainId: '',
+      equipmentDocumentMainId: '',
+      isSelfCreate: '1',
+      excuteRepairOrder: {},
+      assignTaskList: [],
+      sonsAddStatus: false,
+    }
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    },
+    rowSelection() {
+      return {
+        type: 'checkbox',
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.onSelectChange(selectedRowKeys, selectedRows);
+        },
+        getCheckboxProps: record => ({
+          props: {
+          },
+        }),
+        selectedRowKeys: this.selectedRowKeys,
+      };
+    },
+  },
+
+  watch: {
+    selectionRows() {
+      this.$bus.$emit('repairOrderSelectionRows', this.selectionRows);
+    },
+  },
+
+  methods: {
+
+
+    clickThenSelect(record) {
+      return {
+        on: {
+          click: () => {
+            this.onSelectChange(record.id.split(","), [record]);
+          }
+        }
+      }
+    },
+    onClearSelected() {
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+      this.selectedMainId = ''
+      this.repairOrderDetailMainId = ''
+      this.repairOrderRiskPreventionMainId = ''
+      this.repairOrderFaultAnalysisMainId = ''
+      this.repairOrderPlanMaterialMainId = ''
+      this.repairOrderActualMaterialMainId = ''
+      this.repairOrderActualWorkHoursMainId = ''
+      this.equipmentDocumentMainId = ''
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      if (selectedRowKeys.length == 1) {
+        this.selectedMainId = selectedRowKeys[0]
+        this.repairOrderDetailMainId = selectionRows[0]['id']
+        this.repairOrderRiskPreventionMainId = selectionRows[0]['id']
+        this.repairOrderFaultAnalysisMainId = selectionRows[0]['id']
+        this.repairOrderPlanMaterialMainId = selectionRows[0]['id']
+        this.repairOrderActualMaterialMainId = selectionRows[0]['id']
+        this.repairOrderActualWorkHoursMainId = selectionRows[0]['id']
+        this.equipmentDocumentMainId = selectionRows[0]['id']
+        this.sonsAddStatus = (selectionRows[0]['status'] == '0')
+        this.$refs.FaultDescriptionList.faultId = selectedRowKeys[0]
+      } else {
+        this.$refs.FaultDescriptionList.faultId = '-1'
+        this.selectedMainId = ''
+        this.repairOrderDetailMainId = ''
+        this.repairOrderRiskPreventionMainId = ''
+        this.repairOrderFaultAnalysisMainId = ''
+        this.repairOrderPlanMaterialMainId = ''
+        this.repairOrderActualMaterialMainId = ''
+        this.repairOrderActualWorkHoursMainId = ''
+        this.equipmentDocumentMainId = ''
+      }
+      this.selectedRowKeys = selectedRowKeys;
+      this.selectionRows = selectionRows;
+      this.assignTaskList = [];
+      for (var i = 0; i < selectionRows.length; i++) {
+        if (selectionRows[i].status == '1') {
+          this.assignTaskList.push(selectionRows[i]);
+        }
+      }
+    },
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error("璇疯缃畊rl.list灞炴��!")
+        return
+      }
+      //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
+      if (arg === 1) {
+        this.ipagination.current = 1;
+      }
+      this.onClearSelected()
+      this.queryParam.repairOrderType = 0;
+      var params = this.getQueryParams();//鏌ヨ鏉′欢
+      this.loading = true;
+      getAction(this.url.list, params).then((res) => {
+        if (res.success) {
+          this.dataSource = res.result.records;
+          this.ipagination.total = res.result.total;
+        }
+        if (res.code === 510) {
+          this.$message.warning(res.message)
+        }
+        this.loading = false;
+        this.$refs.FaultDescriptionList.faultId = '-1'
+        this.excuteRepairOrder = {}
+      })
+    },
+
+    handleAddPre(isSelfCreate) {
+      this.isSelfCreate = isSelfCreate;
+      this.handleAdd();
+    },
+    handleEditPre(record) {
+      console.log(record);
+      if (record.reportRepairId != null && record.reportRepairId != undefined && record.reportRepairId != '') {
+        this.isSelfCreate = '2';
+      }
+      else if (record.projectMaintenanceOrderId != null && record.projectMaintenanceOrderId != undefined && record.projectMaintenanceOrderId != '') {
+        this.isSelfCreate = '3';
+      } else {
+        this.isSelfCreate = '1';
+      }
+      this.handleEdit(record);
+    },
+    //宸ュ崟娴佺▼鎿嶄綔
+    handleDistribute(record) {
+      putAction(this.url.orderDistribute, record).then(res => {
+        if (res.result) {
+          this.$message.success('涓嬪彂鎴愬姛');
+          this.loadData();
+        } else {
+          this.$message.error('涓嬪彂鍑虹幇寮傚父')
+        }
+      })
+
+    },
+    handleDispatch() {
+      if (this.assignTaskList.length == 0) {
+        this.$message.warn('鎵�閫夊伐鍗曟棤闇�娲惧伐');
+      } else {
+        this.$refs.RepairOrderAssignModal.visible = true
+        this.$refs.RepairOrderAssignModal.title = '缁翠慨宸ュ崟娲惧伐'
+        this.$refs.RepairOrderAssignModal.selectionRows
+        this.$refs.RepairOrderAssignModal.handleShow()
+      }
+    },
+    //鏀规淳
+    handleAssignOrder: function (record) {
+      this.$refs.RepairOrderAssignModal.edit(record)
+      this.$refs.RepairOrderAssignModal.title = '宸ュ崟鏀规淳'
+      this.$refs.RepairOrderAssignModal.disableSubmit = false
+    },
+    handleWithdraw(record) {
+      putAction(this.url.orderWithdraw, record).then(res => {
+        if (res.result) {
+          this.$message.success('鎾ら攢鎴愬姛');
+          this.loadData();
+        } else {
+          this.$message.error('鎾ら攢鍑虹幇寮傚父')
+        }
+      })
+    },
+    handleReceive(record) {
+      putAction(this.url.orderReceive, record).then(res => {
+        if (res.result) {
+          this.$message.success('棰嗗彇鎴愬姛');
+          this.loadData();
+        } else {
+          this.$message.error('棰嗗彇鍑虹幇寮傚父')
+        }
+      })
+    },
+    handleOrderExe(record) {
+      this.excuteRepairOrder = record;
+      this.$refs.repairOrderExcuteDrawer.visible = true
+      this.$refs.repairOrderExcuteDrawer.title = '缁翠慨宸ュ崟鎵ц'
+    },
+
+    searchQuery() {
+      this.loadData(1)
+      this.selectedRowKeys = []
+      this.selectionRows = []
+      this.onClearSelected()
+      this.$refs.FaultDescriptionList.faultId = '-1'
+    },
+
+    searchReset() {
+      this.queryParam = {}
+      this.loadData(1)
+      this.onClearSelected()
+      this.$refs.FaultDescriptionList.faultId = '-1'
+    },
+
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file

--
Gitblit v1.9.3