Crunchy
2024-05-06 1f4c79169a0d3ef46f2430b61d4999e1be6261b3
Merge remote-tracking branch 'origin/master'
已修改5个文件
146 ■■■■ 文件已修改
src/api/quality/processInspect.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/wel.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/customerorder-form.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/processInspect/processInspect-form.vue 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/processInspect.js
@@ -102,3 +102,11 @@
    params: query
  })
}
export function selOutBatchNo(query) {
    return request({
      url: '/mes/qualityProcessInspect/selOutBatchNo',
      method: 'get',
      params: query
    })
  }
src/page/wel.vue
@@ -41,7 +41,7 @@
                </div>
                </div>
                <el-card class="box-card todo-card">
                    <el-row>
                    <el-row style="height: 100%;">
                        <el-col :span="12">
                            <ul class="type-box">
                                <li v-for="(m,i) in tabList" :key="i" :class="{active:current == i}" @click="changeTab(m,i)">{{ m }}</li>
@@ -100,13 +100,15 @@
                                </template>
                            </el-calendar>
                        </el-col>
                        <el-col :span="12" style="padding: 16px 20px;box-sizing: border-box;height: 100%;overflow-y: auto;">
                        <el-col :span="12" style="padding: 16px 20px;box-sizing: border-box;height: 100%;">
                            <div class="todo-span"><span>待办</span></div>
                            <div class="todo-info" v-for="(item,index) in todoList" :key="index" v-show="todoList.length>0">
                                <div class="todo-info-state"></div>
                                <span>{{ item }}</span>
                            <div style="height: calc(100% - 30px);overflow-y: auto;">
                                <div class="todo-info" v-for="(item,index) in todoList" :key="index" v-show="todoList.length>0">
                                    <div class="todo-info-state"></div>
                                    <span>{{ item }}</span>
                                </div>
                                <span class="no-info" v-if="todoList.length==0">暂无</span>
                            </div>
                            <span class="no-info" v-if="todoList.length==0">暂无</span>
                        </el-col>
                    </el-row>
                </el-card>
@@ -185,7 +187,8 @@
    height: 65vh;
    overflow: hidden;
    >>>.el-card__body{
        padding: 0px 0px 5px
        padding: 0px 0px 5px;
        height: 100%;
    }
    .todo-span{
        height:17px;
src/views/plan/customerorder/customerorder-form.vue
@@ -890,9 +890,6 @@
        customerOrderNo: [
          { required: true, message: '客户订单号不能为空', trigger: 'blur' }
        ],
        customerNo: [
          { required: true, message: '客户编号不能为空', trigger: 'blur' }
        ],
        customerName: [
          { required: true, message: '客户名称不能为空', trigger: 'blur' }
        ],
src/views/quality/processInspect/processInspect-form.vue
@@ -391,6 +391,27 @@
            <el-button type="primary" @click="deviceCode = false">确 定</el-button>
        </span>
        </el-dialog>
        <el-dialog
        title="不合格信息"
        :visible.sync="unqualified"
        width="30%">
        <div style="height: 30vh;width: 100%;">
            <el-form :model="ruleForm" :rules="unqualifiedRules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                <el-form-item label="不合格数量" prop="number">
                    <el-input v-model="ruleForm.number"></el-input>
                </el-form-item>
                <el-form-item label="批次号" prop="outBatchNo">
                <el-select v-model="ruleForm.outBatchNo" multiple placeholder="请选择批次号" style="width: 100%;">
                    <el-option :label="m" :value="m" v-for="(m,i) in outBatchNoList" :key="i"></el-option>
                </el-select>
                </el-form-item>
            </el-form>
        </div>
        <span slot="footer" class="dialog-footer">
        <el-button @click="unqualified = false">取 消</el-button>
        <el-button type="primary" :loading="loading" @click="handleSubmit">确 定</el-button>
        </span>
        </el-dialog>
    <processPart :paramObj="paramObj" :currshowlist.sync="workshop" />
    </div>
</template>
@@ -404,6 +425,7 @@
    updateProcessInsProduct,
    updateProcessInsProduct2,
    updateProcessInspectsById,
    selOutBatchNo,
} from '@/api/quality/processInspect'
import {
    getProcessConfigFiles,
@@ -423,6 +445,23 @@
    },
    data() {
        return {
            outBatchNoList:[],
            unqualifiedInfo:null,
            loading:false,
            ruleForm:{
                number:'',
                outBatchNo:[]
            },
            unqualifiedRules:{
                number: [
                    { required: true, message: '请输入不合格数量', trigger: 'blur' },
                    { pattern: /^\d+$/, message: '请输入数字', trigger: 'blur' }
                ],
                outBatchNo: [
                    { required: true, message: '请选择批次号', trigger: 'change' }
                ],
            },
            unqualified:false,
            progrecessFileLoading: false,
            processConfigFileTableData: [],
            headers: {
@@ -498,8 +537,14 @@
            val == undefined ? this.resultVal = null : this.resultVal = val
        }
        this.init()
        this.selOutBatchNo()
    },
    methods: {
        selOutBatchNo(){
            selOutBatchNo({id:this.$route.query.id}).then((res)=>{
                this.outBatchNoList = res.data.data
            })
        },
        getProcessConfigFile(){
            getProcessConfigFile({
            orderNumber: this.dataForm.orderNumber,
@@ -651,27 +696,30 @@
                number: 0,
                result: this.inspectionResultForm[0].result
            }
            this.unqualifiedInfo = obj;
            if (pro > 0) {
                this.$prompt('请输入不合格数量', '不合格数量', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    inputPattern: /^\d+$/,
                    inputErrorMessage: '请输入正确数字格式'
                }).then(({ value }) => {
                    obj.number = value
                    updateProcessInspectsById(obj).then(res => {
                        let data = res.data.data
                        if (data) {
                            if (data.indexOf("成功") > 0) {
                                this.$message.success(data);
                                this.checkTestState()
                            } else {
                                this.$message.warning(data);
                            }
                            return
                        }
                    });
                }).catch(() => { });
                this.unqualified = true;
                this.$refs.ruleForm.resetFields();
                // this.$prompt('请输入不合格数量', '不合格数量', {
                //     confirmButtonText: '确定',
                //     cancelButtonText: '取消',
                //     inputPattern: /^\d+$/,
                //     inputErrorMessage: '请输入正确数字格式'
                // }).then(({ value }) => {
                //     obj.number = value
                //     updateProcessInspectsById(obj).then(res => {
                //         let data = res.data.data
                //         if (data) {
                //             if (data.indexOf("成功") > 0) {
                //                 this.$message.success(data);
                //                 this.checkTestState()
                //             } else {
                //                 this.$message.warning(data);
                //             }
                //             return
                //         }
                //     });
                // }).catch(() => { });
            } else {
                updateProcessInspectsById(obj).then(res => {
                    let data = res.data.data
@@ -688,6 +736,32 @@
            }
            this.init()
        },
        handleSubmit(){
            this.$refs.ruleForm.validate((valid) => {
                if (valid) {
                    this.loading = true;
                    let obj = {number:this.ruleForm.number,outBatchNo:this.ruleForm.outBatchNo.join(','),...this.unqualifiedInfo};
                    updateProcessInspectsById(obj).then(res => {
                        let data = res.data.data
                        if (data) {
                            if (data.indexOf("成功") > 0) {
                                this.$message.success(data);
                                this.$refs.ruleForm.resetFields();
                                this.unqualified = false;
                                this.checkTestState()
                                this.init()
                            } else {
                                this.$message.warning(data);
                            }
                            return
                        }
                        this.loading = false;
                    });
                } else {
                    return false;
                }
            });
        },
        checkTestState() {
            let resultVal = '1'
            this.inspectionItems.forEach(item => {
vue.config.js
@@ -6,8 +6,8 @@
// const url = 'https://ztms-mes.chinaztt.cn/'
  const url = 'http://localhost:9999'
//const url = 'http://192.168.32.45:9999'
  // const url = 'http://localhost:9999'
const url = 'http://192.168.32.45:9999'
const localUrl = 'http://localhost:8089'