2023-12-1
This commit is contained in:
@@ -8,5 +8,5 @@ VUE_APP_BASE_API = '/api'
|
||||
# VUE_APP_URL = "http://jianguan.yyundong.com/shgfapi"
|
||||
|
||||
|
||||
VUE_APP_URL = "http://192.168.2.110:7201"
|
||||
VUE_APP_URL = "http://192.168.2.113:7201"
|
||||
##VUE_APP_URL = "http://8.130.39.13:8112"
|
||||
|
||||
@@ -13,6 +13,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// 获取发放网点列表
|
||||
bankList: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/listAll',
|
||||
method: 'get',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 礼包选择商品时,返回的商品列表
|
||||
getGoods: function(data) {
|
||||
return request({
|
||||
@@ -94,5 +104,14 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// 发放提货卡
|
||||
cardGrant: function(data) {
|
||||
return request({
|
||||
url: '/lpkgiftcard/cardGrant',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
50
src/api/network/network.js
Normal file
50
src/api/network/network.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
|
||||
// 获取网点列表
|
||||
bankListPage: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/listPage',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 新增网点
|
||||
saveBank: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 修改网点
|
||||
updateBank: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
},
|
||||
|
||||
// 初始化网点
|
||||
bankInit: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/getLpkBankBySid/'+data,
|
||||
method: 'get'
|
||||
});
|
||||
},
|
||||
|
||||
// 删除网点
|
||||
deleteBank: function(data) {
|
||||
return request({
|
||||
url: '/lpkbank/delete/'+data,
|
||||
method: 'delete'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -89,6 +89,26 @@
|
||||
name: "/marketingCard/pickupCardSet",
|
||||
path: "/marketingCard/pickupCardSet",
|
||||
},
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "grantRecords",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "发放记录",
|
||||
// },
|
||||
// name: "/marketingCard/grantRecords",
|
||||
// path: "/marketingCard/grantRecords",
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "carList",
|
||||
// meta: {
|
||||
// icon: "el-icon-help",
|
||||
// title: "提货卡列表",
|
||||
// },
|
||||
// name: "/marketingCard/carList",
|
||||
// path: "/marketingCard/carList",
|
||||
// },
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -123,6 +143,16 @@
|
||||
},
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "network",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
// title: "网点管理",
|
||||
// },
|
||||
// name: "/network/index",
|
||||
// path: "/network/index"
|
||||
// },
|
||||
// {
|
||||
// alwaysShow: true,
|
||||
// component: "statisticalReport",
|
||||
// meta: {
|
||||
// icon: "el-icon-menu",
|
||||
|
||||
@@ -99,6 +99,24 @@ export const constantRoutes = [
|
||||
noCache: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: '/marketingCard/grantRecords',
|
||||
// component: () => import('@/views/marketingCard/grantRecords.vue'),
|
||||
// name: 'grantRecords',
|
||||
// meta: {
|
||||
// title: '发放记录',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: '/marketingCard/carList',
|
||||
// component: () => import('@/views/marketingCard/carList.vue'),
|
||||
// name: 'carList',
|
||||
// meta: {
|
||||
// title: '提货卡列表',
|
||||
// noCache: true
|
||||
// }
|
||||
// },
|
||||
]
|
||||
},{
|
||||
path: '/pickupPoint',
|
||||
@@ -173,6 +191,21 @@ export const constantRoutes = [
|
||||
}
|
||||
}]
|
||||
},
|
||||
// {
|
||||
// path: '/network',
|
||||
// component: Layout,
|
||||
// redirect: '/network/index',
|
||||
// children: [{
|
||||
// path: '/network/index',
|
||||
// component: () =>
|
||||
// import('@/views/network/index.vue'),
|
||||
// name: 'index',
|
||||
// meta: {
|
||||
// title: '网点管理'
|
||||
// }
|
||||
// },]
|
||||
// },
|
||||
|
||||
...codemenu,
|
||||
{
|
||||
path: '/404',
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
<span class="item_text">单位:</span>
|
||||
<el-input v-model="formobj.unitName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">备注:</span>
|
||||
<el-input v-model="formobj.remarks" placeholder="例如:一份30斤" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
<div class="item" style="margin-bottom: 100px;margin-top: 100px;">
|
||||
<span class="item_text">图片:</span>
|
||||
@@ -75,6 +79,7 @@
|
||||
barcode: '',
|
||||
price: "",
|
||||
unitName: "",
|
||||
remarks:"",
|
||||
picUrl: ""
|
||||
}
|
||||
}
|
||||
@@ -115,6 +120,7 @@
|
||||
barcode: '',
|
||||
price: "",
|
||||
unitName: "",
|
||||
remarks:"",
|
||||
picUrl: ""
|
||||
}
|
||||
this.$emit('doback')
|
||||
|
||||
231
src/views/marketingCard/carList.vue
Normal file
231
src/views/marketingCard/carList.vue
Normal file
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="提货卡列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="卡片序列号">
|
||||
<el-input v-model="listQuery.params.number" placeholder="" clearable />
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="卡片状态">
|
||||
<el-select v-model="listQuery.params.state" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in stateList" :key="i" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">提货卡列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" :row-style="{height: '40px'}">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center"/>
|
||||
<el-table-column prop="code" label="提货码" align="center"/>
|
||||
<el-table-column prop="codeKey" label="提货密码" align="center"/>
|
||||
<el-table-column prop="state" label="卡片状态" align="center"/>
|
||||
<el-table-column prop="customerMobile" label="绑定网点" align="center"/>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
|
||||
:limit.sync="listQuery.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/marketingCard/marketingCard.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [
|
||||
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
number: '',
|
||||
state: '',
|
||||
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.bankListPage(this.listQuery).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.listQuery.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.listQuery.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.listQuery.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.listQuery = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
number: '',
|
||||
state: '',
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
|
||||
const tip = '请确认是否删除所选网点?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBank(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
237
src/views/marketingCard/grantRecords.vue
Normal file
237
src/views/marketingCard/grantRecords.vue
Normal file
@@ -0,0 +1,237 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="发放记录" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="发放时间">
|
||||
<el-date-picker v-model="queryParams.params.startDate" @change="selectTime1"
|
||||
type="date" placeholder="选择日期" format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="发放网点">
|
||||
<el-select v-model="queryParams.params.bankSid" placeholder="请选择">
|
||||
<el-option v-for="(item,i) in stateList" :key="i" :label="item.name"
|
||||
:value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">发放记录</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" :row-style="{height: '40px'}">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="address" label="发放时间" align="center" />
|
||||
<el-table-column prop="name" label="起始序列号" align="center" />
|
||||
<el-table-column prop="shortName" label="结束序列号" align="center" />
|
||||
<el-table-column prop="linker" label="发放数量" align="center" />
|
||||
<el-table-column prop="linkPhone" label="发放网点" align="center" />
|
||||
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/marketingCard/marketingCard.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [
|
||||
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
date: '',
|
||||
bankSid:""
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.bankListPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
date: '',
|
||||
bankSid:""
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
|
||||
const tip = '请确认是否删除所选网点?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBank(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -35,6 +35,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button type="primary" size="mini" @click="editRow(scope.row)">
|
||||
发放
|
||||
</el-button> -->
|
||||
<el-button type="primary" size="mini" @click="showRow(scope.row)">
|
||||
明细
|
||||
</el-button>
|
||||
@@ -50,13 +53,15 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="bagName" label="绑定礼包" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="bagName" label="发放数量" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination :total="page.total" :page.sync="page.current" :limit.sync="page.size"
|
||||
@pagination="pagination" style="padding-bottom: 100px;"/>
|
||||
@pagination="pagination" style="padding-bottom: 100px;" />
|
||||
</div>
|
||||
|
||||
<div class="container" v-show="viewState == 2" >
|
||||
<div class="container" v-show="viewState == 2">
|
||||
<div class="tab-header">
|
||||
<el-form :inline="true" :model="listQuery.params" class="demo-form-inline">
|
||||
<el-row :gutter="20">
|
||||
@@ -110,8 +115,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="卡片状态" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="customerMobile" label="客户手机号" align="center">
|
||||
<el-table-column prop="name" label="发放时间" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="buildDate" label="发放网点" align="center">
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
|
||||
@@ -160,6 +168,39 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-dialog title="发放信息" :visible.sync="editDialog" width="30%" :before-close="banClose">
|
||||
<table class="e-table" cellspacing="0">
|
||||
<tr>
|
||||
<td>起始序列号</td>
|
||||
<td> <!-- @change="changeParentSid" -->
|
||||
<el-input v-model="from.start" style="width:100%" oninput="value=value.replace(/[^0-9]/g,'')"
|
||||
@input="input1"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结束序列号</td>
|
||||
<td>
|
||||
<el-input v-model="from.end" style="width:100%" oninput="value=value.replace(/[^0-9]/g,'')"
|
||||
@input="input2"></el-input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>发放网点</td>
|
||||
<td>
|
||||
<el-select v-model="from.bankSid" filterable clearable placeholder="请选择" style="width:100%"
|
||||
@change="bankSelect">
|
||||
<el-option v-for="item in bankList" :key="item.sid" :label="item.name" :value="item.sid">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px; text-align: center;">
|
||||
<el-button type="primary" @click="save()">保 存</el-button>
|
||||
<el-button @click="banClose">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -221,10 +262,18 @@
|
||||
}
|
||||
],
|
||||
recordId: '',
|
||||
editDialog: false,
|
||||
from: {
|
||||
start: "",
|
||||
end: "",
|
||||
bankSid: ""
|
||||
},
|
||||
bankList: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getPageList()
|
||||
this.getBankList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -294,7 +343,9 @@
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
editRow(row) {
|
||||
this.editDialog = true
|
||||
},
|
||||
showRow(row) {
|
||||
this.listQuery.params.sid = row.sid
|
||||
this.viewState = 2
|
||||
@@ -397,7 +448,6 @@
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.formobj = {
|
||||
cardArea: "",
|
||||
num: '',
|
||||
@@ -405,6 +455,56 @@
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
getBankList() {
|
||||
req.bankList()
|
||||
.then(resp => {
|
||||
console.log('>>>>>>>>>getBankList', resp.data)
|
||||
this.bankList = resp.data
|
||||
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
input1(val) {
|
||||
console.log("input1》》》》", val)
|
||||
},
|
||||
input2(val) {
|
||||
console.log("input2》》》》", val)
|
||||
},
|
||||
bankSelect(val) {
|
||||
console.log("bankSelect》》》》", val)
|
||||
const choose = this.bankList.filter((item) => item.sid === val)
|
||||
this.from.bankSid = choose[0].sid
|
||||
},
|
||||
save() {
|
||||
console.log("save》》》》", this.from)
|
||||
|
||||
req.cardGrant(this.from)
|
||||
.then(resp => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.editDialog = false
|
||||
this.from = {
|
||||
start: "",
|
||||
end: "",
|
||||
bankSid: ""
|
||||
}
|
||||
this.getPageList()
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
|
||||
},
|
||||
banClose() {
|
||||
this.from = {
|
||||
start: "",
|
||||
end: "",
|
||||
bankSid: ""
|
||||
}
|
||||
this.editDialog = false
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
230
src/views/network/index.vue
Normal file
230
src/views/network/index.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="viewState == 1">
|
||||
<button-bar ref="btnbar" view-title="网点列表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
||||
<div class="main-content">
|
||||
<div class="searchcon">
|
||||
<el-button size="small" class="searchbtn" @click="clicksearchShow">
|
||||
{{ searchxianshitit }}
|
||||
</el-button>
|
||||
<div v-show="isSearchShow" class="search">
|
||||
<el-form :inline="true" class="tab-header">
|
||||
<el-form-item label="网点名称">
|
||||
<el-input v-model="queryParams.params.name" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="btn" style="text-align: center;">
|
||||
<el-button type="primary" size="small" icon="el-icon-search"
|
||||
@click="dosearch">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-refresh"
|
||||
@click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start 项目列表头部 -->
|
||||
<div class="listtop">
|
||||
<div class="tit">网点列表</div>
|
||||
</div>
|
||||
<!-- End 项目列表头部 -->
|
||||
<!-- Start 项目列表 -->
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" :row-style="{height: '40px'}">
|
||||
<!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">编辑</el-button>
|
||||
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="网点名称" align="center" />
|
||||
<el-table-column prop="shortName" label="网点简称" align="center" />
|
||||
<el-table-column prop="linker" label="联系人" align="center" />
|
||||
<el-table-column prop="linkPhone" label="联系电话" align="center" />
|
||||
<el-table-column prop="address" label="网点地址" align="center" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- End 项目列表 -->
|
||||
<div class="pages">
|
||||
<div class="tit" />
|
||||
<!-- 翻页 -->
|
||||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
|
||||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 新增修改部分组件 -->
|
||||
<divAdd v-show="viewState == 2|| viewState ==3" ref="divadd" @doback="resetState" @reloadlist="loadList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/network/network.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './indexAdd.vue'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btndisabled: false,
|
||||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
||||
isSearchShow: false,
|
||||
searchxianshitit: '显示查询条件',
|
||||
tableLoading: false,
|
||||
dataList: [],
|
||||
btnList: [
|
||||
{
|
||||
type: 'primary',
|
||||
size: 'small',
|
||||
icon: 'plus',
|
||||
btnKey: 'toAdd',
|
||||
btnLabel: '新增'
|
||||
},
|
||||
{
|
||||
type: 'info',
|
||||
size: 'small',
|
||||
icon: 'cross',
|
||||
btnKey: 'doClose',
|
||||
btnLabel: '关闭'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$refs['btnbar'].setButtonList(this.btnList)
|
||||
},
|
||||
created() {
|
||||
this.loadList()
|
||||
},
|
||||
methods: {
|
||||
// 搜索条件效果
|
||||
clicksearchShow() {
|
||||
this.isSearchShow = !this.isSearchShow
|
||||
if (this.isSearchShow) {
|
||||
this.searchxianshitit = '隐藏查询条件'
|
||||
} else {
|
||||
this.searchxianshitit = '显示查询条件'
|
||||
}
|
||||
},
|
||||
btnHandle(btnKey) {
|
||||
switch (btnKey) {
|
||||
case 'toAdd':
|
||||
this.toAdd()
|
||||
break
|
||||
case 'doClose':
|
||||
this.doClose()
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
loadList() {
|
||||
this.tableLoading = true
|
||||
req.bankListPage(this.queryParams).then((resp) => {
|
||||
this.tableLoading = false
|
||||
if (resp.success) {
|
||||
const data = resp.data
|
||||
this.queryParams.total = data.total
|
||||
this.dataList = data.records
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
this.dataList = []
|
||||
this.queryParams.total = 0
|
||||
}
|
||||
}).catch(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
var pageindex = index + 1 + pagestart
|
||||
return pageindex
|
||||
},
|
||||
dosearch() {
|
||||
this.queryParams.current = 1
|
||||
this.loadList()
|
||||
},
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
},
|
||||
toAdd() {
|
||||
this.viewState = 2
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
toRelevancy(row) {
|
||||
this.viewState = 3
|
||||
this.$refs['divadd'].showEdit(row)
|
||||
},
|
||||
toRelevancyInfo(row) {
|
||||
|
||||
const tip = '请确认是否删除所选网点?'
|
||||
this.$confirm(tip, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
req.deleteBank(row.sid).then((resp) => {
|
||||
loading.close()
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: resp.msg,
|
||||
showClose: true
|
||||
})
|
||||
this.loadList()
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
loading.close()
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
197
src/views/network/indexAdd.vue
Normal file
197
src/views/network/indexAdd.vue
Normal file
@@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<div class="tab-header webtop">
|
||||
<!-- 标题 -->
|
||||
<div>网点信息</div>
|
||||
<!-- start 添加修改按钮 -->
|
||||
<div>
|
||||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
|
||||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
|
||||
</div>
|
||||
<!-- end 添加修改按钮 -->
|
||||
<!-- end 详情按钮 -->
|
||||
</div>
|
||||
|
||||
<div class="listconadd">
|
||||
|
||||
<el-card class="box-card">
|
||||
<div class="item">
|
||||
<span class="item_text">名称:</span>
|
||||
<el-input v-model="formobj.name" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">简称:</span>
|
||||
<el-input v-model="formobj.shortName" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">联系人:</span>
|
||||
<el-input v-model="formobj.linker" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">电话:</span>
|
||||
<el-input v-model="formobj.linkPhone" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<span class="item_text">地址:</span>
|
||||
<el-input v-model="formobj.address" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import req from '@/api/network/network.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
name: '',
|
||||
shortName: '',
|
||||
linker: '',
|
||||
linkPhone: "",
|
||||
address: "",
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
saveOrUpdate() {
|
||||
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
|
||||
|
||||
if(this.formobj.sid){
|
||||
req.updateBank(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}else{
|
||||
req.saveBank(this.formobj)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
type: 'success',
|
||||
message: resp.msg
|
||||
})
|
||||
this.handleReturn('true')
|
||||
} else {
|
||||
// 根据resp.code进行异常情况处理
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleReturn(isreload) {
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.formobj = {
|
||||
sid: "",
|
||||
name: '',
|
||||
shortName: '',
|
||||
linker: '',
|
||||
linkPhone: "",
|
||||
address: "",
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
|
||||
showAdd() {
|
||||
|
||||
},
|
||||
showEdit(row) {
|
||||
req.bankInit(row.sid)
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.formobj = row
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.box-card {
|
||||
margin-left: 60px;
|
||||
margin-right: 60px;
|
||||
min-width: 70%;
|
||||
margin-top: 20px;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
|
||||
.item_text {
|
||||
flex: 0.8;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item_input {
|
||||
flex: 4;
|
||||
font-size: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 80px;
|
||||
}
|
||||
|
||||
.item_left_input {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.item_left_text {
|
||||
height: 30px;
|
||||
margin-left: 20px;
|
||||
line-height: 30px;
|
||||
color: #018AD2;
|
||||
padding: 0px 15px;
|
||||
border: 1.5px solid #018AD2;
|
||||
border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.item_right {
|
||||
flex: 1;
|
||||
justify-items: center;
|
||||
|
||||
.item_right_list_text {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.item_right_list_delect {
|
||||
color: #5E94FF;
|
||||
margin-left: 20px;
|
||||
font-size: 16px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -102,8 +102,7 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
realName: '',
|
||||
mobile: '',
|
||||
name: '',
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user