|
@@ -9,6 +9,7 @@
|
|
|
@fetch="fetchInfo"
|
|
|
:display="display"
|
|
|
:policyInfo="policyInfo"
|
|
|
+ @onSubmit="onSubmit"
|
|
|
></supermarketlist-detail>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -19,6 +20,8 @@ import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
import _ from 'loadsh';
|
|
|
const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
const { mapActions: mapEnterpriseproject } = createNamespacedHelpers('enterpriseproject');
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'policy',
|
|
|
props: {},
|
|
@@ -46,6 +49,7 @@ export default {
|
|
|
methods: {
|
|
|
...mapSite(['showInfo']),
|
|
|
...mapEnterpriseproject({ list: 'query', fetch: 'fetch' }),
|
|
|
+ ...transaction({ transactioncreate: 'create', transactionfetch: 'fetch' }),
|
|
|
// 查询站点信息
|
|
|
async searchSite() {
|
|
|
let res = await this.showInfo();
|
|
@@ -84,6 +88,25 @@ export default {
|
|
|
this.$set(this, `skip`, skip);
|
|
|
this.search();
|
|
|
},
|
|
|
+ async onSubmit() {
|
|
|
+ let form = {};
|
|
|
+
|
|
|
+ form.userid = '12334';
|
|
|
+ form.username = '测试neme';
|
|
|
+ form.product_id = this.policyInfo.id;
|
|
|
+ form.product_name = this.policyInfo.name;
|
|
|
+ form.market_userid = this.policyInfo.userid;
|
|
|
+ form.market_username = this.policyInfo.contact_user;
|
|
|
+ form.status = '0';
|
|
|
+ let res = await this.transactioncreate(form);
|
|
|
+ this.$checkRes(res, '发起交易成功', '交易失败');
|
|
|
+ // console.log(form);
|
|
|
+ // let shenhe = {};
|
|
|
+ // shenhe.result = '0';
|
|
|
+ // shenhe.userid = this.policyInfo.userid;
|
|
|
+ // shenhe.product_id = this.policyInfo.userid;
|
|
|
+ // console.log(shenhe);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|