|
|
@ -1,103 +1,108 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<button-bar view-title="品牌管理" ref="btnbar" :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 ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
|
|
|
<div class="searchli"> |
|
|
|
<el-form-item label="厂商名称"> |
|
|
|
<el-autocomplete v-model="listQuery.manufacturerName" :fetch-suggestions="querySearchAsync1" |
|
|
|
style="width: 300px" placeholder="请输入厂商名称" @select="handleSelect1"> |
|
|
|
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear1"/> |
|
|
|
<template slot-scope="{ item }"> |
|
|
|
<div style="paddingg:5px;background-color:Azure;"> |
|
|
|
<span>厂商名称:</span> |
|
|
|
<span style="color:red">{{ item.manufacturerName }} </span><br> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-autocomplete> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="品牌名称"> |
|
|
|
<!-- <el-input v-model="listQuery.brandName" placeholder="请输入品牌名称" clearable class="filter-item" /> --> |
|
|
|
<el-autocomplete v-model="listQuery.brandName" :fetch-suggestions="querySearchAsync" |
|
|
|
style="width: 300px" placeholder="请输入品牌名称" @select="handleSelect"> |
|
|
|
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear"/> |
|
|
|
<template slot-scope="{ item }"> |
|
|
|
<div style="paddingg:5px;background-color:Azure;"> |
|
|
|
<span>品牌名称:</span> |
|
|
|
<!-- <span style="color:red">{{ item.brandName }} (<span style="color:green">{{ item.sid }}</span>) </span><br> --> |
|
|
|
<span style="color:red">{{ item.brandName }} </span><br> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-autocomplete> |
|
|
|
</el-form-item> |
|
|
|
<div v-show="viewState == 1"> |
|
|
|
<button-bar view-title="品牌管理" ref="btnbar" :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 ref="listQueryform" :inline="true" :model="listQuery" label-width="80px" class="tab-header"> |
|
|
|
<div class=""> |
|
|
|
<el-form-item label="厂商名称"> |
|
|
|
<el-autocomplete v-model="listQuery.manufacturerName" :fetch-suggestions="querySearchAsync1" |
|
|
|
style="width: 300px" placeholder="请输入厂商名称" @select="handleSelect1"> |
|
|
|
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear1"/> |
|
|
|
<template slot-scope="{ item }"> |
|
|
|
<div style="paddingg:5px;background-color:Azure;"> |
|
|
|
<span>厂商名称:</span> |
|
|
|
<span style="color:red">{{ item.manufacturerName }} </span><br> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-autocomplete> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="品牌名称"> |
|
|
|
<!-- <el-input v-model="listQuery.brandName" placeholder="请输入品牌名称" clearable class="filter-item" /> --> |
|
|
|
<el-autocomplete v-model="listQuery.brandName" :fetch-suggestions="querySearchAsync" |
|
|
|
style="width: 300px" placeholder="请输入品牌名称" @select="handleSelect"> |
|
|
|
<i slot="suffix" class="el-icon-edit el-input__icon" @click="inputclear"/> |
|
|
|
<template slot-scope="{ item }"> |
|
|
|
<div style="paddingg:5px;background-color:Azure;"> |
|
|
|
<span>品牌名称:</span> |
|
|
|
<!-- <span style="color:red">{{ item.brandName }} (<span style="color:green">{{ item.sid }}</span>) </span><br> --> |
|
|
|
<span style="color:red">{{ item.brandName }} </span><br> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-autocomplete> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
|
|
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
<div class="btn" style="text-align: center;"> |
|
|
|
<el-button type="primary" size="small" @click="handleFilter">查询</el-button> |
|
|
|
<el-button type="primary" size="small" @click="handleReset">重置</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">品牌信息列表</div> |
|
|
|
<!-- <pageye v-show="total>0" :total="total" :page.sync="listQuery.pageNumber" :limit.sync="listQuery.pageSize" class="pagination" @pagination="getList" /> --> |
|
|
|
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|
|
|
@selection-change=" handleSelectionChange"> |
|
|
|
<el-table-column width="50px" type="selection" align="center"/> |
|
|
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column width="260px" label="品牌名称" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.brandName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="190px" label="品牌编码" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.brandCode }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="190px" label="品牌类型" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.brandTypeValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="厂商" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.manufacturerName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="120px" label="是否有效" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.isValidity }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="160px" label="更新时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.modifyTime }}</span> |
|
|
|
<div class="listtop"> |
|
|
|
<div class="tit">品牌信息列表</div> |
|
|
|
<!-- <pageye v-show="total>0" :total="total" :page.sync="listQuery.pageNumber" :limit.sync="listQuery.pageSize" class="pagination" @pagination="getList" /> --> |
|
|
|
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" |
|
|
|
@selection-change=" handleSelectionChange"> |
|
|
|
<el-table-column width="50px" type="selection" align="center"/> |
|
|
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column width="260px" label="品牌名称" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span class="bluezi" @click="handleCheck(scope.row)">{{ scope.row.brandName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="190px" label="品牌编码" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.brandCode }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="190px" label="品牌类型" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.brandTypeValue }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="厂商" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.manufacturerName }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="120px" label="是否有效" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.isValidity }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="160px" label="更新时间" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.modifyTime }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column label="操作" align="center" width="250px" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<el-button size="mini" type="primary" @click="handleCheck(row)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit"/> |
|
|
|
<!-- 翻页 --> |
|
|
|
<!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNumber" :limit.sync="listQuery.pageSize" class="pagination" @pagination="getList" /> --> |
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
</el-table-column> --> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="pages"> |
|
|
|
<div class="tit"/> |
|
|
|
<!-- 翻页 --> |
|
|
|
<!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageNumber" :limit.sync="listQuery.pageSize" class="pagination" @pagination="getList" /> --> |
|
|
|
<pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<pinpai-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" |
|
|
|
@reloadlist="handleFilter"/> |
|
|
|
<pinpai-info v-show="viewState == 4" ref="divinfo" @doback="resetState"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -108,10 +113,12 @@ import {basefinbankExportExcel, brandLike, deleteBySids, dictType, pagerList} fr |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar/index.vue' |
|
|
|
import pinpaiAdd from "@/views/pinpai/pinpaiguanli/pinpaiAdd"; |
|
|
|
import pinpaiInfo from "@/views/pinpai/pinpaiguanli/pinpaiInfo"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Pinpaiguanli', |
|
|
|
components: {Pagination, pageye, ButtonBar}, |
|
|
|
components: {Pagination, pageye, ButtonBar, pinpaiAdd, pinpaiInfo}, |
|
|
|
// directives: { |
|
|
|
// drag: { |
|
|
|
// // 指令的定义 |
|
|
@ -206,6 +213,7 @@ export default { |
|
|
|
// row: '', |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
viewState:1, |
|
|
|
// list: null, |
|
|
|
list: [{ title: '欧曼', code: '00000112', time: '2020-11-13' }], |
|
|
|
total: 1, |
|
|
@ -272,6 +280,9 @@ export default { |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
@ -303,6 +314,194 @@ export default { |
|
|
|
break |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
toAdd() { |
|
|
|
this.viewState = 2 |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
// this.$router.push({path: '/pinpai/pinpaiAdd/0'}) |
|
|
|
}, |
|
|
|
// 导入 |
|
|
|
handleDaoRu() { |
|
|
|
this.$router.push({ path: '/pinpai/pinpaiDaoru' }) |
|
|
|
}, |
|
|
|
// 提交添加数据 |
|
|
|
createData() { |
|
|
|
// console.log('提交:' + JSON.stringify(this.temp)) |
|
|
|
// this.$refs['dataForm'].validate(valid => { |
|
|
|
// if (valid) { |
|
|
|
// this.FormLoading = true |
|
|
|
// addServiceType(this.temp).then(response => { |
|
|
|
// // console.log('数据聚聚聚' + JSON.stringify(response)) |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.dialogFormVisible = false |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '添加成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '添加失败', |
|
|
|
// type: 'error', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
const cc = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
cc.push(element.brandCode,element.sid) |
|
|
|
}) |
|
|
|
// console.log('wowow',cc) |
|
|
|
this.sids = aa |
|
|
|
// this.daochu_user.sids=aa |
|
|
|
// this.daochu_user = cc |
|
|
|
// console.log('this.sids',this.sids) |
|
|
|
// let nn = null |
|
|
|
// cc.forEach((e) =>{ |
|
|
|
// // console.log(e, 'qoqoq') |
|
|
|
// nn = { |
|
|
|
// brandCode:e.brandCode, |
|
|
|
// sid:e.sid |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// this.daochu_user.push(nn) |
|
|
|
// console.log('wpwpwpw',this.daochu_user) |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
toEdit() { |
|
|
|
// this.resetTemp() |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// this.FormLoading = true |
|
|
|
// getServiceType(tempData.id).then(response => { |
|
|
|
// console.log('修改打开:' + JSON.stringify(response.data)) |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.temp = response.data |
|
|
|
|
|
|
|
// this.$router.push({ path: '/pinpai/pinpaiAdd/1' }) |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.dialogStatus = 'update' |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divadd'].showEdit(this.sids[0]) |
|
|
|
// this.$router.push({ path: `/pinpai/pinpaiAdd/${this.sids[0]}` }) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个商家修改!!', |
|
|
|
type: 'info', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择品牌!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
// this.dialogFormVisible = true |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs['dataForm'].clearValidate() |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 提交修改数据 |
|
|
|
updateData() { |
|
|
|
// this.$refs['dataForm'].validate(valid => { |
|
|
|
// if (valid) { |
|
|
|
// // 转换撰写时间类型 |
|
|
|
// this.FormLoading = true |
|
|
|
// // console.log('提交信息:' + JSON.stringify(this.temp)) |
|
|
|
// editServiceType(this.temp).then(response => { |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.getList() |
|
|
|
// this.dialogFormVisible = false |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '修改成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
handleCheck(row) { |
|
|
|
this.viewState = 4 |
|
|
|
this.$refs['divinfo'].showInfo(row.sid) |
|
|
|
// console.log('111', scope) |
|
|
|
// this.$router.push({ |
|
|
|
// path: '/pinpai/pinpaiInfo', |
|
|
|
// query: { sid: scope.sid }, |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
doDel() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
const _this = this |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
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)' |
|
|
|
}) |
|
|
|
deleteBySids(this.sids) |
|
|
|
.then(resp => { |
|
|
|
if (resp.success && resp.code == '200'){ |
|
|
|
loading.close() |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.getList() |
|
|
|
}else { |
|
|
|
loading.close() |
|
|
|
// _this.$message({ type: 'error', message: resp.msg, showClose: true }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.$message({ type: 'error', message: '没有选择品牌!', showClose: true }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
init() { |
|
|
|
dictType({psid: 0, type: 'supplierType'}).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
@ -489,189 +688,6 @@ export default { |
|
|
|
this.listQuery.manufacturerName = '' |
|
|
|
// this.listQuery.brandCode = '' |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
toAdd() { |
|
|
|
this.$router.push({path: '/pinpai/pinpaiAdd/0'}) |
|
|
|
}, |
|
|
|
// 导入 |
|
|
|
handleDaoRu() { |
|
|
|
this.$router.push({ path: '/pinpai/pinpaiDaoru' }) |
|
|
|
}, |
|
|
|
// 提交添加数据 |
|
|
|
createData() { |
|
|
|
// console.log('提交:' + JSON.stringify(this.temp)) |
|
|
|
// this.$refs['dataForm'].validate(valid => { |
|
|
|
// if (valid) { |
|
|
|
// this.FormLoading = true |
|
|
|
// addServiceType(this.temp).then(response => { |
|
|
|
// // console.log('数据聚聚聚' + JSON.stringify(response)) |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.dialogFormVisible = false |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '添加成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '添加失败', |
|
|
|
// type: 'error', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
const cc = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
cc.push(element.brandCode,element.sid) |
|
|
|
}) |
|
|
|
// console.log('wowow',cc) |
|
|
|
this.sids = aa |
|
|
|
// this.daochu_user.sids=aa |
|
|
|
// this.daochu_user = cc |
|
|
|
// console.log('this.sids',this.sids) |
|
|
|
// let nn = null |
|
|
|
// cc.forEach((e) =>{ |
|
|
|
// // console.log(e, 'qoqoq') |
|
|
|
// nn = { |
|
|
|
// brandCode:e.brandCode, |
|
|
|
// sid:e.sid |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// this.daochu_user.push(nn) |
|
|
|
// console.log('wpwpwpw',this.daochu_user) |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
toEdit(row) { |
|
|
|
// this.resetTemp() |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// this.FormLoading = true |
|
|
|
// getServiceType(tempData.id).then(response => { |
|
|
|
// console.log('修改打开:' + JSON.stringify(response.data)) |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.temp = response.data |
|
|
|
|
|
|
|
// this.$router.push({ path: '/pinpai/pinpaiAdd/1' }) |
|
|
|
|
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.dialogStatus = 'update' |
|
|
|
this.$router.push({ path: `/pinpai/pinpaiAdd/${this.sids[0]}` }) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个商家修改!!', |
|
|
|
type: 'info', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择品牌!!', |
|
|
|
type: 'error', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
// this.dialogFormVisible = true |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs['dataForm'].clearValidate() |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 提交修改数据 |
|
|
|
updateData() { |
|
|
|
// this.$refs['dataForm'].validate(valid => { |
|
|
|
// if (valid) { |
|
|
|
// // 转换撰写时间类型 |
|
|
|
// this.FormLoading = true |
|
|
|
// // console.log('提交信息:' + JSON.stringify(this.temp)) |
|
|
|
// editServiceType(this.temp).then(response => { |
|
|
|
// this.FormLoading = false |
|
|
|
// if (response.code === 20000) { |
|
|
|
// this.getList() |
|
|
|
// this.dialogFormVisible = false |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '修改成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: '修改失败', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
handleCheck(scope) { |
|
|
|
console.log('111', scope) |
|
|
|
this.$router.push({ |
|
|
|
path: '/pinpai/pinpaiInfo', |
|
|
|
query: { sid: scope.sid }, |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
doDel() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|
const _this = this |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
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)' |
|
|
|
}) |
|
|
|
deleteBySids(this.sids) |
|
|
|
.then(resp => { |
|
|
|
if (resp.success && resp.code == '200'){ |
|
|
|
loading.close() |
|
|
|
_this.$message({ type: 'success', message: resp.msg, showClose: true }) |
|
|
|
_this.getList() |
|
|
|
}else { |
|
|
|
loading.close() |
|
|
|
// _this.$message({ type: 'error', message: resp.msg, showClose: true }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
loading.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.$message({ type: 'error', message: '没有选择品牌!', showClose: true }) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
doExport() { |
|
|
|
// this.$confirm('确定要导出数据, 是否继续?', '提示', { |
|
|
|