diff --git a/src/views/douyin/after_sale/index.vue b/src/views/douyin/after_sale/index.vue index af98749..542127a 100644 --- a/src/views/douyin/after_sale/index.vue +++ b/src/views/douyin/after_sale/index.vue @@ -4,17 +4,17 @@ - +
将文件拖到此处,或点击上传
@@ -136,10 +136,16 @@ :data="data" size="small" style="width: 100%;" + @row-click="singleElection" + highlight-current-row > - + + @@ -158,7 +164,7 @@ - { - this.afterSalesTypeArr = res["after_sale_type"]; - this.shopNameArr = res["shop_name"]; + this.afterSalesTypeArr = res['after_sale_type'] + this.shopNameArr = res['shop_name'] }) - .catch(err => {}); + .catch(err => {}) this.getJobList() .then(res => { - this.xxPositionOptions = res; + this.xxPositionOptions = res }) - .catch(err => {}); + .catch(err => {}) this.$nextTick(() => { - this.init(); - }); + this.init() + }) }, methods: { checkPermission, - godetail() { - this.$router.push({ path: "/douyin/detail" }); + + singleElection(row) { + this.templateSelection = row.id + this.checkList = this.data.filter((item) => item.id === row.id) + console.log(`该行的编号为${row.id}`) }, - + selectSingleRow(row, index, rows) { + // 限制只能选中一行 + debugger + return true + }, + godetail() { + this.$router.push({ path: '/douyin/detail' }) + }, + /** 导入按钮操作 */ handleImport() { - this.upload.title = "售后订单导入"; - this.upload.open = true; + this.upload.title = '售后订单导入' + this.upload.open = true }, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { - this.upload.isUploading = true; + this.upload.isUploading = true }, // 文件上传成功处理 handleFileSuccess(response, file, fileList) { - this.upload.open = false; - this.upload.isUploading = false; - this.$refs.upload.clearFiles(); - this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true }); - this.init(); + this.upload.open = false + this.upload.isUploading = false + this.$refs.upload.clearFiles() + this.$alert(response.msg, '导入结果', { dangerouslyUseHTMLString: true }) + this.init() }, // 提交上传文件 submitFileForm() { - this.$refs.upload.submit(); + this.$refs.upload.submit() }, beforeInit() { - this.url = "api/douyinAfterSales"; - const sort = "id,desc"; + this.url = 'api/douyinAfterSales' + const sort = 'id,desc' this.params = { page: this.page, size: this.size, sort: sort } Object.assign(this.params, this.query) - return true; + return true }, subDelete(id) { - this.delLoading = true; + this.delLoading = true del(id) .then(res => { - this.delLoading = false; - this.$refs[id].doClose(); - this.dleChangePage(); - this.init(); + this.delLoading = false + this.$refs[id].doClose() + this.dleChangePage() + this.init() this.$notify({ - title: "删除成功", - type: "success", + title: '删除成功', + type: 'success', duration: 2500 - }); + }) }) .catch(err => { - this.delLoading = false; - this.$refs[id].doClose(); - console.log(err.response.data.message); - }); + this.delLoading = false + this.$refs[id].doClose() + console.log(err.response.data.message) + }) }, add() { - this.$router.push({ path: "/douyin/after_sale_add" }); + this.$router.push({ path: '/douyin/after_sale_add' }) }, edit(data) { - this.isAdd = false; - const _this = this.$refs.form; + this.isAdd = false + const _this = this.$refs.form _this.form = { id: data.id, afterSalesNumber: data.afterSalesNumber, @@ -394,24 +415,24 @@ export default { negotiationRecords: data.negotiationRecords, resolution: data.resolution, resolutionTime: data.resolutionTime - }; - _this.dialog = true; + } + _this.dialog = true }, // 导出 download() { - this.beforeInit(); - this.downloadLoading = true; + this.beforeInit() + this.downloadLoading = true downloadDouyinAfterSales(this.params) .then(result => { - downloadFile(result, "DouyinAfterSales列表", "xlsx"); - this.downloadLoading = false; + downloadFile(result, 'DouyinAfterSales列表', 'xlsx') + this.downloadLoading = false }) .catch(() => { - this.downloadLoading = false; - }); + this.downloadLoading = false + }) } } -}; +}