guoyujie
8 小时以前 475b0fb972744546a3709ee771053febe5e7c725
还原其他金额界面
1个文件已修改
9 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/order/OrderOtherMoney.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/OrderOtherMoney.vue
@@ -10,7 +10,6 @@
const route = useRoute()
let rowClickIndex = ref(null)
const xGrid = ref()
import {multiply,multiplyAuto,divideAuto} from '@/utils/decimal'
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
@@ -41,7 +40,7 @@
    // {field: 'buildingNumber',width:120,  title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged},
    {field: 'alias', title:t('components.otherProcessing'),minWith:'130'},
    {field: 'price',  title:t('order.price'),editRender: { name: 'input'}},
    {field: 'quantity',  title:t('order.quantity'),editRender: { name: 'input'}},
    {field: 'quantity',  title:t('order.quantity')},
    {field: 'money', slots:{default:'default'},  title:t('delivery.money')}
  ],
  //表单验证
@@ -59,9 +58,9 @@
    quantity: [
      {
        validator ({ cellValue }) {
          const regex = /^(0|[1-9]\d*)$/
          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(t('basicData.msg.greater0') )
            return new Error(t('basicData.msg.range99999Dec2') )
          }
        }
      }
@@ -160,7 +159,7 @@
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)) || 0
  return parseFloat((row.price * row.quantity).toFixed(2))
}