之前只做过一个发货单据的database,发在米课圈链接如下:
https://ask.imiker.com/question/383571
今天优化了模板,主要实现功能:勾选勾选框之后,可以自动生成现在的进度状态。整体如图:
比如2nd发票发送, 打钩前:
打钩后:最后一栏状态栏自动变化:
具体函数如下:(半角格式,不分行)
2nd date 函数:dateAdd(prop("1st date"), prop("提醒值"), "days")
Status 函数:
if(empty(prop("plant code")) == true, "❓ no data",
if((prop("放BL") and prop("1st Inv") and prop("2nd Inv")) == true, "🔐 已完成/done",
if((dateBetween(prop("2nd date"), now(), "days")) < 0, "⚠️2nd Inv has to be sent",
if((prop("放BL") or prop("1st Inv") or prop("2nd Inv")) == true, "️▶️ Ing/进行中", "👉 To DO"))))
解释和逻辑如下:
2nd date 函数:
dateAdd(prop("1st date"), prop("提醒值"), "days")
dateAdd: 相加,返回日期
Status 函数:
if(empty(prop("plant code")) == true, "❓ no data",
如果 plant code没有, 显示❓ no data
if((prop("放BL") and prop("1st Inv") and prop("2nd Inv")) == true, "🔐 已完成/done",
如果 放BL 和 1st Inv 和 2nd Inv 同时满足,显示🔐 已完成/done
if((dateBetween(prop("2nd date"), now(), "days")) < 0, "⚠️2nd Inv has to be sent",
如果 2nd date 已超时,显示: ⚠️2nd Inv has to be sent
if((prop("放BL") or prop("1st Inv") or prop("2nd Inv")) == true, "️▶️ Ing/进行中", "👉 To DO"))))
如果 放BL 和 1st Inv 和 2nd Inv 有任一项满足,显示 ▶️ Ing/进行中,否则显示 👉 To DO
啦啦啦啦啦啦啦 \(^o^)/~
分享至微信