aptitudeAuditCheck.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <!-- 资质审核-->
  2. <template>
  3. <view id="register">
  4. <view class="register_li">
  5. <view class="register_li_min">
  6. <img class="icon_img" src="@/images/Version3.0/icon_zgsq_sqr.png">
  7. <view>申请人:</view>
  8. <input v-model="form.applyUser" disabled type="text" >
  9. </view>
  10. <view class="register_li_min" style="border: none;">
  11. <img class="icon_img" src="@/images/Version3.0/icon_zgsq_dhh.png">
  12. <view>联系方式:</view>
  13. <input v-model="form.phone" disabled type="text" >
  14. </view>
  15. </view>
  16. <view class="register_li" v-if="status=='zg'">
  17. <view class="register_li_min" v-for="(item,index) in form.airBottlelist" style="border-bottom:0;" >
  18. <view></view>
  19. <view>{{item.airConstituents}}-{{item.configName}}:</view>
  20. <input v-model="'数量:'+item.bottleNumber" disabled type="text" >
  21. </view>
  22. </view>
  23. <view class="register_li">
  24. <view class="register_li_min">
  25. <view></view>
  26. <view>实验地点:</view>
  27. <input v-model="form.location" disabled type="text" >
  28. </view>
  29. <!-- 使用期限 -->
  30. <view class="register_li_min2">
  31. <view><text style="color: #f00;margin-right: 10rpx;"></text>使用期限:</view>
  32. <picker mode="date" disabled @change="startChange($event)">
  33. <input class="picker-text" v-model="form.startTime" disabled type="text" placeholder="开始时间">
  34. </picker>
  35. <view>-</view>
  36. <picker mode="date" disabled @change="endChange($event)">
  37. <input class="picker-text2" v-model="form.endTime" disabled type="text" placeholder="结束时间">
  38. </picker>
  39. </view>
  40. <view class="register_li_min">
  41. <view></view>
  42. <view>气体用途:</view>
  43. <input v-model="form.gasUse" disabled type="text" >
  44. </view>
  45. <view class="register_li_min">
  46. <view></view>
  47. <view>安全措施:</view>
  48. <input v-model="form.safetyPrecautions" disabled type="text" >
  49. </view>
  50. <view class="issue_li" style="border-bottom:0;" @click="lookItem(form.applyCertificate)">
  51. <view></view>
  52. <view>用气申请表:</view>
  53. <img class="issue_img" :src="baseUrl+form.applyCertificate">
  54. </view>
  55. <view class="check_li" style="border-bottom:0;">
  56. <view></view>
  57. <view>审核意见:</view>
  58. <textarea v-model="params.leadAuditCause" class="check_li_b" placeholder="请输入审核意见"></textarea>
  59. </view>
  60. </view>
  61. <!-- 用气实验室 -->
  62. <view class="sub_btn" v-if="status=='yq' && form.leadAuditStaus==0 && form.isAdmin && form.audit">
  63. <view class="sub_btn_l" @click="submitForm(2)">审核驳回</view>
  64. <view class="sub_btn_r" @click="submitForm(1)">审核通过</view>
  65. </view>
  66. <!-- 用气实验中心 -->
  67. <view class="sub_btn" v-if="status=='yq' && form.leadAuditStaus==1 && form.centerAuditStatus!=2 && form.audit">
  68. <view class="sub_btn_l" @click="submitForm2(2)">审核驳回</view>
  69. <view class="sub_btn_r" @click="submitForm2(1)">审核通过</view>
  70. </view>
  71. <!-- 资格实验室 -->
  72. <view class="sub_btn" v-if="status=='zg' && form.leadAuditStatus==0 && form.isAdmin && form.audit">
  73. <view class="sub_btn_l" @click="submitForm(2)">审核驳回</view>
  74. <view class="sub_btn_r" @click="submitForm(1)">审核通过</view>
  75. </view>
  76. <!-- 资格实验中心 -->
  77. <view class="sub_btn" v-if="status=='zg' && form.leadAuditStatus==1 && form.centerAuditStatus!=2 && form.audit">
  78. <view class="sub_btn_l" @click="submitForm2(2)">审核驳回</view>
  79. <view class="sub_btn_r" @click="submitForm2(1)">审核通过</view>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. import {auditDetail,qualificationDetail,auditCheck,auditCenterCheck,auditUseAgsCheck,auditUseAgsCenterCheck} from '@/api/index.js'
  85. import { config } from '@/api/request/config.js'
  86. export default {
  87. data() {
  88. return {
  89. baseUrl:config.base_url,
  90. form:{},
  91. id:'',
  92. status:null,//yq 用气申请 zg 资格申请
  93. params:{
  94. id:'',
  95. leadAuditCause:'',
  96. leadAuditStatus:'',//审核状态 0 未审核 1.审核通过 2.审核未通过
  97. },
  98. }
  99. },
  100. onLoad(option) {
  101. if(decodeURIComponent(option.item)){
  102. this.id=JSON.parse(decodeURIComponent(option.item)).id;
  103. this.status=JSON.parse(decodeURIComponent(option.item)).remark;
  104. }
  105. if(this.status=='yq'){
  106. wx.setNavigationBarTitle({
  107. title: '资格审核',
  108. })
  109. }else if(this.status=='zg'){
  110. wx.setNavigationBarTitle({
  111. title: '资格审核',
  112. })
  113. }
  114. },
  115. onShow(){
  116. },
  117. methods: {
  118. //获取详情
  119. async getInfo(){
  120. let _this = this;
  121. if(this.status=='yq'){
  122. const {data} = await auditDetail({id:this.id})
  123. if(data.code==200){
  124. let res=data.data
  125. _this.form=res.apply;
  126. _this.form.isAdmin=res.isAdmin;
  127. _this.form.audit=res.audit;
  128. _this.form.airBottlelist=res.airBottlelist;
  129. _this.params.id=res.apply.id;
  130. }
  131. }else if(this.status=='zg'){
  132. const {data} = await qualificationDetail({id:this.id})
  133. if(data.code==200){
  134. let res=data.data
  135. _this.form=res.apply;
  136. _this.form.isAdmin=res.isAdmin;
  137. _this.form.audit=res.audit;
  138. _this.form.airBottlelist=res.airBottlelist;
  139. _this.params.id=res.apply.id;
  140. }
  141. }
  142. },
  143. lookItem(item){
  144. //查看图片
  145. wx.previewImage({
  146. urls: [config.base_url+item], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
  147. current: '', // 当前显示图片的http链接,默认是第一个
  148. success: function(res) {},
  149. fail: function(res) {},
  150. complete: function(res) {},
  151. })
  152. },
  153. //重新提交
  154. //提交实验室
  155. async submitForm(auditStatus){
  156. let _this = this;
  157. if(!_this.params.leadAuditCause){
  158. uni.showToast({
  159. title: '请输入审核意见!',
  160. icon:"none",
  161. mask:true,
  162. duration: 2000
  163. });
  164. return
  165. }
  166. let obj={};
  167. obj.leadAuditCause=_this.params.leadAuditCause;
  168. obj.id=_this.params.id;
  169. if(this.status=='yq'){
  170. if(auditStatus==1){//通过
  171. obj.leadAuditStaus=1
  172. }else if(auditStatus==2){//驳回
  173. obj.leadAuditStaus=2
  174. }
  175. const {data} = await auditUseAgsCheck(obj);
  176. if(data.code == 200){
  177. uni.showToast({
  178. title: '审核成功',
  179. icon:"none",
  180. mask:true,
  181. duration: 2000
  182. });
  183. uni.removeStorageSync('listDetail');
  184. setTimeout(function(){
  185. uni.redirectTo({
  186. url: '/pages_manage/aptitudeAudit/aptitudeAudit'
  187. });
  188. },2000);
  189. }
  190. }else if(this.status=='zg'){
  191. obj.leadAuditCause=_this.params.leadAuditCause;
  192. if(auditStatus==1){//通过
  193. obj.leadAuditStatus=1
  194. }else if(auditStatus==2){//驳回
  195. obj.leadAuditStatus=2
  196. }
  197. const {data} = await auditCheck(obj);
  198. if(data.code == 200){
  199. uni.showToast({
  200. title: '审核成功',
  201. icon:"none",
  202. mask:true,
  203. duration: 2000
  204. });
  205. uni.removeStorageSync('listDetail');
  206. setTimeout(function(){
  207. uni.redirectTo({
  208. url: '/pages_manage/aptitudeAudit/aptitudeAudit'
  209. });
  210. },2000);
  211. }
  212. }
  213. },
  214. //实验中心
  215. async submitForm2(auditStatus){
  216. let _this = this;
  217. let obj={};
  218. obj.centerAuditCause=_this.params.leadAuditCause;
  219. obj.id=_this.params.id;
  220. if(this.status=='yq'){
  221. if(auditStatus==1){//通过
  222. obj.centerAuditStatus=1
  223. }else if(auditStatus==2){//驳回
  224. obj.centerAuditStatus=2
  225. }
  226. const {data} = await auditUseAgsCenterCheck(obj);
  227. if(data.code == 200){
  228. uni.showToast({
  229. title: '审核成功',
  230. icon:"none",
  231. mask:true,
  232. duration: 2000
  233. });
  234. uni.removeStorageSync('listDetail');
  235. setTimeout(function(){
  236. uni.redirectTo({
  237. url: '/pages_manage/aptitudeAudit/aptitudeAudit'
  238. });
  239. },2000);
  240. }
  241. }else if(this.status=='zg'){
  242. if(auditStatus==1){//通过
  243. obj.centerAuditStatus=1
  244. }else if(auditStatus==2){//驳回
  245. obj.centerAuditStatus=2
  246. }
  247. const {data} = await auditCenterCheck(obj);
  248. if(data.code == 200){
  249. uni.showToast({
  250. title: '审核成功',
  251. icon:"none",
  252. mask:true,
  253. duration: 2000
  254. });
  255. uni.removeStorageSync('listDetail');
  256. setTimeout(function(){
  257. uni.redirectTo({
  258. url: '/pages_manage/aptitudeAudit/aptitudeAudit'
  259. });
  260. },2000);
  261. }
  262. }
  263. },
  264. },
  265. mounted() {
  266. this.getInfo();
  267. }
  268. }
  269. </script>
  270. <style lang="stylus" scoped>
  271. #register{
  272. height:auto;
  273. width:100%;
  274. display flex;
  275. flex-direction column;
  276. padding-bottom: 220rpx;
  277. .register_li{
  278. background #fff;
  279. border-radius:20rpx;
  280. margin:20rpx 20rpx 0;
  281. padding:20rpx 0;
  282. box-sizing: border-box;
  283. .register_li_min{
  284. margin:0 26rpx;
  285. display flex;
  286. align-items center;
  287. border-bottom: 1px solid #F5F5F5;
  288. .icon_img{
  289. width: 30rpx;
  290. height: 30rpx;
  291. margin-right: 12rpx;
  292. }
  293. view{
  294. line-height:100rpx;
  295. font-size:28rpx;
  296. }
  297. view:nth-child(1){
  298. color:red;
  299. line-height:28rpx;
  300. margin-right: 12rpx;
  301. }
  302. view:nth-child(2){
  303. //width:140rpx;
  304. font-size: 28rpx;
  305. font-family: PingFang SC;
  306. font-weight: 500;
  307. color: #999999;
  308. }
  309. >input{
  310. flex:1;
  311. text-align: right;
  312. font-size: 24rpx;
  313. font-family: PingFang SC;
  314. font-weight: 500;
  315. color: #333333;
  316. }
  317. }
  318. /* 时间 */
  319. .register_li_min2{
  320. margin:0 26rpx;
  321. border-bottom: 1px solid #f5f5f5;
  322. height: 100rpx;
  323. display: flex;
  324. justify-content: flex-start;
  325. align-items: center;
  326. >view:nth-child(1){
  327. font-size: 28rpx;
  328. font-family: PingFang SC;
  329. font-weight: 500;
  330. color: #999999;
  331. line-height: 100rpx;
  332. margin-right: 120rpx;
  333. }
  334. .picker-text{
  335. font-size: 24rpx;
  336. font-family: PingFang SC;
  337. font-weight: 500;
  338. color: #333333;
  339. line-height: 100rpx;
  340. width: 188rpx;
  341. }
  342. >view:nth-child(2){
  343. font-size: 24rpx;
  344. font-family: PingFang SC;
  345. font-weight: 500;
  346. color: #333333;
  347. line-height: 100rpx;
  348. }
  349. .picker-text2{
  350. font-size: 24rpx;
  351. font-family: PingFang SC;
  352. font-weight: 500;
  353. color: #333333;
  354. line-height: 100rpx;
  355. width: 188rpx;
  356. text-align: right;
  357. }
  358. }
  359. .issue_li{
  360. margin:34rpx 26rpx 0;
  361. display flex;
  362. border-bottom: 1px solid #F5F5F5;
  363. view:nth-child(1){
  364. color:red;
  365. line-height:28rpx;
  366. margin-right: 12rpx;
  367. }
  368. view:nth-child(2){
  369. //width:140rpx;
  370. font-size: 28rpx;
  371. font-family: PingFang SC;
  372. font-weight: 500;
  373. color: #999999;
  374. }
  375. .issue_img{
  376. width: 210rpx;
  377. height: 210rpx;
  378. border-radius: 10rpx;
  379. margin-left:250rpx;
  380. }
  381. }
  382. /* 审核意见 */
  383. .check_li{
  384. margin:34rpx 26rpx 0;
  385. view:nth-child(1){
  386. color:red;
  387. line-height:28rpx;
  388. margin-right: 12rpx;
  389. }
  390. view:nth-child(2){
  391. //width:140rpx;
  392. font-size: 28rpx;
  393. font-family: PingFang SC;
  394. font-weight: 500;
  395. color: #999999;
  396. }
  397. .check_li_b{
  398. width: 657rpx;
  399. height: 211rpx;
  400. background: #FFFFFF;
  401. border: 1px solid #E0E0E0;
  402. border-radius: 10rpx;
  403. padding: 20rpx;
  404. box-sizing: border-box;
  405. margin-top: 20rpx;
  406. }
  407. }
  408. }
  409. /* 按钮 */
  410. .sub_btn{
  411. width: 650rpx;
  412. height: 100rpx;
  413. display: flex;
  414. position: fixed;
  415. bottom: 30rpx;
  416. left: 50rpx;
  417. z-index: 1000;
  418. .sub_btn_l{
  419. width: 325rpx;
  420. height: 100rpx;
  421. background: linear-gradient(-45deg, #FA9901, #F28E26);
  422. border-radius: 50rpx 0px 0px 50rpx;
  423. font-size: 30rpx;
  424. font-family: PingFang SC;
  425. font-weight: 500;
  426. color: #FFFFFF;
  427. line-height: 100rpx;
  428. text-align: center;
  429. }
  430. .sub_btn_r{
  431. width: 325rpx;
  432. height: 100rpx;
  433. background: linear-gradient(-35deg, #309CFF, #0183FA);
  434. border-radius: 0px 50rpx 50rpx 0px;
  435. font-size: 30rpx;
  436. font-family: PingFang SC;
  437. font-weight: 500;
  438. color: #FFFFFF;
  439. line-height: 100rpx;
  440. text-align: center;
  441. }
  442. }
  443. }
  444. /deep/.input-value-border{
  445. display :none !important;
  446. }
  447. </style>