chenlu
2024-08-27 5df5dba2a321098fd0fc7e18b71549f5c2312049
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -23,7 +23,7 @@
let errorAreaVisible = ref(false)
let otherMoneyVisible = ref(false)
let sizeCheckVisible = ref(false)
const maxTableLen =ref(200)
const maxTableLen =ref(500)
let errorArea = ref(0.4)
const userStore = useUserInfoStore()
const company = companyInfo()
@@ -737,7 +737,6 @@
  request.post(`/order/getOrderById/${str}`).then((res) => {
    if(res.code==200){
      console.log(res.data.order)
      titleUploadData.value = res.data.order
      if(history.state.orderId!=null){
        titleUploadData.value.orderId=''
@@ -1050,7 +1049,7 @@
const countArea = (row) => {
  const area = parseFloat((row.width * row.height/1000000).toFixed(company.decValue))
  let areaSum = 0
  // 获取保留面积
  // 获取保留面积,
  const decValue = company.decValue
  switch (titleUploadData.value.calculateType){
    case 2:{
@@ -1211,10 +1210,30 @@
}
const cellStyle = ({ row, column }) => {
  if(company.longSide!=null){
    if (column.field === 'width') {
      if (row.width > parseInt(company.longSide)) {
        return {
          backgroundColor: '#ec6969'
        }
      }
    }
    if (column.field === 'height') {
      if (row.height > parseInt(company.longSide)) {
        return {
          backgroundColor: '#ec6969'
        }
      }
    }
  }
};
//误差面积计算方法
const errorAreaComputed = () => {
  const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/
  if (!regex.test(errorArea.value)) {
  if (!regex.test(errorArea.value.toString())) {
    ElMessage.warning(t('basicData.msg.range99999Dec2'))
    return
  }
@@ -1294,8 +1313,6 @@
  if(evnt.$event.keyCode === 38 ){
    const { rowIndex,row,column } = xGrid.value.getSelectedCell() || xGrid.value.getEditRecord()
    let nextRowIndex = xGrid.value.getRowIndex(row) - 1;
    console.log(xGrid.value.getTableData().fullData.length)
    console.log(nextRowIndex)
    if (nextRowIndex < xGrid.value.getTableData().fullData.length && nextRowIndex>=0) {
      xGrid.value.setCurrentRow(xGrid.value.getTableData().fullData[nextRowIndex]);
    }
@@ -1457,6 +1474,7 @@
          v-on="gridEvents"
          @keydown="handleKeyDown"
          @edit-closed="editClosedEvent"
          :cell-style="cellStyle"
      >
        <template #num1_filter="{ column, $panel }">
          <div>