Compare commits

...

3 Commits

  1. 7
      api/help.js
  2. 27
      api/invoice.js
  3. 187
      pages/invoice/editset.vue
  4. 64
      pages/invoice/indexset.vue
  5. 128
      pages/news1/feedback.vue
  6. 62
      pages/news1/text.vue

@ -8,9 +8,12 @@ const api = {
joinStore: 'store/joinStore',
getStoreType: 'store/getStoreType',
storeSet:'store/editStore',
storeInfo:'store/getStoreInfo'
storeInfo:'store/getStoreInfo',
getAgreement: 'user/getAgreement',
}
export const getAgreement = (data) => {
return request.get(api.getAgreement,data)
}
// 帮助中心列表
export const list = (param) => {
return request.get(api.list, param)

@ -9,7 +9,7 @@ const api = {
invoicingDel: 'user/invoicingDel',
invoicingDetail: 'user/invoicingDetail',
invoicingAdd: 'user/invoicingAdd',
invoicingEdit: 'user/invoicingEdit',
invoicingEdit: 'user/invoicingEdit'
}
export const invoicingEdit = (orderGoodsId, data) => {
@ -24,28 +24,17 @@ export const invoicingAdd = (orderGoodsId, data) => {
form: data
})
}
export const addInvoicing = (orderGoodsId, data) => {
return request.post(api.addInvoicing, {
orderGoodsId,
form: data
})
export const addInvoicing = (data) => {
return request.post(api.addInvoicing,data)
}
export const myInvoicing = (orderGoodsId, data) => {
return request.get(api.myInvoicing, {
orderGoodsId,
form: data
})
return request.get(api.myInvoicing,data)
}
export const editInvoicing = (orderGoodsId, data) => {
return request.post(api.editInvoicing, {
form: data
})
export const editInvoicing = (data) => {
return request.post(api.editInvoicing,data)
}
export const invoicingLog = (orderGoodsId, data) => {
return request.get(api.invoicingLog, {
orderGoodsId,
form: data
})
export const invoicingLog = (data) => {
return request.get(api.invoicingLog,data)
}
export function invoicingDel(param, option) {
return request.get(api.invoicingDel, param, option)

@ -13,7 +13,8 @@
<view class="l">发票类型</view>
<view class="r">
<picker :value="index" :range="array" @change="bindPickerChange">
<view class="lx">{{ index == -1 ? '请选择' : array[index] }}</view>
<view class="lx" style="color: #888;" v-if="index == null">请选择发票类型</view>
<view class="lx" v-else>{{ array[index] }}</view>
</picker>
</view>
</view>
@ -24,17 +25,10 @@
<view class="li" :class="tabIndex == 2 ? 'li-on' : ''" @click="tabItem(2)">单位</view>
</view>
</view>
<view class="item" v-if="tabIndex != 2">
<view class="l">发票抬头</view>
<view class="r">
<input type="text" v-model="obj.header" placeholder="请输入个人姓名" />
</view>
</view>
<view class="item" v-if="tabIndex == 2">
<view class="item">
<view class="l">发票抬头</view>
<view class="r">
<input type="text" v-model="array1[index1]" placeholder="请输入单位名称" />
<!-- <view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255)">更改抬头</view> -->
<input type="text" v-model="obj.header" :placeholder="tabIndex == 2 ? '请输入单位名称' : '请输入个人姓名'" />
</view>
</view>
<view class="item" v-if="tabIndex == 2">
@ -77,7 +71,7 @@
</view>
</view>
<view class="invoice-btn">
<view class="invoice-fd" @click="toDetail()">
<view class="invoice-fd" @click="onSubmit()">
提交
</view>
</view>
@ -92,51 +86,66 @@ import * as InvoiceApi from '@/api/invoice'
export default {
data() {
return {
id: '',
content: "确认您的发票信息无误后再提交",
show: true,
toggleIndex: true,
index: -1,
index: null,
array: ['普通增值税发票'],
index1: -1,
array1: [],
tabIndex: 2,
tabIndex: null,
sourcePage: 0,
orderDetail: '',
orderId: '',
obj: {
header: '',
gongsi: '',
duty_no: '',
bank_name: '',
bank_no: '',
address: '',
phone: '',
type: '',
source: 2
type: 1,
source: ''
}
};
},
onLoad(op) {
let app = this;
app.orderId = op.orderId
app.sourcePage = op.source == 1 ? op.source : 0
if (op.source == 0) {
app.orderDetail = op.order ? JSON.parse(op.order) : '';
}
if (op.source == 2 || op.source == 1) {
let detail = op.detail ? JSON.parse(op.detail) : '';
app.index = detail.type == 1 ? 0 : 1;
app.tabIndex = detail.source
app.obj = detail
if (op.detailObj && op.detailObj != 'null') {
let end = JSON.parse(op.detailObj)
this.index = 0
if (end.source == 1) {
this.tabIndex = 1
} else {
this.tabIndex = 2
}
this.obj = end
}
// let app = this;
// app.orderId = op.orderId
// app.sourcePage = op.source == 1 ? op.source : 0
// if (op.source == 0) {
// app.orderDetail = op.order ? JSON.parse(op.order) : '';
// }
// if (op.source == 2 || op.source == 1) {
// let detail = op.detail ? JSON.parse(op.detail) : '';
// app.index = detail.type == 1 ? 0 : 1;
// app.tabIndex = detail.source
// app.obj = detail
// }
},
methods: {
//
toDetail(canReset = false) {
//
onSubmit() {
if (this.obj.id) {
this.editeInvoice()
} else {
this.addInvoice()
}
},
async addInvoice(canReset = false) {
const app = this
if (app.index == -1) {
if (app.index == null || !app.obj.source) {
uni.showToast({
title: '请选择发票类型',
icon: 'none',
@ -154,70 +163,67 @@ export default {
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入抬头',
title: '请输入纳税人识别号',
icon: 'none',
duration: 2000
})
return
}
app.isLoading = true;
if (app.tabIndex == 1) {
app.obj.gongsi = '';
app.obj.duty_no = '';
app.obj.bank_name = '';
app.obj.bank_no = '';
app.obj.address = '';
app.obj.phone = '';
}
app.obj.type = app.index == 0 ? 1 : 2;
app.obj.source = app.tabIndex;
let url = ''
if (app.sourcePage == 0) { //addInvoicing editInvoicing invoicingAdd
url = InvoiceApi.invoicingAdd(app.orderId, app.obj)
let {
status,
data
} = await InvoiceApi.addInvoicing(app.obj);
if (status == 200) {
uni.showToast({
title: '新增成功!',
icon: 'none',
duration: 2000
})
app.index = null
app.tabIndex =null
app.obj = app.$options.data().obj
}
if (app.sourcePage == 1) { //使
app.obj.invoice_id = app.obj.id; //
url = InvoiceApi.invoicingAdd(app.orderId, app.obj)
},
async editeInvoice() {
const app = this
if (app.index == null || !app.obj.source) {
uni.showToast({
title: '请选择发票类型',
icon: 'none',
duration: 2000
})
return
}
if (app.sourcePage == 2) { //
url = InvoiceApi.invoicingEdit(app.orderId, app.obj)
if (!app.obj.header) {
uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
}
if (app.sourcePage == 3) { //
url = InvoiceApi.addInvoicing(app.orderId, app.obj)
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
}
if (app.sourcePage == 4) { //
url = InvoiceApi.editInvoicing(app.orderId, app.obj)
let {
status,
data
} = await InvoiceApi.editInvoicing(app.obj);
if (status == 200) {
uni.showToast({
title: '编辑成功!',
icon: 'none',
duration: 2000
})
app.index = null
app.tabIndex =null
app.obj = app.$options.data().obj
}
debugger
url.then(result => {
if (result.status == 200) {
uni.showToast({
title: result.message,
icon: 'none',
duration: 2000
})
if (result.data.list.length.length > 0) {
uni.navigateTo({
url: "/pages/invoice/detail?id=" + result.data.list[0].id
})
} else {
uni.showToast({
title: '请求成功无返回详情',
icon: 'none',
duration: 2000
})
}
} else {
uni.showToast({
title: result.message,
icon: 'none',
duration: 2000
})
}
})
// :
canReset && uni.$emit('syncRefresh', true, true)
},
//
@ -238,10 +244,10 @@ export default {
onClose() { },
tabItem(i) {
this.tabIndex = i;
this.obj.source = i
},
toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
this.pamres.invoiceUnit = this.toggleIndex
},
bindPickerChange(e) {
this.index = e.detail.value;
@ -256,7 +262,7 @@ export default {
</script>
<style lang="scss" scoped>
.invoice-btn{
.invoice-btn {
width: 100%;
position: fixed;
bottom: 0;
@ -265,11 +271,14 @@ export default {
z-index: 8;
background: #F5F5F5;
}
.invoice-company{
.invoice-company {
margin-bottom: 170rpx;
}
.invoice {
padding-bottom: 1rpx;
&-goods {
padding: 0 20rpx 0 40rpx;
overflow: hidden;

@ -15,12 +15,12 @@
<view class="bill-record" v-else>
<view class="bill-item" v-for="(item, index) in recordList" :key="index">
<view class="bill-item-left">
<view class="commpany-name">飞科网络科技有限公司</view>
<view class="commpany-name">{{item.header}}</view>
<view class="bill-price">
<text>¥</text>150
<text>¥</text>{{item.price}}
</view>
</view>
<text class="bill-time">2023-12-31</text>
<text class="bill-time">{{item.created_at}}</text>
</view>
</view>
@ -28,18 +28,18 @@
<!-- 发票抬头 -->
<view v-if="tabIndex == 1">
<view class="invoice-header">
<view class="bill-header-item" @click="onAddInvoice" v-for="(item, index) in recordList" :key="index">
<view class="bill-header-item" @click="onAddInvoice(item)" v-for="(item, index) in recordHeaderList" :key="index">
<view class="bill-header-left">
<view class="header-type">普通发票抬头-个人</view>
<view class="header-type"> 普通增值税发票-{{item.source == 1?'个人':'单位'}}</view>
<view class="bill-header">
王大幅
{{item.header}}
</view>
</view>
<u-icon name="edit-pen" size="30" color="#838383"></u-icon>
</view>
</view>
<view class="invoice-btn-box">
<view class="invoice-btn" @click="onAddInvoice">
<view class="invoice-btn" @click="onAddInvoice(null)">
<text>+</text>添加发票抬头
</view>
</view>
@ -47,6 +47,7 @@
</view>
</template>
<script>
@ -56,24 +57,55 @@ export default {
data() {
return {
tabIndex: 0,
invoicList: [],
recordList: [1, 2]
recordList: [],
recordHeaderList:[]
};
},
onLoad() {
this.getRecordList()
},
methods: {
onTabClick(index) {
this.tabIndex = index
if(index == 1){
this.recordHeaderList = []
this.getHeaderList()
}else{
this.recordList = []
this.getRecordList()
}
},
onEdit(item) {
uni.navigateTo({
url: "/pages/invoice/editset?detail=" + JSON.stringify(item) + '&source=' + 4
//
async getRecordList() {
uni.showLoading({
title: "加载中"
})
let {
status,
data
} = await InvoiceApi.invoicingLog({});
if (status == 200) {
uni.hideLoading();
this.recordList = data.list
}
},
onAddInvoice() {
//
async getHeaderList() {
uni.showLoading({
title: "加载中"
})
let {
status,
data
} = await InvoiceApi.myInvoicing({});
if (status == 200) {
uni.hideLoading();
this.recordHeaderList = data.list
}
},
onAddInvoice(item) {
uni.navigateTo({
url: "/pages/invoice/editset?source=" + 3
url: "/pages/invoice/editset?detailObj=" + JSON.stringify(item)
})
},
}
@ -109,12 +141,12 @@ export default {
.invoice-header {
background: #fff;
padding-bottom: 164rpx;
.bill-header-item {
display: flex;
justify-content: space-between;
align-items: flex-end;
padding: 54rpx 46rpx 120rpx 64rpx;
padding: 54rpx 46rpx 64rpx 64rpx;
}
.header-type {

@ -22,7 +22,7 @@
<u-form-item label="反馈类型" label-width="170">
<u-radio-group v-model="form.type">
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList1" :key="index"
:name="item.name">
:name="item.val">
{{ item.name }}
</u-radio>
</u-radio-group>
@ -31,7 +31,7 @@
<u-form-item label="反馈类型" label-width="170">
<u-radio-group v-model="form.shop">
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index"
:name="item.name">
:name="item.val">
{{ item.name }}
</u-radio>
</u-radio-group>
@ -45,15 +45,16 @@
<u-form-item label="投诉内容" required label-width="150" label-position="top">
<u-input v-model="form.comment" class="textarea" placeholder="请填写投诉内容" type="textarea" />
</u-form-item>
<u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8"
width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload>
<u-upload :action="action" :header="header" :fileList="finishImageList" :previewFullImage="true"
@afterRead="afterRead" :maxCount="8" upload-text="上传照片" @delete="deletePic" name="1"
multiple></u-upload>
</view>
<view class="section1Item" style="margin-top:20rpx;">
<u-form-item label="您的称呼" label-width="170">
<u-input placeholder="请输入您的称呼" v-model="form.name" />
<u-input placeholder="请输入您的称呼" v-model="form.user_name" />
</u-form-item>
<u-form-item label="手机号码" label-width="170">
<u-input placeholder="请输入手机号" v-model="form.phone" />
<u-input placeholder="请输入手机号" v-model="form.mobile" />
</u-form-item>
</view>
</u-form>
@ -62,19 +63,26 @@
<view class="introText">1.工作人员将于1小时内与您联系解决您的问题(工作时间为周一至周日09:00~21:30)</view>
<view class="introText">2.有效投诉奖励最高奖励200元现金/代金券</view>
</view>
<view class="submitBtn" @click="submit">
提交
<view class="submitBtn-box">
<view class="submitBtn" @click="submit">
提交
</view>
</view>
</view>
<view class="section2" v-if="OrderType == 1 && feedBackList.length > 0">
<view class="feedShow" v-for="(item, index) in feedBackList" :key="index">
<view class="feedbackItem">
<view class="feedbackContent">
<view class="fbTitle">
<view class="fbFlag">
<text v-if="item.type == 1">投诉</text>
<text v-if="item.type == 2">建议</text>
<text v-if="item.type == 3">表扬</text>
<view class="fbFlag" v-if="item.type == 1">
<text>投诉</text>
</view>
<view class="fbFlag fbFlag2" v-if="item.type == 2">
<text>建议</text>
</view>
<view class="fbFlag fbFlag3" v-if="item.type == 3">
<text>表扬</text>
</view>
<view class="fbTitleText">
{{ item.shop_name }}
@ -86,16 +94,14 @@
</view>
<u-read-more showHeight="160" textIndent="0" fontSize="26rpx" color="#9E9E9E" :toggle="true"
close-text="展开">
<rich-text v-if="index != 0" :nodes="item.content"></rich-text>
<rich-text v-else
nodes="投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容"></rich-text>
<rich-text :nodes="item.content"></rich-text>
</u-read-more>
<view class="timefb">
{{ item.created_at }}
</view>
</view>
<view class="feedbackResult">
<view class="feedbackResult" v-if="item.status">
<u-collapse>
<u-collapse-item :open="true" title="处理结果">
<u-form :model="item" ref="item" class="selfForm">
@ -103,7 +109,7 @@
{{ item.replay_at }}
</u-form-item>
<u-form-item label="反馈内容:" label-width="150" prop="feedback">
{{ item.content }}
{{ item.reply }}
</u-form-item>
</u-form>
</u-collapse-item>
@ -122,7 +128,7 @@
{{ item.replay_at }}
</u-form-item>
<u-form-item label="反馈内容:" label-width="150" prop="feedback">
{{ item.content }}
{{ item.reply }}
</u-form-item>
</u-form>
</u-collapse-item>
@ -130,33 +136,39 @@
</view>
</view>
</view>
<view class="empty" v-if="OrderType == 2">
<view class="empty" v-if="OrderType != 0 && total == 0">
<u-empty text="暂无信息" mode="list"></u-empty>
</view>
<!-- <view class="empty" v-if="OrderType == 2">
<image class="emptyImg" :src="$picUrl + '/static/news1/feedbackempty.png'" mode="widthFix"></image>
<view class="emptytext">
还没有反馈内容
</view>
</view>
</view> -->
</view>
</template>
<script>
import Config from '@/core/config'
import * as feedback from '@/api/feedback'
export default {
data() {
return {
action: '',
header: '',
OrderType: 0,
shop_id: '',
total: 1,
form: {
type: '',
shop: '',
shopText: '',
comment: '',
name: '',
user_name: '',
phone: ''
},
feedBackList: [],
page: 1,
checkboxList1: [{
name: '投诉',
val: 1
@ -171,10 +183,12 @@ export default {
}
],
checkboxList2: [{
name: '门店'
name: '门店',
val: 1
},
{
name: '其他'
name: '其他',
val: 2
},
],
typeShow: false,
@ -184,11 +198,25 @@ export default {
result: {}
};
},
onReady() {
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "")
this.header = {
'Storeid': uni.getStorageSync('Store').storeInfo.store_id,
'Access-Token': uni.getStorageSync('AccessToken'),
'platform': "MP-WEIXIN",
}
},
onShow() {
this.getShopList()
},
onLoad(params) {
},
onReachBottom() {
if (this.feedBackList.length < this.total && this.OrderType!=0) {
this.pageNum++;
this.getFeedBack(this.OrderType)
}
},
methods: {
getShopList() {
@ -220,7 +248,7 @@ export default {
})
return
}
if (this.form.phone && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.phone))) {
if (this.form.mobile && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.mobile))) {
uni.showToast({
title: '手机号格式不正确!',
icon: 'none',
@ -232,7 +260,10 @@ export default {
shop_id: that.shop_id,
type: that.form.type,
object_type: that.form.shop,
content: that.form.comment
content: that.form.comment,
user_name: that.form.user_name,
mobile: that.form.mobile,
image_id: that.image_id
}
return new Promise((resolve, reject) => {
feedback.add(params)
@ -250,6 +281,7 @@ export default {
*/
onOrderTab(type) {
this.OrderType = type;
this.pageNum = 1
this.feedBackList = []
if (type != 0) {
this.getFeedBack(type)
@ -261,14 +293,15 @@ export default {
const that = this
let params = {
is_my: 0,
page: that.page
page: that.pageNum
}
params.is_my = type == 1 ? 0 : 1
return new Promise((resolve, reject) => {
feedback.list(params)
.then(res => {
if (res.status == 200) {
that.feedBackList = res.data.list.data
that.total = res.data.list.total
that.feedBackList = that.feedBackList.concat(res.data.list.data)
}
})
.catch(reject)
@ -443,8 +476,8 @@ page {
}
.introContent {
margin-top: 16rpx;
margin: 16rpx 30rpx 30rpx 30rpx;
padding-bottom: 160rpx;
.introText {
font-size: 26rpx;
@ -455,16 +488,24 @@ page {
}
.submitBtn-box {
width: 100%;
position: fixed;
left: 0;
z-index: 88;
bottom: 0;
padding: 30rpx 32rpx;
background: #fff;
}
.submitBtn {
height: 100rpx;
background: linear-gradient(180deg, #FE7E71 0%, #FF4434 100%);
border-radius: 52px 52px 52px 52px;
opacity: 1;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin: 32rpx 30rpx 30rpx 30rpx;
text-align: center;
line-height: 100rpx;
}
@ -525,7 +566,14 @@ page {
color: #FF4D4D;
flex-shrink: 1;
}
.fbFlag2{
border: 1px solid #41B4EC;
color: #41B4EC;
}
.fbFlag3{
border: 1px solid #2DC37F;
color: #2DC37F
}
.fbTitleText {
flex: 1;
font-size: 28rpx;
@ -581,18 +629,4 @@ page {
justify-content: center;
flex-direction: column;
height: calc(100vh - 102rpx);
.emptyImg {
width: 210rpx;
}
.emptytext {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #717171;
margin-top: 36rpx;
}
}
</style>
}</style>

@ -1,60 +1,52 @@
<template>
<view>
<view class="title">{{title}}</view>
<view class="con">用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议</view>
<view class="con">{{ content }}</view>
</view>
</template>
<script>
import * as feedback from '@/api/feedback'
import * as help from '@/api/help'
export default {
data() {
return {
title:'用户协议'
pageFlag: 1,
content: ''
};
},
onShow() {
this.getShopList()
this.getTextData()
},
onLoad(params) {
let that = this
that.pageFlag = params.pageFlag
uni.setNavigationBarTitle({
title: that.pageFlag == 1 ? '用户服务协议' : that.pageFlag == 2 ? '隐私政策' : '关于我们'
})
},
methods: {
getShopList() {
const that = this
// that.shopList = []
// return new Promise((resolve, reject) => {
// feedback.shopList()
// .then(res => {
// if (res.data.length > 0) {
// for (var i = 0; i < res.data.length; i++) {
// let obj = {
// text: res.data[i].shop_name,
// id: res.data[i].shop_id
// }
// that.shopList.push(obj)
// }
// }
// })
// .catch(reject)
// })
async getTextData() {
uni.showLoading({
title: "加载中"
})
let typeVal = this.pageFlag == 1 ? 'user' : this.pageFlag == 2 ? 'policy' : 'about'
let {
status,
data
} = await help.getAgreement({ type: typeVal });
if (status == 200) {
uni.hideLoading();
this.content = data.detail.content
}
},
}
}
</script>
<style scoped lang="scss">
.title{
font-size: 30rpxrpx;
font-weight: bold;
text-align: center;
margin: 10rpx 20rpx;
}
.con{
.con {
font-size: 28rpx;
padding: 0 40rpx 40rpx;
padding: 20rpx 40rpx 40rpx;
line-height: 28px;
}
}
</style>

Loading…
Cancel
Save