zuozhengqing
2023-11-24 be7e754d737d6c7a689465928117edb3aa02bad4
销售明细单接口修改,确认订单和推送aps合并为同一个
3个文件已修改
64 ■■■■ 已修改文件
src/api/sales/salesDetails.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/index.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/sales/salesDetails.js
@@ -54,14 +54,6 @@
    method: "get"
  })
}
// 创建产品出库信息
export function createOperation(data) {
  return request({
    url: "/api/salesDetails/createOperation",
    method: "post",
    data
  })
}
// 添加销售明细
export function getProjectList(data) {
  return request({
@@ -70,10 +62,10 @@
    data
  })
}
// 推送销售明细信息到aps项目模块
export function sendSalesDetailsToApsProject(data) {
// 推送销售明细信息到aps项目模块 / 确认提交
export function sendSalesDetailsToOtherSystem(data) {
  return request({
    url: "/api/salesDetails/sendSalesDetailsToApsProject",
    url: "/api/salesDetails/sendSalesDetailsToOtherSystem",
    method: "post",
    data
  })
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -485,7 +485,7 @@
<script>
import CommonFormTableView from "@/components/makepager/CommonFormTableView"
import { getAllData } from "@/api/client/client"
import { getAddSalesDetails, getUpdateSalesDetails,getProjectList,sendSalesDetailsToApsProject } from "@/api/sales/salesDetails"
import { getAddSalesDetails, getUpdateSalesDetails,getProjectList} 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"
src/views/sales/salesDetails/index.vue
@@ -155,10 +155,8 @@
  getProductInventoryInfo,
  getProductOrderInfo,
  updateStatus,
  createOperation,
  getProjectList,
  getUpdateSalesDetails,
  sendSalesDetailsToApsProject
  sendSalesDetailsToOtherSystem
} from "@/api/sales/salesDetails"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification"
@@ -410,7 +408,7 @@
                  ...item,
                  client_name: item.client.name,
                  member_name: item.Member.username,
                  source: "CRM同步"
                  source: ""
                }
              })
              this.tableList.tableInfomation = list || []
@@ -498,16 +496,12 @@
          ...row,
          status: 2
        }
        await createOperation(params).then((res) => {
        console.log(params,"看看params")
        await sendSalesDetailsToOtherSystem(params).then((res)=>{
          if (res.code == 200) {
            this.$message.success("确认提交成功")
            this.$message.success("成功推送至aps系统")
            this.getData()
            this.thatRow.status=2
            sendSalesDetailsToApsProject(this.thatRow).then((res)=>{
              if(res.code===200){
                this.$message.success("成功推送至aps系统")
              }
            })
          }
        })
      }
@@ -680,32 +674,14 @@
        if(valid){
          console.log()
          this.projectListShow=false
          getUpdateSalesDetails({
            id:this.thatRow.id,
            salesDetails:params
          }).then((res) => {
            console.log(res)
            this.editConfig.visible = false
            if (res.code === 200) {
              let params2 = {
                ...this.thatRow,
                status: 2
              }
              createOperation(params2).then((res) => {
                if (res.code == 200) {
                  this.$message.success("提交成功")
                  this.getData()
                  this.thatRow.status=2
                  sendSalesDetailsToApsProject(this.thatRow).then((res)=>{
                    if(res.code===200){
                      this.$message.success("成功推送至aps系统")
                    }
                  })
                }
              })
          console.log(params,"选择项目后的params")
          params.status=2
          sendSalesDetailsToOtherSystem(params).then((res)=>{
            if (res.code == 200) {
              this.$message.success("成功推送至aps系统")
              this.getData()
              this.thatRow.status=2
            }
          }).catch((err)=>{
            this.$message.error(`编辑失败:${err}`)
          })
        }
      })