廖井涛
2024-08-05 43e115a7de2c763c36d79e610a3abb1d833ea892
north-glass-erp/northglass-erp/src/views/sd/order/UpdateOrderCraft.vue
@@ -12,6 +12,7 @@
const route = useRoute()
let dialogTableVisible = ref(false)
let craftVisible = ref(false)
const iconNickname = ref()
const xGrid = ref()
const trademarkLocation=ref([t('craft.upperLeft'),t('craft.upperRight'),t('craft.lowLeft'),t('craft.lowRight')])
const gridOptions = reactive({
@@ -26,6 +27,7 @@
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true,gt:13 },//开启虚拟滚动
  scrollX:{ enabled: true,gt:7 },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
@@ -48,7 +50,7 @@
    {field: 'orderNumber',fixed:"left",width:120,  title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'orderDetail.productId',fixed:"left",width:120,  title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'orderDetail.productName',fixed:"left",width:120,  title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'technologyNumber',width:120,  title: t('craft.glassAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'technologyNumber',width:120, fixed:"left", title: t('craft.glassAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'glassChild',width:120,  title: t('craft.glassChild'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'orderDetail.width',width:120,  title: t('craft.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
    {field: 'orderDetail.height',width:120,  title: t('craft.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged},
@@ -80,8 +82,8 @@
            { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false },
            { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false },
            { code: 'clearChecked', name: t('basicData.clearSelection'), prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false },
            { code: 'computedSize', name: '科学计数', prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false },
            { code: 'paste', name: '粘贴', prefixIcon: 'vxe-icon-paste', visible: true, disabled: false },
            { code: 'computedSize', name: t('basicData.computedSize'), prefixIcon: 'vxe-icon-chart-line', visible: true, disabled: false },
            { code: 'paste', name: t('basicData.paste'), prefixIcon: 'vxe-icon-paste', visible: true, disabled: false },
          ]
      ]
    }
@@ -279,6 +281,10 @@
request.get(`/basicData/BasicDataByType/order/icon`).then((res) =>{
  if (res.code==200){
    trademarkList.value = res.data
    trademarkList.value.forEach(item =>{
      item.basicName
    })
  }
})
@@ -318,6 +324,11 @@
  if(row.icon!=null){
    trademarkAttr.value = JSON.parse(row.icon)
  }
  trademarkList.value.forEach(item =>{
    if(item.basicName===trademarkAttr.value.trademark){
      iconNickname.value=item.nickname
    }
  })
  rowIndex.value = row
}
@@ -411,6 +422,14 @@
      trademarkAttr.value[key] = []
    }
  }
}
const iconChange = () => {
  trademarkList.value.forEach(item =>{
    if(item.basicName===trademarkAttr.value.trademark){
      iconNickname.value=item.nickname
    }
  })
}
@@ -534,8 +553,7 @@
        <el-row style="">
          <el-col :span="4">{{$t('craft.TrademarkOptions')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.trademark"
                        >
            <el-select v-model="trademarkAttr.trademark" @change ="iconChange">
              <el-option :value="item.basicName" v-for="item in trademarkList" />
            </el-select>
          </el-col>
@@ -545,8 +563,8 @@
          <el-col :span="4">{{$t('craft.xImage')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.xImage">
              <el-option :value="true" :label="'是'"/>
              <el-option :value="false" :label="'否'"/>
              <el-option :value="true" :label="$t('basicData.true')"/>
              <el-option :value="false" :label="$t('basicData.false')"/>
            </el-select>
          </el-col>
        </el-row>
@@ -555,8 +573,8 @@
          <el-col :span="4">{{$t('craft.yImage')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.yImage">
              <el-option :value="true" :label="'是'"/>
              <el-option :value="false" :label="'否'"/>
              <el-option :value="true" :label="$t('basicData.true')"/>
              <el-option :value="false" :label="$t('basicData.false')"/>
            </el-select>
          </el-col>
        </el-row>
@@ -565,8 +583,8 @@
          <el-col :span="4">{{$t('craft.tag')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.tag">
              <el-option :value="true" :label="'是'"/>
              <el-option :value="false" :label="'否'"/>
              <el-option :value="true" :label="$t('basicData.true')"/>
              <el-option :value="false" :label="$t('basicData.false')"/>
            </el-select>
          </el-col>
        </el-row>
@@ -575,8 +593,8 @@
          <el-col :span="4">{{$t('craft.tag2')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.tag2">
              <el-option :value="true" :label="'是'"/>
              <el-option :value="false" :label="'否'"/>
              <el-option :value="true" :label="$t('basicData.true')"/>
              <el-option :value="false" :label="$t('basicData.false')"/>
            </el-select>
          </el-col>
        </el-row>
@@ -585,8 +603,8 @@
          <el-col :span="4">{{$t('craft.tag3')}}:</el-col>
          <el-col :span="6">
            <el-select v-model="trademarkAttr.tag3">
              <el-option :value="true" :label="'是'"/>
              <el-option :value="false" :label="'否'"/>
              <el-option :value="true" :label="$t('basicData.true')"/>
              <el-option :value="false" :label="$t('basicData.false')"/>
            </el-select>
          </el-col>
        </el-row>
@@ -622,11 +640,13 @@
      <div style="width: 400px;height: 250px;border: 2px solid #000;float: left;position: relative;">
        <div
            v-if="tagCheck(t('craft.upperLeft'))"
            style="float: left;width: 60px;height: 60px;margin-left: 1rem">
          <el-row>
            <el-col :span="20"><el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}" src="/trademark.png"/></el-col>
            style="float: left;width: 50px;height: 90px;margin-left: 1rem;margin-top: 15px">
          <el-row class="icon">
            <el-col class="icon" >
              <el-image style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
            </el-col>
          </el-row>
          <el-row style="margin-top: -25px" >
          <el-row  >
            <el-col :span="5" >X:</el-col>
            <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
          </el-row>
@@ -638,11 +658,13 @@
        <div
            v-if="tagCheck(t('craft.upperRight'))"
            style="float: right;width: 60px;height: 60px;margin-right: 1rem">
          <el-row>
            <el-col :span="20"><el-image  :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}" src="/trademark.png"/></el-col>
            style="float: right;width: 50px;height: 90px;margin-right: 1rem;margin-top: 15px">
          <el-row class="icon">
            <el-col class="icon" >
              <el-image style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
            </el-col>
          </el-row>
          <el-row style="margin-top: -25px" >
          <el-row  >
            <el-col :span="5" >X:</el-col>
            <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
          </el-row>
@@ -651,14 +673,12 @@
            <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col>
          </el-row>
        </div>
        <div
            v-if="tagCheck(t('craft.lowLeft'))"
            style="width: 60px;height: 60px;margin-left: 1rem;float: left;position: absolute;bottom: 15px">
          <el-row>
            <el-col :span="20"><el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  src="/trademark.png"/></el-col>
          </el-row>
          <el-row style="margin-top: -25px" >
            style="width: 50px;height: 90px;margin-left: 1rem;float: left;position: absolute;bottom: 15px" >
          <el-row  >
            <el-col :span="5" >X:</el-col>
            <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
          </el-row>
@@ -666,17 +686,19 @@
            <el-col :span="5" >Y:</el-col>
            <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col>
          </el-row>
          <el-row class="icon">
            <el-col class="icon" >
              <el-image style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
            </el-col>
          </el-row>
        </div>
        <div
            v-if="tagCheck(t('craft.lowRight'))"
            style="width: 60px;height: 60px;position: absolute;bottom: 15px;right: 1rem">
            style="width: 50px;height: 90px;position: absolute;bottom: 15px;right: 1rem">
          <el-row>
            <el-col :span="20">
              <el-image :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  src="/trademark.png"/>
            </el-col>
          </el-row>
          <el-row style="margin-top: -25px">
            <el-col :span="5" >X:</el-col>
            <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col>
          </el-row>
@@ -684,6 +706,12 @@
            <el-col :span="5" >Y:</el-col>
            <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col>
          </el-row>
          <el-row class="icon">
            <el-col class="icon">
              <el-image style="width: 100%;height: 100%" :class="{'xStyle':trademarkAttr.xImage,'yStyle':trademarkAttr.yImage}"  :src="iconNickname"/>
            </el-col>
          </el-row>
        </div>
@@ -732,4 +760,8 @@
.yStyle{
  transform : rotateX(180deg)
}
.icon{
  width: 50px;
  height: 50px;
}
</style>