fanfan 1 year ago
commit 0c68ce0aa0
  1. 7
      api/help.js
  2. 30
      api/invoice.js
  3. 201
      pages/invoice/editset.vue
  4. 123
      pages/invoice/indexset.vue
  5. 314
      pages/news1/feedback.vue
  6. 14
      pages/news1/help.vue
  7. 721
      pages/news1/huoyuan.vue
  8. 44
      pages/news1/setting.vue
  9. 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)

@ -10,8 +10,11 @@ const api = {
invoicingDetail: 'user/invoicingDetail', invoicingDetail: 'user/invoicingDetail',
invoicingAdd: 'user/invoicingAdd', invoicingAdd: 'user/invoicingAdd',
invoicingEdit: 'user/invoicingEdit', invoicingEdit: 'user/invoicingEdit',
invoicingDelNew: 'user/delInvoicing'
}
export const invoicingDelNew = (data) => {
return request.get(api.invoicingDelNew,data)
} }
export const invoicingEdit = (orderGoodsId, data) => { export const invoicingEdit = (orderGoodsId, data) => {
return request.post(api.invoicingEdit, { return request.post(api.invoicingEdit, {
orderGoodsId, orderGoodsId,
@ -24,28 +27,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,51 +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: {
// //
toDetail(canReset = false) { onSubmit() {
const app = this if (this.obj.id) {
if (app.index == -1) { this.editeInvoice()
} 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',
@ -154,70 +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
} }
app.isLoading = true; let {
if (app.tabIndex == 1) { status,
app.obj.gongsi = ''; data
app.obj.duty_no = ''; } = await InvoiceApi.addInvoicing(app.obj);
app.obj.bank_name = ''; if (status == 200) {
app.obj.bank_no = ''; uni.showToast({
app.obj.address = ''; title: '新增成功!',
app.obj.phone = ''; icon: 'none',
} duration: 2000
app.obj.type = app.index == 0 ? 1 : 2; })
app.obj.source = app.tabIndex; app.index = null
let url = '' app.tabIndex =null
if (app.sourcePage == 0) { //addInvoicing editInvoicing invoicingAdd app.obj = app.$options.data().obj
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
} }
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)
}, },
// //
@ -237,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;
@ -256,20 +262,23 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.invoice-btn{ .invoice-btn {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
padding: 30rpx 44rpx; padding: 30rpx 44rpx;
z-index: 8; z-index: 8;
background: #F5F5F5; background: #fafafa;
} }
.invoice-company{
.invoice-company {
margin-bottom: 170rpx; margin-bottom: 170rpx;
} }
.invoice { .invoice {
padding-bottom: 1rpx; padding-bottom: 1rpx;
&-goods { &-goods {
padding: 0 20rpx 0 40rpx; padding: 0 20rpx 0 40rpx;
overflow: hidden; overflow: hidden;
@ -475,7 +484,7 @@ export default {
&-fd { &-fd {
height: 104rpx; height: 104rpx;
background: #F55349; background: #F55349;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;

@ -15,31 +15,40 @@
<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>
</view> </view>
<!-- 发票抬头 --> <!-- 发票抬头 -->
<view v-if="tabIndex == 1"> <view v-if="tabIndex == 1">
<view class="invoice-header"> <view class="empty" v-if="recordHeaderList.length == 0">
<view class="bill-header-item" @click="onAddInvoice" v-for="(item, index) in recordList" :key="index"> <u-empty text="暂无信息" mode="list"></u-empty>
<view class="bill-header-left"> </view>
<view class="header-type">普通发票抬头-个人</view> <view v-else class="invoice-header">
<view class="bill-header"> <u-swipe-action :show="item.show" :options="options" @click="onActionClick(index)"
王大幅 v-for="(item, index) in recordHeaderList" :key="index" @open="onActionOpen(index)">
<view class="bill-header-item" @click="onAddInvoice(item)">
<view class="bill-header-left">
<view class="header-type"> 普通增值税发票-{{ item.source == 1 ? '个人' : '单位' }}</view>
<view class="bill-header">
{{ item.header }}
</view>
<view class="bill-header" style="margin-top:18rpx" v-if="item.source == 2">
税号{{ item.duty_no }}
</view>
</view> </view>
<u-icon name="edit-pen" size="30" color="#838383"></u-icon>
</view> </view>
<u-icon name="edit-pen" size="30" color="#838383"></u-icon> </u-swipe-action>
</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,30 +65,98 @@ export default {
data() { data() {
return { return {
tabIndex: 0, tabIndex: 0,
invoicList: [], recordList: [],
recordList: [1, 2] recordHeaderList: [],
options: [
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
]
}; };
}, },
onLoad() { onLoad() {
this.getRecordList()
}, },
methods: { methods: {
onTabClick(index) { onTabClick(index) {
this.tabIndex = index this.tabIndex = index
if (index == 1) {
this.recordHeaderList = []
this.getHeaderList()
} else {
this.recordList = []
this.getRecordList()
}
}, },
onEdit(item) { //
uni.navigateTo({ async getRecordList() {
url: "/pages/invoice/editset?detail=" + JSON.stringify(item) + '&source=' + 4 uni.showLoading({
title: "加载中"
})
let {
status,
data
} = await InvoiceApi.invoicingLog({});
if (status == 200) {
uni.hideLoading();
this.recordList = data.list
}
},
//
async getHeaderList() {
uni.showLoading({
title: "加载中"
}) })
let {
status,
data
} = await InvoiceApi.myInvoicing({});
if (status == 200) {
uni.hideLoading();
this.recordHeaderList = data.list
this.recordHeaderList.map(item => {
item.show = false
})
}
}, },
onAddInvoice() { //
async onActionClick(index) {
let that = this
let {
status,
data
} = await InvoiceApi.invoicingDelNew({ id: that.recordHeaderList[index].id});
if (status == 200) {
that.getHeaderList()
uni.showToast({
title: '删除成功!',
icon: 'none',
duration: 2000
})
}
},
onActionOpen(index) {
this.recordHeaderList[index].show = true;
this.recordHeaderList.map((val, idx) => {
if (index != idx) this.recordHeaderList[idx].show = false;
})
},
onAddInvoice(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/editset?source=" + 3 url: "/pages/invoice/editset?detailObj=" + JSON.stringify(item)
}) })
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page {
background: red;
}
.invoice-btn-box { .invoice-btn-box {
width: 100%; width: 100%;
position: fixed; position: fixed;
@ -87,10 +164,10 @@ export default {
left: 0; left: 0;
padding: 30rpx 44rpx; padding: 30rpx 44rpx;
z-index: 8; z-index: 8;
background: #F5F5F5; background: #fafafa;
.invoice-btn { .invoice-btn {
height: 104rpx; height: 104rpx;
background: #F55349; background: #F55349;
color: #fff; color: #fff;
font-size: 32rpx; font-size: 32rpx;
@ -109,12 +186,14 @@ 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: 40rpx 46rpx 40rpx 64rpx;
font-size: 32rpx;
} }
.header-type { .header-type {

@ -17,12 +17,12 @@
</view> </view>
<view class="section1" v-if="OrderType == 0"> <view class="section1" v-if="OrderType == 0">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<view class="section1Item"> <view class="section1Item c">
<u-form-item label="反馈类型" label-width="170"> <u-form-item label="反馈类型" label-width="170">
<u-radio-group v-model="form.type"> <u-radio-group v-model="form.type">
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList1" :key="index" <u-radio active-color="#FF4434" v-for="(item, index) in checkboxList1" :key="index"
:name="item.name"> :name="item.val">
{{ item.name }} {{ item.name }}
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
@ -31,7 +31,7 @@
<u-form-item label="反馈类型" label-width="170"> <u-form-item label="反馈类型" label-width="170">
<u-radio-group v-model="form.shop"> <u-radio-group v-model="form.shop">
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index" <u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index"
:name="item.name"> :name="item.val">
{{ item.name }} {{ item.name }}
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
@ -39,21 +39,31 @@
</u-form-item> </u-form-item>
<u-form-item label="反馈类型" label-width="170" @click="typeShow = true"> <u-form-item label="反馈类型" label-width="170" @click="typeShow = true">
<u-input v-model="form.shopText" placeholder="请选择门店" type="select" @click="typeShow = true" /> <u-input v-model="form.shopText" placeholder="请选择门店" type="select" @click="typeShow = true" />
<u-action-sheet :list="shopList" :cancel-btn="false" v-model="typeShow" <!-- <u-action-sheet :list="shopList" :cancel-btn="false" v-model="typeShow"
@click="actionSheetCallback"></u-action-sheet> @click="actionSheetCallback"></u-action-sheet> -->
<u-picker :range="shopList" range-key="text" @confirm="actionSheetCallback($event)"
v-model="typeShow" mode="selector"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="投诉内容" required label-width="150" label-position="top"> <u-form-item label="投诉内容" required label-width="150" label-position="top">
<u-input v-model="form.comment" class="textarea" placeholder="请填写投诉内容" type="textarea" /> <u-input v-model="form.comment" height="228" class="realAddr" placeholder="请填写投诉内容"
type="textarea"></u-input>
</u-form-item> </u-form-item>
<u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8" <u-upload :action="action" :header="header" @on-uploaded="transferSuccess" @on-remove="transferRemove"
width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload> width="180" height="180" :file-list="finishImageList" :custom-btn="true" max-count="6">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl + '/static/news/icon-upload.png'"></image>
<view class="1">上传照片</view>
</view>
</template>
</u-upload>
</view> </view>
<view class="section1Item" style="margin-top:20rpx;"> <view class="section1Item" style="margin-top:20rpx;">
<u-form-item label="您的称呼" label-width="170"> <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>
<u-form-item label="手机号码" label-width="170"> <u-form-item label="手机号码" label-width="170">
<u-input placeholder="请输入手机号" v-model="form.phone" /> <u-input placeholder="请输入手机号" v-model="form.mobile" />
</u-form-item> </u-form-item>
</view> </view>
</u-form> </u-form>
@ -62,19 +72,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 != 0 && 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"> <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 }}
@ -86,24 +103,30 @@
</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 <view v-if="item.file_path">
nodes="投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容投诉内容"></rich-text> <u-upload width="180" height="180" max-count="1" :file-list="item.file_paths" :deletable="false">
</u-upload>
</view>
</u-read-more> </u-read-more>
<view class="timefb" v-if="OrderType == 1">
<text>反馈人</text> {{ item.user_name }}
</view>
<view class="timefb"> <view class="timefb">
{{ item.created_at }} <text>反馈时间</text> {{ 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="false" title="处理结果">
<u-form :model="item" ref="item" class="selfForm"> <u-form :model="item" ref="item" class="selfForm">
<u-form-item label="处理时间:" label-width="150" prop="time"> <u-form-item label="处理时间:" label-width="150" prop="time">
{{ item.replay_at }} {{ item.replay_at }}
</u-form-item> </u-form-item>
<u-form-item label="反馈内容:" label-width="150" prop="feedback"> <u-form-item label="反馈内容:" label-width="150" prop="feedback">
{{ item.content }} {{ item.reply }}
</u-form-item> </u-form-item>
</u-form> </u-form>
</u-collapse-item> </u-collapse-item>
@ -112,7 +135,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="section2" v-if="OrderType == 2 && feedBackList.length > 0"> <!-- <view class="section2" v-if="OrderType == 2 && feedBackList.length > 0">
<view class="feedShow" style="padding: 0;" v-for="(item, index) in feedBackList" :key="index"> <view class="feedShow" style="padding: 0;" v-for="(item, index) in feedBackList" :key="index">
<view class="feedbackResult"> <view class="feedbackResult">
<u-collapse> <u-collapse>
@ -122,41 +145,47 @@
{{ item.replay_at }} {{ item.replay_at }}
</u-form-item> </u-form-item>
<u-form-item label="反馈内容:" label-width="150" prop="feedback"> <u-form-item label="反馈内容:" label-width="150" prop="feedback">
{{ item.content }} {{ item.reply }}
</u-form-item> </u-form-item>
</u-form> </u-form>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
</view> </view>
</view> </view>
</view> -->
<view class="empty" v-if="OrderType != 0 && total == 0">
<u-empty text="暂无信息" mode="list"></u-empty>
</view> </view>
<view class="empty" v-if="OrderType == 2"> <!-- <view class="empty" v-if="OrderType == 2">
<image class="emptyImg" :src="$picUrl + '/static/news1/feedbackempty.png'" mode="widthFix"></image> <image class="emptyImg" :src="$picUrl + '/static/news1/feedbackempty.png'" mode="widthFix"></image>
<view class="emptytext"> <view class="emptytext">
还没有反馈内容 还没有反馈内容
</view> </view>
</view> </view> -->
</view> </view>
</template> </template>
<script> <script>
import Config from '@/core/config'
import * as feedback from '@/api/feedback' import * as feedback from '@/api/feedback'
export default { export default {
data() { data() {
return { return {
action: '',
header: '',
OrderType: 0, OrderType: 0,
shop_id: '', shop_id: '',
total: 1,
form: { form: {
type: '', type: '',
shop: '', shop: '',
shopText: '', shopText: '',
comment: '', comment: '',
name: '', user_name: '',
phone: '' phone: ''
}, },
feedBackList: [], feedBackList: [],
page: 1,
checkboxList1: [{ checkboxList1: [{
name: '投诉', name: '投诉',
val: 1 val: 1
@ -171,10 +200,12 @@ export default {
} }
], ],
checkboxList2: [{ checkboxList2: [{
name: '门店' name: '门店',
val: 1
}, },
{ {
name: '其他' name: '其他',
val: 2
}, },
], ],
typeShow: false, typeShow: false,
@ -184,11 +215,25 @@ export default {
result: {} 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() { onShow() {
this.getShopList() this.getShopList()
}, },
onLoad(params) { onLoad(params) {
},
onReachBottom() {
if (this.feedBackList.length < this.total && this.OrderType != 0) {
this.pageNum++;
this.getFeedBack(this.OrderType)
}
}, },
methods: { methods: {
getShopList() { getShopList() {
@ -210,6 +255,35 @@ export default {
.catch(reject) .catch(reject)
}) })
}, },
//
transferSuccess(list) {
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
let idList = []
list.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
this.image_id = idList.join(',');
}
}
},
transferRemove(file, fileList) {
this.image_id = this.handleRemove(file, fileList);
},
handleRemove: function (file, fileList) {
let idList = []
fileList.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
return idList.join(',')
},
submit() { submit() {
const that = this const that = this
if (that.form.comment == '') { if (that.form.comment == '') {
@ -220,7 +294,7 @@ export default {
}) })
return 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({ uni.showToast({
title: '手机号格式不正确!', title: '手机号格式不正确!',
icon: 'none', icon: 'none',
@ -232,7 +306,10 @@ export default {
shop_id: that.shop_id, shop_id: that.shop_id,
type: that.form.type, type: that.form.type,
object_type: that.form.shop, 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) => { return new Promise((resolve, reject) => {
feedback.add(params) feedback.add(params)
@ -250,6 +327,7 @@ export default {
*/ */
onOrderTab(type) { onOrderTab(type) {
this.OrderType = type; this.OrderType = type;
this.pageNum = 1
this.feedBackList = [] this.feedBackList = []
if (type != 0) { if (type != 0) {
this.getFeedBack(type) this.getFeedBack(type)
@ -261,14 +339,27 @@ export default {
const that = this const that = this
let params = { let params = {
is_my: 0, is_my: 0,
page: that.page page: that.pageNum
} }
params.is_my = type == 1 ? 0 : 1 params.is_my = type == 1 ? 0 : 1
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
feedback.list(params) feedback.list(params)
.then(res => { .then(res => {
if (res.status == 200) { if (res.status == 200) {
that.feedBackList = res.data.list.data that.total = res.data.list.total
let end = res.data.list.data
end.map(itme=>{
if(itme.file_path){
itme.file_paths = []
let img_arr = itme.file_path.split(',')
img_arr.map(src=>{
itme.file_paths.push({
url:src
})
})
}
})
that.feedBackList = that.feedBackList.concat(end)
} }
}) })
.catch(reject) .catch(reject)
@ -279,70 +370,7 @@ export default {
this.form.shopText = this.shopList[index].text; this.form.shopText = this.shopList[index].text;
this.shop_id = this.shopList[index].id this.shop_id = this.shopList[index].id
}, },
//
async afterRead(event) {
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
if (JSON.parse(result).code == 1) {
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
} else {
this[`fileList${event.name}`].splice(fileListLen, 1)
}
}
},
//
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: this.baseUrl + '/api/common/upload', //
filePath: url,
name: 'file',
formData: {
user: 'test',
token: getToken()
},
success: (res) => {
if (JSON.parse(res.data).code == 1) {
setTimeout(() => {
this.finishImageList.push({ url: JSON.parse(res.data).data.fullurl, path: JSON.parse(res.data).data.url })
resolve(res.data)
}, 1000)
} else {
uni.$u.toast(JSON.parse(res.data).msg)
resolve(res.data)
}
},
fail: (res) => {
console.log(res, "rrr")
}
});
})
},
//
deletePic(event) {
this.finishImageList.splice(event.index, 1)
},
} }
} }
</script> </script>
@ -355,6 +383,45 @@ page {
} }
.c {
padding-top: 20rpx;
overflow: hidden;
.slot-btn {
width: 180rpx;
height: 180rpx;
background: #F6F6F6;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #6D6D6D;
.l {
line-height: 30rpx;
margin-top: 10rpx;
}
image {
width: 50rpx;
height: 50rpx;
display: block;
margin: 0 auto;
margin-top: 30rpx;
}
}
}
.realAddr {
::v-deep .u-input {
padding: 10rpx 22upx !important;
background: #F7F8FA;
border-radius: 6rpx !important;
}
}
/* 订单tab */ /* 订单tab */
.order-tab { .order-tab {
@ -431,20 +498,13 @@ page {
border: none; border: none;
} }
// .textarea {
// height: 258rpx;
// border-radius: 3px;
// border: solid 1upx #F7F8FA;
// }
::v-deep .u-input__textarea { ::v-deep .u-input__textarea {
padding: 26rpx; padding: 26rpx;
} }
.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;
@ -455,16 +515,24 @@ page {
} }
.submitBtn-box {
width: 100%;
position: fixed;
left: 0;
z-index: 88;
bottom: 0;
padding: 30rpx 32rpx;
background: #fafafa;
}
.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;
} }
@ -516,7 +584,6 @@ page {
.fbFlag { .fbFlag {
background: #FFFFFF; background: #FFFFFF;
border-radius: 3px; border-radius: 3px;
opacity: 1;
padding: 5rpx; padding: 5rpx;
border: 1px solid #FF4D4D; border: 1px solid #FF4D4D;
font-size: 26rpx; font-size: 26rpx;
@ -524,6 +591,17 @@ page {
font-weight: 500; font-weight: 500;
color: #FF4D4D; color: #FF4D4D;
flex-shrink: 1; flex-shrink: 1;
margin-right: 20rpx;
}
.fbFlag2 {
border: 1px solid #41B4EC;
color: #41B4EC;
}
.fbFlag3 {
border: 1px solid #2DC37F;
color: #2DC37F
} }
.fbTitleText { .fbTitleText {
@ -534,7 +612,6 @@ page {
text-overflow: ellipsis; text-overflow: ellipsis;
color: #000; color: #000;
font-weight: bold; font-weight: bold;
margin-left: 20rpx;
} }
} }
@ -581,18 +658,5 @@ page {
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
height: calc(100vh - 102rpx); 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>

@ -90,11 +90,13 @@
border-radius: 20upx; border-radius: 20upx;
overflow: hidden; overflow: hidden;
padding: 20upx; padding: 20upx;
padding-bottom: 160rpx;
.helpTitle { .helpTitle {
font-size: 32upx; font-size: 32upx;
color: #000000; color: #000000;
padding: 20upx 0; padding: 20upx 0;
font-weight: bold;
// border-bottom: 3upx solid #dfdbdb; // border-bottom: 3upx solid #dfdbdb;
} }
@ -184,18 +186,15 @@
bottom: 0; bottom: 0;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
padding: 30rpx;
.btn { .btn {
height: 100upx; height: 100upx;
margin: 10upx 30upx;
background: #FE6048; background: #FE6048;
border-radius: 28px 28px 28px 28px; border-radius: 28px 28px 28px 28px;
opacity: 1; opacity: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
justify-content: center;
image { image {
width: 54upx; width: 54upx;
height: auto; height: auto;
@ -213,6 +212,7 @@
image { image {
width: 54upx; width: 54upx;
height: auto; height: auto;
margin-right: 100rpx;
} }
text-align: center; text-align: center;
display: flex; display: flex;

@ -6,32 +6,32 @@
</view> </view>
</view> </view>
<image :src="$picUrl+'/static/news1/walletBg.png'" class="bgImg" mode="widthFix"></image> <image :src="$picUrl + '/static/news1/walletBg.png'" class="bgImg" mode="widthFix"></image>
<view style="border:1px solid transparent;margin-top:-190px;position: relative;z-index: 9;"> <view style="border:1px solid transparent;margin-top:-190px;position: relative;z-index: 9;">
<view class="process"> <view class="process">
<view class="pItem" v-for="(item,index) in list" :key="index"> <view class="pItem" v-for="(item, index) in list" :key="index">
<image :src="item.icon" mode="widthFix" class="icon"></image> <image :src="item.icon" mode="widthFix" class="icon"></image>
<view class="title">{{item.title}}</view> <view class="title">{{ item.title }}</view>
<view class="subTitle">{{item.subTitle}}</view> <view class="subTitle">{{ item.subTitle }}</view>
</view> </view>
</view> </view>
<view class="formContent"> <view class="formContent">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm" boder>
<u-form-item label="商品名称" label-width="150"> <u-form-item label="商品名称" label-width="150">
<u-input placeholder="请填写您求购的商品名称" v-model="form.name" /> <u-input placeholder="请填写您求购的商品名称" v-model="form.name" />
</u-form-item> </u-form-item>
<u-form-item label="产品描述" label-width="150"> <u-form-item label="产品描述" label-width="150">
<u-input maxlength="200" placeholder="如品牌、型号、参数 、配置、规格等,可复制电商标题、链接。" v-model="form.intro" <u-input maxlength="200" placeholder="如品牌、型号、参数 、配置、规格等,可复制电商标题、链接。" v-model="form.intro"
type="textarea" /> type="textarea" />
</u-form-item> </u-form-item>
<u-form-item label="求购类型" label-width="150" @click="typeShow = true"> <u-form-item label="求购类型" label-width="150" @click="typeShow = true">
<u-input v-model="form.type" type="select" @click="typeShow = true" /> <u-input v-model="form.type" placeholder="请选择求购类型" type="select" @click="typeShow = true" />
<u-action-sheet :list="type" :cancel-btn="false" v-model="typeShow" <u-picker :range="type" range-key="text" @confirm="actionSheetCallback($event)" v-model="typeShow"
@click="actionSheetCallback"></u-action-sheet> mode="selector"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="交货日期" label-width="150" @click="timeShow = true"> <u-form-item label="交货日期" label-width="150" @click="timeShow = true">
<u-input v-model="form.date" type="select" @click="timeShow = true" /> <u-input v-model="form.date" type="select" placeholder="请选择交货日期" @click="timeShow = true" />
<u-picker mode="time" v-model="timeShow" :params="timeParams" @confirm="timeChage"></u-picker> <u-picker mode="time" v-model="timeShow" :params="timeParams" @confirm="timeChage"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="求购数量" label-width="150"> <u-form-item label="求购数量" label-width="150">
@ -40,9 +40,9 @@
<u-form-item label="预估单价" label-width="150"> <u-form-item label="预估单价" label-width="150">
<view class=""> <view class="">
<view class="qujian"> <view class="qujian">
<u-input placeholder="输入价格区间" border v-model="form.startNum" /> <u-input placeholder="输入价格区间" border v-model="form.startNum" />
<text style="margin:0 10upx;">-</text> <text style="margin:0 10upx;">-</text>
<u-input placeholder="输入价格区间" border v-model="form.endNum" /> <u-input placeholder="输入价格区间" border v-model="form.endNum" />
<text style="margin-left:10upx"></text> <text style="margin-left:10upx"></text>
</view> </view>
<u-checkbox-group> <u-checkbox-group>
@ -54,397 +54,424 @@
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="上传照片" label-width="150"> <u-form-item label="上传照片" label-width="150" class="c">
<view class="photo"> <u-upload :action="action" :header="header" @on-uploaded="transferSuccess"
<view class="file_img" v-for="(image, imageIndex) in imageList" :key="imageIndex"> @on-remove="transferRemove" width="180" height="180" :file-list="transferList"
<text class="image-delete iconfont icon-shanchu" :custom-btn="true" max-count="6">
@click="deleteImage(imageIndex)"></text> <template v-slot:addBtn>
<image :src="image.path"></image> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
</view> <image :src="$picUrl + '/static/news/icon-upload.png'"></image>
<view class="1">上传照片</view>
<view @click="chooseImage" class="slot-btn" hover-class="slot-btn__hover" </view>
hover-stay-time="150"> </template>
<image src="/static/news/icon-upload.png"></image> </u-upload>
<view class="1">上传图片</view>
<view class="1">{{imageList.length>0?imageList.length:0}}/{{maxImageLength}}</view>
</view>
</view>
</u-form-item> </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-form-item label="收货地址" label-width="150" @click="addrshow = true"> <u-form-item label="收货地址" label-width="150" @click="addrshow = true">
<u-input v-model="form.addr" type="select" @click="addrshow = true" /> <u-input v-model="form.addr" placeholder="请选择收货地址" type="select" @click="addrshow = true" />
<u-picker mode="region" v-model="addrshow" @confirm="getAddress"></u-picker> <u-picker mode="region" v-model="addrshow" @confirm="getAddress"></u-picker>
</u-form-item> </u-form-item>
<u-form-item label="备注" label-width="150" label-position="top"> <u-form-item label="备注" class="self-form" label-width="150" label-position="top">
<u-input v-model="form.remark" class="remarkInput" placeholder="请填写您要补充的内容,如规格、包装和运输等要求" <u-input class="realAddr" height="258" type="textarea" placeholder="请填写您要补充的内容,如规格、包装和运输等要求"
type="textarea" /> v-model="form.remark">
</u-input>
</u-form-item> </u-form-item>
</u-form> </u-form>
<button class="submitBtn" @click="sureSubmit">确认发布</button> <view class="submitBtn-box">
<button class="submitBtn" @click="sureSubmit">确认发布</button>
</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
// import img from "@/static/news1/walletBg.png"; // import img from "@/static/news1/walletBg.png";
import * as help from '@/api/help' import * as help from '@/api/help'
import Config from '@/core/config' import Config from '@/core/config'
import * as UploadApi from '@/api/upload' import * as UploadApi from '@/api/upload'
export default { export default {
data() { data() {
let img= 'https://www.royaum.com.cn/static/news1/walletBg.png' let img = 'https://www.royaum.com.cn/static/news1/walletBg.png'
return { return {
background: { background: {
background: 'url(' + img + ') center top no-repeat', background: 'url(' + img + ') center top no-repeat',
backgroundSize: '100%', backgroundSize: '100%',
},
list: [{
icon: 'https://www.royaum.com.cn/static/news1/m1.png',
title: '发采购询价单',
subTitle: '填写所需信息一键发布询价'
},
{
icon: 'https://www.royaum.com.cn/static/news1/m2.png',
title: '卖家实时报价',
subTitle: '60分钟获取卖家报价'
},
{
icon: 'https://www.royaum.com.cn/static/news1/m3.png',
title: '卖家上架商品',
subTitle: '采购方案根据需要下单采购'
},
],
form: {
name: '',
intro: '',
type: '',
date: '',
num: '',
startNum: '',
endNum: '',
mianyi: true,
addr: '',
remark: ''
},
typeShow: false,
timeShow: false,
addrshow: false,
type: [{
text: '一件代发'
}],
timeParams: {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false
},
radioList: [{
name: '面议'
},
],
radio: '',
//
imageList: [],
maxImageLength:6,
imgage_ids: []
}
},
methods: {
getAddress(e) {
this.form.addr = e.province.name + e.city.name + e.area.name;
this.address_id = e.province.code
}, },
timeChage(e) { list: [{
this.form.date = e.year + '-' + e.month + '-' + e.day icon: 'https://www.royaum.com.cn/static/news1/m1.png',
title: '发采购询价单',
subTitle: '填写所需信息一键发布询价'
}, },
sureSubmit() { {
// 0000 icon: 'https://www.royaum.com.cn/static/news1/m2.png',
const that = this; title: '卖家实时报价',
that.uploadFile() subTitle: '60分钟获取卖家报价'
if (!that.form.name) {
return that.$toast('请输入商品名称')
}
if (!that.form.intro) {
return that.$toast('请输入商品信息')
}
if (!that.form.type) {
return that.$toast('请选择求购类型')
}
if (!that.form.date) {
return that.$toast('请选择交货日期')
}
if (!that.form.num) {
return that.$toast('请选择求购数量')
}
if (!that.form.startNum) {
return that.$toast('请输入最低价')
}
if (!that.form.endNum) {
return that.$toast('请输入最高价')
}
if (!that.form.mianyi) {
return that.$toast('请选择价格是否面议')
}
if (!that.form.mianyi) {
return that.$toast('请选择价格是否面议')
}
if (!that.form.remark) {
return that.$toast('请填写备注')
}
let params = {
goods_name: that.form.name,
goods_desc: that.form.intro,
type: that.form.type,
deliver_at: that.form.date,
num: that.form.num,
min_price: that.form.startNum,
max_price: that.form.endNum,
is_face: that.form.mianyi,
address_id: that.address_id,
remark: that.form.remark,
...that.imgage_ids
}
help.addGoodsSource(params)
.then(res => {
if (res.status) {
uni.showToast({
title: '发布成功',
icon: 'none',
duration: 2000
})
} else {
uni.showToast({
title: '发布失败',
icon: 'none',
duration: 2000
})
}
})
.finally()
}, },
actionSheetCallback(index) { {
this.form.type = this.type[index].text; icon: 'https://www.royaum.com.cn/static/news1/m3.png',
title: '卖家上架商品',
subTitle: '采购方案根据需要下单采购'
}, },
deleteImage(imageIndex) { ],
this.imageList.splice(imageIndex, 1) form: {
name: '',
intro: '',
type: '',
date: '',
num: '',
startNum: '',
endNum: '',
mianyi: true,
addr: '',
remark: ''
}, },
// typeShow: false,
chooseImage() { timeShow: false,
const app = this addrshow: false,
const oldImageList = app.imageList type: [{
// text: '一件代发'
uni.chooseImage({ }],
count: app.maxImageLength - oldImageList.length, timeParams: {
sizeType: ['original', 'compressed'], // year: true,
sourceType: ['album', 'camera'], // month: true,
success({ day: true,
tempFiles hour: false,
}) { minute: false,
app.imageList = oldImageList.concat(tempFiles) second: false
} },
}); radioList: [{
name: '面议'
}, },
// ],
uploadFile() { radio: '',
const app = this //
imageList: [],
maxImageLength: 6,
imgage_ids: [],
action: '',
header: '',
transferList: []
}
},
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",
}
},
methods: {
//
transferSuccess(list) {
console.log(list)
if (list.length > 0) {
const { const {
imageList response
} = app } = list[0];
// if (response.status == 200) {
return new Promise((resolve, reject) => { uni.showToast({
if (imageList.length > 0) { title: "上传成功"
UploadApi.image(imageList) })
.then(fileIds => { let idList = []
app.imgage_ids = fileIds; list.forEach(item => {
resolve(fileIds) idList.push(item.response.data.fileInfo.file_id)
}) });
.catch(reject) this.imgage_ids = idList.join(',');
}
}
},
transferRemove(file, fileList) {
this.imgage_ids = this.handleRemove(file, fileList);
},
handleRemove: function (file, fileList) {
let idList = []
fileList.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
return idList.join(',')
},
getAddress(e) {
this.form.addr = e.province.name + e.city.name + e.area.name;
this.address_id = e.province.code
},
timeChage(e) {
this.form.date = e.year + '-' + e.month + '-' + e.day
},
sureSubmit() {
//
const that = this;
if (!that.form.name) {
return that.$toast('请输入商品名称')
}
if (!that.form.intro) {
return that.$toast('请输入商品信息')
}
if (!that.form.type) {
return that.$toast('请选择求购类型')
}
if (!that.form.date) {
return that.$toast('请选择交货日期')
}
if (!that.form.num) {
return that.$toast('请选择求购数量')
}
if (!that.form.startNum) {
return that.$toast('请输入最低价')
}
if (!that.form.endNum) {
return that.$toast('请输入最高价')
}
if (!that.form.mianyi) {
return that.$toast('请选择价格是否面议')
}
if (!that.form.mianyi) {
return that.$toast('请选择价格是否面议')
}
if (!that.form.remark) {
return that.$toast('请填写备注')
}
let params = {
goods_name: that.form.name,
goods_desc: that.form.intro,
type: that.form.type,
deliver_at: that.form.date,
num: that.form.num,
min_price: that.form.startNum,
max_price: that.form.endNum,
is_face: that.form.mianyi,
address_id: that.address_id,
remark: that.form.remark,
imgage_ids: that.imgage_ids
}
help.addGoodsSource(params)
.then(res => {
if (res.status) {
uni.showToast({
title: '发布成功',
icon: 'none',
duration: 2000
})
that.transferList = []
that.imgage_ids = []
that.form = that.$options.data().form
} else { } else {
resolve() uni.showToast({
title: '发布失败',
icon: 'none',
duration: 2000
})
} }
}) })
}, .finally()
},
actionSheetCallback(index) {
this.form.type = this.type[index].text;
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page { page {
min-height: 100%; min-height: 100%;
padding-bottom: 100upx; padding-bottom: 100upx;
} }
.huoyuan { .c {
.process { padding-top: 20rpx;
height: 266upx; overflow: hidden;
background: #FFFFFF;
border-radius: 14upx;
opacity: 1;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 30upx;
// padding:0 28upx;
position: relative;
.pItem {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
width: 56upx;
height: auto;
}
.title { .slot-btn {
font-size: 24upx; width: 180rpx;
font-family: PingFang SC, PingFang SC; height: 180rpx;
font-weight: 600; background: #F6F6F6;
color: #2D2D2D; border-radius: 10rpx;
margin: 16upx 0; border: 1px solid #C0C0C0;
} text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #6D6D6D;
.subTitle { .l {
font-size: 24upx; line-height: 30rpx;
font-family: PingFang SC, PingFang SC; }
font-weight: 400;
color: #8A8A8A;
width: 75%;
text-align: center;
} image {
} width: 50rpx;
height: 50rpx;
display: block;
margin: 0 auto;
margin-top: 30rpx;
} }
}
}
.self-form {
::v-deep .u-form-item {
border: none !important;
;
}
}
.realAddr {
::v-deep .u-input {
padding: 10rpx 22upx !important;
background: #F7F8FA;
}
.formContent { }
margin: 0 30upx;
background-color: #fff;
border-radius: 14upx;
margin-top: 20upx;
padding: 0 38upx;
padding-bottom: 64upx;
::v-deep .u-form-item--left { .huoyuan {
align-items: flex-start; .process {
height: 266upx;
background: #FFFFFF;
border-radius: 14upx;
opacity: 1;
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 30upx;
// padding:0 28upx;
position: relative;
.pItem {
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image {
width: 56upx;
height: auto;
} }
::v-deep .u-form-item--left__content__label { .title {
font-size: 24upx;
font-family: PingFang SC, PingFang SC;
font-weight: 600;
color: #2D2D2D; color: #2D2D2D;
font-size: 28upx; margin: 16upx 0;
} }
.qujian { .subTitle {
width: 100%; font-size: 24upx;
display: flex; font-family: PingFang SC, PingFang SC;
align-items: center; font-weight: 400;
color: #8A8A8A;
width: 75%;
text-align: center;
} }
} }
} }
.remarkInput { .formContent {
width: 100%; margin: 0 30upx;
height: 246upx; background-color: #fff;
background: #F7F8FA; border-radius: 14upx;
border-radius: 3px 3px 3px 3px; margin-top: 20upx;
opacity: 1; padding: 0 38upx;
padding: 20upx !important; padding-bottom: 135upx;
::v-deep .u-form-item--left {
align-items: flex-start;
}
::v-deep .u-form-item--left__content__label {
color: #2D2D2D;
font-size: 28upx;
}
.qujian {
width: 100%;
display: flex;
align-items: center;
margin-bottom: 30rpx;
}
} }
}
.submitBtn { .remarkInput {
height: 88upx; // width: 100%;
margin: 64upx 0; // height: 246upx;
margin-bottom: 0; background: green;
line-height: 88upx; border-radius: 3px;
// background: #FFAAA4; padding: 20upx !important;
background: #FE483B; }
border-radius: 36px 36px 36px 36px;
opacity: 1; .submitBtn-box {
font-size: 28upx; position: fixed;
width: 100%;
left: 0;
bottom: 0;
padding: 30rpx 34rpx;
z-index: 88;
background: #fff;
}
.submitBtn {
height: 88upx;
line-height: 88upx;
// background: #FFAAA4;
background: #FE483B;
border-radius: 36px;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
text-align: center;
}
.navBarContent {
height: 88upx;
line-height: 88upx;
text-align: center;
position: relative;
text {
font-size: 32upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
text-align: center;
} }
.navBarContent { }
height: 88upx;
line-height: 88upx;
text-align: center;
position: relative;
text { .bgImg {
font-size: 32upx; width: 100%;
font-family: PingFang SC, PingFang SC; }
font-weight: 500;
color: #FFFFFF;
}
} .file_img {
overflow: hidden;
position: relative;
.bgImg { image {
width: 100%; width: 80px;
height: 80px;
margin-right: 10rpx;
} }
.photo { .image-delete {
position: absolute;
top: -10rpx;
right: -10rpx;
height: 42rpx;
width: 42rpx;
background: rgba(0, 0, 0, 0.64);
border-radius: 50%;
color: #fff;
font-weight: bolder;
font-size: 22rpx;
z-index: 10;
display: flex; display: flex;
justify-content: flex-start; justify-content: center;
padding: 20rpx 0; align-items: center;
overflow: hidden;
.slot-btn {
width: 80px;
height: 80px;
background: #FFFFFF;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 24rpx;
font-weight: 500;
color: #D1D1D1;
image {
width: 50rpx;
height: 50rpx;
margin-top: 20rpx;
}
}
}
.file_img {
overflow: hidden;
position: relative;
image {
width: 80px;
height: 80px;
margin-right: 10rpx;
}
.image-delete {
position: absolute;
top: -10rpx;
right: -10rpx;
height: 42rpx;
width: 42rpx;
background: rgba(0, 0, 0, 0.64);
border-radius: 50%;
color: #fff;
font-weight: bolder;
font-size: 22rpx;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
}
} }
}
</style> </style>

@ -30,12 +30,7 @@
<view class="name-text"> <view class="name-text">
手机号 手机号
</view> </view>
<input type="number" v-model="info.mobile" placeholder="请输入手机号"> <text>{{ info.mobile }}</text>
<!-- <view>
<text>{{ info.mobile }}</text>
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon>
</view> -->
</view> </view>
</view> </view>
<view class="box"> <view class="box">
@ -45,21 +40,21 @@
</view> </view>
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> <u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon>
</view> </view>
<view class="box-avter conten-height"> <view class="box-avter conten-height" @click="toTextPage(1)">
<view class="name-text"> <view class="name-text">
清除缓存 用户服务协议
</view> </view>
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> <u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon>
</view> </view>
<view class="box-avter conten-height"> <view class="box-avter conten-height" @click="toTextPage(2)">
<view class="name-text"> <view class="name-text">
隐私 隐私政策
</view> </view>
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> <u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon>
</view> </view>
<view class="box-avter conten-height"> <view class="box-avter conten-height" @click="toTextPage(3)">
<view class="name-text"> <view class="name-text">
关于 关于我们
</view> </view>
<u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon> <u-icon style="margin-left: 5rpx; color: #8A8A8A" name="arrow-right"></u-icon>
</view> </view>
@ -74,7 +69,7 @@
<view class="bottomBtn"> <view class="bottomBtn">
<button class="submitBtn" @click="sureSubmit">确认修改</button> <button class="submitBtn" @click="sureSubmit">确认修改</button>
</view> </view>
</view> </view>
</template> </template>
@ -178,6 +173,8 @@ export default {
if (o.confirm) { if (o.confirm) {
uni.removeStorage('token'); uni.removeStorage('token');
uni.removeStorage('userInfo'); uni.removeStorage('userInfo');
uni.clearStorageSync()
uni.clearStorage()
uni.reLaunch({ uni.reLaunch({
url: '/pages/login/index' url: '/pages/login/index'
}) })
@ -185,9 +182,14 @@ export default {
} }
}); });
}, },
toTextPage(n) {
uni.navigateTo({
url: "/pages/news1/text?pageFlag=" + n
})
},
bindPickerInvoice() { bindPickerInvoice() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/index" url: "/pages/invoice/indexset"
}) })
}, },
bindPickerChange(e) { bindPickerChange(e) {
@ -219,7 +221,7 @@ page {
height: 28rpx; height: 28rpx;
} }
.box-avter { .box-avter {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -254,21 +256,23 @@ page {
height: 114rpx; height: 114rpx;
border-radius: 50%; border-radius: 50%;
} }
.bottomBtn{
.bottomBtn {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
height: 140upx; height: 140upx;
z-index: 88; z-index: 88;
background: #fff; background: #fafafa;
} }
.submitBtn {
height: 88upx; .submitBtn {
height: 88upx;
line-height: 88upx; line-height: 88upx;
background: #FFAAA4; background: #FFAAA4;
background: #FE483B; background: #FE483B;
border-radius: 36px; border-radius: 36px;
font-size: 28upx; font-size: 28upx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;

@ -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