| | |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'AddProcessCardRight', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | sortConfig:{ |
| | | multiple:true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let count = 0 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["baiscQuantity",'computeGrossArea','weight','perimeter'] |
| | | |
| | | const List = ["baiscQuantity",'computeGrossArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | if (column.field === 'weight'){ |
| | | data.forEach(row => { |
| | | count += weightSum(row) |
| | | }) |
| | | return parseFloat(count.toFixed(2)) |
| | | } |
| | | |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | }) |
| | | |
| | |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'AddProcessCardLeft', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | }, |
| | | { |
| | | field: 'landingSequence', |
| | | title: '落架顺序', |
| | | title: t('processCard.landingSequence'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'goodsQuantity','area','perimeter'] |
| | | const List = ["quantity",'goodsQuantity','area'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | |
| | | //对选中的左边表格数据进行循环 |
| | | checkedList.forEach((item) => { |
| | | //判断可用数量是否大于等于输入的数量,不满足则抛出异常 |
| | | console.log(item.quantity , checkedNum.value) |
| | | // if (item.quantity < checkedNum.value*1) throw new Error(t('processCard.schedulingQuantity')); |
| | | if (item.quantity < checkedNum.value*1){ |
| | | ElMessage.warning(t('processCard.schedulingQuantity')) |
| | |
| | | return parseFloat((row.baiscQuantity*row.thickness*row.width*row.height*2.5/1000000).toFixed(2)) |
| | | } |
| | | |
| | | let quantit = ref('') |
| | | let weight = ref('') |
| | | const handleCheckboxChange=({ row}) =>{ |
| | | const $grid = xGrid.value |
| | | //获取右边表格checkbox选中的数据 |
| | | const checkedList = $grid.getCheckboxRecords() |
| | | let quantitySum = 0; |
| | | let weightsum=0; |
| | | checkedList.forEach(item => { |
| | | quantitySum += item.baiscQuantity; |
| | | weightsum += weightSum(item); |
| | | }); |
| | | quantit.value = quantitySum; |
| | | weight.value = parseFloat(weightsum.toFixed(2)); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | |
| | | <div width="12%"> |
| | | <el-main style=""> |
| | | <div> |
| | | <span><el-input v-model="quantit" style="width: 80px;"/></span> |
| | | <span><el-input v-model="weight" style="width: 80px;"/></span> |
| | | </div> |
| | | <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable |
| | | type="number"></el-input></span><br> |
| | | <el-button type="primary" @click="addRight"> →</el-button> |
| | |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | checkbox-config="{ reserve: true, strict: true }" |
| | | @checkbox-change="handleCheckboxChange" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |