update
This commit is contained in:
parent
ac91a78c2d
commit
8e85589d36
@ -98,7 +98,8 @@
|
||||
<!-- 快速标签卡片 -->
|
||||
<view class="form-card" v-if="tagList.length > 0">
|
||||
<view class="card-header" style="margin-bottom: 24rpx;">
|
||||
<view class="card-title">{{ typeIndex === '1' ? '表扬' : '投诉' }}类型</view>
|
||||
<view class="card-title">{{ typeIndex === '1' ? '表扬类型' : typeIndex === '2' ? '咨询建议' : '投诉类型' }}
|
||||
</view>
|
||||
<view class="card-icon">🏷️</view>
|
||||
</view>
|
||||
|
||||
@ -128,8 +129,12 @@
|
||||
</view>
|
||||
|
||||
<!-- 图片上传区域 -->
|
||||
<!-- ,视频:{{ videoList.length }}/3 -->
|
||||
<view class="upload-section">
|
||||
<view class="upload-title">上传图片 ({{ imgsList.length }}/9)</view>
|
||||
<view class="upload-title">上传材料 (图片:{{ imgsList.length }}/9)
|
||||
<!-- <view class="upload-notice">*仅支持30s以内的视频文件</view> -->
|
||||
</view>
|
||||
|
||||
<view class="upload-grid">
|
||||
<view class="uploaded-image" v-for="(item, i) in imgsList" :key="i">
|
||||
<image mode="aspectFill" :src='item' @click="seePhoto(item)"></image>
|
||||
@ -137,10 +142,18 @@
|
||||
<text class="delete-icon">×</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="uploaded-image" v-for="(item, i) in videoList" :key="i">
|
||||
<image mode="aspectFill" :src='item.thumbTempFilePath' @click="seePhoto(item)"></image>
|
||||
<view class="delete-btn" v-if="!detailSuggestion.SUGGESTION_ID" @click="deleteImg(i)">
|
||||
<text class="delete-icon">×</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- || videoList.length < 3 -->
|
||||
<view class="upload-btn" @click="choeseImg"
|
||||
v-if="imgsList.length < 9 && !detailSuggestion.SUGGESTION_ID">
|
||||
v-if="(imgsList.length < 9) && !detailSuggestion.SUGGESTION_ID">
|
||||
<view class="upload-icon">📷</view>
|
||||
<text class="upload-text">添加图片</text>
|
||||
<text class="upload-text">添加图片/视频</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -174,22 +187,24 @@ export default {
|
||||
Info: '',
|
||||
PhoneNumber: '',
|
||||
WechatOpenId: '',
|
||||
|
||||
// videoList: [],
|
||||
imageArr: []
|
||||
},
|
||||
imgsList: [],
|
||||
// videoList: [],
|
||||
pageMsg: {
|
||||
serverPartName: '',
|
||||
typeName: '投诉'
|
||||
},
|
||||
// msgType: [{ type: 2000, name: '投诉' }, { type: 4000, name: '咨询' }, { type: 1000, name: '建议' }],
|
||||
msgType: [{ type: 1000, name: '投诉' }, { type: 1050, name: '表扬' }],
|
||||
msgType: [{ type: 1000, name: '投诉' }, { type: 1050, name: '表扬' }, { type: 4000, name: "咨询建议" }],
|
||||
typeIndex: 0,
|
||||
serverIndex: 0,
|
||||
tagList: [], // 可选择的建议标签
|
||||
selectTags: [], // 已选中的建议标签
|
||||
currentService: {}, // 当前服务区信息
|
||||
detailSuggestion: {} // 当前投诉建议的详情内容
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -334,6 +349,17 @@ export default {
|
||||
this.pageMsg.typeName = this.msgType[index].name
|
||||
},
|
||||
choeseImg() {
|
||||
// uni.chooseMedia({
|
||||
// count: 1,
|
||||
// mediaType: ['image', 'video'],
|
||||
// sourceType: ['album', 'camera'],
|
||||
// success: async (rs) => {
|
||||
// console.log('rsrs', rs);
|
||||
|
||||
// }
|
||||
// })
|
||||
// return
|
||||
|
||||
if (this.detailSuggestion.SUGGESTION_ID) {
|
||||
return
|
||||
}
|
||||
@ -345,67 +371,46 @@ export default {
|
||||
return false
|
||||
}
|
||||
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
// uni.chooseImage({
|
||||
uni.chooseMedia({
|
||||
count: 9,
|
||||
mediaType: ['image'], // , 'video'
|
||||
sourceType: ['album', 'camera'],
|
||||
maxDuration: 30,
|
||||
camera: 'back',
|
||||
success(rs) {
|
||||
console.log('rs', rs)
|
||||
_this.noPost = false
|
||||
let tempFilePath = rs.tempFilePaths[0]
|
||||
let thisCount = rs.tempFiles.length
|
||||
// 因为这里即可以上传视频 也可以上传图片 所以在这里做个判断先
|
||||
if (rs.type === 'video') {
|
||||
if (_this.videoList.length + thisCount > 3) {
|
||||
uni.showToast({
|
||||
title: '视频数量已上限',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
uni.getImageInfo({
|
||||
src: tempFilePath,
|
||||
success(imgInfo) {
|
||||
let quality = 100
|
||||
if (imgInfo.size > 1024 * 200) {
|
||||
quality = 1024 * 200 / imgInfo.size * 100
|
||||
}
|
||||
|
||||
if (quality < 100 && tempFilePath.indexOf('.jpg') > -1) {
|
||||
uni.compressImage({
|
||||
src: tempFilePath,
|
||||
quality: quality,
|
||||
success(res) {
|
||||
uni.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
|
||||
filePath: res.tempFilePath,
|
||||
name: 'data',
|
||||
success(res) {
|
||||
let _data = JSON.parse(res.data)
|
||||
_this.imgsList.push(tempFilePath)
|
||||
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
|
||||
uni.hideLoading()
|
||||
_this.noPost = true
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res)
|
||||
_this.noPost = true
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(error) {
|
||||
console.log(error)
|
||||
_this.noPost = true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
let tempFilePath = rs.tempFiles
|
||||
if (tempFilePath && tempFilePath.length > 0) {
|
||||
for (let i = 0; i < tempFilePath.length; i++) {
|
||||
let videoItem = tempFilePath[i].tempFilePath
|
||||
uni.uploadFile({
|
||||
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
|
||||
filePath: tempFilePath,
|
||||
// filePath: res.tempFilePath,
|
||||
filePath: videoItem,
|
||||
name: 'data',
|
||||
success(res) {
|
||||
let _data = JSON.parse(res.data)
|
||||
_this.imgsList.push(tempFilePath)
|
||||
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
|
||||
console.log('_data_data_data_data', _data);
|
||||
_this.videoList.push({
|
||||
tempFilePath: tempFilePath[i].tempFilePath,
|
||||
thumbTempFilePath: tempFilePath[i].thumbTempFilePath
|
||||
})
|
||||
console.log('_this.videoList', _this.videoList);
|
||||
|
||||
_this.saveMsg.videoList.push(_data.Data.IMAGE_PATH)
|
||||
uni.hideLoading()
|
||||
_this.noPost = true
|
||||
},
|
||||
@ -416,7 +421,108 @@ export default {
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
} else if (rs.type === 'image') {
|
||||
if (_this.imgsList.length + thisCount > 9) {
|
||||
uni.showToast({
|
||||
title: '图片数量已上限',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
let tempFilePath = rs.tempFiles
|
||||
console.log('tempFilePathtempFilePathtempFilePath', tempFilePath);
|
||||
|
||||
if (tempFilePath && tempFilePath.length > 0) {
|
||||
for (let i = 0; i < tempFilePath.length; i++) {
|
||||
console.log('tempFilePath[i]tempFilePath[i]tempFilePath[i]', tempFilePath[i]);
|
||||
|
||||
uni.getImageInfo({
|
||||
src: tempFilePath[i].tempFilePath,
|
||||
success(imgInfo) {
|
||||
console.log('imgInfoimgInfoimgInfo', imgInfo);
|
||||
|
||||
|
||||
let quality = 100
|
||||
if (imgInfo.size > 1024 * 200) {
|
||||
quality = 1024 * 200 / imgInfo.size * 100
|
||||
}
|
||||
|
||||
if (quality < 100 && tempFilePath.indexOf('.jpg') > -1) {
|
||||
uni.compressImage({
|
||||
// src: tempFilePath,
|
||||
src: imgInfo.path,
|
||||
quality: quality,
|
||||
success(res) {
|
||||
console.log('resresresres312312', res);
|
||||
uni.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
|
||||
// filePath: res.tempFilePath,
|
||||
filePath: imgInfo.path,
|
||||
name: 'data',
|
||||
success(res) {
|
||||
let _data = JSON.parse(res.data)
|
||||
_this.imgsList.push(imgInfo.path)
|
||||
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
|
||||
uni.hideLoading()
|
||||
_this.noPost = true
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res)
|
||||
_this.noPost = true
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(error) {
|
||||
console.log(error)
|
||||
_this.noPost = true
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('imgInfoimgInfoimgInfo312312', imgInfo);
|
||||
uni.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
|
||||
// filePath: tempFilePath,
|
||||
filePath: imgInfo.path,
|
||||
name: 'data',
|
||||
success(res) {
|
||||
let _data = JSON.parse(res.data)
|
||||
_this.imgsList.push(imgInfo.path)
|
||||
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
|
||||
uni.hideLoading()
|
||||
_this.noPost = true
|
||||
},
|
||||
fail(res) {
|
||||
console.log(res)
|
||||
_this.noPost = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fail(error) {
|
||||
console.log('errorerrorerrorerror', error);
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '暂不支持上传该类文件格式',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -906,6 +1012,12 @@ export default {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-notice {
|
||||
font-size: 24rpx;
|
||||
color: red;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.upload-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@ -914,8 +1026,9 @@ export default {
|
||||
|
||||
.uploaded-image {
|
||||
position: relative;
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
// width: 160rpx;
|
||||
width: calc((100vw - 160rpx) / 3);
|
||||
height: calc((100vw - 160rpx) / 3);
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
@ -948,8 +1061,10 @@ export default {
|
||||
}
|
||||
|
||||
.upload-btn {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
// width: 160rpx;
|
||||
// height: 160rpx;
|
||||
width: calc((100vw - 160rpx) / 3);
|
||||
height: calc((100vw - 160rpx) / 3);
|
||||
border: 4rpx dashed #bdc3c7;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
|
||||
@ -86,7 +86,21 @@
|
||||
</p>
|
||||
|
||||
<p class="order-info-type" v-if="orderInfo.TAKE_TYPE === 2000 && orderInfo.SALEBILL_STATE >= 2010">
|
||||
<span class="order-info-t">快递单号</span><span>{{ orderInfo.TABLE_NUMBER || "" }}</span>
|
||||
<!-- <span class="order-info-t">快递单号</span><span>{{ orderInfo.TABLE_NUMBER || "" }}</span> -->
|
||||
<span class="order-info-t" style="white-space: nowrap;">快递单号</span>
|
||||
<view style="flex:1;display: flex;align-items: center;min-width: 0;">
|
||||
<view style="line-height: 30rpx;text-align: right;flex: 1; min-width: 0;">
|
||||
<view style="width:100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<!-- DPK364834414005,DPK364834414006 -->
|
||||
{{ orderInfo.TABLE_NUMBER ? orderInfo.TABLE_NUMBER.split('|')[0] : "" }}
|
||||
</view>
|
||||
<view>{{ orderInfo.TABLE_NUMBER ? orderInfo.TABLE_NUMBER.split('|')[1] : "" }}</view>
|
||||
</view>
|
||||
<!-- <span style="margin-left: 16rpx;width: 80rpx;text-align: right;color: #4BCB7E;"
|
||||
@click="handleClipboard(orderInfo.TABLE_NUMBER)">复制</span> -->
|
||||
<image v-if="orderInfo.TABLE_NUMBER" style="margin-left: 16rpx;width: 40rpx;text-align: right;color: #4BCB7E;"
|
||||
src="/static/images/copyIcon.svg" @click="handleClipboard(orderInfo.TABLE_NUMBER)" />
|
||||
</view>
|
||||
</p>
|
||||
|
||||
<!-- 原来的订单编码 -> 支付单号
|
||||
@ -266,7 +280,30 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 复制内容
|
||||
handleClipboard(text) {
|
||||
if (!text) {
|
||||
return
|
||||
}
|
||||
// 拿到分隔符前面的实际单号
|
||||
let code = text.split('|')[0]
|
||||
uni.setClipboardData({
|
||||
data: code,
|
||||
success: function () {
|
||||
uni.showToast({
|
||||
title: "复制成功!",
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
// fail: function (err) {
|
||||
// console.error('复制失败:', err);
|
||||
// uni.showToast({
|
||||
// title: "复制失败!",
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
});
|
||||
},
|
||||
// 同步用户信息
|
||||
async handleUpdateUserInfo() {
|
||||
const userData = await this.$api.getCoop({
|
||||
@ -1261,6 +1298,8 @@ hr {
|
||||
|
||||
.order-info-t {
|
||||
color: #a7a7a7;
|
||||
display: inline-block;
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.appoint {
|
||||
|
||||
1
static/images/copyIcon.svg
Normal file
1
static/images/copyIcon.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1758503372770" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4946" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M725.333333 341.333333h128v512H341.333333v-128H213.333333V213.333333h512v128z m0 42.666667v341.333333H384v85.333334h426.666667V384h-85.333334zM256 256v426.666667h426.666667V256H256z" fill="#4BCB7E" p-id="4947"></path></svg>
|
||||
|
After Width: | Height: | Size: 556 B |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -125,6 +125,29 @@ var render = function () {
|
||||
var _vm = this
|
||||
var _h = _vm.$createElement
|
||||
var _c = _vm._self._c || _h
|
||||
var g0 =
|
||||
_vm.isorder &&
|
||||
_vm.orderInfo.TAKE_TYPE === 2000 &&
|
||||
_vm.orderInfo.SALEBILL_STATE >= 2010 &&
|
||||
_vm.orderInfo.TABLE_NUMBER
|
||||
? _vm.orderInfo.TABLE_NUMBER.split("|")
|
||||
: null
|
||||
var g1 =
|
||||
_vm.isorder &&
|
||||
_vm.orderInfo.TAKE_TYPE === 2000 &&
|
||||
_vm.orderInfo.SALEBILL_STATE >= 2010 &&
|
||||
_vm.orderInfo.TABLE_NUMBER
|
||||
? _vm.orderInfo.TABLE_NUMBER.split("|")
|
||||
: null
|
||||
_vm.$mp.data = Object.assign(
|
||||
{},
|
||||
{
|
||||
$root: {
|
||||
g0: g0,
|
||||
g1: g1,
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
var recyclableRender = false
|
||||
var staticRenderFns = []
|
||||
@ -220,6 +243,30 @@ var _default = {
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
// 复制内容
|
||||
handleClipboard: function handleClipboard(text) {
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
// 拿到分隔符前面的实际单号
|
||||
var code = text.split('|')[0];
|
||||
uni.setClipboardData({
|
||||
data: code,
|
||||
success: function success() {
|
||||
uni.showToast({
|
||||
title: "复制成功!",
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// fail: function (err) {
|
||||
// console.error('复制失败:', err);
|
||||
// uni.showToast({
|
||||
// title: "复制失败!",
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
});
|
||||
},
|
||||
// 同步用户信息
|
||||
handleUpdateUserInfo: function handleUpdateUserInfo() {
|
||||
var _this2 = this;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -245,6 +245,8 @@ page.data-v-8f520710 {
|
||||
}
|
||||
.order-info-t.data-v-8f520710 {
|
||||
color: #a7a7a7;
|
||||
display: inline-block;
|
||||
width: 150rpx;
|
||||
}
|
||||
.appoint.data-v-8f520710 {
|
||||
display: flex;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user