loulijun2021
2024-05-06 74dec4a295c7ef56aa3ec9c45c12a20c4b95f219
1.圣沣  首检巡检完工检验开发完成
已添加6个文件
已修改10个文件
13185 ■■■■■ 文件已修改
config/api.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/xtsy/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/sjjy.vue 559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/sjjy2.vue 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/wgjy.vue 559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/wgjy2.vue 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/xjjy.vue 559 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/zlgl/xjjy2.vue 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
style/global.css 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-config-service.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-service.js 5551 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-view.js 4936 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/api.js
@@ -212,4 +212,18 @@
// å­˜è´§æ¡£æ¡ˆä¸‹æ‹‰
export const InventoryTreePermissions = (data) => http.get('/GeneralBasicData/InventoryTreePermissions', {
    params: data
})
})
// å·¥åºæ£€éªŒæ‰«ç èŽ·å–ä»»åŠ¡ä¿¡æ¯
export const MesOrderStepCheckSearch = (data) => http.get('/QualityManagement/MesOrderStepCheckSearch', {
    params: data
})
// å…¥åŽ‚æ£€éªŒ,工序检验根据选择的检验方案查找检验项目
export const MesOrderStepCheckItemList = (data) => http.get('/QualityManagement/MesOrderStepCheckItemList', {
    params: data
})
// å·¥åºæ£€éªŒ,提交
export const SaveMesOrderStepCheckItem = (data) => http.post('/QualityManagement/SaveMesOrderStepCheckItem',
    data)
manifest.json
@@ -50,7 +50,8 @@
            "sdkConfigs": {
                "ad": {},
                "maps": {},
                "share": {}
                "share": {},
                "push": {}
            },
            "icons": {
                "android": {
pages.json
@@ -248,6 +248,54 @@
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/sjjy",
            "style": {
                "navigationBarTitleText": "首检检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/sjjy2",
            "style": {
                "navigationBarTitleText": "首检检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/xjjy",
            "style": {
                "navigationBarTitleText": "巡检检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/xjjy2",
            "style": {
                "navigationBarTitleText": "巡检检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/wgjy",
            "style": {
                "navigationBarTitleText": "完工检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/zlgl/wgjy2",
            "style": {
                "navigationBarTitleText": "完工检验",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        }
    ],
    "globalStyle": {
pages/login/index.vue
@@ -74,14 +74,14 @@
        data() {
            return {
                // #ifdef H5
                usercode: '',
                usercode: '999',
                // #endif
                // #ifdef APP-PLUS
                usercode: '',
                usercode: '9999',
                // #endif
                userpassword: '',
                userpassword: '123456',
                isView: false, //密码是否可见
                isDisabledSubmitButton: false, //提交按钮是否处于加载中
pages/xtsy/index.vue
@@ -203,12 +203,18 @@
                        // è´¨é‡ç®¡ç†
                    case '2030':
                        url = 'zlgl/gxjy' //工序检验
                    case '2702':
                        url = 'zlgl/sjjy' //首检检验
                        break;
                    case '2031':
                        url = 'zlgl/wljy' //物流检验
                    case '2703':
                        url = 'zlgl/xjjy' //巡检检验
                        break;
                    case '2704':
                        url = 'zlgl/wgjy' //完工检验
                        break;
                    case '2032':
                        url = 'zlgl/jyfh' //检验复核
                        break;
@@ -390,6 +396,7 @@
                        break;
                }
                this.popupShow = false //二级菜单的显隐控制
                console.log(url)
                uni.navigateTo({
                    url: '../' + url
                });
pages/zlgl/sjjy.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,559 @@
<template>
    <view>
        <page-nav title="首检检验"></page-nav>
        <view v-if="processArr.length===0">
            <div class="sacnBody">
                <div class="scanImg" @click="topScanClick"></div>
                <div class="scanText">扫描工序任务码</div>
            </div>
        </view>
        <view v-if="processArr.length!==0" class="mainContent" style="height: 1340rpx;overflow: auto">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 386rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                å·¥å•信息
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wo_code}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 290rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                è´¨æ£€æ–¹æ¡ˆ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>方案名称:</view>
                                <view>抽样方式:</view>
                                <view>报工数量:</view>
                                <view>样本数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view>{{processObj.good_qty}}</view>
                                <u-number-box inputWidth='50' v-model="processObj.sampscare" min='1'
                                    :max='processObj.good_qty' class="contentFont"
                                    @change="samplesChange"></u-number-box>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒé¡¹ç›®
                            </view>
                        </view>
                    </view>
                    <view class="marginBottom20 marginTop10"
                        style="display: flex;justify-content: space-around;align-items: center;">
                        <u-button type="primary" :disabled="checkNumber===1" @click="preTo"
                            style="width: 160rpx;height: 60rpx;" plain text="上一件"></u-button>
                        <view style="">{{checkNumber}}/{{processObj.sampscare}}</view>
                        <u-button type="primary"
                            :disabled="checkNumber===processObj.sampscare||processArr%processArr.filter(i=>i.isPlain!=='').length===0"
                            @click="nextTo" style="width: 160rpx;height: 60rpx; " plain text="下一件"></u-button>
                    </view>
                    <u-gap height="6" style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                    <view class="marginLeft20 marginRight20 marginTop20" style="margin-bottom: 132rpx;">
                        <view class="marginBottom20 flex_column" v-for="(item,index) in processArr"
                            v-if="item.checkNumber===checkNumber" :key="item.name+index+checkNumber">
                            <view class="flex_between marginLeft20 ">
                                <view class="titleFont">{{item.name}}</view>
                                <view class="contentFont" v-if="item.numberjudge==='N'"
                                    style="display: flex;width: 280rpx;">
                                    <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                        shape="circle" @click="item.isPlain=true;$forceUpdate()" :plain='!item.isPlain'
                                        text="合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                    <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                        shape="circle" :plain='item.isPlain' @click="item.isPlain=false;$forceUpdate()"
                                        text="不合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                </view>
                            </view>
                            <view class="flex_between marginLeft20 ">
                                <view class="flex_column titleFont">
                                    <view v-if="item.standvalue">标准值</view>
                                    <view v-if="item.uppervalue">上限值</view>
                                    <view v-if="item.lowervalue">下限值</view>
                                </view>
                                <view class="flex_column titleFont marginRight20">
                                    <view v-if="item.standvalue">{{item.standvalue}}</view>
                                    <view v-if="item.uppervalue">{{item.uppervalue}}</view>
                                    <view v-if="item.lowervalue">{{item.lowervalue}}</view>
                                </view>
                            </view>
                            <view class="titleFont marginLeft20 marginRight20">
                                <view v-if="item.stepcheckitem_desc">描述 {{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class="flex_between marginLeft20  marginTop10 marginBottom20">
                                <view class="titleFont  " style="display: flex;align-items: center;"
                                    v-if="item.numberjudge==='Y'">
                                    <view class="titleFont marginRight20">
                                        å®žæµ‹å€¼
                                    </view>
                                    <view class="inputClass " style="width:40%;">
                                        <u--input style="" :adjustPosition='false' placeholder="请输入" border="surround"
                                            v-model="item.real_value" @change='val=>realValueBlur(val,item)'></u--input>
                                    </view>
                                    <view style="display: flex;width: 280rpx;margin-left: 12rpx;">
                                        <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                            shape="circle" @click="item.isPlain=true;$forceUpdate()"
                                            :disabled="item.required==='Y'&&!item.real_value" :plain='!item.isPlain'
                                            text="合格"></u-button>
                                        <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                            shape="circle" :plain='item.isPlain'
                                            :disabled="item.required==='Y'&&!item.real_value"
                                            @click="item.isPlain=false;$forceUpdate()" text="不合格"></u-button>
                                    </view>
                                </view>
                            </view>
                            <!-- <view class=" marginLeft20 marginRight20 marginTop10">
                                <view class="titleFont"> æè¿°ï¼š{{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class=" marginLeft20 marginRight20 marginTop10 marginBottom20"
                                style="display: flex;align-items: center;">
                                <view class="contentFont"> å¤‡æ³¨ï¼š</view>
                                <view class="inputClass " style="">
                                    <u--input style="" placeholder="请输入" border="surround"
                                        v-model="item.stepcheckitem_remark"></u--input>
                                </view>
                            </view> -->
                            <u-gap height="6"
                                v-if="(index+1)%processArr.map(i=>i.checkNumber===1).filter(i=>i).length!==0"
                                style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer" v-if="processArr.length!==0">
            <u-button v-if="processArr.length!==0" type="primary" size='large'
                :disabled="!(processArr.filter(i=>i.isPlain==='').length===0)" :hairline="true" @click="navigateTo"
                text="下一步"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        MesOrderStepCheckSearch,
        MesOrderStepCheckItemList
    } from '../../config/api.js';
    export default {
        onLoad(option) {
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                processObj: {
                    // wocode: '',
                    // partcode: '',
                    // partname: '',
                    // partspec: '',
                    // stepcode: '',
                    // stepname: '',
                    // checkstandcode: '',
                    // checkstandname: '',
                    // check_type: '',
                    // sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    // sampscare: '',
                    // qualitystatus: '',
                    // good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    // sampleqty: '',
                    // goodqty: '', // åˆæ ¼æ•°é‡
                    // ngqty: '', // ä¸è‰¯æ•°é‡
                }, //工序检验对象
                processArr: [], //工序检验数组
                checkNumber: 1, //检验项目中的检验数量  çŽ°åœ¨å¤„äºŽç¬¬å‡ ä¸ª
            }
        },
        created() {
        },
        mounted() {
            this.init()
            // this.getStepCheckSearch('MO-2024-01-0004_2;101')
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            async getStepCheckSearch(orderstepqrcode) {
                console.log('执行了')
                // æ£€éªŒæ–¹å¼FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检)
                const data = {
                    // 'MO-2023-05-0003_1;Step06'
                    orderstepqrcode,
                    checktype: 'FirstCheck',
                    // stu_torgcode: uni.getStorageSync('stu_torgcode')
                }
                // const res = await MesOrderStepCheckSearch(this.global.formatData(data))
                const res = await MesOrderStepCheckSearch(data)
                if (res.code === '200') {
                    this.processObj = {
                        wo_code: res.data.labcont[0].wo_code,
                        partcode: res.data.labcont[0].partcode,
                        partname: res.data.labcont[0].partname,
                        partspec: res.data.labcont[0].partspec,
                        stepcode: res.data.labcont[0].stepcode,
                        stepname: res.data.labcont[0].stepname,
                        good_qty: res.data.labcont[0].good_qty,
                        checkstandcode: res.data.chekstand[0].checkstandcode,
                        checkstandname: res.data.chekstand[0].checkstandname,
                        sampmethod: res.data.chekstand[0].sampmethod,
                        sampscare: res.data.chekstand[0].sampmethod === 'FIXED' ? res.data.chekstand[0].sampscare :
                            Math.ceil(res.data.labcont[0].good_qty * res.data.chekstand[0].sampscare / 100)
                    }
                    this.processObj.sampscare = this.processObj.sampscare <= this.processObj.good_qty ? this.processObj
                        .sampscare : this.processObj.good_qty
                    await this.getStepCheckItemList(this.processObj.checkstandcode)
                }
            },
            async getStepCheckItemList(checkstandcode) {
                const data = {
                    checkstandcode
                }
                const res = await MesOrderStepCheckItemList(data)
                this.processArr = []
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    res.data.forEach(j => {
                        this.processArr.push({
                            checkNumber: i + 1,
                            stepcheckitem_seq: j.stepcheckitem_seq,
                            name: j.name,
                            code: j.code,
                            standvalue: j.standvalue,
                            lowervalue: j.lowervalue,
                            uppervalue: j.uppervalue,
                            real_value: j.real_value,
                            unit: j.unit,
                            stepcheckitem_desc: j.stepcheckitem_desc,
                            stepcheckitem_remark: '',
                            isPlain: '',
                            required: j.required, //是否必填
                            numberjudge: j.numberjudge, //数值判断
                        })
                    })
                }
            },
            // æ ·æœ¬æ•°é‡å€¼æ”¹å˜æ—¶
            samplesChange(val) {
                console.log(val.value)
                const t = this.processArr.filter(i => i.checkNumber === 1)
                let len = this.processArr.length / t.length
                // ä»¶æ•°å‡å°‘æ—¶
                if (val.value < this.processArr.length / t.length) {
                    this.processArr.reverse()
                    const a = this.processArr.splice(0, t.length * (len - val.value))
                    this.processArr.reverse()
                    if (this.checkNumber > val.value) {
                        this.checkNumber = val.value
                    }
                }
                // ä»¶æ•°å˜å¤šæ—¶
                if (val.value > this.processArr.length / t.length) {
                    for (var i = val.value; i > len; i--) {
                        t.forEach(j => {
                            this.processArr.push({
                                checkNumber: i,
                                stepcheckitem_seq: j.stepcheckitem_seq,
                                name: j.name,
                                code: j.code,
                                standvalue: j.standvalue,
                                lowervalue: j.lowervalue,
                                uppervalue: j.uppervalue,
                                real_value: '',
                                unit: j.unit,
                                stepcheckitem_desc: j.stepcheckitem_desc,
                                stepcheckitem_remark: '',
                                isPlain: '',
                                required: j.required, //是否必填
                                numberjudge: j.numberjudge, //数值判断
                            })
                        })
                    }
                    this.processArr.sort((a, b) => a.checkNumber - b.checkNumber)
                }
                // console.log(this.processArr, 1)
                // console.log(this.processArr.length, 1)
                this.$forceUpdate()
            },
            // ä¸Šä¸€ä»¶
            preTo() {
                if (this.checkNumber > 1) {
                    this.checkNumber--
                }
            },
            //下一件
            nextTo() {
                if (this.checkNumber < this.processObj.sampscare) {
                    this.checkNumber++
                }
                this.$forceUpdate()
            },
            // å®žæµ‹å€¼è¾“入时失焦状态
            realValueBlur(val, item) {
                console.log(val === '', item)
                if (val.value !== '') {
                    if (item.numberjudge === 'Y') { //如果需要进行数值判断
                        if (item.uppervalue === '' && item.lowervalue === '') { //上限值为空,下限值为空
                            if (parseFloat(val) === parseFloat(item.standvalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue !== '') { //上限值不为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue) && parseFloat(val) <=
                                parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue === '') { //上限值不为空,下限值为空
                            if (parseFloat(val) <= parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue === '' && item.lowervalue !== '') { //上限值为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                    }
                }
                if (val === '') {
                    item.isPlain = ''
                }
                // this.$forceUpdate()
            },
            // ä¸‹ä¸€æ­¥
            navigateTo() {
                // è®¡ç®—OK值
                let goodqty = 0;
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    let flag = this.processArr.filter(j => j.checkNumber === i + 1).every(j => j.isPlain)
                    if (flag) {
                        goodqty++
                    }
                }
                uni.navigateTo({
                    url: './sjjy2?processObj=' + JSON.stringify(this.processObj) +
                        '&processArr=' + JSON.stringify(this.processArr) + '&goodqty=' + goodqty
                });
            },
            // æ‰«ç 
            topScanClick() {
                let that = this;
                uni.scanCode({
                    onlyFromCamera: true,
                    // scanType: ['barCode', 'qrCode'],
                    scanType: ['qrCode'],
                    success: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                        that.getStepCheckSearch(res.result)
                        // that.scanContent = res.result;
                        // let flag = false
                        // that.processArr.forEach(item => {
                        //     if (item.hbarcode === res.result) {
                        //         flag = true
                        //     }
                        // })
                        // if (flag) {
                        //     that.$u.toast('此条码已扫描,已在列表中!')
                        // } else {
                        //     //处理扫码事件
                        //     // that.getStepCheckSearch(that.scanContent);
                        // }
                    },
                    complete: function(res) {
                    },
                    fail: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                    }
                });
            },
            fromSubmitData() {
                this.processObj = {}
                this.processArr = []
                this.checkNumber = 1
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
    ::v-deep .u-input {
        padding: 6rpx 18rpx !important;
    }
    ::v-deep .u-number-box__minus {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__input {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__plus {
        height: 50rpx !important;
    }
</style>
pages/zlgl/sjjy2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,307 @@
<template>
    <view>
        <page-nav title="首检检验"></page-nav>
        <view class="mainContent">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                ç‰©æ–™ä¿¡æ¯
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                                <view>质检方案:</view>
                                <view>抽样方式:</view>
                                <view>质量状态:</view>
                                <view>物料数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wocode}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                                <view class="ellipsis" style="width: 460rpx;">{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view style="display: flex;align-items: center;">
                                    <u-icon :name="isPlain?'checkmark-circle-fill':'close-circle-fill'"
                                        :color="isPlain?'#55ff00':'#FF0000'" size="20"></u-icon>
                                    <view style="margin-left: 10rpx;">
                                        {{isPlain?'合格':'不合格'}}
                                    </view>
                                </view>
                                <view>{{processObj.good_qty}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒç»“æžœ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20 marginBottom20">
                        <view class="" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>样本数量:</view>
                                <view>合格数量:</view>
                                <view>不合格数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.sampleqty}} ä¸ª</view>
                                <view>{{processObj.goodqty}} ä¸ª</view>
                                <view>{{processObj.sampleqty-processObj.goodqty}} ä¸ª</view>
                            </view>
                        </view>
                        <view style="display: flex;margin-top: 30rpx;justify-content: flex-start;">
                            <u-button type="primary" @click="isPlain=true" style="width: 160rpx;height: 60rpx; "
                                :plain="!isPlain" text="合格"></u-button>
                            <u-button type="warning" @click="isPlain=false" style="width: 160rpx;height: 60rpx;"
                                :plain="isPlain" text="不合格"></u-button>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer">
            <u-button type="primary" size='large' :hairline="true" :loading="isDisabledSubmitButton" @click="submit"
                loadingText="正在提交,请稍等..." text="确认提交"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        SaveMesOrderStepCheckItem
    } from '../../config/api.js';
    export default {
        onLoad(option) {
            console.log(option, 2)
            // let t1=JSON.parse(option.processObj)
            // let t2=JSON.parse(option.processObj)
            let processObj = JSON.parse(option.processObj)
            // console.log(this.processObj)
            this.processObj.wocode = processObj.wo_code
            this.processObj.partcode = processObj.partcode
            this.processObj.partname = processObj.partname
            this.processObj.partspec = processObj.partspec
            this.processObj.stepcode = processObj.stepcode
            this.processObj.stepname = processObj.stepname
            this.processObj.sampmethod = processObj.sampmethod
            this.processObj.good_qty = processObj.good_qty
            this.processObj.checkstandcode = processObj.checkstandcode
            this.processObj.checkstandname = processObj.checkstandname
            this.processObj.sampleqty = processObj.sampscare
            this.processObj.goodqty = option.goodqty
            this.isPlain = parseFloat(this.processObj.goodqty) === parseFloat(this.processObj.sampleqty)
            this.processArr = JSON.parse(option.processArr)
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                topRightMessageCount: '',
                isDisabledSubmitButton: false,
                processObj: {
                    wocode: '',
                    partcode: '',
                    partname: '',
                    partspec: '',
                    stepcode: '',
                    stepname: '',
                    checkstandcode: '',
                    checkstandname: '',
                    check_type: 'FirstCheck',
                    sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    sampscare: '',
                    qualitystatus: '/',
                    good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    sampleqty: '',
                    goodqty: '', // åˆæ ¼æ•°é‡
                    ngqty: '', // ä¸è‰¯æ•°é‡
                },
                processArr: [],
                isPlain: true
            }
        },
        created() {
        },
        mounted() {
            this.init()
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // æäº¤æŽ¥å£
            async submit() {
                let checkitemcont = []
                this.processArr.forEach((i, index) => {
                    checkitemcont.push({
                        checknum: i.checkNumber + '/' + this.processArr.length / this
                            .processArr.filter(j => j.checkNumber === 1).length,
                        checkiem_seq: i.stepcheckitem_seq,
                        checkitem_code: i.code,
                        checkitem_name: i.name,
                        check_value: i.real_value ? i.real_value : '',
                        check_result: i.check_result ? 'OK' : 'NG',
                        checkitem_descr: ''
                    })
                })
                console.log(checkitemcont, 7)
                let formData = {
                    stu_torgcode: uni.getStorageSync('stu_torgcode'),
                    wocode: this.processObj.wocode,
                    partcode: this.processObj.partcode,
                    stepcode: this.processObj.stepcode,
                    checkstandcode: this.processObj.checkstandcode,
                    check_type: this.processObj.check_type,
                    sampmethod: this.processObj.sampmethod,
                    qualitystatus: this.isPlain ? 'OK' : 'NG',
                    good_qty: this.processObj.good_qty,
                    sampleqty: this.processObj.sampleqty,
                    goodqty: this.processObj.goodqty,
                    ngqty: this.processObj.sampleqty - this.processObj.goodqty,
                    admin: uni.getStorageSync('usercode'),
                    checkitemcont: JSON.stringify(checkitemcont)
                }
                console.log(formData, 888)
                this.isDisabledSubmitButton = true
                const res = await SaveMesOrderStepCheckItem(formData)
                if (res.code === '200') {
                    uni.$u.toast('提交成功!')
                    setTimeout(() => {
                        let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                        prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                        uni.navigateBack({
                            delta: 1, //返回层数,1则上页
                        })
                    }, 1000)
                    this.isDisabledSubmitButton = false
                } else {
                    uni.$u.toast(result.Message)
                    this.isDisabledSubmitButton = false
                }
                // uni.uploadFile({
                //     url: this.$baseUrl + '/AppQualityManagement/SaveStepCheckItem',
                //     files: [{
                //         "uri": "/"
                //     }],
                //     header: header,
                //     formData: formData,
                //     success: (res) => {
                //         console.log(res, 999)
                //         let result = JSON.parse(res.data)
                //         if (res.statusCode == 200 && result.code == '200') {
                //             uni.$u.toast('提交成功!')
                //             let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                //             prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                //             uni.navigateBack({
                //                 delta: 1, //返回层数,1则上页
                //             })
                //         } else {
                //             uni.$u.toast(result.Message)
                //         }
                //         this.isDisabledSubmitButton = false
                //     },
                //     fail(res) {
                //         console.log(res, 1000)
                //         uni.$u.toast('提交失败!')
                //         this.isDisabledSubmitButton = false
                //     },
                // })
            },
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
</style>
pages/zlgl/wgjy.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,559 @@
<template>
    <view>
        <page-nav title="完工检验"></page-nav>
        <view v-if="processArr.length===0">
            <div class="sacnBody">
                <div class="scanImg" @click="topScanClick"></div>
                <div class="scanText">扫描工序任务码</div>
            </div>
        </view>
        <view v-if="processArr.length!==0" class="mainContent" style="height: 1340rpx;overflow: auto">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 386rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                å·¥å•信息
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wo_code}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 290rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                è´¨æ£€æ–¹æ¡ˆ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>方案名称:</view>
                                <view>抽样方式:</view>
                                <view>报工数量:</view>
                                <view>样本数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view>{{processObj.good_qty}}</view>
                                <u-number-box inputWidth='50' v-model="processObj.sampscare" min='1'
                                    :max='processObj.good_qty' class="contentFont"
                                    @change="samplesChange"></u-number-box>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒé¡¹ç›®
                            </view>
                        </view>
                    </view>
                    <view class="marginBottom20 marginTop10"
                        style="display: flex;justify-content: space-around;align-items: center;">
                        <u-button type="primary" :disabled="checkNumber===1" @click="preTo"
                            style="width: 160rpx;height: 60rpx;" plain text="上一件"></u-button>
                        <view style="">{{checkNumber}}/{{processObj.sampscare}}</view>
                        <u-button type="primary"
                            :disabled="checkNumber===processObj.sampscare||processArr%processArr.filter(i=>i.isPlain!=='').length===0"
                            @click="nextTo" style="width: 160rpx;height: 60rpx; " plain text="下一件"></u-button>
                    </view>
                    <u-gap height="6" style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                    <view class="marginLeft20 marginRight20 marginTop20" style="margin-bottom: 132rpx;">
                        <view class="marginBottom20 flex_column" v-for="(item,index) in processArr"
                            v-if="item.checkNumber===checkNumber" :key="item.name+index+checkNumber">
                            <view class="flex_between marginLeft20 ">
                                <view class="titleFont">{{item.name}}</view>
                                <view class="contentFont" v-if="item.numberjudge==='N'"
                                    style="display: flex;width: 280rpx;">
                                    <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                        shape="circle" @click="item.isPlain=true;$forceUpdate()" :plain='!item.isPlain'
                                        text="合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                    <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                        shape="circle" :plain='item.isPlain' @click="item.isPlain=false;$forceUpdate()"
                                        text="不合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                </view>
                            </view>
                            <view class="flex_between marginLeft20 ">
                                <view class="flex_column titleFont">
                                    <view v-if="item.standvalue">标准值</view>
                                    <view v-if="item.uppervalue">上限值</view>
                                    <view v-if="item.lowervalue">下限值</view>
                                </view>
                                <view class="flex_column titleFont marginRight20">
                                    <view v-if="item.standvalue">{{item.standvalue}}</view>
                                    <view v-if="item.uppervalue">{{item.uppervalue}}</view>
                                    <view v-if="item.lowervalue">{{item.lowervalue}}</view>
                                </view>
                            </view>
                            <view class="titleFont marginLeft20 marginRight20">
                                <view v-if="item.stepcheckitem_desc">描述 {{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class="flex_between marginLeft20  marginTop10 marginBottom20">
                                <view class="titleFont  " style="display: flex;align-items: center;"
                                    v-if="item.numberjudge==='Y'">
                                    <view class="titleFont marginRight20">
                                        å®žæµ‹å€¼
                                    </view>
                                    <view class="inputClass " style="width:40%;">
                                        <u--input style="" :adjustPosition='false' placeholder="请输入" border="surround"
                                            v-model="item.real_value" @change='val=>realValueBlur(val,item)'></u--input>
                                    </view>
                                    <view style="display: flex;width: 280rpx;margin-left: 12rpx;">
                                        <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                            shape="circle" @click="item.isPlain=true;$forceUpdate()"
                                            :disabled="item.required==='Y'&&!item.real_value" :plain='!item.isPlain'
                                            text="合格"></u-button>
                                        <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                            shape="circle" :plain='item.isPlain'
                                            :disabled="item.required==='Y'&&!item.real_value"
                                            @click="item.isPlain=false;$forceUpdate()" text="不合格"></u-button>
                                    </view>
                                </view>
                            </view>
                            <!-- <view class=" marginLeft20 marginRight20 marginTop10">
                                <view class="titleFont"> æè¿°ï¼š{{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class=" marginLeft20 marginRight20 marginTop10 marginBottom20"
                                style="display: flex;align-items: center;">
                                <view class="contentFont"> å¤‡æ³¨ï¼š</view>
                                <view class="inputClass " style="">
                                    <u--input style="" placeholder="请输入" border="surround"
                                        v-model="item.stepcheckitem_remark"></u--input>
                                </view>
                            </view> -->
                            <u-gap height="6"
                                v-if="(index+1)%processArr.map(i=>i.checkNumber===1).filter(i=>i).length!==0"
                                style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer" v-if="processArr.length!==0">
            <u-button v-if="processArr.length!==0" type="primary" size='large'
                :disabled="!(processArr.filter(i=>i.isPlain==='').length===0)" :hairline="true" @click="navigateTo"
                text="下一步"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        MesOrderStepCheckSearch,
        MesOrderStepCheckItemList
    } from '../../config/api.js';
    export default {
        onLoad(option) {
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                processObj: {
                    // wocode: '',
                    // partcode: '',
                    // partname: '',
                    // partspec: '',
                    // stepcode: '',
                    // stepname: '',
                    // checkstandcode: '',
                    // checkstandname: '',
                    // check_type: '',
                    // sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    // sampscare: '',
                    // qualitystatus: '',
                    // good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    // sampleqty: '',
                    // goodqty: '', // åˆæ ¼æ•°é‡
                    // ngqty: '', // ä¸è‰¯æ•°é‡
                }, //工序检验对象
                processArr: [], //工序检验数组
                checkNumber: 1, //检验项目中的检验数量  çŽ°åœ¨å¤„äºŽç¬¬å‡ ä¸ª
            }
        },
        created() {
        },
        mounted() {
            this.init()
            // this.getStepCheckSearch('MO-2024-01-0004_2;101')
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            async getStepCheckSearch(orderstepqrcode) {
                console.log('执行了')
                // æ£€éªŒæ–¹å¼FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检)
                const data = {
                    // 'MO-2023-05-0003_1;Step06'
                    orderstepqrcode,
                    checktype: 'EndCheck',
                    // stu_torgcode: uni.getStorageSync('stu_torgcode')
                }
                // const res = await MesOrderStepCheckSearch(this.global.formatData(data))
                const res = await MesOrderStepCheckSearch(data)
                if (res.code === '200') {
                    this.processObj = {
                        wo_code: res.data.labcont[0].wo_code,
                        partcode: res.data.labcont[0].partcode,
                        partname: res.data.labcont[0].partname,
                        partspec: res.data.labcont[0].partspec,
                        stepcode: res.data.labcont[0].stepcode,
                        stepname: res.data.labcont[0].stepname,
                        good_qty: res.data.labcont[0].good_qty,
                        checkstandcode: res.data.chekstand[0].checkstandcode,
                        checkstandname: res.data.chekstand[0].checkstandname,
                        sampmethod: res.data.chekstand[0].sampmethod,
                        sampscare: res.data.chekstand[0].sampmethod === 'FIXED' ? res.data.chekstand[0].sampscare :
                            Math.ceil(res.data.labcont[0].good_qty * res.data.chekstand[0].sampscare / 100)
                    }
                    this.processObj.sampscare = this.processObj.sampscare <= this.processObj.good_qty ? this.processObj
                        .sampscare : this.processObj.good_qty
                    await this.getStepCheckItemList(this.processObj.checkstandcode)
                }
            },
            async getStepCheckItemList(checkstandcode) {
                const data = {
                    checkstandcode
                }
                const res = await MesOrderStepCheckItemList(data)
                this.processArr = []
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    res.data.forEach(j => {
                        this.processArr.push({
                            checkNumber: i + 1,
                            stepcheckitem_seq: j.stepcheckitem_seq,
                            name: j.name,
                            code: j.code,
                            standvalue: j.standvalue,
                            lowervalue: j.lowervalue,
                            uppervalue: j.uppervalue,
                            real_value: j.real_value,
                            unit: j.unit,
                            stepcheckitem_desc: j.stepcheckitem_desc,
                            stepcheckitem_remark: '',
                            isPlain: '',
                            required: j.required, //是否必填
                            numberjudge: j.numberjudge, //数值判断
                        })
                    })
                }
            },
            // æ ·æœ¬æ•°é‡å€¼æ”¹å˜æ—¶
            samplesChange(val) {
                console.log(val.value)
                const t = this.processArr.filter(i => i.checkNumber === 1)
                let len = this.processArr.length / t.length
                // ä»¶æ•°å‡å°‘æ—¶
                if (val.value < this.processArr.length / t.length) {
                    this.processArr.reverse()
                    const a = this.processArr.splice(0, t.length * (len - val.value))
                    this.processArr.reverse()
                    if (this.checkNumber > val.value) {
                        this.checkNumber = val.value
                    }
                }
                // ä»¶æ•°å˜å¤šæ—¶
                if (val.value > this.processArr.length / t.length) {
                    for (var i = val.value; i > len; i--) {
                        t.forEach(j => {
                            this.processArr.push({
                                checkNumber: i,
                                stepcheckitem_seq: j.stepcheckitem_seq,
                                name: j.name,
                                code: j.code,
                                standvalue: j.standvalue,
                                lowervalue: j.lowervalue,
                                uppervalue: j.uppervalue,
                                real_value: '',
                                unit: j.unit,
                                stepcheckitem_desc: j.stepcheckitem_desc,
                                stepcheckitem_remark: '',
                                isPlain: '',
                                required: j.required, //是否必填
                                numberjudge: j.numberjudge, //数值判断
                            })
                        })
                    }
                    this.processArr.sort((a, b) => a.checkNumber - b.checkNumber)
                }
                // console.log(this.processArr, 1)
                // console.log(this.processArr.length, 1)
                this.$forceUpdate()
            },
            // ä¸Šä¸€ä»¶
            preTo() {
                if (this.checkNumber > 1) {
                    this.checkNumber--
                }
            },
            //下一件
            nextTo() {
                if (this.checkNumber < this.processObj.sampscare) {
                    this.checkNumber++
                }
                this.$forceUpdate()
            },
            // å®žæµ‹å€¼è¾“入时失焦状态
            realValueBlur(val, item) {
                console.log(val === '', item)
                if (val.value !== '') {
                    if (item.numberjudge === 'Y') { //如果需要进行数值判断
                        if (item.uppervalue === '' && item.lowervalue === '') { //上限值为空,下限值为空
                            if (parseFloat(val) === parseFloat(item.standvalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue !== '') { //上限值不为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue) && parseFloat(val) <=
                                parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue === '') { //上限值不为空,下限值为空
                            if (parseFloat(val) <= parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue === '' && item.lowervalue !== '') { //上限值为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                    }
                }
                if (val === '') {
                    item.isPlain = ''
                }
                // this.$forceUpdate()
            },
            // ä¸‹ä¸€æ­¥
            navigateTo() {
                // è®¡ç®—OK值
                let goodqty = 0;
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    let flag = this.processArr.filter(j => j.checkNumber === i + 1).every(j => j.isPlain)
                    if (flag) {
                        goodqty++
                    }
                }
                uni.navigateTo({
                    url: './wgjy2?processObj=' + JSON.stringify(this.processObj) +
                        '&processArr=' + JSON.stringify(this.processArr) + '&goodqty=' + goodqty
                });
            },
            // æ‰«ç 
            topScanClick() {
                let that = this;
                uni.scanCode({
                    onlyFromCamera: true,
                    // scanType: ['barCode', 'qrCode'],
                    scanType: ['qrCode'],
                    success: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                        that.getStepCheckSearch(res.result)
                        // that.scanContent = res.result;
                        // let flag = false
                        // that.processArr.forEach(item => {
                        //     if (item.hbarcode === res.result) {
                        //         flag = true
                        //     }
                        // })
                        // if (flag) {
                        //     that.$u.toast('此条码已扫描,已在列表中!')
                        // } else {
                        //     //处理扫码事件
                        //     // that.getStepCheckSearch(that.scanContent);
                        // }
                    },
                    complete: function(res) {
                    },
                    fail: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                    }
                });
            },
            fromSubmitData() {
                this.processObj = {}
                this.processArr = []
                this.checkNumber = 1
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
    ::v-deep .u-input {
        padding: 6rpx 18rpx !important;
    }
    ::v-deep .u-number-box__minus {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__input {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__plus {
        height: 50rpx !important;
    }
</style>
pages/zlgl/wgjy2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,307 @@
<template>
    <view>
        <page-nav title="完工检验"></page-nav>
        <view class="mainContent">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                ç‰©æ–™ä¿¡æ¯
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                                <view>质检方案:</view>
                                <view>抽样方式:</view>
                                <view>质量状态:</view>
                                <view>物料数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wocode}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                                <view class="ellipsis" style="width: 460rpx;">{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view style="display: flex;align-items: center;">
                                    <u-icon :name="isPlain?'checkmark-circle-fill':'close-circle-fill'"
                                        :color="isPlain?'#55ff00':'#FF0000'" size="20"></u-icon>
                                    <view style="margin-left: 10rpx;">
                                        {{isPlain?'合格':'不合格'}}
                                    </view>
                                </view>
                                <view>{{processObj.good_qty}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒç»“æžœ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20 marginBottom20">
                        <view class="" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>样本数量:</view>
                                <view>合格数量:</view>
                                <view>不合格数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.sampleqty}} ä¸ª</view>
                                <view>{{processObj.goodqty}} ä¸ª</view>
                                <view>{{processObj.sampleqty-processObj.goodqty}} ä¸ª</view>
                            </view>
                        </view>
                        <view style="display: flex;margin-top: 30rpx;justify-content: flex-start;">
                            <u-button type="primary" @click="isPlain=true" style="width: 160rpx;height: 60rpx; "
                                :plain="!isPlain" text="合格"></u-button>
                            <u-button type="warning" @click="isPlain=false" style="width: 160rpx;height: 60rpx;"
                                :plain="isPlain" text="不合格"></u-button>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer">
            <u-button type="primary" size='large' :hairline="true" :loading="isDisabledSubmitButton" @click="submit"
                loadingText="正在提交,请稍等..." text="确认提交"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        SaveMesOrderStepCheckItem
    } from '../../config/api.js';
    export default {
        onLoad(option) {
            console.log(option, 2)
            // let t1=JSON.parse(option.processObj)
            // let t2=JSON.parse(option.processObj)
            let processObj = JSON.parse(option.processObj)
            // console.log(this.processObj)
            this.processObj.wocode = processObj.wo_code
            this.processObj.partcode = processObj.partcode
            this.processObj.partname = processObj.partname
            this.processObj.partspec = processObj.partspec
            this.processObj.stepcode = processObj.stepcode
            this.processObj.stepname = processObj.stepname
            this.processObj.sampmethod = processObj.sampmethod
            this.processObj.good_qty = processObj.good_qty
            this.processObj.checkstandcode = processObj.checkstandcode
            this.processObj.checkstandname = processObj.checkstandname
            this.processObj.sampleqty = processObj.sampscare
            this.processObj.goodqty = option.goodqty
            this.isPlain = parseFloat(this.processObj.goodqty) === parseFloat(this.processObj.sampleqty)
            this.processArr = JSON.parse(option.processArr)
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                topRightMessageCount: '',
                isDisabledSubmitButton: false,
                processObj: {
                    wocode: '',
                    partcode: '',
                    partname: '',
                    partspec: '',
                    stepcode: '',
                    stepname: '',
                    checkstandcode: '',
                    checkstandname: '',
                    check_type: 'EndCheck',
                    sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    sampscare: '',
                    qualitystatus: '/',
                    good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    sampleqty: '',
                    goodqty: '', // åˆæ ¼æ•°é‡
                    ngqty: '', // ä¸è‰¯æ•°é‡
                },
                processArr: [],
                isPlain: true
            }
        },
        created() {
        },
        mounted() {
            this.init()
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // æäº¤æŽ¥å£
            async submit() {
                let checkitemcont = []
                this.processArr.forEach((i, index) => {
                    checkitemcont.push({
                        checknum: i.checkNumber + '/' + this.processArr.length / this
                            .processArr.filter(j => j.checkNumber === 1).length,
                        checkiem_seq: i.stepcheckitem_seq,
                        checkitem_code: i.code,
                        checkitem_name: i.name,
                        check_value: i.real_value ? i.real_value : '',
                        check_result: i.check_result ? 'OK' : 'NG',
                        checkitem_descr: ''
                    })
                })
                console.log(checkitemcont, 7)
                let formData = {
                    stu_torgcode: uni.getStorageSync('stu_torgcode'),
                    wocode: this.processObj.wocode,
                    partcode: this.processObj.partcode,
                    stepcode: this.processObj.stepcode,
                    checkstandcode: this.processObj.checkstandcode,
                    check_type: this.processObj.check_type,
                    sampmethod: this.processObj.sampmethod,
                    qualitystatus: this.isPlain ? 'OK' : 'NG',
                    good_qty: this.processObj.good_qty,
                    sampleqty: this.processObj.sampleqty,
                    goodqty: this.processObj.goodqty,
                    ngqty: this.processObj.sampleqty - this.processObj.goodqty,
                    admin: uni.getStorageSync('usercode'),
                    checkitemcont: JSON.stringify(checkitemcont)
                }
                console.log(formData, 888)
                this.isDisabledSubmitButton = true
                const res = await SaveMesOrderStepCheckItem(formData)
                if (res.code === '200') {
                    uni.$u.toast('提交成功!')
                    setTimeout(() => {
                        let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                        prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                        uni.navigateBack({
                            delta: 1, //返回层数,1则上页
                        })
                    }, 1000)
                    this.isDisabledSubmitButton = false
                } else {
                    uni.$u.toast(result.Message)
                    this.isDisabledSubmitButton = false
                }
                // uni.uploadFile({
                //     url: this.$baseUrl + '/AppQualityManagement/SaveStepCheckItem',
                //     files: [{
                //         "uri": "/"
                //     }],
                //     header: header,
                //     formData: formData,
                //     success: (res) => {
                //         console.log(res, 999)
                //         let result = JSON.parse(res.data)
                //         if (res.statusCode == 200 && result.code == '200') {
                //             uni.$u.toast('提交成功!')
                //             let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                //             prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                //             uni.navigateBack({
                //                 delta: 1, //返回层数,1则上页
                //             })
                //         } else {
                //             uni.$u.toast(result.Message)
                //         }
                //         this.isDisabledSubmitButton = false
                //     },
                //     fail(res) {
                //         console.log(res, 1000)
                //         uni.$u.toast('提交失败!')
                //         this.isDisabledSubmitButton = false
                //     },
                // })
            },
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
</style>
pages/zlgl/xjjy.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,559 @@
<template>
    <view>
        <page-nav title="巡检检验"></page-nav>
        <view v-if="processArr.length===0">
            <div class="sacnBody">
                <div class="scanImg" @click="topScanClick"></div>
                <div class="scanText">扫描工序任务码</div>
            </div>
        </view>
        <view v-if="processArr.length!==0" class="mainContent" style="height: 1340rpx;overflow: auto">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 386rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                å·¥å•信息
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wo_code}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="height: 290rpx;overflow: auto;">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                è´¨æ£€æ–¹æ¡ˆ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>方案名称:</view>
                                <view>抽样方式:</view>
                                <view>报工数量:</view>
                                <view>样本数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view>{{processObj.good_qty}}</view>
                                <u-number-box inputWidth='50' v-model="processObj.sampscare" min='1'
                                    :max='processObj.good_qty' class="contentFont"
                                    @change="samplesChange"></u-number-box>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head" style="">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒé¡¹ç›®
                            </view>
                        </view>
                    </view>
                    <view class="marginBottom20 marginTop10"
                        style="display: flex;justify-content: space-around;align-items: center;">
                        <u-button type="primary" :disabled="checkNumber===1" @click="preTo"
                            style="width: 160rpx;height: 60rpx;" plain text="上一件"></u-button>
                        <view style="">{{checkNumber}}/{{processObj.sampscare}}</view>
                        <u-button type="primary"
                            :disabled="checkNumber===processObj.sampscare||processArr%processArr.filter(i=>i.isPlain!=='').length===0"
                            @click="nextTo" style="width: 160rpx;height: 60rpx; " plain text="下一件"></u-button>
                    </view>
                    <u-gap height="6" style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                    <view class="marginLeft20 marginRight20 marginTop20" style="margin-bottom: 132rpx;">
                        <view class="marginBottom20 flex_column" v-for="(item,index) in processArr"
                            v-if="item.checkNumber===checkNumber" :key="item.name+index+checkNumber">
                            <view class="flex_between marginLeft20 ">
                                <view class="titleFont">{{item.name}}</view>
                                <view class="contentFont" v-if="item.numberjudge==='N'"
                                    style="display: flex;width: 280rpx;">
                                    <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                        shape="circle" @click="item.isPlain=true;$forceUpdate()" :plain='!item.isPlain'
                                        text="合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                    <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                        shape="circle" :plain='item.isPlain' @click="item.isPlain=false;$forceUpdate()"
                                        text="不合格"></u-button>
                                    <!-- :disabled="item.required==='Y'&&!item.real_value" -->
                                </view>
                            </view>
                            <view class="flex_between marginLeft20 ">
                                <view class="flex_column titleFont">
                                    <view v-if="item.standvalue">标准值</view>
                                    <view v-if="item.uppervalue">上限值</view>
                                    <view v-if="item.lowervalue">下限值</view>
                                </view>
                                <view class="flex_column titleFont marginRight20">
                                    <view v-if="item.standvalue">{{item.standvalue}}</view>
                                    <view v-if="item.uppervalue">{{item.uppervalue}}</view>
                                    <view v-if="item.lowervalue">{{item.lowervalue}}</view>
                                </view>
                            </view>
                            <view class="titleFont marginLeft20 marginRight20">
                                <view v-if="item.stepcheckitem_desc">描述 {{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class="flex_between marginLeft20  marginTop10 marginBottom20">
                                <view class="titleFont  " style="display: flex;align-items: center;"
                                    v-if="item.numberjudge==='Y'">
                                    <view class="titleFont marginRight20">
                                        å®žæµ‹å€¼
                                    </view>
                                    <view class="inputClass " style="width:40%;">
                                        <u--input style="" :adjustPosition='false' placeholder="请输入" border="surround"
                                            v-model="item.real_value" @change='val=>realValueBlur(val,item)'></u--input>
                                    </view>
                                    <view style="display: flex;width: 280rpx;margin-left: 12rpx;">
                                        <u-button type="success" style="width: 130rpx;margin-left: 10%;height: 56rpx;"
                                            shape="circle" @click="item.isPlain=true;$forceUpdate()"
                                            :disabled="item.required==='Y'&&!item.real_value" :plain='!item.isPlain'
                                            text="合格"></u-button>
                                        <u-button type="warning" style="width: 130rpx;margin-left: 4%;height: 56rpx;"
                                            shape="circle" :plain='item.isPlain'
                                            :disabled="item.required==='Y'&&!item.real_value"
                                            @click="item.isPlain=false;$forceUpdate()" text="不合格"></u-button>
                                    </view>
                                </view>
                            </view>
                            <!-- <view class=" marginLeft20 marginRight20 marginTop10">
                                <view class="titleFont"> æè¿°ï¼š{{item.stepcheckitem_desc}}</view>
                            </view>
                            <view class=" marginLeft20 marginRight20 marginTop10 marginBottom20"
                                style="display: flex;align-items: center;">
                                <view class="contentFont"> å¤‡æ³¨ï¼š</view>
                                <view class="inputClass " style="">
                                    <u--input style="" placeholder="请输入" border="surround"
                                        v-model="item.stepcheckitem_remark"></u--input>
                                </view>
                            </view> -->
                            <u-gap height="6"
                                v-if="(index+1)%processArr.map(i=>i.checkNumber===1).filter(i=>i).length!==0"
                                style="width: 96%;margin-left: 2%;" bgColor="#eff0f1"></u-gap>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer" v-if="processArr.length!==0">
            <u-button v-if="processArr.length!==0" type="primary" size='large'
                :disabled="!(processArr.filter(i=>i.isPlain==='').length===0)" :hairline="true" @click="navigateTo"
                text="下一步"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        MesOrderStepCheckSearch,
        MesOrderStepCheckItemList
    } from '../../config/api.js';
    export default {
        onLoad(option) {
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                processObj: {
                    // wocode: '',
                    // partcode: '',
                    // partname: '',
                    // partspec: '',
                    // stepcode: '',
                    // stepname: '',
                    // checkstandcode: '',
                    // checkstandname: '',
                    // check_type: '',
                    // sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    // sampscare: '',
                    // qualitystatus: '',
                    // good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    // sampleqty: '',
                    // goodqty: '', // åˆæ ¼æ•°é‡
                    // ngqty: '', // ä¸è‰¯æ•°é‡
                }, //工序检验对象
                processArr: [], //工序检验数组
                checkNumber: 1, //检验项目中的检验数量  çŽ°åœ¨å¤„äºŽç¬¬å‡ ä¸ª
            }
        },
        created() {
        },
        mounted() {
            this.init()
            // this.getStepCheckSearch('MO-2024-01-0004_2;101')
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            async getStepCheckSearch(orderstepqrcode) {
                console.log('执行了')
                // æ£€éªŒæ–¹å¼FirstCheck(首检) PatroCheck(巡检) EndCheck(完工检)
                const data = {
                    // 'MO-2023-05-0003_1;Step06'
                    orderstepqrcode,
                    checktype: 'PatroCheck',
                    // stu_torgcode: uni.getStorageSync('stu_torgcode')
                }
                // const res = await MesOrderStepCheckSearch(this.global.formatData(data))
                const res = await MesOrderStepCheckSearch(data)
                if (res.code === '200') {
                    this.processObj = {
                        wo_code: res.data.labcont[0].wo_code,
                        partcode: res.data.labcont[0].partcode,
                        partname: res.data.labcont[0].partname,
                        partspec: res.data.labcont[0].partspec,
                        stepcode: res.data.labcont[0].stepcode,
                        stepname: res.data.labcont[0].stepname,
                        good_qty: res.data.labcont[0].good_qty,
                        checkstandcode: res.data.chekstand[0].checkstandcode,
                        checkstandname: res.data.chekstand[0].checkstandname,
                        sampmethod: res.data.chekstand[0].sampmethod,
                        sampscare: res.data.chekstand[0].sampmethod === 'FIXED' ? res.data.chekstand[0].sampscare :
                            Math.ceil(res.data.labcont[0].good_qty * res.data.chekstand[0].sampscare / 100)
                    }
                    this.processObj.sampscare = this.processObj.sampscare <= this.processObj.good_qty ? this.processObj
                        .sampscare : this.processObj.good_qty
                    await this.getStepCheckItemList(this.processObj.checkstandcode)
                }
            },
            async getStepCheckItemList(checkstandcode) {
                const data = {
                    checkstandcode
                }
                const res = await MesOrderStepCheckItemList(data)
                this.processArr = []
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    res.data.forEach(j => {
                        this.processArr.push({
                            checkNumber: i + 1,
                            stepcheckitem_seq: j.stepcheckitem_seq,
                            name: j.name,
                            code: j.code,
                            standvalue: j.standvalue,
                            lowervalue: j.lowervalue,
                            uppervalue: j.uppervalue,
                            real_value: j.real_value,
                            unit: j.unit,
                            stepcheckitem_desc: j.stepcheckitem_desc,
                            stepcheckitem_remark: '',
                            isPlain: '',
                            required: j.required, //是否必填
                            numberjudge: j.numberjudge, //数值判断
                        })
                    })
                }
            },
            // æ ·æœ¬æ•°é‡å€¼æ”¹å˜æ—¶
            samplesChange(val) {
                console.log(val.value)
                const t = this.processArr.filter(i => i.checkNumber === 1)
                let len = this.processArr.length / t.length
                // ä»¶æ•°å‡å°‘æ—¶
                if (val.value < this.processArr.length / t.length) {
                    this.processArr.reverse()
                    const a = this.processArr.splice(0, t.length * (len - val.value))
                    this.processArr.reverse()
                    if (this.checkNumber > val.value) {
                        this.checkNumber = val.value
                    }
                }
                // ä»¶æ•°å˜å¤šæ—¶
                if (val.value > this.processArr.length / t.length) {
                    for (var i = val.value; i > len; i--) {
                        t.forEach(j => {
                            this.processArr.push({
                                checkNumber: i,
                                stepcheckitem_seq: j.stepcheckitem_seq,
                                name: j.name,
                                code: j.code,
                                standvalue: j.standvalue,
                                lowervalue: j.lowervalue,
                                uppervalue: j.uppervalue,
                                real_value: '',
                                unit: j.unit,
                                stepcheckitem_desc: j.stepcheckitem_desc,
                                stepcheckitem_remark: '',
                                isPlain: '',
                                required: j.required, //是否必填
                                numberjudge: j.numberjudge, //数值判断
                            })
                        })
                    }
                    this.processArr.sort((a, b) => a.checkNumber - b.checkNumber)
                }
                // console.log(this.processArr, 1)
                // console.log(this.processArr.length, 1)
                this.$forceUpdate()
            },
            // ä¸Šä¸€ä»¶
            preTo() {
                if (this.checkNumber > 1) {
                    this.checkNumber--
                }
            },
            //下一件
            nextTo() {
                if (this.checkNumber < this.processObj.sampscare) {
                    this.checkNumber++
                }
                this.$forceUpdate()
            },
            // å®žæµ‹å€¼è¾“入时失焦状态
            realValueBlur(val, item) {
                console.log(val === '', item)
                if (val.value !== '') {
                    if (item.numberjudge === 'Y') { //如果需要进行数值判断
                        if (item.uppervalue === '' && item.lowervalue === '') { //上限值为空,下限值为空
                            if (parseFloat(val) === parseFloat(item.standvalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue !== '') { //上限值不为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue) && parseFloat(val) <=
                                parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue !== '' && item.lowervalue === '') { //上限值不为空,下限值为空
                            if (parseFloat(val) <= parseFloat(item.uppervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                        if (item.uppervalue === '' && item.lowervalue !== '') { //上限值为空,下限值不为空
                            if (parseFloat(val) >= parseFloat(item.lowervalue)) {
                                item.isPlain = true
                            } else {
                                item.isPlain = false
                            }
                        }
                    }
                }
                if (val === '') {
                    item.isPlain = ''
                }
                // this.$forceUpdate()
            },
            // ä¸‹ä¸€æ­¥
            navigateTo() {
                // è®¡ç®—OK值
                let goodqty = 0;
                for (var i = 0; i < this.processObj.sampscare; i++) {
                    let flag = this.processArr.filter(j => j.checkNumber === i + 1).every(j => j.isPlain)
                    if (flag) {
                        goodqty++
                    }
                }
                uni.navigateTo({
                    url: './xjjy2?processObj=' + JSON.stringify(this.processObj) +
                        '&processArr=' + JSON.stringify(this.processArr) + '&goodqty=' + goodqty
                });
            },
            // æ‰«ç 
            topScanClick() {
                let that = this;
                uni.scanCode({
                    onlyFromCamera: true,
                    // scanType: ['barCode', 'qrCode'],
                    scanType: ['qrCode'],
                    success: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                        that.getStepCheckSearch(res.result)
                        // that.scanContent = res.result;
                        // let flag = false
                        // that.processArr.forEach(item => {
                        //     if (item.hbarcode === res.result) {
                        //         flag = true
                        //     }
                        // })
                        // if (flag) {
                        //     that.$u.toast('此条码已扫描,已在列表中!')
                        // } else {
                        //     //处理扫码事件
                        //     // that.getStepCheckSearch(that.scanContent);
                        // }
                    },
                    complete: function(res) {
                    },
                    fail: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                    }
                });
            },
            fromSubmitData() {
                this.processObj = {}
                this.processArr = []
                this.checkNumber = 1
            }
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
    ::v-deep .u-input {
        padding: 6rpx 18rpx !important;
    }
    ::v-deep .u-number-box__minus {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__input {
        height: 50rpx !important;
    }
    ::v-deep .u-number-box__plus {
        height: 50rpx !important;
    }
</style>
pages/zlgl/xjjy2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,307 @@
<template>
    <view>
        <page-nav title="巡检检验"></page-nav>
        <view class="mainContent">
            <view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                ç‰©æ–™ä¿¡æ¯
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20">
                        <view class="marginBottom20" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>单据编号:</view>
                                <view>物料编码:</view>
                                <view>物料名称:</view>
                                <view>物料规格:</view>
                                <view>工序编码:</view>
                                <view>工序名称:</view>
                                <view>质检方案:</view>
                                <view>抽样方式:</view>
                                <view>质量状态:</view>
                                <view>物料数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.wocode}}</view>
                                <view>{{processObj.partcode}}</view>
                                <view>{{processObj.partname}}</view>
                                <view>{{processObj.partspec?processObj.partspec:'/'}}</view>
                                <view>{{processObj.stepcode}}</view>
                                <view>{{processObj.stepname}}</view>
                                <view class="ellipsis" style="width: 460rpx;">{{processObj.checkstandname}}</view>
                                <view>{{processObj.sampmethod==='FIXED'?'固时抽检':'比例抽检'}}</view>
                                <view style="display: flex;align-items: center;">
                                    <u-icon :name="isPlain?'checkmark-circle-fill':'close-circle-fill'"
                                        :color="isPlain?'#55ff00':'#FF0000'" size="20"></u-icon>
                                    <view style="margin-left: 10rpx;">
                                        {{isPlain?'合格':'不合格'}}
                                    </view>
                                </view>
                                <view>{{processObj.good_qty}}</view>
                            </view>
                        </view>
                    </view>
                </view>
                <u-gap height="10" bgColor="#eff0f1"></u-gap>
                <view class="head">
                    <view class="head_block">
                        <view class="head_left">
                            <view class="head_bar"></view>
                            <view class="head_title" style="font-weight: bolder;">
                                æ£€éªŒç»“æžœ
                            </view>
                        </view>
                    </view>
                    <view class="marginLeft20 marginRight20 marginBottom20">
                        <view class="" style="display: flex;">
                            <view class="flex_column titleFont">
                                <view>样本数量:</view>
                                <view>合格数量:</view>
                                <view>不合格数量:</view>
                            </view>
                            <view class="flex_column contentFont">
                                <view>{{processObj.sampleqty}} ä¸ª</view>
                                <view>{{processObj.goodqty}} ä¸ª</view>
                                <view>{{processObj.sampleqty-processObj.goodqty}} ä¸ª</view>
                            </view>
                        </view>
                        <view style="display: flex;margin-top: 30rpx;justify-content: flex-start;">
                            <u-button type="primary" @click="isPlain=true" style="width: 160rpx;height: 60rpx; "
                                :plain="!isPlain" text="合格"></u-button>
                            <u-button type="warning" @click="isPlain=false" style="width: 160rpx;height: 60rpx;"
                                :plain="isPlain" text="不合格"></u-button>
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <view class="footer">
            <u-button type="primary" size='large' :hairline="true" :loading="isDisabledSubmitButton" @click="submit"
                loadingText="正在提交,请稍等..." text="确认提交"></u-button>
        </view>
    </view>
</template>
<script>
    import {
        SaveMesOrderStepCheckItem
    } from '../../config/api.js';
    export default {
        onLoad(option) {
            console.log(option, 2)
            // let t1=JSON.parse(option.processObj)
            // let t2=JSON.parse(option.processObj)
            let processObj = JSON.parse(option.processObj)
            // console.log(this.processObj)
            this.processObj.wocode = processObj.wo_code
            this.processObj.partcode = processObj.partcode
            this.processObj.partname = processObj.partname
            this.processObj.partspec = processObj.partspec
            this.processObj.stepcode = processObj.stepcode
            this.processObj.stepname = processObj.stepname
            this.processObj.sampmethod = processObj.sampmethod
            this.processObj.good_qty = processObj.good_qty
            this.processObj.checkstandcode = processObj.checkstandcode
            this.processObj.checkstandname = processObj.checkstandname
            this.processObj.sampleqty = processObj.sampscare
            this.processObj.goodqty = option.goodqty
            this.isPlain = parseFloat(this.processObj.goodqty) === parseFloat(this.processObj.sampleqty)
            this.processArr = JSON.parse(option.processArr)
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                topRightMessageCount: '',
                isDisabledSubmitButton: false,
                processObj: {
                    wocode: '',
                    partcode: '',
                    partname: '',
                    partspec: '',
                    stepcode: '',
                    stepname: '',
                    checkstandcode: '',
                    checkstandname: '',
                    check_type: 'PatroCheck',
                    sampmethod: '', // FIXED(固时抽检)  SCARE(比例抽检)
                    sampscare: '',
                    qualitystatus: '/',
                    good_qty: '', // æŒ‡çš„æŠ¥å·¥æ•°é‡
                    sampleqty: '',
                    goodqty: '', // åˆæ ¼æ•°é‡
                    ngqty: '', // ä¸è‰¯æ•°é‡
                },
                processArr: [],
                isPlain: true
            }
        },
        created() {
        },
        mounted() {
            this.init()
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // æäº¤æŽ¥å£
            async submit() {
                let checkitemcont = []
                this.processArr.forEach((i, index) => {
                    checkitemcont.push({
                        checknum: i.checkNumber + '/' + this.processArr.length / this
                            .processArr.filter(j => j.checkNumber === 1).length,
                        checkiem_seq: i.stepcheckitem_seq,
                        checkitem_code: i.code,
                        checkitem_name: i.name,
                        check_value: i.real_value ? i.real_value : '',
                        check_result: i.check_result ? 'OK' : 'NG',
                        checkitem_descr: ''
                    })
                })
                console.log(checkitemcont, 7)
                let formData = {
                    stu_torgcode: uni.getStorageSync('stu_torgcode'),
                    wocode: this.processObj.wocode,
                    partcode: this.processObj.partcode,
                    stepcode: this.processObj.stepcode,
                    checkstandcode: this.processObj.checkstandcode,
                    check_type: this.processObj.check_type,
                    sampmethod: this.processObj.sampmethod,
                    qualitystatus: this.isPlain ? 'OK' : 'NG',
                    good_qty: this.processObj.good_qty,
                    sampleqty: this.processObj.sampleqty,
                    goodqty: this.processObj.goodqty,
                    ngqty: this.processObj.sampleqty - this.processObj.goodqty,
                    admin: uni.getStorageSync('usercode'),
                    checkitemcont: JSON.stringify(checkitemcont)
                }
                console.log(formData, 888)
                this.isDisabledSubmitButton = true
                const res = await SaveMesOrderStepCheckItem(formData)
                if (res.code === '200') {
                    uni.$u.toast('提交成功!')
                    setTimeout(() => {
                        let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                        prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                        uni.navigateBack({
                            delta: 1, //返回层数,1则上页
                        })
                    }, 1000)
                    this.isDisabledSubmitButton = false
                } else {
                    uni.$u.toast(result.Message)
                    this.isDisabledSubmitButton = false
                }
                // uni.uploadFile({
                //     url: this.$baseUrl + '/AppQualityManagement/SaveStepCheckItem',
                //     files: [{
                //         "uri": "/"
                //     }],
                //     header: header,
                //     formData: formData,
                //     success: (res) => {
                //         console.log(res, 999)
                //         let result = JSON.parse(res.data)
                //         if (res.statusCode == 200 && result.code == '200') {
                //             uni.$u.toast('提交成功!')
                //             let prevPage = getCurrentPages()[getCurrentPages().length - 2]; // ä¸Šä¸€é¡µé¢å®žä¾‹
                //             prevPage.$vm.fromSubmitData() // è°ƒç”¨ä¸Šä¸€é¡µ å®šä¹‰çš„æ–¹æ³•
                //             uni.navigateBack({
                //                 delta: 1, //返回层数,1则上页
                //             })
                //         } else {
                //             uni.$u.toast(result.Message)
                //         }
                //         this.isDisabledSubmitButton = false
                //     },
                //     fail(res) {
                //         console.log(res, 1000)
                //         uni.$u.toast('提交失败!')
                //         this.isDisabledSubmitButton = false
                //     },
                // })
            },
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
</style>
style/global.css
@@ -210,4 +210,10 @@
    color: #000ccc;
    margin-top: 20rpx;
    letter-spacing: 2rpx;
}
.footer {
    position: fixed;
    bottom: 0;
}
unpackage/dist/dev/app-plus/app-config-service.js
@@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/login/index","pages/xtsy/index","pages/mjgl/mjcx","pages/mjgl/mjcx2","pages/mjgl/mjdj","pages/mjgl/mjdj2","pages/mjgl/mjby","pages/mjgl/mjby2","pages/mjgl/wxsq","pages/mjgl/wxsq2","pages/mjgl/mjwx","pages/mjgl/wxyz","pages/mjgl/mjsj","pages/mjgl/mjsj2","pages/mjgl/mjxj","pages/mjgl/mjxj2","pages/mjgl/mjrk","pages/mjgl/mjrk2","pages/mjgl/mjck","pages/mjgl/mjck2","pages/mjgl/mjwj","pages/mjgl/mjwj2","pages/mjgl/mjgh","pages/mjgl/mjgh2","pages/scgl/scbg","pages/wwgl/wxfl","pages/wwgl/wxsl","pages/znfx/scfx","pages/grzx/gzcl","pages/znfx/scjd","pages/znfx/chda"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JLApp","compilerVersion":"3.92","entryPagePath":"pages/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/login/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"登录","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/xtsy/index","meta":{},"window":{"navigationBarTitleText":"系统首页","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjcx","meta":{},"window":{"navigationBarTitleText":"模具查询","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjcx2","meta":{},"window":{"navigationBarTitleText":"模具查询","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjdj","meta":{},"window":{"navigationBarTitleText":"模具点检","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjdj2","meta":{},"window":{"navigationBarTitleText":"模具点检","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjby","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjby2","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq","meta":{},"window":{"navigationBarTitleText":"维修申请","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq2","meta":{},"window":{"navigationBarTitleText":"维修申请","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwx","meta":{},"window":{"navigationBarTitleText":"模具维修","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxyz","meta":{},"window":{"navigationBarTitleText":"维修验证","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjsj","meta":{},"window":{"navigationBarTitleText":"模具上机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjsj2","meta":{},"window":{"navigationBarTitleText":"模具上机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjxj","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjxj2","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk2","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck2","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj2","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh","meta":{},"window":{"navigationBarTitleText":"模具归还","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh2","meta":{},"window":{"navigationBarTitleText":"模具归还","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/scgl/scbg","meta":{},"window":{"navigationBarTitleText":"生产报工","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/wwgl/wxfl","meta":{},"window":{"navigationBarTitleText":"外协发料","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/wwgl/wxsl","meta":{},"window":{"navigationBarTitleText":"外协收料","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/scfx","meta":{},"window":{"navigationBarTitleText":"生产分析","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/grzx/gzcl","meta":{},"window":{"navigationBarTitleText":"工资产量","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/scjd","meta":{},"window":{"navigationBarTitleText":"生产进度","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/chda","meta":{},"window":{"navigationBarTitleText":"存货档案","navigationStyle":"custom","enablePullDownRefresh":false}}];
var __uniConfig = {"pages":["pages/login/index","pages/xtsy/index","pages/mjgl/mjcx","pages/mjgl/mjcx2","pages/mjgl/mjdj","pages/mjgl/mjdj2","pages/mjgl/mjby","pages/mjgl/mjby2","pages/mjgl/wxsq","pages/mjgl/wxsq2","pages/mjgl/mjwx","pages/mjgl/wxyz","pages/mjgl/mjsj","pages/mjgl/mjsj2","pages/mjgl/mjxj","pages/mjgl/mjxj2","pages/mjgl/mjrk","pages/mjgl/mjrk2","pages/mjgl/mjck","pages/mjgl/mjck2","pages/mjgl/mjwj","pages/mjgl/mjwj2","pages/mjgl/mjgh","pages/mjgl/mjgh2","pages/scgl/scbg","pages/wwgl/wxfl","pages/wwgl/wxsl","pages/znfx/scfx","pages/grzx/gzcl","pages/znfx/scjd","pages/znfx/chda","pages/zlgl/sjjy","pages/zlgl/sjjy2","pages/zlgl/xjjy","pages/zlgl/xjjy2","pages/zlgl/wgjy","pages/zlgl/wgjy2"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#F8F8F8","backgroundColor":"#F8F8F8"},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"JLApp","compilerVersion":"3.92","entryPagePath":"pages/login/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/login/index","meta":{"isQuit":true},"window":{"navigationBarTitleText":"登录","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/xtsy/index","meta":{},"window":{"navigationBarTitleText":"系统首页","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjcx","meta":{},"window":{"navigationBarTitleText":"模具查询","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjcx2","meta":{},"window":{"navigationBarTitleText":"模具查询","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjdj","meta":{},"window":{"navigationBarTitleText":"模具点检","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjdj2","meta":{},"window":{"navigationBarTitleText":"模具点检","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjby","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjby2","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq","meta":{},"window":{"navigationBarTitleText":"维修申请","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq2","meta":{},"window":{"navigationBarTitleText":"维修申请","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwx","meta":{},"window":{"navigationBarTitleText":"模具维修","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxyz","meta":{},"window":{"navigationBarTitleText":"维修验证","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjsj","meta":{},"window":{"navigationBarTitleText":"模具上机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjsj2","meta":{},"window":{"navigationBarTitleText":"模具上机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjxj","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjxj2","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk2","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck2","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj2","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh","meta":{},"window":{"navigationBarTitleText":"模具归还","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh2","meta":{},"window":{"navigationBarTitleText":"模具归还","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/scgl/scbg","meta":{},"window":{"navigationBarTitleText":"生产报工","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/wwgl/wxfl","meta":{},"window":{"navigationBarTitleText":"外协发料","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/wwgl/wxsl","meta":{},"window":{"navigationBarTitleText":"外协收料","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/scfx","meta":{},"window":{"navigationBarTitleText":"生产分析","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/grzx/gzcl","meta":{},"window":{"navigationBarTitleText":"工资产量","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/scjd","meta":{},"window":{"navigationBarTitleText":"生产进度","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/znfx/chda","meta":{},"window":{"navigationBarTitleText":"存货档案","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/sjjy","meta":{},"window":{"navigationBarTitleText":"首检检验","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/sjjy2","meta":{},"window":{"navigationBarTitleText":"首检检验","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/xjjy","meta":{},"window":{"navigationBarTitleText":"巡检检验","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/xjjy2","meta":{},"window":{"navigationBarTitleText":"巡检检验","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/wgjy","meta":{},"window":{"navigationBarTitleText":"完工检验","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/zlgl/wgjy2","meta":{},"window":{"navigationBarTitleText":"完工检验","navigationStyle":"custom","enablePullDownRefresh":false}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});
unpackage/dist/dev/app-plus/app-service.js
ÎļþÌ«´ó
unpackage/dist/dev/app-plus/app-view.js
ÎļþÌ«´ó
unpackage/dist/dev/app-plus/manifest.json
@@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__4B963DF","name":"JLApp","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","alwaysShowBeforeRender":false,"waiting":false,"autoclose":false,"delay":0},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"maps":{},"share":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.92","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}}
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__4B963DF","name":"JLApp","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"Camera":{},"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"render":"always","id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#F8F8F8"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"icons":{"android":{"hdpi":"unpackage/res/icons/72x72.png","xhdpi":"unpackage/res/icons/96x96.png","xxhdpi":"unpackage/res/icons/144x144.png","xxxhdpi":"unpackage/res/icons/192x192.png"},"ios":{"appstore":"unpackage/res/icons/1024x1024.png","ipad":{"app":"unpackage/res/icons/76x76.png","app@2x":"unpackage/res/icons/152x152.png","notification":"unpackage/res/icons/20x20.png","notification@2x":"unpackage/res/icons/40x40.png","proapp@2x":"unpackage/res/icons/167x167.png","settings":"unpackage/res/icons/29x29.png","settings@2x":"unpackage/res/icons/58x58.png","spotlight":"unpackage/res/icons/40x40.png","spotlight@2x":"unpackage/res/icons/80x80.png"},"iphone":{"app@2x":"unpackage/res/icons/120x120.png","app@3x":"unpackage/res/icons/180x180.png","notification@2x":"unpackage/res/icons/40x40.png","notification@3x":"unpackage/res/icons/60x60.png","settings@2x":"unpackage/res/icons/58x58.png","settings@3x":"unpackage/res/icons/87x87.png","spotlight@2x":"unpackage/res/icons/80x80.png","spotlight@3x":"unpackage/res/icons/120x120.png"}}},"splashscreen":{"androidStyle":"common","alwaysShowBeforeRender":false,"waiting":false,"autoclose":false,"delay":0},"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{"dSYMs":false},"plugins":{"ad":{},"maps":{},"share":{},"push":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"uni-app":{"compilerVersion":"3.92","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"launch_path":"__uniappview.html"}}