yangfeng
2023-08-25 f417dc0a44d225d4ed19bcb5207250eb1b669455
src/views/client/salesLead/AddSalesLeadDialog.vue
@@ -30,8 +30,8 @@
                  <el-input v-model="editConfig.infomation.number"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <!-- </el-row>
            <el-row> -->
              <el-col :span="12">
                <el-form-item label="联系人姓名" prop="contact_name">
                  <el-input v-model="editConfig.infomation.contact_name"></el-input>
@@ -42,8 +42,8 @@
                  <el-input v-model="editConfig.infomation.contact_position"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row>
              <!-- </el-row>
            <el-row> -->
              <el-col :span="12">
                <el-form-item label="手机号码" prop="contact_phone">
                  <el-input
@@ -179,19 +179,19 @@
                  </div>
                </el-form-item>
              </el-col> -->
            </el-row>
            <!-- <el-row>
              <!-- </el-row> -->
              <!-- <el-row> -->
              <el-col :span="24">
                <el-form-item label="地址" prop="address">
                <el-form-item label="详细地址" prop="detail_address">
                  <el-input
                    type="textarea"
                    :autosize="{ minRows: 2, maxRows: 4 }"
                    placeholder="请输入内容"
                    v-model="editConfig.infomation.address"
                    v-model="editConfig.infomation.detail_address"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row> -->
            </el-row>
          </div>
          <!-- 备注信息 -->
          <div v-if="isUnflod" class="basic-info-title">备注信息</div>
@@ -331,41 +331,28 @@
            number: this.editConfig.infomation.number || "",
            province_id: this.editConfig.infomation.province_id || 0,
            region_id: this.editConfig.infomation.region_id || 0,
            sales_sources_id: this.editConfig.infomation.sales_sources_id || 0
            sales_sources_id: this.editConfig.infomation.sales_sources_id || 0,
            detail_address: this.editConfig.infomation.detail_address || ""
          }
          console.log(params)
          if (this.editConfig.title === "新建") {
            getAddSalesLeads(params)
              .then((res) => {
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message({
                    message: "添加成功",
                    type: "success"
                  })
                  this.$parent.getData()
                }
              })
              .catch((err) => {
                console.log(err)
              })
            getAddSalesLeads(params).then((res) => {
              console.log(res)
              this.editConfig.visible = false
              if (res.code === 200) {
                this.$message.success("添加成功")
                this.$parent.getData()
              }
            })
          } else {
            getUpdateSalesLeads(params)
              .then((res) => {
                console.log(res)
                this.editConfig.visible = false
                if (res.code === 200) {
                  this.$message({
                    message: "编辑成功",
                    type: "success"
                  })
                  this.$parent.getData()
                }
              })
              .catch((err) => {
                console.log(err)
              })
            getUpdateSalesLeads(params).then((res) => {
              console.log(res)
              this.editConfig.visible = false
              if (res.code === 200) {
                this.$message.success("编辑成功")
                this.$parent.getData()
              }
            })
          }
        } else {
          console.log("error submit")