From 4e2724cb51fe4247d9c28cdf54b45337b057da73 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 19 一月 2026 14:05:05 +0800
Subject: [PATCH] 多级审核添加附件上传和反审核意见提交功能
---
pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue | 140 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 137 insertions(+), 3 deletions(-)
diff --git a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
index 6dc23a8..456e57f 100644
--- a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
+++ b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
@@ -69,7 +69,8 @@
<view class="op" v-if="operations == index">
<button class="op3" size="mini" plain @tap.stop="audit(item, 0)">瀹℃牳</button>
<button class="op3" size="mini" plain @tap.stop="audit(item, 1)">鍙嶅鏍�</button>
- <button class="op3" size="mini" plain @tap.stop="fileUpload()">鏂囦欢涓婁紶</button>
+ <button class="op3" size="mini" plain @tap.stop="fileUpload(item)">鏂囦欢涓婁紶</button>
+ <button class="op3" size="mini" plain @tap.stop="getImage(item)">棰勮鍥剧墖</button>
<!-- <button class="op3" size="mini" plain @tap.stop="Reject(item)">椹冲洖</button> -->
<button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
</view>
@@ -98,8 +99,17 @@
return {
showDetail: -1,
operations : -1,
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
//涓婁紶鍙傛暟
- uploadOptions: {},
+ uploadOptions: {
+ url: CommonUtils.getServerUrl() + "/LMES/UploadFile",
+ formData: {
+ HBillNo:"",
+ HRemark: "",
+ HUserName: getUserInfo()["Czymc"]
+ }
+
+ },
hform: {
HSourceBillType:'8505',
HSourceBillTypeName: "棣栦欢妫�楠屽崟",
@@ -255,9 +265,13 @@
let {count, data, Message} = res.data
if(count == 1) {
+
CommonUtils.showTips({
message: `瀹℃牳鎴愬姛`
})
+ if(mode==1){
+ this.showDialog(item["hmainid"]);
+ }
this.$forceUpdate()
setTimeout(() => {
this.cmdSearch()
@@ -337,7 +351,127 @@
})
},
-
+ //鍙嶅鏍告彁浜ゆ剰瑙�
+ showDialog(HInterID) {
+ uni.showModal({
+ title: '璇锋彁浜ゅ弽瀹℃牳鎰忚',
+ editable: true,
+ placeholderText: '璇疯緭鍏ュ唴瀹�',
+ success: (result) => {
+ if (result.confirm) {
+ try {
+ let res = CommonUtils.doRequest2Sync({
+ url: '/LMES/AuditFlowOpinion',
+ data: {
+ "sWhere": result.content,
+ "billType":this.hform.HSourceBillType,
+ "HInterID":HInterID,
+ "type":1,
+ "user": getUserInfo()["Czymc"]
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ }
+ }
+ })
+ },
+ // 涓婁紶鏂囦欢
+ fileUpload(item) {
+ this.uploadOptions.formData.HBillNo = item.鍗曟嵁鍙�
+ this.$refs.XeUpload.upload('image', {});// image, video, file
+ },
+ handleUploadCallback(e) { // 鏂囦欢涓婁紶鍥炶皟
+ console.log('file: ', e);
+ if (['choose', 'success'].includes(e.type)) {
+ // 鏍规嵁鎺ュ彛杩斿洖淇敼瀵瑰簲鐨剅esponse鐩稿叧鐨勯�昏緫
+ const tmpFiles = (e.data || []).map(({ response, tempFilePath, name, fileType }) => {
+
+ if(response.code=="1"){
+ CommonUtils.showTips({
+ message: "涓婁紶鎴愬姛"
+ })
+ }else{
+ CommonUtils.showTips({
+ message: "涓婁紶澶辫触"+response.Message
+ })
+ }
+ });
+ }
+ },
+ async getImage(item) {//棰勮鍥剧墖
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/LMES/Filelist',
+ data: {
+ "HBillNo": item.鍗曟嵁鍙�,
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ if(data.length>0){
+ const imageUrl = res.data.data[0]["url"];
+ //姝e垯琛ㄨ揪寮忚幏鍙栨湇鍔″櫒璺緞鍊掓暟绗簩涓唴瀹�
+ const regex = /^(.*\/)[^\/]+\/[^\/]*\/?$/;
+ const match = this.serverUrl.match(regex);
+ console.log(match[1],imageUrl)
+ // 鎴栬�呯洿鎺ラ瑙堝浘鐗�
+ uni.previewImage({
+ urls: [match[1]+imageUrl]
+ })
+ }else{
+ CommonUtils.showTips({
+ message: "鏃犲浘鐗囪鍏堜笂浼犲浘鐗�"
+ })
+ }
+
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ }
},
onShow() {
this.$nextTick(() => {
--
Gitblit v1.9.1