refund_list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <template>
  2. <div class="app-container">
  3. <div v-if="showSurrender">
  4. <el-radio-group @change="changeRadioFn" v-model="examine" size="mini">
  5. <el-radio-button label="">全部</el-radio-button>
  6. <el-radio-button label="SAVE">保存</el-radio-button>
  7. <el-radio-button label="WAIT">待审核</el-radio-button>
  8. <el-radio-button label="FAIL">审核驳回</el-radio-button>
  9. <el-radio-button label="OK">审核通过</el-radio-button>
  10. </el-radio-group>
  11. <br /><br />
  12. <!-- 筛选条件 -->
  13. <div>
  14. <el-form ref="searchForm" :model="searchForm" label-width="120px" size="mini" label-position="left">
  15. <el-row :gutter="10">
  16. <el-col :xs="24" :sm="12" :lg="6">
  17. <el-form-item label="工程登录编号" prop="refEnginRecordNo">
  18. <el-input v-model="searchForm.refEnginRecordNo" placeholder="请输入"></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :xs="24" :sm="12" :lg="6">
  22. <el-form-item label="经销商编码" prop="customerKeyword">
  23. <el-input v-model="searchForm.customerKeyword" placeholder="请输入"></el-input>
  24. </el-form-item>
  25. </el-col>
  26. <!-- <el-col :xs="24" :sm="12" :lg="6">
  27. <el-form-item label="经销商名称" prop="customerKeyword">
  28. <el-input
  29. v-model="searchForm.customerKeyword"
  30. placeholder="请输入"
  31. ></el-input>
  32. </el-form-item>
  33. </el-col> -->
  34. <el-col :xs="24" :sm="12" :lg="6">
  35. <el-form-item label="使用单位" prop="refProjectName">
  36. <el-input v-model="searchForm.refProjectName" placeholder="请输入"></el-input>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :xs="24" :sm="12" :lg="6">
  40. <el-form-item label="审核人" prop="confirmName">
  41. <el-input v-model="searchForm.confirmName" placeholder="请输入"></el-input>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :xs="24" :sm="12" :lg="6">
  45. <el-form-item label="机型" prop="startSpecification">
  46. <!-- <div class="fanwei">
  47. <el-input v-model="searchForm.startSpecification"></el-input>
  48. <span>-</span>
  49. <el-input v-model="searchForm.endSpecification"></el-input>
  50. </div> -->
  51. <el-input v-model="searchForm.startSpecification" placeholder="请输入"></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :xs="24" :sm="12" :lg="6">
  55. <!-- <el-form-item label="特价编号" prop="refProjectName">
  56. <el-input v-model="searchForm.refProjectName" placeholder="请输入"></el-input>
  57. </el-form-item> -->
  58. <el-form-item label="特价编号" prop="startSpecialNo">
  59. <!-- <div class="fanwei">
  60. <el-input v-model="searchForm.startSpecialNo"></el-input>
  61. <span>-</span>
  62. <el-input v-model="searchForm.endSpecialNo"></el-input>
  63. </div> -->
  64. <el-input v-model="searchForm.startSpecialNo" placeholder="请输入"></el-input>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :xs="24" :sm="12" :lg="6">
  68. <el-form-item label="厂编号" prop="startRefFactoryNo">
  69. <!-- <div class="fanwei">
  70. <el-input v-model="searchForm.startRefFactoryNo"></el-input>
  71. <span>-</span>
  72. <el-input v-model="searchForm.endRefFactoryNo"></el-input>
  73. </div> -->
  74. <el-input v-model="searchForm.startRefFactoryNo" placeholder="请输入"></el-input>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :xs="24" :sm="12" :lg="6">
  78. <el-form-item label="安装日期" prop="">
  79. <div class="fanwei">
  80. <el-date-picker class="dateStyle" v-model="searchForm.startInstallTime" type="datetime" placeholder="" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" />
  81. <span>-</span>
  82. <el-date-picker class="dateStyle" v-model="searchForm.endInstallTime" type="datetime" placeholder="" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" />
  83. </div>
  84. </el-form-item>
  85. </el-col>
  86. <!-- <el-col :xs="24" :sm="12" :lg="6">
  87. <el-form-item label="开始安装日期" prop="startInstallTime">
  88. <el-date-picker class="dateStyle" v-model="searchForm.startInstallTime" type="datetime" placeholder="" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" />
  89. </el-form-item>
  90. </el-col>
  91. <el-col :xs="24" :sm="12" :lg="6">
  92. <el-form-item label="结束安装日期" prop="endInstallTime">
  93. <el-date-picker class="dateStyle" v-model="searchForm.endInstallTime" type="datetime" placeholder="" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss" />
  94. </el-form-item>
  95. </el-col> -->
  96. <el-col :xs="24" :sm="12" :lg="6">
  97. <el-form-item label="区域" prop="refRegionWork">
  98. <el-input v-model="searchForm.refRegionWork" placeholder="请输入"></el-input>
  99. </el-form-item>
  100. </el-col>
  101. <!-- <el-col :xs="24" :sm="12" :lg="6">
  102. <el-form-item label="发货申请开始日期" prop="startDeliverTime">
  103. <el-date-picker
  104. class="dateStyle"
  105. v-model="searchForm.startDeliverTime"
  106. type="datetime"
  107. placeholder=""
  108. default-time="00:00:00"
  109. value-format="yyyy-MM-dd HH:mm:ss"
  110. >
  111. </el-date-picker>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :xs="24" :sm="12" :lg="6">
  115. <el-form-item label="发货申请结束日期" prop="endDeliverTime">
  116. <el-date-picker
  117. v-model="searchForm.endDeliverTime"
  118. class="dateStyle"
  119. type="datetime"
  120. placeholder=""
  121. default-time="23:59:59"
  122. value-format="yyyy-MM-dd HH:mm:ss"
  123. >
  124. </el-date-picker>
  125. </el-form-item>
  126. </el-col> -->
  127. <!-- <el-col :xs="24" :sm="12" :lg="6">
  128. <el-form-item label="产品名称" prop="">
  129. <el-input placeholder="请输入"></el-input>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :xs="24" :sm="12" :lg="6">
  133. <el-form-item label="规格型号" prop="">
  134. <el-input placeholder="请输入"></el-input>
  135. </el-form-item>
  136. </el-col> -->
  137. <el-col :xs="24" :sm="12" :lg="18">
  138. <el-form-item label="" class="fr">
  139. <el-button size="mini" @click="resetFn">清空</el-button>
  140. <el-button size="mini" type="primary" @click="searchFn">搜索</el-button>
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. </el-form>
  145. </div>
  146. <!-- 按钮 -->
  147. <div class="btn-group clearfix">
  148. <div class="fl">
  149. <!-- <el-radio-group @change="changeEnginOrderTypeFn" v-model="enginOrderType" size="mini">
  150. <el-radio-button label="HOME">家用工程</el-radio-button>
  151. <el-radio-button label="TRADE">商用工程</el-radio-button>
  152. </el-radio-group> -->
  153. <el-button type="primary" size="mini" @click="syncDateFn">同步资料日期</el-button>
  154. </div>
  155. <div class="fr">
  156. <el-button type="primary" size="mini" @click="exportFn">导出</el-button>
  157. <el-upload class="import-btn" action="" :http-request="handleImport" :file-list="importFileList" :show-file-list="false">
  158. <el-button type="primary" size="mini">导入</el-button>
  159. </el-upload>
  160. </div>
  161. </div>
  162. <!-- 列表 -->
  163. <div class="mymain-container">
  164. <div class="table">
  165. <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange" show-summary :summary-method="$getSummaries">
  166. >
  167. <el-table-column type="selection" align="center" width="55">
  168. </el-table-column>
  169. <el-table-column align="left" label="状态" prop="" min-width="160" show-overflow-tooltip>
  170. <template v-slot="{ row }">
  171. <el-tag size="mini" v-show="row.examineStatus == 'SAVE'">保存</el-tag>
  172. <el-tag size="mini" v-show="row.examineStatus == 'WAIT'" type="warning">待审核</el-tag>
  173. <el-tag size="mini" v-show="row.examineStatus == 'OK'" type="success">通过</el-tag>
  174. <el-tag size="mini" v-show="row.examineStatus == 'FAIL'" type="danger">不通过</el-tag>
  175. </template>
  176. </el-table-column>
  177. <el-table-column align="left" label="工程登录编号" prop="refEnginRecordNo" min-width="160" show-overflow-tooltip>
  178. <template slot-scope="scope">
  179. <CopyButton :copyText="scope.row.refEnginRecordNo" />
  180. <span>{{scope.row.refEnginRecordNo}}</span>
  181. </template>
  182. </el-table-column>
  183. <el-table-column align="left" label="项目类别" prop="refProjectName" min-width="160" show-overflow-tooltip>
  184. <template slot-scope="scope">
  185. <CopyButton :copyText="scope.row.refProjectName" />
  186. <span>{{scope.row.refProjectName}}</span>
  187. </template>
  188. </el-table-column>
  189. <el-table-column align="left" label="机型" prop="specification" min-width="160" show-overflow-tooltip>
  190. <template slot-scope="scope">
  191. <CopyButton :copyText="scope.row.specification" />
  192. <span>{{scope.row.a}}</span>
  193. </template>
  194. </el-table-column>
  195. <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
  196. <template slot-scope="scope">
  197. <CopyButton :copyText="scope.row.customerNumber" />
  198. <span>{{scope.row.customerNumber}}</span>
  199. </template>
  200. </el-table-column>
  201. <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
  202. <template slot-scope="scope">
  203. <CopyButton :copyText="scope.row.customerName" />
  204. <span>{{scope.row.customerName}}</span>
  205. </template>
  206. </el-table-column>
  207. <el-table-column align="left" label="跨区厂编号" prop="refFactoryNo" min-width="260" show-overflow-tooltip>
  208. <template slot-scope="scope">
  209. <CopyButton :copyText="scope.row.refFactoryNo" />
  210. <span>{{scope.row.refFactoryNo}}</span>
  211. </template>
  212. </el-table-column>
  213. <!-- <el-table-column align="left" label="产品编码" prop="customerName" min-width="260" show-overflow-tooltip>
  214. <template slot-scope="scope">
  215. <CopyButton :copyText="scope.row.customerName" />
  216. <span>{{scope.row.customerName}}</span>
  217. </template>
  218. </el-table-column>
  219. <el-table-column align="left" label="物料编码" prop="customerName" min-width="260" show-overflow-tooltip>
  220. <template slot-scope="scope">
  221. <CopyButton :copyText="scope.row.customerName" />
  222. <span>{{scope.row.customerName}}</span>
  223. </template>
  224. </el-table-column>
  225. <el-table-column align="left" label="产品名称" prop="customerName" min-width="260" show-overflow-tooltip>
  226. <template slot-scope="scope">
  227. <CopyButton :copyText="scope.row.customerName" />
  228. <span>{{scope.row.customerName}}</span>
  229. </template>
  230. </el-table-column>
  231. <el-table-column align="left" label="规格型号" prop="customerName" min-width="260" show-overflow-tooltip>
  232. <template slot-scope="scope">
  233. <CopyButton :copyText="scope.row.customerName" />
  234. <span>{{scope.row.customerName}}</span>
  235. </template>
  236. </el-table-column> -->
  237. <el-table-column align="right" label="押金金额" prop="depositAmount" min-width="160" show-overflow-tooltip>
  238. <template slot-scope="scope">
  239. {{ scope.row.depositAmount | numToFixed }}
  240. </template>
  241. </el-table-column>
  242. <el-table-column align="right" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip>
  243. </el-table-column>
  244. <el-table-column align="right" label="特价编号" prop="specialNo" min-width="160" show-overflow-tooltip>
  245. </el-table-column>
  246. <el-table-column align="right" label="厂编号" prop="factoryNo" min-width="160" show-overflow-tooltip>
  247. </el-table-column>
  248. <el-table-column align="right" label="安装日期" prop="installDate" min-width="160" show-overflow-tooltip>
  249. </el-table-column>
  250. <el-table-column align="left" label="审核人" prop="confirmBy" min-width="160" show-overflow-tooltip>
  251. <template slot-scope="scope">
  252. <CopyButton :copyText="scope.row.confirmBy" />
  253. <span>{{scope.row.confirmBy}}</span>
  254. </template>
  255. </el-table-column>
  256. <el-table-column align="left" label="区域" prop="refRegionWork" min-width="160" show-overflow-tooltip>
  257. <template slot-scope="scope">
  258. <CopyButton :copyText="scope.row.refRegionWork" />
  259. <span>{{scope.row.refRegionWork}}</span>
  260. </template>
  261. </el-table-column>
  262. <el-table-column fixed="right" align="center" label="操作" min-width="160" show-overflow-tooltip>
  263. <template slot-scope="scope">
  264. <el-button type="text" class="textColor" v-if="
  265. scope.row.examineStatus == 'WAIT' &&
  266. $checkBtnRole('examine', $route.meta.roles)
  267. " @click="examineFn(scope.row.depositManageId)">审批</el-button>
  268. <el-button type="text" class="textColor" v-if="
  269. scope.row.examineStatus == 'SAVE' ||
  270. scope.row.examineStatus == 'OK' ||
  271. scope.row.examineStatus == 'FAIL'
  272. " @click="infoFn(scope.row.depositManageId)">详情</el-button>
  273. </template>
  274. </el-table-column>
  275. </el-table>
  276. </div>
  277. <!-- 分页 -->
  278. <div class="fr">
  279. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
  280. </el-pagination>
  281. </div>
  282. </div>
  283. </div>
  284. <RefundListDetail @updateList="updateList" :detailId="detailId" v-else />
  285. </div>
  286. </template>
  287. <script>
  288. import {
  289. getDepositManageList,
  290. getDepositManageDate,
  291. getDepositManagExport,
  292. } from "@/api/engin_deposit/refund_list";
  293. import { downloadFiles, handleImport } from "@/utils/util";
  294. import RefundListDetail from "./components/refund_list-detail.vue";
  295. export default {
  296. components: {
  297. RefundListDetail,
  298. },
  299. data() {
  300. return {
  301. importFileList: [],
  302. enginOrderType: "HOME", //列表类型
  303. currentPage: 1, // 当前页码
  304. pageSize: 10, // 每页数量
  305. listTotal: 0, // 列表总数
  306. dataList: [], // 列表数据
  307. searchForm: {
  308. refEnginRecordNo: "",
  309. customerKeyword: "",
  310. refProjectName: "",
  311. confirmName: "",
  312. startSpecification: "",
  313. endSpecification: "",
  314. startSpecialNo: "",
  315. endSpecialNo: "",
  316. startRefFactoryNo: "",
  317. endRefFactoryNo: "",
  318. startInstallTime: "",
  319. endInstallTime: "",
  320. refRegionWork: "",
  321. }, //搜索表单
  322. listLoading: false, // 列表加载loading
  323. examine: "",
  324. showSurrender: true,
  325. detailId: "",
  326. selectData: [],
  327. };
  328. },
  329. created() {
  330. this.getDataList({
  331. pageSize: this.pageSize,
  332. pageNum: this.currentPage,
  333. confirmName: "",
  334. createName: "",
  335. customerKeyword: "",
  336. // endDeliverTime: "",
  337. enginOrderNo: "",
  338. enginOrderType: this.enginOrderType,
  339. examineStatus: "",
  340. refEnginRecordNo: "",
  341. refProjectName: "",
  342. refUseUnit: "",
  343. // startDeliverTime: "",
  344. });
  345. },
  346. methods: {
  347. //同步资料日期
  348. async syncDateFn() {
  349. await getDepositManageDate();
  350. this.$message.success("同步资料日期成功");
  351. },
  352. // 导入
  353. async handleImport(param) {
  354. const file = param.file;
  355. const formData = new FormData();
  356. formData.append("file", file);
  357. let result = await handleImport("/deposit-manage/import", formData);
  358. console.log(result);
  359. this.importFileList = [];
  360. if (result.code == 200) {
  361. this.$message.success("导入成功");
  362. this.getDataList({
  363. pageSize: this.pageSize,
  364. pageNum: this.currentPage,
  365. confirmName: "",
  366. createName: "",
  367. customerKeyword: "",
  368. // endDeliverTime: "",
  369. enginOrderNo: "",
  370. enginOrderType: this.enginOrderType,
  371. examineStatus: "",
  372. refEnginRecordNo: "",
  373. refProjectName: "",
  374. refUseUnit: "",
  375. // startDeliverTime: "",
  376. });
  377. } else {
  378. this.$message.error(result.message);
  379. }
  380. },
  381. //审批后更新列表数据
  382. updateList() {
  383. this.getDataList({
  384. pageSize: this.pageSize,
  385. pageNum: this.currentPage,
  386. confirmName: "",
  387. createName: "",
  388. customerKeyword: "",
  389. // endDeliverTime: "",
  390. enginOrderNo: "",
  391. enginOrderType: this.enginOrderType,
  392. examineStatus: "",
  393. refEnginRecordNo: "",
  394. refProjectName: "",
  395. refUseUnit: "",
  396. // startDeliverTime: "",
  397. });
  398. },
  399. //切换列表
  400. changeEnginOrderTypeFn(v) {
  401. // console.log(v);
  402. this.pageSize = 10;
  403. this.currentPage = 1;
  404. this.getDataList({
  405. pageSize: this.pageSize,
  406. pageNum: this.currentPage,
  407. confirmName: "",
  408. createName: "",
  409. customerKeyword: "",
  410. // endDeliverTime: "",
  411. enginOrderNo: "",
  412. enginOrderType: v,
  413. examineStatus: this.examine,
  414. refEnginRecordNo: "",
  415. refProjectName: "",
  416. refUseUnit: "",
  417. // startDeliverTime: "",
  418. });
  419. },
  420. // 更改每页数量
  421. handleSizeChange(val) {
  422. this.pageSize = val;
  423. this.currentPage = 1;
  424. this.getDataList({
  425. pageSize: this.pageSize,
  426. pageNum: this.currentPage,
  427. confirmName: "",
  428. createName: "",
  429. customerKeyword: "",
  430. // endDeliverTime: "",
  431. enginOrderNo: "",
  432. enginOrderType: this.enginOrderType,
  433. examineStatus: this.examine,
  434. refEnginRecordNo: "",
  435. refProjectName: "",
  436. refUseUnit: "",
  437. // startDeliverTime: "",
  438. });
  439. },
  440. // 更改当前页
  441. handleCurrentChange(val) {
  442. this.currentPage = val;
  443. this.getDataList({
  444. pageSize: this.pageSize,
  445. pageNum: this.currentPage,
  446. confirmName: "",
  447. createName: "",
  448. customerKeyword: "",
  449. // endDeliverTime: "",
  450. enginOrderNo: "",
  451. enginOrderType: this.enginOrderType,
  452. examineStatus: this.examine,
  453. refEnginRecordNo: "",
  454. refProjectName: "",
  455. refUseUnit: "",
  456. // startDeliverTime: "",
  457. });
  458. },
  459. //切换radio
  460. changeRadioFn(v) {
  461. this.examine = v;
  462. this.getDataList({
  463. pageSize: this.pageSize,
  464. pageNum: this.currentPage,
  465. confirmName: "",
  466. createName: "",
  467. customerKeyword: "",
  468. // endDeliverTime: "",
  469. enginOrderNo: "",
  470. enginOrderType: this.enginOrderType,
  471. examineStatus: this.examine,
  472. refEnginRecordNo: "",
  473. refProjectName: "",
  474. refUseUnit: "",
  475. // startDeliverTime: "",
  476. });
  477. },
  478. //导出
  479. exportFn() {
  480. if (this.selectData.length) {
  481. const arr = [];
  482. for (let i = 0; i < this.selectData.length; i++) {
  483. arr.push(this.selectData[i].depositManageId);
  484. }
  485. downloadFiles("/deposit-manage/export", {
  486. id: arr,
  487. orderType: "HOME",
  488. });
  489. } else {
  490. this.$errorMsg("请选择押金项");
  491. }
  492. },
  493. //多选列表数据
  494. handleSelectionChange(selectData) {
  495. this.selectData = selectData;
  496. },
  497. //重置
  498. resetFn() {
  499. this.searchForm.startInstallTime = "";
  500. this.searchForm.endInstallTime = "";
  501. this.$refs.searchForm.resetFields();
  502. // this.searchForm.endSpecification = "";
  503. // this.searchForm.endSpecialNo = "";
  504. // this.searchForm.endRefFactoryNo = "";
  505. },
  506. //搜索
  507. searchFn() {
  508. this.getDataList({
  509. pageSize: this.pageSize,
  510. pageNum: this.currentPage,
  511. confirmName: "",
  512. createName: "",
  513. enginOrderNo: "",
  514. enginOrderType: this.enginOrderType,
  515. examineStatus: this.examine,
  516. refUseUnit: "",
  517. ...this.searchForm,
  518. });
  519. },
  520. //详情
  521. infoFn(id) {
  522. this.detailId = id;
  523. this.showSurrender = false;
  524. },
  525. async getDataList(data) {
  526. const res = await getDepositManageList(data);
  527. res.data.records.forEach((item) => {
  528. item.sums1 = [];
  529. item.sums2 = ["depositAmount"];
  530. });
  531. this.dataList = res.data.records;
  532. this.listTotal = res.data.total;
  533. },
  534. examineFn(id) {
  535. this.detailId = id;
  536. this.showSurrender = false;
  537. },
  538. },
  539. };
  540. </script>
  541. <style lang="scss" scoped>
  542. .dateStyle {
  543. width: 100%;
  544. }
  545. .import-btn {
  546. margin-left: 10px;
  547. display: inline-block;
  548. }
  549. .fanwei {
  550. display: flex;
  551. span {
  552. margin: 0 20px;
  553. }
  554. }
  555. </style>