浏览代码

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccjgmwz 3 年之前
父节点
当前提交
192d9e1b02
共有 1 个文件被更改,包括 108 次插入103 次删除
  1. 108 103
      src/views/houseSelfCollect/paymentManagement.vue

+ 108 - 103
src/views/houseSelfCollect/paymentManagement.vue

@@ -71,7 +71,8 @@
         <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
         </ws-button>
         <!-- v-hasPermission="`acquisitionManagement.acquisitionPay.finace`" -->
-        <ws-button type="primary" @click="selectPrint(1)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
+        <ws-button type="primary" @click="selectPrint(1)"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
         </ws-button>
       </template>
       <template slot="right"> </template>
@@ -147,7 +148,8 @@
               (scope.row.status != '待结算' && !scope.row.approveStatus)
             " @click="print1(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务打印
           </el-button>
-          <el-button @click="previewPayOrder(scope.row)" class="my-pre" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">预览付款单
+          <el-button @click="previewPayOrder(scope.row)" class="my-pre"
+            v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">预览付款单
           </el-button>
           <el-button type="danger" v-if="
               (!scope.row.approveStatus ||
@@ -193,36 +195,22 @@
       <!-- <div v-for="(item, index) in payImg" :key="index" class="pay_img">
         <img :src="item" alt class="img" />
       </div> -->
-      <el-upload
-  action="https://www.zthymaoyi.com/upload/admin"
-  list-type="picture-card"
-  :on-success="handleAvatarSuccess1"
-  :file-list='payImg'
-  :limit='1'>
-    <i slot="default" class="el-icon-plus"></i>
-    <div slot="file" slot-scope="{file}">
-      <img
-        class="el-upload-list__item-thumbnail"
-        :src="file.url" alt=""
-      >
-      
-      <span class="el-upload-list__item-actions"> 
-        <span
-          class="el-upload-list__item-preview"
-          @click="handlePictureCardPreview(file)"
-        >
-          <i class="el-icon-zoom-in"></i>
-        </span>
-        <span
-          v-if="!disabled"
-          class="el-upload-list__item-delete"
-          @click="_handleRemove(file)"
-        >
-          <i class="el-icon-delete"></i>
-        </span>
-      </span>
-    </div>
-</el-upload>
+      <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+        :on-success="handleAvatarSuccess1" :file-list='payImg' :limit='1'>
+        <i slot="default" class="el-icon-plus"></i>
+        <div slot="file" slot-scope="{file}">
+          <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+
+          <span class="el-upload-list__item-actions">
+            <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+              <i class="el-icon-zoom-in"></i>
+            </span>
+            <span v-if="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
+              <i class="el-icon-delete"></i>
+            </span>
+          </span>
+        </div>
+      </el-upload>
       <!-- <el-upload class="avatar-uploader"  action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
                 :on-success="handleAvatarSuccess1" :on-remove="_handleRemove">
                 <img @mouseout='imgshow' @mouseover="deleteshow=true" v-if="payImg" :src="payImg" class="avatar" />
@@ -251,8 +239,8 @@
       </el-dialog>
     </div>
     <el-dialog :visible.sync="dialogVisible">
-  <img width="100%" :src="dialogImageUrl" alt="">
-</el-dialog>
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
     <!--客户信息-->
     <el-dialog width="50%" title="客户信息" :visible.sync="customerInfo" :append-to-body="true" :close="customerclose">
       <el-form class="customer">
@@ -308,17 +296,13 @@
         <el-button @click="customerclose">取 消</el-button>
       </div>
     </el-dialog>
-   <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
-     <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>  
-     <el-image
-          class="my-img"
-          ref="myImg"
-          v-if="paymentReceipt"
-          :src="paymentReceipt"
-          :preview-src-list="[paymentReceipt]">
+    <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
+      <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>
+      <el-image class="my-img" ref="myImg" v-if="paymentReceipt" :src="paymentReceipt"
+        :preview-src-list="[paymentReceipt]">
       </el-image>
     </el-dialog>
-    
+
   </div>
 </template>
 <script>
@@ -359,8 +343,8 @@
     watch: {},
     data() {
       return {
-        paymentReceipt:'',
-        isPreviewPayOrder:false,
+        paymentReceipt: '',
+        isPreviewPayOrder: false,
         printType: 0,
         isShowPrintType1: true,
         isShowPrintType2: true,
@@ -370,7 +354,7 @@
         form: {},
         formLabelWidth: '300px',
         invoicing: '',
-        deleteshow:false,
+        deleteshow: false,
         customerlist: {
           payeeAddressUrls: [],
         },
@@ -412,8 +396,8 @@
         printData: {},
         warehouse: [],
         disabled: false,
-        dialogImageUrl:'',
-        dialogVisible:false,
+        dialogImageUrl: '',
+        dialogVisible: false,
         value1: '', //付款日期
         modification: [],
         userJurisdiction: true,
@@ -447,22 +431,21 @@
       })
     },
     methods: {
-      imgshow(){
-        this.deleteshow=false
+      imgshow() {
+        this.deleteshow = false
         console.log(11111)
       },
       handlePictureCardPreview(file) {
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
-      previewPayOrder(val){
-      this.paymentReceipt = val.paymentScreenshot
-      this.isPreviewPayOrder = true
-     console.log(val.paymentScreenshot)
-        
-      },
-      paymentReceiptClose(){
+      previewPayOrder(val) {
+        this.paymentReceipt = val.paymentScreenshot
+        this.isPreviewPayOrder = true
+        console.log(val.paymentScreenshot)
+
       },
+      paymentReceiptClose() {},
       datechange() {
         this.getList()
       },
@@ -726,6 +709,9 @@
                   })
                   .toPromise()
                   .then((response) => {
+                    if (response.compName == '黑龙江秋收有限公司') {
+                      response.compName = '黑龙江中天昊元贸易有限公司'
+                    }
                     index1++
                     let date = new Date()
                     response.currentTime =
@@ -767,6 +753,9 @@
               // val 是数组中每个接口返回的值 res.data
               console.log('两个接口全部加载完成', val1, val2);
               this.printData = val2.data
+              if (val2.data.compName == '黑龙江秋收有限公司') {
+                this.printData.compName = '黑龙江中天昊元贸易有限公司'
+              }
               this.isShowPrint = true
               // if(this.printData.solidGrainPrice){
               //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
@@ -853,16 +842,18 @@
         //   })
         //   return
         // } else {
-          this.showPayImgs = true
-          this.id=row.id
-          var arr=row.paymentScreenshot.split('$')
-          console.log(arr)
-          this.payImg=[]
-          for (let i = 0; i < arr.length; i++) {
-            if(arr[i]!=''){
-              this.payImg.push({url:arr[i]})
-            }
+        this.showPayImgs = true
+        this.id = row.id
+        var arr = row.paymentScreenshot.split('$')
+        console.log(arr)
+        this.payImg = []
+        for (let i = 0; i < arr.length; i++) {
+          if (arr[i] != '') {
+            this.payImg.push({
+              url: arr[i]
+            })
           }
+        }
         // }
       },
       getWarehouse() {
@@ -879,24 +870,24 @@
               this.warehouseName = this.$route.query.warehouseName
               this.warehouseNameKey = this.$route.query.warehouseName
             } else {
-                for(let index = 0 ; index < this.warehouseList.length ; index++){
-                  
-                    if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
-                          this.warehouseName = this.warehouseList[index].warehouseName
-                          this.warehouseNameKey = this.warehouseList[index].warehouseName
-                          return
+              for (let index = 0; index < this.warehouseList.length; index++) {
+
+                if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
+                  this.warehouseName = this.warehouseList[index].warehouseName
+                  this.warehouseNameKey = this.warehouseList[index].warehouseName
+                  return
+                } else {
+                  this.warehouseNameKey = this.warehouseList[0].id
+                  if (this.warehouseName) {
+                    this.warehouseNameKey = this.WAREHOUSE[3].payname
                   } else {
-                    this.warehouseNameKey = this.warehouseList[0].id
-                    if (this.warehouseName) {
-                      this.warehouseNameKey = this.WAREHOUSE[3].payname
-                    } else {
-                      this.WAREHOUSE[3].payname = this.warehouseList[0].id
-                      this.warehouseName = this.warehouseList[0].warehouseName
-                    }
+                    this.WAREHOUSE[3].payname = this.warehouseList[0].id
+                    this.warehouseName = this.warehouseList[0].warehouseName
                   }
+                }
 
               }
-              
+
             }
             this.getList()
           })
@@ -906,25 +897,31 @@
         this.imageUrl = e.url
       },
       handleAvatarSuccess1(file) {
-        if(this.payImg[0]){
-          this.$set(this.payImg[0],'url',file.url)
-        }else{
-          this.payImg[0]={
-            url:file.url
+        if (this.payImg[0]) {
+          this.$set(this.payImg[0], 'url', file.url)
+        } else {
+          this.payImg[0] = {
+            url: file.url
           }
         }
-        settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
           .then((response) => {
-            this.showPayImgs=false
+            this.showPayImgs = false
             this.$message.success('修改成功')
             this.getList()
           })
       },
-      _handleRemove(){
-this.payImg[0].url=''
-settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
+      _handleRemove() {
+        this.payImg[0].url = ''
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
           .then((response) => {
-            this.showPayImgs=false
+            this.showPayImgs = false
             this.$message.success('修改成功')
             this.getList()
           })
@@ -1237,6 +1234,7 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
         localStorage.setItem('cwprint', true)
       },
       print(row) {
+        debugger
         this.printType = 2
         localStorage.setItem('cwprint', false)
         getpaymentexamine({
@@ -1245,6 +1243,9 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
           .toPromise()
           .then((response) => {
             this.printData = response
+            if (response == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
             this.isShowPrint = true
             // if(this.printData.solidGrainPrice){
             //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
@@ -1306,7 +1307,7 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
                 monitorUrl1: this.warehouseList[i].monitorUrl1,
                 monitorUrl2: this.warehouseList[i].monitorUrl2,
                 warehouseNo: this.warehouseList[i].commonWarehouseNo,
-                compId:localStorage.getItem('ws-pf_compId')
+                compId: localStorage.getItem('ws-pf_compId')
               })
             )
             this.WAREHOUSE[3].payname = this.warehouseList[i].id
@@ -1426,17 +1427,18 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
   //   width: 150px;
   //   height: 150px;
   // }
-  .avatar-uploader{
-    position:relative;
-    width:178px;
+  .avatar-uploader {
+    position: relative;
+    width: 178px;
   }
+
   .avatar-uploader .el-upload {
     border: 1px dashed #d9d9d9;
     border-radius: 6px;
     cursor: pointer;
     position: relative;
     overflow: hidden;
-    width:178px;
+    width: 178px;
   }
 
   .avatar-uploader .el-upload:hover {
@@ -1536,16 +1538,19 @@ settlementEdit({id:this.id,paymentScreenshot:this.payImg[0].url}).toPromise()
   .el-button {
     margin: 5px;
   }
-  .no-messege{
+
+  .no-messege {
     text-align: center;
     font-size: 30px;
     padding: 50px;
   }
-   .my-img{
-            width: 200px;
-            height: 200px;
-        }
-  .el-icon-delete{
-    font-size:20px;
+
+  .my-img {
+    width: 200px;
+    height: 200px;
+  }
+
+  .el-icon-delete {
+    font-size: 20px;
   }
 </style>