acquisitioncontract.vue 37 KB

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