mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
feat: #10000 数据加载显示优化
This commit is contained in:
parent
5f3c64ed88
commit
c11353f4d9
@ -64,7 +64,8 @@
|
|||||||
<el-button type="primary" plain @click="update()">上新</el-button>
|
<el-button type="primary" plain @click="update()">上新</el-button>
|
||||||
<el-upload ref="myUpload" action="/api/inventory/goods_skus" :multiple="false"
|
<el-upload ref="myUpload" action="/api/inventory/goods_skus" :multiple="false"
|
||||||
name="inventoryFile" :show-file-list="false" :on-success="inventorySuccess"
|
name="inventoryFile" :show-file-list="false" :on-success="inventorySuccess"
|
||||||
:on-error="inventoryError" style="display:inline-block;margin: 0 10px 0 10px;">
|
:before-upload="beforeInventory" :on-error="inventoryError"
|
||||||
|
style="display:inline-block;margin: 0 10px 0 10px;">
|
||||||
<el-button type="primary" plain>盘点导入</el-button>
|
<el-button type="primary" plain>盘点导入</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button type="primary" plain @click="addNewgoods">新建商品</el-button>
|
<el-button type="primary" plain @click="addNewgoods">新建商品</el-button>
|
||||||
@ -491,6 +492,7 @@ export default {
|
|||||||
publicId: "", //参考售价 预留量公用id
|
publicId: "", //参考售价 预留量公用id
|
||||||
reference_price: "", //参考价格修改传参
|
reference_price: "", //参考价格修改传参
|
||||||
reserve: "", //预留量修改传参
|
reserve: "", //预留量修改传参
|
||||||
|
loadingModule: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -907,17 +909,27 @@ export default {
|
|||||||
this.brand = res.data.data;
|
this.brand = res.data.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
beforeInventory() {
|
||||||
|
this.loadingModule = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '盘点导入中...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
},
|
||||||
inventorySuccess(response) {
|
inventorySuccess(response) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: response.message,
|
message: response.message,
|
||||||
type: "success",
|
type: "success",
|
||||||
});
|
});
|
||||||
|
this.loadingModule.close();
|
||||||
},
|
},
|
||||||
inventoryError(err) {
|
inventoryError(err) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: res.errorMessage,
|
message: err.errorMessage,
|
||||||
type: "error",
|
type: "error",
|
||||||
});
|
});
|
||||||
|
this.loadingModule.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<div v-if="scope.row.status === '已授权'">
|
<div v-if="scope.row.status === '已授权'">
|
||||||
<el-button type="success" :disabled="true">{{
|
<el-button type="success" :disabled="true">{{
|
||||||
scope.row.status
|
scope.row.status
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button @click="download(scope.row)">下载商品</el-button>
|
<el-button @click="download(scope.row)">下载商品</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -30,9 +30,8 @@
|
|||||||
|
|
||||||
<div v-if="scope.row.status === '无需授权'">
|
<div v-if="scope.row.status === '无需授权'">
|
||||||
<el-button type="success" :disabled="true">{{
|
<el-button type="success" :disabled="true">{{
|
||||||
scope.row.status
|
scope.row.status
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button @click="download(scope.row)">下载商品</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -148,8 +147,18 @@ export default {
|
|||||||
|
|
||||||
// 下载商品
|
// 下载商品
|
||||||
download(row) {
|
download(row) {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: row.name + ' 店铺商品下载中...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
downloadGoods(row.id).then((res) => {
|
downloadGoods(row.id).then((res) => {
|
||||||
|
loading.close();
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: res.data.message,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -161,6 +170,7 @@ a {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.block {
|
.block {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user