|
|
@@ -96,7 +96,7 @@
|
|
|
<div class="take-lot" v-if="lotData.length>0">
|
|
|
<van-cell-group>
|
|
|
<div class="take-lot-title">批次信息</div>
|
|
|
- <van-cell v-for="(item,i) in lotData" :key="i" :is-link="item.field!=='lotAtt05' && item.field!=='lotAtt08'"
|
|
|
+ <van-cell v-for="(item,i) in lotData" :key="i" :is-link="item.field!=='lotAtt05'"
|
|
|
@click="onLot(item)">
|
|
|
<template #title>
|
|
|
<van-icon v-if="item.require" name="warning-o" color="#ed6a0c" />
|
|
|
@@ -140,6 +140,20 @@
|
|
|
@setUniqueCode="onConfirm"
|
|
|
|
|
|
/>
|
|
|
+ <van-action-sheet
|
|
|
+ v-model:show="lotQualityTrueFalseBy"
|
|
|
+ cancel-text="取消"
|
|
|
+ close-on-click-action
|
|
|
+ description="请选择质量状态"
|
|
|
+ >
|
|
|
+ <van-cell-group>
|
|
|
+ <van-cell v-for="(value,key) in lotQualityMap" @click="onSelectLotQuality(key)">
|
|
|
+ <template #title>
|
|
|
+ {{value}}
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ </van-cell-group>
|
|
|
+ </van-action-sheet>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
@@ -490,9 +504,16 @@ const _calculateShelfLife = (item, lotData) => {
|
|
|
//日期选择
|
|
|
const lotField = ref('')
|
|
|
const lotDateRef = ref(null)
|
|
|
+const lotQualityTrueFalseBy=ref(false)
|
|
|
+const lotQualityMap=ref({})
|
|
|
const onLot = (item) => {
|
|
|
lotField.value = item.field
|
|
|
- if (item.field == 'lotAtt05' || item.field == 'lotAtt08') return
|
|
|
+ if (item.field == 'lotAtt05' ) return
|
|
|
+ if ( item.field == 'lotAtt08'){
|
|
|
+ lotQualityMap.value=JSON.parse(item.format)
|
|
|
+ lotQualityTrueFalseBy.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
if (item.type == 'Date') {
|
|
|
lotDateRef.value?.show(item.label, item.mapping)
|
|
|
return
|
|
|
@@ -504,7 +525,15 @@ const onLot = (item) => {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+//设置质量状态
|
|
|
+const onSelectLotQuality=(key)=>{
|
|
|
+ lotData.value.forEach((lot) => {
|
|
|
+ if (lot.field == lotField.value) {
|
|
|
+ lot.mapping = key
|
|
|
+ }
|
|
|
+ })
|
|
|
+ lotQualityTrueFalseBy.value=false
|
|
|
+}
|
|
|
|
|
|
// 设置日期
|
|
|
const selectLotDate = (date) => {
|