From 28c36a0fa33955174d87510353ff06cbecaa7a89 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期二, 03 十一月 2026 18:08:18 +0800
Subject: [PATCH] 成品下单支持批量下单,检验委托单按批次合并展示/编辑/删除/导出

---
 src/views/business/productOrder/components/addOrder.vue |  189 ++++++++++++
 src/views/CNAS/process/demand/index.vue                 |  645 +++++++++++++++++++++++++-----------------
 src/api/business/add.js                                 |    8 
 3 files changed, 577 insertions(+), 265 deletions(-)

diff --git a/src/api/business/add.js b/src/api/business/add.js
index 82e45f3..c345ad2 100644
--- a/src/api/business/add.js
+++ b/src/api/business/add.js
@@ -40,6 +40,14 @@
     data: query
   })
 }
+// 鎵归噺娣诲姞鏂拌仛妫�楠屼笅鍗曟暟鎹�
+export function addBatchNewJuInsOrder(query) {
+  return request({
+    url: '/insOrder/addBatchNewJuInsOrder',
+    method: 'post',
+    data: query
+  })
+}
 // 瀹℃牳妫�楠屽崟鏈鸿繘琛岀姸鎬佷慨鏀�
 export function upInsOrderOfState(query) {
   return request({
diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue
index 8f09074..1200d3c 100644
--- a/src/views/CNAS/process/demand/index.vue
+++ b/src/views/CNAS/process/demand/index.vue
@@ -28,10 +28,13 @@
       <el-table v-loading="tableListLoading" :data="tableList"
                 height="630" border>
         <el-table-column align="center" label="搴忓彿" type="index"></el-table-column>
-        <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip></el-table-column>
+        <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip>
+          <template #default="scope">
+            <span>{{ scope.row.sampleName }}<template v-if="scope.row.detailCount > 1"> 绛墈{ scope.row.detailCount }}鍙�</template></span>
+          </template>
+        </el-table-column>
         <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip></el-table-column>
         <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" show-overflow-tooltip></el-table-column>
-        <el-table-column label="鍨嬪彿" prop="modelNo" show-overflow-tooltip></el-table-column>
         <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip></el-table-column>
         <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip></el-table-column>
         <el-table-column label="濮旀墭浜�" prop="commissionUser"></el-table-column>
@@ -40,7 +43,7 @@
         <el-table-column label="鏄惁鐣欐牱" prop="isLeave">
           <template #default="scope">
             <span v-if="scope.row.isLeave === 1">鏄�</span>
-            <span v-if="scope.row.isLeave === 0">鍚�</span>
+            <span v-else-if="scope.row.isLeave != null">鍚�</span>
           </template>
         </el-table-column>
         <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing" width="150">
@@ -70,292 +73,255 @@
       </el-pagination>
     </div>
     <el-dialog :class="{ downPdf: title == '涓嬭浇' }" :close-on-click-modal="false" :close-on-press-escape="false"
-      :modal="title != '涓嬭浇'" :title="title" v-model="detailDialogVisible" top="20px" width="1200px">
-      <div style="max-height: 75vh;overflow-y: auto;">
+      :modal="title != '涓嬭浇'" :title="title" v-model="detailDialogVisible" top="20px" width="1080px">
+      <div style="max-height: 78vh;overflow-y: auto;">
         <div id="dialogBody">
-          <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;width: 100%">
-            <tr>
-              <td rowspan="2">
-              </td>
-              <td>
-                <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p>
-              </td>
-              <td>
-                <p>淇濆瓨鏈熼檺锛�6骞�</p>
-              </td>
-            </tr>
-            <tr>
-              <td>
-                <p>璁板綍缂栧彿锛�</p>
-              </td>
-              <td>
-                <p>褰掓。閮ㄩ棬锛氱患鍚堝</p>
-              </td>
-            </tr>
-          </table>
           <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;">
-            <span style="font-size: 28px;">妫� 楠� 濮� 鎵� 鍗�</span>
+            <span style="font-size: 28px;">瀹� 鎴� 妫� 娴� 濮� 鎵� 涔�</span>
           </h4>
-          <p v-if="operationType !== 'view'" style="margin-left: 560px;display: flex;align-items: center">
-            <span style="width: 100px">濮旀墭缂栧彿锛�</span>
-            <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input>
-          </p>
-          <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{
-            currentInfo.entrustCode }}
-          </p>
-          <table border="1" cellpadding="10" class="tables" style="width: 100%">
+          <p style="margin: 0 0 8px 0;text-align: right;" v-if="operationType === 'view'">濮旀墭缂栧彿锛歿{ entrustCodeText }}</p>
+          <div style="margin-bottom: 8px;text-align: right;" v-if="operationType !== 'view'">
+            <el-button size="small" type="primary" @click="addOrderDetailList">娣诲姞鏍峰搧琛�</el-button>
+          </div>
+          <div style="overflow-x: auto;">
+          <table border="1" class="tables">
+            <colgroup>
+              <col style="width: 6%" />
+              <col style="width: 9%" />
+              <col style="width: 9%" />
+              <col style="width: 10%" />
+              <col style="width: 6%" />
+              <col style="width: 7%" />
+              <col style="width: 4%" />
+              <col style="width: 4%" />
+              <col style="width: 7%" />
+              <col style="width: 21%" />
+              <col style="width: 17%" />
+            </colgroup>
             <tr>
-              <td colspan="2">
-                <p>璇曟牱鍚嶇О</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td>
-              <td>
-                <p>濮旀墭鏃堕棿</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-date-picker v-model="currentInfo.commissionDate" clearable format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡"
-                  size="small" style="width: 100%" type="date" value-format="YYYY-MM-DD">
-                </el-date-picker>
-              </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <p>鍨� 鍙�</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable
+              <td rowspan="5">濮旀墭鏂�</td>
+              <td>濮旀墭鏂瑰崟浣�</td>
+              <td colspan="6">
+                <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable
                   size="small"></el-input>
+                <span v-else>{{ currentInfo.commissionUnit }}</span>
               </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td>
-              <td>
-                <p>濮旀墭鍗曚綅</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td>
+              <td>濮旀墭缂栧彿</td>
+              <td colspan="2">璇﹁鏍峰搧淇℃伅琛�</td>
             </tr>
             <tr>
+              <td>鐢熶骇鍗曚綅</td>
+              <td colspan="6">
+                <el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable
+                  size="small"></el-input>
+                <span v-else>{{ currentInfo.production }}</span>
+              </td>
+              <td>鏄惁鐣欐牱</td>
               <td colspan="2">
-                <p>鐢熶骇鍗曚綅</p>
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.isLeave">
+                  <el-radio :value="1">鏄�</el-radio>
+                  <el-radio :value="2">鍚�</el-radio>
+                </el-radio-group>
+                <span v-else>{{ currentInfo.isLeave == null ? '' : (currentInfo.isLeave === 1 ? '鏄�' : '鍚�') }}</span>
               </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.production }}</td>
-              <td>
-                <p>濮旀墭浜�</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td>
             </tr>
             <tr>
-              <td colspan="2">
-                <p>鏍峰搧鏁伴噺</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td>
-              <td>
-                <p>鏍峰搧鐘舵��</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{
-                insStateList.find(m => m.value == currentInfo.sampleStatus) ? insStateList.find(m => m.value == currentInfo.sampleStatus).label:'/'
-                }}</td>
+              <td>椤圭洰鍚嶇О</td>
+              <td colspan="9" style="text-align: center;">{{ projectName }}</td>
             </tr>
             <tr>
+              <td>鏍峰搧绫诲埆</td>
+              <td colspan="6">璇﹁鏍峰搧淇℃伅琛�</td>
+              <td>妫�娴嬫潵婧�</td>
               <td colspan="2">
-                <p>鏄惁鐣欐牱</p>
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.sampleSource">
+                  <el-radio :value="1">閫佹牱</el-radio>
+                  <el-radio :value="2">閲囨牱</el-radio>
+                </el-radio-group>
+                <span v-else>{{ sampleSourceText }}</span>
               </td>
-              <td v-if="operationType !== 'view'">
-                <el-radio-group v-model="currentInfo.isLeave">
+            </tr>
+            <tr>
+              <td>閫佹牱鏃堕棿</td>
+              <td colspan="6">
+                <el-date-picker v-if="operationType !== 'view'" v-model="currentInfo.commissionDate" clearable
+                  format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 100%" type="date"
+                  value-format="YYYY-MM-DD">
+                </el-date-picker>
+                <span v-else>{{ currentInfo.commissionDate }}</span>
+              </td>
+              <td>閫佹牱浜�</td>
+              <td colspan="2">
+                <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable
+                  size="small"></el-input>
+                <span v-else>{{ currentInfo.commissionUser }}</span>
+              </td>
+            </tr>
+            <tr>
+              <td :rowspan="2 + detailCount">鏍峰搧淇℃伅</td>
+              <td colspan="10">鏍峰搧鍜屾娴嬩俊鎭�</td>
+            </tr>
+            <tr>
+              <td>鏍峰搧鍚嶇О</td>
+              <td>鏍峰搧缂栧彿</td>
+              <td>妫�娴嬮」鐩�</td>
+              <td>鏍峰搧鏁伴噺</td>
+              <td>鏍峰搧鐘舵��</td>
+              <td colspan="3">妫�娴嬩緷鎹�</td>
+              <td>澶囨敞淇℃伅锛堣缁嗕俊鎭璇佹槑闄勪欢锛�</td>
+              <td>濮旀墭缂栧彿</td>
+            </tr>
+            <tr v-for="(item, index) in (currentInfo.orderDetailList || [])" :key="index">
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.sampleName" clearable
+                  size="small"></el-input>
+                <span v-else>{{ item.sampleName }}</span>
+              </td>
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable
+                  size="small"></el-input>
+                <span v-else>{{ item.sampleNumber }}</span>
+              </td>
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.testItem" clearable size="small"></el-input>
+                <span v-else>{{ item.testItem }}</span>
+              </td>
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.quantity" clearable
+                  size="small"></el-input>
+                <span v-else>{{ item.quantity }}</span>
+              </td>
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.sampleStatus" clearable
+                  size="small"></el-input>
+                <span v-else>{{ item.sampleStatus }}</span>
+              </td>
+              <td colspan="3">
+                <el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable
+                  size="small"></el-input>
+                <span v-else>{{ item.testStandard }}</span>
+              </td>
+              <td>
+                <el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input>
+                <span v-else>{{ item.remark }}</span>
+              </td>
+              <td>
+                <div>{{ detailEntrustCodes[index] }}</div>
+                <el-button v-if="operationType !== 'view'" link type="danger" size="small"
+                  @click="removeOrderDetailList(index)">鍒犻櫎鏈</el-button>
+              </td>
+            </tr>
+            <tr>
+              <td rowspan="4">濮旀墭瑕佹眰</td>
+              <td>鍒嗗寘鍐呭</td>
+              <td colspan="9">
+                <template v-if="operationType !== 'view'">
+                  <el-radio-group v-model="currentInfo.subcontractType">
+                    <el-radio :value="1">鏈�</el-radio>
+                    <el-radio :value="0">鏃�</el-radio>
+                  </el-radio-group>
+                  <span v-if="currentInfo.subcontractType === 1" style="margin-left: 8px;">
+                    鍒嗗寘鍗曚綅淇℃伅锛�
+                    <el-input v-model="currentInfo.subcontractCompany" clearable size="small"
+                      style="width: 260px;"></el-input>
+                  </span>
+                </template>
+                <span v-else>{{ subcontractText }}</span>
+              </td>
+            </tr>
+            <tr>
+              <td>鏍峰搧澶勭疆</td>
+              <td colspan="3">
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.sampleDisposal">
+                  <el-radio :value="1">濮旀墭鏂瑰彇鍥�</el-radio>
+                  <el-radio :value="2">妫�娴嬫柟澶勭疆</el-radio>
+                </el-radio-group>
+                <span v-else>{{ sampleDisposalText }}</span>
+              </td>
+              <td colspan="2">瀵圭粨鏋滆瘎浠�</td>
+              <td colspan="4">
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.resultEvaluation">
                   <el-radio :value="1">鏄�</el-radio>
                   <el-radio :value="0">鍚�</el-radio>
                 </el-radio-group>
+                <span v-else>{{ resultEvaluationText }}</span>
               </td>
-              <td v-if="operationType === 'view'">
-                <span v-if="currentInfo.isLeave == 1">鏄�</span>
-                <span v-else>鍚�</span>
+            </tr>
+            <tr>
+              <td>鎶ュ憡浜や粯鏂瑰紡</td>
+              <td colspan="9">
+                <template v-if="operationType !== 'view'">
+                  <el-radio-group v-model="currentInfo.reportDelivery">
+                    <el-radio :value="1">鑷彇</el-radio>
+                    <el-radio :value="2">蹇��</el-radio>
+                    <el-radio :value="3">鐢靛瓙浼犻��</el-radio>
+                  </el-radio-group>
+                  <template v-if="currentInfo.reportDelivery === 2">
+                    <div style="margin-top: 6px;">
+                      鎶ュ憡瀵勯�佸湴鍧�锛�
+                      <el-input v-model="currentInfo.reportAddress" clearable size="small"
+                        style="width: 360px;"></el-input>
+                    </div>
+                    <div style="margin-top: 6px;">
+                      鏀朵欢浜哄強鐢佃瘽锛�
+                      <el-input v-model="currentInfo.reportReceiver" clearable size="small"
+                        style="width: 260px;"></el-input>
+                    </div>
+                  </template>
+                </template>
+                <span v-else>{{ reportDeliveryText }}</span>
               </td>
-              <td>
-                <p>鏍峰搧澶勭悊鏂瑰紡</p>
+            </tr>
+            <tr>
+              <td>濮旀墭鏂规壙璇�</td>
+              <td colspan="9" style="line-height: 1.8;">
+                <div>鎴戞柟淇濊瘉瀵规墍鎻愪緵鐨勪竴鍒囪祫鏂欍�佸疄鐗╃湡瀹炴�ц礋璐o紝骞舵彁渚涘繀瑕佺殑鍚堜綔锛屾寜瑙勫畾鏀粯妫�楠岃垂銆�</div>
+                <div style="display: flex;align-items: center;flex-wrap: wrap;gap: 8px 28px;margin-top: 4px;">
+                  <span>濮旀墭浜猴細________</span>
+                  <span>鏃ユ湡锛歘_______</span>
+                  <span>鑱旂郴鐢佃瘽锛歘_______</span>
+                </div>
               </td>
-              <td v-if="operationType !== 'view'">
-                <el-radio-group v-model="currentInfo.processing">
-                  <el-radio :value="0">濮旀墭鍗曚綅鍙栧洖</el-radio>
-                  <el-radio :value="1">瀹為獙瀹ゅ鐞�</el-radio>
+            </tr>
+            <tr>
+              <td rowspan="3">濮旀墭鎺ユ敹</td>
+              <td>鏍峰搧鐘舵��</td>
+              <td colspan="9">
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.receiveStatus">
+                  <el-radio :value="1">绗﹀悎瑕佹眰</el-radio>
+                  <el-radio :value="2">鏈夌己闄凤紝浣嗕笉褰卞搷妫�娴�</el-radio>
+                  <el-radio :value="3">涓嶇鍚堟娴嬭姹�</el-radio>
                 </el-radio-group>
-              </td>
-              <td v-if="operationType === 'view'">
-                <span v-if="currentInfo.processing == 0">濮旀墭鍗曚綅鍙栧洖</span>
-                <span v-else>瀹為獙瀹ゅ鐞�</span>
+                <span v-else>{{ receiveStatusText }}</span>
               </td>
             </tr>
             <tr>
-              <td colspan="2">
-                <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-date-picker v-model="currentInfo.appointed" clearable format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡"
-                  size="small" style="width: 100%" type="date" value-format="YYYY-MM-DD">
-                </el-date-picker>
-              </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td>
-              <td>
-                <p>鎶ュ憡鍙戦�佹柟寮�</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-radio-group v-model="currentInfo.send">
-                  <el-radio :value="1">鑷彇</el-radio>
-                  <el-radio :value="0">鍏朵粬</el-radio>
+              <td>妫�娴嬭垂</td>
+              <td colspan="9">
+                <el-radio-group v-if="operationType !== 'view'" v-model="currentInfo.feeStatus">
+                  <el-radio :value="1">宸叉敹</el-radio>
+                  <el-radio :value="2">鏈敹</el-radio>
+                  <el-radio :value="3">棰勬敹</el-radio>
                 </el-radio-group>
-              </td>
-              <td v-if="operationType === 'view'">
-                <span v-if="currentInfo.send == 1">鑷彇</span>
-                <span v-else>鍏朵粬</span>
-              </td>
-            </tr>
-            <el-button size="small" type="primary" @click="addOrderDetailList"
-              v-if="operationType !== 'view'">娣诲姞</el-button>
-            <tr>
-              <td>
-                <p>搴忓彿</p>
-              </td>
-              <td>
-                <p>鏍峰搧缂栧彿</p>
-              </td>
-              <td>
-                <p>璇曢獙椤圭洰</p>
-              </td>
-              <td>
-                <p>妫�楠屼緷鎹�</p>
-              </td>
-              <td>
-                <p>澶囨敞</p>
-              </td>
-            </tr>
-            <tr v-for="(item, index) in currentInfo.orderDetailList" :key="index">
-              <td>{{ index + 1 }}</td>
-              <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable
-                  size="small"></el-input>
-              </td>
-              <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td>
-              <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input>
-              </td>
-              <td v-if="operationType === 'view'">{{ item.testItem }}</td>
-              <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable
-                  size="small"></el-input>
-              </td>
-              <td v-if="operationType === 'view'">{{ item.testStandard }}</td>
-              <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input>
-              </td>
-              <td v-if="operationType === 'view'">{{ item.remark }}</td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <p>鍒ゅ畾瑙勫垯</p>
-              </td>
-              <td v-if="operationType !== 'view'" colspan="3">
-                <el-radio-group v-model="currentInfo.criterionRule">
-                  <el-radio :value="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio>
-                  <el-radio :value="1">鑰冭檻涓嶇‘瀹氬害</el-radio>
-                </el-radio-group>
-                <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark"
-                    clearable size="small" style="width: 60px"></el-input>%</span>
-              </td>
-              <td v-if="operationType === 'view'" colspan="3">
-                <span v-if="currentInfo.criterionRule === 0">涓嶈�冭檻涓嶇‘瀹氬害</span>
-                <span v-if="currentInfo.criterionRule === 1">鑰冭檻涓嶇‘瀹氬害</span>
-                <span v-if="currentInfo.criterionRule === 1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
+                <span v-else>{{ feeStatusText }}</span>
               </td>
             </tr>
             <tr>
-              <td colspan="2">
-                <p>濮旀墭浜虹鍚�</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">
-                {{ currentInfo.commissionUser }}
-              </td>
-              <td>
-                <p>濮旀墭鏃ユ湡</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-date-picker v-model="currentInfo.commissionDate" clearable format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡"
-                  size="small" style="width: 100%" type="date" value-format="YYYY-MM-DD">
-                </el-date-picker>
-              </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <p>濮旀墭浜鸿仈绯荤數璇�</p>
-              </td>
-              <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <p>缁煎悎瀹ょ鍚�</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.generalOfficeUser }}</td>
-              <td>
-                <p>鎺ユ敹鏃ユ湡</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-date-picker v-model="currentInfo.receiptData" clearable format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡"
-                  size="small" style="width: 100%" type="date" value-format="YYYY-MM-DD">
-                </el-date-picker>
-              </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td>
-            </tr>
-            <tr>
-              <td colspan="2">
-                <p>棰嗘牱鍛樼鍚�</p>
-              </td>
-              <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable
-                  size="small"></el-input></td>
-              <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td>
-              <td>
-                <p>棰嗘牱鏃ユ湡</p>
-              </td>
-              <td v-if="operationType !== 'view'">
-                <el-date-picker v-model="currentInfo.sampleData" clearable format="YYYY-MM-DD" placeholder="閫夋嫨鏃ユ湡"
-                  size="small" style="width: 100%" type="date" value-format="YYYY-MM-DD">
-                </el-date-picker>
-              </td>
-              <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td>
-            </tr>
-            <tr>
-              <td colspan="2" rowspan="3">
-                <p>妫�娴嬫満鏋勪俊鎭�</p>
-              </td>
-              <td colspan="3">
-                <p>鏂拌仛</p>
+              <td>妫�娴嬫柟鎵胯</td>
+              <td colspan="9" style="line-height: 1.8;">
+                <div>鏈叕鍙镐繚璇佹娴嬪伐浣滅殑鍏鎬э紝瀵规娴嬫暟鎹礋璐o紝骞跺濮旀墭鏂规彁渚涚殑鎶�鏈祫鏂欏拰鏍峰搧淇濆瘑銆�</div>
+                <div style="margin-top: 4px;">涓氬姟鍙楃悊锛歘_______&nbsp;&nbsp;&nbsp;&nbsp;鏃ユ湡锛歘_______&nbsp;&nbsp;&nbsp;&nbsp;鑱旂郴鐢佃瘽锛歘_______</div>
               </td>
             </tr>
             <tr>
-              <td colspan="3">
-                <p>鍦板潃锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾 19 鍙�</p>
-              </td>
-            </tr>
-            <tr>
-              <td colspan="3">
-                <p>鐢佃瘽锛�0513-89059043</p>
-              </td>
+              <td colspan="2">濮旀墭璇存槑</td>
+              <td colspan="9">濮旀墭鍗曚负鍙屾柟妫�娴嬩笟鍔″绾︼紝璇峰鎵樺崟浣嶈鐪熷~鍐欙紝瑕佹眰鍐呭瀹屾暣锛屽瓧杩规竻鏅帮紝濮旀墭鍗曚綅鍜屾娴嬪崟浣嶅悇鎸佷竴浠姐�傛湰娆℃娴嬩粎瀵规墍鎻愪緵鐨勬牱鍝佽礋璐c��</td>
             </tr>
           </table>
-          <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p>
+          </div>
         </div>
       </div>
-      <template #footer><span v-if="operationType !== 'view'"  class="dialog-footer">
+      <template #footer><span v-if="operationType !== 'view'" class="dialog-footer">
         <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button>
         <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭�
           瀹�</el-button>
@@ -366,7 +332,7 @@
         <el-button :loading="outLoading" plain type="primary" @click="orderReportDown">涓嬭浇濮旀墭鍗�</el-button>
         <el-button :loading="outLoading" plain type="primary" @click="orderFormDown">涓嬭浇濮旀墭鎶ュ憡</el-button>
       </span>
-      <template #footer><span  class="dialog-footer">
+      <template #footer><span class="dialog-footer">
         <el-button @click="downloadDialog = false">鍙� 娑�</el-button>
       </span></template>
     </el-dialog>
@@ -453,6 +419,75 @@
   computed: {
     action() {
       return this.javaApi + '/inspectionOrder/uploadInspectionOrderFile'
+    },
+    detailCount() {
+      return (this.currentInfo.orderDetailList || []).length
+    },
+    detailEntrustCodes() {
+      const rows = this.currentInfo.orderDetailList || []
+      const code = this.currentInfo.entrustCode || ''
+      const dash = code.lastIndexOf('-')
+      const prefix = !code ? '' : (dash < 0 ? code + '-' : code.slice(0, dash + 1))
+      const bases = rows.map(item => item.entrustCode || this.rowEntrustCode(item))
+      const counts = {}
+      bases.forEach(base => { counts[base] = (counts[base] || 0) + 1 })
+      const used = new Set()
+      return bases.map((base, index) => {
+        let candidate = base
+        if (!base || counts[base] > 1 || used.has(candidate)) {
+          let seq = index + 1
+          candidate = prefix + String(seq).padStart(2, '0')
+          while (used.has(candidate)) {
+            seq += rows.length
+            candidate = prefix + String(seq).padStart(2, '0')
+          }
+        }
+        used.add(candidate)
+        return candidate
+      })
+    },
+    entrustCodeText() {
+      const codes = this.detailEntrustCodes.filter(Boolean)
+      if (codes.length > 1) {
+        return `${codes[0]} 锝� ${codes[codes.length - 1]}`
+      }
+      return this.currentInfo.entrustCode
+    },
+    projectName() {
+      return this.detailCount + '涓牱鍝�'
+    },
+    subcontractText() {
+      const has = this.currentInfo.subcontractType === 1
+      const company = this.currentInfo.subcontractCompany || ''
+      return `${has ? '鈽戞湁' : '鈻℃湁'}锛堝垎鍖呭崟浣嶄俊鎭細${company}锛�  ${has ? '鈻℃棤' : '鈽戞棤'}`
+    },
+    sampleDisposalText() {
+      const value = this.currentInfo.sampleDisposal
+      return `${value === 1 ? '鈽戝鎵樻柟鍙栧洖' : '鈻″鎵樻柟鍙栧洖'}銆�${value === 2 ? '鈽戞娴嬫柟澶勭疆' : '鈻℃娴嬫柟澶勭疆'}`
+    },
+    resultEvaluationText() {
+      const value = this.currentInfo.resultEvaluation
+      return `${value === 1 ? '鈽戞槸' : '鈻℃槸'}  ${value === 0 ? '鈽戝惁' : '鈻″惁'}`
+    },
+    reportDeliveryText() {
+      const value = this.currentInfo.reportDelivery
+      let text = `${value === 1 ? '鈽戣嚜鍙�' : '鈻¤嚜鍙�'}锛�${value === 2 ? '鈽戝揩閫�' : '鈻″揩閫�'}锛�${value === 3 ? '鈽戠數瀛愪紶閫�' : '鈻$數瀛愪紶閫�'}`
+      if (value === 2) {
+        text += `锛涙姤鍛婂瘎閫佸湴鍧�锛�${this.currentInfo.reportAddress || ''} 鏀朵欢浜哄強鐢佃瘽锛�${this.currentInfo.reportReceiver || ''}`
+      }
+      return text
+    },
+    sampleSourceText() {
+      const value = this.currentInfo.sampleSource
+      return `${value === 1 ? '鈽戦�佹牱' : '鈻¢�佹牱'}锛�${value === 2 ? '鈽戦噰鏍�' : '鈻¢噰鏍�'}`
+    },
+    receiveStatusText() {
+      const value = this.currentInfo.receiveStatus
+      return `${value === 1 ? '鈽戠鍚堣姹�' : '鈻$鍚堣姹�'}锛�${value === 2 ? '鈽戞湁缂洪櫡锛屼絾涓嶅奖鍝嶆娴�' : '鈻℃湁缂洪櫡锛屼絾涓嶅奖鍝嶆娴�'}锛�${value === 3 ? '鈽戜笉绗﹀悎妫�娴嬭姹�' : '鈻′笉绗﹀悎妫�娴嬭姹�'}`
+    },
+    feeStatusText() {
+      const value = this.currentInfo.feeStatus
+      return `${value === 1 ? '鈽戝凡鏀�' : '鈻″凡鏀�'}锛�${value === 2 ? '鈽戞湭鏀�' : '鈻℃湭鏀�'}锛�${value === 3 ? '鈽戦鏀�' : '鈻¢鏀�'}`
     }
   },
   methods: {
@@ -460,13 +495,32 @@
       if (this.currentInfo.orderDetailList == null) {
         this.currentInfo.orderDetailList = []
       }
-      this.currentInfo.orderDetailList.push({
+      const rows = this.currentInfo.orderDetailList
+      const last = rows.length ? rows[rows.length - 1] : {}
+      rows.push({
+        sampleName: last.sampleName || this.currentInfo.sampleName || '',
         sampleNumber: '',
         testItem: '',
+        quantity: last.quantity || this.currentInfo.quantity || '',
+        sampleStatus: last.sampleStatus || this.currentInfo.sampleStatus || '',
         testStandard: '',
         standardMethodList: '',
         remark: '',
       })
+    },
+    removeOrderDetailList(index) {
+      this.currentInfo.orderDetailList.splice(index, 1)
+    },
+    // 濮旀墭缂栧彿鎸夋牱鍝佺紪鍙峰悗涓や綅鐢熸垚锛屼笌瀵煎嚭 Word 瑙勫垯涓�鑷�
+    rowEntrustCode(item) {
+      const code = this.currentInfo.entrustCode || ''
+      const sampleNumber = (item.sampleNumber || '').trim()
+      if (!code || !sampleNumber) {
+        return code
+      }
+      const suffix = sampleNumber.length >= 2 ? sampleNumber.slice(-2) : sampleNumber
+      const index = code.lastIndexOf('-')
+      return index < 0 ? code : code.slice(0, index + 1) + suffix
     },
     // 鏌ヨ鍒楄〃
     refreshTable() {
@@ -507,10 +561,19 @@
     },
     // 鎻愪氦淇敼
     handleEdit() {
+      if (!this.currentInfo.orderDetailList || this.currentInfo.orderDetailList.length === 0) {
+        this.$message.warning('璇疯嚦灏戞坊鍔犱竴涓牱鍝佽')
+        return
+      }
+      const blankRow = this.currentInfo.orderDetailList.findIndex(item => !(item.sampleNumber || '').trim())
+      if (blankRow >= 0) {
+        this.$message.warning(`绗�${blankRow + 1}琛屾牱鍝佺紪鍙蜂笉鑳戒负绌篳)
+        return
+      }
       this.buttonLoading = true
       updateInspectionOrder(this.currentInfo).then(res => {
         this.buttonLoading = false
-        this.$message.success('鏂板鎴愬姛')
+        this.$message.success('淇濆瓨鎴愬姛')
         this.detailDialogVisible = false
         this.refreshTable()
       }).catch(err => {
@@ -520,9 +583,15 @@
     // 鎵撳紑缂栬緫寮规
     goUpdate(row) {
       this.operationType = 'edit'
-      getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => {
+      getInspectionOrderOne({
+        inspectionOrderId: row.inspectionOrderId,
+        batchNo: row.batchNo || undefined
+      }).then(res => {
         this.currentInfo = res.data
-        this.title = '缂栬緫妫�楠屽鎵樺崟';
+        if (!this.currentInfo.orderDetailList || this.currentInfo.orderDetailList.length === 0) {
+          this.addOrderDetailList()
+        }
+        this.title = '缂栬緫瀹㈡埛妫�娴嬪鎵樹功';
         this.detailDialogVisible = true
       }).catch(err => {
         console.log('err----', err)
@@ -531,9 +600,12 @@
     // 鏌ョ湅
     handleLook(row) {
       this.operationType = 'view'
-      getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => {
+      getInspectionOrderOne({
+        inspectionOrderId: row.inspectionOrderId,
+        batchNo: row.batchNo || undefined
+      }).then(res => {
         this.currentInfo = res.data
-        this.title = '鏌ョ湅妫�楠屽鎵樺崟';
+        this.title = '鏌ョ湅瀹㈡埛妫�娴嬪鎵樹功';
         this.detailDialogVisible = true
       }).catch(err => {
         console.log('err----', err)
@@ -541,12 +613,18 @@
     },
     // 鍒犻櫎
     deleteOrder(row) {
-      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
+      const isBatch = row.memberCount > 1
+      this.$confirm(isBatch
+        ? `璇ュ鎵樺崟涓烘壒閲忓鎵橈紝鍏�${row.memberCount}涓牱鍝侊紝鍒犻櫎灏嗘暣鎵瑰垹闄わ紝鏄惁缁х画?`
+        : '姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        delInspectionOrder({ inspectionOrderId: row.inspectionOrderId }).then(res => {
+        delInspectionOrder({
+          inspectionOrderId: row.inspectionOrderId,
+          batchNo: row.batchNo || undefined
+        }).then(res => {
           this.$message.success('鍒犻櫎鎴愬姛锛�');
           this.refreshTable();
         });
@@ -565,6 +643,10 @@
     // 濮旀墭鍗曚笅杞�
     orderFormDown() {
       let url = this.download.fileUrl;
+      if (!url) {
+        this.$message.warning('璇ュ鎵樺崟鏆傛棤濮旀墭鎶ュ憡鏂囦欢锛岃鍏堜笂浼�');
+        return;
+      }
       const link = document.createElement('a');
       link.href = this.javaApi + url;
       link.target = '_blank';
@@ -574,10 +656,13 @@
     // 濮旀墭鎶ュ憡涓嬭浇
     orderReportDown() {
       this.outLoading = true;
-      exportInspectionOrder({ inspectionOrderId: this.download.inspectionOrderId }).then(res => {
+      exportInspectionOrder({
+        inspectionOrderId: this.download.inspectionOrderId,
+        batchNo: this.download.batchNo || undefined
+      }).then(res => {
         this.outLoading = false;
         const blob = new Blob([res], { type: 'application/octet-stream' });
-        this.$download.saveAs(blob, '妫�楠屽鎵樺崟.docx')
+        this.$download.saveAs(blob, '瀹㈡埛妫�娴嬪鎵樹功.docx')
 
       }).catch(err => {
         this.outLoading = false;
@@ -621,4 +706,36 @@
 }
 </script>
 
-<style scoped></style>
+<style scoped>
+.tables {
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: collapse;
+  font-size: 14px;
+  color: #303133;
+}
+
+.tables td {
+  padding: 6px 8px;
+  vertical-align: middle;
+  word-break: break-all;
+  line-height: 1.6;
+}
+
+.tables :deep(.el-input),
+.tables :deep(.el-date-editor) {
+  width: 100%;
+}
+
+.tables :deep(.el-input__inner) {
+  font-size: 14px;
+}
+
+.tables :deep(.el-radio-group) {
+  flex-wrap: wrap;
+}
+
+.tables :deep(.el-radio) {
+  margin-right: 12px;
+}
+</style>
diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index aeae70a..1895bc9 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -225,6 +225,34 @@
             </el-col>
           </el-row>
         </el-form>
+        <div v-if="batchOrderMode" class="batch-sample">
+          <div class="batch-sample__header">
+            <div>
+              <div class="batch-sample__title">鎵归噺鏍峰搧</div>
+              <div class="batch-sample__tip">鍏堝湪涓婃柟濉啓涓�涓牱鍝佺殑妫�娴嬩緷鎹�佹牱鍝佸悕绉般�佹牱鍝佺紪鍙枫�佹牱鍝佹暟閲忋�佹牱鍝佸瑙傦紝鐐瑰嚮鈥滄坊鍔犳牱鍝佲�濆姞鍏ュ垪琛紱鎻愪氦鍚庢瘡涓牱鍝佺敓鎴愪竴寮犲鎵樺崟锛屾楠屽鎵樺崟涓悎骞朵负涓�寮犲鎵樹功銆�</div>
+            </div>
+            <el-button type="primary" plain size="small" @click="addBatchSample">娣诲姞鏍峰搧</el-button>
+          </div>
+          <el-table :data="batchSampleList" size="small" border class="batch-sample__table"
+                    empty-text="鏆傛湭娣诲姞鏍峰搧銆傛湭娣诲姞鏃舵寜涓婃柟鍗曚釜鏍峰搧淇℃伅涓嬪崟">
+            <el-table-column type="index" label="搴忓彿" width="60" align="center"/>
+            <el-table-column prop="sampleView" label="鏍峰搧鍚嶇О" min-width="120" show-overflow-tooltip/>
+            <el-table-column prop="sampleCode" label="鏍峰搧缂栧彿" min-width="120" show-overflow-tooltip/>
+            <el-table-column label="妫�娴嬩緷鎹�" min-width="160" show-overflow-tooltip>
+              <template #default="scope">{{ scope.row.sample }}</template>
+            </el-table-column>
+            <el-table-column prop="testQuantity" label="鏍峰搧鏁伴噺" width="110" align="center"/>
+            <el-table-column prop="sampleStatus" label="鏍峰搧澶栬" min-width="110" show-overflow-tooltip/>
+            <el-table-column label="鍘熷璁板綍妯℃澘" min-width="180" show-overflow-tooltip>
+              <template #default="scope">{{ batchTemplateNames(scope.row) }}</template>
+            </el-table-column>
+            <el-table-column label="鎿嶄綔" width="80" align="center">
+              <template #default="scope">
+                <el-button link type="danger" size="small" @click="removeBatchSample(scope.$index)">鍒犻櫎</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
         <el-form v-if="false" ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="108px"
                  label-position="right">
           <el-row>
@@ -837,6 +865,7 @@
   selectStandardTreeList2, getFileList, delFile
 } from "@/api/business/rawMaterialOrder";
 import {
+  addBatchNewJuInsOrder,
   addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
   getQuarterOnOrder, judgeNotSpotCheckOrder, selectInsOrderTemplateById,
   updateInsOrder,
@@ -876,6 +905,10 @@
     newJuLaboratoryList() {
       return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
     },
+    // 浠呮柊澧炲鎵樺崟鏃舵敮鎸佹壒閲忔牱鍝侊紝缂栬緫/鏌ョ湅鍘嗗彶鍗曚粛鎸夊崟鏍峰搧澶勭悊
+    batchOrderMode() {
+      return this.active == 1 && !this.isEdit
+    },
   },
   dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
   data() {
@@ -890,6 +923,7 @@
       fileList: [],
       deleteFileIds: [],
       boundTemplateList: [],
+      batchSampleList: [],
       templateBindingLoading: false,
       sampleSelectionList: [],//鏍峰搧琛ㄦ牸閫変腑鏁版嵁
       editTable: [],
@@ -1152,7 +1186,7 @@
       this.orderLoadVersion++
       const defaults = this.$options.data.call(this)
       const fields = ['addObj', 'sample', 'sampleCode', 'fileList', 'deleteFileIds',
-        'boundTemplateList', 'sampleSelectionList', 'editTable', 'sampleList',
+        'boundTemplateList', 'batchSampleList', 'sampleSelectionList', 'editTable', 'sampleList',
         'productList', 'productList0', 'productIds', 'sampleIds', 'selectTree',
         'selectTreeNode', 'selectiveEcho', 'specialStandardMethod', 'model',
         'standardMethodListId', 'template', 'templates', 'addObj1', 'totalArr',
@@ -1470,6 +1504,10 @@
         this.$refs.newJuOrder.validateField('sampleDate');
         return;
       }
+      if (this.batchOrderMode && this.batchSampleList.length > 0) {
+        this.saveBatchOrder()
+        return
+      }
       if (this.addObj.standardTreeId) {
         if (!this.addObj.sample || !this.addObj.company || !this.addObj.orderType || !this.addObj.testQuantity) {
           this.$message.error('璇峰~鍐欐娴嬩緷鎹�佸鎵樺崟浣嶃�佹楠岀被鍒拰鏍峰搧鏁伴噺');
@@ -1767,6 +1805,123 @@
           this.saveLoad = false
         })
       }
+    },
+    addBatchSample() {
+      if (!this.addObj.standardTreeId) {
+        this.$message.error('璇烽�夋嫨妫�娴嬩緷鎹�')
+        return
+      }
+      if (this.templateBindingLoading) {
+        this.$message.warning('鍘熷璁板綍妯℃澘鍔犺浇涓紝璇风◢鍊�')
+        return
+      }
+      if (this.boundTemplateList.length === 0) {
+        this.$message.error('鎵�閫夋娴嬩緷鎹湭缁戝畾鍘熷璁板綍妯℃澘')
+        return
+      }
+      const sampleCode = (this.sampleCode || '').trim()
+      if (sampleCode.length < 2) {
+        this.$message.error('璇峰~鍐欐牱鍝佺紪鍙凤紙鑷冲皯2浣嶏級')
+        return
+      }
+      if (!this.addObj.testQuantity) {
+        this.$message.error('璇峰~鍐欐牱鍝佹暟閲�')
+        return
+      }
+      if (this.batchSampleList.some(item => item.sampleCode === sampleCode)) {
+        this.$message.error('璇ユ牱鍝佺紪鍙峰凡鍦ㄦ壒閲忓垪琛ㄤ腑')
+        return
+      }
+      this.batchSampleList.push({
+        sampleCode,
+        sampleView: this.addObj.sampleView || this.addObj.sample || '',
+        testQuantity: this.addObj.testQuantity,
+        sampleStatus: this.addObj.sampleStatus,
+        sample: this.addObj.sample,
+        standardTreeId: this.addObj.standardTreeId,
+        templateList: this.boundTemplateList.map((item, index) => ({
+          templateId: item.templateId,
+          name: item.name,
+          sort: index
+        }))
+      })
+      // 娓呯┖褰撳墠鏍峰搧淇℃伅锛屾柟渚跨户缁綍鍏ヤ笅涓�涓牱鍝�
+      this.sampleCode = ''
+      this.addObj.sample = null
+      this.addObj.sampleView = ''
+      this.addObj.standardTreeId = null
+      this.addObj.testQuantity = ''
+      this.addObj.sampleStatus = ''
+      this.boundTemplateList = []
+      this.selectTreeNode = null
+      this.selectTree = null
+    },
+    removeBatchSample(index) {
+      this.batchSampleList.splice(index, 1)
+    },
+    batchTemplateNames(row) {
+      return (row.templateList || []).map(item => item.name).join('銆�')
+    },
+    saveBatchOrder() {
+      if (this.addObj.standardTreeId || (this.sampleCode || '').trim()) {
+        this.$message.error('涓婃柟杩樻湁鏈姞鍏ュ垪琛ㄧ殑鏍峰搧锛岃鍏堢偣鍑烩�滄坊鍔犳牱鍝佲�濇垨娓呯┖鍚庡啀鎻愪氦')
+        return
+      }
+      if (!this.addObj.company || !this.addObj.orderType) {
+        this.$message.error('璇峰~鍐欏鎵樺崟浣嶅拰妫�楠岀被鍒�')
+        return
+      }
+      if (this.addObj.subcontractType == null || this.addObj.sampleDisposal == null
+        || this.addObj.resultEvaluation == null || this.addObj.reportDelivery == null) {
+        this.$message.error('璇烽�夋嫨鍒嗗寘鍐呭銆佹牱鍝佸缃�佸缁撴灉璇勪环鍜屾姤鍛婁氦浠樻柟寮�')
+        return
+      }
+      if (this.addObj.subcontractType === 1 && !this.addObj.subcontractCompany) {
+        this.$message.error('鍒嗗寘鍐呭涓烘湁鏃讹紝璇峰~鍐欏垎鍖呭崟浣嶄俊鎭�')
+        return
+      }
+      if (this.addObj.reportDelivery === 2 && (!this.addObj.reportAddress || !this.addObj.reportReceiver)) {
+        this.$message.error('鎶ュ憡浜や粯鏂瑰紡涓哄揩閫掓椂锛岃濉啓鎶ュ憡瀵勯�佸湴鍧�鍜屾敹浠朵汉鍙婄數璇�')
+        return
+      }
+      const emptyTemplateRow = this.batchSampleList.find(item => !item.templateList || item.templateList.length === 0)
+      if (emptyTemplateRow) {
+        this.$message.error(`鏍峰搧 ${emptyTemplateRow.sampleCode} 娌℃湁鍘熷璁板綍妯℃澘锛岃鍒犻櫎鍚庨噸鏂版坊鍔燻)
+        return
+      }
+      this.saveLoad = true
+      const insOrder = {
+        ...this.addObj,
+        productionDate: this.addObj.productionDate === '/' || !this.addObj.productionDate
+          ? null : this.addObj.productionDate,
+        typeSource: -1,
+      }
+      delete insOrder.createTime
+      delete insOrder.temperature
+      delete insOrder.humidity
+      const payload = {
+        insOrder,
+        sampleList: this.batchSampleList.map(item => ({
+          sampleCode: item.sampleCode,
+          sampleView: item.sampleView,
+          testQuantity: item.testQuantity,
+          sampleStatus: item.sampleStatus,
+          standardTreeId: item.standardTreeId,
+          templateList: item.templateList.map((tpl, index) => ({templateId: tpl.templateId, sort: index}))
+        }))
+      }
+      addBatchNewJuInsOrder(payload).then(async res => {
+        const fileSuccess = await this.saveOrderFiles(res.data)
+        this.saveLoad = false
+        if (!fileSuccess) {
+          this.$message.warning('璁㈠崟宸蹭繚瀛橈紝閮ㄥ垎闄勪欢澶勭悊澶辫触锛岃鍒板鎵樺崟璇︽儏閲嶆柊涓婁紶')
+        } else {
+          this.$message.success('宸叉彁浜�')
+        }
+        this.closeOpenPage()
+      }).catch(e => {
+        this.saveLoad = false
+      })
     },
     handleFileChange(file, fileList) {
       if (file.size > 200 * 1024 * 1024) {
@@ -2808,6 +2963,38 @@
   color: var(--lims-text-3);
 }
 
+/* 鎵归噺鏍峰搧锛氳〃鍗曚笅鏂圭殑寰呮彁浜ゆ牱鍝佸垪琛� */
+.batch-sample {
+  margin-top: 4px;
+  padding-top: 16px;
+  border-top: 1px dashed var(--el-border-color);
+}
+
+.batch-sample__header {
+  display: flex;
+  align-items: flex-start;
+  justify-content: space-between;
+  gap: 16px;
+  margin-bottom: 12px;
+}
+
+.batch-sample__title {
+  font-size: 14px;
+  font-weight: bold;
+  color: var(--lims-text);
+}
+
+.batch-sample__tip {
+  margin-top: 4px;
+  font-size: 12px;
+  color: var(--lims-text-3);
+  line-height: 1.5;
+}
+
+.batch-sample__table {
+  margin-bottom: 16px;
+}
+
 /* 濮旀墭鍗曚俊鎭細椤堕儴鎿嶄綔鏍� */
 .order-header {
   display: flex;

--
Gitblit v1.9.3