predetermineDetail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <div class="predetermineDetail">
  3. <ul class="predetermineUl">
  4. <li class="predetermineLi">
  5. <div class="liName">项目/企业名称</div>
  6. <input v-model="postData.companyName" class="liIpt">
  7. </li>
  8. <li class="predetermineLi2">
  9. <div class="liName">项目/企业简介</div>
  10. <van-field
  11. :value="postData.constant"
  12. autosize
  13. type="textarea"
  14. placeholder="请输入"
  15. class="myField"
  16. maxlength="800"
  17. show-word-limit
  18. />
  19. </li>
  20. <li class="predetermineLi2">
  21. <div class="liName">企业需求</div>
  22. <van-field
  23. :value="postData.demand"
  24. autosize
  25. type="textarea"
  26. placeholder="请输入"
  27. class="myField"
  28. maxlength="800"
  29. show-word-limit
  30. />
  31. </li>
  32. <li class="predetermineLi">
  33. <div class="liName">项目/企业联系人</div>
  34. <input v-model="postData.contact" class="liIpt" placeholder="请输入">
  35. </li>
  36. <li class="predetermineLi" style="border-bottom: none">
  37. <div class="liName">联系电话</div>
  38. <input v-model="postData.phone" class="liIpt" placeholder="请输入">
  39. </li>
  40. </ul>
  41. <div class="predetermineBox">
  42. <div class="titleBox">
  43. <span class="titleName">关联房源</span>
  44. <van-icon name="add" style="color:rgba(3, 101, 249, 1)"/>
  45. <span class="tips">(如有多个房源,可继续添加)</span>
  46. </div>
  47. <div class="houseBox">
  48. <div class="houseTag" v-for="item in 2">一期-A-1101</div>
  49. </div>
  50. </div>
  51. <div class="predetermineBox">
  52. <div class="titleBox" style="margin-bottom: 24rpx">
  53. <span class="titleName">其他附件</span>
  54. <span class="tips">(支持图片,最多12张)</span>
  55. </div>
  56. <van-uploader
  57. :max-count="12"
  58. @delete="deleteRYXXZP"
  59. :file-list="fileList"
  60. @after-read="uploadRYXXZP"
  61. :show-upload="true"
  62. />
  63. </div>
  64. <div class="btnBox">
  65. <button class="cancelBtn" @tap="closePage">关闭</button>
  66. <button class="addBtn" @tap="addtoMine">添加至我的招商</button>
  67. </div>
  68. <van-dialog
  69. use-slot
  70. :show="show"
  71. show-cancel-button
  72. confirm-button-open-type="getUserInfo"
  73. @confirm="confirm"
  74. >
  75. <div class="dialogInfo">
  76. <van-icon name="warning" style="color:red"/> &nbsp;确认添加后将由您负责跟进该项目!
  77. </div>
  78. </van-dialog>
  79. </div>
  80. </template>
  81. <script>
  82. export default {
  83. name: "predetermineDetail",
  84. data(){
  85. return{
  86. postData:{
  87. companyName: "无锡XXXXX有限公司",
  88. constant:'',
  89. demand:'',
  90. contact:'',
  91. phone:'',
  92. },
  93. fileList:[],
  94. show:false
  95. }
  96. },
  97. methods:{
  98. addtoMine(){
  99. this.show = true
  100. },
  101. confirm(){
  102. console.log(1111)
  103. },
  104. closePage(){
  105. uni.navigateTo({
  106. url:'/pages/subPackages/todo/index'
  107. })
  108. },
  109. deleteRYXXZP(event) {
  110. this.fileList.splice(event.detail.index, 1);
  111. this.$forceUpdate();
  112. },
  113. uploadRYXXZP(event) {
  114. console.log(event)
  115. let that = this;
  116. const { file } = event.detail;
  117. uni.uploadFile({
  118. url: that.$constant.BASE_URI + "/wx/fileController/upload",
  119. filePath: file.url,
  120. name: "file",
  121. formData: { user: "test" },
  122. success(res) {
  123. // 上传完成需要更新 fileList
  124. let data = JSON.parse(res.data);
  125. that.fileList.push({
  126. imgUrl: "/FileController/download/" + data.data[0],
  127. id: data.data[0],
  128. url:
  129. that.$constant.BASE_URI +
  130. "/FileController/download/" +
  131. data.data[0],
  132. isImage: true,
  133. });
  134. },
  135. fail(res) {},
  136. });
  137. },
  138. }
  139. }
  140. </script>
  141. <style lang="scss">
  142. .predetermineDetail{
  143. padding-bottom: 120rpx;
  144. .predetermineUl{
  145. margin: 24rpx 0;
  146. background: white;
  147. box-sizing: border-box;
  148. padding: 0 32rpx;
  149. .predetermineLi{
  150. padding: 32rpx 0;
  151. border-bottom: 1px solid rgba(230, 230, 230, 1);
  152. display: flex;
  153. justify-content: space-between;
  154. }
  155. .predetermineLi2{
  156. padding: 32rpx 0;
  157. border-bottom: 1px solid rgba(230, 230, 230, 1);
  158. display: flex;
  159. flex-direction: column;
  160. }
  161. .van-cell {
  162. background: #F5F7FA !important;
  163. border-radius: 8rpx;
  164. font-size: 28rpx;
  165. margin-top: 16rpx;
  166. }
  167. .liName{
  168. color: rgba(51, 51, 51, 1);
  169. font-size: 32rpx;
  170. }
  171. .liIpt{
  172. color: rgba(102, 102, 102, 1);
  173. font-size: 32rpx;
  174. text-align: right;
  175. }
  176. }
  177. .predetermineBox{
  178. padding: 32rpx;
  179. background: white;
  180. box-sizing: border-box;
  181. margin-bottom: 24rpx;
  182. .titleBox{
  183. display: flex;
  184. align-items: center;
  185. .titleName{
  186. color: rgba(24, 23, 42, 1);
  187. font-size: 32rpx;
  188. font-weight: 600;
  189. margin-right: 16rpx;
  190. }
  191. .tips{
  192. font-size: 28rpx;
  193. color: rgba(179, 179, 179, 1);
  194. }
  195. }
  196. .houseBox{
  197. display: flex;
  198. flex-wrap: wrap;
  199. margin-top: 24rpx;
  200. min-height: 200rpx;
  201. .houseTag{
  202. width: 200rpx;
  203. height: 56rpx;
  204. background: rgba(245, 247, 250, 1);
  205. border-radius: 8rpx;
  206. display: flex;
  207. align-items: center;
  208. justify-content: center;
  209. font-size: 28rpx;
  210. color: rgba(51, 51, 51, 1);
  211. margin-right: 24rpx;
  212. margin-bottom: 24rpx;
  213. }
  214. }
  215. }
  216. .btnBox{
  217. display: flex;
  218. justify-content: space-evenly;
  219. margin-top: 64rpx;
  220. .cancelBtn{
  221. width: 240rpx;
  222. height: 80rpx;
  223. display: flex;
  224. align-items: center;
  225. justify-content: center;
  226. color: rgba(3, 101, 249, 1);
  227. font-size: 34rpx;
  228. background: rgba(0, 0, 0, 0.05);
  229. border-radius: 8rpx;
  230. &::after{
  231. border: none;
  232. }
  233. }
  234. .addBtn{
  235. width: 300rpx;
  236. height: 80rpx;
  237. display: flex;
  238. align-items: center;
  239. justify-content: center;
  240. color: white;
  241. font-size: 34rpx;
  242. background: rgba(3, 101, 249, 1);
  243. border-radius: 8rpx;
  244. &::after{
  245. border: none;
  246. }
  247. }
  248. }
  249. .dialogInfo{
  250. padding: 64rpx 32rpx;
  251. font-size: 32rpx;
  252. }
  253. }
  254. </style>