wcomform.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. <template>
  2. <view>
  3. <view class="solids-bottom margin-bottom-sm">
  4. <view class="bg-white padding">
  5. <view class="cu-steps">
  6. <view class="cu-item" :class="0>stepsnum?'':'text-blue'">
  7. <text class="num" data-index="1"></text> 基本信息
  8. </view>
  9. <view class="cu-item" :class="1>stepsnum?'':'text-blue'">
  10. <text class="num" data-index="2"></text> 详细信息
  11. </view>
  12. <view class="cu-item" :class="2>stepsnum?'':'text-blue'">
  13. <text class="num" data-index="3"></text> 提交成功
  14. </view>
  15. </view>
  16. <view class="text-gray text-sm padding-top">
  17. 请填写真是有效的信息,如有发现诈骗、虚假信息,我们会协助公安与相关法律部门进行调查。
  18. </view>
  19. <view class="text-red text-sm padding-top" v-if="workerinfo.status==1">
  20. 审核中,最多只能发布三条招聘信息
  21. </view>
  22. </view>
  23. </view>
  24. <form>
  25. <view class="echo-formmain" v-if="stepsnum==0">
  26. <view class="cu-form-group">
  27. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 岗位标题</view>
  28. <input placeholder-class="placeholder" placeholder="比如:郑州富士康招聘普工" data-field="title" name="title" :value="comjobsinfo.title" @input="setInput"></input>
  29. </view>
  30. <!-- <view class="cu-form-group">
  31. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 岗位类型</view>
  32. <picker mode="selector" range-key="title" name="cateid" @change="cateidChange" :value="cateidindex" :range="catelist">
  33. <view class="picker">{{cateidindex>-1 ? catelist[cateidindex].title : "请选择岗位类型"}}</view>
  34. </picker>
  35. </view> -->
  36. <view class="cu-form-group arrow" @click="toggleComCate(true)">
  37. <view class="title">
  38. <text class="text-red text-bold padding-right-xs">*</text><text>岗位类型</text>
  39. </view>
  40. <view class="piker-box">{{cateidindex>-1 ? catelist[cateidindex].title : "请选择..."}}
  41. </view>
  42. </view>
  43. <view class="filteremp" v-if="comCateModal">
  44. <view class="padding bg-white emp-box">
  45. <block v-for="(item,index) in catelist" :key="index">
  46. <button class="cu-btn margin-lr-xs margin-tb-xs" v-if="index != cateidindex" @click="subComCate(index)">
  47. {{item.title}}
  48. </button>
  49. <button class="cu-btn margin-lr-xs margin-tb-xs bg-red" v-else>
  50. {{item.title}}
  51. </button>
  52. </block>
  53. <view class="padding flex flex-wrap justify-end align-center">
  54. <button class="cu-btn bg-red lg" @click="toggleComCate(false)">取消</button>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="cu-form-group">
  59. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 工作地点</view>
  60. <view style="flex: 1; font-size: 30rpx; color: #AAAAAA; line-height: 100rpx;">
  61. <pickerAddress @change="regionChange" v-if="region">{{region}}</pickerAddress>
  62. <input placeholder-class="placeholder" placeholder="详细地址" data-field="address" name="address" :value="address" @input="setInput" v-if="address"></input>
  63. <button class="cu-btn bg-blue margin-tb-sm lg" style="width: 100%;" @tap="gpsmap()">地图选位置</button>
  64. </view>
  65. </view>
  66. <view class="cu-form-group">
  67. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 社区</view>
  68. <picker mode="selector" range-key="name" name="id" @change="communityChange" :value="communityindex" :range="community_list">
  69. <view class="picker">{{communityindex>-1 ? community_list[communityindex].name : "请选择社区"}}</view>
  70. </picker>
  71. </view>
  72. <view class="cu-form-group">
  73. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 招工年龄</view>
  74. <input placeholder-class="placeholder" placeholder="比如:18-35岁" data-field="agegroup" name="agegroup" :value="comjobsinfo.agegroup" @input="setInput"></input>
  75. </view>
  76. <view class="cu-form-group">
  77. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 性别要求</view>
  78. <picker mode="selector" range-key="name" @change="sexChange" :value="comjobsinfo.sex" :range="sex_list">
  79. <view class="picker">{{sex_list[comjobsinfo.sex].name}}</view>
  80. </picker>
  81. </view>
  82. <view class="cu-form-group">
  83. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 招聘标签</view>
  84. <input placeholder-class="placeholder" placeholder="比如:包食宿 高工资" data-field="tags" name="tags" :value="comjobsinfo.tags" @input="setInput"></input>
  85. </view>
  86. <view class="cu-form-group">
  87. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 截止日期</view>
  88. <picker mode="date" :value="comjobsinfo.enddate" @change="bindDateChange">
  89. <view class="picker">{{comjobsinfo.enddate!='' ? comjobsinfo.enddate : "请选择本次招聘截止日期"}}</view>
  90. </picker>
  91. </view>
  92. <view class="cu-form-group">
  93. <view class="title" style="min-width: calc(10em + 15px);"> <text class="text-red text-bold padding-right-xs">*</text> 招聘类型</view>
  94. <radio-group class="block" @change="recruitmentcateChange">
  95. <view class="flex justify-start">
  96. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.recruitment_cate==1?'checked':''" :checked="comjobsinfo.recruitment_cate==1?true:false" value="1"></radio> <text> 普通招聘</text></label>
  97. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.recruitment_cate==2?'checked':''" :checked="comjobsinfo.recruitment_cate==2?true:false" value="2"></radio> <text> 悬赏招聘</text></label>
  98. </view>
  99. </radio-group>
  100. </view>
  101. <view class="cu-form-group" v-if="comjobsinfo.recruitment_cate==2">
  102. <view class="title"> 悬赏金额</view>
  103. <input placeholder-class="placeholder" placeholder="请输入返给经纪人佣金金额" data-field="retmoney" name="retmoney" :value="comjobsinfo.retmoney" @input="setInput"></input>
  104. </view>
  105. <view class="cu-form-group">
  106. <view class="title">职位详情</view>
  107. <view class="textareabox">
  108. <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="comdetails" name="comdetails" :value="comjobsinfo.comdetails"
  109. @input="setInput"></textarea>
  110. </view>
  111. </view>
  112. <view class="cu-form-group">
  113. <view class="title">任职要求</view>
  114. <view class="textareabox">
  115. <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="requirement" name="requirement" :value="comjobsinfo.requirement"
  116. @input="setInput"></textarea>
  117. </view>
  118. </view>
  119. <view class="cu-form-group">
  120. <view class="title">企业介绍</view>
  121. <view class="textareabox">
  122. <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="companydetails" name="companydetails" :value="comjobsinfo.companydetails"
  123. @input="setInput"></textarea>
  124. </view>
  125. </view>
  126. <view class="padding-tb padding-lr-xs bg-white solids-top">
  127. <view class="title padding-bottom-sm text-lg">环境照片</view>
  128. <view class="grid col-4 grid-square flex-sub">
  129. <block v-for="(picitem,picindex) in comjobsinfo.picall" :key="picindex">
  130. <view class="bg-img" @tap="viewImage" :data-url="picitem">
  131. <image :src="picitem" mode="aspectFill"></image>
  132. <view class="cu-tag bg-red" @tap.stop="delImg" :data-index="index">
  133. <text class='cuIcon-close'></text>
  134. </view>
  135. </view>
  136. </block>
  137. <view class="solids" @tap="chooseImage" v-if="comjobsinfo.picall.length <= 12">
  138. <text class='cuIcon-cameraadd'></text>
  139. </view>
  140. </view>
  141. </view>
  142. <view class="padding-tb padding-lr-xs bg-white solids-top">
  143. <view class="title padding-bottom-sm text-lg">上传视频</view>
  144. <view class="grid col-4 grid-square flex-sub" v-if="comjobsinfo.video==''">
  145. <view class="solids" @click="chooseVideo">
  146. <text class='cuIcon-record'></text>
  147. </view>
  148. </view>
  149. <view class="grid col-1 grid-square flex-sub" v-if="comjobsinfo.video!=''">
  150. <view class="bg-img">
  151. <video v-if="video!==null" id="myVideo" class="myVideo" :src="comjobsinfo.video" @error="videoErrorCallback" enable-danmu controls></video>
  152. <view class="cu-tag bg-red" @tap.stop="delVideo">
  153. <text class='cuIcon-close'></text>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. <view class="padding flex flex-direction bg-white">
  159. <button class="cu-btn bg-blue margin-tb-sm lg" @tap="stepsNum(1)">下一步</button>
  160. <view class="padding"></view>
  161. </view>
  162. </view>
  163. <view class="echo-formmain" v-if="stepsnum==1">
  164. <view class="cu-form-group">
  165. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 薪资类型</view>
  166. <radio-group class="block" @change="wtypeChange">
  167. <view class="flex justify-start">
  168. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.wtype==1?'checked':''" :checked="comjobsinfo.wtype==1?true:false" value="1"></radio> <text> 按月</text></label>
  169. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.wtype==2?'checked':''" :checked="comjobsinfo.wtype==2?true:false" value="2"></radio> <text> 按时</text></label>
  170. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.wtype==3?'checked':''" :checked="comjobsinfo.wtype==3?true:false" value="3"></radio> <text> 按件</text></label>
  171. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.wtype==4?'checked':''" :checked="comjobsinfo.wtype==4?true:false" value="4"></radio> <text> 按项目</text></label>
  172. <label class="flex align-center"> <radio class='blue' :class="comjobsinfo.wtype==5?'checked':''" :checked="comjobsinfo.wtype==5?true:false" value="5"></radio> <text> 其他</text></label>
  173. </view>
  174. </radio-group>
  175. </view>
  176. <view class="cu-form-group">
  177. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 薪酬</view>
  178. <input placeholder-class="placeholder" placeholder="请输入" data-field="zwagall" name="zwagall" :value="comjobsinfo.zwagall" @input="setInput"></input>
  179. <view class="unit">元</view>
  180. </view>
  181. <view class="cu-form-group">
  182. <view class="title"> <text class="text-red text-bold padding-right-xs">*</text> 人数</view>
  183. <input placeholder-class="placeholder" placeholder="请输入" data-field="recruit_num" name="recruit_num" :value="comjobsinfo.recruit_num" @input="setInput"></input>
  184. <view class="unit">人</view>
  185. </view>
  186. <!-- <view class="cu-form-group">
  187. <view class="title" style="min-width: calc(10em + 15px);"> <text class="text-red text-bold padding-right-xs">*</text> 给求职者是否有返费</view>
  188. <radio-group class="block" @change="isfwagallChange">
  189. <view class="flex justify-start">
  190. <label class="flex align-center"> <radio class='blue' :class="isfwagall==1?'checked':''" :checked="isfwagall==1?true:false" value="1"></radio> <text> 有</text></label>
  191. <label class="flex align-center"> <radio class='blue' :class="isfwagall==2?'checked':''" :checked="isfwagall==2?true:false" value="2"></radio> <text> 没有</text></label>
  192. </view>
  193. </radio-group>
  194. </view>
  195. <view class="cu-form-group" v-if="isfwagall==1">
  196. <view class="title"> 返费政策</view>
  197. <input placeholder-class="placeholder" placeholder="比如:入职满一个月返2000元" data-field="fwagall" name="fwagall" :value="comjobsinfo.fwagall" @input="setInput"></input>
  198. </view> -->
  199. <view class="cu-form-group margin-top-sm">
  200. <view class="title"><text class="text-red text-bold padding-right-xs">*</text>手机号码</view>
  201. <input placeholder-class="placeholder" placeholder="请输入联系人手机号码" data-field="telephone" name="telephone" :value="comjobsinfo.telephone" @input="setInput"></input>
  202. </view>
  203. <view class="cu-form-group">
  204. <view class="title">补充说明</view>
  205. <view class="textareabox">
  206. <textarea maxlength="-1" placeholder-class="placeholder" placeholder="请输入..." data-field="remark" name="remark" :value="comjobsinfo.remark"
  207. @input="setInput"></textarea>
  208. </view>
  209. </view>
  210. <view class="padding flex flex-direction bg-white">
  211. <block v-if="workerinfo.status==1 && comjobscount>=3">
  212. <button class="cu-btn bg-red margin-tb-sm lg">审核中,最多只能发布三条招聘信息</button>
  213. </block>
  214. <block v-else>
  215. <button class="cu-btn bg-blue margin-tb-sm lg" @tap="editComjobs(1)">暂存</button>
  216. <button class="cu-btn bg-blue margin-tb-sm lg" @tap="editComjobs(2)">立即提交</button>
  217. </block>
  218. <button class="cu-btn lg" @tap="stepsNum(0)">返回上一步</button>
  219. <view class="padding"></view>
  220. </view>
  221. </view>
  222. </form>
  223. <view class="echo-formmain padding bg-white" v-if="stepsnum==2">
  224. <view class="padding">
  225. <view class="flex-sub text-center padding-tb">
  226. <view class="solid-bottom text-xsl padding">
  227. <text class="cuIcon-emoji text-green"></text>
  228. </view>
  229. <view class="text-xl padding-tb">
  230. <text class="text-black text-bold">招聘信息提交成功,请耐心等待审核!</text>
  231. </view>
  232. <view class="flex flex-direction padding-tb">
  233. <navigator class="cu-btn bg-blue margin-tb-sm lg" open-type="redirect" url="/pages/worker/wcomlist?status=1">我发布的招聘</navigator>
  234. <navigator class="cu-btn lg" open-type="redirect" url="/pages/worker/wcomform">继续发布</navigator>
  235. </view>
  236. </view>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <script>
  242. var _this;
  243. import avatar from "@/components/yq-avatar/yq-avatar.vue";
  244. import pickerAddress from "@/components/pickerAddress/pickerAddress.vue";
  245. import QQMapWX from '@/common/qqmap-wx-jssdk'
  246. export default {
  247. components: {
  248. avatar,
  249. pickerAddress
  250. },
  251. data() {
  252. return {
  253. isRotate: false,
  254. stepsnum: 0,
  255. userinfo: false,
  256. workerinfo: false,
  257. comjobsinfo: {
  258. id: 0,
  259. workerid: 0,
  260. title: "",
  261. cateid: 0,
  262. province: "",
  263. city: "",
  264. district: "",
  265. agegroup: "",
  266. tags: "",
  267. enddate: "",
  268. requirement: "",
  269. comdetails: "",
  270. retmoney: "",
  271. picall: [],
  272. video: "",
  273. companydetails: "",
  274. wtype: 1,
  275. sex: 0,
  276. bwagall: "",
  277. zwagall: "",
  278. fwagall: "",
  279. telephone: "",
  280. remark: "",
  281. recruitment_cate: 1,
  282. recruit_num: 1,
  283. community: ''
  284. },
  285. wlatitude:0,
  286. wlongitude:0,
  287. cateidindex: -1,
  288. region: "",
  289. address: "",
  290. isfwagall: 1,
  291. recruitmentcate: 1,
  292. catelist: [],
  293. comjobscount: 0,
  294. community_list: [],
  295. communityindex: -1,
  296. sex_list: [{name:'不限'},{name:'男'},{name:'女'}],
  297. comCateModal: false,
  298. }
  299. },
  300. onLoad: function(option) {
  301. _this = this;
  302. var comjobsid = option.comjobsid || 0;
  303. _this.userinfo = _this.checkLogin("/pages/my/my");
  304. _this.workerinfo = uni.getStorageSync('workerinfo') || false;
  305. if (_this.userinfo === false || _this.workerinfo === false) {
  306. uni.reLaunch({
  307. url: "/pages/my/my"
  308. });
  309. return false;
  310. }
  311. _this.$req.ajax({
  312. path: "wcomjobs/getcomjobs",
  313. data: {
  314. comjobsid: comjobsid,
  315. workerid: _this.workerinfo.id
  316. }
  317. }).then((data) => {
  318. _this.catelist = data.catelist;
  319. _this.comjobscount = data.comjobscount;
  320. if (data.comjobs != "NULL") {
  321. _this.comjobsinfo = data.comjobs;
  322. _this.address = data.comjobs.address;
  323. _this.region = _this.comjobsinfo.province + " " + _this.comjobsinfo.city + " " + _this.comjobsinfo.district;
  324. for( var i=0,len=_this.catelist.length; i<len; i++ ){
  325. if(_this.comjobsinfo.cateid == _this.catelist[i].id){
  326. _this.cateidindex = i;
  327. }
  328. }
  329. }
  330. }).catch((err) => {
  331. uni.showModal({
  332. title: '信息提示',
  333. content: err,
  334. showCancel: false
  335. });
  336. });
  337. _this.$req.ajax({
  338. path: "index/getRensheCode",
  339. data: {
  340. type: 'community'
  341. }
  342. }).then((data) => {
  343. _this.community_list = data;
  344. }).catch((err) => {
  345. uni.showModal({
  346. title: '信息提示',
  347. content: err,
  348. showCancel: false
  349. });
  350. });
  351. _this.qqmapsdk = new QQMapWX({
  352. // 在腾讯平台自己申请的秘钥
  353. key: 'L2PBZ-J53WR-FUXW6-WB3SD-NWCFO-WYBS6'
  354. });
  355. },
  356. methods: {
  357. // 视频上传
  358. chooseVideo: function(e) {
  359. uni.chooseVideo({
  360. count: 1,
  361. sourceType: ['camera', 'album'],
  362. success: (res) => {
  363. _this.$req.ajaxFile({
  364. path: "attachment/tplfieldvideo",
  365. title: '正在上传',
  366. filePath: res.tempFilePath,
  367. fileName: 'file',
  368. }).then((vfiledata) => {
  369. var vdata = JSON.parse(vfiledata.data);
  370. _this.comjobsinfo.video = vdata.data.src;
  371. }).catch((err) => {
  372. uni.showModal({
  373. title: '信息提示',
  374. content: err,
  375. showCancel: false
  376. });
  377. });
  378. }
  379. });
  380. },
  381. delVideo: function(e) {
  382. uni.showModal({
  383. title: '信息提示',
  384. content: "删除后不可恢复,确认要删除吗?",
  385. showCancel: true,
  386. success: function (res) {
  387. if (res.confirm) {
  388. _this.comjobsinfo.video = "";
  389. } else if (res.cancel) {
  390. console.log('用户点击取消');
  391. }
  392. }
  393. });
  394. },
  395. // 图片上传
  396. chooseImage: function(e) {
  397. uni.chooseImage({
  398. count: 12,
  399. sizeType: ['original', 'compressed'],
  400. sourceType: ['album'],
  401. success: (res) => {
  402. _this.$req.ajaxFile({
  403. path: "attachment/tplfieldimage",
  404. title: '正在上传',
  405. filePath: res.tempFilePaths[0],
  406. fileName: 'file',
  407. }).then((filedata) => {
  408. var data = JSON.parse(filedata.data);
  409. _this.comjobsinfo.picall.push(data.data.src);
  410. }).catch((err) => {
  411. uni.showModal({
  412. title: '信息提示',
  413. content: err,
  414. showCancel: false
  415. });
  416. });
  417. }
  418. });
  419. },
  420. viewImage: function(e) {
  421. uni.previewImage({
  422. urls: _this.comjobsinfo.picall,
  423. current: e.currentTarget.dataset.url
  424. });
  425. },
  426. delImg: function(e) {
  427. _this.comjobsinfo.picall.splice(e.currentTarget.dataset.index, 1);
  428. },
  429. // 填写字段
  430. setInput: function(e) {
  431. var field = e.currentTarget.dataset.field;
  432. _this.comjobsinfo[field] = e.detail.value;
  433. },
  434. bindDateChange: function(e) {
  435. _this.comjobsinfo.enddate = e.target.value;
  436. },
  437. cateidChange: function(e) {
  438. _this.cateidindex = e.detail.value;
  439. _this.comjobsinfo.cateid = _this.catelist[_this.cateidindex].id;
  440. },
  441. communityChange: function(e) {
  442. _this.communityindex = e.detail.value;
  443. _this.comjobsinfo.community = _this.community_list[_this.communityindex].code;
  444. },
  445. sexChange: function(e) {
  446. _this.comjobsinfo.sex = e.detail.value;
  447. },
  448. regionChange: function(data) {
  449. _this.comjobsinfo.province = data.data[0];
  450. _this.comjobsinfo.city = data.data[1];
  451. _this.comjobsinfo.district = data.data[2];
  452. _this.region = data.data.join(' ');
  453. },
  454. wtypeChange: function(e) {
  455. _this.comjobsinfo.wtype = e.detail.value;
  456. },
  457. isfwagallChange: function(e) {
  458. _this.isfwagall = e.detail.value;
  459. if (_this.isfwagall==2){
  460. _this.comjobsinfo.fwagall = "";
  461. }
  462. },
  463. recruitmentcateChange: function(e) {
  464. _this.comjobsinfo.recruitment_cate = e.detail.value;
  465. },
  466. toggleComCate: function(value) {
  467. _this.comCateModal = value;
  468. },
  469. subComCate: function (index) {
  470. _this.cateidindex = index;
  471. _this.comjobsinfo.cateid = _this.catelist[_this.cateidindex].id;
  472. _this.comCateModal = false;
  473. },
  474. //打开地图
  475. gpsmap:function(){
  476. uni.chooseLocation({
  477. success: function (res) {
  478. console.log(res);
  479. console.log('位置名称:' + res.name);
  480. console.log('详细地址:' + res.address);
  481. console.log('纬度:' + res.latitude);
  482. console.log('经度:' + res.longitude);
  483. console.log('省份:' + res.address.province);
  484. console.log('城市:' + res.address.city);
  485. console.log('区县:' + res.address.district);
  486. _this.address=res.address;
  487. _this.wlatitude=res.latitude;
  488. _this.wlongitude=res.longitude;
  489. _this.qqmapsdk.reverseGeocoder({
  490. location: {
  491. latitude: res.latitude,
  492. longitude: res.longitude
  493. },
  494. success: function (res) {
  495. console.log("address_component");
  496. console.log(res.result.address_component);
  497. //addressinfo=res.result.address_component;
  498. _this.comjobsinfo.province=res.result.address_component.province;
  499. _this.comjobsinfo.city=res.result.address_component.city;
  500. _this.comjobsinfo.district=res.result.address_component.district;
  501. _this.region = res.result.address_component.province + " " + res.result.address_component.city + " " + res.result.address_component.district;
  502. },
  503. fail: function (res) {
  504. console.log(res)
  505. },
  506. complete: function (res) {
  507. // console.log(res)
  508. }
  509. })
  510. }
  511. });
  512. },
  513. // 提交信息
  514. editComjobs: function(status) {
  515. if (_this.isRotate) {
  516. return false;
  517. }
  518. _this.isRotate = true;
  519. let validate = {"title":"标题","community":"社区","agegroup":"招工年龄","tags":"招聘标签","enddate":"截止日期","zwagall":"薪酬","district":"工作地点","telephone":"手机号码"};
  520. for (var i in validate) {
  521. if (_this.comjobsinfo[i] == "") {
  522. uni.showModal({
  523. title: '信息提示',
  524. content: validate[i]+"不能为空",
  525. showCancel: false
  526. });
  527. _this.isRotate = false;
  528. return false;
  529. }
  530. }
  531. if (_this.cateidindex == -1) {
  532. uni.showModal({
  533. title: '信息提示',
  534. content: "请选择岗位类型",
  535. showCancel: false
  536. });
  537. _this.isRotate = false;
  538. return false;
  539. }
  540. if (_this.comjobsinfo.recruitment_cate == 2 && _this.comjobsinfo.retmoney <= 0) {
  541. uni.showModal({
  542. title: '信息提示',
  543. content: validate[i]+"不能为空",
  544. showCancel: false
  545. });
  546. _this.isRotate = false;
  547. return false;
  548. }
  549. _this.$req.ajax({
  550. path: "wcomjobs/editcomjobs",
  551. title: "正在提交信息",
  552. data: {
  553. userid: _this.userinfo.id,
  554. id: _this.comjobsinfo.id,
  555. workerid: _this.workerinfo.id,
  556. title: _this.comjobsinfo.title,
  557. cateid: _this.comjobsinfo.cateid,
  558. province: _this.comjobsinfo.province,
  559. city: _this.comjobsinfo.city,
  560. district: _this.comjobsinfo.district,
  561. address: _this.address,
  562. agegroup: _this.comjobsinfo.agegroup,
  563. tags: _this.comjobsinfo.tags,
  564. enddate: _this.comjobsinfo.enddate,
  565. requirement: _this.comjobsinfo.requirement,
  566. comdetails: _this.comjobsinfo.comdetails,
  567. retmoney: _this.comjobsinfo.retmoney,
  568. picall: _this.comjobsinfo.picall ? _this.comjobsinfo.picall.join(",") : _this.comjobsinfo.picall,
  569. video: _this.comjobsinfo.video,
  570. companydetails: _this.comjobsinfo.companydetails,
  571. wtype: _this.comjobsinfo.wtype,
  572. sex: _this.comjobsinfo.sex,
  573. zwagall: _this.comjobsinfo.zwagall,
  574. // fwagall: _this.comjobsinfo.fwagall,
  575. telephone: _this.comjobsinfo.telephone,
  576. remark: _this.comjobsinfo.remark,
  577. recruitment_cate: _this.comjobsinfo.recruitment_cate,
  578. tlatitude: _this.wlatitude,
  579. tlongitude: _this.wlongitude,
  580. community: _this.comjobsinfo.community,
  581. status: status,
  582. recruit_num: _this.comjobsinfo.recruit_num,
  583. }
  584. }).then((data) => {
  585. _this.stepsNum(2);
  586. _this.isRotate = false;
  587. }).catch((err) => {
  588. uni.showModal({
  589. title: '信息提示',
  590. content: err,
  591. showCancel: false
  592. });
  593. _this.isRotate = false;
  594. });
  595. },
  596. stepsNum: function(num) {
  597. _this.stepsnum = num;
  598. }
  599. }
  600. }
  601. </script>
  602. <style>
  603. .echo-formmain {
  604. min-height: calc(100vh - 290rpx);
  605. background-color: #FFFFFF;
  606. padding-left: 30rpx;
  607. padding-right: 30rpx;
  608. }
  609. .cu-form-group{ display: flex; flex-wrap: wrap; padding: 40rpx 10rpx 0rpx 10rpx; }
  610. .cu-form-group .title{ width: 100%; }
  611. .cu-form-group>input{ display: block; width: 670rpx; height: 100rpx; color: #AAAAAA; }
  612. .cu-form-group>radio-group{ width: 670rpx; height: 100rpx; line-height: 100rpx; color: #AAAAAA; text-align: left; }
  613. .cu-form-group .textareabox{ width: 670rpx; }
  614. .cu-form-group .textareabox textarea{ width: 670rpx; margin-top: 20rpx !important; margin-bottom: 0rpx; }
  615. .cu-form-group .placeholder{ color: #AAAAAA; }
  616. .cu-form-group picker .picker{ text-align: left; color: #AAAAAA; }
  617. .cu-form-group .piker-box {display: block; width: 670rpx; height: 100rpx; color: #AAAAAA;line-height: 100rpx;}
  618. .fieldpic {
  619. width: 150rpx;
  620. height: 150rpx;
  621. }
  622. .fieldpictil {
  623. width: 230rpx;
  624. text-align: center;
  625. }
  626. .myVideo{ width: 670rpx; height: 670rpx; }
  627. .filteremp{ width: 750rpx; position: fixed;top: 0;left: 0; z-index: 999; height: 100vh; background-color:#000;background: rgba(0, 0, 0, 0.5); }
  628. .filteremp .emp-box{ width: 750rpx; position: absolute;bottom: 0;}
  629. </style>