投诉举报开发
parent
5c0dcb5d91
commit
05dfb9d256
|
|
@ -4,13 +4,22 @@
|
|||
<view v-if="propIsTerse" class="terse-content margin-top cp">
|
||||
<block v-if="data != null && data_field.length > 0">
|
||||
<block v-for="(item, index) in data_field" :key="index">
|
||||
<view v-if="(item.is_hide || 0) == 0" class="single-text margin-top-xs">
|
||||
<view v-if="(item.is_hide || 0) == 0" class="item margin-top-xs" :class="propClass">
|
||||
<text class="cr-grey margin-right-xl">{{ item.name }}</text>
|
||||
<block v-if="item.type == 'images'">
|
||||
<image v-if="(data[item.field] || null) != null" :src="data[item.field]" :data-value="data[item.field]" @tap.stop="images_show_event" mode="aspectFit" class="radius panel-item-images"></image>
|
||||
<image v-if="(data[item.field] || null) != null" :src="data[item.field]" :data-value="data[item.field]" @tap.stop="images_show_event" mode="aspectFit" class="br-f5 radius panel-item-images"></image>
|
||||
</block>
|
||||
<block v-else-if="item.type == 'many_images'">
|
||||
<view v-if="(data[item.field] || null) != null && data[item.field].length > 0" class="dis-inline-block va-m">
|
||||
<view class="flex-row gap-5">
|
||||
<block v-for="(items, indexs) in data[item.field]" :key="indexs">
|
||||
<image :src="items" :data-value="items" @tap.stop="images_show_event" mode="aspectFit" class="br-f5 radius panel-item-images"></image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<text v-else class="cr-base">{{ data[item.field] }}</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<view v-if="(item.is_copy || 0) == 1 && data[item.field] !== ''" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<iconfont name="icon-copy" size="28rpx" class="cr-grey"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -35,8 +44,17 @@
|
|||
<block v-if="item.type == 'images'">
|
||||
<image v-if="(data[item.field] || null) != null" :src="data[item.field]" :data-value="data[item.field]" @tap.stop="images_show_event" mode="aspectFit" class="panel-item-images"></image>
|
||||
</block>
|
||||
<block v-else-if="item.type == 'many_images'">
|
||||
<view v-if="(data[item.field] || null) != null && data[item.field].length > 0" class="dis-inline-block va-m">
|
||||
<view class="flex-row gap-5">
|
||||
<block v-for="(items, indexs) in data[item.field]" :key="indexs">
|
||||
<image :src="items" :data-value="items" @tap.stop="images_show_event" mode="aspectFit" class="br-f5 radius panel-item-images"></image>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<text v-else>{{ data[item.field] }}</text>
|
||||
<view v-if="(item.is_copy || 0) == 1" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<view v-if="(item.is_copy || 0) == 1 && data[item.field] !== ''" class="dis-inline-block margin-left" data-event="copy" :data-value="data[item.field]" @tap.stop="text_event_handle">
|
||||
<iconfont name="icon-copy" size="28rpx" class="cr-grey lh-il"></iconfont>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -114,6 +132,11 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// class
|
||||
propClass: {
|
||||
type: String,
|
||||
default: 'single-text'
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
|
@ -171,8 +194,8 @@
|
|||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.terse-content .single-text {
|
||||
max-height: 40rpx;
|
||||
.terse-content .item {
|
||||
min-height: 40rpx;
|
||||
}
|
||||
.panel-item-images {
|
||||
width: 40rpx;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view class="flex-row flex-wrap">
|
||||
<block v-if="propData.length > 0">
|
||||
<view v-for="(item, index) in propData" :key="index" class="item margin-right-lg pr">
|
||||
<block v-if="form_images_list.length > 0">
|
||||
<view v-for="(item, index) in form_images_list" :key="index" class="item margin-right-lg pr">
|
||||
<view v-if="propDelete" class="delete-icon pa z-i" @tap="upload_delete_event" :data-index="index">
|
||||
<iconfont name="icon-close-fillup" size="36rpx" color="rgba(87,91,102,0.65)"></iconfont>
|
||||
</view>
|
||||
<image :src="item" @tap="upload_show_event" :data-index="index" mode="aspectFill" class="img border-radius-main oh"></image>
|
||||
</view>
|
||||
</block>
|
||||
<view v-if="(propData || null) == null || propData.length < propMaxNum" class="img bg-grey-f5 border-radius-main flex-col align-c jc-c" @tap="file_upload_event">
|
||||
<view v-if="(form_images_list || null) == null || form_images_list.length < propMaxNum" class="img bg-grey-f5 border-radius-main flex-col align-c jc-c" @tap="file_upload_event">
|
||||
<iconfont name="icon-camera-solid" size="52rpx" color="#999"></iconfont>
|
||||
<text class="text-size-xs cr-grey-9">{{$t('upload.upload.b33f08')}}</text>
|
||||
</view>
|
||||
|
|
@ -23,10 +23,8 @@
|
|||
props: {
|
||||
// 初始图片数据
|
||||
propData: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
type: [Array,String],
|
||||
default: '',
|
||||
},
|
||||
// 最大上传数量
|
||||
propMaxNum: {
|
||||
|
|
@ -63,7 +61,7 @@
|
|||
},
|
||||
mounted() {
|
||||
this.setData({
|
||||
form_images_list: this.propData,
|
||||
form_images_list: (this.propData || null) == null ? [] : (typeof this.propData == 'string' ? this.propData.split(',') : this.propData),
|
||||
});
|
||||
},
|
||||
created: function () {},
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@
|
|||
"close_reason": "Close Reason",
|
||||
"refuse": "Refuse",
|
||||
"buy": "Buy",
|
||||
"complaint": "Complaint",
|
||||
"info": "Info",
|
||||
"web_client": "WebClient",
|
||||
"app_client": "AppClient",
|
||||
"please_input": "Please enter",
|
||||
|
|
@ -63,21 +65,23 @@
|
|||
"refresh_text": "Refresh",
|
||||
"yes_text": "Yes",
|
||||
"no_text": "NO",
|
||||
"wait": "Wait",
|
||||
"place_order_text": "Place Order",
|
||||
"processing_in_text": "Processing",
|
||||
"loading_in_text": "Loading",
|
||||
"upload_in_text": "Uploading",
|
||||
"auth_in_text": "Authorizing",
|
||||
"view_examples": "View examples",
|
||||
"warm_tips": "Kind reminder",
|
||||
"no_relevant_data_tips": "No relevant data available",
|
||||
"internet_error_tips": "The internet has wandered off~",
|
||||
"sub_error_retry_tips": "Submission failed, please try again!",
|
||||
"not_more_list_data_tips": "No more list data available",
|
||||
"processing_in_text": "Processing",
|
||||
"loading_in_text": "Loading",
|
||||
"upload_in_text": "Uploading",
|
||||
"auth_in_text": "Authorizing",
|
||||
"login_in_text": "Logging in",
|
||||
"sending_in_text": "Sending",
|
||||
"payment_in_text": "Payment in progress",
|
||||
"submit_in_text": "Submitting",
|
||||
"sending": "Sending",
|
||||
"view_examples": "View examples",
|
||||
"warm_tips": "Kind reminder",
|
||||
"no_relevant_data_tips": "No relevant data available",
|
||||
"internet_error_tips": "The internet has wandered off~",
|
||||
"sub_error_retry_tips": "Submission failed, please try again!",
|
||||
"not_more_list_data_tips": "No more list data available",
|
||||
"scan_name": "Scan it",
|
||||
"not_have_name": "not have",
|
||||
"note": "Remarks",
|
||||
|
|
@ -312,7 +316,13 @@
|
|||
"plugins-certificate-userauth": "Certificate",
|
||||
"plugins-certificate-userauth-saveinfo": "Certificate editor",
|
||||
"plugins-certificate-userauth-detail": "Certificate detail",
|
||||
"plugins-goodscompare-index": "Goods Compare"
|
||||
"plugins-goodscompare-index": "Goods Compare",
|
||||
"plugins-complaint-user": "Complaint/Report List",
|
||||
"plugins-complaint-form": "Complaint/Report",
|
||||
"plugins-video-index": "Short Video List",
|
||||
"plugins-video-search": "Short video search",
|
||||
"plugins-video-detail": "Short video details",
|
||||
"plugins-live-pull": "Live Details"
|
||||
},
|
||||
"login": {
|
||||
"login": {
|
||||
|
|
@ -526,7 +536,6 @@
|
|||
"4rb08b": "There are currently no available coupons available",
|
||||
"3740ur": "Please select an address",
|
||||
"71kidy": "Please select payment method",
|
||||
"r79t77": "Submitting",
|
||||
"31616e": "The current mode does not allow the use of addresses",
|
||||
"g7dk3f": "Card type selection",
|
||||
"0s1k23": "Active",
|
||||
|
|
@ -1978,5 +1987,12 @@
|
|||
"tufg33": "ID NO",
|
||||
"ftyui3": "Expiration date"
|
||||
}
|
||||
},
|
||||
"complaint-form": {
|
||||
"complaint-form": {
|
||||
"78iudg": "proof image",
|
||||
"56ys33": "Please upload complete and clear images, up to a maximum of 10",
|
||||
"ssdff4": "My submission record"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -47,6 +47,8 @@
|
|||
"close_reason": "关闭原因",
|
||||
"refuse": "拒绝",
|
||||
"buy": "购买",
|
||||
"complaint": "举报",
|
||||
"info": "信息",
|
||||
"web_client": "web端",
|
||||
"app_client": "手机端",
|
||||
"please_input": "请输入",
|
||||
|
|
@ -63,6 +65,7 @@
|
|||
"refresh_text": "刷新",
|
||||
"yes_text": "是",
|
||||
"no_text": "否",
|
||||
"wait": "待",
|
||||
"place_order_text": "下单",
|
||||
"processing_in_text": "处理中...",
|
||||
"loading_in_text": "加载中...",
|
||||
|
|
@ -71,6 +74,7 @@
|
|||
"login_in_text": "登录中...",
|
||||
"sending_in_text": "发送中...",
|
||||
"payment_in_text": "支付中...",
|
||||
"submit_in_text": "提交中...",
|
||||
"sending": "发送中",
|
||||
"view_examples": "查看范例",
|
||||
"warm_tips": "温馨提示",
|
||||
|
|
@ -310,7 +314,14 @@
|
|||
"plugins-certificate-userauth": "资质认证",
|
||||
"plugins-certificate-userauth-saveinfo": "资质认证编辑",
|
||||
"plugins-certificate-userauth-detail": "资质认证详情",
|
||||
"plugins-goodscompare-index": "商品对比"
|
||||
"plugins-goodscompare-index": "商品对比",
|
||||
"plugins-complaint-user": "投诉/举报列表",
|
||||
"plugins-complaint-form": "投诉/举报",
|
||||
"plugins-video-index": "短视频列表",
|
||||
"plugins-video-search": "短视频搜索",
|
||||
"plugins-video-detail": "短视频详情",
|
||||
"plugins-live-pull": "直播详情"
|
||||
|
||||
},
|
||||
"login": {
|
||||
"login": {
|
||||
|
|
@ -516,7 +527,6 @@
|
|||
"4rb08b": "暂无可用优惠劵",
|
||||
"3740ur": "请选择地址",
|
||||
"71kidy": "请选择支付方式",
|
||||
"r79t77": "提交中...",
|
||||
"31616e": "当前模式不允许使用地址",
|
||||
"g7dk3f": "卡种选择",
|
||||
"0s1k23": "立即开通",
|
||||
|
|
@ -1961,5 +1971,12 @@
|
|||
"tufg33": "证件号码",
|
||||
"ftyui3": "过期时间"
|
||||
}
|
||||
},
|
||||
"complaint-form": {
|
||||
"complaint-form": {
|
||||
"78iudg": "证明图片",
|
||||
"56ys33": "请上传完整清晰的图片,最多10张",
|
||||
"ssdff4": "我的提交记录"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2164,6 +2164,13 @@
|
|||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/user",
|
||||
"style": {
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -958,7 +958,7 @@
|
|||
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
buy_submit_disabled_status: true,
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@
|
|||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('comments', 'index', 'ask'),
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@
|
|||
};
|
||||
if (app.globalData.fields_check(new_data, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@
|
|||
return false;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('comments', 'index', 'blog'),
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@
|
|||
// 封面图片
|
||||
image_list: [],
|
||||
// 路径类型
|
||||
editor_path_type: 'common',
|
||||
editor_path_type: '',
|
||||
|
||||
// 内容
|
||||
input_length_max: 500,
|
||||
|
|
@ -246,6 +246,7 @@
|
|||
data: data,
|
||||
blog_category_list: blog_category_list,
|
||||
image_list: img_list,
|
||||
editor_path_type: res.data.data.editor_path_type,
|
||||
more_height: data.describe || data.seo_title || data.seo_keywords || data.seo_desc ? '708rpx' : '0',
|
||||
is_more: data.describe || data.seo_title || data.seo_keywords || data.seo_desc ? 'true' : 'false',
|
||||
data_list_loding_status: 3,
|
||||
|
|
@ -253,6 +254,7 @@
|
|||
} else {
|
||||
this.setData({
|
||||
blog_category_list: blog_category_list,
|
||||
editor_path_type: res.data.data.editor_path_type,
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
}
|
||||
|
|
@ -352,7 +354,7 @@
|
|||
name: 'upfile',
|
||||
formData: {
|
||||
action: 'uploadimage',
|
||||
path_type: 'common', // 路径类型,默认common
|
||||
path_type: this.editor_path_type,
|
||||
},
|
||||
success: function (res) {
|
||||
let data = JSON.parse(res.data);
|
||||
|
|
@ -398,7 +400,7 @@
|
|||
};
|
||||
if (app.globalData.fields_check(validate, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@
|
|||
}
|
||||
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
.business .cover {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.business .title {
|
||||
width: calc(100% - 180rpx);
|
||||
}
|
||||
|
|
@ -1,8 +1,237 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="data_list_loding_status !== 1">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="page-bottom-fixed padding-main">
|
||||
<view v-if="(business || null) != null" class="business bg-white oh padding-main border-radius-main spacing-mb">
|
||||
<view class="fw-b padding-bottom-sm">{{$t('common.wait')}}{{$t('common.complaint')}}{{business.type_name}}{{$t('common.info')}}</view>
|
||||
<view class="flex-row gap-10">
|
||||
<image v-if="(business.cover || null) != null" :src="business.cover" mode="aspectFit" class="cover br-f5 radius"></image>
|
||||
<view class="title">{{business.title}}</view>
|
||||
</view>
|
||||
<view class="margin-top-sm">
|
||||
<text v-if="(business.tips || null) != null" class="cr-yellow">{{business.tips}}</text>
|
||||
<text class="cr-blue margin-left-lg cp" @tap="business_cancel_event">{{$t('common.cancel')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="(data || null) != null && (data.data_title || null) != null" class="business bg-white oh padding-main border-radius-main spacing-mb">
|
||||
<view class="fw-b padding-bottom-sm">{{$t('common.complaint')}}{{data.data_type_name}}{{$t('common.info')}}</view>
|
||||
<view class="flex-row gap-10">
|
||||
<image v-if="(data.data_cover || null) != null" :src="data.data_cover" mode="aspectFit" class="cover br-f5 radius"></image>
|
||||
<view class="title">{{data.data_title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-gorup border-radius-main spacing-mb">
|
||||
<view class="form-gorup-title padding-right-main">{{$t('user-orderaftersale-detail.user-orderaftersale-detail.87tuff')}}<text class="form-group-tips-must">*</text></view>
|
||||
<textarea name="describe" placeholder-class="cr-grey-9" class="cr-base" :placeholder="$t('user-orderaftersale-detail.user-orderaftersale-detail.6uygft')" maxlength="230" :value="data.describe || ''"></textarea>
|
||||
</view>
|
||||
<view class="form-gorup border-radius-main">
|
||||
<view class="form-gorup-title padding-right-main">{{$t('complaint-form.complaint-form.78iudg')}}<text class="form-group-tips">{{$t('complaint-form.complaint-form.56ys33')}}</text></view>
|
||||
<view class="margin-top-main">
|
||||
<component-upload :propData="data.images" :propMaxNum="10" :propPathType="editor_path_type" @call-back="retrun_image_event"></component-upload>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部操作 -->
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<view v-if="(user || null) != null && params.is_list != 0" class="tr padding-bottom-lg padding-right-sm">
|
||||
<text class="cr-blue cp" @tap="url_event" data-value="/pages/plugins/complaint/user/user">{{$t('complaint-form.complaint-form.ssdff4')}} >></text>
|
||||
</view>
|
||||
<button class="item cr-white bg-main round text-size wh-auto" type="default" form-type="submit" hover-class="none" :loading="form_submit_loading" :disabled="form_submit_loading">{{$t('common.submit')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
const app = getApp();
|
||||
import base64 from '@/common/js/lib/base64.js';
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentUpload from '@/components/upload/upload';
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
theme_color: app.globalData.get_theme_color(),
|
||||
data_list_loding_status: 1,
|
||||
bottom_fixed_style: '',
|
||||
params: {},
|
||||
user: null,
|
||||
data: {},
|
||||
business: null,
|
||||
editor_path_type: '',
|
||||
form_submit_loading: false,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
componentCommon,
|
||||
componentUpload,
|
||||
componentNoData,
|
||||
},
|
||||
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: app.globalData.launch_params_handle(params),
|
||||
user: app.globalData.get_user_cache_info() || null,
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
// 数据加载
|
||||
this.get_data();
|
||||
},
|
||||
|
||||
// 页面销毁时执行
|
||||
onUnload: function () {},
|
||||
|
||||
methods: {
|
||||
get_data() {
|
||||
this.setData({
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('saveinfo', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
this.setData({
|
||||
data: res.data.data.data || {},
|
||||
business: res.data.data.business || null,
|
||||
editor_path_type: res.data.data.editor_path_type,
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 上传回调
|
||||
retrun_image_event(res) {
|
||||
var temp_data = this.data;
|
||||
temp_data['images'] = res;
|
||||
this.setData({
|
||||
data: temp_data,
|
||||
});
|
||||
},
|
||||
|
||||
// 表单提交
|
||||
form_submit(e) {
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'describe', msg: this.$t('user-orderaftersale-detail.user-orderaftersale-detail.6uygft') },
|
||||
];
|
||||
var form_data = this.data;
|
||||
form_data['describe'] = e.detail.value.describe;
|
||||
if (app.globalData.fields_check(form_data, validation)) {
|
||||
if((this.business || null) != null) {
|
||||
form_data['dataid'] = this.business.id || 0;
|
||||
form_data['datatype'] = this.business.type || 0;
|
||||
}
|
||||
var page_url = app.globalData.prev_page() || null;
|
||||
form_data['page_url'] = (page_url == null) ? '' : encodeURIComponent(base64.encode(page_url));
|
||||
uni.showLoading({
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
});
|
||||
// 网络请求
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('save', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: form_data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
setTimeout(function () {
|
||||
app.globalData.page_back_prev_event();
|
||||
}, 2000);
|
||||
} else {
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data)) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
} else {
|
||||
app.globalData.showToast(this.$t('common.sub_error_retry_tips'));
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.setData({
|
||||
form_submit_loading: false,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 业务数据取消
|
||||
business_cancel_event(e) {
|
||||
var temp_params = this.params || {};
|
||||
delete temp_params['dataid'];
|
||||
delete temp_params['datatype'];
|
||||
this.setData({
|
||||
params: temp_params,
|
||||
business: null,
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
@import './form.css';
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
.data-cover {
|
||||
width: 86rpx;
|
||||
height: 86rpx;
|
||||
}
|
||||
.data-title {
|
||||
width: calc(100% - 90rpx);
|
||||
}
|
||||
|
|
@ -0,0 +1,414 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<!-- 导航 -->
|
||||
<view class="nav-base bg-white flex-row jc-sa align-c">
|
||||
<block v-for="(item, index) in nav_status_list" :key="index">
|
||||
<view :class="'item fl tc ' + (nav_status_index == index ? 'cr-main nav-active-line' : '')" :data-index="index" @tap="nav_event">{{ item.name }}</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="data_list.length > 0" class="page-bottom-fixed padding-horizontal-main padding-top-main">
|
||||
<view v-for="(item, index) in data_list" :key="index" class="item padding-main border-radius-main oh bg-white spacing-mb">
|
||||
<view class="base oh br-b padding-bottom-main">
|
||||
<text>{{item.add_time}}</text>
|
||||
<text class="fr cr-main">{{ item.status_name }}</text>
|
||||
</view>
|
||||
<view v-if="(item.data_title || null) != null" class="oh margin-top flex-row gap-5" :data-value="item.data_url" @tap="url_event">
|
||||
<image v-if="(item.data_cover || null) != null" :src="item.data_cover" mode="aspectFill" class="br-f5 radius data-cover"></image>
|
||||
<view :class="(item.data_cover || null) != null ? 'data-title' : ''">{{item.data_title}}</view>
|
||||
</view>
|
||||
<view class="content margin-top-main">
|
||||
<component-panel-content :propData="item" :propDataField="field_list" propExcludeField="add_time,status_name" propClass="" :propIsTerse="true"></component-panel-content>
|
||||
</view>
|
||||
<view v-if="item.status == 0 || item.status != 1" class="item-operation tr br-t padding-top-main margin-top-main">
|
||||
<block v-if="item.status == 0">
|
||||
<button class="round bg-white cr-green br-green" type="default" size="mini" @tap="url_event" :data-value="'/pages/plugins/complaint/form/form?id='+item.id+'&is_list=0'" hover-class="none">{{$t('common.edit')}}</button>
|
||||
<button class="round bg-white cr-yellow br-yellow" type="default" size="mini" @tap="cancel_event" :data-value="item.id" :data-index="index" hover-class="none">{{$t('common.cancel')}}</button>
|
||||
</block>
|
||||
<button v-if="item.status != 1" class="round bg-white cr-red br-red" type="default" size="mini" @tap="delete_event" :data-value="item.id" :data-index="index" hover-class="none">{{$t('common.del')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
</view>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
|
||||
</block>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部操作 -->
|
||||
<view class="bottom-fixed" :style="bottom_fixed_style">
|
||||
<view class="bottom-line-exclude">
|
||||
<button class="item cr-main bg-white br-main round text-size wh-auto flex-row align-c jc-c" type="default" hover-class="none" data-value="/pages/plugins/complaint/form/form?is_list=0" @tap="url_event">
|
||||
<view class="add-icon">
|
||||
<iconfont name="icon-add-wide" size="32rpx"></iconfont>
|
||||
</view>
|
||||
<text>{{$t('common.add')}}</text>
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公共 -->
|
||||
<component-common ref="common"></component-common>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
const app = getApp();
|
||||
import componentCommon from '@/components/common/common';
|
||||
import componentPanelContent from "@/components/panel-content/panel-content";
|
||||
import componentNoData from '@/components/no-data/no-data';
|
||||
import componentBottomLine from '@/components/bottom-line/bottom-line';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
data_list: [],
|
||||
data_total: 0,
|
||||
data_page_total: 0,
|
||||
data_page: 1,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
data_bottom_line_status: false,
|
||||
data_is_loading: 0,
|
||||
params: {},
|
||||
field_list: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
componentCommon,
|
||||
componentPanelContent,
|
||||
componentNoData,
|
||||
componentBottomLine
|
||||
},
|
||||
onLoad(params) {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 参数处理
|
||||
params = app.globalData.launch_params_handle(params);
|
||||
|
||||
// 是否指定状态
|
||||
var nav_status_index = 0;
|
||||
if ((params.status || null) != null) {
|
||||
for (var i in this.nav_status_list) {
|
||||
if (this.nav_status_list[i]['value'] == params.status) {
|
||||
nav_status_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
params: params,
|
||||
nav_status_index: nav_status_index,
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
onShow() {
|
||||
// 调用公共事件方法
|
||||
app.globalData.page_event_onshow_handle();
|
||||
|
||||
// 公共onshow事件
|
||||
if ((this.$refs.common || null) != null) {
|
||||
this.$refs.common.on_show();
|
||||
}
|
||||
|
||||
// 分享菜单处理
|
||||
app.globalData.page_share_handle();
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.setData({
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
var user = app.globalData.get_user_info(this, 'init');
|
||||
if (user != false) {
|
||||
this.get_data();
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取公共数据
|
||||
get_data() {
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('init', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
this.setData({
|
||||
nav_status_list: data.nav_status_list || [],
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
data_page: 1,
|
||||
});
|
||||
this.get_data_list();
|
||||
} else {
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
data_list_loding_msg: res.data.msg,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_bottom_line_status: false,
|
||||
data_list_loding_status: 2,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 列表数据
|
||||
get_data_list(is_mandatory) {
|
||||
// 分页是否还有数据
|
||||
if ((is_mandatory || 0) == 0) {
|
||||
if (this.data_bottom_line_status == true) {
|
||||
uni.stopPullDownRefresh();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 是否加载中
|
||||
if (this.data_is_loading == 1) {
|
||||
return false;
|
||||
}
|
||||
this.setData({
|
||||
data_is_loading: 1,
|
||||
data_list_loding_status: 1,
|
||||
});
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 请求数据
|
||||
var data = {...this.params, ...{
|
||||
page: this.data_page,
|
||||
}};
|
||||
|
||||
// 状态
|
||||
var status = (this.nav_status_list[this.nav_status_index] || null) == null ? -1 : this.nav_status_list[this.nav_status_index]['value'];
|
||||
if (status != -1) {
|
||||
data['status'] = status;
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: data,
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var data = res.data.data;
|
||||
if (data.data_list.length > 0) {
|
||||
if (this.data_page <= 1) {
|
||||
var temp_data_list = data.data_list;
|
||||
} else {
|
||||
var temp_data_list = this.data_list || [];
|
||||
var temp_data = data.data_list;
|
||||
for (var i in temp_data) {
|
||||
temp_data_list.push(temp_data[i]);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
data_total: data.data_total,
|
||||
data_page_total: data.page_total,
|
||||
field_list: data.field_list || [],
|
||||
data_list_loding_status: 3,
|
||||
data_page: this.data_page + 1,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
// 是否还有数据
|
||||
this.setData({
|
||||
data_bottom_line_status: this.data_list.length > 0 && this.data_page > 1 && this.data_page > this.data_page_total,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
if (this.data_page <= 1) {
|
||||
this.setData({
|
||||
data_list: [],
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
if (app.globalData.is_login_check(res.data, this, 'get_data_list')) {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
data_list_loding_status: 2,
|
||||
data_is_loading: 0,
|
||||
});
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 滚动加载
|
||||
scroll_lower(e) {
|
||||
this.get_data_list();
|
||||
},
|
||||
|
||||
// 取消
|
||||
cancel_event(e) {
|
||||
uni.showModal({
|
||||
title: this.$t('common.warm_tips'),
|
||||
content: this.$t('common.cancel_confirm_tips'),
|
||||
confirmText: this.$t('common.confirm'),
|
||||
cancelText: this.$t('common.no'),
|
||||
success: (result) => {
|
||||
if (result.confirm) {
|
||||
// 参数
|
||||
var id = e.currentTarget.dataset.value;
|
||||
var index = e.currentTarget.dataset.index;
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('cancel', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
ids: id,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var temp_data_list = this.data_list;
|
||||
temp_data_list[index]['status'] = 2;
|
||||
temp_data_list[index]['status_name'] = this.$t('order.order.1k98tk');
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
});
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
} else {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 删除
|
||||
delete_event(e) {
|
||||
uni.showModal({
|
||||
title: this.$t('common.warm_tips'),
|
||||
content: this.$t('common.delete_confirm_tips'),
|
||||
confirmText: this.$t('common.confirm'),
|
||||
cancelText: this.$t('common.no'),
|
||||
success: (result) => {
|
||||
if (result.confirm) {
|
||||
// 参数
|
||||
var id = e.currentTarget.dataset.value;
|
||||
var index = e.currentTarget.dataset.index;
|
||||
// 加载loding
|
||||
uni.showLoading({
|
||||
title: this.$t('common.processing_in_text'),
|
||||
});
|
||||
uni.request({
|
||||
url: app.globalData.get_request_url('delete', 'index', 'complaint'),
|
||||
method: 'POST',
|
||||
data: {
|
||||
ids: id,
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
if (res.data.code == 0) {
|
||||
var temp_data_list = this.data_list;
|
||||
temp_data_list.splice(index, 1);
|
||||
this.setData({
|
||||
data_list: temp_data_list,
|
||||
});
|
||||
if (temp_data_list.length == 0) {
|
||||
this.setData({
|
||||
data_list_loding_status: 0,
|
||||
data_bottom_line_status: false,
|
||||
});
|
||||
}
|
||||
app.globalData.showToast(res.data.msg, 'success');
|
||||
} else {
|
||||
app.globalData.showToast(res.data.msg);
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
app.globalData.showToast(this.$t('common.internet_error_tips'));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 导航事件
|
||||
nav_event(e) {
|
||||
this.setData({
|
||||
nav_status_index: e.currentTarget.dataset.index || 0,
|
||||
data_page: 1,
|
||||
data_list: [],
|
||||
data_list_loding_status: 1,
|
||||
data_bottom_line_status: false
|
||||
});
|
||||
this.get_data_list(1);
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
@import './user.css';
|
||||
</style>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
};
|
||||
if (app.globalData.fields_check(validate, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@
|
|||
data['invoice_content'] = this.invoice_content_list[this.form_invoice_content_index];
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@
|
|||
}
|
||||
if (app.globalData.fields_check(data, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
};
|
||||
if (app.globalData.fields_check(validate, validation)) {
|
||||
uni.showLoading({
|
||||
title: this.$t('buy.buy.r79t77'),
|
||||
title: this.$t('common.submit_in_text'),
|
||||
});
|
||||
this.setData({
|
||||
form_submit_loading: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue