acquisitioncontract.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309
  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="content">
  310. <view class="u-textarea-style">
  311. <view class="right-bottom">
  312. {{auditMind.length}}/1000个字
  313. </view>
  314. <!-- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  315. maxlength="100" /> -->
  316. <textarea maxlength="1000" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
  317. </view>
  318. <view class="upload_css">
  319. 上传附件
  320. <!-- <upload class="upload" :width="150" ref="upload" :form-data="{companyId: pcUserInfo.compId,
  321. modelId: '',
  322. vesselId: ''}" :action="action" :max-size="maxSize" :max-count="99"
  323. :size-type="['compressed']" @on-success="getImgUrl" @on-error="onError" @on-remove="onRemove"
  324. @on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
  325. -->
  326. <u-upload :custom-btn='true' class="upload" ref="upload" name='fileName' :form-data="{companyId: pcUserInfo.compId,
  327. modelId: '',
  328. vesselId: ''}" :action="action" :show-tips="false" :max-size="maxSize" :max-count="9"
  329. :size-type="['compressed']" @on-success="getImgUrl($event)" @on-error="onError"
  330. @on-remove="onRemove" @on-uploaded="isAdd = true" :limitType ="['png', 'jpg', 'jpeg', 'webp', 'gif']"
  331. @on-progress="onProgress">
  332. <view slot="addBtn" class="slot-btn u-list-item" hover-class="slot-btn__hover" hover-stay-time="150">
  333. <image style="width:23px;height:23px;" src="../../../static/img/liangmai/xiangji-2.png" mode=""></image>
  334. <view>选择图片</view>
  335. </view>
  336. </u-upload>
  337. </view>
  338. </view>
  339. <view class="audit_btn">
  340. <view @click='close()' class="cancel">取消</view>
  341. <view @click='passSubmit()' class="confirm">确定</view>
  342. </view>
  343. </view>
  344. </view>
  345. <view @click='imgShow=false' v-if="imgShow" class="shade">
  346. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  347. </view>
  348. </view>
  349. </template>
  350. <script>
  351. import upload from '@/components/upload.vue';
  352. import helper from '@/common/helper.js';
  353. export default {
  354. components: {
  355. upload
  356. },
  357. data() {
  358. return {
  359. isSHowBtn: true,
  360. id: "",
  361. currentPage: 1,
  362. pageSize: 10,
  363. auditList: [],
  364. showflow: false,
  365. list: {
  366. status: "",
  367. contractGoodsInfo: {},
  368. contractProcessInfo: {}
  369. },
  370. imglist: [],
  371. auditMind: '',
  372. src: '../../../static/img/myimg/LiangShang@2x.png',
  373. show: false,
  374. title: '',
  375. contractNo: "",
  376. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  377. isAdd: true,
  378. imgShow: false,
  379. url: "",
  380. everyCheck: '',
  381. auditCheck:"question",//判断审核是否通过
  382. // 上传附件、
  383. action: this.$uploadUrl,
  384. pcUserInfo :uni.getStorageSync('pcUserInfo'),
  385. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  386. isAdd: true,
  387. fileUrl: []
  388. }
  389. },
  390. onBackPress(e) {
  391. if (this.everyCheck) {
  392. uni.navigateTo({
  393. url: "/pages/task/my_task"
  394. })
  395. return true;
  396. }
  397. },
  398. onLoad(options) {
  399. this.id = options.id
  400. this.everyCheck = uni.getStorageSync("everyTask")
  401. this.isSHowBtn = options.isShowbtn
  402. },
  403. onShow() {
  404. this.getList()
  405. },
  406. methods: {
  407. auditFile(src) {
  408. uni.downloadFile({
  409. url: src,
  410. success: function(res) {
  411. var filePath = res.tempFilePath;
  412. uni.openDocument({
  413. filePath: filePath,
  414. showMenu: true,
  415. success: function(res) {
  416. console.log('打开文档成功');
  417. }
  418. });
  419. }
  420. });
  421. },
  422. getImgUrl(res) {
  423. this.fileUrl.push(res.data.appendixPath)
  424. },
  425. onError(error) {
  426. alert(error)
  427. console.log('------------error-----------')
  428. console.log(error)
  429. },
  430. onProgress(e) {
  431. console.log(e)
  432. },
  433. onRemove(index) {
  434. this.fileUrl.splice(index, 1)
  435. },
  436. openDocument(item) {
  437. this.$set(item,'progressstatus',true)
  438. this.$forceUpdate()
  439. const downloadTask =uni.downloadFile({
  440. url: item.appendixPath,
  441. success: function(res) {
  442. var filePath = res.tempFilePath;
  443. if(item.type=='pdf'||item.type == 'xls'||item.type == 'xlsx'||item.type == 'doc'||item.type == 'docx'){
  444. uni.openDocument({
  445. filePath: filePath,
  446. showMenu: true,
  447. success: function(res) {
  448. console.log('打开文档成功');
  449. }
  450. });
  451. }else{
  452. uni.previewImage({
  453. current: 0, //预览图片的下标
  454. urls: [item.appendixPath]
  455. })
  456. }
  457. }
  458. });
  459. downloadTask.onProgressUpdate((res) => {
  460. this.$set(item,'progress',res.progress)
  461. this.$forceUpdate()
  462. console.log('下载进度' + res.progress);
  463. console.log('已经下载的数据长度' + res.totalBytesWritten);
  464. console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
  465. // 满足测试条件,取消下载任务。
  466. // if (res.progress > 50) {
  467. // downloadTask.abort();
  468. // }
  469. });
  470. },
  471. shadeshow(url) {
  472. this.imgShow = true
  473. this.url = url
  474. },
  475. showcontent(item) {
  476. item.showflow = !item.showflow
  477. },
  478. getList(id) {
  479. uni.showLoading({
  480. title: '加载中',
  481. mask: true
  482. })
  483. var that = this
  484. this.$api.doRequest('get', '/contractManagementInfo/getInfo', {
  485. id: this.id
  486. }).then(res => {
  487. if (res.data.code == 200) {
  488. this.list = res.data.data
  489. if (this.list.deliverType == 1) {
  490. this.list.deliverType1 = '我方自提'
  491. } else if (this.list.deliverType == 2) {
  492. this.list.deliverType1 = '对方送货'
  493. } else if (this.list.deliverType == 3) {
  494. this.list.deliverType1 = '对方送货(临时库)'
  495. }
  496. // 查合同附件
  497. this.$api.doRequest('get', '/appendix/query/getFileList', {
  498. appendixIds: that.list.addressUrl
  499. }).then(res1 => {
  500. that.imglist = res1.data.data
  501. for (let i = 0; i < that.imglist.length; i++) {//获取后缀
  502. that.imglist[i].progressstatus=false
  503. that.imglist[i].progress=0
  504. if (that.imglist[i].appendixName) {
  505. let index = that.imglist[i].appendixName.lastIndexOf(".")
  506. that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
  507. }
  508. }
  509. // 查流程
  510. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  511. businessCode: 'SHOU-CONTRACT-APPROVE',
  512. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  513. }).then(res1 => {
  514. this.$api.doRequest('get', '/commonUser/getHis', {
  515. workflowId: res1.data.data[0].id,
  516. businessKey: this.id,
  517. branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
  518. }).then(response => {
  519. uni.hideLoading()
  520. for (let i = 0; i < response.data.data.length; i++) {
  521. this.$set(response.data.data[i], 'status', 'question')
  522. console.log(response.data.data[i].workflowHistoricTasks, i)
  523. if (response.data.data[i].commonStaffs) {
  524. response.data.data[i].showflow = false
  525. response.data.data[i].operatorTitle = response.data.data[i]
  526. .desc.substring(0, 2)
  527. response.data.data[i].operatorName = response.data.data[i]
  528. .desc
  529. response.data.data[i].staffscontent = '共' + response.data
  530. .data[i].commonStaffs.length + '人,当前审核' + response.data
  531. .data[i].workflowHistoricTasks.length + '人'
  532. if (response.data.data[i].workflowHistoricTasks && response
  533. .data.data[i].workflowHistoricTasks.length > 0) {
  534. if (response.data.data[i].workflowHistoricTasks
  535. .length != response.data.data[i].commonStaffs
  536. .length) {
  537. // response.data.data[i].status='question'
  538. this.$set(response.data.data[i], 'status',
  539. 'question')
  540. } else {
  541. this.$set(response.data.data[i], 'status',
  542. 'success')
  543. // response.data.data[i].status='success'
  544. }
  545. response.data.data[i].workflowlen = response.data.data[
  546. i].workflowHistoricTasks.length
  547. var workflowdata = response.data.data[i]
  548. .workflowHistoricTasks
  549. var staffsdata = response.data.data[i].commonStaffs
  550. for (let q = 0; q < staffsdata.length; q++) {
  551. staffsdata[q].status = false
  552. staffsdata[q].staffTitle = staffsdata[q].staffName
  553. for (let k = 0; k < workflowdata.length; k++) {
  554. if (staffsdata[q].staffId == workflowdata[k]
  555. .operatorId) {
  556. staffsdata[q].status = true
  557. }
  558. }
  559. }
  560. }
  561. response.data.data[i].commonStaffs1 = response.data.data[i]
  562. .commonStaffs
  563. } else {
  564. if (response.data.data[i].workflowHistoricTasks && response
  565. .data.data[i].workflowHistoricTasks.length > 0) {
  566. var len = response.data.data[i].workflowHistoricTasks
  567. .length - 1
  568. if (response.data.data[i].workflowHistoricTasks[len]
  569. .approved) {
  570. this.$set(response.data.data[i], 'status',
  571. 'success')
  572. } else {
  573. this.$set(response.data.data[i], 'status', 'error')
  574. }
  575. response.data.data[i].operatorTitle = response.data
  576. .data[i].workflowHistoricTasks[len].operatorName
  577. .substring(response.data.data[i]
  578. .workflowHistoricTasks[0].operatorName.length -
  579. 2)
  580. response.data.data[i].operatorName = response.data
  581. .data[i].workflowHistoricTasks[len].operatorName
  582. var time = new Date(response.data.data[i]
  583. .workflowHistoricTasks[len].claimTime)
  584. .getTime()
  585. response.data.data[i].updateDate = this.$u.timeFormat(
  586. time, 'mm.dd hh:MM')
  587. // response.data.data[i].auditMind = response.data.data[i]
  588. // .workflowHistoricTasks[len].auditMind
  589. // 显示附件和审核意见
  590. if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
  591. response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
  592. response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
  593. }else{
  594. response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
  595. }
  596. } else {
  597. this.$set(response.data.data[i], 'status', 'question')
  598. // response.data.data[i].status='question'
  599. if (response.data.data[i].desc == '总经理助理审核') {
  600. response.data.data[i].operatorTitle = '总助'
  601. } else if (response.data.data[i].desc == '杜大光审核') {
  602. response.data.data[i].operatorTitle = '大光'
  603. } else {
  604. response.data.data[i].operatorTitle = response.data
  605. .data[i].desc.substring(0, 2)
  606. }
  607. response.data.data[i].operatorName = response.data
  608. .data[i].desc
  609. var time1 = new Date(response.data.data[i].updateDate)
  610. .getTime()
  611. response.data.data[i].updateDate = this.$u.timeFormat(
  612. time1, 'mm.dd hh:MM')
  613. response.data.data[i].auditMind = ''
  614. }
  615. }
  616. }
  617. console.log(response.data.data)
  618. if(response.data.data.length == 0 ){
  619. this.auditCheck = "success"
  620. }
  621. for(let i = 0 ;i<response.data.data.length;i++){
  622. if(response.data.data[i].status == "error"){
  623. this.auditCheck = "error"
  624. break;
  625. }else if(response.data.data[i].status == "question"){
  626. this.auditCheck = "question"
  627. break;
  628. }else{
  629. this.auditCheck = "success"
  630. }
  631. }
  632. this.auditList = response.data.data
  633. var time2 = new Date(this.list.createDate).getTime()
  634. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  635. this.auditList.unshift({
  636. operatorTitle: this.list.creater.substring(0, 2),
  637. operatorName: this.list.creater,
  638. updateDate: time3,
  639. auditMind: '',
  640. desc: '发起申请',
  641. showflow: false,
  642. commonStaffs1: null,
  643. commonStaffs: null,
  644. workflowHistoricTasks: [],
  645. status: 'success'
  646. })
  647. })
  648. })
  649. })
  650. }
  651. })
  652. },
  653. filterFileType(index, lists) {
  654. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  655. lists.splice(index, 1);
  656. // 当前文件不支持
  657. uni.showModal({
  658. title: '暂不支持当前图片类型',
  659. showCancel: false
  660. });
  661. } else {
  662. this.isAdd = false;
  663. }
  664. },
  665. //驳回
  666. rejectSubmit() {
  667. var that = this
  668. uni.showLoading({
  669. title: '加载中',
  670. mask: true
  671. });
  672. var info = that.auditMind
  673. if (that.fileUrl.length > 0) {
  674. info = that.auditMind + "##" + that.fileUrl.toString()
  675. }
  676. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  677. taskId: that.list.taskId,
  678. approved: false,
  679. auditMind: info?info:"",
  680. needReapply: true,
  681. }).then(res => {
  682. that.$api.msg('驳回成功')
  683. that.show = false
  684. setTimeout(function() {
  685. if (that.everyCheck) {
  686. helper.setAudit(that.list)
  687. } else {
  688. uni.navigateBack()
  689. }
  690. uni.hideLoading()
  691. }, 1000);
  692. })
  693. },
  694. close() {
  695. this.show = false
  696. this.fileUrl = []//清除审核附件
  697. },
  698. pass() {
  699. this.show = true
  700. this.title = '审核意见(通过)'
  701. },
  702. reject() {
  703. this.show = true
  704. this.title = '驳回原因(驳回)'
  705. },
  706. //通过
  707. passSubmit() {
  708. var that = this
  709. if (this.title == '驳回原因(驳回)') {
  710. this.rejectSubmit()
  711. } else {
  712. uni.showLoading({
  713. title: '加载中',
  714. mask: true
  715. });
  716. var info = that.auditMind
  717. if (that.fileUrl.length > 0) {
  718. info = that.auditMind + "##" + that.fileUrl.toString()
  719. }
  720. that.$api.doRequest('post', '/newWorkflow/api/handle', {
  721. taskId: that.list.taskId,
  722. approved: true,
  723. auditMind: info?info:"",
  724. needReapply: true,
  725. }).then(res => {
  726. that.$api.msg('通过成功')
  727. that.show = false
  728. setTimeout(function() {
  729. if (that.everyCheck) {
  730. helper.setAudit(that.list)
  731. } else {
  732. uni.navigateBack()
  733. }
  734. uni.hideLoading()
  735. }, 1000);
  736. })
  737. }
  738. },
  739. //审核方法
  740. audit(item, index, status, status2, reason) {
  741. if (index < this.list.length) {
  742. this.$api.doRequest('post', '/newWorkflow/api/handle', {
  743. taskId: item.taskId,
  744. approved: status,
  745. auditMind: reason != undefined ? '已驳回' : '34',
  746. needReapply: status2 != undefined ? true : false,
  747. }).then(res => {
  748. this.audit(this.list[index + 1], index + 1, status)
  749. })
  750. } else {
  751. if (status == true) {
  752. that.$api.msg('通过成功')
  753. this.getList()
  754. } else if (status == false) {
  755. that.$api.msg('驳回成功')
  756. this.getList()
  757. }
  758. }
  759. },
  760. }
  761. }
  762. </script>
  763. <style scoped lang="scss">
  764. .container {
  765. padding: 20rpx 20rpx 250rpx 20rpx;
  766. }
  767. .u-form {
  768. margin-bottom: 20rpx;
  769. background: #fff;
  770. border-radius: 10px;
  771. padding: 30rpx 10px;
  772. .u-form-item {
  773. line-height: 30px;
  774. padding: 0px 0;
  775. font-size: 26rpx;
  776. color: #878C9C;
  777. }
  778. }
  779. .content {
  780. margin-top: 30rpx;
  781. .top {
  782. display: flex;
  783. justify-content: space-between;
  784. }
  785. .content-item {
  786. border-radius: 20rpx;
  787. background: white;
  788. padding: 40rpx 20rpx;
  789. margin-bottom: 30rpx;
  790. }
  791. .title {
  792. font-size: 32rpx;
  793. font-weight: 600;
  794. color: #333333;
  795. text-align: left;
  796. margin: 20rpx 0;
  797. }
  798. .car-container {
  799. border-bottom: 2rpx solid #EEEEEE;
  800. }
  801. .car-type-item {
  802. font-size: 28rpx;
  803. margin: 20rpx 0;
  804. color: #878C9C;
  805. }
  806. .weightInfoCss {
  807. font-size: 28rpx;
  808. color: #333333;
  809. font-weight: 500;
  810. }
  811. .row {
  812. display: flex;
  813. justify-content: space-between;
  814. // .right,
  815. // input {
  816. // font-size: 28rpx;
  817. // // color: #333333;
  818. // }
  819. }
  820. .money {
  821. font-size: 32rpx;
  822. font-weight: 500;
  823. margin-bottom: 30rpx;
  824. }
  825. .moneyInfo {
  826. color: #22C572;
  827. font-size: 32rpx;
  828. }
  829. }
  830. .bottom-btn {
  831. width: 100%;
  832. position: fixed;
  833. bottom: 0;
  834. display: flex;
  835. z-index: 2;
  836. left: 0;
  837. background-color: #f8f8f8;
  838. flex-direction: column;
  839. .btn1,
  840. .btn2 {
  841. width: 100%;
  842. margin-bottom: 26rpx;
  843. border-radius: 90rpx;
  844. }
  845. .btn1 {
  846. background: white;
  847. color: #00C265;
  848. }
  849. }
  850. .topInfo {
  851. height: 210rpx;
  852. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  853. padding: 30rpx;
  854. .topInfo-item {
  855. height: 150rpx;
  856. background-color: #FFFFFF;
  857. border-radius: 20rpx;
  858. padding: 40rpx;
  859. .logo {
  860. width: 40rpx;
  861. height: 40rpx;
  862. margin-top: 8rpx;
  863. }
  864. .infoText {
  865. font-size: 36rpx;
  866. font-weight: 600;
  867. margin-left: 20rpx;
  868. }
  869. .infoData {
  870. color: #878C9C;
  871. font-size: 26rpx;
  872. margin-top: 10rpx;
  873. }
  874. }
  875. }
  876. .shade {
  877. position: fixed;
  878. top: 0;
  879. left: 0;
  880. height: 100%;
  881. width: 100%;
  882. background: rgba(0, 0, 0, 0.4);
  883. z-index: 3;
  884. overflow-y: scroll;
  885. .wrap {
  886. position: absolute;
  887. left: 0;
  888. top: 0;
  889. right: 0;
  890. bottom: 0;
  891. margin: auto;
  892. background: #fff;
  893. width: calc(100% - 198rpx);
  894. height: 770rpx;
  895. // overflow: hidden;
  896. border-radius: 20rpx;
  897. .content{
  898. height:600rpx;
  899. overflow-y: scroll;
  900. }
  901. .alert-top {
  902. padding: 33rpx;
  903. display: flex;
  904. justify-content: center;
  905. align-items: center;
  906. position: relative;
  907. }
  908. .title {
  909. font-size: 32rpx;
  910. font-weight: 600;
  911. color: #333333;
  912. }
  913. .close {
  914. position: absolute;
  915. right: 33rpx;
  916. }
  917. .upload_css {
  918. margin-left: 20rpx;
  919. .upload {
  920. // width: 80px;
  921. // height: 80px;
  922. }
  923. }
  924. }
  925. }
  926. .audit_btn {
  927. display: flex;
  928. top: 0px;
  929. }
  930. .cancel,
  931. .confirm {
  932. // position: absolute;
  933. // display: inline-block;
  934. width: 50%;
  935. text-align: center;
  936. // bottom: 0;
  937. padding: 10px;
  938. border-top: 1px solid #eee;
  939. font-size: 34rpx;
  940. margin: auto;
  941. }
  942. .cancel {
  943. left: 0;
  944. border-right: 1px solid #eee;
  945. color: #AFB3BF;
  946. }
  947. .confirm {
  948. right: 0;
  949. color: #22C572;
  950. }
  951. .textCss {
  952. display: flex;
  953. justify-content: flex-end;
  954. width: 100%;
  955. text-align: right;
  956. color: #333333;
  957. }
  958. .textarea {
  959. margin: 15rpx auto;
  960. width: 100%;
  961. background: #F9F9FA;
  962. border-radius: 10px;
  963. border: 1px solid #EEEEEE;
  964. font-size: 28rpx;
  965. padding: 10px;
  966. }
  967. .u-textarea-style {
  968. margin: 20rpx;
  969. background: #F9F9FA;
  970. border-radius: 10px;
  971. border: 1px solid #EEEEEE;
  972. padding: 10rpx 20rpx;
  973. position: relative;
  974. height:280rpx;
  975. overflow: scroll;
  976. /deep/.uni-textarea-textarea{
  977. width: 80%;
  978. }
  979. .right-bottom {
  980. position: absolute;
  981. right: 20rpx;
  982. bottom: 20rpx;
  983. color: #AFB3BF;
  984. }
  985. }
  986. .content2 {
  987. background: white;
  988. margin: 20rpx 0;
  989. border-radius: 20rpx;
  990. padding: 20rpx;
  991. .row {
  992. display: flex;
  993. .left {
  994. display: flex;
  995. align-items: center;
  996. .item1 {
  997. position: relative;
  998. .item-content {
  999. background: #617AE0;
  1000. width: 44px;
  1001. height: 44px;
  1002. border-radius: 22px;
  1003. line-height: 44px;
  1004. text-align: center;
  1005. font-size: 15px;
  1006. color: #fff;
  1007. }
  1008. .status {
  1009. position: absolute;
  1010. border-radius: 50%;
  1011. padding: 0px 2px;
  1012. right: -3px;
  1013. bottom: -3px;
  1014. background: #fff;
  1015. }
  1016. .status.success {
  1017. border: 1px solid rgb(60, 156, 255);
  1018. }
  1019. .status.error {
  1020. border: 1px solid rgb(245, 108, 108);
  1021. }
  1022. .status.question {
  1023. border: 1px solid #f9ae3d;
  1024. }
  1025. }
  1026. }
  1027. .right {
  1028. width: 80%;
  1029. // color: #B0B1B5;
  1030. margin-top: 10px;
  1031. .right-content {
  1032. background: #F2F3F7;
  1033. margin-left: 10px;
  1034. margin-top: 10px;
  1035. padding: 10px;
  1036. border-radius: 5px;
  1037. color: #B0B1B5;
  1038. }
  1039. .right-item {
  1040. display: flex;
  1041. justify-content: space-between;
  1042. .time {
  1043. color: #999;
  1044. }
  1045. .item2 {
  1046. margin-left: 20rpx;
  1047. margin-top: -7px;
  1048. .name {
  1049. font-size: 28rpx;
  1050. font-weight: 800;
  1051. margin-bottom: 4px;
  1052. }
  1053. .status.success {
  1054. color: #6CC48C;
  1055. }
  1056. .status.error {
  1057. color: rgb(245, 108, 108);
  1058. }
  1059. .status.question {
  1060. color: #f9ae3d;
  1061. }
  1062. }
  1063. }
  1064. .audit_img {
  1065. flex-wrap: wrap;
  1066. margin: 0 20rpx;
  1067. .url_css {
  1068. // border: 1px solid #999999;
  1069. border-radius: 10px;
  1070. margin-top: 10px;
  1071. margin-right: 10px;
  1072. .url_img {
  1073. width: 66px;
  1074. height: 66px;
  1075. border-radius: 10px;
  1076. }
  1077. }
  1078. }
  1079. }
  1080. }
  1081. .row2 {
  1082. display: flex;
  1083. .item-content {
  1084. background: #22C572;
  1085. width: 30px;
  1086. height: 30px;
  1087. border-radius: 50%;
  1088. line-height: 30px;
  1089. text-align: center;
  1090. font-size: 12px;
  1091. color: #fff;
  1092. padding: 0 2px;
  1093. margin: 0 auto;
  1094. }
  1095. .status {
  1096. position: absolute;
  1097. top: 0;
  1098. right: 0;
  1099. }
  1100. }
  1101. .row-line {
  1102. width: 1px;
  1103. height: 30px;
  1104. background: #F2F2F2;
  1105. margin: 10rpx 50rpx;
  1106. }
  1107. .audit {
  1108. margin-top: 20rpx;
  1109. }
  1110. }
  1111. .form_top {
  1112. border-bottom: 1px solid #F5F6FA;
  1113. padding-bottom: 10px;
  1114. margin-bottom: 18rpx;
  1115. font-size: 30rpx;
  1116. font-weight: 600;
  1117. }
  1118. .form_view{
  1119. margin: 20rpx 0;
  1120. border-radius: 20rpx;
  1121. background: #F9F9FA;
  1122. padding: 30rpx 20rpx;
  1123. margin-top: 30rpx;
  1124. }
  1125. .label_css {
  1126. font-size: 26rpx;
  1127. color: #878C9C;
  1128. }
  1129. .input_css {
  1130. font-size: 20rpx;
  1131. }
  1132. .img_item {
  1133. display: flex;
  1134. width: 100%;
  1135. margin: 10px 0;
  1136. padding: 0 10rpx;
  1137. .imgsign{
  1138. width: 25px;
  1139. height: 25px;
  1140. margin-top: 6px;
  1141. }
  1142. .char_css {
  1143. font-size: 28rpx;
  1144. font-weight: 600;
  1145. display: -webkit-box;
  1146. overflow: hidden;
  1147. /*! autoprefixer: off; */
  1148. -webkit-box-orient: vertical;
  1149. -webkit-line-clamp: 1;
  1150. -webkit-box-orient: vertical;
  1151. text-overflow: ellipsis;
  1152. word-break: break-all;
  1153. }
  1154. .img_size{
  1155. color: #B0B3BF;
  1156. font-size: 12px;
  1157. margin-top: 5px;
  1158. }
  1159. .img_dowload {
  1160. width: 14%;
  1161. color: #22C572;
  1162. text-align: right;
  1163. }
  1164. }
  1165. .headInfo{
  1166. height: 100px;
  1167. background-color: #FFFFFF;
  1168. margin-bottom: 20rpx;
  1169. border-radius: 10px;
  1170. padding: 30rpx 10px;
  1171. display: flex;
  1172. position: relative;
  1173. .headInfo_left{
  1174. width: 10%;
  1175. line-height: 60px;
  1176. text-align: center;
  1177. }
  1178. .headInfo_middle{
  1179. width: 70%;
  1180. padding-left: 10px;
  1181. margin-top: 10px;
  1182. }
  1183. .headInfo_right{
  1184. width: 20%;
  1185. line-height: 60px;
  1186. .char_a{
  1187. color: #22C572;
  1188. }
  1189. .char_b{
  1190. color: #FE6430;
  1191. }
  1192. .char_c{
  1193. color: #FB2323;
  1194. }
  1195. .char_a,.char_b,.char_c{
  1196. font-size: 16px;
  1197. }
  1198. }
  1199. .adopt{
  1200. position: absolute;
  1201. right: 30px;
  1202. top: 60px;
  1203. .adopt_img{
  1204. width: 90px;
  1205. height: 90px;
  1206. }
  1207. }
  1208. .headInfo_title{
  1209. font-size: 19px;
  1210. color: #333333;
  1211. font-weight: 600;
  1212. }
  1213. .headInfo_No{
  1214. color: #878C9C;
  1215. font-size: 13px;
  1216. margin-top: 6px;
  1217. }
  1218. }
  1219. /deep/.u-upload .u-list-item{
  1220. background:#fff;
  1221. border:1px dashed #ccc;
  1222. border-radius:10rpx;
  1223. height:190rpx !important;
  1224. width:190rpx !important;
  1225. margin:10rpx;
  1226. text-align:center;
  1227. display: flex;
  1228. align-items: center;
  1229. justify-content: center;
  1230. flex-direction: column;
  1231. }
  1232. </style>