Browse Source

电表

fenbao
wangyx 1 month ago
parent
commit
34e84a5fa6
  1. 55
      pagesA/sdPage/dfReport.vue

55
pagesA/sdPage/dfReport.vue

@ -131,7 +131,7 @@
</view>
</scroll-view>
<!-- 提交按钮 -->
<view class="u-button--primary" @click="onSubmit">提交</view>
<view class="btn" @click="onSubmit">提交</view>
</view>
</template>
@ -400,7 +400,8 @@ export default {
console.log("onSubmit", this.form);
},
async submitAdd() {
const params = {
let params = [];
params.push({
meterNumber: this.form.meterNumber,
meterType: 1,
houseId: this.form.houseId,
@ -409,8 +410,31 @@ export default {
thisMeterReading: this.form.thisMeterReading,
images: this.fileList,
remark: this.form.remark,
};
});
console.log(params, "params");
const res = await submitWaterAndElectricity(params);
if (res.code == 200) {
uni.showToast({
icon: "success",
title: "提交成功!",
success: () => {
setTimeout(() => {
uni.switchTab({
url: "/pages/tabBar/work/index",
success: () => {
this.fileList = [];
},
});
}, 1500);
},
});
}else {
uni.showToast({
title: res.msg || "提交失败",
icon: "none",
});
}
console.log(res, "reeees");
},
},
@ -590,19 +614,22 @@ export default {
margin: 40rpx 0 0 0;
}
.u-button--primary {
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(90deg, #0dc6c6 0%, #13c2c2 100%) !important;
font-size: 36rpx;
border-radius: 48rpx !important;
border: none;
.btn {
width: 414rpx;
height: 70rpx;
line-height: 70rpx;
border-radius: 600rpx;
background: linear-gradient(
86.25deg,
rgba(13, 198, 198, 1) 3.03%,
rgba(19, 194, 194, 1) 3.03%,
rgba(70, 219, 213, 1) 96.43%
);
color: rgba(255, 255, 255, 1);
font-size: 34rpx;
text-align: center;
margin: auto;
margin-top: 40rpx;
width: 80%;
height: 88rpx;
color: rgba(255, 255, 255, 1);
}
</style>

Loading…
Cancel
Save