approvalPage.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
  1. <template>
  2. <div class="approvalPage">
  3. <div class="approvalPage-min" v-if="pageType == 1">
  4. <div class="title-box">
  5. <p>化学品申购</p>
  6. <p class="reset-button-one button-p" @click="backPage(0)">返回</p>
  7. <!--已拒绝/已撤销时显示-->
  8. <p class="inquire-button-one button-p" v-if="(dataInfo.approvalStatus==2||dataInfo.approvalStatus==3)&&approvalPagePropsData.myDataType==1" @click="goEditPage">编辑</p>
  9. </div>
  10. <div class="page-max-box scrollbar-box">
  11. <div class="text-box-one">
  12. <p>编号:</p>
  13. <p>{{dataInfo.applyNum}}</p>
  14. <p>申购人:{{dataInfo.applyUserName}}</p>
  15. <p :class="dataInfo.approvalStatus==0?'colorA':(dataInfo.approvalStatus==1?'colorB':(dataInfo.approvalStatus==2?'colorC':(dataInfo.approvalStatus==3?'colorD':'')))"
  16. >{{dataInfo.approvalStatus==0&&approvalPagePropsData.userType==1?'等待我审批':(dataInfo.approvalStatus==0&&approvalPagePropsData.userType!=1?'等待审批':(dataInfo.approvalStatus==1?'已通过':(dataInfo.approvalStatus==2?'已拒绝':(dataInfo.approvalStatus==3?'已撤销':''))))}}</p>
  17. </div>
  18. <div class="text-box-two">
  19. <p>申购原因:</p>
  20. <p>{{dataInfo.applyReason}}</p>
  21. </div>
  22. <div class="text-box-one">
  23. <p>实验室:</p>
  24. <p style="flex:1;">{{dataInfo.subName}}</p>
  25. </div>
  26. <div class="text-box-three">
  27. <p class="el-icon-info"></p>
  28. <p>勾选的化学品为已同意申购</p>
  29. </div>
  30. <!--审批单-->
  31. <div class="table-title-box-one" v-if="approvalPagePropsData.type == 2">
  32. <!--<img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="!allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">-->
  33. <!--<img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">-->
  34. <p></p>
  35. <p></p>
  36. <p>化学品名</p>
  37. <p>化学品柜</p>
  38. <p>位置</p>
  39. <p>申购人剩余可存放量</p>
  40. <p>本次申购量</p>
  41. </div>
  42. <div class="table-list-box-one" v-if="approvalPagePropsData.type == 2" v-for="(item,index) in dataInfo.actHxpapplyDetailList" :key="index">
  43. <img @click="checkClick(item)" v-if="item.tickStatus != 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">
  44. <img @click="checkClick(item)" v-if="item.tickStatus == 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">
  45. <p></p>
  46. <el-tooltip class="item" effect="dark" :content="item.chemicalName" placement="top">
  47. <p>{{item.chemicalName}}</p>
  48. </el-tooltip>
  49. <el-tooltip class="item" effect="dark" :content="item.cabinetName" placement="top">
  50. <p>{{item.cabinetName}}</p>
  51. </el-tooltip>
  52. <el-tooltip class="item" effect="dark" :content="item.posi" placement="top">
  53. <p>{{item.posi}}</p>
  54. </el-tooltip>
  55. <p>{{item.remainingStorage}}</p>
  56. <p>{{item.applyNum}}</p>
  57. </div>
  58. <!--审批-->
  59. <div class="table-title-box-two" v-if="approvalPagePropsData.type == 1">
  60. <img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="!allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">
  61. <img @click="allCheckClick" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="allCheckType" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">
  62. <p>全选</p>
  63. <p>化学品名</p>
  64. <p>化学品柜</p>
  65. <p>位置</p>
  66. <p>学院库存</p>
  67. <p>实验室库存</p>
  68. <p>化学品库存</p>
  69. <p>申购人剩余可存放量</p>
  70. <p>本次申购量</p>
  71. <p>操作</p>
  72. </div>
  73. <div class="table-list-box-two" v-if="approvalPagePropsData.type == 1" v-for="(item,index) in dataInfo.actHxpapplyDetailList" :key="index">
  74. <img @click="checkClick(item)" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="!item.checkType" src="@/assets/ZDimages/medicUniversity-3_1/icon_sp_wxz.png">
  75. <img @click="checkClick(item)" :class="approvalPagePropsData.type==1?'cursor-img':''" v-if="item.checkType" src="@/assets/ZDimages/medicUniversity-3_1/icon_ytg_xz.png">
  76. <p></p>
  77. <el-tooltip class="item" effect="dark" :content="item.chemicalName" placement="top">
  78. <p>{{item.chemicalName}}</p>
  79. </el-tooltip>
  80. <el-tooltip class="item" effect="dark" :content="item.cabinetName" placement="top">
  81. <p>{{item.cabinetName}}</p>
  82. </el-tooltip>
  83. <el-tooltip class="item" effect="dark" :content="item.posi" placement="top">
  84. <p>{{item.posi}}</p>
  85. </el-tooltip>
  86. <p>{{item.collegeInventory}}</p>
  87. <p>{{item.subInventory}}</p>
  88. <p>{{item.cabinetStorage}}</p>
  89. <p>{{item.remainingStorage}}</p>
  90. <p>{{item.applyNum}}</p>
  91. <p @click="pageToggle(2,item)">化学品</p>
  92. <p @click="getHxpChemicalInfo(item.chemicalId)">化学品详情</p>
  93. </div>
  94. <p class="approval-title-p">审批流程</p>
  95. <!--审批流程-->
  96. <div class="approval-list-max-box">
  97. <div class="approval-for-box">
  98. <div class="approval-for-box-min">
  99. <div class="left-max-box">
  100. <div class="left-top-box">
  101. <img src="">
  102. <!--<img src="">-->
  103. <div class="left-top-text-box">
  104. <p>发起申请</p>
  105. <p>{{dataInfo.applyUserName}}</p>
  106. </div>
  107. </div>
  108. <p class="left-bottom-p"></p>
  109. <img class="left-position-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png">
  110. </div>
  111. <div class="right-max-box" style="border:none;">
  112. </div>
  113. <p class="right-right-time-p">{{dataInfo.createTime}}</p>
  114. </div>
  115. </div>
  116. <div class="approval-for-box" v-if="dataInfo.approvalStatus!=3" v-for="(item,index) in dataInfo.configInfoList" :key="index">
  117. <div class="approval-for-box-min">
  118. <div class="left-max-box">
  119. <div class="left-top-box" v-if="item.auditType == 1">
  120. <img v-if="item.actApplytaskNodeList[1]" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ycsp.png">
  121. <img v-if="!item.actApplytaskNodeList[1]" :src="item.actApplytaskNodeList[0].applyUserList[0].avatar">
  122. <div class="left-top-text-box">
  123. <p>{{item.actApplytaskNodeList[1]?'依次审批':item.actApplytaskNodeList[0].applyUserList[0].postName}}</p>
  124. <p>{{item.approvalName}}</p>
  125. </div>
  126. </div>
  127. <div class="left-top-box" v-if="item.auditType == 2">
  128. <img v-if="item.actApplytaskNodeList[0].applyUserList[1]" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ycsp.png">
  129. <img v-if="!item.actApplytaskNodeList[0].applyUserList[1]" :src="item.actApplytaskNodeList[0].applyUserList[0].avatar">
  130. <div class="left-top-text-box">
  131. <p>{{item.actApplytaskNodeList[0].applyUserList[1]?'或签':item.actApplytaskNodeList[0].applyUserList[0].postName}}</p>
  132. <p>{{item.approvalName}}</p>
  133. </div>
  134. </div>
  135. <p class="left-bottom-p" v-if="index!=dataInfo.configInfoList.length-1"></p>
  136. <img class="left-position-img" v-if="item.applyTaskStatus == 1" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png">
  137. <img class="left-position-img" v-if="item.applyTaskStatus == 2" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png">
  138. </div>
  139. <!--依次审批-->
  140. <div class="right-max-box" v-if="item.auditType == 1">
  141. <div class="right-for-name-box" v-for="(minItem,minIndex) in item.actApplytaskNodeList" :key="minIndex">
  142. <div class="right-for-name-box-min">
  143. <img :src="minItem.applyUserList[0].avatar">
  144. <p>{{minItem.applyUserList[0].name}}</p>
  145. <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_1.png" v-if="minItem.nodeStatus == 1&&minIndex!=item.actApplytaskNodeList.length-1">
  146. <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_2.png" v-if="!minItem.nodeStatus == 1&&minIndex!=item.actApplytaskNodeList.length-1">
  147. <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png" v-if="minItem.nodeStatus == 1">
  148. <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png" v-if="minItem.nodeStatus == 2">
  149. </div>
  150. </div>
  151. </div>
  152. <!--或审-->
  153. <div class="right-max-box" v-if="item.auditType == 2">
  154. <div class="right-for-name-box" v-for="(minItem,minIndex) in item.actApplytaskNodeList[0].applyUserList" :key="minIndex">
  155. <div class="right-for-name-box-min">
  156. <img :src="minItem.avatar">
  157. <p>{{minItem.name}}</p>
  158. <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_1.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&minIndex!=item.actApplytaskNodeList[0].applyUserList.length-1">
  159. <img class="right-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_bz_2.png" v-if="item.actApplytaskNodeList[0].applyUserid != minItem.id&&minIndex!=item.actApplytaskNodeList[0].applyUserList.length-1">
  160. <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_ytg.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&item.actApplytaskNodeList[0].nodeStatus == 1">
  161. <img class="position-min-img" src="@/assets/ZDimages/medicUniversity-3_1/icon_cgsq_yjj.png" v-if="item.actApplytaskNodeList[0].applyUserid == minItem.id&&item.actApplytaskNodeList[0].nodeStatus == 2">
  162. </div>
  163. </div>
  164. </div>
  165. <p class="right-right-time-p">{{item.applyTaskTime}}</p>
  166. </div>
  167. </div>
  168. <div class="approval-for-box" v-if="dataInfo.approvalStatus==3">
  169. <div class="approval-for-box-min">
  170. <div class="left-max-box">
  171. <div class="left-top-box">
  172. <img src="">
  173. <!--<img src="">-->
  174. <div class="left-top-text-box">
  175. <p>已撤销</p>
  176. <p>{{dataInfo.applyUserName}}</p>
  177. </div>
  178. </div>
  179. </div>
  180. <div class="right-max-box" style="border:none;">
  181. </div>
  182. <p class="right-right-time-p">{{dataInfo.actApplytask.overTime}}</p>
  183. </div>
  184. </div>
  185. <p class="approval-for-min-p" v-if="dataInfo.approvalStatus==2">{{refuseContentText}}</p>
  186. </div>
  187. <div class="bottom-button-box" v-if="approvalPagePropsData.type == 1">
  188. <p class="add-button-two-90" @click="rejectButton" v-hasPermi="['chemical:refuseApplytask:edit']">拒绝</p>
  189. <p class="inquire-button-one" @click="agreeButton" v-hasPermi="['chemical:applytask:edit']">同意</p>
  190. </div>
  191. </div>
  192. </div>
  193. <el-dialog title="化学品详情" :visible.sync="infoDialogType" v-if="infoDialogType" width="900px" append-to-body class="approvalPage-info-dialog-box">
  194. <div class="approvalPage-info-dialog-text-big-box">
  195. <div class="approvalPage-info-dialog-box-text-box">
  196. <p>化学品名:</p>
  197. <p>{{infoDialogData.chemicalName}}</p>
  198. </div>
  199. <div class="approvalPage-info-dialog-box-text-box">
  200. <p>化学品ID:</p>
  201. <p>{{infoDialogData.id}}</p>
  202. </div>
  203. </div>
  204. <div class="approvalPage-info-dialog-text-big-box">
  205. <div class="approvalPage-info-dialog-box-text-box">
  206. <p>CAS:</p>
  207. <p>{{infoDialogData.casNum}}</p>
  208. </div>
  209. <div class="approvalPage-info-dialog-box-text-box">
  210. <p>别名:</p>
  211. <p>{{infoDialogData.anotherName}}</p>
  212. </div>
  213. </div>
  214. <div class="approvalPage-info-dialog-text-big-box">
  215. <div class="approvalPage-info-dialog-box-text-box">
  216. <p>分类:</p>
  217. <p>{{infoDialogData.chemicalClassify}}</p>
  218. </div>
  219. <div class="approvalPage-info-dialog-box-text-box">
  220. <p>属性:</p>
  221. <p>{{infoDialogData.classifyAttribute}}</p>
  222. </div>
  223. </div>
  224. <div class="approvalPage-info-dialog-text-big-box">
  225. <div class="approvalPage-info-dialog-box-text-box">
  226. <p>纯度:</p>
  227. <p>{{infoDialogData.purity}}</p>
  228. </div>
  229. <div class="approvalPage-info-dialog-box-text-box">
  230. <p>形态:</p>
  231. <p>{{infoDialogData.chemicalShape}}</p>
  232. </div>
  233. </div>
  234. <div slot="footer" class="dialog-footer">
  235. <el-button type="primary" @click="getHxpChemicalInfoOff">确 定</el-button>
  236. </div>
  237. </el-dialog>
  238. <el-dialog title="拒绝审批意见" :visible.sync="approvalTextType" v-if="approvalTextType" width="900px" append-to-body class="approvalPage-info-dialog-box">
  239. <el-form :model="formData" ref="form" :inline="true" label-width="120px">
  240. <el-form-item label="拒绝意见:" prop="refuseContent">
  241. <el-input
  242. maxlength="50"
  243. style="width:500px;"
  244. v-model="refuseContent"
  245. placeholder="请输入拒绝意见"
  246. clearable
  247. size="small"/>
  248. </el-form-item>
  249. </el-form>
  250. <div slot="footer" class="dialog-footer">
  251. <el-button @click="rejectButton">取 消</el-button>
  252. <el-button type="primary" @click="rejectDialogButton">确 定</el-button>
  253. </div>
  254. </el-dialog>
  255. <list-page-one :listPropsData="listPropsData" v-if="pageType == 2"></list-page-one>
  256. </div>
  257. </template>
  258. <script>
  259. import listPageOne from "./listPageOne.vue"
  260. import { classifyList,hxpapplyAudit,hxpapply,approvalTask,approvalRefuse,getHxpChemicalInfo } from "@/api/medicUniversity-3_1/index";
  261. export default {
  262. name: "approvalPage",
  263. components: {
  264. listPageOne
  265. },
  266. props:{
  267. approvalPagePropsData:{},
  268. },
  269. data(){
  270. return{
  271. //页面状态
  272. pageType:0,
  273. //详情展示弹窗开关
  274. infoDialogType:false,
  275. //拒绝审批开关
  276. approvalTextType:false,
  277. formData:{},
  278. refuseContent:"",
  279. dataInfo:{},
  280. //全选状态
  281. allCheckType:false,
  282. refuseContentText:"",
  283. //化学品详情
  284. infoDialogData:{},
  285. //化学品形态
  286. optionsList:[],
  287. //化学品分类列表
  288. optionsListOne:[],
  289. //属性列表
  290. optionsListTwo:[],
  291. //机柜页面传参
  292. listPropsData:{}
  293. }
  294. },
  295. created() {
  296. },
  297. mounted(){
  298. this.classifyList();
  299. this.getDicts("chemical_shape").then(response => {
  300. this.optionsList = response.data;
  301. })
  302. this.getDicts("hxp_classifyattribute").then(response => {
  303. this.optionsListTwo = response.data;
  304. })
  305. this.hxpapplyAudit();
  306. },
  307. methods: {
  308. //同意审批
  309. agreeButton(){
  310. let self = this;
  311. let list = [];
  312. for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
  313. if(self.dataInfo.actHxpapplyDetailList[i].checkType){
  314. let obj = {
  315. cabinetId:self.dataInfo.actHxpapplyDetailList[i].cabinetId,
  316. chemicalId:self.dataInfo.actHxpapplyDetailList[i].chemicalId
  317. };
  318. list.push(obj);
  319. }
  320. }
  321. if(!list[0]){
  322. this.msgError('请选择通过审批的化学品')
  323. return
  324. }
  325. self.$confirm(`是否确认审批通过?`, "提示", {
  326. confirmButtonText: "确定",
  327. cancelButtonText: "取消",
  328. type: "warning"
  329. }).then(async () => {
  330. let obj = {
  331. taskId:self.dataInfo.id,
  332. actHxpapplyDetailList:list,
  333. };
  334. approvalTask(obj).then(response => {
  335. this.msgSuccess(response.msg);
  336. this.backPage(1);
  337. });
  338. }).catch(() => {})
  339. },
  340. //拒绝审批
  341. rejectButton(){
  342. this.approvalTextType = !this.approvalTextType;
  343. },
  344. rejectDialogButton(){
  345. let self = this;
  346. // self.$confirm(`是否确认拒绝通过?`, "提示", {
  347. // confirmButtonText: "确定",
  348. // cancelButtonText: "取消",
  349. // type: "warning"
  350. // }).then(async () => {
  351. // let obj = {
  352. // taskId:self.dataInfo.id,
  353. // refuseContent:self.refuseContent,
  354. // };
  355. // approvalRefuse(obj).then(response => {
  356. // this.msgSuccess(response.msg);
  357. // this.backPage(1);
  358. // });
  359. // }).catch(() => {})
  360. let obj = {
  361. taskId:self.dataInfo.id,
  362. refuseContent:self.refuseContent,
  363. };
  364. approvalRefuse(obj).then(response => {
  365. this.msgSuccess(response.msg);
  366. this.backPage(1);
  367. });
  368. },
  369. //获取审批详情
  370. hxpapplyAudit(){
  371. let userId = localStorage.getItem('userId')
  372. if(this.approvalPagePropsData.type == 1){
  373. hxpapplyAudit(this.approvalPagePropsData.id).then(response => {
  374. //处理添加勾选状态
  375. for(let i=0;i<response.data.actHxpapplyDetailList.length;i++){
  376. response.data.actHxpapplyDetailList[i].checkType = false;
  377. }
  378. for(let i=0;i<response.data.configInfoList.length;i++){
  379. if(response.data.configInfoList[i].auditType == 1){
  380. //依次审批
  381. for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++){
  382. if(response.data.configInfoList[i].applyTaskStatus == 0){
  383. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  384. //进行中
  385. if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
  386. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  387. response.data.configInfoList[i].approvalName = '我(审批中)'
  388. break
  389. }else{
  390. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批中)'
  391. break
  392. }
  393. }
  394. }else{
  395. //未进行的
  396. if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
  397. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  398. response.data.configInfoList[i].approvalName = '我(审批人)'
  399. break
  400. }else{
  401. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批人)'
  402. break
  403. }
  404. }
  405. }
  406. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  407. if(response.data.configInfoList[i].actApplytaskNodeList[1]){
  408. response.data.configInfoList[i].approvalName = '已通过'
  409. break
  410. }else{
  411. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已通过)'
  412. break
  413. }
  414. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  415. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].id){
  416. response.data.configInfoList[i].approvalName = '我(已拒绝)'
  417. break
  418. }else{
  419. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已拒绝)'
  420. break
  421. }
  422. }
  423. }
  424. }else if(response.data.configInfoList[i].auditType == 2){
  425. //或签审批
  426. for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++) {
  427. let minNum = 0;
  428. for(let x=0;x<response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList.length;x++){
  429. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[x].id){
  430. minNum++
  431. }
  432. }
  433. if(minNum == 0){
  434. //没自己
  435. if(response.data.configInfoList[i].applyTaskStatus == 0){
  436. //未审批
  437. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  438. response.data.configInfoList[i].approvalName = "审批中";
  439. }else{
  440. response.data.configInfoList[i].approvalName = "待审批";
  441. }
  442. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  443. //已通过
  444. response.data.configInfoList[i].approvalName = "已通过";
  445. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  446. //已拒绝
  447. response.data.configInfoList[i].approvalName = "已拒绝";
  448. }
  449. }else{
  450. //有自己
  451. if(response.data.configInfoList[i].applyTaskStatus == 0){
  452. //未审批
  453. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  454. response.data.configInfoList[i].approvalName = "我(审批中)";
  455. }else{
  456. response.data.configInfoList[i].approvalName = "我(审批人)";
  457. }
  458. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  459. //已通过
  460. response.data.configInfoList[i].approvalName = "我(已通过)";
  461. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  462. //已拒绝
  463. response.data.configInfoList[i].approvalName = "我(已拒绝)";
  464. }
  465. }
  466. }
  467. }
  468. }
  469. let type = true;
  470. let configInfoList = [];
  471. for(let i=0;i<response.data.configInfoList.length;i++){
  472. if(type){
  473. configInfoList.push(response.data.configInfoList[i]);
  474. }
  475. if(response.data.configInfoList[i].applyTaskStatus == 2){
  476. type = false;
  477. }
  478. }
  479. this.$set(response.data,'configInfoList',configInfoList);
  480. this.$set(this,'dataInfo',response.data);
  481. this.$set(this,'pageType',1);
  482. });
  483. }else if(this.approvalPagePropsData.type == 2){
  484. hxpapply(this.approvalPagePropsData.id).then(response => {
  485. //处理添加勾选状态
  486. for(let i=0;i<response.data.actHxpapplyDetailList.length;i++){
  487. if(response.data.actHxpapplyDetailList[i].tickStatus == 1){
  488. response.data.actHxpapplyDetailList[i].checkType = true;
  489. }else{
  490. response.data.actHxpapplyDetailList[i].checkType = false;
  491. }
  492. }
  493. for(let i=0;i<response.data.configInfoList.length;i++){
  494. if(response.data.configInfoList[i].auditType == 1){
  495. //依次审批
  496. for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++){
  497. if(response.data.configInfoList[i].applyTaskStatus == 0){
  498. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  499. //进行中
  500. if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
  501. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  502. response.data.configInfoList[i].approvalName = '我(审批中)'
  503. break
  504. }else{
  505. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批中)'
  506. break
  507. }
  508. }
  509. }else{
  510. //未进行的
  511. if(response.data.configInfoList[i].actApplytaskNodeList[o].nodeStatus == 0){
  512. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  513. response.data.configInfoList[i].approvalName = '我(审批人)'
  514. break
  515. }else{
  516. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(审批人)'
  517. break
  518. }
  519. }
  520. }
  521. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  522. if(response.data.configInfoList[i].actApplytaskNodeList[1]){
  523. response.data.configInfoList[i].approvalName = '已通过'
  524. break
  525. }else{
  526. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已通过)'
  527. break
  528. }
  529. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  530. this.refuseContentText = response.data.configInfoList[i].refuseContent;
  531. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].id){
  532. response.data.configInfoList[i].approvalName = '我(已拒绝)'
  533. break
  534. }else{
  535. response.data.configInfoList[i].approvalName = response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[0].name+'(已拒绝)'
  536. break
  537. }
  538. }
  539. }
  540. }else if(response.data.configInfoList[i].auditType == 2){
  541. //或签审批
  542. for(let o=0;o<response.data.configInfoList[i].actApplytaskNodeList.length;o++) {
  543. let minNum = 0;
  544. for(let x=0;x<response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList.length;x++){
  545. if(userId == response.data.configInfoList[i].actApplytaskNodeList[o].applyUserList[x].id){
  546. minNum++
  547. }
  548. }
  549. if(minNum == 0){
  550. //没自己
  551. if(response.data.configInfoList[i].applyTaskStatus == 0){
  552. //未审批
  553. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  554. response.data.configInfoList[i].approvalName = "审批中";
  555. }else{
  556. response.data.configInfoList[i].approvalName = "待审批";
  557. }
  558. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  559. //已通过
  560. response.data.configInfoList[i].approvalName = "已通过";
  561. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  562. //已拒绝
  563. this.refuseContentText = response.data.configInfoList[i].refuseContent;
  564. response.data.configInfoList[i].approvalName = "已拒绝";
  565. }
  566. }else{
  567. //有自己
  568. if(response.data.configInfoList[i].applyTaskStatus == 0){
  569. //未审批
  570. if(response.data.actApplytask.nowStep == response.data.configInfoList[i].actApplytaskNodeList[o].id){
  571. response.data.configInfoList[i].approvalName = "我(审批中)";
  572. }else{
  573. response.data.configInfoList[i].approvalName = "我(审批人)";
  574. }
  575. }else if(response.data.configInfoList[i].applyTaskStatus == 1){
  576. //已通过
  577. response.data.configInfoList[i].approvalName = "我(已通过)";
  578. }else if(response.data.configInfoList[i].applyTaskStatus == 2){
  579. //已拒绝
  580. this.refuseContentText = response.data.configInfoList[i].refuseContent;
  581. response.data.configInfoList[i].approvalName = "我(已拒绝)";
  582. }
  583. }
  584. }
  585. }
  586. }
  587. let type = true;
  588. let configInfoList = [];
  589. for(let i=0;i<response.data.configInfoList.length;i++){
  590. if(type){
  591. configInfoList.push(response.data.configInfoList[i]);
  592. }
  593. if(response.data.configInfoList[i].applyTaskStatus == 2){
  594. type = false;
  595. }
  596. }
  597. this.$set(response.data,'configInfoList',configInfoList);
  598. this.$set(this,'dataInfo',response.data);
  599. this.$set(this,'pageType',1);
  600. });
  601. }
  602. },
  603. //返回
  604. backPage(type){
  605. if(type == 0){
  606. this.$parent.pageToggle(0);
  607. }else if(type == 1){
  608. this.$parent.pageToggle(1);
  609. }
  610. },
  611. goEditPage(){
  612. let obj = {
  613. id:this.approvalPagePropsData.id
  614. }
  615. this.$parent.pageToggle(5,obj);
  616. },
  617. //勾选处理
  618. checkClick(item){
  619. let self = this;
  620. if(self.approvalPagePropsData.type != 1){
  621. return
  622. }
  623. item.checkType = !item.checkType;
  624. let num = 0;
  625. for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
  626. if(self.dataInfo.actHxpapplyDetailList[i].checkType){
  627. num++
  628. }
  629. }
  630. this.allCheckType = num == self.dataInfo.actHxpapplyDetailList.length;
  631. },
  632. //全选
  633. allCheckClick(){
  634. let self = this;
  635. if(self.approvalPagePropsData.type != 1){
  636. return
  637. }
  638. if(this.allCheckType){
  639. this.allCheckType = false;
  640. for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
  641. self.dataInfo.actHxpapplyDetailList[i].checkType = false;
  642. }
  643. }else{
  644. this.allCheckType = true;
  645. for(let i=0;i<self.dataInfo.actHxpapplyDetailList.length;i++){
  646. self.dataInfo.actHxpapplyDetailList[i].checkType = true;
  647. }
  648. }
  649. },
  650. //化学品详情
  651. getHxpChemicalInfo(id){
  652. let self = this;
  653. getHxpChemicalInfo(id).then(response => {
  654. //化学品形态
  655. for(let i=0;i<self.optionsList.length;i++){
  656. if(response.data.chemicalShape == self.optionsList[i].dictValue){
  657. this.$set(response.data,'chemicalShape',self.optionsList[i].dictLabel);
  658. }
  659. }
  660. //化学品分类列表
  661. for(let i=0;i<self.optionsListOne.length;i++){
  662. if(response.data.chemicalClassify == self.optionsListOne[i].id){
  663. this.$set(response.data,'chemicalClassify',self.optionsListOne[i].classifyName);
  664. }
  665. }
  666. //属性列表
  667. let list = response.data.classifyAttribute.split(',');
  668. let newText = '';
  669. for(let o=0;o<list.length;o++){
  670. for(let i=0;i<self.optionsListTwo.length;i++){
  671. if(list[o] == self.optionsListTwo[i].dictValue){
  672. if(o == 0){
  673. newText = self.optionsListTwo[i].dictLabel
  674. }else{
  675. newText = newText + ',' +self.optionsListTwo[i].dictLabel
  676. }
  677. }
  678. }
  679. }
  680. this.$set(response.data,'classifyAttribute',newText);
  681. this.infoDialogData = response.data;
  682. this.infoDialogType = true;
  683. });
  684. },
  685. getHxpChemicalInfoOff(){
  686. this.infoDialogType = false;
  687. },
  688. //获取化学品分类列表
  689. classifyList(){
  690. classifyList().then(response => {
  691. this.optionsListOne = response.rows;
  692. });
  693. },
  694. pageToggle(type,item){
  695. if(type == 1){
  696. this.pageType = 1;
  697. }else if(type == 2){
  698. let obj = {
  699. cabinetName:item.chemicalName,
  700. posi:item.posi,
  701. safeUserName:item.safeUserNames,
  702. id:item.cabinetId,
  703. };
  704. this.$set(this,'listPropsData',obj);
  705. this.pageType = 2;
  706. }
  707. }
  708. }
  709. }
  710. </script>
  711. <style scoped lang="scss">
  712. .approvalPage{
  713. flex:1;
  714. display: flex;
  715. flex-direction: column;
  716. overflow: hidden;
  717. p{
  718. margin:0;
  719. padding:0;
  720. }
  721. .approvalPage-min{
  722. flex:1;
  723. display: flex;
  724. flex-direction: column;
  725. overflow: hidden;
  726. .title-box{
  727. display: flex;
  728. height:90px;
  729. border-bottom: 1px solid #D8D8D8;
  730. p:nth-child(1){
  731. flex:1;
  732. font-size:16px;
  733. line-height:90px;
  734. margin-left:18px;
  735. color:#0045AF;
  736. }
  737. .button-p{
  738. margin:25px 25px 0 0;
  739. }
  740. }
  741. .page-max-box{
  742. flex:1;
  743. display: flex;
  744. flex-direction: column;
  745. padding:20px 80px;
  746. .text-box-one{
  747. display: flex;
  748. margin-bottom:10px;
  749. font-size:16px;
  750. p{
  751. color:#333;
  752. line-height:50px;
  753. }
  754. p:nth-child(1){
  755. width:85px;
  756. text-align: right;
  757. }
  758. p:nth-child(2){
  759. width:205px;
  760. padding-left:10px;
  761. }
  762. p:nth-child(3){
  763. flex:1;
  764. }
  765. p:nth-child(4){
  766. }
  767. .colorA{
  768. color:#FF8C00;
  769. }
  770. .colorB{
  771. color:#25C402;
  772. }
  773. .colorC{
  774. color:#FA5151;
  775. }
  776. .colorD{
  777. color:#666666;
  778. }
  779. }
  780. .text-box-two{
  781. display: flex;
  782. margin-bottom:10px;
  783. font-size:16px;
  784. p{
  785. color:#333;
  786. line-height:50px;
  787. }
  788. p:nth-child(1){
  789. width:85px;
  790. text-align: right;
  791. }
  792. p:nth-child(2){
  793. padding-left:10px;
  794. flex:1;
  795. background: #F5F5F5;
  796. border-radius:4px;
  797. }
  798. }
  799. .text-box-three{
  800. display: flex;
  801. font-size:14px;
  802. p:nth-child(1){
  803. font-size:14px;
  804. width:14px;
  805. height:14px;
  806. margin:14px 11px 14px 14px;
  807. text-align: center;
  808. color:#ffb400;
  809. border-radius:50%;
  810. }
  811. p:nth-child(2){
  812. flex:1;
  813. line-height:42px;
  814. }
  815. }
  816. .table-title-box-one{
  817. display: flex;
  818. background: #f5f5f5;
  819. margin-bottom:10px;
  820. .cursor-img{
  821. cursor: pointer;
  822. }
  823. p:nth-child(1){
  824. width:16px;
  825. height:16px;
  826. margin:17px 17px 0 29px;
  827. }
  828. p{
  829. line-height: 50px;
  830. font-size:16px;
  831. }
  832. p:nth-child(2){
  833. width:130px;
  834. }
  835. p:nth-child(3){
  836. width:184px;
  837. }
  838. p:nth-child(4){
  839. width:299px;
  840. }
  841. p:nth-child(5){
  842. width:288px;
  843. }
  844. p:nth-child(6){
  845. flex:1;
  846. }
  847. p:nth-child(7){
  848. width:145px;
  849. }
  850. }
  851. .table-list-box-one{
  852. display: flex;
  853. .cursor-img{
  854. cursor: pointer;
  855. }
  856. img:nth-child(1){
  857. width:16px;
  858. height:16px;
  859. margin:13px 17px 0 29px;
  860. }
  861. p{
  862. line-height: 42px;
  863. font-size:14px;
  864. }
  865. p:nth-child(2){
  866. width:130px;
  867. }
  868. p:nth-child(3){
  869. width:184px;
  870. padding-right:20px;
  871. display:block;
  872. overflow:hidden;
  873. text-overflow:ellipsis;
  874. white-space:nowrap;
  875. }
  876. p:nth-child(4){
  877. width:299px;
  878. padding-right:20px;
  879. display:block;
  880. overflow:hidden;
  881. text-overflow:ellipsis;
  882. white-space:nowrap;
  883. }
  884. p:nth-child(5){
  885. width:288px;
  886. padding-right:20px;
  887. display:block;
  888. overflow:hidden;
  889. text-overflow:ellipsis;
  890. white-space:nowrap;
  891. }
  892. p:nth-child(6){
  893. flex:1;
  894. }
  895. p:nth-child(7){
  896. width:145px;
  897. color: #0045AF;
  898. }
  899. }
  900. .table-title-box-two{
  901. display: flex;
  902. background: #f5f5f5;
  903. margin-bottom:10px;
  904. .cursor-img{
  905. cursor: pointer;
  906. }
  907. img:nth-child(1){
  908. width:16px;
  909. height:16px;
  910. margin:17px 17px 0 18px;
  911. }
  912. p{
  913. line-height: 50px;
  914. font-size:16px;
  915. }
  916. p:nth-child(2){
  917. width:72px;
  918. }
  919. p:nth-child(3){
  920. width:113px;
  921. }
  922. p:nth-child(4){
  923. width:121px;
  924. }
  925. p:nth-child(5){
  926. width:165px;
  927. }
  928. p:nth-child(6){
  929. width:121px;
  930. }
  931. p:nth-child(7){
  932. width:136px;
  933. }
  934. p:nth-child(8){
  935. width:132px;
  936. }
  937. p:nth-child(9){
  938. width:169px;
  939. }
  940. p:nth-child(10){
  941. flex:1;
  942. }
  943. p:nth-child(11){
  944. width:145px;
  945. margin-left:55px;
  946. }
  947. }
  948. .table-list-box-two{
  949. display: flex;
  950. .cursor-img{
  951. cursor: pointer;
  952. }
  953. img:nth-child(1){
  954. width:16px;
  955. height:16px;
  956. margin:17px 17px 0 18px;
  957. }
  958. p{
  959. line-height: 50px;
  960. font-size:14px;
  961. }
  962. p:nth-child(2){
  963. width:72px;
  964. }
  965. p:nth-child(3){
  966. width:113px;
  967. padding-right:20px;
  968. display:block;
  969. overflow:hidden;
  970. text-overflow:ellipsis;
  971. white-space:nowrap;
  972. }
  973. p:nth-child(4){
  974. width:121px;
  975. padding-right:20px;
  976. display:block;
  977. overflow:hidden;
  978. text-overflow:ellipsis;
  979. white-space:nowrap;
  980. }
  981. p:nth-child(5){
  982. width:165px;
  983. padding-right:20px;
  984. display:block;
  985. overflow:hidden;
  986. text-overflow:ellipsis;
  987. white-space:nowrap;
  988. }
  989. p:nth-child(6){
  990. width:121px;
  991. }
  992. p:nth-child(7){
  993. width:136px;
  994. }
  995. p:nth-child(8){
  996. width:132px;
  997. }
  998. p:nth-child(9){
  999. width:169px;
  1000. }
  1001. p:nth-child(10){
  1002. flex:1;
  1003. }
  1004. p:nth-child(11){
  1005. width:80px;
  1006. height:28px;
  1007. line-height:28px;
  1008. margin-right:14px;
  1009. color:#0045af;
  1010. border:1px solid #0045af;
  1011. border-radius:4px;
  1012. text-align: center;
  1013. margin-top:11px;
  1014. cursor: pointer;
  1015. }
  1016. p:nth-child(12){
  1017. width:100px;
  1018. height:28px;
  1019. line-height:28px;
  1020. margin-right:14px;
  1021. color:#0045af;
  1022. border:1px solid #0045af;
  1023. border-radius:4px;
  1024. text-align: center;
  1025. margin-top:11px;
  1026. cursor: pointer;
  1027. }
  1028. }
  1029. .approval-title-p{
  1030. font-size:16px;
  1031. background: #f5f5f5;
  1032. line-height: 50px;
  1033. margin-bottom:23px;
  1034. padding-left:20px;
  1035. margin-top:10px;
  1036. }
  1037. .approval-list-max-box{
  1038. .approval-for-box{
  1039. .approval-for-box-min{
  1040. display: flex;
  1041. .left-max-box{
  1042. display: flex;
  1043. flex-direction: column;
  1044. width:219px;
  1045. position: relative;
  1046. .left-top-box{
  1047. display: flex;
  1048. img{
  1049. width:60px;
  1050. height:60px;
  1051. border-radius:4px;
  1052. margin-right:30px;
  1053. }
  1054. .left-top-text-box{
  1055. p{
  1056. line-height:30px;
  1057. font-size:14px;
  1058. color:#333;
  1059. }
  1060. }
  1061. }
  1062. .left-bottom-p{
  1063. width:2px;
  1064. flex:1;
  1065. background: #e0e0e0;
  1066. margin-left:29px;
  1067. }
  1068. .left-position-img{
  1069. width:20px;
  1070. height:20px;
  1071. position: absolute;
  1072. top:50px;
  1073. left:50px;
  1074. }
  1075. }
  1076. .right-max-box{
  1077. flex:1;
  1078. min-height:80px;
  1079. border:1px solid #e0e0e0;
  1080. margin-bottom:27px;
  1081. padding:19px 14px 0;
  1082. .right-for-name-box{
  1083. display: inline-block;
  1084. margin-bottom:17px;
  1085. .right-for-name-box-min{
  1086. display: flex;
  1087. position: relative;
  1088. img:nth-child(1){
  1089. width:40px;
  1090. height:40px;
  1091. border-radius:4px;
  1092. margin-right:8px;
  1093. }
  1094. p:nth-child(2){
  1095. line-height:44px;
  1096. font-size:14px;
  1097. }
  1098. .right-min-img{
  1099. width:12px;
  1100. height:10px;
  1101. margin:16px 17px 0 13px;
  1102. }
  1103. .position-min-img{
  1104. width:20px;
  1105. height:20px;
  1106. position: absolute;
  1107. top:30px;
  1108. left:30px;
  1109. }
  1110. }
  1111. }
  1112. }
  1113. .right-max-box-border-none{
  1114. border:none;
  1115. }
  1116. .right-max-end{
  1117. margin-bottom:0;
  1118. }
  1119. .right-right-time-p{
  1120. font-size:14px;
  1121. color: #666666;
  1122. width:160px;
  1123. text-align: right;
  1124. padding-top:10px;
  1125. }
  1126. }
  1127. }
  1128. .approval-for-min-p{
  1129. margin:20px 95px;
  1130. font-size:14px;
  1131. line-height:20px;
  1132. color:#666666;
  1133. background: #F5F5F5;
  1134. padding:10px 35px;
  1135. word-wrap:break-word;
  1136. word-break:break-all;
  1137. overflow: hidden;
  1138. }
  1139. }
  1140. .bottom-button-box{
  1141. display: flex;
  1142. width:217px;
  1143. margin:30px auto;
  1144. p{
  1145. width:100px;
  1146. }
  1147. p:nth-child(1){
  1148. margin-right:17px;
  1149. }
  1150. }
  1151. }
  1152. }
  1153. }
  1154. </style>
  1155. <style lang="scss">
  1156. .approvalPage-info-dialog-box{
  1157. p{
  1158. margin:0;
  1159. }
  1160. .approvalPage-info-dialog-text-big-box{
  1161. display: flex;
  1162. .approvalPage-info-dialog-box-text-box:nth-child(1){
  1163. margin-right:100px;
  1164. margin-left:20px;
  1165. }
  1166. .approvalPage-info-dialog-box-text-box{
  1167. width:357px;
  1168. display: flex;
  1169. p{
  1170. line-height:50px;
  1171. color:#333;
  1172. font-size:16px;
  1173. }
  1174. p:nth-child(1){
  1175. width:80px;
  1176. text-align: right;
  1177. }
  1178. p:nth-child(2){
  1179. flex:1;
  1180. text-align: right;
  1181. }
  1182. }
  1183. }
  1184. .el-dialog__footer{
  1185. text-align:center;
  1186. }
  1187. }
  1188. </style>