From 2d23d9c9d26a5b0ef65ec79b30ab12052b85b23c Mon Sep 17 00:00:00 2001 From: Zhao Qiqi <1287235164@qq.com> Date: Tue, 26 Jul 2022 09:06:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=82=E5=95=86=E3=80=81=E7=BB=8F=E9=94=80?= =?UTF-8?q?=E5=95=86=E3=80=81=E5=93=81=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../anrui-base-ui/src/styles/index.scss | 154 ++++- .../changshangguanli/changshangguanli.vue | 10 +- .../changshangguanli/changshangguanliAdd.vue | 40 +- .../changshangguanli/changshanglook.vue | 133 +--- .../relation/changshangBankInfo.vue | 2 +- .../guakaogongsiguanli/guakaogongsiInfo.vue | 1 - .../guakaogongsiguanli/guakaogongsiguanli.vue | 14 +- .../views/pinpai/pinpaiguanli/pinpaiAdd.vue | 66 +- .../views/pinpai/pinpaiguanli/pinpaiInfo.vue | 19 +- .../pinpai/pinpaiguanli/pinpaiguanli.vue | 566 +++++++++--------- 10 files changed, 531 insertions(+), 474 deletions(-) diff --git a/anrui-base/anrui-base-ui/src/styles/index.scss b/anrui-base/anrui-base-ui/src/styles/index.scss index be61818c68..383090e1d2 100644 --- a/anrui-base/anrui-base-ui/src/styles/index.scss +++ b/anrui-base/anrui-base-ui/src/styles/index.scss @@ -102,7 +102,7 @@ div:focus { font-size: 20px; } -// 页面上的button按钮的样式 +// 页面上的button按钮 .app-container { .el-button--medium { padding: 10px 14px; @@ -110,7 +110,7 @@ div:focus { } .el-button--small { - padding: 7px 12px; + padding: 8px 12px; font-size: 14px; } @@ -146,6 +146,15 @@ div:focus { overflow-x: hidden; } +// 新增编辑、详情页面的标题样式 +.listconadd{ + .titwu { + font-size: 28px; + text-align: center; + padding: 30px 0 20px 0; + } +} + .listconsub { height: calc(100vh - 310px); overflow-y: auto; @@ -236,51 +245,122 @@ div:focus { margin-right: 4px; } .formadd { - padding: 88px 40px 0 40px; + padding: 10px 40px 0 40px; font-size: 16px; // height: calc(100vh - 200px);overflow-y: auto; - .title { - padding: 12px;font-weight: bold; + .title { + padding: 12px; + font-weight: bold; font-size: 16px; background-color: $header-bg; text-align: left; color: #ffffff; - } + } + .el-row { - display:flex; - flex-wrap: wrap; - border-left: 1px solid $table-border-color; - .el-col{ - border-right: 1px solid $table-border-color; - border-bottom: 1px solid $table-border-color; - padding: 0 15px; - min-height: 42px; - line-height: 1; - .el-form-item{ - margin-bottom: 0; + display: flex; + flex-wrap: wrap; + border-left: 1px solid $table-border-color; + .el-col { + border-right: 1px solid $table-border-color; + border-bottom: 1px solid $table-border-color; + padding: 0 15px; + min-height: 42px; + line-height: 1; + + .el-form-item { + margin-bottom: 0; + line-height: 42px; + // .addinputw{width: 400px;} + .addinputw { + width: 80%; line-height: 42px; - // .addinputw{width: 400px;} - .addinputw{width: 80%;line-height: 42px;} - .el-input__inner { - height: 36px; - } + } + .el-input__inner { + height: 36px; } } - - } - .footer{margin: 20px;} + } + } + .footer{margin: 20px;} } +.formaddcopy02 { + padding: 10px 40px 0 40px; + .title { + padding: 12px; + font-weight: bold; + font-size: 16px; + background-color: #0294d7; + color: #ffffff; + text-align: left; + } + + .el-row { + display: flex; + flex-wrap: wrap; + border-left: 1px solid $table-border-color; + + .el-col { + border-right: 1px solid $table-border-color; + border-bottom: 1px solid $table-border-color; + min-height: 42px; + padding: 0 15px; + line-height: 42px; + position: relative; + .span-sty { + position: absolute; + top: 0; + bottom: 0; + left: 0; + line-height: 42px; + text-align: right; + font-size: 14px; + color: #606266; + font-weight: 600; + width: 70px; + padding-right: 5px; + border-right: 1px solid #e0e3eb; + } + + .el-form-item { + margin-bottom: 0; + line-height: 42px; + .addinputw { + //padding: 5px 0; + width: 65%; + margin-left: 80px; + line-height: 42px; + } + + .addinputInfo { + margin-left: 80px; + line-height: 42px; + } + + .el-input__inner { + height: 36px; + } + } + } + + } + + .footer { + margin: 20px; + } +} .forminfo { - padding: 20px 0; - .title { - padding: 10px;font-weight: bold; - font-size: 20px; - background-color: $header-bg; - text-align: center; + padding: 10px 40px 0 40px; + .title { + padding: 12px; + font-weight: bold; + font-size: 16px; + background-color: #0294d7; color: #ffffff; - } + text-align: left; + } .el-row { display:flex; flex-wrap: wrap; @@ -309,6 +389,16 @@ div:focus { z-index: 100; } .bluezi{color: $header-bg;cursor:pointer;} +// 隐藏显示按钮 +.main-content { + .searchcon { + .searchbtn { + margin: 5px 0; + border: #2cab69 1px solid; + color: #2cab69; + } + } +} // 经销商添加样式 .titcon{ display: flex; diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue index b28863f10f..f28f1ac03a 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue @@ -59,7 +59,7 @@ 编辑 - + {{ scope.row.manufacturerName }} @@ -175,28 +175,28 @@ export default { btnList: [ { type: 'primary', - size: 'medium', + size: 'small', icon: 'plus', btnKey: 'toAdd', btnLabel: '新增' }, { type: 'danger', - size: 'medium', + size: 'small', icon: 'del', btnKey: 'doDel', btnLabel: '删除' }, { type: 'success', - size: 'medium', + size: 'small', icon: 'export', btnKey: 'build', btnLabel: '导出' }, { type: 'info', - size: 'medium', + size: 'small', icon: 'cross', btnKey: 'doClose', btnLabel: '关闭' diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue index 333f0fd01f..872bce979a 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue @@ -7,9 +7,9 @@ 【修改】厂商信息 - 保存 - 提交 - 返回 + 保存 + 提交 + 返回 @@ -453,7 +453,7 @@ import {details, SaveList, selectListOrg, Update,} from "@/api/jichuxinxi/basema import {getCity, getCounty, getProvince} from '@/api/portal/areaPicker' // 省市区 import {typeValues} from "@/api/jichuxinxi/dictcommons"; import {getLook, getXiu, setuser} from "@/utils/baocun"; -import {fetchBySid, getListOrg, getPathSidByUserSid} from "@/api/jichuxinxi/brandManagement"; +import {getListOrg} from "@/api/jichuxinxi/brandManagement"; import changshangBankInfo from "@/views/changshang/changshangguanli/relation/changshangBankInfo"; export default { @@ -852,20 +852,20 @@ export default { this.temp1.taxClassificationValue = bb.name }, // 根据登陆人sid获取分公司 - getPathSid() { - const userSid = window.sessionStorage.getItem('userSid') - getPathSidByUserSid({userSid:userSid}).then((res) => { - if (res.code === '200') { - // this.temp.createOrgName = res - this.temp.createOrg = res.data - fetchBySid(res.data).then((response) => { - if (response.code === '200') { - this.temp.createOrgName = response.data.name - } - }) - } - }) - }, + // getPathSid() { + // const userSid = window.sessionStorage.getItem('userSid') + // getPathSidByUserSid({userSid:userSid}).then((res) => { + // if (res.code === '200') { + // // this.temp.createOrgName = res + // this.temp.createOrg = res.data + // fetchBySid(res.data).then((response) => { + // if (response.code === '200') { + // this.temp.createOrgName = response.data.name + // } + // }) + // } + // }) + // }, // 查询所有分公司 getListOrgAll() { getListOrg().then((res) => { @@ -969,7 +969,7 @@ export default { this.getZuZhi(); this.huoquSheng() this.getListOrgAll() - this.getPathSid() + // this.getPathSid() }, init() { @@ -1136,7 +1136,7 @@ export default { this.getZuZhi(); this.huoquSheng() this.getListOrgAll() - this.getPathSid() + // this.getPathSid() }, // 返回 handleReturn(isreload) { diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue index 9224110512..5acddedc1e 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue @@ -4,7 +4,7 @@ 厂商管理详情 - 返回 + 返回 @@ -41,8 +41,8 @@ 分类 - - {{temp.supplierType}} + + {{temp.supplierTypeValue}} @@ -294,108 +294,26 @@ - 供应厂商开户行信息 - - - 国家 - - - - {{temp2.country}} - - - - 开户银行 - - - - {{temp2.depositBank}} - - - - - - 银行账号 - - - - {{temp2.bankAccount}} - - - - 账户名称 - - - - {{temp2.accountName}} - - - - - - 收款银行 - - - - {{temp2.dueBank}} - - - - 银行网点 - - - - {{temp2.bankingOutlets}} - - - - - - 开户行地址 - - - - {{temp2.bankAddress}} - - - - 联行号 - - - - {{temp2.paymentLines}} - - - - - - Swiftcode(银行代码) - - - - {{temp2.swiftCode}} - - - - 币种 - - - - {{temp2.currency}} - - - - - - 描述 - - - - {{temp2.remarks}} - - - - + + 开户行信息 + + 新增 + + + + + + + + + + + + + + + + @@ -431,6 +349,9 @@ export default { update: "修改", create: "创建", }, + tableKey: 0, + index: 0, + list:[], temp:{}, temp1:{}, temp2:{}, @@ -515,7 +436,7 @@ export default { this.temp1 = response.data.baseManufacturerFinanceDto } if (response.data.baseManufacturerBankDto) { - this.temp2 = response.data.baseManufacturerBankDto + this.list = response.data.baseManufacturerBankDto } } }) diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue index 43eb11f802..2ce0fd45a5 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/relation/changshangBankInfo.vue @@ -160,7 +160,7 @@ export default { methods: { getType() { // typeValues({ - type: 'receiptBank' + type: 'dueBank' }).then((res) => { if (res.success) { this.receiptBank_list = res.data diff --git a/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue b/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue index 757b76d67c..b3761b19ec 100644 --- a/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue +++ b/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue @@ -4,7 +4,6 @@ 经销商详情 - 下载 返回 diff --git a/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiguanli.vue b/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiguanli.vue index 95d4a302d3..5be6aa2211 100644 --- a/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiguanli.vue +++ b/anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiguanli.vue @@ -53,8 +53,8 @@ - 查询 - 重置 + 查询 + 重置 @@ -75,7 +75,7 @@ @selection-change="handleSelectionChange"> - + 办理 查看 @@ -185,28 +185,28 @@ export default { btnList: [ { type: 'primary', - size: 'medium', + size: 'small', icon: 'plus', btnKey: 'toAdd', btnLabel: '新增' }, { type: 'danger', - size: 'medium', + size: 'small', icon: 'del', btnKey: 'doDel', btnLabel: '删除' }, { type: 'success', - size: 'medium', + size: 'small', icon: 'export', btnKey: 'build', btnLabel: '导出' }, { type: 'info', - size: 'medium', + size: 'small', icon: 'cross', btnKey: 'doClose', btnLabel: '关闭' diff --git a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue index 7aa18a6bcb..925674dcc3 100644 --- a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue +++ b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiAdd.vue @@ -1,8 +1,7 @@ - 【新增】品牌 - 【修改】品牌 + {{ viewTitle }} 保存 返回 @@ -86,7 +85,6 @@ import { details, dictType, getListOrg, - getUseOrgByUserSid, namesDown, SaveList, selectListOrg, @@ -117,6 +115,7 @@ export default { upload: false, // 同步 release: false // 下发 }, + viewTitle: '', dataArr: [], FormLoading: false, listLoading: false, @@ -204,10 +203,8 @@ export default { }, created() { // 初始化变量 - this.geTName() - this.getZuZhi() - this.getListOrgAll() - this.init() + + // this.init() // 加载列表 // this.getList() }, @@ -229,11 +226,49 @@ export default { } this.selectDict() }, + showAdd() { + this.dialogStatus = 'add' + this.viewTitle = '【新增】品牌管理信息' + this.stateId = 0 + this.geTName() + this.getZuZhi() + this.getListOrgAll() + this.selectDict() + }, + showEdit(sid) { + console.log('edit',this.viewTitle) + this.dialogStatus = 'edit' + this.viewTitle = '【编辑】品牌管理信息' + this.stateId = 1 + details(sid).then((response) => { + if (response.code === '200') { + this.temp = response.data + this.temp.sid = sid + // this.useOrgArry = response.data.useOrg + if (this.temp.useOrg.search(',') == '-1') { + this.useOrgValue = this.temp.useOrg.split(" ") + } else { + this.useOrgValue = this.temp.useOrg.split(",") + } + } + }) + this.geTName() + this.getZuZhi() + this.getListOrgAll() + this.selectDict() + }, // ----------------------------------方法-------------------- // 返回 - handleReturn() { - this.$router.go(-1) + handleReturn(isreload) { + if (isreload === 'true') this.$emit('reloadlist') + this.temp = {} + this.useOrgArry = [] + // this.$router.go(-1) + this.$emit('doback') }, + // handleReturn() { + // this.$router.go(-1) + // }, // 查询所有分公司 getListOrgAll() { getListOrg().then((res) => { @@ -372,7 +407,7 @@ export default { if (valid) { this.FormLoading = true this.dialogStatus = 'create' - if (this.stateId === '0') { + if (this.stateId === 0) { // if (this.temp.useOrg instanceof Array) { // let useOrg2 = '' // if (this.temp.useOrg.length === 1) { @@ -408,15 +443,13 @@ export default { // this.temp.useOrg = abc.toString() // console.log('abcabc', this.temp.useOrg) // } - console.log(123456789) + console.log(123456789, this.temp) SaveList(this.temp).then((response) => { console.log(123) console.log('返回值:', response) this.FormLoading = false if (response.code === '200') { - this.$router.push({ - path: '/pinpai/pinpaiguanli' - }) + this.handleReturn('true') } else { this.$notify({ title: '提示', @@ -436,14 +469,11 @@ export default { // this.temp.useOrg = abc.toString() // console.log('abcabc', this.temp.useOrg) // } - this.temp.sid = this.stateId Update(this.temp).then((response) => { console.log('返回值:', response) this.FormLoading = false if (response.code === '200') { - this.$router.push({ - path: '/pinpai/pinpaiguanli' - }) + this.handleReturn('true') } else { this.$notify({ title: '提示', diff --git a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiInfo.vue b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiInfo.vue index 4dadcaa582..297a7ce846 100644 --- a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiInfo.vue +++ b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiInfo.vue @@ -85,12 +85,12 @@ export default { ]), }, created() { - this.tempDate.sid = this.$route.query.sid - console.log(33333333333, this.tempDate.sid) - // 初始化变量 - this.init() - // 加载列表 - this.handleCheck() + // this.tempDate.sid = this.$route.query.sid + // console.log(33333333333, this.tempDate.sid) + // // 初始化变量 + // this.init() + // // 加载列表 + // this.handleCheck() }, methods: { init() { @@ -115,7 +115,8 @@ export default { // ----------------------------------方法-------------------- // 返回 handleReturn() { - this.$router.go(-1) + this.temp = {} + this.$emit('doback') }, // 添加前数据初始化 @@ -130,9 +131,9 @@ export default { } }, // 打开查看 - handleCheck() { + showInfo(sid) { this.FormLoading = true - details(this.tempDate.sid).then((response) => { + details(sid).then((response) => { console.log('查询', response) this.FormLoading = false if (response.code === '200') { diff --git a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiguanli.vue b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiguanli.vue index e220f998f2..99be4d4561 100644 --- a/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiguanli.vue +++ b/anrui-base/anrui-base-ui/src/views/pinpai/pinpaiguanli/pinpaiguanli.vue @@ -1,103 +1,108 @@ - - - - {{ searchxianshitit }} - - - - - - - - - 厂商名称: - {{ item.manufacturerName }} - - - - - - - - - - - 品牌名称: - - {{ item.brandName }} - - - - + + + + + {{ searchxianshitit }} + + + + + + + + + 厂商名称: + {{ item.manufacturerName }} + + + + + + + + + + + 品牌名称: + + {{ item.brandName }} + + + + + + + + 查询 + 重置 - - - 查询 - 重置 - - - 品牌信息列表 - - - - - - - - - - {{ scope.row.brandName }} - - - - - {{ scope.row.brandCode }} - - - - - {{ scope.row.brandTypeValue }} - - - - - {{ scope.row.manufacturerName }} - - - - - {{ scope.row.isValidity }} - - - - - {{ scope.row.modifyTime }} + + 品牌信息列表 + + + + + + + + + + {{ scope.row.brandName }} + + + + + {{ scope.row.brandCode }} + + + + + {{ scope.row.brandTypeValue }} + + + + + {{ scope.row.manufacturerName }} + + + + + {{ scope.row.isValidity }} + + + + + {{ scope.row.modifyTime }} + + + - - - - - - - + --> + + + + + + + + + + @@ -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('确定要导出数据, 是否继续?', '提示', {