change
This commit is contained in:
@@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-col-12">
|
<view class="zd-col-12">
|
||||||
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
|
<!-- <search-box v-model="code" @handleChange="handleChange1" @handleDel="handleDel1" /> -->
|
||||||
<input type="text" class="filter_input" v-model="val3" disabled>
|
<input type="number" class="filter_input" v-model="val3" @blur="handleBlur(e)">
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" size="mini" @tap="_getWeight">获取重量</button>
|
<button class="mini-btn" type="primary" size="mini" @tap="_getWeight">获取重量</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
||||||
@@ -145,6 +145,34 @@
|
|||||||
this._regionList()
|
this._regionList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleBlur (e) {
|
||||||
|
if (this.val3) {
|
||||||
|
if (this.val3 < 0) {
|
||||||
|
this.val3 = 0
|
||||||
|
} else {
|
||||||
|
// 1. 过滤非法字符
|
||||||
|
// this.val3 = this.val3.replace(/[^0-9]/g, '')
|
||||||
|
// this.val3 = this.val3.replace(/^0+/, '') || '0'
|
||||||
|
// this.val3 = this.val3.replace(/^0+/, '')
|
||||||
|
// 4. 处理多个0开头的情况
|
||||||
|
if (/^0+[1-9]/.test(this.val3)) {
|
||||||
|
// 如果0后面跟着非零数字,去掉前导零
|
||||||
|
this.val3 = this.val3.replace(/^0+/, '');
|
||||||
|
} else if (/^0+$/.test(this.val3)) {
|
||||||
|
// 如果全是0,只保留一个0
|
||||||
|
this.val3 = '0';
|
||||||
|
} else if (/^0+\./.test(this.val3)) {
|
||||||
|
// 处理0.xxx的情况,去掉整数部分多余的0
|
||||||
|
this.val3 = '0.' + this.val3.replace(/^0+\./, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: '数量必填',
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
},
|
||||||
async _regionList () {
|
async _regionList () {
|
||||||
try {
|
try {
|
||||||
let res = await regionList()
|
let res = await regionList()
|
||||||
@@ -238,7 +266,10 @@
|
|||||||
}
|
}
|
||||||
let res = await getWeight(this.index2, this.pkId)
|
let res = await getWeight(this.index2, this.pkId)
|
||||||
if (res.code === '200') {
|
if (res.code === '200') {
|
||||||
console.log(11111)
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
this.val3 = res.data.weight
|
this.val3 = res.data.weight
|
||||||
this.flag = res.data.flag
|
this.flag = res.data.flag
|
||||||
this.dupWeight = res.data.weight
|
this.dupWeight = res.data.weight
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-11 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button>
|
<button class="zd-col-11 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button>
|
||||||
@@ -197,10 +197,13 @@
|
|||||||
clearUp () {
|
clearUp () {
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this.pkObj = {}
|
this.pkObj = {}
|
||||||
|
this.index = ''
|
||||||
|
this.index2 = ''
|
||||||
|
this.dataList = []
|
||||||
},
|
},
|
||||||
async _callMaterial () {
|
async _callMaterial () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!index2 || !pkId) {
|
if (!this.index2 || !this.pkId) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
},
|
},
|
||||||
async _zwConfirmIn () {
|
async _zwConfirmIn () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!index || !dataList.length) {
|
if (!this.index || !this.dataList.length) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" @tap="seachList">刷新</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" @tap="seachList">刷新</button>
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
},
|
},
|
||||||
async _intoRegion () {
|
async _intoRegion () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!index) {
|
if (!this.index) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
},
|
},
|
||||||
async _outRegion () {
|
async _outRegion () {
|
||||||
this.disabled2 = true
|
this.disabled2 = true
|
||||||
if (!index) {
|
if (!this.index) {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as types from '../types'
|
import * as types from '../types'
|
||||||
|
|
||||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://172.18.51.221:8011' : 'http://172.18.51.221:8011'
|
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.71:8099' : 'http://192.168.10.71:8099'
|
||||||
const acsUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.250:8012' : 'http://192.168.18.250:8012'
|
const acsUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.18.250:8012' : 'http://192.168.18.250:8012'
|
||||||
const printUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.162:8010' : 'http://192.168.81.162:8010'
|
const printUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.162:8010' : 'http://192.168.81.162:8010'
|
||||||
const state = {
|
const state = {
|
||||||
|
|||||||
Reference in New Issue
Block a user