Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
New file |
| | |
| | | import Sortable from 'sortablejs' |
| | | import {VXETable} from "vxe-table"; |
| | | |
| | | /*表格拖拽*/ |
| | | let sortable2 = null |
| | | function columnDrop2(xGrid){ |
| | | const $grid = xGrid |
| | | sortable2 = Sortable.create($grid.$el.querySelector('.body--wrapper>.vxe-table--header .vxe-header--row'), { |
| | | handle: '.vxe-header--column', |
| | | onEnd: (sortableEvent) => { |
| | | const targetThElem = sortableEvent.item |
| | | const newIndex = sortableEvent.newIndex |
| | | const oldIndex = sortableEvent.oldIndex |
| | | const { fullColumn, tableColumn } = $grid.getTableColumn() |
| | | const wrapperElem = targetThElem.parentNode |
| | | const newColumn = fullColumn[newIndex] |
| | | if (newColumn.fixed) { |
| | | // 错误的移动 |
| | | const oldThElem = wrapperElem.children[oldIndex] |
| | | if (newIndex > oldIndex) { |
| | | wrapperElem.insertBefore(targetThElem, oldThElem) |
| | | } else { |
| | | wrapperElem.insertBefore(targetThElem, oldThElem ? oldThElem.nextElementSibling : oldThElem) |
| | | } |
| | | VXETable.modal.message({ content: '固定列不允许拖动!', status: 'error' }) |
| | | return |
| | | } |
| | | // 获取列索引 columnIndex > fullColumn |
| | | const oldColumnIndex = $grid.getColumnIndex(tableColumn[oldIndex]) |
| | | const newColumnIndex = $grid.getColumnIndex(tableColumn[newIndex]) |
| | | // 移动到目标列 |
| | | const currRow = fullColumn.splice(oldColumnIndex, 1)[0] |
| | | fullColumn.splice(newColumnIndex, 0, currRow) |
| | | $grid.loadColumn(fullColumn) |
| | | } |
| | | }) |
| | | } |
| | | export { |
| | | columnDrop2, |
| | | sortable2 |
| | | } |
| | |
| | | return false; |
| | | }); |
| | | const notFinishList = xGrid.value.getTableData().fullData.filter(item =>{ |
| | | return item.saveFlag === false |
| | | return item.saveFlag === 0 |
| | | }) |
| | | |
| | | for(let item of uniqueByOrderNum){ |
| | | if(!checkSameNumForId(notFinishList,item.order_number)){ |
| | | ElMessage.error(`请检查订单序号: ${item.order_number} 报工数量是否相同!`) |
| | |
| | | const xGrid = ref() |
| | | let cellArea = ref() |
| | | const shapeList = ref([ |
| | | {name:'普形',value:1}, {name:'异形',value: 2} |
| | | {name:'普形',value:1}, {name:'异形',value:2} |
| | | ]) |
| | | |
| | | // 定义表头上传数据 |
| | |
| | | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | | |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | const str = route.query.orderId || history.state.orderId |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | return |
| | | } |
| | | gridOptions.loading = true |
| | | request.post(`/order/getOrderById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | titleUploadData.value = res.data.order |
| | |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | |
| | | //加载副表数据 |
| | | xGrid.value.reloadData(orderDetails) |
| | | gridOptions.loading = false |
| | | |
| | | }else{ |
| | | ElMessage.error(res.msg) |
| | | } |
| | |
| | | const changedCustomerId = titleUploadData.value.customerId |
| | | const customer = titleSelectJson.value.customer.filter(item => item.id === changedCustomerId) |
| | | titleUploadData.value.customerName = customer[0].customerName |
| | | titleUploadData.value.project = customer[0].project |
| | | titleUploadData.value.salesmanId = customer[0].salesmanId |
| | | titleUploadData.value.salesman = customer[0].salesman |
| | | |
| | | //titleSelectJson.value.customer |
| | | } |
| | | |
| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {useRouter} from "vue-router" |
| | | import {computed, reactive, ref} from "vue" |
| | | import {computed, nextTick, onUnmounted, reactive, ref} from "vue" |
| | | import ProcessCardProgress from '@/views/pp/report/ProcessCardProgress.vue' |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | |
| | | import {VXETable} from "vxe-table" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import {useI18n} from "vue-i18n" |
| | | import {columnDrop2, sortable2} from "@/hook/columnMove"; |
| | | const { t } = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | const router = useRouter() |
| | |
| | | }) |
| | | |
| | | |
| | | let initTime = null |
| | | nextTick(() => { |
| | | // 加载完成之后在绑定拖动事件 |
| | | initTime = setTimeout(() => { |
| | | columnDrop2(xGrid.value) |
| | | }, 500) |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | clearTimeout(initTime) |
| | | if (sortable2) { |
| | | sortable2.destroy() |
| | | } |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import {columnDrop2,sortable2} from "@/hook/columnMove" |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/sd/product/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | /*表格拖拽*/ |
| | | let sortable2: any |
| | | |
| | | const columnDrop2 = () => { |
| | | const $grid = xGrid.value |
| | | sortable2 = Sortable.create($grid.$el.querySelector('.body--wrapper>.vxe-table--header .vxe-header--row'), { |
| | | handle: '.vxe-header--column', |
| | | onEnd: (sortableEvent) => { |
| | | const targetThElem = sortableEvent.item |
| | | const newIndex = sortableEvent.newIndex |
| | | const oldIndex = sortableEvent.oldIndex |
| | | const { fullColumn, tableColumn } = $grid.getTableColumn() |
| | | const wrapperElem = targetThElem.parentNode |
| | | const newColumn = fullColumn[newIndex] |
| | | if (newColumn.fixed) { |
| | | // 错误的移动 |
| | | const oldThElem = wrapperElem.children[oldIndex] |
| | | if (newIndex > oldIndex) { |
| | | wrapperElem.insertBefore(targetThElem, oldThElem) |
| | | } else { |
| | | wrapperElem.insertBefore(targetThElem, oldThElem ? oldThElem.nextElementSibling : oldThElem) |
| | | } |
| | | VXETable.modal.message({ content: '固定列不允许拖动!', status: 'error' }) |
| | | return |
| | | } |
| | | // 获取列索引 columnIndex > fullColumn |
| | | const oldColumnIndex = $grid.getColumnIndex(tableColumn[oldIndex]) |
| | | const newColumnIndex = $grid.getColumnIndex(tableColumn[newIndex]) |
| | | // 移动到目标列 |
| | | const currRow = fullColumn.splice(oldColumnIndex, 1)[0] |
| | | fullColumn.splice(newColumnIndex, 0, currRow) |
| | | $grid.loadColumn(fullColumn) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | let initTime: any |
| | | |
| | | |
| | | let initTime = null |
| | | nextTick(() => { |
| | | // 加载完成之后在绑定拖动事件 |
| | | initTime = setTimeout(() => { |
| | | columnDrop2() |
| | | columnDrop2(xGrid.value) |
| | | }, 500) |
| | | }) |
| | | |
| | |
| | | package com.example.erp.entity.sd; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String address; |
| | | private String contact; |
| | | private String phone; |
| | | |
| | | @TableField(select = false,exist = false) |
| | | private String project; |
| | | @TableField(select = false,exist = false) |
| | | private Integer salesmanId; |
| | | @TableField(select = false,exist = false) |
| | | private String salesman; |
| | | } |
| | |
| | | //查询流程卡工艺流程 |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(processIdStr); |
| | | |
| | | //定义-的位置 |
| | | int index = technologicalProcess.indexOf("-"); |
| | | //获取工艺流程第一个工序 |
| | | String interceptProcess = technologicalProcess.substring(0, index); |
| | | |
| | | |
| | | String[] processList = technologicalProcess.split("->"); |
| | | //获取工艺流程第一个工序 |
| | | String interceptProcess = processList[0]; |
| | | int length = processList.length; |
| | | |
| | | //定义当前工序上下工序 |
| | |
| | | |
| | | <select id="getCustomerList"> |
| | | select |
| | | * |
| | | a.*, |
| | | b.project, |
| | | b.salesman_id, |
| | | b.salesman |
| | | from |
| | | sd.customer |
| | | sd.customer as a |
| | | left join (select o.project,o.salesman_id,o.salesman,o.customer_id |
| | | from sd.order as o |
| | | group by o.customer_id |
| | | order by o.id desc) as b |
| | | on a.id = b.customer_id |
| | | |
| | | </select> |
| | | <select id="getSelectCustomer"> |
| | | select |