Explorar el Código

采购退货bug解决

cz hace 2 años
padre
commit
cb69ac46e8
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      src/views/purchase-management/deliver-goods/backGoods.vue

+ 6 - 2
src/views/purchase-management/deliver-goods/backGoods.vue

@@ -275,16 +275,20 @@ export default {
     handleSubmit() {
       this.$refs.form.validate((valid) => {
         if (valid) {
-          const quantity = this.form.goodsList[0].quantity;
+          // const quantity = this.form.goodsList[0].quantity;
           this.submitData = {
             purchaseId: this.backForm.purchaseId,
-            quantity,
             contacts: this.form.contacts,
             phone: this.form.phone,
             cityId: this.form.cityId,
             provinceId: this.form.provinceId,
             countryId: this.form.countryId,
             detailedAddress: this.form.detailedAddress,
+            goodsList: this.form.goodsList.map((x) => ({
+              goodsId: x.goodsId,
+              quantity: x.quantity,
+              unitPrice: x.unitPrice,
+            })),
           };
           this.loading = true;
           this.$emit("submit", this.submitData);