This commit is contained in:
hoteas 2021-12-17 01:21:08 +08:00
parent 6b8f901163
commit 8380b097b2
5 changed files with 44 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import (
. "../../../hotime/common" . "../../../hotime/common"
) )
var ID = "a6467964bfe64def9cd247c226e6d49b" var ID = "002842c27c0a29c2109f3b726c130e65"
// Project 管理端项目 // Project 管理端项目
var Project = Proj{ var Project = Proj{

View File

@ -59,6 +59,15 @@ var material_inoutCtr = Ctr{
count = -count count = -count
} }
produce_material := that.Db.Get("produce_material", "id", Map{"AND": Map{"produce_id": produceId, "material_id": materialId}})
if produce_material == nil {
that.Db.Insert("produce_material", Map{"produce_id": produceId,
"create_time": time.Now().Unix(),
"modify_time": time.Now().Unix(),
"admin_id": adminID,
"material_id": materialId})
}
that.Db.Update("material", Map{"count[#]": "count+" + ObjToStr(count), "saved[#]": "saved+" + 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}) material := that.Db.Get("material", "*", Map{"id": materialId})
data := Map{ data := Map{

View File

@ -1,5 +1,5 @@
{ {
"id": "a6467964bfe64def9cd247c226e6d49b", "id": "002842c27c0a29c2109f3b726c130e65",
"label": "HoTime管理平台", "label": "HoTime管理平台",
"menus": [ "menus": [
{ {
@ -54,6 +54,14 @@
"label": "生产成品", "label": "生产成品",
"table": "produce_product" "table": "produce_product"
}, },
{
"label": "生产计划",
"table": "produce"
},
{
"label": "生产计划",
"table": "produce"
},
{ {
"label": "生产计划", "label": "生产计划",
"table": "produce" "table": "produce"
@ -81,6 +89,14 @@
"label": "抽检管理", "label": "抽检管理",
"table": "product_spot_check" "table": "product_spot_check"
}, },
{
"label": "成品管理",
"table": "product"
},
{
"label": "成品管理",
"table": "product"
},
{ {
"label": "成品管理", "label": "成品管理",
"table": "product" "table": "product"
@ -100,6 +116,14 @@
"label": "出入库管理", "label": "出入库管理",
"table": "material_inout" "table": "material_inout"
}, },
{
"label": "原材料管理",
"table": "material"
},
{
"label": "原材料管理",
"table": "material"
},
{ {
"label": "原材料管理", "label": "原材料管理",
"table": "material" "table": "material"
@ -1383,6 +1407,14 @@
} }
], ],
"type": "select" "type": "select"
},
{
"label": "经办人",
"link": "admin",
"name": "admin_id",
"sortable": true,
"type": "number",
"value": "name"
} }
], ],
"label": "消耗原材料", "label": "消耗原材料",

View File

@ -24,7 +24,7 @@
"db": { "db": {
"mysql": { "mysql": {
"host": "192.168.6.253", "host": "192.168.6.253",
"name": "myhs_remote", "name": "myhs",
"password": "dasda8454456", "password": "dasda8454456",
"port": "3306", "port": "3306",
"prefix": "", "prefix": "",

Binary file not shown.