predetermineDetail.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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. confirm-button-text="好的"
  75. cancel-button-text="不用了"
  76. confirm-button-color="rgba(87, 107, 149, 1)"
  77. @close="show = false"
  78. >
  79. <div class="dialogInfo">
  80. <van-icon name="warning" style="color:#10aeff;font-size: 128rpx"/>
  81. <span style="margin-top: 16rpx">确认添加后将由您负责</span>
  82. <span style="margin-top: 8rpx">跟进该项目!</span>
  83. </div>
  84. </van-dialog>
  85. </div>
  86. </template>
  87. <script>
  88. export default {
  89. name: "predetermineDetail",
  90. data(){
  91. return{
  92. postData:{
  93. companyName: "无锡XXXXX有限公司",
  94. constant:'',
  95. demand:'',
  96. contact:'',
  97. phone:'',
  98. },
  99. fileList:[],
  100. show:false
  101. }
  102. },
  103. methods:{
  104. addtoMine(){
  105. this.show = true
  106. },
  107. confirm(){
  108. console.log(1111)
  109. },
  110. closePage(){
  111. uni.navigateTo({
  112. url:'/pages/subPackages/todo/index'
  113. })
  114. },
  115. deleteRYXXZP(event) {
  116. this.fileList.splice(event.detail.index, 1);
  117. this.$forceUpdate();
  118. },
  119. uploadRYXXZP(event) {
  120. console.log(event)
  121. let that = this;
  122. const { file } = event.detail;
  123. uni.uploadFile({
  124. url: that.$constant.BASE_URI + "/wx/fileController/upload",
  125. filePath: file.url,
  126. name: "file",
  127. formData: { user: "test" },
  128. success(res) {
  129. // 上传完成需要更新 fileList
  130. let data = JSON.parse(res.data);
  131. that.fileList.push({
  132. imgUrl: "/FileController/download/" + data.data[0],
  133. id: data.data[0],
  134. url:
  135. that.$constant.BASE_URI +
  136. "/FileController/download/" +
  137. data.data[0],
  138. isImage: true,
  139. });
  140. },
  141. fail(res) {},
  142. });
  143. },
  144. }
  145. }
  146. </script>
  147. <style lang="scss">
  148. .predetermineDetail{
  149. padding-bottom: 120rpx;
  150. .predetermineUl{
  151. margin: 24rpx 0;
  152. background: white;
  153. box-sizing: border-box;
  154. padding: 0 32rpx;
  155. .predetermineLi{
  156. padding: 32rpx 0;
  157. border-bottom: 1px solid rgba(230, 230, 230, 1);
  158. display: flex;
  159. justify-content: space-between;
  160. }
  161. .predetermineLi2{
  162. padding: 32rpx 0;
  163. border-bottom: 1px solid rgba(230, 230, 230, 1);
  164. display: flex;
  165. flex-direction: column;
  166. }
  167. .van-cell {
  168. background: #F5F7FA !important;
  169. border-radius: 8rpx;
  170. font-size: 28rpx;
  171. margin-top: 16rpx;
  172. }
  173. .liName{
  174. color: rgba(51, 51, 51, 1);
  175. font-size: 32rpx;
  176. }
  177. .liIpt{
  178. color: rgba(102, 102, 102, 1);
  179. font-size: 32rpx;
  180. text-align: right;
  181. }
  182. }
  183. .predetermineBox{
  184. padding: 32rpx;
  185. background: white;
  186. box-sizing: border-box;
  187. margin-bottom: 24rpx;
  188. .titleBox{
  189. display: flex;
  190. align-items: center;
  191. .titleName{
  192. color: rgba(24, 23, 42, 1);
  193. font-size: 32rpx;
  194. font-weight: 600;
  195. margin-right: 16rpx;
  196. }
  197. .tips{
  198. font-size: 28rpx;
  199. color: rgba(179, 179, 179, 1);
  200. }
  201. }
  202. .houseBox{
  203. display: flex;
  204. flex-wrap: wrap;
  205. margin-top: 24rpx;
  206. min-height: 200rpx;
  207. .houseTag{
  208. width: 200rpx;
  209. height: 56rpx;
  210. background: rgba(245, 247, 250, 1);
  211. border-radius: 8rpx;
  212. display: flex;
  213. align-items: center;
  214. justify-content: center;
  215. font-size: 28rpx;
  216. color: rgba(51, 51, 51, 1);
  217. margin-right: 24rpx;
  218. margin-bottom: 24rpx;
  219. }
  220. }
  221. }
  222. .btnBox{
  223. display: flex;
  224. justify-content: space-evenly;
  225. margin-top: 64rpx;
  226. .cancelBtn{
  227. width: 240rpx;
  228. height: 80rpx;
  229. display: flex;
  230. align-items: center;
  231. justify-content: center;
  232. color: rgba(3, 101, 249, 1);
  233. font-size: 34rpx;
  234. background: rgba(0, 0, 0, 0.05);
  235. border-radius: 8rpx;
  236. &::after{
  237. border: none;
  238. }
  239. }
  240. .addBtn{
  241. width: 300rpx;
  242. height: 80rpx;
  243. display: flex;
  244. align-items: center;
  245. justify-content: center;
  246. color: white;
  247. font-size: 34rpx;
  248. background: rgba(3, 101, 249, 1);
  249. border-radius: 8rpx;
  250. &::after{
  251. border: none;
  252. }
  253. }
  254. }
  255. .dialogInfo{
  256. padding: 64rpx 32rpx;
  257. font-size: 34rpx;
  258. color:rgba(51, 51, 51, 1);
  259. display: flex;
  260. flex-direction: column;
  261. align-items: center;
  262. }
  263. }
  264. </style>