2024年4月22日

input js 只能输入数字和两位小数

摘要: function onlyNumber(obj){ //得到第一个字符是否为负号 var t = obj.value.charAt(0); //先把非数字的都替换掉,除了数字和.和-号 obj.value = obj.value.replace(/[^\d\.]/g,''); //前两位不能是0加数 阅读全文

posted @ 2024-04-22 10:01 磊有三颗小石头 阅读(1) 评论(0) 推荐(0) 编辑

2023年12月12日

input js 只能输入两位小数

摘要: onkeyup="value = (value || '').replace(/[^\d\.]/, '').replace(/^0{1,}(\d+)/, '$1').replace(/^\.{1,}(\d*)/, '$1') .replace(/^(\d+)\.+(\d*)$/, '$1.$2'). 阅读全文

posted @ 2023-12-12 14:02 磊有三颗小石头 阅读(62) 评论(0) 推荐(0) 编辑

2023年11月30日

2024年系统节假日sql

摘要: CREATE TABLE `system_workday` ( `day_id` int(11) NOT NULL AUTO_INCREMENT, `day_day` int(11) DEFAULT NULL COMMENT '时间 年月日', `day_type` int(4) DEFAULT ' 阅读全文

posted @ 2023-11-30 09:51 磊有三颗小石头 阅读(386) 评论(0) 推荐(0) 编辑

2023年11月22日

添加索引 yii获取sql

摘要: //添加索引sqlALTER TABLE `work_map` ADD INDEX idx_wmp_region_id ( `wmp_region_id` ) 仓库工作单方案准备列表,展示角色所配置城市的工作单信息短信消息模版调整 git remote update origin --prune y 阅读全文

posted @ 2023-11-22 17:42 磊有三颗小石头 阅读(10) 评论(0) 推荐(0) 编辑

2023年10月31日

表单数据 转链接参数

摘要: var t = $('#searchForm').serializeArray();var param = '';$.each(t, function() { if (this.name != 'r') { param += '&'+this.name+'='+this.value; }}); 阅读全文

posted @ 2023-10-31 10:07 磊有三颗小石头 阅读(4) 评论(0) 推荐(0) 编辑

2023年10月13日

PHP 日期加月份

摘要: function setMonth($time, $length){ // $time => 时间戳 $length => 加减几月(数字) if (!is_numeric($time)) $time = strtotime($time); if ($length > 0) $length = "+ 阅读全文

posted @ 2023-10-13 15:46 磊有三颗小石头 阅读(24) 评论(0) 推荐(0) 编辑

2023年9月5日

Sublime如何快速格式化JSON文件

摘要: 首先按shift+cmd+p,然后输入install: 然后输入:pretty,我们可以看到很多的格式化语言,选择JSON即可: 回车之后便安装成功,这是可以打开插件控制面板,看一下pretty JSON的配置: 默认的快捷键是:shift+ctrl+J { "use_entire_file_if_ 阅读全文

posted @ 2023-09-05 10:04 磊有三颗小石头 阅读(1070) 评论(0) 推荐(0) 编辑

2023年8月9日

PHPstorm 打开自动闪退

摘要: 删除所以 关于 phpstorm 命名的文件及文件夹 然后重新安装 就好 阅读全文

posted @ 2023-08-09 11:16 磊有三颗小石头 阅读(146) 评论(0) 推荐(0) 编辑

2023年7月14日

yii 框架 Model 映射表 一对多 或 一对一

摘要: public function getTmsOrderTravel(){ // 第一个参数为要关联的子表模型类名, // 第二个参数指定 通过子表的user_id,关联主表的usesr_id字段 // 这里写清楚点大概意思就是User.user_id => Order.user_id return 阅读全文

posted @ 2023-07-14 17:45 磊有三颗小石头 阅读(28) 评论(0) 推荐(0) 编辑

yii 框架 afterSave Model 数据变更 同步数据 处理新增了逻辑

摘要: /** * 来源 * 1.Model::updateAll() * 2.Model::findOne(id)->save() * @param $attributes * @param $condition * @param $params * @return int * @throws \yii\ 阅读全文

posted @ 2023-07-14 17:41 磊有三颗小石头 阅读(68) 评论(0) 推荐(0) 编辑

导航