B2C代码提交

This commit is contained in:
RyanRan
2024-10-20 21:43:59 +08:00
parent ef7d3d7a1a
commit f2491124d1
28 changed files with 866 additions and 372 deletions

View File

@@ -10,10 +10,12 @@ import { getBaseSite } from "@/api/common.js";
export default {
name: "App",
mounted() {
this.init();
},
methods:{
init(){
if(!storage.getItem("siteName")||!storage.getItem("logoImg")||!storage.getItem("sitelogo_expiration_time")) {
this.getSite();
}else{
@@ -33,6 +35,7 @@ export default {
}
},
getSite(){
//获取基本站点信息
getBaseSite().then((res) => {

View File

@@ -10,6 +10,19 @@ export function getVerifyImg (verificationEnums) {
needToken: false
});
}
export function getImSetting(params) {
return request({
url: `/buyer/other/setting/get/IM_SETTING`,
method: Method.GET,
needToken: true,
params,
});
}
/**
* 验证码校验
*/

View File

@@ -527,3 +527,44 @@ export function getGoodsDistribution (distributionId) {
needToken: true
});
}
/**
* 获取会员发票抬头列表
*/
export function getMemberReceiptList (params) {
return request({
url: `/buyer/wallet/receipt`,
method: Method.GET,
needToken: true,
params
});
}
/**
* 保存会员发票抬头
*/
export function setMemberReceiptList (params) {
return request({
url: `/buyer/wallet/receipt`,
method: Method.POST,
needToken: true,
data:params
});
}
/**
* 保存会员发票抬头
*/
export function delMemberReceipt(id) {
return request({
url: `/buyer/wallet/receipt/${id}`,
method: Method.DELETE,
needToken: true,
params:{id},
headers: {
"Content-Type": "application/x-www-form-urlencoded",
}
});
}

View File

@@ -6,11 +6,11 @@
</p>
<!-- 普通发票 -->
<div class="nav-content">
<Form :model="invoiceForm" ref="form" label-position="left" :rules="ruleInline" :label-width="110">
<Form :model="invoiceForm" ref="form" label-position="left" :label-width="110">
<FormItem label="发票类型">
<RadioGroup v-model="invoice" type="button" button-style="solid">
<Radio @on-change="changeInvoice" :label="1">电子普通发票</Radio>
<Radio :label="2" :disabled="true">增值税专用发票</Radio>
<Radio :label="2" >增值税专用发票</Radio>
</RadioGroup>
</FormItem>
<FormItem label="发票抬头">
@@ -24,10 +24,46 @@
</FormItem>
<FormItem label="单位名称" v-if="type === 2" prop="receiptTitle">
<i-input v-model="invoiceForm.receiptTitle"></i-input>
<Poptip ref="poptip" placement="right" width="300">
<div class="global_color">选择其他发票抬头</div>
<div slot="content">
<Spin fix v-if="delReceiptLoad"></Spin>
<div class="receipt-content">
<div class="flex receipt-item" v-for="item in receiptList" :key="item.id" >
<div @click="chooseReceipt(item)">
<div class="receipt-title">{{ item.receiptTitle }}</div>
<div>{{ item.taxpayerId }}</div>
</div>
<div class="global_color" @click="delReceipt(item.id)">
删除
</div>
</div>
</div>
<div style="text-align: right;">
<Page :total="total" @on-change="changePage"
:current="searchParams.pageNumber" :page-size="searchParams.pageSize" size="small" />
</div>
</div>
</Poptip>
</FormItem>
<FormItem label="纳税人识别号" v-if="type === 2" prop="taxpayerId">
<i-input v-model="invoiceForm.taxpayerId"></i-input>
</FormItem>
<div v-if="type === 2" class="more" @click="showMore = !showMore">更多选填项</div>
<div v-if="showMore">
<FormItem label="单位地址" v-if="type === 2" prop="address">
<i-input v-model="invoiceForm.address"></i-input>
</FormItem>
<FormItem label="单位电话" v-if="type === 2" prop="mobile">
<i-input v-model="invoiceForm.mobile"></i-input>
</FormItem>
<FormItem label="开户银行" v-if="type === 2" prop="bank">
<i-input v-model="invoiceForm.bank"></i-input>
</FormItem>
<FormItem label="银行账号" v-if="type === 2" prop="bankNumber">
<i-input v-model="invoiceForm.bankNumber"></i-input>
</FormItem>
</div>
<FormItem label="发票内容">
<RadioGroup v-model="invoiceForm.receiptContent" type="button" button-style="solid">
<Radio label="商品明细">商品明细</Radio>
@@ -36,8 +72,10 @@
</FormItem>
</Form>
<div style="text-align: center">
<Button type="primary" :loading="loading" @click="submit">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button>
<Button type="primary" class="mr_10" :loading="loading" @click="submit">保存发票信息</Button>
<Button type="default" @click="invoiceAvailable = false">取消</Button>
</div>
</div>
</Modal>
@@ -45,11 +83,15 @@
</template>
<script>
import { receiptSelect } from '@/api/cart.js';
import { TINumber } from '@/plugins/RegExp.js';
import { getMemberReceiptList ,setMemberReceiptList,delMemberReceipt } from '@/api/member.js';
export default {
name: 'invoiceModal',
data () {
return {
receiptList:[],
showMore:false,
delReceiptLoad:false,
invoice: 1, // 发票类型
invoiceAvailable: false, // 模态框显隐
loading: false, // 提交状态
@@ -59,17 +101,36 @@ export default {
taxpayerId: '', // 纳税人识别号
receiptContent: '商品明细' // 发票内容
},
isDefault:false,
type: 1, // 1 个人 2 单位
ruleInline: {
taxpayerId: [
{ required: true, message: '请填写纳税人识别号' },
{ pattern: TINumber, message: '请填写正确的纳税人识别号' }
]
}
searchParams:{
pageNumber:1,
pageSize:5
},
total:0,
};
},
props: ['invoiceData'],
watch: {
type(val){
if(val === 2 && !this.invoiceForm.receiptTitle){
// 查找默认的发票抬头
const defaultValue = this.receiptList.find(item => item.isDefault === 1)
if(!defaultValue){
this.invoiceForm.receiptTitle = this.receiptList[0].receiptTitle
this.invoiceForm.taxpayerId = this.receiptList[0].taxpayerId
}else{
this.invoiceForm.receiptTitle = defaultValue.receiptTitle
this.invoiceForm.taxpayerId = defaultValue.taxpayerId
}
}
},
invoiceAvailable(val){
if(val){
this.getReceiptList()
}
},
// 回显的发票信息
invoiceData: {
handler (val) {
@@ -85,7 +146,40 @@ export default {
immeadite: true
}
},
mounted () {
this.getReceiptList()
},
methods: {
changePage(v){
this.searchParams.pageNumber = v;
this.getReceiptList();
},
getReceiptList () { // 获取抬头列表
getMemberReceiptList(this.searchParams).then(res => {
if (res.success) {
const list = res.result.records;
this.receiptList = list;
this.total = res.result.total
}
})
},
async delReceipt(id){
try {
this.delReceiptLoad = true
const res = await delMemberReceipt(id)
this.delReceiptLoad = false
if(res.success){
if(this.searchParams.pageNumber !==1 && this.total - 1 < this.searchParams.pageNumber * this.searchParams.pageSize){
this.searchParams.pageNumber = this.searchParams.pageNumber - 1
}
this.$Message.success('删除成功')
this.getReceiptList()
}
} catch (error) {
this.delReceiptLoad = false
}
},
/**
* 选择发票抬头
*/
@@ -94,12 +188,16 @@ export default {
this.type = val;
});
},
chooseReceipt(val){
this.$refs.poptip.visible = false
this.invoiceForm.receiptTitle = val.receiptTitle
this.invoiceForm.taxpayerId = val.taxpayerId
},
/**
* 保存判断
*/
save () {
let flage = true;
let flag = true;
// 保存分为两种类型,个人以及企业
const { receiptTitle } = JSON.parse(
@@ -108,31 +206,35 @@ export default {
// 判断是否填写发票抬头
if (!receiptTitle) {
this.$Message.error('请填写发票抬头!');
flage = false;
flag = false;
return false;
}
if (this.type === 2) {
this.$refs.form.validate((valid) => {
if (!valid) {
flage = false;
flag = false;
}
});
} else {
delete this.invoiceForm.taxpayerId;
}
return flage;
return flag;
},
// 保存发票信息
async submit () {
if (this.save()) {
this.loading = true;
let submit = {
way: this.$route.query.way,
...this.invoiceForm
};
// 存储到发票列表中
await setMemberReceiptList({...submit,isDefault:this.isDefault ? 1 : 0})
this.loading = true;
let receipt = await receiptSelect(submit);
if (receipt.success) {
this.$emit('change', true);
}
@@ -156,9 +258,33 @@ export default {
color: $theme_color;
}
}
.global_color{
cursor: pointer;
}
.receipt-item{
justify-content: space-between;
align-items: center;
padding:8px 16px;
cursor: pointer;
line-height: 1.5;
border-bottom: 1px solid #ededed;
}
.receipt-content{
height: 280px;
}
.nav-content {
width: 500px;
margin: 10px auto;
}
.more{
text-align: center;
color: $theme_color;
margin-bottom: 20px;
cursor: pointer;
}
/deep/ .ivu-input{
width: 280px !important;
}
</style>

View File

@@ -3,7 +3,7 @@
</template>
<script>
import { getIMDetail } from "@/api/common";
import { getIMDetail ,getImSetting} from "@/api/common";
import Storage from "@/plugins/storage";
import { getMemberMsg } from "@/api/login";
export default {
@@ -40,9 +40,15 @@ export default {
},
// 获取im信息
async getIMDetailMethods() {
let res = await getIMDetail();
// 获取pc im
// let res = await getImSetting();
// if (res.success) {
// this.IMLink = res.result.qrCode
// }
let res = await getImSetting();
if (res.success) {
this.IMLink = res.result;
window.open(res.result.url);
// this.IMLink = res.result.qrCode;
}
},
},

View File

@@ -13,7 +13,7 @@
<div class="store-collect" v-if="!takeDownSale">
<span class="mr_10" v-if="goodsMsg.data">
</span>
<span class="ml_10" @click="IMService(goodsMsg.data.storeId,goodsMsg.data.goodsId,goodsMsg.data.id)">联系客服</span>
<span class="ml_10" @click="getIMDetailMethods()">联系客服</span>
</div>
</div>
</div>
@@ -29,6 +29,12 @@
<Button size="small" @click="target('goodsList')">返回商品列表</Button>
</div>
</empty>
<Modal title="扫码联系客服" hide-footer v-model="showQrCode">
<div class="img">
<img :src="IMLink" alt="">
</div>
</Modal>
<Spin size="large" fix v-if="isLoading"></Spin>
<BaseFooter></BaseFooter>
</div>
@@ -61,16 +67,19 @@ export default {
mixins: [imTalk],
data () {
return {
showQrCode:false,
goodsMsg: {}, // 商品信息
isLoading: false, // 加载状态
categoryBar: [], // 分类
storeCollected: false, // 商品收藏
storeMsg: {}, // 店铺信息
takeDownSale:false, // 是否下架
IMLink:"",
// qrCode:""
};
},
methods: {
// 跳转首页或商品页面
target(url){
this.$router.push({path: url})
@@ -223,4 +232,11 @@ export default {
margin:10px 0
}
.img{
text-align: center;
>img{
width: 200px;
height: 200px;
}
}
</style>

View File

@@ -43,7 +43,7 @@
</div>
</div>
<div>
<div class="btns">
<!-- 订单基础操作 -->
<Button @click="goDetail(order.sn)" type="info" size="small">售后详情</Button>
<Button @click="openModal(order)"
@@ -354,4 +354,10 @@ export default {
.modal-goods {
padding: 5px;
}
.btns{
>*{
margin: 4px 0;
}
}
</style>

View File

@@ -60,7 +60,7 @@
</div>
</div>
<div>
<div class="btns">
<!-- 订单基础操作 -->
<Button @click="orderDetail(order.sn)" type="info" size="small">订单详情</Button>
<Button @click="handleCancelOrder(order.sn)" type="error" v-if="order.allowOperationVO.cancel" size="small">取消订单</Button>
@@ -382,4 +382,9 @@ export default {
}
}
}
.btns{
>*{
margin: 4px 0;
}
}
</style>

View File

@@ -9,6 +9,7 @@ Vue.use(Vuex);
export default new Vuex.Store({
state: {
imQrCode: '',
navList: [], // 首页快捷导航
cartNum: storage.getItem('cartNum') || 0,
logoImg: storage.getItem('logoImg') || require('@/assets/images/logo2.png'),

Binary file not shown.

Binary file not shown.

View File

@@ -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) => {

View File

@@ -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: "店铺详细",

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 {

View File

@@ -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)">

View File

@@ -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;

View File

@@ -64,12 +64,7 @@ export default {
minWidth: 180,
tooltip: true,
},
{
title: "店铺名称",
key: "storeName",
minWidth: 100,
tooltip: true,
},
{
title: "支付方式",
key: "paymentMethod",

View File

@@ -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;

View File

@@ -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 : "";

View File

@@ -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>

View File

@@ -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() {

View File

@@ -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: "请输入正整数" },

View File

@@ -217,11 +217,7 @@ export default {
key: "points",
width: 100,
},
{
title: "所属店铺",
key: "storeName",
width: 100,
},
{
title: "活动开始时间",
slot: "startTime",

View File

@@ -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>

View File

@@ -60,7 +60,7 @@ export default {
//阿里短信配置
{
type: "IM_SETTING",
name: "客服设置",
name: "企业微信客服设置",
},
{
type: "DELIVERY_SETTING",

View File

@@ -5,7 +5,6 @@
</Card>
<Modal v-model="openModal" :title="openModalTitle" @on-ok="submit" @on-cancel="cancelModal">
<h3 style="color: #ff3c2a; margin-bottom: 10px">是否需要电子面单</h3>
<ButtonGroup style="margin-bottom: 10px;">
<Button :type="faceSheetForm.faceSheetFlag ? 'primary' : 'default'"
@click="faceSheetForm.faceSheetFlag = true">需要</Button>