门店排序,改变状态
This commit is contained in:
@@ -35,6 +35,12 @@ export default {
|
||||
method: 'delete'
|
||||
});
|
||||
},
|
||||
// 修改状态
|
||||
updateIsEnable: function(sid,isEnable) {
|
||||
return request({
|
||||
url: '/lpkstore/updateIsEnable/'+sid+"/"+isEnable
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,76 +1,102 @@
|
||||
<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="code" label="提货点编号" align="center" /> -->
|
||||
<el-table-column prop="phone" label="联系电话" align="center" />
|
||||
<el-table-column prop="address" label="提货点地址" align="center" />
|
||||
<el-table-column prop="businessHours" 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>
|
||||
<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="100">
|
||||
<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 label="是否禁用" align="center" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isEnable"
|
||||
active-text="可用"
|
||||
inactive-text="禁用"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="enableChange(scope.row.sid,scope.row.isEnable)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="提货点名称" align="center" width="200" />
|
||||
<!-- <el-table-column prop="code" label="提货点编号" align="center" /> -->
|
||||
<el-table-column prop="phone" label="联系电话" align="center" width="120" />
|
||||
<el-table-column prop="address" label="提货点地址" align="center" />
|
||||
<el-table-column prop="businessHours" label="营业时间" align="center" width="200" />
|
||||
<el-table-column prop="sort" label="排序" align="center" width="80" />
|
||||
</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/pickupPoint/pickupPoint.js'
|
||||
import ButtonBar from '@/components/ButtonBar'
|
||||
import Pagination from '@/components/pagination'
|
||||
import pageye from '@/components/pagination/pageye'
|
||||
// import pageye from '@/components/pagination/pageye'
|
||||
import divAdd from './indexAdd.vue'
|
||||
export default {
|
||||
name: 'SupplierBankInfoIndex',
|
||||
components: {
|
||||
ButtonBar,
|
||||
Pagination,
|
||||
pageye,
|
||||
// pageye,
|
||||
divAdd
|
||||
},
|
||||
data() {
|
||||
@@ -102,8 +128,7 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
|
||||
name: ''
|
||||
}
|
||||
},
|
||||
sids: []
|
||||
@@ -154,7 +179,6 @@
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
// 序号
|
||||
indexMethod(index) {
|
||||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
||||
@@ -171,7 +195,7 @@
|
||||
size: 10,
|
||||
total: 0,
|
||||
params: {
|
||||
name: '',
|
||||
name: ''
|
||||
}
|
||||
}
|
||||
this.loadList()
|
||||
@@ -181,15 +205,14 @@
|
||||
this.$refs['divadd'].showAdd()
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
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: '确定',
|
||||
@@ -221,9 +244,26 @@
|
||||
},
|
||||
resetState() {
|
||||
this.viewState = 1
|
||||
},
|
||||
enableChange(sid, state) {
|
||||
console.log('sid', sid)
|
||||
console.log('state', state)
|
||||
req.updateIsEnable(sid, state).then((resp) => {
|
||||
if (resp.success) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '状态已更新',
|
||||
showClose: true
|
||||
})
|
||||
} else { // 根据resp.code进行异常情况处理
|
||||
}
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -1,44 +1,51 @@
|
||||
<template>
|
||||
<div>
|
||||
<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="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">
|
||||
<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.address" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">电话:</span>
|
||||
<el-input v-model="formobj.phone" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">营业时间:</span>
|
||||
<el-input v-model="formobj.businessHours" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<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.address" 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.phone" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">营业时间:</span>
|
||||
<el-input v-model="formobj.businessHours" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_text">排序:</span>
|
||||
<el-input v-model="formobj.sort" placeholder="" class="item_input" clearable />
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -49,11 +56,14 @@
|
||||
return {
|
||||
submitdisabled: false,
|
||||
formobj: {
|
||||
sid: "",
|
||||
sid: '',
|
||||
name: '',
|
||||
address: '',
|
||||
phone: '',
|
||||
businessHours: "",
|
||||
businessHours: '',
|
||||
sort: 0,
|
||||
linker: '',
|
||||
picUrl: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -80,11 +90,14 @@
|
||||
if (isreload === 'true') this.$emit('reloadlist')
|
||||
this.imgList = []
|
||||
this.formobj = {
|
||||
sid: "",
|
||||
sid: '',
|
||||
name: '',
|
||||
address: '',
|
||||
phone: '',
|
||||
businessHours: "",
|
||||
businessHours: '',
|
||||
sort: 0,
|
||||
linker: '',
|
||||
picUrl: ''
|
||||
}
|
||||
this.$emit('doback')
|
||||
},
|
||||
@@ -97,7 +110,6 @@
|
||||
.then(resp => {
|
||||
if (resp.success) {
|
||||
this.formobj = resp.data
|
||||
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
|
||||
Reference in New Issue
Block a user