|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
+ <div class="app-container">
|
|
|
<el-form
|
|
|
:model="queryParams"
|
|
|
class="main-search"
|
|
@@ -7,7 +7,7 @@
|
|
|
size="small"
|
|
|
:inline="true"
|
|
|
v-show="showSearch"
|
|
|
- label-width="68px"
|
|
|
+
|
|
|
>
|
|
|
<el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
<el-input
|
|
@@ -25,7 +25,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="订单类型" prop="type">
|
|
|
+ <!-- <el-form-item label="订单类型" prop="type">
|
|
|
<el-select
|
|
|
v-model="queryParams.type"
|
|
|
clearable
|
|
@@ -45,11 +45,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item :label="$t('orderList.orderStatus')" prop="status">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.status"
|
|
|
- :placeholder="$t('orderList.pleaseSelectOrderStatus')"
|
|
|
- clearable
|
|
|
- >
|
|
|
+ <el-select v-model="queryParams.status" :placeholder="$t('orderList.pleaseSelectOrderStatus')" clearable>
|
|
|
<el-option
|
|
|
v-for="statusItem in statusList"
|
|
|
:key="statusItem.key + ''"
|
|
@@ -59,11 +55,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('orderList.paymentStatus')" prop="payStatus">
|
|
|
- <el-select
|
|
|
- v-model="queryParams.payStatus"
|
|
|
- :placeholder="$t('orderList.paymentStatus')"
|
|
|
- clearable
|
|
|
- >
|
|
|
+ <el-select v-model="queryParams.payStatus" :placeholder="$t('orderList.paymentStatus')" clearable>
|
|
|
<el-option
|
|
|
v-for="statusItem in payStatusList"
|
|
|
:key="statusItem.key + ''"
|
|
@@ -82,22 +74,16 @@
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item :label="$t('orderList.orderTime')">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.startTime"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- type="datetime"
|
|
|
- style="width: 190px"
|
|
|
- :placeholder="$t('orderList.startTime')"
|
|
|
- ></el-date-picker>
|
|
|
- <span class="sp">~</span>
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.endTime"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- type="datetime"
|
|
|
- style="width: 190px"
|
|
|
- :placeholder="$t('orderList.endTime')"
|
|
|
- ></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParams.timeRange"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ type="datetimerange"
|
|
|
+ style="width: 400px"
|
|
|
+ :start-placeholder="$t('orderList.startTime')"
|
|
|
+ :end-placeholder="$t('orderList.endTime')"
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery(false)">
|
|
|
{{ $t('orderList.query') }}
|
|
@@ -193,12 +179,7 @@
|
|
|
<span>{{ getName(orderModeList, scope.row.orderMode) }}</span>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column
|
|
|
- :label="$t('orderList.orderTime')"
|
|
|
- align="center"
|
|
|
- width="130"
|
|
|
- prop="createTime"
|
|
|
- >
|
|
|
+ <el-table-column :label="$t('orderList.orderTime')" align="center" width="130" prop="createTime">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.createTime }}</span>
|
|
|
</template>
|
|
@@ -245,6 +226,7 @@
|
|
|
<el-table-column :label="$t('orderList.operation')" align="left" width="130" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-if="false"
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
v-hasPermi="['order:edit']"
|
|
@@ -301,297 +283,242 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 修改对话框 start-->
|
|
|
- <el-dialog
|
|
|
- :title="title"
|
|
|
- :visible.sync="open"
|
|
|
- class="common-dialog"
|
|
|
- width="700px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
- <el-input
|
|
|
- v-model="form.orderSn"
|
|
|
- :placeholder="$t('orderList.orderNumber')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.totalOrderAmount')" prop="amount">
|
|
|
- <el-input
|
|
|
- v-model="form.amount"
|
|
|
- :placeholder="$t('orderList.pleaseEnterTotalOrderAmount')"
|
|
|
- maxlength="100"
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="open"
|
|
|
+ class="common-dialog"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
+ <el-input v-model="form.orderSn" :placeholder="$t('orderList.orderNumber')" disabled maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.totalOrderAmount')" prop="amount">
|
|
|
+ <el-input v-model="form.amount" :placeholder="$t('orderList.pleaseEnterTotalOrderAmount')" maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.discountAmount')" prop="discount">
|
|
|
+ <el-input v-model="form.discount" :placeholder="$t('orderList.pleaseEnterDiscountAmount')" maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderRemark')" prop="remark">
|
|
|
+ <el-input
|
|
|
+ v-model="form.remark"
|
|
|
+ type="textarea"
|
|
|
+ :placeholder="$t('orderList.pleaseEnterOrderRemark')"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderStatus')">
|
|
|
+ <el-select v-model="form.status" :placeholder="$t('orderList.orderStatus')">
|
|
|
+ <el-option
|
|
|
+ v-for="statusItem in statusList"
|
|
|
+ :key="statusItem.key + ''"
|
|
|
+ :label="statusItem.name"
|
|
|
+ :value="statusItem.key + ''"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.discountAmount')" prop="discount">
|
|
|
- <el-input
|
|
|
- v-model="form.discount"
|
|
|
- :placeholder="$t('orderList.pleaseEnterDiscountAmount')"
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderRemark')" prop="remark">
|
|
|
- <el-input
|
|
|
- v-model="form.remark"
|
|
|
- type="textarea"
|
|
|
- :placeholder="$t('orderList.pleaseEnterOrderRemark')"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderStatus')">
|
|
|
- <el-select v-model="form.status" :placeholder="$t('orderList.orderStatus')">
|
|
|
- <el-option
|
|
|
- v-for="statusItem in statusList"
|
|
|
- :key="statusItem.key + ''"
|
|
|
- :label="statusItem.name"
|
|
|
- :value="statusItem.key + ''"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">{{ $t('orderList.confirm') }}</el-button>
|
|
|
- <el-button @click="cancel">{{ $t('orderList.cancel') }}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 修改对话框 end-->
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">{{ $t('orderList.confirm') }}</el-button>
|
|
|
+ <el-button @click="cancel">{{ $t('orderList.cancel') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 修改对话框 end-->
|
|
|
|
|
|
- <!-- 核销对话框 start-->
|
|
|
- <el-dialog
|
|
|
- :title="$t('orderList.verifyOrder')"
|
|
|
- :visible.sync="openVerify"
|
|
|
- class="common-dialog"
|
|
|
- width="700px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-form ref="vForm" :model="vForm" :rules="vFormRules" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
- <el-input
|
|
|
- v-model="vForm.orderSn"
|
|
|
- :placeholder="$t('orderList.orderNumber')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.verificationCode')" prop="verifyCode">
|
|
|
- <el-input
|
|
|
- v-model="vForm.verifyCode"
|
|
|
- :placeholder="$t('orderList.pleaseEnterVerificationCode')"
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderRemark')" prop="remark">
|
|
|
- <el-input
|
|
|
- v-model="vForm.remark"
|
|
|
- type="textarea"
|
|
|
- :placeholder="$t('orderList.pleaseEnterOrderRemark')"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitVForm">
|
|
|
- {{ $t('orderList.confirmVerification') }}
|
|
|
- </el-button>
|
|
|
- <el-button @click="cancelVForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 核销对话框 end-->
|
|
|
+ <!-- 核销对话框 start-->
|
|
|
+ <el-dialog
|
|
|
+ :title="$t('orderList.verifyOrder')"
|
|
|
+ :visible.sync="openVerify"
|
|
|
+ class="common-dialog"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="vForm" :model="vForm" :rules="vFormRules" >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
+ <el-input v-model="vForm.orderSn" :placeholder="$t('orderList.orderNumber')" disabled maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.verificationCode')" prop="verifyCode">
|
|
|
+ <el-input
|
|
|
+ v-model="vForm.verifyCode"
|
|
|
+ :placeholder="$t('orderList.pleaseEnterVerificationCode')"
|
|
|
+ maxlength="100"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderRemark')" prop="remark">
|
|
|
+ <el-input
|
|
|
+ v-model="vForm.remark"
|
|
|
+ type="textarea"
|
|
|
+ :placeholder="$t('orderList.pleaseEnterOrderRemark')"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitVForm">{{ $t('orderList.confirmVerification') }}</el-button>
|
|
|
+ <el-button @click="cancelVForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 核销对话框 end-->
|
|
|
|
|
|
<!-- 发货对话框 start-->
|
|
|
- <el-dialog
|
|
|
- :title="$t('orderList.fillLogisticsInfo')"
|
|
|
- :visible.sync="openExpress"
|
|
|
- class="common-dialog"
|
|
|
- width="700px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-form ref="eForm" :model="eForm" :rules="eFormRules" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
- <el-input
|
|
|
- v-model="eForm.orderSn"
|
|
|
- :placeholder="$t('orderList.orderNumber')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.logisticsCompany')" prop="expressCompany">
|
|
|
- <el-input
|
|
|
- v-if="!expressCompanyList || expressCompanyList.length < 1"
|
|
|
- v-model="eForm.expressCompany"
|
|
|
- :placeholder="$t('orderList.pleaseEnterLogisticsCompany')"
|
|
|
- maxlength="100"
|
|
|
+ <el-dialog
|
|
|
+ :title="$t('orderList.fillLogisticsInfo')"
|
|
|
+ :visible.sync="openExpress"
|
|
|
+ class="common-dialog"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="eForm" :model="eForm" :rules="eFormRules" >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn">
|
|
|
+ <el-input v-model="eForm.orderSn" :placeholder="$t('orderList.orderNumber')" disabled maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.logisticsCompany')" prop="expressCompany">
|
|
|
+ <el-input
|
|
|
+ v-if="!expressCompanyList || expressCompanyList.length < 1"
|
|
|
+ v-model="eForm.expressCompany"
|
|
|
+ :placeholder="$t('orderList.pleaseEnterLogisticsCompany')"
|
|
|
+ maxlength="100"
|
|
|
+ />
|
|
|
+ <el-select
|
|
|
+ v-if="expressCompanyList && expressCompanyList.length > 0"
|
|
|
+ v-model="eForm.expressCompany"
|
|
|
+ clearable
|
|
|
+ :placeholder="$t('orderList.logisticsCompany')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="expressCompany in expressCompanyList"
|
|
|
+ :key="expressCompany.value"
|
|
|
+ :label="expressCompany.name"
|
|
|
+ :value="expressCompany.value"
|
|
|
/>
|
|
|
- <el-select
|
|
|
- v-if="expressCompanyList && expressCompanyList.length > 0"
|
|
|
- v-model="eForm.expressCompany"
|
|
|
- clearable
|
|
|
- :placeholder="$t('orderList.logisticsCompany')"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="expressCompany in expressCompanyList"
|
|
|
- :key="expressCompany.value"
|
|
|
- :label="expressCompany.name"
|
|
|
- :value="expressCompany.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.logisticsTrackingNumber')" prop="expressNo">
|
|
|
- <el-input
|
|
|
- v-model="eForm.expressNo"
|
|
|
- :placeholder="$t('orderList.pleaseEnterLogisticsTrackingNumber')"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitEForm">
|
|
|
- {{ $t('orderList.submitLogisticsInfo') }}
|
|
|
- </el-button>
|
|
|
- <el-button @click="cancelEForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 核销对话框 end-->
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.logisticsTrackingNumber')" prop="expressNo">
|
|
|
+ <el-input v-model="eForm.expressNo" :placeholder="$t('orderList.pleaseEnterLogisticsTrackingNumber')"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitEForm">{{ $t('orderList.submitLogisticsInfo') }}</el-button>
|
|
|
+ <el-button @click="cancelEForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 核销对话框 end-->
|
|
|
|
|
|
- <!--打印订单对话框 start-->
|
|
|
- <orderPrintDialog
|
|
|
- :show-dialog="openOrderPrintDialog"
|
|
|
- :storeInfo="storeInfo"
|
|
|
- :orderInfo="orderInfo"
|
|
|
- @closeDialog="closePrintDialog"
|
|
|
- />
|
|
|
- <!--打印订单对话框 end-->
|
|
|
+ <!--打印订单对话框 start-->
|
|
|
+ <orderPrintDialog
|
|
|
+ :show-dialog="openOrderPrintDialog"
|
|
|
+ :storeInfo="storeInfo"
|
|
|
+ :orderInfo="orderInfo"
|
|
|
+ @closeDialog="closePrintDialog"
|
|
|
+ />
|
|
|
+ <!--打印订单对话框 end-->
|
|
|
|
|
|
- <!-- 退款对话框 start -->
|
|
|
- <el-dialog
|
|
|
- :title="$t('orderList.orderRefund')"
|
|
|
- :visible.sync="openRefundDialog"
|
|
|
- class="common-dialog"
|
|
|
- width="700px"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <el-form ref="rForm" :model="rForm" :rules="rFormRules" label-width="120px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn" style="width: 450px">
|
|
|
- <el-input
|
|
|
- v-model="rForm.orderSn"
|
|
|
- :placeholder="$t('orderList.orderNumber')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item
|
|
|
- :label="$t('orderList.paymentMethod')"
|
|
|
- prop="payType"
|
|
|
- style="width: 450px"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="rForm.payType"
|
|
|
- :placeholder="$t('orderList.paymentMethod')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item
|
|
|
- :label="$t('orderList.actualPaymentAmount')"
|
|
|
- prop="payAmount"
|
|
|
- style="width: 450px"
|
|
|
+ <!-- 退款对话框 start -->
|
|
|
+ <el-dialog
|
|
|
+ :title="$t('orderList.orderRefund')"
|
|
|
+ :visible.sync="openRefundDialog"
|
|
|
+ class="common-dialog"
|
|
|
+ width="700px"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form ref="rForm" :model="rForm" :rules="rFormRules" >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.orderNumber')" prop="orderSn" style="width: 450px">
|
|
|
+ <el-input v-model="rForm.orderSn" :placeholder="$t('orderList.orderNumber')" disabled maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.paymentMethod')" prop="payType" style="width: 450px">
|
|
|
+ <el-input v-model="rForm.payType" :placeholder="$t('orderList.paymentMethod')" disabled maxlength="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.actualPaymentAmount')" prop="payAmount" style="width: 450px">
|
|
|
+ <el-input
|
|
|
+ v-model="rForm.payAmount"
|
|
|
+ :placeholder="$t('orderList.actualPaymentAmountForOrder')"
|
|
|
+ disabled
|
|
|
+ maxlength="100"
|
|
|
>
|
|
|
- <el-input
|
|
|
- v-model="rForm.payAmount"
|
|
|
- :placeholder="$t('orderList.actualPaymentAmountForOrder')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
- >
|
|
|
- <template slot="prepend">¥</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item
|
|
|
- :label="$t('orderList.refundAmount')"
|
|
|
- prop="refundAmount"
|
|
|
- style="width: 450px"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="rForm.refundAmount"
|
|
|
- :placeholder="$t('orderList.pleaseEnterRefundAmount')"
|
|
|
- ></el-input>
|
|
|
- <div class="form-tips">{{ $t('orderList.tipUnitYuan') }}</div>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item :label="$t('orderList.refundRemark')" prop="remark">
|
|
|
- <el-input
|
|
|
- v-model="rForm.remark"
|
|
|
- type="textarea"
|
|
|
- :placeholder="$t('orderList.pleaseEnterRefundRemark')"
|
|
|
- ></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitRForm">{{ $t('orderList.confirm') }}</el-button>
|
|
|
- <el-button @click="cancelRForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- <!-- 退款对话框 end -->
|
|
|
+ <template slot="prepend">¥</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.refundAmount')" prop="refundAmount" style="width: 450px">
|
|
|
+ <el-input v-model="rForm.refundAmount" :placeholder="$t('orderList.pleaseEnterRefundAmount')"></el-input>
|
|
|
+ <div class="form-tips">{{ $t('orderList.tipUnitYuan') }}</div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="$t('orderList.refundRemark')" prop="remark">
|
|
|
+ <el-input
|
|
|
+ v-model="rForm.remark"
|
|
|
+ type="textarea"
|
|
|
+ :placeholder="$t('orderList.pleaseEnterRefundRemark')"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitRForm">{{ $t('orderList.confirm') }}</el-button>
|
|
|
+ <el-button @click="cancelRForm">{{ $t('orderList.cancel') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 退款对话框 end -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -616,6 +543,27 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 配置日期选择器的选项
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ // 禁止选择当前时间之后的日期
|
|
|
+ return time.getTime() > Date.now();
|
|
|
+ },
|
|
|
+ // 当开始时间改变时,动态更新结束时间的可选范围
|
|
|
+ // onPick: ({ maxDate, minDate }) => {
|
|
|
+ // if (minDate) {
|
|
|
+ // this.pickerOptions.disabledDate = (time) => {
|
|
|
+ // // 禁止选择开始时间之前的日期和当前时间之后的日期
|
|
|
+ // return time.getTime() < minDate.getTime() || time.getTime() > Date.now();
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // // 如果没有选择开始时间,恢复默认的禁用规则
|
|
|
+ // this.pickerOptions.disabledDate = (time) => {
|
|
|
+ // return time.getTime() > Date.now();
|
|
|
+ // };
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ },
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 标题
|
|
@@ -691,57 +639,58 @@ export default {
|
|
|
orderMode: '',
|
|
|
orderSn: '',
|
|
|
storeIds: '',
|
|
|
- tableCode: ''
|
|
|
+ tableCode: '',
|
|
|
+ timeRange: [],
|
|
|
},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- amount: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: this.$t('orderList.totalAmountRequired'),
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ amount: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('orderList.totalAmountRequired'),
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
// 核销表单校验
|
|
|
vFormRules: {
|
|
|
- verifyCode: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: this.$t('orderList.verifyCodeRequired'),
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ verifyCode: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('orderList.verifyCodeRequired'),
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
eFormRules: {
|
|
|
- expressCompany: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: this.$t('orderList.expressCompanyRequired'),
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ],
|
|
|
- expressNo: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: this.$t('orderList.expressNoRequired'),
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ expressCompany: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('orderList.expressCompanyRequired'),
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ expressNo: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('orderList.expressNoRequired'),
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
rFormRules: {
|
|
|
- refundAmount: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: this.$t('orderList.refundAmountRequired'),
|
|
|
- trigger: 'blur'
|
|
|
- },
|
|
|
- {
|
|
|
- pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/,
|
|
|
- message: this.$t('orderList.correctRefundAmount'),
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ refundAmount: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: this.$t('orderList.refundAmountRequired'),
|
|
|
+ trigger: 'blur'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ pattern: /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/,
|
|
|
+ message: this.$t('orderList.correctRefundAmount'),
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -751,54 +700,67 @@ export default {
|
|
|
methods: {
|
|
|
// 查询订单
|
|
|
getList() {
|
|
|
- const app = this
|
|
|
- app.loading = true
|
|
|
- app.queryParams.storeIds = app.storeIds ? app.storeIds.join(',') : ''
|
|
|
- getOrderList(app.queryParams).then((response) => {
|
|
|
- this.list = response.data.paginationResponse.content
|
|
|
- this.total = response.data.paginationResponse.totalElements
|
|
|
- this.typeList = response.data.typeList
|
|
|
- this.statusList = response.data.statusList.map((element) => {
|
|
|
- element.name = this.$t(element.name)
|
|
|
- return element
|
|
|
- })
|
|
|
- this.payStatusList = response.data.payStatusList.map((element) => {
|
|
|
- element.name = this.$t(element.name)
|
|
|
- return element
|
|
|
- })
|
|
|
- this.orderModeList = response.data.orderModeList
|
|
|
- this.payTypeList = response.data.payTypeList
|
|
|
- this.storeList = response.data.storeList
|
|
|
- this.expressCompanyList = response.data.expressCompanyList
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ app.loading = true;
|
|
|
+ app.queryParams.storeIds = app.storeIds ? app.storeIds.join(',') : '';
|
|
|
+ //设置范围
|
|
|
+ if (app.queryParams.timeRange && app.queryParams.timeRange.length > 0) {
|
|
|
+ app.queryParams.startTime = app.queryParams.timeRange[0];
|
|
|
+ app.queryParams.endTime = app.queryParams.timeRange[1];
|
|
|
+ }
|
|
|
+ getOrderList(app.queryParams).then((response) => {
|
|
|
+ this.list = response.data.paginationResponse.content;
|
|
|
+ this.total = response.data.paginationResponse.totalElements;
|
|
|
+ this.typeList = response.data.typeList;
|
|
|
+ this.statusList = response.data.statusList.map(element => {
|
|
|
+ element.name=this.$t(element.name);
|
|
|
+ return element;
|
|
|
+ });
|
|
|
+ this.payStatusList = response.data.payStatusList.map(element => {
|
|
|
+ element.name=this.$t(element.name);
|
|
|
+ return element;
|
|
|
+ });;
|
|
|
+ // console.log(this.statusList,this.payStatusList)
|
|
|
+ const retainArr = ["A", "B", "C"];
|
|
|
+ this.payStatusList = this.payStatusList.filter(item => retainArr.includes(item.key));
|
|
|
+ this.statusList = this.statusList.filter(item => retainArr.includes(item.key));
|
|
|
+ this.orderModeList = response.data.orderModeList;
|
|
|
+ this.payTypeList = response.data.payTypeList;
|
|
|
+ this.storeList = response.data.storeList;
|
|
|
+ this.expressCompanyList = response.data.expressCompanyList;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
// 搜索按钮操作
|
|
|
handleQuery(isExport) {
|
|
|
- this.queryParams.page = 1
|
|
|
- if (isExport) {
|
|
|
- this.exportExcel()
|
|
|
- } else {
|
|
|
- this.getList()
|
|
|
- }
|
|
|
+ this.queryParams.page = 1;
|
|
|
+ if (isExport) {
|
|
|
+ this.exportExcel();
|
|
|
+ } else {
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
},
|
|
|
// 导出excel
|
|
|
exportExcel() {
|
|
|
- this.download('backendApi/order/export', {
|
|
|
- ...this.queryParams
|
|
|
- })
|
|
|
+ this.download('backendApi/order/export', {
|
|
|
+ ...this.queryParams
|
|
|
+ });
|
|
|
},
|
|
|
// 重置按钮操作
|
|
|
resetQuery() {
|
|
|
- this.queryParams.status = ''
|
|
|
- this.queryParams.mobile = ''
|
|
|
- this.queryParams.orderMode = ''
|
|
|
- this.queryParams.orderSn = ''
|
|
|
- this.queryParams.storeIds = ''
|
|
|
- this.storeIds = []
|
|
|
- this.resetForm('queryForm')
|
|
|
- this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
|
|
- this.handleQuery()
|
|
|
+ this.queryParams.status = '';
|
|
|
+ this.queryParams.mobile = '';
|
|
|
+ this.queryParams.orderMode = '';
|
|
|
+ this.queryParams.orderSn = '';
|
|
|
+ this.queryParams.storeIds = '';
|
|
|
+ this.queryParams.timeRange = [];
|
|
|
+ this.queryParams.startTime = '';
|
|
|
+ this.queryParams.endTime = '';
|
|
|
+ this.storeIds = [];
|
|
|
+
|
|
|
+ this.resetForm('queryForm');
|
|
|
+ this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
|
|
+ this.handleQuery(false);
|
|
|
},
|
|
|
// 状态修改
|
|
|
handleStatusChange(row) {
|
|
@@ -822,262 +784,262 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map((item) => item.id)
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
// 排序触发事件
|
|
|
handleSortChange(column, prop, order) {
|
|
|
- this.queryParams.orderByColumn = column.prop
|
|
|
- this.queryParams.isAsc = column.order
|
|
|
- this.getList()
|
|
|
+ this.queryParams.orderByColumn = column.prop;
|
|
|
+ this.queryParams.isAsc = column.order;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
- this.form = {
|
|
|
- orderId: '',
|
|
|
- orderSn: '',
|
|
|
- status: 'A',
|
|
|
- amount: '',
|
|
|
- discount: '',
|
|
|
- remark: '',
|
|
|
- orderMode: 'oneself'
|
|
|
- }
|
|
|
- this.resetForm('form')
|
|
|
+ this.form = {
|
|
|
+ orderId: '',
|
|
|
+ orderSn: '',
|
|
|
+ status: 'A',
|
|
|
+ amount: '',
|
|
|
+ discount: '',
|
|
|
+ remark: '',
|
|
|
+ orderMode: 'oneself'
|
|
|
+ };
|
|
|
+ this.resetForm('form');
|
|
|
},
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
- this.open = false
|
|
|
- this.reset()
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
},
|
|
|
// 取消核销按钮
|
|
|
cancelVForm() {
|
|
|
- this.openVerify = false
|
|
|
- this.vForm.orderId = ''
|
|
|
- this.vForm.orderSn = ''
|
|
|
- this.vForm.verifyCode = ''
|
|
|
+ this.openVerify = false;
|
|
|
+ this.vForm.orderId = '';
|
|
|
+ this.vForm.orderSn = '';
|
|
|
+ this.vForm.verifyCode = '';
|
|
|
},
|
|
|
// 提交核销按钮
|
|
|
submitVForm: function () {
|
|
|
- this.$refs['vForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- verifyOrder(this.vForm).then((response) => {
|
|
|
- this.$modal.msgSuccess(this.$t('orderList.verifySuccess'))
|
|
|
- this.cancelVForm()
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs['vForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ verifyOrder(this.vForm).then((response) => {
|
|
|
+ this.$modal.msgSuccess(this.$t('orderList.verifySuccess'));
|
|
|
+ this.cancelVForm();
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 提交修改按钮
|
|
|
submitForm: function () {
|
|
|
- this.$refs['form'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- saveOrder(this.form)
|
|
|
- .then((response) => {
|
|
|
- this.$modal.msgSuccess(this.$t('orderList.modifySuccess'))
|
|
|
- this.open = false
|
|
|
- this.getList()
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$modal.msgError(this.$t('orderList.modifyError'))
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs['form'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ saveOrder(this.form)
|
|
|
+ .then((response) => {
|
|
|
+ this.$modal.msgSuccess(this.$t('orderList.modifySuccess'));
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$modal.msgError(this.$t('orderList.modifyError'));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 查看详情按钮操作
|
|
|
handleView(row) {
|
|
|
- this.$router.push({ path: '/order/detail?orderId=' + row.id })
|
|
|
+ this.$router.push({ path: '/order/detail?orderId=' + row.id });
|
|
|
},
|
|
|
// 修改按钮操作
|
|
|
handleUpdate(row) {
|
|
|
- const app = this
|
|
|
- app.reset()
|
|
|
- const id = row.id || this.ids
|
|
|
- getOrderInfo(id).then((response) => {
|
|
|
- let orderInfo = response.data.orderInfo
|
|
|
- if (orderInfo) {
|
|
|
- app.form.orderId = orderInfo.id
|
|
|
- app.form.orderSn = orderInfo.orderSn
|
|
|
- app.form.amount = orderInfo.amount
|
|
|
- app.form.discount = orderInfo.discount
|
|
|
- app.form.remark = orderInfo.remark
|
|
|
- app.form.status = orderInfo.status
|
|
|
- app.form.orderMode = orderInfo.orderMode + ''
|
|
|
- }
|
|
|
- this.open = true
|
|
|
- this.title = this.$t('orderList.modifyOrder')
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ app.reset();
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getOrderInfo(id).then((response) => {
|
|
|
+ let orderInfo = response.data.orderInfo;
|
|
|
+ if (orderInfo) {
|
|
|
+ app.form.orderId = orderInfo.id;
|
|
|
+ app.form.orderSn = orderInfo.orderSn;
|
|
|
+ app.form.amount = orderInfo.amount;
|
|
|
+ app.form.discount = orderInfo.discount;
|
|
|
+ app.form.remark = orderInfo.remark;
|
|
|
+ app.form.status = orderInfo.status;
|
|
|
+ app.form.orderMode = orderInfo.orderMode + '';
|
|
|
+ }
|
|
|
+ this.open = true;
|
|
|
+ this.title = this.$t('orderList.modifyOrder');
|
|
|
+ });
|
|
|
},
|
|
|
// 核销按钮操作
|
|
|
handleVerify(row) {
|
|
|
- const app = this
|
|
|
- const id = row.id || this.ids
|
|
|
- getOrderInfo(id).then((response) => {
|
|
|
- let orderInfo = response.data.orderInfo
|
|
|
- if (orderInfo) {
|
|
|
- app.vForm.orderId = orderInfo.id
|
|
|
- app.vForm.orderSn = orderInfo.orderSn
|
|
|
- app.vForm.remark = orderInfo.remark
|
|
|
- }
|
|
|
- app.openVerify = true
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getOrderInfo(id).then((response) => {
|
|
|
+ let orderInfo = response.data.orderInfo;
|
|
|
+ if (orderInfo) {
|
|
|
+ app.vForm.orderId = orderInfo.id;
|
|
|
+ app.vForm.orderSn = orderInfo.orderSn;
|
|
|
+ app.vForm.remark = orderInfo.remark;
|
|
|
+ }
|
|
|
+ app.openVerify = true;
|
|
|
+ });
|
|
|
},
|
|
|
// 发货按钮
|
|
|
handleExpress(row) {
|
|
|
- const app = this
|
|
|
- const id = row.id || this.ids
|
|
|
- getOrderInfo(id).then((response) => {
|
|
|
- let orderInfo = response.data.orderInfo
|
|
|
- if (orderInfo) {
|
|
|
- app.eForm.orderId = orderInfo.id
|
|
|
- app.eForm.orderSn = orderInfo.orderSn
|
|
|
- app.eForm.expressNo = orderInfo.expressInfo ? orderInfo.expressInfo.expressNo : ''
|
|
|
- app.eForm.expressCompany = orderInfo.expressInfo
|
|
|
- ? orderInfo.expressInfo.expressCompany
|
|
|
- : ''
|
|
|
- }
|
|
|
- app.openExpress = true
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getOrderInfo(id).then((response) => {
|
|
|
+ let orderInfo = response.data.orderInfo;
|
|
|
+ if (orderInfo) {
|
|
|
+ app.eForm.orderId = orderInfo.id;
|
|
|
+ app.eForm.orderSn = orderInfo.orderSn;
|
|
|
+ app.eForm.expressNo = orderInfo.expressInfo ? orderInfo.expressInfo.expressNo : '';
|
|
|
+ app.eForm.expressCompany = orderInfo.expressInfo
|
|
|
+ ? orderInfo.expressInfo.expressCompany
|
|
|
+ : '';
|
|
|
+ }
|
|
|
+ app.openExpress = true;
|
|
|
+ });
|
|
|
},
|
|
|
// 取消发货按钮
|
|
|
cancelEForm() {
|
|
|
- this.openExpress = false
|
|
|
- this.eForm.orderId = ''
|
|
|
- this.eForm.orderSn = ''
|
|
|
- this.eForm.expressCompany = ''
|
|
|
- this.eForm.expressNo = ''
|
|
|
+ this.openExpress = false;
|
|
|
+ this.eForm.orderId = '';
|
|
|
+ this.eForm.orderSn = '';
|
|
|
+ this.eForm.expressCompany = '';
|
|
|
+ this.eForm.expressNo = '';
|
|
|
},
|
|
|
// 提交发货按钮
|
|
|
submitEForm: function () {
|
|
|
- const app = this
|
|
|
- if (app.loading) {
|
|
|
- app.$modal.msgError(this.$t('orderList.requestProcessing'))
|
|
|
- }
|
|
|
- app.$refs['eForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- app.loading = true
|
|
|
- const param = {
|
|
|
- orderId: app.eForm.orderId,
|
|
|
- orderSn: app.eForm.orderSn,
|
|
|
- expressCompany: app.eForm.expressCompany,
|
|
|
- expressNo: app.eForm.expressNo
|
|
|
- }
|
|
|
- delivered(param).then((response) => {
|
|
|
- app.$modal.msgSuccess(this.$t('orderList.submitExpressSuccess'))
|
|
|
- app.cancelEForm()
|
|
|
- app.getList()
|
|
|
- app.loading = false
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ if (app.loading) {
|
|
|
+ app.$modal.msgError(this.$t('orderList.requestProcessing'));
|
|
|
}
|
|
|
- })
|
|
|
+ app.$refs['eForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ app.loading = true;
|
|
|
+ const param = {
|
|
|
+ orderId: app.eForm.orderId,
|
|
|
+ orderSn: app.eForm.orderSn,
|
|
|
+ expressCompany: app.eForm.expressCompany,
|
|
|
+ expressNo: app.eForm.expressNo
|
|
|
+ };
|
|
|
+ delivered(param).then((response) => {
|
|
|
+ app.$modal.msgSuccess(this.$t('orderList.submitExpressSuccess'));
|
|
|
+ app.cancelEForm();
|
|
|
+ app.getList();
|
|
|
+ app.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 取消退款按钮
|
|
|
cancelRForm() {
|
|
|
- this.openRefundDialog = false
|
|
|
- this.rForm.orderId = ''
|
|
|
- this.rForm.orderSn = ''
|
|
|
- this.rForm.payAmount = ''
|
|
|
- this.rForm.payType = ''
|
|
|
- this.rForm.refundAmount = ''
|
|
|
- this.rForm.remark = ''
|
|
|
+ this.openRefundDialog = false;
|
|
|
+ this.rForm.orderId = '';
|
|
|
+ this.rForm.orderSn = '';
|
|
|
+ this.rForm.payAmount = '';
|
|
|
+ this.rForm.payType = '';
|
|
|
+ this.rForm.refundAmount = '';
|
|
|
+ this.rForm.remark = '';
|
|
|
},
|
|
|
// 提交退款按钮
|
|
|
submitRForm: function () {
|
|
|
- const app = this
|
|
|
- if (app.loading) {
|
|
|
- app.$modal.msgError(this.$t('orderList.requestProcessing'))
|
|
|
- }
|
|
|
- if (parseFloat(app.rForm.refundAmount) > parseFloat(app.rForm.amount)) {
|
|
|
- app.$modal.msgError(this.$t('orderList.refundAmountExceed'))
|
|
|
- return false
|
|
|
- }
|
|
|
- app.$refs['rForm'].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- app.loading = true
|
|
|
- doRefund(app.rForm).then((response) => {
|
|
|
- app.$modal.msgSuccess(this.$t('orderList.submitRefundSuccess'))
|
|
|
- app.cancelRForm()
|
|
|
- app.getList()
|
|
|
- app.loading = false
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ if (app.loading) {
|
|
|
+ app.$modal.msgError(this.$t('orderList.requestProcessing'));
|
|
|
}
|
|
|
- })
|
|
|
+ if (parseFloat(app.rForm.refundAmount) > parseFloat(app.rForm.amount)) {
|
|
|
+ app.$modal.msgError(this.$t('orderList.refundAmountExceed'));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ app.$refs['rForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ app.loading = true;
|
|
|
+ doRefund(app.rForm).then((response) => {
|
|
|
+ app.$modal.msgSuccess(this.$t('orderList.submitRefundSuccess'));
|
|
|
+ app.cancelRForm();
|
|
|
+ app.getList();
|
|
|
+ app.loading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 删除按钮操作
|
|
|
handleDelete(row) {
|
|
|
- const name = row.orderSn
|
|
|
- const confirmMsg = this.$t('orderList.confirmDeleteOrder', { orderSn: name })
|
|
|
- this.$modal
|
|
|
- .confirm(confirmMsg)
|
|
|
- .then(() => {
|
|
|
- return deleteOrder(row.id)
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.getList()
|
|
|
- this.$modal.msgSuccess(this.$t('orderList.deleteSuccess'))
|
|
|
- })
|
|
|
- .catch(() => {})
|
|
|
+ const name = row.orderSn;
|
|
|
+ const confirmMsg = this.$t('orderList.confirmDeleteOrder', { orderSn: name });
|
|
|
+ this.$modal
|
|
|
+ .confirm(confirmMsg)
|
|
|
+ .then(() => {
|
|
|
+ return deleteOrder(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess(this.$t('orderList.deleteSuccess'));
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
// 打印小票(本地打印)
|
|
|
handlePrint(row) {
|
|
|
- const app = this
|
|
|
- app.orderInfo = {}
|
|
|
- app.storeInfo = {}
|
|
|
- const id = row.id || this.ids
|
|
|
- getOrderInfo(id).then((response) => {
|
|
|
- let orderInfo = response.data.orderInfo
|
|
|
- if (orderInfo) {
|
|
|
- app.orderInfo = orderInfo
|
|
|
- app.storeInfo = orderInfo.storeInfo
|
|
|
- }
|
|
|
- app.openOrderPrintDialog = true
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ app.orderInfo = {};
|
|
|
+ app.storeInfo = {};
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getOrderInfo(id).then((response) => {
|
|
|
+ let orderInfo = response.data.orderInfo;
|
|
|
+ if (orderInfo) {
|
|
|
+ app.orderInfo = orderInfo;
|
|
|
+ app.storeInfo = orderInfo.storeInfo;
|
|
|
+ }
|
|
|
+ app.openOrderPrintDialog = true;
|
|
|
+ });
|
|
|
},
|
|
|
// 打印小票(云打印)
|
|
|
handlePrintCloud(row) {
|
|
|
- const app = this
|
|
|
- const orderId = row.id || this.ids
|
|
|
- doPrint(orderId).then((response) => {
|
|
|
- let result = response.data
|
|
|
- if (result) {
|
|
|
- app.$modal.msgSuccess(this.$t('orderList.printSendSuccess'))
|
|
|
- } else {
|
|
|
- app.$modal.msgError(this.$t('orderList.printSendFail'))
|
|
|
- }
|
|
|
- })
|
|
|
+ const app = this;
|
|
|
+ const orderId = row.id || this.ids;
|
|
|
+ doPrint(orderId).then((response) => {
|
|
|
+ let result = response.data;
|
|
|
+ if (result) {
|
|
|
+ app.$modal.msgSuccess(this.$t('orderList.printSendSuccess'));
|
|
|
+ } else {
|
|
|
+ app.$modal.msgError(this.$t('orderList.printSendFail'));
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 退款
|
|
|
handleRefund(row) {
|
|
|
- const app = this
|
|
|
- app.rForm.orderId = row.id
|
|
|
- app.rForm.orderSn = row.orderSn
|
|
|
- app.rForm.payAmount = row.payAmount
|
|
|
- app.rForm.payType = getName(app.payTypeList, row.payType)
|
|
|
- app.openRefundDialog = true
|
|
|
+ const app = this;
|
|
|
+ app.rForm.orderId = row.id;
|
|
|
+ app.rForm.orderSn = row.orderSn;
|
|
|
+ app.rForm.payAmount = row.payAmount;
|
|
|
+ app.rForm.payType = getName(app.payTypeList, row.payType);
|
|
|
+ app.openRefundDialog = true;
|
|
|
},
|
|
|
// 关掉打印对话框
|
|
|
closePrintDialog() {
|
|
|
- this.openOrderPrintDialog = false
|
|
|
+ this.openOrderPrintDialog = false;
|
|
|
},
|
|
|
// 更多操作触发
|
|
|
handleCommand(command, row) {
|
|
|
- switch (command) {
|
|
|
- case 'handleDelete':
|
|
|
- this.handleDelete(row)
|
|
|
- break
|
|
|
- case 'handlePrint':
|
|
|
- this.handlePrint(row)
|
|
|
- break
|
|
|
- case 'handlePrintCloud':
|
|
|
- this.handlePrintCloud(row)
|
|
|
- break
|
|
|
- case 'handleRefund':
|
|
|
- this.handleRefund(row)
|
|
|
- break
|
|
|
- default:
|
|
|
- this.handleView(row)
|
|
|
- break
|
|
|
- }
|
|
|
+ switch (command) {
|
|
|
+ case 'handleDelete':
|
|
|
+ this.handleDelete(row);
|
|
|
+ break;
|
|
|
+ case 'handlePrint':
|
|
|
+ this.handlePrint(row);
|
|
|
+ break;
|
|
|
+ case 'handlePrintCloud':
|
|
|
+ this.handlePrintCloud(row);
|
|
|
+ break;
|
|
|
+ case 'handleRefund':
|
|
|
+ this.handleRefund(row);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ this.handleView(row);
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|