wangmengwei 1 сар өмнө
parent
commit
d113ab2729

+ 1 - 1
src/components/dragFileUpload/index.vue

@@ -216,7 +216,7 @@ export default {
         this.fileList = this.fileList.concat(this.uploadList)
         this.uploadList = []
         this.number = 0
-        this.$emit("input", this.fileList)
+        this.$emit("input", this.listToString(this.fileList))
 		console.log(this.fileList)
         this.$modal.closeLoading()
       }

+ 102 - 33
src/views/project/fourthInfoForm.vue

@@ -95,6 +95,20 @@
                   <el-table-column align="center" prop="hdl" label="当月累计用电(万千瓦时)"  > </el-table-column>
                   <el-table-column align="center" prop="createTime" label="上报时间" >
                   </el-table-column>
+				  <el-table-column align="center" label="操作" :width="120">
+				    <template slot-scope="scope">
+				     <div class="flexcc">
+				      <div class="btna  coa" style="padding: 0; margin-right: 3px;" @click="handleUpdate(scope.row)" >
+				         <div class="imgs">
+				         </div>修改
+				       </div>
+				       <div class="btna  cod" style="padding: 0; margin-left: 3px;" @click="handleDelete(scope.row)">
+				         <div class="imgs"   >
+				         </div>删除
+				       </div>
+				     </div>
+				    </template>
+				  </el-table-column>
                 </el-table>
           </div>
       </div>
@@ -229,38 +243,47 @@ export default {
 	  issfe:false
     }
   },
+  watch: {
+    info: {
+      handler(newVal, oldVal) {
+        // 在这里处理dataMsg变化后的逻辑
+		// console.log(this.info)
+		this.getshui()
+      },
+      immediate: true // 立即执行一次
+    }
+  },
   created() {
-	 this.info.jylist = []
-	 this.info.xshtlist  = []
-	 this.info.xsfqlist = []
-	 this.info.cwbblist = []
-	 this.info.tjbblist = []
-	 let that = this
-	 setTimeout(function()  {
-	  let sngsenhgt = that.info.xmbh
-	  that.jyzhp.xmbh = sngsenhgt
-	  that.xsht.xmbh = sngsenhgt
-	  that.xsfp.xmbh = sngsenhgt
-	  that.cwbb.xmbh = sngsenhgt
-	  that.tjbb.xmbh = sngsenhgt
-	  that.issfe = true
-	    console.log(sngsenhgt)
-	    }, 4000);
-	  if(this.info.id == -1){
-		  // 新增
-		// this.getList()
-	  }else{
-		  // 修改
-		  this.getList()
-		  
-	  }
-	 
-  	console.log(this.info)
+  	this.getshui()
   },
   mounted() {
   	
   },
   methods:{
+	  // 回显
+	  getshui(){
+		  this.info.jylist = []
+		  this.info.xshtlist  = []
+		  this.info.xsfqlist = []
+		  this.info.cwbblist = []
+		  this.info.tjbblist = []
+		let sngsenhgt = this.info.xmbh
+		this.jyzhp.xmbh = sngsenhgt
+		this.xsht.xmbh = sngsenhgt
+		this.xsfp.xmbh = sngsenhgt
+		this.cwbb.xmbh = sngsenhgt
+		this.tjbb.xmbh = sngsenhgt
+		this.issfe = true 
+		 if(this.info.tcxxId == -1){
+		 		  // 新增
+		 		// this.getList()
+		 }else{
+		 		  // 修改
+		 		  this.getList()
+		 		  
+		 }
+		 console.log(this.info)
+	  },
 	  getList() {
 	    this.loading = true
 		let sgnsegse={xmbh:this.info.xmbh}
@@ -281,20 +304,65 @@ export default {
 			return
 	 }
 	 // console.log(this.form)
+	 this.form.tcxxId  = this.info.tcxxId
 	 this.form.xmbh = this.info.xmbh
 	 // this.form.tcxxId =  1
 	 // return
-	 addMonth(this.form).then(response => {
-	   this.$modal.msgSuccess("新增成功")
-	   this.open = false
-	   this.getList()
-	 })
+	  if (this.form.tcxxMonthId != undefined) {
+		  updateMonth(this.form).then(response => {
+		    this.$modal.msgSuccess("修改成功")
+		    this.open = false
+		    this.getList()
+		  })
+	  }else{
+		addMonth(this.form).then(response => {
+		  this.$modal.msgSuccess("新增成功")
+		  this.open = false
+		  this.getList()
+		})  
+	  }
+	 
+ },
+ // 表单重置
+     reset() {
+       this.form = {
+         tcxxYear: null,
+         tcxxMonth: null,
+         cz: null,
+         sjss: null,
+         hdl: null,
+         createBy: null,
+         createTime: null,
+         updateBy: null,
+         updateTime: null,
+         remark: null
+       }
+       this.resetForm("form")
+     },
+ /** 修改按钮操作 */
+ handleUpdate(row) {
+   this.reset()
+   const tzfkId = row.tcxxMonthId 
+   getMonth(tzfkId).then(response => {
+     this.form = response.data
+     this.open = true
+     this.title = "修改信息"
+   })
+ },
+ /** 删除按钮操作 */
+ handleDelete(row) {
+   const tzfkIds = row.tcxxMonthId 
+   delMonth(tzfkIds).then(response => {
+     this.$modal.msgSuccess("删除成功")
+     this.getList()
+   })
  },
  /** 提交按钮 */
  submitForm: function() {
    this.$refs["basicInfoForm"].validate(valid => {
      if (valid) {
 		 this.info.zsyzFjList = []
+		 console.log(this.info,6)
 		 if(this.info.jylist.length !=0){
 			 this.info.zsyzFjList = this.info.zsyzFjList.concat(this.info.jylist )  
 		 }
@@ -310,9 +378,9 @@ export default {
 		 if(this.info.tjbblist.length !=0){
 		 	 this.info.zsyzFjList = this.info.zsyzFjList.concat(this.info.tjbblist )		 
 		 }
-		 console.log(this.info.zsyzFjList,this.info,6)
+		 
 		 // return
-       if (this.info.xmId != undefined) {
+       if (this.info.tcxxId != undefined) {
          updateTcxx(this.info).then(response => {
            this.$modal.msgSuccess("修改成功")
            this.open = false
@@ -322,6 +390,7 @@ export default {
          addTcxx(this.info).then(response => {
            this.$modal.msgSuccess("新增成功")
 		   this.form.tcxxId =  response.data
+		   this.info.tcxxId = response.data
            // this.open = false
 		   // this.$router.go(-1)
            // this.getList()

+ 176 - 53
src/views/project/thirdInfoForm.vue

@@ -12,10 +12,11 @@
             <el-col :span="8">
               <el-form-item label="建设起止时间" prop="beginTime">
                 <el-date-picker
+				@change="nsewe"
 				style="width: 100%;"
-                      v-model="info.beginTime"
-                      type="monthrange"
-					  value-format="yyyy-MM"
+                      v-model="info.timete"
+                      type="daterange"
+					  value-format="yyyy-MM-dd"
                       range-separator="至"
                       start-placeholder="请选择开始时间"
                       end-placeholder="请选择结束时间">
@@ -48,21 +49,21 @@
       <div class="fomebox">
         <div class="ftop flexc">
           <img class="timg flex0" src="@/assets/images/project/tabtit.png"/>
-          <div class="flex1 tit">建设进度跟踪</div>
+          <div class="flex1 tit">建设进度跟踪<span style="color: red; font-size: 12px;">(请先保存建设信息在填写上报项目建设进展情况)</span></div>
           <!-- <el-button type="primary" plain>保存</el-button> -->
         </div>
         <div class="ftab flexc">
           <div class="line"></div>上报项目建设进展情况
-		  <span style="color: red; font-size: 12px;">(请先保存建设信息在填写上报项目建设进展情况)</span>
+		  
           <div class="flex1"></div>
-          <el-button type="primary" plain class="upbox" plain >
+          <el-button type="primary" @click="handleAdd"  plain class="upbox" plain >
             提交
           </el-button>
         </div>
        <div class="rowbox">
           <el-row :gutter="22">
             <el-col :span="24" style="margin-bottom: 12px;">
-              <drag-file-upload v-model="form.jylist" :datam="jyzhp"  :data="jyzhp"/>
+              <drag-file-upload v-model="form.jsPhoto" :datam="jyzhp"  :data="jyzhp"/>
             </el-col>
             <el-col :span="12">
               <el-form-item label="建设进展情况" prop="jzqk">
@@ -91,8 +92,8 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
-              <el-form-item label="发票金额(万元)" prop="sbqd">
-                <el-input placeholder="请输入发票金额" v-model="form.sbqd" />
+              <el-form-item label="发票金额(万元)" prop="fpje">
+                <el-input placeholder="请输入发票金额" v-model="form.fpje" />
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -100,11 +101,11 @@
                 <el-input placeholder="请输入设备合同金额" v-model="form.htje" />
               </el-form-item>
             </el-col>
-			<el-col :span="6">
+			<!-- <el-col :span="6">
 			  <el-form-item label="实际到位资金(万元)" prop="tableName">
 			    <el-input placeholder="实际到位资金(万元)" v-model="form.czwt" />
 			  </el-form-item>
-			</el-col>
+			</el-col> -->
           </el-row>
         </div>
         <div class="ftab flexc" style="padding-top: 7px;">
@@ -113,23 +114,22 @@
         <div class="rowbox" style="width: 100%;overflow: hidden;">
             <el-table :max-height="213"  :data="tableDataa" border style="width: 100%;margin-bottom: 15px;">
                 <el-table-column align="center" prop="jzqk" label="建设进展情况"  > </el-table-column>
-                <el-table-column align="center" prop="sbqd" label="存在的问题" > </el-table-column>
-				<el-table-column align="center" prop="fjlx" label="实际到位资金(万元)"  > </el-table-column>
-				<el-table-column align="center" prop="cftrje" label="厂房投入金额(万元)" > </el-table-column>
-				<el-table-column align="center" prop="sbqd" label="设备清单金额(万元)"  > </el-table-column>
-				<el-table-column align="center" prop="sbqd" label="发票金额(万元)" > </el-table-column>
-				<el-table-column align="center" prop="htje" label="设备合同金额(万元)" > </el-table-column>
+                <el-table-column align="center" prop="czwt" label="存在的问题" > </el-table-column>
+				<el-table-column align="center" prop="shiji" label="实际到位资金"  > </el-table-column>
+				<el-table-column align="center" prop="tdcrzje" label="土地出让金总额" > </el-table-column>
+				<el-table-column align="center" prop="cftrje" label="厂房投入金额" > </el-table-column>
+				<el-table-column align="center" prop="sbqd" label="设备清单金额"  > </el-table-column>
+				<el-table-column align="center" prop="fpje" label="发票金额" > </el-table-column>
+				<el-table-column align="center" prop="htje" label="设备合同金额" > </el-table-column>
                 <el-table-column align="center" label="操作" :width="120">
                   <template slot-scope="scope">
                    <div class="flexcc">
-                    <!-- <div class="btna flexc coa">
+                    <div class="btna  coa" style="padding: 0; margin-right: 3px;" @click="handleUpdate(scope.row)" >
                        <div class="imgs">
-                         <img class="imga" src="@/assets/images/project/upa.png"/>
                        </div>修改
-                     </div> -->
-                     <div class="btna flexc cod">
-                       <div class="imgs">
-                         <img class="imgc" src="@/assets/images/project/upd.png"/>
+                     </div>
+                     <div class="btna  cod" style="padding: 0; margin-left: 3px;" @click="handleDelete(scope.row)" >
+                       <div class="imgs"  >
                        </div>删除
                      </div>
                    </div>
@@ -197,6 +197,7 @@ export default {
                 value: '选项2',
                 label: '双皮奶'
               }],
+	tableDataa:[],
       tableData: [
       {
                 fjlx: '设备清单',
@@ -233,69 +234,190 @@ export default {
               dialogFormVisible:false,
               input:'',
       rules: {
-        beginTime: [
-          { required: true, message: "请输入", trigger: "blur" }
-        ],
+        // jzqk: [
+        //   { required: true, message: "请输入", trigger: "blur" }
+        // ],
         
         
       },
 	  jyzhp:{
 	  		  fileName:'项目每月建设照片',
-	  		  bigType:'d',
-	  		  type:19
 	  },
 	  xsht:{
 	  			  fileName:'设备清单',
-	  		  bigType:'d',
-	  		  type:20
+	  		  bigType:'c',
+	  		  type:15
 	  },
 	  xsfp:{
-	  		  bigType:'d',
+	  		  bigType:'c',
 	  			  fileName:'设备发票',
-	  		  type:21
+	  		  type:16
 	  },
 	  cwbb:{
-	  		  bigType:'d',
+	  		  bigType:'c',
 	  			  fileName:'设备合同',
-	  		  type:22
+	  		  type:17
 	  },
 	  tjbb:{
 	  			  fileName:'入统资料',
-	  		  bigType:'d',
-	  		  type:23
+	  		  bigType:'c',
+	  		  type:18
 	  },
 	  issfe:true
     }
   },
+  watch: {
+    info: {
+      handler(newVal, oldVal) {
+        // 在这里处理dataMsg变化后的逻辑
+		this.gethusie()
+      },
+      immediate: true // 立即执行一次
+    }
+  },
   created() {
-  	
+	   this.gethusie()
+	
   },
   methods:{
+	  // 回显
+	  gethusie(){
+		this.info.jylist = []
+		this.info.xshtlist  = []
+		this.info.xsfqlist = []
+		this.info.cwbblist = []
+		this.info.tjbblist = []
+		let that = this
+		setTimeout(function()  {
+		 let sngsenhgt = that.info.xmbh
+		 that.jyzhp.xmbh = sngsenhgt
+		 that.xsht.xmbh = sngsenhgt
+		 that.xsfp.xmbh = sngsenhgt
+		 that.cwbb.xmbh = sngsenhgt
+		 that.tjbb.xmbh = sngsenhgt
+		 that.issfe = true
+		   }, 4000);  
+		   if(this.info.beginTime != null){
+		   	if(this.info.endTime != null){
+		   		let sgse = this.info.beginTime + ',' +  this.info.endTime
+		   		this.info.timete = sgse.split(',')
+		   	}
+		   }else{
+		   	this.info.timete = null
+		   }
+		   if(this.info.jsxxId == -1 && this.info.jsxxId == undefined ){
+		   		  // 新增
+		   		// this.getList()
+		   }else{
+		   		  // 修改
+		   		  this.getList()
+		   }
+		console.log(this.info)
+	  },
+	  nsewe(val){
+		console.log(val)  
+		this.info.beginTime = val[0]
+		this.info.endTime = val[1]
+	  },
 	  getList() {
-	    this.loading = true
-	  		let sgnsegse={xmbh:this.info.xmbh}
+	  	let sgnsegse={xmbh:this.info.xmbh}
 	    listJdqk(sgnsegse).then(response => {
 	      this.tableDataa = response.rows
-	      this.total = response.total
-	      this.loading = false
+	     this.tableDataa.filter(rou=>{
+			 if(rou.tdcrzje == null || rou.tdcrzje ==''){
+				 rou.tdcrzjes = 0
+			 }else{
+				 rou.tdcrzjes = rou.tdcrzje
+			 }
+			 if(rou.cftrje == null || rou.cftrje ==''){
+			 	rou.cftrjes = 0
+			 }else{
+				 rou.cftrjes = rou.cftrje
+			 }
+			 if(rou.sbqd == null || rou.sbqd ==''){
+			 	rou.sbqds = 0
+			 }else{
+				 rou.sbqds = rou.sbqd
+			 }
+			 if(rou.fpje == null || rou.fpje ==''){
+			 	rou.fpjes = 0
+			 }else{
+				 rou.fpjes = rou.fpje
+			 }
+			 if(rou.htje == null || rou.htje ==''){
+			 	rou.htjes = 0
+			 }else{
+				 rou.htjes = rou.htje
+			 }
+			 rou.shiji = (rou.tdcrzjes - 0) +  (rou.cftrjes - 0) +(rou.sbqds - 0)+(rou.fpjes - 0)+(rou.htjes - 0)
+		 })
 	    })
 	  },
+	  
 	  // 每月更新提交
 	  handleAdd(){
-	  	 if(this.form.tcxxYear == null){
-	  		this.$message.error('请填写年度'); 
+	  	 if(this.form.jzqk == null){
+	  		this.$message.error('请填写信息'); 
 	  		return
 	  	 }
-	  	 if(this.form.tcxxMonth == null){
-	  	 		this.$message.error('请填写月份'); 
-	  			return
-	  	 }
 	  	 this.form.xmbh = this.info.xmbh
-	  	 addJdqk(this.form).then(response => {
-	  	   this.$modal.msgSuccess("新增成功")
-	  	   this.open = false
-	  	   this.getList()
-	  	 })
+		 this.form.jsxxId = this.info.jsxxId
+		 if(this.form.jdqkId != null && this.form.jdqkId != undefined){
+			 updateJdqk(this.form).then(response => {
+			   this.$modal.msgSuccess("修改成功")
+			   this.open = false
+			   this.getList()
+			 }) 
+		 }else{
+			 
+			addJdqk(this.form).then(response => {
+			  this.$modal.msgSuccess("新增成功")
+			  this.open = false
+			  this.getList()
+			}) 
+		 }
+	  	 
+	  },
+	  // 表单重置
+	  reset() {
+	    this.form = {
+	                    jdqkMonth: null,
+	                    jzqk: null,
+	                    czwt: null,
+	                    jjjy: null,
+	                    gzjh: null,
+	                    tdcrzje: null,
+	                    cftrje: null,
+	                    sbqd: null,
+	                    fpje: null,
+	                    htje: null,
+	                    upTime: null,
+	                    jsPhoto: null,
+	                    createBy: null,
+	                    createTime: null,
+	                    updateBy: null,
+	                    updateTime: null,
+	                    remark: null
+	          }
+	    this.resetForm("form")
+	  },
+	  /** 修改按钮操作 */
+	  handleUpdate(row) {
+	    this.reset()
+	    const tzfkId = row.jdqkId 
+	    getJdqk(tzfkId).then(response => {
+	      this.form = response.data
+	      this.open = true
+	      this.title = "修改信息"
+	    })
+	  },
+	  /** 删除按钮操作 */
+	  handleDelete(row) {
+	    const tzfkIds = row.jdqkId  
+	    delJdqk(tzfkIds).then(response => {
+	      this.$modal.msgSuccess("删除成功")
+	      this.getList()
+	    })
 	  },
 	  /** 提交按钮 */
 	  submitForm: function() {
@@ -319,7 +441,7 @@ export default {
 	  		 }
 	  		 console.log(this.info.zsyzFjList,this.info,6)
 	  		 // return
-	        if (this.info.xmId != undefined) {
+	        if (this.info.jsxxId != undefined) {
 	          updateJsxx(this.info).then(response => {
 	            this.$modal.msgSuccess("修改成功")
 	            this.open = false
@@ -329,6 +451,7 @@ export default {
 	          addJsxx(this.info).then(response => {
 	            this.$modal.msgSuccess("新增成功")
 	  		   this.form.jsxxId =  response.data
+			   this.info.jsxxId = response.data
 	            // this.open = false
 	  		   // this.$router.go(-1)
 	            // this.getList()