| | |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}}) |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {orderId: row.orderId}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | //console.log(row.orderDetail.productName) |
| | | //request.post('/workOrder/deleteOrderWork/${row.orderId}', ,row.orderDetail.productName).then((res) => { |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 60, useKey: true},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: '操作', width: 110, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | { |
| | | field: 'productionId', |
| | | title: '生产订单号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | , width: 130 |
| | | }, |
| | | {field: 'order.batch', title: '批次', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderDetail.productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'orderDetail.computeArea', title: '单片总面积', showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.quantity', title: '总数量',}, |
| | | {field: 'order.batch', title: '批次', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 110}, |
| | | {field: 'orderDetail.productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 210}, |
| | | {field: 'orderDetail.computeArea', title: '单片总面积', showOverflow: "ellipsis", width: 110}, |
| | | {field: 'orderDetail.quantity', title: '总数量', width: 70}, |
| | | {field: 'orderDetail.computeGrossArea', title: '成品总面积',}, |
| | | {field: 'orderDetail.perimeter', title: '周长', showOverflow: "ellipsis"}, |
| | | {field: 'orderDetail.bendRadius', title: '半径',}, |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">转工单</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-button :class="{disable: optionVal== 0}" :disabled="optionVal == 0" @click="getTableRow(row,'edit')" link type="primary" size="small">转工单</el-button> |
| | | <el-button :class="{disable: optionVal== 1}" :disabled="optionVal == 1" @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |