From b219ac36ed38ee79bcf104c7050575ef17e53335 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com> Date: Wed, 10 Apr 2024 17:08:41 +0800 Subject: [PATCH 1/2] 1 --- src/filters/commFilter.js | 201 +++++++++++---------- src/views/accounts/auditRecord/index.vue | 59 +++--- src/views/accounts/subsidy/index.vue | 99 ++++++---- src/views/order/list/index.vue | 7 +- src/views/product/productExamine/index.vue | 44 ++++- 5 files changed, 245 insertions(+), 165 deletions(-) diff --git a/src/filters/commFilter.js b/src/filters/commFilter.js index 55de0b8..3187051 100644 --- a/src/filters/commFilter.js +++ b/src/filters/commFilter.js @@ -173,27 +173,28 @@ export function cancelOrderStatusFilter(status) { */ export function orderPayType(type) { - const typeMap = { - '0': '余额支付', - '1': '微信支付', - '2': '小程序', - '3': '微信支付', - '4': '支付宝', - '5': '支付宝扫码', - '6': '微信扫码', - '7': '四川农信', - '8': '信用购', - '9': '商户余额支付', - '10': '对公转账', - '11': '微信收银', - '12': '现金收款', - } - return typeMap[type] + const typeMap = { + '0': '余额支付', + '1': '微信支付', + '2': '小程序', + '3': '微信支付', + '4': '支付宝', + '5': '支付宝扫码', + '6': '微信扫码', + '7': '四川农信', + '8': '信用购', + '9': '商户余额支付', + '10': '对公转账', + '11': '微信收银', + '12': '现金收款', + '13': '支付宝条码', } - /** - * - * 付费会员支付方式 - */ + return typeMap[type] +} +/** +* +* 付费会员支付方式 +*/ export function svipPayType(type) { const typeMap = { @@ -212,12 +213,12 @@ export function svipPayType(type) { * @description 订单活动状态 */ export function activityOrderStatus(status) { - const statusMap = { - '-1': '未完成', - '10': '已完成', - '0': '进行中' - } - return statusMap[status] + const statusMap = { + '-1': '未完成', + '10': '已完成', + '0': '进行中' + } + return statusMap[status] } /** * @description 自提订单状态 @@ -259,13 +260,13 @@ export function reconciliationStatusFilter(status) { * @description 商品状态 */ export function productStatusFilter(status) { - const statusMap = { - '0': '下架', - '1': '上架显示', - '-1': '平台关闭' - } - return statusMap[status] + const statusMap = { + '0': '下架', + '1': '上架显示', + '-1': '平台关闭' } + return statusMap[status] +} /** * @description 优惠券类型 */ @@ -380,93 +381,93 @@ export function seckillStatusFilter(status) { } return statusMap[status] } - /** - * @description 导出订单类型 - */ +/** +* @description 导出订单类型 +*/ export function exportOrderTypeFilter(type) { - const typeMap = { - 'order': '订单', - 'financial': '流水', - 'delivery': '发货单', - 'importDelivery': '导入记录', - 'exportFinancial': '账单信息', - 'searchLog': '用户搜索' - } - return typeMap[type] + const typeMap = { + 'order': '订单', + 'financial': '流水', + 'delivery': '发货单', + 'importDelivery': '导入记录', + 'exportFinancial': '账单信息', + 'searchLog': '用户搜索' } + return typeMap[type] +} /** * @description 主体类型 */ export function organizationType(type) { - const typeMap = { - 2401: '小微商户', - 2500: '个人卖家', - 4: '个体工商户', - 2: '企业', - 3: '党政、机关及事业单位', - 1708: '其他组织' - } - return typeMap[type] + const typeMap = { + 2401: '小微商户', + 2500: '个人卖家', + 4: '个体工商户', + 2: '企业', + 3: '党政、机关及事业单位', + 1708: '其他组织' } + return typeMap[type] +} /** * @description 证件类型 */ export function id_docType(type) { - const typeMap = { - 1: '中国大陆居民-身份证', - 2: '其他国家或地区居民-护照', - 3: '中国香港居民–来往内地通行证', - 4: '中国澳门居民–来往内地通行证', - 5: '中国台湾居民–来往大陆通行证' - } - return typeMap[type] + const typeMap = { + 1: '中国大陆居民-身份证', + 2: '其他国家或地区居民-护照', + 3: '中国香港居民–来往内地通行证', + 4: '中国澳门居民–来往内地通行证', + 5: '中国台湾居民–来往大陆通行证' } - /** - * @description 证件类型 - */ + return typeMap[type] +} +/** +* @description 证件类型 +*/ export function purchaseType(type) { - const typeMap = { - 'sms': '短信', - 'copy': '商品采集', - 'dump': '电子面单', - 'query': '物流查询' - } - return typeMap[type] + const typeMap = { + 'sms': '短信', + 'copy': '商品采集', + 'dump': '电子面单', + 'query': '物流查询' } + return typeMap[type] +} - /** - * @description 证件类型 - */ - export function communityStatus(status) { - const statusMap = { - '0': '待审核', - '1': '审核通过', - '-1': '审核失败', - '-2': '强制下架' - } - return statusMap[status] +/** +* @description 证件类型 +*/ +export function communityStatus(status) { + const statusMap = { + '0': '待审核', + '1': '审核通过', + '-1': '审核失败', + '-2': '强制下架' } + return statusMap[status] +} - /** - * @description 订单配送状态 - */ - export function runErrandStatus(status) { - const statusMap = { - '0': '待接单', - '-1': '已取消', - '2': '待取货', - '3': '配送中', - '4': '已完成', - '9': '物品返回中', - '10': '物品返回完成', - '100': '骑士到店' - } - return statusMap[status] +/** +* @description 订单配送状态 +*/ +export function runErrandStatus(status) { + const statusMap = { + '0': '待接单', + '-1': '已取消', + '2': '待取货', + '3': '配送中', + '4': '已完成', + '9': '物品返回中', + '10': '物品返回完成', + '100': '骑士到店' } - /** - * @description 发送方式 - */ + return statusMap[status] +} +/** +* @description 发送方式 +*/ export function sendWay(type) { const typesMap = { null: '-', diff --git a/src/views/accounts/auditRecord/index.vue b/src/views/accounts/auditRecord/index.vue index bf848ab..5287d19 100644 --- a/src/views/accounts/auditRecord/index.vue +++ b/src/views/accounts/auditRecord/index.vue @@ -98,8 +98,9 @@ - + :rules="{ required: (title == '审核'), message: '审核状态不能为空', trigger: 'change' }"> + 通过 拒绝 @@ -109,37 +110,43 @@ - + - + - + - + - + - + @@ -165,7 +172,7 @@ // | Author: CRMEB Team // +---------------------------------------------------------------------- import { merSelectApi } from '@/api/product' -import { bankListApi, bandAuditApi ,editApi} from "@/api/accounts"; +import { bankListApi, bandAuditApi, editApi } from "@/api/accounts"; import { transferRecordApi, transferDetailApi, transferReviewApi, transferEditApi, transferMarkApi, transferHeaderDataApi, transferRecordsExportApi } from '@/api/accounts' import createWorkBook from '@/utils/newToExcel.js'; import timeOptions from '@/utils/timeOptions'; @@ -245,28 +252,32 @@ export default { // 审核 transferReview(id) { + this.$refs.ruleForm.validate(valid => { if (valid) { this.auditForm.id = this.transferData.id; this.auditForm.financial_account = this.transferData.financial_account; - if(this.title == '修改') { - editApi(this.auditForm).then(res=>{ + this.auditForm.mer_id = this.transferData.mer_id; + + if (this.title == '修改') { + editApi(this.auditForm).then(res => { this.$message.success(res.message); - this.dialogVisible = false; - this.getList(1); + this.dialogVisible = false; + this.getList(1); }).catch(res => { - this.listLoading = false; - this.$message.error(res.message) - }) + this.listLoading = false; + this.$message.error(res.message) + }) } else { - bandAuditApi(this.auditForm).then(res => { - this.$message.success(res.message); - this.dialogVisible = false; - this.getList(1); - }).catch(res => { - this.listLoading = false; - this.$message.error(res.message) - }) + if (!this.auditForm.status) return this.$message.error("请选择审核状态!"); + bandAuditApi(this.auditForm).then(res => { + this.$message.success(res.message); + this.dialogVisible = false; + this.getList(1); + }).catch(res => { + this.listLoading = false; + this.$message.error(res.message) + }) } } }) diff --git a/src/views/accounts/subsidy/index.vue b/src/views/accounts/subsidy/index.vue index f6392ed..4f0dcd7 100644 --- a/src/views/accounts/subsidy/index.vue +++ b/src/views/accounts/subsidy/index.vue @@ -22,15 +22,9 @@ - + - + @@ -94,6 +100,7 @@ export default { data: [], total: 0 }, + dialogVisible: false, roterPre: roterPre, listLoading: true, tableFrom: { @@ -106,14 +113,41 @@ export default { fromList: fromList, options: [], cardLists: [], + formData: { + extra: {} + }, + rules: { + amount: [{ + required: true, + message: '请输入补贴金额', + tigger: 'blur' + }] + } } }, mounted() { this.getList() }, methods: { + showDialog(row) { + this.formData = { ...row }; + this.dialogVisible = true; + }, + updateInfo() { + this.$refs.editForm.validate((valid) => { + if (valid) { + subsidyUpdateApi(this.formData).then(res => { + this.$message.success(res.message); + this.dialogVisible = false; + this.getList() + }).catch(res => { + this.$message.error(res.message); + }) + } + }) + }, /**重置 */ - searchReset(){ + searchReset() { this.timeVal = [] this.tableFrom.type = "" this.tableFrom.status = "" @@ -134,13 +168,13 @@ export default { let lebData = {}; for (let i = 0; i < pageCount; i++) { lebData = await this.downData(excelData) - pageCount = Math.ceil(lebData.count/excelData.limit) + pageCount = Math.ceil(lebData.count / excelData.limit) if (lebData.export.length) { data = data.concat(lebData.export) excelData.page++ } } - createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); + createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename); return }, // 列表 @@ -165,7 +199,7 @@ export default { // 审核 handleStatus(id, idx) { this.$modalSure('确定审核通过当前数据?').then(() => { - subsidyStatusApi({id: id}) + subsidyStatusApi({ id: id }) .then(({ message }) => { this.$message.success(message); this.getList(1) @@ -183,5 +217,4 @@ export default { } - + diff --git a/src/views/order/list/index.vue b/src/views/order/list/index.vue index 3a6b2d3..dc0d80a 100644 --- a/src/views/order/list/index.vue +++ b/src/views/order/list/index.vue @@ -54,6 +54,7 @@ @change="getList(1), getCardList()"> + @@ -137,7 +138,7 @@ @@ -176,7 +177,9 @@ diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue index 13c661e..c4b423b 100644 --- a/src/views/product/productExamine/index.vue +++ b/src/views/product/productExamine/index.vue @@ -221,14 +221,22 @@ + - +
+
+ +
+
+ +
+
- - 提交 - + 提交 @@ -444,6 +452,17 @@ export default { this.getLabelLst() }, methods: { + // 点击商品图 + modalPicTap() { + let that = this; + this.$modalUpload(function (img) { + that.formValidate.content.image = that.formValidate.content.image.concat(img); + }, 10); + }, + // 删除详情图片 + deleteContentImg(index) { + this.formValidate.content.image.splice(index, 1) + }, tableRowClassName({ row, rowIndex }) { if (this.product_id == row.product_id) { @@ -562,7 +581,7 @@ export default { content: info.content, store_name: info.store_name, rank: info.rank, - star: info.star + star: info.star ? info.star : 0 } if (info.is_benefit === 1) this.checkboxGroup.push('is_benefit') if (info.is_hot === 1) this.checkboxGroup.push('is_hot') @@ -586,7 +605,6 @@ export default { }, // 提交 handleSubmit(name) { - console.log(this.formValidate) this.$refs[name].validate((valid) => { if (valid) { productUpdateApi(this.productId, this.formValidate).then(async res => { @@ -783,6 +801,20 @@ export default {