detail.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865
  1. <template>
  2. <view class="detail white-wrap">
  3. <image :src="statusImg" mode="aspectFill" class="status-img" v-if="statusImg"></image>
  4. <view class="section white-wrap">
  5. <view class="section-title require">用印用途</view>
  6. <view :class="opButton.CheckEdit?'section-select-box':null" :style="{color:oldUse?'#333':'#999'}" @click="handleOperation('showPurpose')">{{oldUse?oldUse:'请选择'}}</view>
  7. </view>
  8. <view class="section white-wrap">
  9. <view class="section-title require">客户名称(全称)</view>
  10. <view>{{detail.CompanyName}}</view>
  11. </view>
  12. <view class="section white-wrap">
  13. <view class="section-title require">统一社会信用码</view>
  14. <input type="text" v-model="detail.CreditCode" placeholder="请填写统一社会信用码" disabled/>
  15. </view>
  16. <view class="section white-wrap">
  17. <view class="section-title">实际使用方名称</view>
  18. <input type="text" v-model="detail.UseCompanyName" placeholder="请填写实际使用方名称" disabled/>
  19. </view>
  20. <view class="section white-wrap">
  21. <view class="section-title require">业务类型</view>
  22. <input type="text" v-model="detail.ServiceType" placeholder="请填写业务类型" disabled/>
  23. </view>
  24. <view class="section white-wrap">
  25. <view class="section-title require">文件份数</view>
  26. <input type="number" v-model="oldFileNum" placeholder="请填写总共盖章文件份数" :disabled="!opButton.CheckEdit"/>
  27. </view>
  28. <view class="section white-wrap">
  29. <view class="section-title require">加盖何种印章</view>
  30. <view :class="opButton.CheckEdit?'section-select-box':null" :style="{color:oldSealType?'#333':'#999'}" @click="handleOperation('showType')">{{oldSealType?oldSealType:'请选择'}}</view>
  31. </view>
  32. <view class="section white-wrap" v-if="detail.ContractId>0">
  33. <view class="section-title require">合同附件</view>
  34. <image
  35. :src="files.img"
  36. mode="aspectFill"
  37. style="width: 102rpx;height: 120rpx"
  38. @click="handlepreViewFile(files)">
  39. </image>
  40. </view>
  41. <view class="section white-wrap" v-else>
  42. <view class="section-title require">合同附件</view>
  43. <!-- 合规可修改上传 -->
  44. <div class="check-file-box" :style="'background-image:url('+files.img+')'" v-if="files.url" @click="handlepreViewFile(files)">
  45. <image class="del-icon" src="../static/del-icon.png" @click.stop="handleDeleteCheckFile" v-if="opButton.CheckEdit"></image>
  46. </div>
  47. <image v-else @click="handleUpload" src="../static/upload-icon.png" mode="aspectFill" style="width: 102rpx;height: 120rpx;"></image>
  48. </view>
  49. <view class="section white-wrap" v-if="detail.Status==='已驳回'">
  50. <view class="section-title">驳回理由</view>
  51. <view style="color: #F55768;">{{detail.ApprovalRemark}}</view>
  52. </view>
  53. <view class="section white-wrap">
  54. <view class="section-title">备注</view>
  55. <textarea type="text" auto-height v-model="oldRemark" placeholder="请填写备注" :disabled="!opButton.CheckEdit"></textarea>
  56. </view>
  57. <!-- 签回附件模块 -->
  58. <view class="section white-wrap" v-if="checkBackFilesRes.length>0">
  59. <view class="section-title">签回附件</view>
  60. <image
  61. v-for="item in checkBackFilesRes"
  62. :key="item.url"
  63. :src="item.img"
  64. mode="aspectFill"
  65. style="width: 102rpx;height: 120rpx"
  66. @click="handlepreViewFile(item)">
  67. </image>
  68. </view>
  69. <!-- 流程模块 -->
  70. <view class="section white-wrap process-wrap">
  71. <view class="title" style="font-size: 16px;font-weight: bold;">审批流程</view>
  72. <steps :data="processData"></steps>
  73. </view>
  74. <!-- 审批/撤回申请 -->
  75. <view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Approval||opButton.Cancel">
  76. <view class="flex" style="justify-content: space-between;width:100%">
  77. <van-button type="info" color="#3385FF" style="flex:1;" custom-class="btn-small" round @click="handleClickPass" v-if="opButton.Approval">通过</van-button>
  78. <van-button type="info" color="#F55768" style="flex:1;" custom-class="btn-small" round @click="handleApprovalReject" v-if="opButton.Approval">驳回</van-button>
  79. <van-button type="info" color="#F55768" style="flex:1;" :custom-class="opButton.Approval?'btn-small':'btn-big'" round @click="handleCancelApply" v-if="opButton.Cancel">撤回申请</van-button>
  80. </view>
  81. </view>
  82. <!-- 作废 -->
  83. <view class="fix-bottom-wrap flex" style="text-align: center;align-items:flex-end" v-if="opButton.Invalid||opButton.UploadFile">
  84. <view style="flex:1" v-if="opButton.Invalid">
  85. <view v-if="detail.ContractId>0" style="margin-bottom: 10rpx;" @click="checked=!checked"><radio value="同时作废合同" :checked="checked" color="#3385FF" style="transform:scale(0.8)"/>是否同时作废合同?</view>
  86. <van-button type="info" color="#F55768" :custom-class="opButton.UploadFile?'btn-small':'btn-big'" round @click="handleSealInvalid">用印作废</van-button>
  87. </view>
  88. <van-button v-if="opButton.UploadFile" style="flex:1" type="info" color="#3385FF" :custom-class="opButton.Invalid?'btn-small':'btn-big'" round @click="handleUploadCheckFile">{{checkBackFilesRes.length>0?'更新回签附件':'上传回签附件'}}</van-button>
  89. </view>
  90. <!-- 重新提交 -->
  91. <view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Edit">
  92. <van-button type="info" color="#3385FF" custom-class="btn-big" round @click="handleEdit">重新申请</van-button>
  93. </view>
  94. <!-- 撤回申请 -->
  95. <!-- <view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Cancel">
  96. <van-button type="info" color="#3385FF" custom-class="btn-big" round @click="handleCancelApply">撤回申请</van-button>
  97. </view> -->
  98. <!-- 用印用途 -->
  99. <van-popup :show="showPurpose" @close="showPurpose=false" position="bottom">
  100. <van-picker
  101. show-toolbar
  102. title="选择用印用途"
  103. :columns="purposeArr"
  104. @confirm="handlePurposeConfirm"
  105. @cancel="showPurpose=false"
  106. />
  107. </van-popup>
  108. <!-- 何种印章 -->
  109. <van-popup :show="showType" @close="showType=false" position="bottom">
  110. <van-picker
  111. show-toolbar
  112. title="选择何种印章"
  113. :columns="typeArr"
  114. @confirm="handleTypeConfirm"
  115. @cancel="showType=false"
  116. />
  117. </van-popup>
  118. <!-- 客户搜索 -->
  119. <van-popup :show="showCustome" @close="showCustome=false" position="bottom" custom-style="height: 100vh">
  120. <view class="custome-search-wrap">
  121. <van-search use-left-icon-slot use-action-slot shape="round" :value="searchCustomeVal" placeholder="请输入客户名称/社会信用码" @change="onSearchValChange" @search="onSearch"
  122. custom-class="search-box" field-class="search-con">
  123. <view slot="left-icon">
  124. <image src="../static/search-icon.png" mode="aspectFill" class="search-icon"></image>
  125. </view>
  126. <view slot="action" @click="showCustome=false" class="search-btn">取消</view>
  127. </van-search>
  128. <view class="search-result">
  129. <view class="result-custome-box" v-if="searchContractList.length===0">
  130. <view class="result-item flex" v-for="item in searchCustomeList" :key="item" @click="getContract(item)">
  131. <image src="../static/search-icon.png" mode="aspectFill" class="search-icon"></image>
  132. <view class="con van-ellipsis">{{item}}</view>
  133. <image src="../static/click-icon.png" mode="aspectFill" class="click-icon"></image>
  134. </view>
  135. </view>
  136. <view class="result-contract-box" v-else>
  137. <view class="result-contract-item" v-for="item in searchContractList" :key="item.ContractId" @click="handleChooseContract(item)">
  138. <view class="name">{{item.CompanyName}}</view>
  139. <view style="margin-top: 20rpx;">合同编号:{{item.ContractCode}}</view>
  140. <view style="margin-top: 20rpx;">合同类型:{{item.ContractType}}</view>
  141. <view style="margin-top: 20rpx;">合同金额:{{item.Price}}</view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </van-popup>
  147. <!-- 上传回签附件弹窗确认弹窗 -->
  148. <van-popup :show="showConfirmCheckBackfile" @close="showConfirmCheckBackfile=false" position="bottom" round>
  149. <view class="uploadfile-wrap">
  150. <view style="text-align: center;font-size: 16px;font-weight: bold;">上传回签附件</view>
  151. <view class="contract-list" style="height: 30vh;">
  152. <view class="contract-item" v-for="item in checkBackFiles" :key="item.url"
  153. @click="handlepreViewFile(item)">
  154. <image class="contract-img" mode="aspectFill" :src="item.img"></image>
  155. </view>
  156. </view>
  157. <button style="width: 450rpx;" @click='handleConfirmCheckBackFile'>确定</button>
  158. </view>
  159. </van-popup>
  160. <van-dialog id="van-dialog" />
  161. </view>
  162. </template>
  163. <script>
  164. import {
  165. apiSealDetail,
  166. apiSearchCustome,
  167. apiSearchContract,
  168. apiApprovalPass,
  169. apiInvalidSeal,
  170. apiApprovalPassModify,
  171. apiSealCancelApply,
  172. apiFlowDetail,
  173. apiSealCheckBackFiles
  174. } from '@/api/approve/seal.js'
  175. import steps from '../components/steps.vue'
  176. import {preViewFile} from '../utils/util.js'
  177. import {uploadFiles} from '@/utils/uploadFile.js'
  178. export default{
  179. components:{
  180. steps
  181. },
  182. computed:{
  183. statusImg(){
  184. if(this.detail.Status==='已审批'){
  185. return require('../static/pass-icon.png')
  186. }else if(this.detail.Status==='已驳回'){
  187. return require('../static/fail-icon.png')
  188. }else if(this.detail.Status==='处理中'){
  189. return require('../static/processing-icon.png')
  190. }else if(this.detail.Status==='已撤回'){
  191. return require('../static/recall-icon.png')
  192. }else if(this.detail.Status==='已作废'){
  193. return require('../static/cancel-icon.png')
  194. }
  195. },
  196. //页面显示的回签附件
  197. checkBackFilesRes(){
  198. const reg = /\.(pdf)$/;
  199. return this.detail&&this.detail.CheckBackFileUrl&&this.detail.CheckBackFileUrl.split("#").map((item) => {
  200. if (reg.test(item)) {
  201. return {
  202. type: "pdf",
  203. url: item,
  204. img: require("@/pages-approve/static/pdf.png"),
  205. };
  206. } else {
  207. return {
  208. type: "word",
  209. url: item,
  210. img: require("@/pages-approve/static/word.png"),
  211. };
  212. }
  213. });
  214. },
  215. },
  216. data() {
  217. return {
  218. checkBackFiles:[],// 上传的签回附件文件
  219. showConfirmCheckBackfile:false,//确认上传的签回附件弹窗
  220. val:'',
  221. ContractApprovalId:0,
  222. ContractApprovalRecordId:0,
  223. SealId:0,
  224. processData:null,
  225. detail:{},
  226. opButton:{},
  227. files:{
  228. type:'',
  229. img:'',
  230. url:''
  231. },//合同附件
  232. showPurpose:false,//显示用印用途选项
  233. purposeArr:['销售合同','渠道合同','付款通知函','招投标','战略合作协议'],
  234. showType:false,//显示用印用途选项
  235. typeArr:['合同章','公章','法人章'],
  236. showCustome:false,//显示搜索客户名称
  237. searchCustomeVal:'',//搜索客户输入数据
  238. searchCustomeList:[],//搜索到的客户名称列表
  239. searchContractList:[],//选择搜索中的客户后合同列表数据
  240. checked:false,//是否同时作废合同
  241. oldUse:"",
  242. oldFileNum:'',
  243. oldSealType:'',
  244. oldRemark:'',
  245. oldFile:''
  246. }
  247. },
  248. onLoad(options) {
  249. this.ContractApprovalId=options.ContractApprovalId||0
  250. this.ContractApprovalRecordId=options.ContractApprovalRecordId||0
  251. this.SealId=options.SealId||0
  252. this.getDetail()
  253. },
  254. onShow() {
  255. uni.$once('updateSealDetail',(data)=>{
  256. console.log('监听到事件来自updateSealDetail ,携带参数 msg 为:' + data.msg);
  257. this.getDetail()
  258. })
  259. },
  260. onPullDownRefresh() {
  261. this.getDetail()
  262. setTimeout(()=>{
  263. uni.stopPullDownRefresh()
  264. },1000)
  265. },
  266. methods: {
  267. // 上传(更新)签回附件
  268. async handleUploadCheckFile(){
  269. const res=await uploadFiles({type:'file'})
  270. const reg = /\.(pdf)$/;
  271. const reg2= /\.doc|\.docx$/
  272. if(reg.test(res[0])){
  273. this.checkBackFiles=[{
  274. type:'pdf',
  275. url:res[0],
  276. img:require('../static/pdf.png')
  277. }]
  278. this.showConfirmCheckBackfile=true
  279. }else if(reg2.test(res[0])){
  280. this.checkBackFiles=[{
  281. type:'word',
  282. url:res[0],
  283. img:require('../static/word.png')
  284. }]
  285. this.showConfirmCheckBackfile=true
  286. }else{
  287. uni.showToast({
  288. title:'请上传pdf/word格式文件',
  289. icon:"none"
  290. })
  291. }
  292. },
  293. //确认上传的签回附件
  294. async handleConfirmCheckBackFile(){
  295. let FileUrlarr=this.checkBackFiles.map(item=>item.url)
  296. const res=await apiSealCheckBackFiles({
  297. SealId:Number(this.detail.SealId),
  298. FileUrl:FileUrlarr.join('#')
  299. })
  300. if(res.code===200){
  301. uni.showToast({
  302. title:'操作成功',
  303. icon:'none'
  304. })
  305. // 如果是已审批上传回签附件则更新列表页
  306. if(this.detail.Status==='已审批'){
  307. this.handleUpdateList()
  308. }
  309. setTimeout(()=>{
  310. this.checkBackFiles=[]
  311. this.showConfirmCheckBackfile=false
  312. this.getDetail()
  313. },500)
  314. }
  315. },
  316. // 更新列表页
  317. handleUpdateList(){
  318. uni.$emit('sealApproveListUpdate',{
  319. ContractApprovalId:this.ContractApprovalId,
  320. ContractApprovalRecordId:this.ContractApprovalRecordId,
  321. SealId:this.SealId
  322. })
  323. },
  324. // 合规删除合同附件
  325. handleDeleteCheckFile(){
  326. this.files={
  327. type:'',
  328. img:'',
  329. url:''
  330. }
  331. },
  332. //合规上传附件
  333. async handleUpload(){
  334. const res=await uploadFiles({type:'all'})
  335. const reg = /\.(pdf)$/;
  336. const reg2= /\.doc|\.docx$/
  337. if(reg.test(res[0])){
  338. this.files={
  339. type:'pdf',
  340. url:res[0],
  341. img:require('../static/pdf.png')
  342. }
  343. }else if(reg2.test(res[0])){
  344. this.files={
  345. type:'word',
  346. url:res[0],
  347. img:require('../static/word.png')
  348. }
  349. }else{
  350. this.files={
  351. type:'img',
  352. url:res[0],
  353. img:res[0]
  354. }
  355. }
  356. },
  357. // 撤回申请
  358. handleCancelApply(){
  359. this.$dialog.confirm({
  360. title: '提示',
  361. message: '是否确认撤回',
  362. }).then(async ()=>{
  363. const res=await apiSealCancelApply({SealId:Number(this.detail.SealId)})
  364. if(res.code===200){
  365. uni.showToast({
  366. title:'撤回成功',
  367. icon:'none'
  368. })
  369. this.handleUpdateList()
  370. this.getDetail()
  371. }
  372. }).catch(() => {
  373. console.log('取消撤回');
  374. });
  375. },
  376. handlePurposeConfirm(e){
  377. this.oldUse=e.detail.value
  378. this.showPurpose=false
  379. },
  380. handleTypeConfirm(e){
  381. this.oldSealType=e.detail.value
  382. this.showType=false
  383. this.getProcessData()
  384. },
  385. //前去重审
  386. handleEdit(){
  387. uni.$once('sealEditSubmit',()=>{
  388. this.handleUpdateList()
  389. })
  390. uni.navigateTo({
  391. url:`./edit?ContractApprovalId=${this.ContractApprovalId}&ContractApprovalRecordId=${this.ContractApprovalRecordId}&SealId=${this.SealId}`
  392. })
  393. },
  394. //用印作废
  395. handleSealInvalid(){
  396. this.$dialog.confirm({
  397. title: '提示',
  398. message: '是否确认作废',
  399. }).then(async ()=>{
  400. const res=await apiInvalidSeal({
  401. IsInvalidContract:this.checked,
  402. SealId:this.detail.SealId
  403. })
  404. if(res.code===200){
  405. uni.showToast({
  406. title:'操作成功',
  407. icon:'none'
  408. })
  409. this.handleUpdateList()
  410. this.getDetail()
  411. }
  412. }).catch(() => {
  413. console.log('取消作废');
  414. });
  415. },
  416. //点击通过
  417. handleClickPass(){
  418. //判断是否有内容修改
  419. const flag1=this.oldUse===this.detail.Use
  420. const flag2=Number(this.oldFileNum)===Number(this.detail.FileNum)
  421. const flag3=this.oldSealType===this.detail.SealType
  422. const flag4=this.oldRemark===this.detail.Remark
  423. const flag5=this.files.url===this.detail.FileUrl
  424. if(flag1&&flag2&&flag3&&flag4&&flag5){
  425. this.handleApprovalPass()
  426. }else{
  427. this.handleApprovePassModify()
  428. }
  429. },
  430. //审批通过 (修改内容)
  431. async handleApprovePassModify(){
  432. if(!this.oldFileNum){
  433. uni.showToast({
  434. title:'请填写文件份数',
  435. icon:"none"
  436. })
  437. return
  438. }
  439. if(this.oldFileNum<1){
  440. uni.showToast({
  441. title:'文件份数不合法',
  442. icon:"none"
  443. })
  444. return
  445. }
  446. if(!this.oldSealType){
  447. uni.showToast({
  448. title:'印章类型不能为空',
  449. icon:"none"
  450. })
  451. return
  452. }
  453. if(!this.oldUse){
  454. uni.showToast({
  455. title:'请选择用印用途',
  456. icon:"none"
  457. })
  458. return
  459. }
  460. if(!this.files.url){
  461. uni.showToast({
  462. title:'合同附件不能为空',
  463. icon:"none"
  464. })
  465. return
  466. }
  467. const res=await apiApprovalPassModify({
  468. FileNum:Number(this.oldFileNum),
  469. Remark:this.oldRemark,
  470. SealId:Number(this.detail.SealId),
  471. SealType:this.oldSealType,
  472. Use:this.oldUse,
  473. FileUrl:this.files.url
  474. })
  475. if(res.code===200){
  476. this.$dialog.alert({
  477. title: "处理成功",
  478. confirmButtonColor: "#5890FB",
  479. }).then(() => {
  480. this.handleUpdateList()
  481. this.getDetail()
  482. });
  483. }
  484. },
  485. // 审批通过 (未修改内容)
  486. async handleApprovalPass(){
  487. const res=await apiApprovalPass({
  488. SealId:Number(this.detail.SealId),
  489. Remark:""
  490. })
  491. if(res.code===200){
  492. this.$dialog.alert({
  493. title: "处理成功",
  494. confirmButtonColor: "#5890FB",
  495. }).then(() => {
  496. this.handleUpdateList()
  497. this.getDetail()
  498. });
  499. }
  500. },
  501. //驳回
  502. handleApprovalReject(){
  503. uni.$once('sealApproveReject',()=>{
  504. this.handleUpdateList()
  505. })
  506. uni.navigateTo({
  507. url:`./reason?SealId=${this.detail.SealId}`
  508. })
  509. },
  510. //预览文件
  511. handlepreViewFile(e){
  512. if (e.type === "pdf"||e.type==='word') {
  513. preViewFile(e.url)
  514. } else {
  515. uni.previewImage({
  516. urls: [e.url]
  517. })
  518. }
  519. },
  520. // 只有当 checkEdit 为true 即合规才能修改
  521. handleOperation(key){
  522. if(this.opButton.CheckEdit){
  523. this[key]=true
  524. }
  525. },
  526. // 客户搜索
  527. // 先搜索出客户 再通过客户去请求出客户下面存在的合同
  528. onSearchValChange(e){
  529. this.searchCustomeVal=e.detail
  530. },
  531. //搜索客户
  532. async onSearch(){
  533. if(!this.searchCustomeVal){
  534. uni.showToast({
  535. title:'请输入搜索关键字',
  536. icon:'none'
  537. })
  538. return
  539. }
  540. this.searchContractList=[]
  541. this.searchCustomeList=[]
  542. const res=await apiSearchCustome({Keyword:this.searchCustomeVal})
  543. if(res.code===200){
  544. this.searchCustomeList=res.data
  545. }
  546. },
  547. // 搜索客户对应的合同
  548. async getContract(e){
  549. const res=await apiSearchContract({Keyword:e})
  550. if(res.code===200){
  551. if(res.data.List){
  552. this.searchContractList=res.data.List
  553. }else{
  554. uni.showToast({
  555. title:"此客户无合同,请重新选择",
  556. icon:"none"
  557. })
  558. }
  559. }
  560. },
  561. // 选择合同 更新表单数据
  562. handleChooseContract(e){
  563. this.detail.CompanyName=e.CompanyName
  564. this.detail.ServiceType=e.ContractType
  565. this.detail.CreditCode=e.CreditCode
  566. this.detail.UseCompanyName=e.CompanyName
  567. this.detail.ContractId=e.ContractId
  568. this.detail.ContractfileUrl=e.FileUrl
  569. // 关闭搜索弹窗
  570. this.showCustome=false
  571. this.searchCustomeVal=''
  572. this.searchContractList=[]
  573. this.searchCustomeList=[]
  574. },
  575. //合同章5 公章、法人章 6
  576. async getProcessData(){
  577. let id=0
  578. if(this.type==='合同章'){
  579. id=5
  580. }else{
  581. id=6
  582. }
  583. let res=await apiFlowDetail({FlowId:id})
  584. if(res.code===200){
  585. this.processData=res.data||null
  586. }
  587. },
  588. //获取详情
  589. async getDetail() {
  590. const res=await apiSealDetail({
  591. ContractApprovalId:Number(this.ContractApprovalId),
  592. ContractApprovalRecordId:Number(this.ContractApprovalRecordId),
  593. SealId:Number(this.SealId)
  594. })
  595. if(res.code===200){
  596. this.detail=res.data.SealDetail
  597. this.oldUse=res.data.SealDetail.Use
  598. this.oldFileNum=res.data.SealDetail.FileNum
  599. this.oldSealType=res.data.SealDetail.SealType
  600. this.oldRemark=res.data.SealDetail.Remark
  601. this.processData=res.data.FlowNodeList
  602. this.opButton=res.data.OpButton
  603. this.handleFile(res.data.SealDetail.FileUrl)
  604. }
  605. },
  606. //处理文件
  607. handleFile(filesUrl){
  608. const reg = /\.(pdf)$/;
  609. const reg2= /\.doc|\.docx$/
  610. if(reg.test(filesUrl)){
  611. this.files={
  612. type: "pdf",
  613. url: filesUrl,
  614. img: require("../static/pdf.png"),
  615. }
  616. }else if(reg2.test(filesUrl)){
  617. this.files={
  618. type: "word",
  619. url: filesUrl,
  620. img: require("../static/word.png"),
  621. }
  622. }else{
  623. this.files={
  624. type: "img",
  625. url: filesUrl,
  626. img: filesUrl,
  627. }
  628. }
  629. },
  630. },
  631. }
  632. </script>
  633. <style lang="scss">
  634. .uploadfile-wrap{
  635. width: 100%;
  636. height: 50vh;
  637. background-color: #FFFFFF;
  638. padding: 32rpx;
  639. button {
  640. margin-left: auto;
  641. margin-right: auto;
  642. width: 260rpx;
  643. height: 70rpx;
  644. display: block;
  645. border-radius: 28px;
  646. border: none;
  647. font-size: 15px;
  648. color: #fff;
  649. line-height: 70rpx;
  650. background-color: #5890fb;
  651. }
  652. .contract-list {
  653. display: flex;
  654. flex-wrap: wrap;
  655. .contract-img {
  656. width: 102rpx;
  657. height: 120rpx;
  658. margin-right: 20rpx;
  659. margin-bottom: 20rpx;
  660. }
  661. }
  662. }
  663. .check-file-box{
  664. width: 102rpx;
  665. height: 120rpx;
  666. background-size: cover;
  667. background-position: center;
  668. position: relative;
  669. .del-icon{
  670. position: absolute;
  671. width: 30rpx;
  672. height: 30rpx;
  673. top: -15rpx;
  674. right: -15rpx;
  675. }
  676. }
  677. .detail{
  678. width: 100%;
  679. min-height: 100vh;
  680. padding-bottom: calc(150rpx + constant(safe-area-inset-bottom));
  681. padding-bottom: calc(150rpx + env(safe-area-inset-bottom));
  682. position: relative;
  683. }
  684. .status-img{
  685. position: absolute;
  686. right: 0;
  687. top: 50rpx;
  688. width: 220rpx;
  689. height: 220rpx;
  690. z-index: 10;
  691. }
  692. .section{
  693. padding: 30rpx 34rpx;
  694. border-top: 10rpx solid #F5F5F5;
  695. position: relative;
  696. .section-title{
  697. font-size: 16px;
  698. margin-bottom: 20rpx;
  699. }
  700. .require::before{
  701. content: '*';
  702. font-size: 16px;
  703. color: #FF0000;
  704. position: absolute;
  705. left: 20rpx;
  706. }
  707. .section-select-box{
  708. color: #999;
  709. position: relative;
  710. &::after{
  711. position: absolute;
  712. right: 0;
  713. top: 50%;
  714. content: '';
  715. display: block;
  716. width: 18rpx;
  717. height: 18rpx;
  718. border-top: 1px solid #999;
  719. border-right: 1px solid #999;
  720. transform: translateY(-50%) rotate(45deg);
  721. }
  722. }
  723. }
  724. .btn-big{
  725. width: 450rpx;
  726. }
  727. .btn-small{
  728. min-width: 220rpx;
  729. }
  730. .fix-bottom-wrap{
  731. button{
  732. height: 70rpx;
  733. font-size: 15px;
  734. }
  735. }
  736. .custome-search-wrap{
  737. padding: 34rpx;
  738. height: 100%;
  739. .search-box {
  740. border: 1px solid #3385FF;
  741. padding: 0 !important;
  742. border-radius: 60rpx;
  743. background-color: #fff !important;
  744. }
  745. .search-con {
  746. background-color: #fff !important;
  747. }
  748. .van-search__content {
  749. background-color: #fff !important;
  750. padding-left: 30rpx !important;
  751. }
  752. .search-btn {
  753. position: relative;
  754. color: #3385FF;
  755. &::before {
  756. content: '';
  757. display: block;
  758. width: 1px;
  759. height: 60%;
  760. background-color: #D1D1D1;
  761. position: absolute;
  762. left: -16rpx;
  763. top: 20%;
  764. }
  765. }
  766. .search-icon{
  767. width: 40rpx;
  768. height: 40rpx;
  769. display: block;
  770. position: relative;
  771. top: 4rpx;
  772. margin-right: 20rpx;
  773. }
  774. .click-icon{
  775. width: 24rpx;
  776. height: 24rpx;
  777. }
  778. .result-item{
  779. align-items: center;
  780. padding: 20rpx 0;
  781. border-bottom: 1px solid #EBEBEB;
  782. .con{
  783. flex: 1;
  784. margin-right: 20rpx;
  785. }
  786. }
  787. .search-result{
  788. overflow-y: auto;
  789. height: 100%;
  790. }
  791. .result-contract-box{
  792. padding: 0 10rpx;
  793. .result-contract-item{
  794. margin-top: 30rpx;
  795. box-shadow: 0px 0px 12rpx rgba(175, 175, 175, 0.38);
  796. padding: 30rpx;
  797. border-radius: 8px;
  798. .name{
  799. font-size: 16px;
  800. font-weight: bold;
  801. &::before{
  802. content:'';
  803. display:inline-block;
  804. width: 31rpx;
  805. height: 34rpx;
  806. background-image: url(../../static/man.png);
  807. background-size: cover;
  808. position: relative;
  809. top: 4rpx;
  810. margin-right: 10rpx;
  811. }
  812. }
  813. }
  814. }
  815. }
  816. </style>