|
@@ -73,7 +73,6 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <!-- <el-tag type="warning">待上线</el-tag> -->
|
|
|
<span style="margin-right: 10px" class="status warning">待上线</span>
|
|
|
</template>
|
|
|
</template>
|
|
@@ -116,26 +115,7 @@
|
|
|
<!-- 页码 -->
|
|
|
<pagination :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
|
|
|
- <!-- 对话框区域 -->
|
|
|
- <el-dialog :title="dialogTitle" :visible.sync="showAddAuthDialog" width="30%" @close="dialogClosed">
|
|
|
- <el-form ref="addAuthForm" :rules="addAuthFormRules" :model="addAuthFormData" label-width="100px">
|
|
|
- <el-form-item label="授权机构:" prop="authParty">
|
|
|
- <el-input v-model="addAuthFormData.authParty" placeholder="请输入授权机构名称" />
|
|
|
- </el-form-item>
|
|
|
- <!-- <el-form-item label="上线状态:">
|
|
|
- <el-select v-model="addAuthFormData.status">
|
|
|
- <el-option label="上线" :value="1" />
|
|
|
- <el-option label="下线" :value="0" />
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
- </el-form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <permission-button @click="showAddAuthDialog = false">取 消</permission-button>
|
|
|
- <permission-button type="primary" :disabled="disabled" @click="handleUpdateBrandAuth">确 定</permission-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
<!-- 导入对话框 -->
|
|
|
- <!-- dialog Start -->
|
|
|
<el-dialog title="导入" :visible.sync="improtDialogVisible" width="30%" @close="improtDialogClose">
|
|
|
<el-form ref="dialogForm" :model="improtDialogFormData" label-width="86px" :rules="improtDialogFormRules">
|
|
|
<el-form-item label="文件路径:" prop="fileUrl">
|
|
@@ -153,7 +133,6 @@
|
|
|
>确 定</permission-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
- <!-- dialog END -->
|
|
|
|
|
|
<!-- 二维码 -->
|
|
|
<transition name="fade">
|
|
@@ -163,16 +142,15 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import PermissionButton from '@/views/components/PermissionButton'
|
|
|
import FileUpload from '@/components/FileUpload'
|
|
|
import Qrcode from '@/components/qrcode/club-qrcode.vue'
|
|
|
-import { fecthAuthList, saveBrandAuth, changeAuthStatus, removeAuth, authImportExcel } from '@/api/auth'
|
|
|
+import { fecthAuthList, changeAuthStatus, removeAuth, authImportExcel } from '@/api/auth'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import { debounce, downloadWithUrl } from '@/utils/tools'
|
|
|
import handleClipboard from '@/utils/clipboard'
|
|
|
export default {
|
|
|
name: 'ComplexTable',
|
|
|
- components: { FileUpload, PermissionButton, Qrcode },
|
|
|
+ components: { FileUpload, Qrcode },
|
|
|
data() {
|
|
|
return {
|
|
|
showQRcode: false,
|
|
@@ -191,24 +169,7 @@ export default {
|
|
|
pageSize: 10, // 分页
|
|
|
status: ''
|
|
|
},
|
|
|
- // 添加品牌授权
|
|
|
- showAddAuthDialog: false, // 显示添加供应商对话框
|
|
|
- dialogTitle: '',
|
|
|
- addAuthFormData: {
|
|
|
- authId: '', // 授权id
|
|
|
- authUserId: '', // 供应商用户id
|
|
|
- authParty: '', // 授权机构
|
|
|
- createBy: '', // 创建人id
|
|
|
- status: 2 // 授权状态 0下线,1上线 2待审核
|
|
|
- },
|
|
|
- addAuthFormRules: {
|
|
|
- authParty: [{ required: true, message: '请输入授权机构名称', trigger: 'blur' }]
|
|
|
- },
|
|
|
- disabled: false,
|
|
|
- // 审核未通过
|
|
|
- auditFailedList: [],
|
|
|
- auditNoticeFlag: true,
|
|
|
- // ------------------
|
|
|
+
|
|
|
improtDialogVisible: false,
|
|
|
requestLoading: false,
|
|
|
uploadFileList: [],
|
|
@@ -252,7 +213,6 @@ export default {
|
|
|
|
|
|
// 复制链接
|
|
|
cotyClubLink($event, row) {
|
|
|
- // http://192.168.2.92:8888/114/app/record/club/detail
|
|
|
handleClipboard(
|
|
|
`${process.env.VUE_APP_WWW_HOST}/${this.authUserId}/app/form/link-register?type=link&authId=${row.authId}`,
|
|
|
'链接已复制到粘贴板',
|
|
@@ -265,8 +225,7 @@ export default {
|
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
|
console.log(valid)
|
|
|
if (!valid) return
|
|
|
- this.requestLoading = true // 上传文件
|
|
|
- // this.$refs.fileUpload.submit()
|
|
|
+ this.requestLoading = true
|
|
|
this.handleSave()
|
|
|
})
|
|
|
},
|
|
@@ -431,8 +390,6 @@ export default {
|
|
|
// this.formatList(list)
|
|
|
this.list = list
|
|
|
this.total = total
|
|
|
- // 获取审核未通过的列表
|
|
|
- // this.checkAuditFailedList(list)
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
console.log(err)
|
|
@@ -442,73 +399,7 @@ export default {
|
|
|
this.listLoading = false
|
|
|
})
|
|
|
},
|
|
|
- // 获取审核未通过条数
|
|
|
- // Audit failed 审核未通过
|
|
|
- checkAuditFailedList(data) {
|
|
|
- this.auditFailedList = data.filter((item) => item.auditStatus === 0)
|
|
|
- if (this.auditFailedList.length > 0 && this.auditNoticeFlag) {
|
|
|
- this.$notify.info({
|
|
|
- title: '消息通知',
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- message: `共有<b style="color:red">${this.auditFailedList.length}</b>个授权机构未能通过审核,请查看原因并及时修改!`,
|
|
|
- duration: 3000
|
|
|
- })
|
|
|
- this.auditNoticeFlag = false
|
|
|
- }
|
|
|
- },
|
|
|
- // 检查机构名是否存在 true:存在 false:不存在
|
|
|
- handleCheckAuthName(name) {
|
|
|
- const flag = this.list.some((item) => item.authParty === name)
|
|
|
- console.log(flag)
|
|
|
- return flag
|
|
|
- },
|
|
|
- // 添加授权
|
|
|
- handleUpdateBrandAuth() {
|
|
|
- if (this.handleCheckAuthName(this.addAuthFormData.authParty) && this.dialogFlag) {
|
|
|
- this.$message({
|
|
|
- message: '该授权机构已存在',
|
|
|
- duration: 1000,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.$refs.addAuthForm.validate((valide) => {
|
|
|
- if (valide) {
|
|
|
- this.disabled = true
|
|
|
- this.listLoading = true
|
|
|
- // authUserId先判断是否为代理操作,是就从代理数据中获取,否则直接获取当前登录用户的信息
|
|
|
- this.addAuthFormData.authUserId = this.authUserId
|
|
|
- this.addAuthFormData.createBy = this.addAuthFormData.authUserId
|
|
|
- saveBrandAuth(this.addAuthFormData)
|
|
|
- .then((res) => {
|
|
|
- if (res.code !== 0) {
|
|
|
- return
|
|
|
- }
|
|
|
- this.getList()
|
|
|
- const h = this.$createElement
|
|
|
- this.$notify.success({
|
|
|
- title: `${this.noticeTitle}授权机构`,
|
|
|
- message: h(
|
|
|
- 'i',
|
|
|
- { style: 'color: #333' },
|
|
|
- `已${this.noticeTitle}授权机构:"${this.addAuthFormData.authParty}"`
|
|
|
- ),
|
|
|
- duration: 3000
|
|
|
- })
|
|
|
- this.$refs.addAuthForm.resetFields()
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err)
|
|
|
- this.$message.danger('操作失败')
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.showAddAuthDialog = false
|
|
|
- this.listLoading = false
|
|
|
- this.disabled = false
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
// 删除品牌授权
|
|
|
async handleRemoveAuth(item) {
|
|
|
const text = await this.$confirm('确认删除该数据吗?删除后,对应的商品数据也将全部删除', '提示', {
|
|
@@ -572,36 +463,10 @@ export default {
|
|
|
// 过滤列表
|
|
|
handleFilter() {
|
|
|
this.listQuery.page = 1
|
|
|
+ this.list = []
|
|
|
this.getList()
|
|
|
},
|
|
|
- // 添加供应商
|
|
|
- handleAddAuth() {
|
|
|
- console.log('添加供应商')
|
|
|
- },
|
|
|
- // 对话框关闭事件
|
|
|
- dialogClosed() {
|
|
|
- console.log('dialog is closed')
|
|
|
- this.addAuthFormData.authParty = ''
|
|
|
- this.addAuthFormData.authId = ''
|
|
|
- this.addAuthFormData.status = 1
|
|
|
- this.noticeTitle = '添加'
|
|
|
- this.$refs.addAuthForm.resetFields()
|
|
|
- },
|
|
|
- handleShowEditDialog(title, data) {
|
|
|
- this.dialogTitle = title
|
|
|
- if (data) {
|
|
|
- this.addAuthFormData.authId = data.authId
|
|
|
- this.addAuthFormData.authUserId = data.authUserId
|
|
|
- this.addAuthFormData.authParty = data.authParty
|
|
|
- this.addAuthFormData.createBy = data.createBy
|
|
|
- this.status = data.status
|
|
|
- this.noticeTitle = '修改'
|
|
|
- this.dialogFlag = false
|
|
|
- } else {
|
|
|
- this.dialogFlag = true
|
|
|
- }
|
|
|
- this.showAddAuthDialog = true
|
|
|
- },
|
|
|
+
|
|
|
indexMethod(index) {
|
|
|
return index + this.listQuery.pageSize * (this.listQuery.pageNum - 1) + 1
|
|
|
}
|