销售明细单接口修改,确认订单和推送aps合并为同一个
| | |
| | | method: "get" |
| | | }) |
| | | } |
| | | // 创建产品出库信息 |
| | | export function createOperation(data) { |
| | | return request({ |
| | | url: "/api/salesDetails/createOperation", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 添加销售明细 |
| | | export function getProjectList(data) { |
| | | return request({ |
| | |
| | | data |
| | | }) |
| | | } |
| | | // 推送销售明细信息到aps项目模块 |
| | | export function sendSalesDetailsToApsProject(data) { |
| | | // 推送销售明细信息到aps项目模块 / 确认提交 |
| | | export function sendSalesDetailsToOtherSystem(data) { |
| | | return request({ |
| | | url: "/api/salesDetails/sendSalesDetailsToApsProject", |
| | | url: "/api/salesDetails/sendSalesDetailsToOtherSystem", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | <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" |
| | |
| | | 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" |
| | |
| | | ...item, |
| | | client_name: item.client.name, |
| | | member_name: item.Member.username, |
| | | source: "CRM同步" |
| | | source: "" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | ...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系统") |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | 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}`) |
| | | }) |
| | | } |
| | | }) |