index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <!-- 现货品种详情 -->
  3. <a-modal class="commonModal spot-detail"
  4. title="详情"
  5. v-if="visible"
  6. v-model:visible="visible"
  7. centered
  8. :maskClosable="maskClosableFlag"
  9. @cancel="cancel"
  10. width="890px">
  11. <template #footer>
  12. <a-button key="submit"
  13. type="primary"
  14. :loading="loading"
  15. @click="submit">完成
  16. </a-button>
  17. </template>
  18. <a-form class="inlineForm"
  19. ref="formRef"
  20. :model="formState"
  21. :rules="rules">
  22. <fieldset class="formFieldSet">
  23. <legend>基本信息</legend>
  24. <a-row :gutter="24">
  25. <a-col :span="12">
  26. <a-form-item label="现货品种名称"
  27. name="deliverygoodsname">
  28. <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
  29. </a-form-item>
  30. </a-col>
  31. <a-col :span="12">
  32. <a-form-item label="现货品种代码"
  33. name="deliverygoodscode">
  34. <span class="white">{{ formatValue(selectedRow.data.deliverygoodsname) }}</span>
  35. </a-form-item>
  36. </a-col>
  37. </a-row>
  38. <a-row :gutter="24">
  39. <a-col :span="12">
  40. <a-form-item label="单位"
  41. name="unitid">
  42. <span class="white">{{ formatValue(selectedRow.data.enumdicname) }}</span>
  43. </a-form-item>
  44. </a-col>
  45. <a-col :span="12">
  46. <a-form-item label="状态"
  47. name="unitid">
  48. <span class="green">{{ getValidName(selectedRow.data.isvalid) }}</span>
  49. </a-form-item>
  50. </a-col>
  51. </a-row>
  52. <a-row :gutter="24">
  53. <a-col :span="24">
  54. <a-form-item label="备注"
  55. name="remark">
  56. <span class="white">{{ formatValue(selectedRow.data.remark) }}</span>
  57. </a-form-item>
  58. </a-col>
  59. </a-row>
  60. </fieldset>
  61. <fieldset class="formFieldSet">
  62. <legend>品类信息</legend>
  63. <a-row :gutter="24"
  64. class="dialogRowTitle">
  65. <a-col :span="8">
  66. <span>
  67. 品类
  68. </span>
  69. </a-col>
  70. <a-col :span="8">
  71. <span>
  72. 单位
  73. </span>
  74. </a-col>
  75. <a-col :span="8">
  76. <span>
  77. 标仓系数
  78. </span>
  79. </a-col>
  80. <template v-for="item in selectedRow.gmlist" :key="item.wrstandardid">
  81. <a-col :span="8" class="bt1">
  82. <div class="white">{{ item.wrstandardname }}</div>
  83. </a-col>
  84. <a-col :span="8">
  85. <div class="white">{{ item.enumdicname }}</div>
  86. </a-col>
  87. <a-col :span="8">
  88. <div class="white">{{ item.convertfactor }}</div>
  89. </a-col>
  90. </template>
  91. </a-row>
  92. </fieldset>
  93. <fieldset class="formFieldSet">
  94. <legend>品牌信息</legend>
  95. <a-row :gutter="24"
  96. class="dialogRowTitle dialogRowTitle2">
  97. <a-col :span="24">
  98. <span>
  99. 品牌
  100. </span>
  101. </a-col>
  102. <template v-for="item in selectedRow.gblist" :key="item.brandid">
  103. <a-col :span="24" class="bt1">
  104. <div class="white">{{ item.brandname }}</div>
  105. </a-col>
  106. </template>
  107. </a-row>
  108. </fieldset>
  109. <fieldset class="formFieldSet">
  110. <legend>套保品种信息</legend>
  111. <a-row :gutter="24"
  112. class="dialogRowTitle">
  113. <a-col :span="8">
  114. <span>
  115. 套保品种
  116. </span>
  117. </a-col>
  118. <a-col :span="8">
  119. <span>
  120. 单位
  121. </span>
  122. </a-col>
  123. <a-col :span="8">
  124. <span>
  125. 套保系数
  126. </span>
  127. </a-col>
  128. <template v-for="item in selectedRow.mgList" :key="item.mg.middlegoodsid">
  129. <a-col :span="8" class="bt1">
  130. <div class="white">{{ item.mg.middlegoodsname }}</div>
  131. </a-col>
  132. <a-col :span="8">
  133. <div class="white">{{ item.mg.enumdicname }}</div>
  134. </a-col>
  135. <a-col :span="8">
  136. <div class="white">{{ item.mg.needhedgeratio }}</div>
  137. </a-col>
  138. </template>
  139. </a-row>
  140. </fieldset>
  141. </a-form>
  142. </a-modal>
  143. </template>
  144. <script lang="ts">
  145. import {defineComponent, PropType, ref} from 'vue';
  146. import {closeModal} from '@/common/setup/modal/index';
  147. import {formatValue, initData} from '@/common/methods/index';
  148. import {ErmcpDeliveryGoodsDetailEx} from "@/services/go/ermcp/goodsInfo/interface";
  149. import {getValidName} from "@/views/information/goods/setup";
  150. export default defineComponent({
  151. name: 'modify-custom',
  152. components: {},
  153. props: {
  154. selectedRow: {
  155. type: Object as PropType<ErmcpDeliveryGoodsDetailEx>,
  156. default: {},
  157. },
  158. },
  159. setup() {
  160. const {visible, cancel} = closeModal('detail');
  161. const loading = ref<boolean>(false);
  162. const maskClosableFlag = ref<boolean>(false);
  163. function submit() {
  164. cancel();
  165. }
  166. initData(() => {
  167. });
  168. return {
  169. visible,
  170. cancel,
  171. submit,
  172. loading,
  173. maskClosableFlag: false,
  174. formatValue,
  175. getValidName,
  176. };
  177. },
  178. });
  179. </script>
  180. <style lang="less">
  181. .spot-detail {
  182. fieldset {
  183. padding-right: 170px;
  184. }
  185. .upload {
  186. display: inline-flex;
  187. .ant-btn.uploadBtn {
  188. width: 60px;
  189. height: 30px;
  190. background: @m-blue0;
  191. border: 0;
  192. padding: 0;
  193. text-align: center;
  194. font-size: 14px;
  195. color: @m-white0;
  196. .rounded-corners(3px);
  197. &:hover {
  198. background: rgba(@m-blue0, 0);
  199. color: rgba(@m-white0, 0.8);
  200. }
  201. }
  202. .look {
  203. color: @m-blue0;
  204. font-size: 14px;
  205. margin-left: 10px;
  206. cursor: pointer;
  207. }
  208. }
  209. div.white {
  210. width: 100%;
  211. text-align: center;
  212. }
  213. }
  214. </style
  215. >;