acquisitioncontract.vue 36 KB

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