From e3ff9ee6ce41644c776d4aa3167258dcf821888b Mon Sep 17 00:00:00 2001
From: jia <1451658316@qq.com>
Date: Wed, 16 Aug 2023 17:51:13 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=94=AE=E7=AE=A1=E7=90=86=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/product/ProductResale/index.vue | 111 ++++++++++++++--------
1 file changed, 74 insertions(+), 37 deletions(-)
diff --git a/src/views/product/ProductResale/index.vue b/src/views/product/ProductResale/index.vue
index 117c497..8f3dee5 100644
--- a/src/views/product/ProductResale/index.vue
+++ b/src/views/product/ProductResale/index.vue
@@ -5,29 +5,29 @@
-
+
-
+
-
+
-
+
-
+
@@ -38,8 +38,13 @@
-
-
+
+
+ {{scope.row.title.length>10?scope.row.title.slice(0,9) :scope.row.title }}
+
+
+
+
@@ -51,7 +56,7 @@
- {{ scope.row.category && scope.row.category.cate_name || '暂无' }}
+ {{scope.row.resale_type==1?'调货':"打折" }}
@@ -70,8 +75,9 @@
+
详情
- 审核
+ 审核
@@ -84,7 +90,7 @@
-
- {{formData.topic.topic_name}}
+
+ {{formData.title}}
- {{formData.author && formData.author.nickname}}
+ {{formData.mer_name}}
-
+
{{formData.create_time}}
@@ -117,7 +123,8 @@
拒绝
-
+
+
@@ -145,18 +152,19 @@
import { resaleList, resaleShow, resaleStatus, resaleDetail } from '@/api/product'
import log from '@/libs/util.log';
-const scoreWeightValidate = (rule, value, callback) => {
- const testReg = /^(?:[1-9]?\d|100)$/;
- if (testReg.test(value)) {
- callback();
- } else {
- callback(new Error("0-100的数字"));
- }
-}
export default {
name: 'communityTopic',
data() {
+ const scoreWeightValidate = (rule, value, callback) => {
+ const testReg = /^(?:[1-9]?\d|100)$/;
+
+ if (testReg.test(value)) {
+ callback();
+ } else {
+ callback(new Error("0-100的数字"));
+ }
+ }
return {
moren: require("@/assets/images/f.png"),
colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
@@ -172,9 +180,9 @@ export default {
status: "",
keyword: "",
username: "",
- category_id: "",
+ resale_type: "",
is_show: '',
- float_rate: 0
+ float_rate: ''
},
statusList: [
@@ -221,13 +229,23 @@ export default {
},
methods: {
+ filter(value) {
+ if (!value) return ''
+ if (value.length > 10) {
+
+ return value.slice(0, 10) + '...'
+
+ }
+
+ return value
+
+ },
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
-
resaleList(this.tableFrom).then(res => {
this.tableData.data = res.data.list
this.tableData.total = res.data.count
@@ -249,15 +267,33 @@ export default {
onSubmit(item) {
if (this.ruleForm.status == 1) {
- resaleStatus(item.community_id, { "status": 1, float_rate: this.ruleForm.float_rate }).then((res) => {
- this.$message.success(res.message)
- this.dialogVisible = false
- this.ruleForm.float_rate = ''
- this.formData = res.data
- this.getList()
- }).catch(({ message }) => {
- this.$message.error(message)
- })
+ if (item.resale_type == 2) {
+ const testReg = /^(?:[1-9]?\d|100)$/;
+ if (testReg.test(this.ruleForm.float_rate)) {
+ resaleStatus(item.community_id, { "status": 1, float_rate: this.ruleForm.float_rate }).then((res) => {
+ this.$message.success(res.message)
+ this.dialogVisible = false
+ this.ruleForm.float_rate = ''
+ this.formData = res.data
+ this.getList()
+ }).catch(({ message }) => {
+ this.$message.error(message)
+ })
+ } else {
+ this.$message.error('请输入0-100的数字')
+ }
+ } else {
+ resaleStatus(item.community_id, { "status": 1, float_rate: this.ruleForm.float_rate }).then((res) => {
+ this.$message.success(res.message)
+ this.dialogVisible = false
+ this.ruleForm.float_rate = ''
+ this.formData = res.data
+ this.getList()
+ }).catch(({ message }) => {
+ this.$message.error(message)
+ })
+ }
+
} else {
resaleStatus(item.community_id, { "status": -1, "refusal": this.ruleForm.refusal }).then((res) => {
this.$message.success(res.message)
@@ -274,13 +310,14 @@ export default {
handleClose() {
this.dialogVisible = false
this.ruleForm.refusal = ''
- this.ruleForm.float_rate = 0
+ this.ruleForm.float_rate = ''
},
// 审核
onAudit(id) {
this.community_id = id;
this.dialogVisible = true;
this.isExamine = true;
+
resaleDetail(id).then((res) => {
this.formData = res.data