| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import TagStyle from "@/components/pp/TagStyle.vue" |
| | | import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue" |
| | | import OrderSortDetail from '@/components/pp/OrderSortDetail.vue' |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | | const company = companyInfo() |
| | | let router = useRouter() |
| | | const printVisible= ref(false) |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const userId = userStore.user.userId |
| | | |
| | | let inquiryMode = company.printLabel.getSelectFlowCard; |
| | | |
| | | const checkedValue = ref("") |
| | | if (userId==="A071" || userId==="A107"){ |
| | | checkedValue.value = ref(2) |
| | | } |
| | | else { |
| | | checkedValue.value = ref(inquiryMode) |
| | | } |
| | | //排序 |
| | | 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 * 7) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | |
| | | if (project==''){ |
| | | project=null |
| | | } |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | gridOptions.toolbarConfig.buttons[2].visible=false |
| | | let roleId=res.data.user |
| | | if (roleId=='1' || roleId=='17'){ |
| | | gridOptions.toolbarConfig.buttons[2].visible=true |
| | | } |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | if (project==''){ |
| | | project=null |
| | | } |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | xGrid.value.loadData(res.data.data) |
| | |
| | | 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'}, |
| | | {code: 'detailsPrint', name: '明细打印', status: 'primary'}, |
| | | |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | 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),checkedValue:checkedValue.value.value}}) |
| | | return; |
| | | |
| | | } |
| | | case 'detailsPrint': { |
| | | 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/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value}}) |
| | | return; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | :icon="Search" |
| | | type="primary" @click="getWorkOrder">{{ $t('basicData.search') }} |
| | | </el-button> |
| | | <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value" content="合并" :checked-value="1" :unchecked-value="3" ></vxe-checkbox> |
| | | </el-row> |
| | | </div> |
| | | <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="'标签样式'" |
| | | style="width: 70%;height:70% " |
| | | :title="$t('processCard.labelStyle')" |
| | | style="width: 90%;height:90%;margin-top: 3vh " |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | v-model="titleStyleVisible"> |
| | | <tag-style style="width: 100%;height: 100%"/> |
| | | <!-- <tag-style-designer 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> |