123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <template>
- <div class="predetermineDetail">
- <ul class="predetermineUl">
- <li class="predetermineLi">
- <div class="liName">项目/企业名称</div>
- <input v-model="postData.projectName" class="liIpt">
- </li>
- <li class="predetermineLi2">
- <div class="liName">项目/企业简介</div>
- <van-field
- :value="postData.projectInfo"
- autosize
- type="textarea"
- placeholder="请输入"
- class="myField"
- maxlength="800"
- show-word-limit
- />
- </li>
- <li class="predetermineLi2">
- <div class="liName">企业需求</div>
- <van-field
- :value="postData.companyNeed"
- autosize
- type="textarea"
- placeholder="请输入"
- class="myField"
- maxlength="800"
- show-word-limit
- />
- </li>
- <li class="predetermineLi">
- <div class="liName">项目/企业联系人</div>
- <input v-model="postData.projectManager" class="liIpt" placeholder="请输入">
- </li>
- <li class="predetermineLi" style="border-bottom: none">
- <div class="liName">联系电话</div>
- <input v-model="postData.managerPhone" class="liIpt" placeholder="请输入">
- </li>
- </ul>
- <div class="predetermineBox">
- <div class="titleBox">
- <span class="titleName">关联房源</span>
- <van-icon name="add" style="color:rgba(3, 101, 249, 1)"/>
- <span class="tips">(如有多个房源,可继续添加)</span>
- </div>
- <div class="houseBox">
- <div class="houseTag" v-for="item in buildList">{{item}}</div>
- </div>
- </div>
- <div class="predetermineBox">
- <div class="titleBox" style="margin-bottom: 24rpx">
- <span class="titleName">其他附件</span>
- <span class="tips">(支持图片,最多12张)</span>
- </div>
- <van-uploader
- :max-count="12"
- @delete="deleteRYXXZP"
- :file-list="fileList"
- @after-read="uploadRYXXZP"
- :show-upload="true"
- />
- </div>
- <div class="btnBox">
- <button class="cancelBtn" @tap="closePage">关闭</button>
- <button class="addBtn" @tap="addtoMine">添加至我的招商</button>
- </div>
- <van-dialog
- use-slot
- :show="show"
- show-cancel-button
- confirm-button-open-type="getUserInfo"
- @confirm="confirm"
- confirm-button-text="好的"
- cancel-button-text="不用了"
- confirm-button-color="rgba(87, 107, 149, 1)"
- @close="show = false"
- >
- <div class="dialogInfo">
- <van-icon name="warning" style="color:#10aeff;font-size: 128rpx"/>
- <span style="margin-top: 16rpx">确认添加后将由您负责</span>
- <span style="margin-top: 8rpx">跟进该项目!</span>
- </div>
- </van-dialog>
- </div>
- </template>
- <script>
- import {getByCodes, parkRoomSlateAddSale, getParkRoomSlateInfoById, getUserLocalStorageInfo} from "@/js_sdk/http";
- export default {
- name: "predetermineDetail",
- onLoad(options){
- this.id = options.id
- this.getById()
- },
- data(){
- return{
- id: '',
- postData:{
- },
- fileList:[],
- show:false,
- buildList: []
- }
- },
- methods:{
- addtoMine(){
- this.show = true
- },
- confirm(){
- this.postData.userId = getUserLocalStorageInfo().userId
- parkRoomSlateAddSale(this.postData).then(res=>{
- if(res.code == '200'){
- this.$showToast("审核成功");
- this.cancel()
- }else {
- this.$showToast(res.msg);
- }
- })
- },
- closePage(){
- uni.navigateTo({
- url:'/pages/subPackages/todo/index'
- })
- },
- deleteRYXXZP(event) {
- this.fileList.splice(event.detail.index, 1);
- this.$forceUpdate();
- },
- uploadRYXXZP(event) {
- console.log(event)
- let that = this;
- const { file } = event.detail;
- uni.uploadFile({
- url: that.$constant.BASE_URI + "/wx/fileController/upload",
- filePath: file.url,
- name: "file",
- formData: { user: "test" },
- success(res) {
- // 上传完成需要更新 fileList
- let data = JSON.parse(res.data);
- that.fileList.push({
- imgUrl: "/FileController/download/" + data.data[0],
- id: data.data[0],
- url:
- that.$constant.BASE_URI +
- "/FileController/download/" +
- data.data[0],
- isImage: true,
- });
- },
- fail(res) {},
- });
- },
- getById(){
- const data = {
- id: this.id
- }
- getParkRoomSlateInfoById(data).then(res=>{
- if(res.code == '200'){
- this.postData = res.data
- this.buildList = []
- this.buildList = res.data.fullName.split(",")
- }
- })
- },
- cancel(){
- uni.navigateBack({})
- }
- }
- }
- </script>
- <style lang="scss">
- .predetermineDetail{
- padding-bottom: 120rpx;
- .predetermineUl{
- margin: 24rpx 0;
- background: white;
- box-sizing: border-box;
- padding: 0 32rpx;
- .predetermineLi{
- padding: 32rpx 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- display: flex;
- justify-content: space-between;
- }
- .predetermineLi2{
- padding: 32rpx 0;
- border-bottom: 1px solid rgba(230, 230, 230, 1);
- display: flex;
- flex-direction: column;
- }
- .van-cell {
- background: #F5F7FA !important;
- border-radius: 8rpx;
- font-size: 28rpx;
- margin-top: 16rpx;
- }
- .liName{
- color: rgba(51, 51, 51, 1);
- font-size: 32rpx;
- }
- .liIpt{
- color: rgba(102, 102, 102, 1);
- font-size: 32rpx;
- text-align: right;
- }
- }
- .predetermineBox{
- padding: 32rpx;
- background: white;
- box-sizing: border-box;
- margin-bottom: 24rpx;
- .titleBox{
- display: flex;
- align-items: center;
- .titleName{
- color: rgba(24, 23, 42, 1);
- font-size: 32rpx;
- font-weight: 600;
- margin-right: 16rpx;
- }
- .tips{
- font-size: 28rpx;
- color: rgba(179, 179, 179, 1);
- }
- }
- .houseBox{
- display: flex;
- flex-wrap: wrap;
- margin-top: 24rpx;
- min-height: 200rpx;
- .houseTag{
- width: 200rpx;
- height: 56rpx;
- background: rgba(245, 247, 250, 1);
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- color: rgba(51, 51, 51, 1);
- margin-right: 24rpx;
- margin-bottom: 24rpx;
- }
- }
- }
- .btnBox{
- display: flex;
- justify-content: space-evenly;
- margin-top: 64rpx;
- .cancelBtn{
- width: 240rpx;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: rgba(3, 101, 249, 1);
- font-size: 34rpx;
- background: rgba(0, 0, 0, 0.05);
- border-radius: 8rpx;
- &::after{
- border: none;
- }
- }
- .addBtn{
- width: 300rpx;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- font-size: 34rpx;
- background: rgba(3, 101, 249, 1);
- border-radius: 8rpx;
- &::after{
- border: none;
- }
- }
- }
- .dialogInfo{
- padding: 64rpx 32rpx;
- font-size: 34rpx;
- color:rgba(51, 51, 51, 1);
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- }
- </style>
|