|
|
|
|
@ -4,15 +4,15 @@
|
|
|
|
|
|
|
|
|
|
<view>
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
<!-- <view class="search">-->
|
|
|
|
|
<!-- <view class="input-content">-->
|
|
|
|
|
<!-- <u-input :clearable="false" value="" placeholder="请输入要搜索的内容" height="30" :custom-style="inputStyle"-->
|
|
|
|
|
<!-- @input=""></u-input>-->
|
|
|
|
|
<!-- </view>-->
|
|
|
|
|
<!-- <view class="icon">-->
|
|
|
|
|
<!-- <u-icon name="search" size="46" color="#ABAEBE"></u-icon>-->
|
|
|
|
|
<!-- </view>-->
|
|
|
|
|
<!-- </view>-->
|
|
|
|
|
<view class="search">
|
|
|
|
|
<view class="input-content">
|
|
|
|
|
<u-input :clearable="false" :value="select.keyword" placeholder="请输入要搜索的内容" height="30" :custom-style="inputStyle"
|
|
|
|
|
@input="searchInput"></u-input>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="icon">
|
|
|
|
|
<u-icon name="search" size="46" color="#ABAEBE"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="customer-list">
|
|
|
|
|
<view class="customer-list__item" v-for="(item, index) in customers" :key="item.id">
|
|
|
|
|
@ -78,9 +78,19 @@ export default {
|
|
|
|
|
fontWeight: "500"
|
|
|
|
|
},
|
|
|
|
|
customers: [],
|
|
|
|
|
select: {
|
|
|
|
|
keyword: ''
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
searchInput(e) {
|
|
|
|
|
this.select.keyword = e
|
|
|
|
|
|
|
|
|
|
this.select.page = 1
|
|
|
|
|
this.$u.debounce(this.getCustomer, 1000)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
toAddOrder (item) {
|
|
|
|
|
if ((((Number(item.all_worth)) - Number(item.total_worth)) <= 0) && (this.nowOrder(item) && this.nowOrder(item).product && this.nowOrder(item).product.demand === 1)) {
|
|
|
|
|
this.isShowModal = true;
|
|
|
|
|
@ -95,7 +105,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getCustomer () {
|
|
|
|
|
const res = await this.$u.api.customerAndOrder()
|
|
|
|
|
const res = await this.$u.api.customerAndOrder(this.select)
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.customers = res
|
|
|
|
|
}
|
|
|
|
|
|