sunqijun 2 месяцев назад
Родитель
Сommit
7032e4486b

+ 3 - 4
src/views/production-safety/safetyAssessment/receiptRecord/components/ReceiptRecordDetail.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <el-alert v-if="currentStatus === -1" :title="ruleFormData.returnReason" type="warning" />
+  <el-alert v-if="currentStatus === -1" :title="ruleFormData.returnReason" type="warning" />
   <main class="safety-platform-container__main">
   <main class="safety-platform-container__main">
     <BasicForm
     <BasicForm
       ref="basicFormRef"
       ref="basicFormRef"
@@ -347,7 +347,7 @@
     const res = await basicFormRef.value.validateForm();
     const res = await basicFormRef.value.validateForm();
     return res;
     return res;
   };
   };
-const ReceiptRecordData = ref({})
+  const ReceiptRecordData = ref({});
   const getDetail = async () => {
   const getDetail = async () => {
     if (!currentId.value) return;
     if (!currentId.value) return;
     try {
     try {
@@ -393,7 +393,7 @@ const ReceiptRecordData = ref({})
 
 
     try {
     try {
       const selectedInventory = inventoryList.value.find((item) => {
       const selectedInventory = inventoryList.value.find((item) => {
-        return item.id === ruleFormData.itemId || item.id ===ReceiptRecordData.value.pimId
+        return item.id === ruleFormData.itemId || item.id === ReceiptRecordData.value.pimId;
       });
       });
       if (!selectedInventory) {
       if (!selectedInventory) {
         ElMessage.error('请选择有效的奖品名称');
         ElMessage.error('请选择有效的奖品名称');
@@ -432,7 +432,6 @@ const ReceiptRecordData = ref({})
             ? (createRes as any).id
             ? (createRes as any).id
             : undefined;
             : undefined;
       } else if (isEditMode.value && currentId.value) {
       } else if (isEditMode.value && currentId.value) {
-        
         await updateClaimItemsLog({
         await updateClaimItemsLog({
           id: currentId.value,
           id: currentId.value,
           ...basePayload,
           ...basePayload,

+ 12 - 12
src/views/production-safety/safetyAssessment/receiptRecord/configs/form.ts

@@ -64,21 +64,21 @@ export const RECEIPT_RECORD_FORM_CONFIG: FormConfig[] = [
       placeholder: '请选择审批流程',
       placeholder: '请选择审批流程',
     },
     },
   },
   },
-//   {
-//     prop: 'returnReason',
-//     label: '审核不通过原因:',
-//     component: 'ElInput',
-//     componentProps: {
-//       type: 'textarea',
-//       rows: 2,
-//       placeholder: '暂无审核不通过原因',
-//       disabled: true,
-//     },
-//   },
+  //   {
+  //     prop: 'returnReason',
+  //     label: '审核不通过原因:',
+  //     component: 'ElInput',
+  //     componentProps: {
+  //       type: 'textarea',
+  //       rows: 2,
+  //       placeholder: '暂无审核不通过原因',
+  //       disabled: true,
+  //     },
+  //   },
 ];
 ];
 
 
 export const RECEIPT_RECORD_FORM_DATA = {
 export const RECEIPT_RECORD_FORM_DATA = {
-  itemId: undefined as number | undefined|string, // 奖品库存ID(用于下拉框选中)
+  itemId: undefined as number | undefined | string, // 奖品库存ID(用于下拉框选中)
   outboundDate: '',
   outboundDate: '',
   status: null as number | null, // 物品领取记录状态
   status: null as number | null, // 物品领取记录状态
   outboundQuantity: 1, // 最小值为1
   outboundQuantity: 1, // 最小值为1

+ 14 - 15
src/views/production-safety/safetyAssessment/receiptRecord/receiptRecordAdministratorReview.vue

@@ -187,22 +187,21 @@
       if (res) {
       if (res) {
         // 映射返回数据字段到表格字段,并处理可能的null或undefined值
         // 映射返回数据字段到表格字段,并处理可能的null或undefined值
         tableData.value = res.records.map((item) => {
         tableData.value = res.records.map((item) => {
-            if(item && typeof item === 'object') {
-                return {
-                    id: item.id,
-                    itemName: item.stuffName, // 奖品名称
-                    outboundDate: item.outStoreTime, // 出库日期
-                    outboundQuantity: item.claimQty, // 取出数量
-                    remainingQuantity: item.surplusQty, // 结余数量
-                    receiptNumber: item.orderNumber, // 单号
-                    department: item.deptName, // 部门
-                    recipient: item.userName, // 领取人
-                    status: item.status, // 0 待审核 1 审核通过 -1 审核不通过 2 已领取
-                    approvalOrder: item.approvalOrder, // 审批顺序
-                }
-            }
+          if (item && typeof item === 'object') {
+            return {
+              id: item.id,
+              itemName: item.stuffName, // 奖品名称
+              outboundDate: item.outStoreTime, // 出库日期
+              outboundQuantity: item.claimQty, // 取出数量
+              remainingQuantity: item.surplusQty, // 结余数量
+              receiptNumber: item.orderNumber, // 单号
+              department: item.deptName, // 部门
+              recipient: item.userName, // 领取人
+              status: item.status, // 0 待审核 1 审核通过 -1 审核不通过 2 已领取
+              approvalOrder: item.approvalOrder, // 审批顺序
+            };
+          }
         });
         });
-        console.log(tableData.value,'tableData')
         pagination.total = res.totalRow;
         pagination.total = res.totalRow;
       }
       }
     } catch (e) {
     } catch (e) {