| | |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('切割') |
| | | const procseeValue = ref() |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | let newItem= ref({ |
| | | basic_name: '全部', |
| | | basic_type: 'product', |
| | | basic_category: 'process', |
| | | id: "001" |
| | | }) |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectProcesses = procseeValue.value |
| | | |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.unshift(newItem.value) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | let selectProcesses = procseeValue.value |
| | | |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let selectProcesses = procseeValue.value |
| | | |
| | | request.post(`/report/teamOutput/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | |
| | | } |
| | | |
| | | function filterChanged(column){ |
| | | let selectProcesses = procseeValue.value |
| | | //gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'TeamOutput', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 40}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'reportingWorkTime', width: 160, title: '报工时间', |
| | | field: 'reportingWorkTime', width: 160, title: t('reportingWorks.reportingWorkTime'), |
| | | }, |
| | | { |
| | | field: 'thisProcess', |
| | | width: 100, |
| | | title: '报工工序', |
| | | title: t('reportingWorks.reportingProcess'), |
| | | showOverflow: "ellipsis", |
| | | filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'teamsGroupsName', width: 100, title: '报工班组',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | field: 'teamsGroupsName', width: 100, title: t('reportingWorks.teamsType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | field: 'project', width: 120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'processId', width: 140, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | field: 'processId', width: 140, title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | {field: 'orderNumber', width: 60, title: '序号'}, |
| | | {field: 'width', width: 100, title: '宽'}, |
| | | {field: 'height', width: 100, title: '高'}, |
| | | {field: 'shape', width: 90, title: '形状'}, |
| | | {field: 'thickness', width: 90, title: '厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'edgingType', width: 110, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: '完工数量'}, |
| | | {field: 'area', width: 100, title: '完工面积'}, |
| | | {field: 'productName', width: 150, title: '产品名称'}, |
| | | {field: 'orderNumber', width: 90, title: t('order.OrderNum')}, |
| | | {field: 'code', width: 60, title: t('reportingWorks.glassNumber')}, |
| | | {field: 'width', width: 100, title: t('order.width')}, |
| | | {field: 'height', width: 100, title: t('order.height')}, |
| | | {field: 'edgingType', width: 110, title: t('order.edgingType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'completedQuantity', width: 90, title: t('reportingWorks.completedQuantity')}, |
| | | {field: 'area', width: 100, title: t('reportingWorks.completedArea')}, |
| | | {field: 'productName', title: t('order.product')}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }) |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | let processes = value.value |
| | | let processes = procseeValue.value |
| | | if(date===null){ |
| | | ElMessage.warning("请先选择日期") |
| | | ElMessage.warning(t('report.pleaseSelectADateFirst')) |
| | | return |
| | | } |
| | | |
| | | if(processes===null){ |
| | | ElMessage.warning("请先选择工序") |
| | | ElMessage.warning(t('report.pleaseSelectAProcessFirst')) |
| | | return |
| | | } |
| | | |
| | |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning("导出的筛选时间不能超过180天") |
| | | ElMessage.warning(t('report.theFilteringTimeForExportCannotExceed180Days')) |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | end-placeholder="结束时间" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-select v-model="procseeValue" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | @filter-change="filterChanged" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | :total="total.dataTotal" |
| | | @page-change="handlePageChange" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportTeamOutput', |
| | | '班组产量明细', |
| | | t('report.teamOutput'), |
| | | form.date1)"> |
| | | 导出</vxe-button> |
| | | {{t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 90%; |
| | | } |
| | | |
| | | #selectForm { |