Parcourir la source

Merge remote-tracking branch 'origin/master'

ZaiZai il y a 2 ans
Parent
commit
30c07f2387

+ 9 - 5
src/views/project/contract/components/base.vue

@@ -132,11 +132,14 @@ const props = defineProps({
 const infoData = ref(props.datas)
 const isDisabled = ref(props.disabled)
 const saveLoaingVal=ref(props.saveLoaing)
+const formBaseModel = ref(props.datas)
 
 //深度监听
 watch(() => [
     props.datas,
-], ([datas]) => {
+    formBaseModel
+], ([datas,val]) => {
+    emit('update:datas', val)
     infoData.value = datas
     formBaseModel.value=datas
     betweenTime.value[0]=datas['startTime']
@@ -165,7 +168,7 @@ onActivated(()=>{
 })
 //基础表单
 const formBaseRef = ref(null)
-const formBaseModel = ref({})
+
 const formBaseRules = {
     key2: [
         {required: true, message: '请输入', trigger: 'blur'},
@@ -189,11 +192,12 @@ const formInvoiceRules = {}
 const goBackClick = () => {
     router.back()
 }
-const emit= defineEmits(['saveClick'])
+const emit= defineEmits(['saveClick',"update:datas"])
+
 //提交保存
 const saveClick = () => {
-    console.log(formBaseModel.value,'formBaseModel');
-    emit('saveClick',formBaseModel.value,'base')
+    // console.log(formBaseModel.value,'formBaseModel');
+    emit('saveClick')
  
 
 }

+ 6 - 3
src/views/project/contract/components/file.vue

@@ -64,8 +64,10 @@ const saveLoaingVal=ref(props.saveLoaing)
 //深度监听
 watch(() => [
     props.datas,
-], ([datas]) => {
+    infoData
+], ([datas,infoData]) => {
     infoData.value = datas
+    emit('update:datas', infoData)
 }, {deep: true})
 
 //监听
@@ -99,11 +101,12 @@ const reuploadClick = () => {
 const goBackClick = () => {
     router.back()
 }
-const emit= defineEmits(['saveClick'])
+
+const emit= defineEmits(['saveClick',"update:datas"])
 //提交保存
 const saveClick = () => {
     console.log(infoData.value,'infoData');
-    emit('saveClick',infoData.value,'file')
+    emit('saveClick')
     
 
 }

+ 6 - 4
src/views/project/contract/components/milestone.vue

@@ -57,7 +57,7 @@ import {ref, watch} from "vue";
 import {useRouter} from 'vue-router'
 
 const router = useRouter()
-
+const emit= defineEmits(['saveClick',"update:datas"])
 //参数
 const props = defineProps({
     datas: {
@@ -81,8 +81,10 @@ const saveLoaingVal=ref(props.saveLoaing)
 //深度监听
 watch(() => [
     props.datas,
-], ([datas]) => {
+    infoData
+], ([datas,infoData]) => {
     infoData.value = datas
+    emit('update:datas', infoData)
 
 }, {deep: true})
 
@@ -118,11 +120,11 @@ const goBackClick = () => {
 const reminderUserList=ref([])
 
 
-const emit= defineEmits(['saveClick'])
+
 //提交保存
 const saveClick = () => {
     console.log(infoData.value,'infoData');
-    emit('saveClick',infoData.value,'milestone')
+    emit('saveClick')
  
 
 }

+ 8 - 12
src/views/project/contract/form.vue

@@ -31,7 +31,7 @@ const router = useRouter()
 const useRoutes = useRoute()
 const dataId = ref(useRoutes?.query?.id ?? '')
 const dataType = ref(useRoutes?.query?.type ?? '')
-
+const infoData = ref({})
 //缓存页面被激活时
 onActivated(() => {
     dataId.value = useRoutes?.query?.id ?? ''
@@ -39,6 +39,7 @@ onActivated(() => {
     setTabsData()
     if(dataType.value!=='add'){
         getContractInfoById()
+        getListByContractId()
     }else if(dataType.value=='add'){
         infoData.value={}
         infoDataFile.value={}
@@ -86,15 +87,10 @@ const tabsData = ref([
 ])
 const tabsClick = (key) => {
     tabsKey.value = key
-    if(key=='milestone'&&dataType.value!=='add'){
-        getListByContractId()
-      
-    }else if(key=='base'&&dataType.value!=='add'){
-        getContractInfoById()
-    }
+
 }
 
-const infoData = ref({})
+
 const isNoDropShadow = ref(false)
 //合同里程碑
 const milestoneData=ref([{}])
@@ -111,10 +107,10 @@ const getListByContractId=async()=>{
 const saveLoaing=ref(false)
 //保存
 const saveClick=(info,type)=>{
-    console.log(info,'info');
-    console.log(type,'type');
-    console.log(infoData.value,'原始信息infoData.value');
- 
+  console.log(infoData.value,'indo11111');
+  console.log(infoDataFile.value,'infoDataFile');
+  console.log(milestoneData.value,'milestoneData');
+
 }
 
 </script>

+ 5 - 5
src/views/project/cost/data.vue

@@ -28,7 +28,7 @@
                       style="width: 100%; height: 100%"
                       :loading="tableLoading"
             >
-                <el-table-column prop="costTypeVaule" label="费用分类" align="center"/>
+                <el-table-column prop="costTypeValue" label="费用分类" align="center"/>
                 <el-table-column prop="projectProcessValue" label="项目环节" align="center"/>
                 <el-table-column prop="budgetTypeValue" label="预算类型" align="center"/>
                 <el-table-column prop="taskDetailValue" label="任务明细" align="center"/>
@@ -38,10 +38,10 @@
                         <div style="background: #00CCFF">{{ row.postTypeValue }}</div>
                     </template>
                 </el-table-column>
-                <el-table-column prop="key7" label="投入人员数量" align="center"/>
+                <el-table-column prop="staffCount" label="投入人员数量" align="center"/>
                 <el-table-column prop="budgetStaffCost" label="预计人工成本(元)" align="center">
                     <template #default="{ row }">
-                        <div style="background: #fe6e22">{{ row.key8 }}</div>
+                        <div style="background: #fe6e22">{{ row.budgetStaffCost }}</div>
                     </template>
                 </el-table-column>
                 <el-table-column prop="budgetTravelExpense" label="预计差旅费(元)" align="center"/>
@@ -51,10 +51,10 @@
                 <el-table-column prop="otherBudgetMoney" label="其他预算金额" align="center"/>
                 <el-table-column prop="budgetCountMoney" label="总预算金额" align="center">
                     <template #default="{ row }">
-                        <div style="background: #fe6e22">{{ row.key14 }}</div>
+                        <div style="background: #fe6e22">{{ row.budgetCountMoney }}</div>
                     </template>
                 </el-table-column>
-                <el-table-column prop="key15" label="测算备注" align="center"/>
+                <el-table-column prop="budgetRemark" label="测算备注" align="center"/>
             </el-table>
         </div>
     </HcCard>

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

@@ -216,6 +216,7 @@ const getBudgetTypeList=async()=>{
     const {error, code, data} = await costApi.getSecondSubject()
     if (!error && code === 200) {
         budgetTypeList.value=getArrValue(data)
+     
 
     } else {
         budgetTypeList.value={}
@@ -224,7 +225,6 @@ const getBudgetTypeList=async()=>{
 //任务明细
 const taskDetailList=ref([])
 const budgetTypeChange=async(val)=>{
-    console.log(val,'val');
     let id=''
     budgetTypeList.value.forEach((ele)=>{
         if(ele.dictValue===val){
@@ -245,6 +245,10 @@ const getPostDict=async(type)=>{
     const {error, code, data} = await costApi.getPostDict()
     if (!error && code === 200) {
         postTypeList.value=getArrValue(data)
+        postTypeList.value.forEach((ele)=>{
+            ele.code=parseInt(ele.code)
+        })
+
 
     } else {
         postTypeList.value={}
@@ -336,7 +340,7 @@ const tableColumn = [
     {key: 'projectProcess', name: '项目环节', width: '160', align: 'center'},
     {key: 'budgetType', name: '预算类型', width: '160', align: 'center'},
     {key: 'taskDetail', name: '任务明细', width: '160',  align: 'center'},
-    {key: 'budgetDays', name: '预计工作量(小数/整数)', width: '160',  align: 'center'},
+    {key: 'budgetDays', name: '预计工作量(小数/整数/天)', width: '160',  align: 'center'},
     {key: 'postType', name: '投入岗位类型(日单价)', width: '160', align: 'center'},
     {key: 'staffCount', name: '投入人员数量', width: '160', align: 'center'},
     {key: 'budgetStaffCost', name: '预计人工成本(元)', width: '160', align: 'center'},