salecontract.vue 34 KB

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