| | |
| | | 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: 'CustomerListRight', |
| | | id: 'AddProcessCardRight', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | sortConfig:{ |
| | | multiple:true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | |
| | | weighAllAmount(data) { |
| | | let count = 0 |
| | | data.forEach(row => { |
| | | count += row.weight |
| | | }) |
| | | return count |
| | | }, |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let count = 0 |
| | | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: false},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'AddProcessCardLeft', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | 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"--> |
| | | <!-- 下拉显示所有信息插槽--> |