|
@@ -36,6 +36,7 @@ export default {
|
|
|
],
|
|
|
fields: [
|
|
|
{ label: '供应商', model: 'client', filter: 'select', format: true, notable: true },
|
|
|
+ { label: '第三方车号', model: 'car_no', filter: true, format: true, notable: true },
|
|
|
{ label: '标题', model: 'title', filter: true },
|
|
|
{ label: '创建时间', model: 'create_time', filter: 'date' },
|
|
|
{ label: '备注', model: 'remark' },
|
|
@@ -54,11 +55,19 @@ export default {
|
|
|
...transport(['supplierExport']),
|
|
|
...client({ getClientList: 'query' }),
|
|
|
async search(data) {
|
|
|
- if (!_.get(data, 'client')) {
|
|
|
- this.$message.error('请选择客户');
|
|
|
+ const c = _.get(data, 'client');
|
|
|
+ const car_no = _.get(data, 'car_no');
|
|
|
+ const client = c || car_no;
|
|
|
+ if (c && car_no) {
|
|
|
+ this.$message.warning('只能选择供应商 或 填写第三方车号 ');
|
|
|
return;
|
|
|
}
|
|
|
- const res = await this.query(data);
|
|
|
+ if (!client) {
|
|
|
+ this.$message.error('请选择供应商或输入第三方车号');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const query = _.omit(data, ['client', 'car_no']);
|
|
|
+ const res = await this.query({ ...query, client });
|
|
|
if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
},
|
|
|
//导出
|