Przeglądaj źródła

成本测算回显

duy 2 lat temu
rodzic
commit
291a5a2dc9

+ 1 - 1
src/views/expense/finReimburse/index.vue

@@ -173,7 +173,7 @@ const getTableData = async () => {
 
 //预览
 const rowNameTap = ({id}) => {
-    window.$message?.error('未知功能')
+    // window.$message?.error('未知功能')
 }
 
 //撤销

+ 18 - 6
src/views/project/cost/form.vue

@@ -163,6 +163,7 @@ onActivated(() => {
     constructUnitData.value=[]
     supervisorUnitData.value=[]
     bulidUnitData.value=[]
+    tableData.value=[{}]
     tabsKey.value = 'base'
     tabKey.value='construction'
     getBudgetTypeList()
@@ -309,6 +310,7 @@ const tabsClick = (key) => {
     }else{
         if(key==='table'){
             tabsKey.value = key
+       
             getProcessList(formBaseModel.value.projectId)
 
         }
@@ -331,17 +333,25 @@ const formBaseRules = {
 }
 
 //类型tab数据和相关处理
-const tabKey = ref('construction')
-
+const tabKey = ref('')
+const tableData = ref([])//成本测算表格
+//深度监听
+watch(() => [
+    tabKey.value,
+    tableData.value,
+], ([val,table]) => {
+   if(val==='construction'){
+    constructUnitData.value=table
+   }
+}, {deep: true})
 const tabTab = ref([
     {key: 'bulid', name: '施工单位成本'},
     {key: 'supervision', name: '监理单位成本'},
     {key: 'construction', name: '建设单位成本'}
 ]);
+const savetabdata=ref([])//当前数据
 const tabChange = ({key}) => {
     tabKey.value = key
-    console.log(key,'key');
-    console.log(tableData.value,'tableData.value');
     if(key=='supervision'){
         tableData.value=supervisorUnitData.value.length>0?supervisorUnitData.value:originTableData.value
         formBaseModel.value.supervisorUnit=tableData.value
@@ -351,7 +361,9 @@ const tabChange = ({key}) => {
         console.log( formBaseModel.value.constructUnit,' formBaseModel.value.constructUnit');
     }else if(key=='bulid'){
         console.log(bulidUnitData.value,'=bulidUnitData.value');
-        tableData.value=bulidUnitData.value.length>0?bulidUnitData.value:originTableData.value
+      
+        tableData.value=bulidUnitData.value.length>0?bulidUnitData.value:[{}]
+        console.log( originTableData.value,' originTableData.value.value');
         formBaseModel.value.buildUnit=tableData.value
     }
  
@@ -378,7 +390,7 @@ const tableColumn = [
     {key: 'budgetRemark', name: '测算备注', width: '160', align: 'center'},
     {key: 'action', name: '操作', width: '200', align: 'center', fixed: 'right'},
 ]
-const tableData = ref([{}])
+
 
 const originTableData=ref([ {}])
 const addRow=()=>{

+ 3 - 13
src/views/static/plan.vue

@@ -78,16 +78,7 @@
  const searchForm=ref({
     deptId:'',userId:''
  })
- const departmentType=ref([
-    {name:'研发部门',key:1},
-    {name:'业务部门',key:2},
-    {name:'人事部门',key:1},
- ])
- const personType=ref([
-    {name:'张三',key:1},
-    {name:'李四',key:2},
-    {name:'王五',key:1},
- ])
+
  //搜索
 const searchClick = () => {
   
@@ -117,9 +108,8 @@ const resetClick = () => {
 }
 //计划统计图
 const planDatas = ref([])
-const ydata=ref( ['张三', '李四', '王五', '赵六', '陈琦', '五把'])
-const xdata=ref( [10, 20, 40, 60, 80, 99])
-const planDatas1=ref([])
+const ydata=ref( [])
+const xdata=ref( [])
 const legend=ref(
     {
 		orient: 'horizontal',