details.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <basicDetails
  3. ref="details"
  4. :titleText="mainData.enterprisename"
  5. formPath="Creditbilladj"
  6. :editData="mainData"
  7. :mainAreaData="mainAreaData"
  8. :turnPageId="20221008155103"
  9. idname="sa_creditbillid"
  10. :tags="[]"
  11. @pageChange="pageChange"
  12. delApiId="20221008155403"
  13. @onEditSuccess="queryMainData($route.query.id)">
  14. <div slot="tags">
  15. <!-- 使用此插槽可不传[tags] -->
  16. <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
  17. </div>
  18. <div slot="customOperation">
  19. <el-button class="inline-16" size="mini" @click="checkBuill(mainData)" v-if="mainData.status == '新建'">审 核</el-button>
  20. <!-- 此区域提供了自定义操作按钮 -->
  21. </div>
  22. <!-- <div slot="slot0" class="container normal-panel">
  23. <el-button size="small" type="primary" @click="createAgentAccount" class="normal-margin">创建经销商主账号</el-button>
  24. <tableLayout :layout="tablecols" :data="mainData.hrs" :custom="false" height="300px"></tableLayout>
  25. </div>
  26. <div slot="slot1" class="container normal-panel">
  27. <salescope :data="mainData"></salescope>
  28. </div>
  29. <div slot="slot2" class="container normal-panel">
  30. <SaleClass :data="mainData"></SaleClass>
  31. </div>
  32. <div slot="slot3" class="container normal-panel">
  33. <accountMoney :mainData="mainData"></accountMoney>
  34. </div> -->
  35. </basicDetails>
  36. </template>
  37. <script>
  38. // import salescope from './modules/salescope/list'
  39. // import SaleClass from './modules/saleclass/index'
  40. // import accountMoney from './modules/accountMoney/index'
  41. export default {
  42. data () {
  43. return {
  44. mainData:{},
  45. mainAreaData:[],
  46. }
  47. },
  48. components:{
  49. // salescope,
  50. // SaleClass,
  51. // accountMoney
  52. },
  53. methods:{
  54. async queryMainData (id) {
  55. const res = await this.$api.requested({
  56. "id": "20221008155203",
  57. "version":1,
  58. "content": {
  59. "sa_creditbillid":this.$route.query.id
  60. }
  61. })
  62. this.mainData = res.data
  63. this.changeDataStructure()
  64. },
  65. // 监听切换数据,上一页,下一页
  66. pageChange (id,rowindex) {
  67. this.$router.replace({path:'/creditbilladjDetail',query:{id:id,rowindex:rowindex}})
  68. this.queryMainData(id)
  69. },
  70. /* 审核 */
  71. async checkBuill(data) {
  72. if(data.status != '新建') return
  73. let res = this.$api.requested({
  74. "id": "20221008155303",
  75. "version":1,
  76. "content": {
  77. "sa_creditbillid":data.sa_creditbillid
  78. }
  79. })
  80. this.tool.showMessage(res,() => {
  81. this.queryMainData()
  82. })
  83. },
  84. changeDataStructure () {
  85. this.mainAreaData = [
  86. {
  87. label:'额度单号',
  88. value: this.mainData.billno
  89. },
  90. {
  91. label:'客户名称',
  92. value: this.mainData.enterprisename
  93. },
  94. {
  95. label:'账户编号',
  96. value: this.mainData.accountno
  97. },
  98. {
  99. label:'账户类型',
  100. value: this.mainData.accountname
  101. },
  102. {
  103. label:'信用额度',
  104. value: this.mainData.creditquota
  105. },
  106. {
  107. label:'状态',
  108. value: this.mainData.status
  109. },
  110. {
  111. label:'备注',
  112. value: this.mainData.remarks
  113. },
  114. {
  115. label:'状态',
  116. value: this.mainData.status
  117. },
  118. {
  119. label:'创建人',
  120. value: this.mainData.createby
  121. },
  122. {
  123. label:'创建时间',
  124. value: this.mainData.createdate
  125. },
  126. {
  127. label:'最近修改人',
  128. value: this.mainData.changeby
  129. },
  130. {
  131. label:'修改时间',
  132. value: this.mainData.changedate
  133. },
  134. {
  135. label:'审核人',
  136. value: this.mainData.checkby
  137. },
  138. {
  139. label:'审核时间',
  140. value: this.mainData.checkdate
  141. },
  142. ]
  143. }
  144. },
  145. mounted () {
  146. this.queryMainData(this.$route.query.id)
  147. },
  148. created () {
  149. // 验证权限
  150. this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
  151. },
  152. }
  153. </script>
  154. <style>
  155. </style>