Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

guoyujia 1 жил өмнө
parent
commit
7bc470ce13

+ 101 - 95
src/api/business/daywork.js

@@ -8,20 +8,28 @@ const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
  * @returns
  */
 export function listDaywork(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/list',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/list',
+		method: 'get',
+		params: query
+	})
 }
+export function listForOutsource(query) {
+	return request({
+		url: baseUrl + '/business/productionDaywork/listForOutsource',
+		method: 'get',
+		params: query
+	})
+}
+
 // 查询工序管理
-export function getDayworkProcessList (query) {
-    return request({
-      url: baseUrl + '/business/productionDaywork/getDayworkProcessList',
-      method: 'get',
-      params: query
-    })
-  }
+export function getDayworkProcessList(query) {
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDayworkProcessList',
+		method: 'get',
+		params: query
+	})
+}
 /**
  * 获取 计划查询的工段列表
  * @param {*} data
@@ -33,11 +41,11 @@ export function getDayworkProcessList (query) {
  * @returns
  */
 export function getDayworkInfo(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getDayworkInfo',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDayworkInfo',
+		method: 'get',
+		params: query
+	})
 }
 /**
  * 获取 计划查询的工段列表
@@ -45,11 +53,11 @@ export function getDayworkInfo(query) {
  * @returns
  */
 export function getDeptInfo(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getDeptInfo',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDeptInfo',
+		method: 'get',
+		params: query
+	})
 }
 /**
  * 获取 已生产批次 列表
@@ -57,11 +65,11 @@ export function getDeptInfo(query) {
  * @returns
  */
 export function getProducedLot(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getProducedLot',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getProducedLot',
+		method: 'get',
+		params: query
+	})
 }
 /**
  * 获取 报工记录的工段
@@ -69,19 +77,19 @@ export function getProducedLot(query) {
  * @returns
  */
 export function getDeptList(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getDeptList',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDeptList',
+		method: 'get',
+		params: query
+	})
 }
 
 /** 查询批次信息 */
 export function getDayworkItemProcess(id) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getDayworkItemProcess/' + id,
-        method: 'get',
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDayworkItemProcess/' + id,
+		method: 'get'
+	})
 }
 
 /**
@@ -90,11 +98,11 @@ export function getDayworkItemProcess(id) {
  * @returns
  */
 export function listDayworkItem(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/listItem',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/listItem',
+		method: 'get',
+		params: query
+	})
 }
 
 /**
@@ -103,11 +111,11 @@ export function listDayworkItem(query) {
  * @returns
  */
 export function checkUseEquipment(data) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/checkUseEquipment',
-        method: 'post',
-        data: data
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/checkUseEquipment',
+		method: 'post',
+		data: data
+	})
 }
 
 /**
@@ -116,45 +124,43 @@ export function checkUseEquipment(data) {
  * @returns
  */
 export function updateItem(data) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/updateItem',
-        method: 'post',
-        data: data
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/updateItem',
+		method: 'post',
+		data: data
+	})
 }
 
-
 /**
  * 查询是否为首序
  */
 export function getIsFirstOrder(dayworkId) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getIsFirstOrder/' + dayworkId,
-        method: 'get',
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getIsFirstOrder/' + dayworkId,
+		method: 'get'
+	})
 }
 
-
 /**
  * 获取报工批次工序列表
  * @param {*} data
  * @returns
  */
 export function getProcessList(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getProcessList',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getProcessList',
+		method: 'get',
+		params: query
+	})
 }
 
 // 查询工段资源组能够选择的设备
 export function getEquipmentInfo(query) {
-    return request({
-        url: baseUrl + '/business/detail/equipmentInfo',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/detail/equipmentInfo',
+		method: 'get',
+		params: query
+	})
 }
 
 /**
@@ -163,11 +169,11 @@ export function getEquipmentInfo(query) {
  * @returns
  */
 export function getDayworkItemRejectList(query) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/getDayworkItemRejectList',
-        method: 'get',
-        params: query
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/getDayworkItemRejectList',
+		method: 'get',
+		params: query
+	})
 }
 
 /**
@@ -176,39 +182,39 @@ export function getDayworkItemRejectList(query) {
  * @returns
  */
 export function updateDayworkItemInfo(data) {
-    return request({
-        url: baseUrl + '/business/productionDaywork/updateDayworkItemInfo',
-        method: 'post',
-        data: data
-    })
+	return request({
+		url: baseUrl + '/business/productionDaywork/updateDayworkItemInfo',
+		method: 'post',
+		data: data
+	})
 }
 
 export function addDaywork(data) {
-    return request({
-        url: baseUrl + '/business/daywork',
-        method: 'post',
-        data: data
-    })
+	return request({
+		url: baseUrl + '/business/daywork',
+		method: 'post',
+		data: data
+	})
 }
 
 export function getDaywork(id) {
-    return request({
-        url: baseUrl + '/business/daywork/' + id,
-        method: 'get'
-    })
+	return request({
+		url: baseUrl + '/business/daywork/' + id,
+		method: 'get'
+	})
 }
 
 export function updateDaywork(data) {
-    return request({
-        url: baseUrl + '/business/daywork',
-        method: 'put',
-        data: data
-    })
+	return request({
+		url: baseUrl + '/business/daywork',
+		method: 'put',
+		data: data
+	})
 }
 
 export function delDaywork(id) {
-    return request({
-        url: baseUrl + '/business/daywork/' + id,
-        method: 'delete'
-    })
+	return request({
+		url: baseUrl + '/business/daywork/' + id,
+		method: 'delete'
+	})
 }

+ 47 - 206
src/views/business/daywork/index.vue

@@ -3,241 +3,90 @@
     <!-- 左侧区域 -->
     <section class="list-part-container" style="flex: 3">
       <!-- 搜索区 -->
-      <el-form
-        class="list-search-container"
-        :model="queryDayworkParams"
-        ref="queryRef"
-        :inline="true"
-        style="margin-right: 0px"
-      >
+      <el-form class="list-search-container" :model="queryDayworkParams" ref="queryRef" :inline="true"
+        style="margin-right: 0px">
         <el-form-item class="section-title" label="生产批次" />
         <el-form-item label="生产计划单号:">
-          <el-input
-            placeholder="请输入生产计划单号/批次号"
-            v-model.trim="queryDayworkParams.productionPlanNo"
-            @keydown.enter.prevent
-            clearable
-            style="width: 200px"
-          />
+          <el-input placeholder="请输入生产计划单号/批次号" v-model.trim="queryDayworkParams.productionPlanNo"
+            @keydown.enter.prevent clearable style="width: 200px" />
         </el-form-item>
         <el-form-item label="产品描述:">
-          <el-input
-            placeholder="请输入产品描述"
-            v-model.trim="queryDayworkParams.productDescription"
-            @keydown.enter.prevent
-            clearable
-            style="width: 130px"
-          />
+          <el-input placeholder="请输入产品描述" v-model.trim="queryDayworkParams.productDescription" @keydown.enter.prevent
+            clearable style="width: 130px" />
         </el-form-item>
         <el-form-item class="section-title" label="请选择当前工段:">
-          <el-select-v2
-            v-model="queryDayworkParams.deptId"
-            :options="deptList"
-            placeholder="请选择工段"
-            style="width: 140px"
-            @change="handleDeptChange"
-          />
+          <el-select-v2 v-model="queryDayworkParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 140px"
+            @change="handleDeptChange" />
         </el-form-item>
         <el-form-item style="margin-left: 0">
-          <el-button
-            type="info"
-            icon="Search"
-            :disabled="deptList.length === 0"
-            @click="handleQuery"
-            >搜索
+          <el-button type="info" icon="Search" :disabled="deptList.length === 0" @click="handleQuery">搜索
           </el-button>
         </el-form-item>
       </el-form>
       <div class="el-table-container">
         <div class="el-table-inner-container">
-          <el-table
-            ref="dayworkTable"
-            :data="dayworkList"
-            v-loading="dayworkLoading"
-            highlight-current-row
-            height="100%"
-            @current-change="handleDayworkCurrentChange"
-          >
-            <el-table-column
-              label="客户简称"
-              prop="companyAlias"
-              width="120"
-              align="center"
-            />
-            <el-table-column
-              label="生产计划单号"
-              prop="productionPlanNo"
-              width="100"
-              align="center"
-            />
-            <el-table-column label="批次号" prop="lotCode" align="center">
+          <el-table ref="dayworkTable" :data="dayworkList" v-loading="dayworkLoading" highlight-current-row
+            height="100%" @current-change="handleDayworkCurrentChange">
+            <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
+            <el-table-column label="生产计划单号" prop="productionPlanNo" width="100" align="center" />
+            <el-table-column label="批次号" min-width="120" prop="lotCode" align="center">
               <template #default="scope">
-                <el-button
-                  link
-                  type="primary"
-                  v-hasPermi="['business:productionPlan:query']"
-                  @click="handleColumnClick(scope.row)"
-                  ><span>{{ scope.row.lotCode }}</span></el-button
-                >
+                <el-button link type="primary" v-hasPermi="['business:productionPlan:query']"
+                  @click="handleColumnClick(scope.row)"><span>{{ scope.row.lotCode }}</span></el-button>
               </template>
             </el-table-column>
-            <el-table-column
-              label="产品描述"
-              prop="productDescription"
-              align="center"
-            />
-            <el-table-column
-              label="图纸版本"
-              prop="technologyVersion"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="投产量"
-              prop="productionQuantity"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="下达日期"
-              prop="createTime"
-              width="100"
-              align="center"
-            >
+            <el-table-column label="产品描述" prop="productDescription" align="center" />
+            <el-table-column label="图纸版本" prop="technologyVersion" width="60" align="center" />
+            <el-table-column label="投产量" prop="productionQuantity" width="60" align="center" />
+            <el-table-column label="下达日期" prop="createTime" width="100" align="center">
               <template #default="scope">
                 <span>{{
-                  proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
-                }}</span>
+        proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
+      }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              label="报工总时长"
-              prop="totalWorkingHours"
-              width="150"
-              align="center"
-            />
+            <el-table-column label="报工总时长" prop="totalWorkingHours" width="150" align="center" />
           </el-table>
         </div>
       </div>
       <!-- 分页 -->
-      <pagination
-        v-show="total > 0"
-        :total="total"
-        v-model:page="queryDayworkParams.pageNum"
-        v-model:limit="queryDayworkParams.pageSize"
-        @pagination="getDayworks"
-      />
+      <pagination v-show="total > 0" :total="total" v-model:page="queryDayworkParams.pageNum"
+        v-model:limit="queryDayworkParams.pageSize" @pagination="getDayworks" />
     </section>
     <!-- 右侧区域 -->
     <section class="list-part-container" style="flex: 2">
       <el-form class="list-search-container" :inline="true">
         <el-form-item class="section-title" label="报工信息" />
-        <el-form-item
-          class="section-title"
-          label="请选择工序:"
-          prop="processId"
-        >
-          <el-select-v2
-            v-model="queryItemParams.processId"
-            clearable
-            :options="processList"
-            placeholder="请选择工序"
-            style="width: 100%"
-            @change="handleProcessChange"
-          />
+        <el-form-item class="section-title" label="请选择工序:" prop="processId">
+          <el-select-v2 v-model="queryItemParams.processId" clearable :options="processList" placeholder="请选择工序"
+            style="width: 100%" @change="handleProcessChange" />
         </el-form-item>
       </el-form>
 
       <div class="el-table-container">
         <div class="el-table-inner-container">
-          <el-table
-            :data="dayworkItemList"
-            v-loading="dayworkItemLoading"
-            height="100%"
-          >
-            <el-table-column
-              label="操作者"
-              prop="nickName"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="工序名称"
-              prop="processAlias"
-              align="center"
-            />
-            <el-table-column
-              label="投产量"
-              prop="prodNum"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="合格数"
-              prop="qualifiedNum"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="废品数"
-              prop="rejectNum"
-              width="60"
-              align="center"
-            />
-            <el-table-column
-              label="开始时间"
-              prop="startTime"
-              width="160"
-              align="center"
-            />
-            <el-table-column
-              label="结束时间"
-              prop="endTime"
-              width="160"
-              align="center"
-            />
-            <el-table-column
-              label="总工时"
-              prop="workingHours"
-              width="160"
-              align="center"
-            />
-            <el-table-column
-              label="生产状态"
-              prop="status"
-              width="100"
-              align="center"
-            >
+          <el-table :data="dayworkItemList" v-loading="dayworkItemLoading" height="100%">
+            <el-table-column label="操作者" prop="nickName" width="60" align="center" />
+            <el-table-column label="工序名称" prop="processAlias" align="center" />
+            <el-table-column label="投产量" prop="prodNum" width="60" align="center" />
+            <el-table-column label="合格数" prop="qualifiedNum" width="60" align="center" />
+            <el-table-column label="废品数" prop="rejectNum" width="60" align="center" />
+            <el-table-column label="开始时间" prop="startTime" width="160" align="center" />
+            <el-table-column label="结束时间" prop="endTime" width="160" align="center" />
+            <el-table-column label="总工时" prop="workingHours" width="160" align="center" />
+            <el-table-column label="生产状态" prop="status" width="100" align="center">
               <template #default="scope">
                 <dict-tag :options="daywork_status" :value="scope.row.status" />
               </template>
             </el-table-column>
-            <el-table-column
-              fixed="right"
-              label="操作"
-              align="center"
-              width="70px"
-            >
+            <el-table-column fixed="right" label="操作" align="center" width="70px">
               <template #default="scope">
-                <el-button
-                  v-if="
-                    scope.row.deptProcessStatus &&
-                    (scope.row.status == 2 || scope.row.status == 3) &&
-                    scope.row.processId == latestProcessId
-                  "
-                  link
-                  type="warning"
-                  icon="Edit"
-                  @click="handleUpdateDayworkItem(scope.row)"
-                  >编辑
+                <el-button v-if="scope.row.deptProcessStatus &&
+        (scope.row.status == 2 || scope.row.status == 3) &&
+        scope.row.processId == latestProcessId
+        " link type="warning" icon="Edit" @click="handleUpdateDayworkItem(scope.row)">编辑
                 </el-button>
-                <el-button
-                  v-else
-                  link
-                  type="primary"
-                  icon="View"
-                  @click="handleCheckDayworkItem(scope.row)"
-                  >查看
+                <el-button v-else link type="primary" icon="View" @click="handleCheckDayworkItem(scope.row)">查看
                 </el-button>
               </template>
             </el-table-column>
@@ -245,19 +94,11 @@
         </div>
       </div>
       <!-- 分页 -->
-      <pagination
-        v-show="itemTotal > 0"
-        :total="itemTotal"
-        v-model:page="queryItemParams.pageNum"
-        v-model:limit="queryItemParams.pageSize"
-        @pagination="getDayworkItems"
-      />
+      <pagination v-show="itemTotal > 0" :total="itemTotal" v-model:page="queryItemParams.pageNum"
+        v-model:limit="queryItemParams.pageSize" @pagination="getDayworkItems" />
     </section>
     <!-- 报工信息表单 -->
-    <daywork-item-form
-      ref="dayworkItemRef"
-      @handleSaveSuccess="handleGetDayworkItems"
-    />
+    <daywork-item-form ref="dayworkItemRef" @handleSaveSuccess="handleGetDayworkItems" />
   </div>
 </template>
 

+ 24 - 12
src/views/business/inspectionInstruction/index.vue

@@ -6,22 +6,28 @@
 			<el-form class="list-search-container" ref="queryRef" :inline="true">
 				<el-form-item class="section-title" label="检查指导项类别" />
 				<el-form-item>
-					<el-button type="primary" icon="Plus" @click="handleShowCategoryDialog(null)" v-hasPermi="['business:inspectionInstruction:add']">新增 </el-button>
+					<el-button type="primary" icon="Plus" @click="handleShowCategoryDialog(null)"
+						v-hasPermi="['business:inspectionInstruction:add']">新增 </el-button>
 				</el-form-item>
 			</el-form>
 			<!-- 列表区 -->
 			<div class="el-table-container">
 				<div class="el-table-inner-container">
-					<el-tree ref="categoryTable" v-loading="categoryLoading" :data="categoryList" :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" default-expand-all node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
+					<el-tree ref="categoryTable" v-loading="categoryLoading" :data="categoryList"
+						:props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" default-expand-all
+						node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
 						<template #default="{ node, data }">
 							<div style="display: flex; width: 100%; justify-content: space-between">
 								<span>
-									<span v-if="data.parentId === '0'" style="display: inline-block; width: 20px">{{ getNodeIndex(data) }}. </span>
+									<span v-if="data.parentId === '0'" style="display: inline-block; width: 20px">{{ getNodeIndex(data)
+										}}. </span>
 									<span>{{ node.label }}</span>
 								</span>
 								<span>
-									<el-button link type="warning" icon="Edit" @click="handleShowCategoryDialog(data)" v-hasPermi="['business:inspectionInstruction:edit']">编辑 </el-button>
-									<el-button link type="danger" icon="Delete" @click="handleDeleteCategory(data)" v-hasPermi="['business:inspectionInstruction:remove']">删除 </el-button>
+									<el-button link type="warning" icon="Edit" @click="handleShowCategoryDialog(data)"
+										v-hasPermi="['business:inspectionInstruction:edit']">编辑 </el-button>
+									<el-button link type="danger" icon="Delete" @click="handleDeleteCategory(data)"
+										v-hasPermi="['business:inspectionInstruction:remove']">删除 </el-button>
 								</span>
 							</div>
 						</template>
@@ -35,11 +41,14 @@
 			<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
 				<el-form-item class="section-title" label="检查指导项管理" />
 				<el-form-item label="检查标准:">
-					<el-input placeholder="请输入关键字" clearable style="width: 180px" v-model.trim="queryParams.code" @keydown.enter.prevent />
+					<el-input placeholder="请输入关键字" clearable style="width: 180px" v-model.trim="queryParams.keyword"
+						@keydown.enter.prevent />
 				</el-form-item>
 				<el-form-item>
-					<el-button type="info" icon="Search" :disabled="categoryList.length === 0" @click="handleQueryInstruction"> 搜索 </el-button>
-					<el-button type="primary" icon="Plus" @click="handleShowInstructionDialog(null)" v-hasPermi="['business:inspectionInstruction:add']">新增 </el-button>
+					<el-button type="info" icon="Search" :disabled="categoryList.length === 0" @click="handleQueryInstruction"> 搜索
+					</el-button>
+					<el-button type="primary" icon="Plus" @click="handleShowInstructionDialog(null)"
+						v-hasPermi="['business:inspectionInstruction:add']">新增 </el-button>
 				</el-form-item>
 			</el-form>
 
@@ -52,8 +61,10 @@
 						<el-table-column prop="equipment" label="检查设备" width="200" align="center" />
 						<el-table-column label="操作" width="180" align="center">
 							<template #default="scope">
-								<el-button link type="warning" icon="Edit" @click="handleShowInstructionDialog(scope.row)" v-hasPermi="['business:inspectionInstruction:edit']">编辑 </el-button>
-								<el-button link type="danger" icon="Delete" @click="handleDeleteInstruction(scope.row)" v-hasPermi="['business:inspectionInstruction:remove']">删除 </el-button>
+								<el-button link type="warning" icon="Edit" @click="handleShowInstructionDialog(scope.row)"
+									v-hasPermi="['business:inspectionInstruction:edit']">编辑 </el-button>
+								<el-button link type="danger" icon="Delete" @click="handleDeleteInstruction(scope.row)"
+									v-hasPermi="['business:inspectionInstruction:remove']">删除 </el-button>
 							</template>
 						</el-table-column>
 					</el-table>
@@ -61,7 +72,8 @@
 			</div>
 
 			<!-- 分页 -->
-			<pagination v-show="instructionTotal > 0" :total="instructionTotal" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getInstructions" />
+			<pagination v-show="instructionTotal > 0" :total="instructionTotal" v-model:page="queryParams.pageNum"
+				v-model:limit="queryParams.pageSize" @pagination="getInstructions" />
 		</section>
 
 		<!-- 检查指导项目类别表单 -->
@@ -94,7 +106,7 @@ const data = reactive({
 		// 2:检查指导书
 		type: 2,
 		categoryId: '0',
-		standard: '',
+		keyword: '',
 		pageNum: 1,
 		pageSize: 10,
 	},

+ 24 - 12
src/views/business/inspectionStandard/index.vue

@@ -6,22 +6,28 @@
 			<el-form class="list-search-container" ref="queryRef" :inline="true">
 				<el-form-item class="section-title" label="分选标准类别" />
 				<el-form-item>
-					<el-button type="primary" icon="Plus" @click="handleShowCategoryDialog(null)" v-hasPermi="['business:inspectionStandard:add']">新增 </el-button>
+					<el-button type="primary" icon="Plus" @click="handleShowCategoryDialog(null)"
+						v-hasPermi="['business:inspectionStandard:add']">新增 </el-button>
 				</el-form-item>
 			</el-form>
 			<!-- 列表区 -->
 			<div class="el-table-container">
 				<div class="el-table-inner-container">
-					<el-tree ref="categoryTable" v-loading="categoryLoading" :data="categoryList" :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" default-expand-all node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
+					<el-tree ref="categoryTable" v-loading="categoryLoading" :data="categoryList"
+						:props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" default-expand-all
+						node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
 						<template #default="{ node, data }">
 							<div style="display: flex; width: 100%; justify-content: space-between">
 								<span>
-									<span v-if="data.parentId === '0'" style="display: inline-block; width: 20px">{{ getNodeIndex(data) }}. </span>
+									<span v-if="data.parentId === '0'" style="display: inline-block; width: 20px">{{ getNodeIndex(data)
+										}}. </span>
 									<span>{{ node.label }}</span>
 								</span>
 								<span>
-									<el-button link type="warning" icon="Edit" @click="handleShowCategoryDialog(data)" v-hasPermi="['business:inspectionStandard:edit']">编辑 </el-button>
-									<el-button link type="danger" icon="Delete" @click="handleDeleteCategory(data)" v-hasPermi="['business:inspectionStandard:remove']">删除 </el-button>
+									<el-button link type="warning" icon="Edit" @click="handleShowCategoryDialog(data)"
+										v-hasPermi="['business:inspectionStandard:edit']">编辑 </el-button>
+									<el-button link type="danger" icon="Delete" @click="handleDeleteCategory(data)"
+										v-hasPermi="['business:inspectionStandard:remove']">删除 </el-button>
 								</span>
 							</div>
 						</template>
@@ -35,11 +41,14 @@
 			<el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
 				<el-form-item class="section-title" label="分选标准管理" />
 				<el-form-item label="检查标准:">
-					<el-input placeholder="请输入关键字" clearable style="width: 180px" v-model.trim="queryParams.code" @keydown.enter.prevent />
+					<el-input placeholder="请输入关键字" clearable style="width: 180px" v-model.trim="queryParams.keyword"
+						@keydown.enter.prevent />
 				</el-form-item>
 				<el-form-item>
-					<el-button type="info" icon="Search" :disabled="categoryList.length === 0" @click="handleQueryInstruction"> 搜索 </el-button>
-					<el-button type="primary" icon="Plus" @click="handleShowInstructionDialog(null)" v-hasPermi="['business:inspectionStandard:add']">新增 </el-button>
+					<el-button type="info" icon="Search" :disabled="categoryList.length === 0" @click="handleQueryInstruction"> 搜索
+					</el-button>
+					<el-button type="primary" icon="Plus" @click="handleShowInstructionDialog(null)"
+						v-hasPermi="['business:inspectionStandard:add']">新增 </el-button>
 				</el-form-item>
 			</el-form>
 
@@ -51,8 +60,10 @@
 						<el-table-column prop="standard" label="检查标准" align="center" />
 						<el-table-column label="操作" width="180" align="center">
 							<template #default="scope">
-								<el-button link type="warning" icon="Edit" @click="handleShowInstructionDialog(scope.row)" v-hasPermi="['business:inspectionStandard:edit']">编辑 </el-button>
-								<el-button link type="danger" icon="Delete" @click="handleDeleteInstruction(scope.row)" v-hasPermi="['business:inspectionStandard:remove']">删除 </el-button>
+								<el-button link type="warning" icon="Edit" @click="handleShowInstructionDialog(scope.row)"
+									v-hasPermi="['business:inspectionStandard:edit']">编辑 </el-button>
+								<el-button link type="danger" icon="Delete" @click="handleDeleteInstruction(scope.row)"
+									v-hasPermi="['business:inspectionStandard:remove']">删除 </el-button>
 							</template>
 						</el-table-column>
 					</el-table>
@@ -60,7 +71,8 @@
 			</div>
 
 			<!-- 分页 -->
-			<pagination v-show="instructionTotal > 0" :total="instructionTotal" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getInstructions" />
+			<pagination v-show="instructionTotal > 0" :total="instructionTotal" v-model:page="queryParams.pageNum"
+				v-model:limit="queryParams.pageSize" @pagination="getInstructions" />
 		</section>
 
 		<!-- 检查指导项目类别表单 -->
@@ -92,7 +104,7 @@ const data = reactive({
 	queryParams: {
 		// 1:分选标准
 		type: 1,
-		standard: '',
+		keyword: '',
 		categoryId: '0',
 		pageNum: 1,
 		pageSize: 10,

+ 2 - 1
src/views/business/lot/InBatchesDialog.vue

@@ -68,7 +68,8 @@
             <div style="display: flex; flex-direction: row;">
               <div style="line-height: 32px;">分批信息</div>
               <el-form-item label="分批数量">
-                <el-input-number v-model="baseLot.sparateNum" :controls="false" :max="10" step="1" step-strictly />
+                <el-input-number v-model="baseLot.sparateNum" :controls="false" :min="2" :max="10" step="1"
+                  step-strictly />
               </el-form-item>
               <el-form-item label-width="20px">
                 <el-button type="primary" @click="handleNumBlur">计算</el-button>

+ 228 - 57
src/views/business/lot/index.vue

@@ -1,33 +1,65 @@
 <template>
   <div class="page-container column-container">
     <!-- 搜索区 -->
-    <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true">
+    <el-form
+      class="list-search-container"
+      :model="queryParams"
+      ref="queryRef"
+      :inline="true"
+    >
       <el-form-item label="产品描述:">
-        <el-input placeholder="请输入产品描述" v-model.trim="queryParams.productDescription" style="width: 150px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入产品描述"
+          v-model.trim="queryParams.productDescription"
+          style="width: 150px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <el-form-item label="生产计划单号:">
-        <el-input placeholder="请输入生产计划单号" v-model.trim="queryParams.productionPlanNo" style="width: 150px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入生产计划单号"
+          v-model.trim="queryParams.productionPlanNo"
+          style="width: 150px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <!-- <el-form-item label="序号:">
         <el-input placeholder="请输入序号" v-model.trim="queryParams.lineNumber" style="width: 130px" clearable
           @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
       </el-form-item> -->
       <el-form-item label="批次号:">
-        <el-input placeholder="请输入批次号" v-model.trim="queryParams.lotCode" style="width: 130px" clearable
-          @keyup.enter="handleQuerydaywork" @keydown.enter.prevent />
+        <el-input
+          placeholder="请输入批次号"
+          v-model.trim="queryParams.lotCode"
+          style="width: 130px"
+          clearable
+          @keyup.enter="handleQuerydaywork"
+          @keydown.enter.prevent
+        />
       </el-form-item>
       <el-form-item label="工段:">
         <!-- <el-select-v2 v-model="queryParams.deptId" :options="deptList" placeholder="请选择工段" style="width: 140px" /> -->
-        <el-autocomplete v-model.trim="deptName" clearable :fetch-suggestions="queryDeptSearchAsync" placeholder="请选择工段"
-          @select="handleDeptSelect" style="width: 140px" @clear="handleClearDept">
+        <el-autocomplete
+          v-model.trim="deptName"
+          clearable
+          :fetch-suggestions="queryDeptSearchAsync"
+          placeholder="请选择工段"
+          @select="handleDeptSelect"
+          style="width: 140px"
+          @clear="handleClearDept"
+        >
           <template #default="{ item }">
-            <div style="
+            <div
+              style="
                 display: flex;
                 flex-direction: row;
                 justify-content: space-between;
-              ">
+              "
+            >
               <div class="name" style="font-size: 12px">
                 {{ item.deptName }}
               </div>
@@ -36,30 +68,67 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item label="标识:">
-        <el-select style="width: 160px" multiple v-model="queryParams.flags" collapse-tags collapse-tags-tooltip
-          clearable placeholder="请选择标识" @change="handleFlagChange">
-          <el-option v-for="item in is_identification" :key="item.value" :label="item.label"
-            :value="item.value"></el-option>
+        <el-select
+          style="width: 160px"
+          multiple
+          v-model="queryParams.flags"
+          collapse-tags
+          collapse-tags-tooltip
+          clearable
+          placeholder="请选择标识"
+          @change="handleFlagChange"
+        >
+          <el-option
+            v-for="item in is_identification"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="时间:">
-        <el-date-picker v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD" :editable="false"
-          :clearable="false" placeholder="请选择开始时间" style="width: 150px" @change="handleDateChange" />
+        <el-date-picker
+          v-model="queryParams.startTime"
+          type="date"
+          value-format="YYYY-MM-DD"
+          :editable="false"
+          :clearable="false"
+          placeholder="请选择开始时间"
+          style="width: 150px"
+          @change="handleDateChange"
+        />
         <span>To</span>
-        <el-date-picker v-model="queryParams.endTime" type="date" value-format="YYYY-MM-DD" :editable="false"
-          :clearable="false" placeholder="请选择结束时间" style="width: 150px" @change="handleDateChange" />
+        <el-date-picker
+          v-model="queryParams.endTime"
+          type="date"
+          value-format="YYYY-MM-DD"
+          :editable="false"
+          :clearable="false"
+          placeholder="请选择结束时间"
+          style="width: 150px"
+          @change="handleDateChange"
+        />
       </el-form-item>
       <el-form-item label="工序:">
         <!-- <el-select-v2 v-model="processAlias" :options="processList" placeholder="请选择工序" style="width: 140px"
           @change="handleProcessChange" /> -->
-        <el-autocomplete v-model.trim="processAlias" clearable :fetch-suggestions="queryProcessSearchAsync"
-          placeholder="请选择工序" @select="handleProcessSelect" style="width: 140px" @clear="handleClearProcess">
+        <el-autocomplete
+          v-model.trim="processAlias"
+          clearable
+          :fetch-suggestions="queryProcessSearchAsync"
+          placeholder="请选择工序"
+          @select="handleProcessSelect"
+          style="width: 140px"
+          @clear="handleClearProcess"
+        >
           <template #default="{ item }">
-            <div style="
+            <div
+              style="
                 display: flex;
                 flex-direction: row;
                 justify-content: space-between;
-              ">
+              "
+            >
               <div class="name" style="font-size: 12px">
                 {{ item.label }}
               </div>
@@ -68,53 +137,148 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item>
-        <el-button type="info" icon="Search" @click="handleQuerydaywork">搜索</el-button>
+        <el-button type="info" icon="Search" @click="handleQuerydaywork"
+          >搜索</el-button
+        >
       </el-form-item>
       <div style="margin-top: 20px">
-        <el-button type="primary" @click="handleWasteRecycling"
+        <el-button
+          type="primary"
+          @click="handleWasteRecycling"
           :disabled="selections.length == 0 || selections.length > 1"
-          v-hasPermi="['business:lot:wasteRecycling']">添加废品回用</el-button>
-        <el-button :disabled="selections.length !== 1" type="primary" @click="showInBatch"
-          v-hasPermi="['business:lot:inBatch']">分批</el-button>
-        <el-button type="primary" :disabled="once" @click="handleOnceSingleChange"
-          v-hasPermi="['business:lot:onceSingleChange']">单批单改</el-button>
-        <el-button type="primary" :disabled="multi" @click="handleMultiSingleChange"
-          v-hasPermi="['business:lot:multiSingleChange']">多批单改</el-button>
+          v-hasPermi="['business:lot:wasteRecycling']"
+          >添加废品回用</el-button
+        >
+        <el-button
+          :disabled="selections.length !== 1"
+          type="primary"
+          @click="showInBatch"
+          v-hasPermi="['business:lot:inBatch']"
+          >分批</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="once"
+          @click="handleOnceSingleChange"
+          v-hasPermi="['business:lot:onceSingleChange']"
+          >单批单改</el-button
+        >
+        <el-button
+          type="primary"
+          :disabled="multi"
+          @click="handleMultiSingleChange"
+          v-hasPermi="['business:lot:multiSingleChange']"
+          >多批单改</el-button
+        >
       </div>
     </el-form>
     <!-- 列表区 -->
     <div class="el-table-container">
       <div class="el-table-inner-container">
-        <el-table ref="dayworkTable" v-loading="loading" row-key="lotId" @selection-change="handleSelectionChange"
-          height="100%" :data="lotList">
+        <el-table
+          ref="dayworkTable"
+          v-loading="loading"
+          row-key="lotId"
+          @selection-change="handleSelectionChange"
+          height="100%"
+          :data="lotList"
+        >
           <el-table-column type="selection" width="40" align="center" />
-          <el-table-column label="客户简称" prop="companyAlias" width="120" align="center" />
-          <el-table-column label="生产计划单号" width="100" prop="productionPlanNo" align="center" />
-          <el-table-column label="序号" width="60" prop="lineNumber" align="center" />
+          <el-table-column
+            label="客户简称"
+            prop="companyAlias"
+            width="120"
+            align="center"
+          />
+          <el-table-column
+            label="生产计划单号"
+            width="100"
+            prop="productionPlanNo"
+            align="center"
+          />
+          <el-table-column
+            label="序号"
+            width="60"
+            prop="lineNumber"
+            align="center"
+          />
 
-          <el-table-column label="批次号" prop="lotCode" align="center" min-width="140">
+          <el-table-column
+            label="批次号"
+            prop="lotCode"
+            align="center"
+            min-width="140"
+          >
             <template #default="scope">
-              <el-button link type="primary" @click="handleColumnClick(scope.row)"><span>{{ scope.row.lotCode
-                  }}</span></el-button>
+              <el-button
+                link
+                type="primary"
+                @click="handleColumnClick(scope.row)"
+                ><span>{{ scope.row.lotCode }}</span></el-button
+              >
             </template>
           </el-table-column>
-          <el-table-column label="产品描述" prop="productDescription" align="center" />
-          <el-table-column label="图纸版本" width="80" prop="technologyVersion" align="center" />
-          <el-table-column label="投产量" width="100" prop="productionQuantity" align="center" />
-          <el-table-column label="下达日期" prop="createTime" width="100" align="center">
+          <el-table-column
+            label="产品描述"
+            prop="productDescription"
+            align="center"
+          />
+          <el-table-column
+            label="图纸版本"
+            width="80"
+            prop="technologyVersion"
+            align="center"
+          />
+          <el-table-column
+            label="投产量"
+            width="100"
+            prop="productionQuantity"
+            align="center"
+          />
+          <el-table-column
+            label="下达日期"
+            prop="createTime"
+            width="100"
+            align="center"
+          >
             <template #default="scope">
               <span>{{
-      proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
-    }}</span>
+                proxy.moment(scope.row.createTime).format("YYYY-MM-DD")
+              }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="当前工段" width="100" prop="deptName" align="center" />
-          <el-table-column label="当前工序" width="120" prop="processAlias" align="center" />
+          <el-table-column
+            label="当前工段"
+            width="100"
+            prop="deptName"
+            align="center"
+          />
+          <el-table-column
+            label="当前工序"
+            width="120"
+            prop="processAlias"
+            align="center"
+          />
           <el-table-column label="标识" width="300" align="center">
             <template #default="scope">
-              <el-tag v-if="scope.row.isWaste == 1" class="spacing" type="danger">{{ "批废" }}</el-tag>
-              <el-tag v-if="scope.row.isAmend == 1" class="spacing" type="danger">{{ "工艺修改" }}</el-tag>
-              <el-tag v-if="scope.row.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
+              <el-tag
+                v-if="scope.row.isWaste == 1"
+                class="spacing"
+                type="danger"
+                >{{ "批废" }}</el-tag
+              >
+              <el-tag
+                v-if="scope.row.isAmend == 1"
+                class="spacing"
+                type="danger"
+                >{{ "工艺修改" }}</el-tag
+              >
+              <el-tag
+                v-if="scope.row.isWasteRecycling == 1"
+                class="spacing"
+                type="primary"
+                >{{ "废品回用" }}</el-tag
+              >
             </template>
           </el-table-column>
           <el-table-column label="母批号" prop="fromCode" align="center" />
@@ -122,9 +286,16 @@
       </div>
     </div>
     <!-- 分页 -->
-    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
-      v-model:limit="queryParams.pageSize" @pagination="getLot" />
-    <waste-recycling-dialog ref="wasteRecyclingDialogRef"></waste-recycling-dialog>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getLot"
+    />
+    <waste-recycling-dialog
+      ref="wasteRecyclingDialogRef"
+    ></waste-recycling-dialog>
     <InBatchesDialog ref="inBatchesDialogRef" :getList="handleQuerydaywork" />
     <once-change ref="onceChangeRef" @handleSaveSuccess="getLot()" />
     <multi-change ref="multiChangeRef" @handleSaveSuccess="getLot()" />
@@ -262,7 +433,7 @@ function getLot() {
   loading.value = true;
   getLotList(queryParams.value).then((res) => {
     if (res.code == 200) {
-      console.log(res)
+      console.log(res);
       lotList.value = res.rows;
       total.value = res.total;
       loading.value = false;
@@ -428,8 +599,8 @@ const handleClearDept = () => {
   queryParams.value.deptId = null;
 };
 const handleFlagChange = (selection) => {
-  console.log(selection)
-}
+  console.log(selection);
+};
 onMounted(() => {
   getDept();
 });

+ 163 - 0
src/views/business/outsource/DialogProcesses.vue

@@ -0,0 +1,163 @@
+<template>
+	<el-dialog title="添加工序" v-model="visible" width="800px" height="400px" @close="close" append-to-body draggable>
+		<el-form ref="dialogForm" :model="queryParams" :inline="true" style="padding-top: 16px">
+			<el-form-item label="工序名称:" prop="processAlias" label-width="104">
+				<el-input
+					v-model.trim="queryParams.productDescription"
+					type="text"
+					@keydown.enter.prevent
+					style="width: 160px"
+					placeholder="请输入关键字"
+					:clearable="true"
+					@keyup.enter="handleSearch"
+				/>
+			</el-form-item>
+			<el-form-item label-width="20px">
+				<el-button type="info" icon="Search" @click="handleSearch">搜索</el-button>
+			</el-form-item>
+		</el-form>
+
+		<el-table
+			ref="dialogTable"
+			:data="productList"
+			size="small"
+			v-loading="loading"
+			border
+			height="370px"
+			@selection-change="handleSelectionChange"
+		>
+			<el-table-column type="selection" width="40" align="center" />
+			<el-table-column label="序号" width="56" align="center" prop="processStepNumber" />
+			<el-table-column label="工序名称" align="center" prop="lotCode" width="96" />
+		</el-table>
+		<!-- 分页 -->
+		<pagination
+			v-show="total > 0"
+			:total="total"
+			v-model:page="queryParams.pageNum"
+			v-model:limit="queryParams.pageSize"
+			@pagination="getList"
+		/>
+		<template #footer>
+			<div class="dialog-footer">
+				<el-button type="primary" icon="Check" :disabled="selections.length === 0" @click="handleMultipleSelected">
+					确 定
+				</el-button>
+				<el-button type="danger" icon="Close" @click="close">取 消</el-button>
+			</div>
+		</template>
+	</el-dialog>
+</template>
+<script setup>
+/**
+ * 需要多选,确定后带回至发货明细中,并且会组合成一个英文逗号分割的字符串
+ * 逻辑
+ * 0、数据来源:根据当前明细对应的daywork_id,找到这个daywork尚未完成的工序。
+ * 		思路:
+ * 		1)先找到这个daywork对应的daywork_item,查找status >= 4,并且是外协的那一条记录
+ * 		2)这条记录中,记录了process_id,这个工序就是外协之前完成的工序,需要到当前daywork对应的标准工艺中查询所有工序
+ *    3)将未完成的工序找出来,可以根据process_id对应的工序的【工序序号】,比这个序号大的,就是未完成的工序。
+ * 		4)这里要注意的是:废品回用、单批单改的工艺,不是标准工艺,要从另外一个表中获得。需要将工序查询分在2个私有方法中实现。避免混淆。
+ *
+ * 1、发货明细每条都对应一个从表,记录该外协产品需要外协的工序,这个从表是不在前端展示的,但要保存到数据库中
+ * 2、选择的工序,在对应的发货明细中,以英文逗号分割的形式存储在当前明细的processNames字段中,
+ *    在form页面中的ref=【dialogProcessesRef】的对话框:multiple-selected="handleMultipleSelectedProcesses"
+ *    中查看
+ * 3、后端 BizOutsourcedOrderController,要保存的数据:
+ * 	 【biz_outsourced_order】
+ *   【biz_outsourced_order_detail】
+ *   【biz_outsourced_order_detail_process】
+ * 4、外协单做完后,需要做外协报工,这个部分的功能是给外协商使用,是一个新的前端工程,需要用到的数据:
+ * 	 【biz_outsourced_order】
+ *   【biz_outsourced_order_detail】
+ *   【biz_outsourced_order_detail_process】
+ * 		外协商要看到,是什么产品,什么工序,多少数量
+ */
+import { listForOutsource } from '@/api/business/daywork'
+const { proxy } = getCurrentInstance()
+/** 字典数组区 */
+const { process_status } = proxy.useDict('process_status')
+/** 工序变量 */
+const total = ref(0)
+const props = defineProps({
+	multipleSelected: {
+		type: Function,
+		default: null
+	},
+	supplierId: {
+		type: String,
+		default: ''
+	}
+})
+
+const { multipleSelected, supplierId } = toRefs(props)
+const productList = ref([])
+const visible = ref(false)
+const loading = ref(false)
+const queryParams = ref({
+	existingDayworkIds: [],
+	deptCode: '170000',
+	// 是否看所有产品【0:看全部产品,1:只看该外协商配置的产品】
+	isSupplierProducts: 0,
+	supplierId: '',
+	productDescription: '',
+	pageNum: 1,
+	pageSize: 10
+})
+const selections = ref([])
+
+/**
+ * 对话框打开 事件
+ */
+function open(existingDayworkIds) {
+	visible.value = true
+	queryParams.value.existingDayworkIds = existingDayworkIds
+	getList()
+}
+
+/**
+ * 对话框关闭 事件
+ */
+function close() {
+	proxy.$refs.dialogForm.resetFields()
+	proxy.$refs.dialogTable.clearSelection()
+	queryParams.value.pageNum = 1
+	visible.value = false
+}
+
+/**
+ * 加载数据
+ */
+function getList() {
+	loading.value = true
+	queryParams.value.supplierId = props.supplierId
+	listForOutsource(queryParams.value).then((res) => {
+		productList.value = res.rows
+		total.value = res.total
+		loading.value = false
+	})
+}
+
+/**
+ * 列表checkbox列选择 事件
+ */
+function handleSelectionChange(selection) {
+	selections.value = selection
+}
+
+/**  搜索 事件 */
+function handleSearch() {
+	getList()
+}
+/** 多选事件 */
+function handleMultipleSelected() {
+	if (multipleSelected.value) {
+		multipleSelected.value(selections.value)
+	}
+	close()
+}
+
+defineExpose({
+	open
+})
+</script>

+ 18 - 9
src/views/business/outsource/DialogProducts.vue

@@ -1,9 +1,9 @@
 <template>
 	<el-dialog title="添加产品" v-model="visible" width="800px" height="400px" @close="close" append-to-body draggable>
 		<el-form ref="dialogForm" :model="queryParams" :inline="true" style="padding-top: 16px">
-			<el-form-item label="产品描述:" prop="description" label-width="104">
+			<el-form-item label="产品描述:" prop="productDescription" label-width="104">
 				<el-input
-					v-model.trim="queryParams.description"
+					v-model.trim="queryParams.productDescription"
 					type="text"
 					@keydown.enter.prevent
 					style="width: 160px"
@@ -12,7 +12,11 @@
 					@keyup.enter="handleSearch"
 				/>
 			</el-form-item>
-			<el-form-item v-if="supplierId !== '' && supplierId !== '0'" label="只看外协商配置的产品:" prop="description">
+			<el-form-item
+				v-if="supplierId !== '' && supplierId !== '0'"
+				label="只看外协商配置的产品:"
+				prop="isSupplierProducts"
+			>
 				<el-switch
 					v-model="queryParams.isSupplierProducts"
 					active-text="是"
@@ -37,8 +41,10 @@
 		>
 			<el-table-column type="selection" width="40" align="center" />
 			<el-table-column type="index" label="行号" width="50" align="center" />
-			<el-table-column label="料号" align="center" prop="productCode" width="120" />
-			<el-table-column label="产品描述" align="center" prop="description" />
+			<el-table-column label="批次号" align="center" prop="lotCode" width="96" />
+			<el-table-column label="料号" align="center" prop="productCode" width="96" />
+			<el-table-column label="产品描述" align="center" prop="productDescription" />
+			<el-table-column label="箱号" align="center" prop="originalCarrier" width="220" />
 		</el-table>
 		<!-- 分页 -->
 		<pagination
@@ -59,7 +65,7 @@
 	</el-dialog>
 </template>
 <script setup>
-import { getProductsForOutsource } from '@/api/business/product'
+import { listForOutsource } from '@/api/business/daywork'
 const { proxy } = getCurrentInstance()
 /** 字典数组区 */
 const { process_status } = proxy.useDict('process_status')
@@ -81,10 +87,12 @@ const productList = ref([])
 const visible = ref(false)
 const loading = ref(false)
 const queryParams = ref({
+	existingDayworkIds: [],
+	deptCode: '170000',
 	// 是否看所有产品【0:看全部产品,1:只看该外协商配置的产品】
 	isSupplierProducts: 0,
 	supplierId: '',
-	description: '',
+	productDescription: '',
 	pageNum: 1,
 	pageSize: 10
 })
@@ -93,8 +101,9 @@ const selections = ref([])
 /**
  * 对话框打开 事件
  */
-function open() {
+function open(existingDayworkIds) {
 	visible.value = true
+	queryParams.value.existingDayworkIds = existingDayworkIds
 	getList()
 }
 
@@ -114,7 +123,7 @@ function close() {
 function getList() {
 	loading.value = true
 	queryParams.value.supplierId = props.supplierId
-	getProductsForOutsource(queryParams.value).then((res) => {
+	listForOutsource(queryParams.value).then((res) => {
 		productList.value = res.rows
 		total.value = res.total
 		loading.value = false

+ 79 - 32
src/views/business/outsource/form.vue

@@ -111,49 +111,63 @@
 			</div>
 			<div class="el-table-container">
 				<div class="el-table-inner-container">
-					<el-table v-loading="loading" :data="formatDetails" size="small" border height="100%">
-						<el-table-column label="批次号" align="center" prop="lotCode" width="120" />
-						<el-table-column label="产品描述" align="center" prop="supplierName" width="320" />
+					<el-table v-loading="loading" :data="form.details" size="small" border height="100%">
+						<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" />
 						<el-table-column
-							:label="form.packagingMethod === 0 ? '箱号' : '原箱号'"
+							:label="form.packagingMethod === '0' ? '箱号' : '原箱号'"
 							align="center"
-							prop="original_carrier"
+							prop="originalCarrier"
 							width="320"
 						/>
 						<el-table-column
-							v-if="form.packagingMethod === 1"
+							v-if="form.packagingMethod === '1'"
 							label="新箱号"
 							align="center"
 							prop="new_carrier"
 							width="320"
 						>
 							<template #default="scope">
-								<el-input v-if="editStatus" v-model="scope.row.originalCarrier" readonly placeholder="请选择新箱号">
+								<el-input v-if="editStatus" v-model="scope.row.newCarrier" readonly placeholder="请选择新箱号">
 									<template #append>
 										<el-button icon="Search" @click="handleShowDialogOutsourceCarriers" />
 									</template>
 								</el-input>
-								<span v-else>{{ scope.row.originalCarrier }}</span>
+								<span v-else>{{ scope.row.newCarrier }}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="外协工序" align="center" prop="new_carrier" width="320">
+							<template #default="scope">
+								<el-input v-if="editStatus" v-model="scope.row.processNames" readonly placeholder="请选择工序">
+									<template #append>
+										<el-button icon="Search" @click="handleShowDialogProcesses(scope.row)" />
+									</template>
+								</el-input>
+								<span v-else>{{ scope.row.processNames }}</span>
+							</template>
+						</el-table-column>
+						<el-table-column label="备注" align="center" prop="remark">
+							<template #default="scope">
+								<el-input v-if="editStatus" v-model="scope.row.remark" placeholder="备注" />
+								<span v-else>{{ scope.row.processNames }}</span>
 							</template>
 						</el-table-column>
-						<el-table-column label="备注" align="center" prop="remark" />
 						<el-table-column
 							v-if="editStatus"
 							label="操作"
 							align="center"
 							class-name="small-padding fixed-width"
-							width="144"
+							width="64"
 						>
 							<template #default="scope">
 								<el-button
-									link
+									circle
 									type="danger"
 									icon="Delete"
-									@click="handleDelete(scope.row)"
+									@click="handleDelete(scope.$index)"
 									v-hasPermi="['business:outsource:remove']"
-								>
-									删除
-								</el-button>
+								/>
 							</template>
 						</el-table-column>
 					</el-table>
@@ -168,12 +182,15 @@
 			:supplier-id="form.supplierId"
 			:multiple-selected="handleMultipleSelectedProducts"
 		/>
+		<!-- 工序选择 -->
+		<dialog-processes ref="dialogProcessesRef" :multiple-selected="handleMultipleSelectedProcesses" />
 	</el-drawer>
 </template>
 <script setup>
 import { getOrder, addOrder, updateOrder } from '@/api/business/outsourcedOrder'
 import dialogSuppliers from './DialogSuppliers'
 import dialogProducts from './DialogProducts'
+import dialogProcesses from './DialogProcesses'
 const { proxy } = getCurrentInstance()
 /** 父组件传参 */
 const props = defineProps({
@@ -201,25 +218,11 @@ const editStatus = ref(false)
 const isFullscreen = ref(false)
 const webHost = import.meta.env.VITE_APP_BASE_API
 const form = ref({})
-const formatDetails = ref([])
+// const formatDetails = ref([])
 const currentDetail = ref({})
 const rules = {
 	supplierName: [{ required: true, message: '外协商名称不能为空', trigger: 'blur' }]
 }
-const emptyDetail = ref({
-	id: null,
-	lotId: null,
-	dayworkId: null,
-	productId: null,
-	productDescription: null,
-	technologicalProcessId: null,
-	technologyVersion: null,
-	originalCarrier: null,
-	originalCarrierCount: null,
-	newCarrier: null,
-	newCarrierCount: null,
-	remark: null
-})
 
 /***********************  方法区  ****************************/
 /** 打开抽屉 */
@@ -252,6 +255,10 @@ function cancel() {
 	reset()
 }
 
+const handleDelete = (index) => {
+	form.value.details.splice(index, 1)
+}
+
 /** 表单重置 */
 function reset() {
 	form.value = {
@@ -297,19 +304,39 @@ const handleShowDialogSuppliers = () => {
 }
 // 外协商选择带回
 const handleSingleSelectedSupplier = (data) => {
+	console.log(data)
 	form.value.supplierId = data.id
 	form.value.supplierName = data.name
+	form.value.deliveryMethod = data.deliveryMethod.toString()
 }
 
 /***************************** 产品对话框相关 *****************************/
 // 打开产品选择对话框
 const handleShowDialogProducts = () => {
-	proxy.$refs.dialogProductsRef.open()
+	const dayworkIds = form.value.details.map((item) => item.dayworkId)
+	console.log(dayworkIds)
+	proxy.$refs.dialogProductsRef.open(dayworkIds)
 }
 // 产品选择带回
 const handleMultipleSelectedProducts = (selection) => {
 	selection.forEach((item) => {
-		const newDetail = {}
+		const newDetail = {
+			lotId: item.lotId,
+			lotCode: item.lotCode,
+			dayworkId: item.id,
+			productId: item.productId,
+			productDescription: item.productDescription,
+			technologicalProcessId: item.technologicalProcessId,
+			technologyVersion: item.technologyVersion,
+			originalCarrier: item.originalCarrier,
+			originalCarrierCount: item.originalCarrier.split(',').length,
+			newCarrier: '',
+			newCarrierCount: 0,
+			processNames: '',
+			remark: item.remark,
+			processes: []
+		}
+		console.log(newDetail)
 		form.value.details.push(newDetail)
 	})
 }
@@ -325,6 +352,26 @@ const handleMultipleSelectedOutsourceCarriers = (selection) => {
 	})
 }
 
+/***************************** 外协工序对话框相关 *****************************/
+// 打开外协工序选择对话框
+const handleShowDialogProcesses = (row) => {
+	currentDetail.value = row
+	proxy.$refs.dialogProcessesRef.open()
+}
+// 工序选择带回
+const handleMultipleSelectedProcesses = (selection) => {
+	const processNames = selection.map((item) => item.processAlias)
+	currentDetail.value.processNames = processNames
+	selection.forEach((item) => {
+		const newProcess = {
+			processId: item.processId,
+			processAlias: item.processAlias,
+			processStepNumber: item.processStepNumber
+		}
+		currentDetail.value.processes.push(newProcess)
+	})
+}
+
 /** 暴露给父组件的方法 */
 defineExpose({
 	open

+ 3 - 10
src/views/business/outsource/index.vue

@@ -52,15 +52,6 @@
 			<el-button type="primary" icon="Plus" @click="handleAdd" v-hasPermi="['business:outsource:add']">
 				新增
 			</el-button>
-			<el-button
-				type="success"
-				icon="Edit"
-				:disabled="single"
-				@click="handleUpdate"
-				v-hasPermi="['business:outsource:edit']"
-			>
-				修改
-			</el-button>
 			<el-button
 				type="danger"
 				icon="Delete"
@@ -70,10 +61,12 @@
 			>
 				删除
 			</el-button>
+			<!--
 			<el-button type="warning" icon="Download" @click="handleExport" v-hasPermi="['business:outsource:export']">
 				导出
 			</el-button>
-			<!--<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>-->
+			<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+			-->
 		</div>
 
 		<!-- 渲染数据区 -->

+ 62 - 138
src/views/business/reviseBath/lotFormParticulars.vue

@@ -1,12 +1,6 @@
 <template>
   <div v-if="!loading" class="page-container column-container">
-    <el-form
-      class="list-search"
-      style=""
-      :model="lot"
-      ref="queryRef"
-      :inline="true"
-    >
+    <el-form class="list-search" style="" :model="lot" ref="queryRef" :inline="true">
       <el-row style="margin-top: 10px">
         <el-form-item class="bold-large">
           <span>{{ "批次号:" }}</span>
@@ -14,20 +8,15 @@
         </el-form-item>
         <el-form-item>
           <el-tag class="spacing" :type="status(lot)">{{
-            statusText(lot)
-          }}</el-tag>
+    statusText(lot)
+  }}</el-tag>
           <el-tag v-if="lot.isWaste == 1" class="spacing" type="danger">{{
-            "报废"
-          }}</el-tag>
+    "报废"
+  }}</el-tag>
           <el-tag v-if="lot.isAmend == 1" class="spacing" type="danger">{{
-            "工艺修改"
-          }}</el-tag>
-          <el-tag
-            v-if="lot.isWasteRecycling == 1"
-            class="spacing"
-            type="primary"
-            >{{ "废品回用" }}</el-tag
-          >
+    "工艺修改"
+  }}</el-tag>
+          <el-tag v-if="lot.isWasteRecycling == 1" class="spacing" type="primary">{{ "废品回用" }}</el-tag>
         </el-form-item>
       </el-row>
 
@@ -73,8 +62,8 @@
         <el-col :span="6">
           <el-form-item label="领料部门" class="custom-label">
             <span>{{
-              lot.productionPlanDetail.requisitionDepartmentName
-            }}</span>
+    lot.productionPlanDetail.requisitionDepartmentName
+  }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="6">
@@ -104,49 +93,49 @@
         <el-col :span="4">
           <el-form-item label="炉号" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.furnaceNumber
-                ? lot.furnaceNoInfo.furnaceNumber
-                : "-"
-            }}</span>
+    lot.furnaceNoInfo.furnaceNumber
+      ? lot.furnaceNoInfo.furnaceNumber
+      : "-"
+  }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="厂家" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.factory ? lot.furnaceNoInfo.factory : "-"
-            }}</span>
+    lot.furnaceNoInfo.factory ? lot.furnaceNoInfo.factory : "-"
+  }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="牌号" class="custom-label">
             <span style="margin-left: 28px">{{
-              lot.furnaceNoInfo.brandNumber
-                ? lot.furnaceNoInfo.brandNumber
-                : "-"
-            }}</span>
+    lot.furnaceNoInfo.brandNumber
+      ? lot.furnaceNoInfo.brandNumber
+      : "-"
+  }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="规格" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.spec ? lot.furnaceNoInfo.spec : "-"
-            }}</span>
+    lot.furnaceNoInfo.spec ? lot.furnaceNoInfo.spec : "-"
+  }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="形状" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.shape ? lot.furnaceNoInfo.shape : "-"
-            }}</span>
+    lot.furnaceNoInfo.shape ? lot.furnaceNoInfo.shape : "-"
+  }}</span>
           </el-form-item>
         </el-col>
         <el-col :span="4">
           <el-form-item label="材料直径" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.diameter ? lot.furnaceNoInfo.diameter : "-"
-            }}</span>
+    lot.furnaceNoInfo.diameter ? lot.furnaceNoInfo.diameter : "-"
+  }}</span>
           </el-form-item>
         </el-col>
       </el-row>
@@ -154,20 +143,20 @@
         <el-col :span="4">
           <el-form-item label="原料编码" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.rawMaterialCode
-                ? lot.furnaceNoInfo.rawMaterialCode
-                : "-"
-            }}</span>
+    lot.furnaceNoInfo.rawMaterialCode
+      ? lot.furnaceNoInfo.rawMaterialCode
+      : "-"
+  }}</span>
           </el-form-item>
         </el-col>
 
         <el-col :span="4">
           <el-form-item label="来料日期" class="custom-label">
             <span>{{
-              lot.furnaceNoInfo.incomingDate
-                ? lot.furnaceNoInfo.incomingDate
-                : "-"
-            }}</span>
+    lot.furnaceNoInfo.incomingDate
+      ? lot.furnaceNoInfo.incomingDate
+      : "-"
+  }}</span>
           </el-form-item>
         </el-col>
 
@@ -175,10 +164,10 @@
           <el-form-item label="材质1" class="custom-label">
             <span style="margin-left: 28px">
               {{
-                lot.furnaceNoInfo.firstTechnicalRequirement
-                  ? lot.furnaceNoInfo.firstTechnicalRequirement
-                  : "-"
-              }}
+    lot.furnaceNoInfo.firstTechnicalRequirement
+      ? lot.furnaceNoInfo.firstTechnicalRequirement
+      : "-"
+  }}
             </span>
           </el-form-item>
         </el-col>
@@ -186,10 +175,10 @@
           <el-form-item label="材质2" class="custom-label">
             <span>
               {{
-                lot.furnaceNoInfo.secondTechnicalRequirement
-                  ? lot.furnaceNoInfo.secondTechnicalRequirement
-                  : "-"
-              }}
+    lot.furnaceNoInfo.secondTechnicalRequirement
+      ? lot.furnaceNoInfo.secondTechnicalRequirement
+      : "-"
+  }}
             </span>
           </el-form-item>
         </el-col>
@@ -197,115 +186,49 @@
     </el-form>
     <div style="padding: 16px">
       <span style="font-weight: bold; font-size: 18px">工艺路线</span>
-      <el-button
-        v-if="showVerify(true, 'business:lot:onceSingleChange')"
-        type="primary"
-        style="float: right; margin-left: 10px"
-        @click="handleOnceSingleChange"
-      >
+      <el-button v-if="showVerify(true, 'business:lot:onceSingleChange')" type="primary"
+        style="float: right; margin-left: 10px" @click="handleOnceSingleChange">
         单批单改
       </el-button>
-      <el-button
-        v-if="showVerify(true, 'business:lot:inBatch')"
-        type="primary"
-        style="float: right; margin-left: 10px"
-        @click="handleSplit()"
-      >
+      <el-button v-if="showVerify(true, 'business:lot:inBatch')" type="primary" style="float: right; margin-left: 10px"
+        @click="handleSplit()">
         分批
       </el-button>
-      <el-button
-        v-if="showVerify(true, 'business:lot:waste')"
-        :disabled="lot.isWaste == 1"
-        type="danger"
-        style="float: right; margin-left: 10px"
-        @click="handlelotWaste(route.params.lotCode)"
-      >
+      <el-button v-if="showVerify(true, 'business:lot:waste')" :disabled="lot.isWaste == 1" type="danger"
+        style="float: right; margin-left: 10px" @click="handlelotWaste(route.params.lotCode)">
         批废
       </el-button>
-      <el-button
-        v-if="showVerify(lot.isAmend == 1, 'business:lot:standard')"
-        type="primary"
-        style="float: right; margin-left: 10px"
-        @click="handleStandardProcess(lot.technologicalProcessId)"
-      >
+      <el-button v-if="showVerify(lot.isAmend == 1, 'business:lot:standard')" type="primary"
+        style="float: right; margin-left: 10px" @click="handleStandardProcess(lot.technologicalProcessId)">
         查看标准工艺
       </el-button>
     </div>
     <div class="el-table-container">
       <div class="el-table-inner-container">
         <el-table height="95%" :data="processDetails">
-          <el-table-column
-            type="index"
-            label="行号"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="工序名称"
-            prop="processAlias"
-            align="center"
-          ></el-table-column>
+          <el-table-column type="index" label="行号" align="center"></el-table-column>
+          <el-table-column label="工序名称" prop="processAlias" align="center"></el-table-column>
           <el-table-column label="状态" prop="status" align="center">
             <template #default="scope">
               <span>{{ getStatusText(scope.row.status) }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            label="投产量"
-            prop="investNum"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="合格量"
-            prop="qualifiedNum"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="废品量"
-            prop="abandonNum"
-            align="center"
-          ></el-table-column>
+          <el-table-column label="投产量" prop="investNum" align="center"></el-table-column>
+          <el-table-column label="合格量" prop="qualifiedNum" align="center"></el-table-column>
+          <el-table-column label="废品量" prop="abandonNum" align="center"></el-table-column>
         </el-table>
       </div>
     </div>
     <once-change ref="onceChangeRef" @handleSaveSuccess="init" />
     <lot-waste-dialog ref="lotWasteDialogRef" @handleSaveSuccess="init" />
-    <el-dialog
-      title="标准工序"
-      v-model="visible"
-      width="680px"
-      append-to-body
-      draggable
-    >
+    <el-dialog title="标准工序" v-model="visible" width="680px" append-to-body draggable>
       <div class="el-table-inner-container">
-        <el-table
-          style="height: 600px"
-          @selection-change="handleSelectionChange"
-          :data="processList"
-        >
-          <el-table-column
-            type="selection"
-            :selectable="checkSelectable"
-            width="50"
-            align="center"
-          />
-          <el-table-column
-            type="index"
-            label="序号"
-            width="50"
-            align="center"
-          ></el-table-column>
-          <el-table-column
-            label="工序名称"
-            prop="processAlias"
-            align="center"
-          />
+        <el-table style="height: 600px" @selection-change="handleSelectionChange" :data="processList">
+          <el-table-column type="selection" :selectable="checkSelectable" width="50" align="center" />
+          <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
+          <el-table-column label="工序名称" prop="processAlias" align="center" />
 
-          <el-table-column
-            label="工序编号"
-            prop="processStepNumber"
-            width="200"
-            align="center"
-          />
+          <el-table-column label="工序编号" prop="processStepNumber" width="200" align="center" />
         </el-table>
       </div>
     </el-dialog>
@@ -457,6 +380,7 @@ function handleSplit() {
   }
   inBatchesDialogRef.value.open({
     ...lot.value,
+    lotId: lot.value.id,
     companyAlias: lot.value.productionPlanDetail.companyAlias,
     productionPlanNo: lot.value.productionPlanDetail.productionPlanNo,
     productDescription: lot.value.productionPlanDetail.productDescription,

+ 1 - 1
src/views/business/supplier/form.vue

@@ -76,7 +76,7 @@ function reset() {
 		id: null,
 		mnemonicCode: '',
 		deliveryMethod: '',
-		lossLimit: '',
+		lossLimit: 0.0,
 		remark: ''
 	}
 	proxy.resetForm('formRef')

+ 32 - 11
src/views/dialog/InstructionChoiceDialog.vue

@@ -1,12 +1,12 @@
 <template>
-  <el-dialog :title="`添加${label}项目`" v-model="visible" width="800px" height="400px" @close="close" append-to-body
+  <el-dialog :title="`添加${label}项目`" v-model="visible" width="1400px" height="400px" @close="close" append-to-body
     draggable>
     <!-- <div slot="title" class="dialog-title-container">
       <span class="title-label"><i class="el-icon-document" /> 检查指导项目选择</span>
       <i class="el-icon-close" @click="close" />
     </div> -->
     <div v-if="multiple" class="form-btns-container" style="display: inline-block; line-height: 36px;">
-      <el-button type="success" size="small" @click="handleMultipleSelected">
+      <el-button type="success" size="default" @click="handleMultipleSelected">
         <i class="fa fa-floppy-o" aria-hidden="true" /> 确定选择
       </el-button>
     </div>
@@ -16,9 +16,19 @@
           <div class="page-container list-container">
             <div class="list-btns-container" style="padding-bottom: 12px; line-height: 30px;">
               <span class="title-label"><i class="el-icon-document" /> {{ label }}项目类别</span>
+              <el-form class="dialog-title-search-container" size="default" :inline="true" style="line-height: 30px;"
+                @submit.native.prevent>
+                <el-form-item label="搜索:" style="margin-bottom: 0;">
+                  <el-input v-model.trim="categoryQuery.keyword" size="default" type="text" placeholder="关键字"
+                    :clearable="true" style="width: 90px;" />
+                </el-form-item>
+                <el-form-item style="margin-bottom: 0;">
+                  <el-button type="success" icon="Search" @click="handleCategorySearch">搜索</el-button>
+                </el-form-item>
+              </el-form>
             </div>
             <div class="el-table-container">
-              <el-tree ref="categoryTable" v-loading="categoryLoading" :data="categories"
+              <el-tree ref="categoryTable" size="default" v-loading="categoryLoading" :data="categories"
                 :props="{ label: 'name', children: 'children' }" :expand-on-click-node="false" default-expand-all
                 node-key="id" highlight-current @node-click="handleCurrentCategoryChange">
                 <template #default="{ node, data }">
@@ -38,9 +48,10 @@
           <div class="page-container list-container">
             <div class="list-btns-container" style="padding-bottom: 12px;">
               <span class="title-label"><i class="el-icon-document" /> {{ label }}项目</span>
-              <el-form class="dialog-title-search-container" size="small" :inline="true" style="line-height: 30px;">
+              <el-form class="dialog-title-search-container" size="default" :inline="true" style="line-height: 30px;"
+                @submit.native.prevent>
                 <el-form-item label="搜索:" style="margin-bottom: 0;">
-                  <el-input v-model.trim="query.keyword" size="small" type="text" placeholder="关键字" :clearable="true"
+                  <el-input v-model.trim="query.keyword" size="default" type="text" placeholder="关键字" :clearable="true"
                     style="width: 90px;" />
                 </el-form-item>
                 <el-form-item style="margin-bottom: 0;">
@@ -50,19 +61,19 @@
               </el-form>
             </div>
             <div class="el-table-container" :style="{ bottom: instructionTotal > 0 ? '35px' : '0' }">
-              <el-table ref="employeeTable" v-loading="instructionLoading"
-                :data="currentCategory ? instructionList : []" size="small" border height="100%"
+              <el-table ref="employeeTable" v-loading="instructionLoading" row-key="id"
+                :data="currentCategory ? instructionList : []" size="default" border height="100%"
                 header-row-class-name="list-header-row" row-class-name="list-row"
                 @selection-change="handleSelectionChange"
                 @row-dblclick="(row) => multiple ? selectionRow(row) : handleSimpleSelected(row)">
                 <el-table-column v-if="multiple" type="selection" width="40" align="center"
-                  :selectable="selectableHandler" />
+                  :selectable="selectableHandler" :reserve-selection="true" />
                 <el-table-column type="index" label="序号" width="40" align="center" />
                 <el-table-column prop="standard" label="检查标准" align="center" />
                 <el-table-column prop="equipment" label="检查设备" width="200" align="center" />
                 <el-table-column v-if="!multiple" label="操作" width="40" align="center">
                   <template #default="scope">
-                    <el-button :disabled="!selectableHandler(scope.row, scope.$index)" type="success" size="small"
+                    <el-button :disabled="!selectableHandler(scope.row, scope.$index)" type="success" size="default"
                       icon="el-icon-finished" circle @click="handleSimpleSelected(scope.row)" />
                   </template>
                 </el-table-column>
@@ -115,10 +126,13 @@ const visible = ref(false)
 const query = ref({
   type: props.type,
   categoryId: '0',
-  keywords: '',
+  keyword: '',
   pageSize: 20,
   pageNum: 1
 })
+const categoryQuery = ref({
+  keyword: ''
+})
 const categories = ref([])
 const instructionList = ref([])
 const categoryLoading = ref(false)
@@ -145,7 +159,7 @@ function handleMultipleSelected() {
 }
 function loadCategory() {
   categoryLoading.value = true
-  listCategory({ type: props.type }).then((res) => {
+  listCategory({ ...categoryQuery.value, type: props.type }).then((res) => {
     categoryLoading.value = false
     categories.value = res.rows
     if (categories.value.length > 0) {
@@ -154,10 +168,17 @@ function loadCategory() {
         proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id)
         handleCurrentCategoryChange(currentCategory.value)
       })
+    } else {
+      currentCategory.value = {}
+      instructionList.value = []
     }
   })
 }
 
+function handleCategorySearch() {
+  loadCategory()
+}
+
 function loadInstruction() {
   instructionLoading.value = true
   query.value.categoryId = currentCategory.value.id