auditNoPassModal.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <a-modal
  3. centered
  4. class="bulkWarehousingOrder-auditNo-modal"
  5. :footer="null"
  6. :maskClosable="false"
  7. title="提示"
  8. v-model="isShow"
  9. @cancel="isShow=false"
  10. :width="960">
  11. <a-card size="small" :bordered="false" class="bulkWarehousingOrderDetail-cont">
  12. <!-- 总计 -->
  13. <a-alert style="margin-bottom:10px" type="error" message="对不起,审核失败! OCS和金蝶上产品成本不一致。请确保成本价格一致后再进行审核。" />
  14. <!-- 列表 -->
  15. <a-table
  16. class="sTable"
  17. ref="table"
  18. size="small"
  19. :rowKey="(record) => record.id"
  20. :columns="columns"
  21. :dataSource="list"
  22. :scroll="{ y: 400 }"
  23. :pagination="false"
  24. bordered>
  25. </a-table>
  26. </a-card>
  27. <div class="btn-cont">
  28. <a-button id="bulkWarehousingOrder-auditNo-modal-back" @click="isShow = false" style="margin-left: 15px;">返回列表</a-button>
  29. </div>
  30. </a-modal>
  31. </template>
  32. <script>
  33. export default {
  34. name: 'AuditNoPassModal',
  35. props: {
  36. openModal: { // 弹框显示状态
  37. type: Boolean,
  38. default: false
  39. }
  40. },
  41. data () {
  42. return {
  43. isShow: this.openModal, // 是否打开弹框
  44. list: []
  45. }
  46. },
  47. computed: {
  48. columns () {
  49. const arr = [
  50. { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
  51. { title: '产品编码', dataIndex: 'productCode', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
  52. { title: '产品名称', dataIndex: 'productName', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
  53. ]
  54. if (this.$hasPermissions('B_isShowCost')) { // 成本价权限
  55. arr.splice(5, 0, { title: 'OCS成本价', dataIndex: 'verifyCost', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  56. arr.splice(5, 0, { title: '金蝶成本价', dataIndex: 'productCost', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
  57. }
  58. return arr
  59. }
  60. },
  61. methods: {
  62. // 返回列表
  63. handleBack () {
  64. this.isShow = false
  65. },
  66. setData (data) {
  67. this.list = data
  68. this.list.map((item, i) => {
  69. item.no = i + 1
  70. })
  71. }
  72. },
  73. watch: {
  74. // 父页面传过来的弹框状态
  75. openModal (newValue, oldValue) {
  76. this.isShow = newValue
  77. },
  78. // 重定义的弹框状态
  79. isShow (newValue, oldValue) {
  80. if (!newValue) {
  81. this.$emit('close')
  82. }
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="less">
  88. .bulkWarehousingOrder-auditNo-modal{
  89. .ant-modal-body {
  90. padding: 10px 10px 20px;
  91. }
  92. .btn-cont {
  93. text-align: center;
  94. margin: 5px 0 10px;
  95. }
  96. }
  97. </style>