|
@@ -15,7 +15,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-dialog title="产品审核" :visible.sync="productDialog" width="50%" :before-close="handleClose">
|
|
<el-dialog title="产品审核" :visible.sync="productDialog" width="50%" :before-close="handleClose">
|
|
<achieve v-if="form.type == '1'" :form="form"></achieve>
|
|
<achieve v-if="form.type == '1'" :form="form"></achieve>
|
|
- <techol v-if="form.type == '0'" :form="form"></techol>
|
|
|
|
|
|
+ <techol v-if="form.type == '0'" :form="form" @submit="toSubmit"></techol>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -65,7 +65,7 @@ export default {
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...dockUser(['query']),
|
|
|
|
|
|
+ ...dockUser(['query', 'update']),
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
info.dock_id = this.user.id;
|
|
info.dock_id = this.user.id;
|
|
const res = await this.query({ skip, limit, ...info });
|
|
const res = await this.query({ skip, limit, ...info });
|
|
@@ -74,6 +74,19 @@ export default {
|
|
this.$set(this, `total`, res.total);
|
|
this.$set(this, `total`, res.total);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async toSubmit(data, status) {
|
|
|
|
+ data.status = status;
|
|
|
|
+ const apply = this.list.find(f => f.productList.find(pf => pf._id === data._id));
|
|
|
|
+ const pindex = apply.productList.findIndex(pf => pf._id === data._id);
|
|
|
|
+ apply.productList[pindex] = data;
|
|
|
|
+ console.log(apply);
|
|
|
|
+ const res = await this.update(apply);
|
|
|
|
+ if (this.$checkRes(res, '审核成功', res.errmsg || '审核失败')) {
|
|
|
|
+ this.handleClose();
|
|
|
|
+ this.back();
|
|
|
|
+ this.search();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 审核产品
|
|
// 审核产品
|
|
toCheck({ data }) {
|
|
toCheck({ data }) {
|
|
this.$set(this, `productList`, data.productList);
|
|
this.$set(this, `productList`, data.productList);
|