|
@@ -22,13 +22,16 @@
|
|
|
style="margin: 0 0 0 16rpx;outline: 2rpx solid #999999;border-radius: 10rpx;"></uni-data-select>
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
- <view v-if="curDayworkItem.turnoverType != '3'" class="list-title uni-row">
|
|
|
- <text class="label" style="margin: 0 0 0 -24rpx;" >下序是否包装</text><text style="margin-left: 56rpx;" class="label">否</text>
|
|
|
- <switch class="switch" @change="switchChange" :checked="normalStatus" style="transform: scale(0.8);align-items: center;font-size:32rpx ;" color="rgba(103, 195, 55, 1.0)" />
|
|
|
- <text class="label">是</text>
|
|
|
- </view>
|
|
|
- <view class="list-title">
|
|
|
- <text class="label" style="margin: 0 0 0 -308rpx;" >请选择您摆放位置</text>
|
|
|
+ <view v-if="curDayworkItem.turnoverType != '3'" class="list-title uni-row">
|
|
|
+ <text class="label" style="margin: 0 0 0 -24rpx;">是否包装签票</text><text style="margin-left: 56rpx;"
|
|
|
+ class="label">否</text>
|
|
|
+ <switch class="switch" @change="switchChange" :checked="normalStatus"
|
|
|
+ style="transform: scale(0.8);align-items: center;font-size:32rpx ;"
|
|
|
+ color="rgba(103, 195, 55, 1.0)" />
|
|
|
+ <text class="label">是</text>
|
|
|
+ </view>
|
|
|
+ <view class="list-title">
|
|
|
+ <text class="label" style="margin: 0 0 0 -308rpx;">请选择您摆放位置</text>
|
|
|
</view>
|
|
|
<view class="turnArea uni-row" v-if="curDayworkItem.turnoverType == '1'">
|
|
|
<view v-for="(item,index) in turnAreaList" class="btn">
|
|
@@ -145,6 +148,7 @@
|
|
|
outsideDepts.value = []
|
|
|
turnAreaList.value = []
|
|
|
}
|
|
|
+
|
|
|
function switchChange(event) {
|
|
|
console.log(event.detail.value)
|
|
|
//是
|
|
@@ -171,8 +175,8 @@
|
|
|
})
|
|
|
})
|
|
|
getOutsourceTurnoverByWorkshop({
|
|
|
- deptCode:'170000'
|
|
|
- }).then(response =>{
|
|
|
+ deptCode: '170000'
|
|
|
+ }).then(response => {
|
|
|
outTurnArea.value = response.data
|
|
|
})
|
|
|
getDayWorkItemList({
|
|
@@ -180,7 +184,7 @@
|
|
|
userId: store.userInfo.userId,
|
|
|
lotId: dayworkInfo.value.lotId,
|
|
|
isWasteRecycling: dayworkInfo.value.isWasteRecycling,
|
|
|
- isAmend:dayworkInfo.value.isAmend,
|
|
|
+ isAmend: dayworkInfo.value.isAmend,
|
|
|
processStepNumber: dayworkInfo.value.currentProcess.processStepNumber
|
|
|
}).then(res => {
|
|
|
curDayworkItem.value = {
|
|
@@ -227,7 +231,7 @@
|
|
|
}
|
|
|
|
|
|
function selectTurnoverDoor(item) {
|
|
|
- console.log(item,"chejiannei")
|
|
|
+ console.log(item, "chejiannei")
|
|
|
// turnoverDoorChecked.value = item;
|
|
|
// curDayworkItem.value.turnoverArea = item.dictValue;
|
|
|
let index = selection.value.findIndex(selectedItem => selectedItem === item);
|
|
@@ -239,13 +243,14 @@
|
|
|
}
|
|
|
|
|
|
function selectTurnoverDoorOutside(item) {
|
|
|
- console.log(item,"wai")
|
|
|
+ console.log(item, "wai")
|
|
|
selection.value[0] = item;
|
|
|
}
|
|
|
- function selectTurnoverOutsource(item) {
|
|
|
- console.log(item,"waixie")
|
|
|
- selection.value[0] = item
|
|
|
- }
|
|
|
+
|
|
|
+ function selectTurnoverOutsource(item) {
|
|
|
+ console.log(item, "waixie")
|
|
|
+ selection.value[0] = item
|
|
|
+ }
|
|
|
|
|
|
function handleTurnoverDoor(item) {
|
|
|
return selection.value.includes(item);
|
|
@@ -277,7 +282,7 @@
|
|
|
});
|
|
|
} else {
|
|
|
const currentTime = Date.now();
|
|
|
-
|
|
|
+
|
|
|
// 检查是否已经过去了 2 秒
|
|
|
if (currentTime - lastRequestTimestamp.value < 2000) {
|
|
|
// 如果在 2 秒 内已经有请求发出,那么不执行
|
|
@@ -288,45 +293,49 @@
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
- lastRequestTimestamp.value = currentTime;
|
|
|
- curDayworkItem.value.id = null;
|
|
|
- curDayworkItem.value.processStepNumber = dayworkInfo.value.currentProcess.processStepNumber
|
|
|
- curDayworkItem.value.startTime = timestampToTime(new Date());
|
|
|
- curDayworkItem.value.endTime = timestampToTime(new Date());
|
|
|
- curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;
|
|
|
- curDayworkItem.value.dayworkId = dayworkInfo.value.id;
|
|
|
- curDayworkItem.value.productionPlanDetailId = dayworkInfo.value.productionPlanDetailId;
|
|
|
- curDayworkItem.value.status = '4';
|
|
|
- if (!store.tenantId) {
|
|
|
- curDayworkItem.value.tenantId = store.userInfo.tenantId;
|
|
|
- } else {
|
|
|
- curDayworkItem.value.tenantId = store.tenantId;
|
|
|
- }
|
|
|
- //curDayworkItem.value.turnoverArea = "外协周转";
|
|
|
- curDayworkItem.value.turnoverArea = selection.value.map((item) => {return item.code;}).join('、')
|
|
|
- // 0627 将turnoverId存入dayworkItem,多选将Id进行拼接
|
|
|
- curDayworkItem.value.turnoverId = selection.value.map((item) => {return item.id;}).join('、')
|
|
|
- /**** 此处暂时为硬编码,170000为外协部门编码,根据编码查询信息 ***/
|
|
|
- curDayworkItem.value.deptCode = 170000;
|
|
|
- close();
|
|
|
- turnoverOutsource(curDayworkItem.value).then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- uni.showToast({
|
|
|
- icon: 'success',
|
|
|
- title: '操作成功'
|
|
|
- });
|
|
|
- emit('reflushDaywork');
|
|
|
+ lastRequestTimestamp.value = currentTime;
|
|
|
+ curDayworkItem.value.id = null;
|
|
|
+ curDayworkItem.value.processStepNumber = dayworkInfo.value.currentProcess.processStepNumber
|
|
|
+ curDayworkItem.value.startTime = timestampToTime(new Date());
|
|
|
+ curDayworkItem.value.endTime = timestampToTime(new Date());
|
|
|
+ curDayworkItem.value.technologicalProcessId = dayworkInfo.value.technologicalProcessId;
|
|
|
+ curDayworkItem.value.dayworkId = dayworkInfo.value.id;
|
|
|
+ curDayworkItem.value.productionPlanDetailId = dayworkInfo.value.productionPlanDetailId;
|
|
|
+ curDayworkItem.value.status = '4';
|
|
|
+ if (!store.tenantId) {
|
|
|
+ curDayworkItem.value.tenantId = store.userInfo.tenantId;
|
|
|
} else {
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: res.msg,
|
|
|
- duration:2000
|
|
|
- });
|
|
|
- setTimeout(() => {
|
|
|
- emit('reflushDaywork')
|
|
|
- }, 1000);
|
|
|
+ curDayworkItem.value.tenantId = store.tenantId;
|
|
|
}
|
|
|
- })
|
|
|
+ //curDayworkItem.value.turnoverArea = "外协周转";
|
|
|
+ curDayworkItem.value.turnoverArea = selection.value.map((item) => {
|
|
|
+ return item.code;
|
|
|
+ }).join('、')
|
|
|
+ // 0627 将turnoverId存入dayworkItem,多选将Id进行拼接
|
|
|
+ curDayworkItem.value.turnoverId = selection.value.map((item) => {
|
|
|
+ return item.id;
|
|
|
+ }).join('、')
|
|
|
+ /**** 此处暂时为硬编码,170000为外协部门编码,根据编码查询信息 ***/
|
|
|
+ curDayworkItem.value.deptCode = 170000;
|
|
|
+ close();
|
|
|
+ turnoverOutsource(curDayworkItem.value).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'success',
|
|
|
+ title: '操作成功'
|
|
|
+ });
|
|
|
+ emit('reflushDaywork');
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.msg,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ emit('reflushDaywork')
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -335,17 +344,17 @@
|
|
|
handleConfirmOutsource();
|
|
|
} else {
|
|
|
const currentTime = Date.now();
|
|
|
-
|
|
|
- // 检查是否已经过去了 2 秒
|
|
|
- if (currentTime - lastRequestTimestamp.value < 2000) {
|
|
|
- // 如果在 2 秒 内已经有请求发出,那么不执行
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: `请勿重复点击`,
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
+ // 检查是否已经过去了 2 秒
|
|
|
+ if (currentTime - lastRequestTimestamp.value < 2000) {
|
|
|
+ // 如果在 2 秒 内已经有请求发出,那么不执行
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: `请勿重复点击`,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
lastRequestTimestamp.value = currentTime;
|
|
|
console.log(dayworkInfo.value)
|
|
|
curDayworkItem.value.id = null;
|
|
@@ -391,7 +400,7 @@
|
|
|
//0628将位置id也拼接的方式存下来
|
|
|
curDayworkItem.value.turnoverId = newIdArray.join('、');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// curDayworkItem.value.dayworkId = store.dayworkInfo.id;
|
|
|
// 设置周转下一个车间名
|
|
|
for (let i = 0; i < deptList.value.length; i++) {
|
|
@@ -408,10 +417,10 @@
|
|
|
});
|
|
|
} else {
|
|
|
curDayworkItem.value.isNextPacking = false
|
|
|
- if(normalStatus.value) {
|
|
|
+ if (normalStatus.value) {
|
|
|
curDayworkItem.value.isNextPacking = true
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
close();
|
|
|
turnover(curDayworkItem.value).then(res => {
|
|
|
if (res.code === 200) {
|
|
@@ -426,12 +435,12 @@
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: res.msg,
|
|
|
- duration:2000
|
|
|
+ duration: 2000
|
|
|
});
|
|
|
setTimeout(() => {
|
|
|
- emit('reflushDaywork')
|
|
|
+ emit('reflushDaywork')
|
|
|
}, 1000);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -442,11 +451,11 @@
|
|
|
}
|
|
|
|
|
|
function handleChangeInside() {
|
|
|
- let deptInfo = deptList.value.find(item=> item.deptId == curDayworkItem.value.deptId )
|
|
|
+ let deptInfo = deptList.value.find(item => item.deptId == curDayworkItem.value.deptId)
|
|
|
console.log(deptInfo)
|
|
|
- if(deptInfo.isSortPackaging == 1){
|
|
|
+ if (deptInfo.isSortPackaging == 1) {
|
|
|
normalStatus.value = true
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
normalStatus.value = false
|
|
|
}
|
|
|
turnAreaList.value = [];
|
|
@@ -463,11 +472,11 @@
|
|
|
}
|
|
|
|
|
|
function handleChangeOutside() {
|
|
|
- let deptInfo = deptList.value.find(item=> item.deptId == curDayworkItem.value.deptId )
|
|
|
+ let deptInfo = deptList.value.find(item => item.deptId == curDayworkItem.value.deptId)
|
|
|
console.log(deptInfo)
|
|
|
- if(deptInfo.isSortPackaging == 1){
|
|
|
+ if (deptInfo.isSortPackaging == 1) {
|
|
|
normalStatus.value = true
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
normalStatus.value = false
|
|
|
}
|
|
|
}
|