فهرست منبع

移动端修改

chenjun 1 سال پیش
والد
کامیت
52ca2c3286
3فایلهای تغییر یافته به همراه17 افزوده شده و 12 حذف شده
  1. 2 3
      client_h5/src/components/flowForm.vue
  2. 14 8
      client_h5/src/pages/leave/index.vue
  3. 1 1
      client_h5/src/utils/common.ts

+ 2 - 3
client_h5/src/components/flowForm.vue

@@ -120,8 +120,7 @@ const { flowInstanceId, activityInstanceId } = route.query as {
 const currentOpinion = ref({
   id: '',
   opinionContent: '',
-  opinionTime: '',
-  sign: null
+  opinionTime: ''
 })
 const templateOpinions = ref<any[]>([]);
 getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
@@ -143,7 +142,7 @@ getTemplateOpinionListByFlowInstanceId(flowInstanceId).then((tResult) => {
             if (oItem['activityInstanceId'] === activityInstanceId) {
               oItem['isEditor'] = true;
               currentOpinion.value.id = oItem['id']
-              currentOpinion.value.opinionContent = oItem['opinionContent']
+              currentOpinion.value.opinionContent = oItem['opinionContent'] ?? '同意'
               currentOpinion.value.opinionTime = formatDate(new Date())
               if (oItem['sign']) {
                 currentOpinion.value.sign = oItem['sign']

+ 14 - 8
client_h5/src/pages/leave/index.vue

@@ -28,6 +28,13 @@
                 readonly 
                 :rules="[{ required: true, message: '请填写申请时间' }]"
               />
+              <van-field
+                v-model="formData.leaveNo"
+                name="请假单号"
+                label="请假单号"
+                placeholder="请假单号"
+                readonly 
+              />
               <van-field
                 v-model="formData.leaveTypeText"
                 is-link
@@ -189,15 +196,15 @@ const columns = [
       { text: '调休', value: '18' },
       { text: '其他', value: '20' },
     ];
-const { activityInstanceId, participantId,flowInstanceId,read } = route.query as {
+const { activityInstanceId, participant,flowInstanceId,read } = route.query as {
   activityInstanceId: string;
-  participantId: string;
+  participant: string;
   flowInstanceId: string;
   read: string;
 };
 const activityData: FlowDTO = {
   activityInstanceId,
-  participantId,
+  participantId: participant,
   flowOpinion: ''
 }
 const onConfirm = ({ selectedOptions }) => {
@@ -206,7 +213,6 @@ const onConfirm = ({ selectedOptions }) => {
   showPicker.value = false;
 };
 const submitNextActivity = async (activeOpinion: any) => {
-  console.log(JSON.stringify(activeOpinion))  //获取意见
   formData.value.leaveTimeCreateList.forEach((x:any) => {
     x.startTime = Date.parse(x.startTime)
     x.endTime = Date.parse(x.endTime)
@@ -215,9 +221,9 @@ const submitNextActivity = async (activeOpinion: any) => {
   const result = await reqest.post("/business/Leave/update",formData.value)
   if(result.code ===200||result.code ===0){
     //工作流转件
-    activityData.activityInstanceId='018f23b914660a07729e8f224db60203'
-    activityData.participantId='018f23b9148b0a07729e8f224db60205'
-    activityData.flowOpinion='{"id":"018f23b914970a07729e8f224db60206","opinionContent":"同意","opinionTime":"2024-04-28"}'
+    activityData.activityInstanceId=activityInstanceId
+    activityData.participantId=participant
+    activityData.flowOpinion=JSON.stringify(activeOpinion)
     const result = await getNextActivity(jsonToFormData(activityData))
     // getNextActivity(activityData).then(result => {
     //   console.log(result)
@@ -299,7 +305,7 @@ const detailView = (index:number,item:any) =>{
 
 /** 选择框事件 */
 const pickerClick = () =>{
-  if(!formRead){
+  if(!formRead.value){
     showPicker.value=true
   }
 }

+ 1 - 1
client_h5/src/utils/common.ts

@@ -51,7 +51,7 @@ export const formatDate = (date: Date) => {
   const year = date.getFullYear()
   const month = date.getMonth() + 1
   const day = date.getDate();
-  return `${year}-${zeroFillToString(month)}-${zeroFillToString(day)} `;
+  return `${year}-${zeroFillToString(month)}-${zeroFillToString(day)}`;
 }
 /**
  * 格式化时间