attribute.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <template>
  2. <div>
  3. <el-form label-width="100px" ref="form" :model="attributeData">
  4. <el-row>
  5. <el-col :span="16" label-width="100px">
  6. <el-form-item label="类型" prop="type">
  7. <el-select
  8. style="width: 100%"
  9. :disabled="true"
  10. v-model="attributeData.bomType"
  11. placeholder="请选择"
  12. >
  13. <el-option
  14. v-for="item in bomTypeOptions"
  15. :label="item.label"
  16. :value="item.value"
  17. :key="item.value"
  18. >
  19. </el-option>
  20. </el-select>
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col :span="16" label-width="100px">
  26. <el-form-item label="编码" prop="code">
  27. <el-input placeholder="" v-model="attributeData.code"></el-input>
  28. </el-form-item>
  29. </el-col>
  30. </el-row>
  31. <el-row>
  32. <el-col :span="16" label-width="100px">
  33. <el-form-item label="图号" prop="code">
  34. <el-input placeholder="" v-model="attributeData.imgCode"></el-input>
  35. </el-form-item>
  36. </el-col>
  37. </el-row>
  38. <el-row>
  39. <el-col :span="16" label-width="100px">
  40. <el-form-item label="名称" prop="name">
  41. <el-input placeholder="" v-model="attributeData.name"></el-input>
  42. </el-form-item>
  43. </el-col>
  44. </el-row>
  45. <el-row>
  46. <el-col :span="8" label-width="100px">
  47. <el-form-item label="型号" prop="name">
  48. <el-input
  49. placeholder=""
  50. v-model="attributeData.modeType"
  51. ></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="8" label-width="100px">
  55. <el-form-item label="规格" prop="name">
  56. <el-input
  57. placeholder=""
  58. v-model="attributeData.specification"
  59. ></el-input>
  60. </el-form-item>
  61. </el-col>
  62. </el-row>
  63. <el-row>
  64. <el-col :span="8" label-width="100px">
  65. <el-form-item label="材料" prop="name">
  66. <el-input
  67. placeholder=""
  68. v-model="attributeData.materialsName"
  69. ></el-input>
  70. </el-form-item>
  71. </el-col>
  72. <el-col :span="8" label-width="100px">
  73. <el-form-item label="物料编码" prop="name">
  74. <el-input
  75. placeholder=""
  76. v-model="attributeData.materialsCode"
  77. ></el-input>
  78. </el-form-item>
  79. </el-col>
  80. </el-row>
  81. <el-row>
  82. <el-col :span="8" label-width="100px">
  83. <el-form-item label="来源" prop="name">
  84. <el-input
  85. placeholder=""
  86. v-model="attributeData.sourceData"
  87. ></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="8" label-width="100px">
  91. <el-form-item label="用量" prop="name">
  92. <el-input placeholder="" v-model="attributeData.dosage"></el-input>
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. <el-row>
  97. <el-col :span="8" label-width="100px">
  98. <el-form-item label="单位" prop="name">
  99. <el-input placeholder="" v-model="attributeData.unit"></el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="8" label-width="100px">
  103. <el-form-item label="状态" prop="name">
  104. <el-select
  105. style="width: 100%"
  106. v-model="attributeData.status"
  107. placeholder="请选择"
  108. >
  109. <el-option
  110. v-for="item in statusOptions"
  111. :label="item.label"
  112. :value="item.value"
  113. :key="item.value"
  114. >
  115. </el-option>
  116. </el-select>
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <el-row>
  121. <el-col :span="8" label-width="100px">
  122. <el-form-item label="物料库路径" prop="name">
  123. <el-input
  124. placeholder=""
  125. v-model="attributeData.materielPath"
  126. ></el-input>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="8" label-width="100px">
  130. <el-form-item label="版本" prop="name">
  131. <el-input
  132. placeholder=""
  133. v-model="attributeData.versions"
  134. ></el-input>
  135. </el-form-item>
  136. </el-col>
  137. </el-row>
  138. <el-row>
  139. <el-col :span="20" label-width="100px">
  140. <el-form-item label="备注" prop="name">
  141. <el-input
  142. placeholder=""
  143. v-model="attributeData.remake"
  144. type="textarea"
  145. :rows="2"
  146. ></el-input>
  147. </el-form-item>
  148. </el-col>
  149. </el-row>
  150. <el-row>
  151. <el-col :span="8" label-width="100px">
  152. <el-form-item label="创建人" prop="name">
  153. <el-input
  154. placeholder=""
  155. disabled
  156. v-model="attributeData.createName"
  157. ></el-input>
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="8" label-width="100px">
  161. <el-form-item label="创建时间" prop="name">
  162. <el-input
  163. placeholder=""
  164. disabled
  165. v-model="attributeData.createTime"
  166. ></el-input>
  167. </el-form-item>
  168. </el-col>
  169. </el-row>
  170. <div class="btn_box">
  171. <el-button type="primary" >修改</el-button>
  172. </div>
  173. </el-form>
  174. </div>
  175. </template>
  176. <script>
  177. export default {
  178. data() {
  179. return {
  180. form: {},
  181. statusOptions: [
  182. {
  183. label: '默认',
  184. value: '0'
  185. },
  186. {
  187. label: '归档',
  188. value: '1'
  189. }
  190. ],
  191. bomTypeOptions: [
  192. {
  193. label: 'PBOM',
  194. value: 1
  195. },
  196. {
  197. label: 'MBOM',
  198. value: 2
  199. }
  200. ]
  201. };
  202. },
  203. props: {
  204. attributeData: {
  205. type: Object,
  206. default: {}
  207. }
  208. }
  209. };
  210. </script>
  211. <style lang="scss" scoped>
  212. .btn_box{
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. }</style>