purchasecontract.vue 38 KB

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