| | |
| | | <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"> |
| | |
| | | }"> |
| | | <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> |
| | |
| | | </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> |
| | | <!-- 其他信息 --> |
| | |
| | | </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> |
| | |
| | | name: 'OA_WorkLinkBill', |
| | | data() { |
| | | return { |
| | | CommonUtils, |
| | | dayjs, |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | |
| | | refSav: 'Add', // 执行提交的操作类型,与operationType类似 |
| | | enableEdit: true, |
| | | uploadOptions: {}, |
| | | showDetail: -1, |
| | | operations: -1, |
| | | |
| | | HEmpList: [], |
| | | HDeptList: [], |
| | |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | |
| | | replyContent: "", |
| | | HReplyList: [], |
| | | HFieldList: [], |
| | | hform: { |
| | | HBarCode: "", |
| | | HBillNo: "", |
| | |
| | | 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); |
| | |
| | | } 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) { |
| | | |
| | | } |
| | | |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | |
| | | </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> |