acquisitioncontract.vue 37 KB

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