Commit 4ca0d91b21a712ac6f3d4bec563e47172f1ce942
1 parent
5da34a89
颜色高亮
Showing
7 changed files
with
95 additions
and
5 deletions
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -98,6 +98,11 @@ |
98 | 98 | {{ status_dictText }} |
99 | 99 | </a-tag> |
100 | 100 | </span> |
101 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
102 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
103 | + {{ taskType_dictText }} | |
104 | + </a-tag> | |
105 | + </span> | |
101 | 106 | |
102 | 107 | <template slot="htmlSlot" slot-scope="text"> |
103 | 108 | <div v-html="text"></div> |
... | ... | @@ -121,8 +126,8 @@ |
121 | 126 | <span slot="action" slot-scope="text, record"> |
122 | 127 | <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> |
123 | 128 | <!-- <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> |
124 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | |
125 | - <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a> | |
129 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
130 | + <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
126 | 131 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
127 | 132 | <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a> |
128 | 133 | </a-popconfirm> |
... | ... | @@ -192,6 +197,7 @@ export default { |
192 | 197 | title: '任务类型', |
193 | 198 | align: "center", |
194 | 199 | dataIndex: 'taskType_dictText', |
200 | + scopedSlots: {customRender: 'taskType_dictText'} | |
195 | 201 | }, |
196 | 202 | { |
197 | 203 | title: '状态', |
... | ... | @@ -284,6 +290,9 @@ export default { |
284 | 290 | '新建': 'green', |
285 | 291 | '生成任务': 'blue', |
286 | 292 | '上架完成': 'gray', |
293 | + | |
294 | + '整盘入库': 'blue', | |
295 | + '补充入库': 'green', | |
287 | 296 | default: 'blue' |
288 | 297 | }; |
289 | 298 | return colors[status] || colors.default; |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... | ... | @@ -100,13 +100,23 @@ |
100 | 100 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" |
101 | 101 | :customRow="clickThenSelect" |
102 | 102 | @change="handleTableChange"> |
103 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
104 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
105 | + {{ taskType_dictText }} | |
106 | + </a-tag> | |
107 | + </span> | |
108 | + <span slot="status_dictText" slot-scope="status_dictText"> | |
109 | + <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)"> | |
110 | + {{ status_dictText }} | |
111 | + </a-tag> | |
112 | + </span> | |
103 | 113 | |
104 | 114 | <span slot="action" slot-scope="text, record"> |
105 | - <a v-if="record.status == 0" @click="selectPort(record)">生成任务<a-divider type="vertical"/></a> | |
115 | + <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
106 | 116 | <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
107 | - <a>取消配盘<a-divider type="vertical"/></a> | |
117 | + <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a> | |
108 | 118 | </a-popconfirm> |
109 | - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)">编辑</a> | |
119 | + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a> | |
110 | 120 | </span> |
111 | 121 | </a-table> |
112 | 122 | </div> |
... | ... | @@ -159,11 +169,13 @@ export default { |
159 | 169 | title: '任务类型', |
160 | 170 | align: "center", |
161 | 171 | dataIndex: 'taskType_dictText', |
172 | + scopedSlots: {customRender: 'taskType_dictText'} | |
162 | 173 | }, |
163 | 174 | { |
164 | 175 | title: '状态', |
165 | 176 | align: "center", |
166 | 177 | dataIndex: 'status_dictText', |
178 | + scopedSlots: {customRender: 'status_dictText'} | |
167 | 179 | }, |
168 | 180 | { |
169 | 181 | title: '起始库位', |
... | ... | @@ -245,6 +257,18 @@ export default { |
245 | 257 | } |
246 | 258 | }, |
247 | 259 | methods: { |
260 | + getStatusColor(status) { | |
261 | + const colors = { | |
262 | + '新建': 'green', | |
263 | + '生成任务': 'blue', | |
264 | + '下架完成': 'gray', | |
265 | + | |
266 | + '整出任务': 'blue', | |
267 | + '分拣任务': 'green', | |
268 | + default: 'blue' | |
269 | + }; | |
270 | + return colors[status] || colors.default; | |
271 | + }, | |
248 | 272 | initDictConfig() { |
249 | 273 | }, |
250 | 274 | clickThenSelect(record) { |
... | ... |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
... | ... | @@ -129,6 +129,12 @@ |
129 | 129 | </a-tag> |
130 | 130 | </span> |
131 | 131 | |
132 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
133 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
134 | + {{ taskType_dictText }} | |
135 | + </a-tag> | |
136 | + </span> | |
137 | + | |
132 | 138 | <template slot="htmlSlot" slot-scope="text"> |
133 | 139 | <div v-html="text"></div> |
134 | 140 | </template> |
... | ... | @@ -222,6 +228,7 @@ export default { |
222 | 228 | align: "center", |
223 | 229 | dataIndex: 'taskType_dictText', |
224 | 230 | customFilterDropdown: true, |
231 | + scopedSlots: {customRender: 'taskType_dictText'} | |
225 | 232 | }, |
226 | 233 | { |
227 | 234 | title: '容器编码', |
... | ... | @@ -355,6 +362,9 @@ export default { |
355 | 362 | '下发任务': 'blue', |
356 | 363 | '到达拣选站台': 'orange', |
357 | 364 | '任务完成': 'grey', |
365 | + | |
366 | + '盘点': 'blue', | |
367 | + '出库查看': 'green', | |
358 | 368 | default: 'blue' |
359 | 369 | }; |
360 | 370 | return colors[status] || colors.default; |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -116,6 +116,13 @@ |
116 | 116 | </a-tag> |
117 | 117 | </span> |
118 | 118 | |
119 | + | |
120 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
121 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
122 | + {{ taskType_dictText }} | |
123 | + </a-tag> | |
124 | + </span> | |
125 | + | |
119 | 126 | <span slot="zoneCode" slot-scope="zoneCode"> |
120 | 127 | <a-tag :key="zoneCode" color=blue> |
121 | 128 | {{ solutionZoneCode(zoneCode) }} |
... | ... | @@ -216,6 +223,7 @@ export default { |
216 | 223 | title: '任务类型', |
217 | 224 | align: "center", |
218 | 225 | dataIndex: 'taskType_dictText', |
226 | + scopedSlots: {customRender: 'taskType_dictText'} | |
219 | 227 | }, |
220 | 228 | { |
221 | 229 | title: '容器编码', |
... | ... | @@ -351,6 +359,9 @@ export default { |
351 | 359 | '下发任务': 'blue', |
352 | 360 | '到达拣选站台': 'orange', |
353 | 361 | '任务完成': 'grey', |
362 | + | |
363 | + '整盘入库': 'blue', | |
364 | + '补充入库': 'green', | |
354 | 365 | default: 'blue' |
355 | 366 | }; |
356 | 367 | return colors[status] || colors.default; |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... | ... | @@ -122,6 +122,12 @@ |
122 | 122 | </a-tag> |
123 | 123 | </span> |
124 | 124 | |
125 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
126 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
127 | + {{ taskType_dictText }} | |
128 | + </a-tag> | |
129 | + </span> | |
130 | + | |
125 | 131 | <template slot="htmlSlot" slot-scope="text"> |
126 | 132 | <div v-html="text"></div> |
127 | 133 | </template> |
... | ... | @@ -217,6 +223,7 @@ export default { |
217 | 223 | title: '任务类型', |
218 | 224 | align: "center", |
219 | 225 | dataIndex: 'taskType_dictText', |
226 | + scopedSlots: {customRender: 'taskType_dictText'} | |
220 | 227 | }, |
221 | 228 | { |
222 | 229 | title: '容器编码', |
... | ... | @@ -351,6 +358,9 @@ export default { |
351 | 358 | '下发任务': 'blue', |
352 | 359 | '到达拣选站台': 'orange', |
353 | 360 | '任务完成': 'grey', |
361 | + | |
362 | + '整盘出库': 'blue', | |
363 | + '分拣出库': 'green', | |
354 | 364 | default: 'blue' |
355 | 365 | }; |
356 | 366 | return colors[status] || colors.default; |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... | ... | @@ -51,6 +51,12 @@ |
51 | 51 | </a-tag> |
52 | 52 | </span> |
53 | 53 | |
54 | + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText"> | |
55 | + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)"> | |
56 | + {{ inventoryStatus_dictText }} | |
57 | + </a-tag> | |
58 | + </span> | |
59 | + | |
54 | 60 | <template slot="htmlSlot" slot-scope="text"> |
55 | 61 | <div v-html="text"></div> |
56 | 62 | </template> |
... | ... | @@ -172,6 +178,7 @@ export default { |
172 | 178 | title: '库存状态', |
173 | 179 | align: "center", |
174 | 180 | dataIndex: 'inventoryStatus_dictText', |
181 | + scopedSlots: {customRender: 'inventoryStatus_dictText'} | |
175 | 182 | }, |
176 | 183 | { |
177 | 184 | title: '创建人', |
... | ... | @@ -226,6 +233,16 @@ export default { |
226 | 233 | } |
227 | 234 | }, |
228 | 235 | methods: { |
236 | + getStatusColor(status) { | |
237 | + const colors = { | |
238 | + '良品': 'green', | |
239 | + '报废品': 'purple', | |
240 | + '待确认 ': 'grey', | |
241 | + '次品': 'red', | |
242 | + default: 'blue' | |
243 | + }; | |
244 | + return colors[status] || colors.default; | |
245 | + }, | |
229 | 246 | loadFrom() { |
230 | 247 | getCompanyList().then((res) => { |
231 | 248 | if (res.success) { |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
... | ... | @@ -122,6 +122,12 @@ |
122 | 122 | </a-tag> |
123 | 123 | </span> |
124 | 124 | |
125 | + <span slot="taskType_dictText" slot-scope="taskType_dictText"> | |
126 | + <a-tag :key="taskType_dictText" :color="getStatusColor(taskType_dictText)"> | |
127 | + {{ taskType_dictText }} | |
128 | + </a-tag> | |
129 | + </span> | |
130 | + | |
125 | 131 | <span slot="zoneCode" slot-scope="zoneCode"> |
126 | 132 | <a-tag :key="zoneCode" color=blue> |
127 | 133 | {{ solutionZoneCode(zoneCode) }} |
... | ... | @@ -220,6 +226,7 @@ export default { |
220 | 226 | title: '任务类型', |
221 | 227 | align: "center", |
222 | 228 | dataIndex: 'taskType_dictText', |
229 | + scopedSlots: {customRender: 'taskType_dictText'} | |
223 | 230 | }, |
224 | 231 | { |
225 | 232 | title: '容器编码', |
... | ... | @@ -358,6 +365,8 @@ export default { |
358 | 365 | '下发任务': 'blue', |
359 | 366 | '到达拣选站台': 'orange', |
360 | 367 | '任务完成': 'grey', |
368 | + | |
369 | + '移库': 'blue', | |
361 | 370 | default: 'blue' |
362 | 371 | }; |
363 | 372 | return colors[status] || colors.default; |
... | ... |