金额修复
This commit is contained in:
parent
646e866fc8
commit
e3710c04a4
@ -50,7 +50,7 @@ public class StorageLogNowDO extends BaseDO {
|
||||
|
||||
private Long pnId;
|
||||
private String pnName;
|
||||
private Long sumKcMoney;
|
||||
private BigDecimal sumKcMoney;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
|
@ -4,10 +4,10 @@ import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { getListAPI, getDictAPI,postOperateAPIZF,updateBaoGong } from '@/services/moJuSheJiReport'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { formatDate } from '@/utils/index'
|
||||
import popup from './popup.vue';
|
||||
// import popup from './popup.vue';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
|
||||
const popup = ref<UniHelper.UniPopupInstance>()
|
||||
const userStore = useLoginStore()
|
||||
const userId = userStore.userInfo.userId
|
||||
|
||||
@ -63,6 +63,11 @@ const onPopupClose = (progress, imageLink,remark) => {
|
||||
/* */
|
||||
|
||||
};
|
||||
const submitDetail = async() =>{
|
||||
const zid = selectedId.value;
|
||||
await callApi(zid,progress.value,imageLink.value,remark.value)
|
||||
popup.value.close()
|
||||
}
|
||||
const callApi = async (zid: Number,progress :Number,imageLink: String,remark:String) => {
|
||||
console.log(progress);
|
||||
if(progress>0){
|
||||
@ -73,6 +78,7 @@ const onPopupClose = (progress, imageLink,remark) => {
|
||||
queryParams.pageNo = 1;
|
||||
dataList.value = [];
|
||||
await getListData();
|
||||
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '设计进度填写时不能为0%,请重新填写后提交!',
|
||||
@ -135,7 +141,8 @@ const handleDetail =async (item) => {
|
||||
imageLink.value = item.blueprintLink;
|
||||
remark.value = item.remark;
|
||||
await nextTick(); // 等待数据更新和DOM渲染
|
||||
showPopup.value = true;
|
||||
// showPopup.value = true;
|
||||
popup.value?.open()
|
||||
selectedId.value = item.id;
|
||||
}else{
|
||||
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
|
||||
@ -179,6 +186,9 @@ const onRefresherrefresh = async () => {
|
||||
// 关闭动画
|
||||
isTriggered.value = false
|
||||
}
|
||||
const handleClose = () =>{
|
||||
popup.value.close();
|
||||
}
|
||||
// const searchVal = ref('')
|
||||
// const dataListDefault = ref([])
|
||||
// const handleSearch = async () => {
|
||||
@ -227,7 +237,37 @@ const onRefresherrefresh = async () => {
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
|
||||
<popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" :remark="remark" @close="onPopupClose" />
|
||||
<uni-popup class="popup" ref="popup" :mask-click="true" type="bottom" background-color="#fff">
|
||||
<view class="title">
|
||||
<view class="text">填写信息</view>
|
||||
<view class="close" @click="handleClose">X</view>
|
||||
</view>
|
||||
<view class="cont">
|
||||
<!-- <view class="item">
|
||||
<view class="label">终检开始时间:</view>
|
||||
<view class="val">{{ formObj.startTime }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">终检结束时间:</view>
|
||||
<view class="val">{{ formObj.endTime }}</view>
|
||||
</view> -->
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>进度百分比:</view>
|
||||
<uni-easyinput class="val" type="number" v-model="progress" placeholder="请输入本次报工工时"></uni-easyinput>
|
||||
<view class="unit">%</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>图纸连接:</view>
|
||||
</view>
|
||||
<uni-easyinput type="textarea" v-model="imageLink" placeholder="请输入图纸链接"></uni-easyinput>
|
||||
<view class="item">
|
||||
<view class="label"><span class="star"></span>备注:</view>
|
||||
</view>
|
||||
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
|
||||
</view>
|
||||
<view class="ok" @click="submitDetail()">确定</view>
|
||||
</uni-popup>
|
||||
<!-- <popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" :remark="remark" @close="onPopupClose" /> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -247,7 +287,70 @@ const onRefresherrefresh = async () => {
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
.popup {
|
||||
.title {
|
||||
line-height: 1;
|
||||
padding: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
border-bottom: 1rpx solid #ddd;
|
||||
color: #444;
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 40rpx;
|
||||
height: 60rpx;
|
||||
width: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 40rpx;
|
||||
height: 50vh;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
color: #737D88;
|
||||
width: 94%;
|
||||
|
||||
.label {
|
||||
font-size: 32rpx;
|
||||
width: 260rpx;
|
||||
.star {
|
||||
color: red
|
||||
}
|
||||
}
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.unit {
|
||||
width: 100rpx;
|
||||
margin-left: 4rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ok {
|
||||
font-size: 32rpx;
|
||||
margin: 20rpx auto 80rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 8rpx 0;
|
||||
background-color: #3C8AF7;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.data-list {
|
||||
height: 90vh;
|
||||
.item {
|
||||
@ -292,7 +395,7 @@ const onRefresherrefresh = async () => {
|
||||
.product-item {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: left;
|
||||
color: #737D88
|
||||
}
|
||||
.product-row {
|
||||
|
@ -172,7 +172,7 @@ const handleStop = async () => {
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value = 0;
|
||||
amount.value =detailInfo.value.amount;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = 0 ; i < historyList.value.length-1;i++){
|
||||
|
@ -168,7 +168,7 @@ const handleStop = async () => {
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value = 0;
|
||||
amount.value = detailInfo.value.amount;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = historyList.value.length-1 ; i >0;i--){
|
||||
|
Loading…
Reference in New Issue
Block a user