Explorar el Código

年度经营预算修改

duy hace 2 años
padre
commit
9a3a4890ce
Se han modificado 2 ficheros con 7 adiciones y 3 borrados
  1. 2 0
      src/views/program/annual/view.vue
  2. 5 3
      src/views/project/cost/form.vue

+ 2 - 0
src/views/program/annual/view.vue

@@ -110,6 +110,8 @@ const getTableData = async() => {
 }
 //缓存页面被激活时
 onActivated(() => {
+    dataId.value=useRoutes?.query?.id ?? ''
+    name.value=useRoutes?.query?.name ?? ''
     getTableData()
    
 })

+ 5 - 3
src/views/project/cost/form.vue

@@ -105,7 +105,7 @@
                         <el-input v-model="row.outsourceCountMoney" disabled />
                     </template>
                     <template #otherBudgetMoney="{row,index}">
-                        <el-input v-model="row.otherBudgetMoney" :disabled="!row.isEdit"/>
+                        <el-input v-model="row.otherBudgetMoney" :disabled="!row.isEdit" onkeyup="this.value=this.value.match(/\d+\.?\d{0,2}/)"/>
                     </template>
                 <template #budgetCountMoney="{row,index}">
                         <el-input v-model="row.budgetCountMoney" disabled/>
@@ -122,7 +122,7 @@
                             <span>新增</span>
                         </el-button>
                         <el-button size="small" type="success" v-if="row.isEdit" @click="saveRow(row)">保存</el-button>
-                        <el-button size="small" type="primary" v-else @click="row.isEdit = true">编辑</el-button>
+                        <el-button size="small" type="primary" v-else @click="row.isEdit = true" :disabled="row?.approve===1">编辑</el-button>
                         <el-button size="small" type="danger" @click="delRow(index)" :disabled="row?.approve===1">
                             <HcIcon name="delete-bin"/>
                             <span>删除</span>
@@ -391,7 +391,9 @@ const tableColumn = [
 
 const originTableData=ref([{}])
 const addRow=()=>{
-    tableData.value.push({})
+    tableData.value.push({
+        isEdit:true
+    })
 }
 const delRow=(index)=>{
     tableData.value.splice(index, 1)