refund_list-detail.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <template>
  2. <div>
  3. <div class="sty">
  4. <el-page-header @back="goBack" :content="title"> </el-page-header>
  5. </div>
  6. <el-divider></el-divider>
  7. <h3>工程项目信息</h3>
  8. <el-divider></el-divider>
  9. <div class="diy-table-1">
  10. <el-row :gutter="0">
  11. <el-col :xs="12" :sm="24" :lg="8" class="item">
  12. <div class="label">
  13. {{
  14. detailList.enginOrderType == "HOME"
  15. ? "工程登录编号"
  16. : "工程信息编号"
  17. }}
  18. </div>
  19. <div class="value">{{ detailList.refEnginRecordNo }}</div>
  20. </el-col>
  21. <!-- <el-col :xs="12" :sm="24" :lg="8" class="item">
  22. <div class="label">工程信息编号</div>
  23. <div class="value">{{ detailList.refEnginRecordNo }}</div>
  24. </el-col> -->
  25. <el-col :xs="12" :sm="24" :lg="8" class="item">
  26. <div class="label">项目类别</div>
  27. <div class="value">{{ detailList.refProjectName }}</div>
  28. </el-col>
  29. <el-col :xs="12" :sm="24" :lg="8" class="item">
  30. <div class="label">行业类别</div>
  31. <div class="value">
  32. {{ detailList.refTradeCategory }}
  33. </div>
  34. </el-col>
  35. <el-col :xs="24" :sm="24" :lg="8" class="item">
  36. <div class="label">厂编号</div>
  37. <div class="value">{{ detailList.refFactoryNo }}</div>
  38. </el-col>
  39. <el-col :xs="24" :sm="24" :lg="8" class="item">
  40. <div class="label">使用单位</div>
  41. <div class="value">{{ detailList.refUseUnit }}</div>
  42. </el-col>
  43. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  44. <div class="label">经销商二级代码</div>
  45. <div class="value">{{detailList.}}</div>
  46. </el-col> -->
  47. <el-col :xs="24" :sm="24" :lg="8" class="item">
  48. <div class="label">业务员</div>
  49. <div class="value">{{ detailList.serviceName }}</div>
  50. </el-col>
  51. <el-col :xs="24" :sm="24" :lg="8" class="item">
  52. <div class="label">联系人</div>
  53. <div class="value">{{ detailList.refLinkman }}</div>
  54. </el-col>
  55. <el-col :xs="24" :sm="24" :lg="8" class="item">
  56. <div class="label">固定电话</div>
  57. <div class="value">{{ detailList.refTel }}</div>
  58. </el-col>
  59. <el-col :xs="24" :sm="24" :lg="8" class="item">
  60. <div class="label">移动电话</div>
  61. <div class="value">{{ detailList.refPhone }}</div>
  62. </el-col>
  63. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  64. <div class="label">移动电话</div>
  65. <div class="value">
  66. <el-input
  67. :disabled="title == '详情'"
  68. placeholder="请输入"
  69. v-model="detailList.refPhone"
  70. ></el-input>
  71. </div>
  72. </el-col> -->
  73. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  74. <div class="label">押金比例</div>
  75. <div class="value">{{detailList.}}</div>
  76. </el-col> -->
  77. <el-col :xs="24" :sm="24" :lg="8" class="item">
  78. <div class="label">单据状态</div>
  79. <div class="value">
  80. {{
  81. detailList.examineStatus == "SAVE"
  82. ? "保存"
  83. : detailList.examineStatus == "WAIT"
  84. ? "待审核"
  85. : detailList.examineStatus == "OK"
  86. ? "通过"
  87. : detailList.examineStatus == "FAIL"
  88. ? "不通过"
  89. : "关闭"
  90. }}
  91. </div>
  92. </el-col>
  93. <el-col :xs="24" :sm="24" :lg="8" class="item">
  94. <div class="label">销售类型</div>
  95. <div class="value">{{ detailList.saleTypeName }}</div>
  96. </el-col>
  97. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  98. <div class="label">不扣押金</div>
  99. <div class="value">{{ detailList.customerName }}</div>
  100. </el-col> -->
  101. <el-col :xs="24" :sm="24" :lg="8" class="item">
  102. <div class="label">第几次申报</div>
  103. <div class="value">{{ detailList.refDeclareNo }}</div>
  104. </el-col>
  105. <el-col :xs="24" :sm="24" :lg="8" class="item">
  106. <div class="label">项目类型</div>
  107. <div class="value">{{ detailList.refProjectType }}</div>
  108. </el-col>
  109. <el-col :xs="24" :sm="24" :lg="8" class="item">
  110. <div class="label">经销商编码</div>
  111. <div class="value">{{ detailList.customerNumber }}</div>
  112. </el-col>
  113. <el-col :xs="24" :sm="24" :lg="8" class="item">
  114. <div class="label">押金总额</div>
  115. <div class="value">{{ detailList.depositAmount }}</div>
  116. </el-col>
  117. <el-col :xs="24" :sm="24" :lg="8" class="item">
  118. <div class="label">安装时间</div>
  119. <div class="value">
  120. <el-date-picker prefix-icon="''" placeholder="请选择安装时间" :disabled="title == '详情'" class="selectStyle" v-model="detailList.installDate" type="datetime" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss">
  121. </el-date-picker>
  122. </div>
  123. </el-col>
  124. <el-col :xs="24" :sm="24" :lg="16" class="item">
  125. <div class="label">安装地址</div>
  126. <div class="value">{{ detailList.refInstallAddress }}</div>
  127. </el-col>
  128. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  129. <div class="label">工程订单号</div>
  130. <div class="value">{{ detailList.customerName }}</div>
  131. </el-col> -->
  132. <el-col :xs="24" :sm="24" :lg="16" class="item">
  133. <div class="label">经销商名称</div>
  134. <div class="value">{{ detailList.customerName }}</div>
  135. </el-col>
  136. <el-col :xs="24" :sm="24" :lg="16" class="item">
  137. <div class="label">项目说明</div>
  138. <div class="value">{{ detailList.refProjectNote }}</div>
  139. </el-col>
  140. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  141. <div class="label">订单日期</div>
  142. <div class="value">{{ detailList.customerName }}</div>
  143. </el-col> -->
  144. <!-- <el-col :xs="24" :sm="24" :lg="16" class="item">
  145. <div class="label">格力内部备注</div>
  146. <div class="value">{{ detailList.customerName }}</div>
  147. </el-col> -->
  148. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  149. <div class="label">文件编码</div>
  150. <div class="value">{{ detailList.customerName }}</div>
  151. </el-col> -->
  152. <el-col :xs="24" :sm="24" :lg="16" class="item">
  153. <div class="label">备注</div>
  154. <!-- <div class="value">{{ detailList.applyNote }}</div> -->
  155. <div class="value">
  156. <el-input :disabled='detailList.examineStatus !== "WAIT"' v-model="detailList.remark" placeholder="请输入内容"></el-input>
  157. </div>
  158. </el-col>
  159. <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="16" class="item">
  160. <div class="label">格力内部备注</div>
  161. <!-- <div class="value">{{ detailList.geLiInerNote}}</div> -->
  162. <div class="value">
  163. <el-input :disabled='detailList.examineStatus !== "WAIT"' v-model="detailList.geLiInerNote" placeholder="请输入内容"></el-input>
  164. </div>
  165. </el-col>
  166. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  167. <div class="label">寄厂日期</div>
  168. <div class="value">
  169. <el-date-picker
  170. :disabled="title == '详情'"
  171. class="selectStyle"
  172. v-model="detailList.sendFactoryDate"
  173. type="datetime"
  174. prefix-icon="''"
  175. placeholder="请选择寄厂日期"
  176. default-time="00:00:00"
  177. value-format="yyyy-MM-dd HH:mm:ss"
  178. >
  179. </el-date-picker>
  180. </div>
  181. </el-col> -->
  182. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
  183. <div class="label">提货日期</div>
  184. <div class="value">{{detailList.}}</div>
  185. </el-col> -->
  186. </el-row>
  187. </div>
  188. <h3>货品信息</h3>
  189. <el-divider></el-divider>
  190. <!-- 列表 -->
  191. <div class="mymain-container">
  192. <div class="table">
  193. <el-table
  194. v-loading="listLoading"
  195. :data="detailList.items"
  196. element-loading-text="Loading"
  197. border
  198. fit
  199. highlight-current-row
  200. stripe
  201. show-summary
  202. :summary-method="$getSummaries"
  203. >
  204. <template v-if="!isCustomer">
  205. <el-table-column
  206. align="left"
  207. label="厂编号"
  208. prop="factoryNo"
  209. min-width="160"
  210. show-overflow-tooltip
  211. >
  212. <template slot-scope="scope">
  213. <CopyButton :copyText="scope.row.factoryNo" />
  214. <span>{{scope.row.factoryNo}}</span>
  215. </template>
  216. </el-table-column>
  217. <el-table-column
  218. align="left"
  219. label="物料编码"
  220. prop="materialNumber"
  221. min-width="160"
  222. show-overflow-tooltip
  223. >
  224. <template slot-scope="scope">
  225. <CopyButton :copyText="scope.row.materialNumber" />
  226. <span>{{scope.row.materialNumber}}</span>
  227. </template>
  228. </el-table-column>
  229. </template>
  230. <el-table-column
  231. align="left"
  232. label="产品编码"
  233. prop="materialOldNumber"
  234. min-width="160"
  235. show-overflow-tooltip
  236. >
  237. <template slot-scope="scope">
  238. <CopyButton :copyText="scope.row.materialOldNumber" />
  239. <span>{{scope.row.materialOldNumber}}</span>
  240. </template>
  241. </el-table-column>
  242. <el-table-column
  243. align="left"
  244. label="产品名称"
  245. prop="materialName"
  246. min-width="160"
  247. show-overflow-tooltip
  248. >
  249. <template slot-scope="scope">
  250. <CopyButton :copyText="scope.row.materialName" />
  251. <span>{{scope.row.materialName}}</span>
  252. </template>
  253. </el-table-column>
  254. <el-table-column
  255. align="left"
  256. label="规格型号"
  257. prop="specification"
  258. min-width="160"
  259. show-overflow-tooltip
  260. >
  261. <template slot-scope="scope">
  262. <CopyButton :copyText="scope.row.specification" />
  263. <span>{{scope.row.specification}}</span>
  264. </template>
  265. </el-table-column>
  266. <el-table-column
  267. align="right"
  268. label="单价"
  269. prop="price"
  270. min-width="160"
  271. show-overflow-tooltip
  272. >
  273. <template slot-scope="scope">
  274. {{ scope.row.price | numToFixed}}
  275. </template>
  276. </el-table-column>
  277. <el-table-column
  278. align="right"
  279. label="数量"
  280. prop="qty"
  281. min-width="160"
  282. show-overflow-tooltip
  283. />
  284. <el-table-column
  285. align="right"
  286. label="金额"
  287. prop="totalAmount"
  288. min-width="160"
  289. show-overflow-tooltip
  290. >
  291. <template slot-scope="scope">
  292. {{ scope.row.totalAmount | numToFixed}}
  293. </template>
  294. </el-table-column>
  295. <el-table-column
  296. align="right"
  297. label="发货数量"
  298. prop="hasSendQty"
  299. min-width="160"
  300. show-overflow-tooltip
  301. />
  302. <el-table-column
  303. align="right"
  304. label="押金金额"
  305. prop="depositAmount"
  306. min-width="160"
  307. show-overflow-tooltip
  308. >
  309. <template slot-scope="scope">
  310. {{ scope.row.depositAmount | numToFixed}}
  311. </template>
  312. </el-table-column>
  313. <el-table-column
  314. align="right"
  315. label="上交资料"
  316. prop="dataQty"
  317. min-width="160"
  318. show-overflow-tooltip
  319. />
  320. <el-table-column
  321. align="right"
  322. label="收差全额"
  323. prop="diffAmount"
  324. min-width="160"
  325. show-overflow-tooltip
  326. >
  327. <template slot-scope="scope">
  328. {{ scope.row.diffAmount | numToFixed}}
  329. </template>
  330. </el-table-column>
  331. </el-table>
  332. </div>
  333. </div>
  334. <h3 class="gdzl">工程资料</h3>
  335. <el-button :disabled="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn">批量下载</el-button>
  336. <el-divider></el-divider>
  337. <!-- 列表 -->
  338. <div class="mymain-container">
  339. <div class="table">
  340. <el-table v-loading="listLoading" :data="detailList.dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
  341. <el-table-column align="left" label="资料描述" prop="dataDescribe" min-width="160" show-overflow-tooltip></el-table-column>
  342. <el-table-column align="left" label="原文件名" prop="fileName" min-width="160" show-overflow-tooltip></el-table-column>
  343. <el-table-column align="left" label="缩略图" prop="fileUrl" min-width="160" show-overflow-tooltip>
  344. <template slot-scope="scope">
  345. <el-image ref="img" :src="imageURL + scope.row.fileUrl" v-if="checkFileType(scope.row.fileUrl) == 'image'" style="width: 120px; height: 120px" fit="cover" :preview-src-list="[imageURL + scope.row.fileUrl]">
  346. </el-image>
  347. <img class="file" src="@/assets/common/word.png" v-if="checkFileType(scope.row.fileUrl) == 'word'" />
  348. <img class="file" src="@/assets/common/excel.png" v-if="checkFileType(scope.row.fileUrl) == 'excel'" />
  349. <img class="file" src="@/assets/common/ppt.png" v-if="checkFileType(scope.row.fileUrl) == 'ppt'" />
  350. <img class="file" src="@/assets/common/pdf.png" v-if="checkFileType(scope.row.fileUrl) == 'pdf'" />
  351. <img v-if="checkFileType(scope.row.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg" />
  352. </template>
  353. </el-table-column>
  354. <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
  355. <template slot-scope="scope">
  356. {{ "资料_" + scope.row.fileName }}
  357. </template>
  358. </el-table-column>
  359. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
  360. <template slot-scope="scope">
  361. <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl,scope.row.fileName)">下载</el-button>
  362. </template>
  363. </el-table-column>
  364. </el-table>
  365. </div>
  366. </div>
  367. <el-divider></el-divider>
  368. <div class="diy-table-1">
  369. <el-row :gutter="0">
  370. <el-col :xs="12" :sm="12" :lg="12" class="item">
  371. <div class="label">申请人</div>
  372. <div class="value">{{ detailList.submitName }}</div>
  373. </el-col>
  374. <el-col :xs="12" :sm="12" :lg="12" class="item">
  375. <div class="label">申请日期</div>
  376. <div class="value">{{ detailList.submitTime }}</div>
  377. </el-col>
  378. <el-col :xs="12" :sm="24" :lg="24" class="item">
  379. <div class="label">申请退押金</div>
  380. <div class="value">{{ detailList.applyNote }}</div>
  381. </el-col>
  382. </el-row>
  383. </div>
  384. <h3>记录</h3>
  385. <el-divider></el-divider>
  386. <!-- 列表 -->
  387. <div class="mymain-container">
  388. <div class="table">
  389. <el-table v-loading="listLoading" :data="detailList.checkRecordItems" element-loading-text="Loading" border fit highlight-current-row stripe>
  390. <el-table-column align="left" label="申请人" prop="submitName" min-width="160" show-overflow-tooltip></el-table-column>
  391. <el-table-column align="left" label="申请日期" prop="submitTime" min-width="160" show-overflow-tooltip></el-table-column>
  392. <el-table-column align="left" label="申请说明" prop="applyNote" min-width="160" show-overflow-tooltip></el-table-column>
  393. <el-table-column align="left" label="验收人" prop="checkName" min-width="160" show-overflow-tooltip></el-table-column>
  394. <el-table-column align="left" label="受理日期" prop="checkDate" min-width="160" show-overflow-tooltip></el-table-column>
  395. <el-table-column align="left" label="验收说明" prop="checkNote" min-width="160" show-overflow-tooltip></el-table-column>
  396. <el-table-column align="left" label="审批结果" prop="isRefundDeposit" min-width="160" show-overflow-tooltip>
  397. <template slot-scope="scope">
  398. {{scope.row.isRefundDeposit == false?'否':'是'}}
  399. </template>
  400. </el-table-column>
  401. </el-table>
  402. </div>
  403. </div>
  404. <h3 v-if="
  405. detailList.examineStatus == 'WAIT' ||
  406. detailList.examineStatus == 'FAIL' ||
  407. detailList.examineStatus == 'OK'
  408. ">
  409. 审批
  410. </h3>
  411. <el-divider v-if="
  412. detailList.examineStatus == 'WAIT' ||
  413. detailList.examineStatus == 'FAIL' ||
  414. detailList.examineStatus == 'OK'
  415. "></el-divider>
  416. <div v-if="detailList.examineStatus == 'WAIT'" class="diy-table-1">
  417. <el-row :gutter="0">
  418. <el-col :xs="12" :sm="12" :lg="12" class="item">
  419. <div class="label">验收人</div>
  420. <div class="value">{{ this.checkBy }}</div>
  421. </el-col>
  422. <el-col :xs="12" :sm="12" :lg="12" class="item dateS">
  423. <div class="label">受理日期</div>
  424. <div class="value">
  425. <el-date-picker disabled prefix-icon="''" class="selectStyle" type="datetime" placeholder="系统自动生成" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss">
  426. </el-date-picker>
  427. </div>
  428. </el-col>
  429. <el-col :xs="12" :sm="24" :lg="24" class="item">
  430. <div class="label">是否退押</div>
  431. <div class="value">
  432. <el-radio-group v-model="isRefundDeposit">
  433. <el-radio :label="true">是</el-radio>
  434. <el-radio :label="false">否</el-radio>
  435. </el-radio-group>
  436. </div>
  437. </el-col>
  438. <el-col :xs="12" :sm="24" :lg="24" class="item">
  439. <div class="label">验收说明</div>
  440. <div class="value">
  441. <el-input v-model="checkNote" placeholder="请输入内容"></el-input>
  442. </div>
  443. </el-col>
  444. </el-row>
  445. </div>
  446. <div v-if="
  447. detailList.examineStatus == 'OK' || detailList.examineStatus == 'FAIL'
  448. " class="diy-table-1">
  449. <el-row :gutter="0">
  450. <el-col :xs="12" :sm="12" :lg="12" class="item">
  451. <div class="label">验收人</div>
  452. <div class="value">{{ detailList.checkBy }}</div>
  453. </el-col>
  454. <el-col :xs="12" :sm="12" :lg="12" class="item dateS">
  455. <div class="label">受理日期</div>
  456. <div class="value">
  457. <el-date-picker disabled prefix-icon="''" class="selectStyle" v-model="detailList.checkDate" type="datetime" placeholder="" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss">
  458. </el-date-picker>
  459. </div>
  460. </el-col>
  461. <el-col :xs="12" :sm="24" :lg="24" class="item">
  462. <div class="label">是否退押</div>
  463. <div class="value">
  464. <el-radio-group v-model="detailList.isRefundDeposit">
  465. <el-radio disabled :label="true">是</el-radio>
  466. <el-radio disabled :label="false">否</el-radio>
  467. </el-radio-group>
  468. </div>
  469. </el-col>
  470. <el-col :xs="12" :sm="24" :lg="24" class="item dateS">
  471. <div class="label">验收说明</div>
  472. <div class="value">
  473. <el-input disabled v-model="detailList.checkNote" placeholder="请输入内容"></el-input>
  474. </div>
  475. </el-col>
  476. <el-col :xs="12" :sm="24" :lg="24" class="item dateS">
  477. <div class="label">审批通过后备注</div>
  478. <div class="value">
  479. <el-input v-model="detailList.examineAfterRemark" placeholder="请输入内容"></el-input>
  480. </div>
  481. </el-col>
  482. </el-row>
  483. </div>
  484. <br />
  485. <!-- 按钮 -->
  486. <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
  487. <div class="btn-group clearfix">
  488. <div class="fl">
  489. <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="adoptFn">审批通过</el-button>
  490. <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="rejectFn">审批驳回</el-button>
  491. <el-button v-if="detailList.examineStatus == 'OK'" type="primary" size="small" @click="saveFn">保存</el-button>
  492. </div>
  493. </div>
  494. </div>
  495. </template>
  496. <script>
  497. import { downloadFiles } from "@/utils/util";
  498. import IMAGEUPLOAD from "@/components/Common/image-upload.vue";
  499. import { getFileUrl } from "@/api/common";
  500. import { mapGetters } from "vuex";
  501. import {
  502. getDepositManageDetail,
  503. getDepositManageExamine,
  504. getDepositManageDownZip,
  505. getDepositManageEdit,
  506. getCommonFileGetStream,
  507. } from "@/api/engin_deposit/refund_list";
  508. export default {
  509. props: {
  510. detailId: {
  511. type: String,
  512. required: true,
  513. },
  514. },
  515. components: { IMAGEUPLOAD },
  516. computed: {
  517. ...mapGetters(["name"]),
  518. },
  519. data() {
  520. return {
  521. isCustomer: JSON.parse(localStorage.getItem("supply_user")).isCustomer,
  522. isDis: true,
  523. imageURL: this.$imageUrl,
  524. title: "审批",
  525. imageURL: this.$imageUrl,
  526. listLoading: false, // 列表加载loading
  527. dataList: [], // 列表数据
  528. detailList: {},
  529. checkBy: "",
  530. checkDate: "",
  531. isRefundDeposit: true,
  532. checkNote: "",
  533. };
  534. },
  535. created() {
  536. console.log(this.$imageUrl, 8888);
  537. this.checkBy = this.name;
  538. this.getData({ id: this.detailId });
  539. },
  540. methods: {
  541. //审批通过后可以编辑
  542. async saveFn() {
  543. console.log(this.detailList);
  544. await getDepositManageEdit(this.detailList);
  545. this.$message.success("保存成功");
  546. this.goBack();
  547. this.$emit("updateList");
  548. },
  549. //批量下载
  550. async batchDownloadFn() {
  551. downloadFiles("/deposit-manage/downZip", { parentId: this.detailId });
  552. },
  553. //下载
  554. async downLoadFn(v, name) {
  555. // getCommonFileGetStream({ key: v, fileName: name }).then((res) => {
  556. // // window.open(res.data);
  557. // });
  558. // // window.open(this.imageURL + v);
  559. downloadFiles("/common/file/getStream", { key: v, fileName: name });
  560. // await getCommonFileGetStream({ key: v, fileName: name });
  561. },
  562. // 检查文件类型
  563. checkFileType(url) {
  564. if (!url) return "";
  565. const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
  566. if (["jpg", "jpeg", "png"].includes(fileSuffix)) {
  567. return "image";
  568. } else if (["doc", "docx", "dot", "wps", "wpt"].includes(fileSuffix)) {
  569. return "word";
  570. } else if (["xls", "xlsx", "xlt", "et", "ett"].includes(fileSuffix)) {
  571. return "excel";
  572. } else if (
  573. ["ppt", "pptx", "dps", "dpt", "pot", "pps"].includes(fileSuffix)
  574. ) {
  575. return "ppt";
  576. } else if (["pdf"].includes(fileSuffix)) {
  577. return "pdf";
  578. } else if (["zip", "rar", "gz", "apk"].includes(fileSuffix)) {
  579. return "file";
  580. } else {
  581. return "";
  582. }
  583. },
  584. //审批驳回
  585. async rejectFn() {
  586. this.$confirm("此操作将审批订单, 是否继续?", "提示", {
  587. confirmButtonText: "确定",
  588. cancelButtonText: "取消",
  589. type: "warning",
  590. })
  591. .then(() => {
  592. if (!this.detailList.installDate) {
  593. this.$message.error("请选择安装时间");
  594. return;
  595. }
  596. let data = {
  597. ...this.detailList,
  598. checkBy: this.checkBy,
  599. // checkDate: this.checkDate,
  600. isRefundDeposit: this.isRefundDeposit,
  601. checkNote: this.checkNote,
  602. examineResult: 0,
  603. };
  604. getDepositManageExamine(data)
  605. .then((res) => {
  606. if (!res.data) {
  607. this.goBack();
  608. this.$emit("updateList");
  609. } else {
  610. this.$confirm("审批成功!是否跳转下一张待审批订单?", "提示", {
  611. confirmButtonText: "跳转",
  612. cancelButtonText: "取消",
  613. type: "warning",
  614. })
  615. .then(() => {
  616. this.$successMsg("进入下一张待审批订单");
  617. this.detailList = res.data;
  618. })
  619. .catch(() => {
  620. this.goBack();
  621. this.$emit("updateList");
  622. });
  623. }
  624. })
  625. .finally((res) => {});
  626. })
  627. .catch(() => {});
  628. // if (!this.detailList.installDate) {
  629. // this.$message.error("请选择安装时间");
  630. // return;
  631. // }
  632. // let data = {
  633. // ...this.detailList,
  634. // checkBy: this.checkBy,
  635. // // checkDate: this.checkDate,
  636. // isRefundDeposit: this.isRefundDeposit,
  637. // checkNote: this.checkNote,
  638. // examineResult: 0,
  639. // };
  640. // await getDepositManageExamine(data);
  641. // this.$message.success("审批驳回");
  642. // this.goBack();
  643. // this.$emit("updateList");
  644. },
  645. //审批通过
  646. async adoptFn() {
  647. this.$confirm("此操作将审批订单, 是否继续?", "提示", {
  648. confirmButtonText: "确定",
  649. cancelButtonText: "取消",
  650. type: "warning",
  651. })
  652. .then(() => {
  653. if (!this.detailList.installDate) {
  654. this.$message.error("请选择安装时间");
  655. return;
  656. }
  657. let data = {
  658. ...this.detailList,
  659. checkBy: this.checkBy,
  660. // checkDate: this.checkDate,
  661. isRefundDeposit: this.isRefundDeposit,
  662. checkNote: this.checkNote,
  663. examineResult: 1,
  664. };
  665. getDepositManageExamine(data)
  666. .then((res) => {
  667. if (!res.data) {
  668. this.goBack();
  669. this.$emit("updateList");
  670. } else {
  671. this.$confirm("审批成功!是否跳转下一张待审批订单?", "提示", {
  672. confirmButtonText: "跳转",
  673. cancelButtonText: "取消",
  674. type: "warning",
  675. })
  676. .then(() => {
  677. this.$successMsg("进入下一张待审批订单");
  678. this.detailList = res.data;
  679. })
  680. .catch(() => {
  681. this.goBack();
  682. this.$emit("updateList");
  683. });
  684. }
  685. })
  686. .finally((res) => {});
  687. })
  688. .catch(() => {});
  689. // if (!this.detailList.installDate) {
  690. // this.$message.error("请选择安装时间");
  691. // return;
  692. // }
  693. // let data = {
  694. // ...this.detailList,
  695. // checkBy: this.checkBy,
  696. // // checkDate: this.checkDate,
  697. // isRefundDeposit: this.isRefundDeposit,
  698. // checkNote: this.checkNote,
  699. // examineResult: 1,
  700. // };
  701. // await getDepositManageExamine(data);
  702. // this.$message.success("审批通过");
  703. // this.goBack();
  704. // this.$emit("updateList");
  705. },
  706. async getData(data) {
  707. const res = await getDepositManageDetail(data);
  708. console.log(res);
  709. if (res.data.dataList.length == 0) {
  710. this.isDis = true;
  711. } else {
  712. this.isDis = false;
  713. }
  714. let arr = []
  715. res.data.items.forEach((item) => {
  716. if (Number(item.qty)>0) {
  717. arr.push(item)
  718. }
  719. // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
  720. item.sums1 = ["hasSendQty", "dataQty", "qty"];
  721. item.sums2 = ["totalAmount", "diffAmount", "price"];
  722. });
  723. res.data.items = arr
  724. this.detailList = res.data;
  725. if (
  726. res.data.examineStatus == "SAVE" ||
  727. res.data.examineStatus == "OK" ||
  728. res.data.examineStatus == "FAIL"
  729. ) {
  730. this.title = "详情";
  731. }
  732. },
  733. goBack() {
  734. this.$parent.showSurrender = true;
  735. },
  736. },
  737. };
  738. </script>
  739. <style lang="scss" scoped>
  740. .aaa {
  741. height: 64px;
  742. width: 64px;
  743. }
  744. .dateS {
  745. .value {
  746. padding: 0;
  747. }
  748. }
  749. .batchDownload {
  750. float: right;
  751. margin-top: 9px;
  752. }
  753. .gdzl {
  754. display: inline-block;
  755. }
  756. .dateStyle {
  757. width: 100%;
  758. }
  759. .label {
  760. width: 150px !important;
  761. }
  762. .selectStyle {
  763. width: 100%;
  764. }
  765. </style>