| | |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | |
| | | const options = [ |
| | | { |
| | | value: '1', |
| | | label: '未质检', |
| | | label: t('reportingWorks.unqualified'), |
| | | }, |
| | | { |
| | | value: '2', |
| | | label: '已质检', |
| | | label: t('reportingWorks.qualified'), |
| | | }, |
| | | ] |
| | | |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | if (item.damageDetails.qualityInsStatus === 2) { |
| | | item.damageDetails.qualityInsStatus = '已质检'; |
| | | } |
| | | else if (item.damageDetails.qualityInsStatus === 1){ |
| | | item.damageDetails.qualityInsStatus = '待质检'; |
| | | } |
| | | else if (item.damageDetails.qualityInsStatus === 0){ |
| | | item.damageDetails.qualityInsStatus = '无需质检'; |
| | | } |
| | | }); |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'QualityInspectionReview', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 120, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {type:'expand',fixed:"left",slots: { content:'content' }}, |
| | | {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'),}, |
| | | |
| | | {field: 'reportingWorkId',width: 130, title: '报工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'reportingWorkTime',width: 120, title: '报工时间',showOverflow:"ellipsis" }, |
| | | {field: 'processId',width: 130, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project',width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.customerName',width: 120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thisProcess',width: 100, title: '本工序',showOverflow:"ellipsis"}, |
| | | {field: 'thisCompletedQuantity',width: 100, title: '完工数量'}, |
| | | {field: 'thisWornQuantity', width: 100,title: '次破数量'}, |
| | | {field: 'teamsGroupsName',width: 110, title: '报工班组'}, |
| | | {field: 'deviceName',width: 110, title: '报工设备'}, |
| | | {field: 'previousProcess', width: 100,title: '上工序'}, |
| | | {field: 'nextProcess',width: 100, title: '下工序'}, |
| | | {field: 'qualityInspector',width: 120, title: '质检员'}, |
| | | {field: 'qualityInsTime',width: 120, title: '质检时间'}, |
| | | {field: 'damageDetails.qualityInsStatus',width: 120, title: '质检状态'} |
| | | {field: 'reportingWorkId',width: 130, title: t('reportingWorks.reportingWorkId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'reportingWorkTime',width: 120, title: t('reportingWorks.reportingWorkTime'),showOverflow:"ellipsis" }, |
| | | {field: 'processId',width: 130, title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project',width: 120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.customerName',width: 120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thisProcess',width: 100, title: t('reportingWorks.thisProcess'),showOverflow:"ellipsis"}, |
| | | {field: 'thisCompletedQuantity',width: 100, title: t('reportingWorks.thisCompletedQuantity')}, |
| | | {field: 'thisWornQuantity', width: 100,title: t('reportingWorks.thisWornQuantity')}, |
| | | {field: 'teamsGroupsName',width: 110, title: t('reportingWorks.teamsType')}, |
| | | {field: 'deviceName',width: 110, title: t('reportingWorks.deviceType')}, |
| | | {field: 'previousProcess', width: 100,title: t('reportingWorks.previousProcess')}, |
| | | {field: 'nextProcess',width: 100, title: t('reportingWorks.nextProcess')}, |
| | | {field: 'qualityInspector',width: 120, title: t('reportingWorks.qualityInspector')}, |
| | | {field: 'qualityInsTime',width: 120, title: t('reportingWorks.qualityInsTime')}, |
| | | {field: 'damageDetails.qualityInsStatus',width: 120, title: t('reportingWorks.qualityInsStatus')} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['',''] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["thisCompletedQuantity",'thisWornQuantity','area','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-input v-model="form.processId" clearable placeholder="流程卡号" style="width: 130px"></el-input> |
| | | <el-input v-model="form.processId" clearable :placeholder="$t('processCard.processId')" style="width: 130px"></el-input> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder" |
| | |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | |
| | | size="small"> |
| | | {{ $t('basicData.edit') }} |
| | | </el-button> |
| | | <el-button v-if="row.damageDetails.qualityInsStatus===1" @click="getTableRow(row,'setType')" link type="primary" size="small">审核</el-button> |
| | | <el-button v-else disabled @click="getTableRow(row,'setType')" link type="primary" size="small">审核</el-button> |
| | | <el-button v-if="row.damageDetails.qualityInsStatus==='已质检'||row.damageDetails.qualityInsStatus==='无需质检'" disabled @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button> |
| | | <el-button v-else @click="getTableRow(row,'setType')" link type="primary" size="small">{{ $t('basicData.review') }}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 95%; |
| | | } |
| | | #selectForm { |
| | | width: 60%; |