chenlu
2024-12-12 f46f83ab2ce1bd2f34c81cb5750e6d5ce6ffb306
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProcessCardDetail.vue
@@ -1,8 +1,14 @@
<script setup>
import {reactive, ref} from "vue";
import {onMounted, reactive, ref, watch} from "vue";
import {useI18n} from "vue-i18n";
import request from "@/utils/request";
import {ElMessage} from "element-plus";
const { t } = useI18n()
let props = defineProps({
  processId:null,
  technologyNumber:null
})
const xGrid = ref()
const gridOptions = reactive({
@@ -54,34 +60,53 @@
    ]
  },*/
  columns:[
    {field: 'id',width: 70,  title: '序号',filters:[{ data: '' }], slots: { default: 'state',filter: 'num2_filter' }},
    {field:'state',width: 150,title: t('order.width'),filters:[{ data: '' }], slots: { default: 'state',filter: 'num2_filter' }},
    {type: 'seq',width: 150,title: t('order.height')},
    {field: 'id',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'id',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'id',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'id',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'id',width: 150, title: t('craft.TrademarkAttribute'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order_number',width: 70,  title: '序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field:'child_width',width: 150,title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'child_height',width: 150,title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'quantity',width: 150, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'building_number',width: 150, title: t('order.buildingNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'shape',width: 150, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'grossArea',width: 150, title: t('order.grossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'separation',width: 150, title: t('craft.TrademarkAttribute'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
  ],//表头参数
  data:null,//表格数据
  toolbarConfig: {
    buttons: [],
    slots:{
      buttons: "toolbar_buttons"
    },
  },
})
let emit = defineEmits([
  'changeDialog'
])
let ProjectName = ref('')
const changeOrderType = async ()=>{
  await emit('changeDialog',ProjectName.value)
  ProjectName.value = null
onMounted(()=>{
})
watch(
    () => props.processId,
    (newValue, oldValue) => {
if (props.processId!=null){
  getWorkOrder()
}
    }
);
const getWorkOrder = () => {
  if (props.processId!=null || props.processId!=""){
    request.post(`/glassOptimize/getProcessCardDetail/${props.processId}/${props.technologyNumber}`).then((res) => {
      if(res.code==200){
        xGrid.value.loadData(res.data.data)
      }else{
        ElMessage.warning(res.msg)
      }
    })
  }
}
</script>
<template>