loulijun2021
2022-07-15 6caecd26f75979777956dc96e14d6f3b39ce6688
1.修改bug
已修改3个文件
186 ■■■■ 文件已修改
src/views/sbgl/sbqd.vue 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/sckbg.vue 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gylx.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sbgl/sbqd.vue
@@ -167,11 +167,11 @@
            label="生产车间"
            sortable="custom"
          />
          <el-table-column
            prop="Line_name"
            label="所属产线"
            sortable="custom"
          />
          <!--          <el-table-column-->
          <!--            prop="Line_name"-->
          <!--            label="所属产线"-->
          <!--            sortable="custom"-->
          <!--          />-->
          <el-table-column
            prop="operation_ration"
            label="稼动率"
@@ -297,23 +297,23 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="所属产线" prop="linecode">
          <el-select
            v-model="dialogForm.linecode"
            filterable
            :popper-append-to-body="false"
            :disabled="dialogForm.workshopcode===''"
            style="width: 200px"
            placeholder="请选择"
          >
            <el-option
              v-for="item in WorkLineArr"
              :key="item.linecode"
              :label="item.linename"
              :value="item.linecode"
            />
          </el-select>
        </el-form-item>
        <!--        <el-form-item label="所属产线" prop="linecode">-->
        <!--          <el-select-->
        <!--            v-model="dialogForm.linecode"-->
        <!--            filterable-->
        <!--            :popper-append-to-body="false"-->
        <!--            :disabled="dialogForm.workshopcode===''"-->
        <!--            style="width: 200px"-->
        <!--            placeholder="请选择"-->
        <!--          >-->
        <!--            <el-option-->
        <!--              v-for="item in WorkLineArr"-->
        <!--              :key="item.linecode"-->
        <!--              :label="item.linename"-->
        <!--              :value="item.linecode"-->
        <!--            />-->
        <!--          </el-select>-->
        <!--        </el-form-item>-->
        <el-form-item label="使用状态" prop="status">
          <el-select
            v-model="dialogForm.status"
@@ -637,9 +637,9 @@
        workshopcode: [
          { required: true, message: '请选择所属车间', trigger: ['blur', 'change'] }
        ],
        linecode: [
          { required: true, message: '请选择所属产线', trigger: ['blur', 'change'] }
        ],
        // linecode: [
        //   { required: true, message: '请选择所属产线', trigger: ['blur', 'change'] }
        // ],
        status: [
          { required: true, message: '请选择使用状态', trigger: ['blur', 'change'] }
        ]
@@ -752,7 +752,7 @@
        this.dialogForm.devicegroupcode = row.eqpgroup_code
        this.dialogForm.importdate = row.input_date
        this.dialogForm.workshopcode = row.wksp_code
        this.dialogForm.linecode = row.Line_code
        // this.dialogForm.linecode = row.Line_code
        this.dialogForm.status = row.enable
        this.dialogForm.ratio = row.operation_ration
      })
@@ -783,7 +783,7 @@
      this.dialogForm.devicegroupcode = ''
      this.dialogForm.importdate = ''
      this.dialogForm.workshopcode = ''
      this.dialogForm.linecode = ''
      // this.dialogForm.linecode = ''
      this.dialogForm.status = ''
      this.dialogForm.ratio = ''
      this.$refs.dialogForm.clearValidate()
@@ -792,7 +792,7 @@
    async workshopcodeChange(val) {
      const { data: res } = await WorkShopSelectLine({ workshopcode: val })
      this.WorkLineArr = res
      this.dialogForm.linecode = ''
      // this.dialogForm.linecode = ''
    },
    // 对话框设备类型下拉选择改变时
    async devicetypecodeChange(val) {
@@ -816,7 +816,8 @@
            devicegroupcode: this.dialogForm.devicegroupcode,
            importdate: handleDatetime(this.dialogForm.importdate),
            workshopcode: this.dialogForm.workshopcode,
            linecode: this.dialogForm.linecode,
            // linecode: this.dialogForm.linecode,
            linecode: '',
            status: this.dialogForm.status,
            ratio: this.dialogForm.ratio,
            OperType: this.operation === 'add' ? 'Add' : 'Update'
src/views/scgl/sckbg.vue
@@ -2,11 +2,11 @@
  <div>
    <div class="body" style="padding: 0;height: 100%" :style="{height:mainHeight+'px'}">
      <el-tabs ref="elTabs" type="border-card" @tab-click="tabClick">
      <el-tabs ref="elTabs" v-model="activeName" type="border-card" @tab-click="tabClick">
        <el-tab-pane label="生产列表">
          <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
            <div style="display: flex;align-items: center">
              <div style="width: 70px">扫码:</div>
              <div style="width: 90px">扫描条码:</div>
              <el-input
                v-model="form.orderstepqrcode"
                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
@@ -163,7 +163,7 @@
                  :value="item.code"
                />
              </el-select>
              <div style="width: 70px;margin-left: 20px">扫码:</div>
              <div style="width: 90px;margin-left: 20px">扫描条码:</div>
              <el-input
                v-model="WXform.orderstepqrcode"
                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
@@ -303,7 +303,88 @@
            @pagination="getMesOrderStepSearch"
          />
        </el-tab-pane>
        <el-tab-pane v-if="false" label="工序检验">
          <div style="margin-left: 10px;margin-top:10px;display: flex;flex-direction: column">
            <div style="margin-bottom: 10px;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />扫码信息
            </div>
            <div style="display: flex;align-items: center">
              <div style="width: 90px">扫描条码:</div>
              <el-input
                v-model="GXform.orderstepqrcode"
                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
                name="GXproduceCode"
                style="width: 300px"
                @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
              />
            </div>
            <div style="line-height: 40px; display: flex;margin-top: 20px">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工单编码:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">产品编码:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">产品名称:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">产品规格:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工序编码:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">工序名称:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验标准信息
            </div>
            <div style="display: flex;align-items: center">
              <div style="width: 90px">检验标准:</div>
              <el-select
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in ARR"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
              <div style="width: 90px;margin-left: 50px;">检验标准:</div>
              <el-select
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in ARR"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                />
              </el-select>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验项信息
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
@@ -649,8 +730,6 @@
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import $ from 'jquery'
import {
  MesOrderGroupSelectUser,
@@ -668,7 +747,6 @@
  SavaMesOrderStepReport
} from '@/api/scgl'
import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
import { MesOrderPrintSearch1 } from '@/api/utils'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -712,7 +790,6 @@
      total: 10,
      tableData: [],
      WXform: { // 外协表单
        // PO202206280001_4;Step01
        orderstepqrcode: '', // 扫描的二维码信息
        prop: 'wo_code', // 排序字段z
        order: 'asc', // 排序字段
@@ -774,7 +851,6 @@
      UserTotal: 0,
      Userform: {},
      userIsSave: false, // 此人员是否可保持
      // operation: '',
      dialogFormRules: {
        outuser: [
          { required: true, message: '请选择发料人员', trigger: ['blur', 'change'] }
@@ -806,6 +882,14 @@
        startqty: [
          { required: true, message: '请输入报工数量', trigger: ['blur', 'change'] }
        ]
      },
      activeName: '',
      GXform: { // 工序
        orderstepqrcode: '' // 扫描的二维码信息
        // prop: 'wo_code', // 排序字段z
        // order: 'asc', // 排序字段
        // page: 1, // 第几页
        // rows: 20 // 每页多少条
      }
    }
@@ -889,6 +973,11 @@
          // this.form.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '2') {
        this.$nextTick(() => {
          $("input[name='GXproduceCode']")[0].focus()
        })
      }
    },
    // 扫码键盘回车事件
    async enterNative(val, belong) {
@@ -928,6 +1017,10 @@
          await this.WXback(res.data)
        }
      }
      if (belong === 'GXproduceCode') {
        console.log('GXproduceCode')
      }
    },
    // 查询
    search() {
src/views/zzmx/gylx.vue
@@ -392,6 +392,17 @@
        return this.$message.info('输入框内容与下拉选项内容不匹配!')
      }
      // 3.输入框内容与已选内容相同时不能保存
      let flag2 = false
      this.dynamicTags.forEach(item => {
        if (item.stepname === this.autocompleteValue.trim()) {
          flag2 = true
        }
      })
      if (flag2) {
        return this.$message.info('此工序已选,请选择其它工序!')
      }
      // 将值替换到原tag位置上
      this.dynamicTags.forEach((item, index) => {
        if ((index + 1) === tag.seq) {
@@ -608,6 +619,13 @@
      this.dynamicTags.forEach(item => {
        Data.push({ seq: item.seq, stepcode: item.stepcode, stepname: item.stepname })
      })
      Data.forEach(item => {
        if (item.stepname === this.routeArr.find(it => it.stepname === item.stepname).stepname) {
          item.stepcode = this.routeArr.find(it => it.stepname === item.stepname).stepcode
        }
      })
      console.log(Data, 32)
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {