Переглянути джерело

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_vue

wangxin 1 рік тому
батько
коміт
7628a820fd

+ 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'
+	})
 }

+ 3 - 0
src/views/business/daywork/index.vue

@@ -377,6 +377,9 @@ function getProcess() {
   //工序下拉框
   getProcessList({
     technologicalProcessId: queryItemParams.value.technologicalProcessId,
+    isWasteRecycling:currentDaywork.value.isWasteRecycling,
+    isAmend:currentDaywork.value.isAmend,
+    lotId:currentDaywork.value.lotId
   }).then((res) => {
     processList.value = res.data;
   });

+ 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>
 
 		<!-- 渲染数据区 -->

+ 20 - 15
src/views/business/reviseBath/lotFormParticulars.vue

@@ -348,21 +348,26 @@ function handleStandardProcess(processId) {
 //批废
 function handlelotWaste(lotCode) {
   if (lot.value.daywork) {
-    let row = {};
-    row.lotCode = lotCode;
-    row.lotId = lot.value.id;
-    row.companyAlias = lot.value.productionPlanDetail.companyAlias;
-    row.productionPlanNo = lot.value.productionPlanDetail.productionPlanNo;
-    row.productDescription = lot.value.productionPlanDetail.productDescription;
-    row.technologyVersion = lot.value.technologyVersion;
-    row.productionQuantity = lot.value.productionQuantity;
-    row.createTime = lot.value.daywork.createTime;
-    row.id = lot.value.daywork.id;
-    row.isWaste = lot.value.isWaste;
-    row.deptName = lot.value.daywork.deptName;
-    row.temporaryProcessQualifiedNum =
-      lot.value.daywork.temporaryProcessQualifiedNum;
-    proxy.$refs.lotWasteDialogRef.open(row);
+    if (lot.value.daywork.status == 0) {
+      proxy.$modal.msgError("领料后未报工,暂时无法批废");
+    } else {
+      let row = {};
+      row.lotCode = lotCode;
+      row.lotId = lot.value.id;
+      row.companyAlias = lot.value.productionPlanDetail.companyAlias;
+      row.productionPlanNo = lot.value.productionPlanDetail.productionPlanNo;
+      row.productDescription =
+        lot.value.productionPlanDetail.productDescription;
+      row.technologyVersion = lot.value.technologyVersion;
+      row.productionQuantity = lot.value.productionQuantity;
+      row.createTime = lot.value.daywork.createTime;
+      row.id = lot.value.daywork.id;
+      row.isWaste = lot.value.isWaste;
+      row.deptName = lot.value.daywork.deptName;
+      row.temporaryProcessQualifiedNum =
+        lot.value.daywork.temporaryProcessQualifiedNum;
+      proxy.$refs.lotWasteDialogRef.open(row);
+    }
   } else {
     proxy.$modal.msgError("该批未投产,不能进行批废");
   }

+ 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')

+ 14 - 10
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,10 @@
           <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="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="categoryQuery.keyword" size="small" type="text" placeholder="关键字"
+                  <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;">
@@ -27,7 +28,7 @@
               </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 }">
@@ -47,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;">
@@ -60,7 +62,7 @@
             </div>
             <div class="el-table-container" :style="{ bottom: instructionTotal > 0 ? '35px' : '0' }">
               <el-table ref="employeeTable" v-loading="instructionLoading" row-key="id"
-                :data="currentCategory ? instructionList : []" size="small" border height="100%"
+                :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)">
@@ -71,7 +73,7 @@
                 <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>
@@ -136,7 +138,6 @@ const instructionList = ref([])
 const categoryLoading = ref(false)
 const instructionLoading = ref(false)
 const instructionTotal = ref(0)
-
 const currentCategory = ref(null)
 const selected = ref([])
 
@@ -166,6 +167,9 @@ function loadCategory() {
         proxy.$refs.categoryTable.setCurrentKey(currentCategory.value.id)
         handleCurrentCategoryChange(currentCategory.value)
       })
+    } else {
+      currentCategory.value = {}
+      instructionList.value = []
     }
   })
 }