tb-goods-info.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>商品-详情</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css js 资源 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="../../static/kj/vue.min.js"></script>
  11. <script src="../../static/kj/element-ui/index.js"></script>
  12. <script src="../../static/kj/httpVueLoader.js"></script>
  13. <script src="../../static/kj/jquery.min.js"></script>
  14. <script src="../../static/kj/layer/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. <script src="../../static/kj/upload-util.js"></script>
  17. <style type="text/css">
  18. .c-panel .c-label{width: 8em;}
  19. table {
  20. font-family: arial, sans-serif;
  21. border-collapse: collapse;
  22. width: 90%;
  23. margin-top: 26px ;
  24. margin-left: auto;
  25. margin-right: auto;
  26. }
  27. th {
  28. border: 1px solid darkgray;
  29. text-align: left;
  30. height: 26px;
  31. padding: 8px;
  32. background-color: #dddddd;
  33. }
  34. td {
  35. border: 1px solid darkgray;
  36. text-align: left;
  37. padding: 8px;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="vue-box sbot" style="display: none;" :style="'display: block;'">
  43. <!-- ------- 内容部分 ------- -->
  44. <div class="s-body">
  45. <div class="c-panel">
  46. <el-form v-if="m">
  47. <table>
  48. <tr>
  49. <th>商品名称</th>
  50. <td>{{m.name}}</td>
  51. <th>商品编号</th>
  52. <td>{{m.code}}</td>
  53. </tr>
  54. <tr>
  55. <th>商品类目编码</th>
  56. <td>{{m.thrItemCode}}</td>
  57. <th>商品类目名称</th>
  58. <td>{{m.thrItemName}}</td>
  59. </tr>
  60. <tr>
  61. <th>单位</th>
  62. <td>{{m.unit}}</td>
  63. <th>单价</th>
  64. <td>{{m.singlePrice}}</td>
  65. </tr>
  66. <tr>
  67. <th>第一计量单位</th>
  68. <td>{{m.unit1}}</td>
  69. <th>用途</th>
  70. <td>{{m.useTo}}</td>
  71. </tr>
  72. <tr>
  73. <th>第二计量单位</th>
  74. <td>{{m.unit2}}</td>
  75. <th>存储条件</th>
  76. <td>{{m.storageEnvm}}</td>
  77. </tr>
  78. <tr>
  79. <th>互市区</th>
  80. <td>{{m.tradeAreaName}}</td>
  81. <th>创建时间</th>
  82. <td>{{sa.forDate(m.createTime, 2)}}</td>
  83. </tr>
  84. </table>
  85. </el-form>
  86. </div>
  87. </div>
  88. <!-- ------- 底部按钮 ------- -->
  89. <div class="s-foot">
  90. <el-button type="success" @click="sa.closeCurrIframe()">确定</el-button>
  91. <el-button @click="sa.closeCurrIframe()">取消</el-button>
  92. </div>
  93. </div>
  94. <script>
  95. var app = new Vue({
  96. components: {
  97. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
  98. },
  99. el: '.vue-box',
  100. data: {
  101. id: sa.p('id', 0), // 获取数据ID
  102. m: null
  103. },
  104. methods: {
  105. },
  106. mounted: function() {
  107. sa.ajax('/level-one-server/TbGoods/getById?id=' + this.id, function(res) {
  108. this.m = res.data;
  109. if(res.data == null) {
  110. sa.alert('未能查找到 id=' + this.id + " 详细数据");
  111. }
  112. }.bind(this))
  113. }
  114. })
  115. </script>
  116. </body>
  117. </html>