Fixiaobai
2023-11-17 91ee87478341b25cd7d0107952fc6313a6b16ab6
src/views/plan/customerorder/schedule-table.vue
@@ -19,6 +19,7 @@
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes">
      <div class="avue-crud">
        <el-table
          border
          :data="dataForm.customer"
          style="width: 100%"
          class="mps-table"
@@ -28,17 +29,17 @@
            header-align="center"
            align="center"
            label="客户订单编号"
            width="120px"
            min-width="130px"
          >
            <template slot-scope="scope">
              <el-form-item>{{ scope.row.customerOrderNo }}</el-form-item>
              <el-form-item>{{ scope.row.contractNo }}</el-form-item>
            </template>
          </el-table-column>
          <el-table-column
            header-align="center"
            align="center"
            label="零件号"
            width="120px"
            min-width="130"
          >
            <template slot-scope="scope">
              <el-form-item>{{ scope.row.partNo }}</el-form-item>
@@ -53,7 +54,7 @@
          >
            <template slot-scope="scope">
              <el-form-item class="inline-el-hidden">{{
                scope.row.partName
                scope.row.productName
              }}</el-form-item>
            </template>
          </el-table-column>
@@ -67,32 +68,31 @@
              <el-form-item>{{ scope.row.buyQtyDue }}</el-form-item>
            </template>
          </el-table-column>
          <el-table-column
          <!-- <el-table-column
            header-align="center"
            align="center"
            label="已计划数量"
            width="120px"
          >
            <template slot-scope="scope">
              <el-form-item>{{ scope.row.requireNumber }}</el-form-item>
            </template>
          </el-table-column>
          </el-table-column> -->
          <el-table-column
            prop="remainderRequired"
            header-align="center"
            align="center"
            label="本次计划数量"
            width="170px"
          >
            <template scope="scope">
              <!-- <el-form-item>{{ scope.row.qtyPlaned }}</el-form-item> -->
              <el-form-item
                :prop="'customer.' + scope.$index"
                :rules="rules.qtyPlaned"
              >
                <el-input
                  v-model="scope.row.qtyPlaned"
                  placeholder=""
                ></el-input>
                  v-model="remainderRequired"
                  placeholder="请输入本次计划数量"
                ></el-input>
              </el-form-item>
            </template>
          </el-table-column>
@@ -100,10 +100,9 @@
            header-align="center"
            align="center"
            label="单位"
            width="60px"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.unit }}</span>
              <span>{{ scope.row.otcUnit }}</span>
            </template>
          </el-table-column>
          <el-table-column
@@ -111,7 +110,6 @@
            header-align="center"
            align="center"
            label="制造属性"
            width="170px"
          >
            <template scope="scope">
              <el-form-item :prop="'manufactureAttr.' + scope.$index">
@@ -134,8 +132,16 @@
          <el-table-column
            header-align="center"
            align="center"
            label="需求日期"
            width="160px"
            label="计划日期"
          >
            <template slot-scope="scope">
              <el-form-item>{{ scope.row.deliveryDate }}</el-form-item>
            </template>
          </el-table-column>
          <el-table-column
            header-align="center"
            align="center"
            label="客户需求日期"
          >
            <template slot-scope="scope">
              <el-form-item>{{ scope.row.wantedDeliveryDate }}</el-form-item>
@@ -146,6 +152,7 @@
            align="center"
            show-overflow-tooltip
            label="备注"
            min-width="140"
          >
            <template slot-scope="scope">
              <el-form-item>
@@ -227,6 +234,10 @@
          customerList.push(item)
        })
        this.dataForm.customer = JSON.parse(JSON.stringify(customerList))
        this.dataForm.customer.forEach(item=>{
          // let num=Number(item.buyQtyDue)
          //   item.qtyPlaned=num
        })
      })
    },
    dataFormSubmit() {
@@ -235,6 +246,8 @@
        if (valid) {
          checkSchedule(this.dataForm.customer)
            .then((res) => {
              console.log(this.dataForm.customer);
              return
              if (res.data.data.success) {
                createMasterProductionSchedule(this.dataForm.customer)
                  .then((res) => {