| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import TagStyle from "@/components/pp/TagStyle.vue" |
| | | import OrderSortDetail from '@/components/pp/OrderSortDetail.vue' |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | | let router = useRouter() |
| | | const printVisible= ref(false) |
| | | |
| | | |
| | | //排序 |
| | | let editRow = ref({ |
| | | orderId:null, |
| | | }) |
| | | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { orderId: row.order_id }}) |
| | | break |
| | | } |
| | | case 'sort' :{ |
| | | editRow.value.orderId = row.order_id |
| | | printVisible.value = true |
| | | break |
| | | } |
| | | } |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 10) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | id: 'SelectPrintFlowCard', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | |
| | | }, |
| | | |
| | | editConfig: { |
| | | trigger: 'click', |
| | | trigger: 'dblclick', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | //表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'),width: 78}, |
| | | {title: t('basicData.operate'), width: 100, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'customer_name', title: t('processCard.customerName'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged, width: 110}, |
| | | |
| | | { |
| | | field: 'project', |
| | | title: t('order.project'), |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'titleStyle', 'name': '标签样式',status: 'primary'} |
| | | {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'}, |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | case 'titleStyle': { |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | case 'editCheckbox': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | orderIdList += selectRecords[i].order_id |
| | | } else { |
| | | orderIdList += selectRecords[i].order_id + "|" |
| | | } |
| | | } |
| | | let array = orderIdList.split('|'); |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {printList: JSON.stringify(selectRecords)}}) |
| | | return; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | max-height="100%" |
| | | height="95%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>--> |
| | | <el-button @click="getTableRow(row,'sort')" link type="primary" size="small">{{$t('processCard.sorting')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | id="titleStyle" |
| | | :title="'标签样式'" |
| | | :title="$t('processCard.labelStyle')" |
| | | style="width: 70%;height:70% " |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | v-model="titleStyleVisible"> |
| | | <tag-style style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | id="sizeCheck" |
| | | v-model="printVisible" |
| | | :title="$t('processCard.processCardDetails')" |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <order-sort-detail id="child" :orderId="editRow.orderId" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | width: 100%; |
| | | } |
| | | |
| | | :deep(#sizeCheck .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | </style> |