From 65e9ccf12e710dcdea9d46bf2b47e6aa8c10ec28 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 31 十二月 2025 13:43:41 +0800
Subject: [PATCH] 添加已审核
---
pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue | 544 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
pages.json | 8
pages/index/mine.vue | 2
3 files changed, 553 insertions(+), 1 deletions(-)
diff --git a/pages.json b/pages.json
index d78292c..22f041a 100644
--- a/pages.json
+++ b/pages.json
@@ -1341,6 +1341,14 @@
"enablePullDownRefresh": true
}
},
+ {
+ "path" : "pages/ZLGL/checkFlowList/QC_CheckedBillflowList",
+ "style" :
+ {
+ "navigationBarTitleText" : "宸插鏍�",
+ "enablePullDownRefresh": true
+ }
+ },
{
"path" : "pages/MJGL/Gy_MouldFile/Gy_MouldFileList",
"style" :
diff --git a/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue b/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue
new file mode 100644
index 0000000..d2e6f78
--- /dev/null
+++ b/pages/ZLGL/checkFlowList/QC_CheckedBillflowList.vue
@@ -0,0 +1,544 @@
+<template>
+ <view class="page" id="pageContent">
+ <view class="search-condition-zone">
+ <view class="form-item">
+ <view class="left">婧愬崟绫诲瀷</view>
+
+ <uni-combox :candidates="arrayHSourceBillTypeName" placeholder="璇烽�夋嫨婧愬崟绫诲瀷" v-model="hform.HSourceBillTypeName"
+ @input="HSourceBillTypeNameChange"></uni-combox>
+ </view>
+ <view class="form-item">
+ <view class="left">
+ 鍗曟嵁鍙�:
+ </view>
+ <view class="right general">
+ <input type="text" v-model="hform.HBillNo" />
+ </view>
+ </view>
+ </view>
+ <view class="button-zone">
+ <button type="default" class="btn-a" size="mini" @tap="cmdSearch">鏌ヨ</button>
+ <button type="default" class="btn-c" size="mini" @tap="exit">閫�鍑�</button>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="card-item" v-for="(item, index) in showList" :key="index">
+ <uni-card :title="item['鍗曟嵁鍙�']" :extra="'鏃ユ湡:' + item['鏃ユ湡'].split('T')[0]"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <!-- 鍔ㄦ�佺敓鎴愭墍鏈夐潪绌哄瓧娈� -->
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex<=10 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view
+ class="detail"
+ v-for="(value, key,keyIndex) in item"
+ :key="key"
+ v-if="keyIndex>=15 && shouldShowField(key, value)"
+ >
+ <text>{{ formatFieldName(key) }}锛�</text>{{ value }}
+ </view>
+
+ </view>
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <button class="op3" size="mini" plain @tap.stop="audit(item, 1)">鍙嶅鏍�</button>
+ <button class="op3" size="mini" plain @tap.stop="Reject(item)">椹冲洖</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ <view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
+ <view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
+
+
+ </view>
+</template>
+
+<script>
+ import {
+ CommonUtils
+ } from '@/utils/common'
+ import {
+ getUserInfo
+ } from '@/utils/auth'
+ import dayjs, {
+ Dayjs
+ } from 'dayjs'
+ export default {
+ data() {
+ return {
+ showDetail: -1,
+ operations : -1,
+ hform: {
+ HSourceBillType:'8505',
+ HSourceBillTypeName: "棣栦欢妫�楠屽崟",
+ HBillNo: ''
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ page: 1,
+ HSourceBillTypeList: {棣栦欢妫�楠屽崟:'8505',鏈欢妫�楠屽崟:'8507'},
+ arrayHSourceBillTypeName: [
+ "棣栦欢妫�楠屽崟",
+ "鏈欢妫�楠屽崟",
+ ],
+ }
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page, this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.cmdSearch()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ computed: {
+
+ },
+ methods: {
+ // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+ shouldShowField(key, value) {
+ // 鎺掗櫎涓嶉渶瑕佹樉绀虹殑瀛楁
+ const excludeKeys = ['鍗曟嵁鍙�', '鏃ユ湡']; // 杩欎簺瀛楁宸茬粡鍦ㄥ叾浠栧湴鏂规樉绀轰簡
+
+ // 鍒ゆ柇key鏄惁鍏ㄨ嫳鏂囷紙涓嶅寘鍚腑鏂囷級
+ const isAllEnglish = /^[a-zA-Z]+$/.test(key);
+
+ // 鍒ゆ柇key鏄惁鍖呭惈"ID"锛堜笉鍖哄垎澶у皬鍐欙級
+ const containsID = key.toUpperCase().includes('ID');
+
+ return !excludeKeys.includes(key) &&
+ !isAllEnglish && // 鎺掗櫎鍏ㄨ嫳鏂囩殑key
+ !containsID && // 鎺掗櫎鍖呭惈ID鐨刱ey
+ value !== null &&
+ value !== undefined &&
+ value !== '';
+ },
+
+ // 鏍煎紡鍖栧瓧娈靛悕鏄剧ず
+ formatFieldName(key) {
+ // 浣犲彲浠ユ牴鎹渶姹傝嚜瀹氫箟鏄剧ず鍚嶇О
+ const nameMap = {
+ '鐗╂枡浠g爜': '鐗╂枡浠g爜',
+ '鐗╂枡鍚嶇О': '鐗╂枡鍚嶇О',
+ '瑙勬牸鍨嬪彿': '瑙勬牸鍨嬪彿',
+ // ... 鍏朵粬瀛楁鏄犲皠
+ };
+ return nameMap[key] || key;
+ },
+ HSourceBillTypeNameChange(e) {
+ console.log(e);
+ this.hform.HSourceBillType = this.HSourceBillTypeList[this.hform.HSourceBillTypeName];
+ console.log(this.hform.HSourceBillType);
+ this.cmdSearch();
+ },
+ exit() {
+ uni.navigateBack()
+ },
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex, eindex)
+ return newList
+ },
+ async cmdSearch() {
+ let sWhere = ' '
+
+ if (this.hform.HBillNo != "") {
+ sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'"
+ }
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: '/LEMS/CheckFlowList',
+ data: {
+ "sWhere": sWhere,
+ "billType":this.hform.HSourceBillType,
+ "type":3,
+ "userid": getUserInfo()["Czybm"]
+ },
+ })
+ if (!res) {
+ return
+ }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count > 0) {
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page, this.listData)
+
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ } catch (err) {
+ console.warn(err);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触:' + err,
+ icon: 'none'
+ })
+ }
+ },
+
+ async audit(item, mode) {
+ console.log('瀹℃牳鍗曟嵁: ',item);
+ let url = '';
+ let ajaxData = '';
+ if(this.hform.HSourceBillType=='8505'){
+ url = 'QC_FirstPieceCheckBill/AuditFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ IsAudit: mode,
+ CurUserName: getUserInfo()["Czymc"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }else if(this.hform.HSourceBillType=='8507'){
+ url = 'QC_ProcessCheckBill/AuditFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ IsAudit: mode,
+ CurUserName: getUserInfo()["Czymc"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }
+ try{
+ let res = await CommonUtils.doRequest2Sync({
+ method: 'GET',
+ url: url,
+ data: ajaxData
+ })
+
+ if(!res) {
+ return
+ }
+
+ let {count, data, Message} = res.data
+
+ if(count == 1) {
+ CommonUtils.showTips({
+ message: `瀹℃牳鎴愬姛`
+ })
+ this.$forceUpdate()
+ setTimeout(() => {
+ this.cmdSearch()
+ }, 2000)
+ }else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `瀹℃牳澶辫触: ${Message}`
+ })
+ }
+ }catch(err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鍗曟嵁瀹℃牳鍑虹幇閿欒: ${err}`
+ })
+ }
+ },
+ async Reject(item) {
+ console.log("delItem: ", item);
+ let url = '';
+ let ajaxData = '';
+ if(this.hform.HSourceBillType=='8505'){
+ url = 'QC_FirstPieceCheckBill/RejectCheckFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }else if(this.hform.HSourceBillType=='8507'){
+ url = 'QC_ProcessCheckBill/RejectCheckFlow',
+ ajaxData= {
+ HInterID: item["hmainid"],
+ CurUserID:getUserInfo()["Czybm"],
+ }
+ }
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕侀┏鍥炶褰曪紵',
+ success: async (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: url,
+ data: ajaxData
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ code,
+ Message
+ } = res.data
+ if (count == 0) {
+ return uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `椹冲洖閿欒: ${Message}`,
+ showCancel: false
+ })
+ }
+ uni.showToast({
+ title: '椹冲洖鎴愬姛',
+ icon: 'none'
+ })
+ this.cmdSearch()
+ } catch (err) {
+ uni.showModal({
+ title: '閿欒鎻愮ず',
+ content: `鎺ュ彛璇锋眰澶辫触: ${err}`,
+ showCancel: false
+ })
+ }
+ }
+ },
+ })
+
+ },
+
+ },
+ onShow() {
+ this.$nextTick(() => {
+ this.cmdSearch()
+ })
+ },
+
+ }
+</script>
+
+<style lang="scss" scoped>
+ .page {
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ padding: 20rpx 0;
+ position: relative;
+
+ .button-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding-top: 20rpx;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #ff5722;
+ color: #fff;
+ }
+ }
+
+ .search-condition-zone {
+ height: auto;
+ box-sizing: border-box;
+ padding: 0 60rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .form-item {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ align-items: center;
+ font-size: 28rpx;
+
+ .left {
+ width: 4rem;
+ }
+
+ .right {
+ flex: 1;
+ padding: 8rpx 16rpx;
+
+ .search {
+ width: 28rpx;
+ height: 28rpx;
+ }
+
+ input {
+ font-size: 28rpx;
+ }
+
+ .uni-combox {
+ padding: 0;
+ margin: 0;
+
+ ::v-deep .uni-combox__input {
+ font-size: 28rpx;
+ height: auto;
+ }
+ }
+ }
+
+ .general {
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .disabled {
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+ }
+ }
+
+ .info-list-zone {
+ overflow-y: auto;
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .more {
+ color: #888;
+ font-size: 24rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ text-align: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-between;
+ gap: 20rpx;
+ margin-top: 20rpx;
+ flex-wrap: wrap;
+ align-content: flex-start;
+ button {
+ margin: 0;
+ flex-shrink: 0;
+ padding: 0;
+ width: 150rpx;
+ flex-basis: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+
+ .pagination-zone {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 20rpx 40rpx 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/index/mine.vue b/pages/index/mine.vue
index ff8cc08..7ffbc22 100644
--- a/pages/index/mine.vue
+++ b/pages/index/mine.vue
@@ -45,7 +45,7 @@
},{
img:'../../static/icon01.png',
text:'宸插鏍�',
- url:'',
+ url:'/pages/ZLGL/checkFlowList/QC_CheckedBillflowList',
id:1
},{
img:'../../static/icon06.png',
--
Gitblit v1.9.1