From 03627defbc56d0498e7778523da255eb972db6a4 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 04 十二月 2025 10:25:03 +0800
Subject: [PATCH] 删除 安装包
---
qrcodeScaner/pages/ReportingWorkList/ReportingWorkList.vue | 145 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 145 insertions(+), 0 deletions(-)
diff --git a/qrcodeScaner/pages/ReportingWorkList/ReportingWorkList.vue b/qrcodeScaner/pages/ReportingWorkList/ReportingWorkList.vue
new file mode 100644
index 0000000..9258659
--- /dev/null
+++ b/qrcodeScaner/pages/ReportingWorkList/ReportingWorkList.vue
@@ -0,0 +1,145 @@
+<template>
+ <view style="width: 100%;height: 100%;">
+ <view >
+ <uni-datetime-picker
+ @change='changeTime'
+ v-model="datetimerange"
+ type="daterange"
+ rangeSeparator="/" />
+ </view>
+ <uni-table border stripe style='width:100%;height: 100%;overflow: auto;'>
+ <uni-tr>
+ <uni-th align="center">缂栬緫</uni-th>
+ <uni-th v-for='(item,keys,index) in reportingWorkTitle' align="center">{{item}}</uni-th>
+ </uni-tr>
+ <uni-tr v-for="items in reportingWorkList">
+ <uni-td align="center">
+ <button
+ @click='deleteReportingWorkClick(items.reportingWorkId,items.processId)'
+ class="uni-button"
+ size="mini"
+ type="warn">鍒犻櫎</button>
+ </uni-td>
+ <uni-td align="center" v-for='(item,keys) in reportingWorkTitle'>{{items[keys]}}</uni-td>
+
+ </uni-tr>
+ </uni-table>
+ </view>
+ <view>
+ <!-- 鎻愮ず淇℃伅寮圭獥 -->
+ <uni-popup ref="message" type="message">
+ <uni-popup-message :type="msgType" :message="messageText" :duration="2000" />
+ </uni-popup>
+ </view>
+
+ <uni-popup ref="popup" type="dialog">
+ <uni-popup-dialog mode="base"
+ :title="'鎻愮ず'"
+ type='warn'
+ content="纭畾鍒犻櫎鎶ュ伐!"
+ :before-close="true"
+ @close="close"
+ @confirm="confirm"/>
+ </uni-popup>
+</template>
+
+<script setup>
+ import { computed, onMounted,ref, watch } from 'vue'
+ import request from '../../utils/request'
+ import userInfo from '@/stores/userInfo'
+ const message = ref(null)
+ const msgType=ref('success')
+ const messageText=ref('')
+ const popup = ref(null)
+
+ const store=userInfo()
+ const reportingWorkList = ref([])
+ const reportingWorkTitle = ref({
+ reportingWorkId:"鎶ュ伐缂栧彿",
+ processId:'娴佺▼鍗�',
+ thisProcess:'宸ュ簭',
+ thisCompletedQuantity:'瀹屽伐',
+ thisWornQuantity:'娆$牬',
+ creator:'鐝粍'
+ })
+
+ //鐐瑰嚮鍒犻櫎鎸夐挳
+ let reportingWorkId = ref(null)
+ let processId = ref(null)
+
+ const datetimerange = ref([null,null])
+
+ onMounted(async() => {
+ await getReportingWorkList()
+ })
+
+ const changeTime = () => {
+ getReportingWorkList()
+ }
+
+ const getReportingWorkList = async () => {
+ const obj = {
+ userId:store.user.userId,//store.user.userId
+ process:store.user.address,//
+ searchDate:datetimerange.value
+ }
+ await request.post("/reportingWork/selectReportingWorkRecordByPhone",obj).then(res => {
+ datetimerange.value = res.data.date
+ reportingWorkList.value = res.data.data
+ }).catch(err => {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: err,
+ showCancel:false
+ });
+ })
+ }
+ const deleteReportingWorkClick = (reportingWorkId1,processId1) => {
+ reportingWorkId.value = reportingWorkId1
+ processId.value = processId1
+ popup.value.open()
+ }
+
+ const deleteReportingWork = (reportingWorkId,processId) => {
+ processId=processId.split('/')[0];
+ request.post(`/reportingWork/deleteWork/${reportingWorkId}/${processId}/${store.user.address}/${store.user.userId}/${store.user.userName}`).then(async res => {
+ if(res.code==='200' && res.data===true){
+
+ await getReportingWorkList()
+ messageToggle('success','鍒犻櫎鎴愬姛')
+ }else{
+ messageToggle('error','鍒犻櫎澶辫触锛岃妫�鏌ヤ笅宸ュ簭鏄惁宸叉姤宸ユ垨鑰呭凡琛ョ墖杩斿伐')
+ }
+ }).catch(err => {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: err,
+ showCancel:false
+ });
+ })
+ }
+
+ //鎻愮ず鎵撳紑
+ const messageToggle = (type,msg) =>{
+ msgType.value = type
+ messageText.value = msg
+ message.value.open()
+ }
+
+ const close = async () => {
+ await popup.value.close()
+ reportingWorkId.value = null
+ processId.value = null
+ }
+
+ const confirm = async () => {
+ await popup.value.close()
+ await deleteReportingWork(reportingWorkId.value,processId.value)
+ reportingWorkId.value = null
+ processId.value = null
+ }
+</script>
+
+<style>
+
+</style>
--
Gitblit v1.8.0