web_mtrl_choose.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <select>
  3. <selectstr>
  4. SELECT
  5. u_mtrl_price.mtrlid,
  6. u_mtrl_price.mtrltype,
  7. u_mtrl_price.name AS mtrlname,
  8. u_mtrl_price.priceunit,
  9. u_mtrl_price.shrinkage AS price,
  10. u_mtrl_price.gram_weight,
  11. u_mtrl_price.cloth_width,
  12. u_mtrl_price.if_inputqty,
  13. u_mtrl_price.if_areaprice,
  14. u_mtrl_price.if_subspecs,
  15. u_mtrl_price.thickness,
  16. u_mtrl_price.dscrp,
  17. u_mtrl_price.createtime,
  18. u_mtrl_price.createby,
  19. ISNULL(u_mtrl_price_pricelist.price, 0) AS pricelistprice,
  20. ISNULL(u_mtrl_price_pricelist.price_formula, '') AS price_formula,
  21. u_mtrl_price.erp_mtrlid,
  22. u_mtrl_price.extra_cost,
  23. u_mtrldef.mtrlcode AS erp_mtrlcode,
  24. u_mtrldef.mtrlname AS erp_mtrlname,
  25. u_mtrldef.mtrlmode AS erp_mtrlmode,
  26. u_mtrldef.unit AS erp_unit,
  27. u_mtrldef.mtrlengname AS erp_mtrlengname
  28. FROM u_mtrl_price
  29. LEFT JOIN u_mtrl_price_pricelist ON u_mtrl_price.mtrlid = u_mtrl_price_pricelist.mtrlid
  30. LEFT JOIN u_mtrldef ON u_mtrl_price.erp_mtrlid = u_mtrldef.mtrlid
  31. </selectstr>
  32. <where>
  33. <when notnull="@keyword">
  34. u_mtrl_price.name like '%'+ @keyword + '%' OR u_mtrl_price.dscrp like '%'+ @keyword + '%' OR u_mtrl_price.mtrlid like '%'+ @keyword + '%'
  35. </when>
  36. <when>
  37. u_mtrl_price.isuse = 1
  38. </when>
  39. <when>
  40. u_mtrl_price.lastdate >= GETDATE()
  41. </when>
  42. <when notnull="@arg_mtrltype">
  43. u_mtrl_price.mtrltype = @arg_mtrltype
  44. OR ( @arg_mtrltype = 200 AND u_mtrl_price.mtrlid IN (8727, 8728, 47414) )
  45. </when>
  46. <when notnull="@arg_pricelistid">
  47. u_mtrl_price_pricelist.pricelistid = @arg_pricelistid
  48. OR u_mtrl_price.mtrlid NOT IN (SELECT mtrlid FROM u_mtrl_price_pricelist WHERE pricelistid = @arg_pricelistid)
  49. </when>
  50. <when notnull="@arg_mtrlid">
  51. u_mtrl_price.mtrlid = @arg_mtrlid
  52. </when>
  53. </where>
  54. <displayfields>
  55. <field field="pid" compute="getrow()">序</field>
  56. <field field="mtrlname">名称</field>
  57. <field field="thickness">厚度</field>
  58. <field field="priceunit">单位</field>
  59. <field field="pricelistprice" funcid="96">单价</field>
  60. <field field="extra_cost" datatype="number">特殊工艺费用</field>
  61. <field field="dscrp" table="u_mtrl_price">备注</field>
  62. <field field="erp_mtrlcode">L1编码</field>
  63. <field field="erp_mtrlname">L1名称</field>
  64. <field field="erp_mtrlmode">L1规格</field>
  65. <field field="erp_unit">L1单位</field>
  66. <field field="erp_mtrlengname">L1英文名称</field>
  67. </displayfields>
  68. </select>