瀏覽代碼

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

mxx 3 年之前
父節點
當前提交
0e62ced4d6

+ 1 - 0
src/views/contractManagement/salesContract.vue

@@ -539,6 +539,7 @@
 					this.accessoryTFs = true
 				}
 				this.appendixIdss = row.addressUrl
+				console.log(this.appendixIdss)
 			},
 			handleExamine(row) {
 				this.$router.push({

+ 1 - 0
src/views/statisticalReport/autoSettlementList.vue

@@ -95,6 +95,7 @@
         ref="warehouseList"
         border
         :summary-method="getSummaries"
+        show-summary
         @row-click="handleRowClick"
         @selection-change="handleSelectionChange"
       >

+ 137 - 101
src/views/statisticalReport/huoyunList.vue

@@ -36,11 +36,17 @@
             @click="handlereject()"
             >驳回</ws-button
           >
-          <ws-button
+          <!-- <ws-button
             type="primary"
             v-hasPermission="`report.transportationReport.payment`"
             @click="handlepayment"
             >申请结算</ws-button
+          > -->
+           <ws-button
+            type="primary"
+            v-hasPermission="`report.transportationReport.payment`"
+            @click="handlepayment"
+            >付款</ws-button
           >
           <!-- <ws-button
             type="primary"
@@ -56,12 +62,9 @@
           <el-select
             v-model="contractNo"
             placeholder="请选择合同"
-            clearable
-            filterable
-           
+         
             @change="contractchange"
             maxlength="500"
-            type="input"
             class="findValue"
           >
             <el-option
@@ -74,11 +77,8 @@
           <el-select
             v-model="taskNo"
             placeholder="请选择运输任务编号"
-            clearable
-            filterable
             @change="taskNochange"
             maxlength="500"
-            type="input"
             class="findValue"
           >
             <el-option
@@ -91,12 +91,8 @@
           <el-select
             v-model="processNo"
             placeholder="请选择运输阶段编号"
-            clearable
-            filterable
-            :filter-method="processNo"
             @change="processNochange"
             maxlength="500"
-            type="input"
             class="findValue"
           >
             <el-option
@@ -111,17 +107,28 @@
      
       <div class="freightSet" v-if="processNo">
         <div style="display: flex;width:200px;line-height: 30px;"> 预计运费(元):{{tranPriceIng}}元</div>
-        <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight}}</span>元</span>
+        <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight  ? actualFreight : tranPriceIng  }}</span>元</span>
         <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top:10px"></i>
         <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: 6px"
               src="../../../public/img/edit.png"
-              @click="textShow = true"
+              @click="editactual"
               alt=""
                v-show="!textShow"
             />
+            <span class="span_text">已付:{{amountEdPayable}}元
+                <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian()"
+            alt=""
+          />{{paymentScreenshotList.length == 0 ? "暂无附件" : paymentScreenshotList.length}}</span>
+            <span class="span_text">未付:{{alreadyInvoice}}元</span>
+            <span class="span_text">{{priceStatus}}</span>
       </div>
 
       <el-table
@@ -130,8 +137,6 @@
         style="width: 100%; margin-top: 20px"
         ref="warehouseList"
         border
-        :summary-method="getSummaries"
-        show-summary
         @row-click="handleRowClick"
         @selection-change="handleSelectionChange"
       >
@@ -164,7 +169,7 @@
         <el-table-column
           class="boxNo"
           prop="boxNo"
-          label="箱号/仓位号"
+          label="车厢号"
         ></el-table-column>
         <el-table-column
           class="table_td"
@@ -342,14 +347,14 @@
       </div>
     </el-dialog>
     <!--磅单 -->
-    <WinseaContentModal
+    <!-- <WinseaContentModal
       v-model="accessoryTFs"
       title="磅单信息"
       @on-cancel="handleClose"
     >
       <p>查看装车磅单</p>
       <img width="100" height="100" :src="loadingImg1" alt="" />
-    </WinseaContentModal>
+    </WinseaContentModal> -->
     <WinseaContentModal
       v-model="accesscard"
       title="磅单信息"
@@ -369,6 +374,14 @@
         <img style="width: 100px; height: 100px" :src="item" alt="" />
       </div>
     </WinseaContentModal>
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+			@on-cancel="accessoryTFs = false">
+      <div v-for="(item,index) in paymentScreenshotList" :key="index">
+			<!-- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="item" :editable="false"
+				accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" /> -->
+        <img :src="item" alt="附件" class="img_css">
+        </div>
+		</WinseaContentModal>
   </div>
   <!-- </div> -->
 </template>
@@ -522,6 +535,10 @@ export default {
           return time.getTime() > Date.now()
         },
       },
+      amountEdPayable : "",//已付金额
+      alreadyInvoice:"",//未付金额
+      priceStatus:"",//状态
+      paymentScreenshotList:[],//付款截图
     }
   },
   activated() {
@@ -529,6 +546,18 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    editactual(){
+      if(this.priceStatus == '已驳回' || this.priceStatus == '待审核'){
+         this.textShow = true
+      }else{
+         this.$message({
+              message: '只有待审核和已驳回状态可以编辑实际运费!',
+              type: 'warning',
+            })
+              this.textShow = false
+            return
+      }
+    },
     cur(status) {
       if (status == 0) {
         this.currect = true
@@ -581,9 +610,9 @@ export default {
         }
       }
     },
-    handleClose() {
-      this.accessoryTFs = false
-    },
+    // handleClose() {
+    //   this.accessoryTFs = false
+    // },
     handleClose1() {
       this.accesscard = false
     },
@@ -609,28 +638,39 @@ export default {
     },
     //结算
     handlepayment() {
-      this.dialogFormVisible1 = true
-      // this.amountNotPayable = 0
-      // this.money = this.money
-      // this.tranSettlementReportList = this.warehouseList.records[0].tranSettlementReportList
-      // this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
-      // this.paymentDate = this.paymentDate
-      // if (this.modification.length == 0) {
-      //   this.$message.warning('请选择一条要付款的条目')
-      // } else {
-      //   for (var i = 0; i < this.modification.length; i++) {
-      //     if (
-      //       this.modification[i].status != '已通过' &&
-      //       this.modification[i].status != '部分付款'
-      //     ) {
-      //       this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
-      //       return
-      //     }
-      //     this.amountNotPayable += this.modification[i].amountNotPayable
-      //   }
-      //   this.dialogFormVisible1 = true
-      // }
+      // this.dialogFormVisible1 = true
+      this.amountNotPayable = 0
+      this.money = this.money
+      this.tranSettlementReportList = this.warehouseList.records[0].tranSettlementReportList
+      this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
+      this.paymentDate = this.paymentDate
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择一条要付款的条目')
+      } else {
+        for (var i = 0; i < this.modification.length; i++) {
+          if (
+            this.modification[i].status != '已通过' &&
+            this.modification[i].status != '部分付款'
+          ) {
+            this.$message.warning('只有已通过或部分付款的条目才可进行付款操作')
+            return
+          }
+          this.amountNotPayable += this.modification[i].amountNotPayable
+        }
+        this.dialogFormVisible1 = true
+      }
     },
+    fujian() {
+				if ( this.paymentScreenshotList.length == 0) {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				} else {
+					this.accessoryTFs = true
+				}
+				// this.appendixIdss = row.addressUrl
+			},
     submitMoney() {
       this.autoSettlementReport.money = this.money
       this.autoSettlementReport.paymentDate = this.paymentDate
@@ -681,6 +721,7 @@ export default {
             tranSettlementReportList: this.modification,
             // amountEdPayable: this.modification[0].amountEdPayable,
             // amountNotPayable: this.modification[0].amountNotPayable,
+            tranTypeKey: 2,
             money: this.money,
             paymentDate: this.paymentDate,
             paymentScreenshot: this.paymentScreenshot,
@@ -828,6 +869,10 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          this.$notify.success({
+                title: '成功',
+                message: '实际运费总价设置成功',
+              })
          this.textShow = false
         })
         })
@@ -932,24 +977,24 @@ export default {
     editdeductionAmount() {
       this.textShow = false
     },
-    //装车磅单
-    lookloadingImg(row) {
-      if (row.loadingImg == null || row.loadingImg == '') {
-        EventBus.$emit(this.$message.warning('暂无磅单信息'))
-      } else {
-        this.accessoryTFs = true
-      }
-      this.loadingImg1 = row.loadingImg
-    },
-    //卸车磅单
-    lookunloadingImg(row) {
-      if (row.unloadingImg === null || row.unloadingImg === '') {
-        EventBus.$emit(this.$message.warning('暂无磅单信息'))
-      } else {
-        this.accesscard = true
-      }
-      this.unloadingImg1 = row.unloadingImg
-    },
+    // //装车磅单
+    // lookloadingImg(row) {
+    //   if (row.loadingImg == null || row.loadingImg == '') {
+    //     EventBus.$emit(this.$message.warning('暂无磅单信息'))
+    //   } else {
+    //     this.accessoryTFs = true
+    //   }
+    //   this.loadingImg1 = row.loadingImg
+    // },
+    // //卸车磅单
+    // lookunloadingImg(row) {
+    //   if (row.unloadingImg === null || row.unloadingImg === '') {
+    //     EventBus.$emit(this.$message.warning('暂无磅单信息'))
+    //   } else {
+    //     this.accesscard = true
+    //   }
+    //   this.unloadingImg1 = row.unloadingImg
+    // },
     //付款截图
     lookpaymentScreenshot(row) {
       if (row.paymentScreenshot == null || row.paymentScreenshot == '') {
@@ -1072,19 +1117,23 @@ export default {
              processNoValue:this.taskNoList[i].processNo[j].processNo,
              actualFreight : this.taskNoList[i].processNo[j].actualFreight,
              id:this.taskNoList[i].processNo[j].id,
-             tranPriceIng:this.taskNoList[i].processNo[j].tranPriceIng
+             tranPriceIng:this.taskNoList[i].processNo[j].tranPrice,
+             priceStatus:this.taskNoList[i].processNo[j].priceStatus
            })
           }
         }
       }
     },
     processNochange(e){
+    
       this.processNo = e
       for(let i = 0 ; i < this.processNoList.length ; i++){
         if(this.processNoList[i].processNoValue == e){
           this.actualFreight = this.processNoList[i].actualFreight
           this.processNoId =this.processNoList[i].id
           this.tranPriceIng = this.processNoList[i].tranPriceIng
+          this.priceStatus = this.processNoList[i].priceStatus
+            console.log( this.priceStatus)
         }
       }
       this.getList()
@@ -1094,38 +1143,6 @@ export default {
         this.$refs.warehouseList.doLayout()
       })
     },
-    //合计
-    getSummaries(param) {
-      const { columns, data } = param
-      const sums = []
-      columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = '合计'
-        } else if (
-          index === 13 ||
-          index === 14 ||
-          index === 15 ||
-          index === 16
-        ) {
-          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)
-          } else {
-            sums[index] = '元'
-          }
-        } else {
-          sums[index] = '--'
-        }
-      })
-      return sums
-    },
     //列表
     getList() {
       autoList({
@@ -1141,18 +1158,19 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          this.amountEdPayable = 0
+            this.alreadyInvoice  = 0
           for (var i = 0; i < response.records.length; i++) {
             response.records[i].settlementWeightchange = false
             response.records[i].deductionAmountchange = false
             response.records[i].amountNotPayable =
               response.records[i].amountIngPayable -
               response.records[i].amountEdPayable
-            //     response.records[i].settlementPrice =
-            //       response.records[i].unitPrice -
-            //       Math.abs(response.records[i].basisPrice) -
-            //       Math.abs(response.records[i].unloadingCharge) -
-            //       Math.abs(response.records[i].invoiceFee) -
-            //       Math.abs(response.records[i].deductionAmount)
+              if(this.processNo){
+                this.amountEdPayable += response.records[i].amountEdPayable // 已付
+                 this.alreadyInvoice += response.records[i].alreadyInvoice//未付
+                this.paymentScreenshotList = response.records[0].paymentScreenshot.split(",")//附件地址取运输阶段第一条
+              } 
           }
           this.deptBudgetTotal = response.total
           this.warehouseList = response
@@ -1177,7 +1195,16 @@ export default {
       console.log(file)
     },
     handlePictureCardPreview(file) {
+      console.log("dmlskgldjg",file)
       this.paymentScreenshot = file.url
+      for(let i = 0 ; i < this.modification.length ; i++){//选中的条数每条都添加一张付款截图
+        if(this.modification[i].paymentScreenshot){
+           this.modification[i].paymentScreenshot = ","+file.url
+        }else{
+           this.modification[i].paymentScreenshot = file.url
+        }
+      }
+     
 
       this.dialogVisible = true
     },
@@ -1528,6 +1555,7 @@ hr {
   border-right: 1px solid #e9ecf7;
   text-align: center;
   height: 40px;
+  
 }
 /deep/.freightSet .el-input__inner{
  width: 100px;
@@ -1535,7 +1563,11 @@ hr {
 .freightSet{
   margin: 10px 0 0 20px;
   display: flex;
-  width:500px;
+  width:800px;
+  .span_text{
+    margin-left: 20px;
+    line-height: 30px;
+  }
 }
 /deep/.freightSet .el-input{
   width: 44%;
@@ -1544,4 +1576,8 @@ hr {
   width: 300px;
   margin-left: 5px;
 }
+.img_css{
+  width: 200px;
+  height: 200px;
+}
 </style>

+ 3 - 25
src/views/statisticalReport/shippingList.vue

@@ -112,7 +112,7 @@
       <!-- v-if="actualFreight && tranPriceIng" -->
        <div class="freightSet" v-if="processNo">
         <div style="display: flex;width:200px;line-height: 30px;"> 预计运费(元):{{tranPriceIng}}元</div>
-        <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight}}</span>元</span>
+        <span style="display: flex;line-height: 30px;">实际运费(元):<el-input type="text" maxlength="70" size="small"  v-model="actualFreight" v-show="textShow"/><span v-show="!textShow">{{actualFreight == 0?tranPriceIng:actualFreight }}</span>元</span>
         <i @click="actualFreightchange" class="iconfont icon-dui" v-show="textShow" style="margin-top:10px"></i>
         <img
               width="17"
@@ -1063,7 +1063,7 @@ export default {
              processNoValue:this.taskNoList[i].processNo[j].processNo,
              actualFreight : this.taskNoList[i].processNo[j].actualFreight,
              id:this.taskNoList[i].processNo[j].id,
-             tranPriceIng:this.taskNoList[i].processNo[j].tranPriceIng
+             tranPriceIng:this.taskNoList[i].processNo[j].tranPrice
            })
           }
         }
@@ -1265,29 +1265,7 @@ export default {
           this.historyList = response
         })
     },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+   
     total() {},
   },
 }