浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
159e43a9b1
共有 2 个文件被更改,包括 14 次插入3 次删除
  1. 10 2
      pages/approveStore/authPass.vue
  2. 4 1
      pages/approveStore/list.vue

+ 10 - 2
pages/approveStore/authPass.vue

@@ -50,7 +50,7 @@
 					<u-picker v-model="settleStyleModal" @confirm="settleStyleChange" :range="settleStyleList" range-key="dispName" mode="selector"></u-picker>
 				</u-form-item>
 				<u-form-item label="授信金额" v-if="form.settleType == 'CREDIT'" required prop="creditLimit">
-					<u-input type="number" :min="100" v-model.trim="form.creditLimit" placeholder="请输入大于100的数字,最多两位小数"/>
+					<u-input :clearable="false" type="digit" :min="100" :maxlength="8" @input="numberToFixed('creditLimit',2,999999)" v-model.trim="form.creditLimit" placeholder="请输入大于100的数字,最多两位小数"/>
 				</u-form-item>
 			</u-form>
 		</view>
@@ -63,7 +63,7 @@
 <script>
 	import Address from '@/components/address.vue'
 	import { xprhStoreApplyDetail, xprhStoreApplyAudit } from '@/api/approveStore'
-	import { clzConfirm } from '@/libs/tools';
+	import { clzConfirm, numberToFixed } from '@/libs/tools';
 	const baseUrl = getApp().globalData.baseUrl
 	export default{
 		components: {
@@ -137,6 +137,14 @@
 			uni.$off("addCustome")
 		},
 		methods: {
+			// 小数点后两位
+			numberToFixed: function (key, num, max) {
+				let val = this.form[key]
+				let ret = numberToFixed(val, num, max)
+				this.$nextTick(() => {
+					this.form[key] = ret < 100 ? 100 : ret
+				})
+			},
 			//  获取详细
 			getDetail () {
 			  xprhStoreApplyDetail({ sn: this.applySn }).then(res => {

+ 4 - 1
pages/approveStore/list.vue

@@ -74,6 +74,7 @@
 		onLoad(options) {
 			const _this = this
 			_this.tabList = this.$store.state.vuex_storeAuthState
+			_this.tabList[0].count = this.total
 			// 邀请码
 			_this.yqcode = this.$store.state.vuex_userData.extInfo.dealer.dealerInviteCode
 			// 获取数据
@@ -142,7 +143,9 @@
 							this.list = res.data.list || []
 						}
 						this.total = res.data.count || 0
-						this.tabList[0].count = this.total
+						if(this.current == 0){
+							this.tabList[0].count = this.total
+						}
 					} else {
 						this.list = []
 						this.total = 0