|
@@ -63,9 +63,11 @@
|
|
<text class='title' style="margin-bottom: 40rpx;">基础信息</text>
|
|
<text class='title' style="margin-bottom: 40rpx;">基础信息</text>
|
|
<view class="uni-row info" style="align-items: center;">
|
|
<view class="uni-row info" style="align-items: center;">
|
|
<label for="HeatNo">炉号:</label>
|
|
<label for="HeatNo">炉号:</label>
|
|
- <uni-data-select id="incomingInfo" class="uni-input data-select" v-model="basicInfo"
|
|
|
|
|
|
+ <uni-data-select v-if="isWasteRecyclingFlag" id="incomingInfo" class="uni-input data-select" v-model="basicInfo"
|
|
:localdata="furnaceNumberInfoList" :clear="false"
|
|
:localdata="furnaceNumberInfoList" :clear="false"
|
|
@change="handleFurnaceNumberChange"></uni-data-select>
|
|
@change="handleFurnaceNumberChange"></uni-data-select>
|
|
|
|
+ <text id="incomingInfo" v-else
|
|
|
|
+ class="uni-input">废品回用</text>
|
|
</view>
|
|
</view>
|
|
<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
|
|
<!-- <view class='segment' style="width: 90%;margin: 20rpx auto;"></view> -->
|
|
<view class="uni-row info">
|
|
<view class="uni-row info">
|
|
@@ -169,9 +171,11 @@
|
|
const vehicleList = ref([])
|
|
const vehicleList = ref([])
|
|
const basicInfo = ref({}) // 基础信息对象
|
|
const basicInfo = ref({}) // 基础信息对象
|
|
const dayWork = ref({})
|
|
const dayWork = ref({})
|
|
|
|
+ const furnaceInfo = ref({})
|
|
const wasteRecyclingList = ref([]) //废品回用批次
|
|
const wasteRecyclingList = ref([]) //废品回用批次
|
|
const curPlan = ref({})
|
|
const curPlan = ref({})
|
|
const furnaceNumberInfoList = ref([])
|
|
const furnaceNumberInfoList = ref([])
|
|
|
|
+ const isWasteRecyclingFlag = ref(true)
|
|
const emit = defineEmits(['batchReporting-addBatch']);
|
|
const emit = defineEmits(['batchReporting-addBatch']);
|
|
const inpValue = ref('')
|
|
const inpValue = ref('')
|
|
|
|
|
|
@@ -211,6 +215,7 @@
|
|
store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
|
|
store.planDetails.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
|
|
}
|
|
}
|
|
getProcessInfo(batchNoList.value[0])
|
|
getProcessInfo(batchNoList.value[0])
|
|
|
|
+ getFurnaceInfo(batchNoList.value[0])
|
|
} else {
|
|
} else {
|
|
batchNoList.value = res.rows;
|
|
batchNoList.value = res.rows;
|
|
}
|
|
}
|
|
@@ -227,6 +232,7 @@
|
|
//如果废品回用的批次领料部门是当前计划的领料部门,则加到lotList
|
|
//如果废品回用的批次领料部门是当前计划的领料部门,则加到lotList
|
|
lotList.value = res.rows
|
|
lotList.value = res.rows
|
|
batchNoList.value = [res.rows[0]];
|
|
batchNoList.value = [res.rows[0]];
|
|
|
|
+ isWasteRecyclingFlag.value = false
|
|
dayWork.value.lotId = batchNoList.value[0].id;
|
|
dayWork.value.lotId = batchNoList.value[0].id;
|
|
dayWork.value.lotCode = batchNoList.value[0].lotCode;
|
|
dayWork.value.lotCode = batchNoList.value[0].lotCode;
|
|
if (dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId) {
|
|
if (dayWork.value.technologicalProcessId != batchNoList.value[0].technologicalProcessId) {
|
|
@@ -249,70 +255,16 @@
|
|
duration: 2000
|
|
duration: 2000
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ getFurnaceInfo(batchNoList.value[0])
|
|
} else {
|
|
} else {
|
|
- batchNoList.value = res.rows;
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: "none",
|
|
|
|
+ title: "没有废品回用或单批单改批次",
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
- // 拉取炉号信息from p2
|
|
|
|
- let token = 'Bearer ' + getToken();
|
|
|
|
- let header = {
|
|
|
|
- Authorization: token
|
|
|
|
- }
|
|
|
|
- uni.request({
|
|
|
|
- url: path.furnaceNoURL + '/business/furnaceNoInfo/getFurnaceNoInfo',
|
|
|
|
- data: {
|
|
|
|
- productionPlanNo: store.planDetails.productionPlanNo,
|
|
|
|
- lineNumber: store.planDetails.lineNumber
|
|
|
|
- },
|
|
|
|
- method: 'GET',
|
|
|
|
- header,
|
|
|
|
- sslVerify: false,
|
|
|
|
- success: (res) => {
|
|
|
|
- console.log(res.data);
|
|
|
|
- if (res.data.code == 200 && res.data.data.length > 0) {
|
|
|
|
- for (let i = 0; i < res.data.data.length; i++) {
|
|
|
|
- furnaceNumberInfoList.value[i] = {
|
|
|
|
- text: res.data.data[i].furnaceNumber,
|
|
|
|
- value: res.data.data[i]
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- basicInfo.value = res.data.data[0];
|
|
|
|
- dayWork.value.furnaceNoInfo = basicInfo.value;
|
|
|
|
- console.log(basicInfo.value);
|
|
|
|
- console.log(furnaceNumberInfoList.value)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- // getProcessList({
|
|
|
|
- // deptId: store.curDeptDetails.deptId,
|
|
|
|
- // }).then(res => {
|
|
|
|
- // if (res.code == 200) {
|
|
|
|
- // //过滤出工序交集
|
|
|
|
- // //因为废品回用对工序进行单独的修改。所以重新查产品的工艺,如果该批不是废品回用,则查产品工序,如果是,则到
|
|
|
|
- // //对应表查
|
|
|
|
- // //通过批次号查
|
|
|
|
- // console.log(batchNoList.value)
|
|
|
|
- // getProcessListByLot(batchNoList.value[0]).then(res => {
|
|
|
|
- // let lotProcessList = res.data
|
|
|
|
- // let filteredData = lotProcessList.filter((item1) =>
|
|
|
|
- // res.data.some((item2) => item2.processCode === item1.processCode)
|
|
|
|
- // );
|
|
|
|
- // processList.value = filteredData.map(v => ({
|
|
|
|
- // text: v.processAlias,
|
|
|
|
- // value: v.technologicalProcessDetailId,
|
|
|
|
- // processId: v.id
|
|
|
|
- // }))
|
|
|
|
- // console.log(processList.value)
|
|
|
|
- // selectedProcess.value = filteredData[0].technologicalProcessDetailId;
|
|
|
|
- // dayWork.value.processId = filteredData[0].id;
|
|
|
|
- // dayWork.value.technologicalProcessDetailId = selectedProcess.value
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// function handleCheckBatchNo(item) {
|
|
// function handleCheckBatchNo(item) {
|
|
@@ -331,7 +283,42 @@
|
|
// return false;
|
|
// return false;
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
-
|
|
|
|
|
|
+ function getFurnaceInfo(data) {
|
|
|
|
+ if(data.isWasteRecycling==0) {
|
|
|
|
+ let token = 'Bearer ' + getToken();
|
|
|
|
+ let header = {
|
|
|
|
+ Authorization: token
|
|
|
|
+ }
|
|
|
|
+ uni.request({
|
|
|
|
+ url: path.furnaceNoURL + '/business/furnaceNoInfo/getFurnaceNoInfo',
|
|
|
|
+ data: {
|
|
|
|
+ productionPlanNo: store.planDetails.productionPlanNo,
|
|
|
|
+ lineNumber: store.planDetails.lineNumber
|
|
|
|
+ },
|
|
|
|
+ method: 'GET',
|
|
|
|
+ header,
|
|
|
|
+ sslVerify: false,
|
|
|
|
+ success: (res) => {
|
|
|
|
+ console.log(res.data);
|
|
|
|
+ if (res.data.code == 200 && res.data.data.length > 0) {
|
|
|
|
+ for (let i = 0; i < res.data.data.length; i++) {
|
|
|
|
+ furnaceNumberInfoList.value[i] = {
|
|
|
|
+ text: res.data.data[i].furnaceNumber,
|
|
|
|
+ value: res.data.data[i]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // basicInfo.value = res.data.data[0];
|
|
|
|
+ // dayWork.value.furnaceNoInfo = basicInfo.value;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ furnaceInfo.value.furnaceNumber = "废品回用"
|
|
|
|
+ dayWork.value.furnaceNoInfo = furnaceInfo.value
|
|
|
|
+ basicInfo.value = dayWork.value.furnaceNoInfo
|
|
|
|
+ }
|
|
|
|
+ }
|
|
function iconClick() {
|
|
function iconClick() {
|
|
checkLotCode(inpValue.value);
|
|
checkLotCode(inpValue.value);
|
|
}
|
|
}
|
|
@@ -347,6 +334,7 @@
|
|
dayWork.value.lotId = lotList.value[i].id;
|
|
dayWork.value.lotId = lotList.value[i].id;
|
|
dayWork.value.lotCode = lotList.value[i].lotCode;
|
|
dayWork.value.lotCode = lotList.value[i].lotCode;
|
|
if (batchNoList.value.isWasteRecycling == 1) {
|
|
if (batchNoList.value.isWasteRecycling == 1) {
|
|
|
|
+ isWasteRecyclingFlag.value = false
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: "none",
|
|
icon: "none",
|
|
title: "该批次号可用,该批是废品回用",
|
|
title: "该批次号可用,该批是废品回用",
|
|
@@ -401,9 +389,12 @@
|
|
processStepNumber: v.processStepNumber,
|
|
processStepNumber: v.processStepNumber,
|
|
index: index
|
|
index: index
|
|
}))
|
|
}))
|
|
- selectedProcess.value = filteredData[0].technologicalProcessDetailId;
|
|
|
|
- dayWork.value.processId = filteredData[0].id;
|
|
|
|
|
|
+ console.log(processList.value)
|
|
|
|
+ selectedProcess.value = processList.value[0].value;
|
|
|
|
+ dayWork.value.processId = processList.value[0].processId;
|
|
dayWork.value.technologicalProcessDetailId = selectedProcess.value
|
|
dayWork.value.technologicalProcessDetailId = selectedProcess.value
|
|
|
|
+ dayWork.value.processStepNumber = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ?
|
|
|
|
+ processList.value.find(v => v.value === selectedProcess.value).processStepNumber : null
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -478,6 +469,7 @@
|
|
.value.find(v => v.value === selectedProcess.value).processId : null
|
|
.value.find(v => v.value === selectedProcess.value).processId : null
|
|
dayWork.value.processStepNumber = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ?
|
|
dayWork.value.processStepNumber = processList.value.findIndex(v => v.value === selectedProcess.value) >= 0 ?
|
|
processList.value.find(v => v.value === selectedProcess.value).processStepNumber : null
|
|
processList.value.find(v => v.value === selectedProcess.value).processStepNumber : null
|
|
|
|
+ dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
|
|
}
|
|
}
|
|
|
|
|
|
// function handleScanCode() {
|
|
// function handleScanCode() {
|
|
@@ -521,7 +513,7 @@
|
|
// }
|
|
// }
|
|
|
|
|
|
function handleAdd() {
|
|
function handleAdd() {
|
|
- console.log(batchNoList.value)
|
|
|
|
|
|
+ console.log(dayWork.value)
|
|
if (selectedProcess.value == null) {
|
|
if (selectedProcess.value == null) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -529,9 +521,16 @@
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ if(basicInfo.value ==null) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '请选择炉号再开始批次'
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
dayWork.value.isWasteRecycling = batchNoList.value[0].isWasteRecycling
|
|
dayWork.value.isWasteRecycling = batchNoList.value[0].isWasteRecycling
|
|
dayWork.value.isAmend = batchNoList.value[0].isAmend
|
|
dayWork.value.isAmend = batchNoList.value[0].isAmend
|
|
- dayWork.value.technologicalProcessId = batchNoList.value[0].technologicalProcessId;
|
|
|
|
|
|
+
|
|
store.furnaceNumberInfo = basicInfo.value;
|
|
store.furnaceNumberInfo = basicInfo.value;
|
|
if (checkLotCode(dayWork.value.lotCode)) {
|
|
if (checkLotCode(dayWork.value.lotCode)) {
|
|
saveDayWork(dayWork.value).then(res => {
|
|
saveDayWork(dayWork.value).then(res => {
|