| | |
| | | import {ElMessage} from "element-plus" |
| | | import {VXETable} from "vxe-table" |
| | | import {useI18n} from "vue-i18n" |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | |
| | | let rowClickIndex = ref(null) |
| | | const dialogTableVisible = ref(false) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | | let orderList = ref([]) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | }, |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'getProcessList', name: t('searchOrder.processFlows'), prefixIcon: 'vxe-icon-file-txt', visible: true} |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | | //表头参数 |
| | | columns:[ |
| | | {type:'expand',slots: { content:'content' },width: 50,fixed:"left",}, |
| | | {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | |
| | | //{field: '14',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | |
| | | ],//表头按钮 |
| | | ], |
| | | |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | |
| | |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'checkList': { |
| | | if($grid.getCheckboxRecords().length==0){ |
| | | if($grid.getCheckboxRecords().length===0){ |
| | | VXETable.modal.message( t('searchOrder.msg')) |
| | | return |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'getProcessList': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | } |
| | | } |
| | | const dialogTableVisible = ref(false) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | | let orderList = ref([]) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | //加载请求 |
| | | request.post(`/order/getOrderList/1/${total.pageSize}/${orderType.value}/${selectDate.value}`,filterData).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | } |
| | | |
| | | //双击表格行 |
| | | const cellClickEvent =()=>{ |
| | | dialogTableVisible.value = true |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/order/getOrderList/${pageNum.value}/${total.pageSize}/${orderType.value}/${selectDate.value}` |
| | | ,filterData).then((res) => { |
| | |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{ $t('basicData.search') }}</el-button> |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="cellClickEvent" |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" title="流程卡进度" style="width: 80%;height:75% "> |
| | | <ProcessCardProgress style="width: 100%;height: 100%" /> |
| | | <el-dialog |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | :title="$t('searchOrder.processFlows')" |
| | | style="width: 80%;height:75% "> |
| | | <ProcessCardProgress |
| | | :orderId="rowClickIndex.orderId" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |