|
@@ -301,11 +301,15 @@ const open = async (type: string, id?: number) => {
|
|
|
alert(id)
|
|
|
}
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
+let devName = "";
|
|
|
const openFill = (deviceCategoryId?:number,deviceId?:number,deptId?:number,deviceName?:string,deviceCode?:string) =>{
|
|
|
queryParams.deviceCategoryId = deviceCategoryId;
|
|
|
queryParams.deptId = deptId;
|
|
|
queryParams.deviceCode = deviceCode;
|
|
|
queryParams.deviceName = deviceName;
|
|
|
+ if(queryParams.deviceName=='生产日报'){
|
|
|
+ devName = '生产日报';
|
|
|
+ }
|
|
|
queryParams.deviceId = deviceId;
|
|
|
getAttrList();
|
|
|
}
|
|
@@ -358,18 +362,22 @@ const getAttrList = async () => {
|
|
|
/** 获取填写信息保存到后台*/
|
|
|
const getFillInfo = async () => {
|
|
|
try {
|
|
|
- // 检查必填字段
|
|
|
- const emptyFields = attrList.value.filter(item => {
|
|
|
- // 只检查非disabled的字段
|
|
|
- return !(item.isCollection===1||fillStatus === '1') &&
|
|
|
- (item.fillContent === undefined || item.fillContent === '');
|
|
|
- });
|
|
|
-
|
|
|
- if (emptyFields.length > 0) {
|
|
|
- ElMessage.error(t('operationFillForm.fill'));
|
|
|
- return;
|
|
|
+
|
|
|
+ if(devName!='生产日报'){
|
|
|
+ // 检查必填字段
|
|
|
+ const emptyFields = attrList.value.filter(item => {
|
|
|
+ // 只检查非disabled的字段
|
|
|
+ return !(item.isCollection===1||fillStatus === '1') &&
|
|
|
+ (item.fillContent === undefined || item.fillContent === '');
|
|
|
+ });
|
|
|
+
|
|
|
+ if (emptyFields.length > 0) {
|
|
|
+ ElMessage.error(t('operationFillForm.fill'));
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
attrList2.value = attrList.value.concat(attrList1.value)
|
|
|
|
|
|
attrList2.value.forEach(function (item,index){
|