订单接口联调
This commit is contained in:
parent
3c680825a3
commit
a853cbe51d
@ -68,10 +68,10 @@ export function saveMerchantNote(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发货
|
// 核销
|
||||||
export function deliverProduct(data) {
|
export function deliverProduct(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/oms/order/deliverProduct',
|
url: '/oms/verification/verify',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
@ -5,7 +5,7 @@ import cache from './cache';
|
|||||||
import auth from './auth';
|
import auth from './auth';
|
||||||
// 预设动画
|
// 预设动画
|
||||||
import animate from '@/animate';
|
import animate from '@/animate';
|
||||||
|
import { getEmulistLabelById } from '@/utils';
|
||||||
import { download as dl } from '@/utils/request';
|
import { download as dl } from '@/utils/request';
|
||||||
import { useDict, getDictionaryByKey } from '@/utils/dict';
|
import { useDict, getDictionaryByKey } from '@/utils/dict';
|
||||||
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
|
import { getConfigKey, updateConfigByKey } from '@/api/system/config';
|
||||||
@ -57,4 +57,5 @@ export default function installPlugin(app: App) {
|
|||||||
app.config.globalProperties.getHiddenName = getHiddenName;
|
app.config.globalProperties.getHiddenName = getHiddenName;
|
||||||
app.config.globalProperties.getHiddenDetailAddress = getHiddenDetailAddress;
|
app.config.globalProperties.getHiddenDetailAddress = getHiddenDetailAddress;
|
||||||
app.config.globalProperties.getDictionaryByKey = getDictionaryByKey;
|
app.config.globalProperties.getDictionaryByKey = getDictionaryByKey;
|
||||||
|
app.config.globalProperties.getEmulistLabelById = getEmulistLabelById; // 根据枚举key和枚举获取枚举中文label
|
||||||
}
|
}
|
||||||
|
@ -327,9 +327,10 @@ export const getEmulistLabelById = (id: string, emuList: any) => {
|
|||||||
return '--';
|
return '--';
|
||||||
}
|
}
|
||||||
if (emuList && emuList.length) {
|
if (emuList && emuList.length) {
|
||||||
const { label } = emuList.find((item: any) => {
|
const { label } =
|
||||||
return item.value == id;
|
emuList.find((item: any) => {
|
||||||
});
|
return item.value == id;
|
||||||
|
}) || {};
|
||||||
return label || '--';
|
return label || '--';
|
||||||
} else {
|
} else {
|
||||||
return '--';
|
return '--';
|
||||||
|
@ -29,6 +29,15 @@
|
|||||||
<el-descriptions-item label="订单状态">{{ getOrderStatus(orderDetail) }}</el-descriptions-item>
|
<el-descriptions-item label="订单状态">{{ getOrderStatus(orderDetail) }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card class="mt10">
|
||||||
|
<el-descriptions title="人员信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
||||||
|
<el-descriptions-item label="推广人信息">{{ orderDetail.orderSn }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="买家信息">{{ orderDetail.userName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="卖家信息">{{ orderDetail.userPhone }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="代理信息">{{ parseTime(orderDetail.createTime, '') }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="分佣信息">{{ getPayType(orderDetail) }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-card>
|
||||||
<el-card class="mt10">
|
<el-card class="mt10">
|
||||||
<el-descriptions title="收货信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
<el-descriptions title="收货信息" :column="2" border label-class-name="my-label" contentClassName="my-content">
|
||||||
<el-descriptions-item label="收货人姓名">{{ getHiddenName(addressInfo.name) }}</el-descriptions-item>
|
<el-descriptions-item label="收货人姓名">{{ getHiddenName(addressInfo.name) }}</el-descriptions-item>
|
||||||
@ -111,7 +120,7 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
queryDetail(id) {
|
queryDetail(id) {
|
||||||
this.loading = true;
|
// this.loading = true;
|
||||||
return new Promise((resolve) =>
|
return new Promise((resolve) =>
|
||||||
getOmsOrder(id).then((res) => {
|
getOmsOrder(id).then((res) => {
|
||||||
const { productInfo, addressInfo } = res.data;
|
const { productInfo, addressInfo } = res.data;
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
>
|
>
|
||||||
</DictRadio>
|
</DictRadio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="退款状态" prop="orderType">
|
<el-form-item label="退款状态" prop="aftersaleStatus">
|
||||||
<DictRadio
|
<DictRadio
|
||||||
v-if="orderAftersaleMap.length > 0"
|
v-if="orderAftersaleMap.length > 0"
|
||||||
v-model="queryParams.status"
|
v-model="queryParams.status"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
>
|
>
|
||||||
</DictRadio>
|
</DictRadio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="订单编号" prop="orderSn">
|
<el-form-item label="订单编号" prop="id">
|
||||||
<el-input v-model.trim="queryParams.orderSn" placeholder="请输入订单编号" clearable size="small" @keyup.enter="handleQuery" />
|
<el-input v-model.trim="queryParams.orderSn" placeholder="请输入订单编号" clearable size="small" @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="交易流水号" prop="userPhone">
|
<el-form-item label="交易流水号" prop="userPhone">
|
||||||
@ -84,36 +84,38 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="omsOrderList" border cell-class-name="my-cell">
|
<el-table v-loading="loading" :data="omsOrderList" border cell-class-name="my-cell">
|
||||||
<el-table-column label="达人信息" prop="couponAmount">
|
<el-table-column label="推广人信息" width="116">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>达人姓名:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.tenantContactName }}</div>
|
||||||
<div>达人手机号:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.tenantContactPhone }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="买家信息" prop="couponAmount">
|
<el-table-column label="买家信息" width="116">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>买家姓名:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.memberUsername }}</div>
|
||||||
<div>买家手机号:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.memberPhoneEncrypted }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="卖家信息" prop="couponAmount">
|
<el-table-column label="卖家信息" width="116">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>卖家姓名:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.tenantContactName }}</div>
|
||||||
<div>卖家手机号:{{ scope.row.deliverySn }}</div>
|
<div>{{ scope.row.tenantContactPhone }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="代理信息" prop="couponAmount">
|
<el-table-column label="代理信息" width="116">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>代理人姓名:{{ scope.row.deliverySn }}</div>
|
<div>代理人姓名:{{ scope.row.deliverySn }}</div>
|
||||||
<div>代理区域:{{ scope.row.deliverySn }}</div>
|
<div>代理区域:{{ scope.row.deliverySn }}</div>
|
||||||
<div>代理手机号:{{ scope.row.deliverySn }}</div>
|
<div>代理手机号:{{ scope.row.deliverySn }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="代理信息" prop="couponAmount">
|
<!-- <el-table-column label="商品信息">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>达人姓名:{{ scope.row.deliverySn }}</div>
|
<div>:{{ scope.row.productName }}</div>
|
||||||
<div>达人手机号:{{ scope.row.deliverySn }}</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
</el-table-column>-->
|
||||||
|
<el-table-column label="核销码" width="130">
|
||||||
|
<el-image src="" style="width: 100px; height: 100px" />
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品规格" prop="productList" width="280">
|
<el-table-column label="商品规格" prop="productList" width="280">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@ -137,22 +139,27 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分佣信息" prop="couponAmount" width="80"> </el-table-column>
|
<el-table-column label="分佣信息" prop="couponAmount" width="80"> </el-table-column>
|
||||||
<el-table-column label="订单类型" prop="couponAmount" width="80"> </el-table-column>
|
<el-table-column label="订单类型" prop="couponAmount" width="100">
|
||||||
<el-table-column label="订单编号" prop="orderSn" width="120">
|
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-link type="text" icon="Copy" link @click="copy(scope.row.orderSn)" :underline="false">
|
<el-tag type="primary">
|
||||||
|
{{ getEmulistLabelById(scope.row.status, orderTypeMap) }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交易编号" prop="orderSn" width="120">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-link type="primary" icon="Copy" link @click="copy(scope.row.orderSn)" :underline="false">
|
||||||
{{ scope.row.orderSn }}
|
{{ scope.row.orderSn }}
|
||||||
<el-icon><CopyDocument /></el-icon>
|
<el-icon><CopyDocument /></el-icon>
|
||||||
</el-link>
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交易编号" prop="couponAmount" width="80"> </el-table-column>
|
<el-table-column label="订单编号" prop="id" width="80"> </el-table-column>
|
||||||
<el-table-column label="金额" prop="couponAmount" width="80"> </el-table-column>
|
|
||||||
<el-table-column label="订单状态" prop="status" width="160">
|
<el-table-column label="订单状态" prop="status" width="160">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-tag :type="getOrderStatusTag(scope.row.status)" style="margin-right: 10px">
|
<el-tag style="margin-right: 10px">
|
||||||
{{ getOrderStatusText(scope.row.status) }}
|
{{ getEmulistLabelById(scope.row.status, orderStatusMap) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="scope.row.deliverySn">
|
<div v-if="scope.row.deliverySn">
|
||||||
@ -162,14 +169,26 @@
|
|||||||
<div v-if="scope.row.deliveryTime">发货时间:{{ parseTime(scope.row.deliveryTime, '') }}</div>
|
<div v-if="scope.row.deliveryTime">发货时间:{{ parseTime(scope.row.deliveryTime, '') }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退款状态" prop="couponAmount" width="80"> </el-table-column>
|
<el-table-column label="退款状态" prop="aftersaleStatus" width="100">
|
||||||
<el-table-column label="提现状态" prop="couponAmount" width="80"> </el-table-column>
|
<template v-slot="scope">
|
||||||
|
<el-tag type="primary">
|
||||||
|
{{ getEmulistLabelById(scope.row.aftersaleStatus, orderAftersaleMap) }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="提现状态" prop="aftersaleStatus" width="100">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-tag type="primary">
|
||||||
|
{{ getEmulistLabelById(scope.row.aftersaleStatus, orderAftersaleMap) }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="收件信息" prop="receiverName" width="280">
|
<el-table-column label="收件信息" prop="receiverName" width="280">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>
|
<div>
|
||||||
<span>{{ scope.row.decrypt ? scope.row.receiverName : getHiddenName(scope.row.receiverName) }} {{ scope.row.receiverPhone }}</span>
|
<span>{{ scope.row.decrypt ? scope.row.receiverName : getHiddenName(scope.row.receiverName) }} {{ scope.row.receiverPhone }}</span>
|
||||||
<el-button size="small" type="text" @click="handleWatch(scope.row)" style="margin-left: 10px">查看 </el-button>
|
<el-button size="small" text type="primary" @click="handleWatch(scope.row)" style="margin-left: 10px">查看 </el-button>
|
||||||
<el-button size="small" type="text" @click="handleUpdate(scope.row)">修改 </el-button>
|
<el-button size="small" text type="primary" @click="handleUpdate(scope.row)">修改 </el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>{{ scope.row.receiverProvince }}{{ scope.row.receiverCity }}{{ scope.row.receiverDistrict }}</span>
|
<span>{{ scope.row.receiverProvince }}{{ scope.row.receiverCity }}{{ scope.row.receiverDistrict }}</span>
|
||||||
@ -181,7 +200,9 @@
|
|||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div>
|
<div>
|
||||||
<span v-if="scope.row.merchantNote" class="note-title" style="margin-right: 10px">平台备注</span>
|
<span v-if="scope.row.merchantNote" class="note-title" style="margin-right: 10px">平台备注</span>
|
||||||
<el-button size="small" type="text" @click="handleSaveNote(scope.row)">{{ scope.row.merchantNote ? '修改' : '添加平台备注' }} </el-button>
|
<el-button size="small" text type="primary" @click="handleSaveNote(scope.row)"
|
||||||
|
>{{ scope.row.merchantNote ? '修改' : '添加平台备注' }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="scope.row.merchantNote">{{ scope.row.merchantNote }}</div>
|
<div v-if="scope.row.merchantNote">{{ scope.row.merchantNote }}</div>
|
||||||
<div v-if="scope.row.note" class="note-title">买家备注</div>
|
<div v-if="scope.row.note" class="note-title">买家备注</div>
|
||||||
@ -209,17 +230,11 @@
|
|||||||
<div>实付: ¥{{ scope.row.payAmount }}</div>
|
<div>实付: ¥{{ scope.row.payAmount }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" class-name="small-padding fixed-width" width="220" fixed="right">
|
<el-table-column label="操作" class-name="small-padding fixed-width" width="150" align="center" fixed="right">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="small" type="text" @click="goDetail(scope.row)" v-hasPermi="['oms:order:query']">详情 </el-button>
|
<el-button size="small" text type="primary" @click="goDetail(scope.row)" v-hasPermi="['oms:order:query']">详情 </el-button>
|
||||||
<el-button size="small" type="text" @click="showLog(scope.row.id)" v-hasPermi="['oms:order:log']">日志 </el-button>
|
<el-button size="small" text type="primary" @click="showLog(scope.row.id)" v-hasPermi="['oms:order:log']">记录 </el-button>
|
||||||
<el-button
|
<el-button size="small" text type="primary" @click="handleDelivery(scope.row)">核销 </el-button>
|
||||||
size="small"
|
|
||||||
type="text"
|
|
||||||
@click="handleDelivery(scope.row)"
|
|
||||||
:disabled="scope.row.status !== 1 && scope.row.status !== 2 && scope.row.status !== 3"
|
|
||||||
>核销
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -235,8 +250,8 @@
|
|||||||
<el-option label="圆通快递" value="2" />
|
<el-option label="圆通快递" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>-->
|
</el-form-item>-->
|
||||||
<el-form-item label="核销编码" prop="expressSn">
|
<el-form-item label="商家ID" prop="usedMerchantId">
|
||||||
<el-input v-model="deliveryObj.form.expressSn" placeholder="请输入核销编码" controls-position="right" :min="0" />
|
<el-input v-model="deliveryObj.form.usedMerchantId" placeholder="请输入待核销商家ID" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
@ -265,9 +280,10 @@
|
|||||||
<el-timeline v-if="logObj.logList.length">
|
<el-timeline v-if="logObj.logList.length">
|
||||||
<el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')">
|
<el-timeline-item v-for="item in logObj.logList" placement="top" :timestamp="parseTime(item.createTime, '')">
|
||||||
<el-card>
|
<el-card>
|
||||||
<h4>{{ getLogEvent(item.orderStatus) }}</h4>
|
<h4>{{ getLogEvent(item.status) }}</h4>
|
||||||
<br />
|
<br />
|
||||||
<h4>操作人:{{ item.operateMan }}</h4>
|
<h4>操作人:{{ item.operName }}</h4>
|
||||||
|
<h4>操作时间:{{ item.operTime }}</h4>
|
||||||
<br v-if="item.note" />
|
<br v-if="item.note" />
|
||||||
<h4 v-if="item.note">备注:{{ item.note }}</h4>
|
<h4 v-if="item.note">备注:{{ item.note }}</h4>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -381,14 +397,12 @@ export default {
|
|||||||
deliveryObj: {
|
deliveryObj: {
|
||||||
title: '核销',
|
title: '核销',
|
||||||
form: {
|
form: {
|
||||||
orderId: null,
|
codeValue: null,
|
||||||
expressName: null,
|
usedMerchantId: null
|
||||||
expressSn: null
|
|
||||||
},
|
},
|
||||||
open: false,
|
open: false,
|
||||||
rules: {
|
rules: {
|
||||||
expressName: [{ required: true, message: '快递公司不能为空', trigger: 'change' }],
|
usedMerchantId: [{ required: true, message: '商家ID不能为空', trigger: 'blur' }]
|
||||||
expressSn: [{ required: true, message: '快递单号不能为空', trigger: 'blur' }]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
noteObj: {
|
noteObj: {
|
||||||
@ -635,7 +649,7 @@ export default {
|
|||||||
oInput.remove();
|
oInput.remove();
|
||||||
},
|
},
|
||||||
handleDelivery(row) {
|
handleDelivery(row) {
|
||||||
this.deliveryObj.form.orderId = row.id;
|
this.deliveryObj.form.codeValue = row.id;
|
||||||
this.deliveryObj.open = true;
|
this.deliveryObj.open = true;
|
||||||
},
|
},
|
||||||
submitDelivery() {
|
submitDelivery() {
|
||||||
@ -651,9 +665,8 @@ export default {
|
|||||||
},
|
},
|
||||||
cancelDelivery() {
|
cancelDelivery() {
|
||||||
this.deliveryObj.open = false;
|
this.deliveryObj.open = false;
|
||||||
this.deliveryObj.form.orderId = null;
|
this.deliveryObj.form.codeValue = null;
|
||||||
this.deliveryObj.form.expressName = null;
|
this.deliveryObj.form.usedMerchantId = null;
|
||||||
this.deliveryObj.form.expressSn = null;
|
|
||||||
},
|
},
|
||||||
handleSaveNote(row) {
|
handleSaveNote(row) {
|
||||||
const merchantNote = row.merchantNote;
|
const merchantNote = row.merchantNote;
|
||||||
|
@ -111,7 +111,7 @@
|
|||||||
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button size="small" type="text" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>-->
|
</template>-->
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button size="small" type="text">编辑 </el-button>
|
<el-button size="small" type="text" @click="showProductEditModal(scope.row)">编辑</el-button>
|
||||||
<!-- <el-button size="small" type="text">余额变更记录 </el-button>
|
<!-- <el-button size="small" type="text">余额变更记录 </el-button>
|
||||||
<el-button size="small" type="text">开通易生支付 </el-button>
|
<el-button size="small" type="text">开通易生支付 </el-button>
|
||||||
<el-button size="small" type="text" @click="showUserLoginInfoModal(scope.row, true)">登录记录 </el-button>
|
<el-button size="small" type="text" @click="showUserLoginInfoModal(scope.row, true)">登录记录 </el-button>
|
||||||
@ -125,6 +125,59 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
<!--编辑会员基础信息-->
|
||||||
|
<el-dialog title="编辑商品详情" v-model="productModalInfo.open" width="600px" append-to-body>
|
||||||
|
<el-form label-width="auto" :rules="productEditRules" :model="productModalInfo.data" ref="editForm" size="default">
|
||||||
|
<el-form-item label="昵称" prop="nickname">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.nickname" placeholder="请输入会员昵称" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="密码" prop="password">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.password" placeholder="请输入会员密码" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="phone">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.phone" placeholder="请输入会员手机号" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="mark">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.mark" placeholder="请输入备注" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="status">
|
||||||
|
<el-switch
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
active-text="启用"
|
||||||
|
inactive-text="禁用"
|
||||||
|
inline-prompt
|
||||||
|
v-model="productModalInfo.data.status"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="头像" prop="avatar">
|
||||||
|
<!-- 暂时先用输入框组件,后续OSS上传功能好了迁移到上传upload组件-->
|
||||||
|
<el-input v-model.trim="productModalInfo.data.avatar" placeholder="请输入头像" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="gender">
|
||||||
|
<DictRadio v-model="productModalInfo.data.gender" radioData="sys_user_sex" size="small" :show-all="'all'" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址" prop="address">
|
||||||
|
<AddressSelector v-model="productModalInfo.data.fullArea" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生日" prop="birthday">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.birthday" placeholder="请选择生日" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户等级" prop="level">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.level" placeholder="请输入用户等级" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="剩余积分" prop="integral">
|
||||||
|
<el-input v-model.trim="productModalInfo.data.integral" placeholder="请输入剩余积分" size="small" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12"> </el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-button type="danger" @click="closeEditProduct">关闭</el-button>
|
||||||
|
<el-button type="primary" @click="submitEditProduct">保存</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<!-- <SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>-->
|
<!-- <SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>-->
|
||||||
</div>
|
</div>
|
||||||
@ -134,10 +187,12 @@
|
|||||||
import { delPmsProduct, listPmsProduct } from '@/api/pms/product';
|
import { delPmsProduct, listPmsProduct } from '@/api/pms/product';
|
||||||
import { isStarRepo } from '@/utils/is-star-plugin';
|
import { isStarRepo } from '@/utils/is-star-plugin';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import AddressSelector from '@/views/components/AddressSelector/index.vue';
|
||||||
|
import { editUserData } from '@/api/ums/member.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PmsProduct',
|
name: 'PmsProduct',
|
||||||
components: {},
|
components: { AddressSelector },
|
||||||
dicts: ['pms_publish_status'],
|
dicts: ['pms_publish_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -158,6 +213,22 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 商品信息表格数据
|
// 商品信息表格数据
|
||||||
pmsProductList: [],
|
pmsProductList: [],
|
||||||
|
productModalInfo: {
|
||||||
|
open: false,
|
||||||
|
data: {}
|
||||||
|
},
|
||||||
|
productEditRules: {
|
||||||
|
nickname: [{ required: true, message: '昵称不能为空', trigger: 'blur' }],
|
||||||
|
/*password: [{ required: true, message: '密码不能为空', trigger: 'blur' }],*/
|
||||||
|
/* address: [{ required: true, message: '地址不能为空', trigger: 'change' }],*/
|
||||||
|
/* avatar: [{ required: true, message: '头像不能为空', trigger: 'change' }],*/
|
||||||
|
/* gendor: [{ required: true, message: '性别不能为空', trigger: 'change' }],*/
|
||||||
|
birthday: [{ required: true, message: '生日不能为空', trigger: 'change' }],
|
||||||
|
level: [{ required: true, message: '用户等级不能为空', trigger: 'blur' }],
|
||||||
|
integral: [{ required: true, message: '积分不能为空', trigger: 'blur' }],
|
||||||
|
/* email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }],*/
|
||||||
|
phone: [{ required: true, pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur' }]
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -191,6 +262,40 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
submitEditProduct() {
|
||||||
|
this.$refs['editForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const { fullArea } = this.userAccountEditModal.data || {};
|
||||||
|
const params = {
|
||||||
|
...this.userAccountEditModal.data
|
||||||
|
};
|
||||||
|
if (fullArea && fullArea.length) {
|
||||||
|
const [province = '', city = '', district = ''] = fullArea;
|
||||||
|
params.province = province;
|
||||||
|
params.city = city;
|
||||||
|
params.district = district;
|
||||||
|
}
|
||||||
|
editUserData(params).then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.closeEditUser();
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
closeEditProduct() {
|
||||||
|
this.productModalInfo = {
|
||||||
|
open: false,
|
||||||
|
data: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 编辑商品详情弹框
|
||||||
|
showProductEditModal(record) {
|
||||||
|
this.productModalInfo = {
|
||||||
|
data: { ...record, gender: String(record.gender) } || {},
|
||||||
|
open: true
|
||||||
|
};
|
||||||
|
},
|
||||||
async confirmOk(success) {
|
async confirmOk(success) {
|
||||||
if (success) {
|
if (success) {
|
||||||
const res = await isStarRepo(
|
const res = await isStarRepo(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user