qingyiay
2023-10-13 eec82b55813387e20087989536cd32810b59cd48
大部分按钮增加loading 放空操作逻辑修改
6个文件已修改
79 ■■■■ 已修改文件
pages/bindBackground/bindBackground.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/customer-page/customer-index/customer-index.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/userPassword.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/register/register.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bindBackground/bindBackground.vue
@@ -22,7 +22,8 @@
        </view>
        <view class="loginBtn"><u-button type="primary"
                text="确认"
                @click="submit()"></u-button></view>
                @click="submit()"
                :loading="submitLoading"></u-button></view>
    </view>
</template>
@@ -33,7 +34,8 @@
            return {
                username: '',
                password: '',
                code: ''
                code: '',
                submitLoading: false
            };
        },
        methods: {
@@ -68,6 +70,7 @@
                })
            },
            setUpWxOpenid(userName, passWord, code) {
                this.submitLoading = true
                uni.request({
                    url: `${BaseUrl}/admin/user/setUpWxOpenid`,
                    data: {
@@ -83,8 +86,10 @@
                        console.log(res, '绑定结果');
                        if (res.data.code === 1) {
                            this.$u.toast(res.data.msg ? res.data.msg : '绑定失败')
                            this.submitLoading = false
                        } else {
                            this.$u.toast('操作成功')
                            this.submitLoading = false
                        }
                    }
                })
pages/customer-page/customer-index/customer-index.vue
@@ -142,7 +142,8 @@
                    <view class="receiverPopup__btn"><u-button text="确定"
                            type="primary"
                            @click="popupDetermineClick"
                            :disabled="canClick"></u-button></view>
                            :disabled="canClick"
                            :loading="popupDetermineClickLoading"></u-button></view>
                </view>
            </u-popup>
        </view>
@@ -203,7 +204,8 @@
                carNum: "",
                // 剩余的提煤单数量
                carNumSurplus: '',
                canClick: false
                canClick: false,
                popupDetermineClickLoading: false
            };
        },
        onLoad() {
@@ -260,11 +262,13 @@
            },
            popupDetermineClick() {
                if (this.receiveNum > 0) {
                    this.popupDetermineClickLoading = true;
                    this.getOrderNum.num = this.receiveNum;
                    uni.showLoading({ title: '加载中...' });
                    this.$reqPost('customerGet', this.getOrderNum, 'params').then(res => {
                        uni.hideLoading();
                        if (res.code == 0) {
                            this.popupDetermineClickLoading = false;
                            this.getOrderNum.num = '';
                            this.GetOrderPlan();
                            this.show = false;
@@ -274,6 +278,7 @@
                                duration: 1000
                            });
                        } else {
                            this.popupDetermineClickLoading = false;
                            this.$u.toast(res.msg ? res.msg : '领取失败');
                        }
                    });
pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue
@@ -141,7 +141,8 @@
                        <u-button text="提交"
                            type="primary"
                            @click.stop="submitOriginInfo"
                            :disabled="isModifyoriginInfo"></u-button>
                            :disabled="isModifyoriginInfo"
                            :loading="submitOriginInfoLoading"></u-button>
                    </view>
                </view>
            </view>
@@ -395,7 +396,8 @@
                timeout: '0',
                wsgShow: false,
                timeLineStatus: null,
                originInfoNotice: '填写原发信息后可上磅计量'
                originInfoNotice: '填写原发信息后可上磅计量',
                submitOriginInfoLoading: false
            };
        },
        watch: {
@@ -882,10 +884,13 @@
                if (this.originInfoForm.coalContactSkin && this.originInfoForm.coalContactHair && this
                    .originInfoForm
                    .contactPicture) {
                    this.submitOriginInfoLoading = true
                    this.$reqPost('appSaveContact', form, 'json').then(res => {
                        if (res.code === 0) {
                            this.$u.toast('提交成功')
                            this.submitOriginInfoLoading = false
                        } else {
                            this.submitOriginInfoLoading = false
                            this.isModifyoriginInfo = true
                            this.$u.toast(res.msg ? res.msg : '提交失败')
pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue
@@ -189,6 +189,7 @@
                plain
                @click="evacuation"
                throttleTime="500"
                :loading="TwoEvacuationLoading"
                v-if='weighList.skin||weighList.hair'></u-button>
            <!-- 外销订单称皮时,返回加减吨按钮置灰。称毛时可用.外购订单,不出现返回加减吨的按钮 -->
            <u-button type="primary"
@@ -203,7 +204,8 @@
                :disabled="addAndSubtractCoalDisabled"
                @click="addAndSubtractCoal"
                class="jiajian"
                v-if="outBuy||!isSkinWeigh"></u-button>
                v-if="outBuy||!isSkinWeigh"
                :loading="addAndSubtractCoalLoading"></u-button>
        </view>
        <view v-show="isExceedOrigin"
            style="color: #ff6363;width: auto;margin: 0 auto;">
@@ -389,7 +391,9 @@
                refreshLoading: false,
                timer: null,
                afterEvacuationStatus: null, //放空后提煤单状态状态为21时提示‘等待磅房确认’
                afterEvacuationText: ''
                afterEvacuationText: '',
                TwoEvacuationLoading: false,
                addAndSubtractCoalLoading: false
            };
        },
        watch: {
@@ -582,6 +586,7 @@
            },
            // 加减煤
            addAndSubtractCoal() {
                this.addAndSubtractCoalLoading = true
                this.$reqPost('addAndSubtractCoal', {
                    deptId: this.weighData.deptId,
                    sceneId: this.weighData.sceneId,
@@ -592,6 +597,7 @@
                    weigh: this.weighData.weigh
                }, 'json').then(res => {
                    if (res.code == 0) {
                        this.addAndSubtractCoalLoading = false
                        this.$u.toast('操作成功,即将返回上一页');
                        setTimeout(() => {
                            uni.navigateBack({
@@ -599,7 +605,8 @@
                            });
                            this.isConfirmWeighLoading = false;
                        }, 1000);
                        console.log(res, '加减煤');
                    } else {
                        this.$u.toast(res.msg ? res.msg : '操作失败');
                    }
                });
            },
@@ -609,22 +616,24 @@
            },
            // 放空弹窗确认
            evacuationConfirm() {
                this.TwoEvacuationLoading = true;
                this.$reqPost('getTwoEvacuation', this.weighData, 'json').then(res => {
                    console.log(res, '第二次放空');
                    if (res.code == 0) {
                        this.$u.toast('操作成功');
                        // setTimeout(() => {
                        //     uni.navigateBack({
                        //         delta: 1
                        //     });
                        // }, 1000);
                    if (res.msg.length > 4) { //大于4是等待后台确认
                        this.TwoEvacuationLoading = true;
                        this.evacuationModalShow = false;
                        this.afterEvacuationStatus = res.data.status === 21 || res.data.status === 22
                        this.afterEvacuationText = res.msg
                    } else {
                        this.$u.toast(res.msg ? res.msg : '操作失败');
                        this.evacuationModalShow = true;
                    } else { //小于4成功
                        this.TwoEvacuationLoading = false;
                        this.evacuationModalShow = false;
                        this.$u.toast('操作成功,即将返回上一页');
                        setTimeout(() => {
                            uni.navigateBack({
                                delta: 1
                            });
                        }, 1000);
                    }
                });
            },
@@ -700,6 +709,7 @@
            confirmWeighConfirm() {
                this.changeconfirmWeighVisiable(false)
                this.isConfirmWeighLoading = false
                this.TwoEvacuationLoading = false;
                setTimeout(() => {
                    this.$u.toast('即将返回上一页'),
                        uni.navigateBack({
pages/login/userPassword.vue
@@ -22,7 +22,8 @@
        </view>
        <view class="loginBtn"><u-button type="primary"
                :text="btnText == 1 ? '绑定' : '登录'"
                @click="submit()"></u-button></view>
                @click="submit()"
                :loading="submitLoading"></u-button></view>
    </view>
</template>
@@ -46,7 +47,8 @@
                // username: '13333333332',// 司机
                password: '',
                remember: true,
                baseUrl: ''
                baseUrl: '',
                submitLoading: false
            };
        },
        methods: {
@@ -67,6 +69,7 @@
                }
                let grant_type = 'password';
                //登录接口
                this.submitLoading = true
                await apiLoginPassword({
                        username: this.username,
                        password: this.password,
@@ -77,6 +80,7 @@
                        setToken(res.access_token);
                        setRefreshToken(res.refresh_token);
                        if (this.btnText == 0) {
                            this.submitLoading = false
                            if (res.code != 1) {
                                // 登陆成功,存储相关信息
                                setToken(res.access_token);
pages/register/register.vue
@@ -144,7 +144,8 @@
        </view>
        <view class="registerBtn"><u-button text="注册"
                type="primary"
                @click="registerClick"></u-button></view>
                @click="registerClick"
                :loading="registerClickloading"></u-button></view>
        <!-- 图片预览弹出框 -->
        <!-- <view class="previewImage-container">
            <u-popup :show="previewImageShow" mode="center" @close="previewImageClose" @open="previewImageOpen">
@@ -315,7 +316,8 @@
                title: '提示',
                content: '当前填入信息,切换角色后,即清除,是否切换?',
                wxcode: '',
                openid: ''
                openid: '',
                registerClickloading: false
            };
        },
        watch: {
@@ -349,9 +351,11 @@
                        .validate()
                        .then(res => {
                            console.log(this.registerFormModel);
                            this.registerClickloading = true;
                            this.registerFormModel.username = this.registerFormModel.phone;
                            apiRegister(this.registerFormModel)
                                .then(res => {
                                    this.registerClickloading = false;
                                    if (res.data.code == 0) {
                                        uni.showToast({
                                            title: '注册成功,即将返回登录页',