tianyi 2 months ago
parent
commit
7c38031df5
  1. 14
      src/api/app.js
  2. 242
      src/views/app/business/lineManage/addEdit.vue
  3. 396
      src/views/app/business/lineManage/lineManage.vue
  4. 7
      src/views/app/shop/dictManage.vue
  5. 9
      src/views/app/shop/shop.vue

14
src/api/app.js

@ -215,6 +215,14 @@ export const editCoupon = (params) => {
export const addLogisticsRoute = (params) => { export const addLogisticsRoute = (params) => {
return postBodyRequest('/app/logisticsRoute/addLogisticsRoute', params) return postBodyRequest('/app/logisticsRoute/addLogisticsRoute', params)
} }
//编辑广告位
export const updateAD = (params) => {
return postBodyRequest('/mall/adPosition/update', params)
}
//新增广告位
export const addAD = (params) => {
return postBodyRequest('/mall/adPosition/add', params)
}
//获取商品分类 //获取商品分类
export const goodsType = (params) => { export const goodsType = (params) => {
@ -225,6 +233,7 @@ export const goodsType = (params) => {
export const updateLogisticsRoute = (params) => { export const updateLogisticsRoute = (params) => {
return postBodyRequest('/app/logisticsRoute/updateLogisticsRoute', params) return postBodyRequest('/app/logisticsRoute/updateLogisticsRoute', params)
} }
//删除线路 //删除线路
export const deleteLogisticsRoute = (params) => { export const deleteLogisticsRoute = (params) => {
return postRequest('/app/logisticsRoute/deleteLogisticsRoute', params) return postRequest('/app/logisticsRoute/deleteLogisticsRoute', params)
@ -233,6 +242,11 @@ export const deleteLogisticsRoute = (params) => {
export const getLogisticsRoutePageList = (params) => { export const getLogisticsRoutePageList = (params) => {
return postBodyRequest('/app/logisticsRoute/getLogisticsRoutePageList', params) return postBodyRequest('/app/logisticsRoute/getLogisticsRoutePageList', params)
} }
//广告位列表
export const getADList = (params) => {
return postBodyRequest('/mall/adPosition/list', params)
}
//查看物流公司关联线路列表 //查看物流公司关联线路列表
export const getLogisticsCompanyRoutePageList = (params) => { export const getLogisticsCompanyRoutePageList = (params) => {
return postBodyRequest('/app/logisticsCompanyRoute/getLogisticsCompanyRoutePageList', params) return postBodyRequest('/app/logisticsCompanyRoute/getLogisticsCompanyRoutePageList', params)

242
src/views/app/business/lineManage/addEdit.vue

@ -4,35 +4,77 @@
<Drawer :title="title" v-model="visible" width="500" draggable :mask-closable="type == '0'"> <Drawer :title="title" v-model="visible" width="500" draggable :mask-closable="type == '0'">
<div :style="{ maxHeight: maxHeight }" class="drawer-content"> <div :style="{ maxHeight: maxHeight }" class="drawer-content">
<div class="drawer-header"> <div class="drawer-header">
<div style="margin-right: 16px">线路配置</div> <div style="margin-right: 16px">广告位配置</div>
</div> </div>
<Form ref="form" :model="form" :rules="formValidate" label-position="top"> <Form ref="form" :model="form" :rules="formValidate" label-position="top">
<Row :gutter="32"> <Row :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="线路名称" prop="circuitName"> <FormItem label="广告位置" prop="position">
<Input v-model="form.circuitName" /> <Select ref="dep" @on-change="checkStatusLine" style="width:200px">
<Option v-for="(item, i) in dictDataLine" :key="i" :value="form.value">{{
item.title
}}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="12"> <Col span="12">
<FormItem label="出发站" prop="goStation"> <FormItem label="商家名" prop="value">
<Input v-model="form.goStation" /> <Select v-model="model" filterable @on-change="checkShop" @on-query-change="sreachShop">
<Option v-for="item in shopList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> </Row>
<FormItem label="到达站" prop="arrivalStation"> <Row :gutter="32">
<Input v-model="form.arrivalStation" /> <Col span="24">
<FormItem label="广告图" prop="adImage">
<upload-pic-input v-model="form.adImage"></upload-pic-input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32"> <Row :gutter="32">
<Col span="24"> <Col span="24">
<FormItem label="保费规则" prop="premiumRules"> <FormItem label="广告标题" prop="title">
<Input v-model="form.premiumRules" placeholder="每公斤/元" /> <Input v-model="form.title" placeholder="请输入广告标题" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="32">
<Col span="24">
<FormItem label="排序值" prop="sortOrder">
<Input v-model="form.sortOrder" placeholder="请输入排序值" />
</FormItem>
</Col>
</Row>
<Row :gutter="32">
<Col span="24">
<FormItem label="广告关联商品" prop="productList">
<div @click="checkGoods" style="display: flex;height: 35px;width: 100%;border: 1px solid #eee;padding: 0 0 0 10px;border-radius: 5px;line-height: 35px;">
<div style="flex: 1;">{{form.productList.productName}}</div>
<Icon type="ios-arrow-forward" size="24" style="line-height: 35px;" />
</div>
</FormItem>
</Col>
</Row>
<Row :gutter="32" v-if="form.productList.productName != ''">
<Col span="12">
<FormItem label="商品原价" prop="originalPrice">
<Input v-model="form.productList.originalPrice" placeholder="请输入商品原价" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="商品拼团价格" prop="originalPrice">
<Input v-model="form.productList.groupPrice" placeholder="请输入商品拼团价格" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="几人团" prop="originalPrice">
<Input type="number" v-model="form.productList.groupMembers" placeholder="请输入商品拼团价格" />
</FormItem>
</Col>
</Row>
</Form> </Form>
</div> </div>
<div class="drawer-footer br" v-show="type != '0'"> <div class="drawer-footer br" v-show="type != '0'">
@ -40,23 +82,28 @@
<Button @click="visible = false">取消</Button> <Button @click="visible = false">取消</Button>
</div> </div>
</Drawer> </Drawer>
<Modal :title="商品列表" v-model="aaVisiable" :mask-closable="false" :scrollabele="true" :width="1000">
<goodsList ref="goodsPage" @on-submit1="getGoods" v-if="aaVisiable"></goodsList>
<div slot="footer" v-show=aaVisiable>
<Button type="text" @click="aaVisiable = false">关闭</Button>
</div>
</Modal>
</div> </div>
</template> </template>
<script> <script>
import { import {
addLogisticsRoute, addAD,
updateLogisticsRoute updateAD,
getShopData
} from "@/api/app"; } from "@/api/app";
import dict from "@/views/my-components/hiver/dict"; import goodsList from "./dictManage.vue";
import uploadPicInput from "@/views/my-components/hiver/upload-pic-input"; import uploadPicInput from "@/views/my-components/hiver/upload-pic-input";
import regionTreeChoose from "@/views/my-components/hiver/region-tree-choose";
export default { export default {
name: "company", name: "company",
components: { components: {
dict,
uploadPicInput, uploadPicInput,
regionTreeChoose goodsList
}, },
props: { props: {
value: { value: {
@ -73,6 +120,24 @@
}, },
data() { data() {
return { return {
aaVisiable:false,
shopList:[],
dictDataLine: [{
title: "首页顶部大广告位",
value: 'home_top'
}, {
title: "首页中位左上",
value: 'home_center_left_top'
}, {
title: "首页中位左下",
value: 'home_center_left_bottom'
}, {
title: "首页中位右上",
value: 'home_center_right_top'
}, {
title: "首页中位右下",
value: 'home_center_right_bottom'
}],
roleList: [], roleList: [],
visible: this.value, visible: this.value,
title: "", title: "",
@ -80,52 +145,59 @@
passColor: "", passColor: "",
submitLoading: false, submitLoading: false,
maxHeight: 510, maxHeight: 510,
form1:{},
form: { form: {
circuitName: '', position: '',
goStation: '沧州', sortOrder:"",
arrivalStation: '', title:'',
premiumRules: '' adImage:'',
status:1,
regionId:JSON.parse(this.getStore("user")).departmentId,
merchantName:'',
merchantId:'',
merchantImage:'',
linkUrl:'/package1/group/groupBuySingle?type=shop&item=',
linkParams:'',
productList:{
adId: "",
productImage: "",
productName: "",
originalPrice: "",
groupPrice: "",
groupMembers: ""
}
}, },
formValidate: { searchForm: {
// regionId:JSON.parse(this.getStore("userInfo")).departmentId,
circuitName: [{ shopType: "",
required: true, shopArea: "",
message: "请输入线路名称", pageNumber: 1,
trigger: "change" keyWord: "",
}, ], pageSize: 100,
goStation: [{ sort: "",
required: true, order: "",
message: "请输入出发站", sortOrder: "",
trigger: "change" orderOrder: "",
}, ], sortScore: "",
arrivalStation: [{ orderScore: "",
required: true, sortSale: "",
message: "请输入到达站", orderSale: "",
trigger: "change"
}, ],
premiumRules: [{
required: true,
message: "请输入保费规则",
trigger: "change"
}, ],
}, },
}; };
}, },
methods: { methods: {
init() { init() {
console.log(this.form1)
}, this.form.productList = {}
changePass(v, grade, strength) { this.form.productList.adId = this.form1.id
this.form.password = strength;
}, },
submit() { submit() {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.type == "1") { if (this.type == "1") {
// //
this.submitLoading = true; this.submitLoading = true;
updateLogisticsRoute(this.form).then((res) => { updateAD(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
@ -136,7 +208,7 @@
} else { } else {
// //
this.submitLoading = true; this.submitLoading = true;
addLogisticsRoute(this.form).then((res) => { addAD(this.form).then((res) => {
this.submitLoading = false; this.submitLoading = false;
if (res.success) { if (res.success) {
this.$Message.success("操作成功"); this.$Message.success("操作成功");
@ -148,6 +220,66 @@
} }
}); });
}, },
checkGoods(){
if(this.form.merchantId == ''){
this.$Message.warning("您还未选择商家");
return
}
this.aaVisiable = true;
this.$nextTick(() => {
this.$refs.goodsPage.init(this.form.linkParams);
});
},
getGoods(v){
console.log('11111',v)
this.form.productList.productImage = v.productPicture
this.form.productList.productName = v.productName
console.log('22222',this.form)
this.aaVisiable = false
},
sreachShop(v){
this.searchForm.keyWord = v
//
this.loading = true;
getShopData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.shopList = res.result.content;
for(let i=0;i<this.shopList.length;i++){
this.shopList[i].label = this.shopList[i].shopName
this.shopList[i].value = this.shopList[i].id
}
}
});
},
checkShop(v){
console.log("数据",v)
for(let i=0;i<this.shopList.length;i++){
if(this.shopList[i].id == v){
let data = {
products:this.shopList[i].products,
id:this.shopList[i].id,
shopName:this.shopList[i].shopName,
shopPhone:this.shopList[i].shopPhone,
shopAddress:this.shopList[i].shopAddress,
shopIcon:this.shopList[i].shopIcon,
shopScore:this.shopList[i].shopScore,
shopTypeTitle:this.shopList[i].shopTypeTitle,
saleCount:this.shopList[i].saleCount,
remark:this.shopList[i].remark,
}
this.form.linkParams = JSON.stringify(data)
this.form.merchantName = this.shopList[i].shopName
this.form.merchantId = v
this.form.merchantImage = this.shopList[i].shopIcon
}
}
},
checkStatusLine(v){
this.form.position = v
console.log(v)
},
handleSelectRegion(v) { handleSelectRegion(v) {
this.form.region = v; this.form.region = v;
}, },
@ -156,15 +288,15 @@
return; return;
} }
if (this.type == "1") { if (this.type == "1") {
this.title = "编辑线路"; this.title = "编辑广告位";
this.maxHeight = this.maxHeight =
Number(document.documentElement.clientHeight - 121) + "px"; Number(document.documentElement.clientHeight - 121) + "px";
} else if (this.type == "2") { } else if (this.type == "2") {
this.title = "添加线路"; this.title = "添加广告位";
this.maxHeight = this.maxHeight =
Number(document.documentElement.clientHeight - 121) + "px"; Number(document.documentElement.clientHeight - 121) + "px";
} else { } else {
this.title = "线路详情"; this.title = "广告位详情";
this.maxHeight = "100%"; this.maxHeight = "100%";
} }
// //
@ -175,12 +307,6 @@
// //
this.form = data; this.form = data;
} else {
//
this.form = {
companyAddress: [],
signCompany: "0",
};
} }
this.visible = value; this.visible = value;
}, },

396
src/views/app/business/lineManage/lineManage.vue

@ -5,45 +5,10 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="100">
<FormItem label="线路名称" prop="companyName">
<Input type="text" v-model="searchForm.companyName" clearable placeholder="请输入线路名称"
style="width: 200px" />
</FormItem>
<FormItem label="出发站" prop="contacts">
<Input type="text" v-model="searchForm.contacts" clearable placeholder="请输入出发站"
style="width: 200px" />
</FormItem>
<FormItem label="到达站" prop="mobile">
<Input type="text" v-model="searchForm.mobile" clearable placeholder="请输入到达站"
style="width: 200px" />
</FormItem>
<FormItem style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
<Icon :type="dropDownIcon"></Icon>
</a>
</FormItem>
</Form>
</Row>
<Row align="middle" justify="space-between" class="operation"> <Row align="middle" justify="space-between" class="operation">
<div> <div>
<Button @click="add" type="primary" icon="md-add">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
<Button @click="delAll" icon="md-trash">批量删除</Button>
<Dropdown @on-click="handleDropdown">
<Button>
更多操作
<Icon type="md-arrow-dropdown" />
</Button>
<DropdownMenu slot="list">
<DropdownItem name="refresh">刷新</DropdownItem>
<DropdownItem name="exportData">导出所选数据</DropdownItem>
<DropdownItem name="exportAll">导出全部数据</DropdownItem>
</DropdownMenu>
</Dropdown>
</div> </div>
<div class="icons"> <div class="icons">
<Tooltip content="刷新" placement="top" transfer> <Tooltip content="刷新" placement="top" transfer>
@ -67,68 +32,33 @@
</Tooltip> </Tooltip>
</div> </div>
</Row> </Row>
<Alert show-icon v-show="openTip"> <Table :loading="loading" border :columns="columns" :data="data" :size="tableSize"
已选择 ref="table"></Table>
<span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a>
</Alert>
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNum" :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> </Row>
</Card> </Card>
<Modal :title="站点维护" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000"> <Modal :title="商品列表" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1500">
<logistics-address v-if="Visiable" ref="dialog"></logistics-address> <goodsList ref="goodsPage" v-if="Visiable"></goodsList>
<div slot="footer" v-show=Visiable> <div slot="footer" v-show=Visiable>
<Button type="text" @click="Visiable = false">关闭</Button> <Button type="text" @click="Visiable = false">关闭</Button>
</div> </div>
</Modal> </Modal>
<!-- 自定义导出数据 -->
<Modal v-model="exportModalVisible" :title="exportTitle" :loading="loadingExport" @on-ok="exportCustomData">
<Form ref="exportForm" :label-width="100">
<FormItem label="导出文件名">
<Input v-model="filename" />
</FormItem>
<FormItem label="自定义导出列">
<CheckboxGroup v-model="chooseColumns">
<Checkbox v-for="(item, i) in exportColumns" :label="item.title" :key="i" :value="item.checked"
:disabled="item.disabled"></Checkbox>
</CheckboxGroup>
</FormItem>
</Form>
</Modal>
<addEdit :data="form" :type="showType" v-model="showCompany" @on-submit="getDataList" /> <addEdit :data="form" :type="showType" v-model="showCompany" @on-submit="getDataList" />
</div> </div>
</template> </template>
<script> <script>
import { import {
getAllLogiticsCompanyData, getADList
deleteLogisticsRoute,
getLogisticsRoutePageList
} from "@/api/app"; } from "@/api/app";
import {
shortcuts
} from "@/libs/shortcuts";
//
import {
exportColumn
} from "./exportColumn";
import excel from "@/libs/excel";
import addEdit from "@/views/app/business/lineManage/addEdit.vue"; import addEdit from "@/views/app/business/lineManage/addEdit.vue";
import logisticsAddress from "@/views/app/business/lineManage/logisticsAddress.vue"; import goodsList from "./dictManage.vue";
//
import rechargeOne from "@/views/app/business/recharge/rechargeOne.vue";
export default { export default {
name: "lineManage", name: "lineManage",
components: { components: {
addEdit, addEdit,
logisticsAddress, goodsList,
rechargeOne
}, },
data() { data() {
return { return {
@ -151,23 +81,13 @@
drop: false, drop: false,
selectList: [], selectList: [],
searchForm: { searchForm: {
circuitName: "", pageNum:1,
pageNum: 1, pageSize:100,
pageSize: 10, regionId:JSON.parse(this.getStore("user")).departmentId,
goStation:'',
arrivalStation:''
}, },
selectDate: null, selectDate: null,
options: {
shortcuts: shortcuts,
},
form: {}, form: {},
columns: [{ columns: [
type: "selection",
width: 60,
align: "center",
fixed: "left",
},
{ {
type: "index", type: "index",
width: 60, width: 60,
@ -175,38 +95,73 @@
fixed: "left", fixed: "left",
}, },
{ {
title: "线路名称", title: "放置位置",
key: "circuitName", key: "position",
minWidth: 100, minWidth: 100,
sortable: true,
fixed: "left",
render: (h, params) => { render: (h, params) => {
let re = ""
if (params.row.position == 'home_top') {
re = "首页顶部大广告位";
} else if (params.row.position == 'home_center_left_top') {
re = "首页中位左上";
} else if (params.row.position == 'home_center_left_bottom') {
re = "首页中位左下";
} else if (params.row.position == 'home_center_right_top') {
re = "首页中位右上";
} else if (params.row.position == 'home_center_right_bottom') {
re = "首页中位右下";
}
return h( return h(
"a", { "div",
on: { re
click: () => {
this.showDetail(params.row);
},
},
},
params.row.circuitName
); );
}, }
}, },
{ {
title: "出发站", title: "商家名称",
key: "goStation", key: "merchantName",
minWidth: 150, minWidth: 150,
sortable: true,
}, },
{ {
title: "到达站", title: "商家主图",
key: "arrivalStation", key: "merchantImage",
minWidth: 250, minWidth: 250,
}, },
{ {
title: "保费规则", title: "广告图片",
key: "premiumRules", key: "adImage",
width: 100,
},
{
title: "广告标题",
key: "title",
width: 100,
},
{
title: "排序值",
key: "sortOrder",
width: 100,
},
{
title: "状态",
key: "status",
width: 100,
render: (h, params) => {
let re = ""
if (params.row.status == 0) {
re = "下架";
} else if (params.row.status == 1) {
re = "上架";
}
return h(
"div",
re
);
}
},
{
title: "广告关联商品列表",
key: "productList",
width: 100, width: 100,
}, },
{ {
@ -214,23 +169,8 @@
key: "action", key: "action",
width: 200, width: 200,
align: "center", align: "center",
fixed: "right",
render: (h, params) => { render: (h, params) => {
return h("div", [h( return h("div", [
"a", {
on: {
click: () => {
this.findAllRecord(params.row);
},
},
},
"站点维护"
),
h("Divider", {
props: {
type: "vertical",
},
}),
h( h(
"a", { "a", {
on: { on: {
@ -240,31 +180,12 @@
}, },
}, },
"编辑" "编辑"
), )
h("Divider", {
props: {
type: "vertical",
},
}),
h(
"a", {
on: {
click: () => {
this.remove(params.row);
},
},
},
"删除"
),
]); ]);
}, },
}, },
], ],
exportColumns: exportColumn,
chooseColumns: [], chooseColumns: [],
filename: "公司数据",
exportTitle: "确认导出",
exportType: "",
data: [], data: [],
exportData: [], exportData: [],
total: 0, total: 0,
@ -275,36 +196,6 @@
methods: { methods: {
init() { init() {
this.getDataList(); this.getDataList();
//
let array = [];
this.exportColumns.forEach((e) => {
//
if (
!this.getStore("roles").includes("ROLE_ADMIN") &&
e.key == "mobile"
) {
e.title = "[无权导出] " + e.title;
e.disabled = true;
} else {
e.disabled = false;
}
array.push(e.title);
});
this.chooseColumns = array;
},
findAllRecord(v) {
this.Visiable = true;
console.log(v)
this.$nextTick(() => {
this.$refs.dialog.initRecharge(v);
});
},
findRechargeLog(v) {
this.rechargeVisiable = true;
console.log(v)
this.$nextTick(() => {
this.$refs.rechargelog.initRecharge(v);
});
}, },
changePage(v) { changePage(v) {
this.searchForm.pageNum = v; this.searchForm.pageNum = v;
@ -318,102 +209,23 @@
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
getDataList() { getDataList() {
// 线 // 线
this.loading = true; this.loading = true;
getLogisticsRoutePageList(this.searchForm).then((res) => { getADList(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.code == 200) { if (res.code == 200) {
this.data = res.result.records; this.data = res.result.records;
this.total = res.result.total;
if (this.data.length == 0 && this.searchForm.pageNum > 1) {
this.searchForm.pageNum -= 1;
this.getDataList();
}
} }
}); });
}, },
handleSearch() {
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() { handleReset() {
this.$refs.searchForm.resetFields(); this.$refs.searchForm.resetFields();
this.searchForm.pageNum = 1; this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 100;
this.selectDate = null;
this.searchForm.startDate = "";
this.searchForm.endDate = "";
// //
this.getDataList(); this.getDataList();
}, },
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order == "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
handleDropdown(name) {
if (name == "refresh") {
this.getDataList();
} else if (name == "exportData") {
if (this.selectList.length <= 0) {
this.$Message.warning("您还未选择要导出的数据");
return;
}
this.exportType = "part";
this.exportModalVisible = true;
this.exportTitle = "确认导出 " + this.selectList.length + " 条数据";
} else if (name == "exportAll") {
this.exportType = "all";
this.exportModalVisible = true;
this.exportTitle = "确认导出全部 " + this.total + " 条数据";
getAllLogiticsCompanyData().then((res) => {
if (res.success) {
this.exportData = res.result;
}
});
}
},
exportCustomData() {
if (this.filename == "") {
this.filename = "公司数据";
}
//
let array = [];
this.exportColumns.forEach((e) => {
this.chooseColumns.forEach((c) => {
if (e.title == c && !e.disabled) {
array.push(e);
}
});
});
this.exportColumns = array;
this.exportModalVisible = false;
let title = [];
let key = [];
this.exportColumns.forEach((e) => {
title.push(e.title);
key.push(e.key);
});
const params = {
title: title,
key: key,
data: this.exportData,
autoWidth: true,
filename: this.filename,
};
excel.export_array_to_excel(params);
},
showDetail(v) { showDetail(v) {
// null"" // null""
for (let attr in v) { for (let attr in v) {
@ -445,75 +257,11 @@
this.showType = "1"; this.showType = "1";
this.showCompany = true; this.showCompany = true;
}, },
remove(v) {
this.$Modal.confirm({
title: "确认删除",
content: "您确认要删除该线路吗?",
loading: true,
onOk: () => {
deleteLogisticsRoute({
id: v.id
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.clearSelectAll();
this.$Message.success("删除成功");
this.getDataList();
}
});
},
});
},
dropDown() { dropDown() {
this.drop = !this.drop; this.drop = !this.drop;
},
showSelect(e) {
this.exportData = e;
this.selectList = e;
if (e.length === 1) {
const row = e[0];
this.selectIndex = row.id;
this.currentRow = row;
} else {
this.currentRow = {};
this.selectIndex = "";
}
},
clearSelectAll() {
this.$refs.table.selectAll(false);
},
delAll() {
if (this.selectList.length <= 0) {
this.$Message.warning("您还未选择要删除的数据");
return;
}
this.$Modal.confirm({
title: "确认删除",
content: "您确认要删除所选的 " + this.selectList.length + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function(e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
deleteLogisticsRoute({
ids: ids
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("删除成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
} }
}, },
mounted() { mounted() {
//
this.height = Number(document.documentElement.clientHeight - 230);
this.init(); this.init();
}, },
}; };

7
src/views/app/shop/dictManage.vue

@ -357,13 +357,6 @@
pageSize: "10", pageSize: "10",
searchStr: "", searchStr: "",
sort: "" sort: ""
// name: "",
// status: "",
// pageSize: 10, //
// sort: "sort", //
// order: "asc", //
}, },
modalType: 0, // modalType: 0, //
modalVisible: false, // modalVisible: false, //

9
src/views/app/shop/shop.vue

@ -5,10 +5,10 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Row v-show="openSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> <Form ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem label="店铺名称" prop="nickname"> <FormItem label="店铺名称" prop="nickname">
<Input type="text" v-model="searchForm.nickname" clearable placeholder="请输入店铺名称" <Input type="text" v-model="searchForm.keyWord" clearable placeholder="请输入店铺名称"
style="width: 200px" /> style="width: 200px" />
</FormItem> </FormItem>
<FormItem style="margin-left: -35px" class="br"> <FormItem style="margin-left: -35px" class="br">
@ -212,13 +212,13 @@
selectList: [], selectList: [],
searchForm: { searchForm: {
id: "", id: "",
shopName: "", keyWord: "",
shopOwnerId: "", shopOwnerId: "",
shopMangerId: "", shopMangerId: "",
shopArea: "", shopArea: "",
businessDistrictLevel: "", businessDistrictLevel: "",
contactPhone: "", contactPhone: "",
shopIcon: "11111", shopIcon: "",
shopAddress: "", shopAddress: "",
yearFee: "", yearFee: "",
chargeTime: "", chargeTime: "",
@ -494,6 +494,7 @@
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.data = []
this.getDataList(); this.getDataList();
}, },
handleReset() { handleReset() {

Loading…
Cancel
Save