|
@@ -48,6 +48,7 @@
|
|
|
const { mapActions: client } = createNamespacedHelpers('client');
|
|
|
const { mapActions: order } = createNamespacedHelpers('order');
|
|
|
const { mapActions: user } = createNamespacedHelpers('user');
|
|
|
+const { mapActions: inBill } = createNamespacedHelpers('inBill');
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
import inDetail from './inDetail.vue';
|
|
|
export default {
|
|
@@ -108,11 +109,11 @@ export default {
|
|
|
methods: {
|
|
|
...client({ clientQuery: 'query' }),
|
|
|
...user({ userQuery: 'query' }),
|
|
|
+ ...inBill(['inBill']),
|
|
|
...order(['query', 'create', 'update', 'delete', 'fetch']),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
//查订单
|
|
|
const res = await this.query({ skip, limit, ...info });
|
|
|
- // console.log(res.data);
|
|
|
if (this.$checkRes(res)) {
|
|
|
const { data, total } = res;
|
|
|
this.$set(this, `list`, data);
|
|
@@ -167,8 +168,9 @@ export default {
|
|
|
async toSave(data) {
|
|
|
console.log(data);
|
|
|
if (data.id) {
|
|
|
- const res = await this.update(data);
|
|
|
- if (this.$checkRes(res, '修改成功', res.errmsg || '修改失败')) {
|
|
|
+ const res = await this.inBill(data);
|
|
|
+ console.log(res);
|
|
|
+ if (this.$checkRes(res, '保存成功', res.errmsg || '保存失败')) {
|
|
|
this.search();
|
|
|
this.flag = false;
|
|
|
}
|