|
|
@@ -7,7 +7,7 @@
|
|
|
<el-col :md="6" :sm="8" :xs="8">
|
|
|
<el-form-item label="工单单号">
|
|
|
<el-input
|
|
|
- v-model="searchForm.workOrderCode"
|
|
|
+ v-model="searchForm.code"
|
|
|
placeholder="请输入"
|
|
|
size="small"
|
|
|
></el-input> </el-form-item
|
|
|
@@ -21,7 +21,7 @@
|
|
|
></el-input> </el-form-item
|
|
|
></el-col>
|
|
|
<el-col :md="6" :sm="8" :xs="8">
|
|
|
- <el-form-item label="计划名称">
|
|
|
+ <el-form-item label="维修名称">
|
|
|
<el-input
|
|
|
v-model="searchForm.planName"
|
|
|
placeholder="请输入"
|
|
|
@@ -29,22 +29,26 @@
|
|
|
></el-input> </el-form-item
|
|
|
></el-col>
|
|
|
<el-col :md="6" :sm="8" :xs="8">
|
|
|
- <el-form-item label="报修记录单号">
|
|
|
- <el-input
|
|
|
- v-model="searchForm.repairsCode"
|
|
|
- placeholder="请输入"
|
|
|
- size="small"
|
|
|
- ></el-input> </el-form-item
|
|
|
+ <el-form-item label="执行人:">
|
|
|
+ <personSelect v-model="searchForm.executeUserId" /> </el-form-item
|
|
|
></el-col>
|
|
|
- <el-col :md="6" :sm="8" :xs="8">
|
|
|
- <el-form-item label="执行人">
|
|
|
- <el-input
|
|
|
- v-model="searchForm.executeUserName"
|
|
|
- placeholder="请输入"
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <!-- <el-col :md="6" :sm="8" :xs="8">
|
|
|
+ <el-form-item label="执行结果">
|
|
|
+ <el-select
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model="searchForm.executeStatus"
|
|
|
+ class="w100"
|
|
|
size="small"
|
|
|
- ></el-input> </el-form-item
|
|
|
- ></el-col>
|
|
|
- <el-col :md="12" :sm="16" :xs="16">
|
|
|
+ >
|
|
|
+ <el-option value="0" label="待检"></el-option>
|
|
|
+ <el-option value="1" label="已检"></el-option>
|
|
|
+ <el-option value="2" label="缺陷"></el-option>
|
|
|
+ </el-select> </el-form-item
|
|
|
+ ></el-col> -->
|
|
|
+ <!-- <el-col :md="12" :sm="16" :xs="16">
|
|
|
<el-form-item>
|
|
|
<el-col :span="8">
|
|
|
<el-select
|
|
|
@@ -75,8 +79,13 @@
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-col> </el-form-item
|
|
|
- ></el-col>
|
|
|
- <el-col :md="6" :sm="16" :xs="16" style="text-align: right">
|
|
|
+ ></el-col> -->
|
|
|
+ <el-col
|
|
|
+ :md="24"
|
|
|
+ :sm="8"
|
|
|
+ :xs="8"
|
|
|
+ style="text-align: right; margin-bottom: 20px"
|
|
|
+ >
|
|
|
<el-button icon="el-icon-refresh-left" size="small" @click="rest"
|
|
|
>重置</el-button
|
|
|
>
|
|
|
@@ -107,15 +116,9 @@
|
|
|
{{ $tableIndex($index, page, size) }}
|
|
|
</template> -->
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="workOrderCode" label="工单编号">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="repairsCode" @click="jumpDetails(scope.row)">
|
|
|
- {{ scope.row.repairsCode }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="planCode" label="计划单号" />
|
|
|
- <el-table-column prop="planName" label="计划名称" />
|
|
|
+ <el-table-column prop="workCode" label="工单编号"> </el-table-column>
|
|
|
+ <el-table-column prop="planCode" width="180" label="计划单号" />
|
|
|
+ <el-table-column prop="planName" label="维修名称" />
|
|
|
<el-table-column prop="executeUserName" label="执行人" />
|
|
|
<el-table-column prop="createTime" label="工单生成时间" />
|
|
|
<el-table-column prop="acceptTime" label="开工时间" />
|
|
|
@@ -125,8 +128,23 @@
|
|
|
{{ time_interval(row.acceptTime, row.finishTime) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="repairsCode" label="报修记录单号" />
|
|
|
+ <!-- <el-table-column prop="executeStatus" label="执行结果">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span
|
|
|
+ :class="{
|
|
|
+ 'danger-text': row.executeStatus === 3
|
|
|
+ }"
|
|
|
+ >{{ ['待检', '已检', '缺陷'][row.executeStatus] }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
+ <!-- <pagenation
|
|
|
+ :page.sync="page"
|
|
|
+ :size.sync="size"
|
|
|
+ :total="total"
|
|
|
+ @pagination="pageChange"
|
|
|
+ /> -->
|
|
|
<div
|
|
|
class="zw-table-footer"
|
|
|
style="display: flex; justify-content: flex-end"
|
|
|
@@ -136,42 +154,44 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="total"
|
|
|
:page-sizes="[15, 30, 50, 100, 500]"
|
|
|
- :page-size.sync="pages.size"
|
|
|
- :current-page.sync="pages.page"
|
|
|
+ :page-size.sync="searchForm.size"
|
|
|
+ :current-page.sync="searchForm.pageNum"
|
|
|
@current-change="handleCurrentChange"
|
|
|
@size-change="handleSizeChange"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <DetailsDialog ref="detailsDialogRef" /> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
// import mixins from '../mixins/index'
|
|
|
+ import personSelect from '@/components/CommomSelect/person-select.vue';
|
|
|
import pagenation from '@/components/Pagination';
|
|
|
- // import { getsheetwork, getDetail } from '@/api/ledgerAssets/equipment';
|
|
|
- // import DetailsDialog from '@/views/feature/maintenance/repair/RepairDetailsDialog.vue';
|
|
|
- // import repair from '@/api/maintenance/repair/repair';
|
|
|
+ import { deviceWorkList } from '@/api/equipment/work.js';
|
|
|
export default {
|
|
|
// mixins: [mixins],
|
|
|
props: ['code'],
|
|
|
- // DetailsDialog
|
|
|
- components: { pagenation },
|
|
|
+ components: { pagenation, personSelect },
|
|
|
data() {
|
|
|
return {
|
|
|
informationId: '',
|
|
|
tableData: [],
|
|
|
searchForm: {
|
|
|
- workOrderCode: '',
|
|
|
+ code: '',
|
|
|
+ deviceId: '',
|
|
|
planCode: '',
|
|
|
planName: '',
|
|
|
- repairsCode: '',
|
|
|
- executeUserName: '',
|
|
|
- startTimeType: '1',
|
|
|
- date: ''
|
|
|
+ executeStatus: '',
|
|
|
+ executeUserId: '',
|
|
|
+ pageNum: 1,
|
|
|
+ size: 15,
|
|
|
+ type: '3'
|
|
|
},
|
|
|
+ // page: 1,
|
|
|
+ // size: 15,
|
|
|
+ // total: 0,
|
|
|
pages: {
|
|
|
page: 1,
|
|
|
size: 15
|
|
|
@@ -196,6 +216,7 @@
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ this.searchForm.deviceId = this.$route.query.id;
|
|
|
this.getdata();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -205,24 +226,10 @@
|
|
|
return index;
|
|
|
},
|
|
|
getdata() {
|
|
|
- let par = {
|
|
|
- workOrderType: 3,
|
|
|
- equiCode: this.code,
|
|
|
- ...this.pages,
|
|
|
- ...this.searchForm
|
|
|
- };
|
|
|
- if (this.searchForm.date.length) {
|
|
|
- par.startTime = this.searchForm.date[0];
|
|
|
- par.endTime = this.searchForm.date[1];
|
|
|
- }
|
|
|
- if (this.searchForm.date.length) {
|
|
|
- par.startTime = this.searchForm.date[0];
|
|
|
- par.endTime = this.searchForm.date[1];
|
|
|
- }
|
|
|
- // getsheetwork(par).then((res) => {
|
|
|
- // this.tableData = res.data.records;
|
|
|
- // this.total = res.data.total;
|
|
|
- // });
|
|
|
+ deviceWorkList(this.searchForm).then((res) => {
|
|
|
+ this.tableData = res.list;
|
|
|
+ this.total = res.count;
|
|
|
+ });
|
|
|
},
|
|
|
search() {
|
|
|
this.pages.page = 1;
|
|
|
@@ -230,29 +237,28 @@
|
|
|
},
|
|
|
rest() {
|
|
|
this.searchForm = {
|
|
|
- workOrderCode: '',
|
|
|
+ code: '',
|
|
|
+ deviceId: '',
|
|
|
planCode: '',
|
|
|
planName: '',
|
|
|
- repairsCode: '',
|
|
|
- executeUserName: '',
|
|
|
- startTimeType: '1',
|
|
|
- date: ''
|
|
|
+ executeStatus: '',
|
|
|
+ executeUserId: '',
|
|
|
+ pageNum: 1,
|
|
|
+ size: 15,
|
|
|
+ type: '3'
|
|
|
};
|
|
|
this.pages.page = 1;
|
|
|
this.getdata();
|
|
|
},
|
|
|
- async jumpDetails(row) {
|
|
|
- console.log('row', row);
|
|
|
- row.title = '工单详情';
|
|
|
- row.tabLabel = '工单信息';
|
|
|
- this.$refs.detailsDialogRef.init(row);
|
|
|
- // console.log(row);
|
|
|
- // this.$refs.detailsDialogRef.equipmentdialog = true
|
|
|
- // const res = await maintenancePlan.getWorkOrderDetail(row.workOrderCode)
|
|
|
- // this.workOrderInfo = res.data
|
|
|
- // this.planInfo = res.data.planInfo
|
|
|
- // this.infoData = res.data.repairInfo
|
|
|
- // this.repairInfoLogs = res.data.repairInfoLogList
|
|
|
+ //跳转详情
|
|
|
+ jumpDetails(data) {
|
|
|
+ const { href } = this.$router.resolve({
|
|
|
+ name: `MaintenanceWorkDetails`,
|
|
|
+ query: {
|
|
|
+ code: data.code
|
|
|
+ }
|
|
|
+ });
|
|
|
+ window.open(href, '_self');
|
|
|
},
|
|
|
|
|
|
handleCurrentChange() {
|