|
@@ -6,11 +6,9 @@
|
|
|
:contentList="contentList"
|
|
|
:total="total"
|
|
|
:columnName="columnName"
|
|
|
- @fetch="fetchInfo"
|
|
|
:display="display"
|
|
|
:policyInfo="policyInfo"
|
|
|
:totaltype="totaltype1"
|
|
|
- @onSubmit="onSubmit"
|
|
|
></supermarketlist-detail>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -32,27 +30,24 @@ export default {
|
|
|
},
|
|
|
data: () => ({
|
|
|
info: {},
|
|
|
- policyInfo: {},
|
|
|
display: 'detail',
|
|
|
+ policyInfo: {},
|
|
|
columnName: '',
|
|
|
contentList: [],
|
|
|
- total: 1,
|
|
|
+ total: 0,
|
|
|
skip: '',
|
|
|
totaltype1: '',
|
|
|
}),
|
|
|
async created() {
|
|
|
+ this.$set(this, `totaltype1`, this.$route.query.totaltype);
|
|
|
this.searchSite();
|
|
|
this.searchinfos();
|
|
|
- this.$set(this, `totaltype1`, this.totaltype);
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
id() {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
- ...mapState(['user']),
|
|
|
- totaltype() {
|
|
|
- return this.$route.query.totaltype;
|
|
|
- },
|
|
|
},
|
|
|
methods: {
|
|
|
...mapSite(['showInfo']),
|
|
@@ -69,37 +64,13 @@ export default {
|
|
|
this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
|
}
|
|
|
},
|
|
|
- fetchInfo() {},
|
|
|
async searchinfos() {
|
|
|
- // console.log(this.totaltype);
|
|
|
this.display = 'detail';
|
|
|
const res = await this.fetch(this.id);
|
|
|
this.$set(this, `policyInfo`, res.data);
|
|
|
},
|
|
|
async handleCurrentChange({ skip, limit, currentPage }) {
|
|
|
this.$set(this, `skip`, skip);
|
|
|
- this.search();
|
|
|
- },
|
|
|
- async onSubmit() {
|
|
|
- console.log(this.user.uid);
|
|
|
- let form = {};
|
|
|
- form.userid = this.user.uid;
|
|
|
- form.username = this.user.name;
|
|
|
- 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';
|
|
|
- console.log(form);
|
|
|
- let res = await this.transactioncreate(form);
|
|
|
- this.$checkRes(res, '发起交易成功', '交易失败');
|
|
|
- let shenhe = {};
|
|
|
- shenhe.result = '0';
|
|
|
- shenhe.transaction_id = res.data.id;
|
|
|
- shenhe.userid = this.policyInfo.userid;
|
|
|
- shenhe.product_id = this.policyInfo.userid;
|
|
|
- console.log(shenhe);
|
|
|
- let ress = await this.tranauditcreate(shenhe);
|
|
|
},
|
|
|
},
|
|
|
};
|