|
@@ -84,19 +84,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getAllWorkDicts() {
|
|
|
- this.getWorkDicts("label").then(res => {
|
|
|
- this.findObject(this.option.column, "label").dicData = res.data.data;
|
|
|
- });
|
|
|
- this.getWorkDicts("unit").then(res => {
|
|
|
- this.findObject(this.option.column, "unit").dicData = res.data.data;
|
|
|
- });
|
|
|
- this.getWorkDicts("goods_status").then(res => {
|
|
|
- this.findObject(this.option.column, "status").dicData = res.data.data;
|
|
|
- });
|
|
|
- getAllgoods().then(res => {
|
|
|
- this.findObject(this.option.column, "goods").dicData = res.data.data
|
|
|
- });
|
|
|
- this.$refs.crud.init();
|
|
|
+ this.getWorkDicts("label").then(res => {
|
|
|
+ this.findObject(this.option.column, "label").dicData = res.data.data;
|
|
|
+ });
|
|
|
+ this.getWorkDicts("unit").then(res => {
|
|
|
+ this.findObject(this.option.column, "unit").dicData = res.data.data;
|
|
|
+ });
|
|
|
+ this.getWorkDicts("goods_status").then(res => {
|
|
|
+ this.findObject(this.option.column, "status").dicData = res.data.data;
|
|
|
+ });
|
|
|
+ // getAllgoods().then(res => {
|
|
|
+ // this.findObject(this.option.column, "goods").dicData = res.data.data
|
|
|
+ // });
|
|
|
+ this.$refs.crud.init();
|
|
|
},
|
|
|
searchCriteriaSwitch(type) {
|
|
|
if (type) {
|
|
@@ -150,19 +150,17 @@ export default {
|
|
|
window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
},
|
|
|
onLoad(page, params = {}) {
|
|
|
- let data = this.deepClone(Object.assign(params, this.search));
|
|
|
- this.loading = true;
|
|
|
- getList(
|
|
|
- page.currentPage,
|
|
|
- page.pageSize,
|
|
|
- data
|
|
|
- )
|
|
|
- .then(res => {
|
|
|
- this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
- this.page.total = res.data.data.total;
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- this.loading = false;
|
|
|
+ let data = this.deepClone(Object.assign(params, this.search));
|
|
|
+ this.loading = true;
|
|
|
+ getList(
|
|
|
+ page.currentPage,
|
|
|
+ page.pageSize,
|
|
|
+ data
|
|
|
+ ).then(res => {
|
|
|
+ this.dataList = res.data.data.records ? res.data.data.records : [];
|
|
|
+ this.page.total = res.data.data.total;
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
currentChange(val) {
|