deposit_list-detail.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. <template>
  2. <div>
  3. <div class="sty">
  4. <el-page-header content="详情" @back="goBack" />
  5. </div>
  6. <el-divider />
  7. <el-radio-group v-model="engineering" size="mini" @change="handleRadio">
  8. <el-radio-button label="工程押金信息" />
  9. <el-radio-button label="工程订单信息" />
  10. <el-radio-button label="工程发货信息" />
  11. <el-radio-button label="直调发货" />
  12. </el-radio-group>
  13. <br /><br />
  14. <div v-show="engineering == '工程押金信息'">
  15. <div class="diy-table-1">
  16. <el-form ref="form" :model="details">
  17. <el-row :gutter="0">
  18. <el-col :xs="12" :sm="8" :lg="8" class="item">
  19. <div class="label">工程信息单号</div>
  20. <div class="value">{{ details.refEnginRecordNo }}</div>
  21. </el-col>
  22. <el-col :xs="12" :sm="8" :lg="8" class="item">
  23. <div class="label">项目类别</div>
  24. <div class="value">{{ details.refProjectName }}</div>
  25. </el-col>
  26. <el-col :xs="12" :sm="8" :lg="8" class="item">
  27. <div class="label">工程编号</div>
  28. <div class="value">{{ details.refProjectNo }}</div>
  29. </el-col>
  30. <el-col :xs="24" :sm="24" :lg="16" class="item">
  31. <div class="label">经销商名称</div>
  32. <div class="value">{{ details.customerName }}</div>
  33. </el-col>
  34. <el-col :xs="24" :sm="24" :lg="8" class="item">
  35. <div class="label">经销商编码</div>
  36. <div class="value">{{ details.customerNumber }}</div>
  37. </el-col>
  38. <el-col :xs="24" :sm="24" :lg="8" class="item">
  39. <div class="label">工程登录类型</div>
  40. <div class="value">{{ details.refPromiseStatus }}</div>
  41. </el-col>
  42. <el-col :xs="24" :sm="24" :lg="8" class="item">
  43. <div class="label">联系人</div>
  44. <div class="value">{{ details.refLinkman }}</div>
  45. </el-col>
  46. <el-col :xs="24" :sm="24" :lg="8" class="item">
  47. <div class="label">固定电话</div>
  48. <div class="value">{{ details.refTel }}</div>
  49. </el-col>
  50. <!-- <el-col :xs="24" :sm="24" :lg="16" class="item">-->
  51. <!-- <div class="label">厂工程编码</div>-->
  52. <!-- <div class="value">-->
  53. <!-- <el-form-item prop="refFactoryNo">-->
  54. <!-- <el-input-->
  55. <!-- v-model="details.refFactoryNo"-->
  56. <!-- placeholder="厂工程编码"-->
  57. <!-- size="small"-->
  58. <!-- />-->
  59. <!-- </el-form-item>-->
  60. <!-- </div>-->
  61. <!-- </el-col>-->
  62. <el-col :xs="24" :sm="24" :lg="8" class="item">
  63. <div class="label">移动电话</div>
  64. <div class="value">{{ details.refPhone }}</div>
  65. </el-col>
  66. <el-col :xs="24" :sm="24" :lg="8" class="item">
  67. <div class="label">押金总额</div>
  68. <div class="value">{{ details.depositAmount }}</div>
  69. </el-col>
  70. <el-col :xs="24" :sm="24" :lg="8" class="item">
  71. <div class="label">工程差价总额</div>
  72. <div class="value">{{ details.depositDiffAmount }}</div>
  73. </el-col>
  74. <el-col :xs="24" :sm="24" :lg="24" class="item" v-if="isCustomer">
  75. <div class="label">格力备注</div>
  76. <div class="value">{{ details.geLiInerNote }}</div>
  77. </el-col>
  78. <el-col :xs="24" :sm="24" :lg="24" class="item">
  79. <div class="label">使用单位</div>
  80. <div class="value">{{ details.refUseUnit }}</div>
  81. </el-col>
  82. <el-col :xs="24" :sm="24" :lg="24" class="item">
  83. <div class="label">安装时间</div>
  84. <div class="value" style="padding: 0">
  85. <el-form-item prop="installDate">
  86. <el-date-picker
  87. v-model="details.installDate"
  88. type="datetime"
  89. placeholder="安装时间"
  90. default-time="00:00:00"
  91. value-format="yyyy-MM-dd HH:mm:ss"
  92. />
  93. </el-form-item>
  94. </div>
  95. </el-col>
  96. <el-col :xs="24" :sm="24" :lg="24" class="item">
  97. <div class="label">安装地址</div>
  98. <div class="value">
  99. {{ details.refInstallAddress }}
  100. </div>
  101. </el-col>
  102. <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">-->
  103. <!-- <div class="label">寄厂日期</div>-->
  104. <!-- <div class="value" style="padding: 0">-->
  105. <!-- <el-form-item prop="sendFactoryDate">-->
  106. <!-- <el-date-picker-->
  107. <!-- v-model="details.sendFactoryDate"-->
  108. <!-- type="datetime"-->
  109. <!-- placeholder="寄厂日期"-->
  110. <!-- default-time="00:00:00"-->
  111. <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
  112. <!-- >-->
  113. <!-- </el-date-picker>-->
  114. <!-- </el-form-item>-->
  115. <!-- </div>-->
  116. <!-- </el-col>-->
  117. </el-row>
  118. </el-form>
  119. </div>
  120. <h3>货品信息</h3>
  121. <el-divider />
  122. <!-- 列表 -->
  123. <div class="mymain-container">
  124. <div class="table">
  125. <el-table
  126. v-loading="listLoading"
  127. :data="details.items"
  128. element-loading-text="Loading"
  129. border
  130. fit
  131. highlight-current-row
  132. stripe
  133. show-summary
  134. :summary-method="$getSummaries"
  135. >
  136. <el-table-column align="left" label="跨区厂编号" prop="factoryNo" min-width="160" show-overflow-tooltip>
  137. <template slot-scope="scope">
  138. <CopyButton :copyText="scope.row.factoryNo" />
  139. <span>{{ scope.row.factoryNo }}</span>
  140. </template>
  141. </el-table-column>
  142. <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="160" show-overflow-tooltip>
  143. <template slot-scope="scope">
  144. <CopyButton :copyText="scope.row.materialNumber" />
  145. <span>{{ scope.row.materialNumber }}</span>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. align="left"
  150. label="产品编码"
  151. prop="materialOldNumber"
  152. min-width="160"
  153. show-overflow-tooltip
  154. >
  155. <template slot-scope="scope">
  156. <CopyButton :copyText="scope.row.materialOldNumber" />
  157. <span>{{ scope.row.materialOldNumber }}</span>
  158. </template>
  159. </el-table-column>
  160. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  161. <template slot-scope="scope">
  162. <CopyButton :copyText="scope.row.materialName" />
  163. <span>{{ scope.row.materialName }}</span>
  164. </template>
  165. </el-table-column>
  166. <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  167. <template slot-scope="scope">
  168. <CopyButton :copyText="scope.row.specification" />
  169. <span>{{ scope.row.specification }}</span>
  170. </template>
  171. </el-table-column>
  172. <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip />
  173. <el-table-column align="right" label="数量" prop="qty" min-width="160" show-overflow-tooltip />
  174. <el-table-column align="right" label="金额" prop="totalAmount" min-width="160" show-overflow-tooltip />
  175. <el-table-column align="right" label="发货数量" prop="hasSendQty" min-width="160" show-overflow-tooltip />
  176. <el-table-column
  177. align="right"
  178. label="押金金额"
  179. prop="depositAmount"
  180. min-width="160"
  181. show-overflow-tooltip
  182. />
  183. <el-table-column align="right" label="上交资料" prop="dataQty" min-width="160" show-overflow-tooltip />
  184. <!-- <el-table-column
  185. align="right"
  186. label="收差全额"
  187. prop="diffAmount"
  188. min-width="160"
  189. show-overflow-tooltip
  190. /> -->
  191. </el-table>
  192. </div>
  193. </div>
  194. <h3 class="gdzl">工程资料</h3>
  195. <el-button :disabled="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn"
  196. >批量下载</el-button
  197. >
  198. <el-divider />
  199. <!-- 列表 -->
  200. <div class="mymain-container">
  201. <div class="table">
  202. <el-table
  203. v-loading="listLoading"
  204. :data="details.dataList"
  205. element-loading-text="Loading"
  206. border
  207. fit
  208. highlight-current-row
  209. stripe
  210. >
  211. <el-table-column align="left" label="资料描述" prop="dataDescribe" min-width="160" show-overflow-tooltip />
  212. <el-table-column align="left" label="原文件名" prop="fileName" min-width="160" show-overflow-tooltip />
  213. <el-table-column align="left" label="缩略图" prop="fileUrl" min-width="160" show-overflow-tooltip>
  214. <template slot-scope="scope">
  215. <el-image
  216. v-if="checkFileType(scope.row.fileUrl) == 'image'"
  217. ref="img"
  218. :src="imageURL + scope.row.fileUrl"
  219. style="width: 120px; height: 120px"
  220. fit="cover"
  221. :preview-src-list="[imageURL + scope.row.fileUrl]"
  222. />
  223. <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png" />
  224. <img v-if="checkFileType(scope.row.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png" />
  225. <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
  226. <img
  227. v-if="checkFileType(scope.row.fileUrl) == 'pdf'"
  228. class="file"
  229. style="cursor: pointer"
  230. src="@/assets/common/pdf.png"
  231. @click="openPdf(scope.row.fileUrl)"
  232. />
  233. <img
  234. v-if="checkFileType(scope.row.fileUrl) == 'file'"
  235. class="file aaa"
  236. src="@/assets/common/zip.jpeg"
  237. />
  238. </template>
  239. </el-table-column>
  240. <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
  241. <template slot-scope="scope">
  242. {{ '资料_' + scope.row.fileName }}
  243. </template>
  244. </el-table-column>
  245. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
  246. <template slot-scope="scope">
  247. <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
  248. >下载</el-button
  249. >
  250. <!-- <el-button-->
  251. <!-- v-if="checkFileType(scope.row.fileUrl) == 'pdf'"-->
  252. <!-- type="text"-->
  253. <!-- class="textColor"-->
  254. <!-- @click="openPdf(scope.row.fileUrl)"-->
  255. <!-- >-->
  256. <!-- 查看-->
  257. <!-- </el-button>-->
  258. </template>
  259. </el-table-column>
  260. </el-table>
  261. </div>
  262. </div>
  263. <div class="diy-table-1">
  264. <el-row :gutter="0">
  265. <el-col :xs="12" :sm="12" :lg="12" class="item">
  266. <div class="label">申请人</div>
  267. <div class="value">{{ details.createBy }}</div>
  268. </el-col>
  269. <el-col :xs="12" :sm="12" :lg="12" class="item">
  270. <div class="label">申请日期</div>
  271. <div class="value">{{ details.createTime }}</div>
  272. </el-col>
  273. <el-col :xs="24" :sm="24" :lg="24" class="item">
  274. <div class="label">申请退押金</div>
  275. <div class="value">{{ details.applyNote }}</div>
  276. </el-col>
  277. </el-row>
  278. </div>
  279. <div style="margin-top: 25px">审批</div>
  280. <el-divider />
  281. <div class="diy-table-1">
  282. <el-row :gutter="0">
  283. <el-col :xs="12" :sm="12" :lg="12" class="item">
  284. <div class="label">验收人</div>
  285. <div class="value">{{ details.checkBy }}</div>
  286. </el-col>
  287. <el-col :xs="12" :sm="12" :lg="12" class="item">
  288. <div class="label">验收日期</div>
  289. <div class="value">{{ details.checkDate }}</div>
  290. </el-col>
  291. <el-col :xs="12" :sm="12" :lg="12" class="item">
  292. <div class="label">是否退押</div>
  293. <div class="value">
  294. <template
  295. v-if="
  296. !(
  297. details.examineStatus == 'WAIT' ||
  298. details.examineStatus == 'SAVE' ||
  299. details.examineStatus == 'CLOSE'
  300. )
  301. "
  302. >
  303. {{ details.isRefundDeposit == true ? '是' : '否' }}
  304. </template>
  305. </div>
  306. </el-col>
  307. <el-col :xs="12" :sm="12" :lg="12" class="item">
  308. <div class="label">审批结果</div>
  309. <div v-if="details.examineStatus == 'Ok'" class="value">通过</div>
  310. <div v-if="details.confirmName && details.examineStatus == 'SAVE'" class="value">驳回</div>
  311. </el-col>
  312. <el-col :xs="24" :sm="24" :lg="24" class="item">
  313. <div class="label">验收说明</div>
  314. <div class="value">{{ details.checkNote }}</div>
  315. </el-col>
  316. <el-col v-if="details.confirmName" :xs="24" :sm="24" :lg="24" class="item">
  317. <div class="label">驳回说明</div>
  318. <div class="value">{{ details.confirmName }}</div>
  319. </el-col>
  320. </el-row>
  321. </div>
  322. <div style="margin: 20px 0">
  323. <el-button type="primary" size="small" @click="handleSvse">保存</el-button>
  324. <el-button type="primary" size="small" @click="handleReset">重置</el-button>
  325. </div>
  326. </div>
  327. <div v-show="engineering == '工程订单信息'">
  328. <h3>工程订单信息</h3>
  329. <el-divider />
  330. <!-- 列表 -->
  331. <div class="mymain-container">
  332. <div class="table">
  333. <el-table
  334. v-loading="listLoading"
  335. :data="dataList"
  336. element-loading-text="Loading"
  337. border
  338. fit
  339. highlight-current-row
  340. stripe
  341. >
  342. <el-table-column align="left" label="工程订单号" prop="enginOrderNo" min-width="160" show-overflow-tooltip>
  343. <template slot-scope="scope">
  344. <CopyButton :copyText="scope.row.enginOrderNo" />
  345. <span>{{ scope.row.enginOrderNo }}</span>
  346. </template>
  347. </el-table-column>
  348. <el-table-column align="left" label="订单日期" prop="orderDate" min-width="160" show-overflow-tooltip />
  349. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  350. <template slot-scope="scope">
  351. <CopyButton :copyText="scope.row.materialName" />
  352. <span>{{ scope.row.materialName }}</span>
  353. </template>
  354. </el-table-column>
  355. <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  356. <template slot-scope="scope">
  357. <CopyButton :copyText="scope.row.specification" />
  358. <span>{{ scope.row.specification }}</span>
  359. </template>
  360. </el-table-column>
  361. <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip />
  362. <el-table-column align="right" label="数量" prop="qty" min-width="160" show-overflow-tooltip />
  363. <el-table-column
  364. align="right"
  365. label="押金金额"
  366. prop="totalDepositAmount"
  367. min-width="160"
  368. show-overflow-tooltip
  369. />
  370. </el-table>
  371. </div>
  372. </div>
  373. </div>
  374. <div v-show="engineering == '工程发货信息'">
  375. <h3>工程发货信息</h3>
  376. <el-divider />
  377. <!-- 列表 -->
  378. <div class="mymain-container">
  379. <div class="table">
  380. <el-table
  381. v-loading="listLoading"
  382. :data="projectList"
  383. element-loading-text="Loading"
  384. border
  385. fit
  386. highlight-current-row
  387. stripe
  388. >
  389. <el-table-column align="left" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
  390. <template slot-scope="scope">
  391. <CopyButton :copyText="scope.row.id" />
  392. <span>{{ scope.row.id }}</span>
  393. </template>
  394. </el-table-column>
  395. <el-table-column align="left" label="发货申请日期" prop="theTime" min-width="160" show-overflow-tooltip />
  396. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  397. <template slot-scope="scope">
  398. <CopyButton :copyText="scope.row.materialName" />
  399. <span>{{ scope.row.materialName }}</span>
  400. </template>
  401. </el-table-column>
  402. <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  403. <template slot-scope="scope">
  404. <CopyButton :copyText="scope.row.specification" />
  405. <span>{{ scope.row.specification }}</span>
  406. </template>
  407. </el-table-column>
  408. <el-table-column align="right" label="单价" prop="price" min-width="160" show-overflow-tooltip />
  409. <el-table-column align="right" label="数量" prop="refundableQty" min-width="160" show-overflow-tooltip />
  410. <el-table-column
  411. align="right"
  412. label="押金金额"
  413. prop="totalDepositAmount"
  414. min-width="160"
  415. show-overflow-tooltip
  416. >
  417. <template slot-scope="scope">
  418. {{ (scope.row.refundableQty || 0) * (scope.row.singleDepositAmount || 0) }}
  419. </template>
  420. </el-table-column>
  421. </el-table>
  422. </div>
  423. </div>
  424. </div>
  425. <div v-show="engineering == '直调发货'" class="zd">
  426. <div class="table" style="margin-top: 20px">
  427. <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe>
  428. <el-table-column align="left" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
  429. <template slot-scope="scope">
  430. <CopyButton :copyText="scope.row.id" />
  431. <span>{{ scope.row.id }}</span>
  432. </template>
  433. </el-table-column>
  434. <el-table-column align="left" label="发货申请日期" prop="orderTime" min-width="160" show-overflow-tooltip />
  435. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  436. <template slot-scope="scope">
  437. <CopyButton :copyText="scope.row.materialName" />
  438. <span>{{ scope.row.materialName }}</span>
  439. </template>
  440. </el-table-column>
  441. <el-table-column align="left" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  442. <template slot-scope="scope">
  443. <CopyButton :copyText="scope.row.specification" />
  444. <span>{{ scope.row.specification }}</span>
  445. </template>
  446. </el-table-column>
  447. <el-table-column align="rihgt" label="单价" prop="price" min-width="160" show-overflow-tooltip />
  448. <el-table-column align="right" label="数量" prop="refundableQty" min-width="160" show-overflow-tooltip />
  449. <el-table-column
  450. align="right"
  451. label="押金金额"
  452. prop="totalDepositAmount"
  453. min-width="160"
  454. show-overflow-tooltip
  455. >
  456. <template slot-scope="scope">
  457. {{ (scope.row.qty || 0) * (scope.row.singleDepositAmount || 0) }}
  458. </template>
  459. </el-table-column>
  460. </el-table>
  461. </div>
  462. </div>
  463. </div>
  464. </template>
  465. <script>
  466. import { editInfo, geDetail, geOrderInfo, getListProject } from '@/api/engin_deposit.js'
  467. import { getList } from '@/api/supply/adjust'
  468. import { downloadFiles, downloadPdf } from '@/utils/util'
  469. import { getFileUrl } from '@/api/common'
  470. export default {
  471. data() {
  472. return {
  473. isDis: true,
  474. listLoading: false,
  475. engineering: '工程押金信息',
  476. dataList: [],
  477. projectList: [],
  478. details: {},
  479. goodsList: [],
  480. warehouseList: [],
  481. positionList: [],
  482. imageURL: this.$imageUrl,
  483. deliverForm: {
  484. date: '',
  485. warehouse: '',
  486. position: ''
  487. },
  488. deliverFormRules: {
  489. date: [{ required: true, message: '请选择发货日期', trigger: 'change' }],
  490. warehouse: [{ required: true, message: '请选择发货仓库', trigger: 'change' }],
  491. position: [{ required: true, message: '请选择仓位', trigger: 'change' }]
  492. },
  493. orderType: {
  494. TRADE: '商用',
  495. HOME: '家用',
  496. RETAIL: '零售单',
  497. RETAIL_POLICY: '销售政策单'
  498. }
  499. }
  500. },
  501. computed: {
  502. isCustomer() {
  503. return this.$store.getters.customerId && this.$store.getters.customerNumber
  504. }
  505. },
  506. created() {
  507. this.getDetail()
  508. },
  509. methods: {
  510. getDetail() {
  511. if (this.engineering == '工程押金信息') {
  512. geDetail({ id: this.$parent.depositManageId }).then(res => {
  513. this.details = res.data
  514. if (res.data.dataList.length == 0) {
  515. this.isDis = true
  516. } else {
  517. this.isDis = false
  518. }
  519. res.data.items.forEach(item => {
  520. // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
  521. item.sums1 = ['hasSendQty', 'dataQty', 'qty']
  522. item.sums2 = ['totalAmount', 'diffAmount', 'price']
  523. })
  524. })
  525. } else if (this.engineering == '工程订单信息') {
  526. geOrderInfo({
  527. refEnginRecordNo: this.$parent.refEnginRecordNo,
  528. examineStatus: 'OK'
  529. }).then(res => {
  530. this.dataList = res.data
  531. })
  532. } else if (this.engineering == '直调发货') {
  533. getListProject({
  534. pageSize: -1,
  535. pageNum: 1,
  536. type: 3,
  537. refEnginRecordNo: this.$parent.refEnginRecordNo,
  538. examineStatus: 'OK'
  539. }).then(res => {
  540. this.goodsList = res.data.records
  541. })
  542. } else {
  543. getListProject({
  544. pageSize: -1,
  545. pageNum: 1,
  546. refEnginRecordNo: this.$parent.refEnginRecordNo,
  547. examineStatus: 'OK'
  548. }).then(res => {
  549. this.projectList = res.data.records
  550. })
  551. }
  552. },
  553. // 批量下载
  554. async batchDownloadFn() {
  555. downloadFiles('deposit-manage/downZip', { parentId: this.$parent.depositManageId })
  556. },
  557. // 下载
  558. downLoadFn(v, fileName) {
  559. if (this.checkFileType(v) === 'pdf') {
  560. downloadPdf(this.$imageUrl + v, fileName)
  561. return
  562. }
  563. downloadFiles('common/file/getStream', { key: v, fileName: fileName })
  564. // getFileUrl({ key: v }).then((res) => {
  565. // window.open(res.data)
  566. // })
  567. },
  568. openPdf(pdfUrl) {
  569. window.open(this.$imageUrl + pdfUrl)
  570. },
  571. // 检查文件类型
  572. checkFileType(url) {
  573. if (!url) return ''
  574. const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
  575. if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
  576. return 'image'
  577. } else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
  578. return 'word'
  579. } else if (['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
  580. return 'excel'
  581. } else if (['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
  582. return 'ppt'
  583. } else if (['pdf'].includes(fileSuffix)) {
  584. return 'pdf'
  585. } else if (['zip', 'rar', 'gz', 'apk'].includes(fileSuffix)) {
  586. return 'file'
  587. } else {
  588. return ''
  589. }
  590. },
  591. goBack() {
  592. this.$parent.showPage = 1
  593. },
  594. handleRadio(e) {
  595. this.getDetail()
  596. },
  597. handleSvse() {
  598. this.details.isRefundDeposit = this.details.isRefundDeposit == true
  599. editInfo(this.details).then(res => {
  600. this.$successMsg('编辑成功')
  601. this.$parent.showPage = 1
  602. })
  603. },
  604. handleReset() {
  605. this.$refs.form.resetFields()
  606. }
  607. }
  608. }
  609. </script>
  610. <style scoped lang="scss">
  611. .aaa {
  612. height: 64px;
  613. width: 64px;
  614. }
  615. .gdzl {
  616. display: inline-block;
  617. }
  618. .batchDownload {
  619. float: right;
  620. margin-top: 9px;
  621. }
  622. ::v-deep .el-input__prefix {
  623. display: none;
  624. left: 65px !important;
  625. -webkit-transition: all 0.3s;
  626. transition: all 0.3s;
  627. }
  628. ::v-deep .el-date-editor.el-input {
  629. width: 100%;
  630. box-sizing: border-box;
  631. padding-left: 10px;
  632. }
  633. .diy-table-1 {
  634. ::v-deep .el-form-item {
  635. margin: 0;
  636. }
  637. }
  638. .zd {
  639. ::v-deep .el-input__suffix {
  640. right: 0;
  641. -webkit-transition: all 0.3s;
  642. transition: all 0.3s;
  643. }
  644. }
  645. ::v-deep .el-input__suffix {
  646. right: -15px;
  647. -webkit-transition: all 0.3s;
  648. transition: all 0.3s;
  649. }
  650. </style>