yangfeng
2023-12-18 eeed1f4dfe91ef67d09ec064b9a55346a80d60b9
销售明细单中产品编码参数修改
1个文件已修改
100 ■■■■■ 已修改文件
src/views/sales/salesDetails/index.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/index.vue
@@ -103,26 +103,16 @@
      </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>
@@ -191,7 +181,7 @@
  data() {
    // 产品信息
    const productColumn = [
      { label: "产品编号", prop: "id", default: true },
      { label: "产品编号", prop: "number", default: true },
      { label: "产品名称", prop: "name" },
      { label: "数量", prop: "amount" },
      { label: "单位", prop: "unit" },
@@ -203,7 +193,7 @@
    ]
    // 库存信息
    const inventoryColumn = [
      { label: "产品编号", prop: "id", default: true },
      { label: "产品编号", prop: "number", default: true },
      { label: "产品名称", prop: "name" },
      { label: "订单数量", prop: "orderAmount" },
      { label: "仓库", prop: "warehouse" },
@@ -289,15 +279,15 @@
      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() {
@@ -487,19 +477,19 @@
    },
    // 确认提交
    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
          }
        })
      }
@@ -626,21 +616,21 @@
      }
    },
    // 获取项目列表
    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,
@@ -660,25 +650,25 @@
        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
            }
          })
        }
@@ -784,13 +774,13 @@
.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;
  }
}