refund_list-detail.vue 28 KB

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