| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //首次加载 |
| | | request.post(`/maintenance/selectMaintenance`).then((res) => { |
| | | if (res.code === 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check')}, |
| | | { |
| | | field: 'orderNumber', |
| | | title: t('basicData.check'), |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | |
| | | }, |
| | | { |
| | | field: 'landingSequence', |
| | | title: t('processCard.technologyNumber'), |
| | | title: '落架顺序', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | .slice(0, 10) //默认开始时间3天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | |
| | | addListener(xGrid.value,gridOptions) |
| | | }) |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | //第一次加载获取近3天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | } |
| | |
| | | {field: 'order_number', title: '订单序号' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'technology_number', title: '小片顺序' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'quantity', title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80}, |
| | | {field: 'child_width', title: '宽', }, |
| | | {field: 'child_height', title: '高', }, |
| | | {field: 'area', title: '面积' ,showOverflow:"ellipsis"}, |
| | | {field: 'product_name', title: '产品名称', }, |
| | | {field: 'glass_child', title: '单片名称', }, |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/AddProcessCard', query: { orderId: row.orderId,productionId:row.orderGlassDetail.productionId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的排版状态') |
| | | router.push({ |
| | | path: '/main/processCard/AddProcessCard', |
| | | query: {orderId: row.orderId, productionId: row.orderGlassDetail.productionId} |
| | | }) |
| | | break |
| | | } |
| | | } |
| | |
| | | orderGlassDetail: { |
| | | productionId: '', |
| | | }, |
| | | orderDetail:{ |
| | | orderId:'', |
| | | productId:'', |
| | | productName:'', |
| | | orderDetail: { |
| | | orderId: '', |
| | | productId: '', |
| | | productName: '', |
| | | } |
| | | |
| | | |
| | |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | const { currentRoute } = useRouter() |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let id=route.query.orderId |
| | | let id = route.query.orderId |
| | | |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | console.log('produceList', produceList) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | //子组件接收参数 |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | 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: 'seq',fixed:"left", title: t('basicData.Number'), width: 50 }, |
| | | {field: 'orderId', title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'orderGlassDetail.productionId', title: t('workOrder.productionId'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId', title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName', title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'orderDetail.quantity', title: t('order.quantity'),showOverflow:"ellipsis"}, |
| | | {field: 'orderDetail.computeGrossArea', title: t('order.area'), }, |
| | | {field: 'orderDetail.perimeter', title: t('workOrder.perimeter'),}, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: t('basicData.operate'), width: 80, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'order_id', |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'production_id', |
| | | title: t('workOrder.productionId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'product_id', |
| | | title: t('order.productId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'product_name', |
| | | title: t('order.product'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', title: t('order.quantity'), showOverflow: "ellipsis"}, |
| | | {field: 'compute_gross_area', title: t('order.area'),}, |
| | | {field: 'perimeter', title: t('workOrder.perimeter'),}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['data.orderDetail.quantity','data.orderDetail.computeGrossArea'] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['data.orderDetail.quantity', 'data.orderDetail.computeGrossArea'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | height="600px" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="600px" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{ $t('basicData.edit') }} |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //首次加载 |
| | | request.post(`/basicDataProduce/selectBasic`).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'id', width: 60, title: 'id',filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'basic_type',width: 370, title: '类型', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'basic_name', width: 330,title: '名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'd_basic_name',width: 330, title: '类别',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'id', width: 60, title: 'id',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged,}, |
| | | {field: 'basic_type',width: 370, title: '类型', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'basic_name', width: 330,title: '名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'd_basic_name',width: 330, title: '类别'}, |
| | | ], |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | //分架明细查询 |
| | | List<FlowCard> detailsSelectMp(String orderId, FlowCard flowCard); |
| | | List<Map<String, String>> detailsSelectMp(String orderId, FlowCard flowCard); |
| | | |
| | | //删除流程卡 |
| | | Boolean deleteFlowCardMp(String orderId, String processId); |
| | |
| | | //未排产查询 |
| | | public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | if("null".equals(orderId)){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | if ("null".equals(processes)){ |
| | | |
| | | processes=""; |
| | | } |
| | |
| | | //首次查询排产数据 |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,String processes,String orderId,ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | if("null".equals(orderId)){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | if ("null".equals(processes)){ |
| | | |
| | | processes=""; |
| | | } |
| | |
| | | //报工管理查询 |
| | | public Map<String, Object> selectReportingWorkSv(Integer pageNum, Integer pageSize, java.sql.Date selectTime1, java.sql.Date selectTime2, String orderId, ReportingWork reportingWork) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | if (orderId.equals("null")) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | //查询质检审核 |
| | | public Map<String, Object> selectQualityTestingSv(Integer pageNum, Integer pageSize, java.sql.Date selectTime1, java.sql.Date selectTime2, Integer state, String processId, ReportingWork reportingWork) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | if (processId.equals("null")) { |
| | | if ("null".equals(processId)) { |
| | | processId = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | if (!orderId.isEmpty() && !productName.isEmpty()) { |
| | | //删除订单小片表生产订单号 |
| | | workOrderMapper.deleteOrderWorkMp(orderId, productName); |
| | | Integer state = 0; |
| | | Integer states = 1; |
| | | int state = 0; |
| | | int states = 1; |
| | | //查询该订单未转生产订单的条数 |
| | | Integer noWorkCount = workOrderMapper.selectWorkCount(orderId); |
| | | //查询该订单转生产订单的条数 |
| | | Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId); |
| | | if (noWorkCount == yesWorkCount) { |
| | | if (noWorkCount.equals(yesWorkCount)) { |
| | | workOrderMapper.updateWorkType(orderId, state); |
| | | } else { |
| | | workOrderMapper.updateWorkType(orderId, states); |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | GROUP BY order_id,order_number |
| | | ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | where od.order_id = #{orderId} and ogd.splitting_status=0 |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and od.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | fc.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | GROUP BY order_id,order_number |
| | | ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | where od.order_id = #{orderId} and ogd.splitting_status=0 |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and od.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | fc.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="thickness" property="thickness"/> |
| | | </association> |
| | | |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | | <result column="g_type" property="glassTypes.type"/>--> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | e.reportWorkQuantityCount, |
| | | e.broken_num, |
| | | round(ifnull(f.inventory,0)*a.area,2) as inventoryArea |
| | | |
| | | |
| | | from |
| | | flow_card as c |
| | | left join |
| | |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | |
| | | |
| | | where a.order_id = #{orderId} |
| | | |
| | | |
| | | </select> |
| | | </mapper> |