mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 17:05:54 +08:00
提b2c部分基础迁移代码
This commit is contained in:
@@ -160,3 +160,8 @@ export const refundLog = (params) => {
|
|||||||
export const storeAddress = (sn) => {
|
export const storeAddress = (sn) => {
|
||||||
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
|
return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 订单核验
|
||||||
|
export const orderTake = (sn, verificationCode) => {
|
||||||
|
return putRequest(`/order/order/take/${sn}/${verificationCode}`);
|
||||||
|
};
|
||||||
|
|||||||
@@ -87,3 +87,11 @@ export const downloadBill = (id) => {
|
|||||||
return getRequest(`/order/bill/downLoad/${id}`, {}, 'blob')
|
return getRequest(`/order/bill/downLoad/${id}`, {}, 'blob')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取物流模版
|
||||||
|
export const getShipTemplate = (id) => {
|
||||||
|
// return getRequest(`/order/bill/shipTemplate`)
|
||||||
|
}
|
||||||
|
|
||||||
|
export const replyMemberComment = (id, params) => {
|
||||||
|
return putRequest(`/member/evaluation/reply/${id}`, params)
|
||||||
|
}
|
||||||
|
|||||||
BIN
manager/src/assets/goodsType1.png
Normal file
BIN
manager/src/assets/goodsType1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
manager/src/assets/goodsType2.png
Normal file
BIN
manager/src/assets/goodsType2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 754 B |
BIN
manager/src/assets/goodsTypeTpl.png
Normal file
BIN
manager/src/assets/goodsTypeTpl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@@ -10,14 +10,7 @@
|
|||||||
{{ item.year + '年' + item.month + '月' }}</Option>
|
{{ item.year + '年' + item.month + '月' }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div class="shop-list" v-if="!closeShop">
|
|
||||||
<Select clearable @on-change="changeshop(selectedWay)" v-model="storeId" placeholder="店铺查询"
|
|
||||||
style="width:200px;margin-left:10px;">
|
|
||||||
<Scroll :on-reach-bottom="handleReachBottom">
|
|
||||||
<Option v-for="(item, index) in shopsData" :value="item.id" :key="index">{{ item.storeName }}</Option>
|
|
||||||
</Scroll>
|
|
||||||
</Select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
222
manager/src/components/map/multiple-region.vue
Normal file
222
manager/src/components/map/multiple-region.vue
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
<template>
|
||||||
|
<Modal :mask-closable="false" :value="switched" v-model="switched" title="选择地址" @on-ok="submit" @on-cancel="cancel">
|
||||||
|
<div class="flex">
|
||||||
|
<Spin size="large" fix v-if="spinShow"></Spin>
|
||||||
|
<Tree ref="tree" class="tree" :data="data" expand-node show-checkbox multiple></Tree>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getAllCity } from "@/api/index";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
switched: false, // 控制模态框显隐
|
||||||
|
spinShow: false, // 加载loading
|
||||||
|
data: [], // 地区数据
|
||||||
|
selectedWay: [], // 选择的地区
|
||||||
|
callBackData: "", // 打开组件的回显数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clear() { // 引用该组件的父组件会调用
|
||||||
|
this.data = [];
|
||||||
|
this.selectedWay = [];
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 关闭
|
||||||
|
*/
|
||||||
|
cancel() {
|
||||||
|
this.switched = false;
|
||||||
|
|
||||||
|
// 关闭的时候所有数据设置成disabled为true
|
||||||
|
this.data.forEach((item) => {
|
||||||
|
this.$set(item, "disabled", false);
|
||||||
|
item.children.forEach((child) => {
|
||||||
|
this.$set(child, "disabled", false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开地图选择器
|
||||||
|
* @param {val} 回调的数据
|
||||||
|
* @param {index} 当前操作的运费模板的索引
|
||||||
|
*/
|
||||||
|
open(val, index) {
|
||||||
|
if (val) {
|
||||||
|
//已选中的地址
|
||||||
|
let checkedData = this.$store.state.shipTemplate;
|
||||||
|
|
||||||
|
let checkData = [];
|
||||||
|
let disabledData = checkedData.filter((item, i) => {
|
||||||
|
if (i != index) {
|
||||||
|
return i != index;
|
||||||
|
} else {
|
||||||
|
checkData.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 选中
|
||||||
|
checkData.forEach((check) => {
|
||||||
|
// 循环出已经选中的地址id
|
||||||
|
check.areaId.split(",").forEach((ids) => {
|
||||||
|
this.data.forEach((item) => {
|
||||||
|
// 如果当前省份下市区全部选中则选中该省份
|
||||||
|
if (check.selectedAll) {
|
||||||
|
check.area.split(",").forEach((area) => {
|
||||||
|
if (area == item.name) {
|
||||||
|
this.$set(item, "checked", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将市区继续循环
|
||||||
|
item.children.forEach((child, childIndex) => {
|
||||||
|
// 判断当前市区是否是已选中状态
|
||||||
|
if (item.checked) {
|
||||||
|
this.$set(child, "checked", true);
|
||||||
|
}
|
||||||
|
if (child.id == ids) {
|
||||||
|
this.$set(child, "checked", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 禁用
|
||||||
|
disabledData.forEach((dis) => {
|
||||||
|
// 循环出已经选中的地址id
|
||||||
|
dis.areaId.split(",").forEach((ids) => {
|
||||||
|
// 循环出省份
|
||||||
|
this.data.forEach((item) => {
|
||||||
|
// 如果当前省份下市区全部选中则禁用该省份
|
||||||
|
if (dis.selectedAll) {
|
||||||
|
dis.area.split(",").forEach((area) => {
|
||||||
|
if (area == item.name) {
|
||||||
|
this.$set(item, "disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 将市区继续循环
|
||||||
|
item.children.forEach((child, childIndex) => {
|
||||||
|
// 判断当前市区是否是已禁用状态
|
||||||
|
if (item.disabled) {
|
||||||
|
this.$set(child, "disabled", true);
|
||||||
|
} else {
|
||||||
|
if (child.id == ids) {
|
||||||
|
this.$set(child, "disabled", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.switched ? (this.switched = true) : (this.switched = true);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交并筛选出省市
|
||||||
|
*/
|
||||||
|
submit() {
|
||||||
|
// 筛选出省市
|
||||||
|
let list = this.$refs.tree.getCheckedAndIndeterminateNodes();
|
||||||
|
|
||||||
|
let sort = [];
|
||||||
|
list.forEach((item, i) => {
|
||||||
|
item.selectedList = [];
|
||||||
|
item.selectedAll = false;
|
||||||
|
// 筛选出当前的省份
|
||||||
|
if (item.level == "province" && !item.disabled) {
|
||||||
|
sort.push({
|
||||||
|
...item,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 筛选出当前选中的市
|
||||||
|
sort.forEach((sortItem, sortIndex) => {
|
||||||
|
if (
|
||||||
|
item.level != "province" &&
|
||||||
|
sortItem.id == item.parentId &&
|
||||||
|
!item.disabled
|
||||||
|
) {
|
||||||
|
sortItem.selectedList.push({
|
||||||
|
...item,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// 判断如果当前省是否全选
|
||||||
|
this.data.forEach((whether) => {
|
||||||
|
sort.forEach((item) => {
|
||||||
|
// 如果当前省匹配
|
||||||
|
if (
|
||||||
|
item.id == whether.id &&
|
||||||
|
item.selectedList.length == whether.children.length
|
||||||
|
) {
|
||||||
|
// 给一个全选子级的标识符
|
||||||
|
item.selectedList.forEach((child) => {
|
||||||
|
this.$set(child, "selectedAll", true);
|
||||||
|
});
|
||||||
|
this.$set(item, "selectedAll", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$emit("selected", sort);
|
||||||
|
|
||||||
|
this.cancel();
|
||||||
|
},
|
||||||
|
// 初始化地区数据
|
||||||
|
init() {
|
||||||
|
getAllCity().then((res) => {
|
||||||
|
if (res.result) {
|
||||||
|
res.result.forEach((item) => {
|
||||||
|
item.children.forEach((child) => {
|
||||||
|
child.title = child.name;
|
||||||
|
});
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
title: item.name,
|
||||||
|
|
||||||
|
...item,
|
||||||
|
};
|
||||||
|
this.data.push(data);
|
||||||
|
|
||||||
|
this.selectedWay.push({ name: data.title, id: data.id });
|
||||||
|
});
|
||||||
|
this.$store.state.regions = this.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.tree {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
.form {
|
||||||
|
flex: 8;
|
||||||
|
}
|
||||||
|
.button-list {
|
||||||
|
margin-left: 80px;
|
||||||
|
> * {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/ .ivu-modal-body {
|
||||||
|
height: 400px !important;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -31,6 +31,13 @@ export const otherRouter = {
|
|||||||
meta: { title: "个人中心" },
|
meta: { title: "个人中心" },
|
||||||
component: () => import("@/views/personal-center/personal-center.vue")
|
component: () => import("@/views/personal-center/personal-center.vue")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "goods-publish",
|
||||||
|
title: "商品发布",
|
||||||
|
name: "goods-publish",
|
||||||
|
meta: { title: "商品发布" },
|
||||||
|
component: () => import("@/views/goods/goodsOperation.vue")
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "change-password",
|
path: "change-password",
|
||||||
title: "修改密码",
|
title: "修改密码",
|
||||||
|
|||||||
@@ -20,12 +20,6 @@
|
|||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
/>
|
/>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="店铺名称">
|
|
||||||
<Select v-model="searchForm.storeId" placeholder="请选择" @on-query-change="searchChange" filterable
|
|
||||||
clearable style="width: 150px">
|
|
||||||
<Option v-for="item in shopList" :value="item.id" :key="item.id">{{ item.storeName }}</Option>
|
|
||||||
</Select>
|
|
||||||
</Form-item>
|
|
||||||
<Form-item label="订单时间">
|
<Form-item label="订单时间">
|
||||||
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间"
|
<DatePicker type="daterange" v-model="timeRange" format="yyyy-MM-dd" placeholder="选择时间"
|
||||||
style="width: 210px"></DatePicker>
|
style="width: 210px"></DatePicker>
|
||||||
@@ -68,7 +62,6 @@
|
|||||||
getDistributionOrder
|
getDistributionOrder
|
||||||
} from "@/api/distribution";
|
} from "@/api/distribution";
|
||||||
import {orderStatusList} from './dataJson'
|
import {orderStatusList} from './dataJson'
|
||||||
import {getShopListData} from '@/api/shops'
|
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -80,7 +73,6 @@
|
|||||||
return {
|
return {
|
||||||
timeRange: [], // 范围时间
|
timeRange: [], // 范围时间
|
||||||
orderStatusList, // 订单状态列表
|
orderStatusList, // 订单状态列表
|
||||||
shopList: [], // 店铺列表
|
|
||||||
distributionId: this.$route.query.id, // 分销id
|
distributionId: this.$route.query.id, // 分销id
|
||||||
loading: true, // 表单加载状态
|
loading: true, // 表单加载状态
|
||||||
searchForm: { // 搜索框初始化对象
|
searchForm: { // 搜索框初始化对象
|
||||||
@@ -109,12 +101,7 @@
|
|||||||
tooltip: true,
|
tooltip: true,
|
||||||
minWidth:80,
|
minWidth:80,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "店铺名称",
|
|
||||||
key: "storeName",
|
|
||||||
minWidth:80,
|
|
||||||
tooltip: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
slot: "distributionOrderStatus",
|
slot: "distributionOrderStatus",
|
||||||
@@ -147,7 +134,6 @@
|
|||||||
// 初始化数据
|
// 初始化数据
|
||||||
init() {
|
init() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
this.getShopList()
|
|
||||||
},
|
},
|
||||||
//分页 改变页码
|
//分页 改变页码
|
||||||
changePage(v) {
|
changePage(v) {
|
||||||
@@ -187,25 +173,7 @@
|
|||||||
this.total = this.data.length;
|
this.total = this.data.length;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
getShopList(val) { // 获取店铺列表 搜索用
|
|
||||||
const params = {
|
|
||||||
pageNumber: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
storeName: ''
|
|
||||||
}
|
|
||||||
if (val) {
|
|
||||||
params.storeName = val;
|
|
||||||
} else {
|
|
||||||
params.storeName = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
getShopListData(params).then(res => {
|
|
||||||
this.shopList = res.result.records
|
|
||||||
})
|
|
||||||
},
|
|
||||||
searchChange(val) { // 店铺搜索,键盘点击回调
|
|
||||||
this.getShopList(val)
|
|
||||||
},
|
|
||||||
filterStatus (status) { // 过滤订单状态
|
filterStatus (status) { // 过滤订单状态
|
||||||
const arr = [
|
const arr = [
|
||||||
{status: 'WAIT_BILL', title: '待结算'},
|
{status: 'WAIT_BILL', title: '待结算'},
|
||||||
|
|||||||
528
manager/src/views/goods/addGoods.scss
Normal file
528
manager/src/views/goods/addGoods.scss
Normal file
@@ -0,0 +1,528 @@
|
|||||||
|
/*选择商品品类*/
|
||||||
|
.content-goods-publish {
|
||||||
|
padding: 15px;
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 0.8em;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
background: none repeat 0 0 #fff;
|
||||||
|
|
||||||
|
/*商品品类*/
|
||||||
|
.goods-category {
|
||||||
|
min-height: 500px;
|
||||||
|
border-radius: 0.8em;
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px;
|
||||||
|
background: #ededed;
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding: 12px 8px;
|
||||||
|
list-style: none;
|
||||||
|
width: 300px;
|
||||||
|
background: none repeat 0 0 #fff;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
||||||
|
border-radius: 0.4em;
|
||||||
|
display: inline-block;
|
||||||
|
letter-spacing: normal;
|
||||||
|
margin-right: 15px;
|
||||||
|
vertical-align: top;
|
||||||
|
word-spacing: normal;
|
||||||
|
|
||||||
|
li {
|
||||||
|
line-height: 20px;
|
||||||
|
padding: 10px 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #333;
|
||||||
|
font-size: 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 当前品类被选中的样式 */
|
||||||
|
.activeClass {
|
||||||
|
border-radius: 0.4em;
|
||||||
|
background-color: rgba($color: $theme_color, $alpha: 0.2);
|
||||||
|
border: 1px solid rgba($color: $theme_color, $alpha: 0.8);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!*当前选择的商品品类文字*!*/
|
||||||
|
.current-goods-category {
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid #fbeed5;
|
||||||
|
color: #c09853;
|
||||||
|
background-color: #fcf8e3;
|
||||||
|
margin: 10px auto;
|
||||||
|
padding: 8px 35px 8px 14px;
|
||||||
|
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*编辑基本信息*/
|
||||||
|
.el-form {
|
||||||
|
padding-bottom: 80px;
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-val {
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
>.ivu-form {
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .sku-item-content-val {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div.base-info-item {
|
||||||
|
h4 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 0 10px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
>div {
|
||||||
|
padding-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
// padding-left: 80px;
|
||||||
|
|
||||||
|
.form-item-view-wholesale {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.form-item-view-wholesale-preview {
|
||||||
|
padding-left: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.sku-item-content {
|
||||||
|
margin: 20px 0;
|
||||||
|
display: flex;
|
||||||
|
width: 100% !important;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
>.ivu-card-body {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ivu-card-body {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-item-content-name {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shop-category-text {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-view-bottom {
|
||||||
|
margin-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-goods-properts-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: normal;
|
||||||
|
width: 300px;
|
||||||
|
height: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-goods-properts {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 审核信息-拒绝原因 */
|
||||||
|
.auth-info {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
width: 30%;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-name-width {
|
||||||
|
width: 50%;
|
||||||
|
min-width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
margin-left: 120px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.goods-group-manager {
|
||||||
|
padding-left: 7.5%;
|
||||||
|
text-align: left;
|
||||||
|
color: #999;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*teatarea*/
|
||||||
|
/deep/ .el-textarea {
|
||||||
|
width: 150%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.seo-text {
|
||||||
|
width: 150%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*折叠面板*/
|
||||||
|
.el-collapse-item {
|
||||||
|
/deep/ .el-collapse-item__header {
|
||||||
|
text-align: left;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
padding: 0 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
margin-left: 5%;
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-form-item__content {
|
||||||
|
margin-left: 120px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
p.goods-group-manager {
|
||||||
|
padding-left: 12%;
|
||||||
|
text-align: left;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-collapse-item__content {
|
||||||
|
padding: 10px 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.success {
|
||||||
|
>h1 {
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
>* {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.operation {
|
||||||
|
>* {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*商品描述*/
|
||||||
|
.goods-intro {
|
||||||
|
line-height: 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 底部步骤 */
|
||||||
|
.footer {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #ffc;
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0px;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 999;
|
||||||
|
|
||||||
|
>.ivu-btn {
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*图片上传组件第一张图设置封面*/
|
||||||
|
.goods-images {
|
||||||
|
/deep/ li.el-upload-list__item:first-child {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ li.el-upload-list__item:first-child:after {
|
||||||
|
content: "封";
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
position: absolute;
|
||||||
|
left: -15px;
|
||||||
|
top: -6px;
|
||||||
|
width: 40px;
|
||||||
|
height: 24px;
|
||||||
|
padding-top: 6px;
|
||||||
|
background: #13ce66;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transform: rotate(-45deg);
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
-webkit-box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: 0 0 1pc 1px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__label {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-list {
|
||||||
|
height: 60px;
|
||||||
|
padding: 10px 30px;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 0.8em;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-sku-btn {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-item:not(:first-child) {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-upload-list {
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #fff;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-picture {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: block;
|
||||||
|
// text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
// justify-self: center;
|
||||||
|
// align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-picture img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-upload-list img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-upload-list-cover {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-upload-list:hover .sku-upload-list-cover {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-upload-list-cover i {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.required {
|
||||||
|
/deep/ .ivu-form-item-label::before {
|
||||||
|
content: "*";
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 4px;
|
||||||
|
line-height: 1;
|
||||||
|
font-family: SimSun;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ed4014;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-upload-list {
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
display: inline-block;
|
||||||
|
background: #fff;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 4px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-upload-list img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-upload-list-cover {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
right: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-upload-list:hover .demo-upload-list-cover {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.demo-upload-list-cover div {
|
||||||
|
margin-top: 50px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
>i {
|
||||||
|
width: 50%;
|
||||||
|
margin-top: 8px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-goods-type {
|
||||||
|
background: #e8e8e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-type-list {
|
||||||
|
max-height: 500px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-item {
|
||||||
|
justify-content: flex-start !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-bar {
|
||||||
|
height: auto !important;
|
||||||
|
max-height: auto !important;
|
||||||
|
min-height: 240px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-type-item {
|
||||||
|
padding: 20px 0;
|
||||||
|
width: 100%;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.35s;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
/deep/ img {
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 100px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/deep/ p {
|
||||||
|
color: #999;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-type-item:hover {
|
||||||
|
background: #ededed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-list-box {
|
||||||
|
height: 450px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 21px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-view-wholesale-form-col {
|
||||||
|
height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-item-view-wholesale-row-del {
|
||||||
|
display: "flex";
|
||||||
|
justify-content: "space-between";
|
||||||
|
align-items: "center";
|
||||||
|
}
|
||||||
|
.promise-intro-btn{
|
||||||
|
margin: 10px 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
@@ -69,6 +69,9 @@
|
|||||||
>搜索</Button
|
>搜索</Button
|
||||||
>
|
>
|
||||||
</Form>
|
</Form>
|
||||||
|
<div class="mt_10">
|
||||||
|
<Button type="primary" @click="handleAdd">新增商品</Button>
|
||||||
|
</div>
|
||||||
<Table
|
<Table
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
border
|
border
|
||||||
@@ -336,6 +339,10 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 新增商品
|
||||||
|
handleAdd(){
|
||||||
|
this.$router.push('/goods-publish')
|
||||||
|
},
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
init() {
|
init() {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@@ -410,7 +417,7 @@ export default {
|
|||||||
showDetail(v) {
|
showDetail(v) {
|
||||||
let id = v.id;
|
let id = v.id;
|
||||||
this.$options.filters.customRouterPush({
|
this.$options.filters.customRouterPush({
|
||||||
name: "goods-detail",
|
name: "goods-publish",
|
||||||
query: { id: id },
|
query: { id: id },
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,12 +65,6 @@
|
|||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="commissionRate" slot-scope="scope">
|
|
||||||
<priceColorScheme v-if="scope.row.commissionRate > 0" unit="" :color="$mainColor" :value="scope.row.commissionRate">%</priceColorScheme>
|
|
||||||
<priceColorScheme v-else :value="scope.row.commissionRate" unit="" >%</priceColorScheme>
|
|
||||||
<!-- {{ scope.row.commissionRate }}% -->
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template slot="deleteFlag" slot-scope="{ row }">
|
<template slot="deleteFlag" slot-scope="{ row }">
|
||||||
<Tag
|
<Tag
|
||||||
:class="{ ml_10: row.deleteFlag }"
|
:class="{ ml_10: row.deleteFlag }"
|
||||||
@@ -113,9 +107,7 @@
|
|||||||
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
<FormItem label="排序值" prop="sortOrder" style="width: 345px">
|
||||||
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
<InputNumber v-model="formAdd.sortOrder"></InputNumber>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="佣金比例(%)" prop="commissionRate" style="width: 345px">
|
|
||||||
<InputNumber :max="100" :min="0" v-model="formAdd.commissionRate"></InputNumber>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label="是否启用" prop="deleteFlag">
|
<FormItem label="是否启用" prop="deleteFlag">
|
||||||
<i-switch
|
<i-switch
|
||||||
size="large"
|
size="large"
|
||||||
@@ -240,7 +232,6 @@ export default {
|
|||||||
specForm: {}, // 规格数据
|
specForm: {}, // 规格数据
|
||||||
// 表单验证规则
|
// 表单验证规则
|
||||||
formValidate: {
|
formValidate: {
|
||||||
commissionRate: [regular.REQUIRED, regular.INTEGER],
|
|
||||||
name: [regular.REQUIRED, regular.VARCHAR20],
|
name: [regular.REQUIRED, regular.VARCHAR20],
|
||||||
sortOrder: [regular.REQUIRED, regular.INTEGER],
|
sortOrder: [regular.REQUIRED, regular.INTEGER],
|
||||||
},
|
},
|
||||||
@@ -254,12 +245,7 @@ export default {
|
|||||||
title: "状态",
|
title: "状态",
|
||||||
slot: "deleteFlag",
|
slot: "deleteFlag",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "佣金",
|
|
||||||
key: "commissionRate",
|
|
||||||
|
|
||||||
slot: "commissionRate",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
@@ -340,7 +326,7 @@ export default {
|
|||||||
this.modalTitle = "添加子分类";
|
this.modalTitle = "添加子分类";
|
||||||
this.parentTitle = v.name;
|
this.parentTitle = v.name;
|
||||||
this.formAdd.level = eval(v.level + "+1");
|
this.formAdd.level = eval(v.level + "+1");
|
||||||
this.formAdd.commissionRate = v.commissionRate;
|
this.formAdd.commissionRate = 0;
|
||||||
this.showParent = true;
|
this.showParent = true;
|
||||||
delete this.formAdd.id;
|
delete this.formAdd.id;
|
||||||
this.formAdd.parentId = v.id;
|
this.formAdd.parentId = v.id;
|
||||||
@@ -355,7 +341,7 @@ export default {
|
|||||||
this.formAdd.level = v.level;
|
this.formAdd.level = v.level;
|
||||||
this.formAdd.parentId = v.parentId;
|
this.formAdd.parentId = v.parentId;
|
||||||
this.formAdd.sortOrder = v.sortOrder;
|
this.formAdd.sortOrder = v.sortOrder;
|
||||||
this.formAdd.commissionRate = v.commissionRate;
|
this.formAdd.commissionRate = 0;
|
||||||
this.formAdd.deleteFlag = v.deleteFlag;
|
this.formAdd.deleteFlag = v.deleteFlag;
|
||||||
this.formAdd.image = v.image;
|
this.formAdd.image = v.image;
|
||||||
this.showParent = false;
|
this.showParent = false;
|
||||||
|
|||||||
@@ -18,6 +18,11 @@
|
|||||||
<span slot="close">隐藏</span>
|
<span slot="close">隐藏</span>
|
||||||
</i-switch>
|
</i-switch>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 回复状态 -->
|
||||||
|
<template slot="replyStatus" slot-scope="scope">
|
||||||
|
<Tag v-if="scope.row.replyStatus" color="green">已回复</Tag>
|
||||||
|
<Tag v-if="!scope.row.replyStatus" color="red">未回复</Tag>
|
||||||
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="mt_10">
|
<Row type="flex" justify="end" class="mt_10">
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
||||||
@@ -73,22 +78,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-b" v-if="infoData.reply">
|
|
||||||
<div >
|
<div >
|
||||||
<div>
|
<Form ref="form" :model="replyForm" :label-width="100">
|
||||||
<div style="float: left"> 商家回复:</div>
|
<FormItem prop="reply" label="平台回复">
|
||||||
<div style="margin-left: 60px">{{ infoData.reply }}</div>
|
<Input :disabled="infoData.reply" show-word-limit v-model="replyForm.reply" type="textarea"/>
|
||||||
</div>
|
</FormItem>
|
||||||
<div v-if="infoData.haveReplyImage">
|
<FormItem prop="reply" label="回复图片">
|
||||||
<div style="margin-left: 60px">
|
</FormItem>
|
||||||
<template v-if="infoData.replyImage && infoData.replyImage.length">
|
</Form>
|
||||||
<img style="width: 100px;height: 110px" v-for="(img,index) in infoData.replyImage.split(',')" :key="index"
|
|
||||||
:src="img" alt=""/>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
@@ -102,6 +101,10 @@ export default {
|
|||||||
name: "goods-review", // 会员评价
|
name: "goods-review", // 会员评价
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
replyForm:{
|
||||||
|
reply:'',
|
||||||
|
replyImage:[]
|
||||||
|
},
|
||||||
infoData: {}, // 商品信息
|
infoData: {}, // 商品信息
|
||||||
infoFlag: false, // 评价展示
|
infoFlag: false, // 评价展示
|
||||||
infoTitle: "", // modal名称
|
infoTitle: "", // modal名称
|
||||||
@@ -173,6 +176,14 @@ export default {
|
|||||||
align: "left",
|
align: "left",
|
||||||
width: 170
|
width: 170
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: "回复状态",
|
||||||
|
key: "replyStatus",
|
||||||
|
align: "left",
|
||||||
|
width: 100,
|
||||||
|
slot: "replyStatus",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "页面展示",
|
title: "页面展示",
|
||||||
key: "shopDisable",
|
key: "shopDisable",
|
||||||
|
|||||||
60
manager/src/views/goods/goodsOperation.vue
Normal file
60
manager/src/views/goods/goodsOperation.vue
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<div class="goods-operation">
|
||||||
|
<div class="step-list">
|
||||||
|
<steps :current="activestep" style="height:60px;margin-top: 10px">
|
||||||
|
<step title="选择商品品类"/>
|
||||||
|
<step title="填写商品详情"/>
|
||||||
|
<step title="商品发布成功"/>
|
||||||
|
</steps>
|
||||||
|
</div>
|
||||||
|
<!-- 第一步 选择分类 -->
|
||||||
|
<first-step ref='first' v-show="activestep === 0" @change="getFirstData"></first-step>
|
||||||
|
<!-- 第二步 商品详细信息 -->
|
||||||
|
<second-step ref='second' :firstData="firstData" v-if="activestep === 1"></second-step>
|
||||||
|
<!-- 第三步 发布完成 -->
|
||||||
|
<third-step ref='third' v-if="activestep === 2"></third-step>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import firstStep from './goodsOperationFirst'
|
||||||
|
import secondStep from './goodsOperationSec'
|
||||||
|
import thirdStep from './goodsOperationThird'
|
||||||
|
export default {
|
||||||
|
name: "addGoods",
|
||||||
|
components: {
|
||||||
|
firstStep,
|
||||||
|
secondStep,
|
||||||
|
thirdStep
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
/** 当前激活步骤*/
|
||||||
|
activestep: 0,
|
||||||
|
firstData: {}, // 第一步传递的数据
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 选择商品分类回调
|
||||||
|
getFirstData (item) {
|
||||||
|
this.firstData = item;
|
||||||
|
this.activestep = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 编辑商品、模板
|
||||||
|
if (this.$route.query.id || this.$route.query.draftId) {
|
||||||
|
this.activestep = 1;
|
||||||
|
} else {
|
||||||
|
this.activestep = 0
|
||||||
|
this.$refs.first.selectGoodsType = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./addGoods.scss";
|
||||||
|
</style>
|
||||||
260
manager/src/views/goods/goodsOperationFirst.vue
Normal file
260
manager/src/views/goods/goodsOperationFirst.vue
Normal file
@@ -0,0 +1,260 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- 选择商品类型 -->
|
||||||
|
<Modal v-model="selectGoodsType" width="550" :closable="false">
|
||||||
|
<div class="goods-type-list" v-if="!showGoodsTemplates">
|
||||||
|
<div
|
||||||
|
class="goods-type-item"
|
||||||
|
:class="{ 'active-goods-type': item.check }"
|
||||||
|
@click="handleClickGoodsType(item)"
|
||||||
|
v-for="(item, index) in goodsTypeWay"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<img :src="item.img" />
|
||||||
|
<div>
|
||||||
|
<h2>{{ item.title }}</h2>
|
||||||
|
<p>{{ item.desc }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="goods-type-list">
|
||||||
|
<h2 @click="showGoodsTemplates = !showGoodsTemplates">返回</h2>
|
||||||
|
<div class="goods-list-box">
|
||||||
|
<Scroll :on-reach-bottom="handleReachBottom">
|
||||||
|
<div
|
||||||
|
class="goods-type-item template-item"
|
||||||
|
@click="handleClickGoodsTemplate(item)"
|
||||||
|
v-for="(item, tempIndex) in goodsTemplates"
|
||||||
|
:key="tempIndex"
|
||||||
|
>
|
||||||
|
<img :src="item.thumbnail" />
|
||||||
|
<div>
|
||||||
|
<h2>{{ item.goodsName }}</h2>
|
||||||
|
<p>{{ item.sellingPoint || "" }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Scroll>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
<!-- 商品分类 -->
|
||||||
|
<div class="content-goods-publish">
|
||||||
|
<div class="goods-category">
|
||||||
|
<ul v-if="categoryListLevel1.length > 0">
|
||||||
|
<li
|
||||||
|
v-for="(item, index) in categoryListLevel1"
|
||||||
|
:class="{ activeClass: category[0].name === item.name }"
|
||||||
|
@click="handleSelectCategory(item, index, 1)"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
<span>></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul v-if="categoryListLevel2.length > 0">
|
||||||
|
<li
|
||||||
|
v-for="(item, index) in categoryListLevel2"
|
||||||
|
:class="{ activeClass: category[1].name === item.name }"
|
||||||
|
@click="handleSelectCategory(item, index, 2)"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
<span>></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul v-if="categoryListLevel3.length > 0">
|
||||||
|
<li
|
||||||
|
v-for="(item, index) in categoryListLevel3"
|
||||||
|
:class="{ activeClass: category[2].name === item.name }"
|
||||||
|
@click="handleSelectCategory(item, index, 3)"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<span>{{ item.name }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<p class="current-goods-category">
|
||||||
|
您当前选择的商品类别是:
|
||||||
|
<span>{{ category[0].name }}</span>
|
||||||
|
<span v-show="category[1].name">> {{ category[1].name }}</span>
|
||||||
|
<span v-show="category[2].name">> {{ category[2].name }}</span>
|
||||||
|
</p>
|
||||||
|
<template v-if="selectedTemplate.goodsName">
|
||||||
|
<Divider>已选商品模版:{{ selectedTemplate.goodsName }}</Divider>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<div class="footer">
|
||||||
|
<ButtonGroup>
|
||||||
|
<Button type="primary" @click="selectGoodsType = true">商品类型</Button>
|
||||||
|
<Button type="primary" @click="next">下一步</Button>
|
||||||
|
</ButtonGroup>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import * as API_GOODS from "@/api/goods";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
selectedTemplate: {}, // 已选模板
|
||||||
|
selectGoodsType: false, // 展示选择商品分类modal
|
||||||
|
goodsTemplates: [], // 商品模板列表
|
||||||
|
showGoodsTemplates: false, //是否显示选择商品模板
|
||||||
|
goodsTypeWay: [
|
||||||
|
{
|
||||||
|
title: "实物商品",
|
||||||
|
img: require("@/assets/goodsType1.png"),
|
||||||
|
desc: "零售批发,物流配送",
|
||||||
|
type: "PHYSICAL_GOODS",
|
||||||
|
check: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "虚拟商品",
|
||||||
|
img: require("@/assets/goodsType2.png"),
|
||||||
|
desc: "虚拟核验,无需物流",
|
||||||
|
type: "VIRTUAL_GOODS",
|
||||||
|
check: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "商品模板导入",
|
||||||
|
img: require("@/assets/goodsTypeTpl.png"),
|
||||||
|
desc: "商品模板,一键导入",
|
||||||
|
check: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 商品分类选择数组
|
||||||
|
category: [
|
||||||
|
{ name: "", id: "" },
|
||||||
|
{ name: "", id: "" },
|
||||||
|
{ name: "", id: "" },
|
||||||
|
],
|
||||||
|
// 商品类型
|
||||||
|
goodsType: "",
|
||||||
|
/** 1级分类列表*/
|
||||||
|
categoryListLevel1: [],
|
||||||
|
/** 2级分类列表*/
|
||||||
|
categoryListLevel2: [],
|
||||||
|
/** 3级分类列表*/
|
||||||
|
categoryListLevel3: [],
|
||||||
|
searchParams: {
|
||||||
|
saveType: "TEMPLATE",
|
||||||
|
sort: "create_time",
|
||||||
|
order: "desc",
|
||||||
|
pageSize: 10,
|
||||||
|
pageNumber: 1,
|
||||||
|
},
|
||||||
|
templateTotal: 0,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 商品模版触底加载
|
||||||
|
handleReachBottom() {
|
||||||
|
setTimeout(() => {
|
||||||
|
if (
|
||||||
|
this.searchParams.pageNumber * this.searchParams.pageSize <=
|
||||||
|
this.templateTotal
|
||||||
|
) {
|
||||||
|
this.searchParams.pageNumber++;
|
||||||
|
this.GET_GoodsTemplate();
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
// 点击商品类型
|
||||||
|
handleClickGoodsType(val) {
|
||||||
|
this.goodsTypeWay.map((item) => {
|
||||||
|
return (item.check = false);
|
||||||
|
});
|
||||||
|
|
||||||
|
val.check = !val.check;
|
||||||
|
if (!val.type) {
|
||||||
|
this.GET_GoodsTemplate();
|
||||||
|
this.showGoodsTemplates = true;
|
||||||
|
} else {
|
||||||
|
this.goodsType = val.type;
|
||||||
|
this.selectedTemplate = {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 点击商品模板
|
||||||
|
handleClickGoodsTemplate(val) {
|
||||||
|
this.selectedTemplate = val;
|
||||||
|
this.selectGoodsType = false;
|
||||||
|
this.$emit("change", { tempId: val.id });
|
||||||
|
},
|
||||||
|
// 获取商品模板
|
||||||
|
GET_GoodsTemplate() {
|
||||||
|
API_GOODS.getDraftGoodsListData(this.searchParams).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.goodsTemplates.push(...res.result.records);
|
||||||
|
this.templateTotal = res.result.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 选择商城商品分类 */
|
||||||
|
handleSelectCategory(row, index, level) {
|
||||||
|
if (level === 1) {
|
||||||
|
this.category.forEach((cate) => {
|
||||||
|
(cate.name = ""), (cate.id = "");
|
||||||
|
});
|
||||||
|
this.category[0].name = row.name;
|
||||||
|
this.category[0].id = row.id;
|
||||||
|
this.categoryListLevel2 = this.categoryListLevel1[index].children;
|
||||||
|
this.categoryListLevel3 = [];
|
||||||
|
} else if (level === 2) {
|
||||||
|
this.category[1].name = row.name;
|
||||||
|
this.category[1].id = row.id;
|
||||||
|
this.category[2].name = "";
|
||||||
|
this.category[2].id = "";
|
||||||
|
this.categoryListLevel3 = this.categoryListLevel2[index].children;
|
||||||
|
} else {
|
||||||
|
this.category[2].name = row.name;
|
||||||
|
this.category[2].id = row.id;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 查询下一级 商城商品分类*/
|
||||||
|
GET_NextLevelCategory(row) {
|
||||||
|
const _id = row && row.id !== 0 ? row.id : 0;
|
||||||
|
API_GOODS.getCategoryTree().then((res) => {
|
||||||
|
if (res.success && res.result) {
|
||||||
|
this.categoryListLevel1 = res.result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 下一步
|
||||||
|
next() {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
if (!this.goodsType && !this.selectedTemplate.goodsName) {
|
||||||
|
this.$Message.error("请选择商品类型");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!this.category[0].name) {
|
||||||
|
this.$Message.error("请选择商品分类");
|
||||||
|
return;
|
||||||
|
} else if (!this.category[2].name) {
|
||||||
|
this.$Message.error("必须选择到三级分类");
|
||||||
|
return;
|
||||||
|
} else if (this.category[2].name) {
|
||||||
|
let params = {
|
||||||
|
category: this.category,
|
||||||
|
goodsType: this.goodsType,
|
||||||
|
};
|
||||||
|
if (this.selectedTemplate.id) {
|
||||||
|
params.tempId = this.selectedTemplate.id;
|
||||||
|
this.$emit("change", params);
|
||||||
|
} else {
|
||||||
|
this.$emit("change", params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.GET_NextLevelCategory();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./addGoods.scss";
|
||||||
|
/deep/ .ivu-scroll-container {
|
||||||
|
height: 450px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
2023
manager/src/views/goods/goodsOperationSec.vue
Normal file
2023
manager/src/views/goods/goodsOperationSec.vue
Normal file
File diff suppressed because it is too large
Load Diff
38
manager/src/views/goods/goodsOperationThird.vue
Normal file
38
manager/src/views/goods/goodsOperationThird.vue
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<div class="content-goods-publish">
|
||||||
|
<div class="success" style="text-align: left">
|
||||||
|
<h1>恭喜您,商品发布成功!</h1>
|
||||||
|
<div class="goToGoodsList" @click="gotoGoodsList">
|
||||||
|
<a>去店铺查看商品列表>></a>
|
||||||
|
</div>
|
||||||
|
<div class="operation">
|
||||||
|
<h3>您还可以:</h3>
|
||||||
|
<div>
|
||||||
|
1、继续
|
||||||
|
<a @click="gotoBack">发布商品</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
2、进入卖家中心,管理
|
||||||
|
<a @click="gotoGoodsList">商品列表</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
// 跳转商品列表
|
||||||
|
gotoGoodsList() {
|
||||||
|
this.$router.push({name: "goods"});
|
||||||
|
},
|
||||||
|
// 刷新页面
|
||||||
|
gotoBack() {
|
||||||
|
this.$router.go();
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import "./addGoods.scss";
|
||||||
|
</style>
|
||||||
321
manager/src/views/logistics/company.vue
Normal file
321
manager/src/views/logistics/company.vue
Normal file
@@ -0,0 +1,321 @@
|
|||||||
|
<template>
|
||||||
|
<div class="search">
|
||||||
|
<Card>
|
||||||
|
<Row class="operation padding-row">
|
||||||
|
<Button @click="add" type="primary">添加</Button>
|
||||||
|
</Row>
|
||||||
|
<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)">
|
||||||
|
<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>
|
||||||
|
</Row>
|
||||||
|
</Card>
|
||||||
|
<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%"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="物流公司代码" prop="code">
|
||||||
|
<Input v-model="form.code" clearable style="width: 100%"/>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="支持电子面单">
|
||||||
|
<i-switch v-model="form.standBy" size="large">
|
||||||
|
<span slot="open">开</span>
|
||||||
|
<span slot="close">关</span>
|
||||||
|
</i-switch>
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem label="禁用状态" prop="disabled">
|
||||||
|
|
||||||
|
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
|
||||||
|
<span slot="open">开启</span>
|
||||||
|
<span slot="close">禁用</span>
|
||||||
|
</i-switch>
|
||||||
|
</FormItem>
|
||||||
|
</Form>
|
||||||
|
<div slot="footer">
|
||||||
|
<Button type="text" @click="modalVisible = false">取消</Button>
|
||||||
|
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
||||||
|
>提交
|
||||||
|
</Button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
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:"CLOSE"
|
||||||
|
},
|
||||||
|
// 表单验证规则
|
||||||
|
formValidate: {
|
||||||
|
name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入物流公司名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
submitLoading: false, // 添加或编辑提交状态
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: "物流公司名称",
|
||||||
|
key: "name",
|
||||||
|
minWidth: 120,
|
||||||
|
sortable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "物流公司编码",
|
||||||
|
key: "code",
|
||||||
|
minWidth: 120,
|
||||||
|
sortable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "状态",
|
||||||
|
key: "disabled",
|
||||||
|
width: 150,
|
||||||
|
slot: "disableSlot",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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: {
|
||||||
|
// 初始化
|
||||||
|
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;
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (this.modalTitle == "添加") {
|
||||||
|
// 添加 避免编辑后传入id等数据 记得删除
|
||||||
|
delete this.form.id;
|
||||||
|
|
||||||
|
|
||||||
|
addLogistics(this.form).then((res) => {
|
||||||
|
this.submitLoading = false;
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("操作成功");
|
||||||
|
this.getDataList();
|
||||||
|
this.modalVisible = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 编辑
|
||||||
|
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
|
||||||
|
},
|
||||||
|
// 删除物流公司
|
||||||
|
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,321 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="search">
|
|
||||||
<Card>
|
<Card>
|
||||||
<Row class="operation padding-row">
|
<Tabs :value="type">
|
||||||
<Button @click="add" type="primary">添加</Button>
|
<TabPane label="物流公司" name="company">
|
||||||
</Row>
|
<company/>
|
||||||
<Table
|
</TabPane>
|
||||||
:loading="loading"
|
<TabPane label="物流模版" name="template">
|
||||||
border
|
<!-- <shipTemplate/> -->
|
||||||
:columns="columns"
|
</TabPane>
|
||||||
:data="data"
|
</Tabs>
|
||||||
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)">
|
|
||||||
<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>
|
|
||||||
</Row>
|
|
||||||
</Card>
|
</Card>
|
||||||
<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%"/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label="物流公司代码" prop="code">
|
|
||||||
<Input v-model="form.code" clearable style="width: 100%"/>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label="支持电子面单">
|
|
||||||
<i-switch v-model="form.standBy" size="large">
|
|
||||||
<span slot="open">开</span>
|
|
||||||
<span slot="close">关</span>
|
|
||||||
</i-switch>
|
|
||||||
</FormItem>
|
|
||||||
|
|
||||||
<FormItem label="禁用状态" prop="disabled">
|
|
||||||
|
|
||||||
<i-switch true-value="OPEN" false-value="CLOSE" v-model="form.disabled" size="large">
|
|
||||||
<span slot="open">开启</span>
|
|
||||||
<span slot="close">禁用</span>
|
|
||||||
</i-switch>
|
|
||||||
</FormItem>
|
|
||||||
</Form>
|
|
||||||
<div slot="footer">
|
|
||||||
<Button type="text" @click="modalVisible = false">取消</Button>
|
|
||||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit"
|
|
||||||
>提交
|
|
||||||
</Button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</Modal>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import company from './company.vue'
|
||||||
getLogisticsPage,
|
import shipTemplate from './shipTemplate.vue';
|
||||||
updateLogistics,
|
|
||||||
addLogistics,
|
|
||||||
delLogistics,
|
|
||||||
} from "@/api/logistics";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "logistics",
|
components:{
|
||||||
|
company,
|
||||||
|
shipTemplate
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
loading: true, // 表单加载状态
|
type:'company'
|
||||||
modalVisible: false, // 添加或编辑显示
|
|
||||||
modalTitle: "", // 添加或编辑标题
|
|
||||||
searchForm: {
|
|
||||||
// 搜索框初始化对象
|
|
||||||
pageNumber: 1, // 当前页数
|
|
||||||
pageSize: 20, // 页面大小
|
|
||||||
sort: "createTime", // 默认排序字段
|
|
||||||
order: "desc", // 默认排序方式
|
|
||||||
name: "",
|
|
||||||
},
|
|
||||||
form: {
|
|
||||||
// 添加或编辑表单对象初始化数据
|
|
||||||
name: "",
|
|
||||||
disabled:"CLOSE"
|
|
||||||
},
|
|
||||||
// 表单验证规则
|
|
||||||
formValidate: {
|
|
||||||
name: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: "请输入物流公司名称",
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
submitLoading: false, // 添加或编辑提交状态
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
title: "物流公司名称",
|
|
||||||
key: "name",
|
|
||||||
minWidth: 120,
|
|
||||||
sortable: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "物流公司编码",
|
|
||||||
key: "code",
|
|
||||||
minWidth: 120,
|
|
||||||
sortable: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "状态",
|
|
||||||
key: "disabled",
|
|
||||||
width: 150,
|
|
||||||
slot: "disableSlot",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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: {
|
|
||||||
// 初始化
|
|
||||||
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;
|
|
||||||
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;
|
|
||||||
|
|
||||||
if (this.modalTitle == "添加") {
|
|
||||||
// 添加 避免编辑后传入id等数据 记得删除
|
|
||||||
delete this.form.id;
|
|
||||||
|
|
||||||
|
|
||||||
addLogistics(this.form).then((res) => {
|
|
||||||
this.submitLoading = false;
|
|
||||||
if (res.success) {
|
|
||||||
this.$Message.success("操作成功");
|
|
||||||
this.getDataList();
|
|
||||||
this.modalVisible = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// 编辑
|
|
||||||
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
|
|
||||||
},
|
|
||||||
// 删除物流公司
|
|
||||||
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>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
633
manager/src/views/logistics/shipTemplate.vue
Normal file
633
manager/src/views/logistics/shipTemplate.vue
Normal file
@@ -0,0 +1,633 @@
|
|||||||
|
<template>
|
||||||
|
<div class="search">
|
||||||
|
<Card>
|
||||||
|
<Row>
|
||||||
|
<Button @click="refresh">刷新</Button>
|
||||||
|
<Button @click="add" type="primary">添加</Button>
|
||||||
|
</Row>
|
||||||
|
<Tabs @on-click="handleClickType" v-model="currentTab" style="margin-top: 10px">
|
||||||
|
<TabPane label="运费模板" name="INFO">
|
||||||
|
<table class="ncsc-default-table order m-b-30" :key="index" v-for="(item,index) in shipInfo">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="sep-row" colspan="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="20">
|
||||||
|
<span class="temp-name">{{item.name}}</span>
|
||||||
|
<Tag v-if="item.pricingMethod==='FREE'" class="baoyou" color="warning">包邮</Tag>
|
||||||
|
<span class="fr m-r-5">
|
||||||
|
<time style="margin-right: 20px" title="最后编辑时间">
|
||||||
|
<i class="icon-time"></i>{{item.updateTime}}
|
||||||
|
</time>
|
||||||
|
<Button @click="edit(item)" type="info">修改</Button>
|
||||||
|
<Button @click="remove(item.id)" type="error">删除</Button>
|
||||||
|
</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="item.pricingMethod!=='FREE'">
|
||||||
|
<td class="w10 bdl"></td>
|
||||||
|
<td class="cell-area tl w150">运送到</td>
|
||||||
|
<td class="w150">首件(重)</td>
|
||||||
|
<td class="w150">运费</td>
|
||||||
|
<td class="w150">续件(重)</td>
|
||||||
|
<td class="w150 bdr">运费</td>
|
||||||
|
</tr>
|
||||||
|
<template v-if="item.pricingMethod!=='FREE'">
|
||||||
|
<tr v-for="(children,index) in item.freightTemplateChildList" :key="index">
|
||||||
|
<td class="bdl"></td>
|
||||||
|
<td class="cell-area tl w150" style="width: 60%;white-space:normal;">{{children.area}}</td>
|
||||||
|
<td>
|
||||||
|
{{children.firstCompany}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span class="yuan">¥</span><span class="integer">{{children.firstPrice | unitPrice}}</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{children.continuedCompany}}
|
||||||
|
</td>
|
||||||
|
<td class="bdr">
|
||||||
|
<span class="yuan">¥</span><span class="integer">{{children.continuedPrice | unitPrice}}</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</TabPane>
|
||||||
|
<TabPane v-if="csTab" :label="title" :name="operation">
|
||||||
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
|
<FormItem label="模板名称" prop="name">
|
||||||
|
<Input v-model="form.name" maxlength="10" clearable style="width: 20%" />
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="计价方式" prop="pricingMethod">
|
||||||
|
<RadioGroup type="button" button-style="solid" v-model="form.pricingMethod">
|
||||||
|
<Radio label="WEIGHT">按重量</Radio>
|
||||||
|
<Radio label="NUM">按件数</Radio>
|
||||||
|
<Radio label="FREE">包邮</Radio>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
|
||||||
|
<FormItem label="详细设置" v-if="form.pricingMethod !== 'FREE'">
|
||||||
|
<Alert type="warning" >点击右侧修改按钮编辑数据</Alert>
|
||||||
|
<div class="ncsu-trans-type" data-delivery="TRANSTYPE">
|
||||||
|
<div class="entity">
|
||||||
|
<div class="tbl-except">
|
||||||
|
<table cellspacing="0" class="ncsc-default-table">
|
||||||
|
<thead>
|
||||||
|
<tr style="border-bottom: 1px solid #ddd;">
|
||||||
|
<th class="w10"></th>
|
||||||
|
<th class="tl">运送到</th>
|
||||||
|
<th class="w10"></th>
|
||||||
|
<th class="w50">首件(重)</th>
|
||||||
|
<th class="w110">首费</th>
|
||||||
|
<th class="w50">续件(重)</th>
|
||||||
|
<th class="w110">续费</th>
|
||||||
|
<th class="w150">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="bd-line" data-group="n1" v-for="(item,index) in form.freightTemplateChildList"
|
||||||
|
:key="index">
|
||||||
|
<td></td>
|
||||||
|
<td class="tl cell-area">
|
||||||
|
<span class="area-group">
|
||||||
|
<p style="display:inline-block">{{item.area}}</p>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<InputNumber class="text w40" type="text" v-model="item.firstCompany" :max="999" :min="0" :step="0.1" clearable/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<InputNumber class="text w60" type="text" v-model="item.firstPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||||
|
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
|
||||||
|
</InputNumber>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<InputNumber class="text w40" type="text" v-model="item.continuedCompany" :max="999" :min="0" :step="0.1"
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<InputNumber class="text w60" type="text" v-model="item.continuedPrice" :max="999999" :min="0" clearable :formatter="value => `¥ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
|
||||||
|
:parser="value => value.replace(/\¥\s?|(,*)/g, '')">
|
||||||
|
</InputNumber>
|
||||||
|
</td>
|
||||||
|
<td class="nscs-table-handle">
|
||||||
|
<Button @click="editRegion(item,index)" type="info" size="small"
|
||||||
|
style="margin-bottom: 5px">修改
|
||||||
|
</Button>
|
||||||
|
<Button @click="removeTemplateChildren(index)" type="error"
|
||||||
|
size="small" style="margin-bottom: 5px">删除
|
||||||
|
</Button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="tbl-attach p-5">
|
||||||
|
<div class="div-error" v-if="saveError">
|
||||||
|
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
||||||
|
<Icon type="ios-information-circle-outline" />
|
||||||
|
指定地区城市为空或指定错误
|
||||||
|
<!-- <Icon type="ios-information-circle-outline" />
|
||||||
|
首费应输入正确的金额
|
||||||
|
<Icon type="ios-information-circle-outline" />
|
||||||
|
续费应输入正确的金额 -->
|
||||||
|
<Icon type="ios-information-circle-outline" />
|
||||||
|
首(续)件(重)费应输入大于0的整数
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</FormItem>
|
||||||
|
<Form-item>
|
||||||
|
<Button @click="addShipTemplateChildren(index)" v-if="form.pricingMethod !== 'FREE'"
|
||||||
|
icon="ios-create-outline">为指定城市设置运费模板
|
||||||
|
</Button>
|
||||||
|
<Button @click="handleSubmit" type="primary" style="margin-right:5px">保存
|
||||||
|
</Button>
|
||||||
|
</Form-item>
|
||||||
|
</Form>
|
||||||
|
</TabPane>
|
||||||
|
</Tabs>
|
||||||
|
</Card>
|
||||||
|
<multiple-region ref="region" @selected="handleSelect">
|
||||||
|
|
||||||
|
</multiple-region>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as API_Shop from "@/api/shops";
|
||||||
|
import multipleRegion from "@/components/map/multiple-region";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "shipTemplate",
|
||||||
|
components: {
|
||||||
|
multipleRegion,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
gotop: false,
|
||||||
|
index:'0',
|
||||||
|
selectedIndex: 0, //选中的地址模板下标
|
||||||
|
item: "", //运费模板子模板
|
||||||
|
shipInfo: {}, // 运费模板数据
|
||||||
|
title: "添加运费模板", // 模态框标题
|
||||||
|
operation: "add", // 操作状态
|
||||||
|
currentTab: "", // 当前模板tab
|
||||||
|
// submitLoading:false,
|
||||||
|
saveError: false, // 是否显示错误提示
|
||||||
|
csTab: false, // 添加运费模板显示
|
||||||
|
form: {
|
||||||
|
// 添加或编辑表单对象初始化数据
|
||||||
|
name: "",
|
||||||
|
pricingMethod: "WEIGHT",
|
||||||
|
},
|
||||||
|
formValidate: {
|
||||||
|
name: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入模板名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
pricingMethod: [
|
||||||
|
// 计费方式
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择计费方式",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
regions() {
|
||||||
|
return this.$store.state.regions;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 初始化数据
|
||||||
|
init() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
//切换tabPane
|
||||||
|
handleClickType(v) {
|
||||||
|
if (v == "INFO") {
|
||||||
|
this.getData();
|
||||||
|
this.csTab = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//添加运费模板
|
||||||
|
add() {
|
||||||
|
this.$refs.region.clear();
|
||||||
|
this.title = "添加运费模板";
|
||||||
|
this.csTab = true;
|
||||||
|
this.operation = "ADD";
|
||||||
|
this.currentTab = "ADD";
|
||||||
|
this.saveError = false;
|
||||||
|
this.form = {
|
||||||
|
pricingMethod: "WEIGHT",
|
||||||
|
name: "",
|
||||||
|
freightTemplateChildList: [
|
||||||
|
{
|
||||||
|
area: "",
|
||||||
|
areaId: "",
|
||||||
|
firstCompany: 0,
|
||||||
|
firstPrice: 0,
|
||||||
|
continuedCompany: 0,
|
||||||
|
continuedPrice: 0,
|
||||||
|
selectedAll: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
handleScroll(){
|
||||||
|
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
scrolltop > 30 ? (this.gotop = true) : (this.gotop = false);
|
||||||
|
},
|
||||||
|
//修改运费模板
|
||||||
|
edit(item) {
|
||||||
|
this.title = "修改运费模板";
|
||||||
|
this.csTab = true;
|
||||||
|
this.operation = "EDIT";
|
||||||
|
this.currentTab = "EDIT";
|
||||||
|
this.saveError = false;
|
||||||
|
//给form赋值
|
||||||
|
this.form = item;
|
||||||
|
|
||||||
|
let top = document.documentElement.scrollTop || document.body.scrollTop;
|
||||||
|
// 实现滚动效果
|
||||||
|
const timeTop = setInterval(() => {
|
||||||
|
document.body.scrollTop = document.documentElement.scrollTop = top -= 50;
|
||||||
|
if (top <= 0) {
|
||||||
|
clearInterval(timeTop);
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
},
|
||||||
|
//选择地区
|
||||||
|
editRegion(item, index) {
|
||||||
|
this.selectedIndex = index;
|
||||||
|
this.item = item;
|
||||||
|
|
||||||
|
this.regions.forEach((addr) => {
|
||||||
|
this.form.freightTemplateChildList.forEach((child) => {
|
||||||
|
child.area.split(",").forEach((area) => {
|
||||||
|
if (addr.name == area) {
|
||||||
|
addr.selectedAll = true;
|
||||||
|
this.$set(child, "selectedAll", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$store.state.shipTemplate = this.form.freightTemplateChildList;
|
||||||
|
|
||||||
|
this.$refs.region.open(item, index);
|
||||||
|
},
|
||||||
|
//刷细数据
|
||||||
|
refresh() {
|
||||||
|
this.csTab = false;
|
||||||
|
this.operation = "INFO";
|
||||||
|
this.currentTab = "INFO";
|
||||||
|
this.getData();
|
||||||
|
this.$Message.success("刷新成功");
|
||||||
|
},
|
||||||
|
//运费模板数据
|
||||||
|
getData() {
|
||||||
|
API_Shop.getShipTemplate().then((res) => {
|
||||||
|
this.shipInfo = res.result;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选择地址回调
|
||||||
|
*/
|
||||||
|
handleSelect(v) {
|
||||||
|
let area = "";
|
||||||
|
let areaId = "";
|
||||||
|
if (v != "") {
|
||||||
|
v.forEach((child) => {
|
||||||
|
if (child.selectedList != "") {
|
||||||
|
// 只显示省份
|
||||||
|
|
||||||
|
if (child.selectedAll) {
|
||||||
|
area += child.name + ",";
|
||||||
|
this.form.freightTemplateChildList[
|
||||||
|
this.selectedIndex
|
||||||
|
].selectedAll = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
child.selectedList.forEach((son) => {
|
||||||
|
if (child.selectedAll) {
|
||||||
|
areaId += son.id + ",";
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
// 显示城市
|
||||||
|
area += son.name + ",";
|
||||||
|
areaId += son.id + ",";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.item.area = area;
|
||||||
|
this.item.areaId = areaId;
|
||||||
|
},
|
||||||
|
//添加或者修改运费模板
|
||||||
|
handleSubmit() {
|
||||||
|
const headers = {
|
||||||
|
"Content-Type": "application/json;charset=utf-8",
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
// const regNumber = /^\+?[1-9][0-9]*$/;
|
||||||
|
// const regMoney =
|
||||||
|
// /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.pricingMethod != "FREE") {
|
||||||
|
//校验运费模板详细信息
|
||||||
|
for (
|
||||||
|
let i = 0;
|
||||||
|
i < this.form.freightTemplateChildList.length;
|
||||||
|
i++
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
this.form.freightTemplateChildList[i].area == "" ||
|
||||||
|
this.form.freightTemplateChildList[i].firstCompany == "" ||
|
||||||
|
// this.form.freightTemplateChildList[i].firstPrice == "" ||
|
||||||
|
this.form.freightTemplateChildList[i].continuedCompany == ""
|
||||||
|
// this.form.freightTemplateChildList[i].continuedPrice == ""
|
||||||
|
) {
|
||||||
|
this.saveError = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if (
|
||||||
|
// regNumber.test(
|
||||||
|
// this.form.freightTemplateChildList[i].firstCompany
|
||||||
|
// ) == false ||
|
||||||
|
// regNumber.test(
|
||||||
|
// this.form.freightTemplateChildList[i].continuedCompany
|
||||||
|
// ) == false ||
|
||||||
|
// regMoney.test(
|
||||||
|
// this.form.freightTemplateChildList[i].firstPrice
|
||||||
|
// ) == false ||
|
||||||
|
// regMoney.test(
|
||||||
|
// this.form.freightTemplateChildList[i].continuedPrice
|
||||||
|
// ) == false
|
||||||
|
// ) {
|
||||||
|
// this.saveError = true;
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.operation == "ADD") {
|
||||||
|
API_Shop.addShipTemplate(this.form, headers).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("新增成功");
|
||||||
|
this.operation = "INFO";
|
||||||
|
this.currentTab = "INFO";
|
||||||
|
this.csTab = false;
|
||||||
|
this.getData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
API_Shop.editShipTemplate(this.form.id, this.form, headers).then(
|
||||||
|
(res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("新增成功");
|
||||||
|
this.operation = "INFO";
|
||||||
|
this.currentTab = "INFO";
|
||||||
|
this.csTab = false;
|
||||||
|
this.getData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//添加子模板
|
||||||
|
addShipTemplateChildren() {
|
||||||
|
const params = {
|
||||||
|
area: "",
|
||||||
|
areaId: "",
|
||||||
|
firstCompany: 0,
|
||||||
|
firstPrice: 0,
|
||||||
|
continuedCompany: 0,
|
||||||
|
continuedPrice: 0,
|
||||||
|
selectedAll: false,
|
||||||
|
};
|
||||||
|
this.form.freightTemplateChildList.push(params);
|
||||||
|
},
|
||||||
|
//删除一个子模板
|
||||||
|
removeTemplateChildren(index) {
|
||||||
|
if (Object.keys(this.form.freightTemplateChildList).length == 1) {
|
||||||
|
this.$Message.error("必须保留一个子模板");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.freightTemplateChildList.splice(index, 1);
|
||||||
|
},
|
||||||
|
//删除运费模板
|
||||||
|
remove(id) {
|
||||||
|
this.$Modal.confirm({
|
||||||
|
title: "确认删除",
|
||||||
|
// 记得确认修改此处
|
||||||
|
content: "您确认要删除此运费模板 ?",
|
||||||
|
loading: true,
|
||||||
|
onOk: () => {
|
||||||
|
API_Shop.deleteShipTemplate(id).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("删除成功");
|
||||||
|
}
|
||||||
|
this.$Modal.remove();
|
||||||
|
this.getData();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
window.addEventListener("scroll", this.handleScroll, true);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.ncsc-default-table thead th {
|
||||||
|
line-height: 20px;
|
||||||
|
color: #555;
|
||||||
|
background-color: #fafafa;
|
||||||
|
text-align: center;
|
||||||
|
height: 20px;
|
||||||
|
padding: 9px 0;
|
||||||
|
border-bottom: solid 1px #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ncsc-default-table {
|
||||||
|
line-height: 20px;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
|
||||||
|
tbody th {
|
||||||
|
background-color: #fafafa;
|
||||||
|
border: solid #e6e6e6;
|
||||||
|
border-width: 1px 0;
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody td {
|
||||||
|
color: #999;
|
||||||
|
background-color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 6px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr td {
|
||||||
|
border-bottom: 1px solid #e6e6e6;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr td.bdr {
|
||||||
|
border-right: 1px solid #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr th {
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr td.sep-row {
|
||||||
|
height: 14px;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w10 {
|
||||||
|
width: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tl {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr td.bdl {
|
||||||
|
border-left: 1px solid #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order tbody tr th .temp-name {
|
||||||
|
float: left;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #555;
|
||||||
|
// line-height: 44px;
|
||||||
|
margin: 7px 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-r-5 {
|
||||||
|
margin-right: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fr {
|
||||||
|
float: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m-b-30 {
|
||||||
|
margin-bottom: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
margin: 3px 5px 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead {
|
||||||
|
display: table-header-group;
|
||||||
|
vertical-align: middle;
|
||||||
|
border-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr {
|
||||||
|
display: table-row;
|
||||||
|
vertical-align: inherit;
|
||||||
|
border-color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption,
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tl {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
colgroup {
|
||||||
|
display: table-column-group;
|
||||||
|
}
|
||||||
|
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bd-line td {
|
||||||
|
border-bottom: solid 1px #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w40 {
|
||||||
|
width: 60px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w60 {
|
||||||
|
width: 100px !important;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
Input[type="text"],
|
||||||
|
Input[type="password"],
|
||||||
|
Input.text,
|
||||||
|
Input.password {
|
||||||
|
display: inline-block;
|
||||||
|
min-height: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
border: solid 1px #e6e9ee;
|
||||||
|
outline: 0 none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ncsc-default-table {
|
||||||
|
line-height: 20px;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ncsu-trans-type {
|
||||||
|
background-color: #fff;
|
||||||
|
border: solid #ddd 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
i,
|
||||||
|
cite,
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell-area {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div-error {
|
||||||
|
margin-left: 7px;
|
||||||
|
margin-bottom: -8px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
|
.baoyou {
|
||||||
|
margin: 6px 10px 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -563,12 +563,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "购买店铺",
|
|
||||||
key: "storeName",
|
|
||||||
width: 120,
|
|
||||||
tooltip: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: "下单时间",
|
title: "下单时间",
|
||||||
key: "createTime",
|
key: "createTime",
|
||||||
|
|||||||
@@ -127,37 +127,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="div-form-default" v-if="afterSaleInfo.serviceStatus != 'APPLY'">
|
|
||||||
<h3>商家处理</h3>
|
|
||||||
<dl>
|
|
||||||
<dt>商家</dt>
|
|
||||||
<dd>
|
|
||||||
<div class="div-content">
|
|
||||||
{{ afterSaleInfo.storeName }}
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<!-- <dl>
|
|
||||||
<dt>审核结果</dt>
|
|
||||||
<dd>
|
|
||||||
<div class="div-content">
|
|
||||||
<span v-if="params.serviceStatus=='PASS'">
|
|
||||||
审核通过
|
|
||||||
</span>
|
|
||||||
<span v-else>
|
|
||||||
审核拒绝
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</dd>
|
|
||||||
</dl> -->
|
|
||||||
<dl>
|
|
||||||
<dt>备注信息</dt>
|
|
||||||
<dd>
|
|
||||||
{{ afterSaleInfo.auditRemark || "暂无备注信息" }}
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="div-flow-center"></div>
|
<div class="div-flow-center"></div>
|
||||||
<div class="div-flow-right">
|
<div class="div-flow-right">
|
||||||
@@ -248,14 +218,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<h3>物流信息</h3>
|
<h3>物流信息</h3>
|
||||||
<dl>
|
|
||||||
<dt>收货商家</dt>
|
|
||||||
<dd>{{ afterSaleInfo.storeName }}</dd>
|
|
||||||
</dl>
|
|
||||||
<dl>
|
|
||||||
<dt>收货商家手机</dt>
|
|
||||||
<dd>{{ storeMsg.salesConsigneeMobile }}</dd>
|
|
||||||
</dl>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>收货地址</dt>
|
<dt>收货地址</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|||||||
@@ -137,9 +137,9 @@
|
|||||||
<Button type="primary" ghost :loading="submitLoading" v-if="arbitrationResultShow == false" @click="arbitrationHandle">
|
<Button type="primary" ghost :loading="submitLoading" v-if="arbitrationResultShow == false" @click="arbitrationHandle">
|
||||||
直接仲裁结束投诉流程
|
直接仲裁结束投诉流程
|
||||||
</Button>
|
</Button>
|
||||||
<Button :loading="submitLoading" v-if="complaintInfo.complainStatus == 'NEW'" @click="handleStoreComplaint">
|
<!-- <Button :loading="submitLoading" v-if="complaintInfo.complainStatus == 'NEW'" @click="handleStoreComplaint">
|
||||||
交由商家申诉
|
交由商家申诉
|
||||||
</Button>
|
</Button> -->
|
||||||
<Button type="primary" :loading="submitLoading" v-if="arbitrationResultShow == true" @click="arbitrationHandleSubmit">
|
<Button type="primary" :loading="submitLoading" v-if="arbitrationResultShow == true" @click="arbitrationHandleSubmit">
|
||||||
提交仲裁
|
提交仲裁
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
<Button v-if="allowOperation.editConsignee" @click="editAddress" type="primary" ghost>修改收货地址</Button>
|
<Button v-if="allowOperation.editConsignee" @click="editAddress" type="primary" ghost>修改收货地址</Button>
|
||||||
<Button v-if="allowOperation.cancel" @click="orderCancel" type="warning" ghost>订单取消</Button>
|
<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="orderInfo.order.orderStatus === 'UNPAID'" @click="confirmPrice" type="primary">收款</Button>
|
||||||
|
<Button v-if="allowOperation.ship" @click="groupShip" type="primary">分包裹发货</Button>
|
||||||
|
|
||||||
|
<Button v-if="allowOperation.take" @click="orderTake" type="primary">订单核销</Button>
|
||||||
|
|
||||||
<Button @click="orderLog" type="info" ghost>订单日志</Button>
|
<Button @click="orderLog" type="info" ghost>订单日志</Button>
|
||||||
<Button @click="printOrder" type="primary" ghost style="float:right;"
|
<Button @click="printOrder" type="primary" ghost style="float:right;"
|
||||||
v-if="$route.query.orderType != 'VIRTUAL'">打印发货单</Button>
|
v-if="$route.query.orderType != 'VIRTUAL'">打印发货单</Button>
|
||||||
@@ -431,7 +435,80 @@
|
|||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
<!--订单分包裹发货-->
|
||||||
|
<Modal v-model="groupShipModal" :loading="shipLoading" title="分包裹发快递" width="1000">
|
||||||
|
<div>
|
||||||
|
<Form ref="groupOrderDeliveryForm" :model="groupOrderDeliveryForm" :label-width="90" :rules="groupOrderDeliverFormValidate" style="position: relative">
|
||||||
|
<FormItem label="物流公司" prop="logisticsId">
|
||||||
|
<Select v-model="groupOrderDeliveryForm.logisticsId" placeholder="请选择" style="width: 250px">
|
||||||
|
<Option v-for="(item, i) in checkedLogistics" :key="i" :value="item.logisticsId">{{ item.name }}
|
||||||
|
</Option>
|
||||||
|
</Select>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem label="物流单号" prop="logisticsNo">
|
||||||
|
<Input v-model="groupOrderDeliveryForm.logisticsNo" style="width: 250px" />
|
||||||
|
</FormItem>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
<Table @on-select="selectGroupShipGoodsMethods" @on-selection-change="selectGroupShipGoodsMethods"
|
||||||
|
@on-select-all="selectGroupShipGoodsMethods" :data="data" :columns="groupShipColumns" border>
|
||||||
|
<template slot="goodsSlot" slot-scope="{ row }">
|
||||||
|
<div style="margin-top: 5px; height: 80px; display: flex">
|
||||||
|
<div style="">
|
||||||
|
<img :src="row.image" style="height: 60px; margin-top: 1px; width: 60px" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-left: 13px">
|
||||||
|
<div class="div-zoom">
|
||||||
|
<a @click="linkTo(row.goodsId, row.skuId)">{{
|
||||||
|
row.goodsName
|
||||||
|
}}</a>
|
||||||
|
</div>
|
||||||
|
<span v-for="(item, key) in JSON.parse(row.specs)" :key="key">
|
||||||
|
<span v-show="key != 'images'" style="font-size: 12px; color: #999999">
|
||||||
|
{{ key }} : {{ item }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<Poptip trigger="hover" style="display: block" 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" class="hover-pointer" width="20" height="20" alt="" />
|
||||||
|
</Poptip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template slot="numSlot" slot-scope="{ row, index }">
|
||||||
|
<InputNumber :min="0" :max="row.___num - row.deliverNumber" v-model="data[index].canNum">
|
||||||
|
</InputNumber>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
|
<div slot="footer">
|
||||||
|
<Button type="default" @click="groupShipModal = false">取消</Button>
|
||||||
|
<Button type="primary" @click="confirmShipGroupGoods">确定</Button>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
<!-- 订单核销 -->
|
||||||
|
<Modal v-model="orderTakeModal" width="530">
|
||||||
|
<p slot="header">
|
||||||
|
<Icon type="edit"></Icon>
|
||||||
|
<span>订单核销</span>
|
||||||
|
</p>
|
||||||
|
<div>
|
||||||
|
<Form ref="orderTakeForm" :model="orderTakeForm" label-position="left" :label-width="100"
|
||||||
|
:rules="orderTakeValidate">
|
||||||
|
<FormItem label="核销码" prop="qrCode">
|
||||||
|
<Input v-model="orderTakeForm.qrCode" size="large" maxlength="10"></Input>
|
||||||
|
</FormItem>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" style="text-align: right">
|
||||||
|
<Button @click="orderTakeModal = false">关闭</Button>
|
||||||
|
<Button type="primary" @click="orderTakeSubmit">核销</Button>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
<multipleMap ref="map" @callback="selectedRegion" />
|
<multipleMap ref="map" @callback="selectedRegion" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -451,6 +528,34 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
// 分包裹发货
|
||||||
|
groupShipModal: false,
|
||||||
|
shipLoading: true,
|
||||||
|
groupOrderDeliveryForm: {
|
||||||
|
logisticsNo: "", //发货单号
|
||||||
|
logisticsId: "", //物流公司
|
||||||
|
},
|
||||||
|
checkedLogistics: [], //选中的物流公司集合
|
||||||
|
|
||||||
|
orderTakeModal: false, //订单核销弹出框
|
||||||
|
|
||||||
|
//订单核销表单
|
||||||
|
orderTakeForm: {
|
||||||
|
qrCode: "",
|
||||||
|
},
|
||||||
|
//验证要调整的订单金额
|
||||||
|
orderTakeValidate: {
|
||||||
|
qrCode: [
|
||||||
|
{ required: true, message: "订单核销码不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
groupOrderDeliverFormValidate: {
|
||||||
|
logisticsNo: [{ required: true, message: "发货单号不能为空", trigger: "change" },],
|
||||||
|
logisticsId: [{ required: true, message: "请选择物流公司", trigger: "blur" },],
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
typeList: [],
|
typeList: [],
|
||||||
showPrices: false,
|
showPrices: false,
|
||||||
printHiddenFlag: false,//隐藏信息
|
printHiddenFlag: false,//隐藏信息
|
||||||
@@ -634,6 +739,40 @@ export default {
|
|||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
// 选择要发货的商品
|
||||||
|
selectGroupShipGoods: [],
|
||||||
|
groupShipColumns: [
|
||||||
|
{type: "selection", width: 60, align: "center",},
|
||||||
|
{title: "商品", key: "goodsName", width: 300, slot: "goodsSlot",},
|
||||||
|
{
|
||||||
|
title: "单价",
|
||||||
|
key: "unitPrice",
|
||||||
|
slot: "priceSlot",
|
||||||
|
width: 100,
|
||||||
|
render: (h, params) => {
|
||||||
|
if (!params.row.unitPrice) {
|
||||||
|
return h("div", this.$options.filters.unitPrice(0, "¥"));
|
||||||
|
}
|
||||||
|
return h("div", this.$options.filters.unitPrice(params.row.unitPrice, "¥"));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{title: "数量", key: "num", slot: "numSlot", width: 120,},
|
||||||
|
{
|
||||||
|
title: "已发包裹",
|
||||||
|
key: "deliverNumber",
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", params.row.deliverNumber ? params.row.deliverNumber : 0);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "小计",
|
||||||
|
key: "subTotal",
|
||||||
|
width: 120,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", this.$options.filters.unitPrice(params.row.subTotal, "¥"));
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -642,6 +781,81 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 选中
|
||||||
|
selectGroupShipGoodsMethods (selected) {
|
||||||
|
this.selectGroupShipGoods = selected;
|
||||||
|
},
|
||||||
|
//订单核销提交
|
||||||
|
orderTakeSubmit () {
|
||||||
|
this.$refs.orderTakeForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
API_Order.orderTake(this.sn, this.orderTakeForm.qrCode).then(
|
||||||
|
(res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("订单核销成功");
|
||||||
|
this.orderTakeModal = false;
|
||||||
|
this.getDataDetail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//弹出订单核销框
|
||||||
|
orderTake () {
|
||||||
|
this.orderTakeForm.qrCode = this.orderInfo.order.verificationCode;
|
||||||
|
this.orderTakeModal = true;
|
||||||
|
},
|
||||||
|
// 分包裹发货
|
||||||
|
groupShip () {
|
||||||
|
this.groupShipModal = true;
|
||||||
|
this.getLogisticsList();
|
||||||
|
},
|
||||||
|
// 分页获取物流公司
|
||||||
|
getLogisticsList () {
|
||||||
|
API_Order.getLogisticsChecked().then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.checkedLogistics = res.result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 分包裹发货
|
||||||
|
confirmShipGroupGoods () {
|
||||||
|
this.$refs.groupOrderDeliveryForm.validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.selectGroupShipGoods.length) {
|
||||||
|
let submit = {
|
||||||
|
...this.groupOrderDeliveryForm,
|
||||||
|
orderSn: this.sn,
|
||||||
|
partDeliveryDTOList: this.selectGroupShipGoods.map((item) => {
|
||||||
|
return {
|
||||||
|
orderItemId: item.id,
|
||||||
|
deliveryNum: item.canNum ? item.canNum : item.num,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
const res = await API_Order.partDelivery(this.sn, submit);
|
||||||
|
if (res.success) {
|
||||||
|
this.$Message.success("发货成功!");
|
||||||
|
this.shipLoading = false;
|
||||||
|
this.getDataDetail();
|
||||||
|
this.getOrderPackage();
|
||||||
|
this.groupShipModal = false;
|
||||||
|
this.groupOrderDeliveryForm = []
|
||||||
|
} else {
|
||||||
|
this.shipLoading = false;
|
||||||
|
this.groupShipModal = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.shipLoading = false;
|
||||||
|
this.groupShipModal = true;
|
||||||
|
this.$Message.error("请选择要发货的商品");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.shipLoading = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
gotoHomes () {
|
gotoHomes () {
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -53,23 +53,6 @@
|
|||||||
style="width: 160px"
|
style="width: 160px"
|
||||||
></DatePicker>
|
></DatePicker>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<!-- <Form-item label="订单状态" prop="orderStatus">-->
|
|
||||||
<!-- <Select-->
|
|
||||||
<!-- v-model="searchForm.orderStatus"-->
|
|
||||||
<!-- placeholder="请选择"-->
|
|
||||||
<!-- clearable-->
|
|
||||||
<!-- style="width: 160px"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <Option value="UNPAID">未付款</Option>-->
|
|
||||||
<!-- <Option value="PAID">已付款</Option>-->
|
|
||||||
<!-- <Option value="UNDELIVERED">待发货</Option>-->
|
|
||||||
<!-- <Option value="DELIVERED">已发货</Option>-->
|
|
||||||
<!-- <Option value="COMPLETED">已完成</Option>-->
|
|
||||||
<!-- <Option value="TAKE">待核验</Option>-->
|
|
||||||
<!-- <Option value="CANCELLED">已关闭</Option>-->
|
|
||||||
<!-- <Option value="STAY_PICKED_UP">待自提</Option>-->
|
|
||||||
<!-- </Select>-->
|
|
||||||
<!-- </Form-item>-->
|
|
||||||
<Button
|
<Button
|
||||||
@click="handleSearch"
|
@click="handleSearch"
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -283,6 +266,10 @@ export default {
|
|||||||
return h("div", [
|
return h("div", [
|
||||||
h("tag", { props: { color: "red" } }, "已关闭"),
|
h("tag", { props: { color: "red" } }, "已关闭"),
|
||||||
]);
|
]);
|
||||||
|
}else if (params.row.orderStatus == "PARTS_DELIVERED") {
|
||||||
|
return h("div", [
|
||||||
|
h("tag", { props: { color: "orange" } }, "部分发货"),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -321,6 +308,7 @@ export default {
|
|||||||
{title: '已付款', value: 'PAID'},
|
{title: '已付款', value: 'PAID'},
|
||||||
{title: '待发货', value: 'UNDELIVERED'},
|
{title: '待发货', value: 'UNDELIVERED'},
|
||||||
{title: '已发货', value: 'DELIVERED'},
|
{title: '已发货', value: 'DELIVERED'},
|
||||||
|
{title: '部分发货', value: 'PARTS_DELIVERED'},
|
||||||
{title: '待核验', value: 'TAKE'},
|
{title: '待核验', value: 'TAKE'},
|
||||||
{title: '待自提', value: 'STAY_PICKED_UP'},
|
{title: '待自提', value: 'STAY_PICKED_UP'},
|
||||||
{title: '已完成', value: 'COMPLETED'},
|
{title: '已完成', value: 'COMPLETED'},
|
||||||
|
|||||||
@@ -150,7 +150,6 @@
|
|||||||
<RadioGroup type="button" button-style="solid" v-model="messageSendForm.messageClient"
|
<RadioGroup type="button" button-style="solid" v-model="messageSendForm.messageClient"
|
||||||
@on-change="selectObject">
|
@on-change="selectObject">
|
||||||
<Radio label="member">会员</Radio>
|
<Radio label="member">会员</Radio>
|
||||||
<Radio label="store">商家</Radio>
|
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
@@ -161,14 +160,7 @@
|
|||||||
<Radio v-if="messageSendForm.messageClient == 'member'" label="MEMBER">指定会员</Radio>
|
<Radio v-if="messageSendForm.messageClient == 'member'" label="MEMBER">指定会员</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="指定商家" v-if="shopShow">
|
|
||||||
<Select v-model="messageSendForm.userIds" filterable multiple style="width: 90%;"
|
|
||||||
label-in-value @on-change="getName">
|
|
||||||
<Option v-for="item in shopList" :value="item.id" :key="item.id" :lable="item.storeName">{{ item.storeName
|
|
||||||
}}
|
|
||||||
</Option>
|
|
||||||
</Select>
|
|
||||||
</FormItem>
|
|
||||||
<FormItem label="选择会员" prop="scopeType"
|
<FormItem label="选择会员" prop="scopeType"
|
||||||
v-if="memberShow">
|
v-if="memberShow">
|
||||||
<Button type="primary" icon="ios-add" @click="addVip" ghost>选择会员</Button>
|
<Button type="primary" icon="ios-add" @click="addVip" ghost>选择会员</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user