删除商品 查询商品一键上传页面逻辑处理

version/0412
fanfan 1 year ago
parent 13f0581736
commit e07618f8a4
  1. 4
      api/address.js
  2. 1
      pages/invoice/index.vue
  3. 12
      pages/news/goods/batchdel.vue
  4. 434
      pages/news/goods/classify.vue
  5. 120
      pages/news/goods/list.vue
  6. 505
      pages/news/goods/oneGrounding.vue
  7. 139
      pages/news/park/addressEdit.vue
  8. 66
      pages/news1/MerchantSettlement.vue
  9. 233
      pages/news1/feedback.vue
  10. 4
      pages/news1/setting.vue
  11. 25
      pages/news3/ManualEntry.vue

@ -51,3 +51,7 @@ export const remove = (addressId) => {
export const analysis = (content) => { export const analysis = (content) => {
return request.get(api.analysis, { content }) return request.get(api.analysis, { content })
} }
// 省市区
export const province = (param) => {
return request.get('region/tree', param)
}

@ -29,7 +29,6 @@
<view class="invoice-fd" @click="onAddInvoice"> <view class="invoice-fd" @click="onAddInvoice">
<text>+</text>添加发票抬头 <text>+</text>添加发票抬头
</view> </view>
<view v-if="!invoicList.length">暂无相关信息</view>
</view> </view>
</template> </template>

@ -117,6 +117,14 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .u-input,
::v-deep .u-content {
background-color: #fff !important;
}
::v-deep .u-search {
width: 640rpx !important;
}
.goods{ .goods{
padding: 0 0 130rpx; padding: 0 0 130rpx;
overflow: hidden; overflow: hidden;
@ -153,7 +161,7 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
background: #F3F3F3; background: #fff;
border-radius: 60rpx; border-radius: 60rpx;
image{ image{
width: 28rpx; width: 28rpx;
@ -239,7 +247,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 10rpx; margin-top: 20rpx;
.price{ .price{
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;

@ -2,109 +2,220 @@
<view class="goods"> <view class="goods">
<view class="goods-hd"> <view class="goods-hd">
<view class="item"> <view class="item">
<view class="a">分类名称</view> <view class="a">商品名称<text>*</text></view>
<view class="b" @click="openPage(1)"> <view class="b">
<view class="select">请选择分类名称<u-icon name="arrow-right"></u-icon></view> <input type="text" v-model="form.goods_name" placeholder="请输入商品名称" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">商品分类</view> <view class="a">商品分类<text>*</text></view>
<view class="b"> <view class="b" style="width: 350rpx;height: 40rpx;text-align: right;" >
<view class="select select-on">顶级分类</view> <picker @change="changeMode" mode="selector" placeholder="请选择分类" style="width: 350rpx;height: 40rpx;" range-key="text" :value="index" :range="modeList">
{{form.goods_class}}</picker>
</view> </view>
</view> </view>
<view class="items"> <view class="itemImg">
<view class="a">分类照片<text>*</text></view> <view class="a">分类照片<text>*</text></view>
<view class="c"> <view class="c">
<u-upload :action="action" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="8"> <u-upload :action="action" :header="header" @on-uploaded="success" width="180" height="180"
:file-list="fileList" :custom-btn="true" max-count="6">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view> <view class="1">上传图片</view>
<view class="l">1/8</view>
</view> </view>
</template> </template>
</u-upload> </u-upload>
</view> </view>
</view> </view>
<view class="items"> <view class="item-status">
<view class="a" style="justify-content: space-between;">状态<u-switch v-model="checked" active-color="#55BD6A" ></u-switch></view> <view class="item" style="border: none;padding-top: 0;">
<view class="a">状态</view>
<view class="b"> <view class="b">
<u-switch v-model="form.checked" active-color="#55BD6A"></u-switch>
</view>
</view>
<view class="c">
用户端是否显示 用户端是否显示
</view> </view>
</view> </view>
<view class="items"> <view class="item">
<view class="a">排序<text>*</text><view class="input"><input type="text" placeholder="数字越小越靠前"/></view></view> <view class="a">排序<text>*</text></view>
<view class="d">1</view> <view class="b">
<input type="number" v-model="form.goods_sort" placeholder="请输入排序" />
</view>
</view> </view>
</view> </view>
<view class="goods-fd"> <view class="goods-fd">
<view class="btn">确认</view> <view class="btn" @click="onSubmit">确认</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import Config from '@/core/config'
export default { export default {
data() { data() {
return { return {
fileList: [ fileList: [],
{ form: {
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg', image_id: [],
} goods_type: '',
], goods_class: '',
isShow: false,
checked: false, checked: false,
goods_sort: '',
goods_name:'',
},
modeList: [{
text: '店内现货',
id: 0,
}, {
text: '仓库发货',
id: 1,
}],
value: "", value: "",
popupType: 1, action: '',
tabLIndex: 0, header: '',
tabRIndex: 0,
tabMIndex: 0,
tabMIndex1: 0
}; };
}, },
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: { methods: {
openPage(i){ //
if(i<= 3){ async onSubmit() {
this.isShow = true; const that = this;
this.popupType=i if (!that.form.goods_name) {
}else if(i == 4){ return that.$toast('请输入商品名称')
uni.navigateTo({ }
url: "/pages/news/goods/classification" if (!that.form.goods_class) {
return that.$toast('请选择商品分类')
}
if (!that.form.image_id) {
return that.$toast('请上传分类图片')
}
if (!that.form.goods_sort) {
return that.$toast('请输入商品排序')
}
let {
status,
message,
data
} = await newFunApi.addTransfer(that.form);
if (status == 200) {
uni.showToast({
title: "录入成功"
}) })
setTimeout(function() {
uni.$emit('refreshData');
uni.navigateBack({
delta: 1
})
}, 2000);
} }
}, },
tabLItem(i){ //
this.tabLIndex = i changeMode(e) {
console.log(this.tabLIndex) this.form.goods_class = this.modeList[e.detail.value].text;
}, this.form.goods_type = this.modeList[e.detail.value].id;
tabRItem(i){
this.tabRIndex = i
console.log(this.tabRIndex)
}, },
tabMItem(i){ //
this.tabMIndex = i success(list) {
console.log(this.tabMIndex) if (list.length > 0) {
}, const {
tabMItem1(i){ response
this.tabMIndex1 = i } = list[0];
console.log(this.tabMIndex1) if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
let idList = []
list.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
this.form.image_id = idList.join(',');
}
}
}, },
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.goods{ .goods {
padding: 0 0 130rpx; padding: 0 0 20rpx;
overflow: hidden; overflow: hidden;
&-hd{
.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;
}
image {
width: 50rpx;
height: 50rpx;
display: block;
margin: 0 auto;
margin-top: 30rpx;
}
}
}
&-hd {
margin-top: 12rpx;
background-color: #fff; background-color: #fff;
padding: 0 25rpx 0; padding: 0 36rpx 0;
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx;
.item{ .itemImg {
padding: 20rpx 30rpx; padding: 25rpx 10rpx;
border-bottom: 1px solid #F7F7F7;
text {
color: #F34A40;
margin-left: 5rpx;
}
}
.item-status {
padding: 25rpx 10rpx;
border-bottom: 1px solid #F7F7F7;
.c {
font-family: PingFang SC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #C7C7C7;
line-height: 28rpx;
text-align: left;
font-style: normal;
text-transform: none;
}
}
.item {
padding: 25rpx 10rpx;
line-height: 50rpx; line-height: 50rpx;
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
@ -112,20 +223,22 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #F7F7F7; border-bottom: 1px solid #F7F7F7;
.a{
text{ .a {
text {
color: #F34A40; color: #F34A40;
margin-left: 5rpx; margin-left: 5rpx;
} }
} }
.b{
.b {
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end;
flex: 1; input {
input{
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
flex: 1; flex: 1;
@ -135,71 +248,44 @@
text-align: right; text-align: right;
margin-right: 10rpx; margin-right: 10rpx;
} }
.select{
width: 100%; .select {
display: flex;
align-items: center;
color: #C7C7C7; color: #C7C7C7;
justify-content: flex-end;
&-on{ &-on {
color: #212121; color: #212121;
} }
} }
} }
} }
.items{ }
padding: 20rpx 30rpx;
line-height: 50rpx; &-bd {
font-size: 28rpx; background-color: #fff;
color: #212121; padding: 60rpx;
border-bottom: 1px solid #F7F7F7; overflow: hidden;
position: relative;
.a{ .l {
flex: 1; height: 260rpx;
display: flex; display: flex;
align-items: center; align-items: center;
input{ justify-content: center;
flex: 1;
font-size: 26rpx; .a {
color: #212121; height: 100%;
line-height: 50rpx; width: 100rpx;
margin-left: 20rpx; display: flex;
} align-items: center;
text{ justify-content: center;
color: #F34A40;
margin-left: 5rpx;
}
.select{
flex: 1;
}
.tip{
margin-left: 15rpx;
font-size: 24rpx;
font-weight: 500;
color: #9F9F9F;
}
}
.b{
padding-top: 10rpx;
font-size: 24rpx;
font-weight: 400;
color: #C7C7C7;
}
.d{
position: absolute;
right: 20rpx;
top: 20rpx;
z-index: 2;
font-size: 28rpx;
font-weight: 400;
color: #212121;
} }
.c{
padding-top: 20rpx; .b {
overflow: hidden; width: 260rpx;
.slot-btn{ height: 260rpx;
width: 180rpx;
height: 180rpx; .slot-btn {
width: 260rpx;
height: 260rpx;
background: #F6F6F6; background: #F6F6F6;
border-radius: 10rpx; border-radius: 10rpx;
border: 1px solid #C0C0C0; border: 1px solid #C0C0C0;
@ -207,31 +293,36 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #6D6D6D; color: #6D6D6D;
.l{
line-height: 30rpx; image {
}
image{
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
display: block; margin-top: 80rpx;
margin: 0 auto; margin-bottom: 20rpx;
margin-top: 30rpx;
} }
} }
} }
} }
.t {
text-align: center;
margin-top: 20rpx;
font-size: 32rpx;
font-weight: 400;
color: #2D2D2D;
}
} }
&-fd{
&-fd {
width: 100%; width: 100%;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
padding: 30rpx; padding: 30rpx;
z-index: 99;
background-color: #fafafa; background-color: #fafafa;
box-sizing: border-box; box-sizing: border-box;
.btn{
.btn {
width: 630rpx; width: 630rpx;
line-height: 88rpx; line-height: 88rpx;
background: #F34A40; background: #F34A40;
@ -240,95 +331,8 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #FFFFFF; color: #FFFFFF;
} margin: auto;
}
&-classify{
width: 100%;
overflow: hidden;
&-hd{
padding: 30rpx 60rpx;
position: relative;
font-size: 32rpx;
font-weight: 500;
color: #303030;
text-align: center;
.a{
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 500;
color: #FF624F;
position: absolute;
top: 30rpx;
left: 40rpx;
z-index: 2;
}
}
&-bd{
overflow: hidden;
display: flex;
align-items: flex-start;
.l{
width: 210rpx;
height: 560rpx;
background-color: #F7F8FA;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 30rpx;
box-sizing: border-box;
&-on{
background-color: #fff;
font-weight: 500;
}
}
}
.m{
width: 100%;
text-align: center;
max-height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
&-on{
color: #FF624F;
}
}
}
.r{
width: 540rpx;
height: 560rpx;
.item{
text-overflow: ellipsis;
overflow: hidden;
height: 70rpx;
font-size: 28rpx;
font-weight: 400;
color: #303030;
white-space: nowrap;
line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box;
&-on{
color: #FF624F;
}
}
} }
} }
} }
}
</style> </style>

@ -2,9 +2,8 @@
<view class="goods"> <view class="goods">
<view class="search"> <view class="search">
<view class="box"> <view class="box">
<!-- <image src="/static/news/icon-search.png" @click="getList()"></image> <u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="商品名称/编码"
<input v-model="keyword" type="search" placeholder="商品名称/编码" /> --> v-model="keyword"></u-search>
<u-search height="50" @search="getListAfter" @custom="getListAfter" placeholder="商品名称/编码" v-model="keyword"></u-search>
</view> </view>
</view> </view>
<view class="goods-bd"> <view class="goods-bd">
@ -50,13 +49,13 @@
this.getList(); this.getList();
}, },
onReachBottom() { onReachBottom() {
if(this.list.length <= this.total){ if (this.list.length <= this.total) {
this.pageNum ++; this.pageNum++;
this.getList(); this.getList();
} }
}, },
methods: { methods: {
getListAfter(){ getListAfter() {
this.list = []; this.list = [];
this.getList() this.getList()
}, },
@ -65,15 +64,19 @@
*/ */
async getList() { async getList() {
uni.showLoading({ uni.showLoading({
title:"加载中" title: "加载中"
}) })
let {status, message, data} = await newFunApi.storeKeeperList({ let {
status,
message,
data
} = await newFunApi.storeKeeperList({
goodsNo: "", goodsNo: "",
page: this.pageNum, page: this.pageNum,
listType: "all", listType: "all",
goodsName: this.keyword goodsName: this.keyword
}); });
if(status == 200){ if (status == 200) {
uni.hideLoading(); uni.hideLoading();
this.list = this.list.concat(data.list.data) this.list = this.list.concat(data.list.data)
this.total = data.list.total this.total = data.list.total
@ -84,10 +87,20 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.goods{ ::v-deep .u-input,
::v-deep .u-content {
background-color: #fff !important;
}
::v-deep .u-search {
width: 640rpx !important;
}
.goods {
padding: 0 0 130rpx; padding: 0 0 130rpx;
overflow: hidden; overflow: hidden;
&-fd{
&-fd {
width: 100%; width: 100%;
padding: 20rpx; padding: 20rpx;
overflow: hidden; overflow: hidden;
@ -100,30 +113,35 @@
bottom: 0; bottom: 0;
z-index: 999; z-index: 999;
background-color: #fff; background-color: #fff;
.a{
.a {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #313131; color: #313131;
display: flex; display: flex;
align-items: center; align-items: center;
image{
image {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.b{
text{ .b {
text {
color: #ED2B00; color: #ED2B00;
padding: 0 10rpx; padding: 0 10rpx;
} }
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #A2A2A2; color: #A2A2A2;
margin-right: 20rpx; margin-right: 20rpx;
} }
.c{
.c {
width: 408rpx; width: 408rpx;
line-height: 80rpx; line-height: 80rpx;
background: #FF564A; background: #FF564A;
@ -134,43 +152,52 @@
color: #FFFFFF; color: #FFFFFF;
} }
} }
.search{
.search {
width: 750rpx; width: 750rpx;
padding: 35rpx; padding: 35rpx;
box-sizing: border-box; box-sizing: border-box;
.box{
.box {
padding: 15rpx 25rpx; padding: 15rpx 25rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
background: #F3F3F3; background: #fff;
border-radius: 60rpx; border-radius: 60rpx;
image{ justify-content: space-between;
image {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-right: 22rpx; margin-right: 22rpx;
} }
input{
input {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
line-height: 30rpx; line-height: 30rpx;
} }
} }
} }
&-bd{
&-bd {
padding: 0 30rpx; padding: 0 30rpx;
overflow: hidden; overflow: hidden;
.a{
.a {
padding: 15rpx 0; padding: 15rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.status{
.status {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #B6B6B6; color: #B6B6B6;
} }
.btn{
.btn {
width: 148rpx; width: 148rpx;
line-height: 64rpx; line-height: 64rpx;
background: #FFFFFF; background: #FFFFFF;
@ -182,44 +209,53 @@
color: #F55349; color: #F55349;
} }
} }
.li{
.li {
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
padding: 0 30rpx; padding: 0 30rpx;
margin-top: 15rpx; margin-top: 15rpx;
&:first-child{
&:first-child {
margin-top: 0; margin-top: 0;
} }
.item{
.item {
padding: 20rpx 0; padding: 20rpx 0;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #EFEFEF; border-bottom: 1px solid #EFEFEF;
.select{
.select {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-right: 20rpx; margin-right: 20rpx;
image{
image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.pic{
.pic {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
margin-right: 20rpx; margin-right: 20rpx;
image{
image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.info{
.info {
flex: 1; flex: 1;
max-width: 400rpx; max-width: 400rpx;
margin-right: 20rpx; margin-right: 20rpx;
.title{
.title {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
@ -227,24 +263,28 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.sku{
.sku {
line-height: 48rpx; line-height: 48rpx;
margin-top: 10rpx; margin-top: 10rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #7C7C7C; color: #7C7C7C;
} }
.fd{
.fd {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 10rpx; margin-top: 20rpx;
.price{
.price {
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 400;
color: #ED2B00; color: #ED2B00;
} }
.kc{
.kc {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #B6B6B6; color: #B6B6B6;
@ -254,5 +294,5 @@
} }
} }
} }
} }
</style> </style>

@ -1,29 +1,33 @@
<template> <template>
<view class="goods"> <view class="goods">
<view class="goods-top"> <!-- <view class="goods-top">
<input type="text" placeholder="输入SKU直接导入获取商品信息"/> <input type="textarea" v-model="content" placeholder="输入SKU直接导入获取商品信息" />
<view class="btn">一键获取</view> <view class="btn" :style="{'opacity': content?1:0.6 }" @click="onClickAccess">一键获取</view>
</view> </view> -->
<view class="goods-hd"> <view class="goods-hd">
<view class="item"> <view class="item">
<view class="a">商品名称<text>*</text></view> <view class="a">商品名称<text>*</text></view>
<view class="b"> <view class="b">
<input type="text" placeholder="请输入商品价格,最低0.1元" /> <input type="text" v-model="from.goods_name" placeholder="请输入商品价格,最低0.1元" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">商品分类</view> <view class="a">商品分类</view>
<view class="b" @click="openPage(1)"> <view class="b" @click="openPage(1)">
<view class="select">请选择商品分类<u-icon name="arrow-right"></u-icon></view> <view class="select">请选择商品分类<u-icon name="arrow-right"></u-icon>
</view>
</view> </view>
</view> </view>
<view class="items"> <view class="items">
<view class="a">商品照片<text>*</text><view class="tip">最多上传100张</view></view> <view class="a">商品照片<text>*</text>
<view class="tip">最多上传100张</view>
</view>
<view class="c"> <view class="c">
<u-upload :action="action" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="5"> <u-upload :action="action" :header="header" @on-uploaded="goosSuccess" @on-remove="goodsRemove"
width="180" height="180" :file-list="goodsImageList" :custom-btn="true" max-count="100">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view> <view class="1">上传图片</view>
</view> </view>
</template> </template>
@ -31,12 +35,17 @@
</view> </view>
</view> </view>
<view class="items"> <view class="items">
<view class="a">商品详情<text>*</text><view class="input"><input type="text" placeholder="可输入商品的详细描述"/></view></view> <view class="a" style="align-items: flex-start">商品详情<text>*</text>
<view class="input">
<textarea placeholder="可输入商品的详细描述" v-model="from.goods_details" class="t"></textarea>
</view>
</view>
<view class="c"> <view class="c">
<u-upload :action="action" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="5"> <u-upload :action="action" :header="header" @on-uploaded="detailSuccess" @on-remove="detailsRemove"
width="180" height="180" :file-list="goodsDetailImageList" :custom-btn="true" max-count="6">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view> <view class="1">上传图片</view>
</view> </view>
</template> </template>
@ -46,10 +55,11 @@
<view class="items"> <view class="items">
<view class="a">商品素材<text>*</text></view> <view class="a">商品素材<text>*</text></view>
<view class="c"> <view class="c">
<u-upload :action="action" width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="5"> <u-upload :action="action" :header="header" @on-uploaded="sourceSuccess" @on-remove="sourceRemove"
width="180" height="180" :file-list="goodSourceImageList" :custom-btn="true" max-count="6">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view> <view class="1">上传图片</view>
</view> </view>
</template> </template>
@ -59,7 +69,9 @@
</view> </view>
<view class="goods-hd"> <view class="goods-hd">
<view class="items"> <view class="items">
<view class="a" style="justify-content: space-between;">多规格<u-switch v-model="checked" active-color="#55BD6A" ></u-switch></view> <view class="a" style="justify-content: space-between;">多规格<u-switch v-model="skuchecked"
active-color="#55BD6A"></u-switch>
</view>
<view class="b"> <view class="b">
最多添加3个商品规格组生成SKU数量不能超出50个 最多添加3个商品规格组生成SKU数量不能超出50个
</view> </view>
@ -67,89 +79,111 @@
<view class="item"> <view class="item">
<view class="a">商品价格<text>*</text></view> <view class="a">商品价格<text>*</text></view>
<view class="b"> <view class="b">
<input type="text" placeholder="请输入商品价格,最低0.1元" /> <input type="text" @input="keyGoodsPrice" v-model="from.goods_price"
placeholder="请输入商品价格,最低0.1元" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">商品原价</view> <view class="a">商品原价</view>
<view class="b"> <view class="b">
<input type="text" placeholder="请输入商品划线价格" /> <input type="text" @input="keyOriginalPrice" v-model="from.goods_original_price"
placeholder="请输入商品划线价格" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">商品库存<text>*</text></view> <view class="a">商品库存<text>*</text></view>
<view class="b"> <view class="b">
<input type="number" placeholder="请输入商品库存" /> <input type="number" v-model="from.goods_stock" placeholder="请输入商品库存" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">商品重量<text>*</text></view> <view class="a">商品重量<text>*</text></view>
<view class="b"> <view class="b">
<input type="text" placeholder="请输入商品重量" />kg <input type="text" v-model="from.goods_weight" placeholder="请输入商品重量" />kg
</view> </view>
</view> </view>
</view> </view>
<view class="goods-hd"> <view class="goods-hd">
<view class="item"> <view class="item">
<view class="a">配送方式<text>*</text></view> <view class="a">配送方式<text>*</text></view>
<view class="b" @click="openPage(2)"> <view class="b" style="width: 350rpx;height: 40rpx;text-align: right;">
<view class="select">请选择配送方式<u-icon name="arrow-right"></u-icon></view> <picker @change="changeDelivery" mode="selector" placeholder="请选择配送方式"
style="width: 350rpx;height: 40rpx;" range-key="text" :value="index" :range="deliveryList">
<text :style="{color: from.delivery_name? '#303030' : '#C7C7C7'}">
{{from.delivery_name?from.delivery_name:'请选择配送方式'}}</text>
<u-icon name="arrow-right" color="#C7C7C7"></u-icon>
</picker>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">运费模版<text>*</text></view> <view class="a">运费模版<text>*</text></view>
<view class="b" @click="openPage(3)"> <view class="b" style="width: 350rpx;height: 40rpx;text-align: right;">
<view class="select">全国包邮除偏远地区<u-icon name="arrow-right"></u-icon></view> <picker @change="changeDeliveryTemplate" mode="selector" placeholder="请选择运费模版"
style="width: 350rpx;height: 40rpx;" range-key="text" :value="index" :range="deliveryTemplate">
<text :style="{color: from.template_name? '#303030' : '#C7C7C7'}">
{{from.template_name?from.template_name:'请选择运费模版'}}</text>
<u-icon name="arrow-right" color="#C7C7C7"></u-icon>
</picker>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="a">销售状态<text>*</text></view> <view class="a">销售状态<text>*</text></view>
<view class="b"> <view class="b">
<u-switch v-model="checked" active-color="#F34A40" ></u-switch> <u-switch v-model="salesChecked" active-color="#F34A40"></u-switch>
</view> </view>
</view> </view>
</view> </view>
<view class="goods-fd"> <view class="goods-fd">
<view class="btn">确认</view> <view class="btn" @click="onSubmit">确认</view>
</view> </view>
<u-popup v-model="isShow" mode="bottom" border-radius="12" mask-close-able="false" closeable> <u-popup v-model="isShow" mode="bottom" border-radius="12" mask-close-able="false" closeable>
<view class="goods-classify" v-if="popupType == 1"> <view class="goods-classify">
<view class="goods-classify-hd"> <view class="goods-classify-hd">
<view class="a" @click="openPage(4)"><u-icon name="plus"></u-icon></view> <view class="a" @click="openPage(2)">
<u-icon name="plus"></u-icon>
</view>
商品分类 商品分类
</view> </view>
<view class="goods-classify-bd"> <view class="goods-classify-bd">
<scroll-view scroll-y class="l"> <scroll-view scroll-y class="l">
<view class="item" @click="tabLItem(0)"><view :class="tabLIndex == 0?'item-on':''">数码</view></view> <view class="item" @click="tabLItem(0)">
<view class="item" @click="tabLItem(1)"><view :class="tabLIndex == 0?'item-on':''">食品</view></view> <view :class="tabLIndex == 0?'item-on':''">数码</view>
<view class="item" @click="tabLItem(2)"><view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view></view>
<view class="item" @click="tabLItem(3)"><view :class="tabLIndex == 0?'item-on':''">家居百货</view></view>
<view class="item" @click="tabLItem(4)"><view :class="tabLIndex == 0?'item-on':''">美妆/个户</view></view>
<view class="item" @click="tabLItem(5)"><view :class="tabLIndex == 0?'item-on':''">家居百货</view></view>
<view class="item" @click="tabLItem(6)"><view :class="tabLIndex == 0?'item-on':''">美妆/个户</view></view>
<view class="item" @click="tabLItem(7)"><view :class="tabLIndex == 0?'item-on':''">食品</view></view>
<view class="item" @click="tabLItem(8)"><view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view></view>
<view class="item" @click="tabLItem(9)"><view :class="tabLIndex == 0?'item-on':''">家居百货</view></view>
<view class="item" @click="tabLItem(10)"><view :class="tabLIndex == 0?'item-on':''">美妆/个户</view></view>
</scroll-view>
<scroll-view scroll-y class="r">
<view class="item" v-for="(a,i) in 10" @click="tabRItem(i)"><view :class="tabRIndex == i?'item-on':''">水产肉类/新鲜水果</view></view>
</scroll-view>
</view> </view>
<view class="item" @click="tabLItem(1)">
<view :class="tabLIndex == 0?'item-on':''">食品</view>
</view> </view>
<view class="goods-classify" v-if="popupType == 2"> <view class="item" @click="tabLItem(2)">
<view class="goods-classify-hd">配送方式</view> <view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view>
<view class="goods-classify-bd">
<scroll-view scroll-y class="m">
<view class="item" v-for="(a,i) in 10" @click="tabMItem(i)"><view :class="tabMIndex == i?'item-on':''">物流</view></view>
</scroll-view>
</view> </view>
<view class="item" @click="tabLItem(3)">
<view :class="tabLIndex == 0?'item-on':''">家居百货</view>
</view>
<view class="item" @click="tabLItem(4)">
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view>
</view>
<view class="item" @click="tabLItem(5)">
<view :class="tabLIndex == 0?'item-on':''">家居百货</view>
</view>
<view class="item" @click="tabLItem(6)">
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view>
</view>
<view class="item" @click="tabLItem(7)">
<view :class="tabLIndex == 0?'item-on':''">食品</view>
</view>
<view class="item" @click="tabLItem(8)">
<view :class="tabLIndex == 0?'item-on':''">服饰鞋包</view>
</view>
<view class="item" @click="tabLItem(9)">
<view :class="tabLIndex == 0?'item-on':''">家居百货</view>
</view>
<view class="item" @click="tabLItem(10)">
<view :class="tabLIndex == 0?'item-on':''">美妆/个户</view>
</view>
</scroll-view>
<scroll-view scroll-y class="r">
<view class="item" v-for="(a,i) in 10" @click="tabRItem(i)">
<view :class="tabRIndex == i?'item-on':''">水产肉类/新鲜水果</view>
</view> </view>
<view class="goods-classify" v-if="popupType == 3">
<view class="goods-classify-hd">运费模板</view>
<view class="goods-classify-bd">
<scroll-view scroll-y class="m">
<view class="item" v-for="(a,i) in 2" @click="tabMItem1(i)"><view :class="tabMIndex1 == i?'item-on':''">物流</view></view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
@ -158,74 +192,244 @@
</template> </template>
<script> <script>
import Config from '@/core/config'
import * as newFunApi from '@/api/newFun'
export default { export default {
data() { data() {
return { return {
fileList: [ from: {
{ goods_name: '',
url: 'http://pics.sc.chinaz.com/files/pic/pic9/201912/hpic1886.jpg', goods_class: '',
} goods_image_id: '',
], details_image_id: '',
source_image_id: '',
goods_details: '',
goods_price: '',
goods_original_price: '',
goods_stock: '',
goods_weight: '',
delivery_id: '',
delivery_name: '',
template_name: '',
template_id: '',
},
content: '',
skuchecked: false,
salesChecked: false,
goodSourceImageList: [],
goodsDetailImageList: [],
goodsImageList: [],
deliveryTemplate: [{
text: '南京市',
id: 0
}, {
text: '西藏',
id: 1
}],
deliveryList: [{
text: '物流',
id: 0
}, {
text: '送货上门',
id: 1
}],
isShow: false, isShow: false,
checked: false,
value: "", value: "",
popupType: 1,
tabLIndex: 0, tabLIndex: 0,
tabRIndex: 0, tabRIndex: 0,
tabMIndex: 0, action: '',
tabMIndex1: 0 header: '',
}; };
}, },
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: { methods: {
openPage(i){ //
if(i<= 3){ async onSubmit() {
const that = this;
console.log(that.from)
return
if (!that.from.goods_name) {
return that.$toast('请输入商品名称')
}
let {
status,
message,
data
} = await newFunApi.addTransfer(that.form);
if (status == 200) {
uni.showToast({
title: "上架成功"
})
setTimeout(function() {
uni.$emit('refreshData');
uni.navigateBack({
delta: 1
})
}, 2000);
}
},
//
keyOriginalPrice(e) {
if (Number(e.detail.value) == 0 || Number(e.detail.value) < 0) {
this.from.goods_original_price = ''
return this.$toast('商品价不能低于0.1元')
}
this.from.goods_original_price = this.blurAmount(e.detail.value)
},
//
keyGoodsPrice(e) {
if (Number(e.detail.value) == 0 || Number(e.detail.value) < 0) {
this.from.goods_price = ''
return this.$toast('商品价不能低于0.1元')
}
this.from.goods_price = this.blurAmount(e.detail.value)
},
//
blurAmount(amount) {
let num = null
num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1')
const startPoint = /^\./g
if (startPoint.test(num)) {
num = amount.replace(startPoint, '0.')
}
if (num && !num.includes('.') && num !== '0') {
num = +num
}
const morePoint = /\.+(\d*|\.+)\./g
if (morePoint.test(num)) {
num = amount
.replace(/\.{2,}/g, ".")
.replace(".", "$#$")
.replace(/\./g, "")
.replace("$#$", ".")
}
return num
},
//
changeDelivery(e) {
this.from.delivery_name = this.deliveryList[e.detail.value].text;
this.from.delivery_id = this.deliveryList[e.detail.value].id;
},
//
changeDeliveryTemplate(e) {
this.from.template_name = this.deliveryTemplate[e.detail.value].text;
this.from.template_id = this.deliveryTemplate[e.detail.value].id;
},
//
onClickAccess() {
},
//
goosSuccess(list) {
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
this.from.goods_image_id = this.handleRemove('', list)
}
}
},
//
detailSuccess(list) {
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
this.from.details_image_id = this.handleRemove('', list)
}
}
},
//
sourceSuccess(list) {
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
this.from.source_image_id = this.handleRemove('', list)
}
}
},
goodsRemove: function(file, fileList) {
this.from.goods_image_id = this.handleRemove(file, fileList)
},
detailsRemove: function(file, fileList) {
this.from.details_image_id = this.handleRemove(file, fileList)
},
sourceRemove: function(file, fileList) {
this.from.source_image_id = this.handleRemove(file, fileList)
},
handleRemove: function(file, fileList) {
console.log(file, fileList)
let idList = []
fileList.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
return idList.join(',')
},
openPage(i) {
if (i == 1) {
this.isShow = true; this.isShow = true;
this.popupType=i } else if (i == 2) {
}else if(i == 4){ this.isShow = false;
uni.navigateTo({ uni.navigateTo({
url: "/pages/news/goods/classification" url: "/pages/news/goods/classify"
}) })
} }
}, },
tabLItem(i){ tabLItem(i) {
this.tabLIndex = i this.tabLIndex = i
console.log(this.tabLIndex) console.log(this.tabLIndex)
}, },
tabRItem(i){ tabRItem(i) {
this.tabRIndex = i this.tabRIndex = i
console.log(this.tabRIndex) console.log(this.tabRIndex)
}, }
tabMItem(i){
this.tabMIndex = i
console.log(this.tabMIndex)
},
tabMItem1(i){
this.tabMIndex1 = i
console.log(this.tabMIndex1)
},
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.goods{ .goods {
padding: 0 0 130rpx; padding: 0 0 130rpx;
overflow: hidden; overflow: hidden;
&-top{ margin-top: 12rpx;
&-top {
background-color: #fff; background-color: #fff;
padding: 40rpx 25rpx; padding: 40rpx 25rpx;
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx; margin-bottom: 20rpx;
input{
input {
display: block; display: block;
line-height: 60rpx; line-height: 60rpx;
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
} }
.btn{
.btn {
width: 158rpx; width: 158rpx;
line-height: 50rpx; line-height: 50rpx;
background: #FFB8B3; background: #FF5050;
border-radius: 50rpx; border-radius: 50rpx;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 24rpx;
@ -235,12 +439,14 @@
} }
} }
&-hd{
&-hd {
background-color: #fff; background-color: #fff;
padding: 0 25rpx 0; padding: 0 25rpx 0;
overflow: hidden; overflow: hidden;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.item{
.item {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
line-height: 50rpx; line-height: 50rpx;
font-size: 28rpx; font-size: 28rpx;
@ -249,82 +455,104 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid #F7F7F7; border-bottom: 1px solid #F7F7F7;
.a{
text{ .a {
text {
color: #F34A40; color: #F34A40;
margin-left: 5rpx; margin-left: 5rpx;
} }
} }
.b{
.b {
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
flex: 1; flex: 1;
input{
input {
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #6D6D6D;
flex: 1; flex: 1;
line-height: 50rpx; line-height: 50rpx;
font-size: 28rpx; font-size: 28rpx;
color: #212121;
text-align: right; text-align: right;
margin-right: 10rpx; margin-right: 10rpx;
} }
.select{
.select {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
color: #C7C7C7; color: #C7C7C7;
justify-content: flex-end; justify-content: flex-end;
&-on{
&-on {
color: #212121; color: #212121;
} }
} }
} }
} }
.items{
.items {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
line-height: 50rpx; line-height: 50rpx;
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
border-bottom: 1px solid #F7F7F7; border-bottom: 1px solid #F7F7F7;
.a{
.t {
width: 480rpx;
height: 40rpx;
padding-left: 30rpx;
font-size: 28rpx;
color: #212121;
margin-top: 5rpx;
}
.a {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
input{
input {
flex: 1; flex: 1;
font-size: 26rpx; font-size: 26rpx;
color: #212121; color: #212121;
line-height: 50rpx; line-height: 50rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
text{
text {
color: #F34A40; color: #F34A40;
margin-left: 5rpx; margin-left: 5rpx;
} }
.select{
.select {
flex: 1; flex: 1;
} }
.tip{
.tip {
margin-left: 15rpx; margin-left: 15rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
color: #9F9F9F; color: #9F9F9F;
} }
} }
.b{
.b {
padding-top: 20rpx; padding-top: 20rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #C7C7C7; color: #C7C7C7;
} }
.c{
.c {
padding-top: 20rpx; padding-top: 20rpx;
overflow: hidden; overflow: hidden;
.slot-btn{
.slot-btn {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
background: #F6F6F6; background: #F6F6F6;
@ -334,7 +562,8 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #6D6D6D; color: #6D6D6D;
image{
image {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
margin-top: 30rpx; margin-top: 30rpx;
@ -344,7 +573,8 @@
} }
} }
&-fd{
&-fd {
width: 100%; width: 100%;
position: fixed; position: fixed;
left: 0; left: 0;
@ -353,7 +583,8 @@
z-index: 99; z-index: 99;
background-color: #fafafa; background-color: #fafafa;
box-sizing: border-box; box-sizing: border-box;
.btn{
.btn {
width: 630rpx; width: 630rpx;
line-height: 88rpx; line-height: 88rpx;
background: #F34A40; background: #F34A40;
@ -364,17 +595,20 @@
color: #FFFFFF; color: #FFFFFF;
} }
} }
&-classify{
&-classify {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
&-hd{
&-hd {
padding: 30rpx 60rpx; padding: 30rpx 60rpx;
position: relative; position: relative;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #303030; color: #303030;
text-align: center; text-align: center;
.a{
.a {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
@ -386,36 +620,42 @@
z-index: 2; z-index: 2;
} }
} }
&-bd{
&-bd {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
.l{
.l {
width: 210rpx; width: 210rpx;
height: 560rpx; height: 560rpx;
background-color: #F7F8FA; background-color: #fff;
.item{
.item {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
height: 70rpx; height: 80rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #303030; color: #303030;
white-space: nowrap; white-space: nowrap;
line-height: 70rpx; line-height: 80rpx;
padding-left: 30rpx; padding-left: 30rpx;
box-sizing: border-box; box-sizing: border-box;
&-on{
&-on {
background-color: #fff; background-color: #fff;
font-weight: 500; font-weight: 500;
} }
} }
} }
.m{
.m {
width: 100%; width: 100%;
text-align: center; text-align: center;
max-height: 560rpx; max-height: 560rpx;
.item{
.item {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
height: 70rpx; height: 70rpx;
@ -424,33 +664,48 @@
color: #303030; color: #303030;
white-space: nowrap; white-space: nowrap;
line-height: 70rpx; line-height: 70rpx;
padding-left: 80rpx;
box-sizing: border-box; box-sizing: border-box;
&-on{
&-on {
color: #FF624F; color: #FF624F;
} }
} }
} }
.r{
.r {
width: 540rpx; width: 540rpx;
height: 560rpx; height: 560rpx;
.item{
.item {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
height: 70rpx; height: 80rpx;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #303030; color: #303030;
white-space: nowrap; white-space: nowrap;
line-height: 70rpx; line-height: 80rpx;
padding-left: 80rpx; padding-left: 80rpx;
box-sizing: border-box; box-sizing: border-box;
&-on{
&-on {
color: #FF624F; color: #FF624F;
} }
} }
} }
} }
} }
} }
::v-deep .u-list-item {
margin: 10rpx 20rpx 10rpx 0 !important;
}
::v-deep .uni-textarea {
max-height: 100rpx !important;
}
::v-deep .uni-input-placeholder {
color: #C7C7C7 !important;
}
</style> </style>

@ -16,9 +16,12 @@
<view class="item"> <view class="item">
<view class="a">所属城市</view> <view class="a">所属城市</view>
<view class="b"> <view class="b">
<picker mode="region" :value="form.region" @change="bindCityChange"> <picker mode="multiSelector" @change="multiChange" @columnchange="columnChange"
<view class="select">{{cityInfo.province}}{{cityInfo.city}}{{cityInfo.area}}<u-icon value="{{multiIndex}}" :range="multiArray" range-key="name">
name="arrow-right"></u-icon></view> <view class="pbox">
{{cityInfo?cityInfo.province+cityInfo.city+cityInfo.area:'请选择省市区'}}
<u-icon name="arrow-right"></u-icon>
</view>
</picker> </picker>
</view> </view>
</view> </view>
@ -32,8 +35,8 @@
<view class="addressList-bd" v-if="type=='edit'"> <view class="addressList-bd" v-if="type=='edit'">
<view class="a">设为默认收货地址</view> <view class="a">设为默认收货地址</view>
<view class="b"> <view class="b">
<u-switch v-model="checked" active-color="#55BD6A" inactive-color="#eee" <u-switch v-model="checked" active-color="#55BD6A" inactive-color="#eee" @change="setDefault">
@change="setDefault"></u-switch> </u-switch>
</view> </view>
</view> </view>
<view class="addressList-fd"> <view class="addressList-fd">
@ -49,8 +52,6 @@
data() { data() {
return { return {
type: 'add', type: 'add',
array: [],
index: 0,
checked: false, checked: false,
value: "", value: "",
cityInfo: { cityInfo: {
@ -67,12 +68,15 @@
}, },
addressDetail: null, addressDetail: null,
addressId: '', addressId: '',
multiIndex: [0, 0, 0],
multiArray: [],
multiData: []
}; };
}, },
onLoad(optios) { onLoad(optios) {
console.log(JSON.parse(optios.addressDetail))
if (optios.addressDetail) { if (optios.addressDetail) {
this.type = 'edit' this.type = 'edit'
this.addressDetail = JSON.parse(optios.addressDetail); this.addressDetail = JSON.parse(optios.addressDetail);
this.addressId = this.addressDetail.address_id this.addressId = this.addressDetail.address_id
this.cityInfo.province = this.addressDetail.region.province; this.cityInfo.province = this.addressDetail.region.province;
@ -92,21 +96,62 @@
}]; }];
this.form.detail = this.addressDetail.detail; this.form.detail = this.addressDetail.detail;
} }
this.getProvinceAll()
}, },
methods: { methods: {
async getProvinceAll() {
let {
status,
message,
data
} = await AddressApi.province();
if (status == 200) {
this.multiData = data.list;
var multiIndex = this.multiIndex;
this.multiArray = [
this.multiData,
this.multiData[0].children,
this.multiData[0].children[0].children
]
}
},
//
multiChange: function(e) {
// console.log(e);
var _this = this;
var multiIndex = e.detail.value;
console.log(multiIndex);
this.multiIndex = multiIndex;
},
//
columnChange: function(e) {
// console.log(e);
var _this = this;
var multiData = _this.multiData;
var multiIndex = _this.multiIndex;
var columnIndex = e.detail.column;
var columnValue = e.detail.value;
multiIndex[columnIndex] = columnValue;
this.multiArray = [
multiData,
multiData[multiIndex[0]].children,
multiData[multiIndex[0]].children[multiIndex[1]].children,]
},
bindCityChange(e) { bindCityChange(e) {
this.cityInfo.province = e.detail.value[0]; this.cityInfo.province = e.detail.value[0];
this.cityInfo.city = e.detail.value[1]; this.cityInfo.city = e.detail.value[1];
this.cityInfo.area = e.detail.value[2]; this.cityInfo.area = e.detail.value[2];
this.form.region = e.detail.code; this.form.region = e.detail.id;
this.form.region = [{ this.form.region = [{
value: e.detail.code[0], value: e.detail.id[0],
label: e.detail.value[0] label: e.detail.value[0]
}, { }, {
value: e.detail.code[1], value: e.detail.id[1],
label: e.detail.value[1] label: e.detail.value[1]
}, { }, {
value: e.detail.code[2], value: e.detail.id[2],
label: e.detail.value[2] label: e.detail.value[2]
}]; }];
}, },
@ -121,6 +166,9 @@
} }
if (that.form.region == []) { if (that.form.region == []) {
return that.$toast('请选择所属地市') return that.$toast('请选择所属地市')
}
let parame = {
} }
AddressApi.add(that.form) AddressApi.add(that.form)
.then(result => { .then(result => {
@ -146,8 +194,9 @@
if (that.form.region == []) { if (that.form.region == []) {
return that.$toast('请选择所属地市') return that.$toast('请选择所属地市')
} }
AddressApi.edit(that.form) AddressApi.edit(that.addressId, that.form)
.then(result => { .then(result => {
return
that.$toast(result.message) that.$toast(result.message)
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
@ -275,4 +324,68 @@
} }
} }
} }
.list {
// border-bottom: 1rpx solid #eee;
padding: 0 0 0 18rpx;
box-sizing: border-box;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
position: relative;
.picker {
height: 92rpx;
width: 33%;
.pbox {
width: 100%;
height: 92rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
color: #808080;
view {
width: 100%;
text-align: right;
}
.icon-you {
font-size: 28rpx;
}
}
.pbox_hover {
color: #383838;
}
}
.name {
width: 168rpx;
font-size: 32rpx;
color: #383838;
}
.icon-you {
font-size: 28rpx;
color: #999999;
}
.input {
flex: 1;
height: 100%;
line-height: 92rpx;
color: #9080A1;
}
.textarea {
flex: 1;
height: 100%;
color: #A9A9A9;
}
}
</style> </style>

@ -342,61 +342,101 @@ export default {
}) })
.finally() .finally()
}, },
onShowToast(t) {
uni.showToast({
title: t,
icon: 'none',
duration: 2000
})
},
sureSubmit() { sureSubmit() {
let tip_title = null let tip_title = null
if (!this.form.store_name) { if (!this.form.store_name) {
tip_title = '请输入主体公司名称!' this.onShowToast('请输入主体公司名称!')
return
} }
if (!this.form.store_cat) { if (!this.form.store_cat) {
tip_title = '请选择主营类目体类目!' tip_title = '请选择主营类目体类目!'
this.onShowToast(tip_title)
return
} }
if (!this.form.store_address) { if (!this.form.store_address) {
tip_title = '请选择公司地址!' tip_title = '请选择公司地址!'
this.onShowToast(tip_title)
return
} }
if (!this.form.store_brand) { if (!this.form.store_brand) {
tip_title = '请输入合作品牌!' tip_title = '请输入合作品牌!'
this.onShowToast(tip_title)
return
} }
if (!this.brand_name) { if (!this.brand_name) {
tip_title = '请选择代理入驻!' tip_title = '请选择代理入驻!'
this.onShowToast(tip_title)
return
} }
if (!this.authorize_name) { if (!this.authorize_name) {
tip_title = '请选择一二级授权!' tip_title = '请选择一二级授权!'
} }
if (!this.rate_name) { if (!this.rate_name) {
tip_title = '请选择可否含税!' tip_title = '请选择可否含税!'
this.onShowToast(tip_title)
return
} }
if (!this.form.user_name) { if (!this.form.user_name) {
tip_title = '请输入联系人姓名!' tip_title = '请输入联系人姓名!'
this.onShowToast(tip_title)
return
} }
if (!this.form.user_position) { if (!this.form.user_position) {
tip_title = '请选择联系人职位!' tip_title = '请选择联系人职位!'
this.onShowToast(tip_title)
return
} }
if (!this.form.user_mobile) { if (!this.form.user_mobile) {
tip_title = '请输入联系人手机号!' tip_title = '请输入联系人手机号!'
this.onShowToast(tip_title)
return
} }
if (this.form.user_mobile && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.user_mobile))) { if (this.form.user_mobile && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.user_mobile))) {
tip_title = '手机号格式不正确!' tip_title = '手机号格式不正确!'
this.onShowToast(tip_title)
return
} }
if (!this.form.user_wx) { if (!this.form.user_wx) {
tip_title = '请输入联系人微信!' tip_title = '请输入联系人微信!'
this.onShowToast(tip_title)
return
} }
if (!this.form.user_email) { if (!this.form.user_email) {
tip_title = '请输入联系人邮箱!' tip_title = '请输入联系人邮箱!'
this.onShowToast(tip_title)
return
} }
if (!this.form.store_model) { if (!this.form.store_model) {
tip_title = '请选择仓库模式!' tip_title = '请选择仓库模式!'
this.onShowToast(tip_title)
return
} }
if (!this.send_name) { if (!this.send_name) {
tip_title = '请选择周末是否发货!' tip_title = '请选择周末是否发货!'
this.onShowToast(tip_title)
return
} }
if (!this.factory_name) { if (!this.factory_name) {
tip_title = '请选择是否自有工厂!' tip_title = '请选择是否自有工厂!'
this.onShowToast(tip_title)
return
} }
if (!this.offline_name) { if (!this.offline_name) {
tip_title = '请选择是否有线下渠道' tip_title = '请选择是否有线下渠道'
this.onShowToast(tip_title)
return
} }
if (!this.shop_name) { if (!this.shop_name) {
tip_title = '请选择是否有电商店铺!' tip_title = '请选择是否有电商店铺!'
this.onShowToast(tip_title)
return
} }
let plat_form = [] let plat_form = []
this.btnList.map(item => { this.btnList.map(item => {
@ -407,19 +447,21 @@ export default {
this.form.store_type = plat_form this.form.store_type = plat_form
if (plat_form.length == 0 && this.form.has_online_shop == 1) { if (plat_form.length == 0 && this.form.has_online_shop == 1) {
tip_title = '请选择电商平台!' tip_title = '请选择电商平台!'
} this.onShowToast(tip_title)
if (tip_title != null) {
uni.showToast({
title: tip_title,
icon: 'none',
duration: 2000
})
return return
} }
help.joinStore(this.form) help.joinStore(this.form)
.then(res => { .then(res => {
if (res.status) { if (res.status) {
this.popShow = true this.popShow = true
this.form = this.$options.data().form
this.send_name = ''
this.factory_name = ''
this.offline_name = ''
this.shop_name = ''
this.btnList.map(item => {
item.active = false
})
} else { } else {
uni.showToast({ uni.showToast({
title: '入驻失败', title: '入驻失败',
@ -429,14 +471,6 @@ export default {
} }
}) })
.finally(() => { .finally(() => {
this.form = this.$options.data().form
this.send_name = ''
this.factory_name = ''
this.offline_name = ''
this.shop_name = ''
this.btnList.map(item => {
item.active = false
})
}) })
}, },
} }

@ -1,61 +1,59 @@
<template> <template>
<view> <view>
<view class="order-tab"> <view class="order-tab">
<view :class="OrderType==0?'tab action':'tab'" @click="onOrderTab(0)"> <view :class="OrderType == 0 ? 'tab action' : 'tab'" @click="onOrderTab(0)">
<text>我要反馈</text> <text>我要反馈</text>
<text class="line"></text> <text class="line"></text>
</view> </view>
<view :class="OrderType==1?'tab action':'tab'" @click="onOrderTab(1)"> <view :class="OrderType == 1 ? 'tab action' : 'tab'" @click="onOrderTab(1)">
<text>反馈公示</text> <text>反馈公示</text>
<text class="line"></text> <text class="line"></text>
</view> </view>
<view :class="OrderType==2?'tab action':'tab'" @click="onOrderTab(2)"> <view :class="OrderType == 2 ? 'tab action' : 'tab'" @click="onOrderTab(2)">
<text>我的反馈</text> <text>我的反馈</text>
<text class="line"></text> <text class="line"></text>
</view> </view>
</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">
<u-form-item label="反馈类型" label-width="150"> <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.name">
{{item.name}} {{ item.name }}
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item label="反馈类型" label-width="150"> <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.name">
{{item.name}} {{ item.name }}
</u-radio> </u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item label="门店" label-width="150" @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-form-item> </u-form-item>
<u-form-item label="投诉内容" 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" class="textarea" placeholder="请填写投诉内容" type="textarea" />
</u-form-item> </u-form-item>
<u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8" <u-upload :fileList="finishImageList" :previewFullImage="true" @afterRead="afterRead" :maxCount="8"
width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload> width="180" height="180" upload-text="上传照片" @delete="deletePic" name="1" multiple></u-upload>
</view> </view>
<view class="section1Item" style="margin-top:20rpx;"> <view class="section1Item" style="margin-top:20rpx;">
<u-form-item label="您的称呼" label-width="150"> <u-form-item label="您的称呼" label-width="170">
<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="170">
<u-input placeholder="请填写" v-model="form.phone" /> <u-input placeholder="请输入手机号" v-model="form.phone" />
</u-form-item> </u-form-item>
</view> </view>
</u-form> </u-form>
@ -68,86 +66,82 @@
提交 提交
</view> </view>
</view> </view>
<view class="section2" v-if="OrderType==1"> <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="statusfb">
<text v-if="item.status==0">待处理</text>
<text v-if="item.status==1">已完成</text>
</view>
<view class="feedbackContent"> <view class="feedbackContent">
<view class="fbTitle"> <view class="fbTitle">
<view class="fbFlag"> <view class="fbFlag">
<text v-if="item.type==1">投诉</text> <text v-if="item.type == 1">投诉</text>
<text v-if="item.type==2">建议</text> <text v-if="item.type == 2">建议</text>
<text v-if="item.type==3">表扬</text> <text v-if="item.type == 3">表扬</text>
</view> </view>
<view class="fbTitleText"> <view class="fbTitleText">
{{item.store_name}} {{ item.shop_name }}
</view>
<view class="statusfb">
<text v-if="item.status == 0">待处理</text>
<text v-if="item.status == 1">已完成</text>
</view> </view>
</view> </view>
<u-read-more show-height="150" color="#9E9E9E" :toggle="true" close-text="展开"> <u-read-more showHeight="160" textIndent="0" fontSize="26rpx" color="#9E9E9E" :toggle="true"
<rich-text :nodes="item.content"></rich-text> close-text="展开">
<rich-text v-if="index != 0" :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">
<u-collapse> <u-collapse>
<u-collapse-item title="处理结果"> <u-collapse-item :open="true" title="处理结果">
<u-form :model="item" ref="item"> <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.content }}
</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>
</view> </view>
<view class="section2" v-if="OrderType==2"> <view class="section2" v-if="OrderType == 2 && feedBackList.length > 0">
<view class="feedShow" v-for="(item,index) in feedBackList" :key="index"> <view class="feedShow" style="padding: 0;" v-for="(item, index) in feedBackList" :key="index">
<view class="feedbackItem">
<view class="feedbackResult"> <view class="feedbackResult">
<u-collapse> <u-collapse>
<u-collapse-item :open="true" title="处理结果"> <u-collapse-item :open="true" title="处理结果">
<u-form :model="item" ref="item"> <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.content }}
</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>
<!-- <view class="empty"> <view class="empty" v-if="OrderType == 2">
<image src="/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> </view>
</template> </template>
<script> <script>
import * as feedback from '@/api/feedback' import * as feedback from '@/api/feedback'
export default { export default {
data() { data() {
return { return {
OrderType: 0, OrderType: 0,
@ -218,6 +212,22 @@
}, },
submit() { submit() {
const that = this const that = this
if (that.form.comment == '') {
uni.showToast({
title: '请填写投诉内容!',
icon: 'none',
duration: 2000
})
return
}
if (this.form.phone && (!/^\+?\d[\d -]{8,12}\d/.test(this.form.phone))) {
uni.showToast({
title: '手机号格式不正确!',
icon: 'none',
duration: 2000
})
return
}
let params = { let params = {
shop_id: that.shop_id, shop_id: that.shop_id,
type: that.form.type, type: that.form.type,
@ -228,6 +238,8 @@
feedback.add(params) feedback.add(params)
.then(res => { .then(res => {
that.$toast(res.message) that.$toast(res.message)
that.shop_id = ''
that.form = that.$options.data().form
}) })
.catch(reject) .catch(reject)
}) })
@ -238,6 +250,7 @@
*/ */
onOrderTab(type) { onOrderTab(type) {
this.OrderType = type; this.OrderType = type;
this.feedBackList = []
if (type != 0) { if (type != 0) {
this.getFeedBack(type) this.getFeedBack(type)
} }
@ -247,7 +260,7 @@
// //
const that = this const that = this
let params = { let params = {
is_my: '', is_my: 0,
page: that.page page: that.page
} }
params.is_my = type == 1 ? 0 : 1 params.is_my = type == 1 ? 0 : 1
@ -262,7 +275,7 @@
}) })
}, },
actionSheetCallback(index) { actionSheetCallback(index) {
console.log(index,this.shopList) console.log(index, this.shopList)
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
}, },
@ -300,27 +313,27 @@
uploadFilePromise(url) { uploadFilePromise(url) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let a = uni.uploadFile({ let a = uni.uploadFile({
url: this.baseUrl+'/api/common/upload', // url: this.baseUrl + '/api/common/upload', //
filePath: url, filePath: url,
name: 'file', name: 'file',
formData: { formData: {
user: 'test', user: 'test',
token:getToken() token: getToken()
}, },
success: (res) => { success: (res) => {
if(JSON.parse(res.data).code==1){ if (JSON.parse(res.data).code == 1) {
setTimeout(() => { setTimeout(() => {
this.finishImageList.push({url:JSON.parse(res.data).data.fullurl,path:JSON.parse(res.data).data.url}) this.finishImageList.push({ url: JSON.parse(res.data).data.fullurl, path: JSON.parse(res.data).data.url })
resolve(res.data) resolve(res.data)
}, 1000) }, 1000)
}else{ } else {
uni.$u.toast(JSON.parse(res.data).msg) uni.$u.toast(JSON.parse(res.data).msg)
resolve(res.data) resolve(res.data)
} }
}, },
fail: (res) => { fail: (res) => {
console.log(res,"rrr") console.log(res, "rrr")
} }
}); });
}) })
@ -331,19 +344,19 @@
this.finishImageList.splice(event.index, 1) this.finishImageList.splice(event.index, 1)
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
page { page {
min-height: 100%; min-height: 100%;
width: 100%; width: 100%;
background-color: #F7F8FA; background-color: #F7F8FA;
} }
/* 订单tab */ /* 订单tab */
.order-tab { .order-tab {
position: fixed; position: fixed;
left: 0; left: 0;
@ -389,17 +402,22 @@
} }
} }
}
.selfForm {
::v-deep .u-form-item {
padding: 0;
} }
}
.section1 { .section1 {
border: 1px solid transparent; border: 1px solid transparent;
.section1Item { .section1Item {
background-color: #fff; background-color: #fff;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
margin: 120rpx 30rpx 30rpx 30rpx; margin: 120rpx 30rpx 30rpx 30rpx;
padding: 10rpx 40rpx; padding: 20rpx 46rpx;
} }
::v-deep .u-form-item--left__content__label { ::v-deep .u-form-item--left__content__label {
@ -413,13 +431,12 @@
border: none; border: none;
} }
.textarea { // .textarea {
height: 250rpx; // height: 258rpx;
background: #F7F8FA; // border-radius: 3px;
border-radius: 3px 3px 3px 3px; // border: solid 1upx #F7F8FA;
opacity: 1;
} // }
::v-deep .u-input__textarea { ::v-deep .u-input__textarea {
padding: 26rpx; padding: 26rpx;
@ -430,7 +447,7 @@
margin: 16rpx 30rpx 30rpx 30rpx; margin: 16rpx 30rpx 30rpx 30rpx;
.introText { .introText {
font-size: 24rpx; font-size: 26rpx;
color: #C5C6C8; color: #C5C6C8;
margin-top: 16rpx; margin-top: 16rpx;
line-height: 40rpx; line-height: 40rpx;
@ -451,15 +468,15 @@
text-align: center; text-align: center;
line-height: 100rpx; line-height: 100rpx;
} }
} }
.section2 { .section2 {
min-height: 100%; min-height: 100%;
padding: 120rpx 30rpx 30rpx 30rpx; padding: 120rpx 30rpx 30rpx 30rpx;
.feedShow { .feedShow {
padding: 30rpx; padding: 30rpx 0;
border-radius: 4px 4px 4px 4px; border-radius: 4px;
background-color: #fff; background-color: #fff;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
@ -467,36 +484,36 @@
.feedbackItem { .feedbackItem {
position: relative; position: relative;
margin-bottom: 30rpx; margin-bottom: 30rpx;
// border:1px solid yellow;
.statusfb { .statusfb {
position: absolute; position: absolute;
right: 0; top: 4rpx;
width: 92rpx; right: -30rpx;
width: 100rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
text-align: center; text-align: center;
border-radius: 22rpx 0 0 22rpx;
background-color: #EEFAF6; background-color: #EEFAF6;
font-size: 26rpx; font-size: 26rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: bold;
color: #2DC37F; color: #2DC37F;
top: 40rpx;
} }
.feedbackContent { .feedbackContent {
padding-bottom: 30rpx; padding: 0 30rpx 30rpx;
border-bottom: 1px solid #A0A0A0; border-bottom: 1px solid #eee;
.fbTitle { .fbTitle {
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
width: calc(100% - 100rpx); justify-content: space-between;
margin-bottom: 20rpx;
// width: calc(100% - 100rpx);
.fbFlag { .fbFlag {
// width: 54rpx;
// height: 44rpx;
// line-height: 44rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 3px; border-radius: 3px;
opacity: 1; opacity: 1;
@ -511,22 +528,32 @@
.fbTitleText { .fbTitleText {
flex: 1; flex: 1;
font-size: 28rpx;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: #000; color: #000;
font-size: 500; font-weight: bold;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
.timefb { .timefb {
margin-top: 20rpx;
font-size: 24rpx;
color: #A0A0A0; color: #A0A0A0;
} }
} }
}
.feedbackResult { .feedbackResult {
padding: 0 30rpx;
::v-deep .u-form-item--left__content__label { ::v-deep .u-form-item--left__content__label {
color: #A6A6A6; color: #A6A6A6;
} }
@ -545,17 +572,18 @@
} }
}
} .empty {
width: 100%;
.empty { display: flex;
text-align: center; align-items: center;
position: relative; justify-content: center;
top: 150rpx; flex-direction: column;
height: calc(100vh - 102rpx);
image { .emptyImg {
width: 210rpx; width: 210rpx;
height: auto;
} }
.emptytext { .emptytext {
@ -563,9 +591,8 @@
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #717171; color: #717171;
margin-top: 36rpx;
} }
} }
}
</style> </style>

@ -172,8 +172,8 @@ export default {
}, },
onOut() { onOut() {
uni.showModal({ uni.showModal({
title: '友情提示', title: '您是否要注销账号?',
content: '确认要注销吗?', content: '',
success(o) { success(o) {
if (o.confirm) { if (o.confirm) {
uni.removeStorage('token'); uni.removeStorage('token');

@ -62,8 +62,8 @@
<view class="recordTitle"> <view class="recordTitle">
转账记录<text class="intro">最多上传6张</text> 转账记录<text class="intro">最多上传6张</text>
</view> </view>
<u-upload :action="action" :header="header" @on-uploaded="transferSuccess" width="180" height="180" <u-upload :action="action" :header="header" @on-uploaded="transferSuccess" @on-remove="transferRemove"
:file-list="transferList" :custom-btn="true" max-count="6"> width="180" height="180" :file-list="transferList" :custom-btn="true" max-count="6">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
@ -76,8 +76,8 @@
<view class="recordTitle"> <view class="recordTitle">
聊天记录<text class="intro">最多上传6张</text> 聊天记录<text class="intro">最多上传6张</text>
</view> </view>
<u-upload :action="action" :header="header" @on-uploaded="chatSuccess" width="180" height="180" <u-upload :action="action" :header="header" @on-uploaded="chatSuccess" @on-remove="chatRemove"
:file-list="chatList" :custom-btn="true" max-count="6"> width="180" height="180" :file-list="chatList" :custom-btn="true" max-count="6">
<template v-slot:addBtn> <template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150"> <view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl+'/static/news/icon-upload.png'"></image> <image :src="$picUrl+'/static/news/icon-upload.png'"></image>
@ -87,9 +87,6 @@
</u-upload> </u-upload>
</view> </view>
</view> </view>
<!-- <view class="footerBtn" @click="onSubmit">
提交
</view> -->
<view class="goods-fd"> <view class="goods-fd">
<view class="btn" @click="onSubmit">提交</view> <view class="btn" @click="onSubmit">提交</view>
</view> </view>
@ -318,6 +315,20 @@
} }
} }
}, },
transferRemove(file, fileList) {
this.form.transfer_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(',')
},
chatRemove(file, fileList) {
this.form.transfer_image_id = this.handleRemove(file, fileList);
},
// //
chatSuccess(list) { chatSuccess(list) {
if (list.length > 0) { if (list.length > 0) {

Loading…
Cancel
Save