SetIsNotified.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <a-modal
  3. title="Set Notified Date"
  4. width="35%"
  5. :visible="visible"
  6. :maskClosable="false"
  7. switchFullscreen
  8. @ok = "handleOk"
  9. @cancel="handleCancel">
  10. <div>
  11. <a-card :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
  12. <div class="table-page-search-wrapper">
  13. <a-form :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" >
  14. <a-row :gutter="24">
  15. <a-col :md="24" :sm="24">
  16. <a-form-item label="Notified Date">
  17. <a-date-picker v-model:value="form.notified" value-format="YYYY-MM-DD" style="width: 100%;"/>
  18. </a-form-item>
  19. </a-col>
  20. </a-row>
  21. </a-form>
  22. </div>
  23. </a-card>
  24. </div>
  25. </a-modal>
  26. </template>
  27. <script lang="ts" setup>
  28. import {ref, reactive } from 'vue';
  29. import { defHttp } from '/@/utils/http/axios';
  30. import { message } from 'ant-design-vue';
  31. import { JDictSelectTag} from '/@/components/Form';
  32. var visible = ref(false);
  33. const emit = defineEmits([ 'success']); //定义emit
  34. var form = ref({
  35. notified :""
  36. });
  37. const labelCol = ref({
  38. xs: { span: 24 },
  39. sm: { span: 5 },
  40. });
  41. const wrapperCol = ref({
  42. xs: { span: 24 },
  43. sm: { span: 19 },
  44. });
  45. var fatherIds=ref("");
  46. function handleOk(){
  47. let params ={
  48. ids:fatherIds.value,
  49. notified:form.value.notified
  50. }
  51. defHttp
  52. .get({ url: '/saleCode/saleOrder/notifiedBatch',params}, { isTransformResponse: false })
  53. .then((res) => {
  54. if (res.success) {
  55. emit('success')
  56. handleCancel()
  57. }else{
  58. message.error(res.message);
  59. }
  60. })
  61. }
  62. function handleCancel(){
  63. visible.value = false;
  64. form.value.notified=''
  65. fatherIds.value = ''
  66. }
  67. function getTable(ids){
  68. visible.value = true
  69. fatherIds.value = ids
  70. }
  71. defineExpose({
  72. getTable
  73. });
  74. </script>
  75. <style scoped lang="less">
  76. /deep/.ant-form-item{
  77. margin-bottom: 8px !important;
  78. }
  79. // /deep/.ant-table-wrapper .ant-table-thead > tr > th, .ant-table-wrapper .ant-table-thead > tr > td{
  80. // padding: 8px !important;
  81. // }
  82. </style>