Commit d1f750af by cwq0219

bug修复

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