itemNumEleModal.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <!-- 维护款号成分 -- 发运明细 -->
  3. <a-modal
  4. title="维护款号成分"
  5. v-model="itemNumEleModVis"
  6. :confirmLoading="confirmLoading"
  7. width="76%"
  8. @ok="save"
  9. @cancel="handleCancel"
  10. >
  11. <a-card :bordered="false">
  12. <div class="table-page-search-wrapper">
  13. <!-- :rules="validatorRules" -->
  14. <a-form-model layout="inline" ref="form" :model="editItemNumber">
  15. <a-row :gutter="24">
  16. <a-col :md="6" :sm="8">
  17. <!-- required 必填项 disabled 禁用 -->
  18. <a-form-model-item label="款号" prop="itemNumber">
  19. <a-input placeholder="请输入款号" v-model="editItemNumber.itemNumber"></a-input>
  20. </a-form-model-item>
  21. </a-col>
  22. <a-col :md="6" :sm="8">
  23. <a-form-model-item label="物料成分" prop="materialComposition">
  24. <a-input placeholder="请输入物料成分" v-model="editItemNumber.materialComposition"></a-input>
  25. </a-form-model-item>
  26. </a-col>
  27. <a-col :md="6" :sm="8">
  28. <a-form-model-item label="是否做TC证书" prop="isTc">
  29. <a-select v-model="editItemNumber.isTc">
  30. <a-select-option value="">请选择</a-select-option>
  31. <a-select-option value="1">是</a-select-option>
  32. <a-select-option value="0">否</a-select-option>
  33. </a-select>
  34. </a-form-model-item>
  35. </a-col>
  36. </a-row>
  37. </a-form-model>
  38. </div>
  39. </a-card>
  40. <!-- 页面底部保存取消 -->
  41. <div
  42. :style="{
  43. position: 'absolute',
  44. right: 0,
  45. bottom: 0,
  46. width: '100%',
  47. borderTop: '1px solid #e9e9e9',
  48. padding: '10px 16px',
  49. background: '#fff',
  50. textAlign: 'right',
  51. zIndex: 1
  52. }"
  53. >
  54. <a-popconfirm title="确定放弃维护款号成分吗?" @confirm="handleCancel" okText="确定" cancelText="取消">
  55. <a-button :style="{ marginRight: '8px' }">取消</a-button>
  56. </a-popconfirm>
  57. <a-button type="primary" @click="save">
  58. 保存
  59. </a-button>
  60. </div>
  61. </a-modal>
  62. </template>
  63. <script>
  64. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  65. import JEllipsis from '@/components/jeecg/JEllipsis'
  66. import { addItemNumEle } from '@api/document/shipmentList'
  67. export default {
  68. name: 'ItemNumEleModal', // 维护款号成分
  69. mixins: [JeecgListMixin],
  70. components: { JEllipsis },
  71. data() {
  72. return {
  73. loading: false, // 表格加载
  74. confirmLoading: false,
  75. itemNumEleModVis: false,
  76. editItemNumber: {}, // 编辑维护款号成分
  77. record:{}
  78. }
  79. },
  80. // 接收父组件 方法
  81. props: {
  82. fatherList: {
  83. type: Function,
  84. default: null
  85. }
  86. },
  87. methods: {
  88. // 保存
  89. save() {
  90. addItemNumEle(this.editItemNumber).then(res => {
  91. if (res.success) {
  92. this.$message.success('维护款号成分成功')
  93. this.close()
  94. this.fatherList() // 调用父组件 重新渲染列表页数据显示
  95. }
  96. })
  97. },
  98. // 取消
  99. cancel() {
  100. this.itemNumEleModVis = false
  101. this.close()
  102. },
  103. handleCancel() {
  104. this.close()
  105. },
  106. close() {
  107. this.$emit('close')
  108. this.itemNumEleModVis = false
  109. }
  110. }
  111. }
  112. </script>
  113. <style lang="less" scoped>
  114. @import '~@assets/less/common.less';
  115. @import '~@assets/less/overwriter.less';
  116. /deep/ .ant-table-thead > tr > th {
  117. text-align: center;
  118. // font-weight: 700;
  119. }
  120. /deep/ .ant-table-tbody {
  121. text-align: center;
  122. }
  123. // /deep/ th.replacecolor {
  124. // background-color: #ccc;
  125. // }
  126. </style>