|
@@ -33,7 +33,7 @@
|
|
</span>
|
|
</span>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="btn">
|
|
<el-col :span="24" class="btn">
|
|
- <el-button type="primary" size="mini" @click="clickBtn()">交易确定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="clickBtn(item.id)">交易确定</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -68,6 +68,9 @@
|
|
<script>
|
|
<script>
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
|
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
@@ -80,27 +83,47 @@ export default {
|
|
isleftarrow: '',
|
|
isleftarrow: '',
|
|
// 返回
|
|
// 返回
|
|
navShow: true,
|
|
navShow: true,
|
|
- list: [
|
|
|
|
- {
|
|
|
|
- product_name: '产品名称',
|
|
|
|
- username: '购买人',
|
|
|
|
- market_username: '营销人名称',
|
|
|
|
- status: '0',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ list: [],
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
form: {},
|
|
form: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {},
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.search()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
|
|
|
|
+ ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
|
|
|
|
+ ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
|
|
|
|
+ async search({ skip = 0, limit = 1000, ...info } = {}) {
|
|
|
|
+ const res = await this.dockfetch(this.user.uid);
|
|
|
|
+ const arr = await this.transactionslist({ skip, dockid: res.data.id, limit, status: '4', ...info });
|
|
|
|
+ this.$set(this, `list`, arr.data);
|
|
|
|
+ },
|
|
// 交易确定打开
|
|
// 交易确定打开
|
|
- clickBtn() {
|
|
|
|
|
|
+ async clickBtn(id) {
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
|
+ const res = await this.productpactFetch(id);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
- onSubmit() {
|
|
|
|
- this.dialogVisible = false;
|
|
|
|
|
|
+ async onSubmit() {
|
|
|
|
+ const res = await this.productpactUpdate(this.form);
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.form.status = '2';
|
|
|
|
+ this.form.id = this.form.transaction_id;
|
|
|
|
+ const arr = await this.transactionupdate(this.form);
|
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: '审核通过',
|
|
|
|
+ type: 'success',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ }
|
|
|
|
+ this.search()
|
|
},
|
|
},
|
|
handleClose(done) {
|
|
handleClose(done) {
|
|
done();
|
|
done();
|