This commit is contained in:
ylj20011123 2025-09-22 14:14:12 +08:00
parent ac91a78c2d
commit 8e85589d36
61 changed files with 324 additions and 120 deletions

View File

@ -98,7 +98,8 @@
<!-- 快速标签卡片 --> <!-- 快速标签卡片 -->
<view class="form-card" v-if="tagList.length > 0"> <view class="form-card" v-if="tagList.length > 0">
<view class="card-header" style="margin-bottom: 24rpx;"> <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 class="card-icon">🏷</view>
</view> </view>
@ -128,8 +129,12 @@
</view> </view>
<!-- 图片上传区域 --> <!-- 图片上传区域 -->
<!-- 视频{{ videoList.length }}/3 -->
<view class="upload-section"> <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="upload-grid">
<view class="uploaded-image" v-for="(item, i) in imgsList" :key="i"> <view class="uploaded-image" v-for="(item, i) in imgsList" :key="i">
<image mode="aspectFill" :src='item' @click="seePhoto(item)"></image> <image mode="aspectFill" :src='item' @click="seePhoto(item)"></image>
@ -137,10 +142,18 @@
<text class="delete-icon">×</text> <text class="delete-icon">×</text>
</view> </view>
</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" <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> <view class="upload-icon">📷</view>
<text class="upload-text">添加图片</text> <text class="upload-text">添加图片/视频</text>
</view> </view>
</view> </view>
</view> </view>
@ -174,22 +187,24 @@ export default {
Info: '', Info: '',
PhoneNumber: '', PhoneNumber: '',
WechatOpenId: '', WechatOpenId: '',
// videoList: [],
imageArr: [] imageArr: []
}, },
imgsList: [], imgsList: [],
// videoList: [],
pageMsg: { pageMsg: {
serverPartName: '', serverPartName: '',
typeName: '投诉' typeName: '投诉'
}, },
// msgType: [{ type: 2000, name: '' }, { type: 4000, name: '' }, { type: 1000, name: '' }], // 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, typeIndex: 0,
serverIndex: 0, serverIndex: 0,
tagList: [], // tagList: [], //
selectTags: [], // selectTags: [], //
currentService: {}, // currentService: {}, //
detailSuggestion: {} // detailSuggestion: {} //
} }
}, },
computed: { computed: {
@ -334,6 +349,17 @@ export default {
this.pageMsg.typeName = this.msgType[index].name this.pageMsg.typeName = this.msgType[index].name
}, },
choeseImg() { choeseImg() {
// uni.chooseMedia({
// count: 1,
// mediaType: ['image', 'video'],
// sourceType: ['album', 'camera'],
// success: async (rs) => {
// console.log('rsrs', rs);
// }
// })
// return
if (this.detailSuggestion.SUGGESTION_ID) { if (this.detailSuggestion.SUGGESTION_ID) {
return return
} }
@ -345,18 +371,81 @@ export default {
return false return false
} }
uni.chooseImage({ // uni.chooseImage({
count: 1, uni.chooseMedia({
sizeType: ['original', 'compressed'], count: 9,
mediaType: ['image'], // , 'video'
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
maxDuration: 30,
camera: 'back',
success(rs) { success(rs) {
console.log('rs', rs) console.log('rs', rs)
_this.noPost = false _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
}
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: res.tempFilePath,
filePath: videoItem,
name: 'data',
success(res) {
let _data = JSON.parse(res.data)
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
},
fail(res) {
console.log(res)
_this.noPost = true
}
})
}
}
} 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({ uni.getImageInfo({
src: tempFilePath, src: tempFilePath[i].tempFilePath,
success(imgInfo) { success(imgInfo) {
console.log('imgInfoimgInfoimgInfo', imgInfo);
let quality = 100 let quality = 100
if (imgInfo.size > 1024 * 200) { if (imgInfo.size > 1024 * 200) {
quality = 1024 * 200 / imgInfo.size * 100 quality = 1024 * 200 / imgInfo.size * 100
@ -364,20 +453,23 @@ export default {
if (quality < 100 && tempFilePath.indexOf('.jpg') > -1) { if (quality < 100 && tempFilePath.indexOf('.jpg') > -1) {
uni.compressImage({ uni.compressImage({
src: tempFilePath, // src: tempFilePath,
src: imgInfo.path,
quality: quality, quality: quality,
success(res) { success(res) {
console.log('resresresres312312', res);
uni.showLoading({ uni.showLoading({
title: '图片上传中...', title: '图片上传中...',
mask: true mask: true
}) })
uni.uploadFile({ uni.uploadFile({
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion', url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
filePath: res.tempFilePath, // filePath: res.tempFilePath,
filePath: imgInfo.path,
name: 'data', name: 'data',
success(res) { success(res) {
let _data = JSON.parse(res.data) let _data = JSON.parse(res.data)
_this.imgsList.push(tempFilePath) _this.imgsList.push(imgInfo.path)
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH) _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
uni.hideLoading() uni.hideLoading()
_this.noPost = true _this.noPost = true
@ -394,17 +486,19 @@ export default {
} }
}) })
} else { } else {
console.log('imgInfoimgInfoimgInfo312312', imgInfo);
uni.showLoading({ uni.showLoading({
title: '图片上传中...', title: '图片上传中...',
mask: true mask: true
}) })
uni.uploadFile({ uni.uploadFile({
url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion', url: 'https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=suggestion',
filePath: tempFilePath, // filePath: tempFilePath,
filePath: imgInfo.path,
name: 'data', name: 'data',
success(res) { success(res) {
let _data = JSON.parse(res.data) let _data = JSON.parse(res.data)
_this.imgsList.push(tempFilePath) _this.imgsList.push(imgInfo.path)
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH) _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH)
uni.hideLoading() uni.hideLoading()
_this.noPost = true _this.noPost = true
@ -415,9 +509,21 @@ export default {
} }
}) })
} }
},
fail(error) {
console.log('errorerrorerrorerror', error);
} }
}) })
} }
}
} else {
uni.showToast({
title: '暂不支持上传该类文件格式',
icon: 'none'
})
}
}
}) })
}, },
seePhoto(item) { seePhoto(item) {
@ -906,6 +1012,12 @@ export default {
font-weight: 500; font-weight: 500;
} }
.upload-notice {
font-size: 24rpx;
color: red;
font-weight: 500;
}
.upload-grid { .upload-grid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -914,8 +1026,9 @@ export default {
.uploaded-image { .uploaded-image {
position: relative; position: relative;
width: 160rpx; // width: 160rpx;
height: 160rpx; width: calc((100vw - 160rpx) / 3);
height: calc((100vw - 160rpx) / 3);
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
@ -948,8 +1061,10 @@ export default {
} }
.upload-btn { .upload-btn {
width: 160rpx; // width: 160rpx;
height: 160rpx; // height: 160rpx;
width: calc((100vw - 160rpx) / 3);
height: calc((100vw - 160rpx) / 3);
border: 4rpx dashed #bdc3c7; border: 4rpx dashed #bdc3c7;
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;

View File

@ -86,7 +86,21 @@
</p> </p>
<p class="order-info-type" v-if="orderInfo.TAKE_TYPE === 2000 && orderInfo.SALEBILL_STATE >= 2010"> <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;">
<!-- DPK364834414005DPK364834414006 -->
{{ 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> </p>
<!-- 原来的订单编码 -> 支付单号 <!-- 原来的订单编码 -> 支付单号
@ -266,7 +280,30 @@ export default {
}, },
}, },
methods: { 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() { async handleUpdateUserInfo() {
const userData = await this.$api.getCoop({ const userData = await this.$api.getCoop({
@ -1261,6 +1298,8 @@ hr {
.order-info-t { .order-info-t {
color: #a7a7a7; color: #a7a7a7;
display: inline-block;
width: 150rpx;
} }
.appoint { .appoint {

View 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

View File

@ -125,6 +125,29 @@ var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h 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 recyclableRender = false
var staticRenderFns = [] var staticRenderFns = []
@ -220,6 +243,30 @@ var _default = {
} }
}), }),
methods: { 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() { handleUpdateUserInfo: function handleUpdateUserInfo() {
var _this2 = this; var _this2 = this;

File diff suppressed because one or more lines are too long

View File

@ -245,6 +245,8 @@ page.data-v-8f520710 {
} }
.order-info-t.data-v-8f520710 { .order-info-t.data-v-8f520710 {
color: #a7a7a7; color: #a7a7a7;
display: inline-block;
width: 150rpx;
} }
.appoint.data-v-8f520710 { .appoint.data-v-8f520710 {
display: flex; display: flex;