wantDetail.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. <template>
  2. <Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
  3. <Card :bordered="false" dis-hover class="ivu-mt">
  4. <Tabs v-model="activeName">
  5. <TabPane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.val">
  6. <template v-if="item.val === 'info'">
  7. <Table :columns="columns" :data="info.info" ref="table"
  8. no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
  9. <template slot-scope="{ row,index }" slot="price">
  10. <div >{{row.price*1}}元/{{row.unit_name}}</div>
  11. </template>
  12. </Table>
  13. </template>
  14. <template v-if="item.val === 'base'">
  15. <div class="user-info">
  16. <div class="section" v-if=" info.ware && info.ware.id">
  17. <div class="section-hd">要货仓库</div>
  18. <div class="section-bd" >
  19. <div class="item">
  20. <div>仓库ID:</div>
  21. <div class="value">{{ info.ware.id}}</div>
  22. </div>
  23. <div class="item">
  24. <div>仓库名称:</div>
  25. <div class="value">{{ info.ware.title}}</div>
  26. </div>
  27. <div class="item">
  28. <div>手机号码:</div>
  29. <div class="value">{{ info.ware.phone}}</div>
  30. </div>
  31. <div class="item">
  32. <div>详细地址:</div>
  33. <div class="value">{{info.ware.detailed_address}}</div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="section" v-if=" info.tware && info.tware.id">
  38. <div class="section-hd">出货仓库</div>
  39. <div class="section-bd" >
  40. <div class="item">
  41. <div>仓库ID:</div>
  42. <div class="value">{{ info.tware.id}}</div>
  43. </div>
  44. <div class="item">
  45. <div>仓库名称:</div>
  46. <div class="value">{{ info.tware.title}}</div>
  47. </div>
  48. <div class="item">
  49. <div>手机号码:</div>
  50. <div class="value">{{ info.tware.phone}}</div>
  51. </div>
  52. <div class="item">
  53. <div>详细地址:</div>
  54. <div class="value">{{info.tware.detailed_address}}</div>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="section" v-if=" info.store && info.store.id">
  59. <div class="section-hd">要货仓库</div>
  60. <div class="section-bd" >
  61. <div class="item">
  62. <div>仓库ID:</div>
  63. <div class="value">{{ info.store.id}}</div>
  64. </div>
  65. <div class="item">
  66. <div>仓库名称:</div>
  67. <div class="value">{{ info.store.name}}</div>
  68. </div>
  69. <div class="item">
  70. <div>手机号码:</div>
  71. <div class="value">{{ info.store.phone}}</div>
  72. </div>
  73. <div class="item">
  74. <div>详细地址:</div>
  75. <div class="value">{{info.store.detailed_address}}</div>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="section" v-if=" info.tstore && info.tstore.id">
  80. <div class="section-hd">出货仓库</div>
  81. <div class="section-bd" >
  82. <div class="item">
  83. <div>仓库ID:</div>
  84. <div class="value">{{ info.tstore.id}}</div>
  85. </div>
  86. <div class="item">
  87. <div>仓库名称:</div>
  88. <div class="value">{{ info.tstore.name}}</div>
  89. </div>
  90. <div class="item">
  91. <div>手机号码:</div>
  92. <div class="value">{{ info.tstore.phone}}</div>
  93. </div>
  94. <div class="item">
  95. <div>详细地址:</div>
  96. <div class="value">{{info.tstore.detailed_address}}</div>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="section" v-if="info.cuser && info.cuser.id">
  101. <div class="section-hd">创建人</div>
  102. <div class="section-bd" >
  103. <div class="item">
  104. <div>创建人ID:</div>
  105. <div class="value">{{ info.cuser.id}}</div>
  106. </div>
  107. <div class="item">
  108. <div>创建人名称:</div>
  109. <div class="value">{{ info.cuser.staff_name}}</div>
  110. </div>
  111. <div class="item">
  112. <div>手机号码:</div>
  113. <div class="value">{{ info.cuser.phone}}</div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </template>
  119. </TabPane>
  120. </Tabs>
  121. </Card>
  122. </Drawer>
  123. </template>
  124. <script>
  125. import {
  126. getGodownList,
  127. createUser,
  128. getUserInfo,
  129. getWantInfo
  130. } from "@/api/erp";
  131. import Setting from "@/setting";
  132. export default {
  133. name: 'wantDetail',
  134. data() {
  135. return {
  136. info: {},
  137. roterPre: Setting.roterPre,
  138. psInfo: {},
  139. modals: false,
  140. activeName: 'base',
  141. list: [{
  142. val: 'base',
  143. label: '基础信息'
  144. },{
  145. val: 'info',
  146. label: '商品信息'
  147. },
  148. ],
  149. ckColumns: [
  150. {
  151. title: "ID",
  152. key: "id",
  153. width: 80,
  154. },
  155. {
  156. title: "title",
  157. key: "title",
  158. width: 200,
  159. },
  160. ],
  161. columns: [{
  162. title: "ID",
  163. key: "product_id",
  164. width: 80,
  165. },
  166. {
  167. title: "商品名称",
  168. key: "product_name",
  169. width: 150,
  170. },
  171. {
  172. title: "要货数量",
  173. key: "want_product_num",
  174. width: 120,
  175. },
  176. {
  177. title: "单位",
  178. key: "unit_name",
  179. width: 75,
  180. },
  181. ]
  182. }
  183. },
  184. watch: {
  185. },
  186. created() {},
  187. methods: {
  188. deit() {
  189. this.$router.push({
  190. path: this.roterPre + "/erp/user_add?id=" + this.formValidate.id
  191. });
  192. },
  193. getInfo(id) {
  194. getWantInfo(id).then(res => {
  195. console.log(res, 'res');
  196. this.modals = true
  197. this.info = res.data
  198. }).catch(err => {
  199. this.modals = false
  200. })
  201. }
  202. }
  203. }
  204. </script>
  205. <style lang="less" scoped>
  206. /deep/.ivu-modal-body {
  207. padding: 0;
  208. }
  209. .user-info {
  210. .section {
  211. padding: 25px 25px;
  212. border-bottom: 1px dashed #EEEEEE;
  213. &-hd {
  214. padding-left: 10px;
  215. border-left: 3px solid #1890FF;
  216. font-weight: 500;
  217. font-size: 14px;
  218. line-height: 16px;
  219. color: #303133;
  220. }
  221. &-bd {
  222. display: flex;
  223. flex-wrap: wrap;
  224. }
  225. .item {
  226. // flex: 0 0 calc(~"(100% - 60px) / 3");
  227. width: 25%;
  228. display: flex;
  229. margin: 16px 30px 0 0;
  230. font-size: 13px;
  231. color: #606266;
  232. &:nth-child(3n+3) {
  233. margin: 16px 0 0;
  234. }
  235. }
  236. .value {
  237. flex: 1;
  238. }
  239. .avatar {
  240. width: 60px;
  241. height: 60px;
  242. overflow: hidden;
  243. img {
  244. width: 100%;
  245. height: 100%;
  246. }
  247. }
  248. }
  249. }
  250. .user-row {
  251. padding: 30px 35px 0;
  252. &-text {
  253. flex: 1;
  254. align-self: center;
  255. }
  256. &-action {
  257. .ivu-btn {
  258. margin-left: 12px;
  259. font-size: 13px !important;
  260. color: rgba(0, 0, 0, 0.85);
  261. &:first-child {
  262. margin-left: 0;
  263. }
  264. &.ivu-btn-primary {
  265. border-color: #1890FF;
  266. background-color: #1890FF;
  267. color: #FFFFFF;
  268. }
  269. &.ivu-btn-success {
  270. border-color: #00C050;
  271. background-color: #00C050;
  272. color: #FFFFFF;
  273. }
  274. }
  275. }
  276. .nickname {
  277. font-weight: 500;
  278. font-size: 16px;
  279. line-height: 16px;
  280. color: rgba(0, 0, 0, 0.85);
  281. }
  282. .iconfont {
  283. margin-left: 7px;
  284. font-size: 18px;
  285. &:nth-child(2) {
  286. margin-left: 9px;
  287. }
  288. &.iconxiaochengxu {
  289. color: #007DFF;
  290. }
  291. &.icongongzhonghao {
  292. color: #00BF00;
  293. }
  294. &.iconPC {
  295. color: #F69B00;
  296. }
  297. &.iconh5 {
  298. color: #9F5CE3;
  299. }
  300. &.iconapp {
  301. color: #E36734;
  302. }
  303. }
  304. .level {
  305. margin-top: 5px;
  306. img {
  307. width: 42px;
  308. height: 20px;
  309. vertical-align: middle;
  310. +span {
  311. margin-left: 7px;
  312. }
  313. }
  314. .vip {
  315. display: inline-block;
  316. width: 56px;
  317. height: 26px;
  318. padding-left: 30px;
  319. // background: url("../../../../assets/images/vip-bg.png") left top/100% 100% no-repeat;
  320. font-weight: bold;
  321. font-size: 9px;
  322. line-height: 26px;
  323. color: #5F7DB5;
  324. transform-origin: left;
  325. transform: scale(0.75, 0.75);
  326. vertical-align: middle;
  327. }
  328. }
  329. }
  330. .info-row {
  331. flex-wrap: nowrap;
  332. padding: 20px 35px 24px;
  333. &-item {
  334. flex: none;
  335. width: 155px;
  336. font-size: 14px;
  337. line-height: 14px;
  338. color: rgba(0, 0, 0, 0.85);
  339. &-title {
  340. margin-bottom: 12px;
  341. font-size: 13px;
  342. line-height: 13px;
  343. color: #666666;
  344. }
  345. }
  346. }
  347. .ivu-tabs {
  348. color: rgba(0, 0, 0, 0.85);
  349. /deep/ .ivu-tabs-bar {
  350. border-bottom: 0;
  351. margin-bottom: 0;
  352. background-color: #F5F7FA;
  353. .ivu-tabs-nav-container {
  354. font-size: 13px;
  355. }
  356. .ivu-tabs-ink-bar {
  357. display: none;
  358. }
  359. .ivu-tabs-tab {
  360. padding: 7px 19px !important;
  361. margin-right: 0;
  362. line-height: 26px;
  363. }
  364. .ivu-tabs-tab-active {
  365. background-color: #FFFFFF;
  366. color: rgba(0, 0, 0, 0.85);
  367. &:before {
  368. content: "";
  369. position: absolute;
  370. top: 0;
  371. left: 0;
  372. width: 100%;
  373. height: 2px;
  374. background-color: #1890FF;
  375. }
  376. }
  377. }
  378. /deep/ .ivu-tabs-content {
  379. .ivu-tabs-tabpane {
  380. padding: 15px 15px !important;
  381. &:first-child {
  382. padding: 0 25px !important;
  383. }
  384. }
  385. }
  386. .product {
  387. display: flex;
  388. .image {
  389. width: 50px;
  390. height: 50px;
  391. }
  392. img {
  393. width: 100%;
  394. height: 100%;
  395. border-radius: 4px;
  396. }
  397. .title {
  398. flex: 1;
  399. padding-left: 13px;
  400. text-align: left;
  401. }
  402. }
  403. }
  404. .avatar {
  405. width: 60px;
  406. height: 60px;
  407. border-radius: 50%;
  408. overflow: hidden;
  409. img {
  410. width: 100%;
  411. height: 100%;
  412. }
  413. }
  414. .dashboard-workplace {
  415. &-header {
  416. &-avatar {
  417. width: 64px;
  418. height: 64px;
  419. border-radius: 50%;
  420. margin-right: 16px;
  421. font-weight: 600;
  422. }
  423. &-tip {
  424. width: 82%;
  425. display: inline-block;
  426. vertical-align: middle;
  427. &-title {
  428. font-size: 13px;
  429. color: #000000;
  430. margin-bottom: 12px;
  431. }
  432. &-desc {
  433. &-sp {
  434. width: 33.33%;
  435. color: #17233D;
  436. font-size: 13px;
  437. display: inline-block;
  438. }
  439. }
  440. }
  441. &-extra {
  442. .ivu-col {
  443. p {
  444. text-align: right;
  445. }
  446. p:first-child {
  447. span:first-child {
  448. margin-right: 4px;
  449. }
  450. span:last-child {
  451. color: #808695;
  452. }
  453. }
  454. p:last-child {
  455. font-size: 22px;
  456. }
  457. }
  458. }
  459. }
  460. }
  461. </style>
  462. <style scoped lang="stylus">
  463. .user_menu>>>.ivu-menu {
  464. width 100% !important;
  465. }
  466. /deep/ .ivu-form-item {
  467. margin: 20px 0 0 0 !important;
  468. }
  469. .info-list {
  470. display: flex;
  471. flex-wrap: wrap;
  472. padding: 0 0 0 20px;
  473. div {
  474. width: 50%
  475. }
  476. }
  477. .tit {
  478. font-weight: bold;
  479. padding: 20px 0 10px 0;
  480. }
  481. </style>