yangfeng
2023-08-24 b7968858014ab02aa91e52e63c2a266963d3a8f9
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -335,6 +335,8 @@
        :edit-common-config="editSelectChanceConfig"
        @selClient="selClient"
      />
      <!-- 新建 收款计划 -->
      <AddCollectionPlan v-if="addCollectionConfig.visible" :edit-common-config="addCollectionConfig" />
    </el-dialog>
  </div>
</template>
@@ -345,6 +347,7 @@
import { getAddSalesDetails, getUpdateSalesDetails } from "@/api/sales/salesDetails"
import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog"
import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog"
import AddCollectionPlan from "@/views/other/payment/collectionPlan/AddCollectionPlan"
export default {
  name: "AddSalesDetailsDialog",
  props: {
@@ -359,7 +362,7 @@
      }
    }
  },
  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog },
  components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan },
  computed: {
    clientList() {
      return this.$store.state.getClientName.clientList
@@ -404,7 +407,13 @@
      clientId: this.editCommonConfig.infomation.client_id,
      saleChanceId: this.editCommonConfig.infomation.saleChanceId,
      productId: 1,
      isNoProduct: true
      isNoProduct: true,
      addCollectionConfig: {
        visible: false,
        title: "新建",
        infomation: {}
      },
      amountTotal: 0
    }
  },
  created() {
@@ -454,8 +463,14 @@
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message.success("添加成功")
                  this.$parent.getData()
                  this.tableData.map((item) => {
                    this.amountTotal += item.total
                  })
                  let config = {
                    amountTotal: this.amountTotal,
                    id: res.data.id
                  }
                  this.$emit("addCollectionPlanClick", config)
                }
              })
            } else {