PurchasingInfo.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <div class="other">
  3. <el-form label-width="120px" ref="form" :model="form">
  4. <div class="divider">
  5. <div class="title">
  6. <div class="ele-bg-primary"></div>
  7. <span>采购信息</span>
  8. </div>
  9. <div class="ele-bg-primary ele-width"></div>
  10. </div>
  11. <el-row :gutter="24">
  12. <el-col :span="8">
  13. <el-form-item label="周期" prop="purchasingCycle">
  14. <el-input-number
  15. v-model="form.purchasingCycle"
  16. placeholder="请输入"
  17. :min="0"
  18. :controls="false"
  19. style="width: calc(100% - 100px)"
  20. />
  21. <DictSelection
  22. dictName="周期单位"
  23. clearable
  24. v-model="form.purchasingCycleUnit"
  25. style="width: 100px"
  26. >
  27. </DictSelection>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :span="8">
  31. <el-form-item label="倍数" prop="purchaseMultiplier">
  32. <el-input-number
  33. style="width: 100%"
  34. v-model="form.purchaseMultiplier"
  35. placeholder="请输入"
  36. :min="0"
  37. :controls="false"
  38. />
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="8">
  42. <el-form-item label="最低订购量" prop="minimumOrderQuantity">
  43. <el-input-number
  44. v-model="form.minimumOrderQuantity"
  45. placeholder="请输入"
  46. :min="0"
  47. :controls="false"
  48. style="width: calc(100% - 100px)"
  49. />
  50. <DictSelection
  51. dictName="计量单位"
  52. clearable
  53. v-model="form.measuringUnit"
  54. style="width: 100px"
  55. >
  56. </DictSelection>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="8">
  60. <el-form-item label="采购组织" prop="checkDepart">
  61. <deptSelect
  62. v-model="form.checkDepart"
  63. @changeGroup="searchDeptNodeClick"
  64. />
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="8">
  68. <el-form-item label="采购员" prop="checkPerson">
  69. <personSelect
  70. ref="directorRef"
  71. v-model="form.checkPerson"
  72. :init="false"
  73. />
  74. </el-form-item>
  75. </el-col>
  76. </el-row>
  77. </el-form>
  78. </div>
  79. </template>
  80. <script>
  81. import deptSelect from '@/components/CommomSelect/dept-select.vue';
  82. import personSelect from '@/components/CommomSelect/person-select.vue';
  83. export default {
  84. props: {
  85. form: {
  86. type: Object,
  87. default: {}
  88. }
  89. },
  90. components: { deptSelect, personSelect },
  91. data() {
  92. return {};
  93. },
  94. watch: {
  95. form(data) {
  96. console.log(data, 'data');
  97. if (data.checkDepart) {
  98. const params = { executeGroupId: data.checkDepart };
  99. this.$nextTick(() => {
  100. this.$refs.directorRef.getList(params);
  101. });
  102. }
  103. }
  104. },
  105. methods: {
  106. // 选择所属部门
  107. searchDeptNodeClick(id, info) {
  108. // 根据部门获取人员
  109. const params = { executeGroupId: id };
  110. this.$nextTick(() => {
  111. this.$refs.directorRef.getList(params);
  112. });
  113. }
  114. }
  115. };
  116. </script>
  117. <style lang="scss" scoped>
  118. .other {
  119. background: #fff;
  120. padding: 1px 17px;
  121. }
  122. .divider {
  123. margin: 0px 0 20px;
  124. .title {
  125. display: flex;
  126. align-items: center;
  127. margin-bottom: 10px;
  128. div {
  129. width: 8px;
  130. height: 20px;
  131. margin-right: 10px;
  132. }
  133. span {
  134. font-size: 20px;
  135. }
  136. }
  137. .ele-width {
  138. width: 100%;
  139. height: 2px;
  140. }
  141. }
  142. .form-line {
  143. display: flex;
  144. align-items: center;
  145. justify-content: space-between;
  146. .line-select {
  147. margin-left: 15px;
  148. }
  149. }
  150. ::v-deep .el-input-number .el-input__inner {
  151. text-align: left !important;
  152. }
  153. </style>