index.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never" v-loading="loading">
  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 - 385px)"
  12. full-height="calc(100vh - 116px)"
  13. tool-class="ele-toolbar-form"
  14. :selection.sync="selection"
  15. cache-key="eomContactPageTable"
  16. >
  17. <!-- 表头工具栏 -->
  18. <template v-slot:toolbar>
  19. <el-button
  20. size="small"
  21. type="primary"
  22. icon="el-icon-plus"
  23. class="ele-btn-icon"
  24. @click="openEdit('add',{})"
  25. >
  26. 新建
  27. </el-button>
  28. <el-button
  29. size="small"
  30. type="danger"
  31. el-icon-delete
  32. class="ele-btn-icon"
  33. @click="allDelBtn"
  34. :disabled="selection?.length===0"
  35. >
  36. 批量删除
  37. </el-button>
  38. </template>
  39. <!-- 查看详情列 -->
  40. <template v-slot:docNo="{ row }">
  41. <el-link type="primary" :underline="false" @click="openorderDetail(row)"> {{ row.docNo }}</el-link>
  42. </template>
  43. <!-- 操作列 -->
  44. <template v-slot:action="{ row }">
  45. <el-link
  46. type="primary"
  47. :underline="false"
  48. icon="el-icon-edit"
  49. @click="openEdit('edit',row)"
  50. >
  51. 修改
  52. </el-link>
  53. <el-popconfirm
  54. class="ele-action"
  55. title="确定要删除此信息吗?"
  56. @confirm="remove([row.id])"
  57. >
  58. <template v-slot:reference>
  59. <el-link
  60. type="danger"
  61. :underline="false"
  62. icon="el-icon-delete"
  63. >
  64. 删除
  65. </el-link>
  66. </template>
  67. </el-popconfirm>
  68. </template>
  69. </ele-pro-table>
  70. </div>
  71. </el-card>
  72. <add-invoice-dialog ref="invoiceDialogRef" @done="reload"></add-invoice-dialog>
  73. <detail-dialog ref="DetailDialogRef"></detail-dialog>
  74. <!-- 多选删除弹窗 -->
  75. <pop-modal :visible.sync="delVisible" content="是否确定删除?" @done="commitBtn"/>
  76. </div>
  77. </template>
  78. <script>
  79. import searchTable from './components/searchTable.vue';
  80. import addInvoiceDialog from './components/addInvoiceDialog.vue';
  81. import detailDialog from './components/detailDialog.vue';
  82. import popModal from '@/components/pop-modal';
  83. import {reviewStatusEnum} from '@/enum/dict';
  84. import {contactTypeTree} from '@/api/saleManage/contact';
  85. import {getTableList, getDetail, UpdateInformation, addInformation,deleteInformation} from '@/api/saleManage/saleorder';
  86. import {getSendTableList, getSendSaleOrderrecordDetail, UpdateSendInformation, addSendInformation,deleteSendInformation} from '@/api/saleManage/saleordersendrecord';
  87. import dictMixins from '@/mixins/dictMixins';
  88. export default {
  89. mixins: [dictMixins],
  90. components: {
  91. searchTable,
  92. popModal,
  93. addInvoiceDialog,
  94. detailDialog,
  95. },
  96. data() {
  97. return {
  98. activeComp: 'saleorder',
  99. tabOptions: [
  100. { key: 'saleorder', name: '销售订单' },
  101. { key: 'invoice', name: '发货单' },
  102. { key: 'returnorder', name: '退货单' }
  103. ],
  104. selection:[], //单选中集合
  105. delVisible:false, //批量删除弹框状态
  106. loading: false, // 加载状态
  107. columns: [
  108. {
  109. width: 45,
  110. type: 'selection',
  111. columnKey: 'selection',
  112. align: 'center'
  113. },
  114. {
  115. columnKey: 'index',
  116. label: '序号',
  117. type: 'index',
  118. width: 55,
  119. align: 'center',
  120. showOverflowTooltip: true,
  121. fixed: 'left'
  122. },
  123. {
  124. prop: 'docNo',
  125. label: '发货编码',
  126. align: 'center',
  127. slot: 'docNo',
  128. showOverflowTooltip: true,
  129. minWidth: 200
  130. },
  131. {
  132. prop: 'orderNo',
  133. label: '订单编码',
  134. align: 'center',
  135. showOverflowTooltip: true,
  136. minWidth: 200
  137. },
  138. {
  139. prop: 'contactName',
  140. label: '客户名称',
  141. align: 'center',
  142. showOverflowTooltip: true,
  143. minWidth: 180,
  144. },
  145. {
  146. prop: 'replied',
  147. label: '是否回执',
  148. align: 'center',
  149. showOverflowTooltip: true,
  150. minWidth: 200,
  151. formatter: (_row, _column, cellValue) => {
  152. return _row.replied==1?'是':'否';
  153. }
  154. },
  155. {
  156. prop: 'reviewStatus',
  157. label: '状态',
  158. align: 'center',
  159. showOverflowTooltip: true,
  160. minWidth: 200,
  161. formatter: (_row, _column, cellValue) => {
  162. return reviewStatusEnum[_row.reviewStatus].label;
  163. }
  164. },
  165. {
  166. prop: 'createTime',
  167. label: '创建时间',
  168. align: 'center',
  169. showOverflowTooltip: true,
  170. minWidth: 170
  171. },
  172. {
  173. columnKey: 'action',
  174. label: '操作',
  175. width: 230,
  176. align: 'center',
  177. resizable: false,
  178. slot: 'action',
  179. showOverflowTooltip: true,
  180. fixed: 'right',
  181. }
  182. ]
  183. };
  184. },
  185. computed: {},
  186. methods: {
  187. /* 表格数据源 */
  188. datasource({ page, limit, where, order }) {
  189. return getSendTableList({
  190. pageNum: page,
  191. size: limit,
  192. ...where
  193. });
  194. },
  195. /* 刷新表格 */
  196. reload(where) {
  197. this.$refs.table.reload({ page: 1, where });
  198. },
  199. //新增编辑
  200. openEdit(type,row) {
  201. this.$refs.invoiceDialogRef.open( type,row);
  202. this.$refs.invoiceDialogRef.$refs.form &&
  203. this.$refs.invoiceDialogRef.$refs.form.clearValidate();
  204. },
  205. //批量删除
  206. allDelBtn(){
  207. if(this.selection.length===0) return
  208. this.delVisible=true
  209. },
  210. //删除接口
  211. remove(delData) {
  212. deleteSendInformation(delData).then((res) => {
  213. this.$message.success('删除成功!');
  214. this.reload();
  215. });
  216. },
  217. //删除弹框确定
  218. commitBtn(){
  219. const dataId=this.selection.map(v=>v.id)
  220. this.remove(dataId)
  221. },
  222. //查看详情
  223. openorderDetail(row){
  224. this.$refs.DetailDialogRef.open(row);
  225. },
  226. }
  227. };
  228. </script>
  229. <style lang="scss" scoped>
  230. .ele-body{
  231. padding-top:0;
  232. padding-bottom: 0;
  233. }
  234. :deep .el-card__body{
  235. padding: 0;
  236. }
  237. :deep(.el-link--inner){
  238. margin-left: 0px !important;
  239. }
  240. .sys-organization-list {
  241. height: calc(100vh - 264px);
  242. box-sizing: border-box;
  243. border-width: 1px;
  244. border-style: solid;
  245. overflow: auto;
  246. }
  247. .sys-organization-list :deep(.el-tree-node__content) {
  248. height: 40px;
  249. & > .el-tree-node__expand-icon {
  250. margin-left: 10px;
  251. }
  252. }
  253. .switch_left ul .active{
  254. border-top: 4px solid var(--color-primary);
  255. color: var(--color-primary-5);
  256. }
  257. .switch{
  258. padding-bottom: 20px;
  259. }
  260. .el-dropdown-link {
  261. cursor: pointer;
  262. color: var(--color-primary-5);
  263. }
  264. .el-icon-arrow-down {
  265. font-size: 12px;
  266. }
  267. </style>