diff --git a/code/config.go b/code/config.go index 67d12ae..062f34c 100644 --- a/code/config.go +++ b/code/config.go @@ -60,7 +60,7 @@ var ColumnNameType = []ColumnShow{ {"parent_id", true, true, true, false, "", true}, //"sn"{true,true,true,""}, {"status", true, true, true, false, "select", false}, - {"state", false, true, true, false, "select", false}, + {"state", true, true, true, false, "select", false}, {"sex", true, true, true, false, "select", false}, {"delete", false, false, false, false, "", false}, diff --git a/code/makecode.go b/code/makecode.go index ecda328..862ac59 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -593,10 +593,12 @@ func (that *MakeCode) Add(table string, req *http.Request) Map { } } + if v.GetString("name") == "create_time" { data[v.GetString("name")] = time.Now().Unix() continue } + if v.GetString("name") == "modify_time" { data[v.GetString("name")] = time.Now().Unix() } diff --git a/example/admin/init.go b/example/admin/init.go index e1e1e79..c0cbd6c 100644 --- a/example/admin/init.go +++ b/example/admin/init.go @@ -5,7 +5,7 @@ import ( . "../../../hotime/common" ) -var ID = "a549346388b58195866106b5f2072b26" +var ID = "61161bc80c283839d95c99900b8dbb35" // Project 管理端项目 var Project = Proj{ @@ -20,7 +20,6 @@ var Project = Proj{ "produce_material": produce_materialCtr, "produce_product": produce_productCtr, "product": productCtr, - "product_check": product_checkCtr, "product_line": product_lineCtr, "product_spot_check": product_spot_checkCtr, "role": roleCtr, diff --git a/example/app/material_inout.go b/example/app/material_inout.go index 9a4d471..a498647 100644 --- a/example/app/material_inout.go +++ b/example/app/material_inout.go @@ -67,8 +67,13 @@ var material_inoutCtr = Ctr{ "admin_id": adminID, "material_id": materialId}) } + if state == 0 { + + that.Db.Update("material", Map{"count[#]": "count+" + ObjToStr(count), "saved[#]": "saved+" + ObjToStr(count)}, Map{"id": materialId}) + } else { + that.Db.Update("material", Map{"count[#]": "count" + ObjToStr(count), "used[#]": "used+" + ObjToStr(-count)}, Map{"id": materialId}) + } - that.Db.Update("material", Map{"count[#]": "count+" + ObjToStr(count), "saved[#]": "saved+" + ObjToStr(count)}, Map{"id": materialId}) material := that.Db.Get("material", "*", Map{"id": materialId}) data := Map{ "img": img, diff --git a/example/app/produce_product.go b/example/app/produce_product.go index b2320be..8e3a3bd 100644 --- a/example/app/produce_product.go +++ b/example/app/produce_product.go @@ -56,10 +56,10 @@ var produce_productCtr = Ctr{ product_id := ObjToInt(that.Req.FormValue("product_id")) produce_id := ObjToInt(that.Req.FormValue("produce_id")) product_line_id := ObjToInt(that.Req.FormValue("product_line_id")) - state := ObjToInt(that.Req.FormValue("state")) - rule_check := that.Req.FormValue("rule_check") - description := that.Req.FormValue("description") - if sn == "" || rule_check == "" { + //state := ObjToInt(that.Req.FormValue("state")) + //rule_check := that.Req.FormValue("rule_check") + //description := that.Req.FormValue("description") + if sn == "" { that.Display(3, "参数不足,请补充参数") return } @@ -82,15 +82,15 @@ var produce_productCtr = Ctr{ } //data["id"] = id - data["rule"] = rule_check - data["produce_product_id"] = id - data["state"] = state - data["description"] = description - id = that.Db.Insert("product_check", data) - if id == 0 { - that.Display(4, "添加质检失败,请重新添加") - return - } + //data["rule"] = rule_check + //data["produce_product_id"] = id + //data["state"] = state + //data["description"] = description + //id = that.Db.Insert("product_check", data) + //if id == 0 { + // that.Display(4, "添加质检失败,请重新添加") + // return + //} that.Display(0, data) }, } diff --git a/example/app/product_spot_check.go b/example/app/product_spot_check.go index a15ffd1..04e23a6 100644 --- a/example/app/product_spot_check.go +++ b/example/app/product_spot_check.go @@ -58,14 +58,21 @@ var product_spot_checkCtr = Ctr{ } produceProduct := that.Db.Get("produce_product", "*", Map{"id": produceProductId}) + if produceProduct == nil { + that.Display(4, "找不到成品记录,无法进行抽检") + return + } + //判断是否已经抽检了 + alreadyCheck := that.Db.Get("product_spot_check", "id", Map{"produce_product_id": produceProductId}) - that.Db.Update("product", Map{"spot_check_count[#]": "spot_check_count+1", - "spot_check_saved[#]": "spot_check_saved+1"}, - Map{"id": produceProduct.GetCeilInt("product_id")}) + if alreadyCheck == nil { - that.Db.Update("produce", Map{"spot_check_count[#]": "spot_check_count+1", - "spot_check_saved[#]": "spot_check_saved+1"}, - Map{"id": produceProduct.GetCeilInt("produce_id")}) + that.Db.Update("product", Map{"spot_check_count[#]": "spot_check_count+1"}, + Map{"id": produceProduct.GetCeilInt("product_id")}) + + that.Db.Update("produce", Map{"spot_check_count[#]": "spot_check_count+1"}, + Map{"id": produceProduct.GetCeilInt("produce_id")}) + } data := Map{ "sn": sn, diff --git a/example/config/app.json b/example/config/app.json deleted file mode 100644 index 24dc91d..0000000 --- a/example/config/app.json +++ /dev/null @@ -1,3552 +0,0 @@ -{ - "id": "a549346388b58195866106b5f2072b26", - "label": "HoTime管理平台", - "menus": [ - { - "icon": "el-icon-s-home", - "label": "平台首页", - "name": "HelloWorld" - }, - { - "icon": "el-icon-setting", - "label": "生产成品", - "menus": [ - { - "label": "生产成品", - "table": "produce_product" - }, - { - "label": "生产计划", - "table": "produce" - }, - { - "label": "消耗原材料", - "table": "produce_material" - }, - { - "label": "生产计划", - "table": "produce" - }, - { - "label": "生产计划", - "table": "produce" - }, - { - "label": "生产计划", - "table": "produce" - }, - { - "label": "生产计划", - "table": "produce" - } - ], - "name": "sys:produce" - }, - { - "icon": "el-icon-setting", - "label": "系统管理", - "menus": [ - { - "label": "客户管理", - "table": "user" - }, - { - "label": "部门管理", - "table": "org" - }, - { - "label": "人员管理", - "table": "admin" - }, - { - "label": "事项管理", - "table": "category" - }, - { - "label": "角色管理", - "table": "role" - }, - { - "label": "炉温监控", - "table": "furnace_temperature" - }, - { - "label": "排号计划", - "table": "ctg_order_date" - }, - { - "label": "预约订单", - "table": "order" - } - ], - "name": "sys" - }, - { - "icon": "el-icon-setting", - "label": "抽检管理", - "menus": [ - { - "label": "抽检管理", - "table": "product_spot_check" - }, - { - "label": "成品管理", - "table": "product" - }, - { - "label": "质检管理", - "table": "product_check" - }, - { - "label": "产线管理", - "table": "product_line" - }, - { - "label": "成品管理", - "table": "product" - }, - { - "label": "成品管理", - "table": "product" - }, - { - "label": "成品管理", - "table": "product" - }, - { - "label": "成品管理", - "table": "product" - } - ], - "name": "sys:product" - }, - { - "icon": "el-icon-setting", - "label": "原材料管理", - "menus": [ - { - "label": "原材料管理", - "table": "material" - }, - { - "label": "出入库管理", - "table": "material_inout" - }, - { - "label": "原材料管理", - "table": "material" - }, - { - "label": "原材料管理", - "table": "material" - }, - { - "label": "原材料管理", - "table": "material" - }, - { - "label": "原材料管理", - "table": "material" - } - ], - "name": "sys:material" - }, - { - "icon": "el-icon-setting", - "label": "办理订单", - "menus": [ - { - "label": "办理订单", - "table": "matter_order" - }, - { - "label": "办理事项", - "table": "matter" - }, - { - "label": "办理事项", - "table": "matter" - }, - { - "label": "办理事项", - "table": "matter" - } - ], - "name": "sys:matter" - } - ], - "name": "admin", - "tables": { - "admin": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "label": "手机号", - "name": "phone", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "info": false, - "label": "密码", - "list": false, - "must": false, - "name": "password", - "type": "password" - }, - { - "label": "头像", - "list": false, - "must": false, - "name": "avatar_img", - "type": "image" - }, - { - "label": "角色", - "link": "role", - "name": "role_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "人员管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "type": "tree", - "value": "name" - } - ], - "table": "admin" - }, - "category": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "label": "排序 序号越大越排前面", - "list": false, - "must": false, - "name": "sort", - "sortable": true, - "type": "number" - }, - { - "label": "归属专区", - "link": "category", - "must": false, - "name": "parent_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "创建人员", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "info": false, - "label": "索引", - "list": false, - "must": false, - "name": "index", - "notUse": true, - "type": "index" - }, - { - "label": "周一上午", - "name": "am1", - "sortable": true, - "type": "number" - }, - { - "label": "周二上午", - "name": "am2", - "sortable": true, - "type": "number" - }, - { - "label": "周三上午", - "name": "am3", - "sortable": true, - "type": "number" - }, - { - "label": "周四上午", - "name": "am4", - "sortable": true, - "type": "number" - }, - { - "label": "周五上午", - "name": "am5", - "sortable": true, - "type": "number" - }, - { - "label": "周一下午", - "name": "pm1", - "sortable": true, - "type": "number" - }, - { - "label": "周二下午", - "name": "pm2", - "sortable": true, - "type": "number" - }, - { - "label": "周三下午", - "name": "pm3", - "sortable": true, - "type": "number" - }, - { - "label": "周四下午", - "name": "pm4", - "sortable": true, - "type": "number" - }, - { - "label": "周五下午", - "name": "pm5", - "sortable": true, - "type": "number" - }, - { - "label": "办理地址", - "list": false, - "must": false, - "name": "address", - "type": "text" - }, - { - "label": "叫号起始号", - "name": "startnum", - "sortable": true, - "type": "number" - }, - { - "label": "办理窗口", - "name": "window", - "type": "text" - }, - { - "label": "天府通办APP端", - "must": true, - "name": "tftbapp", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - } - ], - "sortable": true, - "type": "select" - }, - { - "label": "天府通办web端", - "must": true, - "name": "tftbweb", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - } - ], - "sortable": true, - "type": "select" - }, - { - "label": "图标", - "list": false, - "must": false, - "name": "icon", - "type": "image" - } - ], - "label": "事项管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "归属专区", - "link": "category", - "name": "parent_id", - "type": "tree", - "value": "name" - }, - { - "label": "部门", - "link": "org", - "name": "org_id", - "type": "tree", - "value": "name" - }, - { - "label": "天府通办APP端", - "must": true, - "name": "tftbapp", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - }, - { - "label": "天府通办web端", - "must": true, - "name": "tftbweb", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - } - ], - "table": "category" - }, - "ctg_order_date": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "预约日期", - "name": "date", - "type": "time" - }, - { - "label": "排号起始数", - "name": "start_sn", - "sortable": true, - "type": "number" - }, - { - "label": "排号结束号", - "name": "max_sn", - "sortable": true, - "type": "number" - }, - { - "label": "当前排号", - "name": "now_sn", - "sortable": true, - "type": "number" - }, - { - "label": "类别", - "link": "category", - "name": "category_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "排号计划", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "类别", - "link": "category", - "name": "category_id", - "type": "tree", - "value": "name" - } - ], - "table": "ctg_order_date" - }, - "furnace_temperature": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "日期", - "name": "name", - "type": "text" - }, - { - "label": "炉温照片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "产线", - "link": "product_line", - "name": "product_line_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "炉温监控", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "furnace_temperature" - }, - "material": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "原材料名称", - "name": "name", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "当前数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "总消耗数", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "总存储数", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "默认添加数量", - "name": "num", - "sortable": true, - "type": "number" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "基本信息", - "list": false, - "must": false, - "name": "rule", - "type": "form" - }, - { - "label": "有效期", - "must": true, - "name": "validity", - "options": [ - { - "name": "半年", - "value": "0" - }, - { - "name": "一年", - "value": "1" - }, - { - "name": "两年", - "value": "2" - }, - { - "name": "三年", - "value": "3" - } - ], - "sortable": true, - "type": "select" - }, - { - "label": "识别数据", - "list": false, - "must": false, - "name": "content", - "type": "text" - }, - { - "label": "备注信息", - "list": false, - "must": false, - "name": "description", - "type": "text" - } - ], - "label": "原材料管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "有效期", - "must": true, - "name": "validity", - "options": [ - { - "name": "半年", - "value": "0" - }, - { - "name": "一年", - "value": "1" - }, - { - "name": "两年", - "value": "2" - }, - { - "name": "三年", - "value": "3" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - } - ], - "table": "material" - }, - "material_inout": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "出入库数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "剩余数量", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "对应原材料", - "link": "material", - "name": "material_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "入库", - "value": "0" - }, - { - "name": "出库", - "value": "1" - }, - { - "name": "退货", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "基础信息", - "list": false, - "must": false, - "name": "rule", - "type": "form" - }, - { - "label": "关联生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "识别信息", - "list": false, - "must": false, - "name": "content", - "type": "text" - }, - { - "label": "备注信息", - "list": false, - "must": false, - "name": "description", - "type": "text" - } - ], - "label": "出入库管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "入库", - "value": "0" - }, - { - "name": "出库", - "value": "1" - }, - { - "name": "退货", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "material_inout" - }, - "matter": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "办理地址", - "list": false, - "must": false, - "name": "address", - "type": "text" - }, - { - "label": "业务名称", - "name": "name", - "type": "text" - }, - { - "label": "排序 序号越大越排前面", - "list": false, - "must": false, - "name": "sort", - "sortable": true, - "type": "number" - }, - { - "label": "归属专区", - "link": "matter", - "must": false, - "name": "parent_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "创建人员", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "天府通办APP端", - "must": true, - "name": "tftbapp", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - } - ], - "sortable": true, - "type": "select" - }, - { - "label": "天府通办web端", - "must": true, - "name": "tftbweb", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - } - ], - "sortable": true, - "type": "select" - }, - { - "label": "图标", - "list": false, - "must": false, - "name": "icon", - "type": "image" - }, - { - "label": "关联部门", - "link": "org", - "name": "org_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "info": false, - "label": "索引", - "list": false, - "must": false, - "name": "index", - "notUse": true, - "type": "index" - }, - { - "label": "表单", - "list": false, - "must": false, - "name": "rule", - "type": "form" - } - ], - "label": "办理事项", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "天府通办APP端", - "must": true, - "name": "tftbapp", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - }, - { - "label": "天府通办web端", - "must": true, - "name": "tftbweb", - "options": [ - { - "name": "未启用", - "value": "0" - }, - { - "name": "已启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "归属专区", - "link": "matter", - "name": "parent_id", - "type": "tree", - "value": "name" - }, - { - "label": "关联部门", - "link": "org", - "name": "org_id", - "type": "tree", - "value": "name" - } - ], - "table": "matter" - }, - "matter_order": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "办理事项", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "办理用户", - "link": "user", - "name": "user_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "办结时间", - "name": "finish_time", - "type": "time" - }, - { - "label": "办理事项", - "link": "matter", - "name": "matter_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "办理状态", - "must": true, - "name": "status", - "options": [ - { - "name": "待分配", - "value": "0" - }, - { - "name": "待办结", - "value": "1" - }, - { - "name": "已办结", - "value": "2" - }, - { - "name": "已逾期", - "value": "3" - }, - { - "name": "异常", - "value": "4" - } - ], - "type": "select" - }, - { - "label": "办事员", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "表单信息", - "list": false, - "must": false, - "name": "rule", - "type": "form" - } - ], - "label": "办理订单", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "办理状态", - "must": true, - "name": "status", - "options": [ - { - "name": "待分配", - "value": "0" - }, - { - "name": "待办结", - "value": "1" - }, - { - "name": "已办结", - "value": "2" - }, - { - "name": "已逾期", - "value": "3" - }, - { - "name": "异常", - "value": "4" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "办理事项", - "link": "matter", - "name": "matter_id", - "type": "tree", - "value": "name" - } - ], - "table": "matter_order" - }, - "order": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "预约时间", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "预约用户", - "link": "user", - "name": "user_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "预约日期", - "name": "date", - "type": "time" - }, - { - "label": "排号", - "name": "sn", - "sortable": true, - "type": "number" - }, - { - "label": "预约分类", - "link": "category", - "name": "category_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "预约状态", - "must": true, - "name": "status", - "options": [ - { - "name": "待分配", - "value": "0" - }, - { - "name": "待办结", - "value": "1" - }, - { - "name": "已办结", - "value": "2" - }, - { - "name": "已逾期", - "value": "3" - }, - { - "name": "异常", - "value": "4" - } - ], - "type": "select" - }, - { - "label": "办事员", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "预约订单", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "预约状态", - "must": true, - "name": "status", - "options": [ - { - "name": "待分配", - "value": "0" - }, - { - "name": "待办结", - "value": "1" - }, - { - "name": "已办结", - "value": "2" - }, - { - "name": "已逾期", - "value": "3" - }, - { - "name": "异常", - "value": "4" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "预约分类", - "link": "category", - "name": "category_id", - "type": "tree", - "value": "name" - } - ], - "table": "order" - }, - "org": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "编号", - "name": "sn", - "type": "text" - }, - { - "label": "组织名称", - "name": "name", - "type": "text" - }, - { - "label": "上级组织", - "link": "org", - "must": false, - "name": "parent_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "add": false, - "edit": false, - "label": "注册时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "创建用户", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "info": false, - "label": "索引 格式为逗号分隔,1,2,", - "list": false, - "must": false, - "name": "index", - "notUse": true, - "type": "index" - } - ], - "label": "部门管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, - { - "label": "上级组织", - "link": "org", - "name": "parent_id", - "type": "tree", - "value": "name" - } - ], - "table": "org" - }, - "produce": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "二维码起始编码", - "name": "sn", - "type": "text" - }, - { - "label": "计划名", - "name": "name", - "type": "text" - }, - { - "label": "对应成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "客户", - "link": "user", - "name": "user_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "开始时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已完成", - "value": "0" - }, - { - "name": "待生产", - "value": "1" - }, - { - "name": "生产中", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "计划生产总量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "当前已生产", - "name": "now", - "sortable": true, - "type": "number" - }, - { - "label": "计划完成时间", - "name": "finish_time", - "type": "time" - }, - { - "label": "其他规则", - "list": false, - "must": false, - "name": "rule", - "type": "form" - }, - { - "label": "抽检覆盖量", - "name": "spot_check_count", - "sortable": true, - "type": "number" - }, - { - "label": "发货抽检总覆盖量", - "name": "spot_check_used", - "sortable": true, - "type": "number" - }, - { - "label": "总抽检总覆盖量", - "name": "spot_check_saved", - "sortable": true, - "type": "number" - } - ], - "label": "生产计划", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已完成", - "value": "0" - }, - { - "name": "待生产", - "value": "1" - }, - { - "name": "生产中", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "produce" - }, - "produce_material": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "原材料", - "link": "material", - "name": "material_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "计划使用数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "已使用数量", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "消耗原材料", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "produce_material" - }, - "produce_product": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "炉温", - "link": "furnace_temperature", - "name": "furnace_temperature_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "生产线", - "link": "product_line", - "name": "product_line_id", - "sortable": true, - "type": "number", - "value": "name" - } - ], - "label": "生产成品", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "生产状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "produce_product" - }, - "product": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "成品名称", - "name": "name", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "当前数量", - "name": "count", - "sortable": true, - "type": "number" - }, - { - "label": "总发货量", - "name": "used", - "sortable": true, - "type": "number" - }, - { - "label": "总生产量", - "name": "saved", - "sortable": true, - "type": "number" - }, - { - "label": "抽检覆盖量", - "name": "spot_check_count", - "sortable": true, - "type": "number" - }, - { - "label": "发货抽检总覆盖量", - "name": "spot_check_used", - "sortable": true, - "type": "number" - }, - { - "label": "总抽检总覆盖量", - "name": "spot_check_saved", - "sortable": true, - "type": "number" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "抽检参数", - "list": false, - "must": false, - "name": "rule_spot_check", - "type": "form" - }, - { - "label": "抽检百分比", - "list": false, - "must": false, - "name": "spot_check_percentage", - "sortable": true, - "type": "number" - }, - { - "label": "质检参数", - "list": false, - "must": false, - "name": "rule_check", - "type": "form" - } - ], - "label": "成品管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product" - }, - "product_check": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "生产成品", - "link": "produce_product", - "name": "produce_product_id", - "sortable": true, - "type": "number", - "value": "sn" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "质检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "基本信息", - "list": false, - "must": false, - "name": "rule", - "type": "form" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "成品名称", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "备注信息", - "list": false, - "must": false, - "name": "description", - "type": "text" - } - ], - "label": "质检管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "质检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product_check" - }, - "product_line": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "扫码枪ip地址", - "name": "ipaddr", - "type": "text" - } - ], - "label": "产线管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product_line" - }, - "product_spot_check": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "图片", - "list": false, - "must": false, - "name": "img", - "type": "image" - }, - { - "label": "成品", - "link": "product", - "name": "product_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "经办人", - "link": "admin", - "name": "admin_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "抽检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "基本信息", - "list": false, - "must": false, - "name": "rule", - "type": "form" - }, - { - "label": "生产计划", - "link": "produce", - "name": "produce_id", - "sortable": true, - "type": "number", - "value": "name" - }, - { - "label": "生产成品", - "link": "produce_product", - "name": "produce_product_id", - "sortable": true, - "type": "number", - "value": "sn" - }, - { - "label": "备注信息", - "list": false, - "must": false, - "name": "description", - "type": "text" - } - ], - "label": "抽检管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "抽检结论", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "其他", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "product_spot_check" - }, - "role": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "名称", - "name": "name", - "type": "text" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "规则", - "list": false, - "must": false, - "name": "rule", - "type": "form" - } - ], - "label": "角色管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "role" - }, - "user": { - "auth": [ - "add", - "delete", - "edit", - "info" - ], - "columns": [ - { - "add": false, - "edit": false, - "label": "ID", - "must": false, - "name": "id", - "sortable": true, - "type": "number" - }, - { - "label": "SN", - "name": "sn", - "type": "text" - }, - { - "label": "用户姓名", - "name": "name", - "type": "text" - }, - { - "label": "公司名称", - "name": "company", - "type": "text" - }, - { - "label": "手机号码", - "name": "phone", - "type": "text" - }, - { - "label": "邮箱", - "list": false, - "must": false, - "name": "email", - "type": "text" - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "隐藏", - "value": "2" - } - ], - "type": "select" - }, - { - "label": "头像", - "list": false, - "must": false, - "name": "avatar", - "type": "image" - }, - { - "add": false, - "edit": false, - "label": "创建时间", - "list": false, - "must": false, - "name": "create_time", - "type": "time" - }, - { - "add": false, - "edit": false, - "label": "变更时间", - "must": false, - "name": "modify_time", - "type": "time" - }, - { - "label": "身份证号", - "list": false, - "must": false, - "name": "idcard", - "type": "text" - } - ], - "label": "客户管理", - "search": [ - { - "label": "请输入关键词", - "name": "keyword", - "type": "search", - "value": null - }, - { - "label": "时间段", - "name": "daterange", - "type": "search", - "value": null - }, - { - "label": "排序", - "name": "sort", - "type": "search", - "value": null - }, - { - "label": "状态", - "list": false, - "must": true, - "name": "state", - "options": [ - { - "name": "正常", - "value": "0" - }, - { - "name": "异常", - "value": "1" - }, - { - "name": "隐藏", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - } - ], - "table": "user" - } - } -} \ No newline at end of file diff --git a/example/main.go b/example/main.go index c11b09e..62e4a1e 100644 --- a/example/main.go +++ b/example/main.go @@ -331,6 +331,9 @@ func Process(conn net.Conn, appIns *hotime.Application) { fmt.Println(client, sn, "添加新成品失败,请重新添加") // 读到了n个数据 continue } + + appIns.Db.Update("product", common.Map{"count[#]": "`count`+1"}, common.Map{"id": produce.GetCeilInt("product_id")}) + appIns.Db.Update("produce", common.Map{"now[#]": "`now`+1"}, common.Map{"id": produce.GetCeilInt("id")}) } }