|
@@ -3,6 +3,10 @@
|
|
|
<view class="prompt">
|
|
|
<text>请选择批次再确认</text>
|
|
|
</view>
|
|
|
+ <uni-section title="请选择当前工序" type="square">
|
|
|
+ <uni-data-select v-model="selectedProcess" :localdata="processList" :clear="false"
|
|
|
+ @change="handleProcessChange"></uni-data-select>
|
|
|
+ </uni-section>
|
|
|
<view :class="{'list-container':true, 'selected':isSelected(item)}" @click="handleSelection(item,index)"
|
|
|
v-for="(item, index) in form" :key="item.id">
|
|
|
<view class="list-title"><text class="label">批次号:{{item.lotCode}}</text></view>
|
|
@@ -14,14 +18,14 @@
|
|
|
<text class="label">关联箱号</text>
|
|
|
<text class="label value">{{item['carrierName']}}</text>
|
|
|
</view>
|
|
|
-<!-- <view class="list-container-item uni-row">
|
|
|
- <text class="label">当前工序</text>
|
|
|
- <text class="label value">{{item['daywork'].currentProcess.processAlias}}</text>
|
|
|
- </view> -->
|
|
|
<view class="list-container-item uni-row" style="border-bottom: 1px solid #999999;">
|
|
|
<text class="label">投产数量</text>
|
|
|
<text class="label value">{{item['prodNum']}}</text>
|
|
|
</view>
|
|
|
+ <view class="list-container-item uni-row">
|
|
|
+ <text class="label">上道工序</text>
|
|
|
+ <text class="label value">{{item['process'].processAlias}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="add-btn-container uni-row">
|
|
|
<button type="primary" class="btn" @click="handleConfirm" :disabled="flag">确认</button>
|
|
@@ -34,6 +38,9 @@
|
|
|
ref,
|
|
|
getCurrentInstance
|
|
|
} from 'vue'
|
|
|
+ import {
|
|
|
+ getProcessList
|
|
|
+ } from '@/api/business/deptProcess.js'
|
|
|
|
|
|
const baseDialog = ref(null)
|
|
|
const selectedButton = ref(null)
|
|
@@ -41,11 +48,14 @@
|
|
|
const emit = defineEmits(['submit'])
|
|
|
const selection = ref([])
|
|
|
const flag = ref(true)
|
|
|
+ const selectedProcess = ref(null)
|
|
|
+ const processList = ref([])
|
|
|
|
|
|
const open = (data) => {
|
|
|
// console.log(dialog.value)
|
|
|
- form.value = data
|
|
|
- baseDialog.value.open()
|
|
|
+ form.value = data;
|
|
|
+ baseDialog.value.open();
|
|
|
+ getProcesses();
|
|
|
}
|
|
|
|
|
|
const close = () => {
|
|
@@ -55,12 +65,38 @@
|
|
|
defineExpose({
|
|
|
open
|
|
|
})
|
|
|
+
|
|
|
+ function getProcesses() {
|
|
|
+ console.log("11111111111111111111111")
|
|
|
+ getProcessList({
|
|
|
+ deptId: store.curDeptDetails.deptId,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ //过滤出工序交集
|
|
|
+ let filteredData = res.data.filter((item1) =>
|
|
|
+ store.planDetails.processSequence.some((item2) => item2.processCode === item1.processCode)
|
|
|
+ );
|
|
|
+ for (let i = 0; i < filteredData.length; i++) {
|
|
|
+ processList.value[i] = {
|
|
|
+ text: filteredData[i].processAlias,
|
|
|
+ value: filteredData[i].processId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ selectedProcess.value = filteredData[0].processId;
|
|
|
+ console.log(processList.value)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function handleProcessChange(){
|
|
|
|
|
|
+ }
|
|
|
|
|
|
function handleConfirm() {
|
|
|
- close();
|
|
|
- emit('submit', selection.value);
|
|
|
- uni.$emit('dayworkItemUpdate');
|
|
|
+ console.log(selection.value)
|
|
|
+ // close();
|
|
|
+ // emit('submit', selection.value);
|
|
|
+ // uni.$emit('dayworkItemUpdate');
|
|
|
}
|
|
|
|
|
|
function isSelected(item) {
|
|
@@ -86,6 +122,7 @@
|
|
|
|
|
|
.dialog-body {
|
|
|
overflow: auto;
|
|
|
+
|
|
|
.list-title {
|
|
|
margin: 20rpx 0 20rpx 0;
|
|
|
|
|
@@ -94,8 +131,8 @@
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .prompt{
|
|
|
+
|
|
|
+ .prompt {
|
|
|
color: #999;
|
|
|
margin: 8rpx auto 0;
|
|
|
}
|
|
@@ -138,4 +175,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .selectedProcess {
|
|
|
+ width: 88%;
|
|
|
+ margin: 20rpx auto 40rpx;
|
|
|
+ }
|
|
|
</style>
|