chenhaozhe
2026-01-22 338ba5bb8d76eb391621ae2830fa8802347c224b
添加 工作联系单 查询模块
1个文件已添加
6个文件已修改
780 ■■■■■ 已修改文件
pages.json 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sc_OEEStatusReport/Sc_OEEStatusReport.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue 415 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery.vue 271 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/baogong/OA_ErrMsgBackBill.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -230,13 +230,13 @@
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/baogong/OA_ErrMsgBackBill",
            "style": {
                "navigationBarTitleText": "异常反馈单",
                "enablePullDownRefresh": false
            }
        },
        // {
        //     "path": "pages/baogong/OA_ErrMsgBackBill",
        //     "style": {
        //         "navigationBarTitleText": "异常反馈单",
        //         "enablePullDownRefresh": false
        //     }
        // },
        {
            "path": "pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList",
            "style": {
@@ -1247,32 +1247,32 @@
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBillList",
            "style": {
                "navigationBarTitleText": "模具维修记录单列表",
                "enablePullDownRefresh": true
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldRepairWorkBill/Sc_MouldRepairWorkBill",
            "style": {
                "navigationBarTitleText": "模具维修记录单"
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBill",
            "style": {
                "navigationBarTitleText": "模具故障登记单"
        // {
        //     "path": "pages/weixiujilu/mouldRepairRecordBillList",
        //     "style": {
        //         "navigationBarTitleText": "模具维修记录",
        //         "enablePullDownRefresh": true
        //     }
        // },
        // {
        //     "path": "pages/weixiujilu/mouldRepairRecordBill",
        //     "style": {
        //         "navigationBarTitleText": "模具维修记录单"
        //     }
        // },
        // {
        //     "path": "pages/qijvguzhangdengji/mouldMistake",
        //     "style": {
        //         "navigationBarTitleText": "模具故障登记"
            }
        },
        {
            "path": "pages/MJGL/Sc_MouldConkBookBill/Sc_MouldConkBookBillList",
            "style": {
                "navigationBarTitleText": "模具故障登记单列表"
            }
        },
        //     }
        // },
        // {
        //     "path": "pages/qijvguzhangdengji/mouldMistakeBill",
        //     "style": {
        //         "navigationBarTitleText": "模具故障登记单"
        //     }
        // },
        {
            "path": "pages/chaixiang/form",
            "style": {
@@ -1556,19 +1556,23 @@
        },
        {
            "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill",
            "style": {
                "navigationBarTitleText" : "工作联系单"
            }
        },
        {
            "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList",
            "style": {
                "navigationBarTitleText" : "工作联系单列表"
            }
        },
        {
            "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery",
            "style": {
                "navigationBarTitleText" : "工作联系单查询"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport",
            "style": {
pages/MJGL/Sc_OEEStatusReport/Sc_OEEStatusReport.vue
@@ -22,8 +22,8 @@
            <view class="over" v-if="reportBillsDisplay.length == 0">暂无数据</view>
        </view>
        <!-- OEE 折线图 -->
        <view v-show="tabs == 1" style="padding: 40rpx 0;">
            <view style="width:750rpx; height:750rpx"><l-echart ref="chartRef" @finished="initChart()"></l-echart>
        <view v-show="tabs == 1" class="graph-container" style="padding: 40rpx 0; text-align: center;">
            <view class="graph"><l-echart ref="chartRef" @finished="initChart()"></l-echart>
            </view>
        </view>
    </view>
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="请选择抄送人..."
                    <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', // 执行提交的操作类型,与operationType类似
                enableEdit: true,
                uploadOptions: {},
                showDetail: -1,
                operations: -1,
                HEmpList: [],
                HDeptList: [],
@@ -204,6 +306,9 @@
                HCheckFileList: [],
                attachmentInfo: [],
                replyContent: "",
                HReplyList: [],
                HFieldList: [],
                hform: {
                    HBarCode: "",
                    HBillNo: "",
@@ -424,7 +529,199 @@
                        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 onLoad(e) {
            console.log('e: ', e);
@@ -445,15 +742,19 @@
            } 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.getHDeptList()
            try {
                this.HEmpList = await getEmpList()
            } catch (err) {
            }
        },
        onReady() {
            const query = uni.createSelectorQuery().in(this)
@@ -470,5 +771,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>
pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery.vue
New file
@@ -0,0 +1,271 @@
<template>
    <view>
        <view class="tabs" id="tabs">
            <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">未读消息</view>
            <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">我接收的</view>
            <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">我发送的</view>
            <view :class="tabs == 3 ? 'on':''" @tap="switchTab(3)">抄送我的</view>
        </view>
        <!-- 工作联系单 列表 -->
        <view class="list" v-for="(item,index) in BillsDisplay" :key="index">
            <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" 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="displayDetail(item)">查看详情</button>
                    <button class="op1" size="mini" plain @tap.stop="reply(item)">回复</button>
                    <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button>
                </view>
            </uni-card>
        </view>
        <view class="over" v-if="BillsDisplay.length == 0">暂无数据</view>
    </view>
</template>
<script>
    import {
        getUserInfo
    } from '../../../utils/auth';
    import {
        CommonUtils
    } from '../../../utils/common';
    import dayjs from 'dayjs';
    export default {
        // 工作联系单查询 模块
        name: 'OA_WorkLinkBillQuery',
        data() {
            return {
                dayjs,
                CommonUtils,
                tabs: 0,
                BillsDisplay: [],
                HFieldList: [], // 字段列表
                sWhere: "",
                showDetail: -1,
                operations: -1,
            };
        },
        methods: {
            switchTab(tabIndex) {
                this.tabs = tabIndex
                switch (tabIndex) {
                    case 0:
                        this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}' and 阅读状态 = '未阅'`
                        break;
                    case 1:
                        this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}'`
                        break;
                    case 2:
                        this.sWhere = ` and 发送人 = '${getUserInfo()['HEmpName']}'`
                        break;
                    case 3:
                        this.sWhere = ` and 抄送接收人 = '${getUserInfo()['HEmpName']}'`
                        break;
                    default:
                        this.sWhere = ` and 接收人 = '${getUserInfo()['HEmpName']}'`
                }
                this.getWorkLinkList()
            },
            async getWorkLinkList() {
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList',
                        data: {
                            sWhere: this.sWhere,
                            user: getUserInfo()["Czymc"]
                        }
                    })
                    let {
                        count,
                        data,
                        Message,
                        list
                    } = res.data
                    if (count == 1) {
                        console.log('data: ', data);
                        this.BillsDisplay = data
                        let fieldList = CommonUtils.fieldListFilterRole({
                            ExcludeKeys: ['日期', '单据号'],
                            FieldList: list
                        })
                        if (fieldList.status == false) {
                            CommonUtils.showTips({
                                title: '温馨提示',
                                message: `获取表单结构失败: ${fieldList.Message}`
                            })
                        }
                        this.HFieldList = fieldList.data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: `获取维修单异常: ${Message}`
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: `获取维修单异常: ${err}`
                    })
                }
            },
            displayDetail(item) {
                uni.showModal({
                    title: `${item["主题"]}`,
                    content: `${item["内容"]}`,
                    showCancel: false,
                    success: async (res) => {
                        if (res.confirm) {
                            console.log('用户点击确定');
                            // 发送 该单据 已阅请求到后端
                            this.updateWorkLink(item.hmainid, item.HEntryID)
                        }
                    }
                })
            },
            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}`
                    })
                }
            },
            reply(item) {
                uni.navigateTo({
                    url: `/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill?HInterID=${item.hmainid}`
                    + `&HEntryID=${item.HEntryID}&operationType=5`
                })
            }
        },
        onShow() {
            this.switchTab(0)
        }
    }
</script>
<style lang="scss">
    @import "@/pages/MJGL/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>
pages/baogong/OA_ErrMsgBackBill.vue
@@ -281,7 +281,6 @@
    import {
        getUserInfo
    } from "../../utils/auth";
    import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
    export default {
        data() {
            return {
@@ -1157,4 +1156,5 @@
</script>
<style lang="scss">
    @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
pages/index/tab2.vue
@@ -511,11 +511,18 @@
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon15.png",
                        "text": "工作联系单查询",
                        "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillQuery?OperationType=1",
                        "id": 64,
                        "hidden": false
                    },
                    {
                        img: '../../static/icon/icon12.png',
                        text: '员工签到记录单列表',
                        tip: '点击进入',
                        url: '/pages/EmployeeRecords/EmployeeRecordsBillList',
                        id: 64,
                        id: 65,
                        hidden: false,
                    }
                ]
pages/index/tab3.vue
@@ -211,13 +211,8 @@
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
  "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
                        "id": 23,
                        "hidden": false
                    },
                    {
                        "text": "设备维修验收单",
                        "img": "../../static/icon/icon8.png",
                        "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
                        "id": 23,
                        "hidden": false