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

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', joinStore: 'store/joinStore',
getStoreType: 'store/getStoreType', getStoreType: 'store/getStoreType',
storeSet:'store/editStore', 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) => { export const list = (param) => {
return request.get(api.list, param) return request.get(api.list, param)

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

@ -13,7 +13,8 @@
<view class="l">发票类型</view> <view class="l">发票类型</view>
<view class="r"> <view class="r">
<picker :value="index" :range="array" @change="bindPickerChange"> <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> </picker>
</view> </view>
</view> </view>
@ -24,17 +25,10 @@
<view class="li" :class="tabIndex == 2 ? 'li-on' : ''" @click="tabItem(2)">单位</view> <view class="li" :class="tabIndex == 2 ? 'li-on' : ''" @click="tabItem(2)">单位</view>
</view> </view>
</view> </view>
<view class="item" v-if="tabIndex != 2"> <view class="item">
<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="l">发票抬头</view> <view class="l">发票抬头</view>
<view class="r"> <view class="r">
<input type="text" v-model="array1[index1]" placeholder="请输入单位名称" /> <input type="text" v-model="obj.header" :placeholder="tabIndex == 2 ? '请输入单位名称' : '请输入个人姓名'" />
<!-- <view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255)">更改抬头</view> -->
</view> </view>
</view> </view>
<view class="item" v-if="tabIndex == 2"> <view class="item" v-if="tabIndex == 2">
@ -77,7 +71,7 @@
</view> </view>
</view> </view>
<view class="invoice-btn"> <view class="invoice-btn">
<view class="invoice-fd" @click="toDetail()"> <view class="invoice-fd" @click="onSubmit()">
提交 提交
</view> </view>
</view> </view>
@ -92,52 +86,66 @@ import * as InvoiceApi from '@/api/invoice'
export default { export default {
data() { data() {
return { return {
id: '',
content: "确认您的发票信息无误后再提交", content: "确认您的发票信息无误后再提交",
show: true, show: true,
toggleIndex: true, toggleIndex: true,
index: -1, index: null,
array: ['普通增值税发票'], array: ['普通增值税发票'],
index1: -1, tabIndex: null,
array1: [],
tabIndex: 2,
sourcePage: 0, sourcePage: 0,
orderDetail: '', orderDetail: '',
orderId: '', orderId: '',
obj: { obj: {
header: '', header: '',
gongsi: '',
duty_no: '', duty_no: '',
bank_name: '', bank_name: '',
bank_no: '', bank_no: '',
address: '', address: '',
phone: '', phone: '',
type: '', type: 1,
source: 2 source: ''
} }
}; };
}, },
onLoad(op) { onLoad(op) {
let app = this; if (op.detailObj && op.detailObj != 'null') {
app.orderId = op.orderId let end = JSON.parse(op.detailObj)
app.sourcePage = op.source == 1 ? op.source : 0 this.index = 0
if (op.source == 0) { if (end.source == 1) {
app.orderDetail = op.order ? JSON.parse(op.order) : ''; this.tabIndex = 1
} } else {
if (op.source == 2 || op.source == 1) { this.tabIndex = 2
let detail = op.detail ? JSON.parse(op.detail) : ''; }
app.index = detail.type == 1 ? 0 : 1; this.obj = end
app.tabIndex = detail.source
app.obj = detail
} }
// 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: { methods: {
// //
// onSubmit() {
async toDetail(canReset = false) { if (this.obj.id) {
const app = this this.editeInvoice()
if (app.index == -1) { } else {
this.addInvoice()
}
},
async addInvoice(canReset = false) {
const app = this
if (app.index == null || !app.obj.source) {
uni.showToast({ uni.showToast({
title: '请选择发票类型', title: '请选择发票类型',
icon: 'none', icon: 'none',
@ -155,79 +163,67 @@ export default {
} }
if (app.tabIndex == 2 && !app.obj.duty_no) { if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({ uni.showToast({
title: '请输入抬头', title: '请输入纳税人识别号',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
return return
} }
console.log(app.obj)
debugger
let { let {
status, status,
data data
} = await InvoiceApi.addInvoicing(app.obj); } = await InvoiceApi.addInvoicing(app.obj);
if (status == 200) { if (status == 200) {
debugger uni.showToast({
} title: '新增成功!',
return icon: 'none',
app.isLoading = true; duration: 2000
if (app.tabIndex == 1) { })
app.obj.gongsi = ''; app.index = null
app.obj.duty_no = ''; app.tabIndex =null
app.obj.bank_name = ''; app.obj = app.$options.data().obj
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 (app.sourcePage == 1) { //使 },
app.obj.invoice_id = app.obj.id; // async editeInvoice() {
url = InvoiceApi.invoicingAdd(app.orderId, app.obj) const app = this
if (app.index == null || !app.obj.source) {
uni.showToast({
title: '请选择发票类型',
icon: 'none',
duration: 2000
})
return
} }
if (app.sourcePage == 2) { // if (!app.obj.header) {
url = InvoiceApi.invoicingEdit(app.orderId, app.obj) uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
} }
if (app.sourcePage == 3) { // if (app.tabIndex == 2 && !app.obj.duty_no) {
url = InvoiceApi.addInvoicing(app.orderId, app.obj) uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
} }
if (app.sourcePage == 4) { // let {
url = InvoiceApi.editInvoicing(app.orderId, app.obj) 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() { }, onClose() { },
tabItem(i) { tabItem(i) {
this.tabIndex = i; this.tabIndex = i;
this.obj.source = i
}, },
toggleItem(i) { toggleItem(i) {
this.toggleIndex = !this.toggleIndex; this.toggleIndex = !this.toggleIndex;
this.pamres.invoiceUnit = this.toggleIndex
}, },
bindPickerChange(e) { bindPickerChange(e) {
this.index = e.detail.value; 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-record" v-else>
<view class="bill-item" v-for="(item, index) in recordList" :key="index"> <view class="bill-item" v-for="(item, index) in recordList" :key="index">
<view class="bill-item-left"> <view class="bill-item-left">
<view class="commpany-name">飞科网络科技有限公司</view> <view class="commpany-name">{{item.header}}</view>
<view class="bill-price"> <view class="bill-price">
<text>¥</text>150 <text>¥</text>{{item.price}}
</view> </view>
</view> </view>
<text class="bill-time">2023-12-31</text> <text class="bill-time">{{item.created_at}}</text>
</view> </view>
</view> </view>
@ -28,18 +28,18 @@
<!-- 发票抬头 --> <!-- 发票抬头 -->
<view v-if="tabIndex == 1"> <view v-if="tabIndex == 1">
<view class="invoice-header"> <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="bill-header-left">
<view class="header-type">普通发票抬头-个人</view> <view class="header-type"> 普通增值税发票-{{item.source == 1?'个人':'单位'}}</view>
<view class="bill-header"> <view class="bill-header">
王大幅 {{item.header}}
</view> </view>
</view> </view>
<u-icon name="edit-pen" size="30" color="#838383"></u-icon> <u-icon name="edit-pen" size="30" color="#838383"></u-icon>
</view> </view>
</view> </view>
<view class="invoice-btn-box"> <view class="invoice-btn-box">
<view class="invoice-btn" @click="onAddInvoice"> <view class="invoice-btn" @click="onAddInvoice(null)">
<text>+</text>添加发票抬头 <text>+</text>添加发票抬头
</view> </view>
</view> </view>
@ -56,10 +56,9 @@ import * as InvoiceApi from '@/api/invoice'
export default { export default {
data() { data() {
return { return {
tabIndex: 0, tabIndex: 0,
invoicList: [], recordList: [],
recordList: [1, 2], recordHeaderList:[]
recordHeaderList:[1,2]
}; };
}, },
onLoad() { onLoad() {
@ -103,16 +102,10 @@ export default {
uni.hideLoading(); uni.hideLoading();
this.recordHeaderList = data.list this.recordHeaderList = data.list
} }
}, },
onAddInvoice(item) {
onEdit(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/editset?detail=" + JSON.stringify(item) + '&source=' + 4 url: "/pages/invoice/editset?detailObj=" + JSON.stringify(item)
})
},
onAddInvoice() {
uni.navigateTo({
url: "/pages/invoice/editset?source=" + 3
}) })
}, },
} }
@ -148,12 +141,12 @@ export default {
.invoice-header { .invoice-header {
background: #fff; background: #fff;
padding-bottom: 164rpx;
.bill-header-item { .bill-header-item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-end; align-items: flex-end;
padding: 54rpx 46rpx 120rpx 64rpx; padding: 54rpx 46rpx 64rpx 64rpx;
} }
.header-type { .header-type {

@ -63,19 +63,26 @@
<view class="introText">1.工作人员将于1小时内与您联系解决您的问题(工作时间为周一至周日09:00~21:30)</view> <view class="introText">1.工作人员将于1小时内与您联系解决您的问题(工作时间为周一至周日09:00~21:30)</view>
<view class="introText">2.有效投诉奖励最高奖励200元现金/代金券</view> <view class="introText">2.有效投诉奖励最高奖励200元现金/代金券</view>
</view> </view>
<view class="submitBtn" @click="submit"> <view class="submitBtn-box">
提交 <view class="submitBtn" @click="submit">
提交
</view>
</view> </view>
</view> </view>
<view class="section2" v-if="OrderType == 1 && feedBackList.length > 0"> <view class="section2" v-if="OrderType == 1 && feedBackList.length > 0">
<view class="feedShow" v-for="(item, index) in feedBackList" :key="index"> <view class="feedShow" v-for="(item, index) in feedBackList" :key="index">
<view class="feedbackItem"> <view class="feedbackItem">
<view class="feedbackContent"> <view class="feedbackContent">
<view class="fbTitle"> <view class="fbTitle">
<view class="fbFlag" v-if="item.type != 0"> <view class="fbFlag" v-if="item.type == 1">
<text v-if="item.type == 1">投诉</text> <text>投诉</text>
<text v-if="item.type == 2">建议</text> </view>
<text v-if="item.type == 3">表扬</text> <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>
<view class="fbTitleText"> <view class="fbTitleText">
{{ item.shop_name }} {{ item.shop_name }}
@ -87,16 +94,14 @@
</view> </view>
<u-read-more showHeight="160" textIndent="0" fontSize="26rpx" color="#9E9E9E" :toggle="true" <u-read-more showHeight="160" textIndent="0" fontSize="26rpx" color="#9E9E9E" :toggle="true"
close-text="展开"> close-text="展开">
<rich-text v-if="index != 0" :nodes="item.content"></rich-text> <rich-text :nodes="item.content"></rich-text>
<rich-text v-else
nodes="投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容"></rich-text>
</u-read-more> </u-read-more>
<view class="timefb"> <view class="timefb">
{{ item.created_at }} {{ item.created_at }}
</view> </view>
</view> </view>
<view class="feedbackResult"> <view class="feedbackResult" v-if="item.status">
<u-collapse> <u-collapse>
<u-collapse-item :open="true" title="处理结果"> <u-collapse-item :open="true" title="处理结果">
<u-form :model="item" ref="item" class="selfForm"> <u-form :model="item" ref="item" class="selfForm">
@ -163,7 +168,7 @@ export default {
phone: '' phone: ''
}, },
feedBackList: [], feedBackList: [],
checkboxList1: [{ checkboxList1: [{
name: '投诉', name: '投诉',
val: 1 val: 1
@ -207,8 +212,8 @@ export default {
onLoad(params) { onLoad(params) {
}, },
onReachBottom() { onReachBottom() {
if (this.feedBackList.length <= this.total) { if (this.feedBackList.length < this.total && this.OrderType!=0) {
this.pageNum++; this.pageNum++;
this.getFeedBack(this.OrderType) this.getFeedBack(this.OrderType)
} }
@ -295,8 +300,8 @@ export default {
feedback.list(params) feedback.list(params)
.then(res => { .then(res => {
if (res.status == 200) { if (res.status == 200) {
that.total = res.data.list.total that.total = res.data.list.total
that.feedBackList =that.feedBackList.concat(res.data.list.data) that.feedBackList = that.feedBackList.concat(res.data.list.data)
} }
}) })
.catch(reject) .catch(reject)
@ -471,8 +476,8 @@ page {
} }
.introContent { .introContent {
margin-top: 16rpx;
margin: 16rpx 30rpx 30rpx 30rpx; margin: 16rpx 30rpx 30rpx 30rpx;
padding-bottom: 160rpx;
.introText { .introText {
font-size: 26rpx; 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 { .submitBtn {
height: 100rpx; height: 100rpx;
background: linear-gradient(180deg, #FE7E71 0%, #FF4434 100%); background: linear-gradient(180deg, #FE7E71 0%, #FF4434 100%);
border-radius: 52px 52px 52px 52px; border-radius: 52px 52px 52px 52px;
opacity: 1; opacity: 1;
font-size: 32rpx; font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
margin: 32rpx 30rpx 30rpx 30rpx;
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
} }
@ -553,7 +566,14 @@ page {
color: #FF4D4D; color: #FF4D4D;
flex-shrink: 1; flex-shrink: 1;
} }
.fbFlag2{
border: 1px solid #41B4EC;
color: #41B4EC;
}
.fbFlag3{
border: 1px solid #2DC37F;
color: #2DC37F
}
.fbTitleText { .fbTitleText {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
@ -609,5 +629,4 @@ page {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
height: calc(100vh - 102rpx); height: calc(100vh - 102rpx);
} }</style>
</style>

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

Loading…
Cancel
Save