Merge remote-tracking branch 'origin/main'

# Conflicts:
#	Web/src/views/basics-date/matter/component/editClassifyOpenAccess.vue
#	Web/src/views/basics-date/unit/index.vue
main
ljh 2024-07-04 23:31:47 +08:00
parent 755dba17cf
commit 495d66bc20
7 changed files with 812 additions and 663 deletions

View File

@ -5,6 +5,7 @@ enum Api {
UpdateReportDetailTable = '/api/reportDetailTable/update',
PageReportDetailTable = '/api/reportDetailTable/page',
DetailReportDetailTable = '/api/reportDetailTable/detail',
UpdateStateReportDetailTable = '/api/reportDetailTable/UpdateState',
}
// 增加汇报单详情
@ -47,4 +48,12 @@ export const detailReportDetailTable = (id: any) =>
data: { id },
});
// 审核汇报单
export const updateStateReportDetailTable = (params?: any) =>
request({
url: Api.UpdateStateReportDetailTable,
method: 'post',
data: params,
});

View File

@ -166,6 +166,7 @@
</template>
<script lang="ts" setup="" name="matter">
import {ElMessageBox, ElMessage, ElTable} from "element-plus";
import { auth } from '/@/utils/authFunction';
@ -177,7 +178,6 @@
listMaterialsClassify,
} from "/@/api/main/materialClassify";
import {ref} from "vue";
const currentRow = ref();
const singleTableRef = ref<InstanceType<typeof ElTable>>();
const showAdvanceQueryUI = ref(false);

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,69 @@
<span>{{ props.title }}</span>
</div>
</template>
<el-form label-width="auto" >
<el-row :gutter="35">
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="名称" >
<el-select v-model="ruleReportForm.materialsId" placeholder="请选择" clearable @change="materialsChange" disabled>
<el-option :label="item.name" :value="item.id" v-for="item, index in materials"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="单位">
<el-input v-model="ruleReportForm.unit" maxlength="32" show-word-limit clearable disabled/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="批次" prop="batch">
<el-input v-model="ruleReportForm.batch" placeholder="请输入批次" maxlength="32" show-word-limit clearable disabled/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="单号">
<el-input v-model="ruleReportForm.oddNumber" placeholder="请输入单号" maxlength="32" show-word-limit clearable disabled/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="业务日期" >
<el-date-picker v-model="ruleReportForm.startDate" type="date" placeholder="生产日期" disabled/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产类型" prop="productType" :rules="[{ required: true, message: '生产类型不能为空', trigger: 'blur' }]">
<el-select v-model="ruleReportForm.productType" placeholder="请选择" clearable disabled>
<el-option label="普通生产" value= '普通生产' />
<el-option label="返工生产" value= '返工生产' />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产线" prop="productionLine" >
<el-select v-model="ruleReportForm.productionLine" placeholder="请选择" clearable disabled>
<el-option :label="item.name" :value="item.name" v-for="item, index in productionLines"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="计划生产数量" prop="productCount" >
<el-input-number v-model="ruleReportForm.productCount" placeholder="请输入计划生产数量" clearable disabled/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
<el-form-item label="备注" prop="remarks" >
<el-input v-model="ruleReportForm.remarks" clearable disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div>
<el-tabs v-model="activeName" class="demo-tabs" :key="key">
<el-tab-pane label="条码信息" name="条码信息">
<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
<el-form :model="queryParams" ref="queryForm" labelWidth="90">
<el-row>
@ -26,6 +88,7 @@
</el-col>
</el-row>
</el-form>
</el-card>
<el-table
:data="ruleForm"
@ -50,7 +113,24 @@
</template>
</el-table-column> -->
</el-table>
</el-tab-pane>
<el-tab-pane label="操作信息" name="操作信息">
<el-row>
<el-col :span="8">
<el-form-item label="创建人" >
<el-input v-model="ruleReportForm.createUserName" disabled clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="修改人" >
<el-input v-model="ruleReportForm.updateUserName" disabled clearable />
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="cancel"> </el-button>
@ -78,26 +158,28 @@
default: "",
},
});
const activeName = ref('条码信息')
//
const emit = defineEmits(["reloadTable"]);
const isShowDialog = ref(false);
const ruleReportForm = ref<any>([]);
const ruleForm = ref<any>([]);
const tempRuleForm = ref<any>([]);
const loading = ref(false);
const queryParams = ref<any>({});
//
const openDialog = async (row: any) => {
// ruleForm.value = JSON.parse(JSON.stringify(row));
//console.log(row);
ruleForm.value=[];
if(typeof(row) === 'number'){
var res = await getPrintDetail(row);
if(typeof(row.id) === 'number'){
var res = await getPrintDetail(row.id);
ruleForm.value = res.data.result;
ruleReportForm.value = {...row};
}else{
ruleForm.value=row;
ruleForm.value=row.id;
}
//console.log(ruleForm.value);
tempRuleForm.value=ruleForm.value;

View File

@ -5,40 +5,82 @@
<el-form-item v-show="false">
<el-input v-model="ruleForm.id" />
</el-form-item>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="产品名称" prop="materialsId" :rules="[{ required: true, message: '产品名称不能为空', trigger: 'blur' }]">
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="单号" prop="oddNumber">
<el-input v-model="ruleForm.oddNumber" placeholder="请输入单号" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="计划开工日期" prop="productDate" :rules="[{ required: true, message: '计划开工日期不能为空', trigger: 'blur' }]">
<el-date-picker v-model="ruleForm.productDate" type="date" placeholder="生产日期" />
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="生产类型" prop="productType" :rules="[{ required: true, message: '生产类型不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.productType" placeholder="请选择" clearable>
<el-option label="普通生产" value= '普通生产' />
<el-option label="返工生产" value= '返工生产' />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="产品" prop="materialsId" >
<el-select v-model="ruleForm.materialsId" placeholder="请选择" clearable @change="materialsChange">
<el-option :label="item.name" :value="item.id" v-for="item, index in materials"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="产品编码" prop="productCodeNum">
<el-input v-model="ruleForm.productCodeNum" placeholder="请输入产品编码" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col> -->
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="单号" prop="oddNumber">
<el-input v-model="ruleForm.oddNumber" placeholder="请输入单号" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="状态" prop="state" >
<el-select v-model="ruleForm.state" placeholder="请选择" clearable>
<el-option label="待审核" :value= "0" />
<el-option label="已审核" :value= "1" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产类型" prop="productType">
<el-select v-model="ruleForm.productType" placeholder="请选择" clearable>
<el-option label="普通生产" value= '普通生产' />
<el-option label="返工生产" value= '返工生产' />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">-->
<!-- <el-form-item label="状态" prop="state" >-->
<!-- <el-select v-model="ruleForm.state" placeholder="请选择" clearable>-->
<!-- <el-option label="待审核" :value= "0" />-->
<!-- <el-option label="已审核" :value= "1" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="批次" prop="batch">
<el-input v-model="ruleForm.batch" placeholder="请输入批次" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="计划生产数量" prop="productCount" :rules="[{ required: true, message: '计划生产数量不能为空', trigger: 'blur' }]">
<el-input-number v-model="ruleForm.productCount" placeholder="请输入计划生产数量" clearable />
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="单位" prop="package" :rules="[{ required: true, message: '单位不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.package" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in units"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="12" :sm="12" :md="6" :lg="6" :xl="6" class="mb20">
<el-form-item label="基本单位" prop="baseUnit" :rules="[{ required: true, message: '基本单位不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.baseUnit" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in units"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产线" prop="productionLine" :rules="[{ required: true, message: '生产线不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.productionLine" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in productionLines"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产线编码" prop="codeNum">
@ -55,21 +97,17 @@
<el-input v-model="ruleForm.sourceNumber" placeholder="请输入源单号" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>-->
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产数量" prop="productCount">
<el-input-number v-model="ruleForm.productCount" placeholder="请输入生产数量" clearable />
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="入库数量" prop="putWarehouse">
<el-input-number v-model="ruleForm.putWarehouse" placeholder="请输入入库数量" clearable />
</el-form-item>
</el-col> -->
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="基本生产数量" prop="baseProductCount">
<el-input-number v-model="ruleForm.baseProductCount" placeholder="请输入基本生产数量" clearable />
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="基本生产数量" prop="baseProductCount">-->
<!-- <el-input-number v-model="ruleForm.baseProductCount" placeholder="请输入基本生产数量" clearable />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="基本入库数量" prop="basePutWarehouse">
<el-input-number v-model="ruleForm.basePutWarehouse" placeholder="请输入基本入库数量" clearable />
@ -84,32 +122,13 @@
</el-form-item>
</el-col>-->
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="批次" prop="batch">
<el-input v-model="ruleForm.batch" placeholder="请输入批次" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="包装单位" prop="package" :rules="[{ required: true, message: '包装单位不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.package" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in units"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="基本单位" prop="baseUnit" :rules="[{ required: true, message: '基本单位不能为空', trigger: 'blur' }]">
<el-select v-model="ruleForm.baseUnit" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in units"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="包装数量" prop="packageCount">
<el-input-number v-model="ruleForm.packageCount" placeholder="请输入包装数量" clearable />
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="包装数量" prop="packageCount">-->
<!-- <el-input-number v-model="ruleForm.packageCount" placeholder="请输入包装数量" clearable />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="采集失败数量" prop="gatherFalseCount">
<el-input-number v-model="ruleForm.gatherFalseCount" placeholder="请输入采集失败数量" clearable />
@ -117,54 +136,59 @@
</el-col> -->
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产线" prop="productionLine" >
<el-select v-model="ruleForm.productionLine" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in productionLines"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="班组" prop="teamGroup">
<el-select v-model="ruleForm.teamGroup" placeholder="请选择" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in teamOfGroups"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="操作工人" prop="operator">
<el-select v-model="ruleForm.operator" placeholder="请选择操作工人" clearable >
<el-option :label="item.name" :value="item.name" v-for="item, index in employees"
:key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="生产日期" prop="productDate">
<el-date-picker v-model="ruleForm.productDate" type="date" placeholder="生产日期" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="完工时间" prop="endDate">
<el-date-picker v-model="ruleForm.endDate" type="date" placeholder="完工时间" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="源单号" prop="sourceOddNumber">
<el-input v-model="ruleForm.sourceOddNumber" placeholder="请输入源单号" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
<el-form-item label="备注" prop="remarks">
<el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="32" show-word-limit clearable />
</el-form-item>
</el-col>
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="班组" prop="teamGroup">-->
<!-- <el-select v-model="ruleForm.teamGroup" placeholder="请选择" clearable >-->
<!-- <el-option :label="item.name" :value="item.name" v-for="item, index in teamOfGroups"-->
<!-- :key="index" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="操作工人" prop="operator">-->
<!-- <el-select v-model="ruleForm.operator" placeholder="请选择操作工人" clearable >-->
<!-- <el-option :label="item.name" :value="item.name" v-for="item, index in employees"-->
<!-- :key="index" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="完工时间" prop="endDate">-->
<!-- <el-date-picker v-model="ruleForm.endDate" type="date" placeholder="完工时间" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="源单号" prop="sourceOddNumber">-->
<!-- <el-input v-model="ruleForm.sourceOddNumber" placeholder="请输入源单号" maxlength="32" show-word-limit clearable />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!-- <el-form-item label="备注" prop="remarks">-->
<!-- <el-input v-model="ruleForm.remarks" placeholder="请输入备注" maxlength="32" show-word-limit clearable />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-tabs v-model="activeName" class="demo-tabs" >
<el-tab-pane label="操作信息" name="操作信息">
<el-row>
<el-col :span="8">
<el-form-item label="创建人" >
<el-input v-model="ruleForm.createUserName" disabled clearable />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="修改人" >
<el-input v-model="ruleForm.updateUserName" disabled clearable />
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<div class="footer" align="right" >
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button type="primary" @click="submit" :disabled="disabled"> </el-button>
</div>
</el-form>
@ -205,10 +229,12 @@
type: String,
default: "",
},
row: Object
row: Object,
disabled:Boolean,
});
//
const emit = defineEmits(["reloadTable","back"]);
const activeName = ref('操作信息')
const ruleFormRef = ref();
const isShowDialog = ref(false);
const ruleForm = ref<any>({});
@ -233,16 +259,29 @@
let rowData = JSON.parse(JSON.stringify(props.row));
if (rowData.id)
ruleForm.value = (await detailReportDetailTable(rowData.id)).data.result;
else
ruleForm.value = rowData;
if (rowData.updateUserId) {
if (rowData.updateUserId) {
currentMaterial.value = (await detailMaterials(rowData.materialsId)).data.result;
//console.log(materials.value);
}
}
}
else{
ruleForm.value = {};
ruleForm.value.oddNumber = 'A'+ getCurrentDate();
}
});
const getCurrentDate = () => {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
return `${year}${month}${day}${hours}${minutes}${seconds}`;
}
// //
// const openDialog = async (row: any) => {
// // ruleForm.value = JSON.parse(JSON.stringify(row));

View File

@ -15,16 +15,9 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="产品编码">
<el-input v-model="queryParams.productCodeNum" clearable="" placeholder="请输入产品编码"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="单号">
<el-input v-model="queryParams.oddNumber" clearable="" placeholder="请输入单号"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
@ -45,48 +38,7 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="生产线编码">
<el-input v-model="queryParams.codeNum" clearable="" placeholder="请输入生产线编码"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="源单号">
<el-input v-model="queryParams.sourceNumber" clearable="" placeholder="请输入源单号"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="规格型号">
<el-input v-model="queryParams.specifications" clearable="" placeholder="请输入规格型号"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="完工数量">
<el-input-number v-model="queryParams.productCount" clearable="" placeholder="请输入完工数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="入库数量">
<el-input-number v-model="queryParams.putWarehouse" clearable="" placeholder="请输入入库数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="基本完工数量">
<el-input-number v-model="queryParams.baseProductCount" clearable="" placeholder="请输入基本完工数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="基本入库数量">
<el-input-number v-model="queryParams.basePutWarehouse" clearable="" placeholder="请输入基本入库数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="单位">
<el-input v-model="queryParams.unit" clearable="" placeholder="请输入单位"/>
@ -105,60 +57,14 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="包装规格">
<el-input v-model="queryParams.package" clearable="" placeholder="请输入包装规格"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="包装数量">
<el-input-number v-model="queryParams.packageCount" clearable="" placeholder="请输入包装数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="采集失败数量">
<el-input-number v-model="queryParams.gatherFalseCount" clearable="" placeholder="请输入采集失败数量"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="生产日期">
<el-date-picker placeholder="请选择生产日期" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.productDateRange" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="班组">
<el-input v-model="queryParams.teamGroup" clearable="" placeholder="请输入班组"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="操作工人">
<el-input v-model="queryParams.operator" clearable="" placeholder="请输入操作工人"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="完工时间">
<el-date-picker placeholder="请选择完工时间" value-format="YYYY/MM/DD" type="daterange" v-model="queryParams.endDateRange" />
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="源单号">
<el-input v-model="queryParams.sourceOddNumber" clearable="" placeholder="请输入源单号"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
<el-form-item label="备注">
<el-input v-model="queryParams.remarks" clearable="" placeholder="请输入备注"/>
</el-form-item>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10">
<el-form-item>
<el-button-group style="display: flex; align-items: center;">
@ -167,7 +73,8 @@
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> </el-button>
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> </el-button>
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportDetailTable" v-auth="'reportDetailTable:add'"> </el-button>
<el-button type="primary" style="margin-left:5px;" icon="ele-Check" @click="handleStateChange('已审核')" > 审核 </el-button>
<el-button type="primary" style="margin-left:5px;" icon="ele-CloseBold" @click="handleStateChange('待审核')" > 防审核 </el-button>
</el-button-group>
</el-form-item>
@ -177,45 +84,41 @@
</el-card>
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
<el-table
ref="multipleTableRef"
:data="tableData"
style="width: 100%"
v-loading="loading"
tooltip-effect="light"
row-key="id"
@sort-change="sortChange"
@sort-change="sortChange"
@selection-change="handleSelectionChange"
border="">
<el-table-column type="selection" width="60"/>
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="productName" label="产品名称" width="140" show-overflow-tooltip="" />
<el-table-column prop="productCodeNum" label="产品编码" width="140" show-overflow-tooltip="" />
<el-table-column prop="oddNumber" label="单号" width="140" show-overflow-tooltip="" />
<el-table-column prop="state" label="状态" width="60" show-overflow-tooltip="" />
<el-table-column prop="oddNumber" label="单号" show-overflow-tooltip="" />
<el-table-column prop="productDate" label="计划开工日期" width="140" show-overflow-tooltip="" />
<el-table-column prop="productType" label="生产类型" width="140" show-overflow-tooltip="" />
<el-table-column prop="productionLine" label="生产线" width="140" show-overflow-tooltip="" />
<el-table-column prop="codeNum" label="生产线编码" width="140" show-overflow-tooltip="" />
<el-table-column prop="sourceNumber" label="源单号" width="140" show-overflow-tooltip="" />
<el-table-column prop="specifications" label="规格型号" width="140" show-overflow-tooltip="" />
<el-table-column prop="productCount" label="生产数量" width="140" show-overflow-tooltip="" />
<el-table-column prop="putWarehouse" label="入库数量" width="140" show-overflow-tooltip="" />
<el-table-column prop="baseProductCount" label="基本生产数量" width="90" show-overflow-tooltip="" />
<el-table-column prop="basePutWarehouse" label="基本入库数量" width="90" show-overflow-tooltip="" />
<el-table-column prop="productName" label="产品" width="140" show-overflow-tooltip="" />
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip="" />
<el-table-column prop="productCount" label="计划生产数量" width="140" show-overflow-tooltip="" />
<el-table-column prop="unit" label="单位" width="140" show-overflow-tooltip="" />
<el-table-column prop="baseUnit" label="基本单位" width="140" show-overflow-tooltip="" />
<el-table-column prop="batch" label="批次" width="140" show-overflow-tooltip="" />
<el-table-column prop="package" label="包装规格" width="140" show-overflow-tooltip="" />
<el-table-column prop="packageCount" label="包装数量" width="140" show-overflow-tooltip="" />
<el-table-column prop="gatherFalseCount" label="采集失败数量" width="90" show-overflow-tooltip="" />
<el-table-column prop="productDate" label="生产日期" width="140" show-overflow-tooltip="" />
<el-table-column prop="teamGroup" label="班组" width="140" show-overflow-tooltip="" />
<el-table-column prop="operator" label="操作工人" width="140" show-overflow-tooltip="" />
<el-table-column prop="endDate" label="完工时间" width="140" show-overflow-tooltip="" />
<el-table-column prop="sourceOddNumber" label="源单号" width="140" show-overflow-tooltip="" />
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
<el-table-column prop="productionLine" label="生产线" width="140" show-overflow-tooltip="" />
<el-table-column prop="state" label="状态" show-overflow-tooltip="" />
<el-table-column prop="updateUserName" label="修改人" show-overflow-tooltip=""/>
<el-table-column prop="updateTime" label="修改时间" show-overflow-tooltip=""/>
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportDetailTable:update') || auth('reportDetailTable:delete')">
<template #default="scope">
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> </el-button>
<!-- <el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row.id)" v-auth="'reportDetailTable:update'"> </el-button> -->
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportDetailTable(scope.row)" v-auth="'reportDetailTable:delete'"> </el-button>
<div v-if="scope.row.state==='已审核'">
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openBrowseReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> </el-button>
</div>
<div v-else>
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> </el-button>
<!-- <el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row.id)" v-auth="'reportDetailTable:update'"> </el-button> -->
<el-button icon="ele-Delete" size="small" text="" type="primary" @click="delReportDetailTable(scope.row)" v-auth="'reportDetailTable:delete'"> </el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
@ -241,6 +144,7 @@
ref="editDialogRef"
:title="editReportDetailTableTitle"
:row = "state.editRow"
:disabled = "state.editDisabled"
@reloadTable="handleQuery"
@back="closeReportDetailTable"
/>
@ -250,12 +154,16 @@
<script lang="ts" setup="" name="reportDetailTable">
import {reactive, ref} from "vue";
import { ElMessageBox, ElMessage } from "element-plus";
import {ElMessageBox, ElMessage, ElTable} from "element-plus";
import { auth } from '/@/utils/authFunction';
import editDialog from '/@/views/productionCenter/reportDetailTable/component/editDialog.vue'
import printDetailDialog from '/@/views/labelPrinting/printDataDetail/component/editDialog.vue'
import { pageReportDetailTable, deleteReportDetailTable } from '/@/api/main/reportDetailTable';
import {
pageReportDetailTable,
deleteReportDetailTable,
updateStateReportDetailTable
} from '/@/api/main/reportDetailTable';
const showAdvanceQueryUI = ref(false);
@ -266,8 +174,10 @@ import {reactive, ref} from "vue";
const queryParams = ref<any>({});
const state = reactive({
editShow: false,
editRow:{}
editRow:<any>{},
editDisabled:false
})
const multipleSelection = ref([])
const tableParams = ref({
page: 1,
pageSize: 10,
@ -281,7 +191,7 @@ import {reactive, ref} from "vue";
const changeAdvanceQueryUI = () => {
showAdvanceQueryUI.value = !showAdvanceQueryUI.value;
}
//
const handleQuery = async () => {
@ -292,6 +202,9 @@ import {reactive, ref} from "vue";
loading.value = false;
};
const handleSelectionChange = (val: []) => {
multipleSelection.value = val
}
//
const sortChange = async (column: any) => {
@ -316,10 +229,20 @@ import {reactive, ref} from "vue";
const openEditReportDetailTable = (row: any) => {
state.editRow = row;
state.editShow = true;
state.editDisabled = false;
// editReportDetailTableTitle.value = '';
// editDialogRef.value.openDialog(row);
};
//
const openBrowseReportDetailTable = (row: any) => {
state.editRow = row;
state.editShow = true;
state.editDisabled = true;
// editReportDetailTableTitle.value = '';
// editDialogRef.value.openDialog(row);
};
//
const readReportDetailTable = (row: any) => {
@ -355,6 +278,18 @@ import {reactive, ref} from "vue";
handleQuery();
};
//
const handleStateChange = async (val: any) => {
if(multipleSelection.value.length === 0){ return ElMessage.error("至少选择一条数据")}
let ids = [] as any;
multipleSelection.value.forEach(item => {
ids.push(item.id);
})
await updateStateReportDetailTable({ids,state:val});
await handleQuery();
};
handleQuery();
</script>
<style scoped>

View File

@ -61,7 +61,6 @@
<el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
<el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> </el-button>
<el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> </el-button>
<el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddReportTable" v-auth="'reportTable:add'"> </el-button>
</el-button-group>
</el-form-item>
@ -92,7 +91,6 @@
<el-table-column prop="remarks" label="备注" width="140" show-overflow-tooltip="" />
<el-table-column label="操作" width="200" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('reportTable:update') || auth('reportTable:delete')">
<template #default="scope">
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditReportTable(scope.row)" v-auth="'reportTable:update'"> </el-button>
<el-button icon="ele-Edit" size="small" text="" type="primary" @click="readReportDetailTable(scope.row)" v-auth="'reportDetailTable:update'"> </el-button>
</template>
</el-table-column>
@ -196,7 +194,7 @@
const readReportDetailTable = (row: any) => {
printDetailTableTitle.value = '条码详情';
//console.log(row.sourceId);
printDetailDialogRef.value.openDialog(row.id);
printDetailDialogRef.value.openDialog(row);
};
//