acquisitioncontract.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153
  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-if="list.seller">
  34. <u-input v-model="list.seller" input-align="right" placeholder="--" disabled />
  35. </u-form-item>
  36. <u-form-item label-width='260' label="合营方电话" :borderBottom="false" v-if="list.sellerPhone">
  37. <u-input v-model="list.sellerPhone" input-align="right" placeholder="--" disabled />
  38. </u-form-item>
  39. <u-form-item label-width='260' label="交货日期(起 - 止)" :borderBottom="false">
  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-if="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-if="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-if="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-if="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-if="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-if="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-if="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-if="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-if="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-if="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' 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. <view class="img_size">{{item.appendixSize}}</view>
  212. </view>
  213. <view style="color: #22C572;" class="img_dowload" @click="openDocument(item)">
  214. 下载
  215. </view>
  216. </view>
  217. <!-- <u-icon name="attach" ></u-icon> -->
  218. <!-- <image style='width: 200rpx;height: 200rpx;' :src="item" mode=""></image> -->
  219. </view>
  220. </view>
  221. </u-form>
  222. <u-form ref="uForm">
  223. <view class="form_top">流程</view>
  224. <view class="content2">
  225. <view v-for="(item,index) in auditList" :key='index' class="audit">
  226. <view class="row">
  227. <view class="left">
  228. <view class="item1">
  229. <view class="item-content">{{item.operatorTitle}}</view>
  230. <view v-if="item.status=='success'" class='status success'>
  231. <u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
  232. </view>
  233. <view v-if="item.status=='error'" class='status error'>
  234. <u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
  235. </view>
  236. <view v-if="item.status=='question'" class='status question'>
  237. <u-icon name="question" color="#f9ae3d" size="24"></u-icon>
  238. </view>
  239. </view>
  240. </view>
  241. <view class="right">
  242. <view class="right-item">
  243. <view class="item2">
  244. <view class="name">{{item.desc}}
  245. </view>
  246. <!-- <view class='time'>{{item.updateDate}}</view> -->
  247. <view v-if="item.status=='success'" class="status success">
  248. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  249. v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
  250. <view v-if="item.status=='error'" class="status error">
  251. {{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
  252. v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
  253. </view>
  254. <view v-if="item.status=='question'" class="status question">
  255. {{item.commonStaffs1?item.staffscontent:''}}<text
  256. v-if='!item.commonStaffs1'>未审核</text></view>
  257. <!-- <view class="status success">吕波(已审核)</view> -->
  258. </view>
  259. <view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
  260. class='time'>
  261. {{item.updateDate}}
  262. </view>
  263. </view>
  264. <view v-if='item.auditMind' class="right-content">
  265. {{item.auditMind}}
  266. </view>
  267. </view>
  268. <view v-if='item.commonStaffs1' class="right">
  269. <u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
  270. </u-icon>
  271. </view>
  272. </view>
  273. <view v-if='item.showflow' style='padding:10px 0 0 50px;'>
  274. <view class='row2'>
  275. <view v-for='item1 in item.commonStaffs1' style='margin:5px;text-align:center;'>
  276. <view class="item-content">
  277. <u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
  278. <u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
  279. </view>
  280. <view class="name">{{item1.staffName}}</view>
  281. </view>
  282. </view>
  283. </view>
  284. <view class="row-line" v-if="index!= auditList.length - 1"></view>
  285. </view>
  286. </view>
  287. </u-form>
  288. <view v-if='list.taskId' style='padding:10px;' class='flex bottom-btn'>
  289. <u-button v-if='list.approveStatus||isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>
  290. 驳回
  291. </u-button>
  292. <u-button v-if='list.approveStatus||isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
  293. </view>
  294. <view v-if='show' class="shade">
  295. <view class="wrap">
  296. <view class="alert-top">
  297. <view class="title">
  298. {{title}}
  299. </view>
  300. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  301. </view>
  302. <view class="u-textarea-style">
  303. <view class="right-bottom">
  304. {{auditMind.length}}/500个字
  305. </view>
  306. <!-- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  307. maxlength="100" /> -->
  308. <textarea maxlength="500" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
  309. </view>
  310. <view @click='close()' class="cancel">取消</view>
  311. <view @click='passSubmit()' class="confirm">确定</view>
  312. </view>
  313. </view>
  314. <view @click='imgShow=false' v-if="imgShow" class="shade">
  315. <image style='position:absolute;top:0;left:0;right:0;bottom:0;margin:auto;' :src="url" mode=""></image>
  316. </view>
  317. </view>
  318. </template>
  319. <script>
  320. import upload from '@/components/upload.vue';
  321. import helper from '@/common/helper.js';
  322. export default {
  323. components: {
  324. upload
  325. },
  326. data() {
  327. return {
  328. isSHowBtn: true,
  329. id: "",
  330. currentPage: 1,
  331. pageSize: 10,
  332. auditList: [],
  333. showflow: false,
  334. list: {
  335. status: "",
  336. contractGoodsInfo: {},
  337. contractProcessInfo: {}
  338. },
  339. imglist: [],
  340. auditMind: '',
  341. src: '../../../static/img/myimg/LiangShang@2x.png',
  342. show: false,
  343. title: '',
  344. contractNo: "",
  345. action: this.$uploadUrl,
  346. maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  347. isAdd: true,
  348. imgShow: false,
  349. url: "",
  350. everyCheck: '',
  351. auditCheck:"question",//判断审核是否通过
  352. }
  353. },
  354. onBackPress(e) {
  355. if (this.everyCheck) {
  356. uni.navigateTo({
  357. url: "/pages/task/my_task"
  358. })
  359. return true;
  360. }
  361. },
  362. onLoad(options) {
  363. this.id = options.id
  364. this.everyCheck = uni.getStorageSync("everyTask")
  365. this.isSHowBtn = options.isShowbtn
  366. },
  367. onShow() {
  368. this.getList()
  369. },
  370. methods: {
  371. openDocument(src) {
  372. uni.downloadFile({
  373. url: src.appendixPath,
  374. success: function(res) {
  375. var filePath = res.tempFilePath;
  376. uni.openDocument({
  377. filePath: filePath,
  378. showMenu: true,
  379. success: function(res) {
  380. console.log('打开文档成功');
  381. }
  382. });
  383. }
  384. });
  385. },
  386. shadeshow(url) {
  387. this.imgShow = true
  388. this.url = url
  389. },
  390. showcontent(item) {
  391. item.showflow = !item.showflow
  392. },
  393. getList(id) {
  394. uni.showLoading({
  395. title: '加载中',
  396. mask: true
  397. })
  398. var that = this
  399. this.$api.doRequest('get', '/contractManagementInfo/getInfo', {
  400. id: this.id
  401. }).then(res => {
  402. if (res.data.code == 200) {
  403. this.list = res.data.data
  404. if (this.list.deliverType == 1) {
  405. this.list.deliverType1 = '我方自提'
  406. } else if (this.list.deliverType == 2) {
  407. this.list.deliverType1 = '对方送货'
  408. } else if (this.list.deliverType == 3) {
  409. this.list.deliverType1 = '对方送货(临时库)'
  410. }
  411. // 查合同附件
  412. this.$api.doRequest('get', '/appendix/query/getFileList', {
  413. appendixIds: that.list.addressUrl
  414. }).then(res1 => {
  415. that.imglist = res1.data.data
  416. for (let i = 0; i < that.imglist.length; i++) {//获取后缀
  417. if (that.imglist[i].appendixName) {
  418. let index = that.imglist[i].appendixName.lastIndexOf(".")
  419. that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
  420. }
  421. }
  422. })
  423. // 查流程
  424. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  425. businessCode: 'SHOU-CONTRACT-APPROVE',
  426. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  427. }).then(res1 => {
  428. this.$api.doRequest('get', '/commonUser/getHis', {
  429. workflowId: res1.data.data[0].id,
  430. businessKey: this.id
  431. }).then(response => {
  432. uni.hideLoading()
  433. for (let i = 0; i < response.data.data.length; i++) {
  434. this.$set(response.data.data[i], 'status', 'question')
  435. console.log(response.data.data[i].workflowHistoricTasks, i)
  436. if (response.data.data[i].commonStaffs) {
  437. response.data.data[i].showflow = false
  438. response.data.data[i].operatorTitle = response.data.data[i]
  439. .desc.substring(0, 2)
  440. response.data.data[i].operatorName = response.data.data[i]
  441. .desc
  442. response.data.data[i].staffscontent = '共' + response.data
  443. .data[i].commonStaffs.length + '人,当前审核' + response.data
  444. .data[i].workflowHistoricTasks.length + '人'
  445. if (response.data.data[i].workflowHistoricTasks && response
  446. .data.data[i].workflowHistoricTasks.length > 0) {
  447. if (response.data.data[i].workflowHistoricTasks
  448. .length != response.data.data[i].commonStaffs
  449. .length) {
  450. // response.data.data[i].status='question'
  451. this.$set(response.data.data[i], 'status',
  452. 'question')
  453. } else {
  454. this.$set(response.data.data[i], 'status',
  455. 'success')
  456. // response.data.data[i].status='success'
  457. }
  458. response.data.data[i].workflowlen = response.data.data[
  459. i].workflowHistoricTasks.length
  460. var workflowdata = response.data.data[i]
  461. .workflowHistoricTasks
  462. var staffsdata = response.data.data[i].commonStaffs
  463. for (let q = 0; q < staffsdata.length; q++) {
  464. staffsdata[q].status = false
  465. staffsdata[q].staffTitle = staffsdata[q].staffName
  466. for (let k = 0; k < workflowdata.length; k++) {
  467. if (staffsdata[q].staffId == workflowdata[k]
  468. .operatorId) {
  469. staffsdata[q].status = true
  470. }
  471. }
  472. }
  473. }
  474. response.data.data[i].commonStaffs1 = response.data.data[i]
  475. .commonStaffs
  476. } else {
  477. if (response.data.data[i].workflowHistoricTasks && response
  478. .data.data[i].workflowHistoricTasks.length > 0) {
  479. var len = response.data.data[i].workflowHistoricTasks
  480. .length - 1
  481. if (response.data.data[i].workflowHistoricTasks[len]
  482. .approved) {
  483. this.$set(response.data.data[i], 'status',
  484. 'success')
  485. } else {
  486. this.$set(response.data.data[i], 'status', 'error')
  487. }
  488. response.data.data[i].operatorTitle = response.data
  489. .data[i].workflowHistoricTasks[len].operatorName
  490. .substring(response.data.data[i]
  491. .workflowHistoricTasks[0].operatorName.length -
  492. 2)
  493. response.data.data[i].operatorName = response.data
  494. .data[i].workflowHistoricTasks[len].operatorName
  495. var time = new Date(response.data.data[i]
  496. .workflowHistoricTasks[len].claimTime)
  497. .getTime()
  498. response.data.data[i].updateDate = this.$u.timeFormat(
  499. time, 'mm.dd hh:MM')
  500. response.data.data[i].auditMind = response.data.data[i]
  501. .workflowHistoricTasks[len].auditMind
  502. } else {
  503. this.$set(response.data.data[i], 'status', 'question')
  504. // response.data.data[i].status='question'
  505. if (response.data.data[i].desc == '总经理助理审核') {
  506. response.data.data[i].operatorTitle = '总助'
  507. } else if (response.data.data[i].desc == '杜大光审核') {
  508. response.data.data[i].operatorTitle = '大光'
  509. } else {
  510. response.data.data[i].operatorTitle = response.data
  511. .data[i].desc.substring(0, 2)
  512. }
  513. response.data.data[i].operatorName = response.data
  514. .data[i].desc
  515. var time1 = new Date(response.data.data[i].updateDate)
  516. .getTime()
  517. response.data.data[i].updateDate = this.$u.timeFormat(
  518. time1, 'mm.dd hh:MM')
  519. response.data.data[i].auditMind = ''
  520. }
  521. }
  522. }
  523. console.log(response.data.data)
  524. for(let i = 0 ;i<response.data.data.length;i++){
  525. if(response.data.data[i].status == "error"){
  526. this.auditCheck = "error"
  527. break;
  528. }else if(response.data.data[i].status == "question"){
  529. this.auditCheck = "question"
  530. break;
  531. }else{
  532. this.auditCheck = "success"
  533. }
  534. }
  535. this.auditList = response.data.data
  536. var time2 = new Date(this.list.createDate).getTime()
  537. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  538. this.auditList.unshift({
  539. operatorTitle: this.list.creater.substring(0, 2),
  540. operatorName: this.list.creater,
  541. updateDate: time3,
  542. auditMind: '',
  543. desc: '发起申请',
  544. showflow: false,
  545. commonStaffs1: null,
  546. commonStaffs: null,
  547. workflowHistoricTasks: [],
  548. status: 'success'
  549. })
  550. })
  551. })
  552. }
  553. })
  554. },
  555. filterFileType(index, lists) {
  556. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  557. lists.splice(index, 1);
  558. // 当前文件不支持
  559. uni.showModal({
  560. title: '暂不支持当前图片类型',
  561. showCancel: false
  562. });
  563. } else {
  564. this.isAdd = false;
  565. }
  566. },
  567. //驳回
  568. rejectSubmit() {
  569. uni.showLoading({
  570. title: '加载中',
  571. mask: true
  572. });
  573. var that = this
  574. that.$api.doRequest('post', '/workflow/api/handle', {
  575. taskId: that.list.taskId,
  576. approved: false,
  577. auditMind: this.auditMind,
  578. needReapply: true,
  579. }).then(res => {
  580. that.$api.msg('驳回成功')
  581. that.show = false
  582. setTimeout(function() {
  583. if (that.everyCheck) {
  584. helper.setAudit(that.list)
  585. } else {
  586. uni.navigateBack()
  587. }
  588. uni.hideLoading()
  589. }, 1000);
  590. })
  591. },
  592. close() {
  593. this.show = false
  594. },
  595. pass() {
  596. this.show = true
  597. this.title = '审核意见(通过)'
  598. },
  599. reject() {
  600. this.show = true
  601. this.title = '驳回原因(驳回)'
  602. },
  603. //通过
  604. passSubmit() {
  605. var that = this
  606. if (this.title == '驳回原因(驳回)') {
  607. this.rejectSubmit()
  608. } else {
  609. uni.showLoading({
  610. title: '加载中',
  611. mask: true
  612. });
  613. that.$api.doRequest('post', '/workflow/api/handle', {
  614. taskId: that.list.taskId,
  615. approved: true,
  616. auditMind: this.auditMind,
  617. needReapply: true,
  618. }).then(res => {
  619. that.$api.msg('通过成功')
  620. that.show = false
  621. setTimeout(function() {
  622. if (that.everyCheck) {
  623. helper.setAudit(that.list)
  624. } else {
  625. uni.navigateBack()
  626. }
  627. uni.hideLoading()
  628. }, 1000);
  629. })
  630. }
  631. },
  632. //审核方法
  633. audit(item, index, status, status2, reason) {
  634. if (index < this.list.length) {
  635. this.$api.doRequest('post', '/workflow/api/handle', {
  636. taskId: item.taskId,
  637. approved: status,
  638. auditMind: reason != undefined ? '已驳回' : '34',
  639. needReapply: status2 != undefined ? true : false,
  640. }).then(res => {
  641. this.audit(this.list[index + 1], index + 1, status)
  642. })
  643. } else {
  644. if (status == true) {
  645. that.$api.msg('通过成功')
  646. this.getList()
  647. } else if (status == false) {
  648. that.$api.msg('驳回成功')
  649. this.getList()
  650. }
  651. }
  652. },
  653. }
  654. }
  655. </script>
  656. <style scoped lang="scss">
  657. .container {
  658. padding: 20rpx 20rpx 250rpx 20rpx;
  659. }
  660. .u-form {
  661. margin-bottom: 20rpx;
  662. background: #fff;
  663. border-radius: 10px;
  664. padding: 30rpx 10px;
  665. .u-form-item {
  666. line-height: 30px;
  667. padding: 0px 0;
  668. font-size: 26rpx;
  669. color: #878C9C;
  670. }
  671. }
  672. .content {
  673. margin-top: 30rpx;
  674. .top {
  675. display: flex;
  676. justify-content: space-between;
  677. }
  678. .content-item {
  679. border-radius: 20rpx;
  680. background: white;
  681. padding: 40rpx 20rpx;
  682. margin-bottom: 30rpx;
  683. }
  684. .title {
  685. font-size: 32rpx;
  686. font-weight: 600;
  687. color: #333333;
  688. text-align: left;
  689. margin: 20rpx 0;
  690. }
  691. .car-container {
  692. border-bottom: 2rpx solid #EEEEEE;
  693. }
  694. .car-type-item {
  695. font-size: 28rpx;
  696. margin: 20rpx 0;
  697. color: #878C9C;
  698. }
  699. .weightInfoCss {
  700. font-size: 28rpx;
  701. color: #333333;
  702. font-weight: 500;
  703. }
  704. .row {
  705. display: flex;
  706. justify-content: space-between;
  707. // .right,
  708. // input {
  709. // font-size: 28rpx;
  710. // // color: #333333;
  711. // }
  712. }
  713. .money {
  714. font-size: 32rpx;
  715. font-weight: 500;
  716. margin-bottom: 30rpx;
  717. }
  718. .moneyInfo {
  719. color: #22C572;
  720. font-size: 32rpx;
  721. }
  722. }
  723. .bottom-btn {
  724. width: 100%;
  725. position: fixed;
  726. bottom: 0;
  727. display: flex;
  728. z-index: 2;
  729. left: 0;
  730. background-color: #f8f8f8;
  731. flex-direction: column;
  732. .btn1,
  733. .btn2 {
  734. width: 100%;
  735. margin-bottom: 26rpx;
  736. border-radius: 90rpx;
  737. }
  738. .btn1 {
  739. background: white;
  740. color: #00C265;
  741. }
  742. }
  743. .topInfo {
  744. height: 210rpx;
  745. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  746. padding: 30rpx;
  747. .topInfo-item {
  748. height: 150rpx;
  749. background-color: #FFFFFF;
  750. border-radius: 20rpx;
  751. padding: 40rpx;
  752. .logo {
  753. width: 40rpx;
  754. height: 40rpx;
  755. margin-top: 8rpx;
  756. }
  757. .infoText {
  758. font-size: 36rpx;
  759. font-weight: 600;
  760. margin-left: 20rpx;
  761. }
  762. .infoData {
  763. color: #878C9C;
  764. font-size: 26rpx;
  765. margin-top: 10rpx;
  766. }
  767. }
  768. }
  769. .shade {
  770. position: fixed;
  771. top: 0;
  772. left: 0;
  773. height: 100%;
  774. width: 100%;
  775. background: rgba(0, 0, 0, 0.4);
  776. z-index: 3;
  777. .wrap {
  778. position: absolute;
  779. left: 0;
  780. top: 0;
  781. right: 0;
  782. bottom: 0;
  783. margin: auto;
  784. background: #fff;
  785. width: calc(100% - 198rpx);
  786. height: 700rpx;
  787. border-radius: 20rpx;
  788. .alert-top {
  789. padding: 33rpx;
  790. display: flex;
  791. justify-content: center;
  792. align-items: center;
  793. position: relative;
  794. }
  795. .title {
  796. font-size: 32rpx;
  797. font-weight: 600;
  798. color: #333333;
  799. }
  800. .close {
  801. position: absolute;
  802. right: 33rpx;
  803. }
  804. }
  805. }
  806. .cancel,
  807. .confirm {
  808. position: absolute;
  809. display: inline-block;
  810. width: 50%;
  811. text-align: center;
  812. bottom: 0;
  813. padding: 10px;
  814. border-top: 1px solid #eee;
  815. font-size: 34rpx;
  816. }
  817. .cancel {
  818. left: 0;
  819. border-right: 1px solid #eee;
  820. color: #AFB3BF;
  821. }
  822. .confirm {
  823. right: 0;
  824. color: #22C572;
  825. }
  826. .textCss {
  827. display: flex;
  828. justify-content: flex-end;
  829. width: 100%;
  830. text-align: right;
  831. color: #333333;
  832. }
  833. .textarea {
  834. margin: 15rpx auto;
  835. width: 100%;
  836. background: #F9F9FA;
  837. border-radius: 10px;
  838. border: 1px solid #EEEEEE;
  839. font-size: 28rpx;
  840. padding: 10px;
  841. }
  842. .u-textarea-style {
  843. margin: 20rpx;
  844. background: #F9F9FA;
  845. border-radius: 10px;
  846. border: 1px solid #EEEEEE;
  847. padding: 10rpx 20rpx;
  848. position: relative;
  849. height:240px;
  850. /deep/.uni-textarea-textarea{
  851. width: 80%;
  852. }
  853. .right-bottom {
  854. position: absolute;
  855. right: 20rpx;
  856. bottom: 20rpx;
  857. color: #AFB3BF;
  858. }
  859. }
  860. .content2 {
  861. background: white;
  862. margin: 20rpx 0;
  863. border-radius: 20rpx;
  864. padding: 20rpx;
  865. .row {
  866. display: flex;
  867. .left {
  868. display: flex;
  869. align-items: center;
  870. .item1 {
  871. position: relative;
  872. .item-content {
  873. background: #617AE0;
  874. width: 44px;
  875. height: 44px;
  876. border-radius: 22px;
  877. line-height: 44px;
  878. text-align: center;
  879. font-size: 15px;
  880. color: #fff;
  881. }
  882. .status {
  883. position: absolute;
  884. border-radius: 50%;
  885. padding: 0px 2px;
  886. right: -3px;
  887. bottom: -3px;
  888. background: #fff;
  889. }
  890. .status.success {
  891. border: 1px solid rgb(60, 156, 255);
  892. }
  893. .status.error {
  894. border: 1px solid rgb(245, 108, 108);
  895. }
  896. .status.question {
  897. border: 1px solid #f9ae3d;
  898. }
  899. }
  900. }
  901. .right {
  902. width: 80%;
  903. // color: #B0B1B5;
  904. margin-top: 10px;
  905. .right-content {
  906. background: #F2F3F7;
  907. margin-left: 10px;
  908. margin-top: 10px;
  909. padding: 10px;
  910. border-radius: 5px;
  911. color: #B0B1B5;
  912. }
  913. .right-item {
  914. display: flex;
  915. justify-content: space-between;
  916. .time {
  917. color: #999;
  918. }
  919. .item2 {
  920. margin-left: 20rpx;
  921. margin-top: -7px;
  922. .name {
  923. font-size: 28rpx;
  924. font-weight: 800;
  925. margin-bottom: 4px;
  926. }
  927. .status.success {
  928. color: #6CC48C;
  929. }
  930. .status.error {
  931. color: rgb(245, 108, 108);
  932. }
  933. .status.question {
  934. color: #f9ae3d;
  935. }
  936. }
  937. }
  938. }
  939. }
  940. .row2 {
  941. display: flex;
  942. .item-content {
  943. background: #22C572;
  944. width: 30px;
  945. height: 30px;
  946. border-radius: 50%;
  947. line-height: 30px;
  948. text-align: center;
  949. font-size: 12px;
  950. color: #fff;
  951. padding: 0 2px;
  952. margin: 0 auto;
  953. }
  954. .status {
  955. position: absolute;
  956. top: 0;
  957. right: 0;
  958. }
  959. }
  960. .row-line {
  961. width: 1px;
  962. height: 30px;
  963. background: #F2F2F2;
  964. margin: 10rpx 50rpx;
  965. }
  966. .audit {
  967. margin-top: 20rpx;
  968. }
  969. }
  970. .form_top {
  971. border-bottom: 1px solid #F5F6FA;
  972. padding-bottom: 10px;
  973. margin-bottom: 18rpx;
  974. font-size: 30rpx;
  975. font-weight: 600;
  976. }
  977. .form_view{
  978. margin: 20rpx 0;
  979. border-radius: 20rpx;
  980. background: #F9F9FA;
  981. padding: 30rpx 20rpx;
  982. margin-top: 30rpx;
  983. }
  984. .label_css {
  985. font-size: 26rpx;
  986. color: #878C9C;
  987. }
  988. .input_css {
  989. font-size: 20rpx;
  990. }
  991. .img_item {
  992. display: flex;
  993. width: 100%;
  994. margin: 10px 0;
  995. padding: 0 10rpx;
  996. .imgsign{
  997. width: 25px;
  998. height: 25px;
  999. margin-top: 6px;
  1000. }
  1001. .char_css {
  1002. font-size: 28rpx;
  1003. font-weight: 600;
  1004. display: -webkit-box;
  1005. overflow: hidden;
  1006. /*! autoprefixer: off; */
  1007. -webkit-box-orient: vertical;
  1008. -webkit-line-clamp: 1;
  1009. -webkit-box-orient: vertical;
  1010. text-overflow: ellipsis;
  1011. word-break: break-all;
  1012. }
  1013. .img_size{
  1014. color: #B0B3BF;
  1015. font-size: 12px;
  1016. margin-top: 5px;
  1017. }
  1018. .img_dowload {
  1019. width: 14%;
  1020. color: #22C572;
  1021. text-align: right;
  1022. }
  1023. }
  1024. .headInfo{
  1025. height: 100px;
  1026. background-color: #FFFFFF;
  1027. margin-bottom: 20rpx;
  1028. border-radius: 10px;
  1029. padding: 30rpx 10px;
  1030. display: flex;
  1031. position: relative;
  1032. .headInfo_left{
  1033. width: 10%;
  1034. line-height: 60px;
  1035. text-align: center;
  1036. }
  1037. .headInfo_middle{
  1038. width: 70%;
  1039. padding-left: 10px;
  1040. margin-top: 10px;
  1041. }
  1042. .headInfo_right{
  1043. width: 20%;
  1044. line-height: 60px;
  1045. .char_a{
  1046. color: #22C572;
  1047. }
  1048. .char_b{
  1049. color: #FE6430;
  1050. }
  1051. .char_c{
  1052. color: #FB2323;
  1053. }
  1054. .char_a,.char_b,.char_c{
  1055. font-size: 16px;
  1056. }
  1057. }
  1058. .adopt{
  1059. position: absolute;
  1060. right: 30px;
  1061. top: 60px;
  1062. .adopt_img{
  1063. width: 90px;
  1064. height: 90px;
  1065. }
  1066. }
  1067. .headInfo_title{
  1068. font-size: 19px;
  1069. color: #333333;
  1070. font-weight: 600;
  1071. }
  1072. .headInfo_No{
  1073. color: #878C9C;
  1074. font-size: 13px;
  1075. margin-top: 6px;
  1076. }
  1077. }
  1078. </style>