|
@@ -4,7 +4,7 @@
|
|
|
<view v-for="(item, index) in equipments" :class="{'item':true,'selected': isSelected(item)}" :key="index"
|
|
|
@click="handleSelection(item)"><text class="label">{{item['equipmentDetailCode']}}</text></view>
|
|
|
</view> -->
|
|
|
-<!-- <view v-if="showProcessList">
|
|
|
+ <!-- <view v-if="showProcessList">
|
|
|
<uni-section title="工序" type="line">
|
|
|
<uni-data-select v-model="selectedProcess" :localdata="processList" :clear="false"
|
|
|
@change="handleProcessChange"></uni-data-select>
|
|
@@ -14,11 +14,11 @@
|
|
|
<uni-section title="设备" type="line">
|
|
|
<!-- <uni-data-select v-model="selectedEquipment" :localdata="equipmentList" :clear="false"
|
|
|
@change="handleEquipmentChange"></uni-data-select> -->
|
|
|
- <zxz-uni-data-select v-model="selectedEquipment" filterable :localdata="equipmentList" placeholder="请选择/输入设备"
|
|
|
- ></zxz-uni-data-select>
|
|
|
+ <zxz-uni-data-select v-model="selectedEquipment" filterable :localdata="equipmentList"
|
|
|
+ placeholder="请选择/输入设备"></zxz-uni-data-select>
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
-<!-- <view class="switch uni-row">
|
|
|
+ <!-- <view class="switch uni-row">
|
|
|
<text class="label">是否邀请协作者</text>
|
|
|
<view class="uni-row" style="align-items: center;">
|
|
|
<text>否</text>
|
|
@@ -111,10 +111,10 @@
|
|
|
userList.value = [];
|
|
|
equipmentList.value = [];
|
|
|
selectedEquipment.value = null;
|
|
|
- selectedUserList.value = [];
|
|
|
+ selectedUserList.value = [];
|
|
|
selectedProcess.value = null;
|
|
|
processList.value = [];
|
|
|
- showProcessList.value = true;
|
|
|
+ showProcessList.value = true;
|
|
|
}
|
|
|
|
|
|
function init() {
|
|
@@ -126,9 +126,9 @@
|
|
|
console.log(res)
|
|
|
if (res.code == 200) {
|
|
|
//过滤出工序交集store.dayworkInfo.processSequence
|
|
|
- let filteredData = store.dayworkInfo.processSequence.filter((item1) =>{
|
|
|
- return res.data.some(item2 => item2.processCode === item1.processCode) &&
|
|
|
- store.dayworkInfo.currentProcess.processStepNumber === item1.processStepNumber;
|
|
|
+ let filteredData = store.dayworkInfo.processSequence.filter((item1) => {
|
|
|
+ return res.data.some(item2 => item2.processCode === item1.processCode) &&
|
|
|
+ store.dayworkInfo.currentProcess.processStepNumber === item1.processStepNumber;
|
|
|
});
|
|
|
console.log(filteredData)
|
|
|
/* 20240409 修改
|
|
@@ -143,21 +143,21 @@
|
|
|
// console.log(processList.value)
|
|
|
}
|
|
|
*/
|
|
|
- console.log(store.dayworkInfo)
|
|
|
- processList.value = filteredData.map(v => ({
|
|
|
+ console.log(store.dayworkInfo)
|
|
|
+ processList.value = filteredData.map(v => ({
|
|
|
text: v.processAlias,
|
|
|
value: v.technologicalProcessDetailId,
|
|
|
processId: v.id,
|
|
|
- processStepNumber:store.dayworkInfo.currentProcess.processStepNumber
|
|
|
- }))
|
|
|
+ processStepNumber: store.dayworkInfo.currentProcess.processStepNumber
|
|
|
+ }))
|
|
|
console.log(processList.value)
|
|
|
selectedProcess.value = filteredData[0].technologicalProcessDetailId;
|
|
|
// selectedProcess.value = filteredData[0].processId
|
|
|
// console.log(selectedProcess.value)
|
|
|
isDefaultItem(firstItem.value);
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
// Promise.all([getEquipmentByUidAndDid(store.planDetails.id), getDayWorkItemList({
|
|
|
// // userId: store.userInfo.userId,
|
|
|
// // dayworkId: store.dayworkInfo.id,
|
|
@@ -180,18 +180,19 @@
|
|
|
// }
|
|
|
// baseDialog.value.open()
|
|
|
// });
|
|
|
- getEquipmentByUidAndDid(store.planDetails.id,store.curDeptDetails.deptId,store.dayworkInfo.lotId).then(equipmentRes => {
|
|
|
- if(equipmentRes.code == 200){
|
|
|
- for (var i = 0; i < equipmentRes.rows.length; i++) {
|
|
|
- equipmentList.value[i] = {
|
|
|
- text: equipmentRes.rows[i].commonCode,
|
|
|
- value: equipmentRes.rows[i]
|
|
|
+ getEquipmentByUidAndDid(store.planDetails.id, store.curDeptDetails.deptId, store.dayworkInfo.lotId).then(
|
|
|
+ equipmentRes => {
|
|
|
+ if (equipmentRes.code == 200) {
|
|
|
+ for (var i = 0; i < equipmentRes.rows.length; i++) {
|
|
|
+ equipmentList.value[i] = {
|
|
|
+ text: equipmentRes.rows[i].commonCode,
|
|
|
+ value: equipmentRes.rows[i]
|
|
|
+ }
|
|
|
}
|
|
|
+ // selectedEquipment.value = equipmentRes.rows.length > 0 ? equipmentRes.rows[0] : null;
|
|
|
}
|
|
|
- // selectedEquipment.value = equipmentRes.rows.length > 0 ? equipmentRes.rows[0] : null;
|
|
|
- }
|
|
|
- baseDialog.value.open()
|
|
|
- })
|
|
|
+ baseDialog.value.open()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function open(data) {
|
|
@@ -202,10 +203,10 @@
|
|
|
userList.value = [];
|
|
|
init();
|
|
|
}
|
|
|
-
|
|
|
- function isDefaultItem(item){
|
|
|
- if(item){
|
|
|
- showProcessList.value = false;
|
|
|
+
|
|
|
+ function isDefaultItem(item) {
|
|
|
+ if (item) {
|
|
|
+ showProcessList.value = false;
|
|
|
selectedProcess.value = null;
|
|
|
}
|
|
|
}
|
|
@@ -287,10 +288,11 @@
|
|
|
/* 20240408 前版本
|
|
|
processId: selectedProcess.value,
|
|
|
*/
|
|
|
- technologicalProcessDetailId: store.dayworkInfo.processSequence.filter(v=>v.processStepNumber ==store.dayworkInfo.currentProcess.processStepNumber)[0].technologicalProcessDetailId,
|
|
|
+ technologicalProcessDetailId: store.dayworkInfo.processSequence.filter(v => v.processStepNumber ==
|
|
|
+ store.dayworkInfo.currentProcess.processStepNumber)[0].technologicalProcessDetailId,
|
|
|
processId: store.dayworkInfo.currentProcess.id,
|
|
|
equipmentDetailId: selectedEquipment.value.commonId,
|
|
|
- processStepNumber:store.dayworkInfo.currentProcess.processStepNumber,
|
|
|
+ processStepNumber: store.dayworkInfo.currentProcess.processStepNumber,
|
|
|
equipmentDetailCode: selectedEquipment.value.commonCode,
|
|
|
startTime: timestampToTime(new Date()),
|
|
|
status: 1,
|
|
@@ -303,98 +305,104 @@
|
|
|
/* 20240408 前版本
|
|
|
processId: selectedProcess.value,
|
|
|
*/
|
|
|
- technologicalProcessDetailId: store.dayworkInfo.processSequence.filter(v=>v.processStepNumber ==store.dayworkInfo.currentProcess.processStepNumber)[0].technologicalProcessDetailId,
|
|
|
+ technologicalProcessDetailId: store.dayworkInfo.processSequence.filter(v => v.processStepNumber ==
|
|
|
+ store.dayworkInfo.currentProcess.processStepNumber)[0].technologicalProcessDetailId,
|
|
|
processId: store.dayworkInfo.currentProcess.id,
|
|
|
// processId: store.dayworkInfo.processSequence.findIndex(v => v.technologicalProcessDetailId === selectedProcess.value) >= 0 ? store.dayworkInfo.processSequence.find(v => v.technologicalProcessDetailId === selectedProcess.value).id : null,
|
|
|
equipmentDetailId: selectedEquipment.value.commonId,
|
|
|
- processStepNumber:store.dayworkInfo.currentProcess.processStepNumber,
|
|
|
+ processStepNumber: store.dayworkInfo.currentProcess.processStepNumber,
|
|
|
equipmentDetailCode: selectedEquipment.value.commonCode,
|
|
|
collaborationList: selectedUserList.value
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
<style lang="scss">
|
|
|
- .dialog-body {
|
|
|
- .equipment-container {
|
|
|
- height: 300rpx;
|
|
|
- overflow: auto;
|
|
|
- flex-wrap: wrap;
|
|
|
- justify-content: flex-start;
|
|
|
- margin: 24rpx 0 0 7%;
|
|
|
-
|
|
|
- .item {
|
|
|
- width: 236rpx;
|
|
|
- height: 60rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 60rpx;
|
|
|
- border-radius: 6rpx;
|
|
|
- margin: 16rpx;
|
|
|
- flex: 0 0 40%;
|
|
|
- border: 1px solid #000000;
|
|
|
- }
|
|
|
+ .dialog-container {
|
|
|
+ .dialog-body {
|
|
|
+ margin-top: 180rpx !important;
|
|
|
+ margin-left: auto !important;
|
|
|
+ margin-right: auto !important;
|
|
|
+
|
|
|
+ .equipment-container {
|
|
|
+ height: 300rpx;
|
|
|
+ overflow: auto;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin: 24rpx 0 0 7%;
|
|
|
+
|
|
|
+ .item {
|
|
|
+ width: 236rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 60rpx;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ margin: 16rpx;
|
|
|
+ flex: 0 0 40%;
|
|
|
+ border: 1px solid #000000;
|
|
|
+ }
|
|
|
|
|
|
- .selected {
|
|
|
- background-color: #1684fc;
|
|
|
- color: #FFF;
|
|
|
+ .selected {
|
|
|
+ background-color: #1684fc;
|
|
|
+ color: #FFF;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .add-btn-container {
|
|
|
- margin-top: 32rpx;
|
|
|
+ .add-btn-container {
|
|
|
+ margin-top: 32rpx;
|
|
|
|
|
|
- .btn {
|
|
|
- flex: 1;
|
|
|
+ .btn {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- .switch {
|
|
|
- font-size: 26rpx;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- margin: 16rpx;
|
|
|
- }
|
|
|
+ .switch {
|
|
|
+ font-size: 26rpx;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 16rpx;
|
|
|
+ }
|
|
|
|
|
|
- .userList {
|
|
|
- border: 1rpx solid #1684fc;
|
|
|
- border-radius: 8rpx;
|
|
|
- max-height: 300rpx;
|
|
|
- overflow: auto;
|
|
|
- width: 100%;
|
|
|
+ .userList {
|
|
|
+ border: 1rpx solid #1684fc;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ max-height: 300rpx;
|
|
|
+ overflow: auto;
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ .showUser {
|
|
|
+ justify-content: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .user {
|
|
|
+ border: 1rpx solid #999;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ width: 150rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 50rpx;
|
|
|
+ margin: 10rpx;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .showUser {
|
|
|
+ .selectedUserList {
|
|
|
+ width: 100%;
|
|
|
justify-content: flex-start;
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
- .user {
|
|
|
+ .selectedUser {
|
|
|
border: 1rpx solid #999;
|
|
|
border-radius: 8rpx;
|
|
|
width: 150rpx;
|
|
|
height: 50rpx;
|
|
|
text-align: center;
|
|
|
line-height: 50rpx;
|
|
|
- margin: 10rpx;
|
|
|
- overflow: auto;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .selectedUserList {
|
|
|
- width: 100%;
|
|
|
- justify-content: flex-start;
|
|
|
- flex-wrap: wrap;
|
|
|
-
|
|
|
- .selectedUser {
|
|
|
- border: 1rpx solid #999;
|
|
|
- border-radius: 8rpx;
|
|
|
- width: 150rpx;
|
|
|
- height: 50rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 50rpx;
|
|
|
- margin: 20rpx 20rpx 0 0;
|
|
|
- justify-content: space-around;
|
|
|
+ margin: 20rpx 20rpx 0 0;
|
|
|
+ justify-content: space-around;
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|