This commit is contained in:
2022-11-30 12:10:49 +08:00
parent 1d3240dc7e
commit fbaab6b342
3 changed files with 10 additions and 17 deletions

View File

@@ -9,16 +9,4 @@
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
} }
/* .icon-check{
position: relative;
}
.icon-check::before{
position: absolute;
top: 50%;
left: 50%;
content: "\EA08";
font-size: 16px;
color: #ffffff;
transform: translate(-50%,-48%) scale(.73);
-webkit-transform: translate(-50%,-48%) scale(.73);
} */

View File

@@ -35,7 +35,7 @@
handleChange ($event) { handleChange ($event) {
this.cur = $event.target.value this.cur = $event.target.value
this.$emit('input', this.cur) this.$emit('input', this.cur)
this.$emit('handleChange', this.cur) this.$emit('handleChange', this.cur)
}, },
toSearch () { toSearch () {
this.$emit('toSearch', this.cur) this.$emit('toSearch', this.cur)
@@ -50,6 +50,7 @@
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
this.$emit('input', res.result) this.$emit('input', res.result)
this.$emit('handleChange', res.result)
}, },
fail: (err) => { fail: (err) => {
// uni.showToast({ // uni.showToast({

View File

@@ -10,6 +10,7 @@
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <search-box
v-model="val1" v-model="val1"
@handleChange="handleChange"
/> />
</view> </view>
</view> </view>
@@ -53,7 +54,7 @@
</view> </view>
<view class="submit-bar"> <view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled2" @tap="_customerPrint">打印</button> <button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled2" @tap="_customerPrint">打印</button>
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_customerInfo">查询</button> <button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_customerInfo(val1)">查询</button>
</view> </view>
</view> </view>
</template> </template>
@@ -76,8 +77,11 @@
}; };
}, },
methods: { methods: {
handleChange (e) {
this._customerInfo(e)
},
/** 查询 */ /** 查询 */
async _customerInfo () { async _customerInfo (e) {
this.disabled1 = true this.disabled1 = true
if (!this.val1) { if (!this.val1) {
uni.showToast({ uni.showToast({
@@ -88,7 +92,7 @@
return return
} }
try { try {
let res = await customerInfo(this.val1) let res = await customerInfo(e)
this.dataList = [...res.data] this.dataList = [...res.data]
this.disabled1 = false this.disabled1 = false
} catch (e) { } catch (e) {