yangfeng
2024-04-01 2aa506566031eae9a53006119db0cea8c876e6c3
src/views/orderManageModule/orderManage/components/ApplyMaterialsDialog.vue
@@ -11,7 +11,7 @@
      <div slot="title" class="tac drawerHeader">
        {{ editCommonConfig.title }}
        <div v-if="editCommonConfig.infomation.status == 4" class="noPass-view">
          审核不通过理由:{{ editCommonConfig.infomation.reson }}
          审核不通过理由:{{ editCommonConfig.infomation.reason }}
        </div>
      </div>
      <el-form ref="form" class="form-box" :model="form" :rules="rules" label-position="right" label-width="115px">
@@ -67,7 +67,7 @@
                <el-table-column prop="materialName" show-overflow-tooltip label="产品名称"> </el-table-column>
              </template>
              <template slot="tableButton">
                <el-table-column prop="amount" label="数量" min-width="110">
                <el-table-column prop="amount" label="数量">
                  <template slot-scope="scope">
                    <el-input
                      style="width: 100%"
@@ -123,7 +123,7 @@
</template>
<script>
// import { saveMaterialApply } from "@/api/outsourceEnterpriseManage/index"
import { saveMaterialApply } from "@/api/orderManageModule/orderManage"
import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog"
export default {
  name: "AddSalesDetailsDialog",
@@ -321,14 +321,14 @@
      const params = this.saveParams()
      console.log(params)
      this.isAddloading = true
      // saveMaterialApply(params).then((res) => {
      //   if (res.code === 200) {
      //     this.editRow.visible = false
      //     this.$message.success(this.editRow.title + "成功!")
      //     this.$emit("reRreshData")
      //   }
      //   this.isAddloading = false
      // })
      saveMaterialApply(params).then((res) => {
        if (res.code === 200) {
          this.editRow.visible = false
          this.$message.success(this.editRow.title + "成功!")
          this.$emit("reRreshData")
        }
        this.isAddloading = false
      })
    },
    saveParams() {
      let commonParam = {
@@ -360,15 +360,15 @@
        for (let i in arr) {
          let item = {
            outsourcingOrderNumber: this.editRow.infomation.outsourcingOrderNumber,
            materialNumber: arr[i].id,
            materialNumber: arr[i].number,
            materialName: arr[i].name,
            amount: 1,
            unit: arr[i].unit ? arr[i].unit : 1,
            unit: arr[i].unit ? arr[i].unit : "",
            type: arr[i].type ? arr[i].type : "",
            specs: arr[i].specs ? arr[i].specs : ""
          }
          console.log(arr, "8989")
          isPush = this.getIsPush(this.productTableList.tableInfomation, arr[i].id)
          isPush = this.getIsPush(this.productTableList.tableInfomation, arr[i].number)
          if (isPush) {
            this.productTableList.tableInfomation.splice(this.productTableList.tableInfomation.length, 0, item)
          }