schemeAdd.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="mainBox">
  3. <uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="方案信息"
  4. @clickLeft="back">
  5. </uni-nav-bar>
  6. <u-cell-group>
  7. <u-cell title="姓名" arrow-direction="down">
  8. <uni-data-picker v-model="form.typeId" slot="value" placeholder="请选择" :localdata="typeIdList"
  9. @change="typeOnchange">
  10. </uni-data-picker>
  11. </u-cell>
  12. <u-cell title="编码" arrow-direction="down">
  13. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.code"></u--input>
  14. </u-cell>
  15. <u-cell title="名称" arrow-direction="down">
  16. <u--input @click.native="selectProduct" slot="value" placeholder="请输入" border="surround"
  17. v-model="form.name">
  18. </u--input>
  19. <!-- <u--input slot="value" placeholder="请输入" border="surround" v-model="form.name"></u--input> -->
  20. </u-cell>
  21. <u-cell title="型号" arrow-direction="down">
  22. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.categoryModel"></u--input>
  23. </u-cell>
  24. <u-cell title="规格" arrow-direction="down">
  25. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.specification"></u--input>
  26. </u-cell>
  27. <u-cell title="仓库" arrow-direction="down">
  28. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.warehouseId"></u--input>
  29. </u-cell>
  30. <u-cell title="库存" arrow-direction="down">
  31. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.warehouseNum"></u--input>
  32. </u-cell>
  33. <u-cell title="数量" arrow-direction="down">
  34. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.totalCount"></u--input>
  35. </u-cell>
  36. <u-cell title="单位" arrow-direction="down">
  37. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.measureUnit"></u--input>
  38. </u-cell>
  39. <u-cell title="单价" arrow-direction="down">
  40. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.singlePrice"></u--input>
  41. </u-cell>
  42. <u-cell title="合计" arrow-direction="down">
  43. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.settlementPrice"></u--input>
  44. </u-cell>
  45. <u-cell title="详细内容" arrow-direction="down">
  46. <u--input slot="value" placeholder="请输入" border="surround" v-model="form.content"></u--input>
  47. </u-cell>
  48. <view class="footerButton">
  49. <u-button type="default" text="返回" @click="back"></u-button>
  50. <u-button type="primary" @click="save" text="保存"></u-button>
  51. </view>
  52. </u-cell-group>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. data() {
  58. return {
  59. form: {
  60. typeId: '2',
  61. code: '',
  62. name: '',
  63. categoryModel: '', // 型号
  64. specification: '', // 规格
  65. content: '', // 详细内容
  66. warehouseId: '', // 仓库
  67. warehouseNum: '', // 库存
  68. totalCount: '', // 数量
  69. measureUnit: '', // 单位
  70. singlePrice: '', // 单价
  71. settlementPrice: '', // 合计
  72. },
  73. typeIdList: [{
  74. text: '工时',
  75. value: '1'
  76. },
  77. {
  78. text: '零配件',
  79. value: '2'
  80. },
  81. {
  82. text: '差旅费',
  83. value: '3'
  84. }
  85. ],
  86. obtain: '主数据'
  87. }
  88. },
  89. onLoad(params) {
  90. this.obtain = params.obtain || '主数据'
  91. console.log(params, 'params');
  92. },
  93. methods: {
  94. typeOnchange(e) {
  95. console.log(e, 'eee');
  96. },
  97. selectProduct() {
  98. uni.navigateTo({
  99. url: `/pages/salesServiceManagement/toDoList/components/selectProduct?obtain=${this.obtain}`
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style scoped lang="scss">
  106. /deep/.u-cell__body__content {
  107. flex: none;
  108. margin-right: 16rpx;
  109. }
  110. .mainBox {
  111. padding-bottom: 84rpx;
  112. }
  113. .footerButton {
  114. width: 100%;
  115. height: 84rpx;
  116. display: flex;
  117. position: fixed;
  118. bottom: 0;
  119. /deep/.u-button {
  120. height: 100%;
  121. }
  122. >view {
  123. flex: 1;
  124. }
  125. }
  126. </style>