guoyujia 6 月之前
父节点
当前提交
cd1ef17296

+ 1 - 1
src/views/business/outsourceInspectionVerify/index.vue

@@ -48,7 +48,7 @@
           <el-table-column label="外协单位" align="center" prop="outsourcedOrderDetail.supplierName" width="150" />
           <el-table-column label="批次号" align="center" prop="lotCode" width="100" />
           <el-table-column label="产品描述" align="center" prop="productDescription" width="320" />
-          <el-table-column label="检查单号" align="center" prop="outsourcedInspectionNo" width="120" />
+          <!-- <el-table-column label="检查单号" align="center" prop="outsourcedInspectionNo" width="120" /> -->
           <el-table-column label="检查状态" align="center" prop="status" width="120">
             <template #default="scope">
               <dict-tag :options="process_inspection_status" :value="scope.row.status" />

+ 2 - 1
src/views/business/processInspection/index.vue

@@ -309,8 +309,9 @@ function getList() {
     if (isDispatch.value) {
       deptList.value.unshift({ label: "全部", value: "0" });
     }
+    console.log(deptList.value)
     let index = deptList.value.findIndex((item) => {
-      return item.label == "外协";
+      return item.deptCode == "170000";
     });
     if (index > -1) {
       deptList.value.splice(index, 1);

+ 35 - 1
src/views/business/returnReceipt/form.vue

@@ -58,10 +58,13 @@
           @click="handleShowDialogOutSourceDetails">
           添加收回明细
         </el-button>
+        <el-button type="primary" icon="Check" :disabled="ids&& ids.length == 0" @click="handlePass">批量审核</el-button>
+        <el-button type="danger" icon="Close" :disabled="ids&& ids.length == 0" @click="handleFail">批量取消审核</el-button>
       </div>
       <div class="el-table-container">
         <div class="el-table-inner-container">
-          <el-table v-loading="loading" :data="form.details" size="small" border height="100%">
+          <el-table v-loading="loading" :data="form.details" size="small" border height="100%" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="48" align="center" :selectable="handleAllowSelected" />
             <el-table-column label="行号" type="index" align="center" width="48" />
             <el-table-column label="批次号" align="center" prop="lotCode" width="104" />
             <el-table-column label="产品描述" align="center" prop="productDescription" width="320" />
@@ -134,6 +137,8 @@ const loading = ref(false);
 const visible = ref(false);
 const editStatus = ref(false);
 const processList = ref([])
+const ids = ref([])
+const selected = ref([])
 const webHost = import.meta.env.VITE_APP_BASE_API;
 const form = ref({});
 
@@ -200,6 +205,24 @@ const handleShowDialogOutSourceDetails = () => {
   info.supplierId = form.value.supplierId;
   proxy.$refs.dialogOutsourceDetailsRef.open(info);
 };
+function handlePass(){
+  form.value.details.forEach(item => {
+    ids.value.forEach(id => {
+      if(item.outsourceDetailId== id){
+        item.status = 1
+      }
+    });
+  });
+}
+function handleFail(){
+  form.value.details.forEach(item => {
+    ids.value.forEach(id => {
+      if(item.outsourceDetailId== id){
+        item.status = 0
+      }
+    });
+  });
+}
 // 外协明细选择带回
 const handleMultipleSelectedOutsourceDetails = (selection) => {
   for (let i = 0; i < selection.length; i++) {
@@ -262,6 +285,17 @@ const handleMultipleSelectedOutsourceDetails = (selection) => {
 function handleChangeAuditStatus(row) {
   console.log(row);
 }
+/**复选框选中数据 */
+function handleSelectionChange(selection) {
+  selected.value = selection
+  console.log(selection)
+  ids.value = selection.map((item) => item.outsourceDetailId);
+  console.log(ids.value)
+}
+function handleAllowSelected(row) {
+
+  return !(row.productionDeptId != 0 || (row.isApproved === 0 && row.processInspecionList && row.processInspecionList.length > 0) ||row.isProvedForCheck === 1 || row.isCheckout === 1)
+}
 /** 提交按钮 */
 function submitForm() {
   proxy.$refs["formRef"].validate(async (valid) => {

+ 1 - 1
src/views/business/storageRetrieval/addDialog.vue

@@ -146,7 +146,7 @@ function open() {
     loading.value = false;
 
     let index = deptList.value.findIndex((item) => {
-      return item.label == "外协";
+      return item.label == "170000";
     });
     if (index > -1) {
       deptList.value.splice(index, 1);

+ 1 - 1
src/views/business/storageRetrieval/index.vue

@@ -362,7 +362,7 @@ function getList() {
       deptList.value.unshift({ label: "全部", value: "0" });
     }
     let index = deptList.value.findIndex((item) => {
-      return item.label == "外协";
+      return item.label == "170000";
     });
     if (index > -1) {
       deptList.value.splice(index, 1);