浏览代码

修改存储参数

xiaomei 6 月之前
父节点
当前提交
3b40668687
共有 3 个文件被更改,包括 13 次插入7 次删除
  1. 9 3
      src/views/storage/mulDetail.vue
  2. 2 2
      src/views/storage/singleDetail.vue
  3. 2 2
      src/views/storage/storing.vue

+ 9 - 3
src/views/storage/mulDetail.vue

@@ -28,7 +28,7 @@
               <span class="name">{{ item.name }}</span>
             </div>
             <div class="flex" @click="chooseProduct(item.id, index)">
-              <span class="orderSn" v-if="order_no[item.id]">{{ order_no[item.id] }}</span>
+              <span class="orderSn" v-if="order_no[item.id]">{{ JSON.parse(order_no[item.id]).order_no }}</span>
               <span class="tip" v-else>{{ $t('lang331') }}</span>
               <!-- <van-checkbox :name="item.id" icon-size="16px" checked-color="#21926F"> </van-checkbox> -->
               <div :class="[order_no[item.id] ? 'checkbox checkbox-active' : 'checkbox']">
@@ -58,7 +58,7 @@
               <span :class="[radio == item ? 'radio-active' : '']">
                 {{ item.order_no }}
               </span>
-              <van-radio :name="item.order_no" icon-size="18px" checked-color="#21926f"></van-radio>
+              <van-radio :name="JSON.stringify(item)" icon-size="18px" checked-color="#21926f"></van-radio>
             </div>
           </van-radio-group>
           <div class="nodata" v-else>
@@ -151,6 +151,12 @@ export default {
       if (JSON.stringify(this.order_no) == '{}') {
         return this.$toast(this.$t('lang330'));
       }
+      let order_id = {};
+      for (const key in this.order_no) {
+        const value = JSON.parse(this.order_no[key]);
+        order_id[key] = value.id;
+      }
+
       if (this.pay_type == -1) {
         return this.$toast(this.$t('lang470'));
       }
@@ -163,7 +169,7 @@ export default {
       })
         .then(() => {
           _this.show = true
-          let params = { pledge_id: _this.$route.query.id, pay_type: _this.pay_type, order_no: Object.assign({}, _this.order_no) };
+          let params = { pledge_id: _this.$route.query.id, pay_type: _this.pay_type, order_id: order_id };
           homeApi.createPledge(params).then(res => {
             if (res.code == 200) {
               _this.show = false

+ 2 - 2
src/views/storage/singleDetail.vue

@@ -58,7 +58,7 @@
               <span :class="[checkbox.indexOf(item.order_no) >= 0 ? 'radio-active' : '']">
                 {{ item.order_no }}
               </span>
-              <van-checkbox :name="item.order_no" icon-size="18px" checked-color="#21926f"></van-checkbox>
+              <van-checkbox :name="item.id" icon-size="18px" checked-color="#21926f"></van-checkbox>
             </div>
           </van-checkbox-group>
           <div class="nodata" v-else>
@@ -166,7 +166,7 @@ export default {
       })
         .then(() => {
           _this.show = true;
-          let params = { pledge_id: _this.$route.query.id, pay_type: _this.pay_type, order_no: Object.assign({}, _this.order_no) };
+          let params = { pledge_id: _this.$route.query.id, pay_type: _this.pay_type, order_id: Object.assign({}, _this.order_no) };
           homeApi.createPledge(params).then(res => {
             if (res.code == 200) {
               _this.show = false;

+ 2 - 2
src/views/storage/storing.vue

@@ -92,7 +92,7 @@
             <span :class="[checkbox.indexOf(item.order_no) >= 0 ? 'radio-active' : '']">
               {{ item.order_no }}
             </span>
-            <van-checkbox :name="item.order_no" icon-size="18px" checked-color="#21926f"></van-checkbox>
+            <van-checkbox :name="item.id" icon-size="18px" checked-color="#21926f"></van-checkbox>
           </div>
         </van-checkbox-group>
         <div class="nodata" v-else>
@@ -240,7 +240,7 @@ export default {
         .then(() => {
           _this.show = true;
 
-          homeApi.addPledgeProduct({ pledge_id: _this.detail.id, order_no: _this.addCheckbox.join(',') }).then(res => {
+          homeApi.addPledgeProduct({ pledge_id: _this.detail.id, order_id: _this.addCheckbox.join(',') }).then(res => {
             if (res.code == 200) {
               _this.show = false;
               _this.showAddOrders = false;