| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | function filterChanged(column){ |
| | | gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.')>-1){ |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]:value |
| | | } |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'SelectReplenish', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type:'checkbox',title: t('basicData.check'), width: 80,fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | {field: 'review_status',title: t('basicData.review'), width: 40, slots: { default: 'state' }}, |
| | | {field: 'patch_id', width: 120, title: t('replenish.patchNumber'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'order_id', width: 120, title: t('order.orderId'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'process_id', width: 120, title: t('processCard.processId'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'reporting_work_id', width: 100,title: t('reportingWorks.reportingWorkId'),filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'batch', width: 80, title: t('order.batch'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'order_sort', width: 80, title:t('order.OrderNum'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'product_name', width: 120, title: t('order.product'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'reviewStatus',title: t('basicData.review'), width: 50, slots: { default: 'state' }}, |
| | | {field: 'patchId', width: 120, title: t('replenish.patchNumber'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderId', width: 120, title: t('order.orderId'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'processId', width: 140, title: t('processCard.processId'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'batch', width: 80, title: t('order.batch'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'glassNumber', width: 100, title: t('reportingWorks.glassNumber')}, |
| | | {field: 'orderSort', width: 100, title:t('order.OrderNum'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'technologyNumber', width: 80, title: t('replenish.mark'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'patchType', width: 100, title: t('reportingWorks.breakageType'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'patchReason', width: 120, title: t('reportingWorks.breakageReason'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'responsibleEquipment', width: 120, title: t('reportingWorks.responsibleEquipment'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'responsibleTeam', width: 120, title: t('reportingWorks.responsibleTeam'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'patchProcesses', width: 120, title: t('reportingWorks.reportingProcess'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | //{field: 'building_number',width: 120, title: '楼层编号', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'technology_number', width: 80, title: t('replenish.mark'), showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'glass_address', width: 90, title: t('replenish.sliceMarking'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'patch_num', width: 80, title: t('order.quantity'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', width: 80, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'height', width: 80, title: t('order.height'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', width: 80, title: t('order.shape'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'patch_type', width: 100, title: t('reportingWorks.breakageType'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'patch_reason', width: 120, title: t('reportingWorks.breakageReason'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'responsible_equipment', width: 120, title: t('reportingWorks.responsibleEquipment'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'responsible_team', width: 120, title: t('reportingWorks.responsibleTeam'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'patch_area', width: 120, title: t('order.area'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'patch_processes', width: 120, title: t('reportingWorks.reportingProcess'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'quality_inspector', width: 100, title: t('reportingWorks.qualityInspector'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'reviewer', width: 100, title: t('productStock.reviewed'), filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'create_time', width: 100, title: t('productStock.productionDate')}, |
| | | {field: 'update_time', width: 120, title: t('productStock.approvedDate')} |
| | | {field: 'glassAddress', width: 90, title: t('replenish.sliceMarking'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'patchNum', width: 80, title: t('order.quantity'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'patchArea', width: 120, title: t('order.area'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'width', width: 80, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'height', width: 80, title: t('order.height'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'shape', width: 80, title: t('order.shape'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'qualityInspector', width: 100, title: t('reportingWorks.qualityInspector'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'reviewer', width: 100, title: t('productStock.reviewed'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'createTime', width: 100, title: t('productStock.productionDate')}, |
| | | {field: 'updateTime', width: 120, title: t('productStock.approvedDate')}, |
| | | {field: 'productName', width: 120, title: t('order.product'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'reportingWorkId', width: 100,title: t('reportingWorks.reportingWorkId'),filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | buttons: [ |
| | | { |
| | | 'name': t('basicData.review'),status: 'primary', |
| | | 'code':'add' |
| | | }], |
| | | }, |
| | | { |
| | | 'name': t('basicData.delete'),status: 'primary', |
| | | 'code':'delete' |
| | | }, |
| | | { |
| | | 'name': t('basicData.cancelReview'),status: 'primary', |
| | | 'code':'cancelReview' |
| | | } |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | | print: true,*/ |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | return |
| | | |
| | | } |
| | | case 'delete': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | userId:userid, |
| | | userName:username, |
| | | patchLog:selectRecords |
| | | |
| | | }) |
| | | request.post("/Replenish/deleteReplenish",flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.deleteSuccess')) |
| | | router.push({path:'/main/Replenish/SelectReplenish',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteFail')) |
| | | } |
| | | }) |
| | | } |
| | | return |
| | | |
| | | } |
| | | case 'cancelReview': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | | userName:username, |
| | | patchLog:selectRecords |
| | | |
| | | }) |
| | | request.post("/Replenish/updateCancelReview",flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path:'/main/Replenish/SelectReplenish',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFailWork')) |
| | | } |
| | | }) |
| | | } |
| | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/Replenish/SelectReplenish/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | |
| | | </el-header> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :checkbox-config="checkBoxConfig" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- :checkbox-config="checkBoxConfig" @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===1"/> |
| | | <el-checkbox |
| | | v-if="row[column.field] === 1" |
| | | @click.native.prevent |
| | | :checked="true"/> |
| | | <el-checkbox |
| | | v-else |
| | | @click.native.prevent |
| | | :checked="false"/> |
| | | </template> |
| | | |
| | | <template #pager> |
| | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 94%; |
| | | } |
| | | #head{ |
| | | width:40%; |