廖井涛
2024-05-16 a9d8f80c82234bc7c46f117eae00e75304a4e972
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -25,7 +25,7 @@
const xGrid = ref()
let cellArea = ref()
const shapeList = ref([
    {name:'普形',value:1}, {name:'异形',value: 2}
    {name:'普形',value:1}, {name:'异形',value:2}
])
// 定义表头上传数据
@@ -442,13 +442,13 @@
//初始化判断是否有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
@@ -504,8 +504,11 @@
        item.otherColumns = JSON.parse(item.otherColumns)
      })
      otherMoney.value =res.data.orderOtherMoneyList
          //加载副表数据
      xGrid.value.reloadData(orderDetails)
      gridOptions.loading = false
    }else{
      ElMessage.error(res.msg)
    }
@@ -635,6 +638,10 @@
  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
}