invoiceOrder.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div>
  3. <addorderline :status="status" :sys_enterpriseid="sys_enterpriseid" @onSuccess="listData();$emit('onSuccess')"></addorderline>
  4. <el-table :data="list" size="mini" border>
  5. <el-table-column prop="sonum" label="订单号" width="150" fixed></el-table-column>
  6. <el-table-column prop="type" label="订单类型" width="90"></el-table-column>
  7. <el-table-column prop="checkdate" label="审核日期" width="150"></el-table-column>
  8. <el-table-column prop="itemno" label="产品编码" width="150"></el-table-column>
  9. <el-table-column prop="itemname" label="产品名称" width="150"></el-table-column>
  10. <el-table-column prop="price" label="订单单价" width="90"></el-table-column>
  11. <el-table-column prop="uninvoiceamount" label="可开票金额" width="90"></el-table-column>
  12. <el-table-column prop="invoiceaqty" label="本次开票数量" width="120"></el-table-column>
  13. <el-table-column prop="invoiceamount" label="本次开票金额" width="120"></el-table-column>
  14. <el-table-column prop="remarks" label="备注" min-width="150"></el-table-column>
  15. <el-table-column label="操作" width="90" fixed="right">
  16. <template slot-scope="scope">
  17. <changeOrderline v-if="tool.checkAuth($route.name,'InvioceOrder')" class="inline-16" :row="scope.row" :status="status" @onSuccess="listData();$emit('onSuccess')"></changeOrderline>
  18. <el-button v-if="tool.checkAuth($route.name,'InvioceOrder')" :disabled="status !== '新建'" size="small" type="text" @click="deleteRow(scope.row)">删 除</el-button>
  19. </template>
  20. </el-table-column>
  21. </el-table>
  22. <div class="container" style="text-align:right">
  23. <el-pagination
  24. background
  25. small
  26. @size-change="handleSizeChange"
  27. @current-change="handleCurrentChange"
  28. :current-page="currentPage"
  29. :page-sizes="[20, 50, 100, 200]"
  30. layout="total,sizes, prev, pager, next, jumper"
  31. :total="total">
  32. </el-pagination>
  33. </div>
  34. </div>
  35. </template>
  36. <script>
  37. import addorderline from './components/addorderline.vue'
  38. import changeOrderline from './components/changeOrderline.vue'
  39. export default {
  40. props:['sys_enterpriseid','status'],
  41. components:{
  42. addorderline,
  43. changeOrderline
  44. },
  45. data () {
  46. return {
  47. list:[],
  48. param:{
  49. "id": "20221217091303",
  50. "content": {
  51. "sa_invoiceapplyid":0,
  52. "where":{
  53. "condition":""
  54. }
  55. }
  56. },
  57. list:[],
  58. total:0,
  59. currentPage:0
  60. }
  61. },
  62. methods:{
  63. async listData (id) {
  64. this.param.content.sa_invoiceapplyid = this.$route.query.id
  65. const res = await this.$api.requested(this.param)
  66. this.list = res.data
  67. this.total = res.total
  68. this.currentPage = res.pageNumber
  69. },
  70. handleSizeChange(val) {
  71. // console.log(`每页 ${val} 条`);
  72. this.param.content.pageSize = val
  73. this.listData()
  74. },
  75. handleCurrentChange(val) {
  76. // console.log(`当前页: ${val}`);
  77. this.param.content.pageNumber = val
  78. this.listData()
  79. },
  80. // 删除明细
  81. async deleteRow (row) {
  82. const res = await this.$api.requested({
  83. "id": "20221217091403",
  84. "version":1,
  85. "content": {
  86. "sa_invoiceapply_orderids":[row.sa_invoiceapply_orderid]
  87. }
  88. })
  89. this.tool.showMessage(res,()=>{
  90. this.listData()
  91. this.$emit('onSuccess')
  92. })
  93. }
  94. },
  95. mounted () {
  96. this.listData()
  97. }
  98. }
  99. </script>
  100. <style>
  101. </style>