shiftOfficial.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <template>
  2. <view>
  3. <view style="padding:5rpx 20rpx 45rpx 20rpx;">
  4. <view class="desc">
  5. <hs-input label="姓名" v-model="form.name" :disabled="true" />
  6. </view>
  7. <view class="desc">
  8. <hs-dept-select label="部门" v-model="form.department" :autofill="true" />
  9. </view>
  10. <view class="desc">
  11. <hs-input label="关联试用流程编号" labelSize="8" inputSpan="16" v-model="form.so_a_no" />
  12. </view>
  13. <view class="desc">
  14. <uni-row>
  15. <uni-col :span="8">
  16. <view class="desc" style="font-size: 25rpx;">
  17. 试用期开始时间
  18. </view>
  19. </uni-col>
  20. <uni-col :span="16">
  21. <view>
  22. <uni-datetime-picker type="date" :clear-icon="false" v-model="form.so_b_time"
  23. @maskClick="maskClick" @change="onchange()" />
  24. </view>
  25. </uni-col>
  26. </uni-row>
  27. </view>
  28. <view class="desc">
  29. <uni-row>
  30. <uni-col :span="8">
  31. <view class="desc" style="font-size: 25rpx;">
  32. 试用期结束时间
  33. </view>
  34. </uni-col>
  35. <uni-col :span="16">
  36. <view>
  37. <uni-datetime-picker type="date" :clear-icon="false" v-model="form.so_c_time"
  38. @maskClick="maskClick" @change="onchange()" />
  39. </view>
  40. </uni-col>
  41. </uni-row>
  42. </view>
  43. <view class="desc">
  44. <view class="desc" style="font-size: 25rpx;">
  45. 试用期综合评价
  46. </view>
  47. <view>
  48. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.so_d">
  49. </uni-easyinput>
  50. </view>
  51. </view>
  52. <view class="desc">
  53. <uni-row>
  54. <uni-col :span="5">
  55. <view class="desc" style="font-size: 25rpx;">
  56. 试用期得分
  57. </view>
  58. </uni-col>
  59. <uni-col :span="19">
  60. <view>
  61. <uni-easyinput primaryColor="#37babd" v-model="data.so_e">
  62. </uni-easyinput>
  63. </view>
  64. </uni-col>
  65. </uni-row>
  66. </view>
  67. <view class="desc">
  68. <hs-input label="工号" v-model="form.job_no" />
  69. </view>
  70. <view class="desc">
  71. <hs-post-select v-model="form.post"></hs-post-select>
  72. </view>
  73. <view class="desc">
  74. <uni-row>
  75. <uni-col :span="5">
  76. <view class="desc" style="font-size: 25rpx;">
  77. 拟定职称
  78. </view>
  79. </uni-col>
  80. <uni-col :span="19">
  81. <view>
  82. <uni-easyinput primaryColor="#37babd" v-model="data.so_g">
  83. </uni-easyinput>
  84. </view>
  85. </uni-col>
  86. </uni-row>
  87. </view>
  88. <view class="desc">
  89. <uni-row>
  90. <uni-col :span="5">
  91. <view class="desc" style="font-size: 25rpx;">
  92. 职级
  93. </view>
  94. </uni-col>
  95. <uni-col :span="19">
  96. <view>
  97. <uni-easyinput primaryColor="#37babd" v-model="data.so_h">
  98. </uni-easyinput>
  99. </view>
  100. </uni-col>
  101. </uni-row>
  102. </view>
  103. <view class="desc">
  104. <uni-row>
  105. <uni-col :span="5">
  106. <view class="desc" style="font-size: 25rpx;">
  107. 定档
  108. </view>
  109. </uni-col>
  110. <uni-col :span="19">
  111. <view>
  112. <uni-easyinput primaryColor="#37babd" v-model="data.so_i">
  113. </uni-easyinput>
  114. </view>
  115. </uni-col>
  116. </uni-row>
  117. </view>
  118. <view class="desc">
  119. <view class="desc" style="font-size: 25rpx;">
  120. 备注
  121. </view>
  122. <view>
  123. <uni-easyinput type="textarea" primaryColor="#37babd" v-model="form.remark">
  124. </uni-easyinput>
  125. </view>
  126. </view>
  127. </view>
  128. <u-gap height="70" bgColor="#ffffff"></u-gap>
  129. <view class="bottim_view">
  130. <view>
  131. <u-row>
  132. <u-col span="11">
  133. <u-button :disabled="isDisabled" class="btnDoPay" shape="circle" @click="submit"
  134. color="rgb(55,186,189)" text="提交"></u-button>
  135. </u-col>
  136. </u-row>
  137. </view>
  138. </view>
  139. <!-- 下一步选择人员弹窗 -->
  140. <uni-popup ref="popup" background-color="#fff">
  141. <view style="height: 800rpx;">
  142. <view class="desc">
  143. <uni-row>
  144. <uni-col :span="10">
  145. <view style="font-size: 40rpx;color: rgb(145, 145, 145);">
  146. </view>
  147. </uni-col>
  148. <uni-col :span="11">
  149. <view style="font-size: 40rpx;color: rgb(98, 98, 98);">
  150. 下一步
  151. </view>
  152. </uni-col>
  153. <uni-col :span="3">
  154. <view @click="submitPass" style="font-size: 40rpx;color: rgb(55,186,189);">
  155. 确认
  156. </view>
  157. </uni-col>
  158. </uni-row>
  159. </view>
  160. <view>
  161. <!-- -->
  162. <uni-row>
  163. <uni-col>
  164. <view style="padding: 15rpx 20rpx;">
  165. <uni-data-picker ref="picker" placeholder="请选择" :popup-title="selectTitle"
  166. :localdata="dataTree" v-model="hxForm.candidate" @change="nextApprovalChange">
  167. </uni-data-picker>
  168. </view>
  169. </uni-col>
  170. </uni-row>
  171. </view>
  172. </view>
  173. </uni-popup>
  174. </view>
  175. </template>
  176. <script>
  177. export default {
  178. data() {
  179. return {
  180. isDisabled: false,
  181. data: {},
  182. selectTitle: '',
  183. hxForm: {},
  184. dataTree: [],
  185. form: {
  186. },
  187. defaultDept: {},
  188. }
  189. },
  190. onLoad() {
  191. //写入基本信息
  192. this.form.name = uni.getStorageSync("userInfo").nickName
  193. },
  194. methods: {
  195. async submit() {
  196. setTimeout(() => {
  197. this.isDisabled = false
  198. }, 1000)
  199. //统一写入参数
  200. //统一写入参数
  201. this.form.applyUserId = uni.getStorageSync('setUserName')
  202. this.form.applyUserName = uni.getStorageSync('userInfo').nickName
  203. const {
  204. data: res
  205. } = await this.$httpRequest({
  206. url: '/app/submitApply/shiftOfficial',
  207. method: 'post',
  208. data: this.form,
  209. urlType: this.$getUrlType()
  210. });
  211. if (res.code === 200) {
  212. this.dataTree = res.data.tree
  213. this.hxForm.taskId = res.data.taskId
  214. this.$refs.popup.open('bottom')
  215. this.selectTitle = "请选择" + this.dataTree[0].text
  216. this.isDisabled = false
  217. } else {
  218. this.$showModal(res.msg)
  219. }
  220. this.isDisabled = false
  221. },
  222. nextApprovalChange(e) {
  223. // console.log('onchange:', e.detail.value[1].text);
  224. this.hxForm.applyUserName = e.detail.value[1].text
  225. this.hxForm.candidate = e.detail.value[1].value
  226. },
  227. async submitPass() {
  228. if (!this.hxForm.candidate) {
  229. uni.showModal({
  230. content: '请选择' + this.dataTree[0].text,
  231. title: '提交失败',
  232. showCancel: false,
  233. })
  234. }
  235. const {
  236. data: res
  237. } = await this.$httpRequest({
  238. url: '/app/task/submit/candidate?taskId=' + this.hxForm.taskId +
  239. '&candidate=' + this.hxForm.candidate + '&applyUserName=' + this.hxForm.applyUserName,
  240. method: 'get',
  241. urlType: this.$getUrlType()
  242. });
  243. if (res.code === 200) {
  244. uni.showModal({
  245. content: '已提交给审批人员',
  246. title: '提交成功',
  247. showCancel: false,
  248. success() {
  249. uni.navigateBack()
  250. }
  251. })
  252. } else {
  253. uni.showModal({
  254. content: res.msg,
  255. title: '提交失败',
  256. showCancel: false,
  257. success() {
  258. uni.navigateBack()
  259. }
  260. })
  261. }
  262. },
  263. onchange(e) {
  264. setTimeout(() => {
  265. }, 200)
  266. },
  267. maskClick(e) {},
  268. bindPickerChange: function(e) {
  269. this.dimissionType.index = e.detail.value
  270. this.form.dimissionType = this.dimissionType.data[this.dimissionType.index].dictValue
  271. },
  272. postBindPickerChange: function(e) {
  273. console.log(e)
  274. console.log(this.form.post)
  275. // this.post.index = e.detail.value
  276. // this.form.jobInterview = this.post.data[this.post.index].postId
  277. },
  278. }
  279. }
  280. </script>
  281. <style lang="scss" scoped>
  282. .desc {
  283. padding: 10rpx 5rpx;
  284. color: #818181;
  285. font-size: 20rpx;
  286. }
  287. .pickerView {
  288. // align-items: flex-end;
  289. padding: 10rpx 20rpx;
  290. border: 1rpx #eeeeee solid;
  291. }
  292. .pickerText {
  293. font-size: 26rpx;
  294. color: #b1b1b1;
  295. }
  296. .bottim_view {
  297. padding: 5px 20px 30px;
  298. position: fixed;
  299. left: 0px;
  300. bottom: 0px;
  301. width: 100%;
  302. height: 40px;
  303. background-color: #ffffff;
  304. }
  305. </style>