| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | let router=useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | request.get("/FinishedGoodsInventory/getselet/1/100").then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | produceList = produceList.value.concat(deepClone(res.data)) |
| | | |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '220', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'OrderNumber', width:'150', title: '订单序号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'SalesOrderNumber', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ProjectName', width: '120',title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'OrderType', width: '100',title: '订单类型', sortable: true}, |
| | | {field: 'ProcessCardNumber',width: '100', title: '流程卡号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'ProductName', width: '100',title: '产品名称', sortable: true}, |
| | | {field: 'ProductNumber',width: '100', title: '产品编号', sortable: true}, |
| | | {field: 'CustomerNumber', width: '100',title: '客户编号', sortable: true}, |
| | | {field: 'CustomerName',width: '100', title: '客户名称', sortable: true}, |
| | | {field: 'Length', width: '100',title: '长度', sortable: true}, |
| | | {field: 'Width',width: '100', title: '宽度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'InventoryCount',width: '140', title: '库存数', sortable: true}, |
| | | {field: 'ActualSingleArea',width: '140', title: '实际单片面积', sortable: true}, |
| | | {field: 'Area',width: '100', title: '面积', sortable: true}, |
| | | {field: 'SettlementSingleArea',width: '140', title: '结算单片面积', sortable: true}, |
| | | {field: 'SettlementTotalArea',width: '140', title: '结算总面积', sortable: true}, |
| | | {field: 'AvailableQuantity',width: '100', title: '可用数量', sortable: true}, |
| | | {field: 'FloorNumber',width: '100', title: '楼层编号', sortable: true}, |
| | | {field: 'DeliveryAddress',width: '100', title: '送货地址', sortable: true}, |
| | | {field: 'Batch',width: '100', title: '批次', sortable: true}, |
| | | {field: 'Salesman',width: '100', title: '业务员', sortable: true}, |
| | | {field: 'OrdinaryMillimeter',width: '100', title: '平凡毫米', sortable: true}, |
| | | {field: 'Weight',width: '100', title: '重量', sortable: true}, |
| | | {field: 'LastWarehousingDate',width: '140', title: '最后入库日期', sortable: true}, |
| | | {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '存储区域', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | {field: 'DocumentStatus',width: '100', title: '单据状态', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | {field: 'orderDetail.orderNumber', width:'150', title: '订单序号', filters:[{ data: '' }],editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'order.orderId', width: '150',title: '销售单号',showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', width: '120',title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.orderType', width: '100',title: '订单类型', filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.product.productName', width: '100',title: '产品名称', filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.product.id',width: '100', title: '产品编号', filters:[{ data: '' }]}, |
| | | |
| | | {field: 'orderDetail.width', width: '100',title: '宽度',filters:[{ data: '' }]}, |
| | | {field: 'orderDetail.height',width: '100', title: '高度', filters:[{ data: '' }]}, |
| | | {field: 'inventory',width: '140', title: '库存数量', filters:[{ data: '' }]}, |
| | | {field: 'quantityAvailable',width: '140', title: '可用数量', filters:[{ data: '' }]}, |
| | | |
| | | {field: 'actualSignalArea',width: '140', title: '实际单片面积', filters:[{ data: '' }]}, |
| | | {field: 'area',width: '100', title: '总面积', filters:[{ data: '' }]}, |
| | | |
| | | {field: 'warehouseNumber',width: '100', title: '仓库编号', filters:[{ data: '' }]}, |
| | | {field: 'storageRegion',width: '100', title: '库存区域', filters:[{ data: '' }]}, |
| | | {field: 'status',width: '100', title: '状态', filters:[{ data: '' }]}, |
| | | |
| | | {field: 'enterStorageTime',width: '140', title: '入库时间', filters:[{ data: '' }]}, |
| | | {field: 'updateTime',width: '140', title: '修改时间', filters:[{ data: '' }]}, |
| | | {field: 'endTime',width: '100', title: '出库时间', filters:[{ data: '' }]}, |
| | | {field: 'remark',width: '80', title: '备注', filters:[{ data: '' }]}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | }, |
| | | { |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | },{ |
| | | "OrderNumber": "1", |
| | | "SalesOrderNumber": "NG23072003", |
| | | "ProjectName": "钢化玻璃", |
| | | "OrderType": "普通订单", |
| | | "ProcessCardNumber": "NG23072003A01", |
| | | "ProductName": '', |
| | | "ProductNumber": "06040000022", |
| | | "CustomerNumber": "KD0071", |
| | | "CustomerName": "件", |
| | | "Length": "1075.00", |
| | | "Width": "440.00", |
| | | "Thickness": "3.00", |
| | | "InventoryCount": "360", |
| | | "ActualSingleArea": "0.473000", |
| | | "Area": "170.28", |
| | | "SettlementSingleArea": "0.47", |
| | | "SettlementTotalArea": "170.28", |
| | | "AvailableQuantity": "360", |
| | | "FloorNumber": "10927769", |
| | | "DeliveryAddress": "上海", |
| | | "Batch": "测试", |
| | | "OrdinaryMillimeter": "陈宗凯", |
| | | "Weight": "1915.6500", |
| | | "LastWarehousingDate": "2023-09-22 08:31:17", |
| | | "LocationNumber": "成品库", |
| | | "StorageArea": "测试", |
| | | "Location": "2", |
| | | "DocumentStatus": "1", |
| | | "Remarks": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |