aptitudeAuditCheck.vue 12 KB

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