廖井涛
2024-03-27 59ef6e9b5b8aff7614711c2afdba23a460ac1c56
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -412,18 +412,35 @@
onMounted(()=>{
  //启用表格拖动选中
  addListener(xGrid.value,gridOptions)
  const str = route.query.orderId
  const str = route.query.orderId || history.state.orderId
  if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){
    return
  }
  request.post(`/order/getOrderById/${str}`).then((res) => {
    if(res.code==200){
      titleUploadData.value = res.data.order
      if(history.state.orderId!=null){
        titleUploadData.value.orderId=''
        titleUploadData.value.id=null
        titleUploadData.value.processReview=null
        titleUploadData.value.orderReview=null
        titleUploadData.value.productionOrder=null
        titleUploadData.value.processingCard=null
        titleUploadData.value.warehousing=null
        titleUploadData.value.delivery=null
        titleUploadData.value.createTime=null
        if(history.state.type=='copy'){
          xGrid.value.reloadData(res.data.orderDetails)
        }
        return
      }
      //取消工艺按钮禁用
      gridOptions.toolbarConfig.buttons[1].disabled = false
      //工艺审核后保存按钮禁用
      if(res.data.order.processReview === 2){
        gridOptions.toolbarConfig.buttons[4].disabled = true
      }
      //取消审核按钮禁用
      if(res.data.order.processReview === 2 && res.data.order.orderReview === 0){