|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
+ <div class="app-container">
|
|
|
<el-form
|
|
|
:model="queryParams"
|
|
|
class="main-search"
|
|
@@ -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,7 +45,11 @@
|
|
|
</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 + ''"
|
|
@@ -55,7 +59,11 @@
|
|
|
</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 + ''"
|
|
@@ -64,7 +72,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="配送方式">
|
|
|
+ <!-- <el-form-item label="配送方式">
|
|
|
<el-select
|
|
|
v-model="queryParams.orderMode"
|
|
|
placeholder="配送方式"
|
|
@@ -97,7 +105,9 @@
|
|
|
<el-button type="danger" icon="el-icon-download" size="mini" @click="handleQuery(true)">
|
|
|
{{ $t('orderList.export') }}
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('orderList.reset') }}</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">
|
|
|
+ {{ $t('orderList.reset') }}
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
@@ -109,8 +119,17 @@
|
|
|
:default-sort="defaultSort"
|
|
|
@sort-change="handleSortChange"
|
|
|
>
|
|
|
- <el-table-column :label="$t('orderList.orderID')" prop="id" min-width="80" />
|
|
|
- <el-table-column :label="$t('orderList.orderNumber')" align="center" width="200" prop="orderSn">
|
|
|
+ <el-table-column :label="$t('orderList.orderID')" prop="id" min-width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ showIdLastFour(scope.row.id) }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('orderList.orderNumber')"
|
|
|
+ align="center"
|
|
|
+ width="200"
|
|
|
+ prop="orderSn"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<span @click="handleView(scope.row)" style="color: #00afff; cursor: pointer">
|
|
|
{{ scope.row.orderSn }}
|
|
@@ -130,13 +149,23 @@
|
|
|
<span>{{ scope.row.typeName }}</span>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column :label="$t('orderList.storeName')" align="center" width="140" prop="storeInfo.name">
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('orderList.storeName')"
|
|
|
+ align="center"
|
|
|
+ width="140"
|
|
|
+ prop="storeInfo.name"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.storeInfo">{{ scope.row.storeInfo.name }}</span>
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('orderList.tableCode')" align="center" width="140" prop="tableInfo.code">
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('orderList.tableCode')"
|
|
|
+ align="center"
|
|
|
+ width="140"
|
|
|
+ prop="tableInfo.code"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.tableInfo">{{ scope.row.tableInfo.code }}</span>
|
|
|
<span v-else>-</span>
|
|
@@ -148,7 +177,7 @@
|
|
|
<span v-else>0.00</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="支付状态" align="center" width="80" prop="payStatus">
|
|
|
+ <!-- <el-table-column label="支付状态" align="center" width="80" prop="payStatus">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.payStatus == 'B'" class="status-active">{{ getName(payStatusList, scope.row.payStatus) }}</span>
|
|
|
<span v-else class="status-disabled">{{ getName(payStatusList, scope.row.payStatus) }}</span>
|
|
@@ -159,12 +188,17 @@
|
|
|
<span class="status-normal">{{ getName(statusList, scope.row.status) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column label="配送方式" align="center" prop="orderMode">
|
|
|
+ <!-- <el-table-column label="配送方式" align="center" prop="orderMode">
|
|
|
<template slot-scope="scope">
|
|
|
<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>
|
|
@@ -187,13 +221,23 @@
|
|
|
<span v-else>0.00</span>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column :label="$t('orderList.staffName')" align="center" width="100" prop="staffInfo.name">
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('orderList.staffName')"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ prop="staffInfo.name"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.staffInfo">{{ scope.row.staffInfo.realName }}</span>
|
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('orderList.updateTime')" align="center" width="130" prop="updateTime">
|
|
|
+ <el-table-column
|
|
|
+ :label="$t('orderList.updateTime')"
|
|
|
+ align="center"
|
|
|
+ width="130"
|
|
|
+ prop="updateTime"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.updateTime }}</span>
|
|
|
</template>
|
|
@@ -257,242 +301,297 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 修改对话框 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-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-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-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-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-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" 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.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-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-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-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-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>
|
|
|
+ </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">
|
|
|
- <el-input
|
|
|
- v-model="rForm.payAmount"
|
|
|
- :placeholder="$t('orderList.actualPaymentAmountForOrder')"
|
|
|
- disabled
|
|
|
- maxlength="100"
|
|
|
+ <!-- 退款对话框 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"
|
|
|
>
|
|
|
- <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 -->
|
|
|
+ <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"
|
|
|
+ >
|
|
|
+ <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>
|
|
|
|
|
@@ -596,53 +695,53 @@ export default {
|
|
|
},
|
|
|
// 表单校验
|
|
|
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'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -652,324 +751,327 @@ 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;
|
|
|
- this.payStatusList = response.data.payStatusList;
|
|
|
- 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(',') : ''
|
|
|
+ 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
|
|
|
+ this.payStatusList = response.data.payStatusList
|
|
|
+ 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.storeIds = []
|
|
|
+ this.resetForm('queryForm')
|
|
|
+ this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
|
|
+ this.handleQuery()
|
|
|
},
|
|
|
// 状态修改
|
|
|
handleStatusChange(row) {
|
|
|
- let text = row.status === 'A' ? this.$t('orderList.enable') : this.$t('orderList.disable');
|
|
|
- const confirmMsg = this.$t('orderList.confirmChangeOrderStatus', { action: text, orderSn: row.orderSn });
|
|
|
- this.$modal
|
|
|
- .confirm(confirmMsg)
|
|
|
- .then(() => {
|
|
|
- return updateOrderStatus(row.id, row.status);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- const successMsg = this.$t('orderList.statusChangeSuccess', { action: text });
|
|
|
- this.$modal.msgSuccess(successMsg);
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- row.status = row.status === 'N' ? 'A' : 'N';
|
|
|
- });
|
|
|
+ let text = row.status === 'A' ? this.$t('orderList.enable') : this.$t('orderList.disable')
|
|
|
+ const confirmMsg = this.$t('orderList.confirmChangeOrderStatus', {
|
|
|
+ action: text,
|
|
|
+ orderSn: row.orderSn
|
|
|
+ })
|
|
|
+ this.$modal
|
|
|
+ .confirm(confirmMsg)
|
|
|
+ .then(() => {
|
|
|
+ return updateOrderStatus(row.id, row.status)
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ const successMsg = this.$t('orderList.statusChangeSuccess', { action: text })
|
|
|
+ this.$modal.msgSuccess(successMsg)
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ row.status = row.status === 'N' ? 'A' : 'N'
|
|
|
+ })
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
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'));
|
|
|
+ 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
|
|
|
+ })
|
|
|
}
|
|
|
- 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;
|
|
|
+ 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
|
|
|
+ })
|
|
|
}
|
|
|
- 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
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|