productDialog.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <vxe-modal v-model="value" id="myModa" :width="width?width+'px':'80%'" :height="height?height+'px':'80%'" min-width="460" min-height="320" show-zoom resize storage transfer>
  3. <template #title>
  4. <span>选择商品</span>
  5. </template>
  6. <template #default>
  7. <module-view :propConfig="config" ref="view" />
  8. </template>
  9. </vxe-modal>
  10. </template>
  11. <script lang="ts">
  12. import { Component, Prop, Vue, Watch } from "vue-property-decorator";
  13. @Component
  14. export default class ProductDialog extends Vue {
  15. value=false
  16. @Prop()
  17. width?:number
  18. @Prop()
  19. height?:number
  20. config:any={
  21. search:{
  22. attr:{
  23. size:'mini'
  24. },
  25. columns:[
  26. [{
  27. span:6,
  28. label:'创建时间',
  29. prop:'created',
  30. component:'by-date-picker',
  31. compConfig:{
  32. format:'yyyy-MM-dd',
  33. type:'datetime'
  34. }
  35. }]
  36. ]
  37. },
  38. tool:{
  39. tools:{
  40. search:true,
  41. refresh:true
  42. }
  43. },
  44. table:{
  45. attr:{
  46. size:'mini',
  47. seq:true,
  48. align:'center',
  49. checkbox:true
  50. },
  51. columns:[{
  52. title:'物料名称',
  53. field:'name',
  54. width:150
  55. },{
  56. title:'简称',
  57. field:'short_name',
  58. width:100
  59. },{
  60. title:'财务编号',
  61. field:'accounting_code'
  62. },{
  63. title:'国际码',
  64. field:'ns_code'
  65. },{
  66. title:'基本售价',
  67. field:'base_price'
  68. },{
  69. title:'市场价格(统一售价)',
  70. field:'mark_price'
  71. }]
  72. },
  73. // request:{
  74. // url:'/system/maindataMaterial/page'
  75. // }
  76. }
  77. setShow(v:boolean){
  78. this.value = v;
  79. }
  80. created(){
  81. this.getList();
  82. }
  83. getList(){
  84. (this as any).$request({
  85. url: '/maindata/maindataMaterial/page',
  86. method: 'get',
  87. }).then((res:any) => {
  88. console.log('/maindataMaterial/page',res);
  89. })
  90. }
  91. }
  92. </script>
  93. <style lang="scss" scoped>
  94. </style>