|
@@ -8,21 +8,21 @@
|
|
|
<div class="right" style="width: auto;">
|
|
|
<div>
|
|
|
<el-input
|
|
|
- v-model="search.fastSearch"
|
|
|
- placeholder="请输入店铺/企业名称"
|
|
|
+ v-model="search.shopName"
|
|
|
+ placeholder="请输入店铺名称"
|
|
|
style="width: 180px !important; margin-right: 10px;"
|
|
|
></el-input>
|
|
|
<el-select
|
|
|
- v-model="search.transCode"
|
|
|
+ v-model="search.shopStatus"
|
|
|
placeholder="请选择店铺状态"
|
|
|
clearable
|
|
|
style="width: 200px !important;"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in transCodeList"
|
|
|
- :key="item"
|
|
|
- :label="item"
|
|
|
- :value="item"
|
|
|
+ v-for="item in constant.shopStatus"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -38,35 +38,41 @@
|
|
|
:table-options="tableOptions"
|
|
|
:data="tableData"
|
|
|
:count="total"
|
|
|
- parent-component="LogManage"
|
|
|
/>
|
|
|
</template>
|
|
|
<AddStroe ref="addStoreRef" @goEnterprise="changeEnterprise" />
|
|
|
+ <BindEnterprise ref="bindEnterpriseRef" :name="curShopName" :status="curShopStatus" :shop-id="curShopId" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import { getAllTransCode, getSmbList } from '@/api/systemManage/smbLogManage/smbLogManage'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import { getStoreList, unBindEnterprise } from '@/api/myStoreEnterprise'
|
|
|
|
|
|
export default {
|
|
|
name: 'StoreList',
|
|
|
components: {
|
|
|
- AddStroe: () => import('./AddStoreDialog.vue')
|
|
|
+ AddStroe: () => import('./AddStoreDialog.vue'),
|
|
|
+ BindEnterprise: () => import('./BindEnterprise.vue')
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
search: {
|
|
|
- transCode: ''
|
|
|
+ shopName: '',
|
|
|
+ shopStatus: ''
|
|
|
},
|
|
|
transCodeList: [],
|
|
|
total: 0,
|
|
|
loading: false,
|
|
|
- tableData: [{ enterpriseName: '1688' }],
|
|
|
+ tableData: [],
|
|
|
tableOptions: {
|
|
|
sortTable: true,
|
|
|
maxHeight: 'calc(100vh - 395px)',
|
|
|
height: 'calc(100vh - 395px)'
|
|
|
},
|
|
|
+ curShopName: '',
|
|
|
+ curShopStatus: '',
|
|
|
+ curShopId: '',
|
|
|
columns: [
|
|
|
{
|
|
|
label: '序号',
|
|
@@ -74,52 +80,57 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '平台',
|
|
|
- prop: 'platformName',
|
|
|
- showTooltip: true
|
|
|
+ showTooltip: true,
|
|
|
+ render: (h, row) => {
|
|
|
+ return <div>{ this.getPlatformName(row.platformType) }</div>
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: '企业名称',
|
|
|
- prop: 'enterpriseName',
|
|
|
+ prop: 'companyName',
|
|
|
showTooltip: true
|
|
|
},
|
|
|
{
|
|
|
label: '统一社会信用代码',
|
|
|
width: 160,
|
|
|
- prop: 'socialCreditCode',
|
|
|
+ prop: 'code',
|
|
|
showTooltip: true
|
|
|
},
|
|
|
{
|
|
|
label: '店铺ID',
|
|
|
showTooltip: true,
|
|
|
- prop: 'storeId'
|
|
|
+ prop: 'platformShopId'
|
|
|
},
|
|
|
{
|
|
|
label: '店铺名称',
|
|
|
- prop: 'storeName',
|
|
|
+ prop: 'shopName',
|
|
|
showTooltip: true
|
|
|
},
|
|
|
{
|
|
|
label: '店铺状态',
|
|
|
- prop: 'storeStatus',
|
|
|
- showTooltip: true
|
|
|
+ prop: 'shopStatus',
|
|
|
+ showTooltip: true,
|
|
|
+ render: (h, row) => {
|
|
|
+ return <div>{ this.getShopStatus(row.shopStatus) }</div>
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
label: '准入状态',
|
|
|
- prop: 'enterStatus',
|
|
|
+ prop: 'zrStatus',
|
|
|
showTooltip: true,
|
|
|
render: (h, row) => {
|
|
|
- return <div>{ row.success ? '成功' : '失败' }</div>
|
|
|
+ return <div>{ row.zrStatus ? '成功' : '失败' }</div>
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
label: '绑定账户名称',
|
|
|
- prop: 'bindName',
|
|
|
+ prop: 'registrationName',
|
|
|
width: 160,
|
|
|
showTooltip: true
|
|
|
},
|
|
|
{
|
|
|
label: '绑定账号',
|
|
|
- prop: 'bindAccountNo',
|
|
|
+ prop: 'registrationAccount',
|
|
|
showTooltip: true
|
|
|
},
|
|
|
{
|
|
@@ -135,7 +146,7 @@ export default {
|
|
|
const btnList = [
|
|
|
{
|
|
|
msg: '解绑企业',
|
|
|
- icon: 'iconfont icon-icon-record',
|
|
|
+ icon: 'iconfont icon-a-Group1046',
|
|
|
power: '', // viewFinancingLoanInfo
|
|
|
rowPower: [],
|
|
|
category: 'unBindEnterprise'
|
|
@@ -159,7 +170,7 @@ export default {
|
|
|
return (
|
|
|
this.tablePower({ item, row }) && <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
|
|
|
<span class='table-icon-box' v-power={item.power}>
|
|
|
- <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row, item.msg) }}></i>
|
|
|
+ <i class={item.icon} style='font-size: 21px;' onClick={() => { this.handlerOperate(item.category, row, item.msg) }}></i>
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
)
|
|
@@ -171,10 +182,8 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
- // mounted() {
|
|
|
- // this.fetchData()
|
|
|
- // },
|
|
|
computed: {
|
|
|
+ ...mapGetters(['constant']),
|
|
|
tablePower() {
|
|
|
return ({ item, row }) => {
|
|
|
const { rowPower, category } = item
|
|
@@ -188,6 +197,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.fetchData()
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleAddStore() {
|
|
|
this.$refs.addStoreRef.showAddStore()
|
|
@@ -198,22 +210,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async fetchData() {
|
|
|
- // const params = {
|
|
|
- // page: this.page,
|
|
|
- // rows: this.size,
|
|
|
- // transCode: this.search.transCode
|
|
|
- // }
|
|
|
-
|
|
|
- // this.loading = true
|
|
|
+ const params = {
|
|
|
+ page: this.page,
|
|
|
+ rows: this.size,
|
|
|
+ transCode: this.search.transCode
|
|
|
+ }
|
|
|
|
|
|
- // const res = await getSmbList(params)
|
|
|
+ this.loading = true
|
|
|
|
|
|
- // this.loading = false
|
|
|
+ const res = await getStoreList(params)
|
|
|
|
|
|
- // if (res.success) {
|
|
|
- // this.tableData = res.rows || []
|
|
|
- // this.total = res.records
|
|
|
- // }
|
|
|
+ this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ this.tableData = res.rows || []
|
|
|
+ this.total = res.records
|
|
|
+ }
|
|
|
},
|
|
|
async queryAllTransCode() {
|
|
|
// const res = await getAllTransCode()
|
|
@@ -224,12 +235,46 @@ export default {
|
|
|
},
|
|
|
handlerOperate(type, row, msg) {
|
|
|
if (type === 'unBindEnterprise') {
|
|
|
-
|
|
|
+ console.log('unBindEnterprise')
|
|
|
+ this.$confirm('确定要解绑企业嘛?', '解绑企业', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.unbindEnterprise(row.id)
|
|
|
+ }).catch(() => {})
|
|
|
} else if (type === 'bindEnterprise') {
|
|
|
-
|
|
|
+ this.curShopName = row.shopName
|
|
|
+ this.curShopStatus = row.shopStatus
|
|
|
+ this.curShopId = row.id
|
|
|
+ this.$refs.bindEnterpriseRef.showAddEnterprise()
|
|
|
} else if (type === 'bindAccount') {
|
|
|
+ console.log('bindAccount')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async unbindEnterprise(enterpriseId) {
|
|
|
+ const res = await unBindEnterprise(enterpriseId)
|
|
|
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('解绑企业成功')
|
|
|
+ this.$router.go(0)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getPlatformName(type) {
|
|
|
+ const map = {
|
|
|
+ 'pinduoduo': '拼多多',
|
|
|
+ 'kuaishou': '快手',
|
|
|
+ 'douyin': '抖音',
|
|
|
+ 'meituan': '美团'
|
|
|
+ }
|
|
|
+ return map[type] || ''
|
|
|
+ },
|
|
|
+ getShopStatus(status) {
|
|
|
+ const map = {
|
|
|
+ 0: '关闭',
|
|
|
+ 1: '正常'
|
|
|
}
|
|
|
+ return map[status] || ''
|
|
|
}
|
|
|
}
|
|
|
}
|