@@ -9,6 +9,13 @@ export default {
if (this.$checkRes(res)) {
this.$set(this, `list`, res.data);
this.$set(this, `total`, res.total);
+ if (res.total === 0) {
+ let arr = await this.goodsUpdate({
+ _id: this.defaultSearch.goods,
+ status: '0',
+ });
+ console.log(arr);
+ }
}
},
// 去添加
@@ -142,7 +142,7 @@ export default {
methods: {
...dictData({ getDict: 'query' }),
...mapActions(['query', 'fetch', 'update', 'delete', 'create']),
- ...goods({ goodsFetch: 'fetch' }),
+ ...goods({ goodsFetch: 'fetch', goodsUpdate: 'update' }),
...methodUtil,
// 添加自定义
initAddData() {