浏览代码

需求更改

qinhb 10 小时之前
父节点
当前提交
8b9f328d18

+ 1 - 0
src/views/pro-steps/components/wuliaocaiji.vue

@@ -57,6 +57,7 @@
     v-model="showXQ"
     :showInfo="showInfo"
     :showInfoData="showInfoData"
+    @refreshData="getOpCompentData"
   />
   <caijiRightPopUp
     ref="caijiRef"

+ 12 - 9
src/views/pro-steps/popUpView/caijiRightPopUp.vue

@@ -20,15 +20,18 @@
                 {{ item.materialName }}({{ item.spec }})
               </div>
               <div class="describeText">{{ item.materialCode }}</div>
-              <div class="describeText">批次号:</div>
-              <template v-if="selectIndex == index">
-                <ScanCodeInput v-model="item.batchNo" />
-              </template>
-              <div v-else class="titleText">{{ item.batchNo }}</div>
-              <!-- <div class="describeText">批次号:xxx</div>
-              <div class="describeText">计划编号:xxx</div>
-              <div class="describeText">订单编号:xxx</div>
-              <div class="describeText">入库单号:xxx</div> -->
+
+              <div class="describeText" v-if="selectIndex == index" style="height: 35px;" >
+                <div style="width:25%;height:100%;float: left;height: 35px; line-height: 35px;">批次号: </div>
+                <div style="width:70%;height:100%;float: left;"> <ScanCodeInput v-model="item.batchNo" style="height: 35px;line-height: 35px;" /></div>
+              </div>
+              <div v-else class="titleText">批次号:{{ item.batchNo }}</div>
+
+              <div class="describeText" v-if="selectIndex == index" style="height: 35px;" >
+                <div style="width:25%;height:100%;float: left;height: 35px;line-height: 35px;">筛选报告: </div>
+                <div style="width:70%;height:100%;float: left;"> <ScanCodeInput v-model="item.bgCode" style="height: 35px;line-height: 35px;" /></div>
+              </div>
+              <div v-else class="titleText">筛选报告:{{ item.bgCode }}</div>
             </div>
             <div class="rightInput">
               <div></div>

+ 38 - 20
src/views/pro-steps/popUpView/xiangqingPopUp.vue

@@ -28,26 +28,36 @@
             class="info titleText"
             style="margin-top:5px;"
             v-for="(item, index) in showInfoData"
-            @click="setSelectIndex(index)"
             :key="index"
           >
-            <template v-if="selectIndex == index">
-              <ScanCodeInput v-model="item.batchNo" width="50%"/>
-            </template>
-            <template v-else>
-              {{item.batchNo}} * {{item.num}}
-            </template>
-<!--            <el-form span="24" :inline="true" >
-              <el-form-item label="批号" span="12">
-                <el-input v-model="item.batchNo"></el-input>
-              </el-form-item>
-              <el-form-item label="数量" span="12">
-                <el-input v-model="item.num"></el-input>
-              </el-form-item>
-            </el-form>-->
-            <span style="margin-right: 10px"></span>
-          </div>
-          <Empty v-if="showInfoData.length == 0" />
+            <div @click="setSelectIndex(index)" style="float:left;width:95%;height:100%;">
+              <template v-if="selectIndex == index">
+                <div class="describeText" style="height: 35px;" >
+                  <div style="width:25%;height:100%;float: left;height: 35px; line-height: 35px;">批次号: </div>
+                  <div style="width:70%;height:100%;float: left;margin-top: 2px;"> <ScanCodeInput v-model="item.batchNo" style="height: 33px;line-height: 33px;" /></div>
+                </div>
+
+                <div class="describeText" v-if="selectIndex == index" style="height: 35px;" >
+                  <div style="width:25%;height:100%;float: left;height: 35px;line-height: 35px;">筛选报告: </div>
+                  <div style="width:70%;height:100%;float: left;"> <ScanCodeInput v-model="item.bgCode" style="height: 33px;line-height: 33px;" /></div>
+                </div>
+              </template>
+              <template v-else>
+                批号: {{item.batchNo}}  {{item.bgCode ? '- 包装号: ' + item.bgCode : ''}}  * {{item.num}}
+              </template>
+              <span style="margin-right: 10px"></span>
+            </div>
+            <div style="float:left;width:5%;height:100%;">
+              <el-button
+                  type="danger"
+                  icon="el-icon-delete"
+                  size="small"
+                  text
+                  @click="deleteItem(index)"
+              >删除</el-button>
+            </div>
+            <Empty v-if="showInfoData.length == 0" />
+            </div>
         </div>
       </el-scrollbar>
       <div class="dialog-footer" style="margin: 0 auto;" v-if="selectIndex != null">
@@ -60,7 +70,7 @@
 
 <script lang="ts" setup>
 import {batchUpdate} from "@/api/prosteps/wuliaocaiji";
-const emits = defineEmits(["update:modelValue"]);
+const emits = defineEmits(["update:modelValue","refreshData"]);
 const props = defineProps({
   modelValue: {
     type: Boolean,
@@ -77,6 +87,12 @@ const selectIndex = ref(null);
 const setSelectIndex = (index) => {
   selectIndex.value = index;
 };
+const removeIds = ref([])
+const deleteItem = ((index)=>{
+  selectIndex.value = -1;
+  removeIds.value.push(props.showInfoData[index].id)
+  props.showInfoData.splice(index,1)
+})
 const scanCode = ref("");
 const handleClose = () => {
   selectIndex.value = null
@@ -84,9 +100,11 @@ const handleClose = () => {
 };
 
 const replaceMaterials = () => {
-  batchUpdate(props.showInfoData).then((res)=>{
+  const params = {removeIds: removeIds.value, recordList: props.showInfoData}
+  batchUpdate(params).then((res)=>{
     selectIndex.value = null
     ElMessage.success(res.msg)
+    emits("refreshData");
   });
 };
 </script>

+ 1 - 1
src/views/traceability/components/materials.vue

@@ -13,7 +13,7 @@
             <el-table-column prop="itemModel" label="物料规格" />
             <el-table-column prop="itemCode" label="物料编号" />
             <el-table-column prop="batchNo" label="采集批次" />
-<!--            <el-table-column prop="needNum" label="需求数量" />-->
+            <el-table-column prop="bgCode" label="筛选报告" />
             <el-table-column prop="realNum" label="已采集数量" />
             <el-table-column prop="trackWhen" label="采集时间" />
           </el-table>