Преглед на файлове

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-website

guhongwei преди 5 години
родител
ревизия
f1cb58f890
променени са 4 файла, в които са добавени 11691 реда и са изтрити 8 реда
  1. 11656 0
      package-lock.json
  2. 1 1
      src/components/supermaket/supermarketlistDetail.vue
  3. 11 7
      src/layout/supermarket/detali.vue
  4. 23 0
      src/views/supermaket/supermarketlist.vue

Файловите разлики са ограничени, защото са твърде много
+ 11656 - 0
package-lock.json


+ 1 - 1
src/components/supermaket/supermarketlistDetail.vue

@@ -18,7 +18,7 @@
         <div class="w_1200">
           <el-col :span="24" class="rightcont">
             <listcontext v-on="$listeners" :contentList="contentList" :columnName="columnName" v-if="display === 'list'" :total="total"></listcontext>
-            <detali v-else :policyInfo="policyInfo"></detali>
+            <detali v-else :policyInfo="policyInfo" v-on="$listeners"> </detali>
           </el-col>
         </div>
       </el-col>

+ 11 - 7
src/layout/supermarket/detali.vue

@@ -3,13 +3,13 @@
     <el-row>
       <el-col :span="24" class="info">
         <el-col :span="24" class="infoMess">
-          <el-col :span="24" class="info"> 名称{{ policyInfo.name }} </el-col>
+          <el-col :span="24" class="info"> 名称:{{ policyInfo.name }} </el-col>
           <el-col :span="24" class="info">
             总分类:{{ policyInfo.totaltype === '0' ? '技术' : policyInfo.totaltype === '1' ? '产品' : policyInfo.totaltype === '2' ? '服务' : 'underdind' }}
           </el-col>
           <el-col :span="24" class="info"> 类型名称:{{ policyInfo.product_type_name }} </el-col>
-          <el-col :span="24" class="info"> 单价{{ policyInfo.price }} </el-col>
-          <el-col :span="24" class="info"> 单位 {{ policyInfo.priceunit }} </el-col>
+          <el-col :span="24" class="info"> 单价:{{ policyInfo.price }} </el-col>
+          <el-col :span="24" class="info"> 单位:{{ policyInfo.priceunit }} </el-col>
           <el-col :span="24" class="infos" v-for="(acm, index) in policyInfo.image" :key="index">
             <span> 产品图片:</span><span><el-image style="width:100px;height:100px" :src="acm.url"></el-image></span>
           </el-col>
@@ -31,12 +31,12 @@
           <el-col :span="24" class="info">
             状态:{{ policyInfo.status === '0' ? '待审核' : policyInfo.status === '1' ? '通过审核' : policyInfo.status === '2' ? '审核拒绝' : 'underdind' }}
           </el-col>
-          <el-col :span="24" class="info"> 是否删除:{{ policyInfo.is_del === '0' ? '否' : policyInfo.is_del === '1' ? '是' : 'underdind' }} </el-col>
+          <!-- <el-col :span="24" class="info"> 是否删除:{{ policyInfo.is_del === '0' ? '否' : policyInfo.is_del === '1' ? '是' : 'underdind' }} </el-col> -->
           <el-col :span="24" class="info"> 联系人:{{ policyInfo.contact_user }} </el-col>
           <el-col :span="24" class="info"> 联系电话:{{ policyInfo.contact_tel }} </el-col>
           <el-col :span="24" class="info"> 简介:{{ policyInfo.introduction }} </el-col>
         </el-col>
-        <el-col :span="24" class="topInfo"> </el-col>
+        <el-col :span="24" class="topInfo"> <el-button type="primary" @click="onSubmit">立即创建</el-button></el-col>
       </el-col>
     </el-row>
   </div>
@@ -52,7 +52,12 @@ export default {
   data: () => ({}),
   created() {},
   computed: {},
-  methods: {},
+  methods: {
+    onSubmit() {
+      console.log(this.policyInfo);
+      this.$emit('onSubmit', this.policyInfo);
+    },
+  },
 };
 </script>
 
@@ -66,7 +71,6 @@ p {
 }
 .infos {
   height: 120px;
-  
 }
 .topInfo {
   height: 60px;

+ 23 - 0
src/views/supermaket/supermarketlist.vue

@@ -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>