setOrder.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <el-dialog
  3. :visible.sync="dialogFormVisible"
  4. width="1200px"
  5. append-to-body
  6. :show-close="false"
  7. :close-on-click-modal="true"
  8. >
  9. <table
  10. bgcolor="#FAFAFA"
  11. cellpadding="0"
  12. style="width: 100%"
  13. class="result"
  14. v-if="dialogFormVisible"
  15. >
  16. <tr style="width: 100px">
  17. <td class="title">{{ $t("选型单") }}</td>
  18. <td>
  19. <div class="descript">
  20. <div class="item" v-if="result.lectotypecfg.billno">
  21. <span style="color: #888888">{{ $t("选型单编号") }}:</span
  22. >{{ result.lectotypecfg.billno }}
  23. </div>
  24. <div class="item" v-if="result.lectotypecfg.createdate">
  25. <span style="color: #888888">{{ $t("选型时间") }}:</span
  26. >{{ result.lectotypecfg.createdate }}
  27. </div>
  28. <div class="item" v-if="result.lectotypecfg.status">
  29. <span style="color: #888888">{{ $t("状态") }}:</span>
  30. <span style="color: red; font-weight: bold">
  31. {{ result.lectotypecfg.status }}</span
  32. >
  33. </div>
  34. </div>
  35. </td>
  36. </tr>
  37. <tr style="width: 100px">
  38. <td class="title">{{ $t("光头") }}</td>
  39. <td>
  40. <div class="text1" style="margin-bottom: 8px">
  41. <el-tag style="margin-right: 10px" size="small" type="warning">{{
  42. result.主阀.actuatorbrand
  43. }}</el-tag>
  44. <span>{{ result.主阀.itemname }}</span>
  45. </div>
  46. <div class="descript">
  47. <div class="item" v-if="result.主阀.torque">
  48. <span style="color: #888888">{{ $t("料号") }}:</span
  49. >{{ result.主阀.itemno }}
  50. </div>
  51. <div class="item" v-if="result.主阀.caliber">
  52. <span style="color: #888888">{{ $t("公称通径") }}:</span
  53. >{{ result.主阀.caliber }}
  54. </div>
  55. <div class="item" v-if="result.主阀.nominalpressure">
  56. <span style="color: #888888">{{ $t("公称压力") }}:</span
  57. >{{ result.主阀.nominalpressure.join(",") }}
  58. </div>
  59. <div class="item" v-if="result.主阀.stemmaterial">
  60. <span style="color: #888888">{{ $t("阀杆材质") }}:</span
  61. >{{ result.主阀.stemmaterial }}
  62. </div>
  63. <div class="item" v-if="result.主阀.mainmaterial">
  64. <span style="color: #888888">{{ $t("主体材质") }}:</span
  65. >{{ result.主阀.mainmaterial }}
  66. </div>
  67. </div>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td class="title">{{ $t("执行器") }}</td>
  72. <td>
  73. <div class="text1" style="margin-bottom: 8px">
  74. <el-tag style="margin-right: 10px" size="small" type="warning">{{
  75. result.执行器.actuatorbrand
  76. }}</el-tag>
  77. <span
  78. >{{ result.执行器.model }}
  79. {{
  80. result.减速箱 && Object.keys(result.减速箱).length
  81. ? ` + ${$t("减速箱")}:${result.减速箱.itemname}`
  82. : ""
  83. }}</span
  84. >
  85. </div>
  86. <div
  87. v-if="result.执行器"
  88. class="text1"
  89. style="margin-bottom: 8px"
  90. ></div>
  91. <div class="descript" v-if="result.执行器">
  92. <div class="item" v-if="result.执行器.itemname">
  93. <span style="color: #888888">{{ $t("执行器名称") }}:</span
  94. >{{ result.执行器.itemname }}
  95. </div>
  96. <div class="item" v-if="result.执行器.bodystructure">
  97. <span style="color: #888888">{{ $t("执行器结构") }}:</span
  98. >{{ result.执行器.bodystructure }}
  99. </div>
  100. <div class="item" v-if="result.执行器.maxruntime">
  101. <span style="color: #888888">{{ $t("开关时间") }}:</span
  102. >{{ result.执行器.maxruntime }}(s)
  103. </div>
  104. <div class="item" v-if="result.执行器.speed">
  105. <span style="color: #888888">{{ $t("转速") }}:</span
  106. >{{ result.执行器.speed }}(rpm)
  107. </div>
  108. <div class="item" v-if="result.执行器.handwheelratio">
  109. <span style="color: #888888">{{ $t("减速比") }}:</span
  110. >{{ result.执行器.ratio }}
  111. </div>
  112. <div class="item" v-if="result.执行器.supplyvoltage">
  113. <span style="color: #888888">{{ $t("电压") }}:</span
  114. >{{ result.执行器.supplyvoltage }}(V)
  115. </div>
  116. <div class="item" v-if="result.执行器.ratedcurrent">
  117. <span style="color: #888888">{{ $t("电流") }}:</span
  118. >{{ result.执行器.ratedcurrent }}(A)
  119. </div>
  120. <div class="item" v-if="result.执行器.ratedpower">
  121. <span style="color: #888888">{{ $t("功率") }}:</span
  122. >{{ result.执行器.ratedpower }}(KW)
  123. </div>
  124. <div class="item" v-if="result.执行器.maxruntime">
  125. <span style="color: #888888">{{ $t("开关时间") }}:</span
  126. >{{ result.执行器.maxruntime }}(s)
  127. </div>
  128. <div
  129. class="item"
  130. v-if="
  131. result.执行器.actuatorsignal &&
  132. result.执行器.actuatorsignal.length
  133. "
  134. >
  135. <span style="color: #888888">{{ $t("信号类型") }}:</span
  136. >{{ result.执行器.actuatorsignal.join(",") }}
  137. </div>
  138. </div>
  139. </td>
  140. </tr>
  141. <tr v-if="result.辅件.length">
  142. <td class="title">{{ $t("辅件") }}</td>
  143. <td style="padding: 0">
  144. <tr style="border-bottom: 1px solid #dddddd" class="custom-table">
  145. <div style="color: #333333">{{ $t("定位器") }}</div>
  146. <div class="text1">
  147. <el-tag
  148. style="margin-right: 10px"
  149. size="small"
  150. type="warning"
  151. v-if="
  152. result.辅件.filter((item) => item.othertype == '定位器')
  153. .length
  154. "
  155. >{{
  156. result.辅件.filter((item) => item.othertype == "定位器")[0]
  157. .actuatorbrand
  158. }}</el-tag
  159. >
  160. <span>{{
  161. result.辅件.filter((item) => item.othertype == "定位器").length
  162. ? result.辅件.filter((item) => item.othertype == "定位器")[0]
  163. .model
  164. : "-"
  165. }}</span>
  166. </div>
  167. <div style="color: #333333">{{ $t("电磁阀") }}</div>
  168. <div class="text1">
  169. <el-tag
  170. style="margin-right: 10px"
  171. size="small"
  172. type="warning"
  173. v-if="
  174. result.辅件.filter((item) => item.othertype == '电磁阀')
  175. .length
  176. "
  177. >{{
  178. result.辅件.filter((item) => item.othertype == "电磁阀")[0]
  179. .actuatorbrand
  180. }}</el-tag
  181. >
  182. <span>{{
  183. result.辅件.filter((item) => item.othertype == "电磁阀").length
  184. ? result.辅件.filter((item) => item.othertype == "电磁阀")[0]
  185. .model
  186. : "-"
  187. }}</span>
  188. </div>
  189. </tr>
  190. <tr class="custom-table">
  191. <div style="color: #333333">{{ $t("限位开关") }}</div>
  192. <div class="text1">
  193. <el-tag
  194. style="margin-right: 10px"
  195. size="small"
  196. type="warning"
  197. v-if="
  198. result.辅件.filter((item) => item.othertype == '限位开关')
  199. .length
  200. "
  201. >{{
  202. result.辅件.filter((item) => item.othertype == "限位开关")[0]
  203. .actuatorbrand
  204. }}</el-tag
  205. >
  206. <span>{{
  207. result.辅件.filter((item) => item.othertype == "限位开关")
  208. .length
  209. ? result.辅件.filter(
  210. (item) => item.othertype == "限位开关"
  211. )[0].model
  212. : "-"
  213. }}</span>
  214. </div>
  215. <div style="color: #333333">{{ $t("过滤减压阀") }}</div>
  216. <div class="text1">
  217. <el-tag
  218. style="margin-right: 10px"
  219. size="small"
  220. type="warning"
  221. v-if="
  222. result.辅件.filter((item) => item.othertype == '过滤减压阀')
  223. .length
  224. "
  225. >{{
  226. result.辅件.filter(
  227. (item) => item.othertype == "过滤减压阀"
  228. )[0].actuatorbrand
  229. }}</el-tag
  230. >
  231. <span>{{
  232. result.辅件.filter((item) => item.othertype == "过滤减压阀")
  233. .length
  234. ? result.辅件.filter(
  235. (item) => item.othertype == "过滤减压阀"
  236. )[0].model
  237. : "-"
  238. }}</span>
  239. </div>
  240. </tr>
  241. </td>
  242. </tr>
  243. <tr>
  244. <td class="title">{{ $t("成品料号") }}</td>
  245. <td class="text1">{{ result.itemno || "-" }}</td>
  246. </tr>
  247. <tr>
  248. <td class="title">{{ $t(result.itemno ? "牌价" : "预估价格") }}</td>
  249. <td class="text2">
  250. ¥{{ result.price ? tool.formatAmount(result.price, 2) : "xxxxxx" }}
  251. </td>
  252. </tr>
  253. </table>
  254. </el-dialog>
  255. </template>
  256. <script>
  257. export default {
  258. data() {
  259. return {
  260. result: [],
  261. dialogFormVisible: false,
  262. };
  263. },
  264. methods: {
  265. onShow(id) {
  266. this.$api
  267. .requested({
  268. id: 2024081516054202,
  269. content: {
  270. sa_lectotypecfgid: id,
  271. },
  272. })
  273. .then((res) => {
  274. this.result = res.data;
  275. this.dialogFormVisible = true;
  276. });
  277. },
  278. },
  279. created() {},
  280. };
  281. </script>
  282. <style scoped>
  283. /deep/.el-dialog__header {
  284. display: none;
  285. }
  286. /deep/.el-dialog__body {
  287. padding: 5px !important;
  288. }
  289. .descript {
  290. font-size: 12px;
  291. color: red;
  292. }
  293. table,
  294. td,
  295. tr {
  296. border-collapse: collapse;
  297. }
  298. td {
  299. padding: 20px 20px;
  300. }
  301. table,
  302. td {
  303. border: 1px solid #dddddd;
  304. }
  305. .result .title {
  306. font-family: Source Han Sans SC, Source Han Sans SC;
  307. font-weight: bold;
  308. font-size: 16px;
  309. color: #333333;
  310. padding: 34px 20px;
  311. }
  312. .custom-table {
  313. border: none;
  314. display: flex;
  315. height: 64px;
  316. align-items: center;
  317. align-content: center;
  318. }
  319. .custom-table div {
  320. border-right: 1px solid #dddddd;
  321. height: 100%;
  322. display: flex;
  323. align-items: center;
  324. align-content: center;
  325. padding-left: 20px;
  326. }
  327. .custom-table div:nth-child(1) {
  328. width: 120px;
  329. }
  330. .custom-table div:nth-child(2) {
  331. flex: 1;
  332. }
  333. .custom-table div:nth-child(3) {
  334. width: 120px;
  335. }
  336. .custom-table div:nth-child(4) {
  337. flex: 1;
  338. }
  339. .descript {
  340. display: flex;
  341. }
  342. .descript .item {
  343. font-family: Source Han Sans SC, Source Han Sans SC;
  344. font-weight: 400;
  345. font-size: 14px;
  346. color: #333333;
  347. margin-right: 40px;
  348. }
  349. .descript .item:last-child {
  350. margin-right: 0 !important;
  351. }
  352. .text1 {
  353. font-family: Source Han Sans SC, Source Han Sans SC;
  354. font-weight: bold;
  355. font-size: 16px;
  356. color: #3874f6;
  357. }
  358. .text2 {
  359. font-family: Source Han Sans SC, Source Han Sans SC;
  360. font-weight: bold;
  361. font-size: 16px;
  362. color: #e80000;
  363. }
  364. </style>