| | |
| | | { label: "合同状态", prop: "serviceContractStatus_name", min: 100 }, |
| | | { label: "创建时间", prop: "created_at" } |
| | | ], |
| | | showCol: ["单据编号", "负责人", "客户名称", "合同状态", "创建时间"] |
| | | showCol: ["单据编号", "负责人", "客户名称", "合同状态", "创建时间"], |
| | | keyword:'' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContractList({ |
| | | search_map: this.search_map, |
| | | keyword:this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.number = searchText ?? "" |
| | | this.keyword=searchText |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | } else { |
| | | const params = this.saveParams() |
| | | if (this.editConfig.title === "新建") { |
| | | if(params.projectId!==0){ |
| | | sendSalesDetailsToApsProject({...params,member:this.thatMember}).then((res)=>{ |
| | | if(res.code===200){ |
| | | this.$message.success("成功推送至aps系统") |
| | | } |
| | | }) |
| | | } |
| | | getAddSalesDetails(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | |
| | | quotationId: this.quotationId, |
| | | deliverType: data.deliverType || 0, |
| | | status: 1, |
| | | projectId:data.projectId||0 |
| | | projectId:data.projectId||'' |
| | | } |
| | | let params = {} |
| | | if (this.editConfig.title === "新建") { |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 确认提交-选择项目 --> |
| | | <el-dialog |
| | | title="请选择项目" |
| | | :visible.sync="projectListShow" |
| | | width="40%" |
| | | :before-close="handleClose"> |
| | | <el-form |
| | | label-width="100px" |
| | | class="demo-ruleForm" |
| | | ref="form" |
| | | :rules="rules" |
| | | :model="projects" |
| | | > |
| | | <el-form-item label="选择项目" prop="projectId"> |
| | | <el-select |
| | | v-model="projects.projectId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in projectList" :key="item.projectId" :label="item.projectName" :value="item.projectId"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="projectListShow = false">取 消</el-button> |
| | | <el-button type="primary" @click="affirmCommitBtn">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 新建/编辑 --> |
| | | <AddSalesDetailsDialog |
| | | v-if="editConfig.visible" |
| | |
| | | getProductInventoryInfo, |
| | | getProductOrderInfo, |
| | | updateStatus, |
| | | createOperation |
| | | createOperation, |
| | | getProjectList, |
| | | getUpdateSalesDetails, |
| | | sendSalesDetailsToApsProject |
| | | } from "@/api/sales/salesDetails" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification" |
| | |
| | | showInventoryCol: ["产品编号", "产品名称", "订单数量", "仓库", "在库数量", "可用库存", "单位"], |
| | | makeColumn: makeColumn, |
| | | showMakeCol: ["生产订单", "产品名称", "订单状态", "工单编号", "工单状态", "计划开始时间", "计划结束时间"], |
| | | selectRow: {} |
| | | selectRow: {}, |
| | | projectList:[], |
| | | projectListShow:false, |
| | | projects:{ |
| | | projectId:'', |
| | | }, |
| | | thatRow:{}, |
| | | rules: { |
| | | projectId: [{ required: true, message: "请选择项目", trigger: "change" }], |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.keywordType = this.addConfig.keywordType |
| | | } |
| | | this.getData() |
| | | this.getProjectList() |
| | | }, |
| | | methods: { |
| | | setTable() { |
| | |
| | | }, |
| | | // 确认提交 |
| | | async submitClick(row) { |
| | | console.log(row, "确认提交") |
| | | let params = { |
| | | ...row, |
| | | status: 2 |
| | | } |
| | | await createOperation(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("确认提交成功") |
| | | this.getData() |
| | | this.thatRow=row |
| | | if(row.projectId==""){ |
| | | this.$message.error("请先填写项目信息") |
| | | this.projectListShow=true |
| | | }else{ |
| | | let params = { |
| | | ...row, |
| | | status: 2 |
| | | } |
| | | }) |
| | | await createOperation(params).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系统") |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 关闭 |
| | | closeClick(row) { |
| | |
| | | } else if (this.TabsIndex == 2) { |
| | | this.getProductOrderInfo(this.selectRow.number) |
| | | } |
| | | }, |
| | | // 获取项目列表 |
| | | async getProjectList(){ |
| | | await getProjectList({ |
| | | page: 1, |
| | | pageSize: 100, |
| | | }).then((res) => { |
| | | console.log(res.data,"项目列表信息") |
| | | this.projectList=res.data |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | done() |
| | | }, |
| | | |
| | | saveParams() { |
| | | let params={ |
| | | address: this.thatRow.address || "", |
| | | addressee: this.thatRow.addressee || "", |
| | | clientId: this.thatRow.clientId || 0, |
| | | conditions: this.thatRow.conditions || "", |
| | | deliveryDate: this.thatRow.deliveryDate || "", |
| | | memberId: this.thatRow.memberId || 0, |
| | | number: this.thatRow.number || "", |
| | | phone: this.thatRow.phone || "", |
| | | products: this.thatRow.products, |
| | | remark: this.thatRow.remark || "", |
| | | saleChanceId: this.thatRow.saleChanceId || 0, |
| | | saleType: this.thatRow.saleType || 0, |
| | | signTime: this.thatRow.signTime || "", |
| | | wechatOrderStatus: this.thatRow.wechatOrderStatus || 0, |
| | | logisticCompany: this.thatRow.logisticCompany || "", |
| | | logisticCost: this.thatRow.logisticCost || 0, |
| | | logisticNumber: this.thatRow.logisticNumber || "", |
| | | quotationId: this.thatRow.quotationId, |
| | | deliverType: this.thatRow.deliverType || 0, |
| | | status: this.thatRow.deliverType, |
| | | projectId:this.projects.projectId||0 |
| | | } |
| | | return params |
| | | }, |
| | | // 确认提交 |
| | | affirmCommitBtn(){ |
| | | let params=this.saveParams() |
| | | this.$refs['form'].validate((valid) => { |
| | | 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系统") |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }).catch((err)=>{ |
| | | this.$message.error(`编辑失败:${err}`) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | .bgcWhite { |
| | | background: #fff !important; |
| | | } |
| | | .el-form-item{ |
| | | width: 80%; |
| | | margin: 20px auto; |
| | | } |
| | | </style> |