廖井涛
2024-04-23 2f894921e5cf74910805f08a5e3180b68ac09e18
north-glass-erp/northglass-erp/src/components/sd/order/OrderOtherMoney.vue
@@ -54,9 +54,9 @@
    quantity: [
      {
        validator ({ cellValue }) {
          const regex = /^[1-9]\d*$|^0$/
          const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/
          if (cellValue && !regex.test(cellValue) ) {
            return new Error('请输入大于等于0的整数')
            return new Error(t('basicData.msg.range99999Dec2') )
          }
        }
      }
@@ -139,6 +139,7 @@
  return count.toFixed(2)==='NaN' ? null : parseFloat(count.toFixed(2))
}
//用于接收父组件参数
let prop = defineProps({
  otherMoney:{}
})
@@ -149,11 +150,11 @@
  xGrid.value.reloadData(prop.otherMoney)
})
const countAmount = computed(() => (row) => {
const countAmount = (row) => {
  const price = row.price===null?0:row.price
  const quantity = row.quantity===null?0:row.quantity
  return parseFloat((row.price * row.quantity).toFixed(2))
})
}
const validate = async () => {