|
@@ -80,6 +80,7 @@ import negotiation from './parts/negotiation.vue';
|
|
|
import intentionList from './parts/intentionList.vue';
|
|
|
import transaction from './parts/transaction.vue';
|
|
|
const { mapActions: transactions } = createNamespacedHelpers('transaction');
|
|
|
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -100,11 +101,27 @@ export default {
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
...transactions({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
|
|
|
+ ...productpact({ productpactCreate: 'create' }),
|
|
|
submit(data) {
|
|
|
console.log(data);
|
|
|
+ this.show = true;
|
|
|
+ this.$set(this, `newform`, data);
|
|
|
},
|
|
|
- onSubmit() {
|
|
|
- console.log('同意');
|
|
|
+ async onSubmit() {
|
|
|
+ this.newform.status = '0';
|
|
|
+ this.newform.transaction_id = this.newform.id;
|
|
|
+ const res = await this.productpactCreate(this.newform);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.newform.status = '4';
|
|
|
+ const arr = await this.shenheupdate(this.newform);
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
+ this.$message({
|
|
|
+ message: '提交交易成功,等待管理员审核,方可交易完成',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.show = false;
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|