ccj 2 rokov pred
rodič
commit
f0c60edf89

+ 47 - 20
public/static/payprint1.html

@@ -311,10 +311,7 @@
                             </tr>
                             <tr class="row">
                                 <td class="col col-bgc">纯重</td>
-                                <td class="col col-bgc" v-if="printData1[index].type == '潮粮'">
-                                    净重单价
-                                </td>
-                                <td class="col col-bgc" v-if="printData1[index].type == '干粮'">
+                                <td class="col col-bgc" >
                                     单价
                                 </td>
                                 <td class="col col-bgc">扣单价</td>
@@ -328,14 +325,22 @@
                             </tr>
                             <tr class="row">
                                 <td class="col">{{ printData1[index].pureWeight}}</td>
-                                <td class="col " v-if="printData1[index].type == '潮粮'">
+                                <td class="col " v-if="printData1[index].type == '潮粮' && !pengyuPrint">
                                     {{printData1[index].tidalGrainPrice}}
                                 </td>
-                                <td class="col " v-if="printData1[index].type == '干粮'">
+                                <td class="col " v-if="printData1[index].type == '干粮' && !pengyuPrint">
                                     {{printData1[index].qualityInspectionManagement.dryGrainPrice}}
                                 </td>
+                                <td class="col " v-if="pengyuPrint">
+                                    {{printData1[index].unitContractPrice/1000}}
+                                </td>
                                 <td class="col ">{{ printData1[index].unitDeduction}}</td>
-                                <td class="col ">{{ printData1[index].grainMoney}}</td>
+                                <td class="col " v-if="pengyuPrint">
+                                    {{Number(printData1[index].unitContractPrice/1000*printData1[index].pureWeight).toFixed(2)}}
+                                </td>
+                                <td class="col " v-if="!pengyuPrint">
+                                    {{printData1[index].grainMoney}}
+                                </td>
                                 <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.mildewGrain:''}}</td>
                                 <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.jiaorenli:''}}</td>
                                 <td class="col "> {{printData1[index].qualityInspectionManagement?printData1[index].qualityInspectionManagement.imperfectGrain:''}}</td>
@@ -364,8 +369,11 @@
                                 <!-- <td class="col " v-if="printData1[index].type == '潮粮'">
                                     {{ printData1[index].solidGrainPrice}}
                                 </td> -->
-                                <td class="col ">
-                                    {{ printData1[index].calculationPayable}}
+                                <td class="col " v-if="pengyuPrint">
+                                    {{Number(printData1[index].unitContractPrice/1000*printData1[index].pureWeight).toFixed(2)}}
+                                </td>
+                                <td class="col " v-if="!pengyuPrint">
+                                    {{printData1[index].calculationPayable}}
                                 </td>
                                 <td class="col ">
                                     {{ printData1[index].qualityInspectionManagement.natureOfGrainPurchase}}
@@ -378,7 +386,7 @@
                             <tr class="row">
                                 <td class="col col-bgc">实付金额</td>
                                 <td class="col " colspan="2">
-                                    {{printData1[index].actualPayment}}
+                                    
                                 </td>
                                 <td class="col col-bgc" colspan="3">人民币(大写)</td>
                                 <td class="col " colspan="4">
@@ -677,10 +685,7 @@
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">纯重</td>
-                        <td class="col col-bgc" v-if="printData.type == '潮粮'">
-                            净重单价
-                        </td>
-                        <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+                        <td class="col col-bgc">单价</td>
                         <td class="col col-bgc">扣单价</td>
                         <td class="col col-bgc">粮款</td>
                         <td class="col col-bgc">霉变粒</td>
@@ -693,14 +698,22 @@
                     </tr>
                     <tr class="row">
                         <td class="col">{{ printData.pureWeight}}</td>
-                        <td class="col " v-if="printData.type == '潮粮'">
+                        <td class="col " v-if="printData.type == '潮粮' && !pengyuPrint">
                             {{printData.tidalGrainPrice}}
                         </td>
-                        <td class="col " v-if="printData.type == '干粮'">
+                        <td class="col " v-if="printData.type == '干粮' && !pengyuPrint">
                             {{printData.qualityInspectionManagement.dryGrainPrice}}
                         </td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{printData.unitContractPrice/1000}}
+                        </td>
                         <td class="col ">{{ printData.unitDeduction}}</td>
-                        <td class="col ">{{ printData.grainMoney}}</td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{Number(printData.unitContractPrice/1000*printData.pureWeight).toFixed(2)}}
+                        </td>
+                        <td class="col " v-if="!pengyuPrint">
+                            {{printData.grainMoney}}
+                        </td>
                         <td class="col "> {{printData.qualityInspectionManagement.mildewGrain}}</td>
                         <td class="col "> {{printData.qualityInspectionManagement.jiaorenli}}</td>
                         <td class="col "> {{printData.qualityInspectionManagement.imperfectGrain}}</td>
@@ -729,7 +742,12 @@
                         <!-- <td class="col " v-if="printData.type == '潮粮'">
                             {{ printData.solidGrainPrice}}
                         </td> -->
-                        <td class="col ">{{ printData.calculationPayable}}</td>
+                        <td class="col " v-if="pengyuPrint">
+                            {{Number(printData.unitContractPrice/1000*printData.pureWeight).toFixed(2)}}
+                        </td>
+                        <td class="col " v-if="!pengyuPrint">
+                            {{printData.calculationPayable}}
+                        </td>
                         <td class="col ">
                             {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
                         </td>
@@ -738,7 +756,7 @@
                     </tr>
                     <tr class="row">
                         <td class="col col-bgc">实付金额</td>
-                        <td class="col " colspan="2">{{printData.actualPayment}}</td>
+                        <td class="col " colspan="2"></td>
                         <td class="col col-bgc" colspan="3">人民币(大写)</td>
                         <td class="col " colspan="4">{{printData.capitalize}}</td>
                     </tr>
@@ -1122,7 +1140,8 @@
             selectPrint: false,
             onlyShowPz: false,
             tableData: [],
-            compId: ''
+            compId: '',
+            pengyuPrint:'false'
         },
         computed: {},
         methods: {
@@ -1155,6 +1174,14 @@
             printBig() {}
         },
         mounted() {
+            this.pengyuPrint = localStorage.getItem('pengyuPrint')
+            debugger
+            if(this.pengyuPrint == 'true'){
+                this.pengyuPrint = true
+            }
+            else{
+                this.pengyuPrint = false
+            }
             //公司id
             this.compId = localStorage.getItem('ws-pf_compId')
             this.date = new Date().toLocaleString()

+ 45 - 5
src/views/houseSelfCollect/paymentManagement.vue

@@ -178,10 +178,16 @@
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             " @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">打印</el-button>
+          <el-button v-show="
+              (scope.row.approveStatus ||
+              (scope.row.status != '待结算' && !scope.row.approveStatus))&&compId=='6a713699e08c4cbc97a87f7648a95e3d'
+            " @click="printPY(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">三方打印</el-button>
           <el-button v-show="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
-            " @click="print1(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务打印
+            " @click="print1(scope.row)" 
+            v-hasPermission="`acquisitionManagement.acquisitionPay.finace`"
+            >财务打印
           </el-button>
           <el-button v-show="
               scope.row.approveStatus ||
@@ -494,7 +500,8 @@
         excelFreightspace: [],
         goodnameList: [],
         goodsName: '全部货名',
-        printTips:''
+        printTips:'',
+        compId:''
       }
     },
     mounted() {
@@ -504,6 +511,8 @@
       console.log( this.currentPage,this.pageSize)
       this.getPassYearFormatDate()
       this.getWarehouse()
+      this.compId=localStorage.getItem('ws-pf_compId')
+      localStorage.setItem('pengyuPrint', false)
     },
     // activated() {
     //   this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
@@ -906,13 +915,15 @@
         if (this.warehouseName == '鲅鱼圈金信库') {
           _number = [11, 12,13, 16, 17, 18]
         } else {
-          _number = [10, 11,12,15, 16, 17]
+          _number = [10, 11,12,15, 16, 17,18]
         }
         if (this.modification.length > 0) {
           columns.forEach((column, index) => {
             if (index === 0) {
               sums[index] = '合计'
-            } else if (index === 10 || index === 11 || index === 15 || index === 16) {
+            
+            } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
+                3] || index === _number[4]|| index === _number[5]|| index === _number[6]) {
               const values = this.modification.map((item) => Number(item[column.property]))
               if (!values.every((value) => isNaN(value))) {
                 sums[index] = values.reduce((prev, curr) => {
@@ -936,7 +947,7 @@
             if (index === 0) {
               sums[index] = '合计'
             } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
-                3] || index === _number[4]) {
+                3] || index === _number[4]|| index === _number[5]|| index === _number[6]) {
               const values = data.map((item) => Number(item[column.property]))
               if (!values.every((value) => isNaN(value))) {
                 sums[index] = values.reduce((prev, curr) => {
@@ -1634,6 +1645,7 @@
         }
       },
       print1(row,num) {
+      localStorage.setItem('pengyuPrint', false)
         if(num == 2){
           this.printTips = 2
         }
@@ -1643,8 +1655,36 @@
         localStorage.setItem('cwprint', true)
       },
       print(row) {
+      localStorage.setItem('pengyuPrint', false)
+        this.printType = 2
+        localStorage.setItem('cwprint', false)
+        getpaymentexamine({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.printData = response
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
+            this.isShowPrint = true
+            // if(this.printData.solidGrainPrice){
+            //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+            // }
+            let date = new Date()
+            this.printData.currentTime =
+              date.getFullYear() +
+              '年' +
+              Number(date.getMonth() + 1) +
+              '月' +
+              date.getDate() +
+              '日'
+          })
+      },
+      printPY(row) {
         this.printType = 2
         localStorage.setItem('cwprint', false)
+        localStorage.setItem('pengyuPrint', true)
         getpaymentexamine({
             id: row.id,
           })