salecontract.vue 34 KB

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