refund_list-detail.vue 27 KB

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