| | |
| | | </div> |
| | | </div> |
| | | <!-- 确认提交-选择项目 --> |
| | | <el-dialog |
| | | title="请选择项目" |
| | | :visible.sync="projectListShow" |
| | | width="400px" |
| | | :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-dialog title="请选择项目" :visible.sync="projectListShow" width="400px" :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> |
| | |
| | | data() { |
| | | // 产品信息 |
| | | const productColumn = [ |
| | | { label: "产品编号", prop: "id", default: true }, |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "数量", prop: "amount" }, |
| | | { label: "单位", prop: "unit" }, |
| | |
| | | ] |
| | | // 库存信息 |
| | | const inventoryColumn = [ |
| | | { label: "产品编号", prop: "id", default: true }, |
| | | { label: "产品编号", prop: "number", default: true }, |
| | | { label: "产品名称", prop: "name" }, |
| | | { label: "订单数量", prop: "orderAmount" }, |
| | | { label: "仓库", prop: "warehouse" }, |
| | |
| | | makeColumn: makeColumn, |
| | | showMakeCol: ["生产订单", "产品名称", "订单状态", "工单编号", "工单状态", "计划开始时间", "计划结束时间"], |
| | | selectRow: {}, |
| | | projectList:[], |
| | | projectListShow:false, |
| | | projects:{ |
| | | projectId:'', |
| | | projectList: [], |
| | | projectListShow: false, |
| | | projects: { |
| | | projectId: "" |
| | | }, |
| | | thatRow:{}, |
| | | thatRow: {}, |
| | | rules: { |
| | | projectId: [{ required: true, message: "请选择项目", trigger: "change" }], |
| | | }, |
| | | projectId: [{ required: true, message: "请选择项目", trigger: "change" }] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | // 确认提交 |
| | | async submitClick(row) { |
| | | this.thatRow=row |
| | | if(row.projectId==""){ |
| | | this.projectListShow=true |
| | | }else{ |
| | | this.thatRow = row |
| | | if (row.projectId == "") { |
| | | this.projectListShow = true |
| | | } else { |
| | | let params = { |
| | | ...row, |
| | | status: 2 |
| | | } |
| | | await sendSalesDetailsToOtherSystem(params).then((res)=>{ |
| | | await sendSalesDetailsToOtherSystem(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("成功推送至aps系统") |
| | | this.getData() |
| | | this.thatRow.status=2 |
| | | this.thatRow.status = 2 |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | }, |
| | | // 获取项目列表 |
| | | async getProjectList(){ |
| | | async getProjectList() { |
| | | await getProjectList({ |
| | | page: 1, |
| | | pageSize: 100, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | console.log(res.data,"项目列表信息") |
| | | this.projectList=res.data |
| | | console.log(res.data, "项目列表信息") |
| | | this.projectList = res.data |
| | | }) |
| | | }, |
| | | handleClose(done) { |
| | | done() |
| | | }, |
| | | |
| | | |
| | | saveParams() { |
| | | let params={ |
| | | let params = { |
| | | address: this.thatRow.address || "", |
| | | addressee: this.thatRow.addressee || "", |
| | | clientId: this.thatRow.clientId || 0, |
| | |
| | | logisticNumber: this.thatRow.logisticNumber || "", |
| | | quotationId: this.thatRow.quotationId, |
| | | deliverType: this.thatRow.deliverType || 0, |
| | | status: this.thatRow.deliverType, |
| | | projectId:this.projects.projectId||0 |
| | | status: this.thatRow.deliverType, |
| | | projectId: this.projects.projectId || 0 |
| | | } |
| | | return params |
| | | }, |
| | | // 确认提交 |
| | | affirmCommitBtn(){ |
| | | let params=this.saveParams() |
| | | this.$refs['form'].validate((valid) => { |
| | | if(valid){ |
| | | affirmCommitBtn() { |
| | | let params = this.saveParams() |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | console.log() |
| | | this.projectListShow=false |
| | | console.log(params,"选择项目后的params") |
| | | params.status=2 |
| | | sendSalesDetailsToOtherSystem(params).then((res)=>{ |
| | | this.projectListShow = false |
| | | 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 |
| | | this.thatRow.status = 2 |
| | | } |
| | | }) |
| | | } |
| | |
| | | .bgcWhite { |
| | | background: #fff !important; |
| | | } |
| | | .el-form-item{ |
| | | .el-form-item { |
| | | width: 80%; |
| | | margin: 20px auto; |
| | | } |
| | | ::v-deep .el-dialog__footer{ |
| | | ::v-deep .el-dialog__footer { |
| | | text-align: right !important; |
| | | .el-button{ |
| | | .el-button { |
| | | margin-right: 10px; |
| | | } |
| | | } |