daichu_details.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <template>
  2. <view class="container">
  3. <u-form ref="uForm">
  4. <u-form-item label-width='260' label="合同编号">
  5. <u-input v-model="list.contractNo" input-align="right" placeholder="" disabled />
  6. </u-form-item>
  7. <u-form-item label-width='260' label="运输方式">
  8. <u-input v-model="list.shippingType" input-align="right" placeholder="" disabled />
  9. </u-form-item>
  10. <u-form-item label-width='260' label="买方">
  11. <u-input v-model="list.buyer" input-align="right" placeholder="" disabled />
  12. </u-form-item>
  13. <u-form-item label-width='260' label="买方电话">
  14. <u-input v-model="list.buyerPhone" input-align="right" placeholder="" disabled />
  15. </u-form-item>
  16. <u-form-item label-width='260' label="卖方">
  17. <u-input v-model="list.seller" input-align="right" placeholder="" disabled />
  18. </u-form-item>
  19. <u-form-item label-width='260' label="卖方电话">
  20. <u-input v-model="list.sellerPhone" input-align="right" placeholder="" disabled />
  21. </u-form-item>
  22. <u-form-item label-width='260' label="结算方式">
  23. <u-input v-model="list.settlementMethod" input-align="right" placeholder="" disabled />
  24. </u-form-item>
  25. <u-form-item label-width='260' label="交货方式">
  26. <u-input v-model="list.deliverType1" input-align="right" placeholder="" disabled />
  27. </u-form-item>
  28. <u-form-item label-width='260' label="包装方式">
  29. <u-input v-model="list.packingMethod" input-align="right" placeholder="" disabled />
  30. </u-form-item>
  31. <u-form-item label-width='260' label="验收方式">
  32. <u-input v-model="list.acceptanceMethod" input-align="right" placeholder="" disabled />
  33. </u-form-item>
  34. <u-form-item label-width='260' label="重量(吨)">
  35. <u-input v-model="list.weight" input-align="right" placeholder="" disabled />
  36. </u-form-item>
  37. <u-form-item label-width='260' label="交货日期(起)">
  38. <u-input v-model="list.deliveryDateStart" input-align="right" placeholder="" disabled />
  39. </u-form-item>
  40. <u-form-item label-width='260' label="溢短装(%)">
  41. <u-input v-model="list.overShort" input-align="right" placeholder="" disabled />
  42. </u-form-item>
  43. <u-form-item label-width='260' label="交货日期(止)">
  44. <u-input v-model="list.deliveryDateEnd" input-align="right" placeholder="" disabled />
  45. </u-form-item>
  46. <u-form-item label-width='260' label="货源地所在地区">
  47. <view class="textCss">
  48. {{list.sourceProvince}}{{list.sourceCity}}{{list.sourceArea}}
  49. </view>
  50. </u-form-item>
  51. <u-form-item label-width='260' label="货源地详细地址">
  52. <u-input v-model="list.sourceGoods" input-align="right" placeholder="" disabled />
  53. </u-form-item>
  54. <u-form-item label-width='260' label="交货地所在地区">
  55. <view class="textCss">
  56. {{list.deliveryProvince}}{{list.deliveryCity}}{{list.deliveryArea}}
  57. </view>
  58. </u-form-item>
  59. <u-form-item label-width='260' label="交货地详细地址">
  60. <u-input v-model="list.placeDelivery" input-align="right" placeholder="" disabled />
  61. </u-form-item>
  62. <u-form-item label-width='260' label="签订日期">
  63. <u-input v-model="list.signingDate" input-align="right" placeholder="" disabled />
  64. </u-form-item>
  65. <u-form-item label-width='260' label="代储费">
  66. <view class="textCss">
  67. {{list.storageFee}}
  68. </view>
  69. </u-form-item>
  70. <u-form-item label-width='300' label="合同单价(元/吨)">
  71. <u-input v-model="list.unitContractPrice" input-align="right" placeholder="" disabled />
  72. </u-form-item>
  73. <u-form-item label-width='300' label="代储费起算重量">
  74. <u-input v-model="list.storageFeeWeight" input-align="right" placeholder="" disabled />
  75. </u-form-item>
  76. <u-form-item label-width='300' label="合同总价">
  77. <u-input v-model="list.totalContractPrice" input-align="right" placeholder="" disabled />
  78. </u-form-item>
  79. <u-form-item label-width='300' label="代储费起算日期">
  80. <u-input v-model="list.storageFeeStartdate" input-align="right" placeholder="" disabled />
  81. </u-form-item>
  82. <u-form-item label-width='300' label="代储费预计终止日期">
  83. <u-input v-model="list.storageFeeEnddate" input-align="right" placeholder="" disabled />
  84. </u-form-item>
  85. <u-form-item label-width='300' label="最终实际交易量(吨)">
  86. <u-input v-model="list.finalTradingVolume" input-align="right" placeholder="" disabled />
  87. </u-form-item>
  88. <u-form-item label-width='260' label="货名">
  89. <u-input v-model="list.contractGoodsInfo.goodsName" input-align="right" placeholder="" disabled />
  90. </u-form-item>
  91. <u-form-item label-width='260' label="水分(%)<=">
  92. <u-input v-model="list.contractGoodsInfo.waterContent" input-align="right" placeholder="" disabled />
  93. </u-form-item>
  94. <u-form-item label-width='260' label="品级">
  95. <u-input v-model="list.contractGoodsInfo.grade" input-align="right" placeholder="" disabled />
  96. </u-form-item>
  97. <u-form-item label-width='260' label="杂质(%)<=">
  98. <u-input v-model="list.contractGoodsInfo.impurity" input-align="right" placeholder="" disabled />
  99. </u-form-item>
  100. <u-form-item label-width='260' label="容重(克/升)>=">
  101. <u-input v-model="list.contractGoodsInfo.bulkDensity" input-align="right" placeholder="" disabled />
  102. </u-form-item>
  103. <u-form-item label-width='260' label="霉变粒(%)<=">
  104. <u-input v-model="list.contractGoodsInfo.mildewGrain" input-align="right" placeholder="" disabled />
  105. </u-form-item>
  106. <u-form-item label-width='260' label="热损伤(%)<=">
  107. <u-input v-model="list.contractGoodsInfo.jiaorenli" input-align="right" placeholder="" disabled />
  108. </u-form-item>
  109. <u-form-item label-width='260' label="不完善粒(%)<=">
  110. <u-input v-model="list.contractGoodsInfo.imperfectGrain" input-align="right" placeholder="" disabled />
  111. </u-form-item>
  112. <u-form-item label-width='260' label="合同收入(元)">
  113. <u-input v-model="list.contractProcessInfo.goodsNameKey" input-align="right" placeholder="" disabled />
  114. </u-form-item>
  115. <u-form-item label-width='260' label="已开发票(元)">
  116. <u-input v-model="list.contractProcessInfo.goodsName" input-align="right" placeholder="" disabled />
  117. </u-form-item>
  118. <u-form-item label-width='260' label="费用支出(元)">
  119. <u-input v-model="list.contractProcessInfo.waterContent" input-align="right" placeholder="" disabled />
  120. </u-form-item>
  121. <u-form-item label-width='260' label="未开发票(元)">
  122. <u-input v-model="list.contractProcessInfo.impurity" input-align="right" placeholder="" disabled />
  123. </u-form-item>
  124. <u-form-item label-width='260' label="未回款(元)">
  125. <u-input v-model="list.contractProcessInfo.mildewGrain" input-align="right" placeholder="" disabled />
  126. </u-form-item>
  127. <u-form-item label-width='260' label="双章原件回收情况">
  128. <u-input v-model="list.contractProcessInfo.grade" input-align="right" placeholder="" disabled />
  129. </u-form-item>
  130. <u-form-item label-width='260' label="备注信息">
  131. </u-form-item>
  132. <u-form-item>
  133. <textarea class='textarea' v-model="list.remarks" input-align="right" placeholder="" disabled />
  134. </u-form-item>
  135. <u-form-item label-width='120' label="附件">
  136. <view class="form_top">共{{imglist.length}}个附件</view>
  137. <view v-if='imglist.length>0'>
  138. <view style="justify-content: space-between;" class='flex' v-for='item in imglist'>
  139. <view class="img_item">
  140. <view class="" style="width: 16%;">
  141. <image
  142. v-if="item.type == 'pdf'"
  143. class="imgsign" src="../../../static/img/oa_office/pdf3.png"
  144. mode=""></image>
  145. <image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
  146. class="imgsign" src="../../../static/img/oa_office/excle3.png"
  147. mode=""></image>
  148. <image v-else-if="item.type == 'doc'||item.type == 'docx'"
  149. class="imgsign" src="../../../static/img/oa_office/word3.png"
  150. mode=""></image>
  151. <image v-else class="imgsign" :src="item.appendixPath" mode="">
  152. </image>
  153. </view>
  154. <view class="" style="width: 70%;">
  155. <view class="char_css">{{item.appendixName}}</view>
  156. <u-line-progress v-if='item.progressstatus' :striped="true" :percent="item.progress" :striped-active="true"></u-line-progress>
  157. <view class="img_size">{{item.appendixSize}}</view>
  158. </view>
  159. <view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
  160. 下载
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </u-form-item>
  166. </u-form>
  167. <u-form style='margin-top:10px;' ref="uForm">
  168. <view class="form_top">流程</view>
  169. <view class="content2">
  170. <view v-for="(item,index) in auditList" :key='index' class="audit">
  171. <view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
  172. <view class="left">
  173. <view class="item1">
  174. <view class="item-content">{{item.operatorTitle}}</view>
  175. <view v-if="item.status=='success'" class='status success'>
  176. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  177. </view>
  178. <view v-if="item.status=='error'" class='status error'>
  179. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  180. </view>
  181. <view v-if="item.status=='question'" class='status question'>
  182. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  183. </view>
  184. </view>
  185. </view>
  186. <view class="right">
  187. <view class="right-item">
  188. <view class="item2">
  189. <view class="name">{{item.desc}}
  190. </view>
  191. <!-- <view class='time'>{{item.updateDate}}</view> -->
  192. <view v-if="item.status=='success'" class="status success">
  193. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  194. v-if='!item.commonStaffs1&&index!=0'>已审核</text>
  195. </view>
  196. <view v-if="item.status=='error'" class="status error">
  197. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  198. v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
  199. </view>
  200. <view v-if="item.status=='question'" class="status question">
  201. {{item.commonStaffs1?item.staffscontent:''}}<text
  202. v-if='!item.commonStaffs1'>未审核</text>
  203. </view>
  204. <!-- <view class="status success">吕波(已审核)</view> -->
  205. </view>
  206. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
  207. class='time'>
  208. {{item.updateDate}}
  209. </view>
  210. </view>
  211. <view v-if='item.auditMind' class="right-content">
  212. {{item.auditMind}}
  213. </view>
  214. </view>
  215. <view v-if='item.commonStaffs1' class="right">
  216. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
  217. </u-icon>
  218. </view>
  219. </view>
  220. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  221. <view class='row2'>
  222. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  223. <view class="item-content">
  224. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  225. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  226. </view>
  227. <view class="name">{{item1.staffName}}</view>
  228. </view>
  229. </view>
  230. </view>
  231. <view class="row-line" v-if="index!= auditList.length - 1&&item.desc!='_PLACEHOLDER_'"></view>
  232. </view>
  233. </view>
  234. </u-form>
  235. <view style='padding:10px;' class='flex bottom-btn'>
  236. <u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
  237. 驳回
  238. </u-button>
  239. <u-button v-if='list.approveStatus||isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
  240. </view>
  241. <view v-if='show' class="shade">
  242. <view class="wrap">
  243. <view class="alert-top">
  244. <view class="title">
  245. {{title}}
  246. </view>
  247. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  248. </view>
  249. <view class="u-textarea-style">
  250. <view class="right-bottom">
  251. {{auditMind.length}}/100个字
  252. </view>
  253. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  254. maxlength="100" />
  255. </view>
  256. <view @click='close()' class="cancel">取消</view>
  257. <view @click='passSubmit()' class="confirm">确定</view>
  258. </view>
  259. </view>
  260. <view @click='imgShow=false' v-if="imgShow" class="shade">
  261. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  262. </view>
  263. </view>
  264. </template>
  265. <script>
  266. import upload from '@/components/upload.vue';
  267. import helper from '@/common/helper.js';
  268. export default {
  269. components: {
  270. upload
  271. },
  272. data() {
  273. return {
  274. isSHowBtn: true,
  275. id: "",
  276. currentPage: 1,
  277. pageSize: 10,
  278. list: {
  279. status: "",
  280. contractGoodsInfo: {},
  281. contractProcessInfo: {}
  282. },
  283. imglist: [],
  284. auditMind: '',
  285. show: false,
  286. title: '',
  287. contractNo: "",
  288. action: this.$uploadUrl,
  289. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  290. isAdd: true,
  291. imgShow: false,
  292. url: "",
  293. auditList:[],
  294. everyCheck: ''
  295. }
  296. },
  297. onBackPress(e) {
  298. if(this.everyCheck){
  299. uni.navigateTo({
  300. url: "/pages/task/my_task"
  301. })
  302. return true;
  303. }
  304. },
  305. onLoad(options) {
  306. this.id = options.id
  307. this.getList()
  308. this.everyCheck = uni.getStorageSync("everyTask")
  309. this.isSHowBtn = options.isShowbtn
  310. },
  311. methods: {
  312. openDocument(item) {
  313. this.$set(item,'progressstatus',true)
  314. this.$forceUpdate()
  315. const downloadTask =uni.downloadFile({
  316. url: item.appendixPath,
  317. success: function(res) {
  318. var filePath = res.tempFilePath;
  319. if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
  320. uni.openDocument({
  321. filePath: filePath,
  322. showMenu: true,
  323. success: function(res) {
  324. console.log('打开文档成功');
  325. }
  326. });
  327. }else{
  328. uni.previewImage({
  329. current: 0, //预览图片的下标
  330. urls: [item.appendixPath]
  331. })
  332. }
  333. }
  334. });
  335. downloadTask.onProgressUpdate((res) => {
  336. this.$set(item,'progress',res.progress)
  337. this.$forceUpdate()
  338. console.log('下载进度' + res.progress);
  339. console.log('已经下载的数据长度' + res.totalBytesWritten);
  340. console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
  341. // 满足测试条件,取消下载任务。
  342. // if (res.progress > 50) {
  343. // downloadTask.abort();
  344. // }
  345. });
  346. },
  347. shadeshow(url) {
  348. this.imgShow = true
  349. this.url = url
  350. },
  351. getList(id) {
  352. var that = this
  353. this.$api.doRequest('get', '/contractManagementInfo/getInfo', {
  354. id: this.id
  355. }).then(res => {
  356. if (res.data.code == 200) {
  357. this.list = res.data.data
  358. if (this.list.deliverType == 1) {
  359. this.list.deliverType1 = '我方自提'
  360. } else if (this.list.deliverType == 2) {
  361. this.list.deliverType1 = '对方送货'
  362. }
  363. this.$api.doRequest('get', '/appendix/query/getFileList', {
  364. appendixIds: that.list.addressUrl
  365. }).then(res1 => {
  366. that.imglist=res1.data.data
  367. for (let i = 0; i < that.imglist.length; i++) {//获取后缀
  368. that.imglist[i].progressstatus=false
  369. that.imglist[i].progress=0
  370. if (that.imglist[i].appendixName) {
  371. let index = that.imglist[i].appendixName.lastIndexOf(".")
  372. that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
  373. }
  374. }
  375. })
  376. // 审核流程
  377. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  378. businessCode: 'DAICHU-CONTRACT-APPROVE',
  379. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  380. }).then(res1 => {
  381. this.$api.doRequest('get', '/commonUser/getHis', {
  382. workflowId: res1.data.data[0].id,
  383. businessKey: this.id,
  384. // branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
  385. }).then(response => {
  386. uni.hideLoading()
  387. for (let i = 0; i < response.data.data.length; i++) {
  388. this.$set(response.data.data[i], 'status', 'question')
  389. // console.log(response.data.data[i].workflowHistoricTasks,i)
  390. if (response.data.data[i].commonStaffs) {
  391. response.data.data[i].showflow = false
  392. response.data.data[i].operatorTitle = response.data.data[i]
  393. .desc.substring(0, 2)
  394. response.data.data[i].operatorName = response.data.data[i]
  395. .desc
  396. response.data.data[i].staffscontent = '共' + response.data
  397. .data[i].commonStaffs.length + '人,当前审核' + response.data
  398. .data[i].workflowHistoricTasks.length + '人'
  399. if (response.data.data[i].workflowHistoricTasks && response
  400. .data.data[i].workflowHistoricTasks.length > 0) {
  401. if (response.data.data[i].workflowHistoricTasks
  402. .length != response.data.data[i].commonStaffs
  403. .length) {
  404. // response.data.data[i].status='question'
  405. this.$set(response.data.data[i], 'status',
  406. 'question')
  407. } else {
  408. this.$set(response.data.data[i], 'status',
  409. 'success')
  410. // response.data.data[i].status='success'
  411. }
  412. response.data.data[i].workflowlen = response.data.data[
  413. i].workflowHistoricTasks.length
  414. var workflowdata = response.data.data[i]
  415. .workflowHistoricTasks
  416. var staffsdata = response.data.data[i].commonStaffs
  417. for (let q = 0; q < staffsdata.length; q++) {
  418. staffsdata[q].status = false
  419. staffsdata[q].staffTitle = staffsdata[q].staffName
  420. for (let k = 0; k < workflowdata.length; k++) {
  421. if (staffsdata[q].staffId == workflowdata[k]
  422. .operatorId) {
  423. staffsdata[q].status = true
  424. }
  425. }
  426. }
  427. }
  428. response.data.data[i].commonStaffs1 = response.data.data[i]
  429. .commonStaffs
  430. } else {
  431. if (response.data.data[i].workflowHistoricTasks && response
  432. .data.data[i].workflowHistoricTasks.length > 0) {
  433. var len = response.data.data[i].workflowHistoricTasks
  434. .length - 1
  435. if (response.data.data[i].workflowHistoricTasks[len]
  436. .approved) {
  437. this.$set(response.data.data[i], 'status',
  438. 'success')
  439. } else {
  440. this.$set(response.data.data[i], 'status', 'error')
  441. }
  442. response.data.data[i].operatorTitle = response.data
  443. .data[i].workflowHistoricTasks[len].operatorName
  444. .substring(response.data.data[i]
  445. .workflowHistoricTasks[0].operatorName.length -
  446. 2)
  447. response.data.data[i].operatorName = response.data
  448. .data[i].workflowHistoricTasks[len].operatorName
  449. var time = new Date(response.data.data[i]
  450. .workflowHistoricTasks[len].claimTime)
  451. .getTime()
  452. response.data.data[i].updateDate = this.$u.timeFormat(
  453. time, 'mm.dd hh:MM')
  454. response.data.data[i].auditMind = response.data.data[i]
  455. .workflowHistoricTasks[len].auditMind
  456. } else {
  457. this.$set(response.data.data[i], 'status', 'question')
  458. // response.data.data[i].status='question'
  459. if (response.data.data[i].desc == '总经理助理审核') {
  460. response.data.data[i].operatorTitle = '总助'
  461. } else if (response.data.data[i].desc == '杜大光审核') {
  462. response.data.data[i].operatorTitle = '大光'
  463. } else {
  464. response.data.data[i].operatorTitle = response.data
  465. .data[i].desc.substring(0, 2)
  466. }
  467. response.data.data[i].operatorName = response.data
  468. .data[i].desc
  469. var time1 = new Date(response.data.data[i].updateDate)
  470. .getTime()
  471. response.data.data[i].updateDate = this.$u.timeFormat(
  472. time1, 'mm.dd hh:MM')
  473. response.data.data[i].auditMind = ''
  474. }
  475. }
  476. }
  477. console.log(response.data.data)
  478. for(let i = 0 ;i<response.data.data.length;i++){
  479. if(response.data.data[i].status == "error"){
  480. this.auditCheck = "error"
  481. break;
  482. }else if(response.data.data[i].status == "question"){
  483. this.auditCheck = "question"
  484. break;
  485. }else{
  486. this.auditCheck = "success"
  487. }
  488. }
  489. this.auditList = response.data.data
  490. var time2 = new Date(this.list.createDate).getTime()
  491. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  492. this.auditList.unshift({
  493. operatorTitle: this.list.creater.substring(0, 2),
  494. operatorName: this.list.creater,
  495. updateDate: time3,
  496. auditMind: '',
  497. desc: '发起申请',
  498. showflow: false,
  499. commonStaffs1: null,
  500. commonStaffs: null,
  501. workflowHistoricTasks: [],
  502. status: 'success'
  503. })
  504. })
  505. })
  506. }
  507. })
  508. },
  509. filterFileType(index, lists) {
  510. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  511. lists.splice(index, 1);
  512. // 当前文件不支持
  513. uni.showModal({
  514. title: '暂不支持当前图片类型',
  515. showCancel: false
  516. });
  517. } else {
  518. this.isAdd = false;
  519. }
  520. },
  521. //驳回
  522. rejectSubmit() {
  523. uni.showLoading({
  524. title: '加载中',
  525. mask: true
  526. });
  527. var that = this
  528. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  529. taskId: that.list.taskId,
  530. approved: false,
  531. auditMind: this.auditMind,
  532. needReapply: true,
  533. }).then(res => {
  534. that.$api.msg('驳回成功')
  535. that.show = false
  536. setTimeout(function() {
  537. if (that.everyCheck) {
  538. helper.setAudit(that.list)
  539. } else {
  540. uni.navigateBack()
  541. }
  542. uni.hideLoading()
  543. }, 1000);
  544. })
  545. },
  546. close() {
  547. this.show = false
  548. },
  549. pass() {
  550. this.show = true
  551. this.title = '审核意见(通过)'
  552. },
  553. reject() {
  554. this.show = true
  555. this.title = '驳回原因(驳回)'
  556. },
  557. //通过
  558. passSubmit() {
  559. var that = this
  560. if (this.title == '驳回原因(驳回)') {
  561. this.rejectSubmit()
  562. } else {
  563. uni.showLoading({
  564. title: '加载中',
  565. mask: true
  566. });
  567. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  568. taskId: that.list.taskId,
  569. approved: true,
  570. auditMind: this.auditMind,
  571. needReapply: true,
  572. }).then(res => {
  573. that.$api.msg('通过成功')
  574. that.show = false
  575. setTimeout(function() {
  576. if (that.everyCheck) {
  577. helper.setAudit(that.list)
  578. } else {
  579. uni.navigateBack()
  580. }
  581. uni.hideLoading()
  582. }, 1000);
  583. })
  584. }
  585. },
  586. //审核方法
  587. audit(item, index, status, status2, reason) {
  588. if (index < this.list.length) {
  589. this.$api.doRequest('post', '/newWorkflow/api/handle', {
  590. taskId: item.taskId,
  591. approved: status,
  592. auditMind: reason != undefined ? '已驳回' : '34',
  593. needReapply: status2 != undefined ? true : false,
  594. }).then(res => {
  595. this.audit(this.list[index + 1], index + 1, status)
  596. })
  597. } else {
  598. if (status == true) {
  599. that.$api.msg('通过成功')
  600. this.getList()
  601. } else if (status == false) {
  602. that.$api.msg('驳回成功')
  603. this.getList()
  604. }
  605. }
  606. },
  607. }
  608. }
  609. </script>
  610. <style scoped lang="scss">
  611. .container {
  612. padding: 20rpx 20rpx 250rpx 20rpx;
  613. }
  614. .u-form {
  615. background: #fff;
  616. border-radius: 10px;
  617. padding: 0 10px;
  618. .u-form-item {
  619. line-height: 30px;
  620. padding: 5px 0;
  621. }
  622. }
  623. .content {
  624. margin-top: 30rpx;
  625. .top {
  626. display: flex;
  627. justify-content: space-between;
  628. }
  629. .content-item {
  630. border-radius: 20rpx;
  631. background: white;
  632. padding: 40rpx 20rpx;
  633. margin-bottom: 30rpx;
  634. }
  635. .title {
  636. font-size: 32rpx;
  637. font-weight: 600;
  638. color: #333333;
  639. text-align: left;
  640. margin: 20rpx 0;
  641. }
  642. .car-container {
  643. border-bottom: 2rpx solid #EEEEEE;
  644. }
  645. .car-type-item {
  646. font-size: 28rpx;
  647. margin: 20rpx 0;
  648. color: #878C9C;
  649. }
  650. .weightInfoCss {
  651. font-size: 28rpx;
  652. color: #333333;
  653. font-weight: 500;
  654. }
  655. .row {
  656. display: flex;
  657. justify-content: space-between;
  658. // .right,
  659. // input {
  660. // font-size: 28rpx;
  661. // // color: #333333;
  662. // }
  663. }
  664. .money {
  665. font-size: 32rpx;
  666. font-weight: 500;
  667. margin-bottom: 30rpx;
  668. }
  669. .moneyInfo {
  670. color: #22C572;
  671. font-size: 32rpx;
  672. }
  673. }
  674. .bottom-btn {
  675. width: 100%;
  676. position: fixed;
  677. bottom: 0;
  678. display: flex;
  679. z-index: 2;
  680. left: 0;
  681. background-color: #f8f8f8;
  682. flex-direction: column;
  683. .btn1,
  684. .btn2 {
  685. width: 100%;
  686. margin-bottom: 26rpx;
  687. border-radius: 90rpx;
  688. }
  689. .btn1 {
  690. background: white;
  691. color: #00C265;
  692. }
  693. }
  694. .topInfo {
  695. height: 210rpx;
  696. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  697. padding: 30rpx;
  698. .topInfo-item {
  699. height: 150rpx;
  700. background-color: #FFFFFF;
  701. border-radius: 20rpx;
  702. padding: 40rpx;
  703. .logo {
  704. width: 40rpx;
  705. height: 40rpx;
  706. margin-top: 8rpx;
  707. }
  708. .infoText {
  709. font-size: 36rpx;
  710. font-weight: 600;
  711. margin-left: 20rpx;
  712. }
  713. .infoData {
  714. color: #878C9C;
  715. font-size: 26rpx;
  716. margin-top: 10rpx;
  717. }
  718. }
  719. }
  720. .shade {
  721. position: fixed;
  722. top: 0;
  723. left: 0;
  724. height: 100%;
  725. width: 100%;
  726. background: rgba(0, 0, 0, 0.4);
  727. z-index: 3;
  728. .wrap {
  729. position: absolute;
  730. left: 0;
  731. top: 0;
  732. right: 0;
  733. bottom: 0;
  734. margin: auto;
  735. background: #fff;
  736. width: calc(100% - 198rpx);
  737. height: 700rpx;
  738. border-radius: 20rpx;
  739. .alert-top {
  740. padding: 33rpx;
  741. display: flex;
  742. justify-content: center;
  743. align-items: center;
  744. position: relative;
  745. }
  746. .title {
  747. font-size: 32rpx;
  748. font-weight: 600;
  749. color: #333333;
  750. }
  751. .close {
  752. position: absolute;
  753. right: 33rpx;
  754. }
  755. }
  756. }
  757. .cancel,
  758. .confirm {
  759. position: absolute;
  760. display: inline-block;
  761. width: 50%;
  762. text-align: center;
  763. bottom: 0;
  764. padding: 10px;
  765. border-top: 1px solid #eee;
  766. font-size: 34rpx;
  767. }
  768. .cancel {
  769. left: 0;
  770. border-right: 1px solid #eee;
  771. color: #AFB3BF;
  772. }
  773. .confirm {
  774. right: 0;
  775. color: #22C572;
  776. }
  777. .textCss {
  778. display: flex;
  779. justify-content: flex-end;
  780. width: 100%;
  781. text-align: right;
  782. }
  783. .textarea {
  784. margin: 20px auto;
  785. width: 100%;
  786. background: #F9F9FA;
  787. border-radius: 10px;
  788. border: 1px solid #EEEEEE;
  789. font-size: 28rpx;
  790. padding: 10px;
  791. }
  792. /deep/.u-form-item--right__content__slot{
  793. flex-wrap: wrap;
  794. }
  795. .u-textarea-style {
  796. margin: 20rpx;
  797. background: #F9F9FA;
  798. border-radius: 10px;
  799. border: 1px solid #EEEEEE;
  800. padding: 10rpx 20rpx;
  801. position: relative;
  802. .right-bottom {
  803. position: absolute;
  804. right: 20rpx;
  805. bottom: 20rpx;
  806. color: #AFB3BF;
  807. }
  808. }
  809. .img_item {
  810. display: flex;
  811. width: 100%;
  812. margin: 10px 0;
  813. padding: 0 10rpx;
  814. .imgsign{
  815. width: 25px;
  816. height: 25px;
  817. margin-top: 6px;
  818. }
  819. .char_css {
  820. font-size: 28rpx;
  821. font-weight: 600;
  822. display: -webkit-box;
  823. overflow: hidden;
  824. /*! autoprefixer: off; */
  825. -webkit-box-orient: vertical;
  826. -webkit-line-clamp: 1;
  827. -webkit-box-orient: vertical;
  828. text-overflow: ellipsis;
  829. word-break: break-all;
  830. }
  831. .img_size{
  832. color: #B0B3BF;
  833. font-size: 12px;
  834. margin-top: 5px;
  835. }
  836. .img_dowload {
  837. width: 16%;
  838. color: #22C572;
  839. text-align: right;
  840. }
  841. }
  842. .content2 {
  843. background: white;
  844. margin: 20rpx 0;
  845. border-radius: 20rpx;
  846. padding: 20rpx;
  847. .row {
  848. display: flex;
  849. .left {
  850. display: flex;
  851. align-items: center;
  852. .item1 {
  853. position: relative;
  854. .item-content {
  855. background: #617AE0;
  856. width: 44px;
  857. height: 44px;
  858. border-radius: 22px;
  859. line-height: 44px;
  860. text-align: center;
  861. font-size: 15px;
  862. color: #fff;
  863. }
  864. .status {
  865. position: absolute;
  866. border-radius: 50%;
  867. padding: 0px 2px;
  868. right: -3px;
  869. bottom: -3px;
  870. background: #fff;
  871. }
  872. .status.success {
  873. border: 1px solid rgb(60, 156, 255);
  874. }
  875. .status.error {
  876. border: 1px solid rgb(245, 108, 108);
  877. }
  878. .status.question {
  879. border: 1px solid #f9ae3d;
  880. }
  881. }
  882. }
  883. .right {
  884. width: 80%;
  885. // color: #B0B1B5;
  886. margin-top: 10px;
  887. .right-content {
  888. background: #F2F3F7;
  889. margin-left: 10px;
  890. margin-top: 10px;
  891. padding: 10px;
  892. border-radius: 5px;
  893. color: #B0B1B5;
  894. }
  895. .right-item {
  896. display: flex;
  897. justify-content: space-between;
  898. .time {
  899. color: #999;
  900. }
  901. .item2 {
  902. margin-left: 20rpx;
  903. margin-top: -7px;
  904. .name {
  905. font-size: 28rpx;
  906. font-weight: 800;
  907. margin-bottom: 4px;
  908. }
  909. .status.success {
  910. color: #6CC48C;
  911. }
  912. .status.error {
  913. color: rgb(245, 108, 108);
  914. }
  915. .status.question {
  916. color: #f9ae3d;
  917. }
  918. }
  919. }
  920. }
  921. }
  922. .row2 {
  923. display: flex;
  924. .item-content {
  925. background: #22C572;
  926. width: 30px;
  927. height: 30px;
  928. border-radius: 50%;
  929. line-height: 30px;
  930. text-align: center;
  931. font-size: 12px;
  932. color: #fff;
  933. padding: 0 2px;
  934. margin: 0 auto;
  935. }
  936. .status {
  937. position: absolute;
  938. top: 0;
  939. right: 0;
  940. }
  941. }
  942. .row-line {
  943. width: 1px;
  944. height: 30px;
  945. background: #F2F2F2;
  946. margin: 10rpx 50rpx;
  947. }
  948. .audit {
  949. margin-top: 20rpx;
  950. }
  951. }
  952. </style>