| | |
| | | <script setup> |
| | | import {defineEmits, onMounted, reactive, ref, watch} from "vue"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {defineEmits, onMounted, reactive, ref, watch} from "vue" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage} from "element-plus" |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo" |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const orderInfo = useOrderInfoStore() |
| | | const gridOptions = reactive({ |
| | | loading:false, |
| | | border: "full",//表格加边框 |
| | |
| | | id:'sizeCheck', |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'review', 'name': '审核',status: 'primary'}, |
| | | {'code': 'review', 'name': t('basicData.review'),status: 'primary'}, |
| | | ] |
| | | }, |
| | | |
| | |
| | | storage: true |
| | | }, |
| | | columns:[ |
| | | {field: 'width', title: '宽',editRender: { name: 'input'}}, |
| | | {field: 'height', title:'高', editRender: { name: 'input'}}, |
| | | {field: 'quantity', title: '数量' ,editRender: { name: 'input'}, }, |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | | {field: 'width', title: t('order.width'),editRender: { name: 'input'}}, |
| | | {field: 'height', title:t('order.height'), editRender: { name: 'input'}}, |
| | | {field: 'quantity', title: t('order.quantity') ,editRender: { name: 'input'}, }, |
| | | ], |
| | | editRules: { |
| | | width: [ |
| | | { required: true, message: '必填,参数不一致' } |
| | | { required: true, message: t('components.inconsistentParameters') } |
| | | ], |
| | | height: [ |
| | | { required: true, message: '必填,参数不一致' } |
| | | { required: true, message:t('components.inconsistentParameters') } |
| | | ], |
| | | quantity: [ |
| | | { required: true, message: '必填,参数不一致' } |
| | | { required: true, message:t('components.inconsistentParameters') } |
| | | ] |
| | | } |
| | | }) |
| | |
| | | ElMessage.error(t('basicData.msg.checkoutLose')) |
| | | return |
| | | } |
| | | // const $table = props.OrderDetail |
| | | // $table.getTableData().fullData.forEach((row)=>{ |
| | | // if()row.computeGrossArea |
| | | // }) |
| | | |
| | | |
| | | emit('getParent') |
| | | break |
| | | } |
| | |
| | | const emit = defineEmits(['getParent']) |
| | | |
| | | let props = defineProps({ |
| | | OrderDetail:null |
| | | OrderDetail:null, |
| | | orderId:null |
| | | }) |
| | | |
| | | |
| | | onMounted(()=>{ |
| | | const length = props.OrderDetail.getTableData().fullData.length |
| | | const $grid = xGrid.value |
| | | let list = [] |
| | | for (let i = 0; i < length; i++) { |
| | | list.push({}) |
| | | if(props.orderId !== orderInfo.orderId){ |
| | | orderInfo.clearOrderInfo() |
| | | orderInfo.orderId=props.orderId |
| | | |
| | | for (let i = 0; i < length; i++) { |
| | | orderInfo.reviewList.push({}) |
| | | } |
| | | } |
| | | xGrid.value.reloadData(list) |
| | | |
| | | xGrid.value.reloadData(orderInfo.reviewList) |
| | | |
| | | }) |
| | | |
| | |
| | | const $table = props.OrderDetail |
| | | let checkVal = row[column.property]*1 |
| | | const oldVal = $table.getTableData().fullData[rowIndex][column.property]*1 |
| | | if(checkVal!=oldVal){ |
| | | if(checkVal!==oldVal){ |
| | | row[column.property]=null |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | </script> |