feat: 修改已知问题

This commit is contained in:
caijun
2026-01-27 09:00:58 +08:00
parent 46c351151b
commit 22d656889a
5 changed files with 132 additions and 13 deletions

View File

@@ -928,7 +928,7 @@
index: item.index, index: item.index,
enableEdit, enableEdit,
labelS, labelS,
name: this.config.name, name: this.config.tableTitle,
billNoPrefix: this.config.billNoPrefix billNoPrefix: this.config.billNoPrefix
} }
console.log(config,'config12233') console.log(config,'config12233')

View File

@@ -56,7 +56,7 @@
</view> </view>
<!-- 底部操作按钮区域 --> <!-- 底部操作按钮区域 -->
<view v-if="!loading && (dataForm.approveStatus != 4 || !dataForm.id || config.current && config.current == 2) && !isProcess" class="buttom-actions"> <view v-if="!loading && isShowBtn" class="buttom-actions">
<u-button v-if="(!dataForm.approveStatus && dataForm.id) || dataForm.approveStatus == 3" class="buttom-btn launch-flow-btn" type="primary" @click.stop="handleLaunchFlow" :disabled="idDsabled" :loading="btnLoading"> <u-button v-if="(!dataForm.approveStatus && dataForm.id) || dataForm.approveStatus == 3" class="buttom-btn launch-flow-btn" type="primary" @click.stop="handleLaunchFlow" :disabled="idDsabled" :loading="btnLoading">
发起流程 发起流程
</u-button> </u-button>
@@ -66,6 +66,9 @@
<u-button v-if="!config.current && (dataForm.approveStatus == 1 || dataForm.approveStatus == 2)" class="buttom-btn" type="primary" @click.stop="goProcess"> <u-button v-if="!config.current && (dataForm.approveStatus == 1 || dataForm.approveStatus == 2)" class="buttom-btn" type="primary" @click.stop="goProcess">
查看流程 查看流程
</u-button> </u-button>
<u-button v-if="config.current == 1 && dataForm.approveStatus && dataForm.approveStatus !==0" class="buttom-btn" type="error" @click.stop="handleCancle">
取消
</u-button>
<u-button v-if="config.current == 2" class="buttom-btn" type="error" @click.stop="handleFail" :disabled="idDsabled" :loading="btnLoading"> <u-button v-if="config.current == 2" class="buttom-btn" type="error" @click.stop="handleFail" :disabled="idDsabled" :loading="btnLoading">
不通过 不通过
</u-button> </u-button>
@@ -197,7 +200,10 @@
<!-- 输入框区域 --> <!-- 输入框区域 -->
<view class="dialog-content"> <view class="dialog-content">
<view class="input-label">审批意见</view> <view class="input-label">
审批意见
<text style="color: red;">*</text>
</view>
<u-input <u-input
v-model="approvalReason" v-model="approvalReason"
type="textarea" type="textarea"
@@ -255,7 +261,10 @@
<!-- </u-select> --> <!-- </u-select> -->
<!-- </view> --> <!-- </view> -->
<view class="form-item-user required"> <view class="form-item-user required">
<text class="label">指定用户</text> <view>
<text class="label">指定用户</text>
<text style="color: red;">*</text>
</view>
<view> <view>
<user-select <user-select
v-model="copyForm.options" v-model="copyForm.options"
@@ -282,6 +291,32 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<!-- 取消原因弹框 -->
<u-popup v-model="showCacleDialog" mode="center" :round="10">
<view class="copy-dialog">
<view class="dialog-header">
<text class="dialog-title">取消流程</text>
<u-icon name="close" size="24" color="#999" @click="showCacleDialog = false" class="close-icon"></u-icon>
</view>
<view class="dialog-content">
<view class="form-item required">
<text class="label">取消原因</text>
<u-input
v-model="cacleReason"
type="textarea"
placeholder="请输入取消原因"
:rows="3"
border="surround"
/>
</view>
</view>
<view class="dialog-footer">
<u-button class="footer-btn cancel-btn" @click="showCacleDialog = false">取消</u-button>
<u-button class="footer-btn submit-btn" type="primary" @click="submitCancel" :loading="cacleSubmitting">确定</u-button>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
@@ -362,7 +397,11 @@
processInstanceName: '', processInstanceName: '',
options: {}, options: {},
reason: '' reason: ''
} },
// 取消
showCacleDialog: false,
cacleReason: '',
cacleSubmitting: false,
} }
}, },
computed: { computed: {
@@ -386,6 +425,17 @@
isApproval(){ isApproval(){
const {current} = this.config const {current} = this.config
return !!current || this.isProcess return !!current || this.isProcess
},
// 是否显示底部按钮
isShowBtn(){
const {approveStatus,id} = this.dataForm
const {config,isProcess} = this
if(!isProcess) return true
console.log(approveStatus,'approveStatus--')
console.log(config.current,'config.current--')
if(approveStatus == 3 &&config.current ==3 ) return false
if(approveStatus !== 4 || !id || config.current && config.current == 2 ) return true
return false
} }
}, },
onLoad(option) { onLoad(option) {
@@ -496,6 +546,9 @@
case 'fail': case 'fail':
name = '审批不通过成功' name = '审批不通过成功'
break; break;
case 'cancel':
name = '取消成功'
break;
} }
uni.showToast({ uni.showToast({
@@ -589,7 +642,7 @@
if (res.code === 0 || res.code === 200) { if (res.code === 0 || res.code === 200) {
this.processList = res.data || [] this.processList = res.data || []
if(this.processList.length === 1){ if(this.processList.length === 1){
this.selectProcess(res.data[0]) this.selectProcess(res.data[0].id)
} }
if (this.processList.length === 0) { if (this.processList.length === 0) {
uni.showToast({ uni.showToast({
@@ -621,6 +674,15 @@
}, },
// 抄送-提交 // 抄送-提交
submitCopyRule(){ submitCopyRule(){
const {options,reason} = this.copyForm
if(!options.length || !reason){
const name = !options.length ? '指定用户不能为空' : '抄送原因不能为空'
uni.showToast({
title: name,
icon: 'none'
})
return
}
const {id,processInstance} = this.approvalData[0] const {id,processInstance} = this.approvalData[0]
const params = { const params = {
processType: '4', processType: '4',
@@ -758,6 +820,47 @@
this.approvalReason = '' // 清空之前的意见 this.approvalReason = '' // 清空之前的意见
this.showApprovalReasonDialog = true this.showApprovalReasonDialog = true
}, },
// 取消
handleCancle() {
this.approvalType = 'cancel'
this.cacleReason = ''
this.showCacleDialog = true
},
// 取消弹框确认
submitCancel() {
if(!this.cacleReason){
uni.showToast({
title: '请输入取消原因',
icon: 'none'
})
return
}
try {
this.cacleSubmitting = true
//参数
const params = {
processType: 5,
processInstanceId: this.formData.processInstanceId, // 流程实例ID
id: this.formData.id,
data: {
dbFormId : this.modelId,
id: this.approvalData && this.approvalData[0].id, // 审批记录第一条id
reason: this.cacleReason || '',
}
}
//调用
this.getListCreateData(params)
} catch (err) {
console.error('取消失败:', err)
uni.showToast({
title: '取消失败,请重试',
icon: 'none'
})
} finally {
this.cacleSubmitting = false
}
},
// 查看流程 // 查看流程
goProcess(){ goProcess(){
this.isProcess = true this.isProcess = true
@@ -769,6 +872,13 @@
// 提交审批结果(通过/不通过) // 提交审批结果(通过/不通过)
async submitApprovalResult() { async submitApprovalResult() {
if(!this.approvalReason){
uni.showToast({
title: '请填写审批意见',
icon: 'none'
})
return
}
try { try {
this.approvalSubmitting = true this.approvalSubmitting = true
// 构造审批参数( // 构造审批参数(

View File

@@ -46,7 +46,7 @@ import { computed } from "vue";
this.config = JSON.parse(this.jnpf.base64.decode(obj.config)) || {}; this.config = JSON.parse(this.jnpf.base64.decode(obj.config)) || {};
this.isPreview = this.config.isPreview || false; this.isPreview = this.config.isPreview || false;
this.enableFlow = this.config.type === 9 ? 1 : 0; this.enableFlow = this.config.type === 9 ? 1 : 0;
this.title = this.config.name || ""; this.title = this.config.tableTitle || "";
this.modelId = this.config.id || ""; this.modelId = this.config.id || "";
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.title, title: this.title,

View File

@@ -430,7 +430,7 @@
}, },
// 跳转待办 // 跳转待办
openToDoPage() { openToDoPage() {
uni.setStorageSync('fromNonTabBar', true); uni.setStorageSync('fromNonTabBar', 1);
uni.switchTab({ uni.switchTab({
url: '/pages/workFlow/flowTodo/index', url: '/pages/workFlow/flowTodo/index',
}); });

View File

@@ -65,14 +65,23 @@
}, },
} }
}, },
watch:{
current:{
handler(val){
uni.setStorageSync('fromNonTabBar', val);
},
immediate: true
}
},
onShow() { onShow() {
const fromNonTabBar = uni.getStorageSync('fromNonTabBar'); const fromNonTabBar = uni.getStorageSync('fromNonTabBar');
console.log(fromNonTabBar,'fromNonTabBar---') console.log(fromNonTabBar,'fromNonTabBar---')
if(!fromNonTabBar){ this.current = fromNonTabBar && Number(fromNonTabBar)
this.current = 1 // if(!fromNonTabBar){
}else { // this.current = 1
this.current = 0 // }else {
} // this.current = 0
// }
uni.removeStorageSync('fromNonTabBar'); uni.removeStorageSync('fromNonTabBar');
uni.$off('operate') uni.$off('operate')
uni.$on('refresh', () => { uni.$on('refresh', () => {