statistics2_look.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <!-- -->
  2. <template>
  3. <div class="holdingAdd">
  4. <TabList :ind="2" />
  5. <div class="right">
  6. <div class="top">
  7. <el-breadcrumb separator="/">
  8. <el-breadcrumb-item to="">首页</el-breadcrumb-item>
  9. <el-breadcrumb-item to="">库房管理</el-breadcrumb-item>
  10. <el-breadcrumb-item>藏品移库</el-breadcrumb-item>
  11. <el-breadcrumb-item id="mytitle">查看</el-breadcrumb-item>
  12. </el-breadcrumb>
  13. </div>
  14. <!-- 后面追加的功能-tab栏切换 -->
  15. <ul class="topTab">
  16. <li :class="{ active: topTabInd === 0 }" @click="topTabInd = 0">
  17. 移库信息
  18. </li>
  19. <li :class="{ active: topTabInd === 1 }" @click="topTabInd = 1">
  20. 审核信息
  21. </li>
  22. </ul>
  23. <div class="conten" v-if="topTabInd === 0">
  24. <div class="info">
  25. <div class="row">
  26. <div><span>藏品名称:</span>{{myObj.name}}</div>
  27. <div><span>总登记号:</span>{{myObj.num}}</div>
  28. </div>
  29. <div class="row">
  30. <div><span>登记人:</span>{{myObj.realName}}</div>
  31. <div><span>登记时间:</span>{{myObj.updateTime}}</div>
  32. </div>
  33. </div>
  34. <div class="con_edit">
  35. <div class="title">移库记录
  36. <el-button size="small" @click="look">藏品信息</el-button>
  37. </div>
  38. <div class="editChange">
  39. <div style="width:50%">原来位置</div>
  40. <div style="width:50%">移库位置</div>
  41. </div>
  42. <div class="father">
  43. <div class="con_txt" >
  44. <div style="width:50%">
  45. <el-cascader
  46. disabled
  47. style="width:100%"
  48. :props="{ value: 'id', label: 'name' }"
  49. v-model="oldLocation"
  50. :options="options"
  51. ></el-cascader>
  52. </div>
  53. <div style="width:50%">
  54. <el-cascader
  55. disabled
  56. style="width:100%"
  57. :props="{ value: 'id', label: 'name' }"
  58. v-model="newLocation"
  59. :options="options"
  60. ></el-cascader>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- 最下面的按钮 -->
  66. <div class="button">
  67. <el-button @click="$router.push('/layout/statistics2')">返回</el-button>
  68. </div>
  69. </div>
  70. <!-- 后面追加的审核信息 -->
  71. <div class="conten conten2" v-else>
  72. <div class="conten2_head">
  73. <div style="width:200px">类型</div>
  74. <div style="width:300px">审核结果</div>
  75. <div>审核说明</div>
  76. </div>
  77. <div class="conten2_head conten2_con">
  78. <div style="width:200px">主任审核</div>
  79. <div style="width:300px">{{myObj.status1}}</div>
  80. <div>{{myObj.reason}}</div>
  81. </div>
  82. <div class="conten2_head conten2_con last">
  83. <div style="width:200px">馆长审核</div>
  84. <div style="width:300px">{{myObj.status2}}</div>
  85. <div>{{myObj.reasonCurator?myObj.reasonCurator:'-'}}</div>
  86. </div>
  87. <!-- 最下面的按钮 -->
  88. <div class="button">
  89. <el-button @click="$router.push('/layout/statistics2')">返回</el-button>
  90. </div>
  91. </div>
  92. </div>
  93. <!-- 点击查看显示弹窗 -->
  94. <Statistics2Look :dialogFormVisible.sync='isShow' :myObj='myObjLook' ref="mylook"/>
  95. </div>
  96. </template>
  97. <script>
  98. import { detailsById } from '../../apis/holding'
  99. import { getTreeList } from '@/apis/statistics0'
  100. import Statistics2Look from '../holding/holding0_audit_Dia.vue'
  101. import { getDetailById } from '@/apis/statistics2'
  102. import TabList from '@/components/tabLeft3.vue'
  103. export default {
  104. name: 'statistics2Look2',
  105. // import引入的组件需要注入到对象中才能使用
  106. components: { TabList, Statistics2Look },
  107. data () {
  108. // 这里存放数据
  109. return {
  110. topTabInd: 0,
  111. options: [],
  112. oldLocation: '',
  113. newLocation: '',
  114. // 位置
  115. fujianLook: [],
  116. myObjLook: {},
  117. isShow: false,
  118. myObj: {}
  119. }
  120. },
  121. // 监听属性 类似于data概念
  122. computed: {},
  123. // 监控data中的数据变化
  124. watch: {},
  125. // 方法集合
  126. methods: {
  127. async look () {
  128. const res = await detailsById(this.myObj.goodsId)
  129. const obj = res.data
  130. // console.log(999, obj)
  131. // obj.goodsTypeName = val.goodsTypeId // 修改文物类别
  132. if (typeof (obj.level) === 'number') obj.level = this.myWwjb(obj.level) // 修改文物级别
  133. if (obj.textureType === 0) obj.textureType = '单一质地'
  134. else if (obj.textureType === 1) obj.textureType = '复合质地'// 修改质地类型
  135. if (obj.amountType === 0) obj.amountType = '单件'
  136. else if (obj.amountType === 1) obj.amountType = '一套多件'// 修改数量类型
  137. obj.numTypeId = this.mycategory(obj.numTypeId)// 编号类型
  138. obj.goodsTypeName = this.category(obj.goodsTypeId)// 文物类别
  139. obj.integrity = this.spoil(obj.integrity)// 完残程度
  140. obj.repair = this.mySave(obj.repair)// 保存状态
  141. this.myObjLook = obj
  142. this.isShow = true
  143. }
  144. },
  145. // 生命周期 - 创建完成(可以访问当前this实例)
  146. async created () {
  147. this.myObj = this.$route.query
  148. if (this.myObj.status === '馆长审核中') {
  149. this.myObj.status1 = '主任通过'
  150. this.myObj.status2 = '审核中'
  151. } else if (this.myObj.status === '主任不通过') {
  152. this.myObj.status1 = '主任不通过'
  153. this.myObj.status2 = '-'
  154. } else if (this.myObj.status === '馆长不通过') {
  155. this.myObj.status1 = '主任通过'
  156. this.myObj.status2 = '馆长不通过'
  157. } else if (this.myObj.status === '已完成') {
  158. this.myObj.status1 = '主任通过'
  159. this.myObj.status2 = '馆长通过'
  160. }
  161. // 获取上个页面传递的数据
  162. const res = await getDetailById(this.myObj.id)
  163. this.oldLocation = res.data.storageId.split(',')
  164. this.oldLocation = this.oldLocation.map(Number)
  165. this.newLocation = res.data.updateStorageId.split(',')
  166. this.newLocation = this.newLocation.map(Number)
  167. },
  168. // 生命周期 - 挂载完成(可以访问DOM元素)
  169. async mounted () {
  170. // 获取位置信息
  171. const res1 = await getTreeList()
  172. this.options = res1.data
  173. },
  174. beforeCreate () {}, // 生命周期 - 创建之前
  175. beforeMount () {}, // 生命周期 - 挂载之前
  176. beforeUpdate () {}, // 生命周期 - 更新之前
  177. updated () {}, // 生命周期 - 更新之后
  178. beforeDestroy () {}, // 生命周期 - 销毁之前
  179. destroyed () {}, // 生命周期 - 销毁完成
  180. activated () {} // 如果页面有keep-alive缓存功能,这个函数会触发
  181. }
  182. </script>
  183. <style lang='less' scoped>
  184. //@import url(); 引入公共css类
  185. .holdingAdd {
  186. /deep/#mytitle > span {
  187. font-weight: 800;
  188. }
  189. display: flex;
  190. .right {
  191. width: 100%;
  192. display: flex;
  193. flex-direction: column;
  194. .top {
  195. padding-left: 18px;
  196. display: flex;
  197. align-items: center;
  198. margin-left: 2px;
  199. height: 40px;
  200. }
  201. .topTab {
  202. display: flex;
  203. align-items: center;
  204. margin: 0 20px;
  205. height: 80px;
  206. background-color: #fff;
  207. padding: 0 35px;
  208. li {
  209. padding: 0 10px 5px;
  210. margin-right: 20px;
  211. font-weight: 700;
  212. cursor: pointer;
  213. color: black;
  214. }
  215. .active {
  216. color: #3e5eb3;
  217. border-bottom: 2px solid #3e5eb3;
  218. }
  219. }
  220. }
  221. .conten {
  222. position: relative;
  223. padding:0 24px 24px;
  224. color: black;
  225. flex: 1;
  226. background-color: #fff;
  227. margin: 0 20px 40px;
  228. .info{
  229. .row{
  230. display: flex;
  231. &>div{
  232. flex: 1;
  233. border: 1px solid #ccc;
  234. padding: 15px 18px;
  235. &>span {
  236. font-weight: 700;
  237. }
  238. }
  239. }
  240. }
  241. .con_edit{
  242. color: black;
  243. margin: 24px 0;
  244. max-height: 460px;
  245. // background-color: cadetblue;
  246. .title{
  247. display: flex;
  248. align-items: center;
  249. justify-content: space-between;
  250. padding:0 38px;
  251. height: 50px;
  252. font-weight: 700;
  253. border: 1px solid #ccc;
  254. }
  255. .editChange{
  256. font-weight: 700;
  257. height: 50px;
  258. display: flex;
  259. &>div {
  260. background-color: #fafafa;
  261. padding-left: 18px;
  262. border: 1px solid #ccc;
  263. height: 100%;
  264. line-height: 50px;
  265. }
  266. }
  267. .father{
  268. max-height: 320px;
  269. overflow: auto;
  270. }
  271. .con_txt{
  272. /deep/.el-input__inner {
  273. display: flex;
  274. align-items: center;
  275. padding: 0;
  276. background-color: transparent;
  277. border: none;
  278. font-size: 16px;
  279. color: black;
  280. }
  281. /deep/.el-input__suffix-inner {
  282. display: none;
  283. }
  284. display: flex;
  285. &>div {
  286. border: 1px solid #ccc;
  287. padding: 8px 0;
  288. padding-left: 18px;
  289. }
  290. }
  291. }
  292. .button {
  293. position: absolute;
  294. left: 50%;
  295. bottom: 20px;
  296. transform: translateX(-50%);
  297. width: 240px;
  298. display: flex;
  299. justify-content: center;
  300. }
  301. }
  302. .conten2 {
  303. .conten2_head{
  304. display: flex;
  305. border: 1px solid #ccc;
  306. border-bottom: none;
  307. border-right: none;
  308. display: flex;
  309. color: black;
  310. height: 50px;
  311. font-weight: 700;
  312. background-color: #d8dff0;
  313. &>div {
  314. padding-left: 15px;
  315. line-height: 49px;
  316. height: 100%;
  317. border-right: 1px solid #ccc;
  318. }
  319. &>div:nth-of-type(3) {
  320. flex: 1;
  321. }
  322. }
  323. .conten2_con{
  324. font-weight: 400;
  325. background-color: #fff;
  326. height: auto;
  327. &>div{
  328. height: auto;
  329. }
  330. }
  331. .last{
  332. border-bottom: 1px solid #ccc !important;
  333. }
  334. }
  335. }
  336. </style>