From b85a5a6d1507010ff60a5c0ca3ac32373ae1a8c0 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 22 一月 2026 19:38:20 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue | 453 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 418 insertions(+), 35 deletions(-)
diff --git a/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue
index 1678a02..f48127b 100644
--- a/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue
+++ b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue
@@ -4,7 +4,7 @@
<view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">鍩烘湰淇℃伅</view>
<!-- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">鏄庣粏淇℃伅</view> -->
<view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鍏朵粬淇℃伅</view>
- <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">闄勪欢淇℃伅</view> -->
+ <view v-if="operationType==5" :class="tabs == 3 ? 'on':''" @tap="tabs = 3">鍥炲娑堟伅</view>
</view>
<!-- 鍩烘湰淇℃伅 -->
<template v-if="tabs == 0">
@@ -14,50 +14,62 @@
}">
<view class="form-item">
<view class="title">涓婚:</view>
- <view class="right">
+ <view class="right" v-if="operationType!=5">
<input type="text" v-model="hform.HContext" placeholder="璇疯緭鍏ヤ富棰�..." />
+ </view>
+ <view class="righton" v-else>
+ <input type="text" disabled v-model="hform.HContext" placeholder="璇疯緭鍏ヤ富棰�..." />
</view>
</view>
<view class="form-item">
<view class="title">鍙戦�佷汉:</view>
- <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName"
- v-model="hform.HSendMan" :filterable="true">
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HName" v-model="hform.HSendMan" :filterable="true">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view class="righton" v-else>
+ <input disabled v-model="hform.HSendMan" />
+ </view>
</view>
<view class="form-item">
<view class="title">鎺ユ敹浜�:</view>
- <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName"
- v-model="hform.HReceiveMan" :filterable="true">
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HName" v-model="hform.HReceiveMan" :filterable="true">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view class="righton" v-else>
+ <input disabled v-model="hform.HReceiveMan" />
+ </view>
</view>
<view class="form-item">
<view class="title">绱ф�ョ被鍨�:</view>
- <zxz-uni-data-select class="right" :localdata="[
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="[
{value: '鏅��'},
{value: '绱ф��'}
]" dataKey="value" dataValue="value" v-model="hform.HLevel">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view class="righton" v-else>
+ <input disabled v-model="hform.HLevel" />
+ </view>
</view>
<view class="form-item">
<view class="title">鍙戦�佺被鍨�:</view>
- <zxz-uni-data-select class="right" :localdata="[
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="[
{value: '鍏叡'},
{value: '涓汉'}
]" dataKey="value" dataValue="value" v-model="hform.HSendType">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view class="righton" v-else>
+ <input disabled v-model="hform.HSendType" />
+ </view>
</view>
<view class="form-item">
<view class="title">鎶勯�佷汉:</view>
- <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName"
- :filterable="true"
- :multiple="true" placeholder="璇烽�夋嫨鎶勯�佷汉..."
- @input="HCopyManChange">
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HName" :filterable="true" :multiple="true" placeholder="璇烽�夋嫨鎶勯�佷汉..."
+ @input="HCopyManChange">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view class="righton" v-else>
+ <input disabled v-model="hform.HCopyMan" />
+ </view>
</view>
<view class="form-item">
<view class="title">鍗曟嵁鍙�:</view>
@@ -73,33 +85,42 @@
</view>
<view class="form-item">
<view class="title">鎺ㄨ崘瀹屾垚鏃ユ湡:</view>
- <view class="right">
+ <view class="right" v-if="operationType!=5">
<uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HCommDate">
<input :value="hform.HCommDate" />
</uni-datetime-picker>
</view>
+ <view class="righton" v-else>
+ <input disabled :value="hform.HCommDate" />
+ </view>
</view>
<view class="form-item">
<view class="title">鍙戦�侀儴闂�:</view>
- <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О" dataValue="HItemID"
- v-model="hform.HDeptID" :filterable="true">
-
+ <zxz-uni-data-select v-if="operationType!=5" class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
+ dataValue="HItemID" v-model="hform.HDeptID" :filterable="true">
</zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ <view v-else class="righton">
+ <input disabled v-model="hform.HDeptName" />
+ </view>
</view>
<view class="form-item">
<view class="title">璇︾粏鍐呭:</view>
- <view class="right">
+ <view class="right" v-if="operationType!=5">
<textarea v-model="hform.HDescription" placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" />
+ </view>
+ <view class="righton" v-else>
+ <textarea disabled v-model="hform.HDescription" placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" />
</view>
</view>
<view class="form-item">
<view class="title">澶囨敞:</view>
- <view class="right">
+ <view class="right" v-if="operationType!=5">
<textarea v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" />
</view>
+ <view class="righton" v-else>
+ <textarea disabled v-model="hform.HRemark" placeholder="璇疯緭鍏ヨ缁嗗唴瀹�" />
+ </view>
</view>
-
</view>
</template>
<!-- 鍏朵粬淇℃伅 -->
@@ -157,10 +178,87 @@
</view>
</view>
</view>
+ </template>
+ <!-- 鍥炲娑堟伅 -->
+ <template v-if="tabs == 3 && operationType == 5">
+ <view class="form" :style="{
+ height: containerHeight + 'px',
+ overflow: 'auto'
+ }">
+ <view class="form-item">
+ <view class="title" style="width: 4em;">鍥炲:</view>
+ <view class="right">
+ <textarea v-model="replyContent" placeholder="璇疯緭鍏ュ洖澶�" />
+ </view>
+ </view>
+ <!-- 鍥炲娑堟伅鍒楄〃 -->
+ <view class="list" v-for="(item,index) in HReplyList" :key="index">
+ <uni-card style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <template
+ v-for="(HBillField, index) in CommonUtils.emptyValueFilter(item,HFieldList).slice(0,10)">
+ <view class="detail" v-if="HBillField.ColmType == 'DateTime'">
+ <text>{{ HBillField.ColmCols }}锛�</text>{{ item[HBillField.ColmCols] ? dayjs(item[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }}
+ </view>
+ <view class="detail" v-else>
+ <text>{{ HBillField.ColmCols }}锛�</text>{{ item[HBillField.ColmCols] }}
+ </view>
+ </template>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view class="card-detail">
+ <template
+ v-for="(HBillField, index) in CommonUtils.emptyValueFilter(item,HFieldList).slice(10,-1)">
+ <view class="detail" v-if="HBillField.ColmType == 'DateTime'">
+ <text>{{ HBillField.ColmCols }}锛�</text>{{ item[HBillField.ColmCols] ? dayjs(item[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }}
+ </view>
+ <view class="detail" v-else>
+ <text>{{ HBillField.ColmCols }}锛�</text>{{ item[HBillField.ColmCols] }}
+ </view>
+ </template>
+
+ </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="edit(item)">缂栬緫</button> -->
+ <!-- <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button> -->
+ <button class="op3" size="mini" plain @tap.stop="VerPass(item)">楠岃瘉閫氳繃</button>
+ <button class="op1" size="mini" plain @tap.stop="Closed(item)">缁撴</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="HReplyList.length == 0">鏆傛棤鏁版嵁</view>
+ </view>
</template>
<!-- 鎿嶄綔鎸夐挳 -->
- <view class="buttons" id="buttons">
+ <view class="buttons" id="buttons" v-if="operationType == 5">
+ <button class="btn-a" size="mini" @tap="replySubmit">鍥炲</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+ <view class="buttons" id="buttons" v-else>
<button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
<view style="flex: 1;"></view>
<button class="btn-a" size="mini" @tap="addNew">鏂板</button>
@@ -187,6 +285,8 @@
name: 'OA_WorkLinkBill',
data() {
return {
+ CommonUtils,
+ dayjs,
tabs: 0,
HMainSourceBillType: "",
btnTop: 0,
@@ -197,6 +297,8 @@
refSav: 'Add', // 鎵ц鎻愪氦鐨勬搷浣滅被鍨嬶紝涓巓perationType绫讳技
enableEdit: true,
uploadOptions: {},
+ showDetail: -1,
+ operations: -1,
HEmpList: [],
HDeptList: [],
@@ -204,6 +306,9 @@
HCheckFileList: [],
attachmentInfo: [],
+ replyContent: "",
+ HReplyList: [],
+ HFieldList: [],
hform: {
HBarCode: "",
HBillNo: "",
@@ -424,7 +529,228 @@
message: "鎻愪氦鍗曟嵁澶辫触: " + err
})
}
- }
+ },
+ async replySubmit() {
+ let valid = this.ValidCheck()
+ if (!valid.state) {
+ return CommonUtils.showTips({
+ message: valid.Message
+ })
+ }
+
+ try {
+ let oMain = this.hform;
+ oMain["HDescriptionMain"] = oMain.HDescription
+ oMain["HDescription"] = this.replyContent
+ oMain = JSON.stringify(oMain)
+ let sMainSub = oMain + ';' + getUserInfo()['Czymc'] + ';Update';
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sc_MESTransFerWorkBill/ReplyOA_WorkLinkBill",
+ data: {
+ "msg": sMainSub
+ },
+ method: "POST"
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: './OA_WorkLinkBill?operationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
+
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ },
+ async VerPass(item) {
+ console.log('VerPass item: ', item);
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillSubStatus",
+ data: {
+ HInterID: item.HInterID,
+ HEntryID: item.HEntryID,
+ Type: 10
+ }
+ })
+
+ if (res.data.count == 1) {
+ this.GetOA_WorkLinkBillSub(this.hform.HInterID)
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `楠岃瘉鍥炲澶辫触: ${res.data.Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `楠岃瘉鍥炲澶辫触: ${err}`
+ })
+ }
+ },
+ async Closed(item) {
+ console.log('Closed item: ', item);
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillSubStatus",
+ data: {
+ HInterID: item.HInterID,
+ HEntryID: item.HEntryID,
+ Type: 9
+ }
+ })
+
+ if (res.data.count == 1) {
+ this.GetOA_WorkLinkBillSub(this.hform.HInterID)
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `缁撴澶辫触: ${res.data.Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `缁撴澶辫触: ${err}`
+ })
+ }
+ },
+ // 鑾峰彇宸ヤ綔鑱旂郴鍗�
+ async getWorkLinkBill(HInterID, HEntryID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListCheckDetai",
+ data: {
+ HID: HInterID
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+
+ if (count == 1) {
+ // console.log('data[0]: ',data[0]);
+ Object.assign(this.hform, data[0])
+ this.hform.HInterID = HInterID
+ this.hform.HEntryID = HEntryID
+ this.tabs = 3
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ヤ綔鑱旂郴鍗曞け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇宸ヤ綔鑱旂郴鍗曞け璐�: ${err}`
+ })
+ }
+ },
+ // 鑾峰彇鍥炲鍗曟嵁鍒楄〃
+ async GetOA_WorkLinkBillSub(HInterID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MESTransFerWorkBill/GetOA_WorkLinkBillSub",
+ data: {
+ HInterID: HInterID,
+ user: getUserInfo()["Czymc"]
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message,
+ list
+ } = res.data
+
+ if (count == 1) {
+ // console.log('data[0]: ',data[0]);
+ this.HReplyList = data
+ this.HFieldList = CommonUtils.fieldListFilterRole({
+ FieldList: list,
+ ExcludeKeys: []
+ }).data
+
+ console.log('this.HFieldList: ', this.HFieldList);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鍥炲淇℃伅澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鍥炲淇℃伅澶辫触: ${err}`
+ })
+ }
+ },
+ async updateWorkLink(HInterID, HEntryID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_MESTransFerWorkBill/UpdateOA_WorkLinkBillFlagMessage",
+ data: {
+ HInterID,
+ HEntryID
+ }
+ })
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ // this.switchTab(this.tabs)
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鏇存柊宸ヤ綔鑱旂郴鍗曞け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鏇存柊宸ヤ綔鑱旂郴鍗曞け璐�: ${err}`
+ })
+ }
+ },
},
async onLoad(e) {
console.log('e: ', e);
@@ -445,15 +771,20 @@
} else if (this.operationType == 4) {
// 娴忚
+ } else if (this.operationType == 5) {
+ // 鍥炲
+ let HInterID = e.HInterID
+ let HEntryID = e.HEntryID
+ uni.setNavigationBarTitle({
+ title: "宸ヤ綔鑱旂郴鍗曞洖澶�"
+ })
+ this.getWorkLinkBill(HInterID, HEntryID)
+ this.GetOA_WorkLinkBillSub(HInterID)
+ this.updateWorkLink(HInterID, HEntryID)
}
-
+
this.getHDeptList()
- try {
- this.HEmpList = await getEmpList()
- } catch (err) {
-
- }
-
+ this.HEmpList = await getEmpList()
},
onReady() {
const query = uni.createSelectorQuery().in(this)
@@ -470,5 +801,57 @@
</script>
<style lang="scss" scoped>
- @import "@/pages/ZLGL/style/MJBillStyle.scss"
+ @import "@/pages/ZLGL/style/MJBillStyle.scss";
+
+ .more {
+ color: #888;
+ font-size: 26rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-around;
+ margin-top: 20rpx;
+
+ button {
+ padding: 0;
+ width: 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;
+ }
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1