index.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. <template>
  2. <div class="app-container">
  3. <!-- 搜索工作栏 -->
  4. <el-form
  5. :model="queryParams"
  6. ref="queryForm"
  7. size="small"
  8. :inline="true"
  9. v-show="showSearch"
  10. label-width="68px"
  11. >
  12. <el-form-item label="申请单号" prop="requestNo">
  13. <el-input
  14. v-model="queryParams.requestNo"
  15. placeholder="请输入申请单号"
  16. clearable
  17. @keyup.enter.native="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button type="primary" icon="el-icon-search" @click="handleQuery"
  22. >搜索</el-button
  23. >
  24. <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
  25. </el-form-item>
  26. </el-form>
  27. <!-- 操作工具栏 -->
  28. <el-row :gutter="10" class="mb8">
  29. <el-col :span="1.5">
  30. <el-button
  31. type="primary"
  32. plain
  33. icon="el-icon-plus"
  34. size="mini"
  35. @click="openForm(undefined)"
  36. v-hasPermi="['rtkwms:in-request:create']"
  37. >新增</el-button
  38. >
  39. </el-col>
  40. <el-col :span="1.5">
  41. <el-button
  42. type="warning"
  43. plain
  44. icon="el-icon-download"
  45. size="mini"
  46. @click="handleExport"
  47. :loading="exportLoading"
  48. v-hasPermi="['rtkwms:in-request:export']"
  49. >导出</el-button
  50. >
  51. </el-col>
  52. <right-toolbar
  53. :showSearch.sync="showSearch"
  54. @queryTable="getList"
  55. ></right-toolbar>
  56. </el-row>
  57. <el-table
  58. v-loading="loading"
  59. :data="list"
  60. :stripe="true"
  61. :show-overflow-tooltip="true"
  62. >
  63. <!-- <el-table-column label="申请单ID" align="center" prop="id" /> -->
  64. <el-table-column
  65. label="申请单号"
  66. align="center"
  67. width="180px"
  68. prop="requestNo"
  69. />
  70. <!-- <el-table-column label="申请类型" align="center" prop="requestType" /> -->
  71. <el-table-column label="业务类型" align="center" prop="businessType" />
  72. <el-table-column
  73. label="业务分类编码"
  74. align="center"
  75. width="150px"
  76. prop="businessCategory"
  77. />
  78. <el-table-column
  79. label="业务分类名称"
  80. align="center"
  81. width="150px"
  82. prop="businessDescribe"
  83. />
  84. <el-table-column
  85. label="业务子类型"
  86. width="150px"
  87. align="center"
  88. prop="businessSubType"
  89. />
  90. <el-table-column label="状态" align="center" prop="status" />
  91. <el-table-column label="优先级" align="center" prop="priority" />
  92. <!-- <el-table-column label="仓库ID" align="center" prop="warehouseId" />
  93. <el-table-column
  94. label="关联仓库ID"
  95. align="center"
  96. prop="relatedWarehouseId"
  97. /> -->
  98. <el-table-column
  99. label="供应商编码"
  100. align="center"
  101. width="150px"
  102. prop="supplierCode"
  103. />
  104. <el-table-column label="客户编码" align="center" prop="customerCode" />
  105. <el-table-column
  106. label="源单编号"
  107. width="150px"
  108. align="center"
  109. prop="sourceOrderNo"
  110. />
  111. <el-table-column
  112. label="预计出入库时间"
  113. align="center"
  114. prop="expectedTime"
  115. width="180"
  116. >
  117. <template v-slot="scope">
  118. <span>{{ parseTime(scope.row.expectedTime) }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column
  122. label="实际出入库时间"
  123. align="center"
  124. prop="actualTime"
  125. width="180"
  126. >
  127. <template v-slot="scope">
  128. <span>{{ parseTime(scope.row.actualTime) }}</span>
  129. </template>
  130. </el-table-column>
  131. <el-table-column label="总数量" align="center" prop="totalQty" />
  132. <el-table-column label="总SKU数" align="center" prop="totalSku" />
  133. <el-table-column label="总行数" align="center" prop="totalLine" />
  134. <el-table-column
  135. label="备注"
  136. width="150px"
  137. align="center"
  138. prop="remark"
  139. />
  140. <el-table-column
  141. label="创建时间"
  142. align="center"
  143. prop="createTime"
  144. width="180"
  145. >
  146. <template v-slot="scope">
  147. <span>{{ parseTime(scope.row.createTime) }}</span>
  148. </template>
  149. </el-table-column>
  150. <el-table-column label="提交人" align="center" prop="submitter" />
  151. <el-table-column
  152. label="提交时间"
  153. align="center"
  154. prop="submitTime"
  155. width="180"
  156. >
  157. <template v-slot="scope">
  158. <span>{{ parseTime(scope.row.submitTime) }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="审核人" align="center" prop="auditor" />
  162. <el-table-column
  163. label="审核时间"
  164. align="center"
  165. prop="auditTime"
  166. width="180"
  167. >
  168. <template v-slot="scope">
  169. <span>{{ parseTime(scope.row.auditTime) }}</span>
  170. </template>
  171. </el-table-column>
  172. <el-table-column
  173. label="操作"
  174. align="center"
  175. fixed="right"
  176. width="150px"
  177. class-name="small-padding fixed-width"
  178. >
  179. <template v-slot="scope">
  180. <el-button
  181. size="mini"
  182. type="text"
  183. icon="el-icon-edit"
  184. @click="openForm(scope.row.id)"
  185. v-hasPermi="['rtkwms:in-request:update']"
  186. >修改</el-button
  187. >
  188. <el-button
  189. size="mini"
  190. type="text"
  191. icon="el-icon-delete"
  192. @click="handleDelete(scope.row)"
  193. v-hasPermi="['rtkwms:in-request:delete']"
  194. >删除</el-button
  195. >
  196. </template>
  197. </el-table-column>
  198. </el-table>
  199. <!-- 分页组件 -->
  200. <pagination
  201. v-show="total > 0"
  202. :total="total"
  203. :page.sync="queryParams.pageNo"
  204. :limit.sync="queryParams.pageSize"
  205. @pagination="getList"
  206. />
  207. <!-- 对话框(添加 / 修改) -->
  208. <InRequestForm ref="formRef" @success="getList" />
  209. </div>
  210. </template>
  211. <script>
  212. import * as InRequestApi from "@/api/rtkwms/inrequestpda";
  213. import InRequestForm from "./InRequestForm.vue";
  214. export default {
  215. name: "InRequest",
  216. components: {
  217. InRequestForm,
  218. },
  219. data() {
  220. return {
  221. // 遮罩层
  222. loading: true,
  223. // 导出遮罩层
  224. exportLoading: false,
  225. // 显示搜索条件
  226. showSearch: true,
  227. // 总条数
  228. total: 0,
  229. // 入库申请主列表
  230. list: [],
  231. // 是否展开,默认全部展开
  232. isExpandAll: true,
  233. // 重新渲染表格状态
  234. refreshTable: true,
  235. // 选中行
  236. currentRow: {},
  237. // 查询参数
  238. queryParams: {
  239. pageNo: 1,
  240. pageSize: 10,
  241. requestNo: null,
  242. requestType: null,
  243. businessType: null,
  244. businessCategory: null,
  245. businessDescribe: null,
  246. businessSubType: null,
  247. status: null,
  248. priority: null,
  249. warehouseId: null,
  250. relatedWarehouseId: null,
  251. supplierCode: null,
  252. customerCode: null,
  253. sourceOrderNo: null,
  254. expectedTime: [],
  255. actualTime: [],
  256. totalQty: null,
  257. totalSku: null,
  258. totalLine: null,
  259. remark: null,
  260. extendInfo: null,
  261. createTime: [],
  262. submitter: null,
  263. submitTime: [],
  264. auditor: null,
  265. auditTime: [],
  266. erpWriteFlag: null,
  267. erpErrMsg: null,
  268. erpBackId: null,
  269. },
  270. };
  271. },
  272. created() {
  273. this.getList();
  274. },
  275. methods: {
  276. /** 查询列表 */
  277. async getList() {
  278. try {
  279. this.loading = true;
  280. const res = await InRequestApi.getInRequestPage(this.queryParams);
  281. this.list = res.data.list;
  282. this.total = res.data.total;
  283. } finally {
  284. this.loading = false;
  285. }
  286. },
  287. /** 搜索按钮操作 */
  288. handleQuery() {
  289. this.queryParams.pageNo = 1;
  290. this.getList();
  291. },
  292. /** 重置按钮操作 */
  293. resetQuery() {
  294. this.resetForm("queryForm");
  295. this.handleQuery();
  296. },
  297. /** 添加/修改操作 */
  298. openForm(id) {
  299. this.$refs["formRef"].open(id);
  300. },
  301. /** 删除按钮操作 */
  302. async handleDelete(row) {
  303. const id = row.id;
  304. await this.$modal.confirm(
  305. '是否确认删除入库申请主编号为"' + id + '"的数据项?'
  306. );
  307. try {
  308. await InRequestApi.deleteInRequest(id);
  309. await this.getList();
  310. this.$modal.msgSuccess("删除成功");
  311. } catch {}
  312. },
  313. /** 导出按钮操作 */
  314. async handleExport() {
  315. await this.$modal.confirm("是否确认导出所有入库申请主数据项?");
  316. try {
  317. this.exportLoading = true;
  318. const data = await InRequestApi.exportInRequestExcel(this.queryParams);
  319. this.$download.excel(data, "入库申请主.xls");
  320. } catch {
  321. } finally {
  322. this.exportLoading = false;
  323. }
  324. },
  325. },
  326. };
  327. </script>