Selaa lähdekoodia

Merge branch 'master' of http://git.zthymaoyi.com:3000/gdc/yiliangyiyun-pc

gjy 3 vuotta sitten
vanhempi
commit
e168e1791a

+ 1 - 1
src/views/houseSelfCollect/inspectionManagement.vue

@@ -268,7 +268,7 @@
 								this.warehouseCount = _wareHouse.count
 							} 
 						for (let i = 0; i < response.length; i++) {
-							if(response[i].warehouseName==_wareHouse.value){
+							if(_wareHouse && response[i].warehouseName==_wareHouse.value){
 								this.warehouseCount = response[i].count
 							}
 							this.warehouseList.push({

+ 12 - 14
src/views/houseSelfCollect/paymentManagement.vue

@@ -155,7 +155,7 @@
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             "
-            @click="print(scope.row)"
+            @click="print1(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.finace`"
           >财务打印</el-button>
           <el-button
@@ -348,24 +348,24 @@ export default {
         response.data.imgList = [
           {
             name:'xml1',
-            src: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png"
+            src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
           },
             {
             name:'xml2',
-            src: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png"
+            src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
           },  {
             name:'xml3',
-            src: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png"
+            src: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/75215bed1ad7408aa73d6474bfe82854.png'
           }
          ]
         this.invoicingImgList = response.data.imgList
         if(response.data.imgList.length>0){
           for(let i = 0;i<response.data.imgList;i++){
           //创建标签下载文件
-            let a = document.createElement("a");
+            let a = document.createElement('a');
             a.href = response.data.imgList[i].src;
-            let urlArr = a.href.split(".");
-            a.setAttribute('download',response.data.imgList[i].name+".xml");
+            let urlArr = a.href.split('.');
+            a.setAttribute('download',response.data.imgList[i].name+'.xml');
             a.click();
             a.remove();
           }
@@ -764,13 +764,12 @@ export default {
           })
       }
     },
+    print1(row) {
+      this.isShowPrintType = true
+      this.rowData = row
+    },
     print(row) {
-      console.log('打印数据', row)
-      if (sessionStorage.getItem('ws-pf_roleName') == '财务') {
-        this.isShowPrintType = true
-        this.rowData = row
-      } else {
-        getpaymentexamine({ id: row.id })
+      getpaymentexamine({ id: row.id })
           .toPromise()
           .then(response => {
             this.printData = response
@@ -787,7 +786,6 @@ export default {
               date.getDate() +
               '日'
           })
-      }
     },
     examine() {
       if (this.modification.length == 0) {

+ 1 - 0
src/views/houseSelfCollect/settlement.vue

@@ -441,6 +441,7 @@ export default {
     }
   },
   activated() {
+    debugger
     this.types = this.$route.query.type
     if( this.types == 2){
          this.disabled=true

+ 30 - 2
src/views/warehouse/warehouseManagementRecord.vue

@@ -43,7 +43,7 @@
 					<img v-if="status == 3" width="18" height="18" src="../../../public/img/radio-check.png"
 						alt="" />入库记录
 				</div>
-				<el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
+				<el-table show-summary :summary-method="getSummaries"   :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
 					<el-table-column type="expand">
 						<template #default="props">
 							<ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -144,7 +144,7 @@
 					</el-table-column>
 
 				</el-table>
-				<el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '2'">
+				<el-table show-summary :summary-method="getSummaries" :data="warehouseList.records" height="560" v-show="this.warehouseType== '2'">
 					<el-table-column type="expand">
 						<template #default="props">
 							<ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -354,6 +354,34 @@
 			this.showType = this.isShow
 		},
 		methods: {
+			//合计
+			getSummaries(param) {
+				const { columns, data } = param
+				const sums = []
+				columns.forEach((column, index) => {
+					if (index === 0) {
+						sums[index] = '合计'
+					} else if (
+						index === 7 
+					) {
+						const values = data.map((item) => Number(item[column.property]))
+						if (!values.every((value) => isNaN(value))) {
+							sums[index] = values.reduce((prev, curr) => {
+								const value = Number(curr)
+								if (!isNaN(value)) {
+									return prev + curr
+								} else {
+									return prev
+								}
+								}, 0)
+							sums[index] = sums[index].toFixed(3)
+						}
+					} else {
+						sums[index] = '--'
+					}
+				})
+				return sums
+			},
 			print(row){
 				getPrintInfo({
                         id: row.id

+ 1 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -1223,7 +1223,7 @@ export default {
       }
       if (
         this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 20
+        this.deptBudgetList.contractNo.length > 50
       ) {
         this.$message({
           message: '合同编号输入有误!',