| | |
| | | import request from "@/utils/request"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {useRoute} from "vue-router"; |
| | | |
| | | const {t} = useI18n() |
| | | const { t } = useI18n() |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | height: '100%', |
| | | height:'100%', |
| | | loading: false, |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | id: 'GlassInventory', |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | scrollX:{enabled: true}, |
| | | scrollY:{ enabled: true ,gt:0},//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | showStatus: true |
| | | }, |
| | | |
| | | columns: [ |
| | | {type: 'seq', fixed: "left", title: ' ', width: 50}, |
| | | columns:[ |
| | | {type:'seq',fixed:"left", title:' ', width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {field: 'id', title: '物料编码',}, |
| | | {field: 'width', title: t('order.width'),}, |
| | | {field: 'height', title: t('order.height')}, |
| | | {field:'width',title: t('order.width'),}, |
| | | {field: 'height',title: t('order.height')}, |
| | | {field: 'thickness', title: t('order.totalThickness'),}, |
| | | {field: 'model', title: t('warehouseBasicData.type'),}, |
| | | {field: 'leftTrim', title: '左修边',}, |
| | |
| | | {field: 'name', title: '名称',}, |
| | | {field: 'producer', title: '供应商',} |
| | | ],//表头参数 |
| | | data: null,//表格数据 |
| | | data:null,//表格数据 |
| | | //右键菜单 |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | {code: 'choose', name: '选择',}, |
| | | {code: 'selectTrimming', name: '设置统一修边',}, |
| | | {code: 'Exports', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false}, |
| | | ], |
| | |
| | | }, |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots: { |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | }, |
| | |
| | | // 右键菜单 |
| | | const operationConfigs = [ |
| | | { |
| | | code: 'choose', |
| | | successMsg: '已选中!', |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | showMessage: () => { |
| | | ElMessage.info('此功能暂未完善,暂时无法执行隐藏流程卡操作。'); |
| | | } |
| | | }, |
| | | { |
| | | code: 'selectTrimming', // 设置统一修边 |
| | | successMsg: '已打开!', |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | openTrimming: async () => { |
| | | emit('select-trimming', true) |
| | | emit ( 'select-trimming', true) |
| | | } |
| | | }, |
| | | { |
| | |
| | | const model = ref(route.params.model); |
| | | |
| | | |
| | | const selectMaterialStore = () => { |
| | | const selectMaterialStore = () =>{ |
| | | request.post(`/glassOptimize/materialStore/${thickness.value}/${model.value}`).then((res) => { |
| | | if (Number(res.code) === 200) { |
| | | const rawData = res.data.data; |
| | |
| | | if (newData) { |
| | | Trimming(newData); |
| | | } |
| | | }, {immediate: true}); |
| | | }, { immediate: true }); |
| | | |
| | | watch(() => props.InventoryData, (newInventoryData) => { |
| | | if (newInventoryData) { |
| | |
| | | }); |
| | | |
| | | const props = defineProps({ |
| | | receivedData: { |
| | | receivedData : { |
| | | type: Object, |
| | | required: false, |
| | | properties: { |
| | | quicksetLeft: {type: Number}, |
| | | quicksetBottom: {type: Number}, |
| | | quicksetRight: {type: Number}, |
| | | quicksetTop: {type: Number} |
| | | quicksetLeft: { type: Number }, |
| | | quicksetBottom: { type: Number }, |
| | | quicksetRight: { type: Number }, |
| | | quicksetTop: { type: Number } |
| | | } |
| | | }, |
| | | InventoryData: { |
| | | InventoryData : { |
| | | type: Object, |
| | | required: false, |
| | | properties: { |
| | | selectedLabel1: {type: String}, |
| | | selectedLabel2: {type: String}, |
| | | selectedLabel1: { type: String }, |
| | | selectedLabel2: { type: String }, |
| | | } |
| | | } |
| | | }); |
| | |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" |
| | | @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |