...
|
...
|
@@ -3,7 +3,7 @@ |
|
|
<layout-filter>
|
|
|
<filter-item :label="filters.id.label">
|
|
|
<Input v-model.trim="filters.id.model"
|
|
|
:placeholder="filters.id.holder" ></Input>
|
|
|
:placeholder="filters.id.holder" maxlength="9" ></Input>
|
|
|
</filter-item>
|
|
|
|
|
|
<filter-item :label="filters.expressNumber.label">
|
...
|
...
|
@@ -100,7 +100,11 @@ |
|
|
let params = {};
|
|
|
|
|
|
if (this.filters.id.model) {
|
|
|
params.proReqFormId = this.filters.id.model;
|
|
|
if (this.isNumber(this.filters.id.model)) {
|
|
|
params.proReqFormId = this.filters.id.model;
|
|
|
} else {
|
|
|
return Promise.reject('入库单号必须是数字');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (this.filters.expressNumber.model) {
|
...
|
...
|
@@ -121,8 +125,8 @@ |
|
|
return Promise.resolve(params);
|
|
|
},
|
|
|
getExpress() {
|
|
|
this.$Loading.start();
|
|
|
return this.filtersParams().then((params) => {
|
|
|
this.$Loading.start();
|
|
|
return this.expressService.list(params);
|
|
|
}).then((result) => {
|
|
|
if (result.code === 200) {
|
...
|
...
|
@@ -131,6 +135,9 @@ |
|
|
this.tableData = result.data.records;
|
|
|
}
|
|
|
this.$Loading.finish();
|
|
|
}).catch((err) => {
|
|
|
this.$Loading.finish();
|
|
|
this.$Message.error(err);
|
|
|
});
|
|
|
},
|
|
|
info(data) {
|
...
|
...
|
@@ -148,6 +155,11 @@ |
|
|
this.expressService.exportList().then((url) => {
|
|
|
window.open(url, '_blank');
|
|
|
});
|
|
|
},
|
|
|
isNumber(numStr) {
|
|
|
const isNumber = /^[0-9]+$/;
|
|
|
|
|
|
return isNumber.test(numStr);
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
|