baseInfo.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template>
  2. <div class="baseinfo-container">
  3. <div class="basic-details-title border-none">
  4. <span class="border-span">基本信息</span>
  5. </div>
  6. <el-descriptions title="" :column="4" size="medium" border>
  7. <el-descriptions-item>
  8. <template slot="label"> 编码 </template>
  9. {{ info.code }}
  10. </el-descriptions-item>
  11. <el-descriptions-item>
  12. <template slot="label"> 名称 </template>
  13. {{ info.name }}
  14. </el-descriptions-item>
  15. <el-descriptions-item>
  16. <template slot="label"> 材质</template>
  17. {{ info.category.extendField && JSON.parse(info.category.extendField).texture }}
  18. </el-descriptions-item>
  19. <el-descriptions-item>
  20. <template slot="label"> 型号 </template>
  21. {{info.category.modelType}}
  22. </el-descriptions-item>
  23. <el-descriptions-item :span="2">
  24. <template slot="label"> 分类 </template>
  25. {{info.category.categoryLevelPath}}
  26. </el-descriptions-item>
  27. <el-descriptions-item>
  28. <template slot="label"> 采购日期 </template>
  29. <!-- {{info.warehouseDetail.procurementTime}} -->
  30. </el-descriptions-item>
  31. <el-descriptions-item>
  32. <template slot="label"> 过保日期</template>
  33. <!-- {{info.warehouseDetail.expirationTime}} -->
  34. </el-descriptions-item>
  35. <el-descriptions-item>
  36. <template slot="label"> 计量单位</template>
  37. {{info.category.measuringUnit}}
  38. </el-descriptions-item>
  39. <el-descriptions-item>
  40. <template slot="label"> 生命周期</template>
  41. <!-- <div v-if="queryInfo.source==1" style="color: #70B603">在用</div>
  42. <div v-if="queryInfo.source==2" style="color: #F59A23">在库</div>
  43. <div v-if="queryInfo.source==3" style="color: #AAAAAA">消耗</div> -->
  44. </el-descriptions-item>
  45. </el-descriptions>
  46. <div class="basic-details-title border-none">
  47. <span class="border-span">投产信息</span>
  48. </div>
  49. <el-descriptions title="" :column="4" size="medium" border>
  50. <el-descriptions-item>
  51. <template slot="label"> 固资编码 </template>
  52. {{info.fixCode}}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label"> 品牌 </template>
  56. {{info.brand}}
  57. </el-descriptions-item>
  58. <el-descriptions-item>
  59. <template slot="label"> 供应商</template>
  60. {{info.supplierName}}
  61. </el-descriptions-item>
  62. <el-descriptions-item>
  63. <template slot="label"> 供应商电话 </template>
  64. {{info.supplierMobile}}
  65. </el-descriptions-item>
  66. <el-descriptions-item :span="2">
  67. <template slot="label"> {{queryInfo.source==2?'入库单号':'出库单号'}} </template>
  68. <!-- <el-link style="color: #70B603" @click="jumpDetails">{{info.warehouseDetail.bizNum}}</el-link> -->
  69. </el-descriptions-item>
  70. <el-descriptions-item>
  71. <template slot="label"> 所在部门 </template>
  72. {{info.ownershipDeptName}}
  73. </el-descriptions-item>
  74. <el-descriptions-item>
  75. <template slot="label"> 所在工序</template>
  76. {{info.processName}}
  77. </el-descriptions-item>
  78. <el-descriptions-item>
  79. <template slot="label"> 权属部门 </template>
  80. {{info.ownershipDeptName}}
  81. </el-descriptions-item>
  82. <el-descriptions-item>
  83. <template slot="label"> 当前权属人</template>
  84. {{info.ownershipUserName}}
  85. </el-descriptions-item>
  86. <el-descriptions-item>
  87. <template slot="label"> 权属人电话</template>
  88. {{info.ownershipUserMobile}}
  89. </el-descriptions-item>
  90. </el-descriptions>
  91. <div class="basic-details-title border-none">
  92. <span class="border-span">图文信息</span>
  93. </div>
  94. <!-- <div class="upload-container">
  95. <div class="img-box">
  96. <img
  97. src="~@/assets/upload-placeholder.svg"
  98. alt=""
  99. v-if="!imageUrl"
  100. />
  101. <img v-else :src="imageUrl" alt="周转车图片" />
  102. </div>
  103. </div> -->
  104. <div class="basic-details-title border-none">
  105. <span class="border-span">扩展信息</span>
  106. </div>
  107. <el-descriptions title="" :column="4" size="medium" border>
  108. <el-descriptions-item
  109. v-for="(item, index) in info.extInfoSelf"
  110. :key="index"
  111. :span="1"
  112. >
  113. <template slot="label"> {{ item.key }} </template>
  114. <div>{{item.value}}</div>
  115. </el-descriptions-item>
  116. </el-descriptions>
  117. <!-- <DetailsDialog
  118. ref="detailsDialogRef"
  119. /> -->
  120. </div>
  121. </template>
  122. <script>
  123. // import {getAssetInfo} from "@/api/ledgerAssets/asset"
  124. // import DetailsDialog from '@/views/ledgerAssets/components/outstoreDetailsDialog.vue'
  125. // import { imageView } from "@/utils"
  126. import {
  127. getAssetInfo
  128. } from '@/api/ledgerAssets';
  129. import {
  130. getDetails
  131. } from '@/api/classifyManage/itemInformation';
  132. export default {
  133. props: {
  134. rowId:{
  135. type:String ,
  136. default:''
  137. },
  138. },
  139. // components: { DetailsDialog },
  140. data () {
  141. return {
  142. info:{
  143. category:{},
  144. extInfoSelf:[]
  145. },
  146. // 设备图片
  147. imageUrl: "",
  148. queryInfo:{}
  149. }
  150. },
  151. created () {
  152. // let id = this.queryInfo.id
  153. this.getDetilInfo()
  154. },
  155. methods:{
  156. async getDetilInfo(){
  157. const res = await getAssetInfo(this.rowId)
  158. if (res){
  159. this.info = res.data
  160. this.$set(this.info, 'category', res.data.category)
  161. this.$set(this.info, 'extInfoSelf', res.data.extInfoSelf?res.data.extInfoSelf:[])
  162. // this.$set(this.info, 'warehouseDetail', res.data.warehouseDetail)
  163. // if (res.data.imageUrl) {
  164. // imageView(res.data.imageUrl).then((res) => {
  165. // this.imageUrl = res;
  166. // });
  167. // }
  168. }
  169. },
  170. // 打开详情弹窗
  171. jumpDetails(){
  172. if(!this.info.warehouseDetail){
  173. return
  174. }
  175. this.$refs.detailsDialogRef.init(this.info.warehouseDetail,this.queryInfo.source)
  176. }
  177. }
  178. }
  179. </script>
  180. <style lang="scss" scoped>
  181. .baseinfo-container {
  182. background-color: #fff;
  183. padding: 20px;
  184. .content {
  185. padding: 0 20px;
  186. }
  187. .basic-details-title{
  188. font-size: 16px;
  189. margin: 15px 0;
  190. }
  191. .upload-container {
  192. width:100%;
  193. display: flex;
  194. align-items:center;
  195. justify-content:center;
  196. .img-box {
  197. width: 280px;
  198. height: 342px;
  199. border: 1px solid rgba(215, 215, 215, 1);
  200. display: flex;
  201. justify-content: center;
  202. align-items: center;
  203. img {
  204. max-width: 100%;
  205. }
  206. }
  207. }
  208. }
  209. </style>