廖井涛
2025-02-17 c69c4dd89ef52edcee896c6a9c150aa6c2809e84
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
3个文件已修改
60 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/Customer.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -145,7 +145,7 @@
    trigger: 'dblclick',
    mode: 'cell',
    showStatus: true,
    showIcon:false
    showIcon:false,
  },//表头参数
  columns:[
    {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
@@ -1122,25 +1122,34 @@
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) => {
@@ -1266,7 +1275,6 @@
//行单元格修改修改触发此事件
const editClosedEvent = ({ row, column }) => {
  //判断修改相应的数值修改面积与金额
   if (['width', 'height', 'quantity', 'price'].includes(column.property)) {
     if(titleUploadData.value?.orderReview!==2){
@@ -1388,7 +1396,7 @@
}
//表格回车,在表格最后一行添加一行空数据
const handleKeyDown = (evnt) =>{
const handleKeyDown =async (evnt) =>{
  //判断表示是否为筛选状态
  if(xGrid.value.isFilter()){
    return
@@ -1412,10 +1420,12 @@
        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)
@@ -1501,7 +1511,7 @@
                     clearable placeholder=" " allow-create  filterable >
            <el-option v-for="item in projects"
                       :label="item.project"
                       :value="item.project"/>
                       :value="item"/>
          </el-select>
@@ -1516,7 +1526,7 @@
            <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" >
north-glass-erp/src/main/java/com/example/erp/entity/sd/Customer.java
@@ -27,6 +27,10 @@
    private Integer salesmanId;
    @TableField(select = false,exist = false)
    private String salesman;
    @TableField(select = false,exist = false)
    private String contacts;
    @TableField(select = false,exist = false)
    private String contactNumber;
    @TableField(select = false,exist = false)
    private List<Map<String,Object>> projectList;
north-glass-erp/src/main/resources/mapper/sd/CustomerMapper.xml
@@ -115,7 +115,9 @@
            a.*,
            b.project,
            b.salesman_id,
            b.salesman
            b.salesman,
            b.contacts,
            b.contact_number
        from
            sd.customer as a
        left join (SELECT
@@ -128,6 +130,8 @@
                               o.project,
                               o.salesman_id,
                               o.salesman,
                               o.contacts,
                               o.contact_number,
                               o.customer_id
                           FROM
                               sd.ORDER AS o
@@ -138,7 +142,7 @@
    </select>
    <select id="getProjectList">
        select * from(select project,salesman_id,salesman,id from sd.`order`
        select * from(select project,salesman_id as salesmanId,salesman,contacts,contact_number as contactNumber,id from sd.`order`
                       where customer_id = #{id}
                      group by project
                       ) as a