From 0c9b00f333f9baaffa9140fd1808a26e0af8416b Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期四, 05 九月 2024 17:19:07 +0800 Subject: [PATCH] 一些错误更改 --- src/pages/company/record.vue | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/pages/company/record.vue b/src/pages/company/record.vue index 1d2684d..4cc13c3 100644 --- a/src/pages/company/record.vue +++ b/src/pages/company/record.vue @@ -3,7 +3,7 @@ <view class="coreshop-ff"> <up-list> <up-list-item> - <up-cell :title="workerInfo.userWorker.name"> + <up-cell :title="workerInfo.userWorker?workerInfo.userWorker.name:''"> <template #icon> <up-avatar shape="square" size="35" :src="workerInfo.avatar" customStyle="margin: -3px 5px -3px 0"></up-avatar> @@ -62,7 +62,7 @@ </up-cell> <up-cell title="鏁伴噺" :border='false' v-if="dakaList.workerType==1"> <template #right-icon v-if="dakaList.isShenPiName!=='宸茬粨绠�'"> - <up-input v-model="dakaList.workCount" + <up-input v-model="dakaList.workCount" type="digit" @blur='(val) => {dakaList.todaySalary=$util.roundToTwo(dakaList.workCount*dakaList.workPrice)}' border="none" placeholder="璇峰~鍐欐暟閲�"></up-input> </template> @@ -80,8 +80,8 @@ </view> --> </up-list> <view class="tabbtns"> - <up-button color='#fece01' class="text-69" text="纭" @click="saveDakaDetailCompany" - v-if="dakaList.isShenPiName!=='宸茬粨绠�'"></up-button> + <up-button color='#fece01' class="text-69" text="纭" :loading='isLoading' loadingText="纭涓�" + @click="saveDakaDetailCompany" v-if="dakaList.isShenPiName!=='宸茬粨绠�'"></up-button> </view> </view> </view> @@ -100,7 +100,8 @@ workCount: '', //璁′欢鏁伴噺 todaySalary: '' //褰撴棩宸ヨ祫 }, - workerInfo: '' + workerInfo: '', + isLoading: false } }, onLoad(options) { @@ -153,14 +154,19 @@ if (this.dakaList.workCount) { obj.workCount = this.dakaList.workCount } + this.isLoading = true this.$api.saveDakaDetailCompany(obj).then(res => { if (res.code == 1) { this.$util.showToast({ title: '纭鎴愬姛锛�', icon: 'success' }) + } else { + this.$util.showToast({ + title: res.msg ? res.msg : '澶辫触锛�' + }) } - console.log(res, '----'); + this.isLoading = false }) }, } -- Gitblit v1.9.1