服务协议、发票助手模块、反馈对接

version/0412
mujinxia 9 months ago
parent b3aea6dd9f
commit 9f7ad9a1cf
  1. 7
      api/help.js
  2. 29
      api/invoice.js
  3. 193
      pages/invoice/editset.vue
  4. 37
      pages/invoice/indexset.vue
  5. 61
      pages/news1/feedback.vue
  6. 66
      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,8 +9,8 @@ const api = {
invoicingDel: 'user/invoicingDel',
invoicingDetail: 'user/invoicingDetail',
invoicingAdd: 'user/invoicingAdd',
invoicingEdit: 'user/invoicingEdit',
}
invoicingEdit: 'user/invoicingEdit'
}
export const invoicingEdit = (orderGoodsId, data) => {
return request.post(api.invoicingEdit, {
@ -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,52 +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
onLoad(op) {
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: {
//
//
async toDetail(canReset = false) {
const app = this
if (app.index == -1) {
//
onSubmit() {
if (this.obj.id) {
this.editeInvoice()
} else {
this.addInvoice()
}
},
async addInvoice(canReset = false) {
const app = this
if (app.index == null || !app.obj.source) {
uni.showToast({
title: '请选择发票类型',
icon: 'none',
@ -155,79 +163,67 @@ export default {
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入抬头',
title: '请输入纳税人识别号',
icon: 'none',
duration: 2000
})
return
}
console.log(app.obj)
debugger
let {
status,
data
} = await InvoiceApi.addInvoicing(app.obj);
if (status == 200) {
debugger
}
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)
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
}
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)
},
//
@ -247,11 +243,11 @@ export default {
},
onClose() { },
tabItem(i) {
this.tabIndex = i;
this.tabIndex = i;
this.obj.source = i
},
toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
this.pamres.invoiceUnit = this.toggleIndex
this.toggleIndex = !this.toggleIndex;
},
bindPickerChange(e) {
this.index = e.detail.value;
@ -590,4 +586,5 @@ export default {
}
}
}</style>
}
</style>

@ -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 recordHeaderList" :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>
@ -56,10 +56,9 @@ import * as InvoiceApi from '@/api/invoice'
export default {
data() {
return {
tabIndex: 0,
invoicList: [],
recordList: [1, 2],
recordHeaderList:[1,2]
tabIndex: 0,
recordList: [],
recordHeaderList:[]
};
},
onLoad() {
@ -103,16 +102,10 @@ export default {
uni.hideLoading();
this.recordHeaderList = data.list
}
},
onEdit(item) {
},
onAddInvoice(item) {
uni.navigateTo({
url: "/pages/invoice/editset?detail=" + JSON.stringify(item) + '&source=' + 4
})
},
onAddInvoice() {
uni.navigateTo({
url: "/pages/invoice/editset?source=" + 3
url: "/pages/invoice/editset?detailObj=" + JSON.stringify(item)
})
},
}
@ -148,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 {

@ -63,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" v-if="item.type != 0">
<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 }}
@ -87,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">
@ -163,7 +168,7 @@ export default {
phone: ''
},
feedBackList: [],
feedBackList: [],
checkboxList1: [{
name: '投诉',
val: 1
@ -207,8 +212,8 @@ export default {
onLoad(params) {
},
onReachBottom() {
if (this.feedBackList.length <= this.total) {
onReachBottom() {
if (this.feedBackList.length < this.total && this.OrderType!=0) {
this.pageNum++;
this.getFeedBack(this.OrderType)
}
@ -295,8 +300,8 @@ export default {
feedback.list(params)
.then(res => {
if (res.status == 200) {
that.total = res.data.list.total
that.feedBackList =that.feedBackList.concat(res.data.list.data)
that.total = res.data.list.total
that.feedBackList = that.feedBackList.concat(res.data.list.data)
}
})
.catch(reject)
@ -471,8 +476,8 @@ page {
}
.introContent {
margin-top: 16rpx;
margin: 16rpx 30rpx 30rpx 30rpx;
padding-bottom: 160rpx;
.introText {
font-size: 26rpx;
@ -483,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;
}
@ -553,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;
@ -609,5 +629,4 @@ page {
justify-content: center;
flex-direction: column;
height: calc(100vh - 102rpx);
}
</style>
}</style>

@ -1,60 +1,52 @@
<template>
<view>
<view class="title">{{title}}</view>
<view class="con">用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议用户服务协议</view>
<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{
<style scoped lang="scss">
.con {
font-size: 28rpx;
padding: 0 40rpx 40rpx;
padding: 20rpx 40rpx 40rpx;
line-height: 28px;
}
}
</style>

Loading…
Cancel
Save