guoyuji
2024-04-23 63e493245086f107bacb8abcf30704afcc9fa4f6
修改其他金额以及打标位置复选框
8个文件已修改
47 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/order/OrderOtherMoney.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/OrderMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 () => {
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -296,7 +296,6 @@
    <vxe-grid
        max-height="97%"
        @filter-change="filterChanged"
        @cell-dblclick="cellClickEvent"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -923,7 +923,7 @@
      />
    </el-dialog>
    <el-dialog v-model="productVisible"  style="width: 80%;height:75% ">
      <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 100%;height: 100%" />
      <select-product :rowIndex="rowIndex" @getProductRow="getProductRow" style="width: 1188px;height: 500px" />
    </el-dialog>
<!--误差结算-->
    <el-dialog v-model="errorAreaVisible"  style="width: 300px;height:150px ">
north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -555,8 +555,8 @@
        <el-row>
          <el-col :span="4">商标位置:</el-col>
          <el-col :span="16">
            <el-checkbox v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item"  />
          <el-col :span="25">
            <el-radio v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item"  />
          </el-col>
        </el-row>
north-glass-erp/northglass-erp/src/views/sd/product/SelectProduct.vue
@@ -174,6 +174,7 @@
const xGrid = ref()
const gridOptions = reactive({
  height:'100%',
  loading: true,
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
@@ -229,7 +230,7 @@
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return `页数:${pageNum}/${pageTotal.value}`
          return `${pageNum}/${pageTotal.value}`
        }
        return ''
@@ -354,7 +355,7 @@
    <vxe-grid
        @filter-change="filterChanged"
        max-height="100%"
        height="100%"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -108,6 +108,11 @@
    //插入其他副表数据,被其他方法引用
    public void insertOtherDetail(String orderId,List<OrderDetail> OrderDetails,List<OrderOtherMoney> orderOtherMoneyList) {
        //先把其他金额副表的金额与数量置0
        orderOtherMoneyList.forEach(orderOtherMoney -> {
            orderOtherMoney.setQuantity(0.0);
        });
        //循环给订单明细表字段添加序号和周长
        for (int i = 0; i < OrderDetails.size(); i++) {
            OrderDetails.get(i).setOrderNumber(i+1);
@@ -116,14 +121,17 @@
            OrderDetails.get(i).setWeight(1.0);
            Map<String,Double> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Double>>(){});
            int finalI = i;
            if(otherColumns!=null){
                otherColumns.forEach((key, value) ->{
                    orderOtherMoneyList.forEach(orderOtherMoney ->{
                        if(orderOtherMoney.getColumn().equals(key)){
                            orderOtherMoney.setQuantity (orderOtherMoney.getQuantity()==null?0:orderOtherMoney.getQuantity());
                            orderOtherMoney.setQuantity(((value==null?0:value)*OrderDetails.get(finalI).getQuantity()));
                        }
                    });
                    if(value!=null) {
                        orderOtherMoneyList.forEach(orderOtherMoney -> {
                            if (orderOtherMoney.getColumn().equals(key)) {
                                orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+(value * OrderDetails.get(finalI).getQuantity()));
                            }
                        });
                    }
                });
            }
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -37,7 +37,8 @@
            o.money = ifnull(od.detailAmount,0)+ifnull(c.money,0),
            o.quantity = od.b,
            o.area = od.c,
            o.perimeter= od.aa
            o.perimeter= od.aa,
            o.other_money = ifnull(c.money,0)
        where
            o.order_id = #{orderId}
north-glass-erp/target/classes/mapper/sd/OrderMapper.xml
@@ -37,7 +37,8 @@
            o.money = ifnull(od.detailAmount,0)+ifnull(c.money,0),
            o.quantity = od.b,
            o.area = od.c,
            o.perimeter= od.aa
            o.perimeter= od.aa,
            o.other_money = ifnull(c.money,0)
        where
            o.order_id = #{orderId}