wuhongyu %!s(int64=4) %!d(string=hai) anos
pai
achega
eff7232fee

+ 3 - 4
src/layout/transaction/detaliinfo.vue

@@ -32,17 +32,16 @@
 
       <van-field
         type="textarea"
-        disabled
         v-model="form.description"
         name="描述"
         label="描述"
         placeholder="请输入描述"
         :rules="[{ required: true, message: '请输入描述' }]"
       />
-      <van-field name="radio" label="单选框">
+      <van-field name="radio" label="审核">
         <template #input>
-          <van-radio-group v-model="radio" direction="horizontal">
-            <van-radio name="0">待审核 </van-radio>
+          <van-radio-group v-model="form.status" direction="horizontal">
+            <van-radio name="0">待审核</van-radio>
             <van-radio name="1">审核通过</van-radio>
           </van-radio-group>
         </template>

+ 6 - 4
src/views/adminCenter/transaction/detail.vue

@@ -52,17 +52,19 @@ export default {
     ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactionupdate: 'update' }),
     ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
     async searchInfo() {
+      console.log(this.id);
+
       const res = await this.productpactFetch(this.id);
       if (this.$checkRes(res)) {
         this.$set(this, `form`, res.data);
       }
     },
     async onSubmit({ data }) {
-      const res = await this.productpactUpdate(this.form);
+      const res = await this.productpactUpdate(data);
       if (this.$checkRes(res)) {
-        this.form.status = '2';
-        this.form.id = this.form.transaction_id;
-        const arr = await this.transactionupdate(this.form);
+        data.status = '2';
+        data.id = data.transaction_id;
+        const arr = await this.transactionupdate(data);
         if (this.$checkRes(arr)) {
           this.$message({
             message: '审核通过',

+ 13 - 3
src/views/adminCenter/transaction/parts/list.vue

@@ -13,9 +13,19 @@
 
           <p>
             <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
+            <span>状态:</span>
+            {{
+              `${item.status}` === `0`
+                ? '未交易'
+                : `${item.status}` === `1`
+                ? '交易中'
+                : `${item.status}` === `2`
+                ? '交易成功'
+                : `${item.status}` === `3`
+                ? '交易失败'
+                : `${item.status}` === `4`
+                ? '合同待审核'
+                : '未识别'
             }}
           </p>