acquisitioncontract.vue 33 KB

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