Browse Source

台账管理classfytype修改

duy 2 năm trước cách đây
mục cha
commit
8777468c2a

+ 7 - 2
src/views/ledger/components/WbsTree.vue

@@ -35,6 +35,7 @@
 import {ref,nextTick,watch} from "vue";
 import dataFillQuery from '~api/data-fill/query';
 import {isItem,getArrValue,getObjValue} from "vue-utils-plus"
+import {useAppStore} from "~src/store";
 
 //参数
 const props = defineProps({
@@ -92,7 +93,10 @@ const TreeExpandKey = ref(props.autoExpandKeys)
 const projectId = ref(props.projectId);
 const contractId = ref(props.contractId);
 const idPrefix = ref(props.idPrefix);
-
+const useAppState = useAppStore()
+const contractInfo = ref(useAppState.getContractInfo);
+const { contractType } = contractInfo.value;
+const classifyType  = ref(contractType === 2 ? '2' : '1')
 //监听
 watch(() => [
     props.menus,
@@ -127,7 +131,8 @@ const ElTreeLoadNode = async (node, resolve) => {
         contractId: contractId.value || '',
         contractIdRelation,
         primaryKeyId,
-        parentId
+        parentId,
+        classifyType:classifyType.value,
     })
     //处理数据
     if (!error && code === 200) {

+ 10 - 3
src/views/ledger/components/table-form.vue

@@ -148,6 +148,7 @@ import HTableForm from "~src/plugins/HTableForm"
 import DateCalendar from "./dateCalendar/index.vue"
 import {getObjValue, getObjNullValue, isString, getArrValue, isValueNull} from "vue-utils-plus"
 import HcTableForm from "~com/table-form/index.vue";
+import {useAppStore} from "~src/store";
 
 //参数
 const props = defineProps({
@@ -177,7 +178,10 @@ const userName = ref(props.userName);
 const excelIdVal = ref('');
 const statusDesc = ref('');
 const tableFormRef = ref(null);
-
+const useAppState = useAppStore()
+const contractInfo = ref(useAppState.getContractInfo);
+const { contractType } = contractInfo.value;
+const classifyType  = ref(contractType === 2 ? '2' : '1')
 //监听
 watch(() => [
     props.projectId,
@@ -382,7 +386,8 @@ const ElTreeLoadNode = async (node, resolve) => {
             contractId: contractId.value || '',
             contractIdRelation: '',
             primaryKeyId: '',
-            parentId: ''
+            parentId: '',
+            classifyType:classifyType.value,
         })
         //处理数据
         if (!error && code === 200) {
@@ -398,7 +403,9 @@ const ElTreeLoadNode = async (node, resolve) => {
             contractId: contractId.value || '',
             contractIdRelation: contractIdRelation,
             primaryKeyId: id,
-            parentId: contractIdRelation ? primaryKeyId : id
+            parentId: contractIdRelation ? primaryKeyId : id,
+            classifyType:classifyType,
+
         })
         //处理数据
         if (!error && code === 200) {