Bläddra i källkod

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
修改

1004749546@qq.com 4 år sedan
förälder
incheckning
8f42418796
1 ändrade filer med 3 tillägg och 47 borttagningar
  1. 3 47
      src/views/shop/GoodsChooseModal.vue

+ 3 - 47
src/views/shop/GoodsChooseModal.vue

@@ -30,7 +30,7 @@
       >
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record, index">
-          <span>已选</span>
+          <a id="goodsChooseModal-choose" @click="handleSubmit">选择</a>
         </template>
       </s-table>
     </a-form>
@@ -163,6 +163,7 @@ export default {
   methods: {
     // 取消
     cancel (e) {
+      this.queryParam.name = ''
       this.$emit('close')
     },
     // 获取列表数据
@@ -188,54 +189,9 @@ export default {
         }
       })
     },
-    // 合作商结算价格改变 index:下标  dataIndex:字段名  value:值
-    onCellChange (index, dataIndex, value) {
-      const dataSource = [...this.dataSource]
-      dataSource[index][dataIndex] = value
-      this.dataSource = dataSource
-      this.totalMoney = this.getTotalMoney()
-      console.log(this.dataSource, 'ddddd')
-    },
-    // 计算合算价
-    getTotalMoney () {
-      let total = 0
-      this.dataSource.map(item => {
-        total = total + (item.accountPrice ? item.accountPrice * item.bundleItem.times : 0)
-      })
-      return total.toFixed(2)
-    },
-    isNullFun () {
-
-    },
+    // 选择
     handleSubmit () {
-      const salesChannelGoodsList = []
-      const index = this.dataSource.findIndex(item => item.accountPrice === undefined || item.accountPrice === '')
-      if (index >= 0) {
-        this.$message.warning('请输入第' + (index + 1) + '行合作商结算单价')
-        return false
-      } else {
-        this.dataSource.map((item, index) => {
-          const p = {}
-          p.id = item.id
-          p.accountPrice = item.accountPrice
-          salesChannelGoodsList.push(p)
-        })
-        const params = {
-          id: this.itemId,
-          bundle: {
-            id: this.packageId
-          },
-          salesChannelGoodsList: salesChannelGoodsList
-        }
-        saveSettlement(params).then(res => {
-          if (res.status == 200) {
-            this.$message.success(res.message)
-            this.cancel()
-          }
-        })
-      }
 
-      console.log(this.dataSource, '22222222')
     }
   }
 }