refund_list-detail.vue 29 KB

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