Commit d1f750af by cwq0219

bug修复

1 parent 89e1ed6a
......@@ -3,7 +3,8 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
/* eslint-disable */
var reg = {
priceReg: /^\d[\d\.]*$/,
numReg: /^[1-9]\d*$/
numReg: /^[1-9]\d*$/,
zNumReg: /^\d*$/
}
/* eslint-enable */
regRule = regRule || 'priceReg'
......@@ -20,6 +21,9 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
newValue = pointDigit ? intergerNum + '.' + pointNum : newValue.split('.')[0]
} else {
newValue = newValue.length > intergerDigit ? oldValue.slice(0, intergerDigit) : newValue
if (regRule == 'zNumReg') {
newValue = newValue.split('')[0] == '0' ? '0' : newValue
}
}
return newValue
} else {
......
......@@ -88,6 +88,9 @@ export default {
mounted() {
this.selectedData = this.storeSelected
this.selectedData.forEach(item => {
item.merchantNo = item.merchantId + ''
})
this.getSelectingList()
},
......
<!-- 订单详情 -->
<template>
<div class="order-detail marketing">
<div class="order-detail marketing edit-box">
<div class="container m-b-20">
<p class="edit-title">订单信息</p>
<el-form label-width="100px" :inline="true">
......@@ -18,10 +18,10 @@
<span>{{detailForm.deliveryCompany}}&nbsp;&nbsp;&nbsp;{{detailForm.deliveryNumber}}</span>
</el-form-item>
</el-form>
<div v-if="orderGoods.length">
<div v-if="orderGoods.length" class="p-l-40">
<table class="show-table">
<tbody>
<tr v-for="(item, index) in orderGoods" :key="index">
<tr v-for="(item, index) in orderGoods" :key="index" style="height: 70px;">
<td><img :src="item.goodsImage" class="img-60" /></td>
<td>{{ item.goodsName }}</td>
<td>{{ item.specificationData }}</td>
......@@ -154,7 +154,6 @@ export default {
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.routeInfo = this.$route.params
console.log(this.routeInfo)
this.getInfo()
},
......@@ -176,6 +175,7 @@ export default {
},
getInfo() {
this.$apis.orderManage.getOrderDetailApi({ orderCode: this.routeInfo.orderCode }).then(res => {
console.log(res)
this.detailForm = res
this.orderRefund = res.orderRefund || null
if(this.orderRefund) {
......
......@@ -581,7 +581,7 @@ export default {
},
// 库存
'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'numReg')
this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg')
},
// 运费
'editForm.expressFee'(newValue, oldValue) {
......@@ -677,7 +677,7 @@ export default {
if (e.key != 'Backspace' && newValue.length > 1) {
oldValue = newValue.slice(0, newValue.length - 1)
}
this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'numReg')
this.nameToValSpecsList[idx].stock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg')
},
// 二次确认
secondSimpleConfirm(title, txt, fn) {
......@@ -1031,7 +1031,7 @@ export default {
if (i == 1) {
for (var j = 0; j < this.nameToValSpecsList.length; j++) {
var item = this.nameToValSpecsList[j]
if (!item.retailPrice || !item.stock) {
if (!item.retailPrice || !(item.stock + '')) {
this.whereToGo('specificationDetailList')
isJump = true
break
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!