| | |
| | | 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') ) |
| | | } |
| | | } |
| | | } |
| | |
| | | return count.toFixed(2)==='NaN' ? null : parseFloat(count.toFixed(2)) |
| | | } |
| | | |
| | | //用于接收父组件参数 |
| | | let prop = defineProps({ |
| | | otherMoney:{} |
| | | }) |
| | |
| | | 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 () => { |
| | |
| | | <vxe-grid |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="cellClickEvent" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | /> |
| | | </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 "> |
| | |
| | | |
| | | <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> |
| | | |
| | |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | height:'100%', |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return `页数:${pageNum}/${pageTotal.value}` |
| | | return `${pageNum}/${pageTotal.value}` |
| | | } |
| | | |
| | | return '' |
| | |
| | | |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | max-height="100%" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | |
| | | //插入其他副表数据,被其他方法引用 |
| | | 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); |
| | |
| | | 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())); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | } |
| | |
| | | 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} |
| | | |
| | |
| | | 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} |
| | | |