|
|
@@ -0,0 +1,556 @@
|
|
|
+<template>
|
|
|
+ <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; ">
|
|
|
+ <div style="padding: 20px; background-color: #fff;">
|
|
|
+ 积分订单详情
|
|
|
+ </div>
|
|
|
+ <div class="contentx" v-if="item != null">
|
|
|
+ <div class="desct"> 积分订单信息</div>
|
|
|
+ <div class="order-status" v-if="item != null && item.status != 5">
|
|
|
+ <el-steps :active="getStepActive(item.status)" align-center finish-status="success">
|
|
|
+ <el-step title="待支付"></el-step>
|
|
|
+ <el-step title="待发货"></el-step>
|
|
|
+ <el-step title="待收货"></el-step>
|
|
|
+ <el-step title="已完成"></el-step>
|
|
|
+ </el-steps>
|
|
|
+ </div>
|
|
|
+ <el-card shadow="never" style="margin-top: 15px">
|
|
|
+ <div class="operate-container" v-if="item != null">
|
|
|
+ <span style="margin-left: 20px" class="color-danger">订单状态:
|
|
|
+ <el-tag prop="status" v-for="(ite, index) in statusOptions" v-if="item.status == ite.dictValue">{{
|
|
|
+ ite.dictLabel }}</el-tag>
|
|
|
+ </span>
|
|
|
+ <div class="operate-button-container" v-if="item.deliverySn != null"
|
|
|
+ v-hasPermi="['his:integralOrder:express']">
|
|
|
+ <el-button size="mini" @click="showExpress()">查看物流</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="desct">
|
|
|
+ 基本信息
|
|
|
+ </div>
|
|
|
+ <el-descriptions title="" :column="3" border>
|
|
|
+ <el-descriptions-item label="订单编号"><span v-if="item != null">{{ item.orderCode
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="会员ID"><span v-if="item != null">{{ item.userId }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="会员"><span v-if="item.nickName != null">{{ item.nickName }}({{ item.phone
|
|
|
+ }})</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="用户名称"><span v-if="item != null">{{ item.userName }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="用户电话"><span v-if="item != null">{{ item.userPhone }}</span>
|
|
|
+ <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle
|
|
|
+ v-hasPermi="['his:integralOrder:queryPhone']"></el-button>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="用户地址"><span v-if="item != null">{{ item.userAddress
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="支付积分"><span v-if="item != null">{{ item.integral }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="状态"><span v-if="item != null"> <dict-tag :options="statusOptions"
|
|
|
+ :value="item.status" /></span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="快递公司编号"><span v-if="item != null">{{ item.deliveryCode
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="快递名称"><span v-if="item != null">{{ item.deliveryName
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="快递单号"><span v-if="item != null">{{ item.deliverySn
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <!-- <el-descriptions-item label="物流状态"><span v-if="item != null">{{ item.deliveryType
|
|
|
+ }}</span></el-descriptions-item> -->
|
|
|
+ <el-descriptions-item label="物流状态" ><dict-tag :options="deliveryStatusOptions" :value="item.deliveryStatus"/></el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="物流跟踪状态" ><span v-if="item!=null"><dict-tag :options="deliveryTypeOptions" :value="item.deliveryType"/> </span></el-descriptions-item>
|
|
|
+
|
|
|
+ <el-descriptions-item label="发货时间"><span v-if="item != null">{{ item.deliveryTime
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="提交时间"><span v-if="item != null">{{ item.createTime
|
|
|
+ }}</span></el-descriptions-item>
|
|
|
+ </el-descriptions>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="contentx" v-if="item != null" style="padding-bottom: 70px;">
|
|
|
+ <div class="desct">
|
|
|
+ 商品信息
|
|
|
+ </div>
|
|
|
+ <el-table border v-if="prod != null" :data="prod" size="small" style="margin-top: 20px">
|
|
|
+ <el-table-column label="商品图片" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img :src="scope.row.imgUrl" style="height: 80px">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="商品名称" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p>{{ scope.row.goodsName }}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="积分" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p>¥{{ scope.row.integral }}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="金额" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <p>¥{{ scope.row.cash || 0 }}</p>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 操作记录 -->
|
|
|
+ <div class="contentx" v-if="item != null" style="padding-bottom: 70px;">
|
|
|
+ <div class="desct">
|
|
|
+ 操作记录
|
|
|
+ </div>
|
|
|
+ <el-table :data="orderLogs" border style="width: 100%; margin-top: 20px;" v-loading="logsLoading">
|
|
|
+ <!-- <el-table-column prop="changeType" label="操作类型" align="center" width="120">
|
|
|
+ </el-table-column> -->
|
|
|
+ <el-table-column prop="changeTime" label="操作时间" align="center" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ parseTime(scope.row.changeTime) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="changeMessage" label="操作备注" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column prop="operator" label="操作员" align="center" width="120">
|
|
|
+ </el-table-column> -->
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
|
|
|
+ <div style="margin-bottom: 10px; text-align: right;">
|
|
|
+ <el-button type="primary" size="small" @click="syncExpressInfo" :loading="syncLoading">同步物流信息</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table style="margin-top: 20px;width: 100%" ref="orderHistoryTable" :data="traces" border v-loading="tableLoading">
|
|
|
+ <el-table-column label="操作时间" width="160" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.AcceptTime }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="位置" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.Location }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="描述" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.AcceptStation }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getExpress,mandatoryRefunds,getCitys,finishOrder, listIntegralOrder, sendgoods, getIntegralOrder, delIntegralOrder, addIntegralOrder, updateIntegralOrder, exportIntegralOrder, getOrderUserPhone, getOrderLogs } from "@/api/store/integralOrder";
|
|
|
+export default {
|
|
|
+ name: "integralOrderDetails",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ deliveryStatusOptions:[],
|
|
|
+ selectedExpress: null,
|
|
|
+ expressDialog: {
|
|
|
+ title: "物流信息",
|
|
|
+ open: false,
|
|
|
+ },
|
|
|
+ editOrder: {
|
|
|
+ title: "修改订单",
|
|
|
+ open: false,
|
|
|
+ },
|
|
|
+ editForm: {
|
|
|
+ orderId: null,
|
|
|
+ status: null,
|
|
|
+ userAddress: null, // 这个字段将存储拼接后的完整地址
|
|
|
+ remark: "",
|
|
|
+ loginAccount: null,
|
|
|
+ // 新增快递相关字段
|
|
|
+ deliveryName: null,
|
|
|
+ deliveryCode: null,
|
|
|
+ deliverySn: null
|
|
|
+ },
|
|
|
+ editRules: {
|
|
|
+ deliveryName: [
|
|
|
+ { required: false, message: '请输入快递名称', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ deliveryCode: [
|
|
|
+ { required: false, message: '请输入快递公司编号', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ deliverySn: [
|
|
|
+ { required: false, message: '请输入快递单号', trigger: 'blur' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ item: null,
|
|
|
+ express: null,
|
|
|
+ traces: [],
|
|
|
+ rules: {
|
|
|
+ deliveryCode: [
|
|
|
+ { required: true, message: '请输入快递公司编号', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ deliveryName: [
|
|
|
+ { required: true, message: '请输入快递名称', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ deliverySn: [
|
|
|
+ { required: true, message: '请输入快递单号', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ selectedAccount: [ // 添加这一项
|
|
|
+ { required: true, message: '请选择代服账号', trigger: 'change' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ sendVisible: false,
|
|
|
+ form: {
|
|
|
+ deliveryCode: null,
|
|
|
+ deliveryName: null,
|
|
|
+ deliverySn: null,
|
|
|
+ orderId: null,
|
|
|
+ loginAccount: null // 在 form 中也添加这个字段
|
|
|
+ },
|
|
|
+ tableData: [], // 清空模拟数据,改为空数组
|
|
|
+ selectedRow: null,
|
|
|
+ editSelectedRow: null, // 修改订单弹窗选中的行
|
|
|
+ queryParams: { // 查询参数
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10
|
|
|
+ },
|
|
|
+ total: 0, // 总条数,
|
|
|
+ expressOptions: [], // 物流产品字典
|
|
|
+ editSelectedExpress: null,
|
|
|
+ // 地址选择相关数据
|
|
|
+ provinceOptions: [], // 省列表
|
|
|
+ cityOptions: [], // 市列表
|
|
|
+ districtOptions: [], // 区列表
|
|
|
+ selectedProvince: null, // 选中的省
|
|
|
+ selectedCity: null, // 选中的市
|
|
|
+ selectedDistrict: null, // 选中的区
|
|
|
+ detailAddress: '', // 详细地址
|
|
|
+ deliveryTypeOptions:[],
|
|
|
+ // 操作记录相关数据
|
|
|
+ orderLogs: [], // 订单操作记录
|
|
|
+ logsLoading: false, // 操作记录加载状态
|
|
|
+ syncLoading: false, // 同步物流信息按钮加载状态
|
|
|
+ tableLoading: false // 物流信息表格加载状态
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getDicts("sys_integral_order_status").then(response => {
|
|
|
+ this.statusOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("df_account_express").then(response => {
|
|
|
+ this.expressOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_store_order_delivery_status").then(response => {
|
|
|
+ this.deliveryStatusOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_delivery_type").then(response => {
|
|
|
+ this.deliveryTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ selectedExpress(newVal) {
|
|
|
+ console.log('选中的快递:', newVal); // 调试用
|
|
|
+ if (newVal && newVal.name && newVal.code) {
|
|
|
+ this.form.deliveryName = newVal.name;
|
|
|
+ this.form.deliveryCode = newVal.code;
|
|
|
+ } else {
|
|
|
+ this.form.deliveryName = '';
|
|
|
+ this.form.deliveryCode = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 新增:修改订单弹窗的快递选择监听
|
|
|
+ editSelectedExpress(newVal) {
|
|
|
+ console.log('修改订单弹窗选中的快递:', newVal);
|
|
|
+ if (newVal && newVal.name && newVal.code) {
|
|
|
+ this.editForm.deliveryName = newVal.name;
|
|
|
+ this.editForm.deliveryCode = newVal.code;
|
|
|
+ } else {
|
|
|
+ this.editForm.deliveryName = '';
|
|
|
+ this.editForm.deliveryCode = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 'editOrder.open': function (newVal) {
|
|
|
+ if (!newVal) {
|
|
|
+ // 修改订单弹窗关闭时清理选择状态
|
|
|
+ this.editSelectedRow = null;
|
|
|
+ if (this.$refs.editAccountTable) {
|
|
|
+ this.$refs.editAccountTable.setCurrentRow();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ 'expressDialog.open': function (newVal) {
|
|
|
+ if (!newVal) {
|
|
|
+ // 查看物流弹窗关闭时清理数据
|
|
|
+ this.express = null;
|
|
|
+ this.traces = [];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getStepActive(status) {
|
|
|
+ const statusMap = {
|
|
|
+ 4: 1, // 待支付 -> 激活第1步(显示到待支付)
|
|
|
+ 1: 2, // 待发货 -> 激活第2步(显示到待发货)
|
|
|
+ 2: 3, // 待收货 -> 激活第3步(显示到待收货)
|
|
|
+ 3: 4 // 已完成 -> 激活第4步(全部完成)
|
|
|
+ };
|
|
|
+ return statusMap[status] || 0;
|
|
|
+ },
|
|
|
+ handlePhone() {
|
|
|
+ const orderId = this.item.orderId;
|
|
|
+ getOrderUserPhone(orderId).then(response => {
|
|
|
+ this.item.userPhone = response.userPhone;
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ showSend() {
|
|
|
+ // 重置表单和选择状态
|
|
|
+ this.form = {
|
|
|
+ deliveryCode: null,
|
|
|
+ deliveryName: null,
|
|
|
+ deliverySn: null,
|
|
|
+ orderId: null,
|
|
|
+ loginAccount: null
|
|
|
+ };
|
|
|
+ this.selectedExpress = null;
|
|
|
+ this.selectedRow = null;
|
|
|
+
|
|
|
+ this.sendVisible = true;
|
|
|
+ },
|
|
|
+ showExpress() {
|
|
|
+ this.expressDialog.open = true;
|
|
|
+ this.loadExpressInfo();
|
|
|
+ },
|
|
|
+ // 加载物流信息
|
|
|
+ loadExpressInfo() {
|
|
|
+ this.tableLoading = true;
|
|
|
+ getExpress(this.item.orderId).then(response => {
|
|
|
+ this.express = response.data;
|
|
|
+ if (this.express != null && this.express.Traces != null) {
|
|
|
+ this.traces = this.express.Traces
|
|
|
+ } else {
|
|
|
+ this.traces = [];
|
|
|
+ }
|
|
|
+ this.tableLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.traces = [];
|
|
|
+ this.tableLoading = false;
|
|
|
+ console.error('获取物流信息失败:', error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 同步物流信息
|
|
|
+ syncExpressInfo() {
|
|
|
+ this.syncLoading = true;
|
|
|
+ this.loadExpressInfo();
|
|
|
+ this.syncLoading = false;
|
|
|
+ },
|
|
|
+ sendGoods() {
|
|
|
+ // 手动验证所有必填字段
|
|
|
+ if (!this.selectedRow) {
|
|
|
+ this.msgError('请选择代服账号');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.form.deliveryName || !this.form.deliveryCode) {
|
|
|
+ this.msgError('请选择快递公司');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!this.form.deliverySn) {
|
|
|
+ this.msgError('请输入快递单号');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 所有验证通过,直接发送
|
|
|
+ this.form.orderId = this.item.orderId;
|
|
|
+ sendgoods(this.form).then(response => {
|
|
|
+ this.msgSuccess("发货成功");
|
|
|
+ this.sendVisible = false;
|
|
|
+ getIntegralOrder(this.item.orderId).then(response => {
|
|
|
+ this.item = response.data;
|
|
|
+ this.$parent.$parent.getList();
|
|
|
+ });
|
|
|
+
|
|
|
+ this.form = {
|
|
|
+ deliveryCode: null,
|
|
|
+ deliveryName: null,
|
|
|
+ deliverySn: null,
|
|
|
+ orderId: null,
|
|
|
+ loginAccount: null
|
|
|
+ };
|
|
|
+ this.selectedRow = null;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getDetails(orderId) {
|
|
|
+ this.item = null;
|
|
|
+ this.orderLogs = []; // 清空操作记录
|
|
|
+ getIntegralOrder(orderId).then(response => {
|
|
|
+ this.item = response.data;
|
|
|
+ this.prod = [JSON.parse(this.item.itemJson)][0];
|
|
|
+ // 获取操作记录
|
|
|
+ this.getOrderLogsData();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 代服账号选择变化
|
|
|
+ handleAccountSelectionChange(currentRow, oldRow) {
|
|
|
+ this.selectedRow = currentRow;
|
|
|
+ if (currentRow) {
|
|
|
+ this.form.loginAccount = currentRow.loginAccount;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 修改订单弹窗的代服账号选择
|
|
|
+ handleEditAccountSelectionChange(currentRow, oldRow) {
|
|
|
+ this.editSelectedRow = currentRow;
|
|
|
+ if (currentRow) {
|
|
|
+ this.editForm.loginAccount = currentRow.loginAccount;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ handlePageChange(page) {
|
|
|
+ this.queryParams.pageNum = page;
|
|
|
+ this.getAccountList();
|
|
|
+ },
|
|
|
+ // 取消订单
|
|
|
+ applyRefund() {
|
|
|
+ this.$confirm('确定要取消该订单吗?取消后订单将无法恢复。', '取消订单确认', {
|
|
|
+ confirmButtonText: '确定取消',
|
|
|
+ cancelButtonText: '再想想',
|
|
|
+ type: 'warning',
|
|
|
+ confirmButtonClass: 'el-button--danger'
|
|
|
+ }).then(() => {
|
|
|
+ this.cancelOrder();
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消操作'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 执行取消订单请求
|
|
|
+ cancelOrder() {
|
|
|
+ const orderCode = this.item.orderCode;
|
|
|
+ mandatoryRefunds(orderCode).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess("取消订单成功");
|
|
|
+ // 刷新订单详情
|
|
|
+ this.getDetails(this.item.orderId);
|
|
|
+ // 刷新父组件列表(如果有)
|
|
|
+ if (this.$parent && this.$parent.$parent && this.$parent.$parent.getList) {
|
|
|
+ this.$parent.$parent.getList();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.msgError(response.msg || "取消订单失败");
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.msgError("取消订单失败");
|
|
|
+ console.error('取消订单失败:', error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 完成订单
|
|
|
+ handleFinishOrder() {
|
|
|
+ this.$confirm('确定要完成该订单吗?完成后订单状态将变为已完成。', '完成订单确认', {
|
|
|
+ confirmButtonText: '确定完成',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 用户点击确定
|
|
|
+ this.executeFinishOrder();
|
|
|
+ }).catch(() => {
|
|
|
+ // 用户点击取消
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消操作'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 执行完成订单请求
|
|
|
+ executeFinishOrder() {
|
|
|
+ const orderCode = this.item.orderCode;
|
|
|
+ console.log("请问请问",orderCode)
|
|
|
+ finishOrder(orderCode).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.msgSuccess("订单完成成功");
|
|
|
+ // 刷新订单详情
|
|
|
+ this.getDetails(this.item.orderId);
|
|
|
+ // 刷新父组件列表(如果有)
|
|
|
+ if (this.$parent && this.$parent.$parent && this.$parent.$parent.getList) {
|
|
|
+ this.$parent.$parent.getList();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.msgError(response.msg || "订单完成失败");
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.msgError("订单完成失败");
|
|
|
+ console.error('完成订单失败:', error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取订单操作记录
|
|
|
+ getOrderLogsData() {
|
|
|
+ if (!this.item || !this.item.orderId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.logsLoading = true;
|
|
|
+ getOrderLogs(this.item.orderId).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ // 按照时间升序排列
|
|
|
+ this.orderLogs = response.data.sort((a, b) => {
|
|
|
+ return new Date(a.changeTime) - new Date(b.changeTime);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.orderLogs = [];
|
|
|
+ }
|
|
|
+ this.logsLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.orderLogs = [];
|
|
|
+ this.logsLoading = false;
|
|
|
+ console.error('获取操作记录失败:', error);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.contentx {
|
|
|
+ height: 100%;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 0px 20px 20px;
|
|
|
+
|
|
|
+
|
|
|
+ margin: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-descriptions-item__label.is-bordered-label {
|
|
|
+ font-weight: normal;
|
|
|
+}
|
|
|
+
|
|
|
+.el-descriptions-item__content {
|
|
|
+ max-width: 150px;
|
|
|
+ min-width: 100px;
|
|
|
+}
|
|
|
+
|
|
|
+.desct {
|
|
|
+ padding-top: 20px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+ color: #524b4a;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.operate-container {
|
|
|
+ background: #F2F6FC;
|
|
|
+ height: 60px;
|
|
|
+ margin: -20px -20px 0;
|
|
|
+ line-height: 60px;
|
|
|
+}
|
|
|
+
|
|
|
+.order-content {
|
|
|
+ margin: 10px;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.operate-button-container {
|
|
|
+ float: right;
|
|
|
+ margin-right: 20px
|
|
|
+}
|
|
|
+</style>
|