| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook"; |
| | | |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | }, |
| | | columns: [ |
| | | |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {field: 'select',type:'checkbox',title: t('basicData.check'), width: 80,fixed:"left"}, |
| | | { |
| | | field: 'process_id', |
| | | width: 150, |
| | | title: t('processCard.processId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | |
| | | title: '层', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'TotalFloors', |
| | |
| | | title: '总层数', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'TotalNumber', |
| | |
| | | title: '规格', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | |
| | | title: t('order.quantity'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'shape', |
| | |
| | | title: t('order.shape'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_child', |
| | |
| | | title: t('order.product'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | {field: 'project', width: 150, title: t('order.project'), showOverflow: "ellipsis"}, |
| | | {field: 'project', width: 150, title: t('order.project'), showOverflow: "ellipsis",filterMethod:filterChanged}, |
| | | { |
| | | field: 'area', |
| | | width: 150, |
| | | title: t('order.area'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | sortable: true, |
| | | filterMethod:filterChanged |
| | | }, |
| | | |
| | | |
| | |
| | | |
| | | //小圆点单选框 |
| | | let radio = ref(1); |
| | | let isButtonDisabledAdd = false; |
| | | let isButtonDisabledUpdate = true; |
| | | |
| | | const selectFlowCardList = async () => { |
| | | request.post(`/glassOptimize/getFlowCardList/${optionVal.value}/${radio.value}`).then((res) => { |
| | | if (res.code == 200) { |
| | | getProjectId() |
| | | isButtonDisabledAdd=false |
| | | isButtonDisabledUpdate = true |
| | | xGrid.value.loadData(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | }) |
| | | } |
| | | |
| | | const getUpdateFlowCardList = async (projectNumber,type,thickness) => { |
| | | request.post(`/glassOptimize/getUpdateFlowCardList/${type}/${thickness}/${radio.value}/${projectNumber}`).then((res) => { |
| | | if (res.code == 200) { |
| | | oddNumbers.value=projectNumber |
| | | optionVal.value=thickness+"mm"+type |
| | | isButtonDisabledAdd=true |
| | | isButtonDisabledUpdate=false |
| | | xGrid.value.loadData(deepClone(res.data.data)) |
| | | xGrid.value.getTableData().fullData.forEach(item => { |
| | | if(item.occupyState===0){ |
| | | xGrid.value.setCheckboxRow(item, true); |
| | | } |
| | | }) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //创建工程 |
| | | const addProject = () => { |
| | | const addProject = (type) => { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | |
| | | |
| | | let projectData = ref({ |
| | | projectdetail: selectRecords, |
| | | userName : username |
| | | userName : username, |
| | | projectType: type |
| | | }) |
| | | let inputProject = projectNmae.value |
| | | if (inputProject == undefined) { |
| | |
| | | |
| | | } |
| | | } |
| | | const handleRowClassName = ({ row, rowIndex }) => { |
| | | if (row.patch_state === 1) { |
| | | return 'high-score'; |
| | | } |
| | | if (row.occupyState === 0) { |
| | | return 'high-score2'; |
| | | } |
| | | } |
| | | |
| | | //抛出方法到父界面 |
| | | defineExpose({getProjectId,selectFlowCardList,selectGlassType}) |
| | | defineExpose({getProjectId,selectFlowCardList,selectGlassType,getUpdateFlowCardList}) |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 110%; margin-top: -36px"> |
| | | <h1>流程卡列表 |
| | | <div> |
| | | 流程卡列表 |
| | | <span style="margin-left: 140px;font-size: 14px">工程编号:</span> |
| | | <!-- <span>{{oddNumbers}}</span>--> |
| | | <el-input disabled v-model="oddNumbers" style="width: 100px"></el-input> |
| | | <!-- <vxe-input :disabled="isDisabled" placeholder="" v-model="oddNumbers" size="small" style="color:black;"></vxe-input> --> |
| | | <span style="font-size: 14px">工程名称:</span> |
| | | <el-input style="width: 150px" placeholder="" v-model="projectNmae" size="small"></el-input> |
| | | <el-button style="margin-left: 20px" type="primary" @click="addProject">创建</el-button> |
| | | </h1> |
| | | <el-button style="margin-left: 20px" id="add" type="primary" :disabled="isButtonDisabledAdd" @click="addProject(1)">创建</el-button> |
| | | <el-button style="margin-left: 20px;" id="update" :disabled="isButtonDisabledUpdate" @click="addProject(2)">修改</el-button> |
| | | </div> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | :row-class-name="handleRowClassName" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | |
| | | v-model="option.data" |
| | | type="type" |
| | | @input="changeFilterEvent($event, option, $panel)" |
| | | @keyup.enter.native="$panel.confirmFilter()"/> |
| | | <input type="type" v-model="option.data" @keyup.enter.native="$panel.confirmFilter()" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <vxe-radio content="补单" label="3"></vxe-radio> |
| | | </vxe-radio-group> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | <style lang="css"> |
| | | .high-score { |
| | | background-color: #d4baba !important; |
| | | } |
| | | .high-score2 { |
| | | background-color: #a5aec9 !important; |
| | | } |
| | | </style> |