|
@@ -5,7 +5,7 @@
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="24" class="one">
|
|
<search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
|
|
<search-1 :form="searchForm" @onSubmit="search" @toReset="toClose"></search-1>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col>
|
|
|
|
|
|
+ <el-col :span="24" v-if="afterSaleList.length != '0' || orderList.length != '0'">
|
|
<el-button type="primary" @click="toFile()">对账</el-button>
|
|
<el-button type="primary" @click="toFile()">对账</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="two">
|
|
<el-col :span="24" class="two">
|
|
@@ -33,6 +33,7 @@ const ExcelJS = require('exceljs');
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions } = createNamespacedHelpers('getBill');
|
|
const { mapActions } = createNamespacedHelpers('getBill');
|
|
const { mapActions: selfShop } = createNamespacedHelpers('selfShop');
|
|
const { mapActions: selfShop } = createNamespacedHelpers('selfShop');
|
|
|
|
+const { mapActions: outBill } = createNamespacedHelpers('outBill');
|
|
export default {
|
|
export default {
|
|
name: 'card-1',
|
|
name: 'card-1',
|
|
props: {},
|
|
props: {},
|
|
@@ -72,8 +73,9 @@ export default {
|
|
await this.searchOther();
|
|
await this.searchOther();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
|
...selfShop(['getInfo']),
|
|
...selfShop(['getInfo']),
|
|
|
|
+ ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
|
|
|
|
+ ...outBill({ outQuery: 'query', outCreate: 'create' }),
|
|
// 查询
|
|
// 查询
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
let condition = _.cloneDeep(this.searchForm);
|
|
let condition = _.cloneDeep(this.searchForm);
|
|
@@ -130,6 +132,25 @@ export default {
|
|
`对账单.xlsx`
|
|
`对账单.xlsx`
|
|
);
|
|
);
|
|
});
|
|
});
|
|
|
|
+ this.$confirm('是否确认对账?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ }).then(async () => {
|
|
|
|
+ let order = [];
|
|
|
|
+ for (const p1 of this.orderList) {
|
|
|
|
+ order.push(p1._id);
|
|
|
|
+ }
|
|
|
|
+ let afterSale = [];
|
|
|
|
+ for (const p1 of this.afterSaleList) {
|
|
|
|
+ afterSale.push(p1._id);
|
|
|
|
+ }
|
|
|
|
+ let res;
|
|
|
|
+ res = await this.outCreate({ order, afterSale });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$message({ type: `success`, message: `对账成功` });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 查询其他信息
|
|
// 查询其他信息
|
|
async searchOther() {
|
|
async searchOther() {
|