123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <template>
- <view>
- <view class="solids-bottom margin-bottom-sm">
- <view class="bg-white padding">
- <view class="text-gray text-sm padding-top">
- 请填写真是有效的信息,如有发现诈骗、虚假信息,我们会协助公安与相关法律部门进行调查。
- </view>
- </view>
- </view>
- <form>
- <view class="echo-formmain">
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 订单标题</view>
- <input placeholder="请输入" data-field="title" name="title" :value="form.title" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 公司名</view>
- <input placeholder="请输入" data-field="company_name" name="company_name" :value="form.company_name" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 招聘人数</view>
- <input type="number" placeholder="请输入" data-field="num" name="num" :value="form.num" @input="setInput"></input>
- <view>人</view>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 省市区</view>
- <picker mode="region" @change="RegionChange">
- <view class="picker">
- {{form.province}},{{form.city}},{{form.district}}
- </view>
- </picker>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 地址</view>
- <input placeholder="请输入" data-field="address" name="address" :value="form.address" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 招工年龄</view>
- <input placeholder="例如:18岁到50岁" data-field="agegroup" name="agegroup" :value="form.agegroup" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 咨询电话</view>
- <input placeholder="请输入" data-field="telephone" name="telephone" :value="form.telephone" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title">招聘标签</view>
- <input placeholder="空格分隔。例如:包吃住 包住宿" data-field="tags" name="tags" :value="form.tags" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title">工资</view>
- <input placeholder="5000/月" data-field="salary" name="salary" :value="form.salary" @input="setInput"></input>
- </view>
- <view class="cu-form-group">
- <view class="title">岗位要求</view>
- <view class="textareabox">
- <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="requirement" name="requirement" :value="form.requirement"
- @input="setInput"></textarea>
- </view>
- </view>
- <view class="cu-form-group">
- <view class="title">企业简介</view>
- <view class="textareabox">
- <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="comdetails" name="comdetails" :value="form.comdetails"
- @input="setInput"></textarea>
- </view>
- </view>
- <view class="cu-form-group">
- <view class="title">补充说明</view>
- <view class="textareabox">
- <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="remark" name="remark" :value="form.remark"
- @input="setInput"></textarea>
- </view>
- </view>
- <view class="padding-tb padding-lr-xs bg-white solids-top">
- <view class="title padding-bottom-sm text-lg">环境照片</view>
- <view class="grid col-4 grid-square flex-sub">
- <block v-for="(picitem,picindex) in form.picall" :key="picindex">
- <view class="bg-img" @tap="viewImage" :data-url="picitem">
- <image :src="picitem" mode="aspectFill"></image>
- <view class="cu-tag bg-red" @tap.stop="delImg" :data-index="index">
- <text class='cuIcon-close'></text>
- </view>
- </view>
- </block>
- <view class="solids" @tap="chooseImage" v-if="form.picall.length <= 12">
- <text class='cuIcon-cameraadd'></text>
- </view>
- </view>
- </view>
- <view class="padding flex flex-direction bg-white">
- <button class="cu-btn bg-blue margin-tb-sm lg" @tap="getMarket">获取市场行情</button>
- </view>
- <view class="cu-form-group">
- <view class="title" style="min-width: calc(10em + 15px);"> <text class="text-red text-bold padding-right-xs">*</text> 可否议价</view>
- <radio-group class="block" @change="isBargainChange">
- <view class="flex justify-start">
- <label class="flex align-center"> <radio class='red' :class="form.is_bargain==1?'checked':''" :checked="form.is_bargain==1?true:false" value="1"></radio> <text> 是</text></label>
- <label class="flex align-center"> <radio class='red' :class="form.is_bargain==2?'checked':''" :checked="form.is_bargain==2?true:false" value="2"></radio> <text> 否</text></label>
- </view>
- </radio-group>
- </view>
- <view class="cu-form-group">
- <view class="title">行情内容</view>
- <view class="textareabox">
- <textarea maxlength="-1" placeholder-class="placeholder" placeholder="例如:一次性交通补贴:1000元;入职前3个月,每个月600元。" data-field="market_content" name="market_content" :value="form.market_content"
- @input="setInput"></textarea>
- </view>
- </view>
- <view class="padding flex flex-direction bg-white">
- <button class="cu-btn bg-themeBtn margin-tb-sm lg" @tap="editRecruit">立即提交</button>
- <view class="padding"></view>
- </view>
- </view>
-
- </form>
-
- <view class="cu-modal bottom-modal" :class="modalName=='marketModal'?'show':''">
- <view class="cu-dialog">
- <view class="cu-bar bg-white">
- <view class="action text-blue" @tap="hideModal">关闭</view>
- </view>
- <view class="padding-xl">
- <block v-for="(item,index) in market" :key="index">
- <view class="cu-card dynamic no-card solid-bottom echo-comjobs-item margin-tb-sm">
- <view class="cu-item shadow padding-top-sm padding-bottom">
- <view class="padding-lr padding-bottom-xs flex justify-between align-left">
- <view class="basis-xl text-bold text-lg text-cut">
- {{item.name}}
- <text class="text-red margin-left">{{item.mobile}}</text>
- </view>
- <view class="basis-xs text-cut text-right text-gray text-sm">{{item.is_bargain == 1 ? '可议价' : '不可议价'}}</view>
- </view>
- <view class="padding-lr flex justify-between align-bottom">
- <view><text class="text-red text-bold">{{item.content}}</text></view>
- </view>
-
- <view class="grid solids-top text-center col-2">
- <view @tap="selectMarket" :data-index="index" class="padding-top"><text class="cuIcon-write padding-right-xs"></text> 选择 </view>
- <view @tap="callMobile" :data-mobile="item.mobile" class="text-red padding-top"><text class="cuIcon-pulldown padding-right-xs"></text> 拔打电话 </view>
- </view>
- </view>
- </view>
- </block>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var _this;
- import avatar from "@/components/yq-avatar/yq-avatar.vue";
- import pickerAddress from "@/components/pickerAddress/pickerAddress.vue";
- export default {
- components: {
- avatar,
- pickerAddress
- },
- data() {
- return {
- isRotate: false,
-
- userinfo: false,
- workerinfo: false,
- form: {
- id: 0,
- worker_id: 0,
- title: "",
- company_name: "",
- num: 1,
-
- province: "福建省",
- city: "泉州市",
- district: "晋江市",
- address: "",
-
- agegroup: "",
- tags: "",
- requirement: "",
- comdetails: "",
- picall: [],
- salary: "",
- telephone: "",
- remark: "",
- priority: "",
- market_content: "",
- is_bargain: 1,
- },
-
- modalName: null,
-
- market: [],
- }
- },
- onLoad: function(option) {
- _this = this;
- _this.userinfo = _this.checkLogin("/pages/my/my");
- _this.workerinfo = uni.getStorageSync('workerinfo') || false;
- if (_this.userinfo === false || _this.workerinfo === false) {
- uni.reLaunch({
- url: "/pages/my/my"
- });
- return false;
- }
-
- var id = option.id || 0;
- if (id > 0) {
- _this.$req.ajax({
- path: "woutjobs/getrecruit",
- data: {
- id: id
- }
- }).then((data) => {
- _this.form = data;
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- }
- },
- methods: {
- // 填写字段
- setInput: function(e) {
- var field = e.currentTarget.dataset.field;
- _this.form[field] = e.detail.value;
- },
- bindDateChange: function(e) {
- _this.form.candate = e.target.value;
- },
-
- showModal: function(e) {
- _this.modalName = e.currentTarget.dataset.modalname;
- },
- hideModal: function(e) {
- _this.modalName = null
- },
-
- RegionChange(e) {
- this.form.province = e.detail.value[0];
- this.form.city = e.detail.value[1];
- this.form.district = e.detail.value[2];
- },
- isBargainChange(e) {
- _this.form.is_bargain = e.detail.value;
- },
- getMarket() {
- _this.$req.ajax({
- path: "woutjobs/getmarket",
- data: {}
- }).then((data) => {
- _this.market = data.list;
- _this.modalName = 'marketModal';
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- callMobile(e) {
- let mobile = e.currentTarget.dataset.mobile;
- uni.makePhoneCall({phoneNumber: mobile});
- },
- selectMarket(e) {
- let index = e.currentTarget.dataset.index;
- let market = this.market[index];
- this.form.is_bargain = market.is_bargain;
- this.form.market_content = market.content;
- this.modalName = null
- },
- // 提交信息
- editRecruit: function() {
- if (_this.isRotate) {
- return false;
- }
- _this.isRotate = true;
- _this.form.worker_id = _this.workerinfo.id;
- _this.$req.ajax({
- path: "woutjobs/editrecruit",
- title: "正在提交信息",
- data: _this.form,
- }).then((data) => {
- _this.isRotate = false;
- uni.navigateBack();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- _this.isRotate = false;
- });
- },
- // 图片上传
- chooseImage: function(e) {
- uni.chooseImage({
- count: 12,
- sizeType: ['original', 'compressed'],
- sourceType: ['album'],
- success: (res) => {
- _this.$req.ajaxFile({
- path: "attachment/tplfieldimage",
- title: '正在上传',
- filePath: res.tempFilePaths[0],
- fileName: 'file',
- }).then((filedata) => {
- var data = JSON.parse(filedata.data);
- _this.form.picall.push(data.data.src);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- }
- });
- },
- }
- }
- </script>
- <style>
- .echo-formmain {
- min-height: calc(100vh - 290rpx);
- background-color: #FFFFFF;
- padding-left: 30rpx;
- padding-right: 30rpx;
- }
-
- .cu-form-group{ display: flex; flex-wrap: wrap; padding: 40rpx 10rpx 0rpx 10rpx; }
- .cu-form-group .title{ width: 100%; }
- .cu-form-group>input{ display: block; width: 670rpx; height: 100rpx; color: #AAAAAA; }
-
- .cu-form-group>radio-group{ width: 670rpx; height: 100rpx; line-height: 100rpx; color: #AAAAAA; text-align: left; }
-
- .cu-form-group .textareabox{ width: 670rpx; }
- .cu-form-group .textareabox textarea{ width: 670rpx; margin-top: 20rpx !important; margin-bottom: 0rpx; }
-
- .cu-form-group .placeholder{ color: #AAAAAA; }
-
- .cu-form-group picker .picker{ text-align: left; color: #AAAAAA; }
-
-
- .fieldpic {
- width: 150rpx;
- height: 150rpx;
- }
- .fieldpictil {
- width: 230rpx;
- text-align: center;
- }
- </style>
|