소스 검색

发票管理新增报告查询

sangwenwei 1 년 전
부모
커밋
528b72d6bf

+ 2 - 2
src/api/cw/projectRecords/ProjectRecordsService.js

@@ -9,9 +9,9 @@ export default {
 			params: params,
 		});
 	},
-	list2: function (params) {
+	list1: function (params) {
 		return request({
-			url: prefix + "/cwProjectRecords/list2",
+			url: prefix + "/cwProjectReport/list",
 			method: "get",
 			params: params,
 		});

+ 39 - 3
src/views/cw/invoice/InvoiceFormTask.vue

@@ -18,6 +18,8 @@
 				:key="baseKey"
 				class="vxe-table-element"
 				:data="inputForm.financeInvoiceBaseDTOList"
+				:footer-method="footerMethod"
+				:footer-cell-class-name="footerCellClassName"
 				style="margin-left: 5em"
 				highlight-current-row
 				:edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
@@ -37,6 +39,13 @@
 						<el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
 					</template>
 				</vxe-table-column>
+				<vxe-table-column  field="account" align="center" title="发票金额(元)" :edit-render="{}" :rules="[
+                        {required: true, message:'发票金额不能为空', trigger:'blur'}
+               ]">
+					<template v-slot:edit="scope">
+						<el-input  placeholder="请填写发票金额" v-model="scope.row.account" />
+					</template>
+				</vxe-table-column>
 				<!--          <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
 				<!--            <template v-slot:edit="scope">-->
 				<!--              <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
@@ -245,7 +254,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="发票金额(元)" prop="account"
+          <el-form-item label="发票金额(元)" prop="accountTotal"
                         :rules="[
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
                ]">
@@ -253,8 +262,10 @@
               @input="fixedAccount"
               placeholder="请填写发票金额"
               maxlength="15"
-              v-model="inputForm.account"
+              v-model="inputForm.accountTotal"
+			  :disabled="true"
             >
+
             </el-input>
 <!--            <el-input-number-->
 <!--              v-model="inputForm.account"-->
@@ -649,6 +660,7 @@
   import SelectUserTree from '@/views/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import WorkClientBillingChooseRadio from '@/views/cw/workClientInfo/WorkClientBillingChooseRadio'
+  import XEUtils from 'xe-utils'
 
   export default {
     props: {
@@ -672,11 +684,13 @@
         visible: false,
         loading: false,
         inputForm: {
+		  accountTotal:'',//发票汇总金额
           id: '',
           financeInvoiceBaseDTOList: [],
           programName: '',
           contractName: '',
           programNo: '',
+		  account:'',
           clientName: '',
           reportNo: '',
           type: '1',
@@ -774,11 +788,13 @@
         this.importVisible = false
         this.method = method
         this.inputForm = {
+		  accountTotal:'',//发票汇总金额
           id: '',
           financeInvoiceBaseDTOList: [],
           programName: '',
           contractName: '',
           programNo: '',
+		  account:'',
           clientName: '',
           reportNo: '',
           type: '1',
@@ -1095,6 +1111,7 @@
           programName: '',
           contractName: '',
           programNo: '',
+		  account:'',
           clientName: '',
           reportNo: '',
           type: '1',
@@ -1192,6 +1209,7 @@
             r.programName = item.projectName
             r.contractName = item.contractName
             r.programNo = item.projectNumber
+		    r.account=item.account
             r.contractId = item.contractId
             r.programId = item.id
             this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
@@ -1200,6 +1218,7 @@
               programName: item.projectName,
               contractName: item.contractName,
               programNo: item.projectNumber,
+			  account:item.account,
               contractId: item.contractId,
               programId: item.id
             }
@@ -1524,7 +1543,24 @@
           var result = this.inputForm.account.replace(reg, regStrs[i][1])
           this.inputForm.account = result
         }
-      }
+      },
+
+		footerMethod ({ columns, data }) {
+			const footerData = [
+				columns.map((column, columnIndex) => {
+					if (columnIndex === 0) {
+						return '汇总'
+					}
+					if (['account'].includes(column.property)) {
+						// eslint-disable-next-line no-undef
+						this.inputForm.accountTotal = XEUtils.sum(data, column.property)
+						return XEUtils.sum(data, column.property)
+					}
+					return null
+				})
+			]
+			return footerData
+		},
     }
   }
 </script>

+ 49 - 41
src/views/cw/invoice/ProgramPageForm.vue

@@ -12,18 +12,18 @@
       <div v-if="isShow">
         <el-radio v-model="checkType" label="1" style="margin-right: 20px">项目</el-radio>
         <el-radio v-model="checkType" label="2" style="margin-right: 20px">报告</el-radio>
-		  <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="3" style="margin-right: 20px">其他</el-radio>
+	    <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="3" style="margin-right: 20px">其他</el-radio>
       </div>
 		<!--报告        -->
 		<div v-if="checkType === '2'" style="height: calc(100% - 80px);">
-			<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+			<el-form size="large" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
 					 @submit.native.prevent>
 				<!-- 搜索框-->
 				<el-form-item label="项目名称" prop="projectName">
-					<el-input v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+					<el-input size="large" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
 				</el-form-item>
-				<el-form-item label="报告号" prop="reportNo">
-					<el-input v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+				<el-form-item label="报告号" prop="reportNo">
+					<el-input size="large" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
 				</el-form-item>
 				<el-form-item label="报告创建时间" prop="createDates">
 					<el-date-picker
@@ -39,8 +39,8 @@
 				</el-form-item>
 
 				<el-form-item>
-					<el-button type="primary" @click="list1()" icon="el-icon-search">查询</el-button>
-					<el-button @click="resetSearch1()" icon="el-icon-refresh-right">重置</el-button>
+					<el-button type="primary" @click="list1()" size="large" icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch1()" size="large" icon="el-icon-refresh-right">重置</el-button>
 				</el-form-item>
 			</el-form>
 
@@ -48,22 +48,25 @@
 				border="inner"
 				auto-resize
 				resizable
-				height="400px"
+				height="550px"
 				:loading="loading"
+				size="large"
 				ref="projectTable1"
 				show-header-overflow
 				show-overflow
 				highlight-hover-row
 				:menu-config="{}"
 				:print-config="{}"
+				@sort-change=""
 				:sort-config="{remote:true}"
 				:data="dataList1"
 				:row-config="{isCurrent: true}"
 				:checkbox-config="{trigger: 'row'}"
 			>
 				<vxe-column type="seq" width="60" title="序号"></vxe-column>
-				<vxe-column type="checkbox" width="40px"></vxe-column>
+				<vxe-column type="checkbox" width="60px"></vxe-column>
 				<vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目编号" field="projectNumber"></vxe-column>
 				<vxe-column min-width="160" align="center" title="报告文号" field="reportNo"></vxe-column>
 				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
 				<vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
@@ -72,6 +75,7 @@
 			</vxe-table>
 			<vxe-pager
 				background
+				size="large"
 				:current-page="tablePage1.currentPage"
 				:page-size="tablePage1.pageSize"
 				:total="tablePage1.total"
@@ -112,7 +116,7 @@
             border="inner"
             auto-resize
             resizable
-            height="400px"
+            height="550px"
             :loading="loading"
             ref="projectTable"
             show-header-overflow
@@ -127,7 +131,7 @@
           >
             <vxe-column type="seq" width="60" title="序号"></vxe-column>
             <vxe-column type="checkbox" width="60px"></vxe-column>
-            <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
+            <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
             <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
             <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
             <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
@@ -171,7 +175,7 @@
   export default {
     data () {
       return {
-        title: '项目选择',
+        title: '',
         method: '',
         visible: false,
         loading: false,
@@ -181,12 +185,12 @@
           pageSize: 10,
           orders: []
         },
-		  tablePage1: {
-			  total: 0,
-			  currentPage: 1,
-			  pageSize: 10,
-			  orders: []
-		  },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
         dataList: [],
         dataList1: [],
         searchForm: {
@@ -239,6 +243,9 @@
 			} else if (isShow === '1') {
 				this.isShow = false
 				this.checkType = '1'
+			}else if (isShow === '2') {
+				this.isShow = false
+				this.checkType = '2'
 			} else {
 				this.isShow = false
 				this.checkType = '3'
@@ -251,6 +258,7 @@
         }
         this.visible = true
         this.list()
+	    this.list1()
       },
       // 表单提交
       getProgram () {
@@ -304,20 +312,20 @@
           this.loading = false
         })
       },
-		list1 () {
-			this.loading = true
-			this.searchForm.status = '5'
-			this.projectRecordsService.list1({
-				'current': this.tablePage1.currentPage,
-				'size': this.tablePage1.pageSize,
-				'orders': this.tablePage1.orders,
-				...this.searchForm
-			}).then((data) => {
-				this.dataList1 = data.records
-				this.tablePage1.total = data.total
-				this.loading = false
-			})
-		},
+	  list1 () {
+		  this.loading = true
+		  this.searchForm.status = '5'
+		  projectRecordsService.list1({
+			'current': this.tablePage1.currentPage,
+			'size': this.tablePage1.pageSize,
+			'orders': this.tablePage1.orders,
+			...this.searchForm
+		  }).then((data) => {
+			this.dataList1 = data.records
+			this.tablePage1.total = data.total
+			this.loading = false
+		  })
+	  },
       // 当前页
       currentChangeHandle ({currentPage, pageSize}) {
         this.tablePage.currentPage = currentPage
@@ -328,15 +336,15 @@
         this.$refs.searchForm.resetFields()
         this.list()
       },
-		resetSearch1 () {
-			this.$refs.searchForm.resetFields()
-			this.list1()
-		},
-		currentChangeHandle1 ({currentPage, pageSize}) {
-			this.tablePage1.currentPage = currentPage
-			this.tablePage1.pageSize = pageSize
-			this.list1()
-		},
+	  currentChangeHandle1 ({currentPage, pageSize}) {
+		this.tablePage1.currentPage = currentPage
+		this.tablePage1.pageSize = pageSize
+		this.list1()
+	  },
+	  resetSearch1 () {
+		this.$refs.searchForm.resetFields()
+		this.list1()
+	  },
       close () {
         this.detail = ''
         this.visible = false

+ 0 - 1
src/views/dashboard/widgets/components/TodoList.vue

@@ -216,7 +216,6 @@
 							// 如果没有修改过密码,则弹出密码修改窗口
 							this.innerVisible = true
 							this.$refs.updatePassword.init(!data)
-
 						}
 					})
 				}

+ 1 - 1
src/views/finance/invoice/InvoiceFormTask.vue

@@ -3,7 +3,7 @@
     <el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
              label-width="160px" @submit.native.prevent>
       <el-divider content-position="left"><i class="el-icon-document"></i>
-        基本信息
+
         <el-button style="margin-left: 20px" type="primary" :disabled="status === 'audit' || status === 'taskFormDetail'" size="default" @click="insertEvent('base')"  plain>
           新增
         </el-button>

+ 0 - 140
src/views/layout/UpdatePassword.vue

@@ -1,140 +0,0 @@
-<template>
-	<v-dialog
-		title="修改密码"
-		:close-on-click-modal="true"
-		append-to-body
-		v-model="dialogVisible"
-		width="70%"
-		height="600px"
-	>
-    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
-             label-width="80px" @submit.native.prevent>
-      <div style="margin-bottom: 20px;" v-if="showTip">
-        <el-alert
-          title="当前账号的密码仍为初始密码,风险较大,请及时修改"
-          type="warning"
-          :closable="false"
-          center
-          show-icon>
-        </el-alert>
-      </div>
-      <el-form-item label="账号">
-        <span>{{ userName }}</span>
-      </el-form-item>
-      <el-form-item label="原密码" prop="password">
-        <el-input type="password" size="small" v-model="dataForm.password" ></el-input>
-      </el-form-item>
-      <el-form-item label="新密码" prop="newPassword">
-        <el-input type="password" size="small" v-model="dataForm.newPassword" ></el-input>
-      </el-form-item>
-      <el-form-item label="确认密码" prop="confirmPassword">
-        <el-input type="password" size="small" v-model="dataForm.confirmPassword" ></el-input>
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer" style="float: right">
-      <el-button size="large" @click="dialogVisible = false" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="large" type="primary" @click="dataFormSubmit()">确定</el-button>
-    </span>
-  </v-dialog>
-</template>
-
-<script>
-  import {clearLoginInfo} from '@/utils'
-  import UserService from '@/api/sys/UserService'
-  export default {
-	  props:{
-		  innerVisible:{
-			  type: Boolean,
-			  default: true
-		  }
-	  },
-    data () {
-      let validateConfirmPassword = (rule, value, callback) => {
-        if (this.dataForm.newPassword !== value) {
-          callback(new Error('确认密码与新密码不一致'))
-        } else {
-          callback()
-        }
-      }
-      return {
-      	dialogVisible: this.innerVisible,
-        showTip: false,
-        dataForm: {
-          password: '',
-          newPassword: '',
-          confirmPassword: ''
-        },
-        dataRule: {
-          password: [
-            {required: true, message: '原密码不能为空', trigger: 'blur'}
-          ],
-          newPassword: [
-            {required: true, message: '新密码不能为空', trigger: 'blur'}
-          ],
-          confirmPassword: [
-            {required: true, message: '确认密码不能为空', trigger: 'blur'},
-            {validator: validateConfirmPassword, trigger: 'blur'}
-          ]
-        }
-      }
-    },
-    computed: {
-      userName: {
-        get () {
-          return this.$store.state.user.name
-        }
-      },
-      mainTabs: {
-        get () {
-          return this.$store.state.common.mainTabs
-        },
-        set (val) {
-          this.$store.commit('common/updateMainTabs', val)
-        }
-      }
-    },
-    created () {},
-    methods: {
-		handleClose(done) {
-			this.$emit("innerDialog",false)
-		},
-      // 初始化
-      init (showTip) {
-        if (this.commonJS.isNotEmpty(showTip)) {
-          this.showTip = showTip
-        } else {
-          this.showTip = false
-        }
-        this.dialogVisible = true
-        // this.$nextTick(() => {
-        //   this.$refs.dataForm.resetFields()
-        //   //this.$refs['dataForm'].resetFields()
-        // })
-      },
-      // 表单提交
-      dataFormSubmit () {
-        this.$refs['dataForm'].validate((valid) => {
-          if (valid) {
-            this.userService.savePwd({
-              'oldPassword': this.dataForm.password,
-              'newPassword': this.dataForm.newPassword
-            }).then((data) => {
-              this.$message({
-                message: '修改成功, 请重新登录!',
-                type: 'success',
-                duration: 1500
-              })
-              this.dialogVisible = false
-              this.$nextTick(() => {
-                this.mainTabs = []
-                clearLoginInfo()
-                this.$router.replace({name: 'login'})
-              })
-            })
-          }
-        })
-      }
-    }
-  }
-</script>
-

+ 1 - 1
src/views/layout/UpdatePassword2.vue

@@ -121,7 +121,7 @@
 							this.$nextTick(() => {
 								this.mainTabs = []
 								clearLoginInfo()
-								this.$router.replace({name: 'login'})
+								this.$router.push({path: "/login"})
 							})
 						})
 					}