|
@@ -19,17 +19,17 @@
|
|
|
<a-row>
|
|
|
<a-col :span="6">
|
|
|
<a-checkbox :value="1" @change="onChange" :checked="syncStep.indexOf(1)>=0">
|
|
|
- 同步提交
|
|
|
+ 同步提交 >
|
|
|
</a-checkbox>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-checkbox :value="2" @change="onChange" :checked="syncStep.indexOf(2)>=0">
|
|
|
- 同步审核
|
|
|
+ 同步审核 >
|
|
|
</a-checkbox>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-checkbox :value="3" @change="onChange" :checked="syncStep.indexOf(3)>=0">
|
|
|
- 同步出库
|
|
|
+ 同步出库 >
|
|
|
</a-checkbox>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
@@ -94,19 +94,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onChange (e) {
|
|
|
- const len = e.target.value
|
|
|
- if (!e.target.checked && len == 1) {
|
|
|
- this.syncStep = []
|
|
|
- } else {
|
|
|
- // 选中
|
|
|
- if (len > 0 || e.target.checked) {
|
|
|
- this.syncStep = []
|
|
|
- for (let i = 1; i <= len; i++) {
|
|
|
- this.syncStep.push(i)
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.syncStep = []
|
|
|
- }
|
|
|
+ this.syncStep = []
|
|
|
+ const checked = e.target.checked
|
|
|
+ const len = checked ? e.target.value : e.target.value - 1
|
|
|
+ for (let i = 1; i <= len; i++) {
|
|
|
+ this.syncStep.push(i)
|
|
|
}
|
|
|
},
|
|
|
setData (data) {
|