liding
16 小时以前 ea7c19b7bfd7a5260fa321579e6941f28ef2eb46
fix(order): 解决实验室字段必填验证和数据源问题
已修改6个文件
85 ■■■■■ 文件已修改
src/api/business/rawMaterialOrder.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/standardLibrary.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/addOrder.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/addView.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/index.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/rawMaterialOrder.js
@@ -129,6 +129,9 @@
}
// 根据标准树进行标准查询
export function selectsStandardMethodByFLSSM(query) {
  if (!query || !query.tree || !query.tree.trim()) {
    return Promise.resolve({ code: 200, data: { standardMethodList: [] } })
  }
  return request({
    url: '/standardTree/selectsStandardMethodByFLSSM',
    method: 'get',
src/api/standard/standardLibrary.js
@@ -76,6 +76,9 @@
// 根据标准树进行标准查询
export function selectsStandardMethodByFLSSM(query) {
  if (!query || !query.tree || !query.tree.trim()) {
    return Promise.resolve({ code: 200, data: { standardMethodList: [] } });
  }
  return request({
    url: "/standardTree/selectsStandardMethodByFLSSM",
    method: "get",
src/views/business/productOrder/components/addOrder.vue
@@ -463,10 +463,10 @@
            </div>
          </el-col>
          <el-col v-if="distributeData.userId" :span="22" class="search_thing">
            <div class="search_label"><span class="required-span">* </span>试验室:</div>
            <div class="search_label">试验室:</div>
            <div class="search_input">
              <el-select v-model="distributeData.sonLaboratory" filterable placeholder="请选择" size="small" style="width: 100%;">
                <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                <el-option v-for="item in newJuLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -614,8 +614,11 @@
  },
  computed:{
    ...mapGetters(["nickName", 'nameEn', 'userName']),
    newJuLaboratoryList() {
      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '新聚')
    },
  },
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
  data() {
    return {
      active: '',
@@ -1379,6 +1382,7 @@
              this.distributeData.appointed = ress.data
            })
            setTimeout(() => {
              this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
              this.issuedDialogVisible = true;
            }, 1000)
          })
@@ -1395,10 +1399,6 @@
        }
        if (this.distributeData.userId == null || this.distributeData.userId == '') {
          this.$message.error('指派人员未填写')
          return
        }
        if (this.distributeData.userId&&(this.distributeData.sonLaboratory== null ||this.distributeData.sonLaboratory== '')) {
          this.$message.error('试验室未填写')
          return
        }
        this.upLoad = true;
@@ -2224,8 +2224,8 @@
        })
      },
      changeUser(){
        if(this.sonLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
        if(this.newJuLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
        }
      },
      addProductList(productList,row,index){
src/views/business/productOrder/components/addView.vue
@@ -459,10 +459,10 @@
            </div>
          </el-col>
          <el-col v-if="distributeData.userId" :span="22" class="search_thing">
            <div class="search_label"><span class="required-span">* </span>试验室:</div>
            <div class="search_label">试验室:</div>
            <div class="search_input">
              <el-select v-model="distributeData.sonLaboratory" filterable placeholder="请选择" size="small" style="width: 100%;">
                <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                <el-option v-for="item in newJuLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -608,8 +608,11 @@
  },
  computed:{
  ...mapGetters(["nickName"]),
    newJuLaboratoryList() {
      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '新聚')
    },
  },
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
  data() {
    return {
      active: '',
@@ -1308,6 +1311,7 @@
              this.distributeData.appointed = ress.data
            })
            setTimeout(() => {
              this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
              this.issuedDialogVisible = true;
            }, 1000)
          })
@@ -1324,10 +1328,6 @@
        }
        if (this.distributeData.userId == null || this.distributeData.userId == '') {
          this.$message.error('指派人员未填写')
          return
        }
        if (this.distributeData.userId&&(this.distributeData.sonLaboratory== null ||this.distributeData.sonLaboratory== '')) {
          this.$message.error('试验室未填写')
          return
        }
        this.upLoad = true;
@@ -2150,8 +2150,8 @@
        })
      },
      changeUser(){
        if(this.sonLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
        if(this.newJuLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
        }
      },
      addProductList(productList,row,index){
src/views/business/productOrder/index.vue
@@ -130,11 +130,11 @@
              </div>
            </el-col>
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label"><span class="required-span">* </span>试验室:</div>
              <div class="search_label">试验室:</div>
              <div class="search_input">
                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="请选择" size="small"
                  style="width: 100%;">
                  <el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label"
                  <el-option v-for="(item, i) in newJuLaboratoryList" :key="i + 'oooo'" :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
@@ -335,7 +335,7 @@
  getRevocationInsProductList,
  selectOrderManDay,
  updateInspected,
  updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder, upPlanUser2
  updateOrderEntrustCode, updateSampleModel, updateStatus, upInsOrder
} from "@/api/business/productOrder";
import { selectUserCondition } from "@/api/performance/class";
import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
@@ -765,7 +765,6 @@
      ],
      qrData: [],
      multipleSelection: [],
      sonLaboratoryList: [],
      printDialog: false,
      addInspectionDia: false,
      dialogVisible: false,
@@ -783,8 +782,12 @@
      }
    }
  },
  dicts: ['sys_sub_lab'],
  computed: {
    ...mapGetters(["nickName"]),
    newJuLaboratoryList() {
      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '新聚')
    },
  },
  mounted() {
    if (this.checkPermi(['get:raw:await'])) {
@@ -1202,6 +1205,7 @@
    // 下发
    handleIssued(row) {
      this.issuedDialogVisible = true;
      this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
      selectOrderManDay({
        id: row.id
      }).then(res => {
@@ -1209,26 +1213,6 @@
        this.distributeData.sampleId = row.sampleId
        this.distributeData.appointed = res.data
        this.distributeData.type = row.type
      })
      upPlanUser2({
        orderId: row.id,
      }).then(res => {
        this.sonLaboratoryList = [
          {
            value: '新聚',
            label: '新聚'
          }
        ]
        this.distributeData.sonLaboratory = '新聚'
        // if (res.code === 200 && res.data.length > 0) {
        //   this.sonLaboratoryList = [];
        //   res.data.forEach(m => {
        //     this.sonLaboratoryList.push({
        //       value: m,
        //       label: m
        //     })
        //   })
        // }
      })
    },
    submitForm2() {
@@ -1239,10 +1223,6 @@
      //
      if (this.distributeData.userId == null || this.distributeData.userId == '') {
        this.$message.error('指派人员未填写')
        return
      }
      if (this.distributeData.userId && (this.distributeData.sonLaboratory == null || this.distributeData.sonLaboratory == '')) {
        this.$message.error('试验室未填写')
        return
      }
      this.upLoad = true;
@@ -1344,8 +1324,8 @@
      this.InspectionKey++
    },
    changeUser() {
      if (this.sonLaboratoryList.length > 0) {
        this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
      if (this.newJuLaboratoryList.length > 0) {
        this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
      }
    },
    handleDelete(row) {
vue.config.js
@@ -36,7 +36,8 @@
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://36.213.90.123:9015/lims`,
        // target: `http://36.213.90.123:9015/lims`,
        target: `http://127.0.0.1:9509/lims`,
        changeOrigin: true,
        pathRewrite: {
          ["^" + process.env.VUE_APP_BASE_API]: "",