details.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item">
  4. <view class="text-title">
  5. <view class="title-circ">
  6. </view>
  7. <span>基本信息</span>
  8. </view>
  9. <view class="inventory-item">
  10. <view class="shuo-item-name">
  11. <view class="shuo-label-podnme">
  12. 计划单号:
  13. </view>
  14. <view class="shuo-cont">
  15. {{acceptDetaData.planNo}}
  16. </view>
  17. </view>
  18. </view>
  19. <view class="inventory-item">
  20. <view class="shuo-item">
  21. <view class="shuo-label">
  22. 采购品种:
  23. </view>
  24. <view class="shuo-cont">
  25. {{acceptDetaData.catCnt}}
  26. </view>
  27. </view>
  28. <view class="shuo-item">
  29. <view class="shuo-label">
  30. 总数量:
  31. </view>
  32. <view class="shuo-cont">
  33. {{acceptDetaData.sumCnt}}
  34. </view>
  35. </view>
  36. </view>
  37. <view class="inventory-item">
  38. <view class="shuo-item">
  39. <view class="shuo-label">
  40. 总金额:
  41. </view>
  42. <view class="shuo-cont">
  43. {{acceptDetaData.sumAmt}}
  44. </view>
  45. </view>
  46. <view class="shuo-item">
  47. <view class="shuo-label">
  48. 采购员:
  49. </view>
  50. <view class="shuo-cont">
  51. {{acceptDetaData.crteUsrName}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="inventory-item">
  56. <view class="shuo-item">
  57. <view class="shuo-label">
  58. 采购时间:
  59. </view>
  60. <view class="shuo-cont">
  61. {{acceptDetaData.crteTime}}
  62. </view>
  63. </view>
  64. <view class="shuo-item">
  65. <view class="shuo-label">
  66. 当前状态:
  67. </view>
  68. <view class="shuo-cont">
  69. {{acceptDetaData.stas}}
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view class="empty-cont" v-if="plandelsData.length=='0'">
  75. 暂无明细数据
  76. </view>
  77. <view class="inner-item" v-for="(item,idex) in plandelsData" :key="idex" @click.stop="itemDetails(item,idex)">
  78. <view class="text-title" v-if="idex=='0'">
  79. <view class="title-circ">
  80. </view>
  81. <span>耗材明细</span>
  82. </view>
  83. <view class="inventory-item">
  84. <view class="shuo-item-name">
  85. <view class="shuo-label-podnme">
  86. 耗材名称:
  87. </view>
  88. <view class="shuo-cont">
  89. <span>{{ item.prodName }}</span>
  90. </view>
  91. </view>
  92. </view>
  93. <view class="inventory-item">
  94. <view class="shuo-item-name">
  95. <view class="shuo-label-podnme">
  96. 耗材编码:
  97. </view>
  98. <view class="shuo-cont">
  99. <span>{{ item.prodCode }}</span>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="inventory-item">
  104. <view class="shuo-item">
  105. <view class="shuo-label">
  106. 规格:
  107. </view>
  108. <view class="shuo-cont">
  109. {{item.spec}}
  110. </view>
  111. </view>
  112. <view class="shuo-item">
  113. <view class="shuo-label">
  114. 型号:
  115. </view>
  116. <view class="shuo-cont">
  117. {{item.mol}}
  118. </view>
  119. </view>
  120. </view>
  121. <view class="inventory-item">
  122. <view class="shuo-item">
  123. <view class="shuo-label">
  124. 材质:
  125. </view>
  126. <view class="shuo-cont">
  127. {{item.matl}}
  128. </view>
  129. </view>
  130. <view class="shuo-item">
  131. <view class="shuo-label">
  132. 是否集采:
  133. </view>
  134. <view class="shuo-cont">
  135. <span v-if="item.isFas == '0'">否</span>
  136. <span v-if="item.isFas == '1'">是</span>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="inventory-item">
  141. <view class="shuo-item">
  142. <view class="shuo-label">
  143. 需求数量:
  144. </view>
  145. <view class="shuo-cont">
  146. {{item.demd}}
  147. </view>
  148. </view>
  149. <view class="shuo-item">
  150. <view class="shuo-label">
  151. 单价:
  152. </view>
  153. <view class="shuo-cont">
  154. {{ item.purcPric + "元/" + item.prcUnt }}
  155. </view>
  156. </view>
  157. </view>
  158. <view class="inventory-item">
  159. <view class="shuo-item">
  160. <view class="shuo-label">
  161. 采购总额:
  162. </view>
  163. <view class="shuo-cont">
  164. {{item.amt}}
  165. </view>
  166. </view>
  167. <view class="shuo-item">
  168. <view class="shuo-label">
  169. 需求来源:
  170. </view>
  171. <view class="shuo-cont">
  172. {{ item.souc }}
  173. </view>
  174. </view>
  175. </view>
  176. <view class="inventory-item">
  177. <view class="shuo-item">
  178. <view class="shuo-label">
  179. 需求时间:
  180. </view>
  181. <view class="shuo-cont">
  182. {{item.crteTime}}
  183. </view>
  184. </view>
  185. <view class="shuo-item">
  186. <view class="shuo-label">
  187. 需求发起人:
  188. </view>
  189. <view class="shuo-cont">
  190. {{ item.crteUsrName }}
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. <uni-popup ref="popup">
  196. <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定当前操作吗?"
  197. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  198. </uni-popup>
  199. <view class="botm-btn" v-if="acceptDetaData.stas == '待确认'">
  200. <button type="default" plain="true" style="width:200rpx;line-height: 70rpx;background: #01A992;color:#fff"
  201. @click.stop="accessData('Y')">确认</button>
  202. <button type="default" plain="true" style="width:200rpx;line-height: 70rpx;background: red;color:#fff"
  203. @click.stop="accessData('R')">退回</button>
  204. </view>
  205. </view>
  206. </template>
  207. <script>
  208. import {
  209. mapState,
  210. mapMutations,
  211. mapActions
  212. } from 'vuex';
  213. import moment from "moment";
  214. export default {
  215. data() {
  216. return {
  217. listData: [],
  218. acceptDetaData: {}
  219. }
  220. },
  221. computed: {
  222. ...mapState(['plandelsData'])
  223. },
  224. onShow() {
  225. let that = this;
  226. uni.getStorage({
  227. key: 'planDetailData',
  228. success: function(res) {
  229. that.touData(res.data.planNo);
  230. that.acceptDetaData = res.data;
  231. }
  232. });
  233. },
  234. mounted() {},
  235. methods: {
  236. ...mapActions(['getPlanDetail']),
  237. async touData(id) {
  238. this.getPlanDetail({
  239. planNo: id
  240. })
  241. },
  242. //确认/退回
  243. accessData(type) {
  244. this.$http('proplanconfirm.submit', {
  245. planNo: this.acceptDetaData.planNo,
  246. stas: type
  247. }, '加载中').then(res => {
  248. if (res.success == true) {
  249. uni.navigateTo({
  250. url: '/subpkg/pages/proplanconfirm/index',
  251. success: function(res) {
  252. console.log(res, "res")
  253. }
  254. });
  255. }
  256. }).catch(e => {
  257. })
  258. },
  259. //日期格式化
  260. forMatTime(time) {
  261. return moment(time).format("YYYY-MM-DD");
  262. },
  263. //加时分秒
  264. forMatTimehs(time) {
  265. return moment(time).format("YYYY-MM-DD HH:mm");
  266. },
  267. },
  268. watch: {
  269. }
  270. }
  271. </script>
  272. <style lang="scss" scoped>
  273. .query-wrap {
  274. width: 100%;
  275. height: 100%;
  276. padding: 20rpx;
  277. box-sizing: border-box;
  278. background-color: #F1F1F1;
  279. overflow-y: scroll;
  280. overflow-x: hidden;
  281. position: relative;
  282. padding-bottom: 200rpx;
  283. .botm-btn {
  284. width: 100%;
  285. height: 120rpx;
  286. background-color: #fff;
  287. position: fixed;
  288. left: 0;
  289. bottom: 0;
  290. padding-top: 40rpx;
  291. display: flex;
  292. align-items: center;
  293. justify-content: space-around;
  294. }
  295. .time-view {
  296. height: 350rpx;
  297. background-color: #fff;
  298. padding: 50rpx 50rpx 0 50rpx;
  299. box-sizing: border-box;
  300. .btn-view {
  301. width: 100%;
  302. height: 100rpx;
  303. margin-top: 100rpx;
  304. display: flex;
  305. justify-content: space-around;
  306. }
  307. }
  308. }
  309. uni-page-body {
  310. width: 100%;
  311. height: 100%;
  312. }
  313. </style>