apply_form.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
  4. <div class="main-title">
  5. <div class="title">工程订单</div>
  6. </div>
  7. <el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
  8. <el-row :gutter="20">
  9. <el-col :xs="24" :sm="12" :lg="8">
  10. <el-form-item label="订单号" prop="warehouse">
  11. <el-input v-model="mainForm.remark" placeholder="请输入订单号"></el-input>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
  15. <el-form-item label="单据日期" prop="date">
  16. <el-date-picker
  17. v-model="mainForm.date"
  18. type="date"
  19. value-format="yyyy-MM-dd"
  20. style="width: 100%;"
  21. placeholder="选择日期">
  22. </el-date-picker>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :xs="24" :sm="12" :lg="8">
  26. <el-form-item label="制单人" prop="warehouse">
  27. <el-input v-model="mainForm.remark" placeholder="请输入制单人"></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :xs="24" :sm="12" :lg="8">
  31. <el-form-item label="工程登录单号" prop="warehouse">
  32. <el-input v-model="mainForm.remark" placeholder="请输入工程登录单号"></el-input>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :xs="24" :sm="12" :lg="8">
  36. <el-form-item label="经销商编码" prop="warehouse">
  37. <el-input v-model="mainForm.remark" placeholder="请输入经销商编码"></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :xs="24" :sm="12" :lg="8">
  41. <el-form-item label="经销商名称" prop="warehouse">
  42. <el-input v-model="mainForm.remark" placeholder="请输入经销商名称"></el-input>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :xs="24" :sm="24" :lg="24">
  46. <el-form-item label="备注" prop="warehouse">
  47. <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. </el-row>
  51. </el-form>
  52. <div class="main-title">
  53. <div class="title">货品信息</div>
  54. <el-button type="primary" size="small" icon="el-icon-plus">添加货品</el-button>
  55. </div>
  56. <div class="table" style="margin-top: 20px">
  57. <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  58. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  59. <el-table-column align="center" label="引用单号" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
  60. <el-table-column align="center" label="单号类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  61. <el-table-column align="center" label="销售类型" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
  62. <el-table-column align="center" label="货品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
  63. <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
  64. <el-table-column align="center" label="计量单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  65. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  66. <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
  67. </el-table>
  68. </div>
  69. <div class="page-footer">
  70. <div class="footer" :class="classObj">
  71. <el-button type="primary" @click="clickSubmitForm">保 存</el-button>
  72. <el-button type="primary" @click="clickSubmitForm">提交审核</el-button>
  73. <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
  74. <el-button slot="reference">关 闭</el-button>
  75. </el-popconfirm>
  76. </div>
  77. </div>
  78. </div>
  79. </template>
  80. <script>
  81. import { getDetail } from "@/api/supply/reserve";
  82. export default {
  83. name: 'EnginForm',
  84. componentName: 'EnginForm',
  85. props: ['listItem'],
  86. data() {
  87. return {
  88. detailData: {},
  89. mainForm: {
  90. },
  91. }
  92. },
  93. computed: {
  94. sidebar() {
  95. return this.$store.state.app.sidebar
  96. },
  97. classObj() {
  98. return {
  99. hideSidebar: !this.sidebar.opened,
  100. openSidebar: this.sidebar.opened
  101. }
  102. },
  103. },
  104. created() {
  105. this.getDetail();
  106. },
  107. methods: {
  108. // 返回列表
  109. goBack() {
  110. this.$emit('backListFormDetail');
  111. },
  112. // 获取详情
  113. getDetail() {
  114. getDetail({id: this.listItem.id}).then(res => {
  115. this.detailData = res.data;
  116. })
  117. },
  118. clickSubmitForm() {
  119. },
  120. }
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. .detail-container {
  125. width: 100%;
  126. height: 100%;
  127. }
  128. .main-title {
  129. display: flex;
  130. justify-content: space-between;
  131. align-items: center;
  132. margin-top: 20px;
  133. height: 60px;
  134. border-bottom: 1px solid #DCDFE6;
  135. margin-bottom: 20px;
  136. .title {
  137. font-size: 16px;
  138. font-weight: 600;
  139. padding-left: 10px;
  140. }
  141. }
  142. </style>