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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
| <template>
| <el-table :data="currentValue">
| <el-table-column
| label="商品名称"
| prop="flowerName"
| min-width="100"
| fixed="left"
| ></el-table-column>
| <el-table-column
| label="商品分类"
| prop="flowerCategory"
| min-width="150"
| ></el-table-column>
| <el-table-column
| label="级别"
| prop="flowerLevelStr"
| min-width="80"
| ></el-table-column>
| <el-table-column
| label="颜色"
| prop="flowerColor"
| min-width="80"
| ></el-table-column>
| <el-table-column
| label="规格"
| prop="flowerUnit"
| min-width="100"
| ></el-table-column>
| <el-table-column label="数量" prop="num" min-width="100"></el-table-column>
| <el-table-column
| label="单价"
| prop="price"
| min-width="100"
| ></el-table-column>
| <el-table-column
| label="供应商"
| prop="supplierName"
| min-width="120"
| ></el-table-column>
| <el-table-column
| label="判断责任方"
| prop="personInCharge"
| min-width="120"
| fixed="right"
| >
| <template #default="{ row }">
| <el-bus-select-dict
| v-if="!disabled"
| v-model="row.personInCharge"
| code="CHARGE_PERSON"
| clearable
| @change="onFormUpdate"
| ></el-bus-select-dict>
| <div v-else>{{ row.personInChargeStr }}</div>
| </template>
| </el-table-column>
| <el-table-column
| label="赔付金额(元)"
| prop="amount"
| min-width="120"
| fixed="right"
| >
| <template #default="{ row }">
| <el-input-number
| v-if="!disabled"
| v-model="row.amount"
| :precision="2"
| :min="0"
| :controls="false"
| style="width: 100%"
| @change="onFormUpdate"
| ></el-input-number>
| <div v-else>{{ row.amount }}</div>
| </template>
| </el-table-column>
| <el-table-column label="备注" prop="remarks" min-width="250" fixed="right">
| <template #default="{ row }">
| <el-input
| v-if="!disabled"
| v-model="row.remarks"
| @change="onFormUpdate"
| ></el-input>
| <div v-else>{{ row.remarks }}</div>
| </template>
| </el-table-column>
| </el-table>
| </template>
|
| <script>
| export default {
| props: {
| value: {
| type: Array,
| default: () => [],
| },
| disabled: {
| type: Boolean,
| default: false,
| },
| },
| data() {
| return {
| currentValue: [],
| }
| },
| watch: {
| value: {
| immediate: true,
| handler(value) {
| this.currentValue = value || []
| },
| },
| },
| methods: {
| onFormUpdate() {
| this.$emit('input', this.currentValue)
| this.$emit('change', this.currentValue)
| },
| },
| }
| </script>
|
| <style lang="scss" scoped>
| .after-sale-items {
| }
| </style>
|
|