Browse Source

修改金额显示

chenrui 2 years ago
parent
commit
d5d732d529
2 changed files with 72 additions and 99 deletions
  1. 72 72
      public/dzd/index.html
  2. 0 27
      public/dzd/js/resize.js

+ 72 - 72
public/dzd/index.html

@@ -250,8 +250,8 @@
 									<span>{{item.bizNo}}</span>
 								</div>
 								<div class="order-b  flex align_center flex-between">
-									<div>应付:¥{{item.bizAmount ||0}}</div>
-									<div>已付:¥{{item.settledAmount | 0}}</div>
+									<div>应付:¥{{toThousands(item.bizAmount,2)}}</div>
+									<div>已付:¥{{toThousands(item.settledAmount,2)}}</div>
 									<div>
 										待付:<span>¥{{item.unsettleAmount ? toThousands(item.unsettleAmount,2): 0}}</span>
 									</div>
@@ -283,76 +283,76 @@
 	</body>
 	<script>
 		new Vue({
-			el: '#app',
-			data: {
-				ajaxUrl: 'http://p.iscm.360arrow.com/qpls-md/',
-				saleList: [],
-				saleDetailList: [],
-				info: {},
-				flag: false
-			},
-			created() {
-				this.loadData()
-				document.title = this.getUrlParam('name')
-			},
-			methods: {
-				loadData() {
-					const ajaxData = {
-						verifySn: this.getUrlParam('verifySn'),
-						dealerSn: this.getUrlParam('userSn')
-					}
-					axios.post(this.ajaxUrl + 'verify/findBySn', ajaxData).then((res) => {
-						this.info = res.data.data
-						res.data.data.detailList.forEach(item => {
-							item.isShow = false
-							item.list = []
-						})
-						this.saleList = res.data.data.detailList
-						this.getALlList(res.data.data.detailList)
-					}).catch((error) => {
-						console.log(error)
-					})
-				},
-				handleShow(con, i) {
-					const req_data = {
-						salesBillSn: con.bizSn
-					}
-					axios.post(this.ajaxUrl + 'salesDetail/queryList', req_data).then((res) => {
-						this.saleList[i].list = res.data.data
-					}).catch((error) => {
-						console.log(error)
-					})
-				},
-				openInfoList(i) {
-					this.saleList[i].isShow = !this.saleList[i].isShow
-					this.saleList.splice()
-				},
-				downLoad() {
-					window.location.href = this.ajaxUrl + 'verify/exportExcel?verifySn=' + this.getUrlParam(
-						'verifySn') + '&dealerSn=' + this.getUrlParam('userSn')
-				},
-				getUrlParam(name) {
-					var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') // 构造一个含有目标参数的正则表达式对象
-					var r = window.location.search.substr(1).match(reg) // 匹配目标参数
-					if (r != null) return unescape(r[2])
-					return null // 返回参数值
-				},
-				openAll() {
-					this.flag = !this.flag
-					this.saleList.forEach((item, i) => {
-						if (this.flag) {
-							item.isShow = true
-						} else {
-							item.isShow = false
-						}
-					})
-				},
-				getALlList(list) {
-					list.forEach((item, i) => {
-						this.handleShow(item, i)
-					})
-				}
-			}
+		  el: '#app',
+		  data: {
+		    ajaxUrl: 'http://p.iscm.360arrow.com/qpls-md/',
+		    saleList: [],
+		    saleDetailList: [],
+		    info: {},
+		    flag: false
+		  },
+		  created () {
+		    this.loadData()
+		    document.title = this.getUrlParam('name')
+		  },
+		  methods: {
+		    loadData () {
+		      const ajaxData = {
+		        verifySn: this.getUrlParam('verifySn'),
+		        dealerSn: this.getUrlParam('userSn')
+		      }
+		      axios.post(this.ajaxUrl + 'verify/findBySn', ajaxData).then((res) => {
+		        this.info = res.data.data
+		        res.data.data.detailList.forEach(item => {
+		          item.isShow = false
+		          item.list = []
+		        })
+		        this.saleList = res.data.data.detailList
+		        this.getALlList(res.data.data.detailList)
+		      }).catch((error) => {
+		        console.log(error)
+		      })
+		    },
+		    handleShow (con, i) {
+		      const req_data = {
+		        salesBillSn: con.bizSn
+		      }
+		      axios.post(this.ajaxUrl + 'salesDetail/queryList', req_data).then((res) => {
+		        this.saleList[i].list = res.data.data
+		      }).catch((error) => {
+		        console.log(error)
+		      })
+		    },
+		    openInfoList (i) {
+		      this.saleList[i].isShow = !this.saleList[i].isShow
+		      this.saleList.splice()
+		    },
+		    downLoad () {
+		      window.location.href = this.ajaxUrl + 'verify/exportExcel?verifySn=' + this.getUrlParam(
+		        'verifySn') + '&dealerSn=' + this.getUrlParam('userSn')
+		    },
+		    getUrlParam (name) {
+		      var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') // 构造一个含有目标参数的正则表达式对象
+		      var r = window.location.search.substr(1).match(reg) // 匹配目标参数
+		      if (r != null) return unescape(r[2])
+		      return null // 返回参数值
+		    },
+		    openAll () {
+		      this.flag = !this.flag
+		      this.saleList.forEach((item, i) => {
+		        if (this.flag) {
+		          item.isShow = true
+		        } else {
+		          item.isShow = false
+		        }
+		      })
+		    },
+		    getALlList (list) {
+		      list.forEach((item, i) => {
+		        this.handleShow(item, i)
+		      })
+		    }
+		  }
 		})
 	</script>
 

+ 0 - 27
public/dzd/js/resize.js

@@ -18,33 +18,6 @@
 	var clientWidth = docEl.clientHeight;
 })(document, window);
 
-
-// 导出
-function downloadExcel(data, fileName) {
-	if (!data) {
-		return
-	}
-	const a = moment().format('YYYYMMDDHHmmss')
-	const fname = fileName + a
-	const blob = new Blob([data], {
-		type: 'application/vnd.ms-excel'
-	})
-	if (window.navigator && window.navigator.msSaveOrOpenBlob) {
-		navigator.msSaveBlob(blob, fname + '.xlsx')
-	} else {
-		const link = document.createElement('a')
-		link.style.display = 'none'
-		var href = URL.createObjectURL(blob)
-		link.href = href
-		link.setAttribute('download', fname + '.xlsx')
-
-		document.body.appendChild(link)
-		link.click()
-		document.body.removeChild(link)
-		window.URL.revokeObjectURL(href) // 释放掉blob对象
-	}
-}
-
 function toThousands(num, decimal) {
 	let numInfo = num ? num : 0
 	return parseFloat(numInfo).toFixed(decimal)