Ver código fonte

销售出库报表

huangfuli 3 anos atrás
pai
commit
f17fdfeee9
1 arquivos alterados com 118 adições e 31 exclusões
  1. 118 31
      src/views/statisticalReport/stockSaleOutReportList.vue

+ 118 - 31
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -36,11 +36,17 @@
 				<span v-else>合同单价: 0 元/吨</span>
 				<span v-if="amountReceivable">应收: {{ amountReceivable }} 元</span>
 				<span v-else>应收: 0 元</span>
-				<span v-if="amountReceived">已收: {{ amountReceived }} 元</span>
+				<span v-if="amountReceived">已收: {{ amountReceived }} 元
+					<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+						src="../../../public/img/fujian.png" @click="fujian1()" alt="" />
+				</span>
 				<span v-else>已收: 0 元</span>
 				<span v-if="uncollectedAmount">未收: {{ uncollectedAmount }} 元</span>
 				<span v-else>未收: 0 元</span>
-				<span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元</span>
+				<span v-if="orderList.deposit">定金: {{ orderList.deposit }} 元
+					<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+						src="../../../public/img/fujian.png" @click="fujian()" alt="" />
+				</span>
 				<span v-else>定金: 0 元</span>
 			</div>
 
@@ -49,17 +55,30 @@
 				<el-table-column type="index" label="序号" width="50"></el-table-column>
 				<el-table-column class="table_td" prop="warehouseName" label="仓库"></el-table-column>
 				<el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
-				<el-table-column class="table_td" prop="deliveryDate" label="出库日期"></el-table-column>
+				<el-table-column class="table_td" prop="deliveryDate" label="出库日期">
+					<template slot-scope="scope">
+						<span style="color: #ce4545;" v-if="scope.row.returnFlag == 1">{{scope.row.returnDate}}</span>
+						<span v-if="scope.row.returnFlag == null">{{scope.row.deliveryDate }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column class="table_td" prop="grossWeight" label="毛重(吨)"></el-table-column>
 				<el-table-column class="table_td" prop="tare" label="皮重(吨)"></el-table-column>
-				<el-table-column class="table_td" prop="netWeight" label="净重(吨)"></el-table-column>
+				<el-table-column class="table_td" prop="netWeight" label="净重(吨)">
+					<template slot-scope="scope">
+						<span style="color: #ce4545;"
+							v-if="scope.row.returnFlag == 1">-{{scope.row.netWeight}}(退)</span>
+						<span v-if="scope.row.returnFlag == null">{{scope.row.netWeight }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column class="table_td" prop="settlementWeight" label="结算重量(吨)">
 					<template slot-scope="scope">
 						<div class="inputChenge">
 							<el-input v-model="scope.row.settlementWeight" v-if="scope.row.identification == 'true'">
 							</el-input>
 							<div v-if="scope.row.identification == 'false'" class="inputs">
-								{{ scope.row.settlementWeight }}
+								<span style="color: #ce4545;"
+									v-if="scope.row.returnFlag == 1">{{scope.row.settlementWeight}}</span>
+								<span v-if="scope.row.returnFlag == null">{{scope.row.settlementWeight }}</span>
 							</div>
 						</div>
 						<img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
@@ -69,14 +88,36 @@
 							v-if="scope.row.identification == 'true'" @click="weightClick(scope.row)"></i>
 					</template>
 				</el-table-column>
-				<el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)"></el-table-column>
+				<el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
+					<template slot-scope="scope">
+						<span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable }}</span>
+					</template>
+				</el-table-column>
 			</el-table>
 
+
 			<!-- 页数 -->
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
 				:current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
 				:total="deptBudgetTotal"></el-pagination>
-			</el-scrollbar>
+		</el-scrollbar>
+		<!-- 定金弹窗 -->
+		<WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+			@on-cancel="handleClose">
+			<div v-for="(item,index) in addressUrlArray" :key="index">
+				<img width="100" height="100" :src="item" alt="">
+			</div>
+		</WinseaContentModal>
+		<!-- 已收弹窗 -->
+		<WinseaContentModal v-model="accessoryTFs1" :title="$t('system.noticeCircular.information')"
+			@on-cancel="handleClose1">
+			<div style="display: flex;">
+				<div v-for="(item,index) in addressUrlArray1" :key="index" style="display:flex;">
+					<img width="100" height="100" :src="item" alt="">
+					<!-- <img src="https://taohaoliang.oss-cn-beijing.aliyuncs.com/admin/f43f512136a544d3bbcef0fa4259d274.png" alt=""> -->
+				</div>
+			</div>
+		</WinseaContentModal>
 		<!-- 收款 -->
 		<el-dialog width="25%" title="收款" :visible.sync="dialogFormVisible1" :append-to-body="true">
 			<el-form :model="form">
@@ -87,8 +128,8 @@
 					<el-input v-model="money" autocomplete="off" placeholder="请输入本次收款金额" class="deal"></el-input>
 				</el-form-item>
 				<el-form-item label="收款日期" prop="collectionDate" :label-width="formLabelWidth" class="deal">
-					<ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期"
-						value-format="yyyy-MM-dd" class="deal" />
+					<ws-date-picker v-model="collectionDate" type="date" placeholder="请选择收款日期" value-format="yyyy-MM-dd"
+						class="deal" />
 				</el-form-item>
 				<el-form-item label="上传收款截图" :label-width="formLabelWidth">
 					<el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
@@ -143,12 +184,6 @@
 		disOrRemarks,
 		saleEditSettlementWeight,
 	} from '@/model/statisticalReport/index'
-	import {
-		posthandle
-	} from '@/model/purchasingManagement/index'
-	import {
-		downloadFile
-	} from '@/utils/batchDown'
 	import Pagination from '@/components/Pagination'
 	import WsUpload from '@/components/WsUpload'
 	import {
@@ -220,7 +255,7 @@
 				amountReceivable: '',
 				amountReceived: '',
 				uncollectedAmount: '',
-				outboundVolume:'',
+				outboundVolume: '',
 				collectionDate: '',
 				collectionScreenshot: '',
 				amountEdCollectionable: '',
@@ -233,6 +268,12 @@
 				searchKeyWord: '',
 				value1: '', //收款日期
 				modification: [],
+				accessoryTFs: false,
+				appendixIdss: [],
+				accessoryTFs1: false,
+				appendixIdss1: [],
+				addressUrlArray: [],
+				addressUrlArray1: [],
 			}
 		},
 		activated() {
@@ -241,15 +282,20 @@
 		},
 		methods: {
 			//表头
-			   contractchange(e) {
-        for (var i = 0; i < this.contractNoList.length; i++) {
-          if (this.contractNoList[i].contractNo == e) {
-           this.orderList= this.contractNoList[i]
-          }
-        }
-      this.contractNo = e
-      this.getList()
-    },
+			contractchange(e) {
+				for (var i = 0; i < this.contractNoList.length; i++) {
+					if (this.contractNoList[i].contractNo == e) {
+						this.orderList = this.contractNoList[i]
+						if (this.contractNoList[i].depositUrl) {
+							this.addressUrlArray = this.contractNoList[i].depositUrl.split(',')
+						} else {
+							this.addressUrlArray = []
+						}
+					}
+				}
+				this.contractNo = e
+				this.getList()
+			},
 			//选择合同
 			dataFilter(val) {
 				this.contractNo = val
@@ -431,6 +477,35 @@
 						})
 				})
 			},
+			//定金附件
+			fujian() {
+				if (this.orderList.depositUrl === null || this.orderList.depositUrl === '') {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				}
+				this.appendixIdss = this.orderList.depositUrl
+				this.accessoryTFs = true
+			},
+			handleClose() {
+				this.accessoryTFs = false
+			},
+			//已收附件
+			fujian1() {
+				if (this.addressUrlArray1.length == 0) {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				} else {
+					this.appendixIdss1 = this.collectionScreenshot
+					this.accessoryTFs1 = true
+				}
+			},
+			handleClose1() {
+				this.accessoryTFs1 = false
+			},
 			//收款
 			handlecollect() {
 				this.amountEdReceivable = this.saleList.records[0].amountEdReceivable
@@ -439,7 +514,7 @@
 				this.dialogFormVisible1 = true
 			},
 			collectment() {
-				this.stockSaleReceiptReport.money = this.money			
+				this.stockSaleReceiptReport.money = this.money
 				this.stockSaleReceiptReport.collectionDate = this.collectionDate
 				if (
 					this.money < 0 ||
@@ -523,12 +598,24 @@
 						this.amountReceived = 0
 						this.uncollectedAmount = 0
 						this.outboundVolume = 0
+						let num = []
 						for (var i = 0; i < response.records.length; i++) {
 							response.records[i].identification = 'false'
 							this.amountReceivable += response.records[i].amountIngReceivable
 							this.amountReceived += response.records[i].amountEdReceivable
 							this.uncollectedAmount += response.records[i].amountNotReceivable
 							this.outboundVolume += response.records[i].settlementWeight
+							// this.addressUrlArray1.push(response.records[i].collectionScreenshot.split('$'))
+							num = response.records[i].collectionScreenshot.split('$')
+							for (let j = 0; j < num.length; j++) {
+								if (num[j] != '') {
+									if (this.addressUrlArray1.indexOf(num[j]) == -1) {
+										this.addressUrlArray1.push(num[j])
+									}
+
+								}
+							}
+
 						}
 						this.deptBudgetTotal = response.total
 						this.saleList = response
@@ -854,7 +941,6 @@
 	.el-date-editor.el-input,
 	.el-date-editor.el-input__inner,
 	.el-input-number--small {
-		width: 123% !important;
 	}
 
 	/deep/.el-table td,
@@ -868,16 +954,17 @@
 		height: 220px;
 		line-height: 28px;
 		width: 146%;
-    	margin-left: 15px;
+		margin-left: 15px;
 	}
 
 	.inputs {
 		margin: 0 auto;
 		margin-right: 15%;
 	}
+
 	.inputChenge {
-  		width: 120%;
- 	    display: inline-flex;
-  		margin-left: -69%;
+		width: 120%;
+		display: inline-flex;
+		margin-left: -69%;
 	}
 </style>