handle-area.vue
3.24 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<template>
<div class="handle-area">
<div>处理方式</div>
<div class="manage-type">
<Radio>需要退回品牌方</Radio>
<Radio>需要品牌方补寄</Radio>
<Radio>补做发货单</Radio>
</div>
<div class="edit-area">
<Form>
<Form-item label="物流单号" :label-width="80">
<Input v-model.trim="otherInfo.waybillCode" type="text" style="width: 400px"></Input>
</Form-item>
<Form-item label="联系人" :label-width="80">
<Input v-model.trim="otherInfo.contacts" type="text" style="width: 400px"></Input>
</Form-item>
<Form-item label="联系人号码" :label-width="80">
<Input v-model.trim="otherInfo.phone" type="text" style="width: 400px"></Input>
</Form-item>
<Form-item label="邮政编码" :label-width="80">
<Input v-model.trim="otherInfo.zipCode" type="text" style="width: 400px"></Input>
</Form-item>
<Form-item label="返回地址" :label-width="80">
<Input v-model.trim="otherInfo.returnAddress" type="text" style="width: 400px"></Input>
</Form-item>
<Form-item label="物流公司" :label-width="80">
<Input v-model.trim="otherInfo.logistics" type="text" style="width: 400px"></Input>
</Form-item>
<Button type="primary" @click="save">保存</Button>
</Form>
</div>
</div>
</template>
<script>
import _ from 'lodash';
import DiffService from 'services/repository/diff-service';
export default {
name: 'handle-area',
props: {
workId: {
type: Number
},
otherInfo: {
type: Object
}
},
data() {
return {
};
},
created() {
this.diffService = new DiffService();
},
methods: {
save() {
const params = {
id: 0,
phone: '',
zipCode: '',
contacts: '',
logistics: '',
waybillCode: '',
returnAddress: '',
logisticsDeptUpdateTime: '',
};
_.each(params, (value, key) => {
params[key] = this.otherInfo[key];
});
params.workOrderId = this.workId;
// TODO 需求暂时不明、已与产品确认暂缓
this.diffService.saveEditInfo(params)
.then(res => {
if (res.code === 200) {
this.$Message.success('保存成功');
} else {
this.$Message.error(res.message);
}
});
}
}
};
</script>
<style lang="scss">
.handle-area {
margin-top: 20px;
.manage-type {
margin-top: 10px;
}
.edit-area {
margin-top: 20px;
}
}
</style>