zouyu
2026-05-07 b0d4df5f39525ae7fe252e8ee65d85fd71dca721
src/views/business/productOrder/components/addOrder.vue
@@ -74,6 +74,40 @@
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="IFS域:" prop="contract">
                <el-select v-model="addObj.contract" clearable placeholder="请选择" size="small">
                  <el-option label="ZTNS" value="ZTNS"/>
                  <el-option label="KJNS" value="KJNS"/>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="批次号:" prop="updateBatchNo">
                <el-input v-model="addObj.updateBatchNo" clearable placeholder="请输入批次号" size="small">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="零件号" prop="partNo">
                <el-input v-model="addObj.partNo" clearable placeholder="请输入零件号" size="small">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="零件描述:" prop="partDesc">
                <el-input v-model="addObj.partDesc" clearable placeholder="请输入零件描述" size="small">
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="供应商名称:" prop="supplierName">
                <el-input v-model="addObj.supplierName" clearable placeholder="请输入供应商名称" size="small">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="联系方式:" prop="phone">
                <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="选择委托客户" size="small"></el-input>
              </el-form-item>
@@ -93,14 +127,15 @@
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="样品数量:" prop="sampleNum" style="margin-right: 0">
                <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0"
                                 size="small" @change="addStandardTree"></el-input-number>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="样品状态:" prop="sampleStatus">
                <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small">
@@ -120,6 +155,8 @@
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="报告发送方式:" prop="send">
                <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini">
@@ -128,8 +165,6 @@
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="样品处理方式:" prop="processing">
                <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;">
@@ -150,6 +185,8 @@
                          size="small"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="是否留样:" prop="isLeave">
                <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini">
@@ -158,8 +195,6 @@
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="委托人:" prop="prepareUser">
                <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable size="small"></el-input>
@@ -176,14 +211,14 @@
                          size="small" style="width: 100%" type="textarea"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="备注英文:" prop="remarkEn">
                <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable
                          size="small" type="textarea"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="样品名称:" prop="sampleView">
                <el-input v-model="addObj.sampleView" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '请输入'" clearable
@@ -384,7 +419,7 @@
            <el-table-column v-if="isSpecial&&active==1" label="操作" width="100">
            <template slot-scope="scope">
              <el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">插入行</el-button>
              <el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">删除</el-button>
              <el-button style="color:#ff4949" v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
@@ -394,7 +429,7 @@
      <div v-if="selectUserDia" class="body">
        <lims-table :tableData="tableData1" :column="column1"
                    :isSelection="true" :handleSelectionChange="selectMethod"
                    @pagination="pagination1" height="400px" key="tableData1"
                    @pagination="pagination1" :height="400" key="tableData1"
                    :page="page1" :tableLoading="tableLoading1"></lims-table>
      </div>
      <span slot="footer" class="dialog-footer">
@@ -627,6 +662,11 @@
      templates: [],
      addObj: {
        entrustCode: null,
        contract:null,
        updateBatchNo: null,
        partDesc: null,
        partNo: null,
        supplierName: null,
        custom: null,
        company: null,
        userId: null,
@@ -662,6 +702,9 @@
        sampleViewEn: '', // 样品名称英文(报告展示字段)
      },
      addObjRules: { // 表单校验规则
        contract: [
          { required: true, message: '请选择IFS域', trigger: 'change' }
        ],
        orderType: [
          { required: true, message: '请选择检验类别', trigger: 'change' }
        ],
@@ -925,7 +968,6 @@
              return m.id === a.id&&!m.repetitionTag
            }
          })
          if(obj){
            a.state = obj.state
            a.section = obj.section
@@ -1652,10 +1694,10 @@
            this.$set(row, 'sectionCopy', row.section)
          }
        }
        if (row.ask.includes('[')) {
        if (row.ask && row.ask.includes('[')) {
          this.$set(row, 'askCopy', row.ask)
        }
        if (row.tell.includes('[')) {
        if (row.tell && row.tell.includes('[')) {
          this.$set(row, 'tellCopy', row.tell)
        }
        let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1)
@@ -1985,18 +2027,12 @@
              this.$set(p, 'sectionCopy', p.section)
            }
          }
          if (p.ask.includes('[')) {
          if (p.ask && p.ask.includes('[')) {
            this.$set(p, 'askCopy', p.ask)
          }
          if (p.tell.includes('[')) {
          if (p.tell && p.tell.includes('[')) {
            this.$set(p, 'tellCopy', p.tell)
          }
          // if (p.manHour.includes('[')) {
          //   this.$set(p, 'manHourCopy', p.manHour)
          // }
          // if (p.price.includes('[')) {
          //   this.$set(p, 'priceCopy', p.price)
          // }
          if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.sectionCopy !== undefined && p.state === 1) {
            if (p.sectionCopy.indexOf('[') > -1) {
              p.bsmRow = this.HaveJson(p)
@@ -2029,11 +2065,6 @@
            return item
          })
        }
        this.productList.forEach(item => {
          if (item.id == row.id) {
            item.state = row.state;
          }
        })
        this.changeProductList0()
        this.currentMethod.insProduct = this.productList0
        this.getProNum()