| | |
| | | import OrderSortDetail from '@/components/pp/OrderSortDetail.vue' |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo" |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | const company = companyInfo() |
| | | let router = useRouter() |
| | | const printVisible= ref(false) |
| | | const orderInfo = useOrderInfoStore() |
| | | |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const userId = userStore.user.userId |
| | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | let titleStyleVisible = ref(false) |
| | | |
| | | //定义分架状态 |
| | | const optionVal = ref('1') |
| | | const options = [ |
| | | { |
| | | value: '0', |
| | | label: '未分架', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '已分架', |
| | | }, |
| | | ] |
| | | |
| | | |
| | | const form = reactive({ |
| | |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | const end = new Date(new Date().getTime()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | |
| | | } |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | if (orderInfo.workOrderDate[0]=="" && orderInfo.workOrderDate[1]==""){ |
| | | orderInfo.workOrderDate=getNowTime() |
| | | } |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | let orderId=form.orderId |
| | | let project=form.project |
| | | |
| | | let state = optionVal.value |
| | | if (orderId==''){ |
| | | orderId=null |
| | | } |
| | | 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}/${state}`, 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 { |
| | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | let orderId=form.orderId |
| | | let project=form.project |
| | | |
| | |
| | | if (project==''){ |
| | | project=null |
| | | } |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}`, filterData.value).then((res) => { |
| | | let state = optionVal.value |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | xGrid.value.loadData(res.data.data) |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'editCheckbox', name: t('basicData.edit'), status: 'primary'}, |
| | | {'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | |
| | | //{'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | {code: 'detailsPrint', name: t('processCard.detailPrinting'), status: 'primary'}, |
| | | {code: 'detailsProcessPrint', name: t('processCard.detailsPrintedSeparately'), status: 'primary'}, |
| | | {code: 'orderPrint', name: '订单打印', status: 'primary'}, |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | return |
| | | } |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | return; |
| | | |
| | | } |
| | | case 'detailsPrint': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | 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,type:1}}) |
| | | return; |
| | | |
| | | } |
| | | case 'detailsProcessPrint': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | 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,type:2}}) |
| | | return; |
| | | |
| | | } |
| | | case 'orderPrint': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (optionVal.value != '0'){ |
| | | ElMessage.warning('请选择未分架订单打印') |
| | | 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,type:3}}) |
| | | return; |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | v-model="orderInfo.workOrderDate" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY/MM/DD" |
| | |
| | | |
| | | <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input> |
| | | |
| | | |
| | | <el-select |
| | | :default-first-option="true" |
| | | ref="getSelect" style="width: 130px" |
| | | v-model="optionVal" |
| | | class="m-2" |
| | | @change="getWorkOrder" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-button |
| | | id="select" |
| | | :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> |
| | | <vxe-checkbox style="margin-top:6px;margin-left:10px " v-if="!(checkedValue.value === 2 && inquiryMode === 2)" v-model="checkedValue.value" :content="$t('processCard.merge')" :checked-value="1" :unchecked-value="3" ></vxe-checkbox> |
| | | |
| | | </div> |
| | | |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="95%" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <el-dialog |
| | | id="titleStyle" |
| | | :title="$t('processCard.labelStyle')" |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | #selectForm { |
| | | width: 60%; |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | :deep(#titleStyle .el-dialog__body){ |
| | | height: 90%; |