imeik-bizui 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,8 +3,8 @@
3
3
  <div>
4
4
  <p class="page-view-title"><span class="start">*</span>发货时效性:</p>
5
5
  <div style="margin-top: 17px">
6
- <el-radio v-model="radio" label="1">整单立即发货</el-radio>
7
- <el-radio v-model="radio" label="2">分批延迟发货</el-radio>
6
+ <el-radio v-model="materialSendType" label="1">整单立即发货</el-radio>
7
+ <el-radio v-model="materialSendType" label="2">分批延迟发货</el-radio>
8
8
  <el-button v-show="showButotn" class="button-view" type="primary" @click="showBatchDialog">分批发货</el-button>
9
9
  </div>
10
10
  </div>
@@ -29,7 +29,7 @@ export default {
29
29
  },
30
30
  data() {
31
31
  return {
32
- radio: '1',
32
+ materialSendType: '1',
33
33
  showDialog: false,
34
34
  selectOrderList: []
35
35
  }
@@ -38,12 +38,29 @@ export default {
38
38
  showButotn() {
39
39
  const hasMaterial = this.formProps.applicationApplyMaterial?.length
40
40
  const hasMaterialQuantity = this.formProps.applicationApplyMaterial?.every((item) => item.materialQuantity)
41
- return this.radio === '2' && hasMaterial && hasMaterialQuantity
41
+ return this.materialSendType === '2' && hasMaterial && hasMaterialQuantity
42
42
  },
43
43
  showOrderList() {
44
44
  return this.selectOrderList && this.selectOrderList.length > 0
45
45
  }
46
46
  },
47
+ watch: {
48
+ materialSendType: {
49
+ handler(val) {
50
+ val && this.onUpdate()
51
+ },
52
+ immediate: true
53
+ },
54
+ selectOrderList: {
55
+ handler(val) {
56
+ if (val && val.length) {
57
+ this.onUpdate()
58
+ }
59
+ },
60
+ immediate: true,
61
+ deep: true
62
+ }
63
+ },
47
64
  mounted() {},
48
65
  methods: {
49
66
  showBatchDialog() {
@@ -55,6 +72,9 @@ export default {
55
72
  },
56
73
  removeSubOrder(data, index) {
57
74
  this.selectOrderList.splice(index, 1)
75
+ },
76
+ onUpdate() {
77
+ this.$emit('input', { materialSendType: this.materialSendType, orderList: this.selectOrderList })
58
78
  }
59
79
  }
60
80
  }