index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="ele-body" style="width: 100%">
  3. <el-card shadow="never" v-loading="loading" style="width: 100%">
  4. <div class="ele-border-lighter form-content" v-loading="loading">
  5. <search-table @search="reload"></search-table>
  6. <!-- 数据表格 -->
  7. <ele-pro-table
  8. ref="table"
  9. :columns="columns"
  10. :datasource="datasource"
  11. height="calc(100vh - 410px)"
  12. style="margin-bottom: 10px"
  13. full-height="calc(100vh - 116px)"
  14. tool-class="ele-toolbar-form"
  15. :selection.sync="selection"
  16. :page-size="20"
  17. @columns-change="handleColumnChange"
  18. :cache-key="cacheKeyUrl"
  19. >
  20. <!-- 表头工具栏 -->
  21. <template v-slot:toolbar>
  22. <el-button
  23. size="small"
  24. type="primary"
  25. icon="el-icon-plus"
  26. class="ele-btn-icon"
  27. @click="openEdit('add', {})"
  28. v-if="$hasPermission('eom:purchasereceiveconfirm:save')"
  29. >
  30. 新建
  31. </el-button>
  32. </template>
  33. <!-- 查看详情列 -->
  34. <template v-slot:receiveConfirmNo="{ row }">
  35. <el-link
  36. type="primary"
  37. :underline="false"
  38. @click="openorderDetail(row, 'receiveConfirmNo')"
  39. >
  40. {{ row.receiveConfirmNo }}
  41. </el-link>
  42. </template>
  43. <template v-slot:receiveCode="{ row }">
  44. <el-link
  45. type="primary"
  46. :underline="false"
  47. @click="openorderDetail(row, 'receiveCode')"
  48. >
  49. {{ row.receiveCode }}
  50. </el-link>
  51. </template>
  52. <template v-slot:orderNo="{ row }">
  53. <el-link
  54. type="primary"
  55. :underline="false"
  56. @click="openorderDetail(row, 'orderNo')"
  57. >
  58. {{ row.orderNo }}
  59. </el-link>
  60. </template>
  61. <!-- 操作列 -->
  62. <template v-slot:action="{ row }">
  63. <el-link
  64. type="primary"
  65. :underline="false"
  66. icon="el-icon-edit"
  67. @click="openEdit('edit', row)"
  68. v-if="
  69. [0, 3].includes(row.reviewStatus) &&
  70. $hasPermission('eom:purchasereceiveconfirm:update')
  71. "
  72. >
  73. 修改
  74. </el-link>
  75. <el-link
  76. type="primary"
  77. :underline="false"
  78. icon="el-icon-plus"
  79. @click="sendSubmit(row)"
  80. v-if="
  81. [0, 3].includes(row.reviewStatus) &&
  82. $hasPermission('eom:purchasereceiveconfirm:update')
  83. "
  84. >
  85. 提交
  86. </el-link>
  87. <el-popconfirm
  88. class="ele-action"
  89. title="确定要删除此信息吗?"
  90. @confirm="remove([row.id])"
  91. v-if="
  92. [0, 3].includes(row.reviewStatus) &&
  93. $hasPermission('eom:purchasereceiveconfirm:delete')
  94. "
  95. >
  96. <template v-slot:reference>
  97. <el-link type="danger" :underline="false" icon="el-icon-delete">
  98. 删除
  99. </el-link>
  100. </template>
  101. </el-popconfirm>
  102. </template>
  103. </ele-pro-table>
  104. </div>
  105. </el-card>
  106. <invoice-detail-dialog ref="invoiceDetailDialogRef"></invoice-detail-dialog>
  107. <order-detail-dialog ref="orderDetailDialogRef"></order-detail-dialog>
  108. <add-invoice-dialog
  109. ref="invoiceDialogRef"
  110. @done="reload"
  111. ></add-invoice-dialog>
  112. <!-- 多选删除弹窗 -->
  113. <process-submit-dialog
  114. :isNotNeedProcess="false"
  115. :processSubmitDialogFlag.sync="processSubmitDialogFlag"
  116. v-if="processSubmitDialogFlag"
  117. ref="processSubmitDialogRef"
  118. @reload="reload"
  119. ></process-submit-dialog>
  120. </div>
  121. </template>
  122. <script>
  123. import searchTable from './components/searchTable.vue';
  124. import addInvoiceDialog from './components/addInvoiceDialog.vue';
  125. import { reviewStatus } from '@/enum/dict';
  126. import orderDetailDialog from '@/views/purchasingManage/purchaseOrder/components/detailDialog.vue';
  127. import invoiceDetailDialog from '@/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue';
  128. import dictMixins from '@/mixins/dictMixins';
  129. import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
  130. import {
  131. getPurchasereceiveconfirmList,
  132. deleteReceiveConfirmInformation
  133. } from '@/api/purchasingManage/invoiceConfirm';
  134. import tabMixins from '@/mixins/tableColumnsMixin';
  135. export default {
  136. mixins: [dictMixins, tabMixins],
  137. components: {
  138. processSubmitDialog,
  139. searchTable,
  140. addInvoiceDialog,
  141. orderDetailDialog,
  142. invoiceDetailDialog
  143. },
  144. data() {
  145. return {
  146. selection: [], //单选中集合
  147. delVisible: false, //批量删除弹框状态
  148. loading: false, // 加载状态
  149. processSubmitDialogFlag: false,
  150. columns: [
  151. {
  152. columnKey: 'index',
  153. label: '序号',
  154. type: 'index',
  155. width: 55,
  156. align: 'center',
  157. showOverflowTooltip: true
  158. },
  159. {
  160. prop: 'receiveConfirmNo',
  161. label: '收货确认单单编码',
  162. sortable: true,
  163. align: 'center',
  164. slot: 'receiveConfirmNo',
  165. showOverflowTooltip: true,
  166. minWidth: 180
  167. },
  168. {
  169. prop: 'receiveCode',
  170. label: '收货单编码',
  171. sortable: true,
  172. align: 'center',
  173. slot: 'receiveCode',
  174. showOverflowTooltip: true,
  175. minWidth: 180
  176. },
  177. // {
  178. // prop: 'orderNo',
  179. // label: '采购订单编码',
  180. // sortable: true,
  181. // align: 'center',
  182. // slot: 'orderNo',
  183. // showOverflowTooltip: true,
  184. // minWidth: 180
  185. // },
  186. {
  187. prop: 'sourceTypeName',
  188. label: '采购订单类型',
  189. sortable: true,
  190. align: 'center',
  191. showOverflowTooltip: true,
  192. minWidth: 150
  193. },
  194. {
  195. prop: 'productNames',
  196. label: '产品名称',
  197. align: 'center',
  198. showOverflowTooltip: true,
  199. minWidth: 140
  200. },
  201. {
  202. prop: 'productCodes',
  203. label: '产品编码',
  204. align: 'center',
  205. showOverflowTooltip: true,
  206. minWidth: 160
  207. },
  208. {
  209. prop: 'batchNos',
  210. label: '批次号',
  211. align: 'center',
  212. showOverflowTooltip: true,
  213. minWidth: 140
  214. },
  215. {
  216. prop: 'productCount',
  217. label: '数量',
  218. align: 'center',
  219. showOverflowTooltip: true,
  220. minWidth: 140
  221. },
  222. {
  223. prop: 'supplierName',
  224. label: '供应商名称',
  225. align: 'center',
  226. showOverflowTooltip: true,
  227. minWidth: 300
  228. },
  229. {
  230. prop: 'sendNoteNo',
  231. label: '送货单号',
  232. align: 'center',
  233. showOverflowTooltip: true,
  234. minWidth: 200
  235. },
  236. // {
  237. // prop: 'replied',
  238. // label: '是否回执',
  239. // align: 'center',
  240. // showOverflowTooltip: true,
  241. // minWidth: 200,
  242. // formatter: (_row, _column, cellValue) => {
  243. // return _row.replied==1?'是':'否';
  244. // }
  245. // },
  246. {
  247. prop: 'reviewStatus',
  248. label: '状态',
  249. align: 'center',
  250. showOverflowTooltip: true,
  251. minWidth: 200,
  252. formatter: (_row, _column, cellValue) => {
  253. return reviewStatus[_row.reviewStatus];
  254. }
  255. },
  256. {
  257. prop: 'createTime',
  258. label: '创建时间',
  259. align: 'center',
  260. showOverflowTooltip: true,
  261. minWidth: 170
  262. },
  263. {
  264. columnKey: 'action',
  265. label: '操作',
  266. width: 280,
  267. align: 'center',
  268. resizable: false,
  269. slot: 'action',
  270. showOverflowTooltip: true,
  271. fixed: 'right'
  272. }
  273. ],
  274. cacheKeyUrl: 'eos-436e7400-purchasingManage-invoiceConfirm'
  275. };
  276. },
  277. computed: {},
  278. methods: {
  279. /* 表格数据源 */
  280. datasource({ page, limit, where, order }) {
  281. return getPurchasereceiveconfirmList({
  282. pageNum: page,
  283. size: limit,
  284. ...where
  285. });
  286. },
  287. /* 刷新表格 */
  288. reload(where) {
  289. this.$refs.table.reload({ page: 1, where });
  290. this.$emit('getToDoReminder')
  291. },
  292. //新增编辑
  293. openEdit(type, row) {
  294. this.$refs.invoiceDialogRef.open(type, row);
  295. this.$refs.invoiceDialogRef.$refs.form &&
  296. this.$refs.invoiceDialogRef.$refs.form.clearValidate();
  297. },
  298. //删除接口
  299. remove(delData) {
  300. deleteReceiveConfirmInformation(delData).then((res) => {
  301. this.$message.success('删除成功!');
  302. this.reload();
  303. });
  304. },
  305. sendSubmit(res) {
  306. this.processSubmitDialogFlag = true;
  307. this.$nextTick(() => {
  308. let params = {
  309. businessId: res.id,
  310. businessKey: 'purchase_receive_confirm_approve',
  311. formCreateUserId: res.createUserId,
  312. variables: {
  313. businessCode: res.receiveConfirmNo,
  314. businessName: res.supplierName,
  315. businessType: '收货确认单'
  316. }
  317. };
  318. this.$refs.processSubmitDialogRef.init(params);
  319. });
  320. },
  321. //查看详情
  322. openorderDetail(row, type) {
  323. if (type === 'receiveConfirmNo') {
  324. this.$refs.invoiceDialogRef.open('view',row);
  325. }
  326. if (type === 'receiveCode') {
  327. this.$refs.invoiceDetailDialogRef.open({id:row.receiveId});
  328. }
  329. if (type === 'orderNo') {
  330. this.$refs.orderDetailDialogRef.open({ id: row.orderId });
  331. }
  332. }
  333. }
  334. };
  335. </script>
  336. <style lang="scss" scoped>
  337. .ele-body {
  338. padding-top: 0;
  339. padding-bottom: 0;
  340. }
  341. :deep .el-card__body {
  342. padding: 0;
  343. }
  344. :deep(.el-link--inner) {
  345. margin-left: 0px !important;
  346. }
  347. .sys-organization-list {
  348. height: calc(100vh - 264px);
  349. box-sizing: border-box;
  350. border-width: 1px;
  351. border-style: solid;
  352. overflow: auto;
  353. }
  354. .sys-organization-list :deep(.el-tree-node__content) {
  355. height: 40px;
  356. & > .el-tree-node__expand-icon {
  357. margin-left: 10px;
  358. }
  359. }
  360. .switch_left ul .active {
  361. border-top: 4px solid var(--color-primary);
  362. color: var(--color-primary-5);
  363. }
  364. .switch {
  365. padding-bottom: 20px;
  366. }
  367. .el-dropdown-link {
  368. cursor: pointer;
  369. color: var(--color-primary-5);
  370. }
  371. .el-icon-arrow-down {
  372. font-size: 12px;
  373. }
  374. </style>