setOrderCalc.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <table bgcolor="#FAFAFA" cellpadding="0" style="width: 100%;" class="result">
  3. <tr style="width: 100px;">
  4. <td class="title">{{$t('光头')}}</td>
  5. <td>
  6. <div class="text1" style="margin-bottom: 8px;">
  7. <el-tag style="margin-right: 10px;" size="small" type="warning">{{ resultArr[0] && resultArr[0].actuatorbrand || '无品牌' }}</el-tag>
  8. <span>{{ resultArr[0] && resultArr[0].itemname}}</span>
  9. </div>
  10. <div class="descript">
  11. <div class="item" v-if="resultArr.length && resultArr[0].itemno"><span style="color: #888888;">{{$t('料号')}}:</span>{{resultArr[0].itemno }}</div>
  12. <div class="item" v-if="resultArr.length && resultArr[0].torque"><span style="color: #888888;">{{$t('扭矩')}}:</span>{{resultArr[0].torque }}</div>
  13. <div class="item" v-if="resultArr.length && resultArr[0].flh"><span style="color: #888888;">{{$t('法兰号')}}:</span>{{resultArr[0].flh.join('-') }}</div>
  14. <div class="item" v-if="resultArr.length && resultArr[0].caliber"><span style="color: #888888;">{{$t('公称通径')}}:</span>{{resultArr[0].caliber }}</div>
  15. <div class="item" v-if="resultArr.length && resultArr[0].nominalpressure"><span style="color: #888888;">{{$t('公称压力')}}:</span>{{ tool.nominalPressureSet(resultArr[0].nominalpressure) }}</div>
  16. <div class="item" v-if="resultArr.length && resultArr[0].stemmaterial"><span style="color: #888888;">{{$t('阀杆材质')}}:</span>{{resultArr[0].stemmaterial }}</div>
  17. <div class="item" v-if="resultArr.length && resultArr[0].mainmaterial"><span style="color: #888888;">{{$t('主体材质')}}:</span>{{resultArr[0].mainmaterial }}</div>
  18. </div>
  19. </td>
  20. </tr>
  21. <tr>
  22. <td class="title">{{$t('节流件')}}</td>
  23. <td>
  24. <div class="text1" style="margin-bottom: 8px;">
  25. <el-tag style="margin-right: 10px;" size="small" type="warning">{{ resultArr[1] && resultArr[1].actuatorbrand || '无品牌' }}</el-tag>
  26. <span>{{ resultArr[1].itemname }}</span>
  27. </div>
  28. <div class="descript">
  29. <!-- <div class="item" v-if="resultArr.length >= 2 && resultArr[1].actuatorname"><span style="color: #888888;">{{$t('执行器名称')}}:</span>{{resultArr[1].actuatorname }}</div> -->
  30. <div class="item" v-if="resultArr.length >= 2 && resultArr[1].itemno"><span style="color: #888888;">{{$t('节流件料号')}}:</span>{{resultArr[1].itemno }}</div>
  31. <div class="item" v-if="resultArr.length >= 2 && resultArr[1].itemname"><span style="color: #888888;">{{$t('节流件类型')}}:</span>{{resultArr[1].throttletype }}</div>
  32. <div class="item" v-if="resultArr.length >= 2 && resultArr[1].itemname"><span style="color: #888888;">{{$t('Kv100')}}:</span>{{resultArr[1].kv100 }}</div>
  33. </div>
  34. </td>
  35. </tr>
  36. <!-- <tr>
  37. <td class="title">{{$t('辅件')}}</td>
  38. <td style="padding: 0;">
  39. <tr style="border-bottom: 1px solid #DDDDDD;" class="custom-table">
  40. <div style="color: #333333;">{{$t('定位器')}}</div>
  41. <div class="text1">
  42. <el-tag style="margin-right: 10px;" size="small" type="warning" v-if="resultArr.filter(item => item.itemname == '定位器').length ">{{resultArr.filter(item => item.itemname == '定位器')[0].actuatorbrand }}</el-tag>
  43. <span>{{ resultArr.filter(item => item.itemname == '定位器').length ? resultArr.filter(item => item.itemname == '定位器')[0].model : '-' }}</span>
  44. </div>
  45. <div style="color: #333333;">{{$t('电磁阀')}}</div>
  46. <div class="text1">
  47. <el-tag style="margin-right: 10px;" size="small" type="warning" v-if="resultArr.filter(item => item.itemname == '电磁阀').length ">{{resultArr.filter(item => item.itemname == '电磁阀')[0].actuatorbrand }}</el-tag>
  48. <span>{{ resultArr.filter(item => item.itemname == '电磁阀').length ? resultArr.filter(item => item.itemname == '电磁阀')[0].model : '-' }}</span>
  49. </div>
  50. </tr>
  51. <tr class="custom-table">
  52. <div style="color: #333333;">{{$t('限位开关')}}</div>
  53. <div class="text1">
  54. <el-tag style="margin-right: 10px;" size="small" type="warning" v-if="resultArr.filter(item => item.itemname == '限位开关').length ">{{resultArr.filter(item => item.itemname == '限位开关')[0].actuatorbrand }}</el-tag>
  55. <span>{{ resultArr.filter(item => item.itemname == '限位开关').length ? resultArr.filter(item => item.itemname == '限位开关')[0].model : '-' }}</span>
  56. </div>
  57. <div style="color: #333333;">{{$t('过滤减压阀')}}</div>
  58. <div class="text1">
  59. <el-tag style="margin-right: 10px;" size="small" type="warning" v-if="resultArr.filter(item => item.itemname == '过滤减压阀').length ">{{resultArr.filter(item => item.itemname == '过滤减压阀')[0].actuatorbrand }}</el-tag>
  60. <span>{{ resultArr.filter(item => item.itemname == '过滤减压阀').length ? resultArr.filter(item => item.itemname == '过滤减压阀')[0].model : '-' }}</span>
  61. </div>
  62. </tr>
  63. </td>
  64. </tr> -->
  65. <tr>
  66. <td class="title">{{$t('成品料号')}}</td>
  67. <td class="text1" style="height: 100%;"><span>{{ Object.keys(product).length ? product.itemno||'-' : '' }}</span></td>
  68. </tr>
  69. <tr>
  70. <td class="title">{{$t(product.itemno?'牌价':'最低经销价')}}</td>
  71. <td class="text2">
  72. ¥{{ Object.keys(product).length ? tool.formatAmount(product.price,2) : 'xxxxxx' }}
  73. <div style="color:#1C1919;font-weight: normal;font-size: 12px;">*{{$t('非标准产品,当前价格仅供参考')}}!</div>
  74. </td>
  75. </tr>
  76. </table>
  77. </template>
  78. <script>
  79. export default {
  80. data () {
  81. return {
  82. resultArr:[],
  83. product:{}
  84. }
  85. },
  86. methods: {
  87. listData () {
  88. this.$api.requested({
  89. "id": 20240718162002,
  90. "content": {
  91. "sa_lectotypecfgid": this.$route.query.id
  92. },
  93. }).then(res => {
  94. console.log("123123321",res)
  95. this.resultArr = res.data
  96. this.$api.requested({
  97. "id": 2024071916224702,
  98. "content": {
  99. "part_itemids": this.resultArr.map(item => {
  100. return {
  101. parttype:item.parttype,
  102. itemid:item.itemid
  103. }
  104. })
  105. },
  106. }).then(res => {
  107. this.product = res.data
  108. })
  109. })
  110. }
  111. },
  112. created () {
  113. this.listData()
  114. }
  115. }
  116. </script>
  117. <style scoped>
  118. .descript {
  119. font-size:12px;
  120. color:red;
  121. display: flex;
  122. flex-wrap: wrap;
  123. }
  124. table,td,tr {
  125. border-collapse: collapse;
  126. }
  127. td {
  128. padding: 10px;
  129. }
  130. table,td {
  131. border: 1px solid #DDDDDD;
  132. }
  133. .result{
  134. margin-top: 10px;
  135. }
  136. .result .title {
  137. font-family: Source Han Sans SC, Source Han Sans SC;
  138. font-weight: bold;
  139. font-size: 16px;
  140. color: #333333;
  141. padding: 10px;
  142. min-width: 120px;
  143. }
  144. .custom-table {
  145. border: none;
  146. display: flex;
  147. height: 64px;
  148. align-items: center;
  149. align-content: center;
  150. }
  151. .custom-table div{
  152. border-right: 1px solid #DDDDDD;
  153. height: 100%;
  154. display: flex;
  155. align-items: center;
  156. align-content: center;
  157. padding-left: 20px;
  158. }
  159. .custom-table div:nth-child(1) {
  160. width: 120px;
  161. }
  162. .custom-table div:nth-child(2) {
  163. flex: 1;
  164. }
  165. .custom-table div:nth-child(3) {
  166. width: 120px;
  167. }
  168. .custom-table div:nth-child(4) {
  169. flex: 1;
  170. }
  171. .descript {
  172. display: flex;
  173. }
  174. .descript .item {
  175. font-family: Source Han Sans SC, Source Han Sans SC;
  176. font-weight: 400;
  177. font-size: 14px;
  178. color: #333333;
  179. margin-right: 40px;
  180. }
  181. .descript .item:last-child {
  182. margin-right: 0 !important;
  183. }
  184. .text1 {
  185. font-family: Source Han Sans SC, Source Han Sans SC;
  186. font-weight: bold;
  187. font-size: 16px;
  188. color: #3874F6;
  189. }
  190. .text2 {
  191. font-family: Source Han Sans SC, Source Han Sans SC;
  192. font-weight: bold;
  193. font-size: 16px;
  194. color: #E80000;
  195. }
  196. </style>