sangwenwei пре 1 година
родитељ
комит
4d1b70e6f7

+ 31 - 17
src/views/cw/invoice/InvoiceForm.vue

@@ -27,7 +27,9 @@
 				  ref="baseTable"
 				  class="vxe-table-element"
 				  :data="inputForm.financeInvoiceBaseDTOList"
+				  :column-config="{resizable: true}"
 				  style="margin-left: 5em"
+				  :edit-rules="tableRules"
 				  highlight-current-row
 				  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
 			  >
@@ -48,15 +50,19 @@
 				  </vxe-table-column>
 				  <vxe-table-column   field="account" align="center" title="发票金额(元)" :edit-render="{}">
 					  <template v-slot:edit="scope">
-						  <el-input-number
-							  :readonly="true"
-							  :precision="2"
-							  :max="9999999999"
-							  :step="0.01"
-							  :min="0"
+						  <el-input
+							  :disabled="method==='view'"
+							  v-on:input="scope.row.account=scope.row.account.replace(/[^\d.]/g,'')
+							  .replace(/^\./g,'')
+							  .replace(/\.{2,}/g,'.')
+							  .replace('.','$#$').replace(/\./g,'').replace('$#$','.')
+							  .replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
+							  v-model="scope.row.account"
+							  controls-position="right"
 							  :controls="false"
-							  clearable
-							  placeholder="请填写发票金额" v-model="scope.row.account" />
+							  style="width:100%;"
+							  placeholder="请输入发票金额(元)"
+							  clearable />
 					  </template>
 				  </vxe-table-column>
 				  <!--            <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
@@ -64,11 +70,11 @@
 				  <!--                <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
 				  <!--              </template>-->
 				  <!--            </vxe-table-column>-->
-				  <!--            <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">-->
-				  <!--              <template v-slot:edit="scope">-->
-				  <!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
-				  <!--              </template>-->
-				  <!--            </vxe-table-column>-->
+				              <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">
+				                <template v-slot:edit="scope">
+				                  <el-input :readonly="true" :disabled="method==='view'" v-model="scope.row.reportNo" placeholder="请填写报告号"/>
+				                </template>
+				              </vxe-table-column>
 				  <vxe-table-column title="操作" width="100">
 					  <template v-slot="scope">
 						  <el-button type="danger" :disabled="method==='view'" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
@@ -635,6 +641,11 @@
   export default {
     data () {
       return {
+		  tableRules: {
+			  account: [
+				  { required: true, message: '请填写发票金额' }
+			  ]
+		  },
         title: '',
         method: '',
         visible: false,
@@ -645,8 +656,8 @@
           programName: '',
           contractName: '',
           programNo: '',
+			reportNo:'',
           clientName: '',
-          reportNo: '',
           type: '1',
           no: '',
           billingType: '1',
@@ -728,9 +739,8 @@
           financeInvoiceBaseDTOList: [],
           programName: '',
           contractName: '',
-          programNo: '',
+			reportNo:'',
           clientName: '',
-          reportNo: '',
           type: '1',
           no: '',
           billingType: '1',
@@ -778,6 +788,8 @@
           this.$refs.inputForm.resetFields()
           this.loading = true
           financeInvoiceService.queryById(this.inputForm.id).then((data) => {
+          	console.log(data)
+          	// this.inputForm.financeInvoiceBaseDTOList.reportNo=data.reportNo
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
 			  console.log('this.inputForm ', this.inputForm)
@@ -930,7 +942,9 @@
         this.inputForm = {
         	accountTotal:'',
           id: '',
-          financeInvoiceBaseDTOList: [],
+          financeInvoiceBaseDTOList: [
+			  {reportNo:this.inputForm.reportNo},
+		  ],
           programName: '',
           contractName: '',
           programNo: '',

Разлика између датотеке није приказан због своје велике величине
+ 820 - 789
src/views/cw/invoice/InvoiceFormTask.vue


+ 40 - 30
src/views/cw/invoice/InvoiceList.vue

@@ -218,7 +218,7 @@
           </vxe-column>
           <vxe-column min-width="150" title="发票申请编号" align="center" field="no">
             <template #default="scope">
-              <el-link  type="primary" :underline="false" @click="view(false, scope.row.id)">{{scope.row.no}}</el-link>
+              <el-link  type="primary" :underline="false" @click="view(false, scope.row)">{{scope.row.no}}</el-link>
             </template>
           </vxe-column>
           <vxe-column min-width="150" title="发票号" align="center" field="number"></vxe-column>
@@ -226,11 +226,11 @@
           <vxe-column min-width="150" title="经办人" align="center" field="operator"></vxe-column>
           <vxe-column min-width="150" title="经办人部门" align="center" field="operatorOffice"></vxe-column>
           <vxe-column min-width="150" title="开票总金额(元)" align="center" field="account"></vxe-column>
-          <vxe-column min-width="150" title="发票金额(元)" align="center" field="accountDetail"></vxe-column>
-          <vxe-column min-width="150" title="报备类型" align="center" field="label">
-<!--			  <template #default="scope">-->
-<!--				  {{$dictUtils.getDictLabel('cw_work_client_report_type', scope.row.reportType, '')}}-->
-<!--			  </template>-->
+          <vxe-column min-width="150" title="发票金额(元)" align="center" field="account"></vxe-column>
+          <vxe-column min-width="150" title="报备类型" align="center" field="reportType">
+			  <template #default="scope">
+				  {{$dictUtils.getDictLabel('cw_work_client_report_type', scope.row.reportType, '')}}
+			  </template>
 		  </vxe-column>
           <vxe-column min-width="120" title="开票内容" align="center" field="billingContent">
             <template #default="scope">
@@ -308,7 +308,25 @@
 <!--    <ProgramForm ref="programForm"></ProgramForm>-->
     <InvoiceUpdateForm ref="invoiceUpdateForm" @refreshDataList="refreshList"></InvoiceUpdateForm>
 	  <ProjectForm ref="projectForm"></ProjectForm>
+	  <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
   </div>
+
+	<el-dialog title="详情信息" v-model="dialogFormVisible">
+		<el-form :model="form">
+			<el-row  :gutter="15">
+				<el-col :span="21">
+					<el-form-item label="详情" prop="programName">
+						<el-input :readonly="true" style="width: 100%" type="textarea" maxlength="500" v-model="searchForm.programName" show-word-limit>{{this.searchForm.programName}}</el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<div slot="footer" class="dialog-footer">
+			<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
+		</div>
+	</el-dialog>
+
+
 </template>
 
 <script>
@@ -324,11 +342,11 @@
   import ProgramPageForm from '@/views/finance/invoice/ProgramPageForm'
   import InvoiceUpdateForm from './InvoiceUpdateForm'
   import ProjectForm from '@/views/cw/projectRecords/ProjectRecordsForm'
-  import projectPageForm from './ProgramPageForm'
+  import ReportManagementForm from '@/views/cw/reportManagement/ReportManagementForm'
   export default {
     data () {
       return {
-
+	    dialogFormVisible:false,
 		searchVisible: true,
         showHideItem: false,
         showHideIcon: 'el-icon-arrow-down',
@@ -381,7 +399,8 @@
       ProgramPageForm,
       ProgramForm,
       InvoiceUpdateForm,
-	  ProjectForm
+	  ProjectForm,
+		ReportManagementForm,
     },
     mounted () {
 		this.$nextTick(() => {
@@ -428,12 +447,21 @@
         this.$refs.invoiceForm.init(false, id, true)
       },
       // 查看 flag为true时,弹窗为收款,其他值为查看发票详情
-      view (flag, id) {
-        this.$refs.invoiceForm.init(flag, id)
+      view (flag, row) {
+        this.$refs.invoiceForm.init(flag, row.id)
       },
       // 查看项目数据
       viewProject (row) {
-		  this.$refs.projectForm.init('view', row.programId)
+      	console.log(row.recordType)
+      	if (row.recordType=='1'){
+			this.$refs.projectForm.init('view', row.programId)
+		}else if (row.recordType=='2'){
+			this.$refs.reportManagementForm.init('view', row.programId, '报告审核单下载')
+		}else if (row.recordType=='0'){
+			this.dialogFormVisible=true
+			this.searchForm.programName=row.programName
+		}
+
       },
       // 获取数据列表
       refreshList () {
@@ -485,24 +513,6 @@
             } else {
               item.programName = ''
             }
-            // if (!this.commonJS.isEmpty(item.financeInvoiceDetailDTOList)) {
-            //   item.accountDetail = 0
-            //   let num = ''
-            //   item.financeInvoiceDetailDTOList.forEach((detail, index) => {
-            //     if (!this.commonJS.isEmpty(detail.account)) {
-            //       item.accountDetail = parseFloat(parseFloat(item.accountDetail) + parseFloat(detail.account)).toFixed(2)
-            //     }
-            //     if ((index + 1) !== item.financeInvoiceDetailDTOList.length) {
-            //       num = num + detail.number + ','
-            //     } else {
-            //       num = num + detail.number
-            //     }
-            //   })
-            //   item.number = num
-            // } else {
-            //   item.number = ''
-            //   item.accountDetail = ''
-            // }
           })
           this.tablePage.total = data.total
           this.loading = false

+ 0 - 23
src/views/cw/invoice/ProgramPageForm.vue

@@ -150,21 +150,6 @@
         </div>
       <div style="height: 500px;" v-if="checkType === '3'">
         <el-form  label-width="80px" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-			<el-col :span="12">
-				<el-form-item label="报备类型" prop="reportType"
-							  :rules="[
-                                 {required: true, message:'报备类型不能为空', trigger:'blur'}
-                  ]">
-					<el-select v-model="reportType" placeholder="请选择报备类型" clearable style="width: 100%;">
-						<el-option
-							v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
-							:key="item.value"
-							:label="item.label"
-							:value="item.value">
-						</el-option>
-					</el-select>
-				</el-form-item>
-			</el-col>
 			<el-row  :gutter="15">
             <el-col :span="21">
               <el-form-item label="详情" prop="detail">
@@ -311,18 +296,10 @@
           }
           rows = [{projectName: this.detail}]
 		  rows.bj1 = 'bj1'
-		  if (this.commonJS.isEmpty(this.reportType)){
-		  	this.$message.error('请选择报备类型')
-		  	return;
-		  }
-		  rowsType=[{reportType: this.reportType}]
-		  rowsType.bj1='bj1'
-
         }
 
         this.close()
         this.$emit('getProgram', rows)
-        this.$emit('getProgram', rowsType)
       },
       list () {
         this.loading = true

+ 1 - 0
src/views/cw/projectRecords/ProjectRecordsAddForm.vue

@@ -302,6 +302,7 @@
                         :key="tableKeyContact"
                         class="vxe-table-element"
                         :data="inputForm.cwProjectClientContactDTOList"
+						keep-source
                         style=""
                         highlight-current-row
                         :edit-rules="validContactRules"

+ 15 - 13
src/views/cw/projectRecords/ProjectRecordsList.vue

@@ -33,19 +33,19 @@
         </el-date-picker>
       </el-form-item>
 		<el-form-item v-if="showHideItem" label="业务类型" prop="businessType">
-<!--			<SelectTree-->
-<!--				ref="typeTree"-->
-<!--				:props="{-->
-<!--                    value: 'id',             // ID字段名-->
-<!--                    label: 'name',         // 显示名称-->
-<!--                    children: 'children'    // 子级字段名-->
-<!--                  }"-->
-<!--				:url="'/finance-server/projectRecords/cw_project_business_type/queryById'"-->
-<!--				:value="searchForm.businessType"-->
-<!--				:clearable="true"-->
-<!--				:accordion="true"-->
-<!--				size="default"-->
-<!--				@getValue="(value) => {searchForm.businessType=value}"/>-->
+			<SelectTree
+				ref="typeTree"
+				:props="{
+                    value: 'id',             // ID字段名
+                    label: 'name',         // 显示名称
+                    children: 'children'    // 子级字段名
+                  }"
+				:url="'/finance-server/projectRecords/cw_project_business_type/list'"
+				:value="searchForm.businessType"
+				:clearable="true"
+				:accordion="true"
+				size="default"
+				@getValue="(value) => {searchForm.businessType=value}"/>
 		</el-form-item>
 
       <el-form-item>
@@ -159,6 +159,7 @@
   import UserSelect from '@/views/cw/workClientInfo/clientUserSelect'
   import ContractNameForm from '../workContract/ContractNameForm'
   import ProjectRecordsAddForm from './ProjectRecordsAddForm'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
 
 	export default {
     data () {
@@ -202,6 +203,7 @@
       ContractNameForm,
       ProjectRecordsAddForm,
 	  UserSelect2,
+	  SelectTree
     },
     computed: {
       userName () {