loulijun2021
2023-10-20 a43c253d30dbb8cef1760e19cb3d290a2dd3b759
1.模具列表、模具信息 100%
已添加1个文件
已修改6个文件
6348 ■■■■■ 文件已修改
config/api.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mjgl/mjcx.vue 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/mjgl/mjcx2.vue 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-config-service.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-service.js 2999 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
unpackage/dist/dev/app-plus/app-view.js 2919 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
config/api.js
@@ -70,4 +70,14 @@
    })
// æ¨¡å…·ç»´ä¿®éªŒè¯æäº¤
export const RepairVerificationScanMouldSave = (data) => http.post('/MouldManager/RepairVerificationScanMouldSave',
    data)
    data)
// æ¨¡å…·ä¿¡æ¯æŸ¥è¯¢,扫描模具二维码
export const ScanMouldQrCodeMessageData = (data) => http.get('/MouldManager/ScanMouldQrCodeMessageData', {
    params: data
})
// æ¨¡å…·ä¿¡æ¯æŸ¥è¯¢æ˜Žç»†
export const ScanMouldQrCodeMessageSubData = (data) => http.get('/MouldManager/ScanMouldQrCodeMessageSubData', {
    params: data
})
pages.json
@@ -32,6 +32,14 @@
            }
        },
        {
            "path": "pages/mjgl/mjcx2",
            "style": {
                "navigationBarTitleText": "模具查询",
                "navigationStyle": "custom",
                "enablePullDownRefresh": false
            }
        },
        {
            "path": "pages/mjgl/mjdj",
            "style": {
                "navigationBarTitleText": "模具点检",
pages/mjgl/mjcx.vue
@@ -1,8 +1,195 @@
<template>
    <view>
        <page-nav title="模具列表"></page-nav>
        <view v-if="purchorderArrAll.length>0">
            <u-input prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" placeholder="扫描模具编码/输入模具信息"
                clearable border="surround" @clear='inputBoxValueClear' v-model="inputBoxValue"
                @change="changeInputBoxValue">
                <template slot="suffix">
                    <u-icon name="scan" color="#909399" size="24" @click="topScanClick"></u-icon>
                </template>
            </u-input>
            <u-alert :title="'模具数(共'+title+'个)'" type="primary"></u-alert>
            <u-radio-group v-model="radioValue" iconPlacement="right" @change="radioValueClick" class="radioGroupClass">
                <view v-for="(item,index) in purchorderArr" :key="item.code">
                    <!-- @click="radioValueClick(item.code)" -->
                    <view>
                        <u-radio activeColor="red" size="18" labelSize='16' :name='item.code'
                            :label="item.code+' ' + item.name +' '+item.spec "></u-radio>
                    </view>
                    <u-line v-if="index!==purchorderArr.length-1" color="#2979ff"></u-line>
                </view>
            </u-radio-group>
            <view style="height: 120rpx;"></view>
            <view class="footer" style="min-height:62rpx;">
                <u-button type="primary" size='large' :hairline="true" @click="navigateTo" text="下一步"></u-button>
            </view>
        </view>
        <view v-if="purchorderArrAll.length===0">
            <div class="sacnBody">
                <div class="boxImg"></div>
                <div class="scanText">暂无模具信息</div>
            </div>
        </view>
    </view>
</template>
<script>
    import {
        ScanMouldQrCodeMessageData,
        ScanMouldQrCodeMessageSubData
    } from '../../config/api.js';
    export default {
        onLoad(option) {},
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                inputBoxValue: '', //输入框值
                title: 0,
                radioValue: '',
                purchorderArr: [],
                purchorderArrAll: []
            }
        },
        created() {
        },
        mounted() {
            this.init()
            this.getScanMouldQrCodeMessageData()
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            // æ‰«ç å·¥ä½  çš„æ‰«ç æ¡†ç‚¹å‡»
            topScanClick() {
                // if (this.topContent.length > 0) {
                //     return uni.$u.toast('请先提交此维修申请!')
                // }
                let that = this;
                uni.scanCode({
                    onlyFromCamera: true,
                    // scanType: ['barCode', 'qrCode'],
                    scanType: ['qrCode'],
                    success: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                        that.scanContent = res.result;
                        that.inputBoxValue = res.result;
                        //处理扫码事件
                        that.changeInputBoxValue(that.scanContent);
                    },
                    complete: function(res) {
                    },
                    fail: function(res) {
                        console.log('条码类型:' + res.scanType);
                        console.log('条码内容:' + res.result);
                    }
                });
            },
            changeInputBoxValue(val) {
                this.purchorderArr = this.purchorderArrAll.filter((p) => {
                    return p.code.indexOf(val) !== -1 || p.name.indexOf(val) !== -1 || p.spec.indexOf(val) !== -1
                })
                this.radioValue = this.purchorderArr[0].code
                this.$forceUpdate()
            },
            inputBoxValueClear() {
                this.inputBoxValue = ''
            },
            radioValueClick(val) {
                this.radioValue = val
            },
            navigateTo() {
                uni.navigateTo({
                    url: './mjcx2?code=' + this.radioValue
                });
            },
            async getScanMouldQrCodeMessageData() {
                const res = await ScanMouldQrCodeMessageData()
                this.purchorderArrAll = res.data
                this.purchorderArr = res.data
                this.title = res.data.length
                this.radioValue = res.data[0].code
            }
        }
    }
</script>
<style>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
    .u-input--square {
        margin: 20rpx 10rpx;
        border-radius: 40rpx;
        background-color: #fff;
        border: 1px solid #c8c8c8;
    }
    ::v-deep .u-alert__text--primary--light {
        margin-bottom: 0;
        font-size: 32rpx !important;
    }
    .radioGroupClass {
        display: flex;
        flex-direction: column;
        background-color: #fff;
        overflow-y: auto;
        max-height: 1140rpx;
        margin-top: 20rpx;
    }
    ::v-deep .u-radio-label--right {
        height: 90rpx;
        line-height: 90rpx;
        width: 92%;
        margin-left: 4%;
        // padding: 0 50rpx;
    }
</style>
pages/mjgl/mjcx2.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,217 @@
<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">
                                æ¨¡å…·ä¿¡æ¯
                            </view>
                        </view>
                        <!-- <view class="marginRight20">
                            <u-icon name="scan" @click="topScanClick" color="red" size="24"></u-icon>
                        </view> -->
                    </view>
                    <view class=" flex_column" style="padding: 20rpx;">
                        <view class="flex_between" v-for="item in topContent" :key="item.mouldcode">
                            <view 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 class="flex_column contentFont">
                                    <view>{{item.mouldcode}}</view>
                                    <view>{{item.mouldname}}</view>
                                    <view>{{item.mouldspec?item.mouldspec:'/'}}</view>
                                    <view>{{item.surp_life}}</view>
                                    <view>{{item.resi_life}}</view>
                                    <view>{{item.status==='Y'?'正常':'异常'}}</view>
                                    <view>
                                        {{onstateArr.find(i=>parseFloat(i.code) === parseFloat(item.usestatus)).name}}
                                    </view>
                                    <view>{{item.checkdate?item.checkdate:'/'}}</view>
                                    <view>{{item.maintdate?item.maintdate:'/'}}</view>
                                </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">
                                å…³è”产品信息
                            </view>
                        </view>
                        <!-- <view class="marginRight20">
                            <u-icon name="scan" @click="topScanClick" color="red" size="24"></u-icon>
                        </view> -->
                    </view>
                    <view class=" flex_column" style="padding: 20rpx;" v-if='centerContent&&centerContent.length>0'>
                        <view class="flex_between" v-for="(item,index) in centerContent" :key="item.partcode">
                            <view class="flex_column" style="width: 100%;">
                                <view style="display: flex;width: 100%;">
                                    <view class="flex_column titleFont">
                                        <view>模具编码:</view>
                                        <view>模具名称:</view>
                                        <view>规格型号:</view>
                                    </view>
                                    <view class="flex_column contentFont">
                                        <view>{{item.partcode}}</view>
                                        <view>{{item.partname}}</view>
                                        <view>{{item.partspec?item.partspec:'/'}}</view>
                                    </view>
                                </view>
                                <u-line v-if="index!==centerContent.length-1" style="width: 100%;"
                                    color="#2979ff"></u-line>
                            </view>
                        </view>
                    </view>
                    <view v-else class="titleFont" style="margin: 20rpx;">
                        æš‚无关联产品
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        ScanMouldQrCodeMessageSubData
    } from '../../config/api.js';
    export default {
        onLoad(option) {
            this.resultValue = option.code
        },
        onPullDownRefresh() {
            setTimeout(() => {
                this.init(() => {
                    uni.stopPullDownRefresh();
                })
            }, 1000);
        },
        data() {
            return {
                isDisabledSubmitButton: false,
                topContent: [],
                centerContent: [],
                resultValue: '',
                onstateArr: [{
                        code: 0,
                        name: '在库'
                    },
                    {
                        code: 1,
                        name: '出库'
                    },
                    {
                        code: 2,
                        name: '上机'
                    },
                    {
                        code: 3,
                        name: '下机'
                    },
                    {
                        code: 4,
                        name: '待维修'
                    },
                    {
                        code: 5,
                        name: '已维修'
                    },
                    {
                        code: 6,
                        name: '已验证'
                    },
                    {
                        code: 7,
                        name: '外借'
                    },
                    {
                        code: 8,
                        name: '归还'
                    }
                ],
            }
        },
        created() {
        },
        mounted() {
            this.init()
            this.getScanMouldQrCodeMessageSubData()
        },
        methods: {
            init() {
                uni.stopPullDownRefresh();
            },
            async getScanMouldQrCodeMessageSubData() {
                const {
                    data: res
                } = await ScanMouldQrCodeMessageSubData({
                    mouldcode: this.resultValue
                })
                this.topContent = res
                this.centerContent = res[0].children
            },
        }
    }
</script>
<style lang="scss" scoped>
    @import url('@/style/global.css');
    ::v-deep .uicon-arrow-left>span {
        display: block;
    }
</style>
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/mjdj","pages/mjgl/mjby","pages/mjgl/wxsq","pages/mjgl/mjwx","pages/mjgl/wxyz","pages/mjgl/mjsj","pages/mjgl/mjxj","pages/mjgl/mjrk","pages/mjgl/mjck","pages/mjgl/mjwj","pages/mjgl/mjgh"],"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/mjdj","meta":{},"window":{"navigationBarTitleText":"模具点检","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjby","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq","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/mjxj","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh","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/mjby","pages/mjgl/wxsq","pages/mjgl/mjwx","pages/mjgl/wxyz","pages/mjgl/mjsj","pages/mjgl/mjxj","pages/mjgl/mjrk","pages/mjgl/mjck","pages/mjgl/mjwj","pages/mjgl/mjgh"],"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/mjby","meta":{},"window":{"navigationBarTitleText":"模具保养","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/wxsq","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/mjxj","meta":{},"window":{"navigationBarTitleText":"模具下机","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjrk","meta":{},"window":{"navigationBarTitleText":"模具入库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjck","meta":{},"window":{"navigationBarTitleText":"模具出库","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjwj","meta":{},"window":{"navigationBarTitleText":"模具外借","navigationStyle":"custom","enablePullDownRefresh":false}},{"path":"/pages/mjgl/mjgh","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
ÎļþÌ«´ó