web_mtrl_choose.xml 2.3 KB

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