chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<div id="mbVue" class="issue_post_body none" style="margin-top: 0px;">
 
    <div class="issue_post_body_card">
        <div class="post_body_card_job">
            <div class="body_card_job_box">
                <div class="card_job_box_post">模板名称</div>
                <div class="card_job_box_location">
                    <input type="text" v-model="info.name" placeholder="请输入模板名称">
                </div>
            </div>
            <div class="body_card_job_icon"></div>
        </div>
        <div class="post_body_card_job" @click="showTimePicker">
            <div class="body_card_job_box">
                <div class="card_job_box_post">面试时间</div>
                <div class="card_job_box_name">{{info.intertime ? info.intertime : '请选择面试时间'}}</div>
            </div>
            <div class="body_card_job_icon">
                <img src="{yun:}$wap_style{/yun}/images/issue_add.png" alt="">
            </div>
        </div>
        <div class="post_body_card_job">
            <div class="body_card_job_box">
                <div class="card_job_box_post">联系人</div>
                <div class="card_job_box_location">
                    <input type="text" v-model="info.linkman" placeholder="请填写姓名">
                </div>
            </div>
            <div class="body_card_job_icon"></div>
        </div>
        <div class="post_body_card_job">
            <div class="body_card_job_box">
                <div class="card_job_box_post">联系方式</div>
                <div class="card_job_box_location">
                    <input type="number" v-model="info.linktel" placeholder="请输入手机号">
                </div>
            </div>
            <div class="body_card_job_icon"></div>
        </div>
        <div class="post_body_card_job">
            <div class="body_card_job_box">
                <div class="card_job_box_post">面试地址</div>
                <div class="card_job_box_location">
                    <input type="text" v-model="info.address" placeholder="输入具体工作地址">
                </div>
            </div>
 
        </div>
        <div class="remark">
            <div class="remark_name">备注信息</div>
            <div class="remark_word">
                <form action="" class="remark_word_box">
                    <textarea name="description" style="resize:none;" class="remark_word_text" v-model="info.content"
                              placeholder="请输入告知牛人的其他内容,例如所需材料"></textarea>
                </form>
            </div>
        </div>
    </div>
    <div class="issue_post_body_btn" @click="saveMb">保存</div>
 
    <van-popup v-model="timeShow" position="bottom"/>
        <van-datetime-picker v-model="currentDate" type="datetime" title="选择面试时间" @cancel="timeShow=false" :min-date="minDate"  @confirm="setInterTime" />
    </van-popup>
</div>
 
 
<script>
    var yid = '{yun:}$smarty.get.yid{/yun}';
    var mbVue = new Vue({
        el: '#mbVue',
        data: {
            islook: false,
            info: {
                name: '',
                intertime: '',
                linkman: '',
                linktel: '',
                address: '',
                content: ''
            },
 
            timeShow: false,
            currentDate: new Date(),
            minDate: new Date(),
        },
        created() {
            if (parseInt(yid) > 0) {
 
                this.getMbInfo();
            }else{
                $('#mbVue').css('display', 'block');
            }
        },
        methods: {
 
            getMbInfo: function () {
 
                var that = this,
                    paramer = {
                        yid: yid
                    };
                showLoading('加载中');
                $.post('{yun:}url d=wxapp h=com m=set c=yqmbedit{/yun}', paramer, function (data) {
                    hideLoading();
                    if (data.error == 1) {
                        let info = data.data;
                        that.info = info;
                    } else {
                        showModal(data.msg, function () {
                            history.back();
                        })
                    }
                    $('#mbVue').css('display', 'block');
                }, 'json');
            },
 
            showTimePicker(){
                var that = this;
                if (that.info.intertime){
 
                    that.currentDate = new Date(that.info.time);
                }
                that.timeShow = true;
            },
 
            setInterTime:function (value) {
 
                var that = this;
 
                var y = value.getFullYear()
                var m = value.getMonth() + 1
                m = m < 10 ? '0' + m : m
                var d = value.getDate()
                d = d < 10 ? '0' + d : d
                var h = value.getHours()
                h = h < 10 ? '0' + h : h
                var minute = value.getMinutes()
                minute = minute < 10 ? '0' + minute : minute
                var second = value.getSeconds()
                second = second < 10 ? '0' + second : second
                that.info.intertime =y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
                that.timeShow = false;
            },
 
            saveMb:function(){
                var that = this;
 
                if (that.info.name.length == 0){
                    return showToast('模板名称不能为空');
                }
                if (that.info.intertime.length == 0){
                    return showToast('面试时间不能为空');
                }
                if (that.info.linkman.length == 0){
                    return showToast('联系人不能为空');
                }
                if (that.info.linktel.length == 0){
                    return showToast('联系电话不能为空');
                }
                if (that.info.address.length == 0){
                    return showToast('面试地址不能为空');
                }
 
                var paramer = {
                    name: that.info.name,
                    intertime: that.info.intertime,
                    linkman: that.info.linkman,
                    linktel: that.info.linktel,
                    address: that.info.address,
                    content: that.info.content
                };
                if (parseInt(yid)>0){
                    paramer.yid = yid;
                }
                showLoading('修改中');
                $.post('{yun:}url d=wxapp h=com m=set c=yqmbeditsave{/yun}', paramer, function (data) {
                    hideLoading();
                    if (data.error == 1) {
                        showToast(data.msg, 2, function () {
                            window.localStorage.setItem("needRefresh", 1);
                            history.back();
                        });
                    } else {
                        return showModal(data.msg)
                    }
                }, 'json');
            }
 
        }
    });
</script>
</body>
</html>