purchasecontract.vue 38 KB

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