mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
B2C代码提交
This commit is contained in:
BIN
manager/public/static/instructions.xlsx
Normal file
BIN
manager/public/static/instructions.xlsx
Normal file
Binary file not shown.
BIN
manager/public/static/logisticsType.xlsx
Normal file
BIN
manager/public/static/logisticsType.xlsx
Normal file
Binary file not shown.
@@ -42,6 +42,11 @@ export const afterSaleOrderDetail = (sn) => {
|
||||
export const afterSaleSellerReview = (sn, params) => {
|
||||
return putRequest(`/order/afterSale/review/${sn}`, params)
|
||||
}
|
||||
//查询包裹列表
|
||||
export const getPackage = (orderSn) => {
|
||||
return getRequest(`/order/order/getPackage/${orderSn}`);
|
||||
}
|
||||
|
||||
|
||||
// 商家确认收货
|
||||
export const afterSaleSellerConfirm = (sn, params) => {
|
||||
|
||||
@@ -69,6 +69,12 @@ export const otherRouter = {
|
||||
name: "shop",
|
||||
component: () => import("@/views/seller/shop/shopList.vue")
|
||||
},
|
||||
{
|
||||
path: "shipTemplate",
|
||||
title: "自提点设置",
|
||||
name: "shipTemplate",
|
||||
component: () => import("@/views/logistics/shipTemplate.vue")
|
||||
},
|
||||
{
|
||||
path: "shop-detail",
|
||||
title: "店铺详细",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<a @click="gotoBack">发布商品</a>
|
||||
</div>
|
||||
<div>
|
||||
2、进入卖家中心,管理
|
||||
2、管理
|
||||
<a @click="gotoGoodsList">商品列表</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
methods: {
|
||||
// 跳转商品列表
|
||||
gotoGoodsList() {
|
||||
this.$router.push({name: "goods"});
|
||||
this.$router.push({name: "managerGoods"});
|
||||
},
|
||||
// 刷新页面
|
||||
gotoBack() {
|
||||
@@ -35,4 +35,4 @@ export default {
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./addGoods.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -4,56 +4,72 @@
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="add" type="primary">添加</Button>
|
||||
</Row>
|
||||
<Table
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
ref="table"
|
||||
>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||
<!-- 页面展示 -->
|
||||
<template slot="disableSlot" slot-scope="{row}">
|
||||
<i-switch size="large" :true-value="true" :false-value="false" :value="row.switch" @on-change="changeSwitch(row)">
|
||||
<i-switch size="large" :true-value="true" :false-value="false" :value="row.switch"
|
||||
@on-change="changeSwitch(row)">
|
||||
<span slot="open">开启</span>
|
||||
<span slot="close">禁用</span>
|
||||
</i-switch>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
:total="total"
|
||||
:page-size="searchForm.pageSize"
|
||||
@on-change="changePage"
|
||||
@on-page-size-change="changePageSize"
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
size="small"
|
||||
show-total
|
||||
show-elevator
|
||||
show-sizer
|
||||
></Page>
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
||||
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
|
||||
show-sizer></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<Modal
|
||||
:title="modalTitle"
|
||||
v-model="modalVisible"
|
||||
:mask-closable="false"
|
||||
:width="500"
|
||||
>
|
||||
<Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500">
|
||||
<Form ref="form" :model="form" :label-width="120" :rules="formValidate">
|
||||
<FormItem label="物流公司名称" prop="name">
|
||||
<Input v-model="form.name" clearable style="width: 100%"/>
|
||||
<Input v-model="form.name" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="物流公司代码" prop="code">
|
||||
<Input v-model="form.code" clearable style="width: 100%"/>
|
||||
<Input v-model="form.code" clearable style="width: 100%" />
|
||||
</FormItem>
|
||||
<FormItem label="支持电子面单">
|
||||
<i-switch v-model="form.standBy" size="large">
|
||||
<i-switch v-model="form.standBy" size="large">
|
||||
<span slot="open">开</span>
|
||||
<span slot="close">关</span>
|
||||
</i-switch>
|
||||
</FormItem>
|
||||
|
||||
<Card v-if="form.standBy === true" class="modalStyle">
|
||||
<h3 style="color: #ff3c2a; margin-bottom: 10px">请输入详细信息</h3>
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="faceSheetForm"
|
||||
:rules="ruleValidate">
|
||||
<FormItem label="customerName" prop="customerName">
|
||||
<Input v-model="faceSheetForm.customerName" type="text" class="faceSheetInput"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="customerPwd" prop="customerPwd">
|
||||
<Input v-model="faceSheetForm.customerPwd" type="text" class="faceSheetInput"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="monthCode" prop="monthCode">
|
||||
<Input v-model="faceSheetForm.monthCode" type="text" class="faceSheetInput"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="sendSite" prop="sendSite">
|
||||
<Input v-model="faceSheetForm.sendSite" type="text" class="faceSheetInput"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="sendStaff" prop="sendStaff">
|
||||
<Input v-model="faceSheetForm.sendStaff" type="text" class="faceSheetInput"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="支付方式" prop="payType">
|
||||
<Select v-model="faceSheetForm.payType" class="faceSheetInput">
|
||||
<Option value="1">现付</Option>
|
||||
<Option value="2">到付</Option>
|
||||
<Option value="3">月结</Option>
|
||||
<Option value="4">第三方支付(仅SF支持)</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<FormItem label="快递类型" prop="expType">
|
||||
<Input v-model="faceSheetForm.expType" type="text" class="faceSheetInput" />
|
||||
</FormItem>
|
||||
<div style="width:100%;text-align:center;">
|
||||
<a style="padding-right: 20px" @click="frontDownload('use')">使用说明</a>
|
||||
<a @click="frontDownload('type')">快递类型</a>
|
||||
</div>
|
||||
</Form>
|
||||
</Card>
|
||||
<!-- <FormItem label="禁用状态" prop="disabled">
|
||||
|
||||
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
|
||||
@@ -64,255 +80,303 @@
|
||||
</Form>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||
>提交
|
||||
</Button
|
||||
>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交
|
||||
</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getLogisticsPage,
|
||||
updateLogistics,
|
||||
addLogistics,
|
||||
delLogistics,
|
||||
} from "@/api/logistics";
|
||||
import {
|
||||
getLogisticsPage,
|
||||
updateLogistics,
|
||||
addLogistics,
|
||||
delLogistics,
|
||||
} from "@/api/logistics";
|
||||
|
||||
export default {
|
||||
name: "logistics",
|
||||
data() {
|
||||
return {
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
name: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
disabled:"OPEN"
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入物流公司名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
columns: [
|
||||
export default {
|
||||
name: "logistics",
|
||||
data() {
|
||||
return {
|
||||
faceSheetForm: {
|
||||
faceSheetFlag: true,
|
||||
customerName: "",
|
||||
payType: '1',
|
||||
expType: '1',
|
||||
customerPwd: "",
|
||||
monthCode: "",
|
||||
sendSite: "",
|
||||
sendStaff: "",
|
||||
},
|
||||
ruleValidate: {
|
||||
// customerName: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
// payType: [{ required: true, message: "请填写必填项" ,trigger: "change" }],
|
||||
// expType: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
// customerPwd: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
// monthCode: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
// sendSite: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
// sendStaff: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
|
||||
},
|
||||
openText: false,
|
||||
loading: true, // 表单加载状态
|
||||
modalVisible: false, // 添加或编辑显示
|
||||
modalTitle: "", // 添加或编辑标题
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
pageNumber: 1, // 当前页数
|
||||
pageSize: 20, // 页面大小
|
||||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
name: "",
|
||||
},
|
||||
form: {
|
||||
// 添加或编辑表单对象初始化数据
|
||||
name: "",
|
||||
disabled: "OPEN"
|
||||
},
|
||||
// 表单验证规则
|
||||
formValidate: {
|
||||
name: [
|
||||
{
|
||||
title: "物流公司名称",
|
||||
key: "name",
|
||||
minWidth: 120,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
title: "物流公司编码",
|
||||
key: "code",
|
||||
minWidth: 120,
|
||||
sortable: false,
|
||||
},
|
||||
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
width: 180,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"修改"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
]);
|
||||
},
|
||||
required: true,
|
||||
message: "请输入物流公司名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入物流公司代码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
columns: [
|
||||
{
|
||||
title: "物流公司名称",
|
||||
key: "name",
|
||||
minWidth: 120,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
title: "物流公司编码",
|
||||
key: "code",
|
||||
minWidth: 120,
|
||||
sortable: false,
|
||||
},
|
||||
|
||||
{
|
||||
title: "创建时间",
|
||||
key: "createTime",
|
||||
width: 180,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
align: "center",
|
||||
width: 150,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.detail(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"修改"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.remove(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"删除"
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
total: 0, // 表单数据总数
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
frontDownload(val) {
|
||||
var a = document.createElement("a"); //创建一个<a></a>标签
|
||||
//根据点击按钮来下载不同文件
|
||||
if (val === 'use') {
|
||||
a.href = "static/instructions.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = "使用说明.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
} else if (val === 'type') {
|
||||
a.href = "static/logisticsType.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = "快递类型.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
}
|
||||
a.style.display = "none"; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a); // 将a标签追加到文档对象中
|
||||
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove(); // 一次性的,用完就删除a标签
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
// 初始化
|
||||
init() {
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页码
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
// 获取列表
|
||||
getDataList() {
|
||||
this.loading = true;
|
||||
|
||||
getLogisticsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) {
|
||||
const data = res.result.records;
|
||||
data.forEach(e => {
|
||||
e.switch = e.disabled === 'OPEN' ? true : false;
|
||||
e.standBy = e.standBy == 'null' || !e.standBy ? false : true;
|
||||
});
|
||||
this.data = data;
|
||||
console.log(data)
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
getLogisticsPage(this.searchForm).then((res) => {
|
||||
this.loading = false;
|
||||
},
|
||||
// switch 切换状态
|
||||
changeSwitch (v) {
|
||||
this.form.name = v.name;
|
||||
this.form.code = v.code;
|
||||
this.form.standBy = v.standBy;
|
||||
if (res.success) {
|
||||
const data = res.result.records;
|
||||
data.forEach(e => {
|
||||
e.switch = e.disabled === 'OPEN' ? true : false;
|
||||
e.standBy = e.standBy == 'null' || !e.standBy ? false : true;
|
||||
});
|
||||
this.data = data;
|
||||
console.log(data)
|
||||
this.total = res.result.total;
|
||||
}
|
||||
});
|
||||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
// switch 切换状态
|
||||
changeSwitch(v) {
|
||||
this.form.name = v.name;
|
||||
this.form.code = v.code;
|
||||
this.form.standBy = v.standBy;
|
||||
|
||||
this.form.disabled = v.disabled === 'CLOSE' ? 'OPEN' : 'CLOSE';
|
||||
updateLogistics(v.id, this.form).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认提交
|
||||
handleSubmit() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitLoading = true;
|
||||
this.form.disabled = v.disabled === 'CLOSE' ? 'OPEN' : 'CLOSE';
|
||||
updateLogistics(v.id, this.form).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认提交
|
||||
handleSubmit() {
|
||||
console.log('1', 1)
|
||||
this.$refs.form.validate((valid) => {
|
||||
console.log(valid)
|
||||
if (valid) {
|
||||
// this.submitLoading = true;
|
||||
console.log(params, 'params', { ...this.form, ...this.faceSheetForm })
|
||||
|
||||
if (this.modalTitle == "添加") {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete this.form.id;
|
||||
this.form.disabled = 'OPEN'
|
||||
const params = { ...this.form, ...this.faceSheetForm }
|
||||
|
||||
console.log(params, 'params')
|
||||
if (this.modalTitle == "添加") {
|
||||
// 添加 避免编辑后传入id等数据 记得删除
|
||||
delete params.id;
|
||||
params.disabled = 'OPEN'
|
||||
|
||||
addLogistics(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.form.disabled = 'OPEN'
|
||||
// 编辑
|
||||
updateLogistics(this.id, this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加信息
|
||||
add() {
|
||||
this.modalTitle = "添加";
|
||||
this.form = {};
|
||||
this.$refs.form.resetFields();
|
||||
|
||||
this.modalVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
detail(v) {
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
|
||||
this.form.name = v.name;
|
||||
this.form.code = v.code;
|
||||
console.log(v)
|
||||
this.form.standBy = v.standBy;
|
||||
|
||||
|
||||
|
||||
|
||||
// this.form.disabled = v.disabled
|
||||
this.form.disabled = 'OPEN'
|
||||
},
|
||||
// 删除物流公司
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delLogistics(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
addLogistics(params).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
} else {
|
||||
params.disabled = 'OPEN'
|
||||
// 编辑
|
||||
updateLogistics(this.id, params).then((res) => {
|
||||
this.submitLoading = false;
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
this.modalVisible = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
// 添加信息
|
||||
add() {
|
||||
this.modalTitle = "添加";
|
||||
this.form = {};
|
||||
this.$refs.form.resetFields();
|
||||
this.faceSheetForm = {};
|
||||
this.modalVisible = true;
|
||||
},
|
||||
};
|
||||
// 编辑
|
||||
detail(v) {
|
||||
this.id = v.id;
|
||||
this.modalTitle = "修改";
|
||||
this.modalVisible = true;
|
||||
|
||||
this.form.name = v.name;
|
||||
this.form.code = v.code;
|
||||
this.$set(this.form, 'standBy', v.standBy);
|
||||
|
||||
|
||||
console.log(v)
|
||||
|
||||
|
||||
// this.form.disabled = v.disabled
|
||||
this.form.disabled = 'OPEN'
|
||||
},
|
||||
// 删除物流公司
|
||||
remove(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
// 记得确认修改此处
|
||||
content: "您确认要删除 " + v.name + " ?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
// 删除
|
||||
delLogistics(v.id).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("操作成功");
|
||||
this.getDataList();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<Card class="mb_10">
|
||||
<h2 class="mb_10">运费模版</h2>
|
||||
<shipTemplate />
|
||||
</Card>
|
||||
<Card>
|
||||
<h2 class="mb_10">物流公司</h2>
|
||||
<company />
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import company from './company.vue'
|
||||
import shipTemplate from './shipTemplate.vue';
|
||||
export default {
|
||||
components: {
|
||||
company,
|
||||
shipTemplate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="message-con">
|
||||
<Button type="default" class="mr_10" @click="navigateTo('pickup')">自提点设置</Button>
|
||||
<Button type="default" class="mr_10" @click="navigateTo('pickup')">自提点设置</Button>
|
||||
<Button type="default" class="mr_10" @click="navigateTo('shipTemplate')">运费模版设置</Button>
|
||||
<Dropdown trigger="click">
|
||||
|
||||
<a href="javascript:void(0)">
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
>
|
||||
退款
|
||||
</Button>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -247,6 +248,12 @@
|
||||
>
|
||||
查询物流
|
||||
</Button>
|
||||
<Button type="info" :loading="submitLoading" @click="sellerConfirmSubmit('PASS')" style="margin-left: 5px" v-if="afterSaleInfo.afterSaleAllowOperationVO.rog">
|
||||
确认收货
|
||||
</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="sellerConfirmSubmit('REFUSE')" style="margin-left: 5px" v-if="afterSaleInfo.afterSaleAllowOperationVO.rog">
|
||||
拒收
|
||||
</Button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
@@ -367,6 +374,33 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//商家确认收货
|
||||
sellerConfirmSubmit(type) {
|
||||
let title = "确认收货";
|
||||
let content = "请确认已经收到退货货物?";
|
||||
let message = "收货成功";
|
||||
if (type !== "PASS") {
|
||||
title = "确认拒收";
|
||||
content = "确认拒收此货物?";
|
||||
message = "拒收成功";
|
||||
this.params.serviceStatus = "REFUSE";
|
||||
}
|
||||
|
||||
this.$Modal.confirm({
|
||||
title: title,
|
||||
content: content,
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
API_Order.afterSaleSellerConfirm(this.sn, this.params).then((res) => {
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success(message);
|
||||
this.getDetail();
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获取售后详情
|
||||
getDetail() {
|
||||
this.loading = true;
|
||||
|
||||
@@ -64,12 +64,7 @@ export default {
|
||||
minWidth: 180,
|
||||
tooltip: true,
|
||||
},
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 100,
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "支付方式",
|
||||
key: "paymentMethod",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<Button v-if="allowOperation.cancel" @click="orderCancel" type="warning" ghost>订单取消</Button>
|
||||
<Button v-if="orderInfo.order.orderStatus === 'UNPAID'" @click="confirmPrice" type="primary">收款</Button>
|
||||
<Button v-if="allowOperation.ship" @click="groupShip" type="primary">分包裹发货</Button>
|
||||
|
||||
<Button v-if="allowOperation.showLogistics || orderPackage.length > 0" @click="checkLogistics" type="primary">查看物流</Button>
|
||||
<Button v-if="allowOperation.take" @click="orderTake" type="primary">订单核销</Button>
|
||||
<Button @click="modifyRemark" type="primary">添加备注</Button>
|
||||
<Button @click="orderLog" type="info" ghost>订单日志</Button>
|
||||
@@ -741,6 +741,8 @@ export default {
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
logisticsModal: false, //弹出查询物流框
|
||||
orderPackage: [],
|
||||
orderLogColumns: [
|
||||
{
|
||||
title: "操作者",
|
||||
@@ -806,6 +808,40 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
//查询物流
|
||||
checkLogistics () {
|
||||
this.logisticsModal = true;
|
||||
if (this.orderPackage.length > 0) {
|
||||
this.logisticsList();
|
||||
} else {
|
||||
this.logistics();
|
||||
}
|
||||
},
|
||||
|
||||
logisticsList () {
|
||||
this.logisticsModal = true;
|
||||
API_Order.getPackage(this.sn).then((res) => {
|
||||
if (res.success && res.result != null) {
|
||||
this.packageTraceList = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
logistics () {
|
||||
this.logisticsModal = true;
|
||||
API_Order.getTraces(this.sn).then((res) => {
|
||||
if (res.success && res.result != null) {
|
||||
this.logisticsInfo = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
getOrderPackage() {
|
||||
API_Order.getPackage(this.sn).then(res => {
|
||||
if (res.success) {
|
||||
this.orderPackage = res.result;
|
||||
console.log('this.orderPackage',this.orderPackage);
|
||||
}
|
||||
})
|
||||
},
|
||||
modifyRemark () {
|
||||
this.modifyRemarkForm.sellerRemark = this.orderInfo.order.sellerRemark;
|
||||
this.sellerRemarkModal = true;
|
||||
@@ -882,10 +918,11 @@ export default {
|
||||
const res = await API_Order.partDelivery(this.sn, submit);
|
||||
if (res.success) {
|
||||
this.$Message.success("发货成功!");
|
||||
this.groupShipModal = false;
|
||||
this.shipLoading = false;
|
||||
this.getDataList();
|
||||
this.getOrderPackage();
|
||||
this.groupShipModal = false;
|
||||
|
||||
this.groupOrderDeliveryForm = []
|
||||
} else {
|
||||
this.shipLoading = false;
|
||||
|
||||
@@ -63,17 +63,6 @@
|
||||
</Select>
|
||||
</FormItem>
|
||||
|
||||
<FormItem label="店铺承担比例" prop="storeCommission">
|
||||
<Input
|
||||
:disabled="disabled"
|
||||
v-model="form.storeCommission"
|
||||
placeholder="店铺承担比例"
|
||||
style="width: 260px"
|
||||
>
|
||||
<span slot="append">%</span>
|
||||
</Input>
|
||||
<span class="describe">店铺承担比例,输入0-100之间数值</span>
|
||||
</FormItem>
|
||||
<FormItem label="发放数量" prop="publishNum" v-if="form.getType === 'FREE'">
|
||||
<Input
|
||||
:disabled="disabled"
|
||||
@@ -329,10 +318,7 @@ export default {
|
||||
message: "请输入0-10的数字,可有一位小数",
|
||||
},
|
||||
],
|
||||
storeCommission: [
|
||||
{ required: true, message: "请输入店铺承担比例" },
|
||||
{ pattern: regular.rate, message: "请输入0-100的正整数" },
|
||||
],
|
||||
|
||||
publishNum: [
|
||||
{ required: true, message: "请输入发放数量" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
@@ -455,6 +441,7 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = JSON.parse(JSON.stringify(this.form));
|
||||
params.storeCommission = 0
|
||||
// 判断当前活动类型
|
||||
params.getType != "ACTIVITY" ? delete params.effectiveDays : "";
|
||||
|
||||
|
||||
@@ -5,42 +5,51 @@
|
||||
<Table style="margin: 10px 0" border :columns="columns" :data="data"></Table>
|
||||
|
||||
<h4>商品信息</h4>
|
||||
|
||||
|
||||
<Row class="operation" v-if="status == 'manager'">
|
||||
<Button type="primary" @click="openSkuList">选择商品</Button>
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
<Button @click="getDataList" icon="md-refresh">刷新</Button>
|
||||
<Button type="dashed" @click="openTip = !openTip">{{
|
||||
openTip ? "关闭提示" : "开启提示"
|
||||
}}</Button>
|
||||
</Row>
|
||||
<Row v-show="openTip" v-if="status == 'manager'">
|
||||
<Alert show-icon>
|
||||
已选择 <span>{{ selectCount }}</span> 项
|
||||
<a class="select-clear" @click="clearSelectAll">清空</a>
|
||||
</Alert>
|
||||
</Row>
|
||||
<h3 class="act-goods">活动商品</h3>
|
||||
<Table
|
||||
class="mt_10"
|
||||
:loading="loading"
|
||||
border
|
||||
class="operation"
|
||||
:columns="goodsColumns"
|
||||
:data="goodsData"
|
||||
ref="table"
|
||||
sortable="custom"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
<div>
|
||||
<a class="mr_10" @click="linkTo(row.goodsId, row.skuId)">{{
|
||||
row.goodsName
|
||||
}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr
|
||||
:text="wapLinkTo(row.goodsId, row.skuId)"
|
||||
:margin="0"
|
||||
colorDark="#000"
|
||||
colorLight="#fff"
|
||||
:size="150"
|
||||
></vue-qr>
|
||||
</div>
|
||||
<img
|
||||
src="../../../assets/qrcode.svg"
|
||||
style="vertical-align: middle"
|
||||
class="hover-pointer"
|
||||
width="20"
|
||||
height="20"
|
||||
alt=""
|
||||
/>
|
||||
</Poptip>
|
||||
</div>
|
||||
<template slot-scope="{ row, index }" slot="price">
|
||||
<Input
|
||||
v-model="row.price"
|
||||
:disabled="status === 'view'"
|
||||
@input="goodsData[index].price = row.price"
|
||||
/>
|
||||
</template>
|
||||
<template slot-scope="{ index }" slot="action">
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
ghost
|
||||
v-if="status === 'manager'"
|
||||
@click="delGoods(index)"
|
||||
>删除</Button
|
||||
>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
<Page
|
||||
:current="searchForm.pageNumber"
|
||||
@@ -56,19 +65,29 @@
|
||||
></Page>
|
||||
</Row>
|
||||
</Card>
|
||||
<sku-select
|
||||
ref="skuSelect"
|
||||
:goodsData="goodsData"
|
||||
@selectedGoodsData="selectedGoodsData"
|
||||
></sku-select>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPintuanGoodsList, getPintuanDetail } from "@/api/promotion.js";
|
||||
import vueQr from "vue-qr";
|
||||
import { promotionsStatusRender } from "@/utils/promotions";
|
||||
|
||||
import skuSelect from "@/components/lili-dialog";
|
||||
export default {
|
||||
components: {
|
||||
"vue-qr": vueQr,
|
||||
skuSelect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
selectCount:0,
|
||||
status: this.$route.query.status, // 查看还是修改
|
||||
openTip: true, // 显示提示
|
||||
|
||||
loading: false, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
@@ -137,6 +156,72 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectedGoodsData(item) {
|
||||
// 选择商品
|
||||
console.log(item);
|
||||
let list = [];
|
||||
item.forEach((e) => {
|
||||
list.push({
|
||||
goodsName: e.goodsName,
|
||||
price: e.price,
|
||||
originalPrice: e.price,
|
||||
quantity: e.quantity,
|
||||
storeId: e.storeId,
|
||||
sellerName: e.sellerName,
|
||||
thumbnail: e.thumbnail,
|
||||
skuId: e.id,
|
||||
categoryPath: e.categoryPath,
|
||||
goodsId: e.goodsId,
|
||||
goodsType: e.goodsType,
|
||||
});
|
||||
});
|
||||
this.goodsData = list;
|
||||
},
|
||||
changeSelect(e) {
|
||||
// 获取选择数据
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
delGoods(index) {
|
||||
// 删除商品
|
||||
this.goodsData.splice(index, 1);
|
||||
this.selectCount = 0;
|
||||
},
|
||||
clearSelectAll() {
|
||||
// 清空所有已选项
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
|
||||
delAll() {
|
||||
// 批量删除商品
|
||||
if (this.selectCount <= 0) {
|
||||
this.$Message.warning("您还未选择要删除的数据");
|
||||
return;
|
||||
}
|
||||
this.$Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: "您确认要删除所选的 " + this.selectCount + " 条数据?",
|
||||
onOk: () => {
|
||||
let ids = [];
|
||||
this.selectList.forEach(function (e) {
|
||||
ids.push(e.skuId);
|
||||
});
|
||||
this.goodsData = this.goodsData.filter((item) => {
|
||||
return !ids.includes(item.skuId);
|
||||
});
|
||||
this.selectCount = 0;
|
||||
},
|
||||
});
|
||||
},
|
||||
openSkuList() {
|
||||
// 显示商品选择器
|
||||
this.$refs.skuSelect.open("goods");
|
||||
let data = JSON.parse(JSON.stringify(this.goodsData));
|
||||
data.forEach((e) => {
|
||||
e.id = e.skuId;
|
||||
});
|
||||
this.$refs.skuSelect.goodsData = data;
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
@@ -146,6 +231,7 @@ export default {
|
||||
changePage(v) {
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
// 分页 改变页数
|
||||
changePageSize(v) {
|
||||
@@ -188,4 +274,19 @@ h4 {
|
||||
text-align: left;
|
||||
border-left: 3px solid red;
|
||||
}
|
||||
.operation {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.act-goods {
|
||||
margin: 20px 0;
|
||||
font-size: 15px;
|
||||
&::before {
|
||||
content: "|";
|
||||
color: $theme_color;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -53,6 +53,14 @@
|
||||
class="mt_10"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
type="info"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
style="margin-right: 5px"
|
||||
size="small"
|
||||
@click="manage(row, 'manager')"
|
||||
>管理</Button
|
||||
>
|
||||
<Button type="info" size="small" @click="view(row)" style="margin-right: 5px"
|
||||
>查看</Button
|
||||
>
|
||||
@@ -119,12 +127,7 @@ export default {
|
||||
return promotionsStatusRender(h, params);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "所属店铺",
|
||||
key: "storeName",
|
||||
minWidth: 120,
|
||||
tooltip: true,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: "活动开始时间",
|
||||
@@ -142,7 +145,7 @@ export default {
|
||||
title: "操作",
|
||||
slot: "action",
|
||||
align: "center",
|
||||
width: 200,
|
||||
width: 250,
|
||||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
@@ -153,6 +156,11 @@ export default {
|
||||
edit(v){
|
||||
this.$router.push({ name: 'pintuan-create', query: {id:v.id}})
|
||||
|
||||
},
|
||||
|
||||
manage(v, status) {
|
||||
this.$options.filters.customRouterPush({name: "pintuan-goods", query: { id: v.id, status: status }} )
|
||||
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
|
||||
@@ -173,10 +173,7 @@ export default {
|
||||
message: "请输入0-10的数字,可有一位小数",
|
||||
},
|
||||
],
|
||||
sellerCommission: [
|
||||
{ required: true, message: "请输入店铺承担比例" },
|
||||
{ pattern: regular.rate, message: "请输入0-100的正整数" },
|
||||
],
|
||||
|
||||
publishNum: [
|
||||
{ required: true, message: "请输入发放数量" },
|
||||
{ pattern: regular.Integer, message: "请输入正整数" },
|
||||
|
||||
@@ -217,11 +217,7 @@ export default {
|
||||
key: "points",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "所属店铺",
|
||||
key: "storeName",
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
title: "活动开始时间",
|
||||
slot: "startTime",
|
||||
|
||||
@@ -1,29 +1,58 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<Alert>
|
||||
企业微信客服设置提示
|
||||
<template slot="desc">
|
||||
<p>1.移动端需配置客服链接地址和企业id <a href="https://work.weixin.qq.com/nl/act/p/a733314375294bdd" target="blank">查看如何配置</a>
|
||||
</p>
|
||||
<p>2.PC端需配置企业微信客服二维码</p>
|
||||
|
||||
</template>
|
||||
</Alert>
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||
<FormItem label="云IM地址" prop="httpUrl">
|
||||
<Input v-model="formValidate.httpUrl"/>
|
||||
<span class="desc">配置买家端联系客服以及商家端登录客服跳转的路径</span>
|
||||
<FormItem label="客服链接" prop="url">
|
||||
<Input v-model="formValidate.url" />
|
||||
</FormItem>
|
||||
<FormItem label="企业ID" prop="companyId">
|
||||
<Input v-model="formValidate.companyId" />
|
||||
</FormItem>
|
||||
<!-- <FormItem label="客服二维码" prop="qrCode">
|
||||
<div class="label-item-upload">
|
||||
<img v-if="formValidate.qrCode" class="img" :src="formValidate.qrCode" />
|
||||
<img v-else class="img" src="../../../../assets/emptyImg.png" alt="">
|
||||
<Button style @click="onClickImg('qrCode')">选择图片</Button>
|
||||
</div>
|
||||
</FormItem> -->
|
||||
|
||||
<div class="label-btns">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
</div>
|
||||
</Form>
|
||||
<Modal width="1200px" v-model="picModelFlag">
|
||||
<ossManage @callback="callbackSelected" :isComponent="true" :initialize="picModelFlag" ref="ossManage" />
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {setSetting} from "@/api/index";
|
||||
import {handleSubmit} from "./validate";
|
||||
import { setSetting } from "@/api/index";
|
||||
import { handleSubmit } from "./validate";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
|
||||
export default {
|
||||
components:{ossManage},
|
||||
data() {
|
||||
return {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { // 表单数据
|
||||
httpUrl: ""
|
||||
url: "",
|
||||
companyId:"",
|
||||
qrCode:""
|
||||
},
|
||||
result:"",
|
||||
picModelFlag: false, // 预览图片显隐
|
||||
selected: "", // 已选数据
|
||||
|
||||
result: "",
|
||||
};
|
||||
},
|
||||
props: ["res", "type"],
|
||||
@@ -31,6 +60,15 @@ export default {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.formValidate[this.selected] = val.url;
|
||||
},
|
||||
onClickImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 保存
|
||||
submit(name) {
|
||||
let that = this;
|
||||
@@ -52,7 +90,7 @@ export default {
|
||||
init() {
|
||||
this.result = JSON.parse(this.res);
|
||||
|
||||
this.$set(this, "formValidate", {...this.result});
|
||||
this.$set(this, "formValidate", { ...this.result });
|
||||
Object.keys(this.formValidate).forEach((item) => {
|
||||
this.ruleValidate[item] = [
|
||||
{
|
||||
@@ -83,4 +121,22 @@ export default {
|
||||
width: 300px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
.label-item {
|
||||
display: flex;
|
||||
> .ivu-input {
|
||||
width: 200px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
.label-item-upload {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
img {
|
||||
margin-right: 10px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
//阿里短信配置
|
||||
{
|
||||
type: "IM_SETTING",
|
||||
name: "客服设置",
|
||||
name: "企业微信客服设置",
|
||||
},
|
||||
{
|
||||
type: "DELIVERY_SETTING",
|
||||
|
||||
Reference in New Issue
Block a user