master
commit
ba91d7c26d
|
@ -1,16 +1,26 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
|
||||
<Tabs :value="wap[0].title" class="tabs">
|
||||
<TabPane :label="item.title" :name="item.title" @click="clickTag(item, i)" v-for="(item, i) in wap" :key="i">
|
||||
<component ref="lili-component" :is="templateWay[item.name]" @selected="
|
||||
<!-- <template v-for="(item, i) in wap"> -->
|
||||
<TabPane
|
||||
v-for="(item, i) in wap"
|
||||
:label="item.title"
|
||||
:name="item.title"
|
||||
@click="clickTag(item, i)"
|
||||
:key="i"
|
||||
>
|
||||
<component
|
||||
ref="lili-component"
|
||||
:is="templateWay[item.name]"
|
||||
@selected="
|
||||
(val) => {
|
||||
changed = val;
|
||||
}
|
||||
" />
|
||||
"
|
||||
/>
|
||||
</TabPane>
|
||||
<!-- </template> -->
|
||||
</Tabs>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -19,7 +29,7 @@ import goodsDialog from "./goods-dialog";
|
|||
import templateWay from "./template/index";
|
||||
export default {
|
||||
components: {
|
||||
goodsDialog,
|
||||
goodsDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -35,19 +45,32 @@ export default {
|
|||
handler(val) {
|
||||
this.$emit("selectedLink", val[0]); //因为是单选,所以直接返回第一个
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs["lili-component"][0].type = "single"; //商品页面设置成为单选
|
||||
});
|
||||
|
||||
this.wap.forEach((item) => {
|
||||
this.wap.forEach(item => {
|
||||
if (item) {
|
||||
item.selected = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
// isVisible(item) {
|
||||
// const type = this.$route.query.pagetype;
|
||||
// if (type == "INDEX" && [ "discover"].includes(item.name)) {
|
||||
// return false;
|
||||
// }else if(type == "DISCOVER" && item.name == 'special'){
|
||||
// return false;
|
||||
// }else{
|
||||
// return true
|
||||
// }
|
||||
// },
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -5,6 +5,7 @@ import marketing from './marketing.vue'
|
|||
import pages from './pages.vue'
|
||||
import goods from '../goods-dialog.vue'
|
||||
import other from './other.vue'
|
||||
import special from './special.vue'
|
||||
export default {
|
||||
pages,
|
||||
marketing,
|
||||
|
@ -12,4 +13,5 @@ export default {
|
|||
category,
|
||||
goods,
|
||||
other,
|
||||
special
|
||||
}
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div >
|
||||
<div class="tables">
|
||||
<Table
|
||||
border
|
||||
height="350"
|
||||
tooltip
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<Page
|
||||
@on-change="
|
||||
(val) => {
|
||||
params.pageNumber = val;
|
||||
}
|
||||
"
|
||||
:current="params.pageNumber"
|
||||
:page-size="params.pageSize"
|
||||
class="mt_10"
|
||||
:total="Number(totals)"
|
||||
size="small"
|
||||
show-elevator
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getAllPromotion,
|
||||
} from "@/api/promotion";
|
||||
import { getHomeList } from "@/api/other.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
loading: true, //表格请求数据为true
|
||||
promotionList: "", // 活动列表
|
||||
selectedIndex: 0, //左侧菜单选择
|
||||
promotions: "", //选中的活动key
|
||||
index: 999, // 已选下标
|
||||
data:[],
|
||||
params: {
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageClientType: "H5",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
pageType: "SPECIAL",
|
||||
},
|
||||
total: 0, // 表单数据总数
|
||||
columns: [
|
||||
{
|
||||
title: "专题名称",
|
||||
key: "name",
|
||||
tooltip: true,
|
||||
// slot: 'name'
|
||||
// width: 200,
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: this.index == params.index ? "primary" : "",
|
||||
size: "small",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.index = params.index;
|
||||
this.$emit("selected", [params.row]);
|
||||
},
|
||||
},
|
||||
},
|
||||
this.index == params.index ? "已选" : "选择"
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取话题的标题
|
||||
async init() {
|
||||
let res = await getHomeList(this.params);
|
||||
if (res.success) {
|
||||
this.loading = false;
|
||||
this.data= res.result.records
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
.search {
|
||||
width: 300px;
|
||||
}
|
||||
.page {
|
||||
margin-top: 2vh;
|
||||
text-align: right;
|
||||
}
|
||||
.time {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tables {
|
||||
height: 400px;
|
||||
margin-top: 20px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
/deep/ .ivu-table-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.list {
|
||||
margin: 0 1.5%;
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
> .list-item {
|
||||
padding: 10px;
|
||||
transition: 0.35s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.list-item:hover {
|
||||
background: #ededed;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
flex: 1;
|
||||
width: auto;
|
||||
}
|
||||
.content {
|
||||
overflow: hidden;
|
||||
flex: 4;
|
||||
}
|
||||
.active {
|
||||
background: #ededed;
|
||||
}
|
||||
.wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
.search-views {
|
||||
display: flex;
|
||||
> * {
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -29,5 +29,10 @@ export default [
|
|||
title: "其他",
|
||||
url: "3",
|
||||
name: "other"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "专题",
|
||||
url: "4",
|
||||
name: "special"
|
||||
},
|
||||
];
|
||||
|
|
|
@ -82,7 +82,9 @@ export default {
|
|||
pageNumber:1,
|
||||
pageSize:10,
|
||||
sort: 'createTime',
|
||||
order: 'desc'
|
||||
order: 'desc',
|
||||
pageType:"INDEX",
|
||||
pageClientType:"PC",
|
||||
},
|
||||
columns: [
|
||||
// 列表展示的column
|
||||
|
@ -106,10 +108,10 @@ export default {
|
|||
type: "INDEX",
|
||||
title: "首页",
|
||||
},
|
||||
// {
|
||||
// type: "SPECIAL",
|
||||
// title: "专题",
|
||||
// },
|
||||
{
|
||||
type: "SPECIAL",
|
||||
title: "专题",
|
||||
}
|
||||
],
|
||||
list: [], // 模板列表
|
||||
};
|
||||
|
@ -125,7 +127,8 @@ export default {
|
|||
const data = this.formData;
|
||||
data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE");
|
||||
delete data.status;
|
||||
(data.pageType = "INDEX"), (data.pageClientType = "PC");
|
||||
// (data.pageType = "INDEX"), (data.pageClientType = "PC");
|
||||
(data.pageType = this.searchForm.pageType), (data.pageClientType = "PC");
|
||||
if (data.id) {
|
||||
API_floor.updateHome(data.id, data).then((res) => {
|
||||
this.$Message.success("编辑模板成功");
|
||||
|
@ -145,6 +148,13 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
clickType(type,index){
|
||||
this.searchForm.pageNumber = 1
|
||||
this.searchForm.pageType = type;
|
||||
this.selectedIndex = index;
|
||||
this.getTemplateList();
|
||||
},
|
||||
|
||||
createTemp() {
|
||||
// 新建表单
|
||||
this.$refs.form.resetFields();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div class="box">
|
||||
<!-- 顶部栏 -->
|
||||
<navbar @selected="selected" />
|
||||
|
||||
<!-- <navbar @selected="selected" /> -->
|
||||
<navbar @selected="selected" :pagetype="pagetype"/>
|
||||
<component :is="layout[name]"></component>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -11,16 +11,21 @@ import layout from "./index";
|
|||
import navbar from "./navbar";
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
navbar
|
||||
},
|
||||
mounted() {
|
||||
this.pagetype = this.$route.query.pagetype;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
layout, // 装修模块
|
||||
name: "index", // 装修的页面
|
||||
pagetype: "INDEX"
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selected(val) { // 顶部栏点击切换
|
||||
selected(val) {
|
||||
// 顶部栏点击切换
|
||||
this.name = val;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
v-for="(item, index) in way"
|
||||
:key="index"
|
||||
:type="item.selected ? 'primary' : ''"
|
||||
>
|
||||
{{ item.title }}
|
||||
</Button>
|
||||
>{{ item.title }}</Button>
|
||||
</div>
|
||||
<div class="model-title-view-btn">
|
||||
<!-- TODO 后期会补全 目前版本暂无 -->
|
||||
|
@ -33,7 +31,8 @@
|
|||
>
|
||||
<div v-if="progress">
|
||||
<div class="model-item">
|
||||
模板名称 <Input style="width: 200px" v-model="submitWay.name" />
|
||||
模板名称
|
||||
<Input style="width: 200px" v-model="submitWay.name"/>
|
||||
</div>
|
||||
<div class="model-item">
|
||||
是否立即发布
|
||||
|
@ -54,6 +53,7 @@
|
|||
import * as API_Other from "@/api/other.js";
|
||||
|
||||
export default {
|
||||
props: ["pagetype"],
|
||||
data() {
|
||||
return {
|
||||
progress: true, // 展示进度
|
||||
|
@ -61,11 +61,11 @@ export default {
|
|||
saveDialog: false, // 加载状态
|
||||
way: [
|
||||
// 装修tab栏切换
|
||||
{
|
||||
title: "首页",
|
||||
name: "index",
|
||||
selected: true,
|
||||
},
|
||||
// {
|
||||
// title: "首页",
|
||||
// name: "index",
|
||||
// selected: true,
|
||||
// },
|
||||
// {
|
||||
// title: "全屏广告",
|
||||
// name: "advertising",
|
||||
|
@ -82,11 +82,23 @@ export default {
|
|||
// 表单信息
|
||||
pageShow: this.$route.query.type || false,
|
||||
name: this.$route.query.name || "模板名称",
|
||||
pageClientType: "H5",
|
||||
},
|
||||
pageClientType: "H5"
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
watch: {
|
||||
pagetype: {
|
||||
handler(val) {
|
||||
this.way.length = 0;
|
||||
if (val == "INDEX") {
|
||||
this.way.push({ title: "首页", name: "index", selected: true });
|
||||
} else if (val == "SPECIAL") {
|
||||
this.way.push({ title: "专题", name: "special", selected: true });
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
clickBtn(val) {
|
||||
|
@ -116,7 +128,8 @@ export default {
|
|||
: (this.submitWay.pageShow = "CLOSE");
|
||||
|
||||
this.submitWay.pageData = JSON.stringify(this.$store.state.styleStore);
|
||||
this.submitWay.pageType = "INDEX";
|
||||
// this.submitWay.pageType = "INDEX";
|
||||
this.submitWay.pageType = this.pagetype;
|
||||
|
||||
this.$route.query.id ? this.update() : this.submit(this.submitWay);
|
||||
},
|
||||
|
@ -128,10 +141,11 @@ export default {
|
|||
pageData: JSON.stringify(this.$store.state.styleStore),
|
||||
name: this.submitWay.name,
|
||||
pageShow: this.submitWay.pageShow,
|
||||
pageType: "INDEX",
|
||||
pageClientType: "H5",
|
||||
// pageType: "INDEX",
|
||||
pageType: this.pagetype,
|
||||
pageClientType: "H5"
|
||||
})
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
this.num = 50;
|
||||
if (res.success) {
|
||||
this.num = 80;
|
||||
|
@ -147,13 +161,13 @@ export default {
|
|||
}
|
||||
console.log(res);
|
||||
})
|
||||
.catch((error) => {});
|
||||
.catch(error => {});
|
||||
},
|
||||
|
||||
// 返回查询数据页面
|
||||
goback() {
|
||||
this.$router.push({
|
||||
path: "/wapList",
|
||||
path: "/wapList"
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -161,7 +175,7 @@ export default {
|
|||
submit(submitWay) {
|
||||
this.progress = false;
|
||||
API_Other.setHomeSetup(submitWay)
|
||||
.then((res) => {
|
||||
.then(res => {
|
||||
this.num = 50;
|
||||
if (res.success) {
|
||||
this.num = 80;
|
||||
|
@ -178,9 +192,9 @@ export default {
|
|||
}
|
||||
console.log(res);
|
||||
})
|
||||
.catch((error) => {});
|
||||
},
|
||||
},
|
||||
.catch(error => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<Card class="category">
|
||||
<div :class="{active:i == selectedIndex}" class="category-item" v-for="(typeItem,i) in pageTypes" :key="typeItem.type">
|
||||
<div
|
||||
:class="{active:i == selectedIndex}"
|
||||
class="category-item"
|
||||
v-for="(typeItem,i) in pageTypes"
|
||||
:key="typeItem.type"
|
||||
>
|
||||
<div @click="clickType(typeItem.type,i)">{{typeItem.title}}</div>
|
||||
</div>
|
||||
</Card>
|
||||
|
@ -32,12 +37,18 @@
|
|||
</div>
|
||||
<div class="no-more" v-if="list.length ==0">暂无更多模板</div>
|
||||
</div>
|
||||
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" show-sizer :page-size-opts="[10, 20, 50]" @on-page-size-change="changePageSize"/>
|
||||
|
||||
<Page
|
||||
:total="total"
|
||||
size="small"
|
||||
@on-change="(val) => {params.pageNumber = val; } "
|
||||
:current="params.pageNumber"
|
||||
:page-size="params.pageSize"
|
||||
show-sizer
|
||||
:page-size-opts="[10, 20, 50]"
|
||||
@on-page-size-change="changePageSize"
|
||||
/>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import * as API_Other from "@/api/other.js";
|
||||
|
@ -46,51 +57,54 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
selectedIndex: 0, // 装修那个页面的下标
|
||||
columns: [ // 表头
|
||||
columns: [
|
||||
// 表头
|
||||
{
|
||||
title: "页面名称",
|
||||
key: "name",
|
||||
key: "name"
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
title: "状态"
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
key: "action",
|
||||
},
|
||||
key: "action"
|
||||
}
|
||||
],
|
||||
|
||||
loading: false, // 加载状态
|
||||
pageTypes: [ // 装修类型
|
||||
pageTypes: [
|
||||
// 装修类型
|
||||
{
|
||||
type: "INDEX",
|
||||
title: "首页",
|
||||
title: "首页"
|
||||
},
|
||||
{
|
||||
type: "SPECIAL",
|
||||
title: "专题",
|
||||
},
|
||||
title: "专题"
|
||||
}
|
||||
],
|
||||
params: { // 请求参数
|
||||
params: {
|
||||
// 请求参数
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
sort: "createTime",
|
||||
order: "desc",
|
||||
pageType: "INDEX",
|
||||
pageClientType: "H5",
|
||||
pageClientType: "H5"
|
||||
},
|
||||
total: 0, // 页面数量
|
||||
list: [], // 总数据
|
||||
list: [] // 总数据
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
params: {
|
||||
handler(val) {
|
||||
// this.pageNumber++;
|
||||
this.init();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
// params: {
|
||||
// handler(val) {
|
||||
// // this.pageNumber++;
|
||||
// this.init();
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
|
@ -98,14 +112,15 @@ export default {
|
|||
methods: {
|
||||
// 切换tab
|
||||
clickType(val, index) {
|
||||
this.params.pageNumber = 1
|
||||
this.selectedIndex = index
|
||||
this.params.pageNumber = 1;
|
||||
this.selectedIndex = index;
|
||||
this.params.pageType = val;
|
||||
this.init();
|
||||
},
|
||||
// 是否发布
|
||||
changeSwitch(item) {
|
||||
this.loading = true;
|
||||
API_Other.releasePageHome(item.id).then((res) => {
|
||||
API_Other.releasePageHome(item.id).then(res => {
|
||||
if (res.result) {
|
||||
this.loading = false;
|
||||
this.$Message.success("发布成功");
|
||||
|
@ -120,10 +135,10 @@ export default {
|
|||
// 初始化数据
|
||||
init() {
|
||||
this.loading = true;
|
||||
API_Other.getHomeList(this.params).then((res) => {
|
||||
API_Other.getHomeList(this.params).then(res => {
|
||||
if (!res.result) return false;
|
||||
this.loading = false;
|
||||
res.result.records.forEach((item) => {
|
||||
res.result.records.forEach(item => {
|
||||
if (item.pageShow == "OPEN") {
|
||||
item.pageShow = true;
|
||||
} else {
|
||||
|
@ -139,13 +154,20 @@ export default {
|
|||
handleEdit(val) {
|
||||
this.$router.push({
|
||||
path: "/floorList/main",
|
||||
query: { id: val.id, name: val.name, type: val.pageShow },
|
||||
// query: { id: val.id, name: val.name, type: val.pageShow },
|
||||
query: {
|
||||
id: val.id,
|
||||
name: val.name,
|
||||
type: val.pageShow,
|
||||
pagetype: this.params.pageType
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加模板
|
||||
handleAdd() {
|
||||
this.$router.push({
|
||||
path: "/floorList/main",
|
||||
query: { pagetype: this.params.pageType }
|
||||
});
|
||||
},
|
||||
// 分页 改变页数
|
||||
|
@ -157,7 +179,7 @@ export default {
|
|||
// 删除模板
|
||||
handleDel(val) {
|
||||
this.loading = true;
|
||||
API_Other.removePageHome(val.id).then((res) => {
|
||||
API_Other.removePageHome(val.id).then(res => {
|
||||
if (res.result) {
|
||||
this.loading = false;
|
||||
this.init();
|
||||
|
@ -166,8 +188,8 @@ export default {
|
|||
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
<FormItem label="reqURL" prop="reqURL">
|
||||
<Input v-model="formValidate.reqURL" />
|
||||
</FormItem>
|
||||
<FormItem label="电子面单URL" prop="sheetReqURL">
|
||||
<Input v-model="formValidate.sheetReqURL" />
|
||||
</FormItem>
|
||||
<div class="label-btns">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
|
||||
|
@ -24,7 +27,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { ebusinessID: "", reqURL: "", appKey: "" }, // 表单数据
|
||||
formValidate: { ebusinessID: "", reqURL: "", appKey: "" ,sheetReqURL: "" ,}, // 表单数据
|
||||
};
|
||||
},
|
||||
props: ["res",'type'],
|
||||
|
|
|
@ -13,11 +13,15 @@ var BASE = {
|
|||
// buyer: "http://localhost:8888",
|
||||
// seller: "http://localhost:8889",
|
||||
// manager: "http://localhost:8887"
|
||||
common:"http://192.168.0.113:8890",
|
||||
common:"http://127.0.0.1:8890",
|
||||
buyer:"http://192.168.0.113:8888",
|
||||
manager:"http://192.168.0.113:8887",
|
||||
<<<<<<< HEAD
|
||||
seller:"http://192.168.0.113:8889"
|
||||
>>>>>>> 32336decc6e9e0ae8a0e67033f8ca66a89bbd372
|
||||
=======
|
||||
seller:"http://127.0.0.1:8889"
|
||||
>>>>>>> 4ea142ea086a3f534419a31b595de80497e16d90
|
||||
},
|
||||
API_PROD: {
|
||||
common: "https://common-api.pickmall.cn",
|
||||
|
|
|
@ -31,4 +31,8 @@ export const updateLogistics = (id,params) => {
|
|||
return putRequest(`/other/logistics/${id}`,params);
|
||||
};
|
||||
|
||||
export const getCheckedOn = params =>{
|
||||
return getRequest(`/other/logistics/getCheckedFaceSheet`,params);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@ export const queryExportOrder = params => {
|
|||
return getRequest(`/order/order/queryExportOrder`, params);
|
||||
};
|
||||
|
||||
//获取电子面单
|
||||
export const getOrderFaceSheet= (orderSn,params) =>{
|
||||
return postRequest(`/order/order/${orderSn}/createElectronicsFaceSheet`,params)
|
||||
}
|
||||
|
||||
// 上传待发货的订单列表
|
||||
export const uploadDeliverExcel = params => {
|
||||
|
|
|
@ -41,10 +41,24 @@ export const getBillDetail = (id, params) => {
|
|||
export const getLogistics = (id, params) => {
|
||||
return getRequest(`/other/logistics`, params)
|
||||
}
|
||||
//返回信息
|
||||
export const getIsCheck =(logisticsId) =>{
|
||||
return getRequest(`other/logistics/${logisticsId}/getStoreLogistics`)
|
||||
}
|
||||
|
||||
// 开启物流公司
|
||||
export const logisticsChecked = (id, params) => {
|
||||
return postRequest(`/other/logistics/${id}`, params)
|
||||
return postRequest(`/other/logistics/${id}`, params, {
|
||||
"Content-type": "application/json"
|
||||
})
|
||||
}
|
||||
//获取发货地址
|
||||
export const getDeliverAddress = () =>{
|
||||
return getRequest(`/settings/storeSettings/storeDeliverGoodsAddress`)
|
||||
}
|
||||
//修改发货地址
|
||||
export const editDeliverAddress = (params) =>{
|
||||
return putRequest(`/settings/storeSettings/storeDeliverGoodsAddress`,params)
|
||||
}
|
||||
|
||||
// 关闭开启物流公司
|
||||
|
@ -117,4 +131,9 @@ export const editShipTemplate = (id, params, headers) => {
|
|||
return putRequest(`/setting/freightTemplate/${id}`, params, headers)
|
||||
}
|
||||
|
||||
//修改电子面单等信息
|
||||
export const editChecked = (logisticsId,params) => {
|
||||
return putRequest(`/other/logistics/${logisticsId}/updateStoreLogistics`,params)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
</Row>
|
||||
<Row class="operation padding-row">
|
||||
<Button @click="addGoods" type="primary">添加商品</Button>
|
||||
<Button @click="openImportGoods" type="primary">导入商品</Button>
|
||||
<Dropdown @on-click="handleDropdown">
|
||||
<Button type="default">
|
||||
批量操作
|
||||
|
@ -179,6 +180,20 @@
|
|||
<Button type="primary" @click="saveShipTemplate">更新</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal title="导入商品信息" v-model="importModal" :mask-closable="false">
|
||||
<div>
|
||||
<Upload :before-upload="handleUpload" name="files" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||
multiple type="drag" :action="action" :headers="accessToken">
|
||||
<div style="padding: 50px 0">
|
||||
<Icon type="ios-cloud-upload" size="102" style="color: #3399ff"></Icon>
|
||||
<h2>选择或拖拽文件上传</h2>
|
||||
</div>
|
||||
</Upload>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<Button type="text" @click="importModal = false">确定</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -192,12 +207,16 @@ import {
|
|||
deleteGoods,
|
||||
batchShipTemplate,
|
||||
} from "@/api/goods";
|
||||
import { baseUrl } from "@/libs/axios.js";
|
||||
import * as API_Shop from "@/api/shops";
|
||||
|
||||
export default {
|
||||
name: "goods",
|
||||
data() {
|
||||
return {
|
||||
accessToken: {}, // 验证token
|
||||
importModal: false,
|
||||
action: baseUrl + "/goods/import/import", // 上传接口
|
||||
id: "", //要操作的id
|
||||
loading: true, // 表单加载状态
|
||||
shipTemplateForm: {}, // 物流模板
|
||||
|
@ -486,6 +505,15 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
// 上传数据
|
||||
handleUpload(file) {
|
||||
this.file = file;
|
||||
this.upload();
|
||||
return false;
|
||||
},
|
||||
openImportGoods(){
|
||||
this.importModal = true
|
||||
},
|
||||
// 更新库存
|
||||
updateStock() {
|
||||
let updateStockList = this.stockList.map((i) => {
|
||||
|
@ -727,9 +755,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
mounted() {
|
||||
this.init();
|
||||
this.accessToken.accessToken = this.getStore("accessToken");
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<Button v-if="allowOperation.ship" @click="orderDeliver" type="primary"
|
||||
>发货</Button
|
||||
>
|
||||
<Button @click="Toprint" type="primary" ghost v-if="allowOperation.ship">打印电子面单</Button>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
|
@ -439,13 +440,31 @@
|
|||
<span>订单发货</span>
|
||||
</p>
|
||||
<div>
|
||||
<Form :model="faceSheetForm" ref="faceSheetForm" v-if="facesheetFlag" :rules="faceSheetFormValidate">
|
||||
<FormItem label="物流公司" prop="logisticsId" style="position: relative" :label-width="90">
|
||||
<Select
|
||||
v-model="faceSheetForm.logisticsId"
|
||||
placeholder="请选择"
|
||||
style="width: 250px"
|
||||
>
|
||||
<Option
|
||||
v-for="(item, i) in checkedLogistics"
|
||||
:key="i"
|
||||
:value="item.logisticsId"
|
||||
>{{ item.name }}
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<Form
|
||||
v-else
|
||||
ref="orderDeliveryForm"
|
||||
:model="orderDeliveryForm"
|
||||
:label-width="90"
|
||||
:rules="orderDeliverFormValidate"
|
||||
style="position: relative"
|
||||
>
|
||||
|
||||
<FormItem label="物流公司" prop="logisticsId">
|
||||
<Select
|
||||
v-model="orderDeliveryForm.logisticsId"
|
||||
|
@ -455,11 +474,12 @@
|
|||
<Option
|
||||
v-for="(item, i) in checkedLogistics"
|
||||
:key="i"
|
||||
:value="item.id"
|
||||
:value="item.logisticsId"
|
||||
>{{ item.name }}
|
||||
</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
<!-- v-if="showOrder" -->
|
||||
<FormItem label="物流单号" prop="logisticsNo" >
|
||||
<Input
|
||||
v-model="orderDeliveryForm.logisticsNo"
|
||||
|
@ -479,6 +499,7 @@
|
|||
|
||||
<script>
|
||||
import * as API_Order from "@/api/order";
|
||||
import * as API_Logistics from "@/api/logistics";
|
||||
import liliMap from "@/views/my-components/map/index";
|
||||
import * as RegExp from "@/libs/RegExp.js";
|
||||
import region from "@/views/lili-components/region";
|
||||
|
@ -495,6 +516,16 @@ export default {
|
|||
region: [], //地区
|
||||
regionId: [], //地区id
|
||||
showRegion: false,
|
||||
someJSONdata: '',
|
||||
faceSheetForm: {
|
||||
logisticsId: '',
|
||||
},
|
||||
faceSheetFormValidate: {
|
||||
logisticsId: [
|
||||
{ required: true, message: "请选择物流公司"},
|
||||
],
|
||||
},
|
||||
facesheetFlag: false, //电子面单标识
|
||||
orderLogModal: false, //弹出调整价格框
|
||||
logisticsModal: false, //弹出查询物流框
|
||||
orderDeliverModal: false, //订单发货弹出框
|
||||
|
@ -716,6 +747,15 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
Toprint(){
|
||||
this.facesheetFlag = true;
|
||||
API_Logistics.getCheckedOn().then(res => {
|
||||
if (res.success) {
|
||||
this.checkedLogistics = res.result;
|
||||
this.orderDeliverModal = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改订单金额
|
||||
modifyPrice() {
|
||||
//默认要修改的金额为订单总金额
|
||||
|
@ -754,6 +794,7 @@ export default {
|
|||
},
|
||||
//订单发货
|
||||
orderDeliver() {
|
||||
this.facesheetFlag = false
|
||||
API_Order.getLogisticsChecked().then((res) => {
|
||||
if (res.success) {
|
||||
this.checkedLogistics = res.result;
|
||||
|
@ -761,9 +802,27 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
Toprints(){
|
||||
if(this.form.logisticsId != null && this.form.logisticsId != ''){
|
||||
this.orderDeliverModal = false;
|
||||
this.modalPrint = true;
|
||||
}
|
||||
},
|
||||
//订单发货提交
|
||||
orderDeliverySubmit() {
|
||||
this.$refs.orderDeliveryForm.validate((valid) => {
|
||||
if(this.facesheetFlag){
|
||||
this.$refs['faceSheetForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
API_Order.getOrderFaceSheet(this.sn, this.faceSheetForm).then(res => {
|
||||
if (res.success) {
|
||||
this.someJSONdata = res.result;
|
||||
this.Toprints();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.$refs['orderDeliveryForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
API_Order.orderDelivery(this.sn,this.orderDeliveryForm).then(
|
||||
(res) => {
|
||||
|
@ -776,6 +835,7 @@ export default {
|
|||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
//弹出修改收货地址框
|
||||
editAddress() {
|
||||
|
|
|
@ -9,6 +9,82 @@
|
|||
ref="table"
|
||||
></Table>
|
||||
</Card>
|
||||
<Modal v-model="openModal" :title="openModalTitle" @on-ok="submit">
|
||||
<h3 style="color: #ff3c2a; margin-bottom: 10px">是否需要电子面单</h3>
|
||||
<RadioGroup
|
||||
v-model="faceSheetForm.faceSheetFlag"
|
||||
style="margin-bottom: 20px"
|
||||
@on-change="getfaceSheetFlag($event)"
|
||||
>
|
||||
<Radio :label="true">
|
||||
<span>需要</span>
|
||||
</Radio>
|
||||
<Radio :label="false">
|
||||
<span>不需要</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
<Card v-if="onpenText" class="modalStyle">
|
||||
<h3 style="color: #ff3c2a; margin-bottom: 10px">请输入详细信息</h3>
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="faceSheetForm" :rules="ruleValidate">
|
||||
<FormItem label="customerName" prop="customerName">
|
||||
<Input
|
||||
v-model="faceSheetForm.customerName"
|
||||
type="text"
|
||||
class="faceSheetInput"
|
||||
></Input
|
||||
></FormItem>
|
||||
<FormItem label="customerPwd" prop="customerPwd">
|
||||
<Input
|
||||
v-model="faceSheetForm.customerPwd"
|
||||
type="text"
|
||||
class="faceSheetInput"
|
||||
></Input>
|
||||
</FormItem>
|
||||
<FormItem label="customerPwd" prop="monthCode">
|
||||
<Input
|
||||
v-model="faceSheetForm.monthCode"
|
||||
type="text"
|
||||
class="faceSheetInput"
|
||||
></Input
|
||||
></FormItem>
|
||||
<FormItem label="customerPwd" prop="sendSite">
|
||||
<Input
|
||||
v-model="faceSheetForm.sendSite"
|
||||
type="text"
|
||||
class="faceSheetInput"
|
||||
></Input
|
||||
></FormItem>
|
||||
<FormItem label="customerPwd" prop="sendStaff">
|
||||
<Input
|
||||
v-model="faceSheetForm.sendStaff"
|
||||
type="text"
|
||||
class="faceSheetInput"
|
||||
></Input
|
||||
></FormItem>
|
||||
<FormItem label="支付方式" prop="payType">
|
||||
<Select
|
||||
v-model="faceSheetForm.payType"
|
||||
class="faceSheetInput">
|
||||
<Option value="1">现付</Option>
|
||||
<Option value="2">到付</Option>
|
||||
<Option value="3">月结</Option>
|
||||
<Option value="4">第三方支付(仅SF支持)</Option>
|
||||
</Select
|
||||
></FormItem>
|
||||
<FormItem label="快递类型" prop="expType">
|
||||
<Input
|
||||
v-model="faceSheetForm.expType"
|
||||
type="text"
|
||||
class="faceSheetInput"/>
|
||||
</FormItem>
|
||||
<div style="width:100%;text-align:center;">
|
||||
<a style="padding-right: 20px" @click="frontDownload('use')">使用说明</a>
|
||||
<a @click="frontDownload('type')">快递类型</a>
|
||||
</div>
|
||||
</Form>
|
||||
</Card>
|
||||
<br/>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -19,6 +95,8 @@
|
|||
name: "logistics",
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
openModal: false,
|
||||
loading: true, // 表单加载状态
|
||||
searchForm: {
|
||||
// 搜索框初始化对象
|
||||
|
@ -27,6 +105,27 @@
|
|||
sort: "createTime", // 默认排序字段
|
||||
order: "desc", // 默认排序方式
|
||||
},
|
||||
openModalTitle: '开启信息',
|
||||
ruleValidate: {
|
||||
customerName: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
payType: [{ required: true, message: "请填写必填项" ,trigger: "change" }],
|
||||
expType: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
customerPwd: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
monthCode: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
sendSite: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
sendStaff: [{ required: true, message: "请填写必填项" ,trigger: "blur" }],
|
||||
|
||||
},
|
||||
faceSheetForm: {
|
||||
faceSheetFlag: false,
|
||||
customerName: "",
|
||||
payType: '1',
|
||||
expType: '1',
|
||||
customerPwd: "",
|
||||
monthCode: "",
|
||||
sendSite: "",
|
||||
sendStaff: "",
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "物流公司",
|
||||
|
@ -94,6 +193,21 @@
|
|||
},
|
||||
"关闭"
|
||||
),
|
||||
h(
|
||||
"Button",
|
||||
{
|
||||
props: {
|
||||
type: "info",
|
||||
size: "small",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.getFaceSheetInfo(params.row);
|
||||
},
|
||||
},
|
||||
},
|
||||
"修改"
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -101,9 +215,21 @@
|
|||
},
|
||||
],
|
||||
data: [], // 表单数据
|
||||
onpenText: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//获取状态
|
||||
getfaceSheetFlag(e) {
|
||||
console.log(e);
|
||||
if (e === true) {
|
||||
console.log("打开");
|
||||
this.onpenText = true;
|
||||
} else {
|
||||
console.log("关闭");
|
||||
this.onpenText = false;
|
||||
}
|
||||
},
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getDataList();
|
||||
|
@ -121,21 +247,76 @@
|
|||
},
|
||||
// 开启
|
||||
open(v) {
|
||||
this.$Modal.confirm({
|
||||
title: "确认开启",
|
||||
// 记得确认修改此处
|
||||
content: "您确认开启此物流公司?",
|
||||
loading: true,
|
||||
onOk: () => {
|
||||
API_Shop.logisticsChecked(v.id).then((res) => {
|
||||
this.row = v;
|
||||
this.openModal = true;
|
||||
this.searchForm.faceSheetFlag = "false"; //开弹框 等于v
|
||||
if (this.searchForm.faceSheetFlag == "true") {
|
||||
this.onpenText = true;
|
||||
} else {
|
||||
this.onpenText = false;
|
||||
}
|
||||
},
|
||||
//修改
|
||||
getFaceSheetInfo(v) {
|
||||
this.row = v;
|
||||
this.logisticsId = v.logisticsId;
|
||||
this.openModalTitle = '修改信息';
|
||||
API_Shop.getIsCheck(this.logisticsId).then((res) => {
|
||||
if (res.success) {
|
||||
// this.searchForm = res.result.recordes;
|
||||
this.faceSheetForm.faceSheetFlag = res.result.faceSheetFlag; //开弹框 等于v
|
||||
if (this.faceSheetForm.faceSheetFlag === true) {
|
||||
this.onpenText = true;
|
||||
} else {
|
||||
this.faceSheetForm.faceSheetFlag = false
|
||||
this.onpenText = false;
|
||||
}
|
||||
this.faceSheetForm.customerName = res.result.customerName;
|
||||
this.faceSheetForm.customerPwd = res.result.customerPwd;
|
||||
this.faceSheetForm.monthCode = res.result.monthCode;
|
||||
this.faceSheetForm.sendSite = res.result.sendSite;
|
||||
this.faceSheetForm.sendStaff = res.result.sendStaff;
|
||||
}
|
||||
});
|
||||
this.openModal = true;
|
||||
},
|
||||
frontDownload(val) {
|
||||
var a = document.createElement("a"); //创建一个<a></a>标签
|
||||
//根据点击按钮来下载不同文件
|
||||
if (val === 'use') {
|
||||
a.href = "static/open.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = "使用说明.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
} else if (val === 'type') {
|
||||
a.href = "static/logisticsType.xlsx"; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = "快递类型.xlsx"; //设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
}
|
||||
a.style.display = "none"; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a); // 将a标签追加到文档对象中
|
||||
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove(); // 一次性的,用完就删除a标签
|
||||
},
|
||||
|
||||
submit() {
|
||||
if ( this.row.selected === null || this.row.selected === "") {
|
||||
API_Shop.logisticsChecked(
|
||||
this.row.logisticsId,
|
||||
this.faceSheetForm
|
||||
).then((res) => {
|
||||
this.openModal = false;
|
||||
this.$Modal.remove();
|
||||
if (res.success) {
|
||||
this.$Message.success("物流公司开启成功");
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
API_Shop.editChecked(this.logisticsId, this.faceSheetForm).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success("修改成功");
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 关闭
|
||||
close(v) {
|
||||
|
@ -160,3 +341,9 @@
|
|||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.faceSheetInput{
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -61,6 +61,77 @@
|
|||
</Form-item>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="发货地址">
|
||||
<Form
|
||||
ref="addressGoods"
|
||||
:model="addressGoods"
|
||||
:label-width="100"
|
||||
:rules="addressGoodsValidate"
|
||||
>
|
||||
<FormItem label="发货人姓名" prop="salesConsignorName">
|
||||
<Input
|
||||
v-model="addressGoods.salesConsignorName"
|
||||
maxlength="11"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem label="发货人手机号" prop="salesConsignorMobile">
|
||||
<Input
|
||||
v-model="addressGoods.salesConsignorMobile"
|
||||
maxlength="11"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<FormItem label="地址" prop="salesConsignorAddressId">
|
||||
<Input
|
||||
v-model="regionGoods"
|
||||
clearable
|
||||
disabled
|
||||
style="width: 20%"
|
||||
v-if="showRegion == false"
|
||||
>
|
||||
</Input>
|
||||
<regionMap
|
||||
style="width: 20%"
|
||||
@selected="selectedRegionGoods"
|
||||
v-if="showRegion == true"
|
||||
/>
|
||||
<Button
|
||||
v-if="showRegion == false"
|
||||
@click="regionClicks"
|
||||
type="primary"
|
||||
style="margin-left: 8px"
|
||||
>修改
|
||||
</Button>
|
||||
</FormItem>
|
||||
<!-- <FormItem label="地址名称" prop="salesConsignorAddressPath">
|
||||
<Input
|
||||
v-model="addressGoods.salesConsignorAddressPath"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
>
|
||||
</Input>
|
||||
</FormItem> -->
|
||||
<FormItem label="详细地址" prop="salesConsignorDetail">
|
||||
<Input
|
||||
v-model="addressGoods.salesConsignorDetail"
|
||||
clearable
|
||||
style="width: 20%"
|
||||
>
|
||||
</Input>
|
||||
</FormItem>
|
||||
<Button
|
||||
@click="SetAddressGoods"
|
||||
type="primary"
|
||||
style="margin-left: 8px"
|
||||
>确认
|
||||
</Button>
|
||||
</Form>
|
||||
</TabPane>
|
||||
<TabPane label="退货地址" name="REFUND_GOODS_ADDRESS">
|
||||
<Form
|
||||
ref="addressForm"
|
||||
|
@ -194,6 +265,7 @@ import liliMap from "@/views/my-components/map/index";
|
|||
import regionMap from "@/views/lili-components/region";
|
||||
import * as RegExp from "@/libs/RegExp.js";
|
||||
import Cookies from "js-cookie";
|
||||
import {editDeliverAddress, getDeliverAddress} from "../../api/shops";
|
||||
|
||||
export default {
|
||||
name: "shopSetting",
|
||||
|
@ -306,12 +378,64 @@ export default {
|
|||
],
|
||||
},
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
//发货地址
|
||||
addressGoods: {
|
||||
salesConsignorName:" ",
|
||||
salesConsignorMobile:" ",
|
||||
salesConsignorAddressId: " ",
|
||||
salesConsignorAddressPath: " ",
|
||||
salesConsignorDetail: " ",
|
||||
},
|
||||
regionGoods:"",//发货地址
|
||||
addressGoodsValidate: {
|
||||
salesConsignorName: [
|
||||
{ required: true, message: "请输入发货人姓名", trigger: "blur" },
|
||||
],
|
||||
salesConsignorMobile: [
|
||||
{ required: true, message: "手机号不能为空", trigger: "blur" },
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
trigger: "blur",
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
],
|
||||
salesConsignorDetail: [
|
||||
{ required: true, message: "请输入详细地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 初始化数据
|
||||
init() {
|
||||
this.getShopInfo();
|
||||
this.getDeliverAddress()
|
||||
},
|
||||
selectedRegionGoods(val){
|
||||
this.regionGoods = val[1];
|
||||
this.regionIdS = val[0];
|
||||
},
|
||||
regionClicks(){
|
||||
this.showRegion = true;
|
||||
this.regionIdS = "";
|
||||
},
|
||||
SetAddressGoods(){
|
||||
console.log(this.$refs.addressGoods)
|
||||
if (this.regionIdS == "") {
|
||||
this.$Message.error("请选择地址");
|
||||
return;
|
||||
}
|
||||
this.$refs.addressGoods.validate((valid) => {
|
||||
if (valid) {
|
||||
this.addressGoods.salesConsignorAddressPath = this.regionGoods;
|
||||
this.addressGoods.salesConsignorAddressId = this.regionIdS;
|
||||
API_Shop.editDeliverAddress(this.addressGoods).then(res=>{
|
||||
if(res.success){
|
||||
this.$Message.success("修改成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取店铺信息
|
||||
getShopInfo() {
|
||||
|
@ -335,8 +459,22 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
pageShow(type){
|
||||
this.form.pageShow = type
|
||||
=======
|
||||
getDeliverAddress(){
|
||||
API_Shop.getDeliverAddress().then(res=>{
|
||||
if(res.success){
|
||||
if(res.result!= '' && res.result != null){
|
||||
console.log(89898999998)
|
||||
this.addressGoods = res.result;
|
||||
this.regionGoods = res.result.salesConsignorAddressPath;
|
||||
this.regionIdS = res.result.salesConsignorAddressId;
|
||||
}
|
||||
}
|
||||
})
|
||||
>>>>>>> 4ea142ea086a3f534419a31b595de80497e16d90
|
||||
},
|
||||
//修改售后地址
|
||||
regionClick() {
|
||||
|
|
Loading…
Reference in New Issue