| | |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | product: { |
| | | thickness: '', |
| | | totalThickness: '' |
| | | }, |
| | | orderDetail: { |
| | | orderNumber: '', |
| | | height: '', |
| | | computeGrossArea: '', |
| | | binningQuantity: '', |
| | | shape: '', |
| | | width: '', |
| | | weight: '' |
| | | } |
| | | |
| | | }) |
| | | let filterData = ref({}) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data) |
| | | //console.log(res.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | |
| | | 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/selectNoCard/${orderId}/${productionId}`, 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 filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | //@filter-change="filterChanged" |
| | | } |
| | | |
| | | //右侧子组件接收参数 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'width', title: '宽', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'height', title: '高', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderNumber', title: '订序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', title: '形状', showOverflow: "ellipsis", filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', title: '宽', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'height', title: '高', sortable: true, filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'baiscQuantity', title: '待分数量', showOverflow: "ellipsis"}, |
| | | {field: 'computeGrossArea', title: '待分面积'}, |
| | | {field: 'totalThickness', title: '总厚度'}, |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'processId', title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 130}, |
| | | {field: 'processId', title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 130,filterMethod:filterChanged}, |
| | | { |
| | | field: 'orderNumber', |
| | | title: '订序', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | ,filterMethod:filterChanged |
| | | }, |
| | | {field: 'landingSequence', title: '落架顺序', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'landingSequence', title: '落架顺序', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'shape', title: '形状', filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'width', title: '宽', showOverflow: "ellipsis"}, |
| | | {field: 'height', title: '高'}, |
| | | {field: 'quantity', title: '总数量'}, |
| | |
| | | productionId:productionId |
| | | }) |
| | | |
| | | console.log(flowCardData.value) |
| | | //console.log(flowCardData.value) |
| | | request.post("/processCard/addFlowCard", flowCardData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | //router.push('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({path: '/main/processCard/SplittingDetails', query: {orderId: orderId}}) |
| | | |
| | | //location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | <el-aside width="44%" > |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGridLeft" |
| | | v-bind="gridLeftOptions" |
| | |
| | | <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> |
| | |
| | | <el-button @click="createProcessCard" type="primary">建立流程卡</el-button> |
| | | </el-main> |
| | | |
| | | <!-- 右侧--> |
| | | <el-aside width="45%" height="500px" style=""> |
| | | <vxe-grid |
| | | |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</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> |