guhongwei vor 5 Jahren
Ursprung
Commit
cdaa4e97f2

+ 1 - 1
src/layout/userCenter/heads.vue

@@ -59,7 +59,7 @@ export default {
       this.toLogin();
     },
     async toLogin() {
-      this.$router.push({ path: '/platlive' });
+      this.$router.push({ path: '/' });
     },
   },
   computed: {

+ 2 - 0
src/store/index.js

@@ -25,6 +25,7 @@ import maarkettype from '@common/store/market/markettype';
 import comment from '@common/store/live/comment';
 import tranaudit from '@common/store/market/tranaudit';
 import expertsuser from '@common/store/market/exportuser';
+import productpact from '@common/store/market/productpact';
 import users from './user';
 Vue.use(Vuex);
 
@@ -57,5 +58,6 @@ export default new Vuex.Store({
     tranaudit,
     expertsuser,
     users,
+    productpact,
   },
 });

+ 6 - 1
src/views/hall/liveApply.vue

@@ -78,7 +78,7 @@
               </el-form-item>
               <el-row style="text-align:center">
                 <el-button type="primary" @click="onSubmit">立即申请</el-button>
-                <el-button>取消</el-button>
+                <el-button @click="restBtn">取消</el-button>
               </el-row>
             </el-form>
           </el-col>
@@ -125,6 +125,7 @@ export default {
             message: '申请参加对接会成功',
             type: 'success',
           });
+          this.restBtn();
         }
       } else {
         // let res = 0;
@@ -136,6 +137,10 @@ export default {
         });
       }
     },
+    // 取消
+    restBtn() {
+      $router.go(-1);
+    },
     productInfo(id) {
       let index = this.goodsLists.find(item => item.id == id);
       return index;

+ 13 - 1
src/views/userCenter/eventInfo/part/allList.vue

@@ -17,7 +17,19 @@
               <p>{{ item.desrciption }}</p>
             </el-col>
             <el-col :span="6" class="status">
-              <p>状态:{{ item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : '未识别' }}</p>
+              <p>
+                状态:{{
+                  item.status == '0'
+                    ? '正在洽谈'
+                    : item.status == '1'
+                    ? '达成意向'
+                    : item.status == '2'
+                    ? '我的交易'
+                    : item.status == '4'
+                    ? '合同审核中'
+                    : '未识别'
+                }}
+              </p>
               <!-- <el-button type="primary">同意交易</el-button> -->
             </el-col>
           </el-col>

+ 39 - 19
src/views/userCenter/eventInfo/part/intenList.vue

@@ -17,8 +17,20 @@
               <p>{{ item.desrciption }}</p>
             </el-col>
             <el-col :span="6" class="status">
-              <p>状态:{{ item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : '未识别' }}</p>
-              <el-button type="primary" @click="transBtn(item)" size="mini">交易完成</el-button>
+              <p>
+                状态:{{
+                  item.status == '0'
+                    ? '正在洽谈'
+                    : item.status == '1'
+                    ? '达成意向'
+                    : item.status == '2'
+                    ? '我的交易'
+                    : item.status == '4'
+                    ? '合同审核中'
+                    : '未识别'
+                }}
+              </p>
+              <el-button type="primary" @click="transBtn(item)" size="mini" v-if="item.status == '1'">交易完成</el-button>
             </el-col>
           </el-col>
         </el-col>
@@ -39,13 +51,14 @@
         <el-form-item label="产品名称" label-width="120px" prop="product_name">
           <el-input v-model="form.product_name" autocomplete="off" placeholder="请输入产品名称"></el-input>
         </el-form-item>
-        <el-form-item label="产品单价" label-width="120px" prop="price">
-          <el-input v-model="form.price" autocomplete="off" placeholder="请输入产品单价"></el-input>
+        <el-form-item label="购买人姓名" label-width="120px" prop="username">
+          <el-input v-model="form.username" autocomplete="off" placeholder="请输入购买人姓名"></el-input>
         </el-form-item>
-        <el-form-item label="产品单位" label-width="120px" prop="priceunit">
-          <el-select v-model="form.priceunit" placeholder="请选择产品单位">
-            <el-option v-for="(item, index) in priceunit_list" :key="index" :label="item.name" :value="item.name"></el-option>
-          </el-select>
+        <el-form-item label="营销人姓名" label-width="120px" prop="market_username">
+          <el-input v-model="form.market_username" autocomplete="off" placeholder="请输入营销人姓名"></el-input>
+        </el-form-item>
+        <el-form-item label="描述" label-width="120px" prop="description">
+          <el-input v-model="form.description" maxlength="300" show-word-limit type="textarea" autocomplete="off" placeholder="请输入描述"></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" style="text-align:center;">
@@ -59,6 +72,8 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
+
 export default {
   name: 'intenList',
   props: {},
@@ -97,34 +112,39 @@ export default {
   },
   methods: {
     ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
+    ...productpact({ productpactCreate: 'create' }),
     // 列表
     async searchInfo({ skip = 0, limit = 6, ...info } = {}) {
       let market_userid = this.user.uid;
       skip = this.skip;
       const res = await this.transactionList({ skip, limit, market_userid, status: 1, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
+      const arr = await this.transactionList({ skip, limit, market_userid, status: 4, ...info });
+      var newData = res.data.concat(arr.data);
+      if (this.$checkRes(newData)) {
+        this.$set(this, `list`, newData);
+        this.$set(this, `total`, newData.length);
       }
     },
     // 交易信息提交打开
     transBtn(item) {
-      this.$set(this.form, `product_name`, item.product_name);
+      this.$set(this, `form`, item);
       this.dialogFormVisible = true;
     },
     // 交易信息提交
-    formSubmit(formName) {
-      this.$refs[formName].validate(valid => {
-        if (valid) {
-          console.log(this.form);
+    async formSubmit() {
+      this.form.status = '0';
+      this.form.transaction_id = this.form.id;
+      const res = await this.productpactCreate(this.form);
+      if (this.$checkRes(res)) {
+        this.form.status = '4';
+        const arr = await this.shenheupdate(this.form);
+        if (this.$checkRes(arr)) {
           this.$message({
             message: '提交交易成功,等待管理员审核,方可交易完成',
             type: 'success',
           });
-        } else {
-          return false;
         }
-      });
+      }
       this.dialogFormVisible = false;
     },
     // 取消申请