salecontract.vue 38 KB

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