Merge branch 'dev-ryan' into ma
commit
ae730cacf3
|
@ -8,13 +8,14 @@ import {
|
||||||
getRequestWithNoToken,
|
getRequestWithNoToken,
|
||||||
putRequestWithNoForm,
|
putRequestWithNoForm,
|
||||||
postRequestWithNoForm,
|
postRequestWithNoForm,
|
||||||
commonUrl,
|
|
||||||
managerUrl
|
managerUrl
|
||||||
} from "@/libs/axios";
|
} from "@/libs/axios";
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
|
|
||||||
|
let commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common)
|
||||||
|
|
||||||
// 文件上传接口
|
// 文件上传接口
|
||||||
export const uploadFile = commonUrl + "/common/upload/file";
|
export const uploadFile = commonUrl+ "/common/upload/file";
|
||||||
// 验证码渲染图片接口
|
// 验证码渲染图片接口
|
||||||
export const drawCodeImage = commonUrl + "/common/captcha/draw/";
|
export const drawCodeImage = commonUrl + "/common/captcha/draw/";
|
||||||
// 获取菜单
|
// 获取菜单
|
||||||
|
|
|
@ -17,10 +17,10 @@ export default {
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
api_dev: {
|
api_dev: {
|
||||||
common: 'https://common-api.pickmall.cn',
|
common: 'http://192.168.0.103:8890/',
|
||||||
buyer: 'https://buyer-api.pickmall.cn',
|
buyer: 'https://buyer-api.pickmall.cn',
|
||||||
seller: 'https://store-api.pickmall.cn',
|
seller: 'https://store-api.pickmall.cn',
|
||||||
manager: 'https://admin-api.pickmall.cn'
|
manager: 'http://192.168.0.103:8887'
|
||||||
},
|
},
|
||||||
api_prod: {
|
api_prod: {
|
||||||
common: 'https://common-api.pickmall.cn',
|
common: 'https://common-api.pickmall.cn',
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<div class="right-container">
|
<div class="right-container">
|
||||||
<div class="border-b">{{ infoData.goodsName }}</div>
|
<div class="border-b">{{ infoData.goodsName }}</div>
|
||||||
<div class="border-b">
|
<div class="border-b">
|
||||||
<div class="div-height"> 店铺名称:{{ infoData.sellerName }}</div>
|
<div class="div-height"> 店铺名称:{{ infoData.storeName }}</div>
|
||||||
<div class="div-height"> 订单号:{{ infoData.orderNo }}</div>
|
<div class="div-height"> 订单号:{{ infoData.orderNo }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -72,11 +72,11 @@
|
||||||
<div class="counts">{{$store.state.notices.refund|| 0}}</div>
|
<div class="counts">{{$store.state.notices.refund|| 0}}</div>
|
||||||
<div>待审核售后</div>
|
<div>待审核售后</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-item" @click="navigateTo('distribution')">
|
<div class="todo-item" >
|
||||||
<div class="counts">{{$store.state.notices.distributionCash|| 0}}</div>
|
<div class="counts">{{$store.state.notices.distributionCash|| 0}}</div>
|
||||||
<div>待审核分销提现</div>
|
<div>待审核分销提现</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="todo-item" @click="navigateTo('billList')">
|
<div class="todo-item" @click="navigateTo('accountStatementBill')">
|
||||||
<div class="counts">{{$store.state.notices.waitPayBill|| 0}}</div>
|
<div class="counts">{{$store.state.notices.waitPayBill|| 0}}</div>
|
||||||
<div>待审核分账</div>
|
<div>待审核分账</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,127 +0,0 @@
|
||||||
<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, // 加载状态
|
|
||||||
data: [], // 地区数据
|
|
||||||
selectedWay: [], // 选择的地区
|
|
||||||
callBackData: "", // 打开组件的回显数据
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
cancel() {
|
|
||||||
this.switched = false;
|
|
||||||
// this.$emit("close",true)
|
|
||||||
},
|
|
||||||
open(val) {
|
|
||||||
if (val) {
|
|
||||||
this.callBackData = val;
|
|
||||||
this.data = JSON.parse(JSON.stringify(this.data));
|
|
||||||
val.areaId.split(",").forEach((ids) => {
|
|
||||||
this.data.forEach((item) => {
|
|
||||||
if (item.id == ids) {
|
|
||||||
item.selected = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
item.children &&
|
|
||||||
item.children.forEach((child) => {
|
|
||||||
if (child.id == ids) {
|
|
||||||
child.checked = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(this.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.switched = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
submit() {
|
|
||||||
// 筛选出省市
|
|
||||||
let list = this.$refs.tree.getCheckedAndIndeterminateNodes();
|
|
||||||
let sort = [];
|
|
||||||
list.forEach((item) => {
|
|
||||||
item.selectedList = [];
|
|
||||||
if (item.level == "province") {
|
|
||||||
sort.push({
|
|
||||||
...item,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
sort.forEach((sortItem, sortIndex) => {
|
|
||||||
if (item.level != "province" && sortItem.id == item.parentId) {
|
|
||||||
sortItem.selectedList.push({
|
|
||||||
...item,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
this.$emit(
|
|
||||||
"selected",
|
|
||||||
list.filter((item) => {
|
|
||||||
return item.level == "province";
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
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 });
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</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>
|
|
|
@ -9,7 +9,7 @@
|
||||||
@end="onEnd"
|
@end="onEnd"
|
||||||
>
|
>
|
||||||
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
<div class="upload-list" v-for="(item, index) in uploadList" :key="index">
|
||||||
<div v-if="item.status == 'finished'">
|
<div v-if="item.status == 'finished'" style="height:60px;">
|
||||||
<img :src="item.url" />
|
<img :src="item.url" />
|
||||||
<div class="upload-list-cover">
|
<div class="upload-list-cover">
|
||||||
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
<Icon type="ios-eye-outline" @click="handleView(item.url)"></Icon>
|
||||||
|
|
|
@ -48,10 +48,10 @@
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
></DatePicker>
|
></DatePicker>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="商家名称" prop="sellerName">
|
<Form-item label="商家名称" prop="storeName">
|
||||||
<Input
|
<Input
|
||||||
type="text"
|
type="text"
|
||||||
v-model="searchForm.sellerName"
|
v-model="searchForm.storeName"
|
||||||
placeholder="请输入商家名称"
|
placeholder="请输入商家名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
orderSn: "",
|
orderSn: "",
|
||||||
memberName: "",
|
memberName: "",
|
||||||
serviceStatus: "",
|
serviceStatus: "",
|
||||||
sellerName:"",
|
storeName:"",
|
||||||
sn: "",
|
sn: "",
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
form: {
|
form: {
|
||||||
// 添加或编辑表单对象初始化数据
|
// 添加或编辑表单对象初始化数据
|
||||||
sn: "",
|
sn: "",
|
||||||
sellerName: "",
|
storeName: "",
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
billPrice: "",
|
billPrice: "",
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<Row @keydown.enter.native="handleSearch">
|
<Row @keydown.enter.native="handleSearch">
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
<Form-item label="订单号" prop="sn">
|
<Form-item label="订单号" prop="sn">
|
||||||
<Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 200px"/>
|
<Input type="text" v-model="searchForm.sn" placeholder="订单/交易号" clearable style="width: 200px" />
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="付款状态" prop="orderStatus">
|
<Form-item label="付款状态" prop="orderStatus">
|
||||||
<Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 200px">
|
<Select v-model="searchForm.payStatus" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
@ -14,20 +14,26 @@
|
||||||
<Option value="PAID">已付款</Option>
|
<Option value="PAID">已付款</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
|
<Form-item label="支付方式" prop="orderStatus">
|
||||||
|
<Select v-model="searchForm.paymentMethod" placeholder="请选择" clearable style="width: 200px">
|
||||||
|
<Option value="WECHAT">微信</Option>
|
||||||
|
<Option value="ALIPAY">支付宝</Option>
|
||||||
|
<Option value="WALLET">余额</Option>
|
||||||
|
<Option value="BANK_TRANSFER">银行转账</Option>
|
||||||
|
<Option value="">暂未付款</Option>
|
||||||
|
</Select>
|
||||||
|
</Form-item>
|
||||||
<Form-item label="支付时间">
|
<Form-item label="支付时间">
|
||||||
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable
|
<DatePicker v-model="searchForm" type="datetimerange" format="yyyy-MM-dd" clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
||||||
@on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px"></DatePicker>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn">搜索</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</Row>
|
</Row>
|
||||||
<Row class="padding-row">
|
<Row class="padding-row">
|
||||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||||
@on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
|
||||||
</Row>
|
</Row>
|
||||||
<Row type="flex" justify="end" class="page">
|
<Row type="flex" justify="end" class="page">
|
||||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
||||||
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
|
|
||||||
size="small" show-total show-elevator show-sizer></Page>
|
size="small" show-total show-elevator show-sizer></Page>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
|
@ -68,16 +74,57 @@ export default {
|
||||||
{
|
{
|
||||||
title: "支付方式",
|
title: "支付方式",
|
||||||
key: "paymentMethod",
|
key: "paymentMethod",
|
||||||
width: 100,
|
width: 120,
|
||||||
|
align: "center",
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.paymentMethod === "WECHAT") {
|
if (params.row.paymentMethod === "WECHAT") {
|
||||||
return h("div", [h("span", {}, "微信")]);
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
color: "green",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"微信"
|
||||||
|
),
|
||||||
|
]);
|
||||||
} else if (params.row.paymentMethod === "ALIPAY") {
|
} else if (params.row.paymentMethod === "ALIPAY") {
|
||||||
return h("div", [h("span", {}, "支付宝")]);
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
color: "blue",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"支付宝"
|
||||||
|
),
|
||||||
|
]);
|
||||||
} else if (params.row.paymentMethod === "WALLET") {
|
} else if (params.row.paymentMethod === "WALLET") {
|
||||||
return h("div", [h("span", {}, "余额支付")]);
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
props: {},
|
||||||
|
},
|
||||||
|
"余额支付"
|
||||||
|
),
|
||||||
|
]);
|
||||||
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
} else if (params.row.paymentMethod === "BANK_TRANSFER") {
|
||||||
return h("div", [h("span", {}, "银行转帐")]);
|
return h("div", [
|
||||||
|
h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
props: {
|
||||||
|
color: "orange",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"银行转帐"
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
return h("div", [h("Tag", {}, "暂未付款")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -85,19 +132,24 @@ export default {
|
||||||
title: "第三方流水",
|
title: "第三方流水",
|
||||||
key: "receivableNo",
|
key: "receivableNo",
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", [
|
||||||
|
h("span", {}, params.row.receivableNo || "暂无流水号"),
|
||||||
|
]);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "客户端",
|
title: "客户端",
|
||||||
key: "clientType",
|
key: "clientType",
|
||||||
width: 130,
|
width: 130,
|
||||||
render: (h, params) => {
|
render: (h, params) => {
|
||||||
if (params.row.clientType === "WECHAT_MP") {
|
if (params.row.clientType === "WECHAT_MP" || params.row.clientType === '小程序') {
|
||||||
return h("div", [h("span", {}, "小程序")]);
|
return h("div", [h("span", {}, "小程序")]);
|
||||||
} else if (params.row.clientType === "APP") {
|
} else if (params.row.clientType === "APP") {
|
||||||
return h("div", [h("span", {}, "APP")]);
|
return h("div", [h("span", {}, "APP")]);
|
||||||
} else if (params.row.clientType === "PC") {
|
} else if (params.row.clientType === "PC") {
|
||||||
return h("div", [h("span", {}, "PC网页")]);
|
return h("div", [h("span", {}, "PC网页")]);
|
||||||
} else if (params.row.clientType === "H5") {
|
} else if (params.row.clientType === "H5" || params.row.clientType === 'wap') {
|
||||||
return h("div", [h("span", {}, "移动端")]);
|
return h("div", [h("span", {}, "移动端")]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -106,6 +158,11 @@ export default {
|
||||||
title: "支付时间",
|
title: "支付时间",
|
||||||
key: "paymentTime",
|
key: "paymentTime",
|
||||||
width: 200,
|
width: 200,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h("div", [
|
||||||
|
h("span", {}, params.row.paymentTime || "暂无支付时间"),
|
||||||
|
]);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "订单金额",
|
title: "订单金额",
|
||||||
|
@ -204,7 +261,7 @@ export default {
|
||||||
});
|
});
|
||||||
this.total = this.data.length;
|
this.total = this.data.length;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
|
|
|
@ -99,6 +99,15 @@
|
||||||
key: "storeAddressPath",
|
key: "storeAddressPath",
|
||||||
width: 300,
|
width: 300,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
params.row.storeAddressPath || "暂未填写"
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否自营",
|
title: "是否自营",
|
||||||
|
|
|
@ -111,7 +111,16 @@ export default {
|
||||||
title: "店铺地址",
|
title: "店铺地址",
|
||||||
key: "storeAddressPath",
|
key: "storeAddressPath",
|
||||||
width: 300,
|
width: 300,
|
||||||
tooltip: true
|
tooltip: true,
|
||||||
|
render: (h, params) => {
|
||||||
|
return h(
|
||||||
|
"Tag",
|
||||||
|
{
|
||||||
|
|
||||||
|
},
|
||||||
|
params.row.storeAddressPath || "暂未填写"
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "是否自营",
|
title: "是否自营",
|
||||||
|
|
|
@ -710,7 +710,7 @@ export default {
|
||||||
//发送短信
|
//发送短信
|
||||||
sendSms() {
|
sendSms() {
|
||||||
this.$refs.smsForm.validate((valid) => {
|
this.$refs.smsForm.validate((valid) => {
|
||||||
const mobile = JSON.stringify(this.alreadyCheck);
|
const mobile = this.alreadyCheck;
|
||||||
this.smsForm.mobile = mobile;
|
this.smsForm.mobile = mobile;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
API_Setting.sendSms(this.smsForm).then((res) => {
|
API_Setting.sendSms(this.smsForm).then((res) => {
|
||||||
|
|
|
@ -162,7 +162,11 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
// 建议引入通用样式 可删除下面样式代码
|
||||||
|
@import "@/styles/table-common.scss";
|
||||||
|
|
||||||
.sign-name {
|
.sign-name {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
@ -189,7 +193,3 @@
|
||||||
margin-left: 100px;
|
margin-left: 100px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
|
||||||
// 建议引入通用样式 可删除下面样式代码
|
|
||||||
@import "@/styles/table-common.scss";
|
|
||||||
</style>
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import Vue from 'vue';
|
||||||
|
|
||||||
const app = {
|
const app = {
|
||||||
state: {
|
state: {
|
||||||
|
shipTemplates:"",
|
||||||
styleStore:"", //移动端楼层装修中选择风格存储
|
styleStore:"", //移动端楼层装修中选择风格存储
|
||||||
loading: false, // 全局加载动画
|
loading: false, // 全局加载动画
|
||||||
added: false, // 加载路由标识
|
added: false, // 加载路由标识
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</Modal>
|
</Modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getChildRegion, getAllCity } from "@/api/index";
|
import { getAllCity } from "@/api/index";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -22,46 +22,84 @@ export default {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 关闭
|
||||||
|
*/
|
||||||
cancel() {
|
cancel() {
|
||||||
this.switched = false;
|
this.switched = false;
|
||||||
// this.$emit("close",true)
|
|
||||||
},
|
// 关闭的时候所有数据设置成disabled为true
|
||||||
open(val) {
|
|
||||||
if (val) {
|
|
||||||
this.callBackData = val;
|
|
||||||
this.data = JSON.parse(JSON.stringify(this.data));
|
|
||||||
val.areaId.split(",").forEach((ids) => {
|
|
||||||
this.data.forEach((item) => {
|
this.data.forEach((item) => {
|
||||||
if (item.id == ids) {
|
this.$set(item, "disabled", false);
|
||||||
item.selected = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
item.children &&
|
|
||||||
item.children.forEach((child) => {
|
item.children.forEach((child) => {
|
||||||
if (child.id == ids) {
|
this.$set(child, "disabled", false);
|
||||||
child.checked = true;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.switched = true;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打开地图选择器
|
||||||
|
* @param {val} 回调的数据
|
||||||
|
* @param {index} 当前操作的运费模板的索引
|
||||||
|
*/
|
||||||
|
open(val, index) {
|
||||||
|
if (val) {
|
||||||
|
//已选中的地址
|
||||||
|
let checkedData = this.$store.state.shipTemplate;
|
||||||
|
|
||||||
|
// 禁止选中的地址
|
||||||
|
let disabledData = checkedData.filter((item, i) => {
|
||||||
|
return i != index;
|
||||||
|
});
|
||||||
|
|
||||||
|
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 (child.id == ids) {
|
||||||
|
this.$set(child, "disabled", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.switched ? (this.switched = true) : (this.switched = true);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交并筛选出省市
|
||||||
|
*/
|
||||||
submit() {
|
submit() {
|
||||||
// 筛选出省市
|
// 筛选出省市
|
||||||
let list = this.$refs.tree.getCheckedAndIndeterminateNodes();
|
let list = this.$refs.tree.getCheckedAndIndeterminateNodes();
|
||||||
|
|
||||||
let sort = [];
|
let sort = [];
|
||||||
list.forEach((item) => {
|
list.forEach((item, i) => {
|
||||||
item.selectedList = [];
|
item.selectedList = [];
|
||||||
if (item.level == "province") {
|
item.selectedAll = false;
|
||||||
|
// 筛选出当前的省份
|
||||||
|
if (item.level == "province" && !item.disabled) {
|
||||||
sort.push({
|
sort.push({
|
||||||
...item,
|
...item,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 筛选出当前选中的市
|
||||||
sort.forEach((sortItem, sortIndex) => {
|
sort.forEach((sortItem, sortIndex) => {
|
||||||
if (item.level != "province" && sortItem.id == item.parentId) {
|
if (item.level != "province" && sortItem.id == item.parentId && !item.disabled) {
|
||||||
sortItem.selectedList.push({
|
sortItem.selectedList.push({
|
||||||
...item,
|
...item,
|
||||||
});
|
});
|
||||||
|
@ -69,12 +107,24 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$emit(
|
// 判断如果当前省是否全选
|
||||||
"selected",
|
this.data.forEach((whether) => {
|
||||||
list.filter((item) => {
|
sort.forEach((item) => {
|
||||||
return item.level == "province";
|
// 如果当前省匹配
|
||||||
})
|
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();
|
this.cancel();
|
||||||
},
|
},
|
||||||
|
@ -93,8 +143,10 @@ export default {
|
||||||
...item,
|
...item,
|
||||||
};
|
};
|
||||||
this.data.push(data);
|
this.data.push(data);
|
||||||
|
|
||||||
this.selectedWay.push({ name: data.title, id: data.id });
|
this.selectedWay.push({ name: data.title, id: data.id });
|
||||||
});
|
});
|
||||||
|
console.log(this.data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<Col>
|
<Col>
|
||||||
<Card>
|
<Card>
|
||||||
<Row>
|
<Row>
|
||||||
<Button @click="refresh" >刷新</Button>
|
<Button @click="refresh">刷新</Button>
|
||||||
<Button @click="add" type="primary">添加</Button>
|
<Button @click="add" type="primary">添加</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Tabs @on-click="handleClickType" v-model="currentTab" style="margin-top: 10px">
|
<Tabs @on-click="handleClickType" v-model="currentTab" style="margin-top: 10px">
|
||||||
|
@ -15,12 +15,13 @@
|
||||||
<td class="sep-row" colspan="20"></td>
|
<td class="sep-row" colspan="20"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="20"><h3>{{item.name}}</h3>
|
<th colspan="20">
|
||||||
|
<h3>{{item.name}}</h3>
|
||||||
<span class="fr m-r-5">
|
<span class="fr m-r-5">
|
||||||
<time style="margin-right: 20px" title="最后编辑时间">
|
<time style="margin-right: 20px" title="最后编辑时间">
|
||||||
<i class="icon-time"></i>{{item.updateTime}}
|
<i class="icon-time"></i>{{item.updateTime}}
|
||||||
</time>
|
</time>
|
||||||
<Button @click="edit(item)" type="info" >修改</Button>
|
<Button @click="edit(item)" type="info">修改</Button>
|
||||||
<Button @click="remove(item.id)" type="error">删除</Button>
|
<Button @click="remove(item.id)" type="error">删除</Button>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
<TabPane v-if="csTab" :label=title :name=operation>
|
<TabPane v-if="csTab" :label=title :name=operation>
|
||||||
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
<Form ref="form" :model="form" :label-width="100" :rules="formValidate">
|
||||||
<FormItem label="模板名称" prop="name">
|
<FormItem label="模板名称" prop="name">
|
||||||
<Input v-model="form.name" maxlength="10" clearable style="width: 20%"/>
|
<Input v-model="form.name" maxlength="10" clearable style="width: 20%" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="计价方式" prop="pricingMethod">
|
<FormItem label="计价方式" prop="pricingMethod">
|
||||||
<RadioGroup type="button" button-style="solid" v-model="form.pricingMethod">
|
<RadioGroup type="button" button-style="solid" v-model="form.pricingMethod">
|
||||||
|
@ -92,43 +93,30 @@
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="tl cell-area">
|
<td class="tl cell-area">
|
||||||
<span class="area-group">
|
<span class="area-group">
|
||||||
<p style="display:inline-block">{{item.area}}</p></span>
|
<p style="display:inline-block;white-space:pre;">{{item.area}}</p>
|
||||||
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w40" type="text" v-model="item.firstCompany" maxlength="3" clearable/>
|
<Input class="text w40" type="text" v-model="item.firstCompany" maxlength="3" clearable />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w60" type="text" v-model="item.firstPrice" maxlength="6" clearable/><em
|
<Input class="text w60" type="text" v-model="item.firstPrice" maxlength="6" clearable /><em class="add-on">
|
||||||
class="add-on">
|
|
||||||
元
|
元
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6"
|
<Input class="text w40" type="text" v-model="item.continuedCompany" maxlength="6" clearable />
|
||||||
clearable/>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6"
|
<Input class="text w60" type="text" v-model="item.continuedPrice" maxlength="6" clearable /><em class="add-on">
|
||||||
clearable/><em class="add-on">
|
|
||||||
元
|
元
|
||||||
</em>
|
</em>
|
||||||
</td>
|
</td>
|
||||||
<td class="nscs-table-handle">
|
<td class="nscs-table-handle">
|
||||||
<Button
|
<Button @click="editRegion(item,index)" type="info" size="small" style="margin-bottom: 5px">修改
|
||||||
@click="editRegion(item)"
|
|
||||||
type="info"
|
|
||||||
size="small"
|
|
||||||
style="margin-bottom: 5px"
|
|
||||||
>修改
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button @click="removeTemplateChildren(index)" :loading="submitLoading" type="error" size="small" style="margin-bottom: 5px">删除
|
||||||
@click="removeTemplateChildren(index)"
|
|
||||||
:loading="submitLoading"
|
|
||||||
type="error"
|
|
||||||
size="small"
|
|
||||||
style="margin-bottom: 5px"
|
|
||||||
>删除
|
|
||||||
</Button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -138,35 +126,24 @@
|
||||||
<div class="tbl-attach p-5">
|
<div class="tbl-attach p-5">
|
||||||
<div class="div-error" v-if="saveError">
|
<div class="div-error" v-if="saveError">
|
||||||
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
|
<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" />
|
||||||
首费应输入正确的金额
|
首费应输入正确的金额
|
||||||
<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的整数
|
首(续)件(重)费应输入大于0的整数
|
||||||
</div>
|
</div>
|
||||||
<Button
|
|
||||||
@click="addShipTemplateChildren(index)"
|
|
||||||
:loading="submitLoading"
|
|
||||||
type="info"
|
|
||||||
size="small"
|
|
||||||
icon="ios-create-outline"
|
|
||||||
style="margin-bottom: 5px"
|
|
||||||
>为指定城市设置运费模板
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<Form-item>
|
<Form-item>
|
||||||
<Button
|
<Button @click="addShipTemplateChildren(index)" :loading="submitLoading" icon="ios-create-outline" >为指定城市设置运费模板
|
||||||
@click="handleSubmit"
|
</Button>
|
||||||
:loading="submitLoading"
|
<Button @click="handleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">保存
|
||||||
type="primary"
|
|
||||||
style="margin-right:5px"
|
|
||||||
>保存
|
|
||||||
</Button>
|
</Button>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -183,18 +160,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import * as API_Shop from "@/api/shops";
|
import * as API_Shop from "@/api/shops";
|
||||||
import multipleRegion from "@/views/lili-components/multiple-region";
|
import multipleRegion from "@/views/lili-components/multiple-region";
|
||||||
|
|
||||||
|
export default {
|
||||||
export default {
|
|
||||||
name: "shipTemplate",
|
name: "shipTemplate",
|
||||||
components: {
|
components: {
|
||||||
multipleRegion
|
multipleRegion,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
selectedIndex:0, //选中的地址模板下标
|
||||||
item: "", //运费模板子模板
|
item: "", //运费模板子模板
|
||||||
shipInfo: {}, // 运费模板数据
|
shipInfo: {}, // 运费模板数据
|
||||||
title: "添加运费模板", // 模态框标题
|
title: "添加运费模板", // 模态框标题
|
||||||
|
@ -205,7 +182,7 @@
|
||||||
form: {
|
form: {
|
||||||
// 添加或编辑表单对象初始化数据
|
// 添加或编辑表单对象初始化数据
|
||||||
name: "",
|
name: "",
|
||||||
pricingMethod: "WEIGHT"
|
pricingMethod: "WEIGHT",
|
||||||
},
|
},
|
||||||
formValidate: {
|
formValidate: {
|
||||||
name: [
|
name: [
|
||||||
|
@ -215,7 +192,8 @@
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pricingMethod: [ // 计费方式
|
pricingMethod: [
|
||||||
|
// 计费方式
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "请选择计费方式",
|
message: "请选择计费方式",
|
||||||
|
@ -233,101 +211,132 @@
|
||||||
handleClickType(v) {
|
handleClickType(v) {
|
||||||
if (v == "INFO") {
|
if (v == "INFO") {
|
||||||
this.getData();
|
this.getData();
|
||||||
this.csTab = false
|
this.csTab = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//添加运费模板
|
//添加运费模板
|
||||||
add() {
|
add() {
|
||||||
this.title = "添加运费模板"
|
this.title = "添加运费模板";
|
||||||
this.csTab = true
|
this.csTab = true;
|
||||||
this.operation = "ADD"
|
this.operation = "ADD";
|
||||||
this.currentTab = "ADD"
|
this.currentTab = "ADD";
|
||||||
this.saveError = false;
|
this.saveError = false;
|
||||||
this.form = {
|
this.form = {
|
||||||
pricingMethod: "WEIGHT",
|
pricingMethod: "WEIGHT",
|
||||||
name: "",
|
name: "",
|
||||||
freightTemplateChildList: [{
|
freightTemplateChildList: [
|
||||||
|
{
|
||||||
area: "",
|
area: "",
|
||||||
areaId: "",
|
areaId: "",
|
||||||
firstCompany: "1",
|
firstCompany: "1",
|
||||||
firstPrice: "",
|
firstPrice: "",
|
||||||
continuedCompany: "1",
|
continuedCompany: "1",
|
||||||
continuedPrice: ""
|
continuedPrice: "",
|
||||||
}]
|
selectedAll:false
|
||||||
|
},
|
||||||
}
|
],
|
||||||
|
};
|
||||||
},
|
},
|
||||||
//修改运费模板
|
//修改运费模板
|
||||||
edit(item) {
|
edit(item) {
|
||||||
this.title = "修改运费模板"
|
this.title = "修改运费模板";
|
||||||
this.csTab = true
|
this.csTab = true;
|
||||||
this.operation = "EDIT"
|
this.operation = "EDIT";
|
||||||
this.currentTab = "EDIT"
|
this.currentTab = "EDIT";
|
||||||
this.saveError = false;
|
this.saveError = false;
|
||||||
//给form赋值
|
//给form赋值
|
||||||
this.form = item
|
this.form = item;
|
||||||
},
|
},
|
||||||
//选择地区
|
//选择地区
|
||||||
editRegion(item){
|
editRegion(item,index) {
|
||||||
this.item = item
|
this.selectedIndex = index
|
||||||
|
this.item = item;
|
||||||
|
|
||||||
this.$refs.region.open(item)
|
this.$store.state.shipTemplate = this.form.freightTemplateChildList
|
||||||
|
this.$refs.region.open(item,index);
|
||||||
},
|
},
|
||||||
//刷细数据
|
//刷细数据
|
||||||
refresh() {
|
refresh() {
|
||||||
this.csTab = false
|
this.csTab = false;
|
||||||
this.operation = "INFO"
|
this.operation = "INFO";
|
||||||
this.currentTab = "INFO"
|
this.currentTab = "INFO";
|
||||||
this.getData()
|
this.getData();
|
||||||
},
|
},
|
||||||
//运费模板数据
|
//运费模板数据
|
||||||
getData() {
|
getData() {
|
||||||
API_Shop.getShipTemplate().then((res) => {
|
API_Shop.getShipTemplate().then((res) => {
|
||||||
this.shipInfo = res.result
|
this.shipInfo = res.result;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择地址回调
|
||||||
|
*/
|
||||||
handleSelect(v) {
|
handleSelect(v) {
|
||||||
let area = ""
|
console.log(v);
|
||||||
let areaId= ""
|
let area = "";
|
||||||
if(v != ""){
|
let areaId = "";
|
||||||
v.forEach((child, index) => {
|
if (v != "") {
|
||||||
if(child.selectedList!=""){
|
v.forEach((child) => {
|
||||||
child.selectedList.forEach((child, index) => {
|
if (child.selectedList != "") {
|
||||||
area+=child.name +","
|
// 只显示省份
|
||||||
areaId+=child.id +","
|
|
||||||
})
|
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
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.item.area = area;
|
||||||
|
this.item.areaId = areaId;
|
||||||
},
|
},
|
||||||
//添加或者修改运费模板
|
//添加或者修改运费模板
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json;charset=utf-8"
|
"Content-Type": "application/json;charset=utf-8",
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
const regNumber = /^\+?[1-9][0-9]*$/;
|
const regNumber = /^\+?[1-9][0-9]*$/;
|
||||||
const regMoney = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/
|
const regMoney = /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
//校验运费模板详细信息
|
//校验运费模板详细信息
|
||||||
for (let i = 0; i < this.form.freightTemplateChildList.length; i++) {
|
for (let i = 0; i < this.form.freightTemplateChildList.length; i++) {
|
||||||
if (this.form.freightTemplateChildList[i].area == ""
|
if (
|
||||||
|| this.form.freightTemplateChildList[i].firstCompany == ""
|
this.form.freightTemplateChildList[i].area == "" ||
|
||||||
|| this.form.freightTemplateChildList[i].firstPrice == ""
|
this.form.freightTemplateChildList[i].firstCompany == "" ||
|
||||||
|| this.form.freightTemplateChildList[i].continuedCompany == ""
|
this.form.freightTemplateChildList[i].firstPrice == "" ||
|
||||||
|| this.form.freightTemplateChildList[i].continuedPrice == "") {
|
this.form.freightTemplateChildList[i].continuedCompany == "" ||
|
||||||
|
this.form.freightTemplateChildList[i].continuedPrice == ""
|
||||||
|
) {
|
||||||
this.saveError = true;
|
this.saveError = true;
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (regNumber.test(this.form.freightTemplateChildList[i].firstCompany) == false
|
if (
|
||||||
|| regNumber.test(this.form.freightTemplateChildList[i].continuedCompany) == false
|
regNumber.test(
|
||||||
|| regMoney.test(this.form.freightTemplateChildList[i].firstPrice) == false
|
this.form.freightTemplateChildList[i].firstCompany
|
||||||
|| regMoney.test(this.form.freightTemplateChildList[i].continuedPrice) == false) {
|
) == 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;
|
this.saveError = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -336,43 +345,46 @@
|
||||||
API_Shop.addShipTemplate(this.form, headers).then((res) => {
|
API_Shop.addShipTemplate(this.form, headers).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("新增成功");
|
this.$Message.success("新增成功");
|
||||||
this.operation = "INFO"
|
this.operation = "INFO";
|
||||||
this.currentTab = "INFO"
|
this.currentTab = "INFO";
|
||||||
this.csTab = false
|
this.csTab = false;
|
||||||
this.getData()
|
this.getData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
API_Shop.editShipTemplate(this.form.id, this.form, headers).then((res) => {
|
API_Shop.editShipTemplate(this.form.id, this.form, headers).then(
|
||||||
|
(res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("新增成功");
|
this.$Message.success("新增成功");
|
||||||
this.operation = "INFO"
|
this.operation = "INFO";
|
||||||
this.currentTab = "INFO"
|
this.currentTab = "INFO";
|
||||||
this.csTab = false
|
this.csTab = false;
|
||||||
this.getData()
|
this.getData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
//添加子模板
|
//添加子模板
|
||||||
addShipTemplateChildren() {
|
addShipTemplateChildren() {
|
||||||
const params = {
|
const params = {
|
||||||
area: '',
|
area: "",
|
||||||
areaId: "",
|
areaId: "",
|
||||||
firstCompany: '1',
|
firstCompany: "1",
|
||||||
firstPrice: '',
|
firstPrice: "",
|
||||||
continuedCompany: '1',
|
continuedCompany: "1",
|
||||||
continuedPrice: ''
|
continuedPrice: "",
|
||||||
}
|
selectedAll:false
|
||||||
this.form.freightTemplateChildList.push(params)
|
};
|
||||||
|
this.form.freightTemplateChildList.push(params);
|
||||||
},
|
},
|
||||||
//删除一个子模板
|
//删除一个子模板
|
||||||
removeTemplateChildren(index) {
|
removeTemplateChildren(index) {
|
||||||
if (Object.keys(this.form.freightTemplateChildList).length == 1) {
|
if (Object.keys(this.form.freightTemplateChildList).length == 1) {
|
||||||
this.$Message.success("必须保留一个子模板");
|
this.$Message.error("必须保留一个子模板");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.form.freightTemplateChildList.splice(index, 1);
|
this.form.freightTemplateChildList.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
@ -391,193 +403,196 @@
|
||||||
this.$Modal.remove();
|
this.$Modal.remove();
|
||||||
this.getData();
|
this.getData();
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.ncsc-default-table thead th {
|
.ncsc-default-table thead th {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: #555;
|
color: #555;
|
||||||
background-color: #FAFAFA;
|
background-color: #fafafa;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
padding: 9px 0;
|
padding: 9px 0;
|
||||||
border-bottom: solid 1px #DDD;
|
border-bottom: solid 1px #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ncsc-default-table {
|
.ncsc-default-table {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
|
||||||
tbody th {
|
tbody th {
|
||||||
background-color: #FAFAFA;
|
background-color: #fafafa;
|
||||||
border: solid #E6E6E6;
|
border: solid #e6e6e6;
|
||||||
border-width: 1px 0;
|
border-width: 1px 0;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody td {
|
tbody td {
|
||||||
color: #999;
|
color: #999;
|
||||||
background-color: #FFF;
|
background-color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.order tbody tr td {
|
||||||
.order tbody tr td {
|
border-bottom: 1px solid #e6e6e6;
|
||||||
border-bottom: 1px solid #E6E6E6;
|
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order tbody tr td.bdr {
|
.order tbody tr td.bdr {
|
||||||
border-right: 1px solid #E6E6E6;
|
border-right: 1px solid #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order tbody tr th {
|
.order tbody tr th {
|
||||||
border: solid 1px #DDD;
|
border: solid 1px #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order tbody tr td.sep-row {
|
.order tbody tr td.sep-row {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w10 {
|
.w10 {
|
||||||
width: 10px !important;
|
width: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tl {
|
.tl {
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order tbody tr td.bdl {
|
.order tbody tr td.bdl {
|
||||||
border-left: 1px solid #E6E6E6;
|
border-left: 1px solid #e6e6e6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order tbody tr th h3 {
|
.order tbody tr th h3 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: #555;
|
color: #555;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-r-5 {
|
.m-r-5 {
|
||||||
margin-right: 5px !important;
|
margin-right: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fr {
|
.fr {
|
||||||
float: right !important;
|
float: right !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.m-b-30 {
|
.m-b-30 {
|
||||||
margin-bottom: 10px !important;
|
margin-bottom: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
margin: 3px 5px 0px 5px;
|
margin: 3px 5px 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead {
|
thead {
|
||||||
display: table-header-group;
|
display: table-header-group;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-color: inherit;
|
border-color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
display: table-row;
|
display: table-row;
|
||||||
vertical-align: inherit;
|
vertical-align: inherit;
|
||||||
border-color: inherit;
|
border-color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption, th {
|
caption,
|
||||||
|
th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tl {
|
.tl {
|
||||||
text-align: left !important;
|
text-align: left !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
colgroup {
|
colgroup {
|
||||||
display: table-column-group;
|
display: table-column-group;
|
||||||
}
|
}
|
||||||
|
|
||||||
button, input, select, textarea {
|
button,
|
||||||
|
input,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
line-height: inherit;
|
line-height: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-line td {
|
.bd-line td {
|
||||||
border-bottom: solid 1px #EEE;
|
border-bottom: solid 1px #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w40 {
|
.w40 {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w60 {
|
.w60 {
|
||||||
width: 80px !important;
|
width: 80px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
Input[type="text"], Input[type="password"], Input.text, Input.password {
|
Input[type="text"],
|
||||||
|
Input[type="password"],
|
||||||
|
Input.text,
|
||||||
|
Input.password {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: solid 1px #E6E9EE;
|
border: solid 1px #e6e9ee;
|
||||||
outline: 0 none;
|
outline: 0 none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.add-on {
|
.add-on {
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
background-color: #F6F7Fb;
|
background-color: #f6f7fb;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border: solid #E6E9EE;
|
border: solid #e6e9ee;
|
||||||
border-width: 1px 1px 1px 0;
|
border-width: 1px 1px 1px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ncsc-default-table {
|
ncsc-default-table {
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ncsu-trans-type {
|
.ncsu-trans-type {
|
||||||
background-color: #FFF;
|
background-color: #fff;
|
||||||
border: solid #DDD 1px;
|
border: solid #ddd 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
i, cite, em {
|
i,
|
||||||
|
cite,
|
||||||
|
em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cell-area {
|
.cell-area {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div-error {
|
.div-error {
|
||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
margin-bottom: -8px;
|
margin-bottom: -8px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: #F00;
|
color: #f00;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue