purchasecontract.vue 38 KB

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