| | |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true, |
| | | showIcon:false |
| | | showIcon:false, |
| | | },//表头参数 |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | |
| | | |
| | | let projects = ref([]) |
| | | |
| | | /*const changeProject = (val) => { |
| | | titleUploadData.value.salesmanId = null |
| | | titleUploadData.value.salesman = null |
| | | }*/ |
| | | const changeProject = (item) => { |
| | | if(typeof item === 'string'){ |
| | | titleUploadData.value.project = item |
| | | return |
| | | } |
| | | titleUploadData.value.project = item.project |
| | | titleUploadData.value.salesmanId = item.salesmanId |
| | | titleUploadData.value.salesman = item.salesman |
| | | titleUploadData.value.contacts = item.contacts |
| | | titleUploadData.value.contactNumber = item.contactNumber |
| | | } |
| | | |
| | | const changeCustomer = () => { |
| | | 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 |
| | | projects.value = customer[0].projectList |
| | | const customer = titleUploadData.value.customerId |
| | | titleUploadData.value.customerId = customer['id'] |
| | | titleUploadData.value.customerName = customer['customerName'] |
| | | titleUploadData.value.project = customer['project'] |
| | | titleUploadData.value.salesmanId = customer['salesmanId'] |
| | | titleUploadData.value.salesman = customer['salesman'] |
| | | titleUploadData.value.contacts = customer['contacts'] |
| | | titleUploadData.value.contactNumber = customer['contactNumber'] |
| | | projects.value = customer['projectList'] |
| | | } |
| | | |
| | | const changeSaleMan = () => { |
| | | const changedSaleManId = titleUploadData.value.salesmanId |
| | | const SaleMan = titleSelectJson.value.saleMan.filter(item => item.id === changedSaleManId) |
| | | titleUploadData.value.salesman = SaleMan[0].basicName |
| | | titleUploadData.value.salesman = SaleMan[0]['basicName'] |
| | | } |
| | | |
| | | const area = (row) => { |
| | |
| | | //行单元格修改修改触发此事件 |
| | | const editClosedEvent = ({ row, column }) => { |
| | | |
| | | |
| | | //判断修改相应的数值修改面积与金额 |
| | | if (['width', 'height', 'quantity', 'price'].includes(column.property)) { |
| | | if(titleUploadData.value?.orderReview!==2){ |
| | |
| | | } |
| | | |
| | | //表格回车,在表格最后一行添加一行空数据 |
| | | const handleKeyDown = (evnt) =>{ |
| | | const handleKeyDown =async (evnt) =>{ |
| | | //判断表示是否为筛选状态 |
| | | if(xGrid.value.isFilter()){ |
| | | return |
| | |
| | | break; |
| | | case 'quantity': |
| | | if(nextRowIndex === length){ |
| | | await editClosedEvent({row,column}) |
| | | xGrid.value.clearEdit() |
| | | let rowNext = row |
| | | delete rowNext._X_ROW_KEY |
| | | //xGrid.value.insertAt(rowNext, xGrid.value.getTableData.length || -1) |
| | | xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | xGrid.value.insertAt(rowNext, xGrid.value.getTableData.length || -1) |
| | | //xGrid.value.insertAt({}, xGrid.value.getTableData.length || -1) |
| | | } |
| | | const nextRow = xGrid.value.getTableData().fullData[nextRowIndex] |
| | | xGrid.value.setCurrentRow(nextRow) |
| | |
| | | clearable placeholder=" " allow-create filterable > |
| | | <el-option v-for="item in projects" |
| | | :label="item.project" |
| | | :value="item.project"/> |
| | | :value="item"/> |
| | | </el-select> |
| | | |
| | | |
| | |
| | | <el-option v-for="item in titleSelectJson['customer']" |
| | | :key="item.id" |
| | | :label="item.id+' '+item.customerName" |
| | | :value="item.id" |
| | | :value="item" |
| | | /> |
| | | <template #footer> |
| | | <el-button @click="createCustomerVisible=true" text bg size="small" > |