aptitudeAuditCheck.vue 13 KB

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