|
@@ -1,516 +1,39 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
|
|
|
- <!-- 筛选条件 -->
|
|
|
- <div class="screen-container">
|
|
|
- <Collapse :screen-form="screenForm">
|
|
|
- <template #right_btn>
|
|
|
- <el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
|
- </template>
|
|
|
- <template #left_btn>
|
|
|
- <el-radio-group size="mini" v-model="screenForm.status" @change="getList()">
|
|
|
- <el-radio-button label="">全部</el-radio-button>
|
|
|
- <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
|
|
|
- item.label
|
|
|
- }}</el-radio-button>
|
|
|
- </el-radio-group>
|
|
|
- </template>
|
|
|
- <template #search>
|
|
|
- <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="工程订单号" prop="orderNum">
|
|
|
- <el-input v-model="screenForm.orderNum" placeholder="请输入工程订单号"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="工程编号" prop="enginNum">
|
|
|
- <el-input v-model="screenForm.enginNum" placeholder="请输入工程编号"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="工程登录编号" prop="loginNum">
|
|
|
- <el-input v-model="screenForm.loginNum" placeholder="请输入工程登录编号"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="项目名称" prop="enginName">
|
|
|
- <el-input v-model="screenForm.enginName" placeholder="请输入项目名称"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="单据日期" prop="date">
|
|
|
- <el-date-picker
|
|
|
- v-model="screenForm.date"
|
|
|
- type="datetimerange"
|
|
|
-:default-time="['00:00:00','23:59:59']"
|
|
|
- range-separator="至"
|
|
|
- style="width: 100%"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="经销商" prop="dealer">
|
|
|
- <el-input v-model="screenForm.dealer" placeholder="请输入经销商"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="制表人" prop="createMan">
|
|
|
- <el-input v-model="screenForm.createMan" placeholder="请输入制表人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="审核人" prop="examineMan">
|
|
|
- <el-input v-model="screenForm.examineMan" placeholder="请输入审核人"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="表头业务员" prop="salesMan">
|
|
|
- <el-select
|
|
|
- v-model="screenForm.salesMan"
|
|
|
- placeholder="选择表头业务员"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in salesmanList"
|
|
|
- :key="item.adminUserId"
|
|
|
- :label="item.nickName"
|
|
|
- :value="item.adminUserId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="规格型号" prop="model">
|
|
|
- <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="是否直调" prop="isDirectTransfer">
|
|
|
- <el-select v-model="screenForm.isDirectTransfer" placeholder="选择是否直" style="width: 100%">
|
|
|
- <el-option :value="null" label="默认"></el-option>
|
|
|
- <el-option v-for="item in transfer" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="钱包" prop="customerWalletId">
|
|
|
- <el-select
|
|
|
- v-model="screenForm.customerWalletId"
|
|
|
- placeholder="选择钱包"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option v-for="item in NoRebateWalletList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="销售类型" prop="saleTypeId">
|
|
|
- <el-select
|
|
|
- v-model="screenForm.saleTypeId"
|
|
|
- placeholder="选择销售类型"
|
|
|
- clearable
|
|
|
- filterable
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option v-for="item in typeList" :key="item.id" :label="item.saleName" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- </Collapse>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="mymain-container">
|
|
|
- <div class="btn-group clearfix">
|
|
|
- <div class="fl">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- @click="toForm()"
|
|
|
- v-if="$checkBtnRole('add', $route.meta.roles)"
|
|
|
- >新增</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="danger"
|
|
|
- icon="el-icon-minus"
|
|
|
- :disabled="multipleSelection.length < 1"
|
|
|
- @click="batchDelete()"
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles)"
|
|
|
- >批量删除</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- <div class="fr">
|
|
|
- <ExportButton :exUrl="'engin-order/export'" :exParams="exParams" />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="table">
|
|
|
- <el-table
|
|
|
- v-loading="listLoading"
|
|
|
- :data="dataList"
|
|
|
- element-loading-text="Loading"
|
|
|
- border
|
|
|
- fit
|
|
|
- highlight-current-row
|
|
|
- stripe
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- show-summary
|
|
|
- :summary-method="$getSummaries"
|
|
|
- >
|
|
|
- <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.examineStatus | statusFilter }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="140" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.enginOrderNo" />
|
|
|
- <span>{{ scope.row.enginOrderNo }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="订单日期" prop="orderDate" min-width="120" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <div>
|
|
|
- <span>{{ scope.row.orderDate | dateToDayFilter }}</span>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- style="padding: 0; margin-left: 6px"
|
|
|
- @click="editDate(scope.row)"
|
|
|
- v-if="$checkBtnRole('date', $route.meta.roles) && !isCustomer && scope.row.examineStatus !== 'SAVE'"
|
|
|
- ></el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="工程编号"
|
|
|
- prop="refProjectNo"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="工程登录编号"
|
|
|
- prop="refEnginRecordNo"
|
|
|
- min-width="200"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.refEnginRecordNo" />
|
|
|
- <span>{{ scope.row.refEnginRecordNo }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="仓库"
|
|
|
- prop="correspondName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="left" label="订单类型" prop="enginOrderType" min-width="100" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.enginOrderType | typeFilter }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.customerName" />
|
|
|
- <span>{{ scope.row.customerName }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="使用单位"
|
|
|
- prop="refUseUnit"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="项目名称"
|
|
|
- prop="refProjectName"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <!-- <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>-->
|
|
|
- <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="120" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.materialNumber" />
|
|
|
- <span>{{ scope.row.materialNumber }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="产品编码"
|
|
|
- prop="materialOldNumber"
|
|
|
- min-width="140"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.materialOldNumber" />
|
|
|
- <span>{{ scope.row.materialOldNumber }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.materialName" />
|
|
|
- <span>{{ scope.row.materialName }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <CopyButton :copyText="scope.row.specification" />
|
|
|
- <span>{{ scope.row.specification }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="单位"
|
|
|
- prop="unit"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="总数量"
|
|
|
- prop="qty"
|
|
|
- min-width="100"
|
|
|
- sortable
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="是否直调"
|
|
|
- prop="isDirectTransfer"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.isDirectTransfer ? '是' : '否' }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="直调数量"
|
|
|
- prop="directTransferQty"
|
|
|
- min-width="110"
|
|
|
- sortable
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="出库数量"
|
|
|
- prop="hasSendQty"
|
|
|
- min-width="110"
|
|
|
- sortable
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.price | numToFixed }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="实付金额"
|
|
|
- prop="payAmount"
|
|
|
- min-width="110"
|
|
|
- sortable
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.payAmount | numToFixed }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="返利钱包"
|
|
|
- prop="customerWalletName2"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="使用返利金额"
|
|
|
- prop="rebateAmount"
|
|
|
- min-width="120"
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <div v-if="scope.row.examineStatus === 'OK'">
|
|
|
- {{ scope.row.payRebateAmount | numToFixed }}
|
|
|
- </div>
|
|
|
- <div v-else>{{ scope.row.rebateAmount | numToFixed }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="right"
|
|
|
- label="格力折扣"
|
|
|
- prop="discAmount"
|
|
|
- min-width="110"
|
|
|
- sortable
|
|
|
- show-overflow-tooltip
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.row.discAmount | numToFixed }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="备注"
|
|
|
- prop="remark"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="表头业务员"
|
|
|
- prop="serviceName"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="表体业务员"
|
|
|
- prop="itemServiceName"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="制表人"
|
|
|
- prop="createName"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="制表日期"
|
|
|
- prop="createTime"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="审核人"
|
|
|
- prop="confirmName"
|
|
|
- min-width="100"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="left"
|
|
|
- label="审核日期"
|
|
|
- prop="confirmTime"
|
|
|
- min-width="160"
|
|
|
- show-overflow-tooltip
|
|
|
- ></el-table-column>
|
|
|
- <el-table-column align="center" label="操作" width="220" fixed="right">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-popconfirm
|
|
|
- style="margin-right: 10px"
|
|
|
- title="确定申请吗?"
|
|
|
- @onConfirm="handleSubmit(scope.row.parentId, scope.row)"
|
|
|
- v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
|
|
|
- >
|
|
|
- <el-button slot="reference" type="text">申请</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- <el-popconfirm
|
|
|
- style="margin-right: 10px"
|
|
|
- title="确定撤回吗?"
|
|
|
- @onConfirm="handleWithdraw(scope.row.parentId, scope.row)"
|
|
|
- v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
|
|
|
- >
|
|
|
- <el-button slot="reference" type="text">撤回</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- <el-popconfirm
|
|
|
- style="margin-right: 10px"
|
|
|
- title="确定弃审吗?"
|
|
|
- @onConfirm="handleAbandon(scope.row.parentId, scope.row)"
|
|
|
- v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'"
|
|
|
- >
|
|
|
- <el-button slot="reference" type="text">弃审</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="toForm(scope.row)"
|
|
|
- v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'"
|
|
|
- >
|
|
|
- 编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- type="text"
|
|
|
- @click="toExamine(scope.row)"
|
|
|
- v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'"
|
|
|
- >
|
|
|
- 审批
|
|
|
- </el-button>
|
|
|
- <el-button type="text" @click="toReturn(scope.row)" v-if="$checkBtnRole('examine', $route.meta.roles)">
|
|
|
- 退订
|
|
|
- </el-button>
|
|
|
- <el-button type="text" @click="toDetail(scope.row)"> 详情 </el-button>
|
|
|
- <el-popconfirm
|
|
|
- style="margin-left: 10px"
|
|
|
- title="确定删除吗?"
|
|
|
- @onConfirm="handleDelete(scope.row.parentId, scope.row)"
|
|
|
- v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus !== 'OK'"
|
|
|
- >
|
|
|
- <el-button slot="reference" type="text" style="color: #f56c6c">删除</el-button>
|
|
|
- </el-popconfirm>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="pagination clearfix">
|
|
|
- <div class="fr">
|
|
|
- <el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[10, 20, 30, 50]"
|
|
|
- :page-size="10"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="listTotal"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
|
|
|
-
|
|
|
- <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
|
|
|
- <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
|
|
|
- <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
|
|
|
- <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
|
|
|
- </div>
|
|
|
+ <template-page
|
|
|
+ ref="pageRef"
|
|
|
+ :getList="getList"
|
|
|
+ :operation="operation()"
|
|
|
+ :optionsEvensGroup="optionsEvensGroup"
|
|
|
+ :exportList="exportList"
|
|
|
+ :columnParsing="columnParsing"
|
|
|
+ :tableAttributes="tableAttributes"
|
|
|
+ :tableEvents="tableEvents"
|
|
|
+ >
|
|
|
+ <!-- <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" /> -->
|
|
|
+ <Popu v-if="isShowDetail || isShowForm || isShowExamine || isShowReturn">
|
|
|
+ <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
|
|
|
+ <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
|
|
|
+ <CommerceExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
|
|
|
+ <CommerceReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
|
|
|
+ </Popu>
|
|
|
+ </template-page>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom, abandonCom } from '@/api/supply/engin'
|
|
|
+import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
+import Popu from '@/components/template/popu.vue'
|
|
|
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
|
|
|
+
|
|
|
+import {
|
|
|
+ getOrderList,
|
|
|
+ applyCom,
|
|
|
+ withdrawCom,
|
|
|
+ deleteCom,
|
|
|
+ editDateCom,
|
|
|
+ abandonCom,
|
|
|
+ v2EnginOrderTradeList,
|
|
|
+ v2EnginOrderTradeListExport
|
|
|
+} from '@/api/supply/engin'
|
|
|
import { getSalesmanList, getTypeList } from '@/api/common'
|
|
|
import CommerceDetail from '@/views/supply/engin/components/commerce_detail'
|
|
|
import CommerceForm from '@/views/supply/engin/components/commerce_form'
|
|
@@ -521,12 +44,15 @@ import { getNoRebateWalletList } from '@/api/policy_list'
|
|
|
|
|
|
let that
|
|
|
export default {
|
|
|
+ mixins: [add_callback_mixin],
|
|
|
components: {
|
|
|
CommerceDetail,
|
|
|
CommerceForm,
|
|
|
CommerceExamine,
|
|
|
CommerceReturn,
|
|
|
- EditDateDialog
|
|
|
+ EditDateDialog,
|
|
|
+ TemplatePage,
|
|
|
+ Popu
|
|
|
},
|
|
|
filters: {
|
|
|
statusFilter(val) {
|
|
@@ -543,6 +69,46 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 事件组合
|
|
|
+ optionsEvensGroup: [
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '新增',
|
|
|
+ click: this.addOn(() => {
|
|
|
+ this.toForm()
|
|
|
+ }),
|
|
|
+ isRole: this.$checkBtnRole('add', this.$route.meta.roles)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ [
|
|
|
+ {
|
|
|
+ name: '批量删除',
|
|
|
+ click: async () => {
|
|
|
+ if (this.recordSelected.length === 0) {
|
|
|
+ this.$message.error('请选择需要删除的数据')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.batchDelete()
|
|
|
+ },
|
|
|
+ isRole: this.$checkBtnRole('del', this.$route.meta.roles)
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ ],
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: true
|
|
|
+ },
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange
|
|
|
+ },
|
|
|
+ recordSelected: [],
|
|
|
+
|
|
|
currentPage: 1, // 当前页码
|
|
|
pageSize: 10, // 每页数量
|
|
|
listTotal: 0, // 列表总数
|
|
@@ -630,12 +196,146 @@ export default {
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- this.getSalesTypeList()
|
|
|
- this.getSalesmanList()
|
|
|
- this.getList()
|
|
|
+ // this.getSalesTypeList()
|
|
|
+ // this.getSalesmanList()
|
|
|
+ // this.getList()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // 列表请求函数
|
|
|
+ getList: v2EnginOrderTradeList,
|
|
|
+ // 列表导出函数
|
|
|
+ exportList: v2EnginOrderTradeListExport,
|
|
|
+ // 表格列解析渲染数据更改
|
|
|
+ columnParsing(item, defaultData) {
|
|
|
+ return defaultData
|
|
|
+ },
|
|
|
+ // 监听勾选变化
|
|
|
+ selectionChange(data) {
|
|
|
+ this.recordSelected = data
|
|
|
+ },
|
|
|
+ operation() {
|
|
|
+ return (h, { row, index, column }) => {
|
|
|
+ return (
|
|
|
+ <div class="operation-btns">
|
|
|
+ <div class="operation-btns">
|
|
|
+ {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '保存' ? (
|
|
|
+ <el-popconfirm
|
|
|
+ onOnConfirm={async () => {
|
|
|
+ this.handleSubmit(row.parentId, row)
|
|
|
+ }}
|
|
|
+ title="是否确定需要申请该项内容?"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" size="mini" type="text">
|
|
|
+ 申请
|
|
|
+ </el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '待审核' ? (
|
|
|
+ <el-popconfirm
|
|
|
+ onOnConfirm={async () => {
|
|
|
+ this.handleWithdraw(row.parentId, row)
|
|
|
+ }}
|
|
|
+ title="是否确定需要撤回该项内容?"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" size="mini" type="text">
|
|
|
+ 撤回
|
|
|
+ </el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '审核通过' ? (
|
|
|
+ <el-popconfirm
|
|
|
+ onOnConfirm={async () => {
|
|
|
+ this.handleAbandon(row.parentId, row)
|
|
|
+ }}
|
|
|
+ title="是否确定需要弃审该项内容?"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" size="mini" type="text">
|
|
|
+ 弃审
|
|
|
+ </el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ {this.$checkBtnRole('edit', this.$route.meta.roles) && row.examineStatus === '保存' ? (
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ onClick={async () => {
|
|
|
+ this.toForm(row)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '待审核' ? (
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ onClick={async () => {
|
|
|
+ this.toExamine(row)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 审批
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ {this.$checkBtnRole('examine', this.$route.meta.roles) ? (
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ onClick={async () => {
|
|
|
+ this.toReturn(row)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 退订
|
|
|
+ </el-button>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ onClick={async () => {
|
|
|
+ this.toDetail(row)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 详情
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus !== '审核通过' ? (
|
|
|
+ <el-popconfirm
|
|
|
+ onOnConfirm={async () => {
|
|
|
+ this.handleDelete(row.parentId, row)
|
|
|
+ }}
|
|
|
+ title="是否确定需要删除该项内容?"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" size="mini" type="text">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ ) : (
|
|
|
+ ''
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 获取业务员列表
|
|
|
getSalesmanList() {
|
|
|
getSalesmanList({
|
|
@@ -670,40 +370,40 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 查询列表
|
|
|
- getList() {
|
|
|
- this.listLoading = true
|
|
|
-
|
|
|
- let params = {
|
|
|
- pageNum: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
- examineStatus: this.screenForm.status,
|
|
|
- enginOrderNo: this.screenForm.orderNum,
|
|
|
- refProjectNo: this.screenForm.enginNum,
|
|
|
- refEnginRecordNo: this.screenForm.loginNum,
|
|
|
- refProjectName: this.screenForm.enginName,
|
|
|
- startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
|
|
|
- endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
|
|
|
- saleTypeId: this.screenForm.saleType,
|
|
|
- createName: this.screenForm.createMan,
|
|
|
- confirmName: this.screenForm.examineMan,
|
|
|
- customerWalletId: this.screenForm.customerWalletId,
|
|
|
- serviceId: this.screenForm.salesMan,
|
|
|
- customerKeyword: this.screenForm.dealer,
|
|
|
- isDirectTransfer: this.screenForm.isDirectTransfer,
|
|
|
-
|
|
|
- specification: this.screenForm.model,
|
|
|
- enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
|
|
|
- }
|
|
|
- getOrderList(params).then(res => {
|
|
|
- res.data.records.forEach(item => {
|
|
|
- item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
|
|
|
- item.sums2 = ['price', 'payAmount', 'discAmount']
|
|
|
- })
|
|
|
- this.dataList = res.data.records
|
|
|
- this.listTotal = res.data.total
|
|
|
- this.listLoading = false
|
|
|
- })
|
|
|
- },
|
|
|
+ // getList() {
|
|
|
+ // this.listLoading = true
|
|
|
+
|
|
|
+ // let params = {
|
|
|
+ // pageNum: this.currentPage,
|
|
|
+ // pageSize: this.pageSize,
|
|
|
+ // examineStatus: this.screenForm.status,
|
|
|
+ // enginOrderNo: this.screenForm.orderNum,
|
|
|
+ // refProjectNo: this.screenForm.enginNum,
|
|
|
+ // refEnginRecordNo: this.screenForm.loginNum,
|
|
|
+ // refProjectName: this.screenForm.enginName,
|
|
|
+ // startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
|
|
|
+ // endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
|
|
|
+ // saleTypeId: this.screenForm.saleType,
|
|
|
+ // createName: this.screenForm.createMan,
|
|
|
+ // confirmName: this.screenForm.examineMan,
|
|
|
+ // customerWalletId: this.screenForm.customerWalletId,
|
|
|
+ // serviceId: this.screenForm.salesMan,
|
|
|
+ // customerKeyword: this.screenForm.dealer,
|
|
|
+ // isDirectTransfer: this.screenForm.isDirectTransfer,
|
|
|
+
|
|
|
+ // specification: this.screenForm.model,
|
|
|
+ // enginOrderType: 'TRADE' // TRADE=商用 HOME=家用
|
|
|
+ // }
|
|
|
+ // getOrderList(params).then(res => {
|
|
|
+ // res.data.records.forEach(item => {
|
|
|
+ // item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
|
|
|
+ // item.sums2 = ['price', 'payAmount', 'discAmount']
|
|
|
+ // })
|
|
|
+ // this.dataList = res.data.records
|
|
|
+ // this.listTotal = res.data.total
|
|
|
+ // this.listLoading = false
|
|
|
+ // })
|
|
|
+ // },
|
|
|
|
|
|
// 提交筛选表单
|
|
|
submitScreenForm() {
|
|
@@ -713,7 +413,7 @@ export default {
|
|
|
|
|
|
// 重置筛选表单
|
|
|
resetScreenForm() {
|
|
|
- this.$refs.screenForm.resetFields()
|
|
|
+ this.$refs.screenForm.resetFields()
|
|
|
this.currentPage = 1
|
|
|
this.getList()
|
|
|
},
|
|
@@ -803,12 +503,13 @@ export default {
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- let ids = this.multipleSelection.map(item => {
|
|
|
+ let ids = this.recordSelected.map(item => {
|
|
|
return item.parentId
|
|
|
})
|
|
|
deleteCom({ ids: ids.join(',') }).then(res => {
|
|
|
this.$successMsg()
|
|
|
- this.getList()
|
|
|
+ // this.getList()
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
})
|
|
|
})
|
|
|
.catch(() => {})
|