table.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <!-- -->
  2. <template>
  3. <div class="bs-table">
  4. <el-table
  5. border stripe
  6. height="calc(100vh - 330px)"
  7. :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}"
  8. :data="tableData"
  9. style="width: 100%;font-size: 12px">
  10. <el-table-column
  11. prop="ruleno"
  12. label="收款条件编号"
  13. width="140">
  14. </el-table-column>
  15. <el-table-column
  16. prop="remarks"
  17. label="描述"
  18. >
  19. </el-table-column>
  20. <el-table-column label="应收款期计算依据">
  21. <el-table-column
  22. prop="name"
  23. label="订单">
  24. <el-table-column
  25. prop="point"
  26. label="订单审核"
  27. width="70">
  28. <template slot-scope="scope">
  29. <div v-if="scope.row.accountingnodes">
  30. <indexNew :data="scope.row.accountingnodes.ordercheck"></indexNew>
  31. </div>
  32. </template>
  33. </el-table-column>
  34. <el-table-column
  35. prop="days"
  36. label="后置天数"
  37. width="70">
  38. <template slot-scope="scope">
  39. <div v-if="scope.row.accountingnodes">
  40. <tableColumn :data="scope.row.accountingnodes.ordercheck" name="days"></tableColumn>
  41. </div>
  42. <div v-else>--</div>
  43. </template>
  44. </el-table-column>
  45. <el-table-column
  46. prop="amountrate"
  47. label="立账额度"
  48. style="text-align: center"
  49. width="70">
  50. <template slot-scope="scope">
  51. <div v-if="scope.row.accountingnodes">
  52. <tableColumn :data="scope.row.accountingnodes.ordercheck" name="amountrate"></tableColumn>
  53. </div>
  54. <div v-else>--</div>
  55. <!-- <div v-if="scope.row.point == '订单审核'">{{scope.row.amountrate * 100}}%</div>
  56. <div v-else>--</div>-->
  57. </template>
  58. </el-table-column>
  59. </el-table-column>
  60. <el-table-column
  61. prop="name"
  62. label="发货">
  63. <el-table-column
  64. prop="point"
  65. label="销售出库审核"
  66. width="100">
  67. <template slot-scope="scope">
  68. <div v-if="scope.row.accountingnodes">
  69. <indexNew :data="scope.row.accountingnodes.logisticscheck"></indexNew>
  70. </div>
  71. </template>
  72. </el-table-column>
  73. <el-table-column
  74. prop="days"
  75. label="后置天数"
  76. width="70">
  77. <template slot-scope="scope">
  78. <div v-if="scope.row.accountingnodes">
  79. <tableColumn :data="scope.row.accountingnodes.logisticscheck" name="days"></tableColumn>
  80. </div>
  81. <div v-else>--</div>
  82. </template>
  83. </el-table-column>
  84. <el-table-column
  85. prop="amountrate"
  86. label="立账额度"
  87. width="70">
  88. <template slot-scope="scope">
  89. <div v-if="scope.row.accountingnodes">
  90. <tableColumn :data="scope.row.accountingnodes.logisticscheck" name="amountrate"></tableColumn>
  91. </div>
  92. <div v-else>--</div>
  93. </template>
  94. </el-table-column>
  95. </el-table-column>
  96. <el-table-column
  97. prop="name"
  98. label="发票">
  99. <el-table-column
  100. prop="point"
  101. label="发票审核"
  102. width="70">
  103. <template slot-scope="scope">
  104. <div v-if="scope.row.accountingnodes">
  105. <indexNew :data="scope.row.accountingnodes.invoiceapplycheck"></indexNew>
  106. </div>
  107. </template>
  108. </el-table-column>
  109. <el-table-column
  110. prop="days"
  111. label="后置天数"
  112. width="70">
  113. <template slot-scope="scope">
  114. <div v-if="scope.row.accountingnodes">
  115. <tableColumn :data="scope.row.accountingnodes.invoiceapplycheck" name="days"></tableColumn>
  116. </div>
  117. <div v-else>--</div>
  118. </template>
  119. </el-table-column>
  120. <el-table-column
  121. prop="amountrate"
  122. label="立账额度"
  123. width="70">
  124. <template slot-scope="scope">
  125. <div v-if="scope.row.accountingnodes">
  126. <tableColumn :data="scope.row.accountingnodes.invoiceapplycheck" name="amountrate"></tableColumn>
  127. </div>
  128. <div v-else>--</div>
  129. </template>
  130. </el-table-column>
  131. </el-table-column>
  132. </el-table-column>
  133. <el-table-column
  134. prop="isdefault"
  135. label="是否默认条件"
  136. width="50">
  137. <template slot-scope="scope">
  138. <span v-if="scope.row.isdefault" style="color: red">是</span>
  139. <span v-else>否</span>
  140. </template>
  141. </el-table-column>
  142. <el-table-column
  143. prop="a"
  144. label="操作"
  145. width="100px">
  146. <template slot-scope="scope">
  147. <!-- <el-button type="text" size="mini" @click="goDetail(scope.row)">详 情</el-button>-->
  148. <edit :data="scope.row" class="inline-16" @onSuccess="onSuccess"></edit>
  149. <el-button :disabled="scope.row.isdefault === 1" size="mini" v-if="tool.checkAuth($route.name,'delete')" type="text" @click="onDel(scope.row.sa_receivableruleid)">删 除</el-button>
  150. </template>
  151. </el-table-column>
  152. </el-table>
  153. </div>
  154. </template>
  155. <script>
  156. import edit from '../components/edit'
  157. import tableColumn from "@/HDrpManagement/collectionRule/components/tableColumn";
  158. import indexNew from "@/HDrpManagement/collectionRule/components/indexNew";
  159. export default {
  160. props:['tableData'],
  161. data () {
  162. return {
  163. }
  164. },
  165. components:{edit,tableColumn,indexNew},
  166. methods: {
  167. goDetail (data) {
  168. let query = {id:data.sa_receivableruleid,rowindex:data.rowindex}
  169. this.$router.push({path:'/collectionRuleDetail',query:query})
  170. this.$store.dispatch('changeDetailDrawer',true)
  171. },
  172. onDel(id){
  173. this.$confirm('确定删除该收款条件吗?', '提示', {
  174. confirmButtonText: '确定',
  175. cancelButtonText: '取消',
  176. closeOnClickModal:false,
  177. type: 'warning'
  178. }).then(async() => {
  179. const res = await this.$api.requested({
  180. "id":20230110100203,
  181. "content":{
  182. "sa_receivableruleids":[id]
  183. }
  184. })
  185. this.tool.showMessage(res,()=>{
  186. this.$emit('onSuccess')
  187. })
  188. }).catch(() => {
  189. this.$message({
  190. type: 'info',
  191. message: '已取消删除'
  192. });
  193. });
  194. },
  195. onSuccess(){
  196. this.$emit('onSuccess')
  197. }
  198. }
  199. }
  200. </script>
  201. <style scoped>
  202. .search-icon:hover{
  203. font-weight: bold;
  204. background: #f1f2f3;
  205. cursor: pointer;
  206. }
  207. /deep/.ellipsis {
  208. display:-webkit-box;
  209. text-overflow:ellipsis;
  210. overflow:hidden;
  211. -webkit-line-clamp: 2;
  212. -webkit-box-orient:vertical;
  213. }
  214. /deep/.el-table--mini .el-table__cell {
  215. padding: 0 !important;
  216. }
  217. /deep/.el-table .el-table__cell {
  218. padding: 0 !important;
  219. }
  220. </style>