detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <div>
  3. <el-form ref="form" :model="form" style="width: 100%;" :rules="rules">
  4. <span class="card_title">基本信息</span>
  5. <el-card shadow="always">
  6. <el-row class="col-self">
  7. <el-col :span="3" class="col-txt"><span>企业名称</span></el-col>
  8. <el-col :span="9" class="col-input col-bg">
  9. <span>{{ form.businessName }}</span>
  10. </el-col>
  11. <el-col :span="4" class="col-txt"><span>状态</span></el-col>
  12. <el-col :span="7" class="col-input col-bg">
  13. <span>{{ form.status }}</span>
  14. </el-col>
  15. </el-row>
  16. <el-row class="col-self">
  17. <el-col :span="3" class="col-txt"><span>企业类型</span></el-col>
  18. <el-col :span="9" class="col-input col-bg">
  19. <span>{{ form.type }}</span>
  20. </el-col>
  21. <el-col :span="4" class="col-txt"><span>是否总部</span></el-col>
  22. <el-col :span="7" class="col-input col-bg">
  23. <span>{{ form.isHeadquarters }}</span>
  24. </el-col>
  25. </el-row>
  26. <el-row class="col-self">
  27. <el-col :span="3" class="col-txt"><span>是否进出口</span></el-col>
  28. <el-col :span="9" class="col-input col-bg">
  29. <span>{{ form.isImportExport }}</span>
  30. </el-col>
  31. <el-col :span="4" class="col-txt"><span>是否外资</span></el-col>
  32. <el-col :span="7" class="col-input col-bg">
  33. <span>{{ form.isForeignOwned }}</span>
  34. </el-col>
  35. </el-row>
  36. <el-row class="col-self">
  37. <el-col :span="3" class="col-txt"><span>行业分类</span></el-col>
  38. <el-col :span="9" class="col-input col-bg">
  39. <span>{{ form.registeredCategory }}</span>
  40. </el-col>
  41. <el-col :span="4" class="col-txt"><span>注册标识</span></el-col>
  42. <el-col :span="7" class="col-input col-bg">
  43. <span>{{ form.registeredTag }}</span>
  44. </el-col>
  45. </el-row>
  46. </el-card>
  47. <span class="card_title">注册信息</span>
  48. <el-card shadow="always">
  49. <el-row class="col-self">
  50. <el-col :span="3" class="col-txt"><span>注册资金</span></el-col>
  51. <el-col :span="9" class="col-input col-bg">
  52. <span>{{ form.registeredCapital }}</span>
  53. </el-col>
  54. <el-col :span="4" class="col-txt"><span>统一社会信用代码</span></el-col>
  55. <el-col :span="7" class="col-input col-bg">
  56. <span>{{ form.taxNumber }}</span>
  57. </el-col>
  58. </el-row>
  59. <el-row class="col-self">
  60. <el-col :span="3" class="col-txt"><span>注册时间</span></el-col>
  61. <el-col :span="9" class="col-input col-bg">
  62. <span>{{ form.registeredAt }}</span>
  63. </el-col>
  64. <el-col :span="4" class="col-txt"><span>经营范围</span></el-col>
  65. <el-col :span="7" class="col-input col-bg">
  66. <span>{{ form.businessScope }}</span>
  67. </el-col>
  68. </el-row>
  69. </el-card>
  70. <span class="card_title">联系人信息</span>
  71. <el-card shadow="always">
  72. <el-row class="col-self">
  73. <el-col :span="3" class="col-txt"><span>联系人</span></el-col>
  74. <el-col :span="9" class="col-input col-bg">
  75. <span>{{ form.contactUser }}</span>
  76. </el-col>
  77. <el-col :span="4" class="col-txt"><span>联系电话</span></el-col>
  78. <el-col :span="7" class="col-input col-bg">
  79. <span>{{ form.contactPhone }}</span>
  80. </el-col>
  81. </el-row>
  82. </el-card>
  83. </el-form>
  84. </div>
  85. </template>
  86. <script>
  87. import Base from '../base/base'
  88. export default {
  89. name: 'Main',
  90. mixins: [Base],
  91. props: {
  92. bizId: {
  93. type: String,
  94. default: ''
  95. }
  96. },
  97. data() {
  98. return {
  99. dc_key: ['BIZ_TYPE', 'BIZ_STATUS', 'BIZ_CATEGORY', 'TRUE_OR_FALSE', 'BIZ_TAG'],
  100. form: this.initForm()
  101. }
  102. },
  103. watch: {
  104. bizId: {
  105. deep: true,
  106. handler(val) {
  107. this.initData(val)
  108. }
  109. }
  110. },
  111. mounted() {
  112. this.initDict(this.dc_key).then(res => {
  113. this.initData(this.bizId)
  114. })
  115. },
  116. methods: {
  117. initData: function(_bizId) {
  118. const _this = this
  119. _this.loading = true
  120. this.baseRequest('getById', {
  121. id: _bizId
  122. }).then(res => {
  123. if (res.data) {
  124. _this.form = Object.assign({}, _this.form, res.data)
  125. _this.form.registeredAt = res.data.registeredAt ? _this.$common.transServDate(res.data.registeredAt) : ''
  126. _this.form.type = _this.dc_map.BIZ_TYPE[res.data.type]
  127. _this.form.status = _this.dc_map.BIZ_STATUS[res.data.status]
  128. _this.form.isHeadquarters = _this.dc_map.TRUE_OR_FALSE[res.data.isHeadquarters]
  129. _this.form.isImportExport = _this.dc_map.TRUE_OR_FALSE[res.data.isImportExport]
  130. _this.form.isForeignOwned = _this.dc_map.TRUE_OR_FALSE[res.data.isForeignOwned]
  131. _this.form.registeredCategory = _this.dc_map.BIZ_CATEGORY[res.data.registeredCategory]
  132. _this.form.registeredTag = _this.dc_map.BIZ_TAG[res.data.registeredTag]
  133. }
  134. _this.loading = false
  135. })
  136. },
  137. initForm: function() {
  138. return {
  139. id: '',
  140. businessName: '',
  141. type: '',
  142. addressCode: '',
  143. addressOther: '',
  144. contactUser: '',
  145. contactPhone: '',
  146. taxNumber: '',
  147. isHeadquarters: '',
  148. isImportExport: '',
  149. isForeignOwned: '',
  150. registeredCategory: '',
  151. registeredTag: '',
  152. registeredCapital: '',
  153. registeredAt: '',
  154. businessScope: '',
  155. addressDisplay: ''
  156. }
  157. },
  158. // 请求封装,继承类中调用,必须存在
  159. baseRequest: function(opUrl, postData) {
  160. return this.$channel.baseRequest('BizMainController', opUrl, postData, 'Biz Main')
  161. }
  162. }
  163. }
  164. </script>
  165. <style scoped>
  166. .g_table_row{
  167. font-size: 13px;
  168. }
  169. .g_table_cell{
  170. font-size: 13px;
  171. }
  172. .ch-input{
  173. border-radius: 0px;
  174. border-color: #32323A;
  175. }
  176. .ch-input-size {
  177. width: 150px;
  178. }
  179. .ch-select-size {
  180. width: 200px;
  181. }
  182. .ch-button {
  183. border-color: #32323A;
  184. background-color: #32323A;
  185. color: #fff;
  186. }
  187. .ch-button-warning {
  188. margin-left: 10px;
  189. border-radius: 0px;
  190. border-color: #E6A23C;
  191. background-color: #E6A23C;
  192. color: #fff;
  193. }
  194. .ch-button-export {
  195. margin-left: 10px;
  196. border-color: #98CC1F;
  197. background-color: #98CC1F;
  198. color: #fff;
  199. }
  200. /deep/.el-dialog__header {
  201. padding: 10px 20px;
  202. }
  203. /deep/.el-dialog__body {
  204. padding: 10px 20px;
  205. }
  206. </style>