schangxiang@126.com
2024-11-21 60735779c303c2dd10feea45d7fd761103b225e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
   <div class="detailBox">
      <ul>
        <li v-for="(item,index) in sourceEnum" :key="index" v-show="titleP[index] !='附件'" > 
          {{ titleP[index] }} :  {{ warehousOrderDetails[item] }} 
        </li>
      </ul>
    </div>
</template>
<script lang="ts" setup>
import { reactive, ref, defineExpose, defineEmits, nextTick, computed } from 'vue'
const emits = defineEmits(['getTabelData'])
let titleP:any = ref('')
const sourceEnum:any = ref([]);
const warehousOrderDetails = ref<any[]>([]);
const openADialog = (param?: any, item?: any) => {
   if(param.freeOrderType){ //加上免费件的单据类型 eg:PR2
    item.freeOrderType = "免费件类型";
  }
  // console.log(param) // {client:"123" }
  // console.log(item) // {client:"客户代码" }
  titleP.value = Object.values(item);//["单号" , "取货状态"]
  // console.log(titleP.value) 
  sourceEnum.value = Object.keys(item);//["orderNo" , "orderStatus"]
  warehousOrderDetails.value = JSON.parse(JSON.stringify(param));
}
// 暴露方法
defineExpose({ openADialog });
 
</script>
<style lang="less" scoped>
.tipsWp {
  margin: o auto;
  margin-top: 3%;
  margin-bottom: 3%;
  display: block;
  text-align: center;
}
.detailBox{
  display: block;
  border-bottom: 1px solid gainsboro;
  padding-bottom: 10px;
  ul{
    margin: 0;
    padding: 0;
    li{
      display: inline-block;
      line-height: 30px;
      text-align: left;
      list-style-type: none;
      width: 25%;
      word-wrap: break-word;
    }
  }
}
</style>