|
@@ -8,10 +8,7 @@
|
|
|
v-model="searchContent.text"
|
|
|
suffixIcon="arrow-down"
|
|
|
:readonly="true"
|
|
|
- ></u--input>
|
|
|
- </view>
|
|
|
- <view class="revenue-search-item">
|
|
|
- <!-- <u-button text="搜索" type="primary" class="revenue-search-item-btn" @click="searchClick"></u-button> -->
|
|
|
+ />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="revenue-line">
|
|
@@ -30,7 +27,8 @@
|
|
|
:columns="dictList"
|
|
|
@confirm="incomeTypeConfirm"
|
|
|
@cancel="incomeTypePicker = false"
|
|
|
- ></u-picker>
|
|
|
+ />
|
|
|
+ <u-loading-page :loading="loading" loading-text="loading..." />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -97,7 +95,8 @@ export default {
|
|
|
dictList: [[]],
|
|
|
incomeTypePicker: false,
|
|
|
reportType: '',
|
|
|
- queryDate: ''
|
|
|
+ queryDate: '',
|
|
|
+ loading: false
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -107,6 +106,7 @@ export default {
|
|
|
this.getDict();
|
|
|
},
|
|
|
getDict() {
|
|
|
+ this.loading = true;
|
|
|
uni.$u.api.getDictApi({ type: 'income_type' }).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
let list = res.data.map((item) => {
|
|
@@ -124,9 +124,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getIncomeData() {
|
|
|
+ this.loading = true;
|
|
|
this.chartData.categories = [];
|
|
|
this.chartData.series[0].data = [];
|
|
|
- this.chartData.series[0].name = this.searchContent.text
|
|
|
+ this.chartData.series[0].name = this.searchContent.text;
|
|
|
uni.$u.api.operationalAnalysisApi
|
|
|
.getIncomeDataApi({
|
|
|
reportType: this.reportType,
|
|
@@ -144,15 +145,13 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
incomeTypeConfirm(e) {
|
|
|
this.searchContent = e.value[0];
|
|
|
this.getIncomeData();
|
|
|
this.incomeTypePicker = false;
|
|
|
- },
|
|
|
- searchClick() {
|
|
|
- // this.getIncomeData()
|
|
|
}
|
|
|
}
|
|
|
};
|