|  |  |  | 
|---|
|  |  |  | <el-option label="已取消" :value="99"></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="发布时间"   style="width: 380px;" label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.createTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" />- | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.createTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | <el-form-item label="发布时间"   prop="createTimeStart"  label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.createTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" /> - | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="createTimeEnd"   label-width="0px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.createTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="结束时间" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="接单时间"    style="width: 380px;" label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.acceptTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" />- | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.acceptTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | <el-form-item label="接单时间" prop="acceptTimeStart"  label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.acceptTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" /> - | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="acceptTimeEnd"  label-width="0px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.acceptTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="结束时间" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="完成时间"    style="width: 380px;" label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.doneTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" />- | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 120px"  v-model="searchForm.doneTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | <el-form-item label="完成时间"    prop="doneTimeStart"   label-width="100px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.doneTimeStart" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="开始时间" /> - | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="" prop="doneTimeEnd"  label-width="0px" > | 
|---|
|  |  |  | <el-date-picker type="datetime"  style="width: 150px"  v-model="searchForm.doneTimeEnd" clearable value-format="yyyy-MM-dd HH:mm:ss" | 
|---|
|  |  |  | placeholder="结束时间" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <section> | 
|---|
|  |  |  | <el-button type="primary" @click="search">搜索</el-button> | 
|---|
|  |  |  | <el-button @click="reset">重置</el-button> | 
|---|
|  |  |  | <el-button type="primary" :loading="isWorking.export" @click="exportExcel">导出</el-button> | 
|---|
|  |  |  | </section> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <!-- 表格和分页 --> | 
|---|
|  |  |  | 
|---|
|  |  |  | stripe | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column prop="code" label="订单编号" min-width="100px" fixed="left"> | 
|---|
|  |  |  | <el-table-column prop="code" label="订单编号" width="180px" fixed="left"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span style="cursor: pointer;color: #2E68EC" @click="openDetail(row)">{{row.code}}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="statusName" label="订单状态" min-width="100px"  > </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="statusName" label="订单状态" min-width="100px"  > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span :class="'orderstate'+row.status">{{row.statusName}}</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="type" label="订单类型" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span v-if="row.type==0">用工单</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="orderContent" label="订单内容"  width="200px" :show-overflow-tooltip='true'></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="releaseName" label="发单方" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="releaseName" label="发单方"  width="200px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | {{(row.releaseName||'匿名') +' - ' +(row.releasePhone||'无')  }} | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="acceptName" label="接单方" min-width="100px"> | 
|---|
|  |  |  | <el-table-column prop="acceptName" label="接单方" width="200px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | {{(row.acceptName||'匿名') +' - ' +(row.acceptPhone ||'无')  }} | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" class="redstate" @click="cancenDo(row)" v-if="row.status>-1 && row.status<4" icon="el-icon-delete" v-permissions="['business:orders:update']">取消</el-button> | 
|---|
|  |  |  | <el-button type="text" class="redstate" @click="cancelDo(row)" v-if="row.status>-1 && row.status<4" icon="el-icon-delete" v-permissions="['business:orders:update']">取消</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="openDetail( row)" icon="el-icon-info"  >详情</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | </pagination> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | <!-- 新建/修改 --> | 
|---|
|  |  |  | <OperaOrdersWindow ref="operaOrdersWindow" @success="handlePageChange"/> | 
|---|
|  |  |  | <OperaOrderDetailWindow ref="OperaOrderDetailWindow" @success="handlePageChange"/> | 
|---|
|  |  |  | </TableLayout> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import BaseTable from '@/components/base/BaseTable' | 
|---|
|  |  |  | import TableLayout from '@/layouts/TableLayout' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import OperaOrdersWindow from '@/components/business/OperaOrdersWindow' | 
|---|
|  |  |  | import OperaOrderDetailWindow from '@/components/business/OperaOrderDetailWindow' | 
|---|
|  |  |  | import { cancel } from '@/api/business/orders' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'Orders', | 
|---|
|  |  |  | extends: BaseTable, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaOrdersWindow }, | 
|---|
|  |  |  | components: { TableLayout, Pagination, OperaOrderDetailWindow }, | 
|---|
|  |  |  | data () { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | 
|---|
|  |  |  | doneTimeStart: null, | 
|---|
|  |  |  | doneTimeEnd: null, | 
|---|
|  |  |  | status: null, | 
|---|
|  |  |  | code:null | 
|---|
|  |  |  | code: null | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods:{ | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | openDetail (row) { | 
|---|
|  |  |  | // this.$refs.OperaMemberDetailWindow.open('用户详情', row.id) | 
|---|
|  |  |  | this.$refs.OperaOrderDetailWindow.open('订单详情', row ) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | cancenDo(row){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | cancelDo (row) { | 
|---|
|  |  |  | this.$dialog.actionConfirm('您确认【取消】该订单吗?', '操作确认') | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.dealing = true | 
|---|
|  |  |  | cancel(row.id) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | this.$tip.apiSuccess('操作成功') | 
|---|
|  |  |  | this.search() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(e => { | 
|---|
|  |  |  | this.$tip.apiFailed(e) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .finally(() => { | 
|---|
|  |  |  | this.dealing = false | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|