web_mtrl_choose.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. SPACE(200) AS erp_mtrlcode,
  23. SPACE(200) AS erp_mtrlname,
  24. SPACE(200) AS erp_mtrlmode,
  25. SPACE(200) AS erp_unit,
  26. SPACE(200) AS erp_mtrlengname
  27. FROM u_mtrl_price
  28. LEFT JOIN u_mtrl_price_pricelist ON u_mtrl_price.mtrlid = u_mtrl_price_pricelist.mtrlid
  29. </selectstr>
  30. <where>
  31. <when notnull="@keyword">
  32. u_mtrl_price.name like '%'+ @keyword + '%' OR u_mtrl_price.dscrp like '%'+ @keyword + '%' OR u_mtrl_price.mtrlid like '%'+ @keyword + '%'
  33. </when>
  34. <when>
  35. u_mtrl_price.isuse = 1
  36. </when>
  37. <when>
  38. u_mtrl_price.lastdate >= GETDATE()
  39. </when>
  40. <when notnull="@arg_mtrltype">
  41. u_mtrl_price.mtrltype = @arg_mtrltype
  42. OR ( @arg_mtrltype = 200 AND u_mtrl_price.mtrlid IN (8727, 8728, 47414) )
  43. </when>
  44. <when notnull="@arg_pricelistid">
  45. u_mtrl_price_pricelist.pricelistid = @arg_pricelistid
  46. OR u_mtrl_price.mtrlid NOT IN (SELECT mtrlid FROM u_mtrl_price_pricelist WHERE pricelistid = @arg_pricelistid)
  47. </when>
  48. <when notnull="@arg_mtrlid">
  49. u_mtrl_price.mtrlid = @arg_mtrlid
  50. </when>
  51. </where>
  52. <displayfields>
  53. <field field="pid" compute="getrow()">序</field>
  54. <field field="mtrlname">名称</field>
  55. <field field="thickness">厚度</field>
  56. <field field="priceunit">单位</field>
  57. <field field="pricelistprice" funcid="96">单价</field>
  58. <field field="dscrp" table="u_mtrl_price">备注</field>
  59. <field field="erp_mtrlcode">L1编码</field>
  60. <field field="erp_mtrlname">L1名称</field>
  61. <field field="erp_mtrlmode">L1规格</field>
  62. <field field="erp_unit">L1单位</field>
  63. <field field="erp_mtrlengname">L1英文名称</field>
  64. </displayfields>
  65. </select>