Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | "qrcode": "^1.5.3", |
| | | "sortablejs": "^1.15.1", |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | |
| | | } |
| | | }, |
| | | "node_modules/@types/sortablejs": { |
| | | "version": "1.15.7", |
| | | "resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.7.tgz", |
| | | "integrity": "sha512-PvgWCx1Lbgm88FdQ6S7OGvLIjWS66mudKPlfdrWil0TjsO5zmoZmzoKiiwRShs1dwPgrlkr0N4ewuy0/+QUXYQ==", |
| | | "dev": true |
| | | "version": "1.15.8", |
| | | "resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.8.tgz", |
| | | "integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==" |
| | | }, |
| | | "node_modules/@types/web-bluetooth": { |
| | | "version": "0.0.16", |
| | |
| | | "@vue/shared": "3.3.4" |
| | | } |
| | | }, |
| | | "node_modules/vue-draggable-plus": { |
| | | "version": "0.5.0", |
| | | "resolved": "https://registry.npmmirror.com/vue-draggable-plus/-/vue-draggable-plus-0.5.0.tgz", |
| | | "integrity": "sha512-A5TT5+M5JceROSjPO9aDZTsrSN1TetEs419czPlboomarSiGIBIxTp2WD7XH53EHMrbO7Qo+leRiHWV/rMlyjA==", |
| | | "dependencies": { |
| | | "@types/sortablejs": "^1.15.8" |
| | | }, |
| | | "peerDependencies": { |
| | | "@types/sortablejs": "^1.15.0" |
| | | }, |
| | | "peerDependenciesMeta": { |
| | | "@vue/composition-api": { |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/vue-i18n": { |
| | | "version": "9.10.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.10.1.tgz", |
| | |
| | | } |
| | | }, |
| | | "@types/sortablejs": { |
| | | "version": "1.15.7", |
| | | "resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.7.tgz", |
| | | "integrity": "sha512-PvgWCx1Lbgm88FdQ6S7OGvLIjWS66mudKPlfdrWil0TjsO5zmoZmzoKiiwRShs1dwPgrlkr0N4ewuy0/+QUXYQ==", |
| | | "dev": true |
| | | "version": "1.15.8", |
| | | "resolved": "https://registry.npmmirror.com/@types/sortablejs/-/sortablejs-1.15.8.tgz", |
| | | "integrity": "sha512-b79830lW+RZfwaztgs1aVPgbasJ8e7AXtZYHTELNXZPsERt4ymJdjV4OccDbHQAvHrCcFpbF78jkm0R6h/pZVg==" |
| | | }, |
| | | "@types/web-bluetooth": { |
| | | "version": "0.0.16", |
| | |
| | | "@vue/shared": "3.3.4" |
| | | } |
| | | }, |
| | | "vue-draggable-plus": { |
| | | "version": "0.5.0", |
| | | "resolved": "https://registry.npmmirror.com/vue-draggable-plus/-/vue-draggable-plus-0.5.0.tgz", |
| | | "integrity": "sha512-A5TT5+M5JceROSjPO9aDZTsrSN1TetEs419czPlboomarSiGIBIxTp2WD7XH53EHMrbO7Qo+leRiHWV/rMlyjA==", |
| | | "requires": { |
| | | "@types/sortablejs": "^1.15.8" |
| | | } |
| | | }, |
| | | "vue-i18n": { |
| | | "version": "9.10.1", |
| | | "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.10.1.tgz", |
| | |
| | | "qrcode": "^1.5.3", |
| | | "sortablejs": "^1.15.1", |
| | | "vue": "^3.3.4", |
| | | "vue-draggable-plus": "^0.5.0", |
| | | "vue-i18n": "^9.10.1", |
| | | "vue-router": "^4.2.4", |
| | | "vxe-table": "^4.5.15", |
| | |
| | | } |
| | | /*滚动条整体部分*/ |
| | | .mytable-scrollbar ::-webkit-scrollbar { |
| | | width: 10px; |
| | | height: 10px; |
| | | width: 15px; |
| | | height: 15px; |
| | | } |
| | | /*滚动条的轨道*/ |
| | | .mytable-scrollbar ::-webkit-scrollbar-track { |
| | |
| | | otherMoney:{} |
| | | }) |
| | | onMounted(()=>{ |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | xGrid.value.reloadData(prop.otherMoney.filter(item => item.column.indexOf('M')>-1)) |
| | | }) |
| | | watch(prop,(newVal)=>{ |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | xGrid.value.reloadData(prop.otherMoney.filter(item => item.column.indexOf('M')>-1)) |
| | | }) |
| | | |
| | | const countAmount = (row) => { |
| | |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | otherMoney.value =res.data.orderOtherMoneyList.filter(item => item.column.indexOf('M')>-1) |
| | | //加载副表数据 |
| | | xGrid.value.reloadData(orderDetails) |
| | | gridOptions.loading = false |
| | |
| | | otherMoney.value.forEach(item => { |
| | | let column = { |
| | | field: `otherColumns.${item.column}`, |
| | | width:50, title: item.alias, |
| | | width:100, |
| | | title: item.alias, |
| | | editRender: { |
| | | name: 'input', |
| | | } |
| | | } |
| | | //判断 其他列是否是数字 |
| | | if(item.column.indexOf('M')>-1){ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { |
| | | validator ({ cellValue }) { |
| | |
| | | } |
| | | } |
| | | ] |
| | | }else{ |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { required: false}, |
| | | { min: 0, max: 255, message: t('basicData.msg.max255') } |
| | | ] |
| | | } |
| | | |
| | | //columns.push(column) |
| | | gridOptions.columns.push(column) |
| | |
| | | const checkPassword = (rule: any, value: any, callback: any) => { |
| | | if (value.trim() === '') { |
| | | callback(new Error('新密码不能为空')) |
| | | }else if(value.length>16 || value.length<5){ |
| | | callback(new Error('密码长度不能低于5或超过16')) |
| | | }else if(value.length>16 || value.length<6){ |
| | | callback(new Error('密码长度不能低于6或超过16')) |
| | | }else{ |
| | | callback() |
| | | } |
| | |
| | | callback(new Error('确认密码不能为空')) |
| | | }else if(value !== register.password){ |
| | | callback(new Error('两次密码不相同')) |
| | | }else if(value.length>16 || value.length<5){ |
| | | callback(new Error('密码长度不能低于5或超过16')) |
| | | }else if(value.length>16 || value.length<6){ |
| | | callback(new Error('密码长度不能低于6或超过16')) |
| | | }else{ |
| | | callback() |
| | | } |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #main-div{ |
| | | width: 1000px; |
| | | height: 600px; |
| | | margin: auto; |
| | | } |
| | | h2{ |
| | | text-align: center; |
| | | width: 100vw; |
| | |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/userPassWord/updateUserPassWord' }">修改密码</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/order/createOrder' }">{{$t('basicData.create')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.BasicOtherMoney; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.mapper.sd.BasicDateMapper; |
| | | import com.example.erp.mapper.sd.BasicOtherMoneyMapper; |
| | |
| | | orderBasicDataMap.get("customer").add(customer); |
| | | } |
| | | |
| | | orderBasicDataMap.put("orderOtherMoney", Collections.singletonList(basicOtherMoneyMapper.selectList(null))); |
| | | orderBasicDataMap.put("orderOtherMoney", |
| | | Collections.singletonList( |
| | | basicOtherMoneyMapper.selectList(new QueryWrapper<BasicOtherMoney>().eq("state",1)) |
| | | )); |
| | | |
| | | |
| | | //返回Map对象 |
| | |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(orderJson.get("title")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("detail")), OrderDetail.class); |
| | | List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(orderJson.get("otherMoney")), OrderOtherMoney.class); |
| | | |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | |
| | | //删除其他金额明细表 |
| | | orderOtherMoneyMapper.delete(new LambdaQueryWrapper<OrderOtherMoney>().eq(OrderOtherMoney::getOrderId, order.getOrderId())); |
| | | |
| | | |
| | | //删除订单工艺表 |
| | | // orderProcessDetailMapper.delete(new LambdaQueryWrapper<OrderProcessDetail>().eq(OrderProcessDetail::getOrderId, order.getOrderId())); |
| | | insertOtherDetail(order.getOrderId(),OrderDetails,orderOtherMoneyList); |
| | |
| | | |
| | | //插入其他副表数据,被其他方法引用 |
| | | public void insertOtherDetail(String orderId,List<OrderDetail> OrderDetails,List<OrderOtherMoney> orderOtherMoneyList) { |
| | | |
| | | //先把其他金额副表的金额与数量置0 |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | orderOtherMoney.setQuantity(0.0); |
| | |
| | | OrderDetails.get(i).setOrderId(orderId); |
| | | OrderDetails.get(i).setPerimeter(OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()*2/1000); |
| | | OrderDetails.get(i).setWeight(1.0); |
| | | Map<String,Double> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Double>>(){}); |
| | | Map<String,Object> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Object>>(){}); |
| | | int finalI = i; |
| | | |
| | | |
| | | if(otherColumns!=null){ |
| | | otherColumns.forEach((key, value) ->{ |
| | | if(value!=null) { |
| | | if(value!=null && key.contains("M")) { |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | if (orderOtherMoney.getColumn().equals(key)) { |
| | | orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+(value * OrderDetails.get(finalI).getQuantity())); |
| | | orderOtherMoney.setQuantity(orderOtherMoney.getQuantity()+(Double.parseDouble((String) value) * OrderDetails.get(finalI).getQuantity())); |
| | | } |
| | | }); |
| | | } |