2023-12-23 23:21:42 +08:00
|
|
|
|
<template>
|
2024-08-21 17:23:45 +08:00
|
|
|
|
<view>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="single-fetch"
|
|
|
|
|
|
v-for="(fetch, index) in fetchList"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
@click="openPopup(fetch)">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>类型名称</span>
|
|
|
|
|
|
<h4>{{ fetch.typeName }}</h4>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>规格型号</span>
|
|
|
|
|
|
<h4>{{ fetch.typeCode }}</h4>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<span>待退料数量</span>
|
|
|
|
|
|
<h4>{{ fetch.manageType == 2 ? fetch.partNum : fetch.num }}</h4>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<text
|
|
|
|
|
|
v-show="fetch.manageType == 2"
|
|
|
|
|
|
class="see-item"
|
|
|
|
|
|
@click.stop="openPopup3(fetch.maTypeDetails)">
|
|
|
|
|
|
查看配件
|
|
|
|
|
|
</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<uni-popup ref="popup1" type="center" :mask-click="false">
|
|
|
|
|
|
<view class="popup1">
|
|
|
|
|
|
<view class="pop-top">
|
|
|
|
|
|
<h4>退料接收</h4>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
style="color: #aaaaaa; font-weight: bold"
|
|
|
|
|
|
type="closeempty"
|
|
|
|
|
|
size="20"
|
|
|
|
|
|
@click="closePopup1">
|
|
|
|
|
|
</uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<h5
|
|
|
|
|
|
style="
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 2vh auto;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
">
|
|
|
|
|
|
请选择接收方式
|
|
|
|
|
|
</h5>
|
|
|
|
|
|
<view class="select-area">
|
|
|
|
|
|
<view @click="scanCode">二维码</view>
|
|
|
|
|
|
<view @click="codeOut">编码接收</view>
|
|
|
|
|
|
<!-- <view @click="rfidOut">RFID接收</view> -->
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="ipt-area">
|
2023-12-23 23:21:42 +08:00
|
|
|
|
<uni-easyinput v-model="codeVal" placeholder="请输入编码"></uni-easyinput>
|
|
|
|
|
|
</view> -->
|
2024-08-21 17:23:45 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-popup>
|
|
|
|
|
|
<uni-popup ref="popup2" type="center" :mask-click="false">
|
|
|
|
|
|
<view class="popup2">
|
|
|
|
|
|
<view class="pop-top">
|
|
|
|
|
|
<h4>退料接收</h4>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
style="color: #aaaaaa; font-weight: bold"
|
|
|
|
|
|
type="closeempty"
|
|
|
|
|
|
size="20"
|
|
|
|
|
|
@click="closePopup2">
|
|
|
|
|
|
</uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="info-area">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>类型名称</h4>
|
|
|
|
|
|
<span>{{ infoList.typeName }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>规格型号</h4>
|
|
|
|
|
|
<span>{{ infoList.typeModelName }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>待入库数量</h4>
|
|
|
|
|
|
<span>{{ infoList.preNum }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- <view style="flex-direction: column;">
|
2023-12-23 23:21:42 +08:00
|
|
|
|
<h4 style="margin-bottom: 30rpx;">待修状态</h4>
|
|
|
|
|
|
<uni-data-checkbox v-model="fixVal" :localdata="fixRange"></uni-data-checkbox>
|
|
|
|
|
|
</view> -->
|
2024-08-21 17:23:45 +08:00
|
|
|
|
<view>
|
|
|
|
|
|
<h4>合格数量</h4>
|
|
|
|
|
|
<uni-easyinput
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
v-model="passedNum"
|
|
|
|
|
|
placeholder="请输入"></uni-easyinput>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>待修数量</h4>
|
|
|
|
|
|
<uni-easyinput
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
v-model="waitRepairNum"
|
|
|
|
|
|
placeholder="请输入"></uni-easyinput>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>待报废数量</h4>
|
|
|
|
|
|
<uni-easyinput
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
v-model="waitCrashNum"
|
|
|
|
|
|
placeholder="请输入"></uni-easyinput>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sub-btn" @click="multiOut"> 退料接收 </view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-popup>
|
|
|
|
|
|
<uni-popup ref="popup3" type="center" :mask-click="false">
|
|
|
|
|
|
<view class="popup3">
|
|
|
|
|
|
<view class="pop-top">
|
|
|
|
|
|
<h4>查看配件</h4>
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
style="color: #aaaaaa; font-weight: bold"
|
|
|
|
|
|
type="closeempty"
|
|
|
|
|
|
size="20"
|
|
|
|
|
|
@click="closePopup3">
|
|
|
|
|
|
</uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="item-detail">
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="single-item"
|
|
|
|
|
|
v-for="(item, index) in maList"
|
|
|
|
|
|
:key="index">
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>序号</h4>
|
|
|
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>类型名称</h4>
|
|
|
|
|
|
<span>{{ item.typeName }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>规格型号</h4>
|
|
|
|
|
|
<span>{{ item.typeModelName }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>单位</h4>
|
|
|
|
|
|
<span>{{ item.unitName }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<h4>预领数量</h4>
|
|
|
|
|
|
<span>{{ item.partNum }}</span>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-popup>
|
|
|
|
|
|
</view>
|
2023-12-23 23:21:42 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2024-08-21 17:23:45 +08:00
|
|
|
|
import QS from "qs";
|
|
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
fetchList: [],
|
|
|
|
|
|
maList: [],
|
|
|
|
|
|
codeVal: "",
|
|
|
|
|
|
manageType: "",
|
|
|
|
|
|
infoList: "",
|
|
|
|
|
|
multiNum: 1,
|
|
|
|
|
|
subList: {},
|
|
|
|
|
|
fixVal: "",
|
|
|
|
|
|
fixRange: [
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "合格",
|
|
|
|
|
|
value: "0",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "待修",
|
|
|
|
|
|
value: "1",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
text: "待报废",
|
|
|
|
|
|
value: "2",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
passedNum: "",
|
|
|
|
|
|
waitRepairNum: "",
|
|
|
|
|
|
waitCrashNum: "",
|
|
|
|
|
|
detailsId: "",
|
|
|
|
|
|
taskId: "",
|
|
|
|
|
|
submitFlag: false,
|
|
|
|
|
|
taskStatus: "",
|
|
|
|
|
|
transMaCode: "",
|
|
|
|
|
|
rfidNum: "",
|
|
|
|
|
|
sendTypeId: "",
|
|
|
|
|
|
parentId: "",
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
openPopup(list) {
|
|
|
|
|
|
console.log(list);
|
|
|
|
|
|
this.infoList = list;
|
|
|
|
|
|
this.rfidNum = list.num;
|
|
|
|
|
|
this.transMaCode = list.code;
|
|
|
|
|
|
this.sendTypeId = list.typeId;
|
|
|
|
|
|
this.parentId = list.id;
|
|
|
|
|
|
/* if (list.manageType == '2') {
|
2024-05-27 10:55:08 +08:00
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
} else {
|
|
|
|
|
|
console.log(1);
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
} */
|
2024-08-21 17:23:45 +08:00
|
|
|
|
/* if (Number(list.num) == 0) {
|
2024-05-27 10:55:08 +08:00
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
title: '待退料数据为0,请勿再点击'
|
|
|
|
|
|
})
|
|
|
|
|
|
} */
|
2024-08-21 17:23:45 +08:00
|
|
|
|
if (this.infoList.manageType == "0") {
|
|
|
|
|
|
if (Number(list.num) == 0) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "待退料数据为0,请勿再点击",
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$refs.popup1.open();
|
|
|
|
|
|
}
|
|
|
|
|
|
} else if (this.infoList.manageType == "2") {
|
|
|
|
|
|
if (Number(list.partNum) == 0) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "待退料数据为0,请勿再点击",
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
const userInfo = uni.getStorageSync("userInfo");
|
|
|
|
|
|
const { manageType, taskId } = this.infoList;
|
|
|
|
|
|
const userId = userInfo.userid;
|
|
|
|
|
|
const maList = encodeURIComponent(
|
|
|
|
|
|
JSON.stringify(this.infoList.maTypeDetails)
|
|
|
|
|
|
);
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/numLoanReceive/numLoanReceive?arr=${maList}&userId=${userId}&manageType=${manageType}&taskId=${taskId}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
|
|
|
if (Number(list.num) == 0) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "待退料数据为0,请勿再点击",
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
const userInfo = uni.getStorageSync("userInfo");
|
|
|
|
|
|
console.log("userInfo", userInfo);
|
|
|
|
|
|
const userId = userInfo.userid;
|
|
|
|
|
|
const {
|
|
|
|
|
|
taskId,
|
|
|
|
|
|
id,
|
|
|
|
|
|
typeId,
|
|
|
|
|
|
modelId,
|
|
|
|
|
|
manageType,
|
|
|
|
|
|
typeName,
|
|
|
|
|
|
typeCode,
|
|
|
|
|
|
num,
|
|
|
|
|
|
} = this.infoList;
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
taskId,
|
|
|
|
|
|
id,
|
|
|
|
|
|
typeId,
|
|
|
|
|
|
modelId,
|
|
|
|
|
|
manageType,
|
|
|
|
|
|
userId,
|
|
|
|
|
|
typeName,
|
|
|
|
|
|
typeCode,
|
|
|
|
|
|
num,
|
|
|
|
|
|
};
|
|
|
|
|
|
const urlStr = QS.stringify(params);
|
|
|
|
|
|
console.log("urlSTR", urlStr);
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/numReceive/numReceive?${urlStr}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
openPopup3(list) {
|
|
|
|
|
|
this.maList = list;
|
|
|
|
|
|
this.$refs.popup3.open();
|
|
|
|
|
|
},
|
|
|
|
|
|
closePopup1() {
|
|
|
|
|
|
this.$refs.popup1.close();
|
|
|
|
|
|
},
|
|
|
|
|
|
closePopup2() {
|
|
|
|
|
|
this.$refs.popup2.close();
|
|
|
|
|
|
},
|
|
|
|
|
|
closePopup3() {
|
|
|
|
|
|
this.$refs.popup3.close();
|
|
|
|
|
|
},
|
|
|
|
|
|
scanCode() {
|
|
|
|
|
|
const that = this;
|
|
|
|
|
|
console.log(that.infoList);
|
|
|
|
|
|
that.closePopup1();
|
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
const fixedCode = res.result.split("=")[1];
|
|
|
|
|
|
const userId = uni.getStorageSync("userInfo").userid;
|
|
|
|
|
|
if (!fixedCode) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "未识别到设备!",
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/scanReceive/scanReceive?code=${fixedCode}&typeId=${that.infoList.modelId}&num=${that.infoList.num}&parentId=${that.infoList.id}&manageType=${that.infoList.manageType}&taskId=${that.taskId}&createBy=${userId}&scanType="back"&agreementId=${that.infoList.agreementId}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
/* uni.navigateTo({
|
2024-04-28 16:54:53 +08:00
|
|
|
|
url: `/pages/QRIn/QRIn?typeId=${that.infoList.modelId}&num=${that.infoList.num}&parentId=${that.infoList.id}&manageType=${that.infoList.manageType}&taskId=${that.taskId}&createBy=${userId}&scanType="back"`
|
|
|
|
|
|
}) */
|
2024-08-21 17:23:45 +08:00
|
|
|
|
},
|
|
|
|
|
|
codeOut() {
|
|
|
|
|
|
this.closePopup1();
|
|
|
|
|
|
const userInfo = uni.getStorageSync("userInfo");
|
|
|
|
|
|
console.log("userInfo", userInfo);
|
|
|
|
|
|
const userId = userInfo.userid;
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
const {
|
|
|
|
|
|
taskId,
|
|
|
|
|
|
id,
|
|
|
|
|
|
typeId,
|
|
|
|
|
|
modelId,
|
|
|
|
|
|
manageType,
|
|
|
|
|
|
typeName,
|
|
|
|
|
|
typeCode,
|
|
|
|
|
|
num,
|
|
|
|
|
|
agreementId,
|
|
|
|
|
|
} = this.infoList;
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
taskId,
|
|
|
|
|
|
id,
|
|
|
|
|
|
typeId,
|
|
|
|
|
|
modelId,
|
|
|
|
|
|
manageType,
|
|
|
|
|
|
userId,
|
|
|
|
|
|
typeName,
|
|
|
|
|
|
typeCode,
|
|
|
|
|
|
num,
|
|
|
|
|
|
agreementId,
|
|
|
|
|
|
};
|
|
|
|
|
|
const urlStr = QS.stringify(params);
|
|
|
|
|
|
console.log("urlSTR", urlStr);
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/codeReceive/codeReceive?${urlStr}&maCode=${this.transMaCode}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
rfidOut() {
|
|
|
|
|
|
this.closePopup1();
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/pages/rfidReceive/rfidReceive?waitOut=${this.rfidNum}&typeId=${this.sendTypeId}&parentId=${this.parentId}&taskId=${this.taskId}`,
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
multiOut() {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
this.closePopup2();
|
|
|
|
|
|
that.subList = {
|
|
|
|
|
|
parentId: that.infoList.parenntId,
|
|
|
|
|
|
typeId: that.infoList.typeId,
|
|
|
|
|
|
outNum: that.multiNum,
|
|
|
|
|
|
companyId: uni.getStorageSync("userInfo").sysUser.companyId,
|
|
|
|
|
|
};
|
|
|
|
|
|
console.log(that.subList);
|
|
|
|
|
|
that.$api.fetchMaterialOutStore
|
|
|
|
|
|
.subOutStore(that.subList, null)
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "退料接收成功!",
|
|
|
|
|
|
success: () => {
|
|
|
|
|
|
uni.navigateBack();
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "退料接收失败!",
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
console.log(err);
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
initListData() {
|
|
|
|
|
|
let that = this;
|
|
|
|
|
|
console.log(that.detailsId);
|
|
|
|
|
|
that.$api.backMaterialReceive
|
|
|
|
|
|
.backMaterialReceiveDetail({
|
|
|
|
|
|
id: that.detailsId,
|
|
|
|
|
|
})
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
/* for (let i = 0; i < res.data.data.length; i++) {
|
2024-04-28 14:52:35 +08:00
|
|
|
|
res.data.data[i].num = res.data.data[i].num.split('.')[0]
|
|
|
|
|
|
} */
|
2024-08-21 17:23:45 +08:00
|
|
|
|
that.fetchList = res.data.data;
|
|
|
|
|
|
console.log(that.fetchList);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
console.log(err);
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
backReceiveEndBackFn() {
|
|
|
|
|
|
const that = this;
|
|
|
|
|
|
let total = that.reduceNumTotal();
|
|
|
|
|
|
console.log("total==", total);
|
|
|
|
|
|
if (total > 0) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "请完成退料接收后才能结束任务",
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
// submitFlag false
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
if (that.submitFlag == true) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
that.submitFlag = true;
|
|
|
|
|
|
console.log(that.taskId, that.detailsId);
|
|
|
|
|
|
that.$api.backMaterialReceive
|
|
|
|
|
|
.backReceiveEndBack({
|
|
|
|
|
|
createBy: uni.getStorageSync("userInfo").userid,
|
|
|
|
|
|
taskId: that.taskId,
|
|
|
|
|
|
parentId: that.detailsId,
|
|
|
|
|
|
})
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "结束任务成功",
|
|
|
|
|
|
});
|
|
|
|
|
|
console.log("退料结束", res);
|
|
|
|
|
|
that.submitFlag = false;
|
|
|
|
|
|
uni.navigateBack();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: res.data.msg,
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
|
console.log(err, "sss");
|
|
|
|
|
|
that.submitFlag = false;
|
|
|
|
|
|
})
|
|
|
|
|
|
.finally((result) => {
|
|
|
|
|
|
that.submitFlag = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
reduceNumTotal() {
|
|
|
|
|
|
const that = this;
|
|
|
|
|
|
let sum = 0;
|
|
|
|
|
|
console.log(that.fetchList);
|
|
|
|
|
|
that.fetchList.forEach((item) => {
|
|
|
|
|
|
if (item.manageType == 2) {
|
|
|
|
|
|
sum += item.partNum;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
sum += Number(item.num.split(".")[0]);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
/* if (that.fetchList.manageType == 2) {
|
2024-05-06 16:48:20 +08:00
|
|
|
|
sum = that.fetchList.reduce((accumulator, currentValue) => {
|
|
|
|
|
|
return accumulator + Number(currentValue.partNum);
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
sum = that.fetchList.reduce((accumulator, currentValue) => {
|
|
|
|
|
|
return accumulator + Number(currentValue.num);
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
} */
|
2024-08-21 17:23:45 +08:00
|
|
|
|
console.log("numaccumulator", sum);
|
|
|
|
|
|
return sum;
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(params) {
|
|
|
|
|
|
console.log(params);
|
|
|
|
|
|
this.taskId = params.taskId;
|
|
|
|
|
|
this.detailsId = params.id;
|
|
|
|
|
|
this.taskStatus = params.taskStatus;
|
|
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
this.initListData();
|
|
|
|
|
|
},
|
|
|
|
|
|
onNavigationBarButtonTap(ev) {
|
|
|
|
|
|
console.log("点击了自定义按钮", ev);
|
|
|
|
|
|
const that = this;
|
|
|
|
|
|
if (ev.text == "结束任务") {
|
|
|
|
|
|
if (this.taskStatus == "40") {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
icon: "none",
|
|
|
|
|
|
title: "请勿再点击",
|
|
|
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
that.backReceiveEndBackFn();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
2023-12-23 23:21:42 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.single-fetch {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 20rpx 35rpx;
|
|
|
|
|
|
border-bottom: 1px solid #dddddd;
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
view {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 25rpx;
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
span {
|
|
|
|
|
|
color: #a7a7a7;
|
|
|
|
|
|
padding-right: 20rpx;
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
h4 {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
view:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.see-item {
|
|
|
|
|
|
width: 30%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 5rpx 10rpx;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
background-color: #3788ff;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.btm-exam {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 20rpx 40rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
border-top: 2px solid #f6f8ff;
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.exam {
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 10rpx 50rpx;
|
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
|
background-color: #3788ff;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.popup1 {
|
|
|
|
|
|
width: 80vw;
|
|
|
|
|
|
height: 20vh;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
|
2024-04-28 14:52:35 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.pop-top {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 0 25rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.select-area {
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 40rpx auto;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
align-items: center;
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
view {
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
padding: 10rpx 20rpx;
|
|
|
|
|
|
border: 1px solid #d5d5d4;
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.ipt-area {
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 40rpx auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.popup2 {
|
|
|
|
|
|
width: 80vw;
|
|
|
|
|
|
height: 60vh;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.pop-top {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 0 25rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.info-area {
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 30rpx auto;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
view {
|
|
|
|
|
|
margin-bottom: 15rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
h4 {
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
color: #989898;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
width: 35%;
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
span {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-24 16:28:36 +08:00
|
|
|
|
|
2024-08-21 17:23:45 +08:00
|
|
|
|
.sub-btn {
|
|
|
|
|
|
width: 85%;
|
|
|
|
|
|
margin: 30rpx auto;
|
|
|
|
|
|
background-color: #3788ff;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 15rpx 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.popup3 {
|
|
|
|
|
|
width: 80vw;
|
|
|
|
|
|
height: 60vh;
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 15rpx;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
background: linear-gradient(#d9e7fe, #fff, #fff, #fff);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
.pop-top {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 0 25rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
.item-detail {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 25rpx;
|
|
|
|
|
|
.single-item {
|
|
|
|
|
|
border-bottom: 1px solid #dddddd;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
padding: 25rpx 0;
|
|
|
|
|
|
view {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
h4 {
|
|
|
|
|
|
width: 35%;
|
|
|
|
|
|
color: #a7a7a7;
|
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
view:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.single-item:last-child {
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|