فهرست منبع

试验委托修改

duy 3 ماه پیش
والد
کامیت
f6feab363f

+ 22 - 1
src/views/tentative/detect/commission.vue

@@ -198,7 +198,7 @@ import { onActivated, onMounted, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRouter } from 'vue-router'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
-import { arrToId, arrToKey, deepClone, formValidate, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
+import { arrToId, deepClone, formValidate, getArrValue, getObjVal, getObjValue, isNullES, isString } from 'js-fast-way'
 import { toPdfPage } from '~uti/btn-auth'
 import { getDictionaryData } from '~uti/tools'
 import { getErtractInfo } from '~api/other'
@@ -208,6 +208,7 @@ import TestTree from '~src/views/tentative/material/components/TestTree.vue'
 import SamplingPage from './commission/sampling.vue'
 import { isCancel } from 'axios'
 import wbsApi from '~api/data-fill/wbs'
+import dataApi from '~api/basic/code'
 
 //变量
 const router = useRouter()
@@ -358,8 +359,27 @@ const delegateContractChange = async () => {
     delegateHtmlLoading.value = true
     //await getDelegateDataInfo(editHtmlId.value)
     await getDelegateExcelHtml()
+    getMaterialNumber()
+
     delegateHtmlLoading.value = false
 }
+//获取委托单编号
+
+const backObj = ref({})
+const getMaterialNumber = async () => {
+        const { error, code, data } = await dataApi.getEntrustNumber({
+        contractId: contractId.value,
+        pkeyId: searchForm.value.nodeId,
+    })
+    //处理数据
+    
+    if (!error && code === 200) {
+      backObj.value = getObjVal(data)
+    } else {
+        backObj.value = {}
+
+    }
+}
 
 //获取委托html
 const getDelegateExcelHtml = async () => {
@@ -426,6 +446,7 @@ const rowEdit = async (row) => {
        
         await getDelegateExcelHtml()
         await getDelegateDataInfo('', row.id)
+            getMaterialNumber()
        row. rowLoad = false
         delegateHtmlLoading.value = false
         delegateModal.value = true

+ 16 - 0
src/views/tentative/detect/components/basicInfo.vue

@@ -0,0 +1,16 @@
+<template>
+    <hc-drawer v-model="isShow" to-id="node-card-target" is-close>
+        <div class="relative bg-white" style="height: 100%">
+            测试抽屉弹窗
+            <el-button @click="isDrawer = false">关闭抽屉</el-button>
+        </div>
+    </hc-drawer>
+</template>
+
+<script setup>
+import { ref } from 'vue'
+
+const isShow = defineModel('modelValue', {
+    default: false,
+})
+</script>

+ 10 - 1
src/views/tentative/detect/test-form.vue

@@ -1,5 +1,5 @@
 <template>
-    <div v-loading="isPageLoading" class="hc-page-box">
+    <div id="node-card-target" v-loading="isPageLoading" class="hc-page-box">
         <HcTabCard
             :tabs="authBtnTabdata" :tab-key="authBtnTabKey"
             :disabled="router.currentRoute.value.query?.id && router.currentRoute.value.query?.id.length > 0 || newId?.length > 0"
@@ -7,6 +7,7 @@
         >
             <template #extra>
                 <el-button hc-btn type="info" @click="toBackClick">返回</el-button>
+                <el-button hc-btn type="primary" @click="BasicClick">基础信息</el-button>
                 <el-button
                     :disabled="NodeStatus === '3' || listItemData.length <= 0" :loading="tableFormSaveLoading" hc-btn
                     color="#12C060" style="color: white; font-weight: bold" @click="tableFormSaveClick"
@@ -202,6 +203,7 @@
 
         <!-- 关联委托单 -->
         <LinkAssociation v-model="isLinksAssociation" :ids="listItemBaseData.commissionId" :cid="contractId" @change="commissionChange" @close="isLinksAssociation = false" />
+        <basicInfo v-model="isShowBasic" />
     </div>
 </template>
 
@@ -222,6 +224,7 @@ import { eVisaTaskCheckApi, getDictionary, getErtractInfo } from '~api/other'
 import wbsApi from '~api/data-fill/wbs'
 import { toPdfPage } from '~uti/btn-auth'
 import dayjs from 'dayjs'
+import basicInfo from './components/basicInfo.vue'
 
 //变量
 const router = useRouter()
@@ -1571,6 +1574,12 @@ const commissionChange = (id) => {
     listItemBaseData.value.commissionId = id
     listItemBaseData.value.entrustId = id
 }
+
+//基础信息
+const isShowBasic = ref(false)
+const BasicClick = () => {
+    isShowBasic.value = true
+}
 </script>
 
 <style lang="scss" scoped>