ZaiZai 1 yıl önce
ebeveyn
işleme
a3bd7bebe4

+ 20 - 5
src/views/tentative/material/modules/testSample/dispose.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -28,7 +27,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -45,9 +45,24 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
+
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
 //监听数据
 const treeInfo = ref({})
 watch(() => props.tree, (obj) => {

+ 20 - 5
src/views/tentative/material/modules/testSample/flow.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -30,7 +29,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -47,7 +47,7 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
 //监听数据
@@ -59,6 +59,21 @@ watch(() => props.tree, (obj) => {
 //搜索表单
 const searchForm = ref({ current: 1, size: 20, total: 0 })
 
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
+
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {

+ 21 - 5
src/views/tentative/material/modules/testSample/inventory.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -86,7 +85,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -103,7 +103,7 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
 //监听数据
@@ -115,6 +115,22 @@ watch(() => props.tree, (obj) => {
 //搜索表单
 const searchForm = ref({ current: 1, size: 20, total: 0 })
 
+
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
+
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {

+ 19 - 5
src/views/tentative/material/modules/testSample/leave.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -51,7 +50,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -68,7 +68,7 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
 //监听数据
@@ -80,6 +80,20 @@ watch(() => props.tree, (obj) => {
 //搜索表单
 const searchForm = ref({ current: 1, size: 20, total: 0 })
 
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {

+ 20 - 5
src/views/tentative/material/modules/testSample/testUnder.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -63,7 +62,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -80,7 +80,7 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
 //监听数据
@@ -92,6 +92,21 @@ watch(() => props.tree, (obj) => {
 //搜索表单
 const searchForm = ref({ current: 1, size: 20, total: 0 })
 
+
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {

+ 19 - 5
src/views/tentative/material/modules/testSample/tested.vue

@@ -2,9 +2,8 @@
     <hc-card-item class="hc-test-sample-card-item">
         <template #header>
             <div class="w-200px">
-                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
-                    <el-option label="测试1" value="1" />
-                    <el-option label="测试2" value="2" />
+                <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
+                    <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
@@ -32,7 +31,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
-import { getObjValue } from 'js-fast-way'
+import { getErtractInfo } from '~api/other'
+import { getArrValue, getObjValue } from 'js-fast-way'
 
 //参数
 const props = defineProps({
@@ -49,7 +49,7 @@ const contractId = ref(store.getContractId)
 
 //渲染完成
 onMounted(() => {
-
+    getContractData()
 })
 
 //监听数据
@@ -61,6 +61,20 @@ watch(() => props.tree, (obj) => {
 //搜索表单
 const searchForm = ref({ current: 1, size: 20, total: 0 })
 
+//获取合同段信息
+const contractData = ref([])
+const getContractData = async () => {
+    const { data } = await getErtractInfo({
+        projectId: projectId.value,
+        contractId: contractId.value,
+    })
+    const res = getArrValue(data)
+    contractData.value = res
+    if (res.length > 0) {
+        searchForm.value.contractId = res[0].id
+    }
+}
+
 //搜索
 const searchClick = () => {
     searchForm.value.current = 1

+ 0 - 1
src/views/tentative/material/testSample.vue

@@ -34,7 +34,6 @@ import SampleDispose from './modules/testSample/dispose.vue'
 const store = useAppStore()
 const userInfo = ref(store.getUserInfo)
 const projectId = ref(store.getProjectId)
-const contractId = ref(store.getContractId)
 const projectInfo = ref(store.getProjectInfo)
 
 //自动展开缓存