|
@@ -43,6 +43,8 @@
|
|
|
<el-button type="info" icon="el-icon-printer" size="small" :loading="exportLoading" @click.stop="statement">
|
|
|
报表打印
|
|
|
</el-button>
|
|
|
+ <el-button type="success" icon="el-icon-plus" size="small" @click="calculateInventory()">更新库存
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
<el-dialog title="导入库存" append-to-body :visible.sync="excelBox" width="555px">
|
|
@@ -59,7 +61,8 @@ import option from "./config/mainList.json";
|
|
|
import {
|
|
|
deleteTemplate,
|
|
|
customerList,
|
|
|
- typeSave
|
|
|
+ typeSave,
|
|
|
+ calculateInventory
|
|
|
} from "@/api/basicData/inventoryAccount";
|
|
|
import { getToken } from "@/util/auth";
|
|
|
import { defaultDate } from "@/util/date";
|
|
@@ -158,6 +161,17 @@ export default {
|
|
|
}=${getToken()}`
|
|
|
);
|
|
|
});
|
|
|
+ },calculateInventory() {
|
|
|
+ this.$confirm("是否更新库存?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.loading = true;
|
|
|
+ calculateInventory().finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
+ });
|
|
|
},
|
|
|
uploadAfter(res, done, loading, column) {
|
|
|
window.console.log(column);
|