check.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <div>
  3. <el-popover
  4. placement="top"
  5. v-model="visible">
  6. <p class="mt-10 normal-title">选择评审类型</p>
  7. <el-select class="mt-10" v-model="value" placeholder="请选择" size="mini">
  8. <el-option
  9. v-for="item in options"
  10. :key="item.value"
  11. :label="item.value + '-' + item.remarks"
  12. :value="item.value">
  13. <span style="float: left">{{ item.value }}</span>
  14. <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
  15. </el-option>
  16. </el-select>
  17. <div style="text-align: right; margin: 0">
  18. <el-button size="mini" type="text" @click="visible = false">取消</el-button>
  19. <el-button type="primary" size="mini" @click="confirm">{{ siteId == 'TZ' ? '下一步' : '确定'}}</el-button>
  20. </div>
  21. <el-button v-if="tool.checkAuth($route.name,'examine')" :disabled="data.status !== '提交' && data.status !== '交期确认'" type="primary" size="mini" slot="reference">审 核</el-button>
  22. </el-popover>
  23. <el-dialog title="选择押金单号" :visible.sync="visible2" append-to-body width="1000px">
  24. <el-table
  25. :header-cell-style="{background:'#EEEEEE',color:'#333'}"
  26. size="mini"
  27. border
  28. :data="list"
  29. style="width: 100%">
  30. <el-table-column
  31. prop="TYPE"
  32. label="来源">
  33. </el-table-column>
  34. <el-table-column
  35. prop="APA01"
  36. label="押金单号">
  37. </el-table-column>
  38. <el-table-column
  39. prop="APA07"
  40. label="客户名称">
  41. </el-table-column>
  42. <el-table-column
  43. prop="APA21"
  44. label="申请人">
  45. </el-table-column>
  46. <el-table-column
  47. prop="APA31"
  48. label="金额">
  49. </el-table-column>
  50. <el-table-column
  51. prop="APA22"
  52. label="所属部门">
  53. </el-table-column>
  54. <el-table-column
  55. prop="APA25"
  56. label="摘要说明">
  57. </el-table-column>
  58. <el-table-column
  59. label="操作"
  60. width="140">
  61. <template slot-scope="scope">
  62. <el-button type="text" size="mini" @click="onSubmit(scope.row)">选 择</el-button>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <div class="container normal-panel" style="text-align:right">
  67. <el-pagination
  68. background
  69. @size-change="handleSizeChange"
  70. @current-change="handleCurrentChange"
  71. :current-page="param.content.pageNumber"
  72. :page-sizes="[20, 50, 100, 200]"
  73. :total="total">
  74. </el-pagination>
  75. </div>
  76. </el-dialog>
  77. </div>
  78. </template>
  79. <script>
  80. export default {
  81. props:['data'],
  82. data () {
  83. return {
  84. list:[],
  85. siteId:JSON.parse(sessionStorage.getItem('active_account')).siteid,
  86. options:[],
  87. value:'',
  88. visible:false,
  89. visible2:false,
  90. param: {
  91. id:'20230414111602',
  92. content: {
  93. "pageNumber":1,
  94. "pageSize":20,
  95. keywords:''
  96. }
  97. },
  98. total:0
  99. }
  100. },
  101. methods: {
  102. async listData () {
  103. let res = await this.$api.requested(this.param)
  104. this.list = res.data
  105. this.total = res.total
  106. console.log(this.list);
  107. },
  108. async orderreviewtype () {
  109. const res = await this.$store.dispatch('optiontypeselect','orderreviewtype')
  110. this.options = res.data
  111. this.value = res.data[0].value
  112. },
  113. confirm () {
  114. if (this.siteId == 'TZ') {
  115. this.listData()
  116. this.visible2 = true
  117. } else {
  118. this.$emit('onSubmit','审核')
  119. }
  120. },
  121. async onSubmit (data) {
  122. let res = await this.$api.requested({
  123. id:'20230114161402',
  124. "content": {
  125. "sa_orderid": this.data.sa_orderid,
  126. "sys_enterpriseid": this.data.sys_enterpriseid,
  127. "sa_accountclassid": this.data.accountclass.sa_accountclassid,
  128. "reviewtype":this.value,
  129. "erpNo":data.APA01
  130. },
  131. })
  132. this.tool.showMessage(res,() => {
  133. this.visible2 = false
  134. this.$emit('onSuccess')
  135. })
  136. },
  137. handleSizeChange(val) {
  138. // console.log(`每页 ${val} 条`);
  139. this.param.content.pageSize = val
  140. this.listData()
  141. },
  142. handleCurrentChange(val) {
  143. // console.log(`当前页: ${val}`);
  144. this.param.content.pageNumber = val
  145. this.listData()
  146. },
  147. },
  148. created () {
  149. this.orderreviewtype()
  150. }
  151. }
  152. </script>
  153. <style scoped>
  154. </style>